diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-12-30 12:09:03 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-03-20 05:03:23 -0700 |
commit | 5169e688956be3378adb3b16a93962fe0048f1c9 (patch) | |
tree | 5c76aaaa9cbc38575f3eb02269dd6704725882de /libavcodec/dsputil.c | |
parent | cf7a2167570e6ccb9dfbd62e9d8ba8f4f065b17e (diff) | |
download | ffmpeg-streaming-5169e688956be3378adb3b16a93962fe0048f1c9.zip ffmpeg-streaming-5169e688956be3378adb3b16a93962fe0048f1c9.tar.gz |
dsputil: Propagate bit depth information to all (sub)init functions
This avoids recalculating the value over and over again.
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index a3b795d..76f20e0 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -2715,6 +2715,8 @@ av_cold void ff_dsputil_static_init(void) av_cold void ff_dsputil_init(DSPContext *c, AVCodecContext *avctx) { + const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8; + #if CONFIG_ENCODERS if (avctx->bits_per_raw_sample == 10) { c->fdct = ff_jpeg_fdct_islow_10; @@ -2924,13 +2926,13 @@ av_cold void ff_dsputil_init(DSPContext *c, AVCodecContext *avctx) } if (ARCH_ARM) - ff_dsputil_init_arm(c, avctx); + ff_dsputil_init_arm(c, avctx, high_bit_depth); if (ARCH_BFIN) - ff_dsputil_init_bfin(c, avctx); + ff_dsputil_init_bfin(c, avctx, high_bit_depth); if (ARCH_PPC) - ff_dsputil_init_ppc(c, avctx); + ff_dsputil_init_ppc(c, avctx, high_bit_depth); if (ARCH_X86) - ff_dsputil_init_x86(c, avctx); + ff_dsputil_init_x86(c, avctx, high_bit_depth); ff_init_scantable_permutation(c->idct_permutation, c->idct_permutation_type); |