diff options
author | Christian König <[email protected]> | 2012-02-10 14:32:16 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2012-02-21 11:13:27 +0100 |
commit | 37f97e1753af20a7161f61e99cb203b214e00641 (patch) | |
tree | bacacd1f1c1e651546ccdc8c32c3f54715c6b570 /src/gallium/state_trackers/vdpau | |
parent | 0f194fc9e443ee6abd266737321655882e435970 (diff) |
vl: add support for bob deinterlacing
v2: return VDP_STATUS_INVALID_VIDEO_MIXER_PICTURE_STRUCTURE
for unknown picture structure.
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vdpau')
-rw-r--r-- | src/gallium/state_trackers/vdpau/mixer.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c index f1c5a57d33e..df6750d5698 100644 --- a/src/gallium/state_trackers/vdpau/mixer.c +++ b/src/gallium/state_trackers/vdpau/mixer.c @@ -204,6 +204,7 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, VdpLayer const *layers) { struct pipe_video_rect src_rect, dst_rect, dst_clip; + enum vl_compositor_deinterlace deinterlace; unsigned layer = 0; vlVdpVideoMixer *vmixer; @@ -242,8 +243,26 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, } vl_compositor_clear_layers(&vmixer->compositor); + + switch (current_picture_structure) { + case VDP_VIDEO_MIXER_PICTURE_STRUCTURE_TOP_FIELD: + deinterlace = VL_COMPOSITOR_BOB_TOP; + break; + + case VDP_VIDEO_MIXER_PICTURE_STRUCTURE_BOTTOM_FIELD: + deinterlace = VL_COMPOSITOR_BOB_BOTTOM; + break; + + case VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME: + deinterlace = VL_COMPOSITOR_WEAVE; + break; + + default: + return VDP_STATUS_INVALID_VIDEO_MIXER_PICTURE_STRUCTURE; + }; vl_compositor_set_buffer_layer(&vmixer->compositor, layer++, surf->video_buffer, - RectToPipe(video_source_rect, &src_rect), NULL); + RectToPipe(video_source_rect, &src_rect), NULL, + deinterlace); vl_compositor_render(&vmixer->compositor, dst->surface, RectToPipe(destination_video_rect, &dst_rect), RectToPipe(destination_rect, &dst_clip), |