[FFmpeg-soc] [soc]: r368 - rv40/rv40.c

kostya subversion at mplayerhq.hu
Tue Jul 10 09:20:29 CEST 2007


Author: kostya
Date: Tue Jul 10 09:20:29 2007
New Revision: 368

Log:
This formula for calculating macroblock offset seems to be correct

Modified:
   rv40/rv40.c

Modified: rv40/rv40.c
==============================================================================
--- rv40/rv40.c	(original)
+++ rv40/rv40.c	Tue Jul 10 09:20:29 2007
@@ -460,7 +460,7 @@ static int rv40_parse_slice_header(RV40D
     rv40_parse_picture_size(gb, &w, &h);
     r->s.avctx->coded_width  = w;
     r->s.avctx->coded_height = h;
-    mb_bits = av_log2(t)+1;
+    mb_bits = av_log2((w + 7) >> 3) + av_log2((h + 7) >> 3);
     r->block_start = get_bits(gb, mb_bits);
     r->block_end = r->block_start+70;
     return 0;



More information about the FFmpeg-soc mailing list