From 3b3150ec9bfddd9bd57dcd378b43a8f363b0fc4f Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Mon, 18 Jun 2012 09:01:35 +0200 Subject: [PATCH] Fix interlaced prediction for RGB utvideo. Fixes ticket #1215 --- libavcodec/utvideo.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/utvideo.c b/libavcodec/utvideo.c index d8699c6b7a..ead192be60 100644 --- a/libavcodec/utvideo.c +++ b/libavcodec/utvideo.c @@ -438,9 +438,15 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, if (ret) return ret; if (c->frame_pred == PRED_MEDIAN) + if (!c->interlaced) { restore_median(c->pic.data[0] + rgb_order[i], c->planes, c->pic.linesize[0], avctx->width, avctx->height, c->slices, 0); + } else { + restore_median_il(c->pic.data[0] + rgb_order[i], c->planes, + c->pic.linesize[0], avctx->width, avctx->height, + c->slices, 0); + } } restore_rgb_planes(c->pic.data[0], c->planes, c->pic.linesize[0], avctx->width, avctx->height);