Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp39959rdd; Wed, 22 Nov 2023 08:54:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IGxQ57npLbNgosfbhBvZus1+48qcTWcYjUXeE4tktgwuQgdHI+eP3A3x9pe7QkUoeNqnivo X-Received: by 2002:a92:cac8:0:b0:359:4726:9014 with SMTP id m8-20020a92cac8000000b0035947269014mr2831684ilq.24.1700672080735; Wed, 22 Nov 2023 08:54:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700672080; cv=none; d=google.com; s=arc-20160816; b=lYNWEqcrcipa6ViqOJBxB2EPC1190PgDkBMwSSzNKdJmZAYDilPegJ1DhUfon8yKtS TQvO+7fDMAIjDfIyQWK+ErhuTOEfkqBNSY3waKjH3gYKFnq8L23RRhLQuPK9blMbQIPa xscvu7AB0Jp5DEeAgxPBscv0vCtWciqdtfJGjjjZHoXQlgBftZs6/5xB0XYuEN12hG85 ii1TswWZxVUbTM95M2SBwyoNi1xikzfu7zpw/rwp+PmIPpTHS/MrWNwgA9ibEP0SxtMS Mk539+xqbpc4pma9UVjUIez4moqnjXSPvJYnXRq88Z62ltME/+L7wkrC2usSKZv9Yhgk T1kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=IYOfF5C25Lhqd74yvEvQIMbh3jV4ROIZ0JpqvcQ9XcA=; fh=BN9hG8o2iTaLn64plggRjVLJ3069N1hFfvJo8i4jluc=; b=IlCbbeG7L4oeR4QjOygq2KLlXl88GPxIqG3lSAZmEHOXu2kdnZtA6kBgXpvI5OtUyH 7bRsXzsz9PneAXbuPhQcxiILmrKhIFzl6w6hwct4coPeMFFasiQdFVgB1niEl1cqG2xV srJDxnt1fqbHQ7f/EHdjTZUj0KlEF5/6acr7fofOIvTAy4hyfmGsy5SQiCxROW7CdaF8 hSPfcDFuP21b5ET/okjhzxCeKBcORXbA2tK0T22LWMChz/LmKmqDs8gRTrJWEDojBQSc 6iqItbV5X7HPK0O6zLPUr/jfulrRriNOfxNrSYLonUuwGCv0/Hb/cvLRKGpkJZI1ybt9 MaFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=S67VFX9b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id x14-20020a056a00188e00b006cb83204cffsi8242442pfh.256.2023.11.22.08.54.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 08:54:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=S67VFX9b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7B982823CEAE; Wed, 22 Nov 2023 08:52:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232049AbjKVQwL (ORCPT + 99 others); Wed, 22 Nov 2023 11:52:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343706AbjKVQwD (ORCPT ); Wed, 22 Nov 2023 11:52:03 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 178E1D50; Wed, 22 Nov 2023 08:51:59 -0800 (PST) Received: from arisu.localnet (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: detlev) by madras.collabora.co.uk (Postfix) with ESMTPSA id B622E6607392; Wed, 22 Nov 2023 16:51:56 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1700671918; bh=1VPwfkITmRU+YlSEzmhy+Urrbi2kRzxRc9orsM0XTDI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S67VFX9bpyIDMeZrQ8Ey1Q3nX0BMmBgqlMykUWO3c/JvbJZkpTqvRkZiZ4m3oMDiX eFcI7xehaZurotFxE5hoNqIAUpmOv4GzY84D1P/E8JPx3Jcesjxovafw0kOVW61xX6 x+yKzvZBvjKUzXN4KsO9KbhHipCf0yiG9XXze2iIvsKN+YueHgtZIwpro2pGHo8BEc IBl2KrDHPrARiZw39HIepVMGj+GDjIODhn2OqXJttTJ9/ZZSHyQ+y0ciSvCwTqmSQf 3GBjR3UzdrWprh5A2O6FCHKBFQDG/otXYK2u5vMbvC4RK33iYDcQyzzJrnqZgByQmB 0FQFb3uNs5wWw== From: Detlev Casanova To: linux-kernel@vger.kernel.org, Hans Verkuil Cc: linux-media@vger.kernel.org, Daniel Almeida , Mauro Carvalho Chehab Subject: Re: [PATCH v2 4/5] visl: Add a codec specific variability parameter Date: Wed, 22 Nov 2023 11:52:08 -0500 Message-ID: <10376589.nUPlyArG6x@arisu> In-Reply-To: References: <20231024191027.305622-1-detlev.casanova@collabora.com> <20231024191027.305622-5-detlev.casanova@collabora.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2250269.iZASKD2KPV"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 22 Nov 2023 08:52:24 -0800 (PST) --nextPart2250269.iZASKD2KPV Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Detlev Casanova To: linux-kernel@vger.kernel.org, Hans Verkuil Date: Wed, 22 Nov 2023 11:52:08 -0500 Message-ID: <10376589.nUPlyArG6x@arisu> In-Reply-To: MIME-Version: 1.0 On Wednesday, November 22, 2023 11:07:18 A.M. EST Hans Verkuil wrote: > On 24/10/2023 21:09, Detlev Casanova wrote: > > When running tests with different input data, the stable output frames > > could be too similar and hide possible issues. > > > > This commit adds variation by using some codec specific parameters. > > > > Only HEVC and H.264 support this. > > > > Reviewed-by: Daniel Almeida > > Signed-off-by: Detlev Casanova > > --- > > > > drivers/media/test-drivers/visl/visl-core.c | 5 ++++ > > drivers/media/test-drivers/visl/visl-dec.c | 27 +++++++++++++++++++++ > > drivers/media/test-drivers/visl/visl.h | 1 + > > 3 files changed, 33 insertions(+) > > > > diff --git a/drivers/media/test-drivers/visl/visl-core.c > > b/drivers/media/test-drivers/visl/visl-core.c index > > d28d50afec02..e7466f6a91e1 100644 > > --- a/drivers/media/test-drivers/visl/visl-core.c > > +++ b/drivers/media/test-drivers/visl/visl-core.c > > @@ -93,6 +93,11 @@ module_param(stable_output, bool, 0644); > > > > MODULE_PARM_DESC(stable_output, > > > > " only write stable data for a given input on the output frames"); > > > > +bool codec_variability; > > +module_param(codec_variability, bool, 0644); > > +MODULE_PARM_DESC(codec_variability, > > + " add codec specific variability data to generate more unique frames. > > (Only h.264 and hevc)"); > Why make this a module parameter instead of always doing this? > > It's not clear from the commit log why a parameter is needed. I agree with that, I started as a parameter when I wasn't sure what variability values or method would be used, but just showing a value can be integrated without a parameter and keep it more simple. I'll change that. > > + > > > > static const struct visl_ctrl_desc visl_fwht_ctrl_descs[] = { > > > > { > > > > .cfg.id = V4L2_CID_STATELESS_FWHT_PARAMS, > > > > diff --git a/drivers/media/test-drivers/visl/visl-dec.c > > b/drivers/media/test-drivers/visl/visl-dec.c index > > 61cfca49ead9..002d5e3b0ea4 100644 > > --- a/drivers/media/test-drivers/visl/visl-dec.c > > +++ b/drivers/media/test-drivers/visl/visl-dec.c > > @@ -223,6 +223,26 @@ static void visl_tpg_fill_sequence(struct visl_ctx > > *ctx,> > > } > > > > } > > > > +static bool visl_tpg_fill_codec_specific(struct visl_ctx *ctx, > > + struct visl_run *run, > > + char buf[], size_t bufsz) > > +{ > > + switch (ctx->current_codec) { > > + case VISL_CODEC_H264: > > + scnprintf(buf, bufsz, > > + "H264: %u", run->h264.dpram- >pic_order_cnt_lsb); > > + break; > > + case VISL_CODEC_HEVC: > > + scnprintf(buf, bufsz, > > + "HEVC: %d", run->hevc.dpram- >pic_order_cnt_val); > > + break; > > Perhaps mention here why these specific values are chosen? Will do. > > + default: > > + return false; > > + } > > + > > + return true; > > +} > > + > > > > static void visl_tpg_fill(struct visl_ctx *ctx, struct visl_run *run) > > { > > > > u8 *basep[TPG_MAX_PLANES][2]; > > > > @@ -255,6 +275,13 @@ static void visl_tpg_fill(struct visl_ctx *ctx, > > struct visl_run *run)> > > frame_dprintk(ctx->dev, run->dst->sequence, ""); > > line++; > > > > + if (codec_variability && visl_tpg_fill_codec_specific(ctx, run, buf, > > TPG_STR_BUF_SZ)) { + tpg_gen_text(&ctx->tpg, basep, line++ * > > line_height, 16, buf); > > + frame_dprintk(ctx->dev, run->dst->sequence, "%s\n", buf); > > + frame_dprintk(ctx->dev, run->dst->sequence, ""); > > + line++; > > + } > > + > > > > if (!stable_output) { > > > > visl_get_ref_frames(ctx, buf, TPG_STR_BUF_SZ, run); > > > > diff --git a/drivers/media/test-drivers/visl/visl.h > > b/drivers/media/test-drivers/visl/visl.h index 5a81b493f121..4ac2d1783020 > > 100644 > > --- a/drivers/media/test-drivers/visl/visl.h > > +++ b/drivers/media/test-drivers/visl/visl.h > > @@ -86,6 +86,7 @@ extern bool keep_bitstream_buffers; > > > > extern int bitstream_trace_frame_start; > > extern unsigned int bitstream_trace_nframes; > > extern bool stable_output; > > > > +extern bool codec_variability; > > > > #define frame_dprintk(dev, current, fmt, arg...) \ > > > > do { \ > > Regards, > > Hans --nextPart2250269.iZASKD2KPV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEonF9IvGrXNkDg+CX5EFKUk4x7bYFAmVeMbgACgkQ5EFKUk4x 7bbEgwf9FHsPocHfueH/kMUZBCVG54oUWXAp8/xnRXclmaGhbQ8W58q4rvF868aU QaF6Nt63eTSEMj9h9xyqjKQbZX9JT7YgvOtN6C+6og3cGdg5+0k8/wdjww/QCYvl 61EvpvrktJYt9+60g/bB4Vv2m5a1AzJdpuUvFb9vughsrEJpoEFNkaSb1STh5xPL frGUAPDP35aD2L1+gJa8mshRiadh9pGDp2k/uY1+LEq1AUly09TwxEyiIRSb/9VJ w2iZCRDeZgRVdZmaV6ImvkzNDxXaiiaYtcXF/Xmtu6A3asNkEDYXFn4vu2C8AjNw hVo1uyjutdQr2Mv4VM9ZsMc318S6pg== =buIh -----END PGP SIGNATURE----- --nextPart2250269.iZASKD2KPV--