[FFmpeg-cvslog] r25661 - trunk/libavcodec/truemotion1.c

reimar subversion
Wed Nov 3 17:57:06 CET 2010


Author: reimar
Date: Wed Nov  3 17:57:05 2010
New Revision: 25661

Log:
100l, calculate mb_change_bits_row_size from the update width.

Modified:
   trunk/libavcodec/truemotion1.c

Modified: trunk/libavcodec/truemotion1.c
==============================================================================
--- trunk/libavcodec/truemotion1.c	Wed Nov  3 17:45:55 2010	(r25660)
+++ trunk/libavcodec/truemotion1.c	Wed Nov  3 17:57:05 2010	(r25661)
@@ -312,11 +312,6 @@ static int truemotion1_decode_header(Tru
     uint8_t header_buffer[128];  /* logical maximum size of the header */
     const uint8_t *sel_vector_table;
 
-    /* There is 1 change bit per 4 pixels, so each change byte represents
-     * 32 pixels; divide width by 4 to obtain the number of change bits and
-     * then round up to the nearest byte. */
-    s->mb_change_bits_row_size = ((s->avctx->width >> 2) + 7) >> 3;
-
     header.header_size = ((s->buf[0] >> 5) | (s->buf[0] << 3)) & 0x7f;
     if (s->buf[0] < 0x10)
     {
@@ -415,6 +410,11 @@ static int truemotion1_decode_header(Tru
         av_fast_malloc(&s->vert_pred, &s->vert_pred_size, s->avctx->width * sizeof(unsigned int));
     }
 
+    /* There is 1 change bit per 4 pixels, so each change byte represents
+     * 32 pixels; divide width by 4 to obtain the number of change bits and
+     * then round up to the nearest byte. */
+    s->mb_change_bits_row_size = ((s->avctx->width >> 2) + 7) >> 3;
+
     if ((header.deltaset != s->last_deltaset) || (header.vectable != s->last_vectable))
     {
         if (compression_types[header.compression].algorithm == ALGO_RGB24H)



More information about the ffmpeg-cvslog mailing list