From patchwork Mon Jan 14 08:05:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Borsboom X-Patchwork-Id: 11736 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 5AF1844D5A0 for ; Mon, 14 Jan 2019 10:05:30 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 71FF968A70E; Mon, 14 Jan 2019 10:05:18 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from kyoto.xs4all.nl (kyoto.xs4all.nl [83.161.153.34]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E65BD680373 for ; Mon, 14 Jan 2019 10:05:12 +0200 (EET) Received: from [10.1.51.188] ([87.215.30.74]) (authenticated bits=0) by kyoto.xs4all.nl (8.14.7/8.14.7) with ESMTP id x0E85OP3005916 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Mon, 14 Jan 2019 09:05:25 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=carpalis.nl; s=default; t=1547453125; bh=8g57oE0LUjsjBPhOnoKanjsuQiGVO9WivLikEhnc4So=; h=To:From:Subject:Date; b=olQqlCFzFP65qT3Xee3xjKmTaF9iFcJ51fhINWZtAKNJIayRllYNN0U20dob4wi24 VY2Uj73EGuTrBraLwDUkwd/PtEhxb4ldY/YaaZrqExkb+aQLMGT9Ub6G3njQ4i+CWD 6PMvJRXA9LnqdkzTKPm1XvPYIkEumtuVCw3KOLWz9GaXMVNy8K8cst7pZ3A8bXKNu8 YfgyM/MiSuRo44jz2YKLM3Enb4pSLsUrs2/stFs/iRaxOa27xYPop0AIb8lTKlMR6P xJoZlt3rkNOA6IqXF1zxZegsvwrXtLdzWClADjPTyPDoWiCR/O9YnsnnXIg/NI8zWB iJqFxFvJE8AIg== To: FFmpeg development discussions and patches From: Jerome Borsboom Message-ID: <57d4f6b9-0468-0814-0e99-b0727939bac3@carpalis.nl> Date: Mon, 14 Jan 2019 09:05:24 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 Content-Language: nl Subject: [FFmpeg-devel] [PATCH] avcodec/vc1: fix B predictor validity for 4-MV MBs X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The B predictor for 4-MV MBs in interlace field pictures is not used for blocks 0 and 2 when the picture is 1 MB wide. Signed-off-by: Jerome Borsboom --- My 'shuffle calculation of MV predictor candidates' patch overlooked the corner case of 1 MB wide field interlace pictures. According to VC-1 spec and the reference decoder, the B predictor is not used for for block 0 and block 2 when the picture is 1 MB wide. This patch corrects this. libavcodec/vc1_pred.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/vc1_pred.c b/libavcodec/vc1_pred.c index e1758a3817..77dda86cd0 100644 --- a/libavcodec/vc1_pred.c +++ b/libavcodec/vc1_pred.c @@ -289,6 +289,8 @@ void ff_vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y, case 3: off = -1; } + if (v->field_mode && s->mb_width == 1) + b_valid = b_valid && c_valid; } if (v->field_mode) {