diff --git a/apps/encoder.c b/apps/encoder.c index 420c80c57c72977888e6b4dadf36a47b8b26f881..6c09d308f34c898f1ca2105529f62c8f303aae87 100644 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -45,9 +45,7 @@ #include "masa_file_reader.h" #include "rotation_file_reader.h" #include "ivas_rtp_file.h" -#ifdef FIX_1527_CMR_BITRATE_IDX #include "requests_file_reader.h" -#endif #include "wmc_auto.h" @@ -168,9 +166,7 @@ typedef struct char *sceneOrientationTrajFileName; char *deviceOrientationTrajFileName; -#ifdef FIX_1527_CMR_BITRATE_IDX char *requestsFileName; -#endif } EncArguments; @@ -227,9 +223,7 @@ int main( uint8_t au[IVAS_MAX_BITS_PER_FRAME / 8]; IVAS_RTP ivasRtp = { 0 }; -#ifdef FIX_1527_CMR_BITRATE_IDX ReqFileReader *requestsFileReader = NULL; -#endif /* Ideally ssrc is negotiated via SDP and sequence number is radomized but we use fixed seed for random num generator for regression based tests. Any realtime application should implement this initialization seperately */ @@ -667,7 +661,6 @@ int main( } } -#ifdef FIX_1527_CMR_BITRATE_IDX /*------------------------------------------------------------------------------------------* * Open remote requests file for rtp packing (E-bytes) *------------------------------------------------------------------------------------------*/ @@ -679,7 +672,6 @@ int main( goto cleanup; } } -#endif /*------------------------------------------------------------------------------------------* * Run the encoder @@ -890,7 +882,6 @@ int main( } } -#ifdef FIX_1527_CMR_BITRATE_IDX if ( requestsFileReader ) { if ( ( error = ReadNextRequests( requestsFileReader, ivasRtp.remoteRequests, &ivasRtp.remoteRequestBitmap ) ) != IVAS_ERR_OK ) @@ -899,7 +890,6 @@ int main( goto cleanup; } } -#endif if ( ( error = IVAS_ENC_EncodeFrameToCompact( hIvasEnc, pcmBuf, pcmBufSize, au, &numBits ) ) != IVAS_ERR_OK ) { @@ -996,12 +986,10 @@ cleanup: fclose( f_bitrateProfile ); } -#ifdef FIX_1527_CMR_BITRATE_IDX if ( requestsFileReader ) { RequestsFileReader_close( &requestsFileReader ); } -#endif if ( sceneOrientationFileReader ) { @@ -1049,9 +1037,7 @@ static bool parseCmdlIVAS_enc( /*-----------------------------------------------------------------* * Set default values *-----------------------------------------------------------------*/ -#ifdef FIX_1527_CMR_BITRATE_IDX memset( arg, 0, sizeof( *arg ) ); -#endif arg->inputWavFilename = NULL; arg->outputBitstreamFilename = NULL; @@ -1918,7 +1904,6 @@ static bool parseCmdlIVAS_enc( arg->deviceOrientationTrajFileName = argv[i]; i++; } -#ifdef FIX_1527_CMR_BITRATE_IDX else if ( strcmp( argv_to_upper, "-REQUESTS" ) == 0 ) { i++; @@ -1931,7 +1916,6 @@ static bool parseCmdlIVAS_enc( arg->requestsFileName = argv[i]; i++; } -#endif /*-----------------------------------------------------------------* * Option not recognized @@ -2151,9 +2135,7 @@ static void usage_enc( void ) fprintf( stdout, " EVS RTP Payload Format is used. Optional N represents number of frames per RTP packet\n" ); fprintf( stdout, "-scene_orientation : Scene orientation trajectory file. Only used with rtpdump output.\n" ); fprintf( stdout, "-device_orientation : Device orientation trajectory file. Only used with rtpdump output.\n" ); -#ifdef FIX_1527_CMR_BITRATE_IDX fprintf( stdout, "-requests : Remote requests file, Only used with rtpdump output.\n" ); -#endif fprintf( stdout, "\n" ); diff --git a/lib_com/low_rate_band_att_fx.c b/lib_com/low_rate_band_att_fx.c index d31e032b943ca878f8067e9bdaded5c5fa226ec4..ecb48c49ef75f952318cd966941d91bfccc4390e 100644 --- a/lib_com/low_rate_band_att_fx.c +++ b/lib_com/low_rate_band_att_fx.c @@ -27,10 +27,7 @@ void fine_gain_pred_fx( Word16 *xq, /* i/o: Quantized vector /quantized vector with finegain adj Q15*/ Word16 *y, /* i/o: Quantized vector (int) Q0 */ Word16 *fg_pred, /* o : Predicted fine gains Q12 */ -#ifndef FIX_BASOP_2486_HQ_FINE_GAIN_ALIGNMENT - const Word16 element_mode, /* i : element mode */ -#endif - const Word16 core /* i : Core */ + const Word16 core /* i : Core */ ) { Word16 i, band; @@ -76,7 +73,6 @@ void fine_gain_pred_fx( exp = sub( 31, add( exp, sub( 30, shl( shift, 1 ) ) ) ); L_tmp = Isqrt_lc( L_tmp, &exp ); /*31 - exp */ -#ifdef FIX_BASOP_2486_HQ_FINE_GAIN_ALIGNMENT IF( EQ_16( sfm_size[0], 10 ) ) /* If sfm_size[0] is 10, it means the extended ACELP->HQ transition frame is used. See hq_configure_fx(). */ { bw_idx = band_len_idx_ext[shr( bw, 3 )]; @@ -86,28 +82,6 @@ void fine_gain_pred_fx( { tmp1 = fine_gain_pred_sqrt_bw[bw_idx]; } -#else - IF( element_mode == EVS_MONO ) - { - tmp1 = fine_gain_pred_sqrt_bw[bw_idx]; - } - ELSE - { - IF( EQ_16( sfm_size[0], 10 ) ) /* If sfm_size[0] is 10, it means the extended ACELP->HQ transition frame is used. See hq_configure_fx(). */ - { - bw_idx = band_len_idx_ext[shr( bw, 3 )]; - tmp1 = fine_gain_pred_sqrt_bw_ext[bw_idx]; - } - ELSE - { - tmp1 = fine_gain_pred_sqrt_bw[bw_idx]; - if ( EQ_16( bw_idx, 0 ) ) - { - tmp1--; /* Lookup table uses rounding while calculations use truncation */ - } - } - } -#endif Mpy_32_16_ss( L_tmp, tmp1, &L_tmp, &lsb ); /*31-exp+11-15=27-exp */ gp = round_fx_sat( L_shl_sat( L_tmp, add( 1, exp ) ) ); /*27-exp+1+exp-16=12 */ test(); diff --git a/lib_com/options.h b/lib_com/options.h index 3077f91f2c6162774a99c63c5dd2e2b61de98fca..c09e1ff3d56e7459bd22070d9bf45b84d1830eb0 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -91,27 +91,16 @@ #define NONBE_FIX_ISSUE_2206_AVOID_OVERFLOW_SWB_fenv_fx2 /* FhG: Avoid overflow of SWB_fenv_fx in SWB_BWE_encoding_fx because of very small energies. */ #define NONBE_FIX_ISSUE_2206_AVOID_OVERFLOW_MSVQ_Interpol_Tran_fx /* FhG: Fix saturation crash in MSVQ_Interpol_Tran_fx() */ #define NONBE_FIX_ISSUE_2206_SWB_EXPERIMENT_FIX_2527 /* Fix crash from issue #2527 */ -#define FIX_2452_HQ_CORE_PEAQ_AVR_RATIO_HARM /* Eri: Basop issue 2453: Fix alignment of peak_avrg_ratio_fx */ #define FIX_FLOAT_1539_G192_FORMAT_SWITCH /* VA/Nokia: reintroduce format switching for g192 bitstreams */ -#define FIX_1527_CMR_BITRATE_IDX /* Fix for incorrect bitrate idx packed in rtp CMR E-byte */ -#define HARMONIZE_2494_FdCng_decodeSID_fx /* FhG: harmonize FdCng_decodeSID_fx with _ivas_ version */ -#define FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM /* FhG: BASOP 2509: st->hTcxCfg->psychParamsCurrent is not initialized */ #define HARMONIZE_2499_CONFIGUREFDCNGDEC /* FhG: basop issue 2499: harmonoize configureFdCngDec */ #define FIX_BASOP_2530_IVAS_DECISION_MAT /* VA: Fix ambiguous usage of extract_l() */ - /* #################### End BE switches ################################## */ /* #################### Start NON-BE switches ############################ */ /* any switch which is non-be wrt. TS 26.251 V3.0 */ -#define FIX_BASOP_2486_HQ_FINE_GAIN_ALIGNMENT /* Eri: Basop issue 2486: IVAS BASOP used calculations with truncation, EVS BASOP used rounding. This aligns the use of a table lookup. */ #define FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API /* Expose Payload Type setting in RTP Header */ -#define FIX_BASOP_2511_PROTO_REF_POWER_FIX /* FhG: BASOP 2511; Fix reference power computation in protoSignalComputation_shd_fx() */ -#define FIX_BASOP_2512_WRONG_SHIFT_IN_DIRAC_CONFIG /* Nokia: BASOP 2512: Fix wrong division by shift */ -#define FIX_BASOP_2513_EXTRA_RETURN_REND_OPEN /* Nokia: BASOP issue 2513: Removes extra return block */ -#define FIX_BASOP_2514_EFAP_PORTING_ERROR /* Nokia: BASOP issue 2514: Fix wrongly ported line */ -#define FIX_BASOP_2516_REND_CUSTOM_LAYOUT_PORT_BUG /* Nokia: BASOP issue 2516: Fix porting bug in setting planar state for custom layout in renderer */ #define USE_RTPDUMP /* FhG: RTPDUMP format (rtptools standard) instead of custom format */ #define FIX_FLOAT_1569_REND_RENDER_CONFIG_CHECKS /* Nokia: float issue 1569: fix render config checks in renderer */ #define FIX_BASOP_2526_SPAR_MASA_PARAM_MAP_Q_BUG /* Nokia: BASOP issue 2526: Fix wrong Q variable in SPAR to MASA param mapping */ diff --git a/lib_com/prot_fx.h b/lib_com/prot_fx.h index d6e36b29e57ab5cedb1ce2763b54d7900da4a7ef..54eb3d51a28a4e2eba6ca5b87b3ca83aff1cbd33 100644 --- a/lib_com/prot_fx.h +++ b/lib_com/prot_fx.h @@ -4426,10 +4426,7 @@ void fine_gain_pred_fx( Word16 *xq, /* i/o: Quantized vector /quantized vector with finegain adj Q15*/ Word16 *y, /* i/o: Quantized vector (int) */ Word16 *fg_pred, /* o : Predicted fine gains Q12 */ -#ifndef FIX_BASOP_2486_HQ_FINE_GAIN_ALIGNMENT - const Word16 element_mode, /* i : element mode */ -#endif - const Word16 core /* i : Core */ + const Word16 core /* i : Core */ ); void fine_gain_quant_fx( @@ -6574,14 +6571,8 @@ void perform_noise_estimation_dec_ivas_fx( ); /* Decode the CLDFB-CNG bitstream */ -#ifdef HARMONIZE_2494_FdCng_decodeSID_fx void FdCng_decodeSID_fx( Decoder_State *st ); /* i/o: decoder state structure */ -#else -void FdCng_decodeSID_fx( - HANDLE_FD_CNG_COM st, /* i/o: FD_CNG structure containing all buffers and variables */ - Decoder_State *corest ); /* i/o: decoder state structure */ -#endif void noisy_speech_detection_fx( HANDLE_FD_CNG_DEC hFdCngDec, /* i/o: FD_CNG structure */ @@ -7218,12 +7209,8 @@ ivas_error ppp_quarter_decoder_fx( void open_decoder_LPD_fx( Decoder_State *st, const Word32 total_brate, /* Q0 */ -#ifndef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM - const Word16 bwidth /* Q0 */ -#else - const Word16 bwidth, /* Q0 */ - const Word16 is_init /* i : indicate call during initialization */ -#endif + const Word16 bwidth, /* Q0 */ + const Word16 is_init /* i : indicate call during initialization */ ); void open_decoder_LPD_ivas_fx( @@ -9530,11 +9517,6 @@ void SynthesisSTFT_fx( const Word16 nchan_out /* i : number of output channels */ ); -#ifndef HARMONIZE_2494_FdCng_decodeSID_fx -void FdCng_decodeSID_ivas_fx( - Decoder_State *st /* i/o: decoder state structure */ -); -#endif void cldfb_restore_memory_ivas_fx( HANDLE_CLDFB_FILTER_BANK hs /* i/o: filter bank handle */ diff --git a/lib_dec/acelp_core_dec_fx.c b/lib_dec/acelp_core_dec_fx.c index 5fe8407e57442048a8cb9ad9a67c32a0a77e695c..4ca6b2e8c395a6ca9ddca2dfcd3a596e1fa2ce5c 100644 --- a/lib_dec/acelp_core_dec_fx.c +++ b/lib_dec/acelp_core_dec_fx.c @@ -166,11 +166,7 @@ ivas_error acelp_core_dec_fx( /* Only run parameter decoding in SID frames */ IF( EQ_32( st->core_brate, SID_2k40 ) ) { -#ifndef HARMONIZE_2494_FdCng_decodeSID_fx - FdCng_decodeSID_ivas_fx( st ); -#else FdCng_decodeSID_fx( st ); -#endif Word16 n1, n2; n1 = L_norm_arr( st->hFdCngDec->hFdCngCom->sidNoiseEst, NPART ); @@ -663,21 +659,13 @@ ivas_error acelp_core_dec_fx( { IF( EQ_16( st->element_mode, EVS_MONO ) ) { -#ifndef HARMONIZE_2494_FdCng_decodeSID_fx - FdCng_decodeSID_fx( st->hFdCngDec->hFdCngCom, st ); -#else FdCng_decodeSID_fx( st ); -#endif } ELSE { Word16 old_NoiseEstExp = st->hFdCngDec->hFdCngCom->sidNoiseEstExp; move16(); -#ifndef HARMONIZE_2494_FdCng_decodeSID_fx - FdCng_decodeSID_ivas_fx( st ); -#else FdCng_decodeSID_fx( st ); -#endif Scale_sig32( st->hFdCngDec->hFdCngCom->sidNoiseEstLp, NPART, sub( old_NoiseEstExp, st->hFdCngDec->hFdCngCom->sidNoiseEstExp ) ); Scale_sig( st->hFdCngDec->hFdCngCom->A_cng, M + 1, sub( norm_s( st->hFdCngDec->hFdCngCom->A_cng[0] ), Q2 ) ); // Qx diff --git a/lib_dec/core_dec_init_fx.c b/lib_dec/core_dec_init_fx.c index 357a57f0b888d233890ba3ae2fc98ab8272fa635..dbffbcc02e8d2f4e0eea3c4a974039ceba8118e7 100644 --- a/lib_dec/core_dec_init_fx.c +++ b/lib_dec/core_dec_init_fx.c @@ -20,12 +20,8 @@ void open_decoder_LPD_fx( Decoder_State *st, const Word32 total_brate, /* Q0 */ -#ifndef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM - const Word16 bwidth /* Q0 */ -#else - const Word16 bwidth, /* Q0 */ - const Word16 is_init /* i : indicate call during initialization */ -#endif + const Word16 bwidth, /* Q0 */ + const Word16 is_init /* i : indicate call during initialization */ ) { Word16 i; @@ -211,7 +207,6 @@ void open_decoder_LPD_fx( set16_fx( hBWE_TD->cur_sub_Aq_fx, 0, M + 1 ); /* Q12 */ } -#ifdef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM IF( st->hIGFDec != NULL ) { test(); @@ -233,71 +228,6 @@ void open_decoder_LPD_fx( { resetTecDec_Fx( st->hTECDec ); } -#else - /*TCX config*/ - st->hTcxCfg->preemph_fac = st->preemph_fac; - move16(); - st->hTcxCfg->tcx_mdct_window_length_old = st->hTcxCfg->tcx_mdct_window_length; - move16(); - init_TCX_config( st->hTcxCfg, st->L_frame, st->fscale, hTcxDec->L_frameTCX, fscaleFB ); // TEMPORARY should be rename to init_TCX_config - IF( st->ini_frame == 0 ) - { - st->hTcxCfg->tcx_last_overlap_mode = st->hTcxCfg->tcx_curr_overlap_mode = ALDO_WINDOW; - move16(); - move16(); - } - - /* TCX Offset */ - st->hTcxCfg->tcx_offset = shr( st->hTcxCfg->tcx_mdct_window_delay, 1 ); /* Q0 */ - move16(); - st->hTcxCfg->tcx_offsetFB = shr( st->hTcxCfg->tcx_mdct_window_delayFB, 1 ); /* Q0 */ - move16(); - - /* Initialize FAC */ - st->hTcxCfg->lfacNext = sub( st->hTcxCfg->tcx_offset, shr( st->L_frame, 2 ) ); /* Q0 */ - move16(); - st->hTcxCfg->lfacNextFB = sub( st->hTcxCfg->tcx_offsetFB, shr( hTcxDec->L_frameTCX, 2 ) ); /* Q0 */ - move16(); - - /* set number of coded lines */ - st->hTcxCfg->tcx_coded_lines = getNumTcxCodedLines( st->bwidth ); - move16(); - - /* TNS in TCX */ - st->hTcxCfg->pCurrentTnsConfig = NULL; - st->hTcxCfg->fIsTNSAllowed = getTnsAllowed( st->total_brate, st->igf, st->element_mode ); - move16(); - - IF( st->hTcxCfg->fIsTNSAllowed != 0 ) - { - InitTnsConfigs_fx( st->bwidth, st->hTcxCfg->tcx_coded_lines, st->hTcxCfg->tnsConfig, st->hIGFDec->infoIGFStopFreq, st->total_brate, st->element_mode, 0 /*is_mct*/ ); - } - /*Constraint for adaptive BPF, otherwise parameter estimation and post-processing not time aligned*/ - if ( st->tcxonly == 0 ) - { - assert( 0 == ( st->hTcxCfg->lfacNext > 0 ? st->hTcxCfg->lfacNext : 0 ) ); - } - - IF( 1 ) // st->element_mode == EVS_MONO) - { - IF( st->hTECDec == NULL ) - { - IF( ( st->hTECDec = (TEC_DEC_HANDLE) malloc( sizeof( TEC_DEC_DATA ) ) ) == NULL ) - { - // return (IVAS_ERROR(IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TEC\n")); - assert( 0 ); - } - } - } - ELSE - { - st->hTECDec = NULL; - } - resetTecDec_Fx( st->hTECDec ); - - /* Initialize decoder delay */ - -#endif if ( NE_16( st->element_mode, IVAS_SCE ) ) { diff --git a/lib_dec/core_dec_switch_fx.c b/lib_dec/core_dec_switch_fx.c index ea55dd251049f3449dcb7b9a9acd62c1a5697588..a9d9d24d7d8eee81332d99d00a8bd2e558b173f8 100644 --- a/lib_dec/core_dec_switch_fx.c +++ b/lib_dec/core_dec_switch_fx.c @@ -89,11 +89,7 @@ void mode_switch_decoder_LPD_fx( test(); IF( NE_16( fscale, st->fscale ) || ( switchWB != 0 ) || ( bSwitchFromAmrwbIO != 0 ) || EQ_16( st->last_codec_mode, MODE1 ) || st->force_lpd_reset ) { -#ifdef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM open_decoder_LPD_fx( st, total_brate, bwidth, 0 ); -#else - open_decoder_LPD_fx( st, total_brate, bwidth ); -#endif } ELSE { diff --git a/lib_dec/dec_acelp_tcx_main_fx.c b/lib_dec/dec_acelp_tcx_main_fx.c index aed46c1efc95b3f3818508015872f31f7606c44f..dfeb3773a8eef8779e63d256e0c3cc9ff4b66416 100644 --- a/lib_dec/dec_acelp_tcx_main_fx.c +++ b/lib_dec/dec_acelp_tcx_main_fx.c @@ -521,11 +521,7 @@ Word16 dec_acelp_tcx_frame_fx( IF( EQ_16( st->m_frame_type, SID_FRAME ) ) { -#ifndef HARMONIZE_2494_FdCng_decodeSID_fx - FdCng_decodeSID_fx( st->hFdCngDec->hFdCngCom, st ); -#else FdCng_decodeSID_fx( st ); -#endif } /* updates */ diff --git a/lib_dec/fd_cng_dec_fx.c b/lib_dec/fd_cng_dec_fx.c index 54caafcefe758b853f23024af7a5b8e6c6e20c47..5fced60ad842dcbd8c5b13e0d8860e319e0352dd 100644 --- a/lib_dec/fd_cng_dec_fx.c +++ b/lib_dec/fd_cng_dec_fx.c @@ -2119,145 +2119,6 @@ void perform_noise_estimation_dec_ivas_fx( } -#ifndef HARMONIZE_2494_FdCng_decodeSID_fx -/* - FdCng_decodeSID_fx - - Parameters: - - st i/o: FD_CNG structure containing all buffers and variables - bs_word16 i : Bitstream - amrwb_io i : amr wideband mode - preemph_fac i : preemphase factor - - Function: - decode the FD-CNG bitstream - - Returns: - void -*/ -void FdCng_decodeSID_fx( HANDLE_FD_CNG_COM st, Decoder_State *corest ) -{ - Word16 i, N, index; - Word32 *sidNoiseEst; - - Word16 indices[32], v16[32]; - Word32 v[32], gain; - - Word32 tmp, maxVal, E_ExpLd64; - Word16 sidNoiseEst_Exp; - - Word16 preemph_fac; - Word32 *invTrfMatrix_fx; - Word32 tmpRAM_fx[FDCNG_VQ_MAX_LEN][FDCNG_VQ_DCT_MAXTRUNC]; - invTrfMatrix_fx = (Word32 *) tmpRAM_fx; - - - sidNoiseEst = st->sidNoiseEst; /*Q31 - st->sidNoiseEstExp*/ - move16(); - preemph_fac = corest->preemph_fac; /*Q15*/ - move16(); - - N = st->npart; /*Q0*/ - move16(); - - st->sid_frame_counter = add( st->sid_frame_counter, 1 ); /*Q15*/ - move16(); - - /* Read bitstream */ - FOR( i = 0; i < stages_37bits; i++ ) - { - indices[i] = get_next_indice_fx( corest, bits_37bits[i] ); /*Q0*/ - move16(); - } - index = get_next_indice_fx( corest, 7 ); /*Q0*/ - - /* MSVQ decoder */ - IF( corest->element_mode != EVS_MONO ) - { - create_IDCT_N_Matrix_fx( invTrfMatrix_fx, FDCNG_VQ_MAX_LEN, FDCNG_VQ_DCT_MAXTRUNC, FDCNG_VQ_MAX_LEN * FDCNG_VQ_DCT_MAXTRUNC ); - msvq_dec_fx( ivas_cdk_37bits_fx, NULL, NULL, stages_37bits, N, maxN_37bits, indices, 1, invTrfMatrix_fx, v, NULL, 7 ); - } - ELSE - { - msvq_decoder( - cdk_37bits, - stages_37bits, - N, - maxN_37bits, - indices, - v16 ); - - FOR( i = 0; i < N; i++ ) - { - v[i] = L_deposit_h( v16[i] ); /*Q23*/ - move32(); - } - } - - - /* decode gain, format gain: Q9.23 */ - gain = L_shl( L_deposit_l( index ), WORD32_BITS - 1 - 8 ); - gain = L_sub( gain, 503316480l /*60.0 Q23*/ ); /*Q23*/ - gain = Mpy_32_16_1( gain, 21845 /*2.0f/3.0f Q15*/ ); /*Q23*/ - - - /* Apply gain and undo log */ - - /* calculate worst case for scaling */ - maxVal = L_add( 0x80000000 /*-1.0 Q31*/, 0 ); - FOR( i = 0; i < N; i++ ) - { - maxVal = L_max( maxVal, v[i] ); /*Q23*/ - } - - maxVal = L_add( maxVal, gain ); /*Q23*/ - maxVal = L_shl( Mpy_32_16_1( maxVal, 21771 /*0.66438561897 Q15*/ ), 1 ); /*Q23*/ - - sidNoiseEst_Exp = 0; - move16(); - FOR( ; maxVal >= 0; maxVal -= 33554432l /*0.015625 Q31*/ ) - { - sidNoiseEst_Exp = add( sidNoiseEst_Exp, 1 ); - } - st->sidNoiseEstExp = sidNoiseEst_Exp; - move16(); - E_ExpLd64 = L_shl( sidNoiseEst_Exp, WORD32_BITS - 1 - LD_DATA_SCALE ); - - /* format v: Q9.23, format sidNoiseEst: Q6.26, 0.66438561897 = log10(10)/log10(2.0) / 10.0 * 2.0 */ - FOR( i = 0; i < N; i++ ) - { - tmp = L_add( v[i], gain ); /*Q23*/ - tmp = L_shl( Mpy_32_16_1( tmp, 21771 /*0.66438561897 Q15*/ ), 1 ); /*Q23*/ - tmp = L_sub( tmp, E_ExpLd64 ); - assert( tmp < 0 ); - st->sidNoiseEst[i] = BASOP_Util_InvLog2( tmp ); /*Q31 - st->sidNoiseEstExp*/ - move32(); - } - - /* NB last band energy compensation */ - IF( st->CngBandwidth == NB ) - { - st->sidNoiseEst[( N - 1 )] = Mpy_32_16_1( st->sidNoiseEst[( N - 1 )], NB_LAST_BAND_SCALE ); /*Q31 - st->sidNoiseEstExp*/ - move32(); - } - - test(); - IF( EQ_16( st->CngBandwidth, SWB ) && LE_32( st->CngBitrate, ACELP_13k20 ) ) - { - st->sidNoiseEst[( N - 1 )] = Mpy_32_16_1( st->sidNoiseEst[( N - 1 )], SWB_13k2_LAST_BAND_SCALE ); /*Q31 - st->sidNoiseEstExp*/ - move32(); - } - - - scalebands( sidNoiseEst, st->part, st->npart, st->midband, st->nFFTpart, sub( st->stopBand, st->startBand ), st->cngNoiseLevel, 1 ); - st->cngNoiseLevelExp = st->sidNoiseEstExp; - move16(); - - - lpc_from_spectrum( st, st->startBand, st->stopFFTbin, preemph_fac ); -} -#else /* FdCng_decodeSID_fx @@ -2435,7 +2296,6 @@ void FdCng_decodeSID_fx( Decoder_State *st ) lpc_from_spectrum( hFdCngCom, hFdCngCom->startBand, hFdCngCom->stopFFTbin, st->preemph_fac ); } -#endif /* noisy_speech_detection_fx @@ -4509,136 +4369,6 @@ void configureFdCngDec_ivas_fx( return; } -#ifndef HARMONIZE_2494_FdCng_decodeSID_fx -/*------------------------------------------------------------------- - * FdCng_decodeSID_ivas_fx() - * - * Decode the FD-CNG bitstream - *-------------------------------------------------------------------*/ - -void FdCng_decodeSID_ivas_fx( - Decoder_State *st /* i/o: decoder state structure */ -) -{ - Word16 N; - Word32 *sidNoiseEst; - Word32 gain; - Word16 i, index; - Word32 v[32]; - Word16 indices[32]; - HANDLE_FD_CNG_COM hFdCngCom; - Word32 *invTrfMatrix_fx; - Word32 tmpRAM_fx[FDCNG_VQ_MAX_LEN][FDCNG_VQ_DCT_MAXTRUNC]; - Word16 tmp16; - - IF( st->element_mode == EVS_MONO ) - { - tmp16 = GAIN_Q_OFFSET_EVS_FX_Q0; - move16(); - } - ELSE - { - tmp16 = GAIN_Q_OFFSET_IVAS_FX_Q0; - move16(); - } - - const Word16 gain_q_offset = tmp16; /* Q0 */ - move16(); - - invTrfMatrix_fx = (Word32 *) tmpRAM_fx; /*Q31*/ - - hFdCngCom = ( st->hFdCngDec )->hFdCngCom; - - sidNoiseEst = hFdCngCom->sidNoiseEst; /*Q16*/ - - N = hFdCngCom->npart; /*Q0*/ - move16(); - gain = 0; - move32(); - hFdCngCom->sid_frame_counter = add( hFdCngCom->sid_frame_counter, 1 ); - move16(); - - /* Read bitstream */ - FOR( i = 0; i < FD_CNG_stages_37bits; i++ ) - { - indices[i] = get_next_indice_fx( st, bits_37bits[i] ); /*Q0*/ - move16(); - } - - index = get_next_indice_fx( st, 7 ); - - /* MSVQ decoder */ - - IF( st->element_mode != EVS_MONO ) - { - create_IDCT_N_Matrix_fx( invTrfMatrix_fx, FDCNG_VQ_MAX_LEN, FDCNG_VQ_DCT_MAXTRUNC, FDCNG_VQ_MAX_LEN * FDCNG_VQ_DCT_MAXTRUNC ); - msvq_dec_fx( ivas_cdk_37bits_fx, NULL, NULL, FD_CNG_stages_37bits, N, FD_CNG_maxN_37bits, indices, 1, invTrfMatrix_fx, v, NULL, 7 ); - } - ELSE - { /* Legacy EVS_MONO MSVQ tables */ - msvq_dec_fx( cdk_37bits, NULL, NULL, FD_CNG_stages_37bits, N, FD_CNG_maxN_37bits, indices, 0, NULL, v, NULL, 7 ); - } - - - /* Decode gain */ - // gain = ((float)index - gain_q_offset) / 1.5f; - gain = L_mult0( sub( index, gain_q_offset ), 21845 ); // Q15 - - /* Apply gain and undo log */ - Word16 res_exp[NPART]; - Word16 max_res_exp = 0; - move16(); - FOR( i = 0; i < N; i++ ) - { - sidNoiseEst[i] = BASOP_util_Pow2( Mpy_32_32( L_add( v[i], gain ), LOG_10_BASE_2_BY_10_Q31 ), Q16, &res_exp[i] ); /*Q31 - res_exp[i]*/ - move32(); - if ( LT_16( max_res_exp, res_exp[i] ) ) - { - max_res_exp = res_exp[i]; - move16(); - } - } - - FOR( i = 0; i < N; i++ ) - { - sidNoiseEst[i] = L_shr( sidNoiseEst[i], sub( max_res_exp, res_exp[i] ) ); /*Q31 - max_res_exp*/ - move32(); - } - - hFdCngCom->sidNoiseEstExp = max_res_exp; - move16(); - - /* NB last band energy compensation */ - - IF( hFdCngCom->CngBandwidth == NB ) - { - sidNoiseEst[( N - 1 )] = Mpy_32_16_1( sidNoiseEst[( N - 1 )], NB_LAST_BAND_SCALE ); /*Q31 - max_res_exp*/ - move32(); - } - - test(); - IF( EQ_16( hFdCngCom->CngBandwidth, SWB ) && LE_32( hFdCngCom->CngBitrate, ACELP_13k20 ) ) - { - sidNoiseEst[( N - 1 )] = Mpy_32_16_1( sidNoiseEst[( N - 1 )], SWB_13k2_LAST_BAND_SCALE ); /*Q31 - max_res_exp*/ - move32(); - } - - scalebands( sidNoiseEst, hFdCngCom->part, hFdCngCom->npart, hFdCngCom->midband, hFdCngCom->nFFTpart, sub( hFdCngCom->stopBand, hFdCngCom->startBand ), hFdCngCom->cngNoiseLevel, 1 ); - Word16 shift1 = L_norm_arr( hFdCngCom->cngNoiseLevel, sub( hFdCngCom->stopBand, hFdCngCom->startBand ) ); - Word16 shift2 = L_norm_arr( hFdCngCom->cngNoiseLevel + sub( hFdCngCom->stopBand, hFdCngCom->startBand ), sub( FFTCLDFBLEN, sub( hFdCngCom->stopBand, hFdCngCom->startBand ) ) ); - Word16 shift = s_max( sub( hFdCngCom->sidNoiseEstExp, shift1 ), sub( hFdCngCom->cngNoiseLevelExp, shift2 ) ); - - scale_sig32( hFdCngCom->cngNoiseLevel, sub( hFdCngCom->stopBand, hFdCngCom->startBand ), sub( hFdCngCom->sidNoiseEstExp, shift ) ); - scale_sig32( hFdCngCom->cngNoiseLevel + sub( hFdCngCom->stopBand, hFdCngCom->startBand ), sub( FFTCLDFBLEN, sub( hFdCngCom->stopBand, hFdCngCom->startBand ) ), sub( hFdCngCom->cngNoiseLevelExp, shift ) ); - - hFdCngCom->cngNoiseLevelExp = shift; - move16(); - - lpc_from_spectrum( hFdCngCom, hFdCngCom->startBand, hFdCngCom->stopFFTbin, st->preemph_fac ); - - return; -} -#endif /*HARMONIZE_2494_FdCng_decodeSID_fx*/ /*------------------------------------------------------------------- * generate_masking_noise_ivas_fx() diff --git a/lib_dec/init_dec_fx.c b/lib_dec/init_dec_fx.c index d3b61ab39baff869796c8d7f61dfeb4c02cfd497..9ab72547bb6918c76b1b55aceb2e1dfca2260996 100644 --- a/lib_dec/init_dec_fx.c +++ b/lib_dec/init_dec_fx.c @@ -881,11 +881,7 @@ ivas_error init_decoder_fx( /* Init Decoder */ IF( st_fx->element_mode == EVS_MONO ) { -#ifdef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM open_decoder_LPD_fx( st_fx, st_fx->total_brate, st_fx->bwidth, 1 ); -#else - open_decoder_LPD_fx( st_fx, st_fx->total_brate, st_fx->bwidth ); -#endif } ELSE { diff --git a/lib_dec/peak_vq_dec_fx.c b/lib_dec/peak_vq_dec_fx.c index f345c61ee1bad8cc62797ebcac5808ba5e985c1c..cf12153fd5945c5d967a0bc5274c8a1fe8c35b9a 100644 --- a/lib_dec/peak_vq_dec_fx.c +++ b/lib_dec/peak_vq_dec_fx.c @@ -321,13 +321,8 @@ static void peak_vq_dec_fx( pvq_decode_frame_fx( st_fx, pvq_vector, npulses, pvq_inp_vector, hvq_band_start, hvq_band_end, hvq_band_width, pvq_bands, Rk, pvq_bits, core ); -#ifdef FIX_BASOP_2486_HQ_FINE_GAIN_ALIGNMENT fine_gain_pred_fx( hvq_band_start, hvq_band_end, hvq_band_width, k_sort, npulses, pvq_maxpulse, NULL, pvq_bands, pvq_vector, pvq_inp_vector, fg_pred, core ); -#else - fine_gain_pred_fx( hvq_band_start, hvq_band_end, hvq_band_width, k_sort, npulses, pvq_maxpulse, NULL, - pvq_bands, pvq_vector, pvq_inp_vector, fg_pred, st_fx->element_mode, core ); -#endif fine_gain_dec_fx( st_fx, k_sort, pvq_bands, gain_bits_array, fg_pred ); diff --git a/lib_dec/pvq_core_dec_fx.c b/lib_dec/pvq_core_dec_fx.c index 1d02cb81836c0de79dde7d0fdd2e7145c4c790d0..6673c9f33439291686a682215ccebb484064d89f 100644 --- a/lib_dec/pvq_core_dec_fx.c +++ b/lib_dec/pvq_core_dec_fx.c @@ -277,13 +277,8 @@ Word16 pvq_core_dec_fx( get_max_pulses_fx( sfm_start, sfm_end, ord, npulses, nb_sfm, pulse_vector, maxpulse ); -#ifdef FIX_BASOP_2486_HQ_FINE_GAIN_ALIGNMENT fine_gain_pred_fx( sfm_start, sfm_end, sfmsize, ord, npulses, maxpulse, R, nb_sfm, coefs_quant, pulse_vector, fg_pred, core ); -#else - fine_gain_pred_fx( sfm_start, sfm_end, sfmsize, ord, npulses, maxpulse, R, - nb_sfm, coefs_quant, pulse_vector, fg_pred, st_fx->element_mode, core ); -#endif fine_gain_dec_fx( st_fx, ord, nb_sfm, gain_bits_array, fg_pred ); IF( st_fx->hHQ_core != NULL ) diff --git a/lib_enc/hq_classifier_enc_fx.c b/lib_enc/hq_classifier_enc_fx.c index c9cf8856b0db18a94fc6d8176d3eee4612e21224..642c503fec5f8a346719a7a26986959bcbea5f55 100644 --- a/lib_enc/hq_classifier_enc_fx.c +++ b/lib_enc/hq_classifier_enc_fx.c @@ -387,11 +387,7 @@ Word16 peak_avrg_ratio_fx( test(); test(); test(); -#ifdef FIX_2452_HQ_CORE_PEAQ_AVR_RATIO_HARM IF( ( GE_16( add( k, k1 ), 5 ) && GT_16( k1, 2 ) && LT_32( total_brate, HQ_BWE_CROSSOVER_BRATE ) && GT_32( total_brate, HQ_16k40 ) ) || ( ( ( GE_16( add( k, k1 ), 10 ) && GT_16( k1, 5 ) ) || GE_16( *mode_count, 5 ) ) && LT_16( *mode_count1, 5 ) ) ) -#else - IF( ( GE_16( add( k, k1 ), 5 ) && GT_16( k1, 2 ) && LT_32( total_brate, HQ_BWE_CROSSOVER_BRATE ) ) || ( ( ( GE_16( add( k, k1 ), 10 ) && GT_16( k1, 5 ) ) || GE_16( *mode_count, 5 ) ) && LT_16( *mode_count1, 5 ) ) ) -#endif { hqswb_clas = HQ_HARMONIC; move16(); diff --git a/lib_enc/hq_lr_enc_fx.c b/lib_enc/hq_lr_enc_fx.c index 5daf90dd5317ecf6cdc335e6c4e85f07a76010f4..9165eb8423403618d01f77721c1c124a90363877 100644 --- a/lib_enc/hq_lr_enc_fx.c +++ b/lib_enc/hq_lr_enc_fx.c @@ -206,11 +206,7 @@ void hq_lr_enc_fx( } ELSE { -#ifdef FIX_2452_HQ_CORE_PEAQ_AVR_RATIO_HARM hqswb_clas_fx = peak_avrg_ratio_fx( st_fx->total_brate, L_t_audio, NUMC_N, &hHQ_core->mode_count, &hHQ_core->mode_count1, SWB_BWE_LR_Qs ); /* Q0 */ -#else - hqswb_clas_fx = peak_avrg_ratio_fx( HQ_BWE_CROSSOVER_BRATE, L_t_audio, NUMC_N, &hHQ_core->mode_count, &hHQ_core->mode_count1, SWB_BWE_LR_Qs ); /* Q0 */ -#endif } /* write the classification information into the bitstream */ diff --git a/lib_enc/peak_vq_enc_fx.c b/lib_enc/peak_vq_enc_fx.c index 6d7208bb822315199074239480222bbb6be48d21..2e396e3d0277670d02ad1f6b0987c6dc559af6a2 100644 --- a/lib_enc/peak_vq_enc_fx.c +++ b/lib_enc/peak_vq_enc_fx.c @@ -402,13 +402,8 @@ Word16 peak_vq_enc_fx( move16(); } -#ifdef FIX_BASOP_2486_HQ_FINE_GAIN_ALIGNMENT fine_gain_pred_fx( hvq_band_start, hvq_band_end, hvq_band_width, k_sort, npulses, NULL, NULL, pvq_bands, coefs_pvq, pvq_inp_vector, fg_pred, HQ_CORE ); -#else - fine_gain_pred_fx( hvq_band_start, hvq_band_end, hvq_band_width, k_sort, npulses, NULL, NULL, pvq_bands, coefs_pvq, - pvq_inp_vector, fg_pred, element_mode, HQ_CORE ); -#endif pCoefsOut = &coefs_out[0]; pSelBnds = &sel_bnds[0]; diff --git a/lib_enc/pvq_core_enc_fx.c b/lib_enc/pvq_core_enc_fx.c index 23f3bcb580331a2d21cb35e707187fd4aa11981c..397e45662a5a2db8ed55719da4740121cc7fcbb4 100644 --- a/lib_enc/pvq_core_enc_fx.c +++ b/lib_enc/pvq_core_enc_fx.c @@ -323,13 +323,8 @@ Word16 pvq_core_enc_fx( get_max_pulses_fx( sfm_start, sfm_end, ord, npulses, nb_sfm, pulse_vector, maxpulse ); /* Fine gain prediction */ -#ifdef FIX_BASOP_2486_HQ_FINE_GAIN_ALIGNMENT fine_gain_pred_fx( sfm_start, sfm_end, sfmsize, ord, npulses, maxpulse, R, nb_sfm, coefs_quant, pulse_vector, fg_pred, core ); -#else - fine_gain_pred_fx( sfm_start, sfm_end, sfmsize, ord, npulses, maxpulse, R, nb_sfm, - coefs_quant, pulse_vector, fg_pred, element_mode, core ); -#endif fine_gain_quant_fx( hBstr, ord, nb_sfm, gain_bits_array, fg_pred, gopt ); diff --git a/lib_rend/ivas_dirac_rend_fx.c b/lib_rend/ivas_dirac_rend_fx.c index 97695ce39e0fd485ae6dfcaa5f044e33764eb31c..10092f16647114e300e0f1c516f808128ea7a867 100644 --- a/lib_rend/ivas_dirac_rend_fx.c +++ b/lib_rend/ivas_dirac_rend_fx.c @@ -331,11 +331,7 @@ ivas_error ivas_spat_hSpatParamRendCom_config_fx( ELSE { Word16 num_slots_in_subfr, tmp; -#ifdef FIX_BASOP_2512_WRONG_SHIFT_IN_DIRAC_CONFIG tmp = 0; -#else - tmp = 1; -#endif move16(); num_slots_in_subfr = 1; @@ -1492,11 +1488,7 @@ void protoSignalComputation_shd_fx( move32(); *p_k_fx[k] = L_shl( *p_k_fx[k], Q1 ); // left shift is done to maintain constant Q factor Q(q_cldfb+min_q_shift) move32(); -#ifdef FIX_BASOP_2511_PROTO_REF_POWER_FIX reference_power_fx[idx1] = Madd_32_32( reference_power_fx[idx1], *p_k_fx[k], *p_k_fx[k] ); // Q(2*(q_cldfb + min_q_shift)-31) -#else - reference_power_fx[idx1] = Mpy_32_32( *p_k_fx[k], *p_k_fx[k] ); // Q(2*(q_cldfb + min_q_shift)-31) -#endif move32(); p_k_fx[k]++; diff --git a/lib_rend/ivas_efap_fx.c b/lib_rend/ivas_efap_fx.c index 2f1157e14e62a61160f5c7e4a20d05c77a310dcc..7b7a5244fea109dd27c52f3dacbdf7ee328196a0 100644 --- a/lib_rend/ivas_efap_fx.c +++ b/lib_rend/ivas_efap_fx.c @@ -1064,11 +1064,7 @@ static void add_vertex_to_convex_hull_fx( move32(); centroid[1] = Mpy_32_32( centroid[1], tmp32 ); // q27 move32(); -#ifdef FIX_BASOP_2514_EFAP_PORTING_ERROR centroid[2] = Mpy_32_32( centroid[2], tmp32 ); // q27 -#else - centroid[2] = Mpy_32_32( centroid[1], tmp32 ); // q27 -#endif move32(); centroid[0] = L_shl( centroid[0], 4 ); // q31 diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c index 1c10f348887aaf67b9cc9df413140d4d045830f6..23823fe113d6261cd0351c337e99a4cb08bb374b 100644 --- a/lib_rend/lib_rend_fx.c +++ b/lib_rend/lib_rend_fx.c @@ -4028,11 +4028,6 @@ ivas_error IVAS_REND_Open( return error; } } -#ifndef FIX_BASOP_2513_EXTRA_RETURN_REND_OPEN - { - return error; - } -#endif } return IVAS_ERR_OK; @@ -4054,11 +4049,7 @@ static LSSETUP_CUSTOM_STRUCT makeCustomLsSetup( move16(); FOR( i = 0; i < rendCustomLsLayout.num_spk; ++i ) { -#ifdef FIX_BASOP_2516_REND_CUSTOM_LAYOUT_PORT_BUG IF( GT_32( L_abs( rendCustomLsLayout.elevation_fx[i] ), EPSILON_FX ) ) -#else - IF( LT_32( L_abs( rendCustomLsLayout.elevation_fx[i] ), EPSILON_FX ) ) -#endif { customLs.is_planar_setup = 0; move16(); diff --git a/lib_util/ivas_rtp_file.c b/lib_util/ivas_rtp_file.c index 74b10044f36c06a1bff56f5a7c9551b36e2512ea..4aba3a0c03cc8459b9cbbc7160e92980dc78945f 100644 --- a/lib_util/ivas_rtp_file.c +++ b/lib_util/ivas_rtp_file.c @@ -1086,7 +1086,6 @@ ivas_error IVAS_RTP_WriteNextFrame( rtp->nWrittenPiData--; } -#ifdef FIX_1527_CMR_BITRATE_IDX for ( IVAS_RTP_REQUEST_TYPE req = 0; req < IVAS_REQUEST_MAX; req++ ) { if ( rtp->remoteRequestBitmap & ( 1u << req ) ) @@ -1098,7 +1097,6 @@ ivas_error IVAS_RTP_WriteNextFrame( } } } -#endif if ( forcePacket || IVAS_RTP_PACK_GetNumFrames( rtp->hPack ) == rtp->packCfg.maxFramesPerPacket ) { diff --git a/lib_util/ivas_rtp_file.h b/lib_util/ivas_rtp_file.h index 57af1826cce9db54d8e4a7f9ba3195c1d78a84ca..cb7dd26ecbda92a8e3aecd4ad5e93f9ad987a02a 100644 --- a/lib_util/ivas_rtp_file.h +++ b/lib_util/ivas_rtp_file.h @@ -44,9 +44,7 @@ typedef struct uint8_t packet[NOMINAL_BUFFER_SIZE( IVAS_MAX_FRAMES_PER_RTP_PACKET )]; IVAS_PIDATA_TS piData[IVAS_PI_MAX_ID * IVAS_MAX_FRAMES_PER_RTP_PACKET]; -#ifdef FIX_1527_CMR_BITRATE_IDX IVAS_RTP_REQUEST_VALUE remoteRequests[IVAS_REQUEST_MAX]; -#endif IVAS_RTP_FILE_HANDLE hRtpFile; FILE *f_piDataOut; FILE *f_piExtOut; diff --git a/lib_util/ivas_rtp_payload.c b/lib_util/ivas_rtp_payload.c index f290d7c41130c1d17b090674e7d79ea5dd7bb580..922d4e881e23049148857a8626757aae986b5209 100644 --- a/lib_util/ivas_rtp_payload.c +++ b/lib_util/ivas_rtp_payload.c @@ -657,11 +657,7 @@ static uint32_t getBitrateIdx( const uint32_t *table, uint32_t tableLen, uint32_ for ( n = 0; n < tableLen; n++ ) { -#ifdef FIX_1527_CMR_BITRATE_IDX if ( bitrate >= ( table[n] * IVAS_NUM_FRAMES_PER_SEC ) ) -#else - if ( bitrate > ( table[n] * IVAS_NUM_FRAMES_PER_SEC ) ) -#endif { idx = n; } @@ -727,11 +723,7 @@ static void packEBytes( /* EVS Modes */ bitrate = ( bitrate > 128000 ) ? 128000 : bitrate; bitrate = ( bitrate < 5900 ) ? 5900 : bitrate; -#ifdef FIX_1527_CMR_BITRATE_IDX bitrateIdx = getBitrateIdx( evsFrameSizeInBits, ( sizeof( evsFrameSizeInBits ) / sizeof( evsFrameSizeInBits[0] ) ) - 1, bitrate ); -#else - bitrateIdx = getBitrateIdx( evsFrameSizeInBits, sizeof( evsFrameSizeInBits ) / sizeof( evsFrameSizeInBits[0] ), bitrate ); -#endif BR = (uint8_t) bitrateIdx & MASK_4BIT; /* If a bandwidth choice cannot be signalled for a given bitrate @@ -795,11 +787,7 @@ static void packEBytes( /* Initial E-Byte */ bitrate = ( bitrate > 512000 ) ? 512000 : bitrate; bitrate = ( bitrate < 13200 ) ? 13200 : bitrate; -#ifdef FIX_1527_CMR_BITRATE_IDX bitrateIdx = getBitrateIdx( ivasFrameSizeInBits, ( sizeof( ivasFrameSizeInBits ) / sizeof( ivasFrameSizeInBits[0] ) ) - 2, bitrate ); -#else - bitrateIdx = getBitrateIdx( ivasFrameSizeInBits, sizeof( ivasFrameSizeInBits ) / sizeof( ivasFrameSizeInBits[0] ), bitrate ); -#endif BR = (uint8_t) bitrateIdx & MASK_4BIT; if ( nByte < maxNumEBytes ) {