About YUV Pack (condensed format) and planner (flat format) format [go]

Source: Internet
Author: User

About YUV Format

The YUV format typically has two main classes: the packaged (packed) format and the planar format. The former stores the YUV components in the same array,
Usually several neighboring pixels make up a macro pixel (Macro-pixel), and the latter uses three arrays to store the YUV three components separately, just like
Is the same as a three-dimensional plane.

Several common YUV formats

1.yuv422 Planar

Here, the y\u\v data is stored separately, every two horizontal Y sampling points, there is a CB and a CR sampling point, such as

Definition of ffmpeg in pix_fmt_yuv422p,///< planar YUV 4:2:2, 16BPP, (1 Cr & Cb sample per 2x1 Y samples)

Android OMX is defined in Omx_color_formatyuv422planar//* yuv422planar:three arrays y,u,v.

2. YUV420 Planar

This format is similar to YUV422 Planar, but the sample for CB and CR is reduced to 2:1 in both horizontal and vertical directions, such as

FFmpeg defined in pix_fmt_yuv420p//< planar YUV 4:2:0, 12BPP, (1 Cr & Cb sample per 2x2 Y samples)

Android OMX definition Omx_color_formatyuv420planar//* Yuv420planar:three Arrays Y,u,v

3.yuv422 Semi-planar Semi is ' half ' meaning my understanding of this half-plane pattern

The amount of data in this format is the same as that of YUV422 planar, but U and v are cross-stored, as in.

Definition not found in FFmpeg

Android OMX Omx_color_formatyuv422semiplanar////yuv422semiplanar:two arrays, one is all Y, and the other is U and V

4.yuv420 Semi-planar

The amount of data in this format is the same as that of YUV420 planar, but U and v are cross-stored, as in.

Defined in FFmpeg

PIX_FMT_NV12,///< planar YUV 4:2:0, 12BPP, 1 plane for Y and 1 plane for the UV components, which is interleaved (First byte U and the following byte V)

Android OMX defines Omx_color_formatyuv420semiplanar//yuv420semiplanar:two arrays, one is all Y, and the other is U and V

5.yuv422 Interleaved interleaved--staggered

The amount of data in this format is the same as YUV422 planar, but y, U, v are cross-stored, such as. This is a packaged (packed) mode

FFmpeg pix_fmt_uyvy422///< packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1

Android OMX Omx_color_formatcbycry//cbycry:organized as 16bit UYVY (i.e. cbycry)


24bit RGB888-16bit RGB565 Conversion

24IBT RGB888 R7 R6 R5 R4 R3 R2 R1 R0 G7 G6 G5 G4 G3 G2 G1 G0 B7 B6 B5 B4 B3 B2 B1 B0

16bit RGB656 R7 R6 R5 R4 R3 G7 G6 G5 G4 G3 G2 B7 B6 B5 B4 B3

Not finished

About YUV Pack (condensed format) and planner (flat format) format [go]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.