]> git.sesse.net Git - vlc/commitdiff
fourcc: VDPAU surface types
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 13 Jun 2013 17:31:42 +0000 (20:31 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 7 Jul 2013 18:11:58 +0000 (21:11 +0300)
This define several codec identifiers for each of the VDPAU video
surface types (YUV 4:2:0 and 4:2:2) and one for VDPAU output surfaces
regardless of their internal type. (At this point, it does not seem
that the output surface type affects VLC processes).
VDPAU bitmap surfaces are not included as they do not seem useful.

VDPAU pictures have zero pixel planes since they only carry picture
infos and handles to GPU resources, no actual pixel data. Nevertheless,
inclusion in chroma description is required for picture setup to work.

include/vlc_fourcc.h
src/misc/fourcc.c

index c50acac437da05e88602cb0a0f553e1a1061062e..9fa255e025f56ce69fca63de513573d9f006019b 100644 (file)
 /* 2 planes Y/VU 4:2:2 */
 #define VLC_CODEC_NV61            VLC_FOURCC('N','V','6','1')
 
+/* VDPAU video surface YCbCr 4:2:0 */
+#define VLC_CODEC_VDPAU_VIDEO_420 VLC_FOURCC('V','D','V','0')
+/* VDPAU video surface YCbCr 4:2:0 */
+#define VLC_CODEC_VDPAU_VIDEO_422 VLC_FOURCC('V','D','V','2')
+/* VDPAU output surface RGBA */
+#define VLC_CODEC_VDPAU_OUTPUT    VLC_FOURCC('V','D','O','R')
+
 /* Image codec (video) */
 #define VLC_CODEC_PNG             VLC_FOURCC('p','n','g',' ')
 #define VLC_CODEC_PPM             VLC_FOURCC('p','p','m',' ')
index 1b4b2992577b0fe4e3b51ff6d6d8e5559ae8874e..2bc42d35b677ddf54bb22401b2ec717719b676de 100644 (file)
@@ -1793,6 +1793,8 @@ static const vlc_fourcc_t p_list_YUV[] = {
     VLC_CODEC_YUV_PLANAR_420_16,
     VLC_CODEC_YUV_PLANAR_422_16,
     VLC_CODEC_YUV_PLANAR_444_16,
+    VLC_CODEC_VDPAU_VIDEO_420,
+    VLC_CODEC_VDPAU_VIDEO_422,
     0,
 };
 
@@ -1924,6 +1926,13 @@ bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc)
       .pixel_size = size, \
       .pixel_bits = bits }
 
+/* Zero planes for hardware picture handles. Cannot be manipulated directly. */
+#define FAKE_FMT() \
+    { .plane_count = 0, \
+      .p = { {.w = {1,1}, .h = {1,1}} }, \
+      .pixel_size = 0, \
+      .pixel_bits = 0 }
+
 static const struct
 {
     vlc_fourcc_t             p_fourcc[6];
@@ -1968,6 +1977,9 @@ static const struct
     { { VLC_CODEC_Y211, 0 },                   { 1, { {{1,4}, {1,1}} }, 4, 32 } },
     { { VLC_CODEC_XYZ12,  0 },                 PACKED_FMT(6, 48) },
 
+    { { VLC_CODEC_VDPAU_VIDEO_420, VLC_CODEC_VDPAU_VIDEO_422,
+        VLC_CODEC_VDPAU_OUTPUT, 0 },           FAKE_FMT() },
+
     { {0}, { 0, {}, 0, 0 } }
 };