Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp379184pxb; Tue, 29 Mar 2022 05:27:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaKXk2Vyj1r3bv+NqtUzFaTCL+hsGQB9wBANLG3znjdUU5prvvsO4ZZWZm+zs/Jyc5wqMQ X-Received: by 2002:a92:d01:0:b0:2c5:daa4:77e0 with SMTP id 1-20020a920d01000000b002c5daa477e0mr8672492iln.154.1648556850001; Tue, 29 Mar 2022 05:27:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648556849; cv=none; d=google.com; s=arc-20160816; b=Adjp4nMMVaZUyNAU5s5lDwAce/rvG50IRADUxzXyGi7EDWXU48smHwXF6Ri5RkYRaT l8A2A4orCwVYhDqtk7cZIyopaoddFZNCrSwqln7AIlQxGr56ryUqG9nZaVsaUTR8cPHl mPs6A1tkYDUPt2t1qMsaiZlWujlAX+68P8raZBPP4eErKs/HPYRObTOINEpkZpKKq7IR f2g10YjjDWBTtzgiOOs7/sj5mtTePBXeRMFR3YjGQCBW9klnI5jQKBINehnOarMdb6s2 4z+Eq/lPjJwDVlkwXmNTXDypdAYqbremnDNERDlmLDIVyA1Hf0TN32YXPTcaFsXma8bC tWeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=H9qfKCREgK8oLgbfLgY7ApGK9J7YaTMInxqZDqCdey4=; b=svXZ6W3MqM5pQuqMXFGzEzp3G4GEamHhbOpplToKWXi1fGoSDGL8Fa/ZuMZhVlOErs 9CiI/3e6x1rf2ISvMykO55YAsZ4catPntQyq4Rq8+tngfjR2vW9BYDh+7/t43Zj9r5oa BDf5P0l3Vhl9PTYsg7XjB/JraLm+FExVOjjVYjDVzScTan6kHePrQS5VHe2vpDSoXP8t tesBCYR8oU+/Y3ZfVKn1VVAKmLbeWWohFuJNPUnFw6Ua44qkjwuqKKp47HRreF1WWU3R wfsC4/PJh5JXkVENTnHcjlv65ZSMzt1rD3xTYJLo9ItHwiNBVSfXm6ulDgnHC0Yd2lt0 lRRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YU6hJCLN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x8-20020a92d648000000b002c7fd7f814asi13712277ilp.93.2022.03.29.05.27.17; Tue, 29 Mar 2022 05:27:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YU6hJCLN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234008AbiC2Ieg (ORCPT + 99 others); Tue, 29 Mar 2022 04:34:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234057AbiC2Iea (ORCPT ); Tue, 29 Mar 2022 04:34:30 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33A6B144B70; Tue, 29 Mar 2022 01:32:46 -0700 (PDT) Received: from localhost (unknown [IPv6:2a02:3030:a:f397:f6bc:b726:2678:839f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: sebastianfricke) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 4656A1F43A5D; Tue, 29 Mar 2022 09:32:45 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1648542765; bh=AEzY3zrel2SS59cX50Wh3lYNuek+9mxJ6I+jtREm89w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YU6hJCLNE9jMBwWLxpeDSpOSZJt1hv0VfFyYfnkFKmetpz+pDRUVq2l+wy6UvVfaf fv73dNpr3VKyh25uf67PDgtDxWExJU8FyoniTAb4Q2QPR5vaxQKSXTlHUSWrnKxO/L FABs4PvSz3EeoPrOZ2W3hQWFAauzkMqAdbHR8r8TkQVAy/mhAjdZGxT1ZvfLaABHIs t77vF2Zr3JnrwIpt0sEw97I8uEvoYdDeEZ7peQTuhQU0pVJLsojs+65nqS5IJeoLlX CDGVKKCRvmAAh7a8YCxbP+PTOuDkCmf30eil9fOKUifvuZ9TimFzmtXvGWozg3AaVl aY+GYz/QFvfmg== Date: Tue, 29 Mar 2022 10:32:41 +0200 From: Sebastian Fricke To: Nicolas Dufresne Cc: Mauro Carvalho Chehab , kernel@collabora.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 02/24] media: doc: Document dual use of H.264 pic_num/frame_num Message-ID: <20220329083241.ctatuvbbhkvswokl@basti-XPS-13-9310> References: <20220328195936.82552-1-nicolas.dufresne@collabora.com> <20220328195936.82552-3-nicolas.dufresne@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline In-Reply-To: <20220328195936.82552-3-nicolas.dufresne@collabora.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28.03.2022 15:59, Nicolas Dufresne wrote: >These two fields needs documentation as they have dual meaning. It is also s/needs/need/ >confusing since pic_num is a derived value from frame_num, so this should >help application developpers. If we ever need to make a V2 of this API, I s/developpers/developers/ (seems to be a common typo among native French speakers ;)) >would suggest to remove pic_num entirely. I think that suggestion should be placed as a FIXME/TODO comment into the source code as it is way easier to find for future developers creating a V2. > >Signed-off-by: Nicolas Dufresne Reviewed-by: Sebastian Fricke >--- > .../media/v4l/ext-ctrls-codec-stateless.rst | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > >diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst >index 6541e4c32b26..f634f20bcfbe 100644 >--- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst >+++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst >@@ -649,10 +649,16 @@ Stateless Codec Control ID > :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64. > * - __u32 > - ``pic_num`` >- - >+ - For short term reference, this should match the derived value PicNum >+ (8-28) and for long term references it should match the derived value Minor suggestion, for short term you use singular (reference) and for long term you use plural (references), I would stick to one of both. (Below you only use plural so maybe stick to plural here as well) >+ LongTermPicNum (8-29). Note that pic_num is the same as FrameNumWrap >+ for frame decoding. > * - __u16 > - ``frame_num`` >- - >+ - For short term references, this should match the frame_num value from >+ the slice header syntax (the driver will wrap the value if neeeded). For >+ long term references, this should be set to the value of >+ long_term_frame_idx describes in the dec_ref_pic_marking() syntax. s/describes/described/ Greetings, Sebastian > * - __u8 > - ``fields`` > - Specifies how the DPB entry is referenced. See :ref:`Reference Fields ` >-- >2.34.1 >