summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-15 15:03:40 +0100
committerwm4 <wm4@nowhere>2012-11-16 21:21:14 +0100
commit53ee9aa6aedbd809ea98eb66078b13008d6f26ed (patch)
tree337eb5accfe21be17b247944835b9b85acfc487d /video/out
parent52fe0a4fe2bec8a3b4e7a8b5b6fa667504bced12 (diff)
downloadmpv-53ee9aa6aedbd809ea98eb66078b13008d6f26ed.tar.bz2
mpv-53ee9aa6aedbd809ea98eb66078b13008d6f26ed.tar.xz
options, vo_x11: remove -zoom option, make it default
The -zoom option enabled scaling with vo_x11. Remove the -zoom option, and make its behavior default. Since vo_x11 has to use libswscale for colorspace conversion anyway, which doesn't do actual extra scaling when vo_x11 is run in windowed mode, there should be no speed difference with this change. The code removed from vf_scale attempted to scale the video to d_width/ d_height, which matters for anamorphic video and the --xy option only. vo_x11 can handle these natively. The only case for which the removed vf_scale code could matter is encoding with vo_lavc, but since that didn't set VOFLAG_SWSCALE, nothing actually changes.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/vo.h1
-rw-r--r--video/out/vo_corevideo.m3
-rw-r--r--video/out/vo_direct3d.c3
-rw-r--r--video/out/vo_image.c3
-rw-r--r--video/out/vo_opengl.c3
-rw-r--r--video/out/vo_opengl_old.c2
-rw-r--r--video/out/vo_vdpau.c3
-rw-r--r--video/out/vo_x11.c8
-rw-r--r--video/out/vo_xv.c2
9 files changed, 11 insertions, 17 deletions
diff --git a/video/out/vo.h b/video/out/vo.h
index 71ef635050..22e4650bde 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -122,7 +122,6 @@ typedef struct {
#define VOFLAG_FULLSCREEN 0x01
#define VOFLAG_MODESWITCHING 0x02
-#define VOFLAG_SWSCALE 0x04
#define VOFLAG_FLIPPING 0x08
#define VOFLAG_HIDDEN 0x10 //< Use to create a hidden window
#define VOFLAG_STEREO 0x20 //< Use to create a stereo-capable window
diff --git a/video/out/vo_corevideo.m b/video/out/vo_corevideo.m
index 04ab7019d1..9dcd27355e 100644
--- a/video/out/vo_corevideo.m
+++ b/video/out/vo_corevideo.m
@@ -247,8 +247,7 @@ static int query_format(struct vo *vo, uint32_t format)
{
struct priv *p = vo->priv;
const int flags = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW |
- VFCAP_OSD | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN |
- VOCAP_NOSLICES;
+ VFCAP_OSD | VOCAP_NOSLICES;
switch (format) {
case IMGFMT_YUY2:
p->pixelFormat = kYUVSPixelFormat;
diff --git a/video/out/vo_direct3d.c b/video/out/vo_direct3d.c
index 3a70a081bf..6e4e2dbae2 100644
--- a/video/out/vo_direct3d.c
+++ b/video/out/vo_direct3d.c
@@ -1218,8 +1218,7 @@ static int query_format(d3d_priv *priv, uint32_t movie_fmt)
if (!init_rendering_mode(priv, movie_fmt, false))
return 0;
- int osd_caps = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW
- | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN;
+ int osd_caps = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW;
if (!priv->opt_disable_osd)
osd_caps |= VFCAP_OSD;
return osd_caps;
diff --git a/video/out/vo_image.c b/video/out/vo_image.c
index 7b7c367ad4..76adf5a665 100644
--- a/video/out/vo_image.c
+++ b/video/out/vo_image.c
@@ -130,8 +130,7 @@ static int query_format(struct vo *vo, uint32_t fmt)
// always wants RGB (at least for now), but it probably doesn't matter
// whether we or screenshot.c do the conversion.
if (av_format != PIX_FMT_NONE && sws_isSupportedInput(av_format))
- return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW |
- VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN;
+ return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW;
return 0;
}
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c
index 0662c7474b..92f8499d5c 100644
--- a/video/out/vo_opengl.c
+++ b/video/out/vo_opengl.c
@@ -1673,8 +1673,7 @@ static bool init_format(int fmt, struct gl_priv *init)
static int query_format(uint32_t format)
{
int caps = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_FLIP |
- VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_ACCEPT_STRIDE |
- VFCAP_OSD;
+ VFCAP_ACCEPT_STRIDE | VFCAP_OSD;
if (!init_format(format, NULL))
return 0;
return caps;
diff --git a/video/out/vo_opengl_old.c b/video/out/vo_opengl_old.c
index e1695de583..a21db3a328 100644
--- a/video/out/vo_opengl_old.c
+++ b/video/out/vo_opengl_old.c
@@ -832,7 +832,7 @@ static int query_format(struct vo *vo, uint32_t format)
int depth;
int caps = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_FLIP |
- VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_ACCEPT_STRIDE;
+ VFCAP_ACCEPT_STRIDE;
if (p->use_osd)
caps |= VFCAP_OSD;
if (format == IMGFMT_RGB24 || format == IMGFMT_RGBA)
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c
index f94531379a..c167021831 100644
--- a/video/out/vo_vdpau.c
+++ b/video/out/vo_vdpau.c
@@ -1429,8 +1429,7 @@ static uint32_t get_image(struct vo *vo, 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_FLIP;
+ | VFCAP_OSD | VFCAP_FLIP;
switch (format) {
case IMGFMT_YV12:
case IMGFMT_I420:
diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c
index f819a71a30..97a44337e8 100644
--- a/video/out/vo_x11.c
+++ b/video/out/vo_x11.c
@@ -269,7 +269,7 @@ static int config(struct vo *vo, uint32_t width, uint32_t height,
int vm = flags & VOFLAG_MODESWITCHING;
#endif
p->Flip_Flag = flags & VOFLAG_FLIPPING;
- p->zoomFlag = flags & VOFLAG_SWSCALE;
+ p->zoomFlag = 1;
p->old_vo_dwidth = -1;
p->old_vo_dheight = -1;
@@ -507,10 +507,10 @@ static int query_format(struct vo *vo, uint32_t format)
return 0; // TODO 8bpp not yet fully implemented
if (IMGFMT_BGR_DEPTH(format) == vo->x11->depthonscreen)
return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW |
- VFCAP_OSD | VFCAP_SWSCALE | VFCAP_FLIP |
+ VFCAP_OSD | VFCAP_FLIP |
VFCAP_ACCEPT_STRIDE;
else
- return VFCAP_CSP_SUPPORTED | VFCAP_OSD | VFCAP_SWSCALE |
+ return VFCAP_CSP_SUPPORTED | VFCAP_OSD |
VFCAP_FLIP |
VFCAP_ACCEPT_STRIDE;
}
@@ -519,7 +519,7 @@ static int query_format(struct vo *vo, uint32_t format)
case IMGFMT_I420:
case IMGFMT_IYUV:
case IMGFMT_YV12:
- return VFCAP_CSP_SUPPORTED | VFCAP_OSD | VFCAP_SWSCALE |
+ return VFCAP_CSP_SUPPORTED | VFCAP_OSD |
VFCAP_ACCEPT_STRIDE;
}
return 0;
diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c
index 4019583914..d171559f53 100644
--- a/video/out/vo_xv.c
+++ b/video/out/vo_xv.c
@@ -479,7 +479,7 @@ static uint32_t draw_image(struct vo *vo, mp_image_t *mpi)
static int query_format(struct xvctx *ctx, uint32_t format)
{
uint32_t i;
- int flag = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_OSD | VFCAP_ACCEPT_STRIDE; // FIXME! check for DOWN
+ int flag = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_OSD | VFCAP_ACCEPT_STRIDE; // FIXME! check for DOWN
/* check image formats */
for (i = 0; i < ctx->formats; i++) {