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] [day] [month] [year] [list]
Message-ID: <0763eeea-ac0f-4e07-9678-dd7567a0f3be@kwiboo.se>
Date:   Thu, 9 Nov 2023 17:06:45 +0100
From:   Jonas Karlman <jonas@...boo.se>
To:     Nicolas Dufresne <nicolas.dufresne@...labora.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>
Cc:     kernel@...labora.com, linux-media@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/5] docs: uapi: media: Add common documentation of
 tiled NV15

On 2023-09-14 17:06, Nicolas Dufresne wrote:
> This way we don't have to repeat over and over how the pixels are
> packed in NV15.
> 
> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@...labora.com>
> ---
>  .../media/v4l/pixfmt-yuv-planar.rst           | 144 ++++++++++++++++--
>  1 file changed, 131 insertions(+), 13 deletions(-)
> 
> diff --git a/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst b/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst
> index 1d43532095c07..2f0e0c97870b2 100644
> --- a/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst
> +++ b/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst
> @@ -373,25 +373,143 @@ two non-contiguous planes.
>  Tiled NV15
>  ----------
>  
> -``V4L2_PIX_FMT_NV15_4L4`` Semi-planar 10-bit YUV 4:2:0 formats, using 4x4 tiling.
> -All components are packed without any padding between each other.
> -As a side-effect, each group of 4 components are stored over 5 bytes
> -(YYYY or UVUV = 4 * 10 bits = 40 bits = 5 bytes).
> +Semi-planar 10-bit YUV 4:2:0 formats. All components are packed
> +without any padding between each other. Each components group occupy 15

Each component (Y, Cb and Cr) is 10 bits in this format, the effective
bits per pixel is however 15 bits when number of pixels is aligned to 8.

For a 4x2 image:
8Y + 2Cb + 2Cr = 80 + 20 + 20 = 120 bits (15 bytes) => 15 bits per pixel

The 'Bits per component' in the table 'Overview of Semi-Planar YUV
Formats' is also showing 15, should be 10.

Regards,
Jonas

> +bits and are usually stored in group of 4 components stored over 5 bytes
> +(YYYY or UVUV = 4 * 10 bits = 40 bits = 5 bytes) or partitioned into
> +upper 8 bit and lower 2 bits. The final arrangement will vary depending if
> +the hardware operated in little or big endian.
> +

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ