On Sat, 3 Feb 2018 03:29:40 +0100 Michael Niedermayer <mich...@niedermayer.cc> 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' init. > > > > Benchmark: > > old: 51281340 decicycles in avcodec_register_all, 1 runs, 0 skips > > new: 6738960 decicycles in avcodec_register_all, 1 runs, 0 skips > > > > Signed-off-by: Muhammad Faiz <mfc...@gmail.com> > > --- > > libavcodec/jpeg2000dec.c | 16 +++++++++------- > > libavcodec/qdmc.c | 7 +++++-- > > libavcodec/wmavoice.c | 7 +++++-- > > 3 files changed, 19 insertions(+), 11 deletions(-) > > LGTM > > it would be better though if this would happen for all > init_static_data() without the need for extra code per codec AFAIK these are the only ones that use it, other than some encoder wrappers which change AVCodec.pix_fmts (and thus need to be done it as soon as the user could see the AVCodec pointer). _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel