Received: by 2002:a05:6512:2355:0:0:0:0 with SMTP id p21csp5520961lfu; Mon, 28 Mar 2022 15:54:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAPVuAsxya9Es1v4m03BPQb9nc66xD2weECRVWHaKADHO69PkAgwocLFhg3YVxdAnRoUDA X-Received: by 2002:a05:6122:546:b0:342:f3e6:4214 with SMTP id y6-20020a056122054600b00342f3e64214mr8214276vko.26.1648508059421; Mon, 28 Mar 2022 15:54:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648508059; cv=none; d=google.com; s=arc-20160816; b=DX9sDql5Dp4k2hvrU9i6kkYP9Ua2JVhvEKNrV4af7pOMZPsYgWuFximP3j1ligMMUS SYCUe92RHErYaBe+vVlpy1TuPBl7m5ezhP8MZZQ9kykQ+hC8lx7qBP4nbhJxR6sUnboz cJPuT7bEfRtjYHl+x3/SAfKdWemNvJ0lkDvSr0ydVdEaZUcFFbs9nfq56v26y1r4nLgE d/CYuq0o8YyyKyQdCRzISLD23hSnD2QBNct+EpQQkuFyVuwYK4u4k3HQy3VTz+gcPiPC Y5KrFmfBgz8z9tbskbDvxXoumli+w0ihrX6uOcoPaYeh39N+lxPNj4pSzsEz2d857veq o1ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=U9cFi5r1T41FbxR9KcJfO2cKljDeTJPLPY2zzXtb9+k=; b=kwWQvMyLx/LVXpqoWXSHingR3ASBHjDGlm9+ROE1BI3lLPd/cjySdLjO+6vpjhUOQg TyV+ZC9V+R66G7yed19dXvnjD85MuFwK0+ccG3OA2XIF8R4V2I4O6c0qr/BuWc1mFtsE c9oe3iJ0Yj+NM8S9vB1F8lQoQ9T/AAs9xxzS6ghs12hWVRyrepaeuxMOiBBHUb9vSrTP +joDzIIuDg7mDWATzClSQUmFt/T9Y0jtyYGtPndP3qoBeqsgyGUrPRk8LKDHkP6DgBlz Dki2KHgeycw9GM3ByK4CYEGOGv5dqMHbpcRzYTNjhDTY6MQJflm1Pk2zXCkScKvLfiRS Su0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=DcQ+A85U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a16-20020a67d310000000b00324c5c3bddesi3734944vsj.32.2022.03.28.15.54.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 15:54:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=DcQ+A85U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 96EA765816; Mon, 28 Mar 2022 14:59:11 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344139AbiC1UBk (ORCPT + 99 others); Mon, 28 Mar 2022 16:01:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343979AbiC1UBe (ORCPT ); Mon, 28 Mar 2022 16:01:34 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79427393D4; Mon, 28 Mar 2022 12:59:53 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nicolas) with ESMTPSA id AA34B1F43850 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1648497592; bh=Wt3ayzGsMmxeOdSu0lSUaLnN2BhIuPB/Wbnfn/jKVUM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DcQ+A85Uofv5sKjmZcd8r3GNXf8kJWW9PmI2jPYDVediCtxMop1xKNQx3h6tko46+ oRoeTTQnq9vKhLlyxErUsuhz4Cou+Ze4fV9pcfU+yTzFsHI4rcZ8UgxT4s1YDn4lA4 jAbO+TeggaVC02YTFXR3D8hRANdosjKEd91v86cmya+ss3yxYeEkeJftPpZc5g2JXK ZxVLdUJaq78GdJQc+/BGFUx1ErE1FO5htmvgQAOJoqjZGogkRZFx3h05+ZyvQoBjzN qeaxVwDifn5SufOPKSwiIO3Vx+K392YfnvE93Rz8QU3WyhNQX/xbNhkUinRLL+85c1 jer60pS+HQhgQ== From: Nicolas Dufresne To: Mauro Carvalho Chehab Cc: kernel@collabora.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 02/24] media: doc: Document dual use of H.264 pic_num/frame_num Date: Mon, 28 Mar 2022 15:59:14 -0400 Message-Id: <20220328195936.82552-3-nicolas.dufresne@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220328195936.82552-1-nicolas.dufresne@collabora.com> References: <20220328195936.82552-1-nicolas.dufresne@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no 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 These two fields needs documentation as they have dual meaning. It is also 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 would suggest to remove pic_num entirely. Signed-off-by: Nicolas Dufresne --- .../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 + 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. * - __u8 - ``fields`` - Specifies how the DPB entry is referenced. See :ref:`Reference Fields ` -- 2.34.1