Commit e66faf71 authored by Michael Niedermayer's avatar Michael Niedermayer

j2k: merge ff_j2k_init_tier1_luts()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent b67fe48f
......@@ -161,17 +161,6 @@ static int getsgnctxno(int flag, uint8_t *xorbit)
return ctxlbltab[hcontrib][vcontrib];
}
void ff_j2k_init_tier1_luts(void)
{
int i, j;
for (i = 0; i < 256; i++)
for (j = 0; j < 4; j++)
ff_jpeg2000_sigctxno_lut[i][j] = getsigctxno(i, j);
for (i = 0; i < 16; i++)
for (j = 0; j < 16; j++)
ff_jpeg2000_sgnctxno_lut[i][j] = getsgnctxno(i + (j << 8), &ff_jpeg2000_xorbit_lut[i][j]);
}
void ff_j2k_set_significant(Jpeg2000T1Context *t1, int x, int y, int negative)
{
x++; y++;
......
......@@ -207,7 +207,7 @@ static inline int ff_jpeg2000_ceildiv(int a, int b)
Jpeg2000TgtNode *ff_j2k_tag_tree_init(int w, int h);
/* TIER-1 routines */
void ff_j2k_init_tier1_luts(void);
void ff_jpeg2000_init_tier1_luts(void);
void ff_j2k_set_significant(Jpeg2000T1Context *t1, int x, int y, int negative);
......
......@@ -1088,7 +1088,7 @@ static av_cold int j2kdec_init(AVCodecContext *avctx)
s->avctx = avctx;
ff_j2k_init_tier1_luts();
ff_jpeg2000_init_tier1_luts();
return 0;
}
......
......@@ -1003,7 +1003,7 @@ static av_cold int j2kenc_init(AVCodecContext *avctx)
s->chroma_shift, s->chroma_shift + 1);
}
ff_j2k_init_tier1_luts();
ff_jpeg2000_init_tier1_luts();
init_luts();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment