About yuv format
There are generally two categories of YUV formats: packed format and planar format. The former stores the YUV components in the same array,
Usually several adjacent pixels form a macro-pixel; the latter uses three arrays to store the three components of YUV 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. For every two horizontal Y sampling points, there is a Cb and a Cr sampling point, as shown below
Definition in ffmpeg PIX_FMT_YUV422P, /// <planar YUV 4: 2: 2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition in android OMX OMX_COLOR_FormatYUV422Planar // ** YUV422Planar: Three arrays Y, U, V.
2. YUV420 Planar
This format is similar to YUV422 Planar, but the sampling of Cb and Cr is reduced to 2: 1 in both horizontal and vertical directions, as shown below
Defined in ffmpeg PIX_FMT_YUV420P /// <planar YUV 4: 2: 0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Defined in Android OMX OMX_COLOR_FormatYUV420Planar // // UV * YUV420Planar: Three arrays Y, U, V
3.YUV422 Semi-Planar ”” ”” ”” ”” ”” ”” ”” ”” Semi ”mean” half ”I understand this half plane pattern
The data volume in this format is the same as that in YUV422 Planar, but U and V are stored alternately, as shown below.
No definition found in ffmpeg
android OMX OMX_COLOR_FormatYUV422SemiPlanar ///// YUV422SemiPlanar: Two arrays, one is all Y, the other is U and V
4.YUV420 Semi-Planar
The data volume in this format is the same as that in YUV420 Planar, but U and V are stored alternately, as shown below.
Defined in ffmpeg
PIX_FMT_NV12, ///< planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V)
Android OMX is defined in OMX_COLOR_FormatYUV420SemiPlanar // YUV420SemiPlanar: Two arrays, one is all Y, the other is U and V
5. YUV422 Interleaved Interleaved-Interleaved
The amount of data in this format is the same as that of YUV422 Planar, but Y, U, and V are stored alternately, as shown below. This is packed mode
ffmpeg PIX_FMT_UYVY422 //// packed YUV 4: 2: 2, 16bpp, Cb Y0 Cr Y1
android OMX_OMX_COLOR_FormatCbYCrY // CbYCrY // 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
topic: Naked half-plane intersection, WA after N times really sighs the accuracy of O2 is really DT, after changing to long double also found that can actually output -0 amount. . . Hey~ Code:...
[title] has n half-planes (limited finite) on a finite large (-10 0000<=x, y<=10 0000) plane coordinate system, each half plane is given A directed line segment (x1, y1) -> (x2, y2). The effe...
Plannar mode: three -dimensional opening storage Storage in avframe :: data [] as follows: Data [0] --- y1, y2, y3, y4, y5, y6, y7, y8 ..., y16, ... data [1] --- U component, U1, U2, U3, U4 ... data [...
Title description If the undirected graph G = (V, E) can be drawn on a plane so that any two edges without coincident vertices do not intersect, then G is called a plane graph. The problem of determin...
[Title] Given a graph with a Hamiltonian circuit (the circuit will be given). Determine if it is a floor plan. 【analysis】 It was 2-SAT. Since there is a Hamiltonian loop, let's ignore the other edges ...
Title link Think First, with that ring as a frame, all edges are connected. If there are two edges intersect, then put one of the rings to the ring. Figure: \((1,3)\)and\ ((2,5) intersect, \)(1,4)\(an...
This topic is not difficult. You can complete it with memory search. It is to pay attention to the value of each time you find the value. ...
Y: luminance component UV: chrominance component YUV4: 2:2 or 4:2:0 refers to the average ratio of the Y component and the UV component occupying one pixel. YUV422: The UV component in the horizontal ...
On YUV422 (YUYV) with interchangeable YUV420 Example 2.13. V4L2_PIX_FMT_YUYV 4 × 4 pixelimage start + 0: Y'00 Cb00 Y'01 Cr00 Y'02 Cb01 Y'03 Cr01 start + 8: Y'1...
For compatibility with black and white TV and color television sets, instead of introducing YUV format RGB, where Y represents the luminance, U and V represent chrominance. Only black and white TV sig...