avcodec: do not use init_static_data on some codecs
authorMuhammad Faiz <mfcc64@gmail.com>
Fri, 2 Feb 2018 18:18:27 +0000 (01:18 +0700)
committerMuhammad Faiz <mfcc64@gmail.com>
Sat, 3 Feb 2018 23:11:07 +0000 (06:11 +0700)
commit3caecf7ce8e9642cd17942e61f12803bbab52ad2
tree82ade65db730c02046761e30325490cf4a0ed308
parent8e50bd61e4ff97bd7fc6cbd7ec4ca514e17a70c4
avcodec: do not use init_static_data on some codecs

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

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
libavcodec/jpeg2000dec.c
libavcodec/qdmc.c
libavcodec/wmavoice.c