Up until now, it only returned the number of bits for the start offset, but not the start offset; the GetBitContext passed to it was unused.
Unified · Split
| @@ -38,7 +38,6 @@ · 37 unmodified lines | ||
| 38 | 38 | static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceInfo *si) |
| 39 | 39 | { |
| 40 | 40 | AVCodecContext *avctx = r->s.avctx; |
| 41 | − int mb_bits; | |
| 42 | 41 | int w = r->s.width, h = r->s.height; |
| 43 | 42 | int mb_size; |
| 44 | 43 | int rpr; |
| @@ -76,8 +75,7 @@ static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn · 31 unmodified lines | ||
| 76 | 75 | si->width = w; |
| 77 | 76 | si->height = h; |
| 78 | 77 | mb_size = ((w + 15) >> 4) * ((h + 15) >> 4); |
| 79 | − mb_bits = ff_rv34_get_start_offset(gb, mb_size); | |
| 80 | − si->start = get_bits(gb, mb_bits); | |
| 78 | + si->start = ff_rv34_get_start_offset(gb, mb_size); | |
| 81 | 79 | skip_bits1(gb); |
| 82 | 80 | return 0; |
| 83 | 81 | } |
| @@ -342,7 +342,7 @@ int ff_rv34_get_start_offset(GetBitContext *gb, int mb_size) · 341 unmodified lines | ||
| 342 | 342 | for(i = 0; i < 5; i++) |
| 343 | 343 | if(rv34_mb_max_sizes[i] >= mb_size - 1) |
| 344 | 344 | break; |
| 345 | − return rv34_mb_bits_sizes[i]; | |
| 345 | + return get_bits(gb, rv34_mb_bits_sizes[i]); | |
| 346 | 346 | } |
| 347 | 347 | |
| 348 | 348 | /** |
| @@ -131,7 +131,6 @@ static void rv40_parse_picture_size(GetBitContext *gb, int *w, int *h) · 130 unmodified lines | ||
| 131 | 131 | |
| 132 | 132 | static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceInfo *si) |
| 133 | 133 | { |
| 134 | − int mb_bits; | |
| 135 | 134 | int w = r->s.width, h = r->s.height; |
| 136 | 135 | int mb_size; |
| 137 | 136 | int ret; |
| @@ -154,8 +153,7 @@ static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn · 16 unmodified lines | ||
| 154 | 153 | si->width = w; |
| 155 | 154 | si->height = h; |
| 156 | 155 | mb_size = ((w + 15) >> 4) * ((h + 15) >> 4); |
| 157 | − mb_bits = ff_rv34_get_start_offset(gb, mb_size); | |
| 158 | − si->start = get_bits(gb, mb_bits); | |
| 156 | + si->start = ff_rv34_get_start_offset(gb, mb_size); | |
| 159 | 157 | |
| 160 | 158 | return 0; |
| 161 | 159 | } |