Loading lib_com/ivas_prot.h +6 −0 Original line number Diff line number Diff line Loading @@ -3234,6 +3234,12 @@ void ivas_sba_config( int16_t *element_mode /* o : element mode of the core coder */ ); #ifdef FIX_386_CORECODER_RECONFIG void ivas_sba_set_cna_cng_flag( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); #endif ivas_error ivas_sba_dec_reconfigure( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); Loading lib_com/options.h +2 −1 Original line number Diff line number Diff line Loading @@ -148,8 +148,9 @@ #define FIX_MDCT_BASED_BWD /* FhG: fixes for BWD for issues with reaction to transients for MDCT-stereo and MCT */ #define DISCRETE_ISM_DTX_CNG /* FhG/VA: contribution 15 - DTX/CNG for (discrete) ISM */ #define NCHAN_ISM_PARAMETER /* VA: make 'nchan_ism' parameter part of st_ivas/hEncoderConfig */ #define FIX_382_MASA_META_FRAMING_ASYNC /* Nokia: Issue 382: detect potential MASA metadata framing offset */ #define FIX_386_CORECODER_RECONFIG /* VA: Issue 386: Resolve ToDo comments in CoreCoder reconfig. */ #define SBA2MONO /* FhG: Issue 365: Adapt processing of SBA mono output to be in line with stereo output (less delay, lower complexity) */ #define FIX_379_EXT_METADATA /* Eri: Extended metadata issues */ Loading lib_dec/ivas_corecoder_dec_reconfig.c +7 −0 Original line number Diff line number Diff line Loading @@ -345,6 +345,12 @@ ivas_error ivas_corecoder_dec_reconfig( * Set CNA/CNG flags *-----------------------------------------------------------------*/ #ifdef FIX_386_CORECODER_RECONFIG if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT ) { ivas_sba_set_cna_cng_flag( st_ivas ); } #else /// VE: this could be merged with part of ivas_init_decoder() if ( st_ivas->ivas_format == SBA_FORMAT ) { Loading Loading @@ -377,6 +383,7 @@ ivas_error ivas_corecoder_dec_reconfig( } } } #endif /* special case, if the decoder goes from 1TC DTX to 2TC active frame (in case the bitstream started with an SBA SID frame), allocate DTX memories */ if ( hDecoderConfig->last_ivas_total_brate <= IVAS_SID_5k2 && st_ivas->nCPE >= 1 ) Loading lib_dec/ivas_init_dec.c +4 −0 Original line number Diff line number Diff line Loading @@ -1065,6 +1065,9 @@ ivas_error ivas_init_decoder( } /* set CNA/CNG flags */ #ifdef FIX_386_CORECODER_RECONFIG ivas_sba_set_cna_cng_flag( st_ivas ); #else if ( st_ivas->sba_mode == SBA_MODE_SPAR && st_ivas->nchan_transport == 1 ) { st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag = 0; /* Todo: Check if these can be enabled */ Loading @@ -1083,6 +1086,7 @@ ivas_error ivas_init_decoder( st_ivas->hCPE[0]->hCoreCoder[n]->cng_sba_flag = 1; } } #endif } else if ( st_ivas->ivas_format == MC_FORMAT ) { Loading lib_dec/ivas_sba_dec.c +50 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,56 @@ #endif #include "wmc_auto.h" #ifdef FIX_386_CORECODER_RECONFIG /*-------------------------------------------------------------------* * ivas_sba_set_cna_cng_flag() * * Set CNA/CNG flags in IVAS SBA decoder *-------------------------------------------------------------------*/ void ivas_sba_set_cna_cng_flag( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ) { int16_t n, cpe_id; if ( st_ivas->sba_mode == SBA_MODE_SPAR && st_ivas->nchan_transport == 1 ) { /* skip as done in init function */ /* st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag = 0; */ /* Todo: Check if these can be enabled */ /* st_ivas->hSCE[0]->hCoreCoder[0]->cng_sba_flag = 0; */ } else if ( st_ivas->nchan_transport == 1 && ( ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) || ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) ) ) { st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag = 1; st_ivas->hSCE[0]->hCoreCoder[0]->cng_sba_flag = 1; } else if ( st_ivas->nchan_transport == 2 ) { for ( n = 0; n < CPE_CHANNELS; n++ ) { st_ivas->hCPE[0]->hCoreCoder[n]->cna_dirac_flag = 0; /* Todo: Check if these can be enabled */ st_ivas->hCPE[0]->hCoreCoder[n]->cng_sba_flag = 1; } } else { for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) { for ( n = 0; n < CPE_CHANNELS; n++ ) { st_ivas->hCPE[cpe_id]->hCoreCoder[n]->cna_dirac_flag = 0; st_ivas->hCPE[cpe_id]->hCoreCoder[n]->cng_sba_flag = 0; } } } return; } #endif /*-------------------------------------------------------------------* * ivas_sba_dec_reconfigure() * Loading Loading
lib_com/ivas_prot.h +6 −0 Original line number Diff line number Diff line Loading @@ -3234,6 +3234,12 @@ void ivas_sba_config( int16_t *element_mode /* o : element mode of the core coder */ ); #ifdef FIX_386_CORECODER_RECONFIG void ivas_sba_set_cna_cng_flag( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); #endif ivas_error ivas_sba_dec_reconfigure( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); Loading
lib_com/options.h +2 −1 Original line number Diff line number Diff line Loading @@ -148,8 +148,9 @@ #define FIX_MDCT_BASED_BWD /* FhG: fixes for BWD for issues with reaction to transients for MDCT-stereo and MCT */ #define DISCRETE_ISM_DTX_CNG /* FhG/VA: contribution 15 - DTX/CNG for (discrete) ISM */ #define NCHAN_ISM_PARAMETER /* VA: make 'nchan_ism' parameter part of st_ivas/hEncoderConfig */ #define FIX_382_MASA_META_FRAMING_ASYNC /* Nokia: Issue 382: detect potential MASA metadata framing offset */ #define FIX_386_CORECODER_RECONFIG /* VA: Issue 386: Resolve ToDo comments in CoreCoder reconfig. */ #define SBA2MONO /* FhG: Issue 365: Adapt processing of SBA mono output to be in line with stereo output (less delay, lower complexity) */ #define FIX_379_EXT_METADATA /* Eri: Extended metadata issues */ Loading
lib_dec/ivas_corecoder_dec_reconfig.c +7 −0 Original line number Diff line number Diff line Loading @@ -345,6 +345,12 @@ ivas_error ivas_corecoder_dec_reconfig( * Set CNA/CNG flags *-----------------------------------------------------------------*/ #ifdef FIX_386_CORECODER_RECONFIG if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT ) { ivas_sba_set_cna_cng_flag( st_ivas ); } #else /// VE: this could be merged with part of ivas_init_decoder() if ( st_ivas->ivas_format == SBA_FORMAT ) { Loading Loading @@ -377,6 +383,7 @@ ivas_error ivas_corecoder_dec_reconfig( } } } #endif /* special case, if the decoder goes from 1TC DTX to 2TC active frame (in case the bitstream started with an SBA SID frame), allocate DTX memories */ if ( hDecoderConfig->last_ivas_total_brate <= IVAS_SID_5k2 && st_ivas->nCPE >= 1 ) Loading
lib_dec/ivas_init_dec.c +4 −0 Original line number Diff line number Diff line Loading @@ -1065,6 +1065,9 @@ ivas_error ivas_init_decoder( } /* set CNA/CNG flags */ #ifdef FIX_386_CORECODER_RECONFIG ivas_sba_set_cna_cng_flag( st_ivas ); #else if ( st_ivas->sba_mode == SBA_MODE_SPAR && st_ivas->nchan_transport == 1 ) { st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag = 0; /* Todo: Check if these can be enabled */ Loading @@ -1083,6 +1086,7 @@ ivas_error ivas_init_decoder( st_ivas->hCPE[0]->hCoreCoder[n]->cng_sba_flag = 1; } } #endif } else if ( st_ivas->ivas_format == MC_FORMAT ) { Loading
lib_dec/ivas_sba_dec.c +50 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,56 @@ #endif #include "wmc_auto.h" #ifdef FIX_386_CORECODER_RECONFIG /*-------------------------------------------------------------------* * ivas_sba_set_cna_cng_flag() * * Set CNA/CNG flags in IVAS SBA decoder *-------------------------------------------------------------------*/ void ivas_sba_set_cna_cng_flag( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ) { int16_t n, cpe_id; if ( st_ivas->sba_mode == SBA_MODE_SPAR && st_ivas->nchan_transport == 1 ) { /* skip as done in init function */ /* st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag = 0; */ /* Todo: Check if these can be enabled */ /* st_ivas->hSCE[0]->hCoreCoder[0]->cng_sba_flag = 0; */ } else if ( st_ivas->nchan_transport == 1 && ( ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) || ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) ) ) { st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag = 1; st_ivas->hSCE[0]->hCoreCoder[0]->cng_sba_flag = 1; } else if ( st_ivas->nchan_transport == 2 ) { for ( n = 0; n < CPE_CHANNELS; n++ ) { st_ivas->hCPE[0]->hCoreCoder[n]->cna_dirac_flag = 0; /* Todo: Check if these can be enabled */ st_ivas->hCPE[0]->hCoreCoder[n]->cng_sba_flag = 1; } } else { for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) { for ( n = 0; n < CPE_CHANNELS; n++ ) { st_ivas->hCPE[cpe_id]->hCoreCoder[n]->cna_dirac_flag = 0; st_ivas->hCPE[cpe_id]->hCoreCoder[n]->cng_sba_flag = 0; } } } return; } #endif /*-------------------------------------------------------------------* * ivas_sba_dec_reconfigure() * Loading