checkasm/llviddsp: Be strict about MMX

There is no MMX code for llviddsp after commit
fed07efcde, so use declare_func
instead of declare_func_emms() to also test that we are not
in MMX mode after return.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
pull/388/head
Andreas Rheinhardt 2 years ago
parent b4e2d67636
commit cd8a33bcce
  1. 16
      tests/checkasm/llviddsp.c

@ -48,7 +48,7 @@ static void check_add_bytes(LLVidDSPContext c, int width)
uint8_t *dst1 = av_mallocz(width);
uint8_t *src0 = av_calloc(width, sizeof(*src0));
uint8_t *src1 = av_calloc(width, sizeof(*src1));
declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *dst, uint8_t *src, ptrdiff_t w);
declare_func(void, uint8_t *dst, uint8_t *src, ptrdiff_t w);
init_buffer(src0, src1, uint8_t, width);
@ -78,9 +78,9 @@ static void check_add_median_pred(LLVidDSPContext c, int width) {
uint8_t *src1 = av_calloc(width, sizeof(*src1));
uint8_t *diff0 = av_calloc(width, sizeof(*diff0));
uint8_t *diff1 = av_calloc(width, sizeof(*diff1));
declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *dst, const uint8_t *src1,
const uint8_t *diff, ptrdiff_t w,
int *left, int *left_top);
declare_func(void, uint8_t *dst, const uint8_t *src1,
const uint8_t *diff, ptrdiff_t w,
int *left, int *left_top);
init_buffer(src0, src1, uint8_t, width);
init_buffer(diff0, diff1, uint8_t, width);
@ -114,7 +114,7 @@ static void check_add_left_pred(LLVidDSPContext c, int width, int acc, const cha
uint8_t *dst1 = av_mallocz(width);
uint8_t *src0 = av_calloc(width, sizeof(*src0));
uint8_t *src1 = av_calloc(width, sizeof(*src1));
declare_func_emms(AV_CPU_FLAG_MMX, int, uint8_t *dst, uint8_t *src, ptrdiff_t w, int acc);
declare_func(int, uint8_t *dst, uint8_t *src, ptrdiff_t w, int acc);
init_buffer(src0, src1, uint8_t, width);
@ -143,7 +143,7 @@ static void check_add_left_pred_16(LLVidDSPContext c, unsigned mask, int width,
uint16_t *dst1 = av_calloc(width, sizeof(*dst1));
uint16_t *src0 = av_calloc(width, sizeof(*src0));
uint16_t *src1 = av_calloc(width, sizeof(*src1));
declare_func_emms(AV_CPU_FLAG_MMX, int, uint16_t *dst, uint16_t *src, unsigned mask, ptrdiff_t w, unsigned acc);
declare_func(int, uint16_t *dst, uint16_t *src, unsigned mask, ptrdiff_t w, unsigned acc);
init_buffer(src0, src1, uint16_t, width);
@ -168,8 +168,8 @@ static void check_add_left_pred_16(LLVidDSPContext c, unsigned mask, int width,
static void check_add_gradient_pred(LLVidDSPContext c, int w) {
int src_size, stride;
uint8_t *src0, *src1;
declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *src, const ptrdiff_t stride,
const ptrdiff_t width);
declare_func(void, uint8_t *src, const ptrdiff_t stride,
const ptrdiff_t width);
stride = w + 32;
src_size = (stride + 32) * 2; /* dsp need previous line, and ignore the start of the line */

Loading…
Cancel
Save