[xiph-commits] r14538 - trunk/speex/libspeex

jm at svn.xiph.org jm at svn.xiph.org
Fri Feb 22 13:16:13 PST 2008


Author: jm
Date: 2008-02-22 13:16:12 -0800 (Fri, 22 Feb 2008)
New Revision: 14538

Modified:
   trunk/speex/libspeex/preprocess.c
Log:
Thorvald Natvig: Cleanup patch removing unused nb_loudness_adapt field.


Modified: trunk/speex/libspeex/preprocess.c
===================================================================
--- trunk/speex/libspeex/preprocess.c	2008-02-22 16:03:53 UTC (rev 14537)
+++ trunk/speex/libspeex/preprocess.c	2008-02-22 21:16:12 UTC (rev 14538)
@@ -236,7 +236,6 @@
    float *loudness_weight;   /**< Perceptual loudness curve */
    float  loudness;          /**< Loudness estimate */
    float  agc_gain;          /**< Current AGC gain */
-   int    nb_loudness_adapt; /**< Number of frames used for loudness adaptation so far */
    float  max_gain;          /**< Maximum gain allowed */
    float  max_increase_step; /**< Maximum increase in gain from one frame to another */
    float  max_decrease_step; /**< Maximum decrease in gain from one frame to another */
@@ -516,7 +515,6 @@
    /*st->loudness = pow(AMP_SCALE*st->agc_level,LOUDNESS_EXP);*/
    st->loudness = 1e-15;
    st->agc_gain = 1;
-   st->nb_loudness_adapt = 0;
    st->max_gain = 30;
    st->max_increase_step = exp(0.11513f * 12.*st->frame_size / st->sampling_rate);
    st->max_decrease_step = exp(-0.11513f * 40.*st->frame_size / st->sampling_rate);
@@ -585,7 +583,6 @@
    loudness*2 > pow(st->loudness, 1.0/LOUDNESS_EXP))*/
    if (Pframe>.3f)
    {
-      st->nb_loudness_adapt++;
       /*rate=2.0f*Pframe*Pframe/(1+st->nb_loudness_adapt);*/
       rate = .03*Pframe*Pframe;
       st->loudness = (1-rate)*st->loudness + (rate)*pow(AMP_SCALE*loudness, LOUDNESS_EXP);



More information about the commits mailing list