[vlc-commits] vdpau: add YUV 444
Rémi Denis-Courmont
git at videolan.org
Tue Jul 16 21:10:28 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jul 16 22:01:35 2013 +0300| [ea21bbabe5a8d17f9d6160baa8fa4e4b7fdeb2a4] | committer: Rémi Denis-Courmont
vdpau: add YUV 444
This is untested due to lack of compatible hardware.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ea21bbabe5a8d17f9d6160baa8fa4e4b7fdeb2a4
---
include/vlc_fourcc.h | 2 ++
modules/hw/vdpau/chroma.c | 11 ++++++++++-
modules/hw/vdpau/vlc_vdpau.h | 8 ++++++++
src/misc/fourcc.c | 2 ++
4 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index 47f47cd..39e9737 100644
--- a/include/vlc_fourcc.h
+++ b/include/vlc_fourcc.h
@@ -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')
diff --git a/modules/hw/vdpau/chroma.c b/modules/hw/vdpau/chroma.c
index 8928f0c..99f9b84 100644
--- a/modules/hw/vdpau/chroma.c
+++ b/modules/hw/vdpau/chroma.c
@@ -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
diff --git a/modules/hw/vdpau/vlc_vdpau.h b/modules/hw/vdpau/vlc_vdpau.h
index 1f11c67..362e60a 100644
--- a/modules/hw/vdpau/vlc_vdpau.h
+++ b/modules/hw/vdpau/vlc_vdpau.h
@@ -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;
}
diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index 9cd13f5..b439c72 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -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 } }
More information about the vlc-commits
mailing list