[FFmpeg-cvslog] r16293 - in trunk/libavcodec: rv34.c rv34data.h

kostya subversion
Tue Dec 23 19:27:06 CET 2008


Author: kostya
Date: Tue Dec 23 19:27:06 2008
New Revision: 16293

Log:
352l: correct calculating number of bits for storing macroblock offset in RV3/4

Modified:
   trunk/libavcodec/rv34.c
   trunk/libavcodec/rv34data.h

Modified: trunk/libavcodec/rv34.c
==============================================================================
--- trunk/libavcodec/rv34.c	Tue Dec 23 18:50:36 2008	(r16292)
+++ trunk/libavcodec/rv34.c	Tue Dec 23 19:27:06 2008	(r16293)
@@ -367,7 +367,7 @@ int ff_rv34_get_start_offset(GetBitConte
 {
     int i;
     for(i = 0; i < 5; i++)
-        if(rv34_mb_max_sizes[i] > mb_size)
+        if(rv34_mb_max_sizes[i] >= mb_size - 1)
             break;
     return rv34_mb_bits_sizes[i];
 }

Modified: trunk/libavcodec/rv34data.h
==============================================================================
--- trunk/libavcodec/rv34data.h	Tue Dec 23 18:50:36 2008	(r16292)
+++ trunk/libavcodec/rv34data.h	Tue Dec 23 19:27:06 2008	(r16293)
@@ -138,7 +138,7 @@ static const uint8_t rv34_dquant_tab[2][
  * maximum number of macroblocks for each of the possible slice offset sizes
  * @todo This is the same as ff_mba_max, maybe use it instead.
  */
-static const uint16_t rv34_mb_max_sizes[6] = { 0x2F, 0x68, 0x18B, 0x62F, 0x18BF, 0x23FF };
+static const uint16_t rv34_mb_max_sizes[6] = { 0x2F, 0x62, 0x18B, 0x62F, 0x18BF, 0x23FF };
 /**
  * bits needed to code the slice offset for the given size
  * @todo This is the same as ff_mba_length, maybe use it instead.




More information about the ffmpeg-cvslog mailing list