[FFmpeg-soc] [soc]: r1215 - in jpeg2000: j2k.c j2kdec.c j2kenc.c mqcdec.c
k.nowosad
subversion at mplayerhq.hu
Tue Aug 28 12:40:52 CEST 2007
Author: k.nowosad
Date: Tue Aug 28 12:40:52 2007
New Revision: 1215
Log:
cosmetics
Modified:
jpeg2000/j2k.c
jpeg2000/j2kdec.c
jpeg2000/j2kenc.c
jpeg2000/mqcdec.c
Modified: jpeg2000/j2k.c
==============================================================================
--- jpeg2000/j2k.c (original)
+++ jpeg2000/j2k.c Tue Aug 28 12:40:52 2007
@@ -185,8 +185,7 @@ void ff_j2k_set_significant(J2kT1Context
t1->flags[y][x-1] |= J2K_T1_SIG_E | J2K_T1_SGN_E;
t1->flags[y+1][x] |= J2K_T1_SIG_N | J2K_T1_SGN_N;
t1->flags[y-1][x] |= J2K_T1_SIG_S | J2K_T1_SGN_S;
- }
- else{
+ } else{
t1->flags[y][x+1] |= J2K_T1_SIG_W;
t1->flags[y][x-1] |= J2K_T1_SIG_E;
t1->flags[y+1][x] |= J2K_T1_SIG_N;
@@ -256,8 +255,7 @@ int ff_j2k_init_component(J2kComponent *
numbps = cbps + lut_gain[codsty->transform][bandno + reslevelno>0];
band->stepsize = SHL(2048 + qntsty->mant[gbandno], 2 + numbps - qntsty->expn[gbandno]);
- }
- else
+ } else
band->stepsize = 1 << 13;
if (reslevelno == 0){ // the same everywhere
@@ -266,8 +264,7 @@ int ff_j2k_init_component(J2kComponent *
for (i = 0; i < 2; i++)
for (j = 0; j < 2; j++)
band->coord[i][j] = ff_j2k_ceildivpow2(comp->coord[i][j], declvl-1);
- }
- else{
+ } else{
band->codeblock_width = 1 << FFMIN(codsty->log2_cblk_width, codsty->log2_prec_width);
band->codeblock_height = 1 << FFMIN(codsty->log2_cblk_height, codsty->log2_prec_height);
Modified: jpeg2000/j2kdec.c
==============================================================================
--- jpeg2000/j2kdec.c (original)
+++ jpeg2000/j2kdec.c Tue Aug 28 12:40:52 2007
@@ -349,8 +349,7 @@ static int get_qcx(J2kDecoderContext *s,
return AVERROR(EINVAL);
for (i = 0; i < n; i++)
q->expn[i] = bytestream_get_byte(&s->buf) >> 3;
- }
- else if (q->quantsty == J2K_QSTY_SI){
+ } else if (q->quantsty == J2K_QSTY_SI){
if (s->buf_end - s->buf < 2)
return AVERROR(EINVAL);
x = bytestream_get_be16(&s->buf);
@@ -361,8 +360,7 @@ static int get_qcx(J2kDecoderContext *s,
q->expn[i] = curexpn;
q->mant[i] = q->mant[0];
}
- }
- else{
+ } else{
n = (n - 3) >> 1;
if (s->buf_end - s->buf < n)
return AVERROR(EINVAL);
@@ -484,8 +482,7 @@ static int decode_packet(J2kDecoderConte
if (!(ret = get_bits(s, 1))){
j2k_flush(s);
return 0;
- }
- else if (ret < 0)
+ } else if (ret < 0)
return ret;
for (bandno = 0; bandno < rlevel->nbands; bandno++){
@@ -500,9 +497,8 @@ static int decode_packet(J2kDecoderConte
if (cblk->npasses)
incl = get_bits(s, 1);
- else{
+ else
incl = tag_tree_decode(s, prec->cblkincl + pos, layno+1) == layno;
- }
if (!incl)
continue;
else if (incl < 0)
@@ -624,8 +620,7 @@ static void decode_clnpass(J2kT1Context
runlen = ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + MQC_CX_UNI);
runlen = (runlen << 1) | ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + MQC_CX_UNI);
dec = 1;
- }
- else{
+ } else{
runlen = 0;
dec = 0;
}
Modified: jpeg2000/j2kenc.c
==============================================================================
--- jpeg2000/j2kenc.c (original)
+++ jpeg2000/j2kenc.c Tue Aug 28 12:40:52 2007
@@ -526,8 +526,7 @@ static void encode_clnpass(J2kT1Context
}
t1->flags[y+1][x+1] &= ~J2K_T1_VIS;
}
- }
- else{
+ } else{
for (y = y0; y < y0 + 4 && y < height; y++){
if (!(t1->flags[y+1][x+1] & (J2K_T1_SIG | J2K_T1_VIS))){
int ctxno = ff_j2k_getnbctxno(t1->flags[y+1][x+1], bandno);
@@ -568,8 +567,7 @@ static void encode_cblk(J2kEncoderContex
if (max == 0){
cblk->nonzerobits = 0;
bpno = 0;
- }
- else{
+ } else{
cblk->nonzerobits = av_log2(max) + 1 - NMSEDEC_FRACBITS;
bpno = cblk->nonzerobits - 1;
}
Modified: jpeg2000/mqcdec.c
==============================================================================
--- jpeg2000/mqcdec.c (original)
+++ jpeg2000/mqcdec.c Tue Aug 28 12:40:52 2007
@@ -36,8 +36,7 @@ static void bytein(MqcState *mqc)
mqc->bp++;
mqc->c += 2 + 0xfe00 - (*mqc->bp << 9);
}
- }
- else{
+ } else{
mqc->bp++;
mqc->c += 1 + 0xff00 - (*mqc->bp << 8);
}
@@ -51,8 +50,7 @@ static int exchange(MqcState *mqc, uint8
mqc->a = ff_mqc_qe[*cxstate];
d = *cxstate & 1;
*cxstate = ff_mqc_nmps[*cxstate];
- }
- else{
+ } else{
if (lps)
mqc->a = ff_mqc_qe[*cxstate];
d = 1 - (*cxstate & 1);
More information about the FFmpeg-soc
mailing list