aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-10-24 09:45:21 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-10-24 09:45:21 +0000
commit46d9fe622d6d50bb9e83ccdb0a97ce2ed9a79280 (patch)
tree7a39ec949fa0678ad18d143a3ff18fdc31b99369
parent71977422d191e06e0f748ad293f002f9edf673c7 (diff)
downloadffmpeg-46d9fe622d6d50bb9e83ccdb0a97ce2ed9a79280.tar.gz
remove map variable
Originally committed as revision 6787 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/jpeg_ls.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libavcodec/jpeg_ls.c b/libavcodec/jpeg_ls.c
index c0ce742c53..cb99b5f519 100644
--- a/libavcodec/jpeg_ls.c
+++ b/libavcodec/jpeg_ls.c
@@ -532,7 +532,7 @@ static inline void ls_encode_regular(JLSState *state, PutBitContext *pb, int Q,
*/
static inline void ls_encode_runterm(JLSState *state, PutBitContext *pb, int RItype, int err, int limit_add){
int k;
- int val, map;
+ int val;
int Q = 365 + RItype;
int temp;
@@ -540,14 +540,13 @@ static inline void ls_encode_runterm(JLSState *state, PutBitContext *pb, int RIt
if(RItype)
temp += state->N[Q] >> 1;
for(k = 0; (state->N[Q] << k) < temp; k++);
- map = 0;
- if(!k && err && (2 * state->B[Q] < state->N[Q]))
- map = 1;
+ if(!k && (2 * state->B[Q] < state->N[Q]))
+ err= -err;
if(err < 0)
- val = - (2 * err) - 1 - RItype + map;
+ val = - (2 * err) - 1 - RItype;
else
- val = 2 * err - RItype - map;
+ val = 2 * err - RItype;
set_ur_golomb_jpegls(pb, val, k, state->limit - limit_add - 1, state->qbpp);
if(err < 0)