[FFmpeg-cvslog] tests/checkasm/hevc_*: Avoid using declare_func_emms where possible
Andreas Rheinhardt
git at videolan.org
Mon Sep 4 12:19:14 EEST 2023
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Aug 31 22:23:54 2023 +0200| [3f82b385163d37238825d116ca943aab576fa94f] | committer: Andreas Rheinhardt
tests/checkasm/hevc_*: Avoid using declare_func_emms where possible
Only the idct_dc and add_residual functions have MMX versions,
so one can use the version with the stricter check (that checks
that the MMX registers have not been clobbered) for all the other
checks.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3f82b385163d37238825d116ca943aab576fa94f
---
tests/checkasm/hevc_deblock.c | 2 +-
tests/checkasm/hevc_idct.c | 2 +-
tests/checkasm/hevc_pel.c | 52 +++++++++++++++++++++----------------------
tests/checkasm/hevc_sao.c | 8 +++----
4 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/tests/checkasm/hevc_deblock.c b/tests/checkasm/hevc_deblock.c
index 5e4338af1c..66fc8d5646 100644
--- a/tests/checkasm/hevc_deblock.c
+++ b/tests/checkasm/hevc_deblock.c
@@ -55,7 +55,7 @@ static void check_deblock_chroma(HEVCDSPContext *h, int bit_depth)
LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE]);
LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE]);
- declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *pix, ptrdiff_t stride, int32_t *tc, uint8_t *no_p, uint8_t *no_q);
+ declare_func(void, uint8_t *pix, ptrdiff_t stride, int32_t *tc, uint8_t *no_p, uint8_t *no_q);
if (check_func(h->hevc_h_loop_filter_chroma, "hevc_h_loop_filter_chroma%d", bit_depth)) {
for (int i = 0; i < 4; i++) {
diff --git a/tests/checkasm/hevc_idct.c b/tests/checkasm/hevc_idct.c
index 49cfc4801f..9da8b858a0 100644
--- a/tests/checkasm/hevc_idct.c
+++ b/tests/checkasm/hevc_idct.c
@@ -91,7 +91,7 @@ static void check_transform_luma(HEVCDSPContext *h, int bit_depth)
int block_size = 4;
int size = block_size * block_size;
- declare_func_emms(AV_CPU_FLAG_MMXEXT, void, int16_t *coeffs);
+ declare_func(void, int16_t *coeffs);
randomize_buffers(coeffs0, size);
memcpy(coeffs1, coeffs0, sizeof(*coeffs0) * size);
diff --git a/tests/checkasm/hevc_pel.c b/tests/checkasm/hevc_pel.c
index 43aa5cd084..f9a7a7717c 100644
--- a/tests/checkasm/hevc_pel.c
+++ b/tests/checkasm/hevc_pel.c
@@ -79,8 +79,8 @@ static void checkasm_check_hevc_qpel(void)
HEVCDSPContext h;
int size, bit_depth, i, j, row;
- declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT, void, int16_t *dst, uint8_t *src, ptrdiff_t srcstride,
- int height, intptr_t mx, intptr_t my, int width);
+ declare_func(void, int16_t *dst, uint8_t *src, ptrdiff_t srcstride,
+ int height, intptr_t mx, intptr_t my, int width);
for (bit_depth = 8; bit_depth <= 12; bit_depth++) {
ff_hevc_dsp_init(&h, bit_depth);
@@ -123,8 +123,8 @@ static void checkasm_check_hevc_qpel_uni(void)
HEVCDSPContext h;
int size, bit_depth, i, j;
- declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT, void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
- int height, intptr_t mx, intptr_t my, int width);
+ declare_func(void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
+ int height, intptr_t mx, intptr_t my, int width);
for (bit_depth = 8; bit_depth <= 12; bit_depth++) {
ff_hevc_dsp_init(&h, bit_depth);
@@ -165,8 +165,8 @@ static void checkasm_check_hevc_qpel_uni_w(void)
HEVCDSPContext h;
int size, bit_depth, i, j;
const int *denom, *wx, *ox;
- declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT, void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
- int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width);
+ declare_func(void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
+ int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width);
for (bit_depth = 8; bit_depth <= 12; bit_depth++) {
ff_hevc_dsp_init(&h, bit_depth);
@@ -214,9 +214,9 @@ static void checkasm_check_hevc_qpel_bi(void)
HEVCDSPContext h;
int size, bit_depth, i, j;
- declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT, void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
- int16_t *src2,
- int height, intptr_t mx, intptr_t my, int width);
+ declare_func(void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
+ int16_t *src2,
+ int height, intptr_t mx, intptr_t my, int width);
for (bit_depth = 8; bit_depth <= 12; bit_depth++) {
ff_hevc_dsp_init(&h, bit_depth);
@@ -259,10 +259,10 @@ static void checkasm_check_hevc_qpel_bi_w(void)
HEVCDSPContext h;
int size, bit_depth, i, j;
const int *denom, *wx, *ox;
- declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT, void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
- int16_t *src2,
- int height, int denom, int wx0, int wx1,
- int ox0, int ox1, intptr_t mx, intptr_t my, int width);
+ declare_func(void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
+ int16_t *src2,
+ int height, int denom, int wx0, int wx1,
+ int ox0, int ox1, intptr_t mx, intptr_t my, int width);
for (bit_depth = 8; bit_depth <= 12; bit_depth++) {
ff_hevc_dsp_init(&h, bit_depth);
@@ -311,8 +311,8 @@ static void checkasm_check_hevc_epel(void)
HEVCDSPContext h;
int size, bit_depth, i, j, row;
- declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT, void, int16_t *dst, uint8_t *src, ptrdiff_t srcstride,
- int height, intptr_t mx, intptr_t my, int width);
+ declare_func(void, int16_t *dst, uint8_t *src, ptrdiff_t srcstride,
+ int height, intptr_t mx, intptr_t my, int width);
for (bit_depth = 8; bit_depth <= 12; bit_depth++) {
ff_hevc_dsp_init(&h, bit_depth);
@@ -355,8 +355,8 @@ static void checkasm_check_hevc_epel_uni(void)
HEVCDSPContext h;
int size, bit_depth, i, j;
- declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT, void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
- int height, intptr_t mx, intptr_t my, int width);
+ declare_func(void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
+ int height, intptr_t mx, intptr_t my, int width);
for (bit_depth = 8; bit_depth <= 12; bit_depth++) {
ff_hevc_dsp_init(&h, bit_depth);
@@ -397,8 +397,8 @@ static void checkasm_check_hevc_epel_uni_w(void)
HEVCDSPContext h;
int size, bit_depth, i, j;
const int *denom, *wx, *ox;
- declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT, void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
- int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width);
+ declare_func(void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
+ int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width);
for (bit_depth = 8; bit_depth <= 12; bit_depth++) {
ff_hevc_dsp_init(&h, bit_depth);
@@ -446,9 +446,9 @@ static void checkasm_check_hevc_epel_bi(void)
HEVCDSPContext h;
int size, bit_depth, i, j;
- declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT, void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
- int16_t *src2,
- int height, intptr_t mx, intptr_t my, int width);
+ declare_func(void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
+ int16_t *src2,
+ int height, intptr_t mx, intptr_t my, int width);
for (bit_depth = 8; bit_depth <= 12; bit_depth++) {
ff_hevc_dsp_init(&h, bit_depth);
@@ -491,10 +491,10 @@ static void checkasm_check_hevc_epel_bi_w(void)
HEVCDSPContext h;
int size, bit_depth, i, j;
const int *denom, *wx, *ox;
- declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMXEXT, void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
- int16_t *src2,
- int height, int denom, int wx0, int wx1,
- int ox0, int ox1, intptr_t mx, intptr_t my, int width);
+ declare_func(void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,
+ int16_t *src2,
+ int height, int denom, int wx0, int wx1,
+ int ox0, int ox1, intptr_t mx, intptr_t my, int width);
for (bit_depth = 8; bit_depth <= 12; bit_depth++) {
ff_hevc_dsp_init(&h, bit_depth);
diff --git a/tests/checkasm/hevc_sao.c b/tests/checkasm/hevc_sao.c
index 94aa1942e1..da3f710537 100644
--- a/tests/checkasm/hevc_sao.c
+++ b/tests/checkasm/hevc_sao.c
@@ -80,8 +80,8 @@ static void check_sao_band(HEVCDSPContext *h, int bit_depth)
int block_size = sao_size[i];
int prev_size = i > 0 ? sao_size[i - 1] : 0;
ptrdiff_t stride = PIXEL_STRIDE*SIZEOF_PIXEL;
- declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *dst, uint8_t *src, ptrdiff_t dst_stride, ptrdiff_t src_stride,
- int16_t *sao_offset_val, int sao_left_class, int width, int height);
+ declare_func(void, uint8_t *dst, uint8_t *src, ptrdiff_t dst_stride, ptrdiff_t src_stride,
+ int16_t *sao_offset_val, int sao_left_class, int width, int height);
if (check_func(h->sao_band_filter[i], "hevc_sao_band_%d_%d", block_size, bit_depth)) {
@@ -118,8 +118,8 @@ static void check_sao_edge(HEVCDSPContext *h, int bit_depth)
int prev_size = i > 0 ? sao_size[i - 1] : 0;
ptrdiff_t stride = PIXEL_STRIDE*SIZEOF_PIXEL;
int offset = (AV_INPUT_BUFFER_PADDING_SIZE + PIXEL_STRIDE)*SIZEOF_PIXEL;
- declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *dst, uint8_t *src, ptrdiff_t stride_dst,
- int16_t *sao_offset_val, int eo, int width, int height);
+ declare_func(void, uint8_t *dst, uint8_t *src, ptrdiff_t stride_dst,
+ int16_t *sao_offset_val, int eo, int width, int height);
for (int w = prev_size + 4; w <= block_size; w += 4) {
randomize_buffers(src0, src1, BUF_SIZE);
More information about the ffmpeg-cvslog
mailing list