This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit ef18ece3f0cc7297b08918d3d242ad3eca3021ce
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Mon Jun 15 19:00:26 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Wed Jul 1 01:48:33 2026 +0000

    checkasm/sw_rgb: test uyvytoyuv422 with odd widths
    
    The SIMD uyvytoyuv422 implementations only handled even widths correctly.
    Add odd width and 1x1 entries so the trailing column handling is exercised
    against the C reference.
    
    An odd width reads one source byte more than 2*width, the V sample at
    src[2w], so the stride is extended by one for odd widths.
    
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 tests/checkasm/sw_rgb.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/checkasm/sw_rgb.c b/tests/checkasm/sw_rgb.c
index 7a3049ddd1..53bde765db 100644
--- a/tests/checkasm/sw_rgb.c
+++ b/tests/checkasm/sw_rgb.c
@@ -39,7 +39,8 @@
 
 static const uint8_t width[] = {12, 16, 20, 32, 36, 128};
 static const struct {uint8_t w, h;} planes[] = {
-    {12,16}, {16,16}, {20,23}, {32,18}, {8,128}, {128,128}
+    {12,16}, {16,16}, {20,23}, {32,18}, {8,128}, {128,128},
+    {1,1}, {1,4}, {3,8}, {13,16}, {21,9}, {63,7}, {127,5}
 };
 
 #define MAX_STRIDE 128
@@ -92,9 +93,9 @@ static void check_uyvy_to_422p(void)
     memcpy(src1, src0, MAX_STRIDE * MAX_HEIGHT * 2);
 
     if (check_func(uyvytoyuv422, "uyvytoyuv422")) {
-        for (i = 0; i < 6; i ++) {
+        for (i = 0; i < FF_ARRAY_ELEMS(planes); i ++) {
             int w = planes[i].w, h = planes[i].h;
-            int srcStride = 2 * w;
+            int srcStride = 2 * w + (w & 1);   // UYVY odd width reads V at 
src[2w]
 
             memset(dst_y_0, 0, MAX_STRIDE * MAX_HEIGHT);
             memset(dst_y_1, 0, MAX_STRIDE * MAX_HEIGHT);

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to