Loading lib_com/options.h +8 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,14 @@ #define FIX_2248_EVS_ASSERT /* VA: Include _sat in an EVS related part of the code */ #define FIX_2254_IMPROV_COMPLEXITY_BE /* VA: BE small complexity reduction */ #define FIX_2286_GCC_WARNING_Idx2Freq_Tbl /* FhG: Fix compiler warning for OOB access of Idx2Freq_Tbl[] */ #define FIX_CLANG18_MSAN_IN_DEC_INIT_BY_MOVING_COMMON_INITS_TOGETHER /* FhG: fix CLANG18 MSAN error in decoder init */ #define FIX_1481_CLANG18_MSAN_INIT_LAST_ELEM_BRATE /* FhG: initialize last_element_brate to avoid CLANG18 MSAN complaint */ #define FIX_1484_CLANG18_MSAN_INIT_ST_ELEM_BRATE /* FhG: initialize st->element_brate per default */ #define FIX_1464_UBSAN_RC_CONTEXT_MAP /* FhG: BE UBSAN fix for float issue 1464 in the TCX range coder */ #define FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH /* FhG: fix OOB index USAN error in TCX LTP pitch search */ #define FIX_2274_OOB_INDEXING_IN_CORRMATRIX /* FhG: fix OOB indexing complaint */ #define FIX_2278_OOB_INDEXING_IN_CLOSED_LOOP_PIT_SEARCH /* FhG: fix oob indexing USAN complaint */ #define FIX_2287_MCT_MDCT_STEREO_DATA_MALLOC_SIZE /* FhG: correct allocation size for STEREO_MDCT_DEC_DATA struct */ /* #################### End BE switches ################################## */ Loading lib_dec/ACcontextMapping_dec_fx.c +7 −0 Original line number Diff line number Diff line Loading @@ -614,6 +614,7 @@ Word16 RCcontextMapping_decode2_no_mem_s17_LCS_fx( move16(); s = 0; move16(); /* Main Loop through the 2-tuples */ FOR( k = 0; k < lastnz; k += 2 ) { Loading Loading @@ -701,9 +702,15 @@ Word16 RCcontextMapping_decode2_no_mem_s17_LCS_fx( c = add( 12, esc_nb ); } #ifdef FIX_1464_UBSAN_RC_CONTEXT_MAP s = shl( s_and( s, 0x0F ), 4 ); /*Shift old 4 bits*/ s = add( s, c ); /*replace last 4 bits*/ t = s_and( s, 0xFF ); #else s = (UWord16) L_shl( s, 4 ); /*Shift old 4 bits*/ s = (UWord16) L_add( s, c ); /*replace last 4 bits*/ t = (UWord16) L_and( s, 0xFF ); #endif } /* Decode signs */ Loading lib_dec/ivas_mct_dec_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -699,7 +699,11 @@ ivas_error mct_dec_reconfigure_fx( move16(); /* MDCT stereo initialization */ #ifdef FIX_2287_MCT_MDCT_STEREO_DATA_MALLOC_SIZE IF( ( hMCT->hBlockData[n]->hStereoMdct = (STEREO_MDCT_DEC_DATA_HANDLE) malloc( sizeof( STEREO_MDCT_DEC_DATA ) ) ) == NULL ) #else IF( ( hMCT->hBlockData[n]->hStereoMdct = (STEREO_MDCT_DEC_DATA_HANDLE) malloc( sizeof( STEREO_MDCT_ENC_DATA ) ) ) == NULL ) #endif { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MDCT Stereo \n" ) ); } Loading lib_dec/ivas_sce_dec_fx.c +8 −0 Original line number Diff line number Diff line Loading @@ -385,6 +385,10 @@ ivas_error create_sce_dec( move16(); hSCE->element_brate = element_brate; /*Q0*/ move32(); #ifdef FIX_1481_CLANG18_MSAN_INIT_LAST_ELEM_BRATE hSCE->last_element_brate = hSCE->element_brate; move32(); #endif set32_fx( hSCE->prev_hb_synth_fx, 0, NS2SA_FX2( st_ivas->hDecoderConfig->output_Fs, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS ) ); Loading @@ -402,6 +406,10 @@ ivas_error create_sce_dec( st->total_brate = hSCE->element_brate; /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */ move32(); #ifdef FIX_1484_CLANG18_MSAN_INIT_ST_ELEM_BRATE st->element_brate = -1; move32(); #endif st->mct_chan_mode = MCT_CHAN_MODE_REGULAR; move16(); st->is_ism_format = 0; Loading lib_dec/lib_dec_fx.c +23 −15 Original line number Diff line number Diff line Loading @@ -232,19 +232,30 @@ ivas_error IVAS_DEC_Open( move16(); /* set high-level parameters */ IF( EQ_16( mode, IVAS_DEC_MODE_EVS ) ) { #ifdef FIX_CLANG18_MSAN_IN_DEC_INIT_BY_MOVING_COMMON_INITS_TOGETHER st_ivas->codec_mode = 0; /* unknown before first frame */ st_ivas->element_mode_init = EVS_MONO; st_ivas->ivas_format = MONO_FORMAT; st_ivas->transport_config = IVAS_AUDIO_CONFIG_INVALID; st_ivas->intern_config = IVAS_AUDIO_CONFIG_INVALID; st_ivas->writeFECoffset = 0; hIvasDec->hasDecodedFirstGoodFrame = true; /* Functionality to suppress output for initial lost frames is disabled in EVS operation */ st_ivas->sba_analysis_order = 0; /* not really used in EVS mode, but initialize here to fix MSAN complaint */ move16(); move16(); move16(); move16(); move16(); #endif IF( EQ_16( mode, IVAS_DEC_MODE_EVS ) ) { #ifndef FIX_CLANG18_MSAN_IN_DEC_INIT_BY_MOVING_COMMON_INITS_TOGETHER st_ivas->codec_mode = 0; /* unknown before first frame */ st_ivas->transport_config = IVAS_AUDIO_CONFIG_INVALID; st_ivas->intern_config = IVAS_AUDIO_CONFIG_INVALID; st_ivas->writeFECoffset = 0; #endif st_ivas->element_mode_init = EVS_MONO; st_ivas->ivas_format = MONO_FORMAT; hIvasDec->hasDecodedFirstGoodFrame = true; /* Functionality to suppress output for initial lost frames is disabled in EVS operation */ move16(); move16(); move16(); Loading @@ -253,22 +264,24 @@ ivas_error IVAS_DEC_Open( } ELSE IF( EQ_16( mode, IVAS_DEC_MODE_IVAS ) ) { #ifndef FIX_CLANG18_MSAN_IN_DEC_INIT_BY_MOVING_COMMON_INITS_TOGETHER st_ivas->codec_mode = 0; /* unknown before first frame */ st_ivas->element_mode_init = -1; st_ivas->ivas_format = UNDEFINED_FORMAT; st_ivas->transport_config = IVAS_AUDIO_CONFIG_INVALID; st_ivas->intern_config = IVAS_AUDIO_CONFIG_INVALID; st_ivas->writeFECoffset = 0; st_ivas->sba_analysis_order = 0; #endif st_ivas->element_mode_init = -1; st_ivas->ivas_format = UNDEFINED_FORMAT; st_ivas->renderer_type = RENDERER_DISABLE; st_ivas->ini_frame = 0; st_ivas->ini_active_frame = 0; st_ivas->writeFECoffset = 0; st_ivas->ism_mode = ISM_MODE_NONE; st_ivas->mc_mode = MC_MODE_NONE; st_ivas->sba_order = 0; st_ivas->sba_planar = 0; st_ivas->sba_analysis_order = 0; move16(); move16(); Loading @@ -279,11 +292,6 @@ ivas_error IVAS_DEC_Open( move16(); move16(); move16(); move16(); move16(); move16(); move16(); move16(); return IVAS_ERR_OK; } Loading Loading
lib_com/options.h +8 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,14 @@ #define FIX_2248_EVS_ASSERT /* VA: Include _sat in an EVS related part of the code */ #define FIX_2254_IMPROV_COMPLEXITY_BE /* VA: BE small complexity reduction */ #define FIX_2286_GCC_WARNING_Idx2Freq_Tbl /* FhG: Fix compiler warning for OOB access of Idx2Freq_Tbl[] */ #define FIX_CLANG18_MSAN_IN_DEC_INIT_BY_MOVING_COMMON_INITS_TOGETHER /* FhG: fix CLANG18 MSAN error in decoder init */ #define FIX_1481_CLANG18_MSAN_INIT_LAST_ELEM_BRATE /* FhG: initialize last_element_brate to avoid CLANG18 MSAN complaint */ #define FIX_1484_CLANG18_MSAN_INIT_ST_ELEM_BRATE /* FhG: initialize st->element_brate per default */ #define FIX_1464_UBSAN_RC_CONTEXT_MAP /* FhG: BE UBSAN fix for float issue 1464 in the TCX range coder */ #define FIX_2272_OOB_INDEXING_IN_LTP_PIT_SEARCH /* FhG: fix OOB index USAN error in TCX LTP pitch search */ #define FIX_2274_OOB_INDEXING_IN_CORRMATRIX /* FhG: fix OOB indexing complaint */ #define FIX_2278_OOB_INDEXING_IN_CLOSED_LOOP_PIT_SEARCH /* FhG: fix oob indexing USAN complaint */ #define FIX_2287_MCT_MDCT_STEREO_DATA_MALLOC_SIZE /* FhG: correct allocation size for STEREO_MDCT_DEC_DATA struct */ /* #################### End BE switches ################################## */ Loading
lib_dec/ACcontextMapping_dec_fx.c +7 −0 Original line number Diff line number Diff line Loading @@ -614,6 +614,7 @@ Word16 RCcontextMapping_decode2_no_mem_s17_LCS_fx( move16(); s = 0; move16(); /* Main Loop through the 2-tuples */ FOR( k = 0; k < lastnz; k += 2 ) { Loading Loading @@ -701,9 +702,15 @@ Word16 RCcontextMapping_decode2_no_mem_s17_LCS_fx( c = add( 12, esc_nb ); } #ifdef FIX_1464_UBSAN_RC_CONTEXT_MAP s = shl( s_and( s, 0x0F ), 4 ); /*Shift old 4 bits*/ s = add( s, c ); /*replace last 4 bits*/ t = s_and( s, 0xFF ); #else s = (UWord16) L_shl( s, 4 ); /*Shift old 4 bits*/ s = (UWord16) L_add( s, c ); /*replace last 4 bits*/ t = (UWord16) L_and( s, 0xFF ); #endif } /* Decode signs */ Loading
lib_dec/ivas_mct_dec_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -699,7 +699,11 @@ ivas_error mct_dec_reconfigure_fx( move16(); /* MDCT stereo initialization */ #ifdef FIX_2287_MCT_MDCT_STEREO_DATA_MALLOC_SIZE IF( ( hMCT->hBlockData[n]->hStereoMdct = (STEREO_MDCT_DEC_DATA_HANDLE) malloc( sizeof( STEREO_MDCT_DEC_DATA ) ) ) == NULL ) #else IF( ( hMCT->hBlockData[n]->hStereoMdct = (STEREO_MDCT_DEC_DATA_HANDLE) malloc( sizeof( STEREO_MDCT_ENC_DATA ) ) ) == NULL ) #endif { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MDCT Stereo \n" ) ); } Loading
lib_dec/ivas_sce_dec_fx.c +8 −0 Original line number Diff line number Diff line Loading @@ -385,6 +385,10 @@ ivas_error create_sce_dec( move16(); hSCE->element_brate = element_brate; /*Q0*/ move32(); #ifdef FIX_1481_CLANG18_MSAN_INIT_LAST_ELEM_BRATE hSCE->last_element_brate = hSCE->element_brate; move32(); #endif set32_fx( hSCE->prev_hb_synth_fx, 0, NS2SA_FX2( st_ivas->hDecoderConfig->output_Fs, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS ) ); Loading @@ -402,6 +406,10 @@ ivas_error create_sce_dec( st->total_brate = hSCE->element_brate; /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */ move32(); #ifdef FIX_1484_CLANG18_MSAN_INIT_ST_ELEM_BRATE st->element_brate = -1; move32(); #endif st->mct_chan_mode = MCT_CHAN_MODE_REGULAR; move16(); st->is_ism_format = 0; Loading
lib_dec/lib_dec_fx.c +23 −15 Original line number Diff line number Diff line Loading @@ -232,19 +232,30 @@ ivas_error IVAS_DEC_Open( move16(); /* set high-level parameters */ IF( EQ_16( mode, IVAS_DEC_MODE_EVS ) ) { #ifdef FIX_CLANG18_MSAN_IN_DEC_INIT_BY_MOVING_COMMON_INITS_TOGETHER st_ivas->codec_mode = 0; /* unknown before first frame */ st_ivas->element_mode_init = EVS_MONO; st_ivas->ivas_format = MONO_FORMAT; st_ivas->transport_config = IVAS_AUDIO_CONFIG_INVALID; st_ivas->intern_config = IVAS_AUDIO_CONFIG_INVALID; st_ivas->writeFECoffset = 0; hIvasDec->hasDecodedFirstGoodFrame = true; /* Functionality to suppress output for initial lost frames is disabled in EVS operation */ st_ivas->sba_analysis_order = 0; /* not really used in EVS mode, but initialize here to fix MSAN complaint */ move16(); move16(); move16(); move16(); move16(); #endif IF( EQ_16( mode, IVAS_DEC_MODE_EVS ) ) { #ifndef FIX_CLANG18_MSAN_IN_DEC_INIT_BY_MOVING_COMMON_INITS_TOGETHER st_ivas->codec_mode = 0; /* unknown before first frame */ st_ivas->transport_config = IVAS_AUDIO_CONFIG_INVALID; st_ivas->intern_config = IVAS_AUDIO_CONFIG_INVALID; st_ivas->writeFECoffset = 0; #endif st_ivas->element_mode_init = EVS_MONO; st_ivas->ivas_format = MONO_FORMAT; hIvasDec->hasDecodedFirstGoodFrame = true; /* Functionality to suppress output for initial lost frames is disabled in EVS operation */ move16(); move16(); move16(); Loading @@ -253,22 +264,24 @@ ivas_error IVAS_DEC_Open( } ELSE IF( EQ_16( mode, IVAS_DEC_MODE_IVAS ) ) { #ifndef FIX_CLANG18_MSAN_IN_DEC_INIT_BY_MOVING_COMMON_INITS_TOGETHER st_ivas->codec_mode = 0; /* unknown before first frame */ st_ivas->element_mode_init = -1; st_ivas->ivas_format = UNDEFINED_FORMAT; st_ivas->transport_config = IVAS_AUDIO_CONFIG_INVALID; st_ivas->intern_config = IVAS_AUDIO_CONFIG_INVALID; st_ivas->writeFECoffset = 0; st_ivas->sba_analysis_order = 0; #endif st_ivas->element_mode_init = -1; st_ivas->ivas_format = UNDEFINED_FORMAT; st_ivas->renderer_type = RENDERER_DISABLE; st_ivas->ini_frame = 0; st_ivas->ini_active_frame = 0; st_ivas->writeFECoffset = 0; st_ivas->ism_mode = ISM_MODE_NONE; st_ivas->mc_mode = MC_MODE_NONE; st_ivas->sba_order = 0; st_ivas->sba_planar = 0; st_ivas->sba_analysis_order = 0; move16(); move16(); Loading @@ -279,11 +292,6 @@ ivas_error IVAS_DEC_Open( move16(); move16(); move16(); move16(); move16(); move16(); move16(); move16(); return IVAS_ERR_OK; } Loading