Mercurial > mplayer.hg
changeset 29026:17e9f67f086b
Simplify vdpau deinterlacing code and fix timing for deint=2.
author | cehoyos |
---|---|
date | Wed, 25 Mar 2009 23:32:27 +0000 |
parents | 22d4bb6bf629 |
children | 9c1508cdb122 |
files | libvo/vo_vdpau.c |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_vdpau.c Wed Mar 25 21:43:33 2009 +0000 +++ b/libvo/vo_vdpau.c Wed Mar 25 23:32:27 2009 +0000 @@ -224,9 +224,12 @@ VdpTime dummy; VdpStatus vdp_st; int i; - if (vid_surface_num < 0 || deint_surfaces[0] == VDP_INVALID_HANDLE) + if (vid_surface_num < 0) return; + if (deint < 2 || deint_surfaces[0] == VDP_INVALID_HANDLE) + push_deint_surface(surface_render[vid_surface_num].surface); + for (i = 0; i <= !!(deint > 1); i++) { int field = VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME; VdpOutputSurface output_surface; @@ -234,10 +237,9 @@ draw_eosd(); draw_osd(); flip_page(); - push_deint_surface(surface_render[vid_surface_num].surface); } if (deint) - field = (top_field_first == i) ^ (deint > 2) ? + field = (top_field_first == i) ^ (deint > 1) ? VDP_VIDEO_MIXER_PICTURE_STRUCTURE_BOTTOM_FIELD: VDP_VIDEO_MIXER_PICTURE_STRUCTURE_TOP_FIELD; output_surface = output_surfaces[surface_num]; @@ -254,6 +256,7 @@ output_surface, NULL, &out_rect_vid, 0, NULL); CHECK_ST_WARNING("Error when calling vdp_video_mixer_render") + push_deint_surface(surface_render[vid_surface_num].surface); } } @@ -891,10 +894,7 @@ } top_field_first = !!(mpi->fields & MP_IMGFIELD_TOP_FIRST); - if (deint < 3) - deint_surfaces[0] = surface_render[vid_surface_num].surface; video_to_output_surface(); - push_deint_surface(surface_render[vid_surface_num].surface); return VO_TRUE; } @@ -1045,7 +1045,7 @@ } if (deint) deint_type = deint; - if (deint > 2) + if (deint > 1) deint_buffer_past_frames = 1; vdpau_lib_handle = dlopen(vdpaulibrary, RTLD_LAZY);