[FFmpeg-devel] [PATCH 03/11] avcodec/j2kenc: Fix funky bpno errors on decoding
Michael Niedermayer
michael at niedermayer.cc
Thu Mar 30 21:00:58 EEST 2023
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavcodec/j2kenc.c | 3 +--
tests/ref/vsynth/vsynth1-jpeg2000-97 | 4 ++--
tests/ref/vsynth/vsynth2-jpeg2000 | 4 ++--
tests/ref/vsynth/vsynth2-jpeg2000-97 | 4 ++--
tests/ref/vsynth/vsynth3-jpeg2000 | 4 ++--
tests/ref/vsynth/vsynth3-jpeg2000-97 | 4 ++--
tests/ref/vsynth/vsynth_lena-jpeg2000 | 4 ++--
tests/ref/vsynth/vsynth_lena-jpeg2000-97 | 4 ++--
8 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c
index 0e23a8a8399..236c720dfed 100644
--- a/libavcodec/j2kenc.c
+++ b/libavcodec/j2kenc.c
@@ -721,11 +721,10 @@ static void encode_cblk(Jpeg2000EncoderContext *s, Jpeg2000T1Context *t1, Jpeg20
if (max == 0){
cblk->nonzerobits = 0;
- bpno = 0;
} else{
cblk->nonzerobits = av_log2(max) + 1 - NMSEDEC_FRACBITS;
- bpno = cblk->nonzerobits - 1;
}
+ bpno = cblk->nonzerobits - 1;
cblk->data[0] = 0;
ff_mqc_initenc(&t1->mqc, cblk->data + 1);
diff --git a/tests/ref/vsynth/vsynth1-jpeg2000-97 b/tests/ref/vsynth/vsynth1-jpeg2000-97
index 6ab5aa4237c..c979ab5c364 100644
--- a/tests/ref/vsynth/vsynth1-jpeg2000-97
+++ b/tests/ref/vsynth/vsynth1-jpeg2000-97
@@ -1,4 +1,4 @@
-e4d03b2e3c03e56c7f831b1e662c4031 *tests/data/fate/vsynth1-jpeg2000-97.avi
-3643928 tests/data/fate/vsynth1-jpeg2000-97.avi
+5e6d32b7205d31245b0d1f015d08b515 *tests/data/fate/vsynth1-jpeg2000-97.avi
+3643886 tests/data/fate/vsynth1-jpeg2000-97.avi
a2262f1da2f49bc196b780a6b47ec4e8 *tests/data/fate/vsynth1-jpeg2000-97.out.rawvideo
stddev: 4.23 PSNR: 35.59 MAXDIFF: 53 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-jpeg2000 b/tests/ref/vsynth/vsynth2-jpeg2000
index d0df0099ea0..b60307d5da6 100644
--- a/tests/ref/vsynth/vsynth2-jpeg2000
+++ b/tests/ref/vsynth/vsynth2-jpeg2000
@@ -1,4 +1,4 @@
-8c8a68ca748190c71b3ea43e5ab7f502 *tests/data/fate/vsynth2-jpeg2000.avi
-1538736 tests/data/fate/vsynth2-jpeg2000.avi
+bfe90391779a02319aab98b06dd18e6c *tests/data/fate/vsynth2-jpeg2000.avi
+1538724 tests/data/fate/vsynth2-jpeg2000.avi
64fadc87447268cf90503cb294db7f61 *tests/data/fate/vsynth2-jpeg2000.out.rawvideo
stddev: 4.91 PSNR: 34.29 MAXDIFF: 55 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-jpeg2000-97 b/tests/ref/vsynth/vsynth2-jpeg2000-97
index 33c1fb2425d..591f8b6bb32 100644
--- a/tests/ref/vsynth/vsynth2-jpeg2000-97
+++ b/tests/ref/vsynth/vsynth2-jpeg2000-97
@@ -1,4 +1,4 @@
-c8f76055f59804ca72dbd66eb4db83a2 *tests/data/fate/vsynth2-jpeg2000-97.avi
-2464138 tests/data/fate/vsynth2-jpeg2000-97.avi
+aa5573136c54b1855d8d00efe2a149bd *tests/data/fate/vsynth2-jpeg2000-97.avi
+2464134 tests/data/fate/vsynth2-jpeg2000-97.avi
1f63c8b065e847e4c63d57ce23442ea8 *tests/data/fate/vsynth2-jpeg2000-97.out.rawvideo
stddev: 3.21 PSNR: 37.99 MAXDIFF: 26 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth3-jpeg2000 b/tests/ref/vsynth/vsynth3-jpeg2000
index ecc286b9a46..894dba27dc5 100644
--- a/tests/ref/vsynth/vsynth3-jpeg2000
+++ b/tests/ref/vsynth/vsynth3-jpeg2000
@@ -1,4 +1,4 @@
-776bf3234cbf25002f129b89baab42ea *tests/data/fate/vsynth3-jpeg2000.avi
-67400 tests/data/fate/vsynth3-jpeg2000.avi
+1d039969504abdc143b410f99b5f9171 *tests/data/fate/vsynth3-jpeg2000.avi
+67354 tests/data/fate/vsynth3-jpeg2000.avi
098f5980667e1fcd50452b1dc1a74f61 *tests/data/fate/vsynth3-jpeg2000.out.rawvideo
stddev: 5.47 PSNR: 33.36 MAXDIFF: 48 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth3-jpeg2000-97 b/tests/ref/vsynth/vsynth3-jpeg2000-97
index df10f43270c..5d9d0837917 100644
--- a/tests/ref/vsynth/vsynth3-jpeg2000-97
+++ b/tests/ref/vsynth/vsynth3-jpeg2000-97
@@ -1,4 +1,4 @@
-cd023db503f03ef72dd83e4617a90c7b *tests/data/fate/vsynth3-jpeg2000-97.avi
-85606 tests/data/fate/vsynth3-jpeg2000-97.avi
+522e12684aca4262a9d613cb2db7006c *tests/data/fate/vsynth3-jpeg2000-97.avi
+85526 tests/data/fate/vsynth3-jpeg2000-97.avi
8def36ad1413ab3a5c2af2e1af4603f9 *tests/data/fate/vsynth3-jpeg2000-97.out.rawvideo
stddev: 4.51 PSNR: 35.04 MAXDIFF: 47 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth_lena-jpeg2000 b/tests/ref/vsynth/vsynth_lena-jpeg2000
index 88629add21a..e2cbc899d35 100644
--- a/tests/ref/vsynth/vsynth_lena-jpeg2000
+++ b/tests/ref/vsynth/vsynth_lena-jpeg2000
@@ -1,4 +1,4 @@
-b8aaa45236f77a2a626791d462fd8ac1 *tests/data/fate/vsynth_lena-jpeg2000.avi
-1188886 tests/data/fate/vsynth_lena-jpeg2000.avi
+51f061731d7fb987ff4e71789785225e *tests/data/fate/vsynth_lena-jpeg2000.avi
+1188882 tests/data/fate/vsynth_lena-jpeg2000.avi
39a2c5b61cd0cf2821c6fb4cceba2fa8 *tests/data/fate/vsynth_lena-jpeg2000.out.rawvideo
stddev: 4.30 PSNR: 35.45 MAXDIFF: 45 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth_lena-jpeg2000-97 b/tests/ref/vsynth/vsynth_lena-jpeg2000-97
index b6f5f75f77a..05393001859 100644
--- a/tests/ref/vsynth/vsynth_lena-jpeg2000-97
+++ b/tests/ref/vsynth/vsynth_lena-jpeg2000-97
@@ -1,4 +1,4 @@
-b2d9525433c6300674f504922d762437 *tests/data/fate/vsynth_lena-jpeg2000-97.avi
-1937232 tests/data/fate/vsynth_lena-jpeg2000-97.avi
+80fe872c8afaad914da6ef037957d93b *tests/data/fate/vsynth_lena-jpeg2000-97.avi
+1937216 tests/data/fate/vsynth_lena-jpeg2000-97.avi
1b97333a8dc115a5ba609b0070d89d4d *tests/data/fate/vsynth_lena-jpeg2000-97.out.rawvideo
stddev: 2.82 PSNR: 39.10 MAXDIFF: 24 bytes: 7603200/ 7603200
--
2.17.1
More information about the ffmpeg-devel
mailing list