swresample/x86/rematrix_init: Use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d80fe5d4bc
commit
48ffaaaaef
@ -50,7 +50,7 @@ av_cold void swri_rematrix_init_x86(struct SwrContext *s){
|
|||||||
s->mix_1_1_simd = ff_mix_1_1_a_int16_sse2;
|
s->mix_1_1_simd = ff_mix_1_1_a_int16_sse2;
|
||||||
s->mix_2_1_simd = ff_mix_2_1_a_int16_sse2;
|
s->mix_2_1_simd = ff_mix_2_1_a_int16_sse2;
|
||||||
}
|
}
|
||||||
s->native_simd_matrix = av_mallocz(2 * num * sizeof(int16_t));
|
s->native_simd_matrix = av_mallocz_array(num, 2 * sizeof(int16_t));
|
||||||
s->native_simd_one = av_mallocz(2 * sizeof(int16_t));
|
s->native_simd_one = av_mallocz(2 * sizeof(int16_t));
|
||||||
for(i=0; i<nb_out; i++){
|
for(i=0; i<nb_out; i++){
|
||||||
int sh = 0;
|
int sh = 0;
|
||||||
@ -74,7 +74,7 @@ av_cold void swri_rematrix_init_x86(struct SwrContext *s){
|
|||||||
s->mix_1_1_simd = ff_mix_1_1_a_float_avx;
|
s->mix_1_1_simd = ff_mix_1_1_a_float_avx;
|
||||||
s->mix_2_1_simd = ff_mix_2_1_a_float_avx;
|
s->mix_2_1_simd = ff_mix_2_1_a_float_avx;
|
||||||
}
|
}
|
||||||
s->native_simd_matrix = av_mallocz(num * sizeof(float));
|
s->native_simd_matrix = av_mallocz_array(num, sizeof(float));
|
||||||
memcpy(s->native_simd_matrix, s->native_matrix, num * sizeof(float));
|
memcpy(s->native_simd_matrix, s->native_matrix, num * sizeof(float));
|
||||||
s->native_simd_one = av_mallocz(sizeof(float));
|
s->native_simd_one = av_mallocz(sizeof(float));
|
||||||
memcpy(s->native_simd_one, s->native_one, sizeof(float));
|
memcpy(s->native_simd_one, s->native_one, sizeof(float));
|
||||||
|
Loading…
Reference in New Issue
Block a user