mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
reverse my last change, it was wrong and broken
Originally committed as revision 6788 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
46d9fe622d
commit
54fe115921
@ -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;
|
||||
int val, map;
|
||||
int Q = 365 + RItype;
|
||||
int temp;
|
||||
|
||||
@ -540,13 +540,14 @@ 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++);
|
||||
if(!k && (2 * state->B[Q] < state->N[Q]))
|
||||
err= -err;
|
||||
map = 0;
|
||||
if(!k && err && (2 * state->B[Q] < state->N[Q]))
|
||||
map = 1;
|
||||
|
||||
if(err < 0)
|
||||
val = - (2 * err) - 1 - RItype;
|
||||
val = - (2 * err) - 1 - RItype + map;
|
||||
else
|
||||
val = 2 * err - RItype;
|
||||
val = 2 * err - RItype - map;
|
||||
set_ur_golomb_jpegls(pb, val, k, state->limit - limit_add - 1, state->qbpp);
|
||||
|
||||
if(err < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user