changeset 18610:e0df832235c6

simplify
author michael
date Tue, 06 Jun 2006 23:42:33 +0000
parents bb7042d74855
children 1c2f694d5232
files libmpcodecs/vf_yadif.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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; 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);
             }
         }
     }