Loading lib_enc/ivas_ism_dtx_enc.c +7 −1 Original line number Diff line number Diff line Loading @@ -170,7 +170,13 @@ int16_t ivas_ism_dtx_enc( if ( ( st_ivas->hSCE[0]->hCoreCoder[0]->core_brate == -1 ) && ( st_ivas->hSCE[0]->hCoreCoder[0]->last_core_brate == SID_2k40 || st_ivas->hSCE[0]->hCoreCoder[0]->last_core_brate == FRAME_NO_DATA ) ) { st_ivas->hSCE[0]->hCoreCoder[0]->core_brate = st_ivas->hSCE[0]->hCoreCoder[0]->last_core_brate; reset_indices_enc( st_ivas->hSCE[0]->hCoreCoder[0]->hBstr, MAX_NUM_INDICES ); reset_indices_enc( st_ivas->hSCE[0]->hCoreCoder[0]->hBstr, #ifdef IND_LIST_DYN st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->max_num_indices #else MAX_NUM_INDICES #endif ); } st_ivas->hSCE[1]->hCoreCoder[0]->core_brate = st_ivas->hSCE[0]->hCoreCoder[0]->core_brate; Loading lib_enc/ivas_sba_enc.c +16 −35 Original line number Diff line number Diff line Loading @@ -111,11 +111,7 @@ ivas_error ivas_sba_enc_reconfigure( ivas_error error; ENCODER_CONFIG_HANDLE hEncoderConfig; #ifndef IND_LIST_DYN Indice *ind_list; #endif BSTR_ENC_HANDLE hBstr; BSTR_ENC_HANDLE hMetaData; error = IVAS_ERR_OK; hEncoderConfig = st_ivas->hEncoderConfig; ivas_total_brate = hEncoderConfig->ivas_total_brate; Loading Loading @@ -143,11 +139,8 @@ ivas_error ivas_sba_enc_reconfigure( int16_t n, i, n_old; float **old_mem_hp20_in; /* save bitstream information */ #ifndef IND_LIST_DYN ind_list = hBstr->ind_list; #endif ind_list_metadata = hMetaData->ind_list; n_old = ivas_sba_get_nchan_metadata( analysis_order_old ); n = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order ); if ( n > n_old ) { Loading @@ -173,34 +166,19 @@ ivas_error ivas_sba_enc_reconfigure( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); } #ifndef IND_LIST_DYN /* prepare bitstream buffers */ #endif for ( n = 0; n < CPE_CHANNELS; n++ ) { #ifndef IND_LIST_DYN st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->ind_list = ind_list + ( cpe_id * CPE_CHANNELS + n ) * MAX_NUM_INDICES; reset_indices_enc( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr, MAX_NUM_INDICES ); #endif if ( hEncoderConfig->Opt_DTX_ON ) { st_ivas->hCPE[cpe_id]->hCoreCoder[n]->cng_sba_flag = 1; } set_f( st_ivas->mem_hp20_in[i], 0.0f, L_HP20_MEM ); } #ifndef IND_LIST_DYN /* Metadata only initialized for the last CPE index */ if ( cpe_id == st_ivas->nCPE - 1 ) { st_ivas->hCPE[cpe_id]->hMetaData->ind_list = ind_list_metadata + sce_id * MAX_BITS_METADATA; reset_indices_enc( st_ivas->hCPE[cpe_id]->hMetaData, MAX_BITS_METADATA ); } #endif free( old_mem_hp20_in ); old_mem_hp20_in = NULL; } if ( st_ivas->nCPE > 1 ) else if ( n < n_old ) { /* save old mem_hp_20 pointer */ old_mem_hp20_in = st_ivas->mem_hp20_in; st_ivas->mem_hp20_in = NULL; if ( ( st_ivas->mem_hp20_in = (float **) malloc( n * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); } Loading Loading @@ -289,8 +267,10 @@ ivas_error ivas_sba_enc_reconfigure( { return error; } /*Initialization*/ hSpar->hMdEnc->table_idx = -1; /* FB mixer handle */ ivas_FB_mixer_close( &hSpar->hFbMixer, hEncoderConfig->input_Fs ); Loading Loading @@ -377,6 +357,7 @@ ivas_error ivas_sba_enc_reconfigure( mvs2s( hDirAC->dirac_to_spar_md_bands, hSpar->dirac_to_spar_md_bands, DIRAC_MAX_NBANDS ); hSpar->enc_param_start_band = hDirAC->hConfig->enc_param_start_band; } /*-----------------------------------------------------------------* * Allocate, initalize, and configure SCE/CPE/MCT handles *-----------------------------------------------------------------*/ Loading Loading
lib_enc/ivas_ism_dtx_enc.c +7 −1 Original line number Diff line number Diff line Loading @@ -170,7 +170,13 @@ int16_t ivas_ism_dtx_enc( if ( ( st_ivas->hSCE[0]->hCoreCoder[0]->core_brate == -1 ) && ( st_ivas->hSCE[0]->hCoreCoder[0]->last_core_brate == SID_2k40 || st_ivas->hSCE[0]->hCoreCoder[0]->last_core_brate == FRAME_NO_DATA ) ) { st_ivas->hSCE[0]->hCoreCoder[0]->core_brate = st_ivas->hSCE[0]->hCoreCoder[0]->last_core_brate; reset_indices_enc( st_ivas->hSCE[0]->hCoreCoder[0]->hBstr, MAX_NUM_INDICES ); reset_indices_enc( st_ivas->hSCE[0]->hCoreCoder[0]->hBstr, #ifdef IND_LIST_DYN st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->max_num_indices #else MAX_NUM_INDICES #endif ); } st_ivas->hSCE[1]->hCoreCoder[0]->core_brate = st_ivas->hSCE[0]->hCoreCoder[0]->core_brate; Loading
lib_enc/ivas_sba_enc.c +16 −35 Original line number Diff line number Diff line Loading @@ -111,11 +111,7 @@ ivas_error ivas_sba_enc_reconfigure( ivas_error error; ENCODER_CONFIG_HANDLE hEncoderConfig; #ifndef IND_LIST_DYN Indice *ind_list; #endif BSTR_ENC_HANDLE hBstr; BSTR_ENC_HANDLE hMetaData; error = IVAS_ERR_OK; hEncoderConfig = st_ivas->hEncoderConfig; ivas_total_brate = hEncoderConfig->ivas_total_brate; Loading Loading @@ -143,11 +139,8 @@ ivas_error ivas_sba_enc_reconfigure( int16_t n, i, n_old; float **old_mem_hp20_in; /* save bitstream information */ #ifndef IND_LIST_DYN ind_list = hBstr->ind_list; #endif ind_list_metadata = hMetaData->ind_list; n_old = ivas_sba_get_nchan_metadata( analysis_order_old ); n = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order ); if ( n > n_old ) { Loading @@ -173,34 +166,19 @@ ivas_error ivas_sba_enc_reconfigure( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); } #ifndef IND_LIST_DYN /* prepare bitstream buffers */ #endif for ( n = 0; n < CPE_CHANNELS; n++ ) { #ifndef IND_LIST_DYN st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->ind_list = ind_list + ( cpe_id * CPE_CHANNELS + n ) * MAX_NUM_INDICES; reset_indices_enc( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr, MAX_NUM_INDICES ); #endif if ( hEncoderConfig->Opt_DTX_ON ) { st_ivas->hCPE[cpe_id]->hCoreCoder[n]->cng_sba_flag = 1; } set_f( st_ivas->mem_hp20_in[i], 0.0f, L_HP20_MEM ); } #ifndef IND_LIST_DYN /* Metadata only initialized for the last CPE index */ if ( cpe_id == st_ivas->nCPE - 1 ) { st_ivas->hCPE[cpe_id]->hMetaData->ind_list = ind_list_metadata + sce_id * MAX_BITS_METADATA; reset_indices_enc( st_ivas->hCPE[cpe_id]->hMetaData, MAX_BITS_METADATA ); } #endif free( old_mem_hp20_in ); old_mem_hp20_in = NULL; } if ( st_ivas->nCPE > 1 ) else if ( n < n_old ) { /* save old mem_hp_20 pointer */ old_mem_hp20_in = st_ivas->mem_hp20_in; st_ivas->mem_hp20_in = NULL; if ( ( st_ivas->mem_hp20_in = (float **) malloc( n * sizeof( float * ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); } Loading Loading @@ -289,8 +267,10 @@ ivas_error ivas_sba_enc_reconfigure( { return error; } /*Initialization*/ hSpar->hMdEnc->table_idx = -1; /* FB mixer handle */ ivas_FB_mixer_close( &hSpar->hFbMixer, hEncoderConfig->input_Fs ); Loading Loading @@ -377,6 +357,7 @@ ivas_error ivas_sba_enc_reconfigure( mvs2s( hDirAC->dirac_to_spar_md_bands, hSpar->dirac_to_spar_md_bands, DIRAC_MAX_NBANDS ); hSpar->enc_param_start_band = hDirAC->hConfig->enc_param_start_band; } /*-----------------------------------------------------------------* * Allocate, initalize, and configure SCE/CPE/MCT handles *-----------------------------------------------------------------*/ Loading