Loading Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ VPATH = $(SRC_DIRS) # Split rendering files SRCS_SPLIT_REND = ivas_CQMFDecoder.c ivas_CQMFEncoder.c ivas_PerceptualModel.c ivas_PredDecoder.c \ ivas_PredEncoder.c ivas_RMSEnvGrouping.c ivas_MSPred.c ivas_NoiseGen.c \ ivas_cldfb_codec_bitstream.c ivas_splitRend_lcld_dec.c ivas_splitRend_lcld_enc.c \ ivas_splitRend_lcld_dec.c ivas_splitRend_lcld_enc.c \ ivas_splitRendererPLC.c ivas_splitRendererPost.c ivas_splitRendererPre.c \ ivas_splitRenderer_utils.c split_rend_bfi_file_reader.c split_render_file_read_write.c \ ivas_lcld_tables.c Loading lib_com/options.h +4 −0 Original line number Diff line number Diff line Loading @@ -143,6 +143,7 @@ /* keep as part of options.h */ #define BASOP_NOGLOB /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */ /* ################## Start DEVELOPMENT switches ######################### */ /* ################### Start BE switches ################################# */ /* only BE switches wrt selection floating point code */ Loading Loading @@ -173,7 +174,10 @@ #define NONBE_FIX_904_JBM_SBA_RS_FOA /* FhG: issue #904: fix JBM SBA RS to FOA decoding */ #define NONBE_FIX_898_ISM_BRATE_CRASH /* VA: issue 898: fix decoder crash in ISM bitrate switching with DTX and binaural output */ #define NONBE_FIX_862_UBSAN_SPAR_DEC_BR_SW_PLC /* DLB: issue 862 : UBSAN: out-of-bound error in SPAR for OSBA bitrate switching with PLC*/ #define NONBE_FIX_DISCRETE_ISM_NOISE_SEED_HANDLING /* FhG: fix handling of common and differing noise seeds in SCEs for ISM DTX */ #define NONBE_FIX_913_OMASA_BITBUDGET_VIOLATION /* VA/Nok: issue 913: Resolve "Crash in OMASA encoder - DFT-Stereo bit-budget violated" */ #define NONBE_FIX_855_JBM_FLUSH_OFFSET /* FhG: issue #855: add missing switch here for the code in JBM flushing */ /* ##################### End NON-BE switches ########################### */ /* ################## End DEVELOPMENT switches ######################### */ Loading lib_dec/fd_cng_dec.c +12 −0 Original line number Diff line number Diff line Loading @@ -1104,10 +1104,17 @@ void generate_comfort_noise_dec( c2 = (float) sqrt( 1 - hFdCngCom->coherence ); seed2 = &( hFdCngCom->seed2 ); #ifdef NONBE_FIX_DISCRETE_ISM_NOISE_SEED_HANDLING if ( st->element_mode == IVAS_CPE_MDCT && st->idchan == 1 ) { seed2 = &( hFdCngCom->seed3 ); } #else if ( ( st->element_mode == IVAS_CPE_MDCT && st->idchan == 1 ) || ( st->element_mode == IVAS_SCE && st->cng_ism_flag ) ) { seed2 = &( hFdCngCom->seed3 ); } #endif /* Generate Gaussian random noise in real and imaginary parts of the FFT bins Amplitudes are adjusted to the estimated noise level cngNoiseLevel in each bin */ Loading Loading @@ -1354,11 +1361,16 @@ void generate_comfort_noise_dec_hf( float scale = CLDFB_SCALING / hFdCngCom->scalingFactor; int16_t *seed2 = &( hFdCngCom->seed ); float tmp1, tmp2, c1 = 0.f, c2 = 0.f; if ( cng_coh_flag ) { #ifdef NONBE_FIX_DISCRETE_ISM_NOISE_SEED_HANDLING seed2 = &( hFdCngCom->seed2 ); #else seed2 = &( hFdCngCom->seed3 ); #endif c1 = (float) sqrt( hFdCngCom->coherence ); c2 = (float) sqrt( 1 - hFdCngCom->coherence ); Loading lib_dec/ivas_cpe_dec.c +11 −0 Original line number Diff line number Diff line Loading @@ -260,6 +260,17 @@ ivas_error ivas_cpe_dec( } else { #ifdef NONBE_FIX_913_OMASA_BITBUDGET_VIOLATION if ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) { nb_bits -= nb_bits_metadata; if ( hCPE->brate_surplus < 0 ) { nb_bits += (int16_t) ( hCPE->brate_surplus / FRAMES_PER_SEC ); } } #endif stereo_dft_dec_read_BS( ivas_total_brate, hCPE->element_brate, &sts[0]->total_brate, sts[1], hCPE->hStereoDft, sts[0]->bwidth, output_frame, res_buf, &nb_bits, hCPE->hStereoCng->coh, st_ivas->ivas_format ); } Loading lib_dec/ivas_init_dec.c +14 −7 Original line number Diff line number Diff line Loading @@ -937,13 +937,6 @@ int16_t getNumChanSynthesis( if ( st_ivas->sba_dirac_stereo_flag ) { n = CPE_CHANNELS; #if 0 /* TODO wkr: this is actually a correct bugfix for OSBA, it is disabled for now to pass the pipelines in the OSBA JBM branch */ if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { n += st_ivas->nchan_ism; } #endif } else if ( ( st_ivas->hMCT != NULL || st_ivas->ivas_format == SBA_FORMAT ) && st_ivas->ivas_format != SBA_ISM_FORMAT ) { Loading Loading @@ -1368,10 +1361,24 @@ ivas_error ivas_init_decoder( st_ivas->hISMDTX.sce_id_dtx = 0; #ifdef NONBE_FIX_DISCRETE_ISM_NOISE_SEED_HANDLING if ( st_ivas->ism_mode == ISM_MODE_PARAM ) { st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed2 = st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed3; } else if ( st_ivas->ism_mode == ISM_MODE_DISC ) { for ( sce_id = 0; sce_id < st_ivas->nSCE; ++sce_id ) { st_ivas->hSCE[sce_id]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed2 = 2 + sce_id; } } #else if ( st_ivas->ism_mode == ISM_MODE_PARAM ) { st_ivas->hSCE[1]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed3 = st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed2; } #endif } else if ( st_ivas->ivas_format == SBA_FORMAT ) { Loading Loading
Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ VPATH = $(SRC_DIRS) # Split rendering files SRCS_SPLIT_REND = ivas_CQMFDecoder.c ivas_CQMFEncoder.c ivas_PerceptualModel.c ivas_PredDecoder.c \ ivas_PredEncoder.c ivas_RMSEnvGrouping.c ivas_MSPred.c ivas_NoiseGen.c \ ivas_cldfb_codec_bitstream.c ivas_splitRend_lcld_dec.c ivas_splitRend_lcld_enc.c \ ivas_splitRend_lcld_dec.c ivas_splitRend_lcld_enc.c \ ivas_splitRendererPLC.c ivas_splitRendererPost.c ivas_splitRendererPre.c \ ivas_splitRenderer_utils.c split_rend_bfi_file_reader.c split_render_file_read_write.c \ ivas_lcld_tables.c Loading
lib_com/options.h +4 −0 Original line number Diff line number Diff line Loading @@ -143,6 +143,7 @@ /* keep as part of options.h */ #define BASOP_NOGLOB /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */ /* ################## Start DEVELOPMENT switches ######################### */ /* ################### Start BE switches ################################# */ /* only BE switches wrt selection floating point code */ Loading Loading @@ -173,7 +174,10 @@ #define NONBE_FIX_904_JBM_SBA_RS_FOA /* FhG: issue #904: fix JBM SBA RS to FOA decoding */ #define NONBE_FIX_898_ISM_BRATE_CRASH /* VA: issue 898: fix decoder crash in ISM bitrate switching with DTX and binaural output */ #define NONBE_FIX_862_UBSAN_SPAR_DEC_BR_SW_PLC /* DLB: issue 862 : UBSAN: out-of-bound error in SPAR for OSBA bitrate switching with PLC*/ #define NONBE_FIX_DISCRETE_ISM_NOISE_SEED_HANDLING /* FhG: fix handling of common and differing noise seeds in SCEs for ISM DTX */ #define NONBE_FIX_913_OMASA_BITBUDGET_VIOLATION /* VA/Nok: issue 913: Resolve "Crash in OMASA encoder - DFT-Stereo bit-budget violated" */ #define NONBE_FIX_855_JBM_FLUSH_OFFSET /* FhG: issue #855: add missing switch here for the code in JBM flushing */ /* ##################### End NON-BE switches ########################### */ /* ################## End DEVELOPMENT switches ######################### */ Loading
lib_dec/fd_cng_dec.c +12 −0 Original line number Diff line number Diff line Loading @@ -1104,10 +1104,17 @@ void generate_comfort_noise_dec( c2 = (float) sqrt( 1 - hFdCngCom->coherence ); seed2 = &( hFdCngCom->seed2 ); #ifdef NONBE_FIX_DISCRETE_ISM_NOISE_SEED_HANDLING if ( st->element_mode == IVAS_CPE_MDCT && st->idchan == 1 ) { seed2 = &( hFdCngCom->seed3 ); } #else if ( ( st->element_mode == IVAS_CPE_MDCT && st->idchan == 1 ) || ( st->element_mode == IVAS_SCE && st->cng_ism_flag ) ) { seed2 = &( hFdCngCom->seed3 ); } #endif /* Generate Gaussian random noise in real and imaginary parts of the FFT bins Amplitudes are adjusted to the estimated noise level cngNoiseLevel in each bin */ Loading Loading @@ -1354,11 +1361,16 @@ void generate_comfort_noise_dec_hf( float scale = CLDFB_SCALING / hFdCngCom->scalingFactor; int16_t *seed2 = &( hFdCngCom->seed ); float tmp1, tmp2, c1 = 0.f, c2 = 0.f; if ( cng_coh_flag ) { #ifdef NONBE_FIX_DISCRETE_ISM_NOISE_SEED_HANDLING seed2 = &( hFdCngCom->seed2 ); #else seed2 = &( hFdCngCom->seed3 ); #endif c1 = (float) sqrt( hFdCngCom->coherence ); c2 = (float) sqrt( 1 - hFdCngCom->coherence ); Loading
lib_dec/ivas_cpe_dec.c +11 −0 Original line number Diff line number Diff line Loading @@ -260,6 +260,17 @@ ivas_error ivas_cpe_dec( } else { #ifdef NONBE_FIX_913_OMASA_BITBUDGET_VIOLATION if ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) { nb_bits -= nb_bits_metadata; if ( hCPE->brate_surplus < 0 ) { nb_bits += (int16_t) ( hCPE->brate_surplus / FRAMES_PER_SEC ); } } #endif stereo_dft_dec_read_BS( ivas_total_brate, hCPE->element_brate, &sts[0]->total_brate, sts[1], hCPE->hStereoDft, sts[0]->bwidth, output_frame, res_buf, &nb_bits, hCPE->hStereoCng->coh, st_ivas->ivas_format ); } Loading
lib_dec/ivas_init_dec.c +14 −7 Original line number Diff line number Diff line Loading @@ -937,13 +937,6 @@ int16_t getNumChanSynthesis( if ( st_ivas->sba_dirac_stereo_flag ) { n = CPE_CHANNELS; #if 0 /* TODO wkr: this is actually a correct bugfix for OSBA, it is disabled for now to pass the pipelines in the OSBA JBM branch */ if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { n += st_ivas->nchan_ism; } #endif } else if ( ( st_ivas->hMCT != NULL || st_ivas->ivas_format == SBA_FORMAT ) && st_ivas->ivas_format != SBA_ISM_FORMAT ) { Loading Loading @@ -1368,10 +1361,24 @@ ivas_error ivas_init_decoder( st_ivas->hISMDTX.sce_id_dtx = 0; #ifdef NONBE_FIX_DISCRETE_ISM_NOISE_SEED_HANDLING if ( st_ivas->ism_mode == ISM_MODE_PARAM ) { st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed2 = st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed3; } else if ( st_ivas->ism_mode == ISM_MODE_DISC ) { for ( sce_id = 0; sce_id < st_ivas->nSCE; ++sce_id ) { st_ivas->hSCE[sce_id]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed2 = 2 + sce_id; } } #else if ( st_ivas->ism_mode == ISM_MODE_PARAM ) { st_ivas->hSCE[1]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed3 = st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->seed2; } #endif } else if ( st_ivas->ivas_format == SBA_FORMAT ) { Loading