[FFmpeg-soc] [soc]: r5548 - in amr: amrnbdata.h amrnbdec.c
vitor
subversion at mplayerhq.hu
Sat Dec 19 15:24:04 CET 2009
Author: vitor
Date: Sat Dec 19 15:24:04 2009
New Revision: 5548
Log:
Use tables already committed to main SVN
Modified:
amr/amrnbdata.h
amr/amrnbdec.c
Modified: amr/amrnbdata.h
==============================================================================
--- amr/amrnbdata.h Thu Dec 17 04:36:53 2009 (r5547)
+++ amr/amrnbdata.h Sat Dec 19 15:24:04 2009 (r5548)
@@ -1529,21 +1529,6 @@ static const float pred_fac[LP_FILTER_OR
#define MIN_LSF_SPACING 50.0488 ///< Ensures stability of LPC filter
#define PITCH_LAG_MIN_MODE_12k2 18 ///< Lower bound on decoded lag search in 12.2kbit/s mode
-/** b60 hamming windowed sinc function coefficients */
-static const float b60[61] = {
- 0.898529 , 0.865051 , 0.769257 , 0.624054 , 0.448639 , 0.265289 ,
- 0.0959167 , -0.0412598 , -0.134338 , -0.178986 , -0.178528 , -0.142609 ,
--0.0849304 , -0.0205078 , 0.0369568 , 0.0773926 , 0.0955200 , 0.0912781 ,
- 0.0689392 , 0.0357056 , 0. , -0.0305481 , -0.0504150 , -0.0570068 ,
--0.0508423 , -0.0350037 , -0.0141602 , 0.00665283, 0.0230713 , 0.0323486 ,
- 0.0335388 , 0.0275879 , 0.0167847 , 0.00411987, -0.00747681, -0.0156860 ,
--0.0193481 , -0.0183716 , -0.0137634 , -0.00704956, 0. , 0.00582886 ,
- 0.00939941, 0.0103760 , 0.00903320, 0.00604248, 0.00238037, -0.00109863 ,
--0.00366211, -0.00497437, -0.00503540, -0.00402832, -0.00241089, -0.000579834,
- 0.00103760, 0.00222778, 0.00277710, 0.00271606, 0.00213623, 0.00115967 ,
- 0.
-};
-
// fixed tables
@@ -1788,26 +1773,6 @@ static const float *ir_filters_lookup[2]
static const float *ir_filters_lookup_MODE_7k95[2] = { ir_filter_strong_MODE_7k95, ir_filter_medium };
-// postfilter tables
-
-/** Powers of formant factor gamma_n=0.7 for modes 12.2 and 10.2kbit/s */
-static const float formant_high_n[10] = {
-0.700000, 0.490000, 0.343000, 0.240100, 0.168070,
-0.117649, 0.082354, 0.057648, 0.040354, 0.028248
-};
-/** Powers of formant factor gamma_d=0.75 for modes 12.2 and 10.2kbit/s */
-static const float formant_high_d[10] = {
-0.750000, 0.562500, 0.421875, 0.316406, 0.237305,
-0.177979, 0.133484, 0.100113, 0.075085, 0.056314
-};
-/** Powers of formant factor gamma_n=0.55 for modes less than 10.2kbit/s */
-static const float formant_low_n[10] = {
-0.550000, 0.302500, 0.166375, 0.091506, 0.050328,
-0.027681, 0.015224, 0.008373, 0.004605, 0.002533
-};
-/** Powers of formant factor gamma_d=0.7 for modes less than 10.2kbit/s */
-static const float *formant_low_d = formant_high_n;
-
/** Number of impulse response coefficients used for tilt factor */
#define AMR_TILT_RESPONSE 22
/** Tilt factor = 1st reflection coefficient * gamma_t */
Modified: amr/amrnbdec.c
==============================================================================
--- amr/amrnbdec.c Thu Dec 17 04:36:53 2009 (r5547)
+++ amr/amrnbdec.c Sat Dec 19 15:24:04 2009 (r5548)
@@ -387,7 +387,8 @@ static void decode_pitch_vector(AMRConte
/* Calculate the pitch vector by interpolating the past excitation at the
pitch lag using a b60 hamming windowed sinc function. */
ff_acelp_interpolatef(p->excitation, p->excitation + 1 - pitch_lag_int,
- b60, 6, pitch_lag_frac + 6 - 6*(pitch_lag_frac > 0),
+ ff_b60_sinc, 6,
+ pitch_lag_frac + 6 - 6*(pitch_lag_frac > 0),
10, AMR_SUBFRAME_SIZE);
memcpy(p->pitch_vector, p->excitation, AMR_SUBFRAME_SIZE * sizeof(float));
@@ -882,11 +883,11 @@ static void postfilter(AMRContext *p, fl
float lpc_n[LP_FILTER_ORDER], lpc_d[LP_FILTER_ORDER]; // Transfer function coefficients
if (p->cur_frame_mode == MODE_12k2 || p->cur_frame_mode == MODE_10k2) {
- gamma_n = formant_high_n;
- gamma_d = formant_high_d;
+ gamma_n = ff_pow_0_7;
+ gamma_d = ff_pow_0_75;
} else {
- gamma_n = formant_low_n;
- gamma_d = formant_low_d;
+ gamma_n = ff_pow_0_55;
+ gamma_d = ff_pow_0_7;
}
for (i = 0; i < LP_FILTER_ORDER; i++) {
More information about the FFmpeg-soc
mailing list