# HG changeset patch # User reynaldo # Date 1236635724 0 # Node ID 139d30c8c274fe2debee4ccbc1de3b6d7f8ee370 # Parent 9e66ada64b7610fb02eba7f28eab5f9c4c050ab5 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. diff -r 9e66ada64b76 -r 139d30c8c274 Makefile --- a/Makefile Mon Mar 09 08:04:41 2009 +0000 +++ b/Makefile Mon Mar 09 21:55:24 2009 +0000 @@ -165,7 +165,7 @@ OBJS-$(CONFIG_PNG_ENCODER) += png.o pngenc.o OBJS-$(CONFIG_PPM_ENCODER) += pnmenc.o pnm.o OBJS-$(CONFIG_PTX_DECODER) += ptx.o -OBJS-$(CONFIG_QCELP_DECODER) += qcelpdec.o qcelp_lsp.o celp_math.o celp_filters.o +OBJS-$(CONFIG_QCELP_DECODER) += qcelpdec.o qcelp_lsp.o celp_math.o celp_filters.o acelp_vectors.o OBJS-$(CONFIG_QDM2_DECODER) += qdm2.o mpegaudiodec.o mpegaudiodecheader.o mpegaudio.o mpegaudiodata.o OBJS-$(CONFIG_QDRAW_DECODER) += qdrw.o OBJS-$(CONFIG_QPEG_DECODER) += qpeg.o diff -r 9e66ada64b76 -r 139d30c8c274 acelp_vectors.c --- a/acelp_vectors.c Mon Mar 09 08:04:41 2009 +0000 +++ b/acelp_vectors.c Mon Mar 09 21:55:24 2009 +0000 @@ -145,3 +145,13 @@ in_b[i] * weight_coeff_b + rounder) >> shift); } + +void ff_weighted_vector_sumf(float *out, const float *in_a, const float *in_b, + float weight_coeff_a, float weight_coeff_b, int length) +{ + int i; + + for(i=0; i @@ -81,17 +82,6 @@ */ void ff_celp_lspf2lpc(const double *lspf, float *lpc); -static void weighted_vector_sumf(float *out, const float *in_a, - const float *in_b, float weight_coeff_a, - float weight_coeff_b, int length) -{ - int i; - - for(i=0; iprev_lspf, smooth, 1.0-smooth, 10); + ff_weighted_vector_sumf(lspf, lspf, q->prev_lspf, smooth, 1.0-smooth, 10); }else { q->octave_count = 0; @@ -640,7 +630,7 @@ if(weight != 1.0) { - weighted_vector_sumf(interpolated_lspf, curr_lspf, q->prev_lspf, + ff_weighted_vector_sumf(interpolated_lspf, curr_lspf, q->prev_lspf, weight, 1.0 - weight, 10); lspf2lpc(interpolated_lspf, lpc); }else if(q->bitrate >= RATE_QUARTER ||