diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-01-25 10:07:14 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-01-25 10:07:14 +0000 |
commit | fd830cb9b56e508a07bc28e9c8a282ceb2acd8ae (patch) | |
tree | 25e116380e30faa0fd2fc363d806a2392d5df77d /libmpcodecs/vf_cropdetect.c | |
parent | 18dc28792ceb353616d652e37df719a31f1c75f9 (diff) | |
download | mpv-fd830cb9b56e508a07bc28e9c8a282ceb2acd8ae.tar.bz2 mpv-fd830cb9b56e508a07bc28e9c8a282ceb2acd8ae.tar.xz |
x1 and y1 give last used position, must be < width/height
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14589 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vf_cropdetect.c')
-rw-r--r-- | libmpcodecs/vf_cropdetect.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libmpcodecs/vf_cropdetect.c b/libmpcodecs/vf_cropdetect.c index 5446e812e6..e1a076376d 100644 --- a/libmpcodecs/vf_cropdetect.c +++ b/libmpcodecs/vf_cropdetect.c @@ -47,8 +47,8 @@ static int checkline(unsigned char* src,int stride,int len,int bpp){ static int config(struct vf_instance_s* vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ - vf->priv->x1=width; - vf->priv->y1=height; + vf->priv->x1=width - 1; + vf->priv->y1=height - 1; vf->priv->x2=0; vf->priv->y2=0; vf->priv->fno=0; @@ -109,8 +109,8 @@ if(++vf->priv->fno>2){ // ignore first 2 frames - they may be empty x=(vf->priv->x1+1)&(~1); y=(vf->priv->y1+1)&(~1); - w = vf->priv->x2 - x; - h = vf->priv->y2 - y; + w = vf->priv->x2 - x + 1; + h = vf->priv->y2 - y + 1; // w and h must be divisible by 2 as well because of yuv // colorspace problems. |