Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH 6/6] tests: Add fate-snowenc
Date: Fri, 24 Mar 2023 01:25:40 +0100
Message-ID: <20230324002540.3227-6-michael@niedermayer.cc> (raw)
In-Reply-To: <20230324002540.3227-1-michael@niedermayer.cc>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/tests/snowenc.c |  4 +-
 tests/fate/libavcodec.mak  |  4 ++
 tests/ref/fate/snowenc     | 75 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 81 insertions(+), 2 deletions(-)
 create mode 100644 tests/ref/fate/snowenc

diff --git a/libavcodec/tests/snowenc.c b/libavcodec/tests/snowenc.c
index 37198cd4e3..b3c46a8874 100644
--- a/libavcodec/tests/snowenc.c
+++ b/libavcodec/tests/snowenc.c
@@ -106,7 +106,7 @@ int main(void){
                     for(x=0; x<width; x++){
                         int64_t d= obuffer[x + y*width];
                         error += d*d;
-                        if(FFABS(width/2-x)<9 && FFABS(height/2-y)<9 && level==2) printf("%8"PRId64" ", d);
+                        if(FFABS(width/2-x)<9 && FFABS(height/2-y)<9 && level==2) printf("%8"PRId64, d);
                     }
                     if(FFABS(height/2-y)<9 && level==2) printf("\n");
                 }
@@ -137,7 +137,7 @@ int main(void){
             for(y=0; y<height; y++){
                 for(x=0; x<width; x++){
                     int64_t d= buffer[0][x + y*width];
-                    if(FFABS(width/2-x)<9 && FFABS(height/2-y)<9) printf("%8"PRId64" ", d);
+                    if(FFABS(width/2-x)<9 && FFABS(height/2-y)<9) printf("%8"PRId64, d);
                 }
                 if(FFABS(height/2-y)<9) printf("\n");
             }
diff --git a/tests/fate/libavcodec.mak b/tests/fate/libavcodec.mak
index 8f56fae3a8..1cb483e402 100644
--- a/tests/fate/libavcodec.mak
+++ b/tests/fate/libavcodec.mak
@@ -80,6 +80,10 @@ fate-rangecoder: libavcodec/tests/rangecoder$(EXESUF)
 fate-rangecoder: CMD = run libavcodec/tests/rangecoder$(EXESUF)
 fate-rangecoder: CMP = null
 
+FATE_LIBAVCODEC-$(CONFIG_SNOW_ENCODER) += fate-snowenc
+fate-snowenc: libavcodec/tests/snowenc$(EXESUF)
+fate-snowenc: CMD = run libavcodec/tests/snowenc$(EXESUF)
+
 FATE_LIBAVCODEC-yes += fate-mathops
 fate-mathops: libavcodec/tests/mathops$(EXESUF)
 fate-mathops: CMD = run libavcodec/tests/mathops$(EXESUF)
diff --git a/tests/ref/fate/snowenc b/tests/ref/fate/snowenc
new file mode 100644
index 0000000000..e073ef1469
--- /dev/null
+++ b/tests/ref/fate/snowenc
@@ -0,0 +1,75 @@
+testing 5/3 DWT
+testing 9/7 DWT
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0      -6      -4      19      65    -141      65      19      -4      -6       0       0       0
+       0       0       0       0       0      -5      -3      12      43     -95      43      12      -3      -5       0       0       0
+       0       0       0       0       0      43      29    -113    -408     904    -408    -113      29      43       0       0       0
+       0       0       0       0       0      81      54    -216    -774    1710    -774    -216      54      81       0       0       0
+       0       0       0       0       0      43      29    -113    -408     904    -408    -113      29      43       0       0       0
+       0       0       0       0       0      -5      -3      12      43     -95      43      12      -3      -5       0       0       0
+       0       0       0       0       0      -6      -4      19      65    -141      65      19      -4      -6       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0      -6      -4      43      81      43      -4      -6       0       0       0       0       0
+       0       0       0       0       0      -5      -3      28      54      28      -3      -5       0       0       0       0       0
+       0       0       0       0       0      18      12    -114    -216    -114      12      18       0       0       0       0       0
+       0       0       0       0       0      64      43    -409    -774    -409      43      64       0       0       0       0       0
+       0       0       0       0       0    -143     -95     902    1710     902     -95    -143       0       0       0       0       0
+       0       0       0       0       0      64      43    -409    -774    -409      43      64       0       0       0       0       0
+       0       0       0       0       0      18      12    -114    -216    -114      12      18       0       0       0       0       0
+       0       0       0       0       0      -5      -3      28      54      28      -3      -5       0       0       0       0       0
+       0       0       0       0       0      -6      -4      43      81      43      -4      -6       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       3       2      -6     -24      54     -24      -6       2       3       0       0       0
+       0       0       0       0       0       1       1      -5     -16      36     -16      -5       1       1       0       0       0
+       0       0       0       0       0      -6      -4      19      65    -141      65      19      -4      -6       0       0       0
+       0       0       0       0       0     -24     -16      64     231    -511     231      64     -16     -24       0       0       0
+       0       0       0       0       0      54      36    -143    -511    1127    -511    -143      36      54       0       0       0
+       0       0       0       0       0     -24     -16      64     231    -511     231      64     -16     -24       0       0       0
+       0       0       0       0       0      -6      -4      19      65    -141      65      19      -4      -6       0       0       0
+       0       0       0       0       0       1       1      -5     -16      36     -16      -5       1       1       0       0       0
+       0       0       0       0       0       3       2      -6     -24      54     -24      -6       2       3       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
+static int const visual_weight[][4]={
+  {   17661,   10919,   10911,    6749,},
+  {       0,    5176,    5175,    3105,},
+  {       0,    2585,    2584,    1633,},
+};
+       0       0       0       0       0       0       0       0       1       1       1       1       1       1       1       1       1
+   52429   52429   52429   52429   52429   52429   52429   52429 -167772 -167772 -167772 -167772 -167772 -167772 -167772 -167772 -167772
+       0       0       0       0       0       0       0       0       1       1       1       1       1       1       1       1       1
+   52429   52429   52429   52429   52429   52429   52429   52429 -167772 -167772 -167772 -167772 -167772 -167772 -167772 -167772 -167772
+       0       0       0       0       0       0       0       0       1       1       1       1       1       1       1       1       1
+   52429   52429   52429   52429   52429   52429   52429   52429 -167772 -167772 -167772 -167772 -167772 -167772 -167772 -167772 -167772
+       0       0       0       0       0       0       0       0       1       1       1       1       1       1       1       1       1
+   52429   52429   52429   52429   52429   52429   52429   52429 -167772 -167772 -167772 -167772 -167772 -167772 -167772 -167772 -167772
+       0       0       0       0       0       0       0       0       1       1       1       1       1       1       1       1       1
+   52429   52429   52429   52429   52429   52429   52429   52429 -167772 -167772 -167772 -167772 -167772 -167772 -167772 -167772 -167772
+       0       0       0       0       0       0       0       0       1       1       1       1       1       1       1       1       1
+   52429   52429   52429   52429   52429   52429   52429   52429 -167772 -167772 -167772 -167772 -167772 -167772 -167772 -167772 -167772
+       0       0       0       0       0       0       0       0       1       1       1       1       1       1       1       1       1
+   52429   52429   52429   52429   52429   52429   52429   52429 -167772 -167772 -167772 -167772 -167772 -167772 -167772 -167772 -167772
+       0       0       0       0       0       0       0       0       1       1       1       1       1       1       1       1       1
+   52429   52429   52429   52429   52429   52429   52429   52429 -167772 -167772 -167772 -167772 -167772 -167772 -167772 -167772 -167772
+       0       0       0       0       0       0       0       0       1       1       1       1       1       1       1       1       1
-- 
2.17.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".

  parent reply	other threads:[~2023-03-24  0:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24  0:25 [FFmpeg-devel] [PATCH 1/6] avcodec/tests/snowenc: unbreak DWT tests Michael Niedermayer
2023-03-24  0:25 ` [FFmpeg-devel] [PATCH 2/6] tools/enc_recon_frame_test: plane 0 height fix Michael Niedermayer
2023-03-24  8:50   ` Anton Khirnov
2023-03-24  9:30     ` Michael Niedermayer
2023-03-24  0:25 ` [FFmpeg-devel] [PATCH 3/6] avcodec/snowenc: Fix visual weight calculation Michael Niedermayer
2023-03-25 20:38   ` Michael Niedermayer
2023-03-24  0:25 ` [FFmpeg-devel] [PATCH 4/6] avcodec/tests/snowenc: return a failure if DWT/IDWT mismatches Michael Niedermayer
2023-03-25 20:38   ` Michael Niedermayer
2023-03-24  0:25 ` [FFmpeg-devel] [PATCH 5/6] avcodec/tests/snowenc: Fix 2nd test Michael Niedermayer
2023-03-25 20:53   ` Michael Niedermayer
2023-03-24  0:25 ` Michael Niedermayer [this message]
2023-03-25 20:37 ` [FFmpeg-devel] [PATCH 1/6] avcodec/tests/snowenc: unbreak DWT tests Michael Niedermayer

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=20230324002540.3227-6-michael@niedermayer.cc \
    --to=michael@niedermayer.cc \
    --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