summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorcehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-24 21:45:39 +0000
committercehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-24 21:45:39 +0000
commit7ab8e44842d312a82fa0039bfb0242ebb227d104 (patch)
tree9ea734eb29e1eb22c1890c16b67772f83ce3d269 /libvo
parentdb76c92ae56a74baf15aa0f2bb50d11056d3a339 (diff)
downloadmpv-7ab8e44842d312a82fa0039bfb0242ebb227d104.tar.bz2
mpv-7ab8e44842d312a82fa0039bfb0242ebb227d104.tar.xz
Stephen Warren reported that VDPAU deinterlacing did not work correctly.
New static function push_deint_surface() by Reimar. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29051 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_vdpau.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c
index b7b43cdf25..8ef93523ea 100644
--- a/libvo/vo_vdpau.c
+++ b/libvo/vo_vdpau.c
@@ -212,6 +212,13 @@ static int int_pause;
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 @@ static void video_to_output_surface(void)
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 @@ static uint32_t draw_image(mp_image_t *mpi)
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;
}