diff options
Diffstat (limited to 'libavcodec/amrwbdec.c')
-rw-r--r-- | libavcodec/amrwbdec.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c index 43f2044b8f..738dd98576 100644 --- a/libavcodec/amrwbdec.c +++ b/libavcodec/amrwbdec.c @@ -28,9 +28,10 @@ #include "libavutil/lfg.h" #include "avcodec.h" +#include "dsputil.h" #include "lsp.h" -#include "celp_math.h" #include "celp_filters.h" +#include "celp_math.h" #include "acelp_filters.h" #include "acelp_vectors.h" #include "acelp_pitch_delay.h" @@ -600,9 +601,11 @@ static float voice_factor(float *p_vector, float p_gain, CELPMContext *ctx) { double p_ener = (double) ctx->dot_productf(p_vector, p_vector, - AMRWB_SFR_SIZE) * p_gain * p_gain; + AMRWB_SFR_SIZE) * + p_gain * p_gain; double f_ener = (double) ctx->dot_productf(f_vector, f_vector, - AMRWB_SFR_SIZE) * f_gain * f_gain; + AMRWB_SFR_SIZE) * + f_gain * f_gain; return (p_ener - f_ener) / (p_ener + f_ener); } @@ -771,7 +774,7 @@ static void synthesis(AMRWBContext *ctx, float *lpc, float *excitation, if (ctx->pitch_gain[0] > 0.5 && ctx->fr_cur_mode <= MODE_8k85) { int i; float energy = ctx->celpm_ctx.dot_productf(excitation, excitation, - AMRWB_SFR_SIZE); + AMRWB_SFR_SIZE); // XXX: Weird part in both ref code and spec. A unknown parameter // {beta} seems to be identical to the current pitch gain @@ -832,8 +835,8 @@ static void upsample_5_4(float *out, const float *in, int o_size, CELPMContext * for (k = 1; k < 5; k++) { out[i] = ctx->dot_productf(in0 + int_part, - upsample_fir[4 - frac_part], - UPS_MEM_SIZE); + upsample_fir[4 - frac_part], + UPS_MEM_SIZE); int_part++; frac_part--; i++; @@ -1175,8 +1178,10 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, ctx->fixed_gain[0] = ff_amr_set_fixed_gain(fixed_gain_factor, - ctx->celpm_ctx.dot_productf(ctx->fixed_vector, ctx->fixed_vector, - AMRWB_SFR_SIZE) / AMRWB_SFR_SIZE, + ctx->celpm_ctx.dot_productf(ctx->fixed_vector, + ctx->fixed_vector, + AMRWB_SFR_SIZE) / + AMRWB_SFR_SIZE, ctx->prediction_error, ENERGY_MEAN, energy_pred_fac); |