summaryrefslogtreecommitdiff
path: root/libavcodec/acelp_pitch_delay.h
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2009-10-31 02:02:30 +0000
committerVitor Sessak <vitor1001@gmail.com>2009-10-31 02:02:30 +0000
commit083c5a48ece9a6f316c49f383fa056279c811fd6 (patch)
tree2b357924276a95ef6db71e4487663dd5dfbb1984 /libavcodec/acelp_pitch_delay.h
parent050ba6f45eac82c524b5ce664d16c20ce4f16628 (diff)
Implement AMR gain function that is used by both AMR and SIPR.
Based on AMR SoC code by Robert Swain and Colin McQuillan. Originally committed as revision 20421 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/acelp_pitch_delay.h')
-rw-r--r--libavcodec/acelp_pitch_delay.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/acelp_pitch_delay.h b/libavcodec/acelp_pitch_delay.h
index 2504a9e3dd..42307d2bba 100644
--- a/libavcodec/acelp_pitch_delay.h
+++ b/libavcodec/acelp_pitch_delay.h
@@ -220,4 +220,18 @@ int16_t ff_acelp_decode_gain_code(
int subframe_size,
int max_pred_order);
+/**
+ * Calculate fixed gain (part of section 6.1.3 of AMR spec)
+ *
+ * @param fixed_gain_factor gain correction factor
+ * @param fixed_energy decoded algebraic codebook vector energy
+ * @param prediction_error vector of the quantified predictor errors of
+ * the four previous subframes. It is updated by this function.
+ * @param energy_mean desired mean innovation energy
+ * @param pred_table table of four moving average coefficients
+ */
+float ff_amr_set_fixed_gain(float fixed_gain_factor, float fixed_mean_energy,
+ float *prediction_error, float energy_mean,
+ const float *pred_table);
+
#endif /* AVCODEC_ACELP_PITCH_DELAY_H */