aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2022-07-13 23:39:40 +0300
committerMartin Storsjö <martin@martin.st>2022-08-17 00:00:50 +0300
commitdc55e6357818e21e26afbcdfdf2dd7368ec0e8fd (patch)
treef49ae48ddb803dd9d2099c076cd3b81246ccffb3
parent21c2c57ba5a8b426ad9c07902ec957dbbb20cf36 (diff)
downloadffmpeg-dc55e6357818e21e26afbcdfdf2dd7368ec0e8fd.tar.gz
x86: Don't hardcode the height to 8 in sad8_xy2_mmx
The height is hardcoded in some of the me_cmp functions, but not in all of them. But in the case of all other functions, it's hardcoded in the same place in SIMD functions as in the C reference functions, while this one function differs from the behaviour of the C code. (Before 542765ce3eccbca587d54262a512cbdb1407230d, there were a couple other sad8_*_mmx functions with similar hardcoded height.) Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavcodec/x86/me_cmp_init.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/x86/me_cmp_init.c b/libavcodec/x86/me_cmp_init.c
index f140381c98..bc1051c27e 100644
--- a/libavcodec/x86/me_cmp_init.c
+++ b/libavcodec/x86/me_cmp_init.c
@@ -202,13 +202,12 @@ static inline int sum_mmx(void)
static int sad8_xy2_ ## suf(MpegEncContext *v, const uint8_t *blk2, \
const uint8_t *blk1, ptrdiff_t stride, int h) \
{ \
- av_assert2(h == 8); \
__asm__ volatile ( \
"pxor %%mm7, %%mm7 \n\t" \
"pxor %%mm6, %%mm6 \n\t" \
::); \
\
- sad8_4_ ## suf(blk1, blk2, stride, 8); \
+ sad8_4_ ## suf(blk1, blk2, stride, h); \
\
return sum_ ## suf(); \
} \