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

Merge branch 'main' into...

Merge branch 'main' into float-1481-clang18-msan-use-of-uninitialized-value-in-lib_dec-ivas_core_dec-c-333-24
parents b27e33f7 6cf96f5b
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -163,6 +163,12 @@
#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_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" ) );
                }
+3 −0
Original line number Diff line number Diff line
@@ -371,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 )
+7 −0
Original line number Diff line number Diff line
@@ -963,6 +963,9 @@ void RCcontextMapping_encode2_no_mem_s17_LCS(
            }

            /*Shift old 4 bits, replace last 4 bits*/
#ifdef FIX_1464_UBSAN_RC_CONTEXT_MAP
            s = s & 0x0F;
#endif
            s = ( s << 4 ) + cp;
            t = s & 0xFF;

@@ -1336,7 +1339,11 @@ int16_t RCcontextMapping_encode2_estimate_no_mem_s17_LCS(
            {
                cp = 12 + esc_nb;
            }

            /*shift old bits and replace last 4 bits*/
#ifdef FIX_1464_UBSAN_RC_CONTEXT_MAP
            s = s & 0x0F;
#endif
            s = ( s << 4 ) + cp;
            t = s & 0xFF;

Loading