From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Subject: [FFmpeg-devel] [PATCH 11/13] tests/checkasm/hevc_*: Avoid using declare_func_emms where possible Date: Fri, 1 Sep 2023 00:22:33 +0200 Message-ID: <AS8P250MB074478162345CAE57CD2878E8FE5A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw) In-Reply-To: <AS8P250MB0744AF0D34423E0BD48BF2438FE5A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> 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@outlook.com> --- 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); -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2023-08-31 22:22 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-08-31 22:20 [FFmpeg-devel] [PATCH 01/13] avfilter: Remove unnecessary emms_c for ff_scene_sad_get_fn Andreas Rheinhardt 2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 02/13] avfilter/vf_gblur: Remove unnecessary emms_c() Andreas Rheinhardt 2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 03/13] avfilter/vf_colorspace: Remove redundant emms_c() Andreas Rheinhardt 2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 04/13] avfilter/vf_bwdif: Remove obsolete emms_c() Andreas Rheinhardt 2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 05/13] avfilter/afir_template: Remove unnecessary emms_c() Andreas Rheinhardt 2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 06/13] avfilter/af_volume: " Andreas Rheinhardt 2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 07/13] avfilter/af_sofalizer: " Andreas Rheinhardt 2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 08/13] avfilter/af_headphone: " Andreas Rheinhardt 2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 09/13] avfilter/af_amultiply: " Andreas Rheinhardt 2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 10/13] avcodec/pcm: " Andreas Rheinhardt 2023-08-31 22:22 ` Andreas Rheinhardt [this message] 2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 12/13] tests/checkasm/llvidencdsp: Don't use declare_func_emms Andreas Rheinhardt 2023-08-31 22:22 ` [FFmpeg-devel] [PATCH 13/13] tests/checkasm/sw_scale: Avoid declare_func_emms where possible Andreas Rheinhardt 2023-08-31 22:26 ` [FFmpeg-devel] [PATCH 14/14] avutil/internal: Don't auto-include emms.h Andreas Rheinhardt 2023-09-03 11:42 ` [FFmpeg-devel] [PATCH 01/13] avfilter: Remove unnecessary emms_c for ff_scene_sad_get_fn Andreas Rheinhardt
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=AS8P250MB074478162345CAE57CD2878E8FE5A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \ --to=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git