diff --git a/lib_com/fd_cng_com_fx.c b/lib_com/fd_cng_com_fx.c index 45dd66f45f58eaa6891ad64006d1012c3b47da9e..ac6d781a4d7ad3ff08299fa2b1a036ff480086fc 100644 --- a/lib_com/fd_cng_com_fx.c +++ b/lib_com/fd_cng_com_fx.c @@ -58,11 +58,7 @@ ivas_error createFdCngCom_fx( * *-------------------------------------------------------------------*/ -#ifdef FIX_2245_INIT_FD_CNG_EVS void initFdCngCom( -#else -void ivas_initFdCngCom_fx( -#endif HANDLE_FD_CNG_COM hFdCngCom, Word16 scale ) { @@ -178,112 +174,6 @@ void ivas_initFdCngCom_fx( return; } -#ifndef FIX_2245_INIT_FD_CNG_EVS -void initFdCngCom( HANDLE_FD_CNG_COM hFdCngCom, Word16 scale ) -{ - /* Calculate CLDFB scaling factor */ - /* shl(i_mult2(scale, scale), 3) does not fit in 16 bit */ - /*hFdCngCom->scalingFactor = div_s(1, shl(i_mult2(scale, scale), 3));*/ - assert( 2048 /*1.0/(1<<4) Q15*/ < mult( scale, scale ) ); - /* Exponent invScalingFactor: -16 = -(2*7 (scale) + 2 (8.0) */ - hFdCngCom->invScalingFactor = shl( mult( scale, scale ), 1 ); - move16(); - /* Exponent scalingFactor: -15 = -(2*7 (scale) + 2 (8.0) - 1 (1.0)) */ - hFdCngCom->scalingFactor = div_s( 0x4000, hFdCngCom->invScalingFactor ); - move16(); - - /* Initialize the overlap-add */ - set16_fx( hFdCngCom->timeDomainBuffer, 0, L_FRAME16k ); - hFdCngCom->olapBufferAna = NULL; - set16_fx( hFdCngCom->olapBufferAna_fx, 0, FFTLEN ); - - set16_fx( hFdCngCom->olapBufferSynth, 0, FFTLEN ); - hFdCngCom->olapBufferSynth2 = NULL; - - /* Initialize the comfort noise generation */ - set32_fx( hFdCngCom->fftBuffer, 0, FFTLEN ); - set32_fx( hFdCngCom->cngNoiseLevel, 0, FFTCLDFBLEN ); - set16_fx( &hFdCngCom->cngNoiseLevelExp, 0, 1 ); - - /* Initialize quantizer */ - set32_fx( hFdCngCom->sidNoiseEst, 0, NPART ); - set16_fx( &hFdCngCom->sidNoiseEstExp, 0, 1 ); - set16_fx( hFdCngCom->A_cng, 0, M + 1 ); - hFdCngCom->A_cng[0] = 4096 /*1.f Q12*/; /* 3Q12 */ - move16(); - - /* Set some counters and flags */ - hFdCngCom->inactive_frame_counter = 0; /* Either SID or zero frames */ - move16(); - hFdCngCom->active_frame_counter = 0; - move16(); - hFdCngCom->frame_type_previous = ACTIVE_FRAME; - move16(); - hFdCngCom->flag_noisy_speech = 0; - move16(); - hFdCngCom->likelihood_noisy_speech = 0; - move16(); - hFdCngCom->numCoreBands = 0; - move16(); - hFdCngCom->stopBand = 0; - move16(); - hFdCngCom->startBand = 0; - move16(); - hFdCngCom->stopFFTbin = 0; - move16(); - hFdCngCom->frameSize = 0; - move16(); - hFdCngCom->fftlen = 0; - move16(); - hFdCngCom->seed = 0; - move16(); - // hFdCngCom->seed2 = 1; - // move16(); - // hFdCngCom->seed3 = 2; - // move16(); - hFdCngCom->CngBitrate = -1; - move16(); - - /* Initialize noise estimation algorithm */ - set32_fx( hFdCngCom->periodog, 0, PERIODOGLEN ); - mhvals( MSNUMSUBFR * MSSUBFRLEN, &( hFdCngCom->msM_win ) ); - mhvals( MSSUBFRLEN, &( hFdCngCom->msM_subwin ) ); - set32_fx( hFdCngCom->msPeriodogSum, 0, 2 ); - hFdCngCom->msPeriodogSum_exp[0] = 0; - move16(); - hFdCngCom->msPeriodogSum_exp[1] = 0; - move16(); - set32_fx( hFdCngCom->msPsdSum, 0, 2 ); - set16_fx( hFdCngCom->msSlope, 0, 2 ); - set32_fx( hFdCngCom->msQeqInvAv, 0, 2 ); - hFdCngCom->msQeqInvAv_exp[0] = 0; - move16(); - hFdCngCom->msQeqInvAv_exp[1] = 0; - move16(); - hFdCngCom->msFrCnt_init_counter = 0; - move16(); - hFdCngCom->msFrCnt_init_thresh = 1; - move16(); - hFdCngCom->init_old = 0; - move16(); - hFdCngCom->offsetflag = 0; - move16(); - hFdCngCom->msFrCnt = MSSUBFRLEN; - move16(); - hFdCngCom->msMinBufferPtr = 0; - move16(); - hFdCngCom->msAlphaCor[0] = 644245120l /*0.3f Q31*/; - move16(); - hFdCngCom->msAlphaCor[1] = 644245120l /*0.3f Q31*/; - move16(); - set16_fx( hFdCngCom->psize, 0, NPART ); - /* Initialize exponents */ - hFdCngCom->exp_cldfb_periodog = 0; - move16(); - - return; -} -#endif /*------------------------------------------------------------------- * deleteFdCngCom() * diff --git a/lib_com/ivas_prot_fx.h b/lib_com/ivas_prot_fx.h index 156088e7f9fefbfb11107cbae46f0cf59744c58b..068d7c1f1f100b30e4bcdba7b728b33a71625bae 100644 --- a/lib_com/ivas_prot_fx.h +++ b/lib_com/ivas_prot_fx.h @@ -1990,16 +1990,6 @@ ivas_error stereo_memory_dec_fx( const Word16 nchan_transport /* i : number of transport channels */ ); -#ifndef FIX_2245_INIT_FD_CNG_EVS -void initFdCngDec_ivas_fx( - DEC_CORE_HANDLE st, /* i/o: decoder state structure */ - Word16 scale -); - -void ivas_initFdCngCom_fx( - HANDLE_FD_CNG_COM hFdCngCom, Word16 scale -); -#endif Word16 set_ACELP_flag_IVAS( const Word16 element_mode, /* i : element mode */ const Word32 element_brate, /* i : element bitrate */ diff --git a/lib_com/options.h b/lib_com/options.h index 73fa992a6bf988453824f445e15afc91487cecea..cabe32178030e50c1dd94055f320036967949335 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -86,8 +86,6 @@ #define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */ #define NONBE_1122_KEEP_EVS_MODE_UNCHANGED /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR. */ #define FIX_1435_MOVE_STEREO_PANNING /* VA: issue 1435: do the EVS stereo panning in the renderer */ -#define FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /* OR : Fix issue basop 2201 hrtf_file_reader crend differs between basop ivas-main and ivas-float-update */ -#define FIX_2245_INIT_FD_CNG_EVS /* Dolby/VA: Issue 2245: initialize FD CNG with EVS-type of init function */ #define FIX_2252_SCALING_SAVE_HB_SYNTH /* VA: issue 2252: fix use-of-uninit-value in save_hb_synth_fx[] scaling in FOA decoding with bitstream that starts with an SID */ #define FIX_2248_EVS_ASSERT /* VA: Include _sat in an EVS related part of the code */ @@ -97,9 +95,6 @@ /* any switch which is non-be wrt. TS 26.251 V3.0 */ #define FIX_1454_FIX_STEREO_TO_FOA_JBM /* VA: issue 1454: fix buggy stereo to FOA in JBM */ -#define FIX_2015_PREMPH_SAT_ALT_PART2 /* VA: Add missing scaling factor to be passed to AVQ_cod() */ -#define FIX_2253_CORRECT_GSC_MINIMUM_PIT_SEARCH /* VA: Fix Issue 2253 where the encoder and decoder could get out of sync */ -#define NONBE_FIX_1967_SBA_DECODER_MONO_OUT_BIG_DIFFERENCES /* Dolby: Fix basop issue 1967 */ #define FIX_1461_CNG_BW_SWITCHING /* Eri: float issue 1461: Stereo parameters are not updated when SID/NODATA forces BW to stay the same */ #define FIX_2041_SPECTRAL_GAPS_FOR_INACTIVE_FRAMES /* FhG: Using rounding in multiplication to improve precision in cngNoiseLevel[] */ #define FIX_2264_OUT_OF_BOUND_READING_IN_LOG2_NORM_LC /* VA: Fix issue 2264 by adding a proper safeguard in log2 and by adding a missing normalization in swb_pre_proc_ivas_fx()*/ diff --git a/lib_dec/dec_tcx_fx.c b/lib_dec/dec_tcx_fx.c index a1724fcd798aaa6b6efe19daae5a4179000861e1..13cf9e9eb5a26b97e96a6a92f1c7bc4326c3cbd0 100644 --- a/lib_dec/dec_tcx_fx.c +++ b/lib_dec/dec_tcx_fx.c @@ -4042,12 +4042,8 @@ void decoder_tcx_ivas_fx( decoder_tcx_tns_fx( st, L_frame_glob, L_spec, L_frame, L_frameTCX, x_fx, fUseTns, &tnsData, bfi, frame_cnt, 0, NULL ); - Scale_sig32( x_fx, N_MAX, sub( x_e, 20 ) ); // Scaling x_fx to Q11 -#ifdef NONBE_FIX_1967_SBA_DECODER_MONO_OUT_BIG_DIFFERENCES + Scale_sig32( x_fx, N_MAX, sub( x_e, 20 ) ); // Scaling x_fx to Q11 Scale_sig( xn_buf_fx, L_MDCT_OVLP_MAX + L_FRAME_PLUS + L_MDCT_OVLP_MAX, -( Q14 - 2 ) ); // Scaling xn_buf_fx to Q(-2) -#else - Scale_sig( xn_buf_fx, L_MDCT_OVLP_MAX + L_FRAME_PLUS + L_MDCT_OVLP_MAX, sub( st->Q_syn, 14 ) ); // Scaling xn_buf_fx to Q_syn -#endif x_e = sub( 31, 11 ); IF( st->igf != 0 ) @@ -5648,11 +5644,7 @@ void decoder_tcx_imdct_fx( generate_masking_noise_mdct_ivas_fx( x_fx, &x_e, st->hFdCngDec->hFdCngCom ); FOR( Word16 ind = 0; ind < L_frame; ind++ ) { -#ifdef NONBE_FIX_1967_SBA_DECODER_MONO_OUT_BIG_DIFFERENCES x_fx[ind] = L_shl( x_fx[ind], sub( 31, add( x_e, q_x ) ) ); // q_x -#else - x_fx[ind] = L_shr( x_fx[ind], sub( 31, add( x_e, q_x ) ) ); // q_x -#endif } } diff --git a/lib_dec/fd_cng_dec_fx.c b/lib_dec/fd_cng_dec_fx.c index 647c845d231be0bdbdd1b95dc4c0f9b3d3fb2421..8c4d104995ded05ce095e67d0e53cdc897aa9cab 100644 --- a/lib_dec/fd_cng_dec_fx.c +++ b/lib_dec/fd_cng_dec_fx.c @@ -78,27 +78,17 @@ ivas_error createFdCngDec_fx( HANDLE_FD_CNG_DEC *hFdCngDec ) return error; } -#ifdef FIX_2245_INIT_FD_CNG_EVS void initFdCngDec_fx( DEC_CORE_HANDLE st, /* i/o: decoder state structure */ const Word16 scale /* i : Q factor */ ) -#else -void initFdCngDec_ivas_fx( - DEC_CORE_HANDLE st, /* i/o: decoder state structure */ - Word16 scale /*Q15*/ ) -#endif { /* Initialize common */ HANDLE_FD_CNG_DEC hFdCngDec; hFdCngDec = st->hFdCngDec; -#ifdef FIX_2245_INIT_FD_CNG_EVS initFdCngCom( hFdCngDec->hFdCngCom, scale ); -#else - ivas_initFdCngCom_fx( hFdCngDec->hFdCngCom, scale ); -#endif set16_fx( hFdCngDec->olapBufferAna, 0, FFTLEN ); hFdCngDec->hFdCngCom->olapBufferAna = hFdCngDec->olapBufferAna; set16_fx( hFdCngDec->olapBufferSynth2, 0, FFTLEN ); @@ -133,9 +123,7 @@ void initFdCngDec_ivas_fx( set16_fx( hFdCngDec->msPsd, 0, NPART_SHAPING ); set32_fx( hFdCngDec->msPsd_fx, 0, NPART_SHAPING ); -#ifdef FIX_2245_INIT_FD_CNG_EVS set16_fx( hFdCngDec->msNoiseFloor, 0, NPART_SHAPING ); -#endif set32_fx( hFdCngDec->msNoiseFloor_32fx, 0, NPART_SHAPING ); set32_fx( hFdCngDec->msNoiseEst, 0, NPART_SHAPING ); @@ -161,9 +149,7 @@ void initFdCngDec_ivas_fx( move16(); set16_fx( hFdCngDec->msLogPeriodog, 0, NPART_SHAPING ); -#ifdef FIX_2245_INIT_FD_CNG_EVS set16_fx( hFdCngDec->msLogNoiseEst, 0, NPART_SHAPING ); -#endif set32_fx( hFdCngDec->msLogNoiseEst_32fx, 0, NPART_SHAPING ); set16_fx( hFdCngDec->psize_shaping, 0, NPART_SHAPING ); @@ -214,96 +200,6 @@ void initFdCngDec_ivas_fx( return; } -#ifndef FIX_2245_INIT_FD_CNG_EVS -void initFdCngDec_fx( - DEC_CORE_HANDLE st, /* i/o: decoder state structure */ - const Word16 scale /*Q15*/ ) -{ - /* Initialize common */ - HANDLE_FD_CNG_DEC hFdCngDec; - - hFdCngDec = st->hFdCngDec; - - initFdCngCom( hFdCngDec->hFdCngCom, scale ); - set16_fx( hFdCngDec->olapBufferAna, 0, 320 ); - hFdCngDec->hFdCngCom->olapBufferAna = hFdCngDec->olapBufferAna; - move16(); - set16_fx( hFdCngDec->olapBufferSynth2, 0, FFTLEN ); - hFdCngDec->hFdCngCom->olapBufferSynth2 = hFdCngDec->olapBufferSynth2; - move16(); - - /* Set some counters and flags */ - - hFdCngDec->flag_dtx_mode = 0; - move16(); - hFdCngDec->lp_noise = -167772160l /*-20.f Q23*/; /* format: Q8.24 */ - move32(); - hFdCngDec->lp_speech = 209715200l /* 25.f Q23*/; /* format: Q8.24 */ - move32(); - - /* Initialization of the noise estimation algorithm */ - - set32_fx( hFdCngDec->bandNoiseShape, 0, FFTLEN2 ); - set16_fx( &hFdCngDec->bandNoiseShape_exp, 0, 1 ); - - set32_fx( hFdCngDec->partNoiseShape, 0, NPART ); - set16_fx( &hFdCngDec->partNoiseShape_exp, 0, 1 ); - - set32_fx( hFdCngDec->msPeriodog, 0, NPART_SHAPING ); - set16_fx( &hFdCngDec->msPeriodog_exp, 0, 1 ); - - set32_fx( hFdCngDec->msAlpha, 0, NPART_SHAPING ); - - set32_fx( hFdCngDec->msBminWin, 0, NPART_SHAPING ); - - set32_fx( hFdCngDec->msBminSubWin, 0, NPART_SHAPING ); - - set16_fx( hFdCngDec->msPsd, 0, NPART_SHAPING ); - set32_fx( hFdCngDec->msPsd_fx, 0, NPART_SHAPING ); - set16_fx( hFdCngDec->msNoiseFloor, 0, NPART_SHAPING ); - - set32_fx( hFdCngDec->msNoiseEst, 0, NPART_SHAPING ); - set16_fx( &hFdCngDec->msNoiseEst_exp, 0, 1 ); - - set32_fx( hFdCngDec->msMinBuf, 2147483647l /*1.0 Q31*/, MSNUMSUBFR * NPART_SHAPING ); - - set32_fx( hFdCngDec->msCurrentMin, 2147483647l /*1.0 Q31*/, NPART_SHAPING ); - - set32_fx( hFdCngDec->msCurrentMinOut, 2147483647l /*1.0 Q31*/, NPART_SHAPING ); - - set32_fx( hFdCngDec->msCurrentMinSubWindow, 2147483647l /*1.0 Q31*/, NPART_SHAPING ); - - set16_fx( hFdCngDec->msLocalMinFlag, 0, NPART_SHAPING ); - set16_fx( hFdCngDec->msNewMinFlag, 0, NPART_SHAPING ); - - set16_fx( hFdCngDec->msPsdFirstMoment, 0, NPART_SHAPING ); - - set32_fx( hFdCngDec->msPsdSecondMoment, 0, NPART_SHAPING ); - set16_fx( hFdCngDec->msPeriodogBuf, 0, MSBUFLEN * NPART_SHAPING ); - - hFdCngDec->msPeriodogBufPtr = 0; - move16(); - - set16_fx( hFdCngDec->msLogPeriodog, 0, NPART_SHAPING ); - set16_fx( hFdCngDec->msLogNoiseEst, 0, NPART_SHAPING ); - - set16_fx( hFdCngDec->psize_shaping, 0, NPART_SHAPING ); - hFdCngDec->nFFTpart_shaping = 0; - move16(); - set32_fx( hFdCngDec->msPeriodog_ST_fx, 0, NPART_SHAPING ); - hFdCngDec->msPeriodog_ST_exp = 0; - move16(); - hFdCngDec->hFdCngCom->fftBuffer_exp = 0; - move16(); - hFdCngDec->hFdCngCom->periodog_exp = 0; - move16(); - set32_fx( hFdCngDec->smoothed_psd_fx, 0, L_FRAME16k ); - hFdCngDec->smoothed_psd_exp = 0; - move16(); - - return; -} -#endif /* configureFdCngDec_fx diff --git a/lib_dec/init_dec_fx.c b/lib_dec/init_dec_fx.c index e46991dc8d405a7c9ed7ccfe11ade80c46a05d6b..66c49d77699add7903c68ea01f54b65288b38078 100644 --- a/lib_dec/init_dec_fx.c +++ b/lib_dec/init_dec_fx.c @@ -928,11 +928,7 @@ ivas_error init_decoder_fx( } /* Init FD-CNG */ -#ifdef FIX_2245_INIT_FD_CNG_EVS initFdCngDec_fx( st_fx, st_fx->cldfbSyn->scale ); -#else - initFdCngDec_ivas_fx( st_fx, st_fx->cldfbSyn->scale ); -#endif } ELSE { diff --git a/lib_dec/ivas_stereo_mdct_stereo_dec_fx.c b/lib_dec/ivas_stereo_mdct_stereo_dec_fx.c index 76b44d94d0acdd4b836adb7a5786c8b46270b696..6ea211cb25b102d9a607a14cd9ea1247e6d9e031 100644 --- a/lib_dec/ivas_stereo_mdct_stereo_dec_fx.c +++ b/lib_dec/ivas_stereo_mdct_stereo_dec_fx.c @@ -569,11 +569,7 @@ ivas_error initMdctStereoDtxData_fx( } /* Init FD-CNG */ -#ifdef FIX_2245_INIT_FD_CNG_EVS initFdCngDec_fx( st, st->cldfbSyn->scale ); -#else - initFdCngDec_ivas_fx( st, st->cldfbSyn->scale ); -#endif } IF( st->first_CNG == 0 ) diff --git a/lib_dec/ivas_stereo_switching_dec_fx.c b/lib_dec/ivas_stereo_switching_dec_fx.c index ea4647daed58ce0e662ee00191d7a9ad0aa18363..e8fddd58cf10bbf11eb12aaebff10f02bacceddc 100644 --- a/lib_dec/ivas_stereo_switching_dec_fx.c +++ b/lib_dec/ivas_stereo_switching_dec_fx.c @@ -649,11 +649,7 @@ ivas_error stereo_memory_dec_fx( return error; } -#ifdef FIX_2245_INIT_FD_CNG_EVS initFdCngDec_fx( st, st->cldfbSyn->scale ); -#else - initFdCngDec_ivas_fx( st, st->cldfbSyn->scale ); -#endif configureFdCngDec_ivas_fx( st->hFdCngDec, st->bwidth, st->total_brate, st->L_frame, st->last_L_frame, st->element_mode ); } @@ -760,11 +756,7 @@ ivas_error stereo_memory_dec_fx( } /* Init FD-CNG */ -#ifdef FIX_2245_INIT_FD_CNG_EVS initFdCngDec_fx( st, st->cldfbSyn->scale ); -#else - initFdCngDec_ivas_fx( st, st->cldfbSyn->scale ); -#endif if ( EQ_16( hCPE->last_element_mode, IVAS_CPE_DFT ) ) { @@ -1085,11 +1077,7 @@ ivas_error stereo_memory_dec_fx( return error; } -#ifdef FIX_2245_INIT_FD_CNG_EVS initFdCngDec_fx( hCPE->hCoreCoder[i], hCPE->hCoreCoder[i]->cldfbSyn->scale ); -#else - initFdCngDec_ivas_fx( hCPE->hCoreCoder[i], hCPE->hCoreCoder[i]->cldfbSyn->scale ); -#endif } } } diff --git a/lib_enc/enc_higher_acelp_fx.c b/lib_enc/enc_higher_acelp_fx.c index 455fc03229f66888bc00c416d4cebd1dccf3f092..82296aa4ad975fb14cbef71e8efb3c2410ae8f78 100644 --- a/lib_enc/enc_higher_acelp_fx.c +++ b/lib_enc/enc_higher_acelp_fx.c @@ -490,11 +490,7 @@ void transf_cdbk_enc_ivas_fx( * Split algebraic vector quantizer based on RE8 lattice *--------------------------------------------------------------*/ -#ifndef FIX_2015_PREMPH_SAT_ALT_PART2 - AVQ_cod_fx( x_tran, x_norm, nBits, Nsv, 0 ); -#else AVQ_cod_fx( x_tran, x_norm, nBits, Nsv, Qdct ); -#endif /*--------------------------------------------------------------* * Find prequantizer excitation gain diff --git a/lib_enc/eval_pit_contr_fx.c b/lib_enc/eval_pit_contr_fx.c index b9ea2d49e442f76dd864cf37b2ed88905a7e7c9b..33b35f0ccb1d91602065c2f701ed351ede04b744 100644 --- a/lib_enc/eval_pit_contr_fx.c +++ b/lib_enc/eval_pit_contr_fx.c @@ -422,10 +422,7 @@ Word16 Pit_exc_contribution_len_ivas_fx( /* o : bin wher const Word16 *dct_res, /* i : DCT of residual Q_new*/ Word16 *dct_pitex, /* i/o: DCT of pitch contribution Q_new*/ Word16 *pitch_buf, /* i/o: Pitch per subframe Q6*/ -#ifndef FIX_2253_CORRECT_GSC_MINIMUM_PIT_SEARCH - const Word16 nb_subfr, /* i : Number of subframe considered Q0*/ -#endif - Word16 *hangover, /* i : hangover for the time contribution switching Q0*/ + Word16 *hangover, /* i : hangover for the time contribution switching Q0*/ Word16 Qnew ) { @@ -457,11 +454,7 @@ Word16 Pit_exc_contribution_len_ivas_fx( /* o : bin wher Mbands_loc = MBANDS_LOC; move16(); } -#ifndef FIX_2253_CORRECT_GSC_MINIMUM_PIT_SEARCH - minimum_fx( pitch_buf, nb_subfr, &low_pit ); -#else minimum_fx( pitch_buf, shr( st_fx->L_frame, 6 ), &low_pit ); -#endif exp1 = norm_s( low_pit ); tmp = shl( low_pit, exp1 ); tmp_dec = 12800; diff --git a/lib_enc/gs_enc_fx.c b/lib_enc/gs_enc_fx.c index f3e85bd291818277c610845e1a5d90843f1fb2a9..19d7f599c1c3396a83a1370819289e6ad463c16d 100644 --- a/lib_enc/gs_enc_fx.c +++ b/lib_enc/gs_enc_fx.c @@ -675,11 +675,7 @@ void encod_audio_ivas_fx( * Find and encode the last band where the adaptive (pitch) contribution is significant *---------------------------------------------------------------*/ -#ifndef FIX_2253_CORRECT_GSC_MINIMUM_PIT_SEARCH - last_pit_bin = Pit_exc_contribution_len_ivas_fx( st_fx, dct_res, dct_epit, pitch_buf, nb_subfr, &hGSCEnc->pit_exc_hangover, Q_new ); -#else last_pit_bin = Pit_exc_contribution_len_ivas_fx( st_fx, dct_res, dct_epit, pitch_buf, &hGSCEnc->pit_exc_hangover, Q_new ); -#endif IF( last_pit_bin == 0 ) { diff --git a/lib_enc/prot_fx_enc.h b/lib_enc/prot_fx_enc.h index feaefcf5399277180f1e07c3029227c91596e173..85465d0c51a001cb21fe9e4370f9b05e710df8b7 100644 --- a/lib_enc/prot_fx_enc.h +++ b/lib_enc/prot_fx_enc.h @@ -4039,10 +4039,7 @@ Word16 Pit_exc_contribution_len_ivas_fx( const Word16 *dct_res, /* i : DCT of residual Qnew*/ Word16 *dct_pitex, /* i/o: DCT of pitch contribution Qnew*/ Word16 *pitch_buf, /* i/o: Pitch per subframe Q6*/ -#ifndef FIX_2253_CORRECT_GSC_MINIMUM_PIT_SEARCH - const Word16 nb_subfr, /* i : Number of subframe considered Q0*/ -#endif - Word16 *hangover, /* i : hangover for the time contribution switching Q0*/ + Word16 *hangover, /* i : hangover for the time contribution switching Q0*/ Word16 Qnew ); Word16 pvq_core_enc_fx( diff --git a/lib_rend/ivas_crend_fx.c b/lib_rend/ivas_crend_fx.c index 79439d753b8a7614a9a685d580dd979e63c2ecea..8459763527568ebdbfca0075f81693ea54c45115 100644 --- a/lib_rend/ivas_crend_fx.c +++ b/lib_rend/ivas_crend_fx.c @@ -92,11 +92,9 @@ ivas_error ivas_Crend_hrtf_init_fx( hHrtf->pIndex_frequency_max[i][j] = NULL; hHrtf->pOut_to_bin_re_fx[i][j] = NULL; hHrtf->pOut_to_bin_im_fx[i][j] = NULL; -#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND hHrtf->pOut_to_bin_re_dyn_fx[i][j] = NULL; hHrtf->pOut_to_bin_im_dyn_fx[i][j] = NULL; hHrtf->pIndex_frequency_max_dyn_fx[i][j] = NULL; -#endif } } @@ -107,10 +105,8 @@ ivas_error ivas_Crend_hrtf_init_fx( hHrtf->pIndex_frequency_max_diffuse[j] = NULL; hHrtf->pOut_to_bin_diffuse_re_fx[j] = NULL; hHrtf->pOut_to_bin_diffuse_im_fx[j] = NULL; -#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND hHrtf->pOut_to_bin_diffuse_re_dyn_fx[j] = NULL; hHrtf->pOut_to_bin_diffuse_im_dyn_fx[j] = NULL; -#endif } hHrtf->init_from_rom = 1; diff --git a/lib_util/hrtf_file_reader.c b/lib_util/hrtf_file_reader.c index d274a0ccfab4c45b9d048aac5047aa9c4c23ad3b..f1fe05c5fd8c65ed8ccc636cdfda7fdb34c2788c 100644 --- a/lib_util/hrtf_file_reader.c +++ b/lib_util/hrtf_file_reader.c @@ -179,12 +179,10 @@ static ivas_error read_and_check_hrtf_binary_file_header( static ivas_error check_hrtf_binary_header( ivas_hrtfs_header_t *hrtf_header ) { -#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND if ( hrtf_header == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } -#endif /* Check the renderer type */ if ( ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_MIXER_CONV ) && ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_MIXER_CONV_ROOM ) && ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_FASTCONV ) && ( hrtf_header->rend_type != HRTF_READER_RENDERER_BINAURAL_FASTCONV_ROOM ) && @@ -792,11 +790,7 @@ static ivas_error load_reverb_from_binary( if ( hrtf_header.frequency != sampleRate ) { free( hrtf_data ); -#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; -#else - return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" ); -#endif } } } @@ -963,11 +957,7 @@ static ivas_error TDREND_MIX_LoadHRTF( if ( hrtf_header.frequency != sampleRate ) { free( hrtf_data ); -#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; -#else - return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" ); -#endif } } } @@ -1736,11 +1726,7 @@ ivas_error load_fastconv_HRTF_from_binary( if ( hrtf_header.frequency != 48000 ) /* note: Parametric renderer data are always stored at 48 kHz */ { free( hrtf_data ); -#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; -#else - return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" ); -#endif } if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size ) @@ -1840,11 +1826,7 @@ ivas_error load_parambin_HRTF_from_binary( if ( hrtf_header.frequency != 48000 ) /* note: Parametric renderer data are always stored at 48 kHz */ { free( hrtf_data ); -#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; -#else - return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" ); -#endif } if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size ) @@ -1964,11 +1946,7 @@ ivas_error load_Crend_HRTF_from_binary( if ( hrtf_header.frequency != sampleRate ) { free( hrtf_data ); -#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND return IVAS_ERR_INVALID_HRTF_SAMPLING_RATE; -#else - return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF invalid sampling rate" ); -#endif } if ( fread( hrtf_data, 1, hrtf_header.data_size, f_hrtf ) != hrtf_header.data_size ) @@ -2060,39 +2038,6 @@ void destroy_crend_hrtf( } -#ifndef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND -/*---------------------------------------------------------------------* - * destroy_hrtf_statistics() - * - * Destroy the HRTF statistics set. - *---------------------------------------------------------------------*/ - -void destroy_hrtf_statistics( - IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle */ -) -{ - if ( ( hHrtfStatistics != NULL ) && ( *hHrtfStatistics != NULL ) && ( ( *hHrtfStatistics )->fromROM == FALSE ) ) - { - if ( ( *hHrtfStatistics )->average_energy_l_dyn != NULL ) - { - free( ( *hHrtfStatistics )->average_energy_l_dyn ); - } - if ( ( *hHrtfStatistics )->average_energy_r_dyn != NULL ) - { - free( ( *hHrtfStatistics )->average_energy_r_dyn ); - } - if ( ( *hHrtfStatistics )->inter_aural_coherence_dyn != NULL ) - { - free( ( *hHrtfStatistics )->inter_aural_coherence_dyn ); - } - } - - ivas_HRTF_statistics_close_fx( hHrtfStatistics ); - - return; -} -#endif - /*---------------------------------------------------------------------* * destroy_fastconv_hrtf() * @@ -2128,7 +2073,6 @@ void destroy_parambin_hrtf( return; } -#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /*---------------------------------------------------------------------* * destroy_hrtf_statistics() * @@ -2159,4 +2103,3 @@ void destroy_hrtf_statistics( return; } -#endif diff --git a/lib_util/hrtf_file_reader.h b/lib_util/hrtf_file_reader.h index f949308d72d9dc8392d106fcd78f05ea22c2f0d2..d1f97a191bf8fb499fd125813d350a653a8f4c2b 100644 --- a/lib_util/hrtf_file_reader.h +++ b/lib_util/hrtf_file_reader.h @@ -124,11 +124,7 @@ ivas_error load_reverb_binary( *---------------------------------------------------------------------*/ ivas_error load_Crend_HRTF_from_binary( -#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND - IVAS_DEC_HRTF_CREND_HANDLE hHrtfCrend, /* i/o: HRTF CRend handle */ -#else - IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF, /* i/o: Set of HRTF CRend handle */ -#endif + IVAS_DEC_HRTF_CREND_HANDLE hHrtfCrend, /* i/o: HRTF CRend handle */ const hrtfFileReader *hrtfReader, /* i : pointer to hrtfFileReader handle */ const IVAS_AUDIO_CONFIG OutputConfig, /* i : output audio configuration */ const IVAS_AUDIO_CONFIG hrtf_set_audio_cfg, /* i : HRTF set audio config. */ @@ -142,11 +138,7 @@ ivas_error load_Crend_HRTF_from_binary( *---------------------------------------------------------------------*/ void destroy_crend_hrtf( -#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend /* i/o: Crend HRTF handle */ -#else - IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF /* i/o: Set of HRTF CRend handle */ -#endif ); /*---------------------------------------------------------------------* @@ -182,17 +174,6 @@ ivas_error load_parambin_HRTF_from_binary( IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParambin, /* i/o: Parambin HRTF handle */ const hrtfFileReader *hrtfReader /* i : pointer to hrtfFileReader handle */ ); -#ifndef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND -/*---------------------------------------------------------------------* - * destroy_hrtf_statistics() - * - * free memory allocated for HRTF statistics binary data - *---------------------------------------------------------------------*/ - -void destroy_hrtf_statistics( - IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle */ -); -#endif /*---------------------------------------------------------------------* * destroy_parambin_hrtf() * @@ -213,7 +194,6 @@ void destroy_td_hrtf( IVAS_DEC_HRTF_TD_HANDLE *hHRTF /* i/o: TD rend. HRTF handle */ ); -#ifdef FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /*---------------------------------------------------------------------* * destroy_hrtf_statistics() * @@ -223,6 +203,5 @@ void destroy_td_hrtf( void destroy_hrtf_statistics( IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle */ ); -#endif #endif /* IVAS_HRTF_FILE_READER_H */