Commit 38dd188d authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_621_MSVQ_UBSAN_NULL_PTR_OFFSET

parent 4de2f725
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -2072,11 +2072,7 @@ void dec_FDCNG_MSVQ_stage1(

    for ( col = 0; col < cdk1_ivas_cols_per_segment[segm_ind]; col++ )
    {
#ifdef FIX_612_MSVQ_UBSAN_LEFTSHIFT
        dct_vec[col] = (float) shl( (Word16) cbpW8[col], dct_col_shift_tab[col] );
#else
        dct_vec[col] = (float) ( ( (Word16) cbpW8[col] ) << dct_col_shift_tab[col] );
#endif
        /*             LOGIC( 1 )        , SHIFT( 1 );
           in BASOP:   s_and(for W8->W16), shl()
         */
+0 −2
Original line number Diff line number Diff line
@@ -151,8 +151,6 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */


#define FIX_612_MSVQ_UBSAN_LEFTSHIFT                    /* Eri: Issue 612 :  UBSAN: left shift of negative values in 1st stage of MSVQ  */
#define FIX_621_MSVQ_UBSAN_NULL_PTR_OFFSET              /* Eri: Issue 621 :  UBSAN:  applying non-zero offset 7200 to null pointer in lsf_msvq_ma_enc.c  */
#define FIX_600_CLEANUP_OF_MANUAL_INSTRUMENTATION       /* Eri: Issue 600 :  removed manual WMCtool instrumentation outside of WMC_TOOL_SKIP defines     */
#define NONBE_FIX_539_MASA_384K_CHIRP                   /* Nokia: issue 539, puts the normalization of the energy ratios at the correct place, affect MASA 384k only */
#define FIX_635_UBSAN_UNDEFINED_BEHAVIOUR_QMETA         /* Nokia: issue 635 adding cast to uint16_t in q_metadata_enc */
+0 −8
Original line number Diff line number Diff line
@@ -148,11 +148,7 @@ int16_t msvq_stage1_dct_search(
            for ( c2 = 0; c2 < cols_per_segment[segm]; c2++ )
            {
#define WMC_TOOL_SKIP
#ifdef FIX_612_MSVQ_UBSAN_LEFTSHIFT
                tmp = dct_target[c2] - (float) shl( (Word16) cbpW8[c2], dct_col_shift_tab[c2] ); /*   note:  BASOP shift left defined for signed integers      */
#else
                tmp = dct_target[c2] - (float) ( ( (Word16) cbpW8[c2] ) << dct_col_shift_tab[c2] ); /* Word8 storage MSE inner loop */
#endif
                LOGIC( 1 );
                SHIFT( 1 );
                ADD( 1 ); /* in BASOP:    s_and(for W8->W16), shl(), sub()*/
@@ -559,15 +555,11 @@ void msvq_enc(
        {
            /* Subtract codebook entry from residual vector of parent node  */
            p1 = resid[0] + parents[c] * N;
#ifdef FIX_621_MSVQ_UBSAN_NULL_PTR_OFFSET
            p2 = NULL;
            if ( cb_stage != NULL )
            {
                p2 = cb_stage + ( indices[1][c * stages + s] ) * maxn; /* regular ptr init */
            }
#else
            p2 = cb_stage + ( indices[1][c * stages + s] ) * maxn;                                  /* regular ptr init */
#endif
            if ( s == 0 && applyDCT_flag != 0 )
            {
                p2 = (const float *) &( st1_syn_vec_ptr[c * FDCNG_VQ_MAX_LEN] ); /*ptr init of stage 1 */