Commit 10d42196 authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

Correct comparison conditions.

parent 06d32394
Loading
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1284,7 +1284,7 @@ ivas_error RenderConfigReader_checkValues(
    }
#ifdef FIX_2500_ISM4_BIN_REVERB_DISTORTION
    /* Verify input pre-delay value */
    if ( ( pRoom_acoustics->inputPreDelay_fx > INPUTPREDELAY_MAX_Q24 ) || ( pRoom_acoustics->inputPreDelay_fx < INPUTPREDELAY_MIN ) )
    if ( GT_32( pRoom_acoustics->inputPreDelay_fx, INPUTPREDELAY_MAX_Q24 ) || LT_32( pRoom_acoustics->inputPreDelay_fx, INPUTPREDELAY_MIN ) )
    {
        return IVAS_ERR_WRONG_PARAMS;
    }
@@ -1303,18 +1303,18 @@ ivas_error RenderConfigReader_checkValues(
        }
#ifdef FIX_2500_ISM4_BIN_REVERB_DISTORTION
        /* Check the input frequencies */
        if ( ( shr( pRoom_acoustics->pFc_input_fx[band_idx], Q2 ) > FC_INPUT_MAX_Q14 ) || ( pRoom_acoustics->pFc_input_fx[band_idx] < FC_INPUT_MIN ) )
        if ( GT_32( L_shr( pRoom_acoustics->pFc_input_fx[band_idx], Q2 ), FC_INPUT_MAX_Q14 ) || LT_32( pRoom_acoustics->pFc_input_fx[band_idx], FC_INPUT_MIN ) )
        {
            tab_value_err_count++;
        }

        /* Check the input RT60 values */
        if ( ( shr( pRoom_acoustics->pAcoustic_rt60_fx[band_idx], Q2 ) > ACOUSTIC_RT60_MAX_Q24 ) || ( pRoom_acoustics->pAcoustic_rt60_fx[band_idx] < ACOUSTIC_RT60_MIN_Q26 ) )
        if ( GT_32( L_shr( pRoom_acoustics->pAcoustic_rt60_fx[band_idx], Q2 ), ACOUSTIC_RT60_MAX_Q24 ) || LT_32( pRoom_acoustics->pAcoustic_rt60_fx[band_idx], ACOUSTIC_RT60_MIN_Q26 ) )
        {
            tab_value_err_count++;
        }
        /* Check the input DSR values */
        if ( ( shr( pRoom_acoustics->pAcoustic_dsr_fx[band_idx], Q6 ) > ACOUSTIC_DSR_MAX_Q24 ) || ( pRoom_acoustics->pAcoustic_dsr_fx[band_idx] < ACOUSTIC_DSR_MIN ) )
        if ( GT_32( L_shr( pRoom_acoustics->pAcoustic_dsr_fx[band_idx], Q6 ), ACOUSTIC_DSR_MAX_Q24 ) || LT_32( pRoom_acoustics->pAcoustic_dsr_fx[band_idx], ACOUSTIC_DSR_MIN ) )
        {
            tab_value_err_count++;
        }