# HG changeset patch # User michael # Date 1149637353 0 # Node ID e0df832235c683dbc21cf96e771d476c2653d228 # Parent bb7042d74855325f46a6633307e1a7b0ee568c88 simplify diff -r bb7042d74855 -r e0df832235c6 libmpcodecs/vf_yadif.c --- a/libmpcodecs/vf_yadif.c Tue Jun 06 23:34:21 2006 +0000 +++ b/libmpcodecs/vf_yadif.c Tue Jun 06 23:42:33 2006 +0000 @@ -90,7 +90,7 @@ 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 @@ dst[i][x + y*dst_stride[i]]= p->ref[1][i][x + y*refs]; } }else{ - for(x=0; xref[1][i][x + y*refs]; - } + memcpy(&dst[i][y*dst_stride[i]], &p->ref[1][i][y*refs], w); } } }