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 04F0646BC5 for ; Fri, 2 Feb 2024 02:58:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C614168D0B4; Fri, 2 Feb 2024 04:57:57 +0200 (EET) Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E6FA868BED3 for ; Fri, 2 Feb 2024 04:57:51 +0200 (EET) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w4.tutanota.de (Postfix) with ESMTP id 2F450106019A for ; Fri, 2 Feb 2024 02:57:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1706842671; 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=a6kJ3ZhnQBIomCDjNv01gsn33+07KtM7gApiaqrFWXw=; b=HVQ8O5F2GBHyAqQJQYKdj7rw1cUsx1wOfuKfHH8PHUT6kNOeuXlhaEOz3PrQnqWC n7rW+8N29kYmAD0HbvnoGeY/OYkYXRNRJaYh34vbvkCrjThzumKbx/UeACyDXUE/Pdk q8mvzfwgyToQko1WbSAEezXhr0h9Pc7zfP3X0BAmWBlkTOyeYIItgsIMD4awUqi8PuI AqAjEVAtiCU9qWSyzv895ZLN2jivKu2meFf/KTqj3x2cpsL5zUoZ4JurV2jjh4lE954 Fs2PXFwUzfUE2NPf69t/sNsJa5s1ryQPmbOJ8wUSxvlvwxh33/yTfJJ/l9dsZ/w+ucj bZgPG5NSOg== Date: Fri, 2 Feb 2024 03:57:51 +0100 (CET) From: Lynne To: Ffmpeg Devel Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_106553_742131447.1706842671187" Subject: [FFmpeg-devel] [PATCH 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_106553_742131447.1706842671187 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Needed for AV1. Patch attached ------=_Part_106553_742131447.1706842671187 Content-Type: text/x-diff; charset=us-ascii; name=0001-lavc-cbs_av1-fill-in-ref_frame_sign_bias.patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-lavc-cbs_av1-fill-in-ref_frame_sign_bias.patch >From 81be215060a718fdc3d043847e8155ba56fcb431 Mon Sep 17 00:00:00 2001 From: Lynne Date: Fri, 2 Feb 2024 03:54:06 +0100 Subject: [PATCH 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..cbb43ac810 100644 --- a/libavcodec/cbs_av1.h +++ b/libavcodec/cbs_av1.h @@ -198,6 +198,7 @@ typedef struct AV1RawFrameHeader { uint8_t refresh_frame_flags; uint8_t allow_intrabc; uint8_t ref_order_hint[AV1_NUM_REF_FRAMES]; + uint8_t ref_frame_sign_bias[AV1_NUM_REF_FRAMES]; uint8_t frame_refs_short_signaling; uint8_t last_frame_idx; uint8_t golden_frame_idx; diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c index 3be1f2d30f..00e9a6d030 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]; + current->ref_frame_sign_bias[i] = cbs_av1_get_relative_dist(seq, hint, + priv->order_hint) > 0; + } else { + infer(ref_frame_sign_bias[i], 0); + } + } // Derive reference frame sign biases. } -- 2.43.0.381.gb435a96ce8 ------=_Part_106553_742131447.1706842671187 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_106553_742131447.1706842671187--