Lines Matching refs:inst

303 static void UpdateNoiseEstimate(NoiseSuppressionFixedC* inst, int offset) {  in UpdateNoiseEstimate()  argument
311 tmp16 = WebRtcSpl_MaxValueW16(inst->noiseEstLogQuantile + offset, in UpdateNoiseEstimate()
312 inst->magnLen); in UpdateNoiseEstimate()
314 inst->qNoise = 14 - (int) WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND( in UpdateNoiseEstimate()
316 for (i = 0; i < inst->magnLen; i++) { in UpdateNoiseEstimate()
319 tmp32no2 = kExp2Const * inst->noiseEstLogQuantile[offset + i]; in UpdateNoiseEstimate()
323 tmp16 += (int16_t) inst->qNoise; //shift to get result in Q(qNoise) in UpdateNoiseEstimate()
329 inst->noiseEstQuantile[i] = WebRtcSpl_SatW32ToW16(tmp32no1); in UpdateNoiseEstimate()
334 static void NoiseEstimationC(NoiseSuppressionFixedC* inst, in NoiseEstimationC() argument
346 tabind = inst->stages - inst->normData; in NoiseEstimationC()
359 for (i = 0; i < inst->magnLen; i++) { in NoiseEstimationC()
379 offset = s * inst->magnLen; in NoiseEstimationC()
382 counter = inst->noiseEstCounter[s]; in NoiseEstimationC()
388 for (i = 0; i < inst->magnLen; i++) { in NoiseEstimationC()
390 if (inst->noiseEstDensity[offset + i] > 512) { in NoiseEstimationC()
392 int factor = WebRtcSpl_NormW16(inst->noiseEstDensity[offset + i]); in NoiseEstimationC()
396 if (inst->blockIndex < END_STARTUP_LONG) { in NoiseEstimationC()
405 if (lmagn[i] > inst->noiseEstLogQuantile[offset + i]) { in NoiseEstimationC()
409 inst->noiseEstLogQuantile[offset + i] += tmp16 / 4; in NoiseEstimationC()
415 inst->noiseEstLogQuantile[offset + i] -= tmp16no2; in NoiseEstimationC()
416 if (inst->noiseEstLogQuantile[offset + i] < logval) { in NoiseEstimationC()
419 inst->noiseEstLogQuantile[offset + i] = logval; in NoiseEstimationC()
424 if (WEBRTC_SPL_ABS_W16(lmagn[i] - inst->noiseEstLogQuantile[offset + i]) in NoiseEstimationC()
427 inst->noiseEstDensity[offset + i], countProd, 15); in NoiseEstimationC()
430 inst->noiseEstDensity[offset + i] = tmp16no1 + tmp16no2; in NoiseEstimationC()
435 inst->noiseEstCounter[s] = 0; in NoiseEstimationC()
436 if (inst->blockIndex >= END_STARTUP_LONG) { in NoiseEstimationC()
437 UpdateNoiseEstimate(inst, offset); in NoiseEstimationC()
440 inst->noiseEstCounter[s]++; in NoiseEstimationC()
445 if (inst->blockIndex < END_STARTUP_LONG) { in NoiseEstimationC()
446 UpdateNoiseEstimate(inst, offset); in NoiseEstimationC()
449 for (i = 0; i < inst->magnLen; i++) { in NoiseEstimationC()
450 noise[i] = (uint32_t)(inst->noiseEstQuantile[i]); // Q(qNoise) in NoiseEstimationC()
452 (*q_noise) = (int16_t)inst->qNoise; in NoiseEstimationC()
456 static void PrepareSpectrumC(NoiseSuppressionFixedC* inst, int16_t* freq_buf) { in PrepareSpectrumC() argument
459 for (i = 0; i < inst->magnLen; i++) { in PrepareSpectrumC()
460 inst->real[i] = (int16_t)((inst->real[i] * in PrepareSpectrumC()
461 (int16_t)(inst->noiseSupFilter[i])) >> 14); // Q(normData-stages) in PrepareSpectrumC()
462 inst->imag[i] = (int16_t)((inst->imag[i] * in PrepareSpectrumC()
463 (int16_t)(inst->noiseSupFilter[i])) >> 14); // Q(normData-stages) in PrepareSpectrumC()
466 freq_buf[0] = inst->real[0]; in PrepareSpectrumC()
467 freq_buf[1] = -inst->imag[0]; in PrepareSpectrumC()
468 for (i = 1, j = 2; i < inst->anaLen2; i += 1, j += 2) { in PrepareSpectrumC()
469 freq_buf[j] = inst->real[i]; in PrepareSpectrumC()
470 freq_buf[j + 1] = -inst->imag[i]; in PrepareSpectrumC()
472 freq_buf[inst->anaLen] = inst->real[inst->anaLen2]; in PrepareSpectrumC()
473 freq_buf[inst->anaLen + 1] = -inst->imag[inst->anaLen2]; in PrepareSpectrumC()
477 static void DenormalizeC(NoiseSuppressionFixedC* inst, in DenormalizeC() argument
482 for (i = 0; i < inst->anaLen; i += 1) { in DenormalizeC()
484 factor - inst->normData); in DenormalizeC()
485 inst->real[i] = WebRtcSpl_SatW32ToW16(tmp32); // Q0 in DenormalizeC()
491 static void SynthesisUpdateC(NoiseSuppressionFixedC* inst, in SynthesisUpdateC() argument
500 for (i = 0; i < inst->anaLen; i++) { in SynthesisUpdateC()
502 inst->window[i], inst->real[i], 14); // Q0, window in Q14 in SynthesisUpdateC()
506 inst->synthesisBuffer[i] = WebRtcSpl_AddSatW16(inst->synthesisBuffer[i], in SynthesisUpdateC()
511 for (i = 0; i < inst->blockLen10ms; i++) { in SynthesisUpdateC()
512 out_frame[i] = inst->synthesisBuffer[i]; // Q0 in SynthesisUpdateC()
516 memcpy(inst->synthesisBuffer, inst->synthesisBuffer + inst->blockLen10ms, in SynthesisUpdateC()
517 (inst->anaLen - inst->blockLen10ms) * sizeof(*inst->synthesisBuffer)); in SynthesisUpdateC()
518 WebRtcSpl_ZerosArrayW16(inst->synthesisBuffer in SynthesisUpdateC()
519 + inst->anaLen - inst->blockLen10ms, inst->blockLen10ms); in SynthesisUpdateC()
523 static void AnalysisUpdateC(NoiseSuppressionFixedC* inst, in AnalysisUpdateC() argument
529 memcpy(inst->analysisBuffer, inst->analysisBuffer + inst->blockLen10ms, in AnalysisUpdateC()
530 (inst->anaLen - inst->blockLen10ms) * sizeof(*inst->analysisBuffer)); in AnalysisUpdateC()
531 memcpy(inst->analysisBuffer + inst->anaLen - inst->blockLen10ms, new_speech, in AnalysisUpdateC()
532 inst->blockLen10ms * sizeof(*inst->analysisBuffer)); in AnalysisUpdateC()
535 for (i = 0; i < inst->anaLen; i++) { in AnalysisUpdateC()
537 inst->window[i], inst->analysisBuffer[i], 14); // Q0 in AnalysisUpdateC()
542 static void NormalizeRealBufferC(NoiseSuppressionFixedC* inst, in NormalizeRealBufferC() argument
546 RTC_DCHECK_GE(inst->normData, 0); in NormalizeRealBufferC()
547 for (i = 0; i < inst->anaLen; ++i) { in NormalizeRealBufferC()
548 out[i] = in[i] << inst->normData; // Q(normData) in NormalizeRealBufferC()
583 void WebRtcNsx_CalcParametricNoiseEstimate(NoiseSuppressionFixedC* inst, in WebRtcNsx_CalcParametricNoiseEstimate() argument
604 tmp32no1 += (inst->minNorm - inst->stages) << 11; in WebRtcNsx_CalcParametricNoiseEstimate()
623 *noise_estimate = (*noise_estimate_avg) * (uint32_t)(inst->blockIndex + 1); in WebRtcNsx_CalcParametricNoiseEstimate()
628 int32_t WebRtcNsx_InitCore(NoiseSuppressionFixedC* inst, uint32_t fs) { in WebRtcNsx_InitCore() argument
632 if (inst == NULL) { in WebRtcNsx_InitCore()
639 inst->fs = fs; in WebRtcNsx_InitCore()
645 inst->blockLen10ms = 80; in WebRtcNsx_InitCore()
646 inst->anaLen = 128; in WebRtcNsx_InitCore()
647 inst->stages = 7; in WebRtcNsx_InitCore()
648 inst->window = kBlocks80w128x; in WebRtcNsx_InitCore()
649 inst->thresholdLogLrt = 131072; //default threshold for LRT feature in WebRtcNsx_InitCore()
650 inst->maxLrt = 0x0040000; in WebRtcNsx_InitCore()
651 inst->minLrt = 52429; in WebRtcNsx_InitCore()
653 inst->blockLen10ms = 160; in WebRtcNsx_InitCore()
654 inst->anaLen = 256; in WebRtcNsx_InitCore()
655 inst->stages = 8; in WebRtcNsx_InitCore()
656 inst->window = kBlocks160w256x; in WebRtcNsx_InitCore()
657 inst->thresholdLogLrt = 212644; //default threshold for LRT feature in WebRtcNsx_InitCore()
658 inst->maxLrt = 0x0080000; in WebRtcNsx_InitCore()
659 inst->minLrt = 104858; in WebRtcNsx_InitCore()
661 inst->anaLen2 = inst->anaLen / 2; in WebRtcNsx_InitCore()
662 inst->magnLen = inst->anaLen2 + 1; in WebRtcNsx_InitCore()
664 if (inst->real_fft != NULL) { in WebRtcNsx_InitCore()
665 WebRtcSpl_FreeRealFFT(inst->real_fft); in WebRtcNsx_InitCore()
667 inst->real_fft = WebRtcSpl_CreateRealFFT(inst->stages); in WebRtcNsx_InitCore()
668 if (inst->real_fft == NULL) { in WebRtcNsx_InitCore()
672 WebRtcSpl_ZerosArrayW16(inst->analysisBuffer, ANAL_BLOCKL_MAX); in WebRtcNsx_InitCore()
673 WebRtcSpl_ZerosArrayW16(inst->synthesisBuffer, ANAL_BLOCKL_MAX); in WebRtcNsx_InitCore()
676 WebRtcSpl_ZerosArrayW16(inst->dataBufHBFX[0], in WebRtcNsx_InitCore()
679 WebRtcSpl_ZerosArrayW16(inst->noiseEstQuantile, HALF_ANAL_BLOCKL); in WebRtcNsx_InitCore()
681 inst->noiseEstLogQuantile[i] = 2048; // Q8 in WebRtcNsx_InitCore()
682 inst->noiseEstDensity[i] = 153; // Q9 in WebRtcNsx_InitCore()
685 inst->noiseEstCounter[i] = (int16_t)(END_STARTUP_LONG * (i + 1)) / SIMULT; in WebRtcNsx_InitCore()
689 WebRtcSpl_MemSetW16((int16_t*)inst->noiseSupFilter, 16384, HALF_ANAL_BLOCKL); in WebRtcNsx_InitCore()
692 inst->aggrMode = 0; in WebRtcNsx_InitCore()
695 inst->priorNonSpeechProb = 8192; // Q14(0.5) prior probability for speech/noise in WebRtcNsx_InitCore()
697 inst->prevMagnU16[i] = 0; in WebRtcNsx_InitCore()
698 inst->prevNoiseU32[i] = 0; //previous noise-spectrum in WebRtcNsx_InitCore()
699 inst->logLrtTimeAvgW32[i] = 0; //smooth LR ratio in WebRtcNsx_InitCore()
700 inst->avgMagnPause[i] = 0; //conservative noise spectrum estimate in WebRtcNsx_InitCore()
701 inst->initMagnEst[i] = 0; //initial average magnitude spectrum in WebRtcNsx_InitCore()
705 inst->thresholdSpecDiff = 50; //threshold for difference feature: determined on-line in WebRtcNsx_InitCore()
706 inst->thresholdSpecFlat = 20480; //threshold for flatness: determined on-line in WebRtcNsx_InitCore()
707 inst->featureLogLrt = inst->thresholdLogLrt; //average LRT factor (= threshold) in WebRtcNsx_InitCore()
708 inst->featureSpecFlat = inst->thresholdSpecFlat; //spectral flatness (= threshold) in WebRtcNsx_InitCore()
709 inst->featureSpecDiff = inst->thresholdSpecDiff; //spectral difference (= threshold) in WebRtcNsx_InitCore()
710 inst->weightLogLrt = 6; //default weighting par for LRT feature in WebRtcNsx_InitCore()
711 inst->weightSpecFlat = 0; //default weighting par for spectral flatness feature in WebRtcNsx_InitCore()
712 inst->weightSpecDiff = 0; //default weighting par for spectral difference feature in WebRtcNsx_InitCore()
714 inst->curAvgMagnEnergy = 0; //window time-average of input magnitude spectrum in WebRtcNsx_InitCore()
715 inst->timeAvgMagnEnergy = 0; //normalization for spectral difference in WebRtcNsx_InitCore()
716 inst->timeAvgMagnEnergyTmp = 0; //normalization for spectral difference in WebRtcNsx_InitCore()
719 WebRtcSpl_ZerosArrayW16(inst->histLrt, HIST_PAR_EST); in WebRtcNsx_InitCore()
720 WebRtcSpl_ZerosArrayW16(inst->histSpecDiff, HIST_PAR_EST); in WebRtcNsx_InitCore()
721 WebRtcSpl_ZerosArrayW16(inst->histSpecFlat, HIST_PAR_EST); in WebRtcNsx_InitCore()
723 inst->blockIndex = -1; //frame counter in WebRtcNsx_InitCore()
726 inst->modelUpdate = (1 << STAT_UPDATES); //window for update in WebRtcNsx_InitCore()
727 inst->cntThresUpdate = 0; //counter feature thresholds updates in WebRtcNsx_InitCore()
729 inst->sumMagn = 0; in WebRtcNsx_InitCore()
730 inst->magnEnergy = 0; in WebRtcNsx_InitCore()
731 inst->prevQMagn = 0; in WebRtcNsx_InitCore()
732 inst->qNoise = 0; in WebRtcNsx_InitCore()
733 inst->prevQNoise = 0; in WebRtcNsx_InitCore()
735 inst->energyIn = 0; in WebRtcNsx_InitCore()
736 inst->scaleEnergyIn = 0; in WebRtcNsx_InitCore()
738 inst->whiteNoiseLevel = 0; in WebRtcNsx_InitCore()
739 inst->pinkNoiseNumerator = 0; in WebRtcNsx_InitCore()
740 inst->pinkNoiseExp = 0; in WebRtcNsx_InitCore()
741 inst->minNorm = 15; // Start with full scale in WebRtcNsx_InitCore()
742 inst->zeroInputSignal = 0; in WebRtcNsx_InitCore()
745 WebRtcNsx_set_policy_core(inst, 0); in WebRtcNsx_InitCore()
748 inst->infile = fopen("indebug.pcm", "wb"); in WebRtcNsx_InitCore()
749 inst->outfile = fopen("outdebug.pcm", "wb"); in WebRtcNsx_InitCore()
750 inst->file1 = fopen("file1.pcm", "wb"); in WebRtcNsx_InitCore()
751 inst->file2 = fopen("file2.pcm", "wb"); in WebRtcNsx_InitCore()
752 inst->file3 = fopen("file3.pcm", "wb"); in WebRtcNsx_InitCore()
753 inst->file4 = fopen("file4.pcm", "wb"); in WebRtcNsx_InitCore()
754 inst->file5 = fopen("file5.pcm", "wb"); in WebRtcNsx_InitCore()
773 inst->initFlag = 1; in WebRtcNsx_InitCore()
778 int WebRtcNsx_set_policy_core(NoiseSuppressionFixedC* inst, int mode) { in WebRtcNsx_set_policy_core() argument
784 inst->aggrMode = mode; in WebRtcNsx_set_policy_core()
786 inst->overdrive = 256; // Q8(1.0) in WebRtcNsx_set_policy_core()
787 inst->denoiseBound = 8192; // Q14(0.5) in WebRtcNsx_set_policy_core()
788 inst->gainMap = 0; // No gain compensation in WebRtcNsx_set_policy_core()
790 inst->overdrive = 256; // Q8(1.0) in WebRtcNsx_set_policy_core()
791 inst->denoiseBound = 4096; // Q14(0.25) in WebRtcNsx_set_policy_core()
792 inst->factor2Table = kFactor2Aggressiveness1; in WebRtcNsx_set_policy_core()
793 inst->gainMap = 1; in WebRtcNsx_set_policy_core()
795 inst->overdrive = 282; // ~= Q8(1.1) in WebRtcNsx_set_policy_core()
796 inst->denoiseBound = 2048; // Q14(0.125) in WebRtcNsx_set_policy_core()
797 inst->factor2Table = kFactor2Aggressiveness2; in WebRtcNsx_set_policy_core()
798 inst->gainMap = 1; in WebRtcNsx_set_policy_core()
800 inst->overdrive = 320; // Q8(1.25) in WebRtcNsx_set_policy_core()
801 inst->denoiseBound = 1475; // ~= Q14(0.09) in WebRtcNsx_set_policy_core()
802 inst->factor2Table = kFactor2Aggressiveness3; in WebRtcNsx_set_policy_core()
803 inst->gainMap = 1; in WebRtcNsx_set_policy_core()
813 void WebRtcNsx_FeatureParameterExtraction(NoiseSuppressionFixedC* inst, in WebRtcNsx_FeatureParameterExtraction() argument
838 histIndex = (uint32_t)(inst->featureLogLrt); in WebRtcNsx_FeatureParameterExtraction()
840 inst->histLrt[histIndex]++; in WebRtcNsx_FeatureParameterExtraction()
844 histIndex = (inst->featureSpecFlat * 5) >> 8; in WebRtcNsx_FeatureParameterExtraction()
846 inst->histSpecFlat[histIndex]++; in WebRtcNsx_FeatureParameterExtraction()
850 if (inst->timeAvgMagnEnergy > 0) { in WebRtcNsx_FeatureParameterExtraction()
854 histIndex = ((inst->featureSpecDiff * 5) >> inst->stages) / in WebRtcNsx_FeatureParameterExtraction()
855 inst->timeAvgMagnEnergy; in WebRtcNsx_FeatureParameterExtraction()
858 inst->histSpecDiff[histIndex]++; in WebRtcNsx_FeatureParameterExtraction()
872 tmp32 = inst->histLrt[i] * j; in WebRtcNsx_FeatureParameterExtraction()
874 numHistLrt += inst->histLrt[i]; in WebRtcNsx_FeatureParameterExtraction()
880 tmp32 = inst->histLrt[i] * j; in WebRtcNsx_FeatureParameterExtraction()
892 inst->thresholdLogLrt = inst->maxLrt; in WebRtcNsx_FeatureParameterExtraction()
894 tmp32 = (int32_t)((tmpU32 << (9 + inst->stages)) / numHistLrt / in WebRtcNsx_FeatureParameterExtraction()
897 inst->thresholdLogLrt = WEBRTC_SPL_SAT(inst->maxLrt, in WebRtcNsx_FeatureParameterExtraction()
899 inst->minLrt); in WebRtcNsx_FeatureParameterExtraction()
917 if (inst->histSpecFlat[i] > maxPeak1) { in WebRtcNsx_FeatureParameterExtraction()
923 maxPeak1 = inst->histSpecFlat[i]; in WebRtcNsx_FeatureParameterExtraction()
924 weightPeak1SpecFlat = inst->histSpecFlat[i]; in WebRtcNsx_FeatureParameterExtraction()
926 } else if (inst->histSpecFlat[i] > maxPeak2) { in WebRtcNsx_FeatureParameterExtraction()
928 maxPeak2 = inst->histSpecFlat[i]; in WebRtcNsx_FeatureParameterExtraction()
929 weightPeak2SpecFlat = inst->histSpecFlat[i]; in WebRtcNsx_FeatureParameterExtraction()
948 inst->thresholdSpecFlat = WEBRTC_SPL_SAT(MAX_FLAT_Q10, FACTOR_2_FLAT_Q10 in WebRtcNsx_FeatureParameterExtraction()
963 if (inst->histSpecDiff[i] > maxPeak1) { in WebRtcNsx_FeatureParameterExtraction()
969 maxPeak1 = inst->histSpecDiff[i]; in WebRtcNsx_FeatureParameterExtraction()
970 weightPeak1SpecDiff = inst->histSpecDiff[i]; in WebRtcNsx_FeatureParameterExtraction()
972 } else if (inst->histSpecDiff[i] > maxPeak2) { in WebRtcNsx_FeatureParameterExtraction()
974 maxPeak2 = inst->histSpecDiff[i]; in WebRtcNsx_FeatureParameterExtraction()
975 weightPeak2SpecDiff = inst->histSpecDiff[i]; in WebRtcNsx_FeatureParameterExtraction()
987 inst->thresholdSpecDiff = WEBRTC_SPL_SAT(MAX_DIFF, FACTOR_1_LRT_DIFF in WebRtcNsx_FeatureParameterExtraction()
999 inst->weightLogLrt = featureSum; in WebRtcNsx_FeatureParameterExtraction()
1000 inst->weightSpecFlat = useFeatureSpecFlat * featureSum; in WebRtcNsx_FeatureParameterExtraction()
1001 inst->weightSpecDiff = useFeatureSpecDiff * featureSum; in WebRtcNsx_FeatureParameterExtraction()
1004 WebRtcSpl_ZerosArrayW16(inst->histLrt, HIST_PAR_EST); in WebRtcNsx_FeatureParameterExtraction()
1005 WebRtcSpl_ZerosArrayW16(inst->histSpecDiff, HIST_PAR_EST); in WebRtcNsx_FeatureParameterExtraction()
1006 WebRtcSpl_ZerosArrayW16(inst->histSpecFlat, HIST_PAR_EST); in WebRtcNsx_FeatureParameterExtraction()
1014 void WebRtcNsx_ComputeSpectralFlatness(NoiseSuppressionFixedC* inst, in WebRtcNsx_ComputeSpectralFlatness() argument
1028 avgSpectralFlatnessDen = inst->sumMagn - (uint32_t)magn[0]; // Q(normData-stages) in WebRtcNsx_ComputeSpectralFlatness()
1034 for (i = 1; i < inst->magnLen; i++) { in WebRtcNsx_ComputeSpectralFlatness()
1047 tmpU32 = WEBRTC_SPL_UMUL_32_16(inst->featureSpecFlat, SPECT_FLAT_TAVG_Q14); // Q24 in WebRtcNsx_ComputeSpectralFlatness()
1048 inst->featureSpecFlat -= tmpU32 >> 14; // Q10 in WebRtcNsx_ComputeSpectralFlatness()
1059 logCurSpectralFlatness += ((int32_t)(inst->stages - 1) << (inst->stages + 7)); // Q(8+stages-1) in WebRtcNsx_ComputeSpectralFlatness()
1060 logCurSpectralFlatness -= (tmp32 << (inst->stages - 1)); in WebRtcNsx_ComputeSpectralFlatness()
1061 logCurSpectralFlatness <<= (10 - inst->stages); // Q17 in WebRtcNsx_ComputeSpectralFlatness()
1072 tmp32 = currentSpectralFlatness - (int32_t)inst->featureSpecFlat; // Q10 in WebRtcNsx_ComputeSpectralFlatness()
1074 inst->featureSpecFlat += tmp32 >> 14; // Q10 in WebRtcNsx_ComputeSpectralFlatness()
1083 void WebRtcNsx_ComputeSpectralDifference(NoiseSuppressionFixedC* inst, in WebRtcNsx_ComputeSpectralDifference() argument
1102 minPause = inst->avgMagnPause[0]; // Q(prevQMagn) in WebRtcNsx_ComputeSpectralDifference()
1104 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ComputeSpectralDifference()
1106 avgPauseFX += inst->avgMagnPause[i]; // in Q(prevQMagn) in WebRtcNsx_ComputeSpectralDifference()
1107 maxPause = WEBRTC_SPL_MAX(maxPause, inst->avgMagnPause[i]); in WebRtcNsx_ComputeSpectralDifference()
1108 minPause = WEBRTC_SPL_MIN(minPause, inst->avgMagnPause[i]); in WebRtcNsx_ComputeSpectralDifference()
1111 avgPauseFX >>= inst->stages - 1; in WebRtcNsx_ComputeSpectralDifference()
1112 avgMagnFX = inst->sumMagn >> (inst->stages - 1); in WebRtcNsx_ComputeSpectralDifference()
1116 nShifts = WEBRTC_SPL_MAX(0, 10 + inst->stages - WebRtcSpl_NormW32(tmp32no1)); in WebRtcNsx_ComputeSpectralDifference()
1121 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ComputeSpectralDifference()
1124 tmp32no2 = inst->avgMagnPause[i] - avgPauseFX; in WebRtcNsx_ComputeSpectralDifference()
1132 inst->curAvgMagnEnergy += in WebRtcNsx_ComputeSpectralDifference()
1133 inst->magnEnergy >> (2 * inst->normData + inst->stages - 1); in WebRtcNsx_ComputeSpectralDifference()
1164 tmpU32no1 = avgDiffNormMagnUFX >> (2 * inst->normData); in WebRtcNsx_ComputeSpectralDifference()
1165 if (inst->featureSpecDiff > tmpU32no1) { in WebRtcNsx_ComputeSpectralDifference()
1166 tmpU32no2 = WEBRTC_SPL_UMUL_32_16(inst->featureSpecDiff - tmpU32no1, in WebRtcNsx_ComputeSpectralDifference()
1168 inst->featureSpecDiff -= tmpU32no2 >> 8; // Q(-2*stages) in WebRtcNsx_ComputeSpectralDifference()
1170 tmpU32no2 = WEBRTC_SPL_UMUL_32_16(tmpU32no1 - inst->featureSpecDiff, in WebRtcNsx_ComputeSpectralDifference()
1172 inst->featureSpecDiff += tmpU32no2 >> 8; // Q(-2*stages) in WebRtcNsx_ComputeSpectralDifference()
1177 void WebRtcNsx_DataAnalysis(NoiseSuppressionFixedC* inst, in WebRtcNsx_DataAnalysis() argument
1211 WebRtcNsx_AnalysisUpdate(inst, winData, speechFrame); in WebRtcNsx_DataAnalysis()
1214 inst->energyIn = in WebRtcNsx_DataAnalysis()
1215 WebRtcSpl_Energy(winData, inst->anaLen, &inst->scaleEnergyIn); in WebRtcNsx_DataAnalysis()
1218 inst->zeroInputSignal = 0; in WebRtcNsx_DataAnalysis()
1220 maxWinData = WebRtcSpl_MaxAbsValueW16(winData, inst->anaLen); in WebRtcNsx_DataAnalysis()
1221 inst->normData = WebRtcSpl_NormW16(maxWinData); in WebRtcNsx_DataAnalysis()
1224 inst->zeroInputSignal = 1; in WebRtcNsx_DataAnalysis()
1229 net_norm = inst->stages - inst->normData; in WebRtcNsx_DataAnalysis()
1231 right_shifts_in_magnU16 = inst->normData - inst->minNorm; in WebRtcNsx_DataAnalysis()
1233 inst->minNorm -= right_shifts_in_initMagnEst; in WebRtcNsx_DataAnalysis()
1237 WebRtcNsx_NormalizeRealBuffer(inst, winData, realImag); in WebRtcNsx_DataAnalysis()
1240 WebRtcSpl_RealForwardFFT(inst->real_fft, realImag, winData); in WebRtcNsx_DataAnalysis()
1242 inst->imag[0] = 0; // Q(normData-stages) in WebRtcNsx_DataAnalysis()
1243 inst->imag[inst->anaLen2] = 0; in WebRtcNsx_DataAnalysis()
1244 inst->real[0] = winData[0]; // Q(normData-stages) in WebRtcNsx_DataAnalysis()
1245 inst->real[inst->anaLen2] = winData[inst->anaLen]; in WebRtcNsx_DataAnalysis()
1247 inst->magnEnergy = (uint32_t)(inst->real[0] * inst->real[0]); in WebRtcNsx_DataAnalysis()
1248 inst->magnEnergy += (uint32_t)(inst->real[inst->anaLen2] * in WebRtcNsx_DataAnalysis()
1249 inst->real[inst->anaLen2]); in WebRtcNsx_DataAnalysis()
1250 magnU16[0] = (uint16_t)WEBRTC_SPL_ABS_W16(inst->real[0]); // Q(normData-stages) in WebRtcNsx_DataAnalysis()
1251 magnU16[inst->anaLen2] = (uint16_t)WEBRTC_SPL_ABS_W16(inst->real[inst->anaLen2]); in WebRtcNsx_DataAnalysis()
1252 inst->sumMagn = (uint32_t)magnU16[0]; // Q(normData-stages) in WebRtcNsx_DataAnalysis()
1253 inst->sumMagn += (uint32_t)magnU16[inst->anaLen2]; in WebRtcNsx_DataAnalysis()
1255 if (inst->blockIndex >= END_STARTUP_SHORT) { in WebRtcNsx_DataAnalysis()
1256 for (i = 1, j = 2; i < inst->anaLen2; i += 1, j += 2) { in WebRtcNsx_DataAnalysis()
1257 inst->real[i] = winData[j]; in WebRtcNsx_DataAnalysis()
1258 inst->imag[i] = -winData[j + 1]; in WebRtcNsx_DataAnalysis()
1263 inst->magnEnergy += tmpU32no1; // Q(2*(normData-stages)) in WebRtcNsx_DataAnalysis()
1266 inst->sumMagn += (uint32_t)magnU16[i]; // Q(normData-stages) in WebRtcNsx_DataAnalysis()
1274 inst->initMagnEst[0] >>= right_shifts_in_initMagnEst; in WebRtcNsx_DataAnalysis()
1275 inst->initMagnEst[inst->anaLen2] >>= right_shifts_in_initMagnEst; in WebRtcNsx_DataAnalysis()
1278 inst->initMagnEst[0] += magnU16[0] >> right_shifts_in_magnU16; in WebRtcNsx_DataAnalysis()
1279 inst->initMagnEst[inst->anaLen2] += in WebRtcNsx_DataAnalysis()
1280 magnU16[inst->anaLen2] >> right_shifts_in_magnU16; in WebRtcNsx_DataAnalysis()
1283 if (magnU16[inst->anaLen2]) { in WebRtcNsx_DataAnalysis()
1285 zeros = WebRtcSpl_NormU32((uint32_t)magnU16[inst->anaLen2]); in WebRtcNsx_DataAnalysis()
1286 frac = (int16_t)((((uint32_t)magnU16[inst->anaLen2] << zeros) & in WebRtcNsx_DataAnalysis()
1295 sum_log_i_log_magn = (kLogIndex[inst->anaLen2] * log2) >> 3; in WebRtcNsx_DataAnalysis()
1297 for (i = 1, j = 2; i < inst->anaLen2; i += 1, j += 2) { in WebRtcNsx_DataAnalysis()
1298 inst->real[i] = winData[j]; in WebRtcNsx_DataAnalysis()
1299 inst->imag[i] = -winData[j + 1]; in WebRtcNsx_DataAnalysis()
1304 inst->magnEnergy += tmpU32no1; // Q(2*(normData-stages)) in WebRtcNsx_DataAnalysis()
1307 inst->sumMagn += (uint32_t)magnU16[i]; // Q(normData-stages) in WebRtcNsx_DataAnalysis()
1310 inst->initMagnEst[i] >>= right_shifts_in_initMagnEst; in WebRtcNsx_DataAnalysis()
1313 inst->initMagnEst[i] += magnU16[i] >> right_shifts_in_magnU16; in WebRtcNsx_DataAnalysis()
1340 inst->whiteNoiseLevel >>= right_shifts_in_initMagnEst; in WebRtcNsx_DataAnalysis()
1343 tmpU32no1 = WEBRTC_SPL_UMUL_32_16(inst->sumMagn, inst->overdrive); in WebRtcNsx_DataAnalysis()
1344 tmpU32no1 >>= inst->stages + 8; in WebRtcNsx_DataAnalysis()
1351 inst->whiteNoiseLevel += tmpU32no1; // Q(minNorm-stages) in WebRtcNsx_DataAnalysis()
1361 if (inst->fs == 8000) { in WebRtcNsx_DataAnalysis()
1367 tmp_1_w32 -= ((inst->magnLen - kStartBand) * kSumSquareLogIndex[65]) >> 2; in WebRtcNsx_DataAnalysis()
1399 inst->pinkNoiseNumerator += tmp_2_w32; // Q11 in WebRtcNsx_DataAnalysis()
1404 tmp_1_w32 *= inst->magnLen - kStartBand; in WebRtcNsx_DataAnalysis()
1410 inst->pinkNoiseExp += WEBRTC_SPL_SAT(16384, tmp_1_w32, 0); // Q14 in WebRtcNsx_DataAnalysis()
1415 void WebRtcNsx_DataSynthesis(NoiseSuppressionFixedC* inst, short* outFrame) { in WebRtcNsx_DataSynthesis() argument
1433 if (inst->zeroInputSignal) { in WebRtcNsx_DataSynthesis()
1436 for (i = 0; i < inst->blockLen10ms; i++) { in WebRtcNsx_DataSynthesis()
1437 outFrame[i] = inst->synthesisBuffer[i]; // Q0 in WebRtcNsx_DataSynthesis()
1440 memcpy(inst->synthesisBuffer, inst->synthesisBuffer + inst->blockLen10ms, in WebRtcNsx_DataSynthesis()
1441 (inst->anaLen - inst->blockLen10ms) * sizeof(*inst->synthesisBuffer)); in WebRtcNsx_DataSynthesis()
1442 WebRtcSpl_ZerosArrayW16(inst->synthesisBuffer + inst->anaLen - inst->blockLen10ms, in WebRtcNsx_DataSynthesis()
1443 inst->blockLen10ms); in WebRtcNsx_DataSynthesis()
1448 WebRtcNsx_PrepareSpectrum(inst, realImag); in WebRtcNsx_DataSynthesis()
1451 outCIFFT = WebRtcSpl_RealInverseFFT(inst->real_fft, realImag, rfft_out); in WebRtcNsx_DataSynthesis()
1453 WebRtcNsx_Denormalize(inst, rfft_out, outCIFFT); in WebRtcNsx_DataSynthesis()
1457 if (inst->gainMap == 1 && in WebRtcNsx_DataSynthesis()
1458 inst->blockIndex > END_STARTUP_LONG && in WebRtcNsx_DataSynthesis()
1459 inst->energyIn > 0) { in WebRtcNsx_DataSynthesis()
1461 energyOut = WebRtcSpl_Energy(inst->real, inst->anaLen, &scaleEnergyOut); in WebRtcNsx_DataSynthesis()
1464 - inst->scaleEnergyIn); in WebRtcNsx_DataSynthesis()
1469 inst->energyIn >>= 8 + scaleEnergyOut - inst->scaleEnergyIn; in WebRtcNsx_DataSynthesis()
1472 RTC_DCHECK_GT(inst->energyIn, 0); in WebRtcNsx_DataSynthesis()
1473 energyRatio = (energyOut + inst->energyIn / 2) / inst->energyIn; // Q8 in WebRtcNsx_DataSynthesis()
1480 gainFactor2 = inst->factor2Table[energyRatio]; // Q8 in WebRtcNsx_DataSynthesis()
1485 tmp16no1 = (int16_t)(((16384 - inst->priorNonSpeechProb) * gainFactor1) >> in WebRtcNsx_DataSynthesis()
1487 tmp16no2 = (int16_t)((inst->priorNonSpeechProb * gainFactor2) >> 14); in WebRtcNsx_DataSynthesis()
1492 WebRtcNsx_SynthesisUpdate(inst, outFrame, gainFactor); in WebRtcNsx_DataSynthesis()
1495 void WebRtcNsx_ProcessCore(NoiseSuppressionFixedC* inst, in WebRtcNsx_ProcessCore() argument
1537 RTC_DCHECK_GT(inst->anaLen, 0); in WebRtcNsx_ProcessCore()
1538 RTC_DCHECK_GT(inst->anaLen2, 0); in WebRtcNsx_ProcessCore()
1539 RTC_DCHECK_EQ(0, inst->anaLen % 16); in WebRtcNsx_ProcessCore()
1540 RTC_DCHECK_EQ(0, inst->anaLen2 % 8); in WebRtcNsx_ProcessCore()
1541 RTC_DCHECK_GT(inst->blockLen10ms, 0); in WebRtcNsx_ProcessCore()
1542 RTC_DCHECK_EQ(0, inst->blockLen10ms % 16); in WebRtcNsx_ProcessCore()
1543 RTC_DCHECK_EQ(inst->magnLen, inst->anaLen2 + 1); in WebRtcNsx_ProcessCore()
1547 inst->blockLen10ms, inst->infile) != inst->blockLen10ms) { in WebRtcNsx_ProcessCore()
1553 RTC_DCHECK_EQ(1, inst->initFlag); in WebRtcNsx_ProcessCore()
1566 WebRtcNsx_DataAnalysis(inst, (short*)speechFrame[0], magnU16); in WebRtcNsx_ProcessCore()
1568 if (inst->zeroInputSignal) { in WebRtcNsx_ProcessCore()
1569 WebRtcNsx_DataSynthesis(inst, outFrame[0]); in WebRtcNsx_ProcessCore()
1575 int block_shift = inst->anaLen - inst->blockLen10ms; in WebRtcNsx_ProcessCore()
1576 memcpy(inst->dataBufHBFX[i], inst->dataBufHBFX[i] + inst->blockLen10ms, in WebRtcNsx_ProcessCore()
1577 block_shift * sizeof(*inst->dataBufHBFX[i])); in WebRtcNsx_ProcessCore()
1578 memcpy(inst->dataBufHBFX[i] + block_shift, speechFrameHB[i], in WebRtcNsx_ProcessCore()
1579 inst->blockLen10ms * sizeof(*inst->dataBufHBFX[i])); in WebRtcNsx_ProcessCore()
1580 for (j = 0; j < inst->blockLen10ms; j++) { in WebRtcNsx_ProcessCore()
1581 outFrameHB[i][j] = inst->dataBufHBFX[i][j]; // Q0 in WebRtcNsx_ProcessCore()
1589 inst->blockIndex++; in WebRtcNsx_ProcessCore()
1593 qMagn = inst->normData - inst->stages; in WebRtcNsx_ProcessCore()
1596 WebRtcNsx_ComputeSpectralFlatness(inst, magnU16); in WebRtcNsx_ProcessCore()
1599 WebRtcNsx_NoiseEstimation(inst, magnU16, noiseU32, &qNoise); in WebRtcNsx_ProcessCore()
1602 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ProcessCore()
1603 prevNoiseU16[i] = (uint16_t)(inst->prevNoiseU32[i] >> 11); // Q(prevQNoise) in WebRtcNsx_ProcessCore()
1606 if (inst->blockIndex < END_STARTUP_SHORT) { in WebRtcNsx_ProcessCore()
1608 q_domain_to_use = WEBRTC_SPL_MIN((int)qNoise, inst->minNorm - inst->stages); in WebRtcNsx_ProcessCore()
1612 if (inst->pinkNoiseExp) { in WebRtcNsx_ProcessCore()
1613 pink_noise_exp_avg = (int16_t)WebRtcSpl_DivW32W16(inst->pinkNoiseExp, in WebRtcNsx_ProcessCore()
1614 … (int16_t)(inst->blockIndex + 1)); // Q14 in WebRtcNsx_ProcessCore()
1615 pink_noise_num_avg = WebRtcSpl_DivW32W16(inst->pinkNoiseNumerator, in WebRtcNsx_ProcessCore()
1616 (int16_t)(inst->blockIndex + 1)); // Q11 in WebRtcNsx_ProcessCore()
1617 WebRtcNsx_CalcParametricNoiseEstimate(inst, in WebRtcNsx_ProcessCore()
1625 noise_estimate = inst->whiteNoiseLevel; // Q(minNorm-stages) in WebRtcNsx_ProcessCore()
1626 noise_estimate_avg = noise_estimate / (inst->blockIndex + 1); // Q(minNorm-stages) in WebRtcNsx_ProcessCore()
1628 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ProcessCore()
1630 if ((inst->pinkNoiseExp) && (i >= kStartBand)) { in WebRtcNsx_ProcessCore()
1635 WebRtcNsx_CalcParametricNoiseEstimate(inst, in WebRtcNsx_ProcessCore()
1643 noiseSupFilterTmp[i] = inst->denoiseBound; in WebRtcNsx_ProcessCore()
1644 if (inst->initMagnEst[i]) { in WebRtcNsx_ProcessCore()
1647 tmpU32no1 = WEBRTC_SPL_UMUL_32_16(noise_estimate, inst->overdrive); in WebRtcNsx_ProcessCore()
1648 numerator = inst->initMagnEst[i] << 8; in WebRtcNsx_ProcessCore()
1662 tmpU32no1 = inst->initMagnEst[i] >> (6 - nShifts); in WebRtcNsx_ProcessCore()
1670 (uint32_t)(inst->denoiseBound)); // Q14 in WebRtcNsx_ProcessCore()
1684 (inst->minNorm - inst->stages - q_domain_to_use); in WebRtcNsx_ProcessCore()
1693 tmpU32no1 *= inst->blockIndex; in WebRtcNsx_ProcessCore()
1694 tmpU32no2 *= (END_STARTUP_SHORT - inst->blockIndex); in WebRtcNsx_ProcessCore()
1705 if (inst->blockIndex < END_STARTUP_LONG) { in WebRtcNsx_ProcessCore()
1707 inst->timeAvgMagnEnergyTmp += in WebRtcNsx_ProcessCore()
1708 inst->magnEnergy >> (2 * inst->normData + inst->stages - 1); in WebRtcNsx_ProcessCore()
1709 inst->timeAvgMagnEnergy = WebRtcSpl_DivU32U16(inst->timeAvgMagnEnergyTmp, in WebRtcNsx_ProcessCore()
1710 inst->blockIndex + 1); in WebRtcNsx_ProcessCore()
1719 nShifts = 5 - inst->prevQMagn + inst->prevQNoise; in WebRtcNsx_ProcessCore()
1720 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ProcessCore()
1759 nearMagnEst = inst->prevMagnU16[i] * inst->noiseSupFilter[i]; in WebRtcNsx_ProcessCore()
1761 tmpU32no2 = inst->prevNoiseU32[i] >> nShifts; // Q(prevQMagn+6) in WebRtcNsx_ProcessCore()
1783 WebRtcNsx_ComputeSpectralDifference(inst, magnU16); in WebRtcNsx_ProcessCore()
1787 inst->cntThresUpdate++; in WebRtcNsx_ProcessCore()
1788 flag = (int)(inst->cntThresUpdate == inst->modelUpdate); in WebRtcNsx_ProcessCore()
1790 WebRtcNsx_FeatureParameterExtraction(inst, flag); in WebRtcNsx_ProcessCore()
1793 inst->cntThresUpdate = 0; // Reset counter in WebRtcNsx_ProcessCore()
1798 inst->curAvgMagnEnergy >>= STAT_UPDATES; in WebRtcNsx_ProcessCore()
1800 tmpU32no1 = (inst->curAvgMagnEnergy + inst->timeAvgMagnEnergy + 1) >> 1; //Q(-2*stages) in WebRtcNsx_ProcessCore()
1802 if ((tmpU32no1 != inst->timeAvgMagnEnergy) && (inst->featureSpecDiff) && in WebRtcNsx_ProcessCore()
1803 (inst->timeAvgMagnEnergy > 0)) { in WebRtcNsx_ProcessCore()
1810 tmpU32no2 = inst->featureSpecDiff; in WebRtcNsx_ProcessCore()
1816 tmpU32no3 /= inst->timeAvgMagnEnergy; in WebRtcNsx_ProcessCore()
1818 inst->featureSpecDiff = 0x007FFFFF; in WebRtcNsx_ProcessCore()
1820 inst->featureSpecDiff = WEBRTC_SPL_MIN(0x007FFFFF, in WebRtcNsx_ProcessCore()
1825 inst->timeAvgMagnEnergy = tmpU32no1; // Q(-2*stages) in WebRtcNsx_ProcessCore()
1826 inst->curAvgMagnEnergy = 0; in WebRtcNsx_ProcessCore()
1830 WebRtcNsx_SpeechNoiseProb(inst, nonSpeechProbFinal, priorLocSnr, postLocSnr); in WebRtcNsx_ProcessCore()
1836 postShifts = inst->prevQNoise - qMagn; in WebRtcNsx_ProcessCore()
1837 nShifts = inst->prevQMagn - qMagn; in WebRtcNsx_ProcessCore()
1838 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ProcessCore()
1855 noiseUpdateU32 = inst->prevNoiseU32[i]; // Q(prevQNoise+11) in WebRtcNsx_ProcessCore()
1900 tmpU32no1 = inst->prevNoiseU32[i] + tmpU32no2; // Q(prevQNoise+11) in WebRtcNsx_ProcessCore()
1902 tmpU32no1 = inst->prevNoiseU32[i] - tmpU32no2; // Q(prevQNoise+11) in WebRtcNsx_ProcessCore()
1919 tmp32no2 = WEBRTC_SPL_SHIFT_W32(inst->avgMagnPause[i], -nShifts); in WebRtcNsx_ProcessCore()
1927 tmp32no1 = ((int32_t)magnU16[i] << nShifts) - inst->avgMagnPause[i]; in WebRtcNsx_ProcessCore()
1933 inst->avgMagnPause[i] = tmp32no2; in WebRtcNsx_ProcessCore()
1937 qNoise = inst->prevQNoise + norm32no1 - 5; in WebRtcNsx_ProcessCore()
1941 nShifts = inst->prevQNoise + 11 - qMagn; in WebRtcNsx_ProcessCore()
1942 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ProcessCore()
1991 tmpU32no1 = inst->overdrive + ((priorSnr + 8192) >> 14); // Q8 in WebRtcNsx_ProcessCore()
1992 RTC_DCHECK_GT(inst->overdrive, 0); in WebRtcNsx_ProcessCore()
1994inst->noiseSupFilter[i] = WEBRTC_SPL_SAT(16384, tmpU16no1, inst->denoiseBound); // 16384 = Q14(1.0… in WebRtcNsx_ProcessCore()
1997 if (inst->blockIndex < END_STARTUP_SHORT) { in WebRtcNsx_ProcessCore()
1999 tmpU32no1 = inst->noiseSupFilter[i] * inst->blockIndex; in WebRtcNsx_ProcessCore()
2001 (END_STARTUP_SHORT - inst->blockIndex); in WebRtcNsx_ProcessCore()
2003 inst->noiseSupFilter[i] = (uint16_t)WebRtcSpl_DivU32U16(tmpU32no1, in WebRtcNsx_ProcessCore()
2010 inst->prevQNoise = qNoise; in WebRtcNsx_ProcessCore()
2011 inst->prevQMagn = qMagn; in WebRtcNsx_ProcessCore()
2013 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ProcessCore()
2014 inst->prevNoiseU32[i] = noiseU32[i] << (norm32no1 - 5); // Q(qNoise+11) in WebRtcNsx_ProcessCore()
2015 inst->prevMagnU16[i] = magnU16[i]; // Q(qMagn) in WebRtcNsx_ProcessCore()
2018 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ProcessCore()
2019 inst->prevNoiseU32[i] = noiseU32[i] >> (5 - norm32no1); // Q(qNoise+11) in WebRtcNsx_ProcessCore()
2020 inst->prevMagnU16[i] = magnU16[i]; // Q(qMagn) in WebRtcNsx_ProcessCore()
2024 WebRtcNsx_DataSynthesis(inst, outFrame[0]); in WebRtcNsx_ProcessCore()
2027 inst->blockLen10ms, inst->outfile) != inst->blockLen10ms) { in WebRtcNsx_ProcessCore()
2038 memcpy(inst->dataBufHBFX[i], inst->dataBufHBFX[i] + inst->blockLen10ms, in WebRtcNsx_ProcessCore()
2039 (inst->anaLen - inst->blockLen10ms) * sizeof(*inst->dataBufHBFX[i])); in WebRtcNsx_ProcessCore()
2040 memcpy(inst->dataBufHBFX[i] + inst->anaLen - inst->blockLen10ms, in WebRtcNsx_ProcessCore()
2041 speechFrameHB[i], inst->blockLen10ms * sizeof(*inst->dataBufHBFX[i])); in WebRtcNsx_ProcessCore()
2051 for (i = inst->anaLen2 - (inst->anaLen2 >> 2); i < inst->anaLen2; i++) { in WebRtcNsx_ProcessCore()
2053 tmpU32no1 += (uint32_t)(inst->noiseSupFilter[i]); // Q14 in WebRtcNsx_ProcessCore()
2055 RTC_DCHECK_GE(inst->stages, 7); in WebRtcNsx_ProcessCore()
2056 avgProbSpeechHB = (4096 - (tmpU16no1 >> (inst->stages - 7))); // Q12 in WebRtcNsx_ProcessCore()
2057 avgFilterGainHB = (int16_t)(tmpU32no1 >> (inst->stages - 3)); // Q14 in WebRtcNsx_ProcessCore()
2096 = WEBRTC_SPL_SAT(16384, gainTimeDomainHB, (int16_t)(inst->denoiseBound)); // 16384 = Q14(1.0) in WebRtcNsx_ProcessCore()
2101 for (j = 0; j < inst->blockLen10ms; j++) { in WebRtcNsx_ProcessCore()
2103 inst->dataBufHBFX[i][j]) >> 14); // Q0 in WebRtcNsx_ProcessCore()