Skip to contentSkip to conversation

add planar YUV 4:4:4 format

PATCH New Daniel Glöckner 2 participants 3 messages Mar 26, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add planar YUV 4:4:4 format

Add YUV 4:4:4 planar format to list of fourcc codes supported.

---
 include/linux/videodev2.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
include/linux/videodev2.h +1 -0
index 5571dbe..6ecdc96 100644
@@ -294,6 +294,7 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_YUYV    v4l2_fourcc('Y', 'U', 'Y', 'V') /* 16  YUV 4:2:2     */
 #define V4L2_PIX_FMT_UYVY    v4l2_fourcc('U', 'Y', 'V', 'Y') /* 16  YUV 4:2:2     */
 #define V4L2_PIX_FMT_VYUY    v4l2_fourcc('V', 'Y', 'U', 'Y') /* 16  YUV 4:2:2     */
+#define V4L2_PIX_FMT_YUV444P v4l2_fourcc('4', '4', '4', 'P') /* 24  YUV444 planar */
 #define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4', '2', '2', 'P') /* 16  YVU422 planar */
 #define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4', '1', '1', 'P') /* 16  YVU411 planar */
 #define V4L2_PIX_FMT_Y41P    v4l2_fourcc('Y', '4', '1', 'P') /* 12  YUV 4:1:1     */
Signature · 1 line
1.6.2.107.ge47ee
#1 lore raw

PATCH 1/1 add documentation for planar YUV 4:4:4 format

This patch adds the planar YUV 4:4:4 format to the v4l2 specification.

v4l2-spec/Makefile +1 -0
diff -r 55df63b82fef -r bd23aedbd597 v4l2-spec/Makefile
@@ -48,6 +48,7 @@
 	pixfmt-yuv411p.sgml \
 	pixfmt-yuv420.sgml \
 	pixfmt-yuv422p.sgml \
+	pixfmt-yuv444p.sgml \
 	pixfmt-yuyv.sgml \
 	pixfmt-yvyu.sgml \
 	pixfmt.sgml \
v4l2-spec/pixfmt-yuv444p.sgml new file +171 -0

171 lines not on this page · raw message

v4l2-spec/pixfmt.sgml +1 -0
diff -r 55df63b82fef -r bd23aedbd597 v4l2-spec/pixfmt.sgml
@@ -596,6 +596,7 @@
     &sub-y41p;
     &sub-yuv420;
     &sub-yuv410;
+    &sub-yuv444p;
     &sub-yuv422p;
     &sub-yuv411p;
     &sub-nv12;
#2 lore raw

Re: [patch] add documentation for planar YUV 4:4:4 format

Quoted 26 lines · Daniel Glöckner

This patch adds the planar YUV 4:4:4 format to the v4l2 specification.

diff -r 55df63b82fef -r bd23aedbd597 v4l2-spec/Makefile

v4l2-spec/Makefile +1 -0
@@ -48,6 +48,7 @@
 	pixfmt-yuv411p.sgml \
 	pixfmt-yuv420.sgml \
 	pixfmt-yuv422p.sgml \
+	pixfmt-yuv444p.sgml \
 	pixfmt-yuyv.sgml \
 	pixfmt-yvyu.sgml \
 	pixfmt.sgml \

diff -r 55df63b82fef -r bd23aedbd597 v4l2-spec/pixfmt-yuv444p.sgml

v4l2-spec/pixfmt-yuv444p.sgml new file +7 -0
@@ -0,0 +1,171 @@
+    <refentry id="V4L2-PIX-FMT-YUV444P">
+      <refmeta>
+	<refentrytitle>V4L2_PIX_FMT_YUV444P ('444P')</refentrytitle>
+	&manvol;
+      </refmeta>
+      <refnamediv>
+	<refname><constant>V4L2_PIX_FMT_YUV444P</constant></refname>

v4l2-spec/pixfmt-yuv444p.sgml line 17

Quoted 10 lines
v4l2-spec/pixfmt-yuv444p.sgml new file +10 -0
+	<refpurpose>Format with full horizontal and vertical chroma resolution,
+also known as YUV 4:4:4. Planar layout</refpurpose>
+      </refnamediv>
+      <refsect1>
+	<title>Description</title>
+
+	<para>This format is not commonly used. The three components are
+separated into three sub-images or planes. The Y plane is first. The Cb plane
+immediately follows the Y plane in memory. Following the Cb plane is the Cr
+plane. All planes have on byte per pixel.</para>

s/on/one/

Regards,
Andy

Quoted 169 lines
v4l2-spec/pixfmt-yuv444p.sgml new file +153 -0
+	<para>If the Y plane has pad bytes after each row, then the Cr
+and Cb planes have the same number of pad bytes after their rows. In other
+words, one Cx row (including padding) is exactly as long as one Y row
+(including padding).</para>
+
+	<example>
+	  <title><constant>V4L2_PIX_FMT_YUV444P</constant> 4 &times; 4
+pixel image</title>
+
+	  <formalpara>
+	    <title>Byte Order.</title>
+	    <para>Each cell is one byte.
+		<informaltable frame="none">
+		<tgroup cols="5" align="center">
+		  <colspec align="left" colwidth="2*">
+		  <tbody valign="top">
+		    <row>
+		      <entry>start&nbsp;+&nbsp;0:</entry>
+		      <entry>Y'<subscript>00</subscript></entry>
+		      <entry>Y'<subscript>01</subscript></entry>
+		      <entry>Y'<subscript>02</subscript></entry>
+		      <entry>Y'<subscript>03</subscript></entry>
+		    </row>
+		    <row>
+		      <entry>start&nbsp;+&nbsp;4:</entry>
+		      <entry>Y'<subscript>10</subscript></entry>
+		      <entry>Y'<subscript>11</subscript></entry>
+		      <entry>Y'<subscript>12</subscript></entry>
+		      <entry>Y'<subscript>13</subscript></entry>
+		    </row>
+		    <row>
+		      <entry>start&nbsp;+&nbsp;8:</entry>
+		      <entry>Y'<subscript>20</subscript></entry>
+		      <entry>Y'<subscript>21</subscript></entry>
+		      <entry>Y'<subscript>22</subscript></entry>
+		      <entry>Y'<subscript>23</subscript></entry>
+		    </row>
+		    <row>
+		      <entry>start&nbsp;+&nbsp;12:</entry>
+		      <entry>Y'<subscript>30</subscript></entry>
+		      <entry>Y'<subscript>31</subscript></entry>
+		      <entry>Y'<subscript>32</subscript></entry>
+		      <entry>Y'<subscript>33</subscript></entry>
+		    </row>
+		    <row>
+		      <entry>start&nbsp;+&nbsp;16:</entry>
+		      <entry>Cb<subscript>00</subscript></entry>
+		      <entry>Cb<subscript>01</subscript></entry>
+		      <entry>Cb<subscript>02</subscript></entry>
+		      <entry>Cb<subscript>03</subscript></entry>
+		    </row>
+		    <row>
+		      <entry>start&nbsp;+&nbsp;20:</entry>
+		      <entry>Cb<subscript>10</subscript></entry>
+		      <entry>Cb<subscript>11</subscript></entry>
+		      <entry>Cb<subscript>12</subscript></entry>
+		      <entry>Cb<subscript>13</subscript></entry>
+		    </row>
+		    <row>
+		      <entry>start&nbsp;+&nbsp;24:</entry>
+		      <entry>Cb<subscript>20</subscript></entry>
+		      <entry>Cb<subscript>21</subscript></entry>
+		      <entry>Cb<subscript>22</subscript></entry>
+		      <entry>Cb<subscript>23</subscript></entry>
+		    </row>
+		    <row>
+		      <entry>start&nbsp;+&nbsp;28:</entry>
+		      <entry>Cb<subscript>30</subscript></entry>
+		      <entry>Cb<subscript>31</subscript></entry>
+		      <entry>Cb<subscript>32</subscript></entry>
+		      <entry>Cb<subscript>33</subscript></entry>
+		    </row>
+		    <row>
+		      <entry>start&nbsp;+&nbsp;32:</entry>
+		      <entry>Cr<subscript>00</subscript></entry>
+		      <entry>Cr<subscript>01</subscript></entry>
+		      <entry>Cr<subscript>02</subscript></entry>
+		      <entry>Cr<subscript>03</subscript></entry>
+		    </row>
+		    <row>
+		      <entry>start&nbsp;+&nbsp;36:</entry>
+		      <entry>Cr<subscript>10</subscript></entry>
+		      <entry>Cr<subscript>11</subscript></entry>
+		      <entry>Cr<subscript>12</subscript></entry>
+		      <entry>Cr<subscript>13</subscript></entry>
+		    </row>
+		    <row>
+		      <entry>start&nbsp;+&nbsp;40:</entry>
+		      <entry>Cr<subscript>20</subscript></entry>
+		      <entry>Cr<subscript>21</subscript></entry>
+		      <entry>Cr<subscript>22</subscript></entry>
+		      <entry>Cr<subscript>23</subscript></entry>
+		    </row>
+		    <row>
+		      <entry>start&nbsp;+&nbsp;44:</entry>
+		      <entry>Cr<subscript>30</subscript></entry>
+		      <entry>Cr<subscript>31</subscript></entry>
+		      <entry>Cr<subscript>32</subscript></entry>
+		      <entry>Cr<subscript>33</subscript></entry>
+		    </row>
+		  </tbody>
+		</tgroup>
+		</informaltable>
+	      </para>
+	  </formalpara>
+
+	  <formalpara>
+	    <title>Color Sample Location.</title>
+	    <para>
+		<informaltable frame="none">
+		<tgroup cols="5" align="center">
+		  <tbody valign="top">
+		    <row>
+		      <entry></entry>
+		      <entry>0</entry><entry>1</entry>
+		      <entry>2</entry><entry>3</entry>
+		    </row>
+		    <row>
+		      <entry>0</entry>
+		      <entry>Y/C</entry><entry>Y/C</entry>
+		      <entry>Y/C</entry><entry>Y/C</entry>
+		    </row>
+		    <row>
+		      <entry>1</entry>
+		      <entry>Y/C</entry><entry>Y/C</entry>
+		      <entry>Y/C</entry><entry>Y/C</entry>
+		    </row>
+		    <row>
+		      <entry>2</entry>
+		      <entry>Y/C</entry><entry>Y/C</entry>
+		      <entry>Y/C</entry><entry>Y/C</entry>
+		    </row>
+		    <row>
+		      <entry>3</entry>
+		      <entry>Y/C</entry><entry>Y/C</entry>
+		      <entry>Y/C</entry><entry>Y/C</entry>
+		    </row>
+		  </tbody>
+		</tgroup>
+		</informaltable>
+	      </para>
+	  </formalpara>
+	</example>
+      </refsect1>
+    </refentry>
+
+  <!--
+Local Variables:
+mode: sgml
+sgml-parent-document: "pixfmt.sgml"
+indent-tabs-mode: nil
+End:
+  -->

diff -r 55df63b82fef -r bd23aedbd597 v4l2-spec/pixfmt.sgml

v4l2-spec/pixfmt.sgml +1 -1
@@ -596,6 +596,7 @@
     &sub-y41p;
     &sub-yuv420;
     &sub-yuv410;
+    &sub-yuv444p;
     &sub-yuv422p;
     &sub-yuv411p;
     &sub-nv12;
--

To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html