Commit b396c2e6 authored by michael's avatar michael

remove map variable


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@6787 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e509ac52
...@@ -532,7 +532,7 @@ static inline void ls_encode_regular(JLSState *state, PutBitContext *pb, int Q, ...@@ -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){ static inline void ls_encode_runterm(JLSState *state, PutBitContext *pb, int RItype, int err, int limit_add){
int k; int k;
int val, map; int val;
int Q = 365 + RItype; int Q = 365 + RItype;
int temp; int temp;
...@@ -540,14 +540,13 @@ static inline void ls_encode_runterm(JLSState *state, PutBitContext *pb, int RIt ...@@ -540,14 +540,13 @@ static inline void ls_encode_runterm(JLSState *state, PutBitContext *pb, int RIt
if(RItype) if(RItype)
temp += state->N[Q] >> 1; temp += state->N[Q] >> 1;
for(k = 0; (state->N[Q] << k) < temp; k++); for(k = 0; (state->N[Q] << k) < temp; k++);
map = 0; if(!k && (2 * state->B[Q] < state->N[Q]))
if(!k && err && (2 * state->B[Q] < state->N[Q])) err= -err;
map = 1;
if(err < 0) if(err < 0)
val = - (2 * err) - 1 - RItype + map; val = - (2 * err) - 1 - RItype;
else else
val = 2 * err - RItype - map; val = 2 * err - RItype;
set_ur_golomb_jpegls(pb, val, k, state->limit - limit_add - 1, state->qbpp); set_ur_golomb_jpegls(pb, val, k, state->limit - limit_add - 1, state->qbpp);
if(err < 0) if(err < 0)
......
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