[vlc-commits] fourcc: VDPAU surface types
Rémi Denis-Courmont
git at videolan.org
Sun Jul 7 20:13:36 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jun 13 20:31:42 2013 +0300| [98df43555b2b8c32dc6335a1143ba7daf2d56501] | committer: Rémi Denis-Courmont
fourcc: VDPAU surface types
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=98df43555b2b8c32dc6335a1143ba7daf2d56501
---
include/vlc_fourcc.h | 7 +++++++
src/misc/fourcc.c | 12 ++++++++++++
2 files changed, 19 insertions(+)
diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index c50acac..9fa255e 100644
--- a/include/vlc_fourcc.h
+++ b/include/vlc_fourcc.h
@@ -232,6 +232,13 @@
/* 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',' ')
diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index 1b4b299..2bc42d3 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -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 } }
};
More information about the vlc-commits
mailing list