[FFmpeg-cvslog] avcodec/j2kenc: Fix funky bpno errors on decoding
Michael Niedermayer
git at videolan.org
Sun Apr 16 01:42:14 EEST 2023
ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Thu Mar 30 18:21:28 2023 +0200| [40c0e965c600eb40b58061b98af7a4af2c1ffbfa] | committer: Michael Niedermayer
avcodec/j2kenc: Fix funky bpno errors on decoding
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 816676085e3d32f27d4001d9b95590046c487eb6)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=40c0e965c600eb40b58061b98af7a4af2c1ffbfa
---
libavcodec/j2kenc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c
index a2d29aa268..e5914fe87b 100644
--- a/libavcodec/j2kenc.c
+++ b/libavcodec/j2kenc.c
@@ -658,11 +658,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);
More information about the ffmpeg-cvslog
mailing list