Lines Matching refs:peak
184 FIXP_DBL prevPeak[2]; /*!< max peak of previous block (stereo/mono)*/
660 FIXP_DBL peak[2];
875 /* find peak level */
876 peak[0] = peak[1] = FL2FXCONST_DBL(0.f);
886 peak[0] = fixMax(peak[0], FX_PCM2FX_DBL(maxSample)>>DOWNMIX_SHIFT);
902 peak[0] = fixMax(peak[0], fixp_abs(tmp));
915 peak[0] = fixMax(peak[0], fixp_abs(tmp));
929 peak[0] = fixMax(peak[0], fixp_abs(tmp));
940 peak[0] = fixMax(peak[0], fixp_abs(tmp));
943 peak[1] = fixMax(peak[0], peak[1]);
959 peak[1] = fixMax(peak[1], fixp_abs(tmp));
965 drcComp->prevPeak[i] = peak[i];
966 peak[i] = fixMax(peak[i], tmp);
971 /* descaled peak in ld64 representation */
972 FIXP_DBL ld_peak = CalcLdData(peak[i]) + (FIXP_DBL)((LONG)DOWNMIX_SHIFT<<(DFRACT_BITS-1-LD_DATA_SHIFT));
974 /* if (peak < 1e-6) level = 1e-6f; */
977 /* peak[i] = 20 * log(peak[i])/log(10) + 0.2f + (drcComp->smoothGain[i]*2^METADATA_FRACT_BITS)
978 * peak[i] = 20 * log(2)/log(10) * ld(peak[i]) + 0.2f + (drcComp->smoothGain[i]*2^METADATA_FRACT_BITS)
979 * peak[i] = 10 * 2*0.30102999566398119521373889472449 * ld(peak[i]) + 0.2f + (drcComp->smoothGain[i]*2^METADATA_FRACT_BITS)
982 * peak[i] = (10 * 2*0.30102999566398119521373889472449 * ld64(peak[i]) * 64 + 0.2f + (drcComp->smoothGain[i]*2^METADATA_FRACT_BITS))*2^(-METADATA_FRACT_BITS)
983 * peak[i] = 10*2^(METADATA_FRACT_BITS+LD_DATA_SHIFT) * 2*0.30102999566398119521373889472449 * ld64(peak[i])
986 peak[i] = fMult((FIXP_DBL)(10<<(METADATA_FRACT_BITS+LD_DATA_SHIFT)), fMult( FL2FX_DBL(2*0.30102999566398119521373889472449f), ld_peak));
987 peak[i] += (FL2FX_DBL(0.5f)>>METADATA_INT_BITS); /* add a little bit headroom */
988 peak[i] += drcComp->smoothGain[i];
991 /* peak -= dialnorm + 31; */ /* this is Dolby style only */
992 peak[0] -= (FIXP_DBL)((dialnorm-drc_TargetRefLevel)<<(METADATA_FRACT_BITS-16)); /* peak[0] -= dialnorm - drc_TargetRefLevel */
994 /* peak += 11; */ /* this is Dolby style only */ /* RF mode output is 11dB higher */
995 /*peak += comp_TargetRefLevel - drc_TargetRefLevel;*/
996 peak[1] -= (FIXP_DBL)((dialnorm-comp_TargetRefLevel)<<(METADATA_FRACT_BITS-16)); /* peak[1] -= dialnorm - comp_TargetRefLevel */
1000 drcComp->limGain[0] = fixMin(drcComp->limGain[0], -peak[0]);
1003 drcComp->limGain[1] = fixMin(drcComp->limGain[1], -peak[1]);