aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-03-27 02:57:20 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-05-16 01:37:35 +0200
commit3792cf52afc12e6de82ac57fbdcf0960d5bc3d78 (patch)
tree5145ed88541b8f8843e92d080f06476db17f9c4d
parent1f2b8d7238eff4ab8a4d8d6177e250b8180d51f4 (diff)
downloadffmpeg-3792cf52afc12e6de82ac57fbdcf0960d5bc3d78.tar.gz
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>
-rw-r--r--libavcodec/mips/xvididct_init_mips.c16
-rw-r--r--libavcodec/x86/xvididct_init.c8
-rw-r--r--libavcodec/xvididct.c4
-rw-r--r--libavcodec/xvididct.h6
4 files changed, 10 insertions, 24 deletions
diff --git a/libavcodec/mips/xvididct_init_mips.c b/libavcodec/mips/xvididct_init_mips.c
index 658a5792e0..524cf8dcdf 100644
--- a/libavcodec/mips/xvididct_init_mips.c
+++ b/libavcodec/mips/xvididct_init_mips.c
@@ -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;
}
}
diff --git a/libavcodec/x86/xvididct_init.c b/libavcodec/x86/xvididct_init.c
index fda34cc638..c6c87b0c90 100644
--- a/libavcodec/x86/xvididct_init.c
+++ b/libavcodec/x86/xvididct_init.c
@@ -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;
diff --git a/libavcodec/xvididct.c b/libavcodec/xvididct.c
index 01072d80ab..2eddc5978c 100644
--- a/libavcodec/xvididct.c
+++ b/libavcodec/xvididct.c
@@ -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);
diff --git a/libavcodec/xvididct.h b/libavcodec/xvididct.h
index e0bc1a2b91..1395cfd8e1 100644
--- a/libavcodec/xvididct.h
+++ b/libavcodec/xvididct.h
@@ -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 */