diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-06-06 23:42:33 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-06-06 23:42:33 +0000 |
commit | 0cc11889933d379cec1f36346bf68318c34ddb7c (patch) | |
tree | 96b25329a84fe6529c85fc819fb7b4b4ab2ab941 | |
parent | 2a8494d031303d94193992e423f4b0010078fa0d (diff) | |
download | mpv-0cc11889933d379cec1f36346bf68318c34ddb7c.tar.bz2 mpv-0cc11889933d379cec1f36346bf68318c34ddb7c.tar.xz |
simplify
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18611 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpcodecs/vf_yadif.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libmpcodecs/vf_yadif.c b/libmpcodecs/vf_yadif.c index 800ededfc1..d61906815b 100644 --- a/libmpcodecs/vf_yadif.c +++ b/libmpcodecs/vf_yadif.c @@ -90,7 +90,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], uint8_t *src[3], int ds int temporal_diff0= ABS(prev2[0] - next2[0]); int temporal_diff1=( ABS(prev[-refs] - cur[-refs]) + ABS(prev[+refs] - cur[+refs]) )>>1; int temporal_diff2=( ABS(next[-srcs] - cur[-refs]) + ABS(next[+srcs] - cur[+refs]) )>>1; - int diff= MAX(temporal_diff0>>1, MAX(temporal_diff1, temporal_diff2)); + int diff= MAX3(temporal_diff0>>1, temporal_diff1, temporal_diff2); int temporal_pred= (prev2[0] + next2[0])>>1; int spatial_pred= 0; int spatial_score= 1<<30; @@ -142,9 +142,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], uint8_t *src[3], int ds dst[i][x + y*dst_stride[i]]= p->ref[1][i][x + y*refs]; } }else{ - for(x=0; x<w; x++){ - dst[i][x + y*dst_stride[i]]= p->ref[1][i][x + y*refs]; - } + memcpy(&dst[i][y*dst_stride[i]], &p->ref[1][i][y*refs], w); } } } |