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 assert(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()
778 inst->initFlag = 1; in WebRtcNsx_InitCore()
783 int WebRtcNsx_set_policy_core(NoiseSuppressionFixedC* inst, int mode) { in WebRtcNsx_set_policy_core() argument
789 inst->aggrMode = mode; in WebRtcNsx_set_policy_core()
791 inst->overdrive = 256; // Q8(1.0) in WebRtcNsx_set_policy_core()
792 inst->denoiseBound = 8192; // Q14(0.5) in WebRtcNsx_set_policy_core()
793 inst->gainMap = 0; // No gain compensation in WebRtcNsx_set_policy_core()
795 inst->overdrive = 256; // Q8(1.0) in WebRtcNsx_set_policy_core()
796 inst->denoiseBound = 4096; // Q14(0.25) in WebRtcNsx_set_policy_core()
797 inst->factor2Table = kFactor2Aggressiveness1; in WebRtcNsx_set_policy_core()
798 inst->gainMap = 1; in WebRtcNsx_set_policy_core()
800 inst->overdrive = 282; // ~= Q8(1.1) in WebRtcNsx_set_policy_core()
801 inst->denoiseBound = 2048; // Q14(0.125) in WebRtcNsx_set_policy_core()
802 inst->factor2Table = kFactor2Aggressiveness2; in WebRtcNsx_set_policy_core()
803 inst->gainMap = 1; in WebRtcNsx_set_policy_core()
805 inst->overdrive = 320; // Q8(1.25) in WebRtcNsx_set_policy_core()
806 inst->denoiseBound = 1475; // ~= Q14(0.09) in WebRtcNsx_set_policy_core()
807 inst->factor2Table = kFactor2Aggressiveness3; in WebRtcNsx_set_policy_core()
808 inst->gainMap = 1; in WebRtcNsx_set_policy_core()
818 void WebRtcNsx_FeatureParameterExtraction(NoiseSuppressionFixedC* inst, in WebRtcNsx_FeatureParameterExtraction() argument
843 histIndex = (uint32_t)(inst->featureLogLrt); in WebRtcNsx_FeatureParameterExtraction()
845 inst->histLrt[histIndex]++; in WebRtcNsx_FeatureParameterExtraction()
849 histIndex = (inst->featureSpecFlat * 5) >> 8; in WebRtcNsx_FeatureParameterExtraction()
851 inst->histSpecFlat[histIndex]++; in WebRtcNsx_FeatureParameterExtraction()
855 if (inst->timeAvgMagnEnergy > 0) { in WebRtcNsx_FeatureParameterExtraction()
859 histIndex = ((inst->featureSpecDiff * 5) >> inst->stages) / in WebRtcNsx_FeatureParameterExtraction()
860 inst->timeAvgMagnEnergy; in WebRtcNsx_FeatureParameterExtraction()
863 inst->histSpecDiff[histIndex]++; in WebRtcNsx_FeatureParameterExtraction()
877 tmp32 = inst->histLrt[i] * j; in WebRtcNsx_FeatureParameterExtraction()
879 numHistLrt += inst->histLrt[i]; in WebRtcNsx_FeatureParameterExtraction()
885 tmp32 = inst->histLrt[i] * j; in WebRtcNsx_FeatureParameterExtraction()
897 inst->thresholdLogLrt = inst->maxLrt; in WebRtcNsx_FeatureParameterExtraction()
899 tmp32 = (int32_t)((tmpU32 << (9 + inst->stages)) / numHistLrt / in WebRtcNsx_FeatureParameterExtraction()
902 inst->thresholdLogLrt = WEBRTC_SPL_SAT(inst->maxLrt, in WebRtcNsx_FeatureParameterExtraction()
904 inst->minLrt); in WebRtcNsx_FeatureParameterExtraction()
922 if (inst->histSpecFlat[i] > maxPeak1) { in WebRtcNsx_FeatureParameterExtraction()
928 maxPeak1 = inst->histSpecFlat[i]; in WebRtcNsx_FeatureParameterExtraction()
929 weightPeak1SpecFlat = inst->histSpecFlat[i]; in WebRtcNsx_FeatureParameterExtraction()
931 } else if (inst->histSpecFlat[i] > maxPeak2) { in WebRtcNsx_FeatureParameterExtraction()
933 maxPeak2 = inst->histSpecFlat[i]; in WebRtcNsx_FeatureParameterExtraction()
934 weightPeak2SpecFlat = inst->histSpecFlat[i]; in WebRtcNsx_FeatureParameterExtraction()
953 inst->thresholdSpecFlat = WEBRTC_SPL_SAT(MAX_FLAT_Q10, FACTOR_2_FLAT_Q10 in WebRtcNsx_FeatureParameterExtraction()
968 if (inst->histSpecDiff[i] > maxPeak1) { in WebRtcNsx_FeatureParameterExtraction()
974 maxPeak1 = inst->histSpecDiff[i]; in WebRtcNsx_FeatureParameterExtraction()
975 weightPeak1SpecDiff = inst->histSpecDiff[i]; in WebRtcNsx_FeatureParameterExtraction()
977 } else if (inst->histSpecDiff[i] > maxPeak2) { in WebRtcNsx_FeatureParameterExtraction()
979 maxPeak2 = inst->histSpecDiff[i]; in WebRtcNsx_FeatureParameterExtraction()
980 weightPeak2SpecDiff = inst->histSpecDiff[i]; in WebRtcNsx_FeatureParameterExtraction()
992 inst->thresholdSpecDiff = WEBRTC_SPL_SAT(MAX_DIFF, FACTOR_1_LRT_DIFF in WebRtcNsx_FeatureParameterExtraction()
1004 inst->weightLogLrt = featureSum; in WebRtcNsx_FeatureParameterExtraction()
1005 inst->weightSpecFlat = useFeatureSpecFlat * featureSum; in WebRtcNsx_FeatureParameterExtraction()
1006 inst->weightSpecDiff = useFeatureSpecDiff * featureSum; in WebRtcNsx_FeatureParameterExtraction()
1009 WebRtcSpl_ZerosArrayW16(inst->histLrt, HIST_PAR_EST); in WebRtcNsx_FeatureParameterExtraction()
1010 WebRtcSpl_ZerosArrayW16(inst->histSpecDiff, HIST_PAR_EST); in WebRtcNsx_FeatureParameterExtraction()
1011 WebRtcSpl_ZerosArrayW16(inst->histSpecFlat, HIST_PAR_EST); in WebRtcNsx_FeatureParameterExtraction()
1019 void WebRtcNsx_ComputeSpectralFlatness(NoiseSuppressionFixedC* inst, in WebRtcNsx_ComputeSpectralFlatness() argument
1033 avgSpectralFlatnessDen = inst->sumMagn - (uint32_t)magn[0]; // Q(normData-stages) in WebRtcNsx_ComputeSpectralFlatness()
1039 for (i = 1; i < inst->magnLen; i++) { in WebRtcNsx_ComputeSpectralFlatness()
1052 tmpU32 = WEBRTC_SPL_UMUL_32_16(inst->featureSpecFlat, SPECT_FLAT_TAVG_Q14); // Q24 in WebRtcNsx_ComputeSpectralFlatness()
1053 inst->featureSpecFlat -= tmpU32 >> 14; // Q10 in WebRtcNsx_ComputeSpectralFlatness()
1064 logCurSpectralFlatness += ((int32_t)(inst->stages - 1) << (inst->stages + 7)); // Q(8+stages-1) in WebRtcNsx_ComputeSpectralFlatness()
1065 logCurSpectralFlatness -= (tmp32 << (inst->stages - 1)); in WebRtcNsx_ComputeSpectralFlatness()
1066 logCurSpectralFlatness <<= (10 - inst->stages); // Q17 in WebRtcNsx_ComputeSpectralFlatness()
1077 tmp32 = currentSpectralFlatness - (int32_t)inst->featureSpecFlat; // Q10 in WebRtcNsx_ComputeSpectralFlatness()
1079 inst->featureSpecFlat += tmp32 >> 14; // Q10 in WebRtcNsx_ComputeSpectralFlatness()
1088 void WebRtcNsx_ComputeSpectralDifference(NoiseSuppressionFixedC* inst, in WebRtcNsx_ComputeSpectralDifference() argument
1107 minPause = inst->avgMagnPause[0]; // Q(prevQMagn) in WebRtcNsx_ComputeSpectralDifference()
1109 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ComputeSpectralDifference()
1111 avgPauseFX += inst->avgMagnPause[i]; // in Q(prevQMagn) in WebRtcNsx_ComputeSpectralDifference()
1112 maxPause = WEBRTC_SPL_MAX(maxPause, inst->avgMagnPause[i]); in WebRtcNsx_ComputeSpectralDifference()
1113 minPause = WEBRTC_SPL_MIN(minPause, inst->avgMagnPause[i]); in WebRtcNsx_ComputeSpectralDifference()
1116 avgPauseFX >>= inst->stages - 1; in WebRtcNsx_ComputeSpectralDifference()
1117 avgMagnFX = inst->sumMagn >> (inst->stages - 1); in WebRtcNsx_ComputeSpectralDifference()
1121 nShifts = WEBRTC_SPL_MAX(0, 10 + inst->stages - WebRtcSpl_NormW32(tmp32no1)); in WebRtcNsx_ComputeSpectralDifference()
1126 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ComputeSpectralDifference()
1129 tmp32no2 = inst->avgMagnPause[i] - avgPauseFX; in WebRtcNsx_ComputeSpectralDifference()
1137 inst->curAvgMagnEnergy += in WebRtcNsx_ComputeSpectralDifference()
1138 inst->magnEnergy >> (2 * inst->normData + inst->stages - 1); in WebRtcNsx_ComputeSpectralDifference()
1169 tmpU32no1 = avgDiffNormMagnUFX >> (2 * inst->normData); in WebRtcNsx_ComputeSpectralDifference()
1170 if (inst->featureSpecDiff > tmpU32no1) { in WebRtcNsx_ComputeSpectralDifference()
1171 tmpU32no2 = WEBRTC_SPL_UMUL_32_16(inst->featureSpecDiff - tmpU32no1, in WebRtcNsx_ComputeSpectralDifference()
1173 inst->featureSpecDiff -= tmpU32no2 >> 8; // Q(-2*stages) in WebRtcNsx_ComputeSpectralDifference()
1175 tmpU32no2 = WEBRTC_SPL_UMUL_32_16(tmpU32no1 - inst->featureSpecDiff, in WebRtcNsx_ComputeSpectralDifference()
1177 inst->featureSpecDiff += tmpU32no2 >> 8; // Q(-2*stages) in WebRtcNsx_ComputeSpectralDifference()
1182 void WebRtcNsx_DataAnalysis(NoiseSuppressionFixedC* inst, in WebRtcNsx_DataAnalysis() argument
1216 WebRtcNsx_AnalysisUpdate(inst, winData, speechFrame); in WebRtcNsx_DataAnalysis()
1219 inst->energyIn = in WebRtcNsx_DataAnalysis()
1220 WebRtcSpl_Energy(winData, inst->anaLen, &inst->scaleEnergyIn); in WebRtcNsx_DataAnalysis()
1223 inst->zeroInputSignal = 0; in WebRtcNsx_DataAnalysis()
1225 maxWinData = WebRtcSpl_MaxAbsValueW16(winData, inst->anaLen); in WebRtcNsx_DataAnalysis()
1226 inst->normData = WebRtcSpl_NormW16(maxWinData); in WebRtcNsx_DataAnalysis()
1229 inst->zeroInputSignal = 1; in WebRtcNsx_DataAnalysis()
1234 net_norm = inst->stages - inst->normData; in WebRtcNsx_DataAnalysis()
1236 right_shifts_in_magnU16 = inst->normData - inst->minNorm; in WebRtcNsx_DataAnalysis()
1238 inst->minNorm -= right_shifts_in_initMagnEst; in WebRtcNsx_DataAnalysis()
1242 WebRtcNsx_NormalizeRealBuffer(inst, winData, realImag); in WebRtcNsx_DataAnalysis()
1245 WebRtcSpl_RealForwardFFT(inst->real_fft, realImag, winData); in WebRtcNsx_DataAnalysis()
1247 inst->imag[0] = 0; // Q(normData-stages) in WebRtcNsx_DataAnalysis()
1248 inst->imag[inst->anaLen2] = 0; in WebRtcNsx_DataAnalysis()
1249 inst->real[0] = winData[0]; // Q(normData-stages) in WebRtcNsx_DataAnalysis()
1250 inst->real[inst->anaLen2] = winData[inst->anaLen]; in WebRtcNsx_DataAnalysis()
1252 inst->magnEnergy = (uint32_t)(inst->real[0] * inst->real[0]); in WebRtcNsx_DataAnalysis()
1253 inst->magnEnergy += (uint32_t)(inst->real[inst->anaLen2] * in WebRtcNsx_DataAnalysis()
1254 inst->real[inst->anaLen2]); in WebRtcNsx_DataAnalysis()
1255 magnU16[0] = (uint16_t)WEBRTC_SPL_ABS_W16(inst->real[0]); // Q(normData-stages) in WebRtcNsx_DataAnalysis()
1256 magnU16[inst->anaLen2] = (uint16_t)WEBRTC_SPL_ABS_W16(inst->real[inst->anaLen2]); in WebRtcNsx_DataAnalysis()
1257 inst->sumMagn = (uint32_t)magnU16[0]; // Q(normData-stages) in WebRtcNsx_DataAnalysis()
1258 inst->sumMagn += (uint32_t)magnU16[inst->anaLen2]; in WebRtcNsx_DataAnalysis()
1260 if (inst->blockIndex >= END_STARTUP_SHORT) { in WebRtcNsx_DataAnalysis()
1261 for (i = 1, j = 2; i < inst->anaLen2; i += 1, j += 2) { in WebRtcNsx_DataAnalysis()
1262 inst->real[i] = winData[j]; in WebRtcNsx_DataAnalysis()
1263 inst->imag[i] = -winData[j + 1]; in WebRtcNsx_DataAnalysis()
1268 inst->magnEnergy += tmpU32no1; // Q(2*(normData-stages)) in WebRtcNsx_DataAnalysis()
1271 inst->sumMagn += (uint32_t)magnU16[i]; // Q(normData-stages) in WebRtcNsx_DataAnalysis()
1279 inst->initMagnEst[0] >>= right_shifts_in_initMagnEst; in WebRtcNsx_DataAnalysis()
1280 inst->initMagnEst[inst->anaLen2] >>= right_shifts_in_initMagnEst; in WebRtcNsx_DataAnalysis()
1283 inst->initMagnEst[0] += magnU16[0] >> right_shifts_in_magnU16; in WebRtcNsx_DataAnalysis()
1284 inst->initMagnEst[inst->anaLen2] += in WebRtcNsx_DataAnalysis()
1285 magnU16[inst->anaLen2] >> right_shifts_in_magnU16; in WebRtcNsx_DataAnalysis()
1288 if (magnU16[inst->anaLen2]) { in WebRtcNsx_DataAnalysis()
1290 zeros = WebRtcSpl_NormU32((uint32_t)magnU16[inst->anaLen2]); in WebRtcNsx_DataAnalysis()
1291 frac = (int16_t)((((uint32_t)magnU16[inst->anaLen2] << zeros) & in WebRtcNsx_DataAnalysis()
1300 sum_log_i_log_magn = (kLogIndex[inst->anaLen2] * log2) >> 3; in WebRtcNsx_DataAnalysis()
1302 for (i = 1, j = 2; i < inst->anaLen2; i += 1, j += 2) { in WebRtcNsx_DataAnalysis()
1303 inst->real[i] = winData[j]; in WebRtcNsx_DataAnalysis()
1304 inst->imag[i] = -winData[j + 1]; in WebRtcNsx_DataAnalysis()
1309 inst->magnEnergy += tmpU32no1; // Q(2*(normData-stages)) in WebRtcNsx_DataAnalysis()
1312 inst->sumMagn += (uint32_t)magnU16[i]; // Q(normData-stages) in WebRtcNsx_DataAnalysis()
1315 inst->initMagnEst[i] >>= right_shifts_in_initMagnEst; in WebRtcNsx_DataAnalysis()
1318 inst->initMagnEst[i] += magnU16[i] >> right_shifts_in_magnU16; in WebRtcNsx_DataAnalysis()
1345 inst->whiteNoiseLevel >>= right_shifts_in_initMagnEst; in WebRtcNsx_DataAnalysis()
1348 tmpU32no1 = WEBRTC_SPL_UMUL_32_16(inst->sumMagn, inst->overdrive); in WebRtcNsx_DataAnalysis()
1349 tmpU32no1 >>= inst->stages + 8; in WebRtcNsx_DataAnalysis()
1356 inst->whiteNoiseLevel += tmpU32no1; // Q(minNorm-stages) in WebRtcNsx_DataAnalysis()
1366 if (inst->fs == 8000) { in WebRtcNsx_DataAnalysis()
1372 tmp_1_w32 -= ((inst->magnLen - kStartBand) * kSumSquareLogIndex[65]) >> 2; in WebRtcNsx_DataAnalysis()
1404 inst->pinkNoiseNumerator += tmp_2_w32; // Q11 in WebRtcNsx_DataAnalysis()
1409 tmp_1_w32 *= inst->magnLen - kStartBand; in WebRtcNsx_DataAnalysis()
1415 inst->pinkNoiseExp += WEBRTC_SPL_SAT(16384, tmp_1_w32, 0); // Q14 in WebRtcNsx_DataAnalysis()
1420 void WebRtcNsx_DataSynthesis(NoiseSuppressionFixedC* inst, short* outFrame) { in WebRtcNsx_DataSynthesis() argument
1438 if (inst->zeroInputSignal) { in WebRtcNsx_DataSynthesis()
1441 for (i = 0; i < inst->blockLen10ms; i++) { in WebRtcNsx_DataSynthesis()
1442 outFrame[i] = inst->synthesisBuffer[i]; // Q0 in WebRtcNsx_DataSynthesis()
1445 memcpy(inst->synthesisBuffer, inst->synthesisBuffer + inst->blockLen10ms, in WebRtcNsx_DataSynthesis()
1446 (inst->anaLen - inst->blockLen10ms) * sizeof(*inst->synthesisBuffer)); in WebRtcNsx_DataSynthesis()
1447 WebRtcSpl_ZerosArrayW16(inst->synthesisBuffer + inst->anaLen - inst->blockLen10ms, in WebRtcNsx_DataSynthesis()
1448 inst->blockLen10ms); in WebRtcNsx_DataSynthesis()
1453 WebRtcNsx_PrepareSpectrum(inst, realImag); in WebRtcNsx_DataSynthesis()
1456 outCIFFT = WebRtcSpl_RealInverseFFT(inst->real_fft, realImag, rfft_out); in WebRtcNsx_DataSynthesis()
1458 WebRtcNsx_Denormalize(inst, rfft_out, outCIFFT); in WebRtcNsx_DataSynthesis()
1462 if (inst->gainMap == 1 && in WebRtcNsx_DataSynthesis()
1463 inst->blockIndex > END_STARTUP_LONG && in WebRtcNsx_DataSynthesis()
1464 inst->energyIn > 0) { in WebRtcNsx_DataSynthesis()
1466 energyOut = WebRtcSpl_Energy(inst->real, inst->anaLen, &scaleEnergyOut); in WebRtcNsx_DataSynthesis()
1469 - inst->scaleEnergyIn); in WebRtcNsx_DataSynthesis()
1474 inst->energyIn >>= 8 + scaleEnergyOut - inst->scaleEnergyIn; in WebRtcNsx_DataSynthesis()
1477 assert(inst->energyIn > 0); in WebRtcNsx_DataSynthesis()
1478 energyRatio = (energyOut + inst->energyIn / 2) / inst->energyIn; // Q8 in WebRtcNsx_DataSynthesis()
1485 gainFactor2 = inst->factor2Table[energyRatio]; // Q8 in WebRtcNsx_DataSynthesis()
1490 tmp16no1 = (int16_t)(((16384 - inst->priorNonSpeechProb) * gainFactor1) >> in WebRtcNsx_DataSynthesis()
1492 tmp16no2 = (int16_t)((inst->priorNonSpeechProb * gainFactor2) >> 14); in WebRtcNsx_DataSynthesis()
1497 WebRtcNsx_SynthesisUpdate(inst, outFrame, gainFactor); in WebRtcNsx_DataSynthesis()
1500 void WebRtcNsx_ProcessCore(NoiseSuppressionFixedC* inst, in WebRtcNsx_ProcessCore() argument
1545 assert(inst->anaLen > 0); in WebRtcNsx_ProcessCore()
1546 assert(inst->anaLen2 > 0); in WebRtcNsx_ProcessCore()
1547 assert(inst->anaLen % 16 == 0); in WebRtcNsx_ProcessCore()
1548 assert(inst->anaLen2 % 8 == 0); in WebRtcNsx_ProcessCore()
1549 assert(inst->blockLen10ms > 0); in WebRtcNsx_ProcessCore()
1550 assert(inst->blockLen10ms % 16 == 0); in WebRtcNsx_ProcessCore()
1551 assert(inst->magnLen == inst->anaLen2 + 1); in WebRtcNsx_ProcessCore()
1555 inst->blockLen10ms, inst->infile) != inst->blockLen10ms) { in WebRtcNsx_ProcessCore()
1561 assert(inst->initFlag == 1); in WebRtcNsx_ProcessCore()
1571 WebRtcNsx_DataAnalysis(inst, (short*)speechFrame[0], magnU16); in WebRtcNsx_ProcessCore()
1573 if (inst->zeroInputSignal) { in WebRtcNsx_ProcessCore()
1574 WebRtcNsx_DataSynthesis(inst, outFrame[0]); in WebRtcNsx_ProcessCore()
1580 int block_shift = inst->anaLen - inst->blockLen10ms; in WebRtcNsx_ProcessCore()
1581 memcpy(inst->dataBufHBFX[i], inst->dataBufHBFX[i] + inst->blockLen10ms, in WebRtcNsx_ProcessCore()
1582 block_shift * sizeof(*inst->dataBufHBFX[i])); in WebRtcNsx_ProcessCore()
1583 memcpy(inst->dataBufHBFX[i] + block_shift, speechFrameHB[i], in WebRtcNsx_ProcessCore()
1584 inst->blockLen10ms * sizeof(*inst->dataBufHBFX[i])); in WebRtcNsx_ProcessCore()
1585 for (j = 0; j < inst->blockLen10ms; j++) { in WebRtcNsx_ProcessCore()
1586 outFrameHB[i][j] = inst->dataBufHBFX[i][j]; // Q0 in WebRtcNsx_ProcessCore()
1594 inst->blockIndex++; in WebRtcNsx_ProcessCore()
1598 qMagn = inst->normData - inst->stages; in WebRtcNsx_ProcessCore()
1601 WebRtcNsx_ComputeSpectralFlatness(inst, magnU16); in WebRtcNsx_ProcessCore()
1604 WebRtcNsx_NoiseEstimation(inst, magnU16, noiseU32, &qNoise); in WebRtcNsx_ProcessCore()
1607 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ProcessCore()
1608 prevNoiseU16[i] = (uint16_t)(inst->prevNoiseU32[i] >> 11); // Q(prevQNoise) in WebRtcNsx_ProcessCore()
1611 if (inst->blockIndex < END_STARTUP_SHORT) { in WebRtcNsx_ProcessCore()
1613 q_domain_to_use = WEBRTC_SPL_MIN((int)qNoise, inst->minNorm - inst->stages); in WebRtcNsx_ProcessCore()
1617 if (inst->pinkNoiseExp) { in WebRtcNsx_ProcessCore()
1618 pink_noise_exp_avg = (int16_t)WebRtcSpl_DivW32W16(inst->pinkNoiseExp, in WebRtcNsx_ProcessCore()
1619 … (int16_t)(inst->blockIndex + 1)); // Q14 in WebRtcNsx_ProcessCore()
1620 pink_noise_num_avg = WebRtcSpl_DivW32W16(inst->pinkNoiseNumerator, in WebRtcNsx_ProcessCore()
1621 (int16_t)(inst->blockIndex + 1)); // Q11 in WebRtcNsx_ProcessCore()
1622 WebRtcNsx_CalcParametricNoiseEstimate(inst, in WebRtcNsx_ProcessCore()
1630 noise_estimate = inst->whiteNoiseLevel; // Q(minNorm-stages) in WebRtcNsx_ProcessCore()
1631 noise_estimate_avg = noise_estimate / (inst->blockIndex + 1); // Q(minNorm-stages) in WebRtcNsx_ProcessCore()
1633 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ProcessCore()
1635 if ((inst->pinkNoiseExp) && (i >= kStartBand)) { in WebRtcNsx_ProcessCore()
1640 WebRtcNsx_CalcParametricNoiseEstimate(inst, in WebRtcNsx_ProcessCore()
1648 noiseSupFilterTmp[i] = inst->denoiseBound; in WebRtcNsx_ProcessCore()
1649 if (inst->initMagnEst[i]) { in WebRtcNsx_ProcessCore()
1652 tmpU32no1 = WEBRTC_SPL_UMUL_32_16(noise_estimate, inst->overdrive); in WebRtcNsx_ProcessCore()
1653 numerator = inst->initMagnEst[i] << 8; in WebRtcNsx_ProcessCore()
1667 tmpU32no1 = inst->initMagnEst[i] >> (6 - nShifts); in WebRtcNsx_ProcessCore()
1675 (uint32_t)(inst->denoiseBound)); // Q14 in WebRtcNsx_ProcessCore()
1689 (inst->minNorm - inst->stages - q_domain_to_use); in WebRtcNsx_ProcessCore()
1698 tmpU32no1 *= inst->blockIndex; in WebRtcNsx_ProcessCore()
1699 tmpU32no2 *= (END_STARTUP_SHORT - inst->blockIndex); in WebRtcNsx_ProcessCore()
1710 if (inst->blockIndex < END_STARTUP_LONG) { in WebRtcNsx_ProcessCore()
1712 inst->timeAvgMagnEnergyTmp += in WebRtcNsx_ProcessCore()
1713 inst->magnEnergy >> (2 * inst->normData + inst->stages - 1); in WebRtcNsx_ProcessCore()
1714 inst->timeAvgMagnEnergy = WebRtcSpl_DivU32U16(inst->timeAvgMagnEnergyTmp, in WebRtcNsx_ProcessCore()
1715 inst->blockIndex + 1); in WebRtcNsx_ProcessCore()
1724 nShifts = 5 - inst->prevQMagn + inst->prevQNoise; in WebRtcNsx_ProcessCore()
1725 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ProcessCore()
1764 nearMagnEst = inst->prevMagnU16[i] * inst->noiseSupFilter[i]; in WebRtcNsx_ProcessCore()
1766 tmpU32no2 = inst->prevNoiseU32[i] >> nShifts; // Q(prevQMagn+6) in WebRtcNsx_ProcessCore()
1788 WebRtcNsx_ComputeSpectralDifference(inst, magnU16); in WebRtcNsx_ProcessCore()
1792 inst->cntThresUpdate++; in WebRtcNsx_ProcessCore()
1793 flag = (int)(inst->cntThresUpdate == inst->modelUpdate); in WebRtcNsx_ProcessCore()
1795 WebRtcNsx_FeatureParameterExtraction(inst, flag); in WebRtcNsx_ProcessCore()
1798 inst->cntThresUpdate = 0; // Reset counter in WebRtcNsx_ProcessCore()
1803 inst->curAvgMagnEnergy >>= STAT_UPDATES; in WebRtcNsx_ProcessCore()
1805 tmpU32no1 = (inst->curAvgMagnEnergy + inst->timeAvgMagnEnergy + 1) >> 1; //Q(-2*stages) in WebRtcNsx_ProcessCore()
1807 if ((tmpU32no1 != inst->timeAvgMagnEnergy) && (inst->featureSpecDiff) && in WebRtcNsx_ProcessCore()
1808 (inst->timeAvgMagnEnergy > 0)) { in WebRtcNsx_ProcessCore()
1815 tmpU32no2 = inst->featureSpecDiff; in WebRtcNsx_ProcessCore()
1821 tmpU32no3 /= inst->timeAvgMagnEnergy; in WebRtcNsx_ProcessCore()
1823 inst->featureSpecDiff = 0x007FFFFF; in WebRtcNsx_ProcessCore()
1825 inst->featureSpecDiff = WEBRTC_SPL_MIN(0x007FFFFF, in WebRtcNsx_ProcessCore()
1830 inst->timeAvgMagnEnergy = tmpU32no1; // Q(-2*stages) in WebRtcNsx_ProcessCore()
1831 inst->curAvgMagnEnergy = 0; in WebRtcNsx_ProcessCore()
1835 WebRtcNsx_SpeechNoiseProb(inst, nonSpeechProbFinal, priorLocSnr, postLocSnr); in WebRtcNsx_ProcessCore()
1841 postShifts = inst->prevQNoise - qMagn; in WebRtcNsx_ProcessCore()
1842 nShifts = inst->prevQMagn - qMagn; in WebRtcNsx_ProcessCore()
1843 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ProcessCore()
1860 noiseUpdateU32 = inst->prevNoiseU32[i]; // Q(prevQNoise+11) in WebRtcNsx_ProcessCore()
1905 tmpU32no1 = inst->prevNoiseU32[i] + tmpU32no2; // Q(prevQNoise+11) in WebRtcNsx_ProcessCore()
1907 tmpU32no1 = inst->prevNoiseU32[i] - tmpU32no2; // Q(prevQNoise+11) in WebRtcNsx_ProcessCore()
1924 tmp32no2 = WEBRTC_SPL_SHIFT_W32(inst->avgMagnPause[i], -nShifts); in WebRtcNsx_ProcessCore()
1932 tmp32no1 = ((int32_t)magnU16[i] << nShifts) - inst->avgMagnPause[i]; in WebRtcNsx_ProcessCore()
1938 inst->avgMagnPause[i] = tmp32no2; in WebRtcNsx_ProcessCore()
1942 qNoise = inst->prevQNoise + norm32no1 - 5; in WebRtcNsx_ProcessCore()
1946 nShifts = inst->prevQNoise + 11 - qMagn; in WebRtcNsx_ProcessCore()
1947 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ProcessCore()
1996 tmpU32no1 = inst->overdrive + ((priorSnr + 8192) >> 14); // Q8 in WebRtcNsx_ProcessCore()
1997 assert(inst->overdrive > 0); in WebRtcNsx_ProcessCore()
1999inst->noiseSupFilter[i] = WEBRTC_SPL_SAT(16384, tmpU16no1, inst->denoiseBound); // 16384 = Q14(1.0… in WebRtcNsx_ProcessCore()
2002 if (inst->blockIndex < END_STARTUP_SHORT) { in WebRtcNsx_ProcessCore()
2004 tmpU32no1 = inst->noiseSupFilter[i] * inst->blockIndex; in WebRtcNsx_ProcessCore()
2006 (END_STARTUP_SHORT - inst->blockIndex); in WebRtcNsx_ProcessCore()
2008 inst->noiseSupFilter[i] = (uint16_t)WebRtcSpl_DivU32U16(tmpU32no1, in WebRtcNsx_ProcessCore()
2015 inst->prevQNoise = qNoise; in WebRtcNsx_ProcessCore()
2016 inst->prevQMagn = qMagn; in WebRtcNsx_ProcessCore()
2018 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ProcessCore()
2019 inst->prevNoiseU32[i] = noiseU32[i] << (norm32no1 - 5); // Q(qNoise+11) in WebRtcNsx_ProcessCore()
2020 inst->prevMagnU16[i] = magnU16[i]; // Q(qMagn) in WebRtcNsx_ProcessCore()
2023 for (i = 0; i < inst->magnLen; i++) { in WebRtcNsx_ProcessCore()
2024 inst->prevNoiseU32[i] = noiseU32[i] >> (5 - norm32no1); // Q(qNoise+11) in WebRtcNsx_ProcessCore()
2025 inst->prevMagnU16[i] = magnU16[i]; // Q(qMagn) in WebRtcNsx_ProcessCore()
2029 WebRtcNsx_DataSynthesis(inst, outFrame[0]); in WebRtcNsx_ProcessCore()
2032 inst->blockLen10ms, inst->outfile) != inst->blockLen10ms) { in WebRtcNsx_ProcessCore()
2043 memcpy(inst->dataBufHBFX[i], inst->dataBufHBFX[i] + inst->blockLen10ms, in WebRtcNsx_ProcessCore()
2044 (inst->anaLen - inst->blockLen10ms) * sizeof(*inst->dataBufHBFX[i])); in WebRtcNsx_ProcessCore()
2045 memcpy(inst->dataBufHBFX[i] + inst->anaLen - inst->blockLen10ms, in WebRtcNsx_ProcessCore()
2046 speechFrameHB[i], inst->blockLen10ms * sizeof(*inst->dataBufHBFX[i])); in WebRtcNsx_ProcessCore()
2056 for (i = inst->anaLen2 - (inst->anaLen2 >> 2); i < inst->anaLen2; i++) { in WebRtcNsx_ProcessCore()
2058 tmpU32no1 += (uint32_t)(inst->noiseSupFilter[i]); // Q14 in WebRtcNsx_ProcessCore()
2060 assert(inst->stages >= 7); in WebRtcNsx_ProcessCore()
2061 avgProbSpeechHB = (4096 - (tmpU16no1 >> (inst->stages - 7))); // Q12 in WebRtcNsx_ProcessCore()
2062 avgFilterGainHB = (int16_t)(tmpU32no1 >> (inst->stages - 3)); // Q14 in WebRtcNsx_ProcessCore()
2101 = WEBRTC_SPL_SAT(16384, gainTimeDomainHB, (int16_t)(inst->denoiseBound)); // 16384 = Q14(1.0) in WebRtcNsx_ProcessCore()
2106 for (j = 0; j < inst->blockLen10ms; j++) { in WebRtcNsx_ProcessCore()
2108 inst->dataBufHBFX[i][j]) >> 14); // Q0 in WebRtcNsx_ProcessCore()