[FFmpeg-devel] [PATCH 5/9] checkasm/llviddsp: Be strict about MMX
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Sat Oct 8 04:24:08 EEST 2022
There is no MMX code for llviddsp after commit
fed07efcde72824ac1ada80d4af4e91ac4fcfc14, 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 at outlook.com>
---
tests/checkasm/llviddsp.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tests/checkasm/llviddsp.c b/tests/checkasm/llviddsp.c
index 66e08c8099..d948a9832d 100644
--- a/tests/checkasm/llviddsp.c
+++ b/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 */
--
2.34.1
More information about the ffmpeg-devel
mailing list