[Ffmpeg-cvslog] r6787 - trunk/libavcodec/jpeg_ls.c

michael subversion
Tue Oct 24 11:45:21 CEST 2006


Author: michael
Date: Tue Oct 24 11:45:21 2006
New Revision: 6787

Modified:
   trunk/libavcodec/jpeg_ls.c

Log:
remove map variable


Modified: trunk/libavcodec/jpeg_ls.c
==============================================================================
--- trunk/libavcodec/jpeg_ls.c	(original)
+++ trunk/libavcodec/jpeg_ls.c	Tue Oct 24 11:45:21 2006
@@ -532,7 +532,7 @@
  */
 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 @@
     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)




More information about the ffmpeg-cvslog mailing list