You copied the Doc URL to your clipboard.

How do I configure the YUV output in Lloyd?

Article ID: 241420745

Published date: 05 Sep 2018

Last updated: -

Applies to: Image Signal Processors

Problem/Question

How do I configure the YUV output in Lloyd?

Scenario

N/A

Answer

YUV formats can be divided into two groups as below:

  • The packed formats (NV12) where Y, U (Cb), and V (Cr) samples are packed together into macropixels, which are stored in a single array.

  • The planar formats (I420) where each component is stored as a separate array. The three separate planes fuse into the final image.

Sorted by subsampling intervals in horizontal and vertical directions, there are YUV444, YUV422, and YUV420.

In the Lloyd ISP pipeline, color space is in the RGB domain after demosaicing. If you want to get YUV output, you must convert RGB format to YUV format.

The following figure shows you the Lloyd Image Signal Processor (ISP) pipeline:

images/isp_pipeline.png

Figure 1. Lloyd ISP pipeline

Use the Act Control tool to configure the following hardware registers:

  • fr cs conv

  • fr dma writer

  • fr uv dma writer

The hardware register: fr cs conv

The following figure shows you the parameters for configuring the hardware register fr cs conv:

images/fr_cs_conv_register.png

Figure 2. Hardware register fr cs conv

The two parameters Enable Horizontal downsample and Enable vertical downsample are used for YUV420 and YUV422. For example, YUV420 has horizontal and vertical downsample, and YUV422 has only horizontal downsample.

All YUV formats use the same Coefft matrix as configuration in Figure 2:

images/matrices.png

The hardware register: fr dma writer

The following figure shows you the parameters for configuring the hardware register fr dma writer:

images/fr_dma_writer_register.png

Figure 3. Hardware register fr dma writer

Configure the Y channel according to the parameters Base mode and Plane select. For details, see the Mali-IV009 Technical Reference Manual in the product bundle . Get the Y channel output by reading the address stored at the bank0_base parameter.

The hardware register: fr uv dma writer

The following figure shows you the parameters for configuring the hardware register fr dma writer:

images/fr_uv_dma_writer_register.png

Figure 4. Hardware register fr uv dma writer

Configure the UV channel according to the parameters Base mode and Plane select. Get the UV channels output by reading the address stored at the bank0_base parameter.

Method to verify YUV format output

The outputs of Y channel and UV channels are stored at different addresses. However, YUV viewer tools, such as YUVplayer, normally support only YUV files. Y and UV channels are combined into one YUV file. Therefore, Y and UV channels must be combined into one file. The sample codes for combining Y and UV channels are provided in the attached file Sample_codes_for_Y_and_UV_combination.c.

To use the combination C source file to verify YUV format output, enter the following commands:

  1. gcc combination.c -o combination

  2. ./combination -h

Workaround

N/A

Example

N/A

Related Information

None.

Was this page helpful? Yes No