Commit bb89ee66 authored by multrus's avatar multrus
Browse files

revert previous patch; rather adjust assert to actually only test what is...

revert previous patch; rather adjust assert to actually only test what is really needed, i.e. the truncated integer value
parent 5706a1b5
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ CFLAGS += -std=c99 -pedantic -Wcast-qual -Wall -W -Wextra -Wno-long-long \
            -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes  \
            -Werror-implicit-function-declaration \
            -Wno-implicit-fallthrough -ffp-contract=off \
            -Winit-self -Wunused-but-set-variable -funsafe-math-optimizations
            -Winit-self -Wunused-but-set-variable
# to be uncommented in CI
# CFLAGS += -Werror

+0 −4
Original line number Diff line number Diff line
@@ -165,11 +165,7 @@ static void stereo_dft_quantize_itd(
    }

    /*Convert back @ fs*/
#ifdef FIX_FLOAT_1544_ITD_IMPRECISION_UNSAFE_MATH
    *out = (float) ( ( itd * input_Fs ) / ( (double) ( STEREO_DFT_ITD_FS ) ) ); /* use double arithmetic, to avoid imprecisions with optimizations using -funsafe-math-optimizations */
#else
    *out = (float) ( itd * input_Fs ) / ( (float) ( STEREO_DFT_ITD_FS ) );
#endif

    return;
}
+5 −1
Original line number Diff line number Diff line
@@ -291,9 +291,13 @@ void stereo_td_itd(
        size_ovl = dft_ovl;

        itd_max = ( STEREO_DFT_ITD_MAX * input_frame ) / L_FRAME32k;

#ifdef FIX_FLOAT_1544_ITD_IMPRECISION_UNSAFE_MATH
        assert( ( (int16_t) fabsf( hITD->itd[k_offset] ) <= itd_max ) && "ITD value is too high!" );
        assert( ( (int16_t) fabsf( hITD->itd[k_offset - 1] ) <= itd_max ) && "ITD value is too high!" );
#else
        assert( ( fabsf( hITD->itd[k_offset] ) <= itd_max ) && "ITD value is too high!" );
        assert( ( fabsf( hITD->itd[k_offset - 1] ) <= itd_max ) && "ITD value is too high!" );
#endif

        itd = hITD->td_itd[k_offset];