diff mbox series

[FFmpeg-devel,6/7] swscale/tests/swscale: Highlight cases that worsened

Message ID 20240214220631.9641-6-michael@niedermayer.cc
State Accepted
Commit 6ebe4ebee3241d7cedd8f7ae6ba6c970f2e6e594
Headers show
Series [FFmpeg-devel,1/7] swscale/tests/swscale: Implement isALPHA() using AVPixFmtDescriptor | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Michael Niedermayer Feb. 14, 2024, 10:06 p.m. UTC
also highlight cases that worsened alot in uppercase

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libswscale/tests/swscale.c | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c
index 68434fb7baf..32e1f96be2b 100644
--- a/libswscale/tests/swscale.c
+++ b/libswscale/tests/swscale.c
@@ -285,6 +285,15 @@  static int doTest(const uint8_t * const ref[4], int refStride[4], int w, int h,
                 av_free(out[i]);
     }
 
+    if(r){
+        if(ssdY>r->ssdY*1.02+1 || ssdU>r->ssdU*1.02+1 || ssdV>r->ssdV*1.02+1|| ssdA>r->ssdA*1.02+1)
+            printf("WORSE SSD=%5"PRId64",%5"PRId64",%5"PRId64",%5"PRId64"",
+            r->ssdY, r->ssdU, r->ssdV, r->ssdA);
+        else if(ssdY>r->ssdY || ssdU>r->ssdU || ssdV>r->ssdV|| ssdA>r->ssdA)
+            printf("worse SSD=%5"PRId64",%5"PRId64",%5"PRId64",%5"PRId64"",
+            r->ssdY, r->ssdU, r->ssdV, r->ssdA);
+    }
+
     printf(" CRC=%08x SSD=%5"PRId64 ",%5"PRId64 ",%5"PRId64 ",%5"PRId64 "\n",
            crc, ssdY, ssdU, ssdV, ssdA);