Mercurial > mplayer.hg
comparison libvo/vo_vdpau.c @ 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 | 0ce70839c3b5 |
children | c9a2d95c580a |
comparison
equal
deleted
inserted
replaced
29015:76136efd46fa | 29016:8e95cca7c58d |
---|---|
210 static int visible_buf; | 210 static int visible_buf; |
211 static int int_pause; | 211 static int int_pause; |
212 | 212 |
213 static void draw_eosd(void); | 213 static void draw_eosd(void); |
214 | 214 |
215 static void push_deint_surface(VdpVideoSurface surface) | |
216 { | |
217 deint_surfaces[2] = deint_surfaces[1]; | |
218 deint_surfaces[1] = deint_surfaces[0]; | |
219 deint_surfaces[0] = surface; | |
220 } | |
221 | |
215 static void video_to_output_surface(void) | 222 static void video_to_output_surface(void) |
216 { | 223 { |
217 VdpTime dummy; | 224 VdpTime dummy; |
218 VdpStatus vdp_st; | 225 VdpStatus vdp_st; |
219 int i; | 226 int i; |
225 VdpOutputSurface output_surface; | 232 VdpOutputSurface output_surface; |
226 if (i) { | 233 if (i) { |
227 draw_eosd(); | 234 draw_eosd(); |
228 draw_osd(); | 235 draw_osd(); |
229 flip_page(); | 236 flip_page(); |
237 push_deint_surface(surface_render[vid_surface_num].surface); | |
230 } | 238 } |
231 if (deint) | 239 if (deint) |
232 field = top_field_first == i ? | 240 field = (top_field_first == i) ^ (deint > 2) ? |
233 VDP_VIDEO_MIXER_PICTURE_STRUCTURE_BOTTOM_FIELD: | 241 VDP_VIDEO_MIXER_PICTURE_STRUCTURE_BOTTOM_FIELD: |
234 VDP_VIDEO_MIXER_PICTURE_STRUCTURE_TOP_FIELD; | 242 VDP_VIDEO_MIXER_PICTURE_STRUCTURE_TOP_FIELD; |
235 output_surface = output_surfaces[surface_num]; | 243 output_surface = output_surfaces[surface_num]; |
236 vdp_st = vdp_presentation_queue_block_until_surface_idle(vdp_flip_queue, | 244 vdp_st = vdp_presentation_queue_block_until_surface_idle(vdp_flip_queue, |
237 output_surface, | 245 output_surface, |
885 top_field_first = !!(mpi->fields & MP_IMGFIELD_TOP_FIRST); | 893 top_field_first = !!(mpi->fields & MP_IMGFIELD_TOP_FIRST); |
886 | 894 |
887 if (deint < 3) | 895 if (deint < 3) |
888 deint_surfaces[0] = surface_render[vid_surface_num].surface; | 896 deint_surfaces[0] = surface_render[vid_surface_num].surface; |
889 video_to_output_surface(); | 897 video_to_output_surface(); |
890 deint_surfaces[2] = deint_surfaces[1]; | 898 push_deint_surface(surface_render[vid_surface_num].surface); |
891 deint_surfaces[1] = deint_surfaces[0]; | |
892 deint_surfaces[0] = surface_render[vid_surface_num].surface; | |
893 return VO_TRUE; | 899 return VO_TRUE; |
894 } | 900 } |
895 | 901 |
896 static uint32_t get_image(mp_image_t *mpi) | 902 static uint32_t get_image(mp_image_t *mpi) |
897 { | 903 { |