Loading lib_com/bits_alloc.c +14 −14 Original line number Diff line number Diff line Loading @@ -525,7 +525,7 @@ ivas_error config_acelp1( const int16_t L_frame, /* i : frame length at internal Fs */ const int16_t GSC_noisy_speech, /* i : GSC on SWB noisy speech flag */ ACELP_config *acelp_cfg, /* i : ACELP bit-allocation */ const int16_t signalling_bits, /* i : number of signalling bits */ const int16_t signaling_bits, /* i : number of signaling bits */ const int16_t coder_type, /* i : coder type */ const int16_t tc_subfr, /* i : TC subfr ID */ const int16_t tc_call, /* i : TC call number (0,1,2,3,5(DEC)) */ Loading Loading @@ -663,7 +663,7 @@ ivas_error config_acelp1( bits += *nBits_es_Pred; /* equalize for 4th signaling bit estimated at the encoder in TC_0_192 */ } /* Subtract signalling bits */ /* Subtract signaling bits */ if ( enc_dec == DEC && idchan == 1 && element_mode > EVS_MONO ) { bits -= TDM_SIGNAL_BITS_READ_FROM_THE_END_OF_BS; Loading @@ -681,13 +681,13 @@ ivas_error config_acelp1( } else { /* Subtract signalling bits */ bits -= signalling_bits; /* Subtract signaling bits */ bits -= signaling_bits; } if ( extl_brate > 0 && ( extl == WB_TBE || extl == SWB_TBE || extl == FB_TBE || extl == WB_BWE || extl == SWB_BWE || extl == FB_BWE ) ) { /* extension layer signalling bit is counted in the extension layer bitbudget */ /* extension layer signaling bit is counted in the extension layer bitbudget */ bits++; } Loading Loading @@ -896,14 +896,14 @@ ivas_error config_acelp1( fix_first = 1; } /* TC signalling */ /* TC signaling */ if ( L_frame == L_FRAME ) { if ( tc_subfr == TC_0_0 ) { if ( enc_dec == ENC ) { bits -= 1; /* TC signalling */ bits -= 1; /* TC signaling */ } if ( acelp_cfg->ltf_mode == NORMAL_OPERATION ) Loading @@ -915,7 +915,7 @@ ivas_error config_acelp1( { if ( enc_dec == ENC ) { bits -= 4; /* TC signalling */ bits -= 4; /* TC signaling */ } if ( acelp_cfg->ltf_mode == NORMAL_OPERATION ) Loading @@ -927,7 +927,7 @@ ivas_error config_acelp1( { if ( enc_dec == ENC ) { bits -= 4; /* TC signalling */ bits -= 4; /* TC signaling */ } if ( acelp_cfg->ltf_mode == NORMAL_OPERATION ) Loading @@ -939,7 +939,7 @@ ivas_error config_acelp1( { if ( enc_dec == ENC ) { bits -= 3; /* TC signalling */ bits -= 3; /* TC signaling */ } if ( acelp_cfg->ltf_mode == NORMAL_OPERATION ) Loading @@ -951,7 +951,7 @@ ivas_error config_acelp1( { if ( enc_dec == ENC ) { bits -= 3; /* TC signalling */ bits -= 3; /* TC signaling */ } if ( acelp_cfg->ltf_mode == NORMAL_OPERATION ) Loading @@ -963,7 +963,7 @@ ivas_error config_acelp1( { if ( enc_dec == ENC ) { bits -= 4; /* TC signalling */ bits -= 4; /* TC signaling */ } if ( acelp_cfg->ltf_mode == NORMAL_OPERATION ) Loading @@ -978,11 +978,11 @@ ivas_error config_acelp1( { if ( tc_subfr <= 2 * L_SUBFR ) { bits -= 2; /* TC signalling */ bits -= 2; /* TC signaling */ } else { bits -= 3; /* TC signalling */ bits -= 3; /* TC signaling */ } } Loading lib_com/bitstream.c +15 −15 Original line number Diff line number Diff line Loading @@ -1244,7 +1244,7 @@ static void dec_prm_core( /*-----------------------------------------------------------------* * decision_matrix_core_dec() * * Read core signalling bits from the bitstream * Read core signaling bits from the bitstream * Set st->core, and st->bwidth if signalled together with the core. *-----------------------------------------------------------------*/ Loading Loading @@ -1291,12 +1291,12 @@ static void decision_matrix_core_dec( } /*-----------------------------------------------------------------* * Read ACELP signalling bits from the bitstream * Read ACELP signaling bits from the bitstream *-----------------------------------------------------------------*/ if ( st->core == ACELP_CORE ) { /* find the section in the ACELP signalling table corresponding to bitrate */ /* find the section in the ACELP signaling table corresponding to bitrate */ start_idx = 0; while ( acelp_sig_tbl[start_idx] != st->total_brate ) { Loading @@ -1312,11 +1312,11 @@ static void decision_matrix_core_dec( /* retrieve the number of bits */ nBits = (int16_t) acelp_sig_tbl[start_idx++]; /* retrieve the signalling indice */ /* retrieve the signaling indice */ ind = acelp_sig_tbl[start_idx + get_next_indice( st, nBits )]; st->bwidth = ( ind >> 3 ) & 0x7; /* convert signalling indice into signalling information */ /* convert signaling indice into signaling information */ if ( ( ind & 0x7 ) == LR_MDCT ) { st->core = HQ_CORE; Loading @@ -1324,7 +1324,7 @@ static void decision_matrix_core_dec( } /*-----------------------------------------------------------------* * Read HQ signalling bits from the bitstream * Read HQ signaling bits from the bitstream * Set HQ core type *-----------------------------------------------------------------*/ Loading Loading @@ -1849,7 +1849,7 @@ ivas_error preview_indices( break; case SID_ISM: st_ivas->ivas_format = ISM_FORMAT; /* temporary hack to make mode signalling work with the current 1-object ISM DTX: read padding bits */ /* temporary hack to make mode signaling work with the current 1-object ISM DTX: read padding bits */ /* Todo: how to apply this here? maybe pt_stream += ... would work? */ /* st->bit_stream += ( IVAS_SID_4k4 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS; */ break; Loading Loading @@ -2504,7 +2504,7 @@ static void get_rfFlag( /* check for rf_flag in the packet and extract the rf_frame_type and rf_fec_offset */ if ( st->total_brate == ACELP_13k20 && ( st->bfi == FRAMEMODE_NORMAL || st->bfi == FRAMEMODE_FUTURE ) ) { /* find the section in the ACELP signalling table corresponding to bitrate */ /* find the section in the ACELP signaling table corresponding to bitrate */ start_idx = 0; while ( acelp_sig_tbl[start_idx] != st->total_brate ) { Loading @@ -2518,10 +2518,10 @@ static void get_rfFlag( /* retrieve the number of bits */ nBits_tmp = (int16_t) acelp_sig_tbl[start_idx++]; /* retrieve the signalling indice */ /* retrieve the signaling indice */ ind_tmp = acelp_sig_tbl[start_idx + get_indice( st, 0, nBits_tmp )]; /* convert signalling indice into RF flag. */ /* convert signaling indice into RF flag. */ *rf_flag = ( ind_tmp >> 7 ) & 0x1; if ( ind ) Loading Loading @@ -2624,7 +2624,7 @@ static void get_rfTargetBits( /*-------------------------------------------------------------------* * berCheck() * * Check for bit errors in channel aware signalling. * Check for bit errors in channel aware signaling. *-------------------------------------------------------------------*/ static void berCheck( Loading Loading @@ -2747,7 +2747,7 @@ void get_NextCoderType( tmp += bit_stream[k]; } /* retrieve the signalling indice */ /* retrieve the signaling indice */ *next_coder_type = acelp_sig_tbl[start_idx + tmp] & 0x7; return; Loading Loading @@ -2923,7 +2923,7 @@ void evs_dec_previewFrame( if ( total_brate == ACELP_13k20 ) { /* find the section in the ACELP signalling table corresponding to bitrate */ /* find the section in the ACELP signaling table corresponding to bitrate */ start_idx = 0; while ( acelp_sig_tbl[start_idx] != total_brate ) { Loading @@ -2936,10 +2936,10 @@ void evs_dec_previewFrame( /* retrieve the number of bits */ nBits = (int16_t) acelp_sig_tbl[start_idx++]; /* retrieve the signalling indice */ /* retrieve the signaling indice */ ind = acelp_sig_tbl[start_idx + get_indice_preview( bitstream, bitstreamSize, 0, nBits )]; /* convert signalling indice into RF flag. */ /* convert signaling indice into RF flag. */ rf_flag = ( ind >> 7 ) & 0x1; if ( rf_flag != 0 ) { Loading lib_com/ivas_cnst.h +2 −2 Original line number Diff line number Diff line Loading @@ -235,7 +235,7 @@ typedef enum #define NBITS_ELEMENT_MODE 1 /* number of bits to encode the stereo element mode */ #define NBITS_BWIDTH 2 /* number of bits to encode all audio bandwidths */ /* format signalling in SID frames */ /* format signaling in SID frames */ #define SID_FORMAT_NBITS 3 /* Bit 0 | Bit 1 | Bit 2 */ /*-------|-------|------ */ #define SID_DFT_STEREO 0x0 /* 0| 0| 0 */ Loading Loading @@ -755,7 +755,7 @@ enum fea_names #define TDM_L_NOVA_NS 5000000L /* mixing overlap length */ #define TDM_SECONDARY_SIGNALLING 3 /* number of bits to code the signalling for secondary channel */ #define TDM_SECONDARY_SIGNALLING 3 /* number of bits to code the signaling for secondary channel */ #define TDM_RATIO_BITS 5 /* number of bits to code the correlation ratio */ #define TDM_LP_REUSE_BITS 1 /* number of bits to code LP reuse flag for secondary channel */ #define TDM_LR_CONTENT_BITS 1 /* number of bits to code flag when the content is LR or not */ Loading lib_com/ivas_cov_smooth.c +6 −5 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ *-----------------------------------------------------------------------------------------*/ static void ivas_set_up_cov_smoothing( ivas_cov_smooth_state_t *pState, ivas_cov_smooth_state_t *hCovState, ivas_filterbank_t *pFb, const float max_update_rate, const int16_t min_pool_size ) Loading @@ -63,15 +63,16 @@ static void ivas_set_up_cov_smoothing( update_factor += pFb->fb_bin_to_band.pFb_bin_to_band[j][k]; } pState->pSmoothing_factor[j] = update_factor / min_pool_size; hCovState->pSmoothing_factor[j] = update_factor / min_pool_size; if ( pState->pSmoothing_factor[j] > max_update_rate ) if ( hCovState->pSmoothing_factor[j] > max_update_rate ) { pState->pSmoothing_factor[j] = max_update_rate; hCovState->pSmoothing_factor[j] = max_update_rate; } } pState->prior_bank_idx = -1; hCovState->prior_bank_idx = -1; return; } Loading lib_com/ivas_dirac_com.c +2 −0 Original line number Diff line number Diff line Loading @@ -335,7 +335,9 @@ ivas_error ivas_dirac_sba_config( sba_total_brate = ACELP_48k; } } ivas_set_qmetadata_maxbit_req( hQMetaData, SBA_FORMAT ); if ( sba_total_brate <= IVAS_16k4 ) { hQMetaData->useLowerRes = 1; Loading Loading
lib_com/bits_alloc.c +14 −14 Original line number Diff line number Diff line Loading @@ -525,7 +525,7 @@ ivas_error config_acelp1( const int16_t L_frame, /* i : frame length at internal Fs */ const int16_t GSC_noisy_speech, /* i : GSC on SWB noisy speech flag */ ACELP_config *acelp_cfg, /* i : ACELP bit-allocation */ const int16_t signalling_bits, /* i : number of signalling bits */ const int16_t signaling_bits, /* i : number of signaling bits */ const int16_t coder_type, /* i : coder type */ const int16_t tc_subfr, /* i : TC subfr ID */ const int16_t tc_call, /* i : TC call number (0,1,2,3,5(DEC)) */ Loading Loading @@ -663,7 +663,7 @@ ivas_error config_acelp1( bits += *nBits_es_Pred; /* equalize for 4th signaling bit estimated at the encoder in TC_0_192 */ } /* Subtract signalling bits */ /* Subtract signaling bits */ if ( enc_dec == DEC && idchan == 1 && element_mode > EVS_MONO ) { bits -= TDM_SIGNAL_BITS_READ_FROM_THE_END_OF_BS; Loading @@ -681,13 +681,13 @@ ivas_error config_acelp1( } else { /* Subtract signalling bits */ bits -= signalling_bits; /* Subtract signaling bits */ bits -= signaling_bits; } if ( extl_brate > 0 && ( extl == WB_TBE || extl == SWB_TBE || extl == FB_TBE || extl == WB_BWE || extl == SWB_BWE || extl == FB_BWE ) ) { /* extension layer signalling bit is counted in the extension layer bitbudget */ /* extension layer signaling bit is counted in the extension layer bitbudget */ bits++; } Loading Loading @@ -896,14 +896,14 @@ ivas_error config_acelp1( fix_first = 1; } /* TC signalling */ /* TC signaling */ if ( L_frame == L_FRAME ) { if ( tc_subfr == TC_0_0 ) { if ( enc_dec == ENC ) { bits -= 1; /* TC signalling */ bits -= 1; /* TC signaling */ } if ( acelp_cfg->ltf_mode == NORMAL_OPERATION ) Loading @@ -915,7 +915,7 @@ ivas_error config_acelp1( { if ( enc_dec == ENC ) { bits -= 4; /* TC signalling */ bits -= 4; /* TC signaling */ } if ( acelp_cfg->ltf_mode == NORMAL_OPERATION ) Loading @@ -927,7 +927,7 @@ ivas_error config_acelp1( { if ( enc_dec == ENC ) { bits -= 4; /* TC signalling */ bits -= 4; /* TC signaling */ } if ( acelp_cfg->ltf_mode == NORMAL_OPERATION ) Loading @@ -939,7 +939,7 @@ ivas_error config_acelp1( { if ( enc_dec == ENC ) { bits -= 3; /* TC signalling */ bits -= 3; /* TC signaling */ } if ( acelp_cfg->ltf_mode == NORMAL_OPERATION ) Loading @@ -951,7 +951,7 @@ ivas_error config_acelp1( { if ( enc_dec == ENC ) { bits -= 3; /* TC signalling */ bits -= 3; /* TC signaling */ } if ( acelp_cfg->ltf_mode == NORMAL_OPERATION ) Loading @@ -963,7 +963,7 @@ ivas_error config_acelp1( { if ( enc_dec == ENC ) { bits -= 4; /* TC signalling */ bits -= 4; /* TC signaling */ } if ( acelp_cfg->ltf_mode == NORMAL_OPERATION ) Loading @@ -978,11 +978,11 @@ ivas_error config_acelp1( { if ( tc_subfr <= 2 * L_SUBFR ) { bits -= 2; /* TC signalling */ bits -= 2; /* TC signaling */ } else { bits -= 3; /* TC signalling */ bits -= 3; /* TC signaling */ } } Loading
lib_com/bitstream.c +15 −15 Original line number Diff line number Diff line Loading @@ -1244,7 +1244,7 @@ static void dec_prm_core( /*-----------------------------------------------------------------* * decision_matrix_core_dec() * * Read core signalling bits from the bitstream * Read core signaling bits from the bitstream * Set st->core, and st->bwidth if signalled together with the core. *-----------------------------------------------------------------*/ Loading Loading @@ -1291,12 +1291,12 @@ static void decision_matrix_core_dec( } /*-----------------------------------------------------------------* * Read ACELP signalling bits from the bitstream * Read ACELP signaling bits from the bitstream *-----------------------------------------------------------------*/ if ( st->core == ACELP_CORE ) { /* find the section in the ACELP signalling table corresponding to bitrate */ /* find the section in the ACELP signaling table corresponding to bitrate */ start_idx = 0; while ( acelp_sig_tbl[start_idx] != st->total_brate ) { Loading @@ -1312,11 +1312,11 @@ static void decision_matrix_core_dec( /* retrieve the number of bits */ nBits = (int16_t) acelp_sig_tbl[start_idx++]; /* retrieve the signalling indice */ /* retrieve the signaling indice */ ind = acelp_sig_tbl[start_idx + get_next_indice( st, nBits )]; st->bwidth = ( ind >> 3 ) & 0x7; /* convert signalling indice into signalling information */ /* convert signaling indice into signaling information */ if ( ( ind & 0x7 ) == LR_MDCT ) { st->core = HQ_CORE; Loading @@ -1324,7 +1324,7 @@ static void decision_matrix_core_dec( } /*-----------------------------------------------------------------* * Read HQ signalling bits from the bitstream * Read HQ signaling bits from the bitstream * Set HQ core type *-----------------------------------------------------------------*/ Loading Loading @@ -1849,7 +1849,7 @@ ivas_error preview_indices( break; case SID_ISM: st_ivas->ivas_format = ISM_FORMAT; /* temporary hack to make mode signalling work with the current 1-object ISM DTX: read padding bits */ /* temporary hack to make mode signaling work with the current 1-object ISM DTX: read padding bits */ /* Todo: how to apply this here? maybe pt_stream += ... would work? */ /* st->bit_stream += ( IVAS_SID_4k4 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS; */ break; Loading Loading @@ -2504,7 +2504,7 @@ static void get_rfFlag( /* check for rf_flag in the packet and extract the rf_frame_type and rf_fec_offset */ if ( st->total_brate == ACELP_13k20 && ( st->bfi == FRAMEMODE_NORMAL || st->bfi == FRAMEMODE_FUTURE ) ) { /* find the section in the ACELP signalling table corresponding to bitrate */ /* find the section in the ACELP signaling table corresponding to bitrate */ start_idx = 0; while ( acelp_sig_tbl[start_idx] != st->total_brate ) { Loading @@ -2518,10 +2518,10 @@ static void get_rfFlag( /* retrieve the number of bits */ nBits_tmp = (int16_t) acelp_sig_tbl[start_idx++]; /* retrieve the signalling indice */ /* retrieve the signaling indice */ ind_tmp = acelp_sig_tbl[start_idx + get_indice( st, 0, nBits_tmp )]; /* convert signalling indice into RF flag. */ /* convert signaling indice into RF flag. */ *rf_flag = ( ind_tmp >> 7 ) & 0x1; if ( ind ) Loading Loading @@ -2624,7 +2624,7 @@ static void get_rfTargetBits( /*-------------------------------------------------------------------* * berCheck() * * Check for bit errors in channel aware signalling. * Check for bit errors in channel aware signaling. *-------------------------------------------------------------------*/ static void berCheck( Loading Loading @@ -2747,7 +2747,7 @@ void get_NextCoderType( tmp += bit_stream[k]; } /* retrieve the signalling indice */ /* retrieve the signaling indice */ *next_coder_type = acelp_sig_tbl[start_idx + tmp] & 0x7; return; Loading Loading @@ -2923,7 +2923,7 @@ void evs_dec_previewFrame( if ( total_brate == ACELP_13k20 ) { /* find the section in the ACELP signalling table corresponding to bitrate */ /* find the section in the ACELP signaling table corresponding to bitrate */ start_idx = 0; while ( acelp_sig_tbl[start_idx] != total_brate ) { Loading @@ -2936,10 +2936,10 @@ void evs_dec_previewFrame( /* retrieve the number of bits */ nBits = (int16_t) acelp_sig_tbl[start_idx++]; /* retrieve the signalling indice */ /* retrieve the signaling indice */ ind = acelp_sig_tbl[start_idx + get_indice_preview( bitstream, bitstreamSize, 0, nBits )]; /* convert signalling indice into RF flag. */ /* convert signaling indice into RF flag. */ rf_flag = ( ind >> 7 ) & 0x1; if ( rf_flag != 0 ) { Loading
lib_com/ivas_cnst.h +2 −2 Original line number Diff line number Diff line Loading @@ -235,7 +235,7 @@ typedef enum #define NBITS_ELEMENT_MODE 1 /* number of bits to encode the stereo element mode */ #define NBITS_BWIDTH 2 /* number of bits to encode all audio bandwidths */ /* format signalling in SID frames */ /* format signaling in SID frames */ #define SID_FORMAT_NBITS 3 /* Bit 0 | Bit 1 | Bit 2 */ /*-------|-------|------ */ #define SID_DFT_STEREO 0x0 /* 0| 0| 0 */ Loading Loading @@ -755,7 +755,7 @@ enum fea_names #define TDM_L_NOVA_NS 5000000L /* mixing overlap length */ #define TDM_SECONDARY_SIGNALLING 3 /* number of bits to code the signalling for secondary channel */ #define TDM_SECONDARY_SIGNALLING 3 /* number of bits to code the signaling for secondary channel */ #define TDM_RATIO_BITS 5 /* number of bits to code the correlation ratio */ #define TDM_LP_REUSE_BITS 1 /* number of bits to code LP reuse flag for secondary channel */ #define TDM_LR_CONTENT_BITS 1 /* number of bits to code flag when the content is LR or not */ Loading
lib_com/ivas_cov_smooth.c +6 −5 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ *-----------------------------------------------------------------------------------------*/ static void ivas_set_up_cov_smoothing( ivas_cov_smooth_state_t *pState, ivas_cov_smooth_state_t *hCovState, ivas_filterbank_t *pFb, const float max_update_rate, const int16_t min_pool_size ) Loading @@ -63,15 +63,16 @@ static void ivas_set_up_cov_smoothing( update_factor += pFb->fb_bin_to_band.pFb_bin_to_band[j][k]; } pState->pSmoothing_factor[j] = update_factor / min_pool_size; hCovState->pSmoothing_factor[j] = update_factor / min_pool_size; if ( pState->pSmoothing_factor[j] > max_update_rate ) if ( hCovState->pSmoothing_factor[j] > max_update_rate ) { pState->pSmoothing_factor[j] = max_update_rate; hCovState->pSmoothing_factor[j] = max_update_rate; } } pState->prior_bank_idx = -1; hCovState->prior_bank_idx = -1; return; } Loading
lib_com/ivas_dirac_com.c +2 −0 Original line number Diff line number Diff line Loading @@ -335,7 +335,9 @@ ivas_error ivas_dirac_sba_config( sba_total_brate = ACELP_48k; } } ivas_set_qmetadata_maxbit_req( hQMetaData, SBA_FORMAT ); if ( sba_total_brate <= IVAS_16k4 ) { hQMetaData->useLowerRes = 1; Loading