You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
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>
This commit is contained in:
@ -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;
|
const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8;
|
||||||
|
|
||||||
if (high_bit_depth || avctx->lowres ||
|
if (high_bit_depth || avctx->lowres)
|
||||||
!(avctx->idct_algo == FF_IDCT_AUTO ||
|
|
||||||
avctx->idct_algo == FF_IDCT_XVID))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (avctx->idct_algo == FF_IDCT_XVID) {
|
c->idct_put = xvid_idct_put;
|
||||||
c->idct_put = xvid_idct_put;
|
c->idct_add = xvid_idct_add;
|
||||||
c->idct_add = xvid_idct_add;
|
c->idct = ff_xvid_idct;
|
||||||
c->idct = ff_xvid_idct;
|
c->perm_type = FF_IDCT_PERM_NONE;
|
||||||
c->perm_type = FF_IDCT_PERM_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if ARCH_X86
|
#if ARCH_X86
|
||||||
ff_xvid_idct_init_x86(c);
|
ff_xvid_idct_init_x86(c);
|
||||||
#elif ARCH_MIPS
|
#elif ARCH_MIPS
|
||||||
ff_xvid_idct_init_mips(c);
|
ff_xvid_idct_init_mips(c);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ff_init_scantable_permutation(c->idct_permutation, c->perm_type);
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user