From patchwork Thu Oct 12 08:20:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhong Li X-Patchwork-Id: 5538 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.90 with SMTP id m26csp1613412jah; Thu, 12 Oct 2017 01:23:54 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAL72zQZBsoV/Z28R3AY/J3g/RfDxxoGGj6bGrohumXZ+f53rCG6UP/7lDY7l81iytXEWjR X-Received: by 10.223.171.5 with SMTP id q5mr1518423wrc.48.1507796634366; Thu, 12 Oct 2017 01:23:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507796634; cv=none; d=google.com; s=arc-20160816; b=FZjGC8ticqFSdlPT1zF1ZNG/zR6Leky/+A3H/L6ciWunUEKQELmipU/HWpWoi6l1Fv I4z+Ula2PV+4RIfTXxiJMW1wpAMmorszH3c9RSph+gpvx5gganiIZNQ664tZBP8EvnhE LKgCUG3wNR1g4KGx9mElOaP+LH6qQKrDGBkPMwM6mG1esO7eeBgddfMT9HSLZ1mJ83sS 9OjVgRdZaVrzPkMjBdJMwXPHhYjza/J64+6T5BX0SMZdR7ZqGF32QPqkLKlvP7lDam9U qhdMyslLmdHqXQ7UTud09j4hqNRbE8Q0lSCl1dI2ZEITNM+vdzd9mDttYdhSJdFqwez2 75KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to :arc-authentication-results; bh=UepuWDSld2aEnc5ZvRA1PF7uwqK5Xi1roXR6TUKnFWk=; b=BZxDtlpel8f8prLhw2K2koeQQTpRIvQJ3DexNS/EXl9U11C3s7ct0NBhLh2G8WIWdw yLPJ2IH0Jfbsz0vw8dn4pbwvfv7iF3sGo6vhey66TVHlalPhWyFfWL/DU4eZQ27xFqMs CEUs7l2eJBqVx6tqjBqphgQG7hlQbkIGOPo7ZJ3RpsN8GFYShlRyHDbybowUs5OT7tzj eJcRjtFG6kjmLqWEU2BWsTT0mtS5EB9SuYhbPxpXU7y4thE4Rp3+5vLEi+h+IzFF/FAJ Uq7SqUDV30Am43bqY/Y7SKdS8cWUYnIJmwPdqIQvcKXPLkfehnECRXmC4HDxNGVxEDHn QZyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id d100si12047944wma.103.2017.10.12.01.23.30; Thu, 12 Oct 2017 01:23:54 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6001E689ED3; Thu, 12 Oct 2017 11:23:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 66CA1689D06 for ; Thu, 12 Oct 2017 11:23:15 +0300 (EEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Oct 2017 01:23:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,365,1503385200"; d="scan'208";a="322376864" Received: from bluekbl.sh.intel.com (HELO bluekbl.\040none\041) ([10.239.159.160]) by fmsmga004.fm.intel.com with ESMTP; 12 Oct 2017 01:23:14 -0700 From: Zhong Li To: ffmpeg-devel@ffmpeg.org Date: Thu, 12 Oct 2017 16:20:44 +0800 Message-Id: <20171012082045.21146-1-zhong.li@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [FFmpeg-devel] [PATCH V3 1/2] mpeg2_hwaccel: always submit twice for a frame with two fileds. 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: Zhong Li , sw@jkqxz.net, jun.zhao@intel.com, nfxjfg@googlemail.com MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Though this patch to fix https://trac.ffmpeg.org/ticket/6668, I belive it is unnecessary to set SLICE_FLAG_ALLOW_FIELD flag to other hwaccels(dxva, vdpau, etc). Signed-off-by: Zhong Li --- libavcodec/mpeg12dec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 4e68be27f1..5dc4612c77 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -1689,8 +1689,7 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) return AVERROR_INVALIDDATA; } - if (s->avctx->hwaccel && - (s->avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD)) { + if (s->avctx->hwaccel) { if ((ret = s->avctx->hwaccel->end_frame(s->avctx)) < 0) { av_log(avctx, AV_LOG_ERROR, "hardware accelerator failed to decode first field\n");