Commit 8a11114a authored by Michael Niedermayer's avatar Michael Niedermayer

pca: use av_calloc()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 003d497d
...@@ -44,8 +44,8 @@ PCA *ff_pca_init(int n){ ...@@ -44,8 +44,8 @@ PCA *ff_pca_init(int n){
pca->n= n; pca->n= n;
pca->z = av_malloc(sizeof(*pca->z) * n); pca->z = av_malloc(sizeof(*pca->z) * n);
pca->count=0; pca->count=0;
pca->covariance= av_mallocz(sizeof(double)*n*n); pca->covariance= av_calloc(n*n, sizeof(double));
pca->mean= av_mallocz(sizeof(double)*n); pca->mean= av_calloc(n, sizeof(double));
return pca; return pca;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment