Home | History | Annotate | Download | only in libspeex

Lines Matching full:gain

209    spx_word16_t *gain_floor; /**< Minimum gain allowed */
214 spx_word16_t *gain; /**< Ephraim Malah gain */
238 float agc_gain; /**< Current AGC gain */
239 float max_gain; /**< Maximum gain allowed */
240 float max_increase_step; /**< Maximum increase in gain from one frame to another */
241 float max_decrease_step; /**< Maximum decrease in gain from one frame to another */
243 float init_max; /**< Current gain limit during initialisation */
290 /* This function approximates the gain function
292 which multiplied by xi/(1+xi) is the optimal gain
320 /* Compute the gain floor based on different floors for the background noise and residual echo */
350 /* This function approximates the gain function
352 which multiplied by xi/(1+xi) is the optimal gain
389 /* Compute the gain floor based on different floors for the background noise and residual echo */
460 st->gain = (spx_word16_t*)speex_alloc((N+M)*sizeof(spx_word16_t));
490 st->gain[i]=Q15_ONE;
544 speex_free(st->gain);
831 /* Compute Ephraim & Malah gain speech probability of presence for each critical band (Bark scale)
838 /* Gain from hypergeometric function */
840 /* Weiner filter gain */
854 /* Gain with bound */
855 st->gain[i] = EXTRACT16(MIN32(Q15_ONE, MULT16_32_Q15(prior_ratio, MM)));
857 st->old_ps[i] = MULT16_32_P15(QCONST16(.2f,15),st->old_ps[i]) + MULT16_32_P15(MULT16_16_P15(QCONST16(.8f,15),SQR16_Q15(st->gain[i])),ps[i]);
873 filterbank_compute_psd16(st->bank,st->gain+N, st->gain);
875 /* Use 1 for linear gain resolution (best) or 0 for Bark gain resolution (faster) */
880 /* Compute gain according to the Ephraim-Malah algorithm -- linear frequency */
890 /* Wiener filter gain */
896 /* EM gain with bound */
901 /* Constrain the gain to be close to the Bark scale gain */
902 if (MULT16_16_Q15(QCONST16(.333f,15),g) > st->gain[i])
903 g = MULT16_16(3,st->gain[i]);
904 st->gain[i] = g;
907 st->old_ps[i] = MULT16_32_P15(QCONST16(.2f,15),st->old_ps[i]) + MULT16_32_P15(MULT16_16_P15(QCONST16(.8f,15),SQR16_Q15(st->gain[i])),ps[i]);
909 /* Apply gain floor */
910 if (st->gain[i] < st->gain_floor[i])
911 st->gain[i] = st->gain_floor[i];
914 /*st->reverb_estimate[i] = st->reverb_decay*st->reverb_estimate[i] + st->reverb_decay*st->reverb_level*st->gain[i]*st->gain[i]*st->ps[i];*/
917 /* gain2 = [p*sqrt(gain)+(1-p)*sqrt(gain _floor) ]^2 */
918 tmp = MULT16_16_P15(p,spx_sqrt(SHL32(EXTEND32(st->gain[i]),15))) + MULT16_16_P15(SUB16(Q15_ONE,p),spx_sqrt(SHL32(EXTEND32(st->gain_floor[i]),15)));
922 /*st->gain2[i] = pow(st->gain[i], p) * pow(st->gain_floor[i],1.f-p);*/
929 st->gain[i] = MAX16(st->gain[i], st->gain_floor[i]);
930 tmp = MULT16_16_P15(p,spx_sqrt(SHL32(EXTEND32(st->gain[i]),15))) + MULT16_16_P15(SUB16(Q15_ONE,p),spx_sqrt(SHL32(EXTEND32(st->gain_floor[i]),15)));
936 gain (but then why call this in the first place!) */
943 /* Apply computed gain */