From patchwork Fri Feb 15 19:50:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Fu, Linjie" X-Patchwork-Id: 12082 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 EA573448A7D for ; Fri, 15 Feb 2019 13:50:29 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C762768A3ED; Fri, 15 Feb 2019 13:50:29 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 392AA68A3C3 for ; Fri, 15 Feb 2019 13:50:22 +0200 (EET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Feb 2019 03:50:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,372,1544515200"; d="scan'208";a="126732826" Received: from media_lj_kbl.sh.intel.com ([10.239.158.150]) by orsmga003.jf.intel.com with ESMTP; 15 Feb 2019 03:50:19 -0800 From: Linjie Fu To: ffmpeg-devel@ffmpeg.org Date: Sat, 16 Feb 2019 03:50:18 +0800 Message-Id: <20190215195018.7811-1-linjie.fu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH, RFC] lavf/deinterlace_qsv: set TFF or BFF together with progressive 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 Cc: Linjie Fu MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Currently, BFF or TFF will not be set if the frame is progressive. This will break the Input PicStruct check in MSDK because of absence of the specific PicStruct check for: MFX_PICSTRUCT_PROGRESSIVE | MFX_PICSTRUCT_FIELD_REPEATED Set PicStruct to MFX_PICSTRUCT_FIELD_TFF or MFX_PICSTRUCT_FIELD_BFF to match the CheckInputPicStruct in MSDK. Fix #7701. Signed-off-by: Linjie Fu --- Is it acceptable to add the TFF or BFF to PicStruct according to the attribute of the input frames, even if it's not interlaced? Or it should be fixed in MSDK level to support more PicStruct? libavfilter/vf_deinterlace_qsv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_deinterlace_qsv.c b/libavfilter/vf_deinterlace_qsv.c index d6b02e98c5..f03d65f029 100644 --- a/libavfilter/vf_deinterlace_qsv.c +++ b/libavfilter/vf_deinterlace_qsv.c @@ -417,8 +417,9 @@ static int submit_frame(AVFilterContext *ctx, AVFrame *frame, qf->surface.Info.CropH = qf->frame->height; qf->surface.Info.PicStruct = !qf->frame->interlaced_frame ? MFX_PICSTRUCT_PROGRESSIVE : - (qf->frame->top_field_first ? MFX_PICSTRUCT_FIELD_TFF : - MFX_PICSTRUCT_FIELD_BFF); + MFX_PICSTRUCT_UNKNOWN; + qf->surface.Info.PicStruct |= qf->frame->top_field_first ? MFX_PICSTRUCT_FIELD_TFF : + MFX_PICSTRUCT_FIELD_BFF; if (qf->frame->repeat_pict == 1) qf->surface.Info.PicStruct |= MFX_PICSTRUCT_FIELD_REPEATED; else if (qf->frame->repeat_pict == 2)