[FFmpeg-cvslog] avcodec/xvididct: Remove always-true checks
Andreas Rheinhardt
git at videolan.org
Mon May 26 06:25:10 EEST 2025
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue May 20 22:31:47 2025 +0200| [6349a3324dd825e8f834a7519d1cdff5e69c7384] | committer: Andreas Rheinhardt
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 at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6349a3324dd825e8f834a7519d1cdff5e69c7384
---
libavcodec/xvididct.c | 16 +++++-----------
1 file 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);
}
More information about the ffmpeg-cvslog
mailing list