swscale/utils: use memcpy instead of loop in sws_cloneVec()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
14851ca5f5
commit
c914c99d4b
@ -1899,14 +1899,12 @@ void sws_convVec(SwsVector *a, SwsVector *b)
|
|||||||
|
|
||||||
SwsVector *sws_cloneVec(SwsVector *a)
|
SwsVector *sws_cloneVec(SwsVector *a)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
SwsVector *vec = sws_allocVec(a->length);
|
SwsVector *vec = sws_allocVec(a->length);
|
||||||
|
|
||||||
if (!vec)
|
if (!vec)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (i = 0; i < a->length; i++)
|
memcpy(vec->coeff, a->coeff, a->length * sizeof(*a->coeff));
|
||||||
vec->coeff[i] = a->coeff[i];
|
|
||||||
|
|
||||||
return vec;
|
return vec;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user