comparison acelp_vectors.c @ 9156:139d30c8c274 libavcodec

Functional part Kenan Gillet's 'extract and share weighted_vector_sumf' patchset. Idea is to share this common code between the AMR and QCELP decoders.
author reynaldo
date Mon, 09 Mar 2009 21:55:24 +0000
parents d163c4f3f4ab
children 9f35b262d3f0
comparison
equal deleted inserted replaced
9155:9e66ada64b76 9156:139d30c8c274
143 out[i] = av_clip_int16(( 143 out[i] = av_clip_int16((
144 in_a[i] * weight_coeff_a + 144 in_a[i] * weight_coeff_a +
145 in_b[i] * weight_coeff_b + 145 in_b[i] * weight_coeff_b +
146 rounder) >> shift); 146 rounder) >> shift);
147 } 147 }
148
149 void ff_weighted_vector_sumf(float *out, const float *in_a, const float *in_b,
150 float weight_coeff_a, float weight_coeff_b, int length)
151 {
152 int i;
153
154 for(i=0; i<length; i++)
155 out[i] = weight_coeff_a * in_a[i]
156 + weight_coeff_b * in_b[i];
157 }