[Ffmpeg-cvslog] r5897 - trunk/libavcodec/vorbis.c

lorenm subversion
Thu Aug 3 04:18:07 CEST 2006


Author: lorenm
Date: Thu Aug  3 04:18:07 2006
New Revision: 5897

Modified:
   trunk/libavcodec/vorbis.c

Log:
int16_t is faster than int_fast16_t for division.
2% faster vorbis (on a K8).


Modified: trunk/libavcodec/vorbis.c
==============================================================================
--- trunk/libavcodec/vorbis.c	(original)
+++ trunk/libavcodec/vorbis.c	Thu Aug  3 04:18:07 2006
@@ -1192,7 +1192,7 @@
         adx=vf->x_list[high_neigh_offs]-vf->x_list[low_neigh_offs];
         ady= ABS(dy);
         err=ady*(vf->x_list[i]-vf->x_list[low_neigh_offs]);
-        off=err/adx;
+        off=(int16_t)err/(int16_t)adx;
         if (dy<0) {
             predicted=floor1_Y_final[low_neigh_offs]-off;
         } else {
@@ -1252,7 +1252,7 @@
             dy=hy-ly;
             adx=hx-lx;
             ady= (dy<0) ? -dy:dy;//ABS(dy);
-            base=dy/adx;
+            base=(int16_t)dy/(int16_t)adx;
 
             AV_DEBUG(" dy %d  adx %d base %d = %d \n", dy, adx, base, dy/adx);
 




More information about the ffmpeg-cvslog mailing list