Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp10221rdd; Wed, 22 Nov 2023 08:08:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGchHaYQkvZxxGe4AndSdb/NaO3hHQpifQmmjYJcJdT026ip5Z0PR9ATwC2ayYcV+mLiTvI X-Received: by 2002:a05:6a20:441a:b0:18a:d4ea:1678 with SMTP id ce26-20020a056a20441a00b0018ad4ea1678mr4208458pzb.15.1700669308487; Wed, 22 Nov 2023 08:08:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700669308; cv=none; d=google.com; s=arc-20160816; b=XCh/KHP0c4EdmQvxzzMQYOdi4U2xcqoLniKAYScAJkhz1Vx4SdvjPiu4xcseviLN6F pwbXjfG0R2TVdGo80rO9alsu/eiXMe9RRPP/4oPFJzmQmlqelCSEyR7axo4P9hibN9tH 2alBD8d1K8cOuguloWk9UiqO7IQwZLITme3sx4nvHj0xT3P5P0k5mxiqR8MfpIXJweGL smsu4JzoRnpBFXxFdr/yocKFm64sEGqJAj0gkKIvIKJswcwV05QWJl4jSahQJ1cXQ7yK zV+JZ/dSn9NOHHtcaJoqOD9FQ8e95bnyEK48XlB4en+fOTJzxSipqnwuGlaj9smKBh+E Ylkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id; bh=0Z2D+RbzGZQOKzZoe7Y39nUeeDt4eLxkbQNzNUEB6XI=; fh=4bfq4JupAy3BlGL5GlAltfFW84hsq+1ayPo2NPz78Tc=; b=Jl/BX603oxrZVu9UGZcfW7UQ0tV6Q4TJv5gfhzaEMRut8rH0VPPoz1zsbYR3BeH7ms 0ByI+0nO7LhIVFiPW2ieB4Yc5KSatIzbVw4NxFlicvyYTo+meQNmDh+i0vd5mOQQVZo5 8bLS/umyO5z11a2lKXuYGFcHeWbHeNUrA9Uh5jnnB24W/od9xRYkb3ByU6Ubnt1282bD cA4QaNjH6dv0+Yh9c6IX/sdH8xPJaWgTnk7sjCvM0QbCoNKh1X4Rzuc+XCLdfaQCi0P9 745sPPx81Q5dR5NyIKw/JTJQeQu9AAZyS9Qdf9QC+txP+oZLha6ZmNS3p+D8DwuP/h1t kgRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id j4-20020a056a00130400b006c4ad151a62si13314685pfu.266.2023.11.22.08.08.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 08:08:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id EE5BB801B422; Wed, 22 Nov 2023 08:07:27 -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 S231286AbjKVQH1 (ORCPT + 99 others); Wed, 22 Nov 2023 11:07:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229806AbjKVQHZ (ORCPT ); Wed, 22 Nov 2023 11:07:25 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDBB492 for ; Wed, 22 Nov 2023 08:07:21 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61A79C433C7; Wed, 22 Nov 2023 16:07:20 +0000 (UTC) Message-ID: Date: Wed, 22 Nov 2023 17:07:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 4/5] visl: Add a codec specific variability parameter Content-Language: en-US, nl To: Detlev Casanova , linux-kernel@vger.kernel.org Cc: linux-media@vger.kernel.org, Daniel Almeida , Mauro Carvalho Chehab References: <20231024191027.305622-1-detlev.casanova@collabora.com> <20231024191027.305622-5-detlev.casanova@collabora.com> From: Hans Verkuil Autocrypt: addr=hverkuil@xs4all.nl; keydata= xsFNBFQ84W0BEAC7EF1iL4s3tY8cRTVkJT/297h0Hz0ypA+ByVM4CdU9sN6ua/YoFlr9k0K4 BFUlg7JzJoUuRbKxkYb8mmqOe722j7N3HO8+ofnio5cAP5W0WwDpM0kM84BeHU0aPSTsWiGR yw55SOK2JBSq7hueotWLfJLobMWhQii0Zd83hGT9SIt9uHaHjgwmtTH7MSTIiaY6N14nw2Ud C6Uykc1va0Wqqc2ov5ihgk/2k2SKa02ookQI3e79laOrbZl5BOXNKR9LguuOZdX4XYR3Zi6/ BsJ7pVCK9xkiVf8svlEl94IHb+sa1KrlgGv3fn5xgzDw8Z222TfFceDL/2EzUyTdWc4GaPMC E/c1B4UOle6ZHg02+I8tZicjzj5+yffv1lB5A1btG+AmoZrgf0X2O1B96fqgHx8w9PIpVERN YsmkfxvhfP3MO3oHh8UY1OLKdlKamMneCLk2up1Zlli347KMjHAVjBAiy8qOguKF9k7HOjif JCLYTkggrRiEiE1xg4tblBNj8WGyKH+u/hwwwBqCd/Px2HvhAsJQ7DwuuB3vBAp845BJYUU3 06kRihFqbO0vEt4QmcQDcbWINeZ2zX5TK7QQ91ldHdqJn6MhXulPKcM8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7TIoweP0RwDrcf5PVvwSWsRQp2LxFCkwnCXOra gYmkrmv0duG1FStpY+IIQn1TOkuXrciTVfZY1cZD0aVxwlxXBnUNZZNslldvXFtndxR0SFat sflovhDxKyhFwXOP0Rv8H378/+14TaykknRBIKEc0+lcr+EMOSUR5eg4aURb8Gc3Uc7fgQ6q UssTXzHPyj1hAyDpfu8DzAwlh4kKFTodxSsKAjI45SLjadSc94/5Gy8645Y1KgBzBPTH7Q== In-Reply-To: <20231024191027.305622-5-detlev.casanova@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,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:07:28 -0800 (PST) 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. > + > 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? > + 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