lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4370a9db-73aa-9454-fdda-135ebe16ad08@xs4all.nl>
Date:	Fri, 15 Jul 2016 20:28:43 +0200
From:	Hans Verkuil <hverkuil@...all.nl>
To:	Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>,
	Mauro Carvalho Chehab <mchehab@....samsung.com>,
	Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
	Sakari Ailus <sakari.ailus@...ux.intel.com>,
	Antti Palosaari <crope@....fi>,
	Guennadi Liakhovetski <guennadi.liakhovetski@...el.com>,
	Helen Mae Koike Fornazier <helen.koike@...labora.co.uk>,
	Philipp Zabel <p.zabel@...gutronix.de>,
	Shuah Khan <shuahkh@....samsung.com>,
	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/6] [media] vivid: code refactor for color
 representation

On 07/15/2016 06:13 PM, Ricardo Ribalda Delgado wrote:
> Replace is_yuv with color_representation. Which can be used by HSV
> formats.
> 
> This change should ease the review of the following patches.
> 
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
> ---
>  drivers/media/common/v4l2-tpg/v4l2-tpg-core.c   | 44 ++++++++++++++-------
>  drivers/media/platform/vivid/vivid-core.h       |  2 +-
>  drivers/media/platform/vivid/vivid-vid-common.c | 52 ++++++++++++-------------
>  include/media/v4l2-tpg.h                        |  7 +++-
>  4 files changed, 63 insertions(+), 42 deletions(-)
> 
> diff --git a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
> index cf1dadd0be9e..acf0e6854832 100644
> --- a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
> +++ b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
> @@ -1842,7 +1842,9 @@ static void tpg_recalc(struct tpg_data *tpg)
>  
>  		if (tpg->quantization == V4L2_QUANTIZATION_DEFAULT)
>  			tpg->real_quantization =
> -				V4L2_MAP_QUANTIZATION_DEFAULT(!tpg->is_yuv,
> +				V4L2_MAP_QUANTIZATION_DEFAULT(
> +					tpg->color_representation ==
> +						TGP_COLOR_REPRESENTATION_RGB,

This should be != TGP_COLOR_REPRESENTATION_YUV.

Otherwise HSV would map to limited range by default, which is probably wrong.

Regards,

	Hans

>  					tpg->colorspace, tpg->real_ycbcr_enc);
>  
>  		tpg_precalculate_colors(tpg);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ