Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp458416rdb; Wed, 17 Jan 2024 07:13:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHbt2AyoZjcaJqZGYoHKn17nfzAqskgcso38jifGTUc4tf1uwFvduPdmgtumj+wcKX9PrVI X-Received: by 2002:a17:907:20ef:b0:a27:97a5:2424 with SMTP id rh15-20020a17090720ef00b00a2797a52424mr1066810ejb.41.1705504420673; Wed, 17 Jan 2024 07:13:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705504420; cv=pass; d=google.com; s=arc-20160816; b=MqS914sCb14innt5DPjylCyfJZ6aGDvGH7w1Wlvdpn7jp0XdITGGgPiMR8p47mn7ON kwReMH8vYNUvNiUn5KdWc/J4mL+Wt54ZjwE+mMsrSJQ7jN41y7xxmdSS55U1Gn6hYkoM fdveloiW6yqn8YS3/FZ07AD/wWs+rZKPdaH05pd7+BsEjrn1mEf3okrSbQfByisJRYgJ u3o+pTVU7Ex4RKO2gzY766yZbwQS1CqQ8SNtWkdOnsAGFtsvdndcsv2aKOgq1gYz21qR yki1CAFvvXqPMaIZCwSBNCPau85w4qnIADhWaG2KIJYHWKHx4i04IwDkFJuyOOoUi9lS twGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=GmJFr/31mTRIFvy6ITiQ03U7DR0L45T+i7DQ0xrxZwo=; fh=bEUUkxCtcWAoM+0QUmhtNDixjAfHmPTjnsrsFCDjYhU=; b=b0EbqwHmTqTn5HgvBFfBh5foDFRGvQTTwOovA1eMTNeHiU3jUgAjbfcu7f2Jt9jkpe sLxxZOORiIs2UFrfnXT8UuN41HD2s3TRi38BTTsOoApAlh2ex1BicZ9KgFvYmVVU5cyc G/mnfGumPv3a4ahgWId5Et3i5C9r4up2rxtW7YWKxBiuhlwAMcdtClqqUvqex/Xjntsd lSOAguzRcSHTfnFuBf7m/NGTHTXp/yNVg9KgHSjUfO2Tf5V1X7+soszgpQEgsRqExz/B raWdRCmDy2eaRdvFJCyIDyvfqnKXHZP/UdZ/RZ7/EGZ37zFoibJIAkt0oYL2+O8T+PJO swtw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=WueU6Fx7; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-29134-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29134-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id kg20-20020a17090776f400b00a2cfe9dd288si4375042ejc.701.2024.01.17.07.13.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 07:13:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29134-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=WueU6Fx7; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-29134-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29134-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6B28D1F229A9 for ; Wed, 17 Jan 2024 15:13:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A3A49225CC; Wed, 17 Jan 2024 15:12:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="WueU6Fx7" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59A95224C6; Wed, 17 Jan 2024 15:12:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705504338; cv=none; b=PD9WRQrIomyz847HRPzrfMrf55XHFYBD7F9kKECAJw3b9xvy4KzvyuxB9aArN6A7Tol0CiaQlkUYB2nymnYvyZ4Vbx43VAj59B+bZwRasUMy5n0v1qIl4Uv8wdcmZR46MpnoHKMmvbvGAtTG+KjVYtnPWq80nTqpYlxtqsSyK1U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705504338; c=relaxed/simple; bh=YvV1/JkCbzQT0j8DI4iZqxHvsPZ+nnCbsag0eB+AyhY=; h=DKIM-Signature:Received:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; b=izHjRkFT5d/wbxpor8uiNo1cVi/AcnhEqYpfeKS1rvY3eyGmE+wbR8g1NuSdfAPTF33VDmt1eugSoXbHQJBe8pwvdW2D82mb0nFoi5hwZ2LRRlqTlyY96cPsLfRivXG+5Mm+dcEf8Dy3XuKMqpUOvnqE/KWqlQAPvb11/byb2RY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=WueU6Fx7; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705504335; bh=YvV1/JkCbzQT0j8DI4iZqxHvsPZ+nnCbsag0eB+AyhY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WueU6Fx7NT8BEXRelCzVECi8C0NRwNZSidN4uV2UCe8WF4Uw+KgJFVI2jY7iFuWB6 LjDOVQA6aFqNZxddyniFF3i140Zm+c0EottykV2XrqECvq+c363ayDa8pXojiqKdsN 3aME0ak3066SPQvhkUPk3N01TxVACOfL0VSQt+I4BAT3qaHravqNb2eb6DjFe/ntFj dlTTfYfyJfrthgaiyQTR2aT6lqynr2lGyahZPCQScxMnc9YO3xk5sHz5ThcEh1Tr6l gyPdKfvfBEreZzVxW2mkSYs7bCuWoOZbJe2Tu6tKL34UAsKlKMSKofkWEuHIimO6cN JjG5I+Y8sCOqw== Received: from arisu.hitronhub.home (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 madrid.collaboradmins.com (Postfix) with ESMTPSA id 809B63782070; Wed, 17 Jan 2024 15:12:14 +0000 (UTC) From: Detlev Casanova To: linux-kernel@vger.kernel.org Cc: linux-media@vger.kernel.org, Daniel Almeida , Mauro Carvalho Chehab , Hans Verkuil , Detlev Casanova Subject: [PATCH v5 4/4] visl: Add codec specific variability on output frames Date: Wed, 17 Jan 2024 10:10:18 -0500 Message-ID: <20240117151202.405426-5-detlev.casanova@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240117151202.405426-1-detlev.casanova@collabora.com> References: <20240117151202.405426-1-detlev.casanova@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-dec.c | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/drivers/media/test-drivers/visl/visl-dec.c b/drivers/media/test-drivers/visl/visl-dec.c index 4933caa4f2a6..1540948119ca 100644 --- a/drivers/media/test-drivers/visl/visl-dec.c +++ b/drivers/media/test-drivers/visl/visl-dec.c @@ -295,6 +295,35 @@ static void visl_tpg_fill_sequence(struct visl_ctx *ctx, " top" : " bottom") : "none"); } +static bool visl_tpg_fill_codec_specific(struct visl_ctx *ctx, + struct visl_run *run, + char buf[], size_t bufsz) +{ + /* + * To add variability, we need a value that is stable for a given + * input but is different than already shown fields. + * The pic order count value defines the display order of the frames + * (which can be different than the decoding order that is shown with + * the sequence number). + * Therefore it is stable for a given input and will add a different + * value that is more specific to the way the input is encoded. + */ + 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; + default: + return false; + } + + return true; +} + static void visl_tpg_fill(struct visl_ctx *ctx, struct visl_run *run) { u8 *basep[TPG_MAX_PLANES][2]; @@ -327,6 +356,13 @@ static void visl_tpg_fill(struct visl_ctx *ctx, struct visl_run *run) frame_dprintk(ctx->dev, run->dst->sequence, ""); line++; + if (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++; + } + visl_get_ref_frames(ctx, buf, TPG_STR_BUF_SZ, run); while ((line_str = strsep(&tmp, "\n")) && strlen(line_str)) { -- 2.43.0