ff_xvid_idct_init() already checks in case of high_bit_depth, lowres or an incompatible idct_algo.
Showing the changes to libavcodec (4 of 4 files). Show all
Unified · Split
| @@ -22,20 +22,14 @@ · 21 unmodified lines | ||
| 22 | 22 | #include "libavutil/mips/cpu.h" |
| 23 | 23 | #include "xvididct_mips.h" |
| 24 | 24 | |
| 25 | −av_cold void ff_xvid_idct_init_mips(IDCTDSPContext *c, AVCodecContext *avctx, | |
| 26 | − unsigned high_bit_depth) | |
| 25 | +av_cold void ff_xvid_idct_init_mips(IDCTDSPContext *c) | |
| 27 | 26 | { |
| 28 | 27 | int cpu_flags = av_get_cpu_flags(); |
| 29 | 28 | |
| 30 | 29 | if (have_mmi(cpu_flags)) { |
| 31 | − if (!high_bit_depth) { | |
| 32 | − if (avctx->idct_algo == FF_IDCT_AUTO || | |
| 33 | − avctx->idct_algo == FF_IDCT_XVID) { | |
| 34 | − c->idct_put = ff_xvid_idct_put_mmi; | |
| 35 | − c->idct_add = ff_xvid_idct_add_mmi; | |
| 36 | − c->idct = ff_xvid_idct_mmi; | |
| 37 | − c->perm_type = FF_IDCT_PERM_NONE; | |
| 38 | − } | |
| 39 | − } | |
| 30 | + c->idct_put = ff_xvid_idct_put_mmi; | |
| 31 | + c->idct_add = ff_xvid_idct_add_mmi; | |
| 32 | + c->idct = ff_xvid_idct_mmi; | |
| 33 | + c->perm_type = FF_IDCT_PERM_NONE; | |
| 40 | 34 | } |
| 41 | 35 | } |
| @@ -25,17 +25,11 @@ · 24 unmodified lines | ||
| 25 | 25 | |
| 26 | 26 | #include "xvididct.h" |
| 27 | 27 | |
| 28 | −av_cold void ff_xvid_idct_init_x86(IDCTDSPContext *c, AVCodecContext *avctx, | |
| 29 | − unsigned high_bit_depth) | |
| 28 | +av_cold void ff_xvid_idct_init_x86(IDCTDSPContext *c) | |
| 30 | 29 | { |
| 31 | 30 | #if HAVE_X86ASM |
| 32 | 31 | int cpu_flags = av_get_cpu_flags(); |
| 33 | 32 | |
| 34 | − if (high_bit_depth || | |
| 35 | − !(avctx->idct_algo == FF_IDCT_AUTO || | |
| 36 | − avctx->idct_algo == FF_IDCT_XVID)) | |
| 37 | − return; | |
| 38 | − | |
| 39 | 33 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 40 | 34 | c->idct_put = ff_xvid_idct_put_sse2; |
| 41 | 35 | c->idct_add = ff_xvid_idct_add_sse2; |
| @@ -347,9 +347,9 @@ av_cold void ff_xvid_idct_init(IDCTDSPContext *c, AVCodecContext *avctx) · 346 unmodified lines | ||
| 347 | 347 | } |
| 348 | 348 | |
| 349 | 349 | #if ARCH_X86 |
| 350 | − ff_xvid_idct_init_x86(c, avctx, high_bit_depth); | |
| 350 | + ff_xvid_idct_init_x86(c); | |
| 351 | 351 | #elif ARCH_MIPS |
| 352 | − ff_xvid_idct_init_mips(c, avctx, high_bit_depth); | |
| 352 | + ff_xvid_idct_init_mips(c); | |
| 353 | 353 | #endif |
| 354 | 354 | |
| 355 | 355 | ff_init_scantable_permutation(c->idct_permutation, c->perm_type); |
| @@ -28,9 +28,7 @@ void ff_xvid_idct(int16_t *const in); · 27 unmodified lines | ||
| 28 | 28 | |
| 29 | 29 | void ff_xvid_idct_init(IDCTDSPContext *c, AVCodecContext *avctx); |
| 30 | 30 | |
| 31 | −void ff_xvid_idct_init_x86(IDCTDSPContext *c, AVCodecContext *avctx, | |
| 32 | − unsigned high_bit_depth); | |
| 33 | −void ff_xvid_idct_init_mips(IDCTDSPContext *c, AVCodecContext *avctx, | |
| 34 | − unsigned high_bit_depth); | |
| 31 | +void ff_xvid_idct_init_x86(IDCTDSPContext *c); | |
| 32 | +void ff_xvid_idct_init_mips(IDCTDSPContext *c); | |
| 35 | 33 | |
| 36 | 34 | #endif /* AVCODEC_XVIDIDCT_H */ |