[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec vp3.c, 1.60, 1.61 vp3data.h, 1.9, 1.10

Mike Melanson CVS melanson
Sat May 21 03:12:43 CEST 2005


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

Modified Files:
	vp3.c vp3data.h 
Log Message:
another bitstream extraction to optimize: fixed-length motion vectors


Index: vp3.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/vp3.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- vp3.c	19 May 2005 23:59:10 -0000	1.60
+++ vp3.c	21 May 2005 01:12:41 -0000	1.61
@@ -1540,9 +1540,15 @@
                         motion_y[0] = get_motion_vector_vlc(gb);
 #endif
                     } else {
+#if 1
+                        motion_x[0] = fixed_motion_vector_table[get_bits(gb, 6)];
+                        motion_y[0] = fixed_motion_vector_table[get_bits(gb, 6)];
+#else
                         motion_x[0] = get_motion_vector_fixed(gb);
                         motion_y[0] = get_motion_vector_fixed(gb);
+#endif
                     }
+
                     for (k = 1; k < 6; k++) {
                         motion_x[k] = motion_x[0];
                         motion_y[k] = motion_y[0];
@@ -1572,8 +1578,13 @@
                             motion_y[k] = get_motion_vector_vlc(gb);
 #endif
                         } else {
+#if 1
+                            motion_x[k] = fixed_motion_vector_table[get_bits(gb, 6)];
+                            motion_y[k] = fixed_motion_vector_table[get_bits(gb, 6)];
+#else
                             motion_x[k] = get_motion_vector_fixed(gb);
                             motion_y[k] = get_motion_vector_fixed(gb);
+#endif
                         }
                         motion_x[4] += motion_x[k];
                         motion_y[4] += motion_y[k];

Index: vp3data.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/vp3data.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- vp3data.h	19 May 2005 02:43:21 -0000	1.9
+++ vp3data.h	21 May 2005 01:12:41 -0000	1.10
@@ -163,6 +163,17 @@
     24, -24, 25, -25, 26, -26, 27, -27, 28, -28, 29, -29, 30, -30, 31, -31
 };
 
+static const int8_t fixed_motion_vector_table[64] = {
+   0,   0,   1,  -1,   2,  -2,   3,  -3,   
+   4,  -4,   5,  -5,   6,  -6,   7,  -7,
+   8,  -8,   9,  -9,  10, -10,  11, -11,
+  12, -12,  13, -13,  14, -14,  15, -15,
+  16, -16,  17, -17,  18, -18,  19, -19,
+  20, -20,  21, -21,  22, -22,  23, -23,
+  24, -24,  25, -25,  26, -26,  27, -27,
+  28, -28,  29, -29,  30, -30,  31, -31
+};
+
 /* only tokens 0..6 indicate eob runs */
 static const int eob_run_base[7] = {
     1, 2, 3, 4, 8, 16, 0





More information about the ffmpeg-cvslog mailing list