[FFmpeg-cvslog] avcodec/tests/snowenc: Fix 2nd test

Michael Niedermayer git at videolan.org
Tue Mar 28 00:15:47 EEST 2023


ffmpeg | branch: release/5.0 | Michael Niedermayer <michael at niedermayer.cc> | Fri Mar 24 00:48:56 2023 +0100| [4e8da0dc2200b43e7949a0c88e39d294c1ef5efb] | committer: Michael Niedermayer

avcodec/tests/snowenc: Fix 2nd test

(cherry picked from commit 163013c72452621624f634c706824c77222b77c5)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4e8da0dc2200b43e7949a0c88e39d294c1ef5efb
---

 libavcodec/tests/snowenc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/tests/snowenc.c b/libavcodec/tests/snowenc.c
index 693234b7ca..2b41adc708 100644
--- a/libavcodec/tests/snowenc.c
+++ b/libavcodec/tests/snowenc.c
@@ -93,14 +93,14 @@ int main(void){
                 int w= width  >> (s.spatial_decomposition_count-level);
                 int h= height >> (s.spatial_decomposition_count-level);
                 int stride= width  << (s.spatial_decomposition_count-level);
-                DWTELEM *buf= buffer[0];
+                IDWTELEM *buf= obuffer;
                 int64_t error=0;
 
                 if(orientation&1) buf+=w;
                 if(orientation>1) buf+=stride>>1;
 
                 memset(obuffer, 0, sizeof(short)*width*height);
-                buf[w/2 + h/2*stride]= 256*256;
+                buf[w/2 + h/2*stride]= 8*256;
                 ff_spatial_idwt(obuffer, s.temp_idwt_buffer, width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count);
                 for(y=0; y<height; y++){
                     for(x=0; x<width; x++){



More information about the ffmpeg-cvslog mailing list