Mercurial > mplayer.hg
changeset 17102:85a668c410ec
expand aspect works by display aspect, not video aspect.
try 2
author | ods15 |
---|---|
date | Mon, 05 Dec 2005 17:52:00 +0000 |
parents | 16b1de65666b |
children | 9722eecad127 |
files | libmpcodecs/vf_expand.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vf_expand.c Mon Dec 05 01:34:47 2005 +0000 +++ b/libmpcodecs/vf_expand.c Mon Dec 05 17:52:00 2005 +0000 @@ -183,10 +183,11 @@ else if( vf->priv->exp_h<height ) vf->priv->exp_h=height; #endif if (vf->priv->aspect) { + vf->priv->aspect *= ((double)width/height) / ((double)d_width/d_height); if (vf->priv->exp_h < vf->priv->exp_w / vf->priv->aspect) { - vf->priv->exp_h = vf->priv->exp_w / vf->priv->aspect; + vf->priv->exp_h = vf->priv->exp_w / vf->priv->aspect + 0.5; } else { - vf->priv->exp_w = vf->priv->exp_h * vf->priv->aspect; + vf->priv->exp_w = vf->priv->exp_h * vf->priv->aspect + 0.5; } } if (vf->priv->round > 1) { // round up.