Re: [FFmpeg-devel] [PATCH] avcodec: do not use init_static_data on some codecs

2018-02-03 Thread Muhammad Faiz
On Sat, Feb 3, 2018 at 9:29 AM, Michael Niedermayer wrote: > On Sat, Feb 03, 2018 at 01:36:37AM +0700, Muhammad Faiz wrote: >> They don't modify AVCodec, no needs to call it at register. They will be >> wasteful if these codecs are unused. Instead, call static data initialization >> at codecs' ini

Re: [FFmpeg-devel] [PATCH] avcodec: do not use init_static_data on some codecs

2018-02-03 Thread wm4
On Sat, 3 Feb 2018 03:29:40 +0100 Michael Niedermayer wrote: > On Sat, Feb 03, 2018 at 01:36:37AM +0700, Muhammad Faiz wrote: > > They don't modify AVCodec, no needs to call it at register. They will be > > wasteful if these codecs are unused. Instead, call static data > > initialization > > at

Re: [FFmpeg-devel] [PATCH] avcodec: do not use init_static_data on some codecs

2018-02-02 Thread Michael Niedermayer
On Sat, Feb 03, 2018 at 01:36:37AM +0700, Muhammad Faiz wrote: > They don't modify AVCodec, no needs to call it at register. They will be > wasteful if these codecs are unused. Instead, call static data initialization > at codecs' init. > > Benchmark: > old: 51281340 decicycles in avcodec_register

Re: [FFmpeg-devel] [PATCH] avcodec: do not use init_static_data on some codecs

2018-02-02 Thread wm4
On Sat, 3 Feb 2018 01:36:37 +0700 Muhammad Faiz wrote: > They don't modify AVCodec, no needs to call it at register. They will be > wasteful if these codecs are unused. Instead, call static data initialization > at codecs' init. > > Benchmark: > old: 51281340 decicycles in avcodec_register_all,

[FFmpeg-devel] [PATCH] avcodec: do not use init_static_data on some codecs

2018-02-02 Thread Muhammad Faiz
They don't modify AVCodec, no needs to call it at register. They will be wasteful if these codecs are unused. Instead, call static data initialization at codecs' init. Benchmark: old: 51281340 decicycles in avcodec_register_all, 1 runs, 0 skips new: 6738960 decicycles in avcodec_regist