X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavcodec%2Findeo2.c;h=39735c2e4b5a1d1b71a16fe5eea15a09c64b6c5f;hp=cccac44bf3e3589ea2707d66b63794b0b7447778;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavcodec/indeo2.c b/ffmpeg/libavcodec/indeo2.c index cccac44..39735c2 100644 --- a/ffmpeg/libavcodec/indeo2.c +++ b/ffmpeg/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++;