diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-11-03 16:57:05 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-11-03 16:57:05 +0000 |
commit | f1c5301413f6125b590f17ec62915215e3817bdd (patch) | |
tree | 186b29f3743a42d4bcff6b92097adba4560c8922 /libavcodec | |
parent | 97113c2178769356399999ebe48b58bbf8340b45 (diff) | |
download | ffmpeg-f1c5301413f6125b590f17ec62915215e3817bdd.tar.gz |
100l, calculate mb_change_bits_row_size from the update width.
Originally committed as revision 25661 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/truemotion1.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c index 94a54f4439..b6b81f7ea1 100644 --- a/libavcodec/truemotion1.c +++ b/libavcodec/truemotion1.c @@ -312,11 +312,6 @@ static int truemotion1_decode_header(TrueMotion1Context *s) 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(TrueMotion1Context *s) 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) |