diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-10-04 12:32:54 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-10-04 12:32:54 +0000 |
commit | cabd86df24ef65c872a998d780a01ebfd46bfc43 (patch) | |
tree | 96645c885acefedfe0ea05e849e68299c935f298 /libmpcodecs | |
parent | 1c5d870414263339bf702f1480a5bebe9b20026b (diff) | |
download | mpv-cabd86df24ef65c872a998d780a01ebfd46bfc43.tar.bz2 mpv-cabd86df24ef65c872a998d780a01ebfd46bfc43.tar.xz |
fix infinite loop
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24699 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vf_ow.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libmpcodecs/vf_ow.c b/libmpcodecs/vf_ow.c index 89f3daa055..1bba558deb 100644 --- a/libmpcodecs/vf_ow.c +++ b/libmpcodecs/vf_ow.c @@ -167,15 +167,19 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stri int x,y, i, j; double sum=0; double s= p->strength[!is_luma]; + int depth= p->depth; + + while(1<<depth > width || 1<<depth > height) + depth--; for(y=0; y<height; y++) for(x=0; x<width; x++) p->plane[0][0][x + y*p->stride]= src[x + y*src_stride]; - for(i=0; i<p->depth; i++){ + for(i=0; i<depth; i++){ decompose2D2(p->plane[i+1], p->plane[i][0], p->plane[0]+1,p->stride, 1<<i, width, height); } - for(i=0; i<p->depth; i++){ + for(i=0; i<depth; i++){ for(j=1; j<4; j++){ for(y=0; y<height; y++){ for(x=0; x<width; x++){ @@ -188,7 +192,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stri } } } - for(i=p->depth-1; i>=0; i--){ + for(i=depth-1; i>=0; i--){ compose2D2(p->plane[i][0], p->plane[i+1], p->plane[0]+1, p->stride, 1<<i, width, height); } |