Mercurial > mplayer.hg
changeset 29016:8e95cca7c58d
Stephen Warren reported that VDPAU deinterlacing did not work correctly.
New static function push_deint_surface() by Reimar.
author | cehoyos |
---|---|
date | Tue, 24 Mar 2009 21:45:39 +0000 |
parents | 76136efd46fa |
children | c9a2d95c580a |
files | libvo/vo_vdpau.c |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_vdpau.c Tue Mar 24 19:48:51 2009 +0000 +++ b/libvo/vo_vdpau.c Tue Mar 24 21:45:39 2009 +0000 @@ -212,6 +212,13 @@ static void draw_eosd(void); +static void push_deint_surface(VdpVideoSurface surface) +{ + deint_surfaces[2] = deint_surfaces[1]; + deint_surfaces[1] = deint_surfaces[0]; + deint_surfaces[0] = surface; +} + static void video_to_output_surface(void) { VdpTime dummy; @@ -227,9 +234,10 @@ draw_eosd(); draw_osd(); flip_page(); + push_deint_surface(surface_render[vid_surface_num].surface); } if (deint) - field = top_field_first == i ? + field = (top_field_first == i) ^ (deint > 2) ? VDP_VIDEO_MIXER_PICTURE_STRUCTURE_BOTTOM_FIELD: VDP_VIDEO_MIXER_PICTURE_STRUCTURE_TOP_FIELD; output_surface = output_surfaces[surface_num]; @@ -887,9 +895,7 @@ if (deint < 3) deint_surfaces[0] = surface_render[vid_surface_num].surface; video_to_output_surface(); - deint_surfaces[2] = deint_surfaces[1]; - deint_surfaces[1] = deint_surfaces[0]; - deint_surfaces[0] = surface_render[vid_surface_num].surface; + push_deint_surface(surface_render[vid_surface_num].surface); return VO_TRUE; }