comparison libmpcodecs/vf_dsize.c @ 18390:f9b0c8fe997e

fix float rounding error
author ods15
date Fri, 05 May 2006 18:52:14 +0000
parents c2b50fc5d86a
children 00fff9a3b735
comparison
equal deleted inserted replaced
18389:fdface43ee10 18390:f9b0c8fe997e
44 } 44 }
45 d_width = vf->priv->w; 45 d_width = vf->priv->w;
46 d_height = vf->priv->h; 46 d_height = vf->priv->h;
47 } else { 47 } else {
48 if (vf->priv->aspect * height > width) { 48 if (vf->priv->aspect * height > width) {
49 d_width = height * vf->priv->aspect; 49 d_width = height * vf->priv->aspect + .5;
50 d_height = height; 50 d_height = height;
51 } else { 51 } else {
52 d_height = width / vf->priv->aspect; 52 d_height = width / vf->priv->aspect + .5;
53 d_width = width; 53 d_width = width;
54 } 54 }
55 } 55 }
56 return vf_next_config(vf, width, height, d_width, d_height, flags, outfmt); 56 return vf_next_config(vf, width, height, d_width, d_height, flags, outfmt);
57 } 57 }