aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-26 17:33:08 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-26 18:07:48 +0200
commit69b97739806f618b1931741fa0b42d0cf03e9c31 (patch)
treed2dc75db25f1644f5fac1b8e32016eb750fc9306
parent5157ec89ef88848add4a2586b10a665f6f73d556 (diff)
downloadffmpeg-69b97739806f618b1931741fa0b42d0cf03e9c31.tar.gz
j2k: s/getnbctxno/getsigctxno/g
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/j2k.c4
-rw-r--r--libavcodec/j2k.h2
-rw-r--r--libavcodec/j2kdec.c4
-rw-r--r--libavcodec/j2kenc.c6
4 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/j2k.c b/libavcodec/j2k.c
index 96d6851b2d..af23ef8226 100644
--- a/libavcodec/j2k.c
+++ b/libavcodec/j2k.c
@@ -103,7 +103,7 @@ static void tag_tree_zero(Jpeg2000TgtNode *t, int w, int h)
}
}
-static int getnbctxno(int flag, int bandno)
+static int getsigctxno(int flag, int bandno)
{
int h, v, d;
@@ -166,7 +166,7 @@ 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] = getnbctxno(i, 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]);
diff --git a/libavcodec/j2k.h b/libavcodec/j2k.h
index 1e41acfc46..2757621d83 100644
--- a/libavcodec/j2k.h
+++ b/libavcodec/j2k.h
@@ -213,7 +213,7 @@ void ff_j2k_set_significant(Jpeg2000T1Context *t1, int x, int y, int negative);
extern uint8_t ff_jpeg2000_sigctxno_lut[256][4];
-static inline int ff_j2k_getnbctxno(int flag, int bandno)
+static inline int ff_j2k_getsigctxno(int flag, int bandno)
{
return ff_jpeg2000_sigctxno_lut[flag&255][bandno];
}
diff --git a/libavcodec/j2kdec.c b/libavcodec/j2kdec.c
index 8f448848f4..f46628e416 100644
--- a/libavcodec/j2kdec.c
+++ b/libavcodec/j2kdec.c
@@ -631,7 +631,7 @@ static void decode_sigpass(Jpeg2000T1Context *t1, int width, int height, int bpn
int flags_mask = -1;
if (vert_causal_ctx_csty_symbol && y == y0 + 3)
flags_mask &= ~(JPEG2000_T1_SIG_S | JPEG2000_T1_SIG_SW | JPEG2000_T1_SIG_SE);
- if (ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + ff_j2k_getnbctxno(t1->flags[y+1][x+1] & flags_mask, bandno))){
+ if (ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + ff_j2k_getsigctxno(t1->flags[y+1][x+1] & flags_mask, bandno))){
int xorbit, ctxno = ff_jpeg2000_getsgnctxno(t1->flags[y+1][x+1], &xorbit);
if (bpass_csty_symbol)
t1->data[y][x] = ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + ctxno) ? -mask : mask;
@@ -694,7 +694,7 @@ static void decode_clnpass(Jpeg2000DecoderContext *s, Jpeg2000T1Context *t1, int
int flags_mask = -1;
if (vert_causal_ctx_csty_symbol && y == y0 + 3)
flags_mask &= ~(JPEG2000_T1_SIG_S | JPEG2000_T1_SIG_SW | JPEG2000_T1_SIG_SE);
- dec = ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + ff_j2k_getnbctxno(t1->flags[y+1][x+1] & flags_mask,
+ dec = ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + ff_j2k_getsigctxno(t1->flags[y+1][x+1] & flags_mask,
bandno));
}
}
diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c
index de91df552f..7b2653e4be 100644
--- a/libavcodec/j2kenc.c
+++ b/libavcodec/j2kenc.c
@@ -480,7 +480,7 @@ static void encode_sigpass(Jpeg2000T1Context *t1, int width, int height, int ban
for (x = 0; x < width; x++)
for (y = y0; y < height && y < y0+4; y++){
if (!(t1->flags[y+1][x+1] & JPEG2000_T1_SIG) && (t1->flags[y+1][x+1] & JPEG2000_T1_SIG_NB)){
- int ctxno = ff_j2k_getnbctxno(t1->flags[y+1][x+1], bandno),
+ int ctxno = ff_j2k_getsigctxno(t1->flags[y+1][x+1], bandno),
bit = t1->data[y][x] & mask ? 1 : 0;
ff_mqc_encode(&t1->mqc, t1->mqc.cx_states + ctxno, bit);
if (bit){
@@ -532,7 +532,7 @@ static void encode_clnpass(Jpeg2000T1Context *t1, int width, int height, int ban
ff_mqc_encode(&t1->mqc, t1->mqc.cx_states + MQC_CX_UNI, rlen & 1);
for (y = y0 + rlen; y < y0 + 4; y++){
if (!(t1->flags[y+1][x+1] & (JPEG2000_T1_SIG | JPEG2000_T1_VIS))){
- int ctxno = ff_j2k_getnbctxno(t1->flags[y+1][x+1], bandno);
+ int ctxno = ff_j2k_getsigctxno(t1->flags[y+1][x+1], bandno);
if (y > y0 + rlen)
ff_mqc_encode(&t1->mqc, t1->mqc.cx_states + ctxno, t1->data[y][x] & mask ? 1:0);
if (t1->data[y][x] & mask){ // newly significant
@@ -548,7 +548,7 @@ static void encode_clnpass(Jpeg2000T1Context *t1, int width, int height, int ban
} else{
for (y = y0; y < y0 + 4 && y < height; y++){
if (!(t1->flags[y+1][x+1] & (JPEG2000_T1_SIG | JPEG2000_T1_VIS))){
- int ctxno = ff_j2k_getnbctxno(t1->flags[y+1][x+1], bandno);
+ int ctxno = ff_j2k_getsigctxno(t1->flags[y+1][x+1], bandno);
ff_mqc_encode(&t1->mqc, t1->mqc.cx_states + ctxno, t1->data[y][x] & mask ? 1:0);
if (t1->data[y][x] & mask){ // newly significant
int xorbit;