diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2014-10-18 15:28:03 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2014-11-22 14:06:48 +0100 |
commit | c2c27e9e51c9d0a7e676ef8b643b0552409dc28d (patch) | |
tree | 3b7bf077b42117b67cde4021a1ad8b2b65577a42 /libavcodec/indeo2.c | |
parent | 79be253635fc194b635fc18fe613d0b3dbaba613 (diff) | |
download | ffmpeg-c2c27e9e51c9d0a7e676ef8b643b0552409dc28d.tar.gz |
indeo2: move variable declarations into blocks using them.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/indeo2.c')
-rw-r--r-- | libavcodec/indeo2.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c index cccac44bf3..39735c2e4b 100644 --- a/libavcodec/indeo2.c +++ b/libavcodec/indeo2.c @@ -54,15 +54,13 @@ static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst int i; int j; int out = 0; - int c; - int t; if (width & 1) return AVERROR_INVALIDDATA; /* first line contain absolute values, other lines contain deltas */ while (out < width) { - c = ir2_get_code(&ctx->gb); + int c = ir2_get_code(&ctx->gb); if (c >= 0x80) { /* we have a run */ c -= 0x7F; if (out + c*2 > width) @@ -79,7 +77,7 @@ static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst for (j = 1; j < height; j++) { out = 0; while (out < width) { - c = ir2_get_code(&ctx->gb); + int c = ir2_get_code(&ctx->gb); if (c >= 0x80) { /* we have a skip */ c -= 0x7F; if (out + c*2 > width) @@ -89,7 +87,7 @@ static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst out++; } } else { /* add two deltas from table */ - t = dst[out - pitch] + (table[c * 2] - 128); + int t = dst[out - pitch] + (table[c * 2] - 128); t = av_clip_uint8(t); dst[out] = t; out++; |