From f2dcdca0c2dc5f904323659b65b29a2b6f00fd88 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 22 Jan 2013 13:28:31 +0100 Subject: video: move handling of -x/-y/-xy options to VO Now the calculations of the final display size are done after the filter chain. This makes the difference between display aspect ratio and window size a bit more clear, especially in the -xy case. With an empty filter chain, the behavior of the options should be the same, except that they don't affect vo_image and vo_lavc anymore. --- video/filter/vf_stereo3d.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'video/filter/vf_stereo3d.c') diff --git a/video/filter/vf_stereo3d.c b/video/filter/vf_stereo3d.c index 3e055b22ea..37c66e77d9 100644 --- a/video/filter/vf_stereo3d.c +++ b/video/filter/vf_stereo3d.c @@ -148,8 +148,6 @@ static inline uint8_t ana_convert(int coeff[6], uint8_t left[3], uint8_t right[3 static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { - struct MPOpts *opts = vf->opts; - if ((width & 1) || (height & 1)) { mp_msg(MSGT_VFILTER, MSGL_WARN, "[stereo3d] invalid height or width\n"); return 0; @@ -271,10 +269,8 @@ static int config(struct vf_instance *vf, int width, int height, int d_width, return 0; break; } - if (!opts->screen_size_x && !opts->screen_size_y) { - d_width = d_width * vf->priv->out.width / width; - d_height = d_height * vf->priv->out.height / height; - } + vf_rescale_dsize(&d_width, &d_height, width, height, + vf->priv->out.width, vf->priv->out.height); return vf_next_config(vf, vf->priv->out.width, vf->priv->out.height, d_width, d_height, flags, outfmt); } -- cgit v1.2.3