--- zzzz-none-000/linux-3.10.107/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml 2021-02-04 17:41:59.000000000 +0000 @@ -15,9 +15,6 @@ per pixel. These are all packed-pixel formats, meaning all the data for a pixel lie next to each other in memory. - When one of these formats is used, drivers shall report the -colorspace V4L2_COLORSPACE_SRGB. - Packed RGB Image Formats @@ -121,18 +118,18 @@ V4L2_PIX_FMT_RGB332 'RGB1' - b1 - b0 - g2 - g1 - g0 r2 r1 r0 + g2 + g1 + g0 + b1 + b0 - - V4L2_PIX_FMT_RGB444 - 'R444' + + V4L2_PIX_FMT_ARGB444 + 'AR12' g3 g2 @@ -152,132 +149,159 @@ r1 r0 - - V4L2_PIX_FMT_RGB555 - 'RGBO' + + V4L2_PIX_FMT_XRGB444 + 'XR12' + g3 g2 g1 g0 - r4 + b3 + b2 + b1 + b0 + + - + - + - + - r3 r2 r1 r0 + + + V4L2_PIX_FMT_ARGB555 + 'AR15' - a + g2 + g1 + g0 b4 b3 b2 b1 b0 - g4 - g3 - - - V4L2_PIX_FMT_RGB565 - 'RGBP' - g2 - g1 - g0 + a r4 r3 r2 r1 r0 - - b4 - b3 - b2 - b1 - b0 - g5 g4 g3 - - V4L2_PIX_FMT_RGB555X - 'RGBQ' + + V4L2_PIX_FMT_XRGB555 + 'XR15' - a + g2 + g1 + g0 b4 b3 b2 b1 b0 - g4 - g3 - g2 - g1 - g0 + - r4 r3 r2 r1 r0 + g4 + g3 - - V4L2_PIX_FMT_RGB565X - 'RGBR' + + V4L2_PIX_FMT_RGB565 + 'RGBP' + g2 + g1 + g0 b4 b3 b2 b1 b0 + + r4 + r3 + r2 + r1 + r0 g5 g4 g3 + + + V4L2_PIX_FMT_ARGB555X + 'AR15' | (1 << 31) - g2 - g1 - g0 + a r4 r3 r2 r1 r0 - - - V4L2_PIX_FMT_BGR666 - 'BGRH' + g4 + g3 - b5 + g2 + g1 + g0 b4 b3 b2 b1 b0 - g5 - g4 + + + V4L2_PIX_FMT_XRGB555X + 'XR15' | (1 << 31) + - + r4 + r3 + r2 + r1 + r0 + g4 g3 + g2 g1 g0 - r5 + b4 + b3 + b2 + b1 + b0 + + + V4L2_PIX_FMT_RGB565X + 'RGBR' + r4 r3 r2 - r1 r0 + g5 + g4 + g3 - - - - - - - - - - - - - + g2 + g1 + g0 + b4 + b3 + b2 + b1 + b0 V4L2_PIX_FMT_BGR24 @@ -341,9 +365,49 @@ b1 b0 - - V4L2_PIX_FMT_BGR32 - 'BGR4' + + V4L2_PIX_FMT_BGR666 + 'BGRH' + + b5 + b4 + b3 + b2 + b1 + b0 + g5 + g4 + + g3 + g2 + g1 + g0 + r5 + r4 + r3 + r2 + + r1 + r0 + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + + + V4L2_PIX_FMT_ABGR32 + 'AR24' b7 b6 @@ -381,9 +445,58 @@ a1 a0 - - V4L2_PIX_FMT_RGB32 - 'RGB4' + + V4L2_PIX_FMT_XBGR32 + 'XR24' + + b7 + b6 + b5 + b4 + b3 + b2 + b1 + b0 + + g7 + g6 + g5 + g4 + g3 + g2 + g1 + g0 + + r7 + r6 + r5 + r4 + r3 + r2 + r1 + r0 + + - + - + - + - + - + - + - + - + + + V4L2_PIX_FMT_ARGB32 + 'BA24' + + a7 + a6 + a5 + a4 + a3 + a2 + a1 + a0 r7 r6 @@ -411,28 +524,77 @@ b2 b1 b0 + + + V4L2_PIX_FMT_XRGB32 + 'BX24' + + - + - + - + - + - + - + - + - - a7 - a6 - a5 - a4 - a3 - a2 - a1 - a0 + r7 + r6 + r5 + r4 + r3 + r2 + r1 + r0 + + g7 + g6 + g5 + g4 + g3 + g2 + g1 + g0 + + b7 + b6 + b5 + b4 + b3 + b2 + b1 + b0
- Bit 7 is the most significant bit. The value of a = alpha -bits is undefined when reading from the driver, ignored when writing -to the driver, except when alpha blending has been negotiated for a -Video Overlay or -Video Output Overlay or when alpha component has been configured -for a Video Capture by means of V4L2_CID_ALPHA_COMPONENT - control. + Bit 7 is the most significant bit. + + The usage and value of the alpha bits (a) in the ARGB and ABGR formats + (collectively referred to as alpha formats) depend on the device type and + hardware operation. Capture devices + (including capture queues of mem-to-mem devices) fill the alpha component in + memory. When the device outputs an alpha channel the alpha component will + have a meaningful value. Otherwise, when the device doesn't output an alpha + channel but can set the alpha bit to a user-configurable value, the V4L2_CID_ALPHA_COMPONENT + control is used to specify that alpha value, and the alpha component + of all pixels will be set to the value specified by that control. Otherwise + a corresponding format without an alpha component (XRGB or XBGR) must be + used instead of an alpha format. + + Output devices (including output queues + of mem-to-mem devices and video output overlay + devices) read the alpha component from memory. When the device processes the + alpha channel the alpha component must be filled with meaningful values by + applications. Otherwise a corresponding format without an alpha component + (XRGB or XBGR) must be used instead of an alpha format. + + The XRGB and XBGR formats contain undefined bits (-). Applications, + devices and drivers must ignore those bits, for both capture and output + devices. <constant>V4L2_PIX_FMT_BGR24</constant> 4 × 4 pixel @@ -512,16 +674,14 @@ </formalpara> </example> - <important> - <para>Drivers may interpret these formats differently.</para> - </important> - - <para>Some RGB formats above are uncommon and were probably -defined in error. Drivers may interpret them as in <xref - linkend="rgb-formats-corrected" />.</para> + <para>Formats defined in <xref linkend="rgb-formats-deprecated"/> are + deprecated and must not be used by new drivers. They are documented here for + reference. The meaning of their alpha bits (a) is ill-defined and + interpreted as in either the corresponding ARGB or XRGB format, depending on + the driver.</para> - <table pgwide="1" frame="none" id="rgb-formats-corrected"> - <title>Packed RGB Image Formats (corrected) + + Deprecated Packed RGB Image Formats @@ -618,21 +778,8 @@ 0 - - - V4L2_PIX_FMT_RGB332 - 'RGB1' - - r2 - r1 - r0 - g2 - g1 - g0 - b1 - b0 - - + + V4L2_PIX_FMT_RGB444 'R444' @@ -654,7 +801,7 @@ r1 r0 - + V4L2_PIX_FMT_RGB555 'RGBO' @@ -676,29 +823,7 @@ g4 g3 - - V4L2_PIX_FMT_RGB565 - 'RGBP' - - g2 - g1 - g0 - b4 - b3 - b2 - b1 - b0 - - r4 - r3 - r2 - r1 - r0 - g5 - g4 - g3 - - + V4L2_PIX_FMT_RGB555X 'RGBQ' @@ -720,130 +845,7 @@ b1 b0 - - V4L2_PIX_FMT_RGB565X - 'RGBR' - - r4 - r3 - r2 - r1 - r0 - g5 - g4 - g3 - - g2 - g1 - g0 - b4 - b3 - b2 - b1 - b0 - - - V4L2_PIX_FMT_BGR666 - 'BGRH' - - b5 - b4 - b3 - b2 - b1 - b0 - g5 - g4 - - g3 - g2 - g1 - g0 - r5 - r4 - r3 - r2 - - r1 - r0 - - - - - - - - - - - - - - - - - V4L2_PIX_FMT_BGR24 - 'BGR3' - - b7 - b6 - b5 - b4 - b3 - b2 - b1 - b0 - - g7 - g6 - g5 - g4 - g3 - g2 - g1 - g0 - - r7 - r6 - r5 - r4 - r3 - r2 - r1 - r0 - - - V4L2_PIX_FMT_RGB24 - 'RGB3' - - r7 - r6 - r5 - r4 - r3 - r2 - r1 - r0 - - g7 - g6 - g5 - g4 - g3 - g2 - g1 - g0 - - b7 - b6 - b5 - b4 - b3 - b2 - b1 - b0 - - + V4L2_PIX_FMT_BGR32 'BGR4' @@ -883,7 +885,7 @@ a1 a0 - + V4L2_PIX_FMT_RGB32 'RGB4'