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 51E814916A for ; Sun, 4 Feb 2024 16:06:12 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3D58368D0B4; Sun, 4 Feb 2024 18:06:10 +0200 (EET) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6BDB268C856 for ; Sun, 4 Feb 2024 18:06:04 +0200 (EET) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-40fc65783aeso20324775e9.2 for ; Sun, 04 Feb 2024 08:06:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20230601.gappssmtp.com; s=20230601; t=1707062763; x=1707667563; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=OrRoRREUtQAZzZJCjGkikAjOAUBBUee43+SF1EB3r+E=; b=lRhFC3tor/2EeEarJ3zBrOwx8f+wlEdlLDvxBDwGktK/VO18tUlcyUKBj09KpxFhK+ cZTxFXptlTtpIkOI7aLYFmmTMFM21D89bu5ZHAoHfxEUvOpYqe5SaqoGyOkcw2IRcv5c h/LKBvn4Khqx55SvLvDyRTUezRyH6a7vcaDE2c488mGvBpVNoc65c5LGGn9B+NhVqTAX YuRwcSNkPB/9hivlWby2hjCTTkHVTIIXCYvWoxPvbGvxyraOEAy275OtMkFGefa0hpHg 1L+9LYQzfpn4a6XjnMGE1m0sivEYx8SRRi5OZbJiw8RflTGUv4cMUy2SeCgUN8LpvX0L LeLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707062763; x=1707667563; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OrRoRREUtQAZzZJCjGkikAjOAUBBUee43+SF1EB3r+E=; b=HspTk7qb+TnYCHyEDOSpaGYu7nfac0B7hGSRVasFR78KamK4gFbIBx9vVpJUEsguQQ UHLb5BJ/OkqaHAahyAkC1rl3IxGVqJVa2iy6U1g6Y4+LCo7MOiKuIW3uLd3dO1hJpzWZ 5LVH+h++0CDw/arg7NOq6yPpOF71IaoN5k7SqLIL4bGtwbRz8B6JHrctwb8g+7UkfNni ZAq+5SE0QnD3b5wX4POL3ouGOxbXaExQ49CpGSKJgbeTxPZMUeizgGWeZaO9kxG6b1F5 EHmxDjQS6/+N/+zB1iAVzie5ZhH4jXSvT+7J8E9YZyif6HWRGdoEWrohIsmoNUDOtrGd wd3Q== X-Gm-Message-State: AOJu0YxTs/kBZ1BKarAHTCBkH9nK2jubDICoZ/HVfBnL5/dUDzjm2pr4 TTXxdCgAr/ILOvXN0NNEik70hzVOOAA6mfgt47JkUFOLhor7F7mO5q4hNFh4yADJ3EoeijGbdpQ N X-Google-Smtp-Source: AGHT+IHxTTfnJJ4y5EzfKOiHkekXZCZw+qz/KmKEVKZV9zCa471n4lTSvnAYBKz6VQHj7g0Sh2H6kQ== X-Received: by 2002:a05:600c:3b95:b0:40f:afb2:a794 with SMTP id n21-20020a05600c3b9500b0040fafb2a794mr2903718wms.18.1707062763477; Sun, 04 Feb 2024 08:06:03 -0800 (PST) Received: from [192.168.0.15] (cpc92302-cmbg19-2-0-cust1183.5-4.cable.virginm.net. [82.1.212.160]) by smtp.gmail.com with ESMTPSA id iv15-20020a05600c548f00b0040efd192a95sm6133122wmb.1.2024.02.04.08.06.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 04 Feb 2024 08:06:03 -0800 (PST) Message-ID: Date: Sun, 4 Feb 2024 16:06:26 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: From: Mark Thompson In-Reply-To: Subject: Re: [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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 02/02/2024 02:57, Lynne wrote: > Needed for AV1. > > 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]; This isn't a syntax element so it shouldn't go in the syntax structure. Put it in the context structure with other derived fields (the pointer is already available as priv where you want it). > 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 Please exactly follow the layout of the specification as far as possible, since that makes it much easier to assess whether it is correct. It looks like the indexing is wrong? (Note that LAST_FRAME == 1.) Thanks, - Mark _______________________________________________ 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".