[PATCH 1/2] avcodec/mobiclip: Fix mixed declarations and code
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavcodec/mobiclip.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c index e2bda76978..d147eddbae 100644 --- a/libavcodec/mobiclip.c +++ b/libavcodec/mobiclip.c @@ -1333,13 +1333,15 @@ static int mobiclip_decode(AVCodecContext *avctx, void *data, setup_qtables(avctx, s->quantizer + get_se_golomb(gb)); for (int y = 0; y < avctx->height; y += 16) { for (int x = 0; x < avctx->width; x += 16) { + int idx; + motion[0].x = mid_pred(motion[x / 16 + 1].x, motion[x / 16 + 2].x, motion[x / 16 + 3].x); motion[0].y = mid_pred(motion[x / 16 + 1].y, motion[x / 16 + 2].y, motion[x / 16 + 3].y); motion[x / 16 + 2].x = 0; motion[x / 16 + 2].y = 0; - int idx = get_vlc2(gb, s->mv_vlc[s->moflex][0].table, - s->mv_vlc[s->moflex][0].bits, 1); + idx = get_vlc2(gb, s->mv_vlc[s->moflex][0].table, + s->mv_vlc[s->moflex][0].bits, 1); if (idx < 0) return AVERROR_INVALIDDATA; -- 2.20.1
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavcodec/photocd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/photocd.c b/libavcodec/photocd.c index 6f8426b5d2..057c9d33d4 100644 --- a/libavcodec/photocd.c +++ b/libavcodec/photocd.c @@ -227,9 +227,9 @@ static av_noinline int decode_huff(AVCodecContext *avctx, AVFrame *frame, PhotoCDContext *s = avctx->priv_data; GetBitContext g; GetByteContext *gb = &s->gb; - int ret, y = 0, type, height, y2; + int ret, y = 0, type, height; int start = s->streampos; - unsigned shiftreg, bit; + unsigned shiftreg; const int scaling = target_res - curr_res; const uint8_t type2idx[] = { 0, 0xff, 1, 2 }; @@ -239,13 +239,11 @@ static av_noinline int decode_huff(AVCodecContext *avctx, AVFrame *frame, return ret; height = img_info[curr_res].height; - y2 = avctx->height >> scaling; while (y < height) { uint8_t *data; int x2, idx; - bit = 0; for (; get_bits_left(&g) > 0;) { if ((show_bits(&g, 24) & 0xfff000) == 0xfff000) break; -- 2.20.1
On 9/4/20, Andreas Rheinhardt <andreas.rheinhardt@gmail.com> wrote:
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavcodec/photocd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
ok
diff --git a/libavcodec/photocd.c b/libavcodec/photocd.c index 6f8426b5d2..057c9d33d4 100644 --- a/libavcodec/photocd.c +++ b/libavcodec/photocd.c @@ -227,9 +227,9 @@ static av_noinline int decode_huff(AVCodecContext *avctx, AVFrame *frame, PhotoCDContext *s = avctx->priv_data; GetBitContext g; GetByteContext *gb = &s->gb; - int ret, y = 0, type, height, y2; + int ret, y = 0, type, height; int start = s->streampos; - unsigned shiftreg, bit; + unsigned shiftreg; const int scaling = target_res - curr_res; const uint8_t type2idx[] = { 0, 0xff, 1, 2 };
@@ -239,13 +239,11 @@ static av_noinline int decode_huff(AVCodecContext *avctx, AVFrame *frame, return ret;
height = img_info[curr_res].height; - y2 = avctx->height >> scaling;
while (y < height) { uint8_t *data; int x2, idx;
- bit = 0; for (; get_bits_left(&g) > 0;) { if ((show_bits(&g, 24) & 0xfff000) == 0xfff000) break; -- 2.20.1
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
On 9/4/20, Andreas Rheinhardt <andreas.rheinhardt@gmail.com> wrote:
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavcodec/mobiclip.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
ok
diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c index e2bda76978..d147eddbae 100644 --- a/libavcodec/mobiclip.c +++ b/libavcodec/mobiclip.c @@ -1333,13 +1333,15 @@ static int mobiclip_decode(AVCodecContext *avctx, void *data, setup_qtables(avctx, s->quantizer + get_se_golomb(gb)); for (int y = 0; y < avctx->height; y += 16) { for (int x = 0; x < avctx->width; x += 16) { + int idx; + motion[0].x = mid_pred(motion[x / 16 + 1].x, motion[x / 16 + 2].x, motion[x / 16 + 3].x); motion[0].y = mid_pred(motion[x / 16 + 1].y, motion[x / 16 + 2].y, motion[x / 16 + 3].y); motion[x / 16 + 2].x = 0; motion[x / 16 + 2].y = 0;
- int idx = get_vlc2(gb, s->mv_vlc[s->moflex][0].table, - s->mv_vlc[s->moflex][0].bits, 1); + idx = get_vlc2(gb, s->mv_vlc[s->moflex][0].table, + s->mv_vlc[s->moflex][0].bits, 1); if (idx < 0) return AVERROR_INVALIDDATA;
-- 2.20.1
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
participants (2)
-
Andreas Rheinhardt -
Paul B Mahol