[FFmpeg-cvslog] swscale/utils: use memcpy instead of loop in sws_cloneVec()
Michael Niedermayer
git at videolan.org
Sun Sep 8 16:49:46 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Sep 8 14:57:07 2013 +0200| [c914c99d4b8159d6be7c53c21f63d84f24d5ffeb] | committer: Michael Niedermayer
swscale/utils: use memcpy instead of loop in sws_cloneVec()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c914c99d4b8159d6be7c53c21f63d84f24d5ffeb
---
libswscale/utils.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 53687f4..497d369 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list