24 #define D(type, simd) \
25 mix_1_1_func_type ff_mix_1_1_a_## type ## _ ## simd;\
26 mix_2_1_func_type ff_mix_2_1_a_## type ## _ ## simd;
38 int num = nb_in * nb_out;
41 s->mix_1_1_simd = NULL;
42 s->mix_2_1_simd = NULL;
46 s->mix_1_1_simd = ff_mix_1_1_a_int16_mmx;
47 s->mix_2_1_simd = ff_mix_2_1_a_int16_mmx;
50 s->mix_1_1_simd = ff_mix_1_1_a_int16_sse2;
51 s->mix_2_1_simd = ff_mix_2_1_a_int16_sse2;
53 s->native_simd_matrix =
av_mallocz(2 * num *
sizeof(int16_t));
54 s->native_simd_one =
av_mallocz(2 *
sizeof(int16_t));
55 for(i=0; i<nb_out; i++){
57 for(j=0; j<nb_in; j++)
58 sh =
FFMAX(sh,
FFABS(((
int*)s->native_matrix)[i * nb_in + j]));
60 for(j=0; j<nb_in; j++) {
61 ((int16_t*)s->native_simd_matrix)[2*(i * nb_in + j)+1] = 15 - sh;
62 ((int16_t*)s->native_simd_matrix)[2*(i * nb_in + j)] =
63 ((((
int*)s->native_matrix)[i * nb_in + j]) + (1<<sh>>1)) >> sh;
66 ((int16_t*)s->native_simd_one)[1] = 14;
67 ((int16_t*)s->native_simd_one)[0] = 16384;
70 s->mix_1_1_simd = ff_mix_1_1_a_float_sse;
71 s->mix_2_1_simd = ff_mix_2_1_a_float_sse;
74 s->mix_1_1_simd = ff_mix_1_1_a_float_avx;
75 s->mix_2_1_simd = ff_mix_2_1_a_float_avx;
77 s->native_simd_matrix =
av_mallocz(num *
sizeof(
float));
78 memcpy(s->native_simd_matrix, s->native_matrix, num *
sizeof(
float));
79 s->native_simd_one =
av_mallocz(
sizeof(
float));
80 memcpy(s->native_simd_one, s->native_one,
sizeof(
float));