swscale/utils: use memcpy instead of loop in sws_cloneVec()
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 8 Sep 2013 12:57:07 +0000 (14:57 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 8 Sep 2013 14:39:38 +0000 (16:39 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswscale/utils.c

index 53687f4..497d369 100644 (file)
@@ -1899,14 +1899,12 @@ void sws_convVec(SwsVector *a, SwsVector *b)
 
 SwsVector *sws_cloneVec(SwsVector *a)
 {
-    int i;
     SwsVector *vec = sws_allocVec(a->length);
 
     if (!vec)
         return NULL;
 
-    for (i = 0; i < a->length; i++)
-        vec->coeff[i] = a->coeff[i];
+    memcpy(vec->coeff, a->coeff, a->length * sizeof(*a->coeff));
 
     return vec;
 }