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 B606C492C3 for ; Wed, 7 Feb 2024 04:18:19 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A1B8D68D09E; Wed, 7 Feb 2024 06:18:16 +0200 (EET) Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CF5DB68C3F1 for ; Wed, 7 Feb 2024 06:18:09 +0200 (EET) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w4.tutanota.de (Postfix) with ESMTP id 17CA61060122 for ; Wed, 7 Feb 2024 04:18:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1707279488; 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=R7nZ3YW8CAREMSBQ1usaBn64Ds9qxJsXjAJ/+QNqA84=; b=UDlPkXfA7utLdZFPecU9CkK8JUUS3TbY4MINlFvn8Y2qIU5w+MBn9EXbmwbcCQ4t KVVDzxm4ig3DTKquM5jebT+7HDZ6XZP62q486SShmTelxqIw8SdsnOIGTqqYXTHDxkV 4pzQ0zWaur2y5f0fjuAr7669rMaj/0CiPPt8edidX5jyvvE4XJ4SWh9NelPuqagHHNt rLjpndr1F/WEhBQDyxC25UH51yJ+xsJUCRqbyv8wpmtHruRc++jvnF+Xvq4p70tkX07 1X2rWsF0KA/xOMWsf6OyZRZlHaiS+dN55BVvKPpj21ITdNUc+kP0cC8HZKraUJaW/tl p6ddSm4+jQ== Date: Wed, 7 Feb 2024 05:18:08 +0100 (CET) From: Lynne To: Ffmpeg Devel Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_47717_1911877748.1707279488979" Subject: [FFmpeg-devel] [PATCH v2 1/2] lavc/cbs_av1: fill in ref_frame_sign_bias 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_47717_1911877748.1707279488979 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Needed for AV1. v2 changes: moved ref_frame_sign_bias to the CodedBitstreamAV1Context structure Patch attached. ------=_Part_47717_1911877748.1707279488979 Content-Type: text/x-diff; charset=us-ascii; name=v2-0001-lavc-cbs_av1-fill-in-ref_frame_sign_bias.patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=v2-0001-lavc-cbs_av1-fill-in-ref_frame_sign_bias.patch >From d720dcbe3da223f7f228a4525e5b9fc3b114ebc6 Mon Sep 17 00:00:00 2001 From: Lynne Date: Fri, 2 Feb 2024 03:54:06 +0100 Subject: [PATCH v2 1/2] lavc/cbs_av1: fill in ref_frame_sign_bias Needed for AV1. --- libavcodec/cbs_av1.h | 1 + libavcodec/cbs_av1_syntax_template.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/libavcodec/cbs_av1.h b/libavcodec/cbs_av1.h index a5402f069d..bf3047fc42 100644 --- a/libavcodec/cbs_av1.h +++ b/libavcodec/cbs_av1.h @@ -465,6 +465,7 @@ typedef struct CodedBitstreamAV1Context { int tile_num; AV1ReferenceFrameState ref[AV1_NUM_REF_FRAMES]; + uint8_t ref_frame_sign_bias[AV1_NUM_REF_FRAMES]; // AVOptions int operating_point; diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c index 3be1f2d30f..e6fd7f8a93 100644 --- a/libavcodec/cbs_av1_syntax_template.c +++ b/libavcodec/cbs_av1_syntax_template.c @@ -1572,6 +1572,16 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw, } if (!frame_is_intra) { + for (i = 0; i < AV1_REFS_PER_FRAME; i++) { + if (seq->enable_order_hint) { + int idx = current->ref_frame_idx[i]; + int hint = current->ref_order_hint[idx]; + priv->ref_frame_sign_bias[i] = cbs_av1_get_relative_dist(seq, hint, + priv->order_hint) > 0; + } else { + priv->ref_frame_sign_bias[i] = 0; + } + } // Derive reference frame sign biases. } -- 2.43.0.381.gb435a96ce8 ------=_Part_47717_1911877748.1707279488979 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_47717_1911877748.1707279488979--