aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/escape130.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-08 17:14:47 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-08 17:14:47 +0100
commit8ac6469575b8e02c634c48f9197c1fd550fa25b2 (patch)
tree79f7f448f110ed3342f3d96e6ac3de4e6ffe3134 /libavcodec/escape130.c
parent31c55c572aa50134c8687a407a7a6e4e591080c6 (diff)
downloadffmpeg-8ac6469575b8e02c634c48f9197c1fd550fa25b2.tar.gz
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
Diffstat (limited to 'libavcodec/escape130.c')
-rw-r--r--libavcodec/escape130.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/escape130.c b/libavcodec/escape130.c
index 322ec8f247..1198010881 100644
--- a/libavcodec/escape130.c
+++ b/libavcodec/escape130.c
@@ -171,9 +171,6 @@ static int escape130_decode_frame(AVCodecContext *avctx,
}
} else {
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 int8_t sign_table[64][4] =
{ {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} };
+ 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++) {
y[i] = av_clip((int)y_base + offset_table[difference_selector] *
sign_table[sign_selector][i], 0, 63);