From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id C6D1C481C4 for ; Sat, 10 Feb 2024 22:38:27 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1D21368D089; Sun, 11 Feb 2024 00:38:24 +0200 (EET) Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E64C468A9A7 for ; Sun, 11 Feb 2024 00:38:16 +0200 (EET) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w4.tutanota.de (Postfix) with ESMTP id 55EF91060166 for ; Sat, 10 Feb 2024 22:38:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1707604696; s=s1; d=lynne.ee; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=dzjUXGrebfngei47lQkVBlOhChE56jKJQ9OLjxG3sQA=; b=UnpSNryFTukHnXj/fjmoopUKV5dBafH0qCQUtY6cMdBhp1ni22EfHS6yQHFODwbT wgFefr5EAbmLFmwIVxLSguZY/2U6tpa5qLAg7khoFWPUNOzff1sS6yE2AVbr6Wo77Jf SF5CrXFmU2IKyuAUG70t11tog7wzKyxRjsZgTtBB3A8NtangfC6Bmrv9LiN3U8ReS4V +Q09vub7e30lhGDpQQ7BwG7DsudqeqMxG8e7xtKfYy63Q6rsGTiwEi1AXWdMdJiqjs8 EugVsJboCvOV7T6/bwKxhtGZ5cFW/30zbf+9s+MvXOFbzmwWw0sp3ETENJKbZ2RPvwT 9x8sW/KwhQ== Date: Sat, 10 Feb 2024 23:38:16 +0100 (CET) From: Lynne To: Ffmpeg Devel Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_83014_438469830.1707604696211" Subject: [FFmpeg-devel] [PATCH v3 1/2] lavc/cbs_av1: fill in ref_frame_sign_bias and order_hints 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" Archived-At: List-Archive: List-Post: ------=_Part_83014_438469830.1707604696211 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Needed for Vulkan AV1. ------=_Part_83014_438469830.1707604696211 Content-Type: text/x-diff; charset=us-ascii; name=v3-0001-lavc-cbs_av1-fill-in-ref_frame_sign_bias-and-orde.patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=v3-0001-lavc-cbs_av1-fill-in-ref_frame_sign_bias-and-orde.patch >From 841ede35a2fdb76ef31a5018a98a16384837d50a Mon Sep 17 00:00:00 2001 From: Lynne Date: Fri, 2 Feb 2024 03:54:06 +0100 Subject: [PATCH v3 1/2] lavc/cbs_av1: fill in ref_frame_sign_bias and order_hints Needed for Vulkan AV1. --- libavcodec/cbs_av1.h | 2 ++ libavcodec/cbs_av1_syntax_template.c | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/libavcodec/cbs_av1.h b/libavcodec/cbs_av1.h index a5402f069d..0ed49e03ca 100644 --- a/libavcodec/cbs_av1.h +++ b/libavcodec/cbs_av1.h @@ -465,6 +465,8 @@ typedef struct CodedBitstreamAV1Context { int tile_num; AV1ReferenceFrameState ref[AV1_NUM_REF_FRAMES]; + uint8_t ref_frame_sign_bias[AV1_TOTAL_REFS_PER_FRAME]; + uint8_t order_hints[AV1_TOTAL_REFS_PER_FRAME]; // AVOptions int operating_point; diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c index 3be1f2d30f..20eed7ff9e 100644 --- a/libavcodec/cbs_av1_syntax_template.c +++ b/libavcodec/cbs_av1_syntax_template.c @@ -1572,6 +1572,17 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw, } if (!frame_is_intra) { + for (i = 0; i < AV1_REFS_PER_FRAME; i++) { + uint8_t ref_frame = AV1_REF_FRAME_LAST + i; + if (seq->enable_order_hint) { + uint8_t hint = current->ref_order_hint[current->ref_frame_idx[i]]; + uint8_t sign_bias = cbs_av1_get_relative_dist(seq, hint, priv->order_hint) > 0; + priv->order_hints[ref_frame] = hint; + priv->ref_frame_sign_bias[ref_frame] = sign_bias; + } else { + priv->ref_frame_sign_bias[ref_frame] = 0; + } + } // Derive reference frame sign biases. } -- 2.43.0.381.gb435a96ce8 ------=_Part_83014_438469830.1707604696211 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ------=_Part_83014_438469830.1707604696211--