summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-30 21:17:42 +0000
committercehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-30 21:17:42 +0000
commitf7891c8e53b56c7add13494e0173227c2d961060 (patch)
tree5e038beddf63a284769eb37436ee75b54479d3fc
parent74e6fb2c01ff7cb83c91510a41a63a0d6c435006 (diff)
downloadmpv-f7891c8e53b56c7add13494e0173227c2d961060.tar.bz2
mpv-f7891c8e53b56c7add13494e0173227c2d961060.tar.xz
Support IMGFMT_NV12 for vo vdpau.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29109 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libvo/vo_vdpau.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c
index f482533ff6..110a44450d 100644
--- a/libvo/vo_vdpau.c
+++ b/libvo/vo_vdpau.c
@@ -607,6 +607,9 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
case IMGFMT_IYUV:
vdp_pixel_format = VDP_YCBCR_FORMAT_YV12;
break;
+ case IMGFMT_NV12:
+ vdp_pixel_format = VDP_YCBCR_FORMAT_NV12;
+ break;
case IMGFMT_YUY2:
vdp_pixel_format = VDP_YCBCR_FORMAT_YUYV;
vdp_chroma_type = VDP_CHROMA_TYPE_422;
@@ -903,6 +906,8 @@ static uint32_t draw_image(mp_image_t *mpi)
struct vdpau_render_state *rndr = get_surface(deint_counter);
deint_counter = (deint_counter + 1) % 3;
vid_surface_num = rndr - surface_render;
+ if (image_format == IMGFMT_NV12)
+ destdata[1] = destdata[2];
vdp_st = vdp_video_surface_put_bits_y_cb_cr(rndr->surface,
vdp_pixel_format,
(const void *const*)destdata,
@@ -949,6 +954,7 @@ static int query_format(uint32_t format)
case IMGFMT_YV12:
case IMGFMT_I420:
case IMGFMT_IYUV:
+ case IMGFMT_NV12:
case IMGFMT_YUY2:
case IMGFMT_UYVY:
return default_flags | VOCAP_NOSLICES;