diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-05-16 09:19:11 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-05-16 09:19:11 +0200 |
commit | 0d83b5722e2875cd4a2ac3574af72b5be633c73d (patch) | |
tree | 4d42d5d60b334b4cbe13188c97005c7634d58135 /libavcodec/jpegls.c | |
parent | 4390fa6273e603f17a2c7244a5de0d8e36397f59 (diff) | |
parent | 9cacdabd1c8cd257a942d8289349c37d992989b7 (diff) | |
download | ffmpeg-0d83b5722e2875cd4a2ac3574af72b5be633c73d.tar.gz |
Merge commit '9cacdabd1c8cd257a942d8289349c37d992989b7'
* commit '9cacdabd1c8cd257a942d8289349c37d992989b7':
jpegls: cosmetics: Drop some unnecessary parentheses
mpegvideo: Remove commented-out PARANOID debug cruft
Conflicts:
libavcodec/jpegls.c
libavcodec/mpegvideo.c
libavcodec/x86/mpegvideo.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/jpegls.c')
-rw-r--r-- | libavcodec/jpegls.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/jpegls.c b/libavcodec/jpegls.c index dc5c9cfab1..e3e81c4497 100644 --- a/libavcodec/jpegls.c +++ b/libavcodec/jpegls.c @@ -31,16 +31,16 @@ void ff_jpegls_init_state(JLSState *state){ int i; state->twonear = state->near * 2 + 1; - state->range = ((state->maxval + state->twonear - 1) / state->twonear) + 1; + state->range = (state->maxval + state->twonear - 1) / state->twonear + 1; // QBPP = ceil(log2(RANGE)) for(state->qbpp = 0; (1 << state->qbpp) < state->range; state->qbpp++); - state->bpp = FFMAX(av_log2(state->maxval)+1, 2); + state->bpp = FFMAX(av_log2(state->maxval) + 1, 2); state->limit = 2*(state->bpp + FFMAX(state->bpp, 8)) - state->qbpp; for(i = 0; i < 367; i++) { - state->A[i] = FFMAX((state->range + 32) >> 6, 2); + state->A[i] = FFMAX(state->range + 32 >> 6, 2); state->N[i] = 1; } @@ -63,7 +63,7 @@ void ff_jpegls_reset_coding_parameters(JLSState *s, int reset_all){ if(s->maxval==0 || reset_all) s->maxval= (1 << s->bpp) - 1; if(s->maxval >=128){ - factor= (FFMIN(s->maxval, 4095) + 128)>>8; + factor = FFMIN(s->maxval, 4095) + 128 >> 8; if(s->T1==0 || reset_all) s->T1= iso_clip(factor*(basic_t1-2) + 2 + 3*s->near, s->near+1, s->maxval); |