Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1377642pxb; Wed, 30 Mar 2022 01:56:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYZ63MvlNK5aMHpWOkqUb+l2MNGWgZBInQ0o+iZNi+IAx+qrnI/NLfxbVzK5r70QkeQvae X-Received: by 2002:a63:5f4e:0:b0:382:3b02:a4a with SMTP id t75-20020a635f4e000000b003823b020a4amr5425466pgb.451.1648630614836; Wed, 30 Mar 2022 01:56:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648630614; cv=none; d=google.com; s=arc-20160816; b=WVUPbXQ2ugPt2epvlDRQQoNdpCJIb34B6wL1h78Z8jGpkyWOlwfolo2Pv2wG2kBsNN Dn1t21X5A/MepzAbnqQNGjymt37vTwi14JQO8Y5w+HFuDHMlwibNkvocy1b7dSbA3Pqs 81EOJ/1NTvwPzsW+OhSNCQQGEpZ9aAAsChnLCkqDFu3BUvuV3obLBuY0ZlABHCiAA6Ds sYXHAEMgzP6tqyYs2vXCp+Mv21uu0AzvSVTXy7jYBGl4Xb/vRQZUfxYMl8yKpnNOOigL ID455cQqBMdQBCSMuNoCm5QusMPV5Ej0QTcIx2GGL/h5DzFjYRdXfg/aMD9uHMPip19O A8/Q== 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=KRwqFVSsU2eOH1QgTNXk2EdEgaW4suQ1z0t8voAIIfk=; b=rGOM+pHKzIh6RqnMz1mWOs0JNEOj5qSAf/peARJDMkChplrnrawaqZaREJYRh8Lxts HPO3SGtfQ0LefW1jN7G1nLbssmcdWKVXGLz6+ZgnNRpHMUkWCoZWhFMq30rK2lSZzDhK AF0AikzrelVTqCli0ab6A7uOkvsgsZVFowf0+p/vFRH4B43XLI61GHHF/b9Jie5366DE QtqLIliIthiLfPGSgtfYuC3ktmuWiFsMePrT6dJ/t2QLMOCD8H2GjZx0vl9lMkXxnKWg 6+n6hFpTmg5s93+HsFHpk2GoBG2RDOiP234Mas1zzwYWYoxtcA1JxuN/hfGKw4RccNM2 HaBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=TjRvs4SH; 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 f14-20020a17090a638e00b001c68931879bsi1480679pjj.135.2022.03.30.01.56.41; Wed, 30 Mar 2022 01:56:54 -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=TjRvs4SH; 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 S233863AbiC2I1N (ORCPT + 99 others); Tue, 29 Mar 2022 04:27:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233550AbiC2I1M (ORCPT ); Tue, 29 Mar 2022 04:27:12 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 440651877CE; Tue, 29 Mar 2022 01:25:30 -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 AD2381F43940; Tue, 29 Mar 2022 09:25:28 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1648542328; bh=f1D9zZ5QeEl1SNAS+500xZ0sHqyx/I137Xd4Cdi9UwQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TjRvs4SHnf8vYHOIcgthNvi7ssgTzAe2Y8menEXMXNm3aJfdeJctChd2AMqWelPeu 7h04Ecsj1yqzvdpIoxXpVUDJa0wZ2ZLtUDfj6XMX1xzeEKbOFw06Do9h+/+iSCWMgj rEJISRZMa/1czJKIy9sB+7OSamF40GkC/qTW8ChlDQloiBuJg2e//OpfYpltFo/bJU /FjwiR0LKxB094KxXozCe0PzdsJFlCqt8l9/bdZvm8knhtLVRVbEoYEMV2AvFBG/du YIZQMUZIT7/fQ+U2PvNvHRq6iGHvVv6k5ruS4ibK966DOuwTgS3hyHZhtsXiun0xkJ 4KAkyC0fTZ0Zg== Date: Tue, 29 Mar 2022 10:25:26 +0200 From: Sebastian Fricke To: Nicolas Dufresne Cc: Mauro Carvalho Chehab , Ezequiel Garcia , Philipp Zabel , Greg Kroah-Hartman , kernel@collabora.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev Subject: Re: [PATCH v1 01/24] media: h264: Increase reference lists size to 32 Message-ID: <20220329082526.v64tlnmzjlheuxgu@basti-XPS-13-9310> References: <20220328195936.82552-1-nicolas.dufresne@collabora.com> <20220328195936.82552-2-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-2-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 Hey Nicolas, As mentioned in patch 24 as well: The patch series doesn't seem to apply on the latest media tree master branch. Looking at your tree I can see that you have commit: ba2c670a "media: nxp: Restrict VIDEO_IMX_MIPI_CSIS to ARCH_MXC or COMPILE_TEST Laurent Pinchart authored 1 week ago " But the current head of the media tree is: 71e6d0608e4d "media: platform: Remove unnecessary print function dev_err() Yang Li authored 13 days ago" On 28.03.2022 15:59, Nicolas Dufresne wrote: >This is to accommodate support for field decoding, which splits the top >and the bottom reference into the reference list. s/and the bottom reference/and the bottom references/ I think it would be helpful to describe with a bit more detail why field decoding requires the 32 entry array instead of the 16 entry array. How about: """ In field decoding mode a slice is a sequence of macroblock pairs, where each pair contains a top and a bottom macroblock. To accommodate for this mode the reference list must be able contain references for both top and bottom macroblocks. Double the size of the reference list array accordingly. """ I got the info from the specification at 6.3. > >Signed-off-by: Nicolas Dufresne Reviewed-by: Sebastian Fricke >--- > drivers/media/v4l2-core/v4l2-h264.c | 6 +++--- > drivers/staging/media/hantro/hantro_hw.h | 6 +++--- > drivers/staging/media/rkvdec/rkvdec-h264.c | 6 +++--- > include/media/v4l2-h264.h | 8 ++++---- > 4 files changed, 13 insertions(+), 13 deletions(-) > >diff --git a/drivers/media/v4l2-core/v4l2-h264.c b/drivers/media/v4l2-core/v4l2-h264.c >index 0618c6f52214..8d750ee69e74 100644 >--- a/drivers/media/v4l2-core/v4l2-h264.c >+++ b/drivers/media/v4l2-core/v4l2-h264.c >@@ -210,7 +210,7 @@ static int v4l2_h264_b1_ref_list_cmp(const void *ptra, const void *ptrb, > * v4l2_h264_build_p_ref_list() - Build the P reference list > * > * @builder: reference list builder context >- * @reflist: 16 sized array used to store the P reference list. Each entry >+ * @reflist: 32 sized array used to store the P reference list. Each entry > * is a v4l2_h264_reference structure > * > * This functions builds the P reference lists. This procedure is describe in Oh unrelated to the patch but there is a typo: s/describe/described/ Greetings, Sebastian >@@ -233,9 +233,9 @@ EXPORT_SYMBOL_GPL(v4l2_h264_build_p_ref_list); > * v4l2_h264_build_b_ref_lists() - Build the B0/B1 reference lists > * > * @builder: reference list builder context >- * @b0_reflist: 16 sized array used to store the B0 reference list. Each entry >+ * @b0_reflist: 32 sized array used to store the B0 reference list. Each entry > * is a v4l2_h264_reference structure >- * @b1_reflist: 16 sized array used to store the B1 reference list. Each entry >+ * @b1_reflist: 32 sized array used to store the B1 reference list. Each entry > * is a v4l2_h264_reference structure > * > * This functions builds the B0/B1 reference lists. This procedure is described >diff --git a/drivers/staging/media/hantro/hantro_hw.h b/drivers/staging/media/hantro/hantro_hw.h >index 2bc6b8f088f5..292aaaabaf24 100644 >--- a/drivers/staging/media/hantro/hantro_hw.h >+++ b/drivers/staging/media/hantro/hantro_hw.h >@@ -69,9 +69,9 @@ struct hantro_h264_dec_ctrls { > * @b1: B1 reflist > */ > struct hantro_h264_dec_reflists { >- struct v4l2_h264_reference p[HANTRO_H264_DPB_SIZE]; >- struct v4l2_h264_reference b0[HANTRO_H264_DPB_SIZE]; >- struct v4l2_h264_reference b1[HANTRO_H264_DPB_SIZE]; >+ struct v4l2_h264_reference p[V4L2_H264_REF_LIST_LEN]; >+ struct v4l2_h264_reference b0[V4L2_H264_REF_LIST_LEN]; >+ struct v4l2_h264_reference b1[V4L2_H264_REF_LIST_LEN]; > }; > > /** >diff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/staging/media/rkvdec/rkvdec-h264.c >index 3c7f3d87fab4..dff89732ddd0 100644 >--- a/drivers/staging/media/rkvdec/rkvdec-h264.c >+++ b/drivers/staging/media/rkvdec/rkvdec-h264.c >@@ -100,9 +100,9 @@ struct rkvdec_h264_priv_tbl { > #define RKVDEC_H264_DPB_SIZE 16 > > struct rkvdec_h264_reflists { >- struct v4l2_h264_reference p[RKVDEC_H264_DPB_SIZE]; >- struct v4l2_h264_reference b0[RKVDEC_H264_DPB_SIZE]; >- struct v4l2_h264_reference b1[RKVDEC_H264_DPB_SIZE]; >+ struct v4l2_h264_reference p[V4L2_H264_REF_LIST_LEN]; >+ struct v4l2_h264_reference b0[V4L2_H264_REF_LIST_LEN]; >+ struct v4l2_h264_reference b1[V4L2_H264_REF_LIST_LEN]; > u8 num_valid; > }; > >diff --git a/include/media/v4l2-h264.h b/include/media/v4l2-h264.h >index ef9a894e3c32..e282fb16ac58 100644 >--- a/include/media/v4l2-h264.h >+++ b/include/media/v4l2-h264.h >@@ -37,7 +37,7 @@ struct v4l2_h264_reflist_builder { > u16 longterm : 1; > } refs[V4L2_H264_NUM_DPB_ENTRIES]; > s32 cur_pic_order_count; >- struct v4l2_h264_reference unordered_reflist[V4L2_H264_NUM_DPB_ENTRIES]; >+ struct v4l2_h264_reference unordered_reflist[V4L2_H264_REF_LIST_LEN]; > u8 num_valid; > }; > >@@ -51,9 +51,9 @@ v4l2_h264_init_reflist_builder(struct v4l2_h264_reflist_builder *b, > * v4l2_h264_build_b_ref_lists() - Build the B0/B1 reference lists > * > * @builder: reference list builder context >- * @b0_reflist: 16 sized array used to store the B0 reference list. Each entry >+ * @b0_reflist: 32 sized array used to store the B0 reference list. Each entry > * is a v4l2_h264_reference structure >- * @b1_reflist: 16 sized array used to store the B1 reference list. Each entry >+ * @b1_reflist: 32 sized array used to store the B1 reference list. Each entry > * is a v4l2_h264_reference structure > * > * This functions builds the B0/B1 reference lists. This procedure is described >@@ -70,7 +70,7 @@ v4l2_h264_build_b_ref_lists(const struct v4l2_h264_reflist_builder *builder, > * v4l2_h264_build_p_ref_list() - Build the P reference list > * > * @builder: reference list builder context >- * @reflist: 16 sized array used to store the P reference list. Each entry >+ * @reflist: 32 sized array used to store the P reference list. Each entry > * is a v4l2_h264_reference structure > * > * This functions builds the P reference lists. This procedure is describe in >-- >2.34.1 >