Skip to content

Commit

Permalink
x86: Don't hardcode the height to 8 in sad8_xy2_mmx
Browse files Browse the repository at this point in the history
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 542765c, there were a
couple other sad8_*_mmx functions with similar hardcoded height.)

Signed-off-by: Martin Storsjö <martin@martin.st>
  • Loading branch information
mstorsjo committed Aug 16, 2022
1 parent 21c2c57 commit dc55e63
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libavcodec/x86/me_cmp_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(); \
} \
Expand Down

0 comments on commit dc55e63

Please sign in to comment.