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

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
3838 static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceInfo *si)
3939 {
4040 AVCodecContext *avctx = r->s.avctx;
41− int mb_bits;
4241 int w = r->s.width, h = r->s.height;
4342 int mb_size;
4443 int rpr;
@@ -76,8 +75,7 @@ static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn · 31 unmodified lines
7675 si->width = w;
7776 si->height = h;
7877 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);
8179 skip_bits1(gb);
8280 return 0;
8381 }
libavcodec/rv34.c+1−1
@@ -342,7 +342,7 @@ int ff_rv34_get_start_offset(GetBitContext *gb, int mb_size) · 341 unmodified lines
342342 for(i = 0; i < 5; i++)
343343 if(rv34_mb_max_sizes[i] >= mb_size - 1)
344344 break;
345− return rv34_mb_bits_sizes[i];
345+ return get_bits(gb, rv34_mb_bits_sizes[i]);
346346 }
347347
348348 /**
libavcodec/rv40.c+1−3
@@ -131,7 +131,6 @@ static void rv40_parse_picture_size(GetBitContext *gb, int *w, int *h) · 130 unmodified lines
131131
132132 static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceInfo *si)
133133 {
134− int mb_bits;
135134 int w = r->s.width, h = r->s.height;
136135 int mb_size;
137136 int ret;
@@ -154,8 +153,7 @@ static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn · 16 unmodified lines
154153 si->width = w;
155154 si->height = h;
156155 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);
159157
160158 return 0;
161159 }

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