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 37FB6463C8 for ; Wed, 13 Mar 2024 16:36:52 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3495F68CE20; Wed, 13 Mar 2024 18:36:50 +0200 (EET) Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 78C5E68C0CC for ; Wed, 13 Mar 2024 18:36:43 +0200 (EET) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w4.tutanota.de (Postfix) with ESMTP id B801B106014E for ; Wed, 13 Mar 2024 16:36:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1710347802; 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=fO1TLaJqHqhIWdSC1ACyJKq2vrC/w9GGbl7V383cYqM=; b=mktcd0dmzURPSnmQ7np+UTXJNOxelnwskEPHj7d21Sqy/cGG5M8qN4WTBSJh6sOs fzFfZTTMoGljyg3IqkHce8bcMrJlNaR0FiOyPYMZMhWi+jtJZUcWVlSfBffgpLRbsCj ZeKyvuebtUB1k1YZHsxaCdUGeTCA9niE84BZ1dWGJz12vSvHEYD1fSGxIWuez8uc13q P9bx8oY6fUR9ScLiK+Z5XXAO0EcW1WS+DwNMn2e1UEKLeMhtAwRqJLbB5p63cdNaUMF zzAZaUL0Qpkgtei8786efSfsOsNCbh3ZWzFYzpHbMo9kzn6sO9+OOUZ/gdLN5NHz38b VDLCkBd/Yw== Date: Wed, 13 Mar 2024 17:36:42 +0100 (CET) From: Lynne To: Ffmpeg Devel Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_90617_862223340.1710347802404" 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_90617_862223340.1710347802404 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Unchanged from v2 ------=_Part_90617_862223340.1710347802404 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 426701f4fb00123f2fc46efda188ca7d2413b187 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_90617_862223340.1710347802404 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_90617_862223340.1710347802404--