You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/rv34: Make ff_rv34_get_start_offset() honor its name
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. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -38,7 +38,6 @@
|
||||
static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceInfo *si)
|
||||
{
|
||||
AVCodecContext *avctx = r->s.avctx;
|
||||
int mb_bits;
|
||||
int w = r->s.width, h = r->s.height;
|
||||
int mb_size;
|
||||
int rpr;
|
||||
@ -76,8 +75,7 @@ static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn
|
||||
si->width = w;
|
||||
si->height = h;
|
||||
mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);
|
||||
mb_bits = ff_rv34_get_start_offset(gb, mb_size);
|
||||
si->start = get_bits(gb, mb_bits);
|
||||
si->start = ff_rv34_get_start_offset(gb, mb_size);
|
||||
skip_bits1(gb);
|
||||
return 0;
|
||||
}
|
||||
|
@ -342,7 +342,7 @@ int ff_rv34_get_start_offset(GetBitContext *gb, int mb_size)
|
||||
for(i = 0; i < 5; i++)
|
||||
if(rv34_mb_max_sizes[i] >= mb_size - 1)
|
||||
break;
|
||||
return rv34_mb_bits_sizes[i];
|
||||
return get_bits(gb, rv34_mb_bits_sizes[i]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -131,7 +131,6 @@ static void rv40_parse_picture_size(GetBitContext *gb, int *w, int *h)
|
||||
|
||||
static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceInfo *si)
|
||||
{
|
||||
int mb_bits;
|
||||
int w = r->s.width, h = r->s.height;
|
||||
int mb_size;
|
||||
int ret;
|
||||
@ -154,8 +153,7 @@ static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn
|
||||
si->width = w;
|
||||
si->height = h;
|
||||
mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);
|
||||
mb_bits = ff_rv34_get_start_offset(gb, mb_size);
|
||||
si->start = get_bits(gb, mb_bits);
|
||||
si->start = ff_rv34_get_start_offset(gb, mb_size);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user