From patchwork Mon Oct 23 07:43:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhong Li X-Patchwork-Id: 5656 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.90 with SMTP id m26csp6455687jah; Mon, 23 Oct 2017 00:46:57 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RQrxGgWqsJ98aBw9gp+HHAmarvsabHhZdr44GZ3asvF67a93OWBJXdaNFrMq4PUxAFbKy6 X-Received: by 10.28.190.12 with SMTP id o12mr824863wmf.4.1508744817453; Mon, 23 Oct 2017 00:46:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508744817; cv=none; d=google.com; s=arc-20160816; b=cLAMUNDycCKPI150OtUTRlEoLdMsvr/U2aIuBgRuxVGocuFFanA7ef14DWkpermVcK myFVBmMH+XHWC2znsh9syKVHKv05Wa9HMCWcN7HXfse/Q7sEIqKMrvG185Fnq/L4P7jp S4HJ6hv6zWLFkqg1y6lJyUwQqILgSaVM13DHVdGJEbMLfQyAd8jkbysCvhCM6ZW3zgOl lkJF4GQlCkLCv1nJoXKdn8rVKv+18LeqLW9547Q/JAjhzeAR5D55VMg/yaDyhmQ0kLGl b/DBFnwMwHkwT6cgKBWktIsNMMZbWe0S+8kEFy3FxWrgE6OogoXOJhds0ux/LkXL0d6P 2i0g== 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=YX5NlkscCYllBjsbNijsABaIXz9dTbN7IoXWHaBhKPQ=; b=MutDnuoPpab08dBc6VHvsEJWsDhI4dEPVL1S+PK6fefr4T/9YEC+FFjYSQkfo5G4AY gZHzLpAGIjyk7D7K5CjPRYCTg+tWqJmccMjHxu0aFOiTmYhQJle7zcol25M0KnRiv8lR z4SNExPudqzYSO1JlHR5oP5psljxNnm5ob8fLFY4/gEg3SfsVFI4KKl4ziGh7iX6FGrP 7f433IXhTB0b/pcEIiBfTPRRujTrBCi9oJcRSmbE9Tc8YdApjUum/0uSYNwDTY/a9+kX 7Y0nYJciQjyRSn74klmIWL+poXBbc/RT+9euZ0r7ou92e9j1Pv5Tb+RxamAiTJI5AihK IulQ== 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 l48si5145046wrl.149.2017.10.23.00.46.57; Mon, 23 Oct 2017 00:46:57 -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 55E9C689DD9; Mon, 23 Oct 2017 10:46:46 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0D7B2689DA1 for ; Mon, 23 Oct 2017 10:46:38 +0300 (EEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2017 00:46:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.43,421,1503385200"; d="scan'208"; a="1208859068" Received: from bluekbl.sh.intel.com (HELO bluekbl.\040none\041) ([10.239.159.160]) by fmsmga001.fm.intel.com with ESMTP; 23 Oct 2017 00:46:15 -0700 From: Zhong Li To: ffmpeg-devel@ffmpeg.org Date: Mon, 23 Oct 2017 15:43:30 +0800 Message-Id: <20171023074331.1603-1-zhong.li@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [FFmpeg-devel] [PATCH V4 1/2] mpeg2_hwaccel: always submit the first field to HW. 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Though this patch to fix ticket #6668, I belive it is unnecessary to set SLICE_FLAG_ALLOW_FIELD flag to other hwaccels(dxva, vdpau, etc). Please also refer the orginal comment of 9cb150c9ab520eba5636bbcf925db6a70e67f3e5 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");