[vlc-commits] vdpau: add I422 and NV16
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 21:24:50 2013 +0300| [5f10d7cca84b3062ab4cc3b8e9b60b5bc3304e9d] | committer: Rémi Denis-Courmont
vdpau: add I422 and NV16
This is untested due to lack of adequate hardware.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5f10d7cca84b3062ab4cc3b8e9b60b5bc3304e9d
---
modules/hw/vdpau/chroma.c | 4 +++-
modules/hw/vdpau/vlc_vdpau.h | 8 ++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/modules/hw/vdpau/chroma.c b/modules/hw/vdpau/chroma.c
index 9d37b19..8928f0c 100644
--- a/modules/hw/vdpau/chroma.c
+++ b/modules/hw/vdpau/chroma.c
@@ -330,7 +330,8 @@ static picture_t *VideoExport(filter_t *filter, picture_t *src, picture_t *dst)
planes[i] = dst->p[i].p_pixels;
pitches[i] = dst->p[i].i_pitch;
}
- if (dst->format.i_chroma == VLC_CODEC_I420)
+ if (dst->format.i_chroma == VLC_CODEC_I420
+ || dst->format.i_chroma == VLC_CODEC_I422)
{
planes[1] = dst->p[2].p_pixels;
planes[2] = dst->p[1].p_pixels;
@@ -601,6 +602,7 @@ static int OutputOpen(vlc_object_t *obj)
if (filter->fmt_in.video.i_chroma == VLC_CODEC_VDPAU_VIDEO_422)
{
sys->chroma = VDP_CHROMA_TYPE_422;
+ /* TODO: check if the drivery supports NV12 or UYVY */
sys->format = VDP_YCBCR_FORMAT_UYVY;
sys->import = VideoPassthrough;
}
diff --git a/modules/hw/vdpau/vlc_vdpau.h b/modules/hw/vdpau/vlc_vdpau.h
index 829a828..1f11c67 100644
--- a/modules/hw/vdpau/vlc_vdpau.h
+++ b/modules/hw/vdpau/vlc_vdpau.h
@@ -225,6 +225,14 @@ bool vlc_fourcc_to_vdp_ycc(vlc_fourcc_t fourcc,
*type = VDP_CHROMA_TYPE_420;
*format = VDP_YCBCR_FORMAT_NV12;
break;
+ case VLC_CODEC_I422:
+ *type = VDP_CHROMA_TYPE_422;
+ *format = VDP_YCBCR_FORMAT_YV12;
+ break;
+ case VLC_CODEC_NV16:
+ *type = VDP_CHROMA_TYPE_422;
+ *format = VDP_YCBCR_FORMAT_NV12;
+ break;
case VLC_CODEC_YUYV:
*type = VDP_CHROMA_TYPE_422;
*format = VDP_YCBCR_FORMAT_YUYV;
More information about the vlc-commits
mailing list