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 03/11] avcodec/j2kenc: Fix funky bpno errors on decoding
Date: Thu, 30 Mar 2023 20:00:58 +0200
Message-ID: <20230330180106.11275-3-michael@niedermayer.cc> (raw)
In-Reply-To: <20230330180106.11275-1-michael@niedermayer.cc>

Signed-off-by: Michael Niedermayer <michael@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

_______________________________________________
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-30 18:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 18:00 [FFmpeg-devel] [PATCH 01/11] avcodec/j2kenc: fix 5/3 DWT identifer Michael Niedermayer
2023-03-30 18:00 ` [FFmpeg-devel] [PATCH 02/11] avcodec/j2kenc: remove misleading pred value Michael Niedermayer
2023-03-30 18:00 ` Michael Niedermayer [this message]
2023-03-30 18:00 ` [FFmpeg-devel] [PATCH 04/11] avcodec/j2kenc: Add AV_PIX_FMT_YUV440P Michael Niedermayer
2023-03-30 18:01 ` [FFmpeg-devel] [PATCH 05/11] avcodec/j2kenc: simplify pixel format setup Michael Niedermayer
2023-03-30 18:01 ` [FFmpeg-devel] [PATCH 06/11] avcodec/j2kenc: Replace BGR48 / GRAY16 test by test for number of bits Michael Niedermayer
2023-03-30 18:01 ` [FFmpeg-devel] [PATCH 07/11] avcodec/j2kenc: Replace RGB24 special case by generic test Michael Niedermayer
2023-03-30 18:01 ` [FFmpeg-devel] [PATCH 08/11] avcodec/j2kenc: Planar RGB support Michael Niedermayer
2023-03-31 14:19   ` Anton Khirnov
2023-04-02 21:19     ` Michael Niedermayer
2023-03-30 18:01 ` [FFmpeg-devel] [PATCH 09/11] avcodec/j2kenc: More complete list of supported pixel formats Michael Niedermayer
2023-03-30 18:01 ` [FFmpeg-devel] [PATCH 10/11] avcodec/j2kenc: support threads Michael Niedermayer
2023-03-30 18:01 ` [FFmpeg-devel] [PATCH 11/11] Remove libopenjpeg decoder Michael Niedermayer
2023-04-02 21:20 ` [FFmpeg-devel] [PATCH 01/11] avcodec/j2kenc: fix 5/3 DWT identifer 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=20230330180106.11275-3-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