Mercurial > mplayer.hg
changeset 29070:e64e543ed6b3
Support IMGFMT_NV12 for vo vdpau.
author | cehoyos |
---|---|
date | Mon, 30 Mar 2009 21:17:42 +0000 |
parents | dc5daa853163 |
children | 02d3778bf947 |
files | libvo/vo_vdpau.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_vdpau.c Mon Mar 30 17:05:39 2009 +0000 +++ b/libvo/vo_vdpau.c Mon Mar 30 21:17:42 2009 +0000 @@ -607,6 +607,9 @@ 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 @@ 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 @@ case IMGFMT_YV12: case IMGFMT_I420: case IMGFMT_IYUV: + case IMGFMT_NV12: case IMGFMT_YUY2: case IMGFMT_UYVY: return default_flags | VOCAP_NOSLICES;