From patchwork Fri Jan 29 17:24:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Gaullier X-Patchwork-Id: 25261 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 4DB6944AD10 for ; Fri, 29 Jan 2021 19:24:15 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 334BE68A8BD; Fri, 29 Jan 2021 19:24:15 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from srv-infra-2.infra.inf.glb.tvvideoms.com (unknown [213.205.126.156]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3097B689C0A for ; Fri, 29 Jan 2021 19:24:07 +0200 (EET) Received: from cji.paris (unknown [172.16.3.159]) by srv-infra-2.infra.inf.glb.tvvideoms.com (Postfix) with ESMTP id 5C20C40019; Fri, 29 Jan 2021 17:24:06 +0000 (UTC) From: Nicolas Gaullier To: ffmpeg-devel@ffmpeg.org Date: Fri, 29 Jan 2021 18:24:01 +0100 Message-Id: <20210129172401.681-3-nicolas.gaullier@cji.paris> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20210129172401.681-1-nicolas.gaullier@cji.paris> References: <20210129172401.681-1-nicolas.gaullier@cji.paris> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/hevc: set field_order=progressive when SPS makes it straightforward 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: Nicolas Gaullier Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavcodec/hevcdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 92eb888033..2eaa683399 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -330,6 +330,8 @@ static void export_stream_params(HEVCContext *s, const HEVCSPS *sps) avctx->has_b_frames = sps->temporal_layer[sps->max_sub_layers - 1].num_reorder_pics; avctx->profile = sps->ptl.general_ptl.profile_idc; avctx->level = sps->ptl.general_ptl.level_idc; + if (sps->ptl.general_ptl.progressive_source_flag && !sps->ptl.general_ptl.interlaced_source_flag) + avctx->field_order = AV_FIELD_PROGRESSIVE; ff_set_sar(avctx, sps->vui.sar);