From 48789b354648b9892ec63dc91b91f7a3d5b588e4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 18 Jul 2013 13:16:59 +0200 Subject: vf_scale: remove rounding of sizes to 2 with 4:2:0 libswscale doesn't seem to require this (anymore?), and libavfiltert's vf_scale doesn't do it either. Moreover, this wasn't done for most other subsampled formats, not even very old ones. So just remove it. (It'd be quite easy to align on chroma boundaries with all pixel formats, though.) --- video/filter/vf_scale.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'video') diff --git a/video/filter/vf_scale.c b/video/filter/vf_scale.c index 223c619fef..be2c336545 100644 --- a/video/filter/vf_scale.c +++ b/video/filter/vf_scale.c @@ -297,17 +297,6 @@ static int reconfig(struct vf_instance *vf, struct mp_image_params *p, int flags } } - // calculate the missing parameters: - switch (best) { - case IMGFMT_420P: /* YV12 needs w & h rounded to 2 */ - case IMGFMT_NV12: - case IMGFMT_NV21: - vf->priv->h = (vf->priv->h + 1) & ~1; - case IMGFMT_YUYV: /* YUY2 needs w rounded to 2 */ - case IMGFMT_UYVY: - vf->priv->w = (vf->priv->w + 1) & ~1; - } - mp_msg(MSGT_VFILTER, MSGL_DBG2, "SwScale: scaling %dx%d %s to %dx%d %s \n", width, height, vo_format_name(outfmt), vf->priv->w, vf->priv->h, vo_format_name(best)); -- cgit v1.2.3