mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Silence a warning when compiling Escape 130 decoder.
Fixes: libavcodec/escape130.c:177:17: warning: ISO C90 forbids mixed declarations and code Reviewed-by: Paul B Mahol
This commit is contained in:
parent
31c55c572a
commit
8ac6469575
@ -171,9 +171,6 @@ static int escape130_decode_frame(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (get_bits1(&gb)) {
|
if (get_bits1(&gb)) {
|
||||||
unsigned sign_selector = get_bits(&gb, 6);
|
|
||||||
unsigned difference_selector = get_bits(&gb, 2);
|
|
||||||
y_base = 2 * get_bits(&gb, 5);
|
|
||||||
static const uint8_t offset_table[] = {2, 4, 10, 20};
|
static const uint8_t offset_table[] = {2, 4, 10, 20};
|
||||||
static const int8_t sign_table[64][4] =
|
static const int8_t sign_table[64][4] =
|
||||||
{ {0, 0, 0, 0},
|
{ {0, 0, 0, 0},
|
||||||
@ -233,6 +230,9 @@ static int escape130_decode_frame(AVCodecContext *avctx,
|
|||||||
{1, 1, -1, -1},
|
{1, 1, -1, -1},
|
||||||
{-1, 1, -1, -1},
|
{-1, 1, -1, -1},
|
||||||
{1, -1, -1, -1} };
|
{1, -1, -1, -1} };
|
||||||
|
unsigned sign_selector = get_bits(&gb, 6);
|
||||||
|
unsigned difference_selector = get_bits(&gb, 2);
|
||||||
|
y_base = 2 * get_bits(&gb, 5);
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
y[i] = av_clip((int)y_base + offset_table[difference_selector] *
|
y[i] = av_clip((int)y_base + offset_table[difference_selector] *
|
||||||
sign_table[sign_selector][i], 0, 63);
|
sign_table[sign_selector][i], 0, 63);
|
||||||
|
Loading…
Reference in New Issue
Block a user