[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec snow.c,1.51,1.52

Michael Niedermayer CVS michael
Thu Apr 14 20:33:28 CEST 2005


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv12096

Modified Files:
	snow.c 
Log Message:
optimizing unpack_coeffs()


Index: snow.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/snow.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- snow.c	13 Apr 2005 01:57:19 -0000	1.51
+++ snow.c	14 Apr 2005 18:33:26 -0000	1.52
@@ -1817,10 +1817,21 @@
                     int context= av_log2(/*ABS(ll) + */3*(l>>1) + (lt>>1) + (t&~1) + (rt>>1) + (p>>1));
 
                     v=get_rac(&s->c, &b->state[0][context]);
+                    if(v){
+                        v= 2*(get_symbol2(&s->c, b->state[context + 2], context-4) + 1);
+                        v+=get_rac(&s->c, &b->state[0][16 + 1 + 3 + quant3bA[l&0xFF] + 3*quant3bA[t&0xFF]]);
+                        
+                        b->x_coeff[index].x=x;
+                        b->x_coeff[index++].coeff= v;
+                    }
                 }else{
                     if(!run){
                         run= get_symbol2(&s->c, b->state[1], 3);
-                        v=1;
+                        v= 2*(get_symbol2(&s->c, b->state[0 + 2], 0-4) + 1);
+                        v+=get_rac(&s->c, &b->state[0][16 + 1 + 3]);
+                        
+                        b->x_coeff[index].x=x;
+                        b->x_coeff[index++].coeff= v;
                     }else{
                         run--;
                         v=0;
@@ -1835,14 +1846,6 @@
                         }
                     }
                 }
-                if(v){
-                    int context= av_log2(/*ABS(ll) + */3*(l>>1) + (lt>>1) + (t&~1) + (rt>>1) + (p>>1));
-                    v= 2*(get_symbol2(&s->c, b->state[context + 2], context-4) + 1);
-                    v+=get_rac(&s->c, &b->state[0][16 + 1 + 3 + quant3bA[l&0xFF] + 3*quant3bA[t&0xFF]]);
-                       
-                    b->x_coeff[index].x=x;
-                    b->x_coeff[index++].coeff= v;
-                }
             }
             b->x_coeff[index++].x= w+1; //end marker
             prev_index= prev2_index;





More information about the ffmpeg-cvslog mailing list