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 2E9E949461 for ; Sun, 11 Feb 2024 15:14:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 85CE668CCC9; Sun, 11 Feb 2024 17:14:41 +0200 (EET) Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C2A9568CA65 for ; Sun, 11 Feb 2024 17:14:35 +0200 (EET) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w4.tutanota.de (Postfix) with ESMTP id 64BC61060271 for ; Sun, 11 Feb 2024 15:14:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1707664475; 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=L3ckVo/Fu0243LfsHhEFfhhIQSQJEa+4zlMPwvIvkJw=; b=P2oE56flU1NzBLhFoDxx0cSr2zX/MX+jKvzqS/m5RiYGNMSLTDSJpsyQW6ka/sxp rhXMs2QjlHjndT8sAh4L4n3nQvWibGd+GY+UCBKTpGPBW2V4aGlXMygny+J6nrsPOw0 7T1amPWLw98pYm3lTz4ySSJLiuvfoO1mgpc173j6Yg8dPESBzd4kPp7L1DNoDvAdSQY MyTOMgs++xhJHvT6Z6pNyjLGM1u/4xX2d3Dxx7O/+hervqait9gZ1ZOZp4RS1rzlc/4 WNEG79Nz4EDvE4lKAkUqd0LmIkhKChRVc0avP35/KTXMV0ZPGJFjXFE1H6mBlt8F48I GGjZveW3rg== Date: Sun, 11 Feb 2024 16:14:35 +0100 (CET) From: Lynne To: Ffmpeg Devel Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_107961_1379080943.1707664475393" Subject: [FFmpeg-devel] [PATCH v4 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_107961_1379080943.1707664475393 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Needed for Vulkan AV1. ------=_Part_107961_1379080943.1707664475393 Content-Type: text/x-diff; charset=us-ascii; name=v4-0001-lavc-cbs_av1-fill-in-ref_frame_sign_bias-and-orde.patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=v4-0001-lavc-cbs_av1-fill-in-ref_frame_sign_bias-and-orde.patch >From 67beae754b839398287499d51134cc40d7cf8ad4 Mon Sep 17 00:00:00 2001 From: Lynne Date: Fri, 2 Feb 2024 03:54:06 +0100 Subject: [PATCH v4 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_107961_1379080943.1707664475393 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_107961_1379080943.1707664475393--