avcodec/j2kenc: Fix funky bpno errors on decoding
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 816676085e3d32f27d4001d9b95590046c487eb6) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
e25d8a4228
commit
40c0e965c6
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user