Browse code

Use existing function for VLC reading

Originally committed as revision 11185 to svn://svn.ffmpeg.org/ffmpeg/trunk

Kostya Shishkov authored on 2007/12/07 14:56:07
Showing 2 changed files
... ...
@@ -27,6 +27,7 @@
27 27
 #include "avcodec.h"
28 28
 #include "dsputil.h"
29 29
 #include "mpegvideo.h"
30
+#include "golomb.h"
30 31
 
31 32
 #include "rv34.h"
32 33
 #include "rv30data.h"
... ...
@@ -66,7 +67,7 @@ static int rv30_decode_intra_types(RV34DecContext *r, GetBitContext *gb, int8_t
66 66
 
67 67
     for(i = 0; i < 4; i++, dst += r->s.b4_stride - 4){
68 68
         for(j = 0; j < 4; j+= 2){
69
-            int code = (ff_rv34_get_gamma(gb) - 1) << 1;
69
+            int code = svq3_get_ue_golomb(gb) << 1;
70 70
             if(code >= 81*2){
71 71
                 av_log(r->s.avctx, AV_LOG_ERROR, "Incorrect intra prediction code\n");
72 72
                 return -1;
... ...
@@ -94,7 +95,7 @@ static int rv30_decode_mb_info(RV34DecContext *r)
94 94
     static const int rv30_b_types[6] = { RV34_MB_SKIP, RV34_MB_B_DIRECT, RV34_MB_B_FORWARD, RV34_MB_B_BACKWARD, RV34_MB_TYPE_INTRA, RV34_MB_TYPE_INTRA16x16 };
95 95
     MpegEncContext *s = &r->s;
96 96
     GetBitContext *gb = &s->gb;
97
-    int code = ff_rv34_get_gamma(gb) - 1;
97
+    int code = svq3_get_ue_golomb(gb);
98 98
 
99 99
     if(code > 11){
100 100
         av_log(s->avctx, AV_LOG_ERROR, "Incorrect MB type code\n");
... ...
@@ -27,6 +27,7 @@
27 27
 #include "avcodec.h"
28 28
 #include "dsputil.h"
29 29
 #include "mpegvideo.h"
30
+#include "golomb.h"
30 31
 
31 32
 #include "rv34.h"
32 33
 #include "rv40vlc2.h"
... ...
@@ -207,7 +208,7 @@ static int rv40_decode_mb_info(RV34DecContext *r)
207 207
     int count = 0;
208 208
 
209 209
     if(!r->s.mb_skip_run)
210
-        r->s.mb_skip_run = ff_rv34_get_gamma(gb);
210
+        r->s.mb_skip_run = svq3_get_ue_golomb(gb) + 1;
211 211
 
212 212
     if(--r->s.mb_skip_run)
213 213
          return RV34_MB_SKIP;