diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-05-20 22:31:47 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-05-26 04:50:23 +0200 |
commit | 6349a3324dd825e8f834a7519d1cdff5e69c7384 (patch) | |
tree | 22c0debd855677b2ebd4f0150a39943d306bdabc | |
parent | eb5d900f87faeaca5a79b96a2faee0153ad8c7b1 (diff) | |
download | ffmpeg-6349a3324dd825e8f834a7519d1cdff5e69c7384.tar.gz |
avcodec/xvididct: Remove always-true checks
ff_xvid_idct_init() is now only called from ff_idctdsp_init()
and only if idct_algo is FF_IDCT_XVID.
This also implies that it is unnecessary to initalize
the permutation on our own.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/xvididct.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/libavcodec/xvididct.c b/libavcodec/xvididct.c index 2eddc5978c..f50d8b7695 100644 --- a/libavcodec/xvididct.c +++ b/libavcodec/xvididct.c @@ -334,23 +334,17 @@ av_cold void ff_xvid_idct_init(IDCTDSPContext *c, AVCodecContext *avctx) { const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8; - if (high_bit_depth || avctx->lowres || - !(avctx->idct_algo == FF_IDCT_AUTO || - avctx->idct_algo == FF_IDCT_XVID)) + if (high_bit_depth || avctx->lowres) return; - if (avctx->idct_algo == FF_IDCT_XVID) { - c->idct_put = xvid_idct_put; - c->idct_add = xvid_idct_add; - c->idct = ff_xvid_idct; - c->perm_type = FF_IDCT_PERM_NONE; - } + c->idct_put = xvid_idct_put; + c->idct_add = xvid_idct_add; + c->idct = ff_xvid_idct; + c->perm_type = FF_IDCT_PERM_NONE; #if ARCH_X86 ff_xvid_idct_init_x86(c); #elif ARCH_MIPS ff_xvid_idct_init_mips(c); #endif - - ff_init_scantable_permutation(c->idct_permutation, c->perm_type); } |