Commit 5bf157cf authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_1464_UBSAN_RC_CONTEXT_MAP

parent c9ae5208
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -85,7 +85,6 @@
#define FIX_1999_TEMPORARY_DISABLE_DIST_ATT_CHECK       /* Eri: Issue 1999: Range check on float values of distance attenuation, while the float values are not propagated to this function. The test is not correct, but configurable distance attenuation is not used in Characterization.*/
#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_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 */
+0 −6
Original line number Diff line number Diff line
@@ -702,15 +702,9 @@ 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 */
+0 −10
Original line number Diff line number Diff line
@@ -1099,13 +1099,8 @@ void RCcontextMapping_encode2_no_mem_s17_LCS_fx(
            }

            /*Shift old 4 bits, replace last 4 bits*/
#ifdef FIX_1464_UBSAN_RC_CONTEXT_MAP
            s = add( shl( s_and( s, 0x0F ), 4 ), cp );
            t = s_and( s, 0xFF );
#else
            s = (UWord16) ( L_add( L_shl( s, 4 ), cp ) );
            t = (UWord16) L_and( s, 0xFF );
#endif

        } /*end of the 2-tuples loop*/
    }
@@ -1569,13 +1564,8 @@ Word16 RCcontextMapping_encode2_estimate_no_mem_s17_LCS_fx(
                cp = add( 12, esc_nb ); /* Q0 */
            }
            /*shift old bits and replace last 4 bits*/
#ifdef FIX_1464_UBSAN_RC_CONTEXT_MAP
            s = add( shl( s_and( s, 0x0F ), 4 ), cp );
            t = s_and( s, 0xFF );
#else
            s = (UWord16) L_add( L_shl( s, 4 ), cp );
            t = s_and( s, 0xFF );
#endif
        } /*end of the 2-tuples loop*/

        tot_bits2 = round_fx( W_shl_sat_l( nbits2_fx, -Q7 ) );                   /* Q23 -> Q16 -> Q0 */