History

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.

Andreas Rheinhardt committed 1 year ago

Commit 3defca71 parent f9b8f303 files · +3 −7Browse files

Showing the changes to libavcodec (3 of 3 files). Show all

Unified · Split

3 files
  1. libavcodec/rv30.c +1 −3
  2. libavcodec/rv34.c +1 −1
  3. libavcodec/rv40.c +1 −3
libavcodec/rv30.c+1−3
@@ -38,7 +38,6 @@ · 37 unmodified lines
38static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceInfo *si)38static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceInfo *si)
39{39{
40 AVCodecContext *avctx = r->s.avctx;40 AVCodecContext *avctx = r->s.avctx;
41 int mb_bits;
42 int w = r->s.width, h = r->s.height;41 int w = r->s.width, h = r->s.height;
43 int mb_size;42 int mb_size;
44 int rpr;43 int rpr;
@@ -76,8 +75,7 @@ static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn · 31 unmodified lines
76 si->width = w;75 si->width = w;
77 si->height = h;76 si->height = h;
78 mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);77 mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);
79 mb_bits = ff_rv34_get_start_offset(gb, mb_size);78 si->start = ff_rv34_get_start_offset(gb, mb_size);
80 si->start = get_bits(gb, mb_bits);
81 skip_bits1(gb);79 skip_bits1(gb);
82 return 0;80 return 0;
83}81}
libavcodec/rv34.c+1−1
@@ -342,7 +342,7 @@ int ff_rv34_get_start_offset(GetBitContext *gb, int mb_size) · 341 unmodified lines
342 for(i = 0; i < 5; i++)342 for(i = 0; i < 5; i++)
343 if(rv34_mb_max_sizes[i] >= mb_size - 1)343 if(rv34_mb_max_sizes[i] >= mb_size - 1)
344 break;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/**
libavcodec/rv40.c+1−3
@@ -131,7 +131,6 @@ static void rv40_parse_picture_size(GetBitContext *gb, int *w, int *h) · 130 unmodified lines
131 131
132static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceInfo *si)132static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceInfo *si)
133{133{
134 int mb_bits;
135 int w = r->s.width, h = r->s.height;134 int w = r->s.width, h = r->s.height;
136 int mb_size;135 int mb_size;
137 int ret;136 int ret;
@@ -154,8 +153,7 @@ static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn · 16 unmodified lines
154 si->width = w;153 si->width = w;
155 si->height = h;154 si->height = h;
156 mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);155 mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);
157 mb_bits = ff_rv34_get_start_offset(gb, mb_size);156 si->start = ff_rv34_get_start_offset(gb, mb_size);
158 si->start = get_bits(gb, mb_bits);
159 157
160 return 0;158 return 0;
161}159}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t