From 8875333707f43900c1a0fa54cca0789025dde70b Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Thu, 21 Jun 2012 21:11:23 +0000 Subject: utvideo: Fix interlaced prediction for RGB utvideo. Signed-off-by: Derek Buitenhuis --- libavcodec/utvideo.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'libavcodec/utvideo.c') diff --git a/libavcodec/utvideo.c b/libavcodec/utvideo.c index a3b0d7cf01..e5efa4a7ec 100644 --- a/libavcodec/utvideo.c +++ b/libavcodec/utvideo.c @@ -439,10 +439,17 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, plane_start[i], c->frame_pred == PRED_LEFT); if (ret) return ret; - if (c->frame_pred == PRED_MEDIAN) - restore_median(c->pic.data[0] + rgb_order[i], c->planes, - c->pic.linesize[0], avctx->width, avctx->height, - c->slices, 0); + 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); -- cgit v1.2.3