From patchwork Fri Feb 3 02:09:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Fei W" X-Patchwork-Id: 40224 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:5494:b0:bf:7b3a:fd32 with SMTP id i20csp836213pzk; Thu, 2 Feb 2023 18:11:50 -0800 (PST) X-Google-Smtp-Source: AK7set8vVUYfCdeQ0M8wkVidEFQ2kmjrMsZEiHTKdOw0UVOae0NQGMJ1J9yBMI142A4Uj+cm34xD X-Received: by 2002:a17:906:1711:b0:87b:cdab:988e with SMTP id c17-20020a170906171100b0087bcdab988emr7014077eje.21.1675390310593; Thu, 02 Feb 2023 18:11:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675390310; cv=none; d=google.com; s=arc-20160816; b=HypaV6NGeNafveMXrbaL+Ikce1h0Q23oXGzQJ/bujqJ3hNwq99MsyxBrFxZ5VaHnEC H8pz4+Bcsvh400M460/b9SIlPef5HKTfxILTC3J//stCKKzaI2AwRjX13qBHNThGllDn ScT8eg47+Oc60VsB4YV7J3uYRxsCjubO0nG+Oh/bJhQKWvCGYQu8bbGF86FtWx0/aunO 1G7dg7Koc/mvYIPbMp6xUMiIlUTIldJ7D+2H2iQDBb6Ur0swJp8mtq1PqYqdnRV52ZEj E1NsZKYr82zK24u9LbVMH3wGcR6noNWyjfAaOmHXHEyRB/M2qBdBZ3CNoVWdCZg0xYKC CyaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=MKiGz9TVO3lfxYTh7MDiRbmSW1UVn8oJ4NeyEgyfsHc=; b=dX6TcZiIQgpym1bDldY9aX+61tBs9ZTgu4hdIqQPquwXXzh/KAPSft1O2LK1npxXEn gO7PUi3lRr8VQHgOpZt9wi+4sZfigCgMnLf6H+ksN2ZnebCRcEEfcD+cdcmRIS7jRkJ/ FXw9CBFsoTKRF0RLWM7DW8Bq7m/d1BMsfyGgi+/98yURGcQMhSdCO4d2vjp3+OXax3lv cYdSFbIY0AxOn5knQPCPEPusxiWdNUmM4WlD8sl214IJRZPnEnYjfxOJ3oXKZL5xiJ/H BHqL3+bzOTxJ7LFU+SnXn7offEU/IHriDr8tB/d9wYniz4cq+wBr6875wec5uzU/aerS tB8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=ManuoVF6; 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 ft21-20020a170907801500b0087bdb655fd9si1322990ejc.114.2023.02.02.18.11.50; Thu, 02 Feb 2023 18:11:50 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=ManuoVF6; 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 1775B68BE76; Fri, 3 Feb 2023 04:10:46 +0200 (EET) 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 4CAEB68BE6B for ; Fri, 3 Feb 2023 04:10:42 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675390242; x=1706926242; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=wzEJ2FclN5vofO5vdDPQ8kEtO3HApE3Mfv6vZLDqg3k=; b=ManuoVF6MroD68G6rQjPkxtNEXUSZHaXyF8WJsbnm8D1kzf2LYR3hkLp GO2FNaWKVuSgeygLvsf7zIOzoFzzyJ/RNVOLdiqavx5KALSntyY0Q1XRi 3Tx9VDP66zIv6MAE+0K0dyrbj2/ws2XwdVSRhQZqIRUSC2zn9QT5AZHCc 19ofhtiDXH4I4zqxjaC1r35UGua0I71SgmG996DvWmY3VgD0/NvRpFzHi kTSGuEztki3yR3XCUgU6CuzPv2e30tDsEbH+tu6uMppZdfkxl5wlfE5ll 4NvWaX/Yw3sbEAot2KLaHMy5J9M/PvURxzJ+vsrk5ozBQD1+W6RuMtnCx w==; X-IronPort-AV: E=McAfee;i="6500,9779,10609"; a="328651761" X-IronPort-AV: E=Sophos;i="5.97,269,1669104000"; d="scan'208";a="328651761" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2023 18:10:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10609"; a="667505888" X-IronPort-AV: E=Sophos;i="5.97,269,1669104000"; d="scan'208";a="667505888" Received: from t.sh.intel.com ([10.239.159.159]) by fmsmga007.fm.intel.com with ESMTP; 02 Feb 2023 18:10:31 -0800 From: Fei Wang To: ffmpeg-devel@ffmpeg.org Date: Fri, 3 Feb 2023 10:09:24 +0800 Message-Id: <20230203020924.443162-10-fei.w.wang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230203020924.443162-1-fei.w.wang@intel.com> References: <20230203020924.443162-1-fei.w.wang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v4 10/10] lavc/vaapi_hevc: Loose the restricts for SCC decoding X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: VobsK6K6C2zx From: Linjie Fu Allow current picture as the reference picture. Signed-off-by: Linjie Fu Signed-off-by: Fei Wang --- libavcodec/vaapi_hevc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c index 29c75e88f0..42e1b62fc3 100644 --- a/libavcodec/vaapi_hevc.c +++ b/libavcodec/vaapi_hevc.c @@ -104,7 +104,8 @@ static void fill_vaapi_reference_frames(const HEVCContext *h, VAPictureParameter const HEVCFrame *frame = NULL; while (!frame && j < FF_ARRAY_ELEMS(h->DPB)) { - if (&h->DPB[j] != current_picture && (h->DPB[j].flags & (HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF))) + if ((&h->DPB[j] != current_picture || h->ps.pps->pps_curr_pic_ref_enabled_flag) && + (h->DPB[j].flags & (HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF))) frame = &h->DPB[j]; j++; } @@ -222,7 +223,8 @@ static int vaapi_hevc_start_frame(AVCodecContext *avctx, } #if VA_CHECK_VERSION(1, 2, 0) - if (avctx->profile == FF_PROFILE_HEVC_REXT) { + if (avctx->profile == FF_PROFILE_HEVC_REXT || + avctx->profile == FF_PROFILE_HEVC_SCC) { pic->pic_param.rext = (VAPictureParameterBufferHEVCRext) { .range_extension_pic_fields.bits = { .transform_skip_rotation_enabled_flag = sps->transform_skip_rotation_enabled_flag,