Loading lib_com/prot_fx2.h +6 −3 Original line number Diff line number Diff line Loading @@ -5906,7 +5906,8 @@ void DetectTonalComponents( const Word32 secondLastPowerSpectrum[], const Word16 nSamples, const Word16 nSamplesCore, Word16 floorPowerSpectrum /* i: lower limit for power spectrum bins */ Word16 floorPowerSpectrum, /* i: lower limit for power spectrum bins */ Word16 element_mode #ifdef IVAS_CODE_MDCT_GSHAPE , const PsychoacousticParameters* psychParamsCurrent #endif Loading Loading @@ -5935,7 +5936,8 @@ void RefineTonalComponents( const Word32 secondLastPowerSpectrum[], const Word16 nSamples, const Word16 nSamplesCore, const Word16 floorPowerSpectrum /* i: lower limit for power spectrum bins */ const Word16 floorPowerSpectrum, /* i: lower limit for power spectrum bins */ Word16 element_mode #ifdef IVAS_CODE_MDCT_GSHAPE , const PsychoacousticParameters* psychParamsCurrent #endif Loading Loading @@ -6016,7 +6018,8 @@ void TonalMDCTConceal_SaveTimeSignal( void TonalMDCTConceal_Detect( const TonalMDCTConcealPtr self, /*IN */ const Word32 pitchLag, /*IN */ Word16 * umIndices /*OUT*/ Word16 * umIndices, /*OUT*/ Word16 element_mode /* IN */ #ifdef IVAS_CODE_MDCT_GSHAPE , const PsychoacousticParameters* psychParamsCurrent #endif Loading lib_dec/TonalComponentDetection_fx.c +14 −10 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ static void findCandidates(const Word16 nSamples, const Word32 * MDCTSpectrum, c static void modifyThreshold(Word16 i, Word16 F0, Word16 threshold, Word16 * thresholdModification); static void modifyThresholds(Word16 F0, Word16 origF0, Word16 * thresholdModification); static void RefineThresholdsUsingPitch(const Word16 nSamples, const Word16 nSamplesCore, const Word32 powerSpectrum[], const Word32 lastPitchLag, const Word32 currentPitchLag, Word16 * pF0, Word16 * thresholdModification); static void findTonalComponents(Word16 * indexOfTonalPeak, Word16 * lowerIndex, Word16 * upperIndex, Word16 *numIndexes, Word16 nSamples, const Word32 * powerSpectrum, Word16 F0, Word16 * thresholdModification); static void findTonalComponents(Word16 * indexOfTonalPeak, Word16 * lowerIndex, Word16 * upperIndex, Word16 *numIndexes, Word16 nSamples, const Word32 * powerSpectrum, Word16 F0, Word16 * thresholdModification, Word16 element_mode); /*-------------------------------------------------------------------* * DetectTonalComponents() Loading @@ -58,7 +58,8 @@ void ivas_DetectTonalComponents_fx( const Word16 nSamples, const Word16 nSamplesCore, Word16 floorPowerSpectrum, /* i: lower limit for power spectrum bins */ const PsychoacousticParameters* psychParamsCurrent const PsychoacousticParameters* psychParamsCurrent, Word16 element_mode /* i: element mode */ ) { Word16 F0; Loading Loading @@ -109,7 +110,7 @@ void ivas_DetectTonalComponents_fx( RefineThresholdsUsingPitch(nSamples, nSamplesCore, secondLastPowerSpectrum, lastPitchLag, currentPitchLag, &F0, thresholdModification); /* Find peaks in the second last frame */ findTonalComponents(indexOfTonalPeak, lowerIndex, upperIndex, pNumIndexes, nSamples, secondLastPowerSpectrum, F0, thresholdModification); findTonalComponents(indexOfTonalPeak, lowerIndex, upperIndex, pNumIndexes, nSamples, secondLastPowerSpectrum, F0, thresholdModification, element_mode); } #endif Loading @@ -128,7 +129,8 @@ void DetectTonalComponents( const Word32 secondLastPowerSpectrum[], const Word16 nSamples, const Word16 nSamplesCore, Word16 floorPowerSpectrum /* i: lower limit for power spectrum bins */ Word16 floorPowerSpectrum, /* i: lower limit for power spectrum bins */ Word16 element_mode #ifdef IVAS_CODE_MDCT_GSHAPE , const PsychoacousticParameters* psychParamsCurrent #endif Loading Loading @@ -164,7 +166,7 @@ void DetectTonalComponents( RefineThresholdsUsingPitch(nSamples, nSamplesCore, secondLastPowerSpectrum, lastPitchLag, currentPitchLag, &F0, thresholdModification); /* Find peaks in the second last frame */ findTonalComponents(indexOfTonalPeak, lowerIndex, upperIndex, pNumIndexes, nSamples, secondLastPowerSpectrum, F0, thresholdModification); findTonalComponents(indexOfTonalPeak, lowerIndex, upperIndex, pNumIndexes, nSamples, secondLastPowerSpectrum, F0, thresholdModification, element_mode); } /*-------------------------------------------------------------------* Loading Loading @@ -194,7 +196,8 @@ void RefineTonalComponents( const Word32 secondLastPowerSpectrum[], const Word16 nSamples, const Word16 nSamplesCore, const Word16 floorPowerSpectrum /* i: lower limit for power spectrum bins */ const Word16 floorPowerSpectrum, /* i: lower limit for power spectrum bins */ Word16 element_mode #ifdef IVAS_CODE_MDCT_GSHAPE ,const PsychoacousticParameters* psychParamsCurrent #endif Loading @@ -209,7 +212,7 @@ void RefineTonalComponents( DetectTonalComponents(newIndexOfTonalPeak, newLowerIndex, newUpperIndex, &newNumIndexes, lastPitchLag, currentPitchLag, lastMDCTSpectrum, lastMDCTSpectrum_exp, scaleFactors, scaleFactors_exp, scaleFactors_max_e, secondLastPowerSpectrum, nSamples, nSamplesCore, floorPowerSpectrum lastMDCTSpectrum_exp, scaleFactors, scaleFactors_exp, scaleFactors_max_e, secondLastPowerSpectrum, nSamples, nSamplesCore, floorPowerSpectrum, element_mode #ifdef IVAS_CODE_MDCT_GSHAPE , psychParamsCurrent #endif Loading Loading @@ -975,7 +978,8 @@ static void findTonalComponents( Word16 nSamples, /* IN */ const Word32 * powerSpectrum, /* IN */ Word16 F0, /* IN */ Word16 * thresholdModification) /* IN */ Word16 * thresholdModification, /* IN */ Word16 element_mode) /* IN */ { Word32 envelope[L_FRAME_MAX]; Word32 smoothedSpectrum[L_FRAME_MAX]; Loading Loading @@ -1029,8 +1033,8 @@ static void findTonalComponents( } /* Side lobe increase must be 2 times smaller than the decrease to the foot */ /* Eq. to 2.0f*powerSpectrum[lowerIdx-1]/powerSpectrum[lowerIdx] > powerSpectrum[lowerIdx]/powerSpectrum[j] */ //IF( GT_32( Mpy_32_32( L_shl( powerSpectrum[upperIdx + 1], 1 ), powerSpectrum[j] ), Mpy_32_32( powerSpectrum[upperIdx], powerSpectrum[upperIdx] ) ) ) IF( GT_64( W_mult_32_32( L_shl( powerSpectrum[upperIdx + 1], 1 ), powerSpectrum[j] ), W_mult_32_32( powerSpectrum[upperIdx], powerSpectrum[upperIdx] ) ) ) IF( (EQ_16(element_mode, EVS_MONO) && GT_32( Mpy_32_32( L_shl( powerSpectrum[upperIdx + 1], 1 ), powerSpectrum[j] ), Mpy_32_32( powerSpectrum[upperIdx], powerSpectrum[upperIdx] ) ) ) || (NE_16(element_mode, EVS_MONO) && ( GT_64( W_mult_32_32( L_shl( powerSpectrum[upperIdx + 1], 1 ), powerSpectrum[j] ), W_mult_32_32( powerSpectrum[upperIdx], powerSpectrum[upperIdx] ) ) ) ) ) { BREAK; } Loading lib_dec/er_util_fx.c +4 −4 Original line number Diff line number Diff line Loading @@ -465,8 +465,8 @@ Word16 GetPLCModeDecision_ivas_fx( //); TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices , (st->element_mode == IVAS_CPE_MDCT ? &(st->hTcxCfg->psychParamsTCX20) : st->hTcxCfg->psychParamsCurrent) ); , (st->element_mode == IVAS_CPE_MDCT ? &(st->hTcxCfg->psychParamsTCX20) : st->hTcxCfg->psychParamsCurrent), st->element_mode); test(); test(); Loading Loading @@ -596,14 +596,14 @@ Word16 GetPLCModeDecision( } if (st->element_mode == EVS_MONO) { TonalMDCTConceal_Detect(&st->tonalMDCTconceal, pitch, &numIndices TonalMDCTConceal_Detect(&st->tonalMDCTconceal, pitch, &numIndices, st->element_mode #ifdef ADD_IVAS_HTONALMDCTCONC , (st->element_mode == IVAS_CPE_MDCT ? &(st->hTcxCfg->psychParamsTCX20) : st->hTcxCfg->psychParamsCurrent) #endif ); } else { TonalMDCTConceal_Detect(st->hTonalMDCTConc, pitch, &numIndices TonalMDCTConceal_Detect(st->hTonalMDCTConc, pitch, &numIndices, st->element_mode #ifdef ADD_IVAS_HTONALMDCTCONC , (st->element_mode == IVAS_CPE_MDCT ? &(st->hTcxCfg->psychParamsTCX20) : st->hTcxCfg->psychParamsCurrent) #endif Loading lib_dec/tonalMDCTconcealment_fx.c +15 −11 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ static void CalcMDXT(const TonalMDCTConcealPtr hTonalMDCTConc, const Word16 type, const Word16 * timeSignal, Word32 * mdxtOutput, Word16 * mdxtOutput_e); static void CalcPowerSpec(const Word32 * mdctSpec, const Word16 mdctSpec_exp, const Word32 * mdstSpec, const Word16 mdstSpec_exp, const Word16 nSamples, const Word16 floorPowerSpectrum, Word32 * powerSpec, Word16 * powerSpec_exp); static void CalcPowerSpecAndDetectTonalComponents(TonalMDCTConcealPtr const hTonalMDCTConc, Word32 secondLastMDST[], Word16 secondLastMDST_exp, Word32 secondLastMDCT[], Word16 secondLastMDCT_exp, Word32 const pitchLag); static void CalcPowerSpecAndDetectTonalComponents(TonalMDCTConcealPtr const hTonalMDCTConc, Word32 secondLastMDST[], Word16 secondLastMDST_exp, Word32 secondLastMDCT[], Word16 secondLastMDCT_exp, Word32 const pitchLag, Word16 element_mode); static void FindPhases(TonalMDCTConcealPtr const hTonalMDCTConc, Word32 secondLastMDCT[], Word32 secondLastMDST[], Word16 diff_exp); static void FindPhaseDifferences(TonalMDCTConcealPtr const hTonalMDCTConc, Word32 powerSpectrum[]); Loading Loading @@ -720,7 +720,8 @@ static void ivas_CalcPowerSpecAndDetectTonalComponents_fx( Word32 secondLastMDCT[], Word16 secondLastMDCT_exp, Word32 const pitchLag, const PsychoacousticParameters* psychParamsCurrent const PsychoacousticParameters* psychParamsCurrent, Word16 element_mode ) { Word16 nSamples; Loading Loading @@ -796,7 +797,7 @@ static void ivas_CalcPowerSpecAndDetectTonalComponents_fx( powerSpectrum, nSamples, hTonalMDCTConc->nSamplesCore, floorPowerSpectrum, psychParamsCurrent); floorPowerSpectrum, psychParamsCurrent, element_mode); FindPhases(hTonalMDCTConc, secondLastMDCT, secondLastMDST, sub(secondLastMDST_exp,secondLastMDCT_exp)); FindPhaseDifferences(hTonalMDCTConc, powerSpectrum); Loading Loading @@ -882,7 +883,8 @@ static void CalcPowerSpecAndDetectTonalComponents( Word16 secondLastMDST_exp, Word32 secondLastMDCT[], Word16 secondLastMDCT_exp, Word32 const pitchLag Word32 const pitchLag, Word16 element_mode #ifdef IVAS_CODE_MDCT_GSHAPE ,const PsychoacousticParameters* psychParamsCurrent #endif Loading Loading @@ -942,7 +944,7 @@ static void CalcPowerSpecAndDetectTonalComponents( powerSpectrum, nSamples, hTonalMDCTConc->nSamplesCore, floorPowerSpectrum); floorPowerSpectrum, element_mode); FindPhases(hTonalMDCTConc, secondLastMDCT, secondLastMDST, sub(secondLastMDST_exp,secondLastMDCT_exp)); FindPhaseDifferences(hTonalMDCTConc, powerSpectrum); Loading Loading @@ -1046,7 +1048,8 @@ static void CalcMDXT( void TonalMDCTConceal_Detect( const TonalMDCTConcealPtr hTonalMDCTConc, const Word32 pitchLag, Word16 * numIndices Word16 * numIndices, Word16 element_mode #ifdef IVAS_CODE_MDCT_GSHAPE ,const PsychoacousticParameters* psychParamsCurrent #endif Loading Loading @@ -1115,7 +1118,7 @@ void TonalMDCTConceal_Detect( } secondLastMDCT_exp = sub(secondLastMDCT_exp, s); move16(); CalcPowerSpecAndDetectTonalComponents(hTonalMDCTConc, secondLastMDST, secondLastMDST_exp, secondLastMDCT, secondLastMDCT_exp, pitchLag); CalcPowerSpecAndDetectTonalComponents(hTonalMDCTConc, secondLastMDST, secondLastMDST_exp, secondLastMDCT, secondLastMDCT_exp, pitchLag, element_mode); } ELSE { Loading Loading @@ -1165,7 +1168,7 @@ void TonalMDCTConceal_Detect( powerSpectrum, nSamples, hTonalMDCTConc->nSamplesCore, extract_l(Mpy_32_16_1(L_mult0(hTonalMDCTConc->nSamples,hTonalMDCTConc->nSamples),82))); /* floorPowerSpectrum */ extract_l(Mpy_32_16_1(L_mult0(hTonalMDCTConc->nSamples,hTonalMDCTConc->nSamples),82)), element_mode); /* floorPowerSpectrum */ } } Loading @@ -1188,7 +1191,8 @@ void TonalMDCTConceal_Detect_ivas_fx( const TonalMDCTConcealPtr hTonalMDCTConc, const Word32 pitchLag, Word16 * numIndices, const PsychoacousticParameters* psychParamsCurrent const PsychoacousticParameters* psychParamsCurrent, Word16 element_mode ) { Word32 secondLastMDST[L_FRAME_MAX]; Loading Loading @@ -1256,7 +1260,7 @@ void TonalMDCTConceal_Detect_ivas_fx( secondLastMDCT_exp = sub(secondLastMDCT_exp, s); move16(); //CalcPowerSpecAndDetectTonalComponents(hTonalMDCTConc, secondLastMDST, secondLastMDST_exp, secondLastMDCT, secondLastMDCT_exp, pitchLag); ivas_CalcPowerSpecAndDetectTonalComponents_fx(hTonalMDCTConc, secondLastMDST, secondLastMDST_exp, secondLastMDCT, secondLastMDCT_exp, pitchLag, psychParamsCurrent); ivas_CalcPowerSpecAndDetectTonalComponents_fx(hTonalMDCTConc, secondLastMDST, secondLastMDST_exp, secondLastMDCT, secondLastMDCT_exp, pitchLag, psychParamsCurrent, element_mode); } ELSE { Loading Loading @@ -1308,7 +1312,7 @@ void TonalMDCTConceal_Detect_ivas_fx( powerSpectrum, nSamples, hTonalMDCTConc->nSamplesCore, extract_l(Mpy_32_16_1(L_mult0(hTonalMDCTConc->nSamples,hTonalMDCTConc->nSamples),82))); /* floorPowerSpectrum */ extract_l(Mpy_32_16_1(L_mult0(hTonalMDCTConc->nSamples,hTonalMDCTConc->nSamples),82)), element_mode); /* floorPowerSpectrum */ } } Loading Loading
lib_com/prot_fx2.h +6 −3 Original line number Diff line number Diff line Loading @@ -5906,7 +5906,8 @@ void DetectTonalComponents( const Word32 secondLastPowerSpectrum[], const Word16 nSamples, const Word16 nSamplesCore, Word16 floorPowerSpectrum /* i: lower limit for power spectrum bins */ Word16 floorPowerSpectrum, /* i: lower limit for power spectrum bins */ Word16 element_mode #ifdef IVAS_CODE_MDCT_GSHAPE , const PsychoacousticParameters* psychParamsCurrent #endif Loading Loading @@ -5935,7 +5936,8 @@ void RefineTonalComponents( const Word32 secondLastPowerSpectrum[], const Word16 nSamples, const Word16 nSamplesCore, const Word16 floorPowerSpectrum /* i: lower limit for power spectrum bins */ const Word16 floorPowerSpectrum, /* i: lower limit for power spectrum bins */ Word16 element_mode #ifdef IVAS_CODE_MDCT_GSHAPE , const PsychoacousticParameters* psychParamsCurrent #endif Loading Loading @@ -6016,7 +6018,8 @@ void TonalMDCTConceal_SaveTimeSignal( void TonalMDCTConceal_Detect( const TonalMDCTConcealPtr self, /*IN */ const Word32 pitchLag, /*IN */ Word16 * umIndices /*OUT*/ Word16 * umIndices, /*OUT*/ Word16 element_mode /* IN */ #ifdef IVAS_CODE_MDCT_GSHAPE , const PsychoacousticParameters* psychParamsCurrent #endif Loading
lib_dec/TonalComponentDetection_fx.c +14 −10 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ static void findCandidates(const Word16 nSamples, const Word32 * MDCTSpectrum, c static void modifyThreshold(Word16 i, Word16 F0, Word16 threshold, Word16 * thresholdModification); static void modifyThresholds(Word16 F0, Word16 origF0, Word16 * thresholdModification); static void RefineThresholdsUsingPitch(const Word16 nSamples, const Word16 nSamplesCore, const Word32 powerSpectrum[], const Word32 lastPitchLag, const Word32 currentPitchLag, Word16 * pF0, Word16 * thresholdModification); static void findTonalComponents(Word16 * indexOfTonalPeak, Word16 * lowerIndex, Word16 * upperIndex, Word16 *numIndexes, Word16 nSamples, const Word32 * powerSpectrum, Word16 F0, Word16 * thresholdModification); static void findTonalComponents(Word16 * indexOfTonalPeak, Word16 * lowerIndex, Word16 * upperIndex, Word16 *numIndexes, Word16 nSamples, const Word32 * powerSpectrum, Word16 F0, Word16 * thresholdModification, Word16 element_mode); /*-------------------------------------------------------------------* * DetectTonalComponents() Loading @@ -58,7 +58,8 @@ void ivas_DetectTonalComponents_fx( const Word16 nSamples, const Word16 nSamplesCore, Word16 floorPowerSpectrum, /* i: lower limit for power spectrum bins */ const PsychoacousticParameters* psychParamsCurrent const PsychoacousticParameters* psychParamsCurrent, Word16 element_mode /* i: element mode */ ) { Word16 F0; Loading Loading @@ -109,7 +110,7 @@ void ivas_DetectTonalComponents_fx( RefineThresholdsUsingPitch(nSamples, nSamplesCore, secondLastPowerSpectrum, lastPitchLag, currentPitchLag, &F0, thresholdModification); /* Find peaks in the second last frame */ findTonalComponents(indexOfTonalPeak, lowerIndex, upperIndex, pNumIndexes, nSamples, secondLastPowerSpectrum, F0, thresholdModification); findTonalComponents(indexOfTonalPeak, lowerIndex, upperIndex, pNumIndexes, nSamples, secondLastPowerSpectrum, F0, thresholdModification, element_mode); } #endif Loading @@ -128,7 +129,8 @@ void DetectTonalComponents( const Word32 secondLastPowerSpectrum[], const Word16 nSamples, const Word16 nSamplesCore, Word16 floorPowerSpectrum /* i: lower limit for power spectrum bins */ Word16 floorPowerSpectrum, /* i: lower limit for power spectrum bins */ Word16 element_mode #ifdef IVAS_CODE_MDCT_GSHAPE , const PsychoacousticParameters* psychParamsCurrent #endif Loading Loading @@ -164,7 +166,7 @@ void DetectTonalComponents( RefineThresholdsUsingPitch(nSamples, nSamplesCore, secondLastPowerSpectrum, lastPitchLag, currentPitchLag, &F0, thresholdModification); /* Find peaks in the second last frame */ findTonalComponents(indexOfTonalPeak, lowerIndex, upperIndex, pNumIndexes, nSamples, secondLastPowerSpectrum, F0, thresholdModification); findTonalComponents(indexOfTonalPeak, lowerIndex, upperIndex, pNumIndexes, nSamples, secondLastPowerSpectrum, F0, thresholdModification, element_mode); } /*-------------------------------------------------------------------* Loading Loading @@ -194,7 +196,8 @@ void RefineTonalComponents( const Word32 secondLastPowerSpectrum[], const Word16 nSamples, const Word16 nSamplesCore, const Word16 floorPowerSpectrum /* i: lower limit for power spectrum bins */ const Word16 floorPowerSpectrum, /* i: lower limit for power spectrum bins */ Word16 element_mode #ifdef IVAS_CODE_MDCT_GSHAPE ,const PsychoacousticParameters* psychParamsCurrent #endif Loading @@ -209,7 +212,7 @@ void RefineTonalComponents( DetectTonalComponents(newIndexOfTonalPeak, newLowerIndex, newUpperIndex, &newNumIndexes, lastPitchLag, currentPitchLag, lastMDCTSpectrum, lastMDCTSpectrum_exp, scaleFactors, scaleFactors_exp, scaleFactors_max_e, secondLastPowerSpectrum, nSamples, nSamplesCore, floorPowerSpectrum lastMDCTSpectrum_exp, scaleFactors, scaleFactors_exp, scaleFactors_max_e, secondLastPowerSpectrum, nSamples, nSamplesCore, floorPowerSpectrum, element_mode #ifdef IVAS_CODE_MDCT_GSHAPE , psychParamsCurrent #endif Loading Loading @@ -975,7 +978,8 @@ static void findTonalComponents( Word16 nSamples, /* IN */ const Word32 * powerSpectrum, /* IN */ Word16 F0, /* IN */ Word16 * thresholdModification) /* IN */ Word16 * thresholdModification, /* IN */ Word16 element_mode) /* IN */ { Word32 envelope[L_FRAME_MAX]; Word32 smoothedSpectrum[L_FRAME_MAX]; Loading Loading @@ -1029,8 +1033,8 @@ static void findTonalComponents( } /* Side lobe increase must be 2 times smaller than the decrease to the foot */ /* Eq. to 2.0f*powerSpectrum[lowerIdx-1]/powerSpectrum[lowerIdx] > powerSpectrum[lowerIdx]/powerSpectrum[j] */ //IF( GT_32( Mpy_32_32( L_shl( powerSpectrum[upperIdx + 1], 1 ), powerSpectrum[j] ), Mpy_32_32( powerSpectrum[upperIdx], powerSpectrum[upperIdx] ) ) ) IF( GT_64( W_mult_32_32( L_shl( powerSpectrum[upperIdx + 1], 1 ), powerSpectrum[j] ), W_mult_32_32( powerSpectrum[upperIdx], powerSpectrum[upperIdx] ) ) ) IF( (EQ_16(element_mode, EVS_MONO) && GT_32( Mpy_32_32( L_shl( powerSpectrum[upperIdx + 1], 1 ), powerSpectrum[j] ), Mpy_32_32( powerSpectrum[upperIdx], powerSpectrum[upperIdx] ) ) ) || (NE_16(element_mode, EVS_MONO) && ( GT_64( W_mult_32_32( L_shl( powerSpectrum[upperIdx + 1], 1 ), powerSpectrum[j] ), W_mult_32_32( powerSpectrum[upperIdx], powerSpectrum[upperIdx] ) ) ) ) ) { BREAK; } Loading
lib_dec/er_util_fx.c +4 −4 Original line number Diff line number Diff line Loading @@ -465,8 +465,8 @@ Word16 GetPLCModeDecision_ivas_fx( //); TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices , (st->element_mode == IVAS_CPE_MDCT ? &(st->hTcxCfg->psychParamsTCX20) : st->hTcxCfg->psychParamsCurrent) ); , (st->element_mode == IVAS_CPE_MDCT ? &(st->hTcxCfg->psychParamsTCX20) : st->hTcxCfg->psychParamsCurrent), st->element_mode); test(); test(); Loading Loading @@ -596,14 +596,14 @@ Word16 GetPLCModeDecision( } if (st->element_mode == EVS_MONO) { TonalMDCTConceal_Detect(&st->tonalMDCTconceal, pitch, &numIndices TonalMDCTConceal_Detect(&st->tonalMDCTconceal, pitch, &numIndices, st->element_mode #ifdef ADD_IVAS_HTONALMDCTCONC , (st->element_mode == IVAS_CPE_MDCT ? &(st->hTcxCfg->psychParamsTCX20) : st->hTcxCfg->psychParamsCurrent) #endif ); } else { TonalMDCTConceal_Detect(st->hTonalMDCTConc, pitch, &numIndices TonalMDCTConceal_Detect(st->hTonalMDCTConc, pitch, &numIndices, st->element_mode #ifdef ADD_IVAS_HTONALMDCTCONC , (st->element_mode == IVAS_CPE_MDCT ? &(st->hTcxCfg->psychParamsTCX20) : st->hTcxCfg->psychParamsCurrent) #endif Loading
lib_dec/tonalMDCTconcealment_fx.c +15 −11 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ static void CalcMDXT(const TonalMDCTConcealPtr hTonalMDCTConc, const Word16 type, const Word16 * timeSignal, Word32 * mdxtOutput, Word16 * mdxtOutput_e); static void CalcPowerSpec(const Word32 * mdctSpec, const Word16 mdctSpec_exp, const Word32 * mdstSpec, const Word16 mdstSpec_exp, const Word16 nSamples, const Word16 floorPowerSpectrum, Word32 * powerSpec, Word16 * powerSpec_exp); static void CalcPowerSpecAndDetectTonalComponents(TonalMDCTConcealPtr const hTonalMDCTConc, Word32 secondLastMDST[], Word16 secondLastMDST_exp, Word32 secondLastMDCT[], Word16 secondLastMDCT_exp, Word32 const pitchLag); static void CalcPowerSpecAndDetectTonalComponents(TonalMDCTConcealPtr const hTonalMDCTConc, Word32 secondLastMDST[], Word16 secondLastMDST_exp, Word32 secondLastMDCT[], Word16 secondLastMDCT_exp, Word32 const pitchLag, Word16 element_mode); static void FindPhases(TonalMDCTConcealPtr const hTonalMDCTConc, Word32 secondLastMDCT[], Word32 secondLastMDST[], Word16 diff_exp); static void FindPhaseDifferences(TonalMDCTConcealPtr const hTonalMDCTConc, Word32 powerSpectrum[]); Loading Loading @@ -720,7 +720,8 @@ static void ivas_CalcPowerSpecAndDetectTonalComponents_fx( Word32 secondLastMDCT[], Word16 secondLastMDCT_exp, Word32 const pitchLag, const PsychoacousticParameters* psychParamsCurrent const PsychoacousticParameters* psychParamsCurrent, Word16 element_mode ) { Word16 nSamples; Loading Loading @@ -796,7 +797,7 @@ static void ivas_CalcPowerSpecAndDetectTonalComponents_fx( powerSpectrum, nSamples, hTonalMDCTConc->nSamplesCore, floorPowerSpectrum, psychParamsCurrent); floorPowerSpectrum, psychParamsCurrent, element_mode); FindPhases(hTonalMDCTConc, secondLastMDCT, secondLastMDST, sub(secondLastMDST_exp,secondLastMDCT_exp)); FindPhaseDifferences(hTonalMDCTConc, powerSpectrum); Loading Loading @@ -882,7 +883,8 @@ static void CalcPowerSpecAndDetectTonalComponents( Word16 secondLastMDST_exp, Word32 secondLastMDCT[], Word16 secondLastMDCT_exp, Word32 const pitchLag Word32 const pitchLag, Word16 element_mode #ifdef IVAS_CODE_MDCT_GSHAPE ,const PsychoacousticParameters* psychParamsCurrent #endif Loading Loading @@ -942,7 +944,7 @@ static void CalcPowerSpecAndDetectTonalComponents( powerSpectrum, nSamples, hTonalMDCTConc->nSamplesCore, floorPowerSpectrum); floorPowerSpectrum, element_mode); FindPhases(hTonalMDCTConc, secondLastMDCT, secondLastMDST, sub(secondLastMDST_exp,secondLastMDCT_exp)); FindPhaseDifferences(hTonalMDCTConc, powerSpectrum); Loading Loading @@ -1046,7 +1048,8 @@ static void CalcMDXT( void TonalMDCTConceal_Detect( const TonalMDCTConcealPtr hTonalMDCTConc, const Word32 pitchLag, Word16 * numIndices Word16 * numIndices, Word16 element_mode #ifdef IVAS_CODE_MDCT_GSHAPE ,const PsychoacousticParameters* psychParamsCurrent #endif Loading Loading @@ -1115,7 +1118,7 @@ void TonalMDCTConceal_Detect( } secondLastMDCT_exp = sub(secondLastMDCT_exp, s); move16(); CalcPowerSpecAndDetectTonalComponents(hTonalMDCTConc, secondLastMDST, secondLastMDST_exp, secondLastMDCT, secondLastMDCT_exp, pitchLag); CalcPowerSpecAndDetectTonalComponents(hTonalMDCTConc, secondLastMDST, secondLastMDST_exp, secondLastMDCT, secondLastMDCT_exp, pitchLag, element_mode); } ELSE { Loading Loading @@ -1165,7 +1168,7 @@ void TonalMDCTConceal_Detect( powerSpectrum, nSamples, hTonalMDCTConc->nSamplesCore, extract_l(Mpy_32_16_1(L_mult0(hTonalMDCTConc->nSamples,hTonalMDCTConc->nSamples),82))); /* floorPowerSpectrum */ extract_l(Mpy_32_16_1(L_mult0(hTonalMDCTConc->nSamples,hTonalMDCTConc->nSamples),82)), element_mode); /* floorPowerSpectrum */ } } Loading @@ -1188,7 +1191,8 @@ void TonalMDCTConceal_Detect_ivas_fx( const TonalMDCTConcealPtr hTonalMDCTConc, const Word32 pitchLag, Word16 * numIndices, const PsychoacousticParameters* psychParamsCurrent const PsychoacousticParameters* psychParamsCurrent, Word16 element_mode ) { Word32 secondLastMDST[L_FRAME_MAX]; Loading Loading @@ -1256,7 +1260,7 @@ void TonalMDCTConceal_Detect_ivas_fx( secondLastMDCT_exp = sub(secondLastMDCT_exp, s); move16(); //CalcPowerSpecAndDetectTonalComponents(hTonalMDCTConc, secondLastMDST, secondLastMDST_exp, secondLastMDCT, secondLastMDCT_exp, pitchLag); ivas_CalcPowerSpecAndDetectTonalComponents_fx(hTonalMDCTConc, secondLastMDST, secondLastMDST_exp, secondLastMDCT, secondLastMDCT_exp, pitchLag, psychParamsCurrent); ivas_CalcPowerSpecAndDetectTonalComponents_fx(hTonalMDCTConc, secondLastMDST, secondLastMDST_exp, secondLastMDCT, secondLastMDCT_exp, pitchLag, psychParamsCurrent, element_mode); } ELSE { Loading Loading @@ -1308,7 +1312,7 @@ void TonalMDCTConceal_Detect_ivas_fx( powerSpectrum, nSamples, hTonalMDCTConc->nSamplesCore, extract_l(Mpy_32_16_1(L_mult0(hTonalMDCTConc->nSamples,hTonalMDCTConc->nSamples),82))); /* floorPowerSpectrum */ extract_l(Mpy_32_16_1(L_mult0(hTonalMDCTConc->nSamples,hTonalMDCTConc->nSamples),82)), element_mode); /* floorPowerSpectrum */ } } Loading