summaryrefslogtreecommitdiffstats
path: root/libvo/vo_vdpau.c
diff options
context:
space:
mode:
authorcehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-10-23 18:26:42 +0000
committercehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-10-23 18:26:42 +0000
commitfbf26ecb14f7187a132e3d2cfab8c386475cd059 (patch)
treed158a9157b12f160906e29d9e46dd8b5f093f089 /libvo/vo_vdpau.c
parent4a8b396b31237c81647d34b575ba69f00ec7148d (diff)
downloadmpv-fbf26ecb14f7187a132e3d2cfab8c386475cd059.tar.bz2
mpv-fbf26ecb14f7187a132e3d2cfab8c386475cd059.tar.xz
Implement VFCAP_FLIP for vo_vdpau.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29794 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_vdpau.c')
-rw-r--r--libvo/vo_vdpau.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c
index a179caec96..ea96a8f105 100644
--- a/libvo/vo_vdpau.c
+++ b/libvo/vo_vdpau.c
@@ -163,6 +163,7 @@ static float sharpen;
static int colorspace;
static int chroma_deint;
static int top_field_first;
+static int flip;
static VdpDecoder decoder;
static int decoder_max_refs;
@@ -279,8 +280,8 @@ static void resize(void)
out_rect_vid.y1 = dst_rect.bottom;
src_rect_vid.x0 = src_rect.left;
src_rect_vid.x1 = src_rect.right;
- src_rect_vid.y0 = src_rect.top;
- src_rect_vid.y1 = src_rect.bottom;
+ src_rect_vid.y0 = flip ? src_rect.bottom : src_rect.top;
+ src_rect_vid.y1 = flip ? src_rect.top : src_rect.bottom;
border_x = borders.left;
border_y = borders.top;
#ifdef CONFIG_FREETYPE
@@ -636,6 +637,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
#ifdef CONFIG_XF86VM
int vm = flags & VOFLAG_MODESWITCHING;
#endif
+ flip = flags & VOFLAG_FLIPPING;
image_format = format;
vid_width = width;
@@ -1059,7 +1061,7 @@ static uint32_t get_image(mp_image_t *mpi)
static int query_format(uint32_t format)
{
- int default_flags = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_OSD | VFCAP_EOSD | VFCAP_EOSD_UNSCALED;
+ int default_flags = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_OSD | VFCAP_EOSD | VFCAP_EOSD_UNSCALED | VFCAP_FLIP;
switch (format) {
case IMGFMT_YV12:
case IMGFMT_I420: