* [FFmpeg-devel] [PATCH] tests/checkasm/sw_rgb: Be more strict about clobbering MMX state
@ 2024-06-05 20:08 Andreas Rheinhardt
2024-06-05 20:12 ` James Almer
2024-06-08 19:44 ` Andreas Rheinhardt
0 siblings, 2 replies; 3+ messages in thread
From: Andreas Rheinhardt @ 2024-06-05 20:08 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
The MMXEXT versions of the rgb2rgb functions tested here
always emit emms on their own. Therefore one can use
a stricter test to ensure that it stays that way.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
tests/checkasm/sw_rgb.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/checkasm/sw_rgb.c b/tests/checkasm/sw_rgb.c
index b51d0836c3..47c3cdfcc8 100644
--- a/tests/checkasm/sw_rgb.c
+++ b/tests/checkasm/sw_rgb.c
@@ -53,7 +53,7 @@ static void check_shuffle_bytes(void * func, const char * report)
LOCAL_ALIGNED_32(uint8_t, dst0, [MAX_STRIDE]);
LOCAL_ALIGNED_32(uint8_t, dst1, [MAX_STRIDE]);
- declare_func_emms(AV_CPU_FLAG_MMX, void, const uint8_t *src, uint8_t *dst, int src_size);
+ declare_func(void, const uint8_t *src, uint8_t *dst, int src_size);
memset(dst0, 0, MAX_STRIDE);
memset(dst1, 0, MAX_STRIDE);
@@ -84,9 +84,9 @@ static void check_uyvy_to_422p(void)
LOCAL_ALIGNED_32(uint8_t, dst_v_0, [(MAX_STRIDE/2) * MAX_HEIGHT]);
LOCAL_ALIGNED_32(uint8_t, dst_v_1, [(MAX_STRIDE/2) * MAX_HEIGHT]);
- declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
- const uint8_t *src, int width, int height,
- int lumStride, int chromStride, int srcStride);
+ declare_func(void, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
+ const uint8_t *src, int width, int height,
+ int lumStride, int chromStride, int srcStride);
randomize_buffers(src0, MAX_STRIDE * MAX_HEIGHT * 2);
memcpy(src1, src0, MAX_STRIDE * MAX_HEIGHT * 2);
@@ -127,8 +127,8 @@ static void check_interleave_bytes(void)
uint8_t *dst0 = dst0_buf + 2;
uint8_t *dst1 = dst1_buf + 2;
- declare_func_emms(AV_CPU_FLAG_MMX, void, const uint8_t *, const uint8_t *,
- uint8_t *, int, int, int, int, int);
+ declare_func(void, const uint8_t *, const uint8_t *,
+ uint8_t *, int, int, int, int, int);
randomize_buffers(src0, MAX_STRIDE * MAX_HEIGHT);
randomize_buffers(src1, MAX_STRIDE * MAX_HEIGHT);
--
2.40.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".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [FFmpeg-devel] [PATCH] tests/checkasm/sw_rgb: Be more strict about clobbering MMX state
2024-06-05 20:08 [FFmpeg-devel] [PATCH] tests/checkasm/sw_rgb: Be more strict about clobbering MMX state Andreas Rheinhardt
@ 2024-06-05 20:12 ` James Almer
2024-06-08 19:44 ` Andreas Rheinhardt
1 sibling, 0 replies; 3+ messages in thread
From: James Almer @ 2024-06-05 20:12 UTC (permalink / raw)
To: ffmpeg-devel
On 6/5/2024 5:08 PM, Andreas Rheinhardt wrote:
> The MMXEXT versions of the rgb2rgb functions tested here
> always emit emms on their own. Therefore one can use
> a stricter test to ensure that it stays that way.
Or we could nuke it in favor of an SSE2 version :p
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> tests/checkasm/sw_rgb.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/tests/checkasm/sw_rgb.c b/tests/checkasm/sw_rgb.c
> index b51d0836c3..47c3cdfcc8 100644
> --- a/tests/checkasm/sw_rgb.c
> +++ b/tests/checkasm/sw_rgb.c
> @@ -53,7 +53,7 @@ static void check_shuffle_bytes(void * func, const char * report)
> LOCAL_ALIGNED_32(uint8_t, dst0, [MAX_STRIDE]);
> LOCAL_ALIGNED_32(uint8_t, dst1, [MAX_STRIDE]);
>
> - declare_func_emms(AV_CPU_FLAG_MMX, void, const uint8_t *src, uint8_t *dst, int src_size);
> + declare_func(void, const uint8_t *src, uint8_t *dst, int src_size);
>
> memset(dst0, 0, MAX_STRIDE);
> memset(dst1, 0, MAX_STRIDE);
> @@ -84,9 +84,9 @@ static void check_uyvy_to_422p(void)
> LOCAL_ALIGNED_32(uint8_t, dst_v_0, [(MAX_STRIDE/2) * MAX_HEIGHT]);
> LOCAL_ALIGNED_32(uint8_t, dst_v_1, [(MAX_STRIDE/2) * MAX_HEIGHT]);
>
> - declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
> - const uint8_t *src, int width, int height,
> - int lumStride, int chromStride, int srcStride);
> + declare_func(void, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
> + const uint8_t *src, int width, int height,
> + int lumStride, int chromStride, int srcStride);
>
> randomize_buffers(src0, MAX_STRIDE * MAX_HEIGHT * 2);
> memcpy(src1, src0, MAX_STRIDE * MAX_HEIGHT * 2);
> @@ -127,8 +127,8 @@ static void check_interleave_bytes(void)
> uint8_t *dst0 = dst0_buf + 2;
> uint8_t *dst1 = dst1_buf + 2;
>
> - declare_func_emms(AV_CPU_FLAG_MMX, void, const uint8_t *, const uint8_t *,
> - uint8_t *, int, int, int, int, int);
> + declare_func(void, const uint8_t *, const uint8_t *,
> + uint8_t *, int, int, int, int, int);
>
> randomize_buffers(src0, MAX_STRIDE * MAX_HEIGHT);
> randomize_buffers(src1, MAX_STRIDE * MAX_HEIGHT);
_______________________________________________
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".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [FFmpeg-devel] [PATCH] tests/checkasm/sw_rgb: Be more strict about clobbering MMX state
2024-06-05 20:08 [FFmpeg-devel] [PATCH] tests/checkasm/sw_rgb: Be more strict about clobbering MMX state Andreas Rheinhardt
2024-06-05 20:12 ` James Almer
@ 2024-06-08 19:44 ` Andreas Rheinhardt
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Rheinhardt @ 2024-06-08 19:44 UTC (permalink / raw)
To: ffmpeg-devel
Andreas Rheinhardt:
> The MMXEXT versions of the rgb2rgb functions tested here
> always emit emms on their own. Therefore one can use
> a stricter test to ensure that it stays that way.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> tests/checkasm/sw_rgb.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/tests/checkasm/sw_rgb.c b/tests/checkasm/sw_rgb.c
> index b51d0836c3..47c3cdfcc8 100644
> --- a/tests/checkasm/sw_rgb.c
> +++ b/tests/checkasm/sw_rgb.c
> @@ -53,7 +53,7 @@ static void check_shuffle_bytes(void * func, const char * report)
> LOCAL_ALIGNED_32(uint8_t, dst0, [MAX_STRIDE]);
> LOCAL_ALIGNED_32(uint8_t, dst1, [MAX_STRIDE]);
>
> - declare_func_emms(AV_CPU_FLAG_MMX, void, const uint8_t *src, uint8_t *dst, int src_size);
> + declare_func(void, const uint8_t *src, uint8_t *dst, int src_size);
>
> memset(dst0, 0, MAX_STRIDE);
> memset(dst1, 0, MAX_STRIDE);
> @@ -84,9 +84,9 @@ static void check_uyvy_to_422p(void)
> LOCAL_ALIGNED_32(uint8_t, dst_v_0, [(MAX_STRIDE/2) * MAX_HEIGHT]);
> LOCAL_ALIGNED_32(uint8_t, dst_v_1, [(MAX_STRIDE/2) * MAX_HEIGHT]);
>
> - declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
> - const uint8_t *src, int width, int height,
> - int lumStride, int chromStride, int srcStride);
> + declare_func(void, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
> + const uint8_t *src, int width, int height,
> + int lumStride, int chromStride, int srcStride);
>
> randomize_buffers(src0, MAX_STRIDE * MAX_HEIGHT * 2);
> memcpy(src1, src0, MAX_STRIDE * MAX_HEIGHT * 2);
> @@ -127,8 +127,8 @@ static void check_interleave_bytes(void)
> uint8_t *dst0 = dst0_buf + 2;
> uint8_t *dst1 = dst1_buf + 2;
>
> - declare_func_emms(AV_CPU_FLAG_MMX, void, const uint8_t *, const uint8_t *,
> - uint8_t *, int, int, int, int, int);
> + declare_func(void, const uint8_t *, const uint8_t *,
> + uint8_t *, int, int, int, int, int);
>
> randomize_buffers(src0, MAX_STRIDE * MAX_HEIGHT);
> randomize_buffers(src1, MAX_STRIDE * MAX_HEIGHT);
Will apply this patch tomorrow unless there are objections.
- Andreas
_______________________________________________
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".
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-08 19:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-05 20:08 [FFmpeg-devel] [PATCH] tests/checkasm/sw_rgb: Be more strict about clobbering MMX state Andreas Rheinhardt
2024-06-05 20:12 ` James Almer
2024-06-08 19:44 ` Andreas Rheinhardt
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