Commit ea21bbab authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

vdpau: add YUV 444

This is untested due to lack of compatible hardware.
parent aa2d895d
......@@ -240,6 +240,8 @@
#define VLC_CODEC_VDPAU_VIDEO_420 VLC_FOURCC('V','D','V','0')
/* VDPAU video surface YCbCr 4:2:2 */
#define VLC_CODEC_VDPAU_VIDEO_422 VLC_FOURCC('V','D','V','2')
/* VDPAU video surface YCbCr 4:4:4 */
#define VLC_CODEC_VDPAU_VIDEO_444 VLC_FOURCC('V','D','V','4')
/* VDPAU output surface RGBA */
#define VLC_CODEC_VDPAU_OUTPUT VLC_FOURCC('V','D','O','R')
......
......@@ -441,6 +441,7 @@ static picture_t *VideoPassthrough(filter_t *filter, picture_t *src)
{
case VDP_CHROMA_TYPE_420: fmt.i_chroma = VLC_CODEC_NV12; break;
case VDP_CHROMA_TYPE_422: fmt.i_chroma = VLC_CODEC_UYVY; break;
case VDP_CHROMA_TYPE_444: fmt.i_chroma = VLC_CODEC_NV24; break;
default: assert(0);
}
......@@ -599,6 +600,13 @@ static int OutputOpen(vlc_object_t *obj)
sys->vdp = NULL;
sys->mixer = VDP_INVALID_HANDLE;
if (filter->fmt_in.video.i_chroma == VLC_CODEC_VDPAU_VIDEO_444)
{
sys->chroma = VDP_CHROMA_TYPE_444;
sys->format = VDP_YCBCR_FORMAT_NV12;
sys->import = VideoPassthrough;
}
else
if (filter->fmt_in.video.i_chroma == VLC_CODEC_VDPAU_VIDEO_422)
{
sys->chroma = VDP_CHROMA_TYPE_422;
......@@ -676,7 +684,8 @@ static int YCbCrOpen(vlc_object_t *obj)
{
filter_t *filter = (filter_t *)obj;
if (filter->fmt_in.video.i_chroma != VLC_CODEC_VDPAU_VIDEO_420
&& filter->fmt_in.video.i_chroma != VLC_CODEC_VDPAU_VIDEO_422)
&& filter->fmt_in.video.i_chroma != VLC_CODEC_VDPAU_VIDEO_422
&& filter->fmt_in.video.i_chroma != VLC_CODEC_VDPAU_VIDEO_444)
return VLC_EGENERIC;
if (filter->fmt_in.video.i_visible_width
......
......@@ -241,6 +241,14 @@ bool vlc_fourcc_to_vdp_ycc(vlc_fourcc_t fourcc,
*type = VDP_CHROMA_TYPE_422;
*format = VDP_YCBCR_FORMAT_UYVY;
break;
case VLC_CODEC_I444:
*type = VDP_CHROMA_TYPE_444;
*format = VDP_YCBCR_FORMAT_YV12;
break;
case VLC_CODEC_NV24:
*type = VDP_CHROMA_TYPE_444;
*format = VDP_YCBCR_FORMAT_NV12;
break;
default:
return false;
}
......
......@@ -1807,6 +1807,7 @@ static const vlc_fourcc_t p_list_YUV[] = {
VLC_CODEC_YUV_PLANAR_444_16,
VLC_CODEC_VDPAU_VIDEO_420,
VLC_CODEC_VDPAU_VIDEO_422,
VLC_CODEC_VDPAU_VIDEO_444,
0,
};
......@@ -1991,6 +1992,7 @@ static const struct
{ { VLC_CODEC_XYZ12, 0 }, PACKED_FMT(6, 48) },
{ { VLC_CODEC_VDPAU_VIDEO_420, VLC_CODEC_VDPAU_VIDEO_422,
VLC_CODEC_VDPAU_VIDEO_444,
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