mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-17 06:58:45 +08:00
avcodec/{x86,mips}/xvididct_init: Remove redundant checks
ff_xvid_idct_init() already checks in case of high_bit_depth, lowres or an incompatible idct_algo. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -22,20 +22,14 @@
|
||||
#include "libavutil/mips/cpu.h"
|
||||
#include "xvididct_mips.h"
|
||||
|
||||
av_cold void ff_xvid_idct_init_mips(IDCTDSPContext *c, AVCodecContext *avctx,
|
||||
unsigned high_bit_depth)
|
||||
av_cold void ff_xvid_idct_init_mips(IDCTDSPContext *c)
|
||||
{
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
||||
if (have_mmi(cpu_flags)) {
|
||||
if (!high_bit_depth) {
|
||||
if (avctx->idct_algo == FF_IDCT_AUTO ||
|
||||
avctx->idct_algo == FF_IDCT_XVID) {
|
||||
c->idct_put = ff_xvid_idct_put_mmi;
|
||||
c->idct_add = ff_xvid_idct_add_mmi;
|
||||
c->idct = ff_xvid_idct_mmi;
|
||||
c->perm_type = FF_IDCT_PERM_NONE;
|
||||
}
|
||||
}
|
||||
c->idct_put = ff_xvid_idct_put_mmi;
|
||||
c->idct_add = ff_xvid_idct_add_mmi;
|
||||
c->idct = ff_xvid_idct_mmi;
|
||||
c->perm_type = FF_IDCT_PERM_NONE;
|
||||
}
|
||||
}
|
||||
|
@ -25,17 +25,11 @@
|
||||
|
||||
#include "xvididct.h"
|
||||
|
||||
av_cold void ff_xvid_idct_init_x86(IDCTDSPContext *c, AVCodecContext *avctx,
|
||||
unsigned high_bit_depth)
|
||||
av_cold void ff_xvid_idct_init_x86(IDCTDSPContext *c)
|
||||
{
|
||||
#if HAVE_X86ASM
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
||||
if (high_bit_depth ||
|
||||
!(avctx->idct_algo == FF_IDCT_AUTO ||
|
||||
avctx->idct_algo == FF_IDCT_XVID))
|
||||
return;
|
||||
|
||||
if (EXTERNAL_SSE2(cpu_flags)) {
|
||||
c->idct_put = ff_xvid_idct_put_sse2;
|
||||
c->idct_add = ff_xvid_idct_add_sse2;
|
||||
|
@ -347,9 +347,9 @@ av_cold void ff_xvid_idct_init(IDCTDSPContext *c, AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
#if ARCH_X86
|
||||
ff_xvid_idct_init_x86(c, avctx, high_bit_depth);
|
||||
ff_xvid_idct_init_x86(c);
|
||||
#elif ARCH_MIPS
|
||||
ff_xvid_idct_init_mips(c, avctx, high_bit_depth);
|
||||
ff_xvid_idct_init_mips(c);
|
||||
#endif
|
||||
|
||||
ff_init_scantable_permutation(c->idct_permutation, c->perm_type);
|
||||
|
@ -28,9 +28,7 @@ void ff_xvid_idct(int16_t *const in);
|
||||
|
||||
void ff_xvid_idct_init(IDCTDSPContext *c, AVCodecContext *avctx);
|
||||
|
||||
void ff_xvid_idct_init_x86(IDCTDSPContext *c, AVCodecContext *avctx,
|
||||
unsigned high_bit_depth);
|
||||
void ff_xvid_idct_init_mips(IDCTDSPContext *c, AVCodecContext *avctx,
|
||||
unsigned high_bit_depth);
|
||||
void ff_xvid_idct_init_x86(IDCTDSPContext *c);
|
||||
void ff_xvid_idct_init_mips(IDCTDSPContext *c);
|
||||
|
||||
#endif /* AVCODEC_XVIDIDCT_H */
|
||||
|
Reference in New Issue
Block a user