# HG changeset patch # User reynaldo # Date 1226797026 0 # Node ID 4da8fc62ae001a6cf66979e4168e38cc74b79250 # Parent 415b7d14ff75ba5eb87f58677e509810564265fc Cosmetics diff -r 415b7d14ff75 -r 4da8fc62ae00 qcelpdec.c --- a/qcelpdec.c Sun Nov 16 00:05:20 2008 +0000 +++ b/qcelpdec.c Sun Nov 16 00:57:06 2008 +0000 @@ -18,6 +18,7 @@ * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + /** * @file qcelpdec.c * QCELP decoder @@ -38,15 +39,13 @@ #undef NDEBUG #include -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; +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; i < length; i++) + for(i=0; iframerate >= RATE_QUARTER) { + if(q->framerate >= RATE_QUARTER) weight = 0.25 * (subframe_num + 1); - } else if (q->framerate == RATE_OCTAVE && !subframe_num) { + else if(q->framerate == RATE_OCTAVE && !subframe_num) weight = 0.625; - } else { + else weight = 1.0; - } - if (weight != 1.0) { - weighted_vector_sumf(interpolated_lspf, curr_lspf, q->prev_lspf, weight, 1.0 - weight, 10); + if(weight != 1.0) + { + weighted_vector_sumf(interpolated_lspf, curr_lspf, q->prev_lspf, + weight, 1.0 - weight, 10); qcelp_lspf2lpc(interpolated_lspf, lpc); - } else if (q->framerate >= RATE_QUARTER || (q->framerate == I_F_Q && !subframe_num)) + }else if(q->framerate >= RATE_QUARTER || (q->framerate == I_F_Q && !subframe_num)) qcelp_lspf2lpc(curr_lspf, lpc); } -static int buf_size2framerate(const int buf_size) { - switch (buf_size) { - case 35: - return RATE_FULL; - case 17: - return RATE_HALF; - case 8: - return RATE_QUARTER; - case 4: - return RATE_OCTAVE; - case 1: - return SILENCE; +static int buf_size2framerate(const int buf_size) +{ + switch(buf_size) + { + case 35: + return RATE_FULL; + case 17: + return RATE_HALF; + case 8: + return RATE_QUARTER; + case 4: + return RATE_OCTAVE; + case 1: + return SILENCE; } + return -1; } static void warn_insufficient_frame_quality(AVCodecContext *avctx, - const char *message) { - av_log(avctx, AV_LOG_WARNING, "Frame #%d, IFQ: %s\n", avctx->frame_number, message); + const char *message) +{ + av_log(avctx, AV_LOG_WARNING, "Frame #%d, IFQ: %s\n", avctx->frame_number, + message); } AVCodec qcelp_decoder =