Mercurial > libavcodec.hg
changeset 8445:8621deaff8dc libavcodec
352l: correct calculating number of bits for storing macroblock offset in RV3/4
author | kostya |
---|---|
date | Tue, 23 Dec 2008 18:27:06 +0000 |
parents | 4fdaffd1ae1c |
children | 489c8d652fff |
files | rv34.c rv34data.h |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rv34.c Tue Dec 23 17:50:36 2008 +0000 +++ b/rv34.c Tue Dec 23 18:27:06 2008 +0000 @@ -367,7 +367,7 @@ { 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]; }
--- a/rv34data.h Tue Dec 23 17:50:36 2008 +0000 +++ b/rv34data.h Tue Dec 23 18:27:06 2008 +0000 @@ -138,7 +138,7 @@ * 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.