[vlc-commits] Introduce YUVA 4:2:0 and 4:2:2 planar

Jean-Baptiste Kempf git at videolan.org
Mon Jan 7 14:27:57 CET 2013


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Jan  7 14:16:16 2013 +0100| [dc7a997b50d2f0962b5e99bcdc57b8efe40a6068] | committer: Jean-Baptiste Kempf

Introduce YUVA 4:2:0 and 4:2:2 planar

Ref #7994

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dc7a997b50d2f0962b5e99bcdc57b8efe40a6068
---

 include/vlc_fourcc.h |    4 ++++
 src/misc/es_format.c |    6 ++++++
 src/misc/fourcc.c    |    6 ++++++
 3 files changed, 16 insertions(+)

diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index 4e193f4..67413dd 100644
--- a/include/vlc_fourcc.h
+++ b/include/vlc_fourcc.h
@@ -178,6 +178,10 @@
 #define VLC_CODEC_YUVP            VLC_FOURCC('Y','U','V','P')
 /* Planar YUV 4:4:4 Y:U:V:A */
 #define VLC_CODEC_YUVA            VLC_FOURCC('Y','U','V','A')
+/* Planar YUV 4:2:2 Y:U:V:A */
+#define VLC_CODEC_YUV422A         VLC_FOURCC('I','4','2','A')
+/* Planar YUV 4:2:0 Y:U:V:A */
+#define VLC_CODEC_YUV420A         VLC_FOURCC('I','4','0','A')
 /* Palettized RGB with palette element R:G:B */
 #define VLC_CODEC_RGBP            VLC_FOURCC('R','G','B','P')
 /* 8 bits RGB */
diff --git a/src/misc/es_format.c b/src/misc/es_format.c
index c29004b..b267830 100644
--- a/src/misc/es_format.c
+++ b/src/misc/es_format.c
@@ -147,6 +147,12 @@ void video_format_Setup( video_format_t *p_fmt, vlc_fourcc_t i_chroma,
     case VLC_CODEC_YUVA:
         p_fmt->i_bits_per_pixel = 32;
         break;
+    case VLC_CODEC_YUV420A:
+        p_fmt->i_bits_per_pixel = 20;
+        break;
+    case VLC_CODEC_YUV422A:
+        p_fmt->i_bits_per_pixel = 24;
+        break;
     case VLC_CODEC_I444:
     case VLC_CODEC_J444:
         p_fmt->i_bits_per_pixel = 24;
diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index 00421ee..a1ea761 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -734,6 +734,10 @@ static const staticentry_t p_list_video[] = {
 
     B(VLC_CODEC_YUVA, "Planar YUV 4:4:4 Y:U:V:A"),
         A("YUVA"),
+    B(VLC_CODEC_YUV420A, "Planar YUV 4:2:0 Y:U:V:A"),
+        A("I40A"),
+    B(VLC_CODEC_YUV422A, "Planar YUV 4:2:2 Y:U:V:A"),
+        A("I42A"),
 
     B(VLC_CODEC_RGBP, "Palettized RGB with palette element R:G:B"),
         A("RGBP"),
@@ -1910,6 +1914,8 @@ static const struct
     { { VLC_CODEC_YUV_PLANAR_440, 0 },         PLANAR_8(3, 1, 2) },
     { { VLC_CODEC_YUV_PLANAR_444, 0 },         PLANAR_8(3, 1, 1) },
     { { VLC_CODEC_YUVA, 0 },                   PLANAR_8(4, 1, 1) },
+    { { VLC_CODEC_YUV420A, 0 },                PLANAR_8(4, 2, 2) },
+    { { VLC_CODEC_YUV422A, 0 },                PLANAR_8(4, 2, 1) },
 
     { { VLC_CODEC_I420_10L,
         VLC_CODEC_I420_10B, 0 },               PLANAR_16(3, 2, 2, 10) },



More information about the vlc-commits mailing list