Commit 98df4355 authored by Rémi Denis-Courmont's avatar 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.
parent cf808570
......@@ -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',' ')
......
......@@ -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 } }
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment