avcodec/j2kenc: Fix funky bpno errors on decoding
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 816676085e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
b71ad913ff
commit
a2f71be26e
8 changed files with 15 additions and 16 deletions
|
|
@ -719,11 +719,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…
Add table
Add a link
Reference in a new issue