Commit a5341040 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into kiene/test-ubuntu-24_04-runner

parents ef6cb79e e3006d54
Loading
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -162,6 +162,14 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#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 ################################## */

+3 −0
Original line number Diff line number Diff line
@@ -662,6 +662,9 @@ int16_t RCcontextMapping_decode2_no_mem_s17_LCS(
                c = 12 + esc_nb;
            }

#ifdef FIX_1464_UBSAN_RC_CONTEXT_MAP
            s = s & 0x0F;
#endif
            s = s << 4; /*Shift old 4 bits*/
            s = s + c;  /*replace last 4 bits*/
            t = s & 0xFF;
+4 −0
Original line number Diff line number Diff line
@@ -564,7 +564,11 @@ ivas_error mct_dec_reconfigure(
                hMCT->hBlockData[n]->ch2 = 0;

                /* 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" ) );
                }
+6 −0
Original line number Diff line number Diff line
@@ -353,6 +353,9 @@ ivas_error create_sce_dec(

    hSCE->sce_id = sce_id;
    hSCE->element_brate = element_brate;
#ifdef FIX_1481_CLANG18_MSAN_INIT_LAST_ELEM_BRATE
    hSCE->last_element_brate = hSCE->element_brate;
#endif

    set_f( hSCE->prev_hb_synth, 0.0f, NS2SA( st_ivas->hDecoderConfig->output_Fs, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS ) );

@@ -368,6 +371,9 @@ ivas_error create_sce_dec(
    copy_decoder_config( st_ivas, st );

    st->total_brate = hSCE->element_brate; /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */
#ifdef FIX_1484_CLANG18_MSAN_INIT_ST_ELEM_BRATE
    st->element_brate = -1;
#endif
    st->mct_chan_mode = MCT_CHAN_MODE_REGULAR;
    st->is_ism_format = 0;
    if ( st_ivas->ivas_format == ISM_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT )
+18 −6
Original line number Diff line number Diff line
@@ -219,36 +219,48 @@ ivas_error IVAS_DEC_Open(
    st_ivas->restartNeeded = 0;

    /* set high-level parameters */
#ifdef 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;
    st_ivas->sba_analysis_order = 0; /* not really used in EVS mode, but initialize here to fix MSAN complaint */
#endif

    if ( 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->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;
#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 */

        return IVAS_ERR_OK;
    }
    else if ( 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;
#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;

        return IVAS_ERR_OK;
    }
Loading