EVS: wrong basop thresholds in StableHighPitchDetect()

In StableHighPitchDetect(), there is the following code

    if ( ... *voicing0_sm > 0.65f && *voicing0_sm > 0.7f * ( *voicing_sm ) )
    {
        hVAD->hangover_cnt_music = 0;
    }

while in EVS BASOP StableHighPitchDetect_fx() it is

    IF( ( ... &&
        ( GT_16( *voicing0_sm, 16384 ) ) && ( GT_16( *voicing0_sm, mult_r( *voicing_sm, 21299 ) ) ) )

        {
            hVAD->hangover_cnt_music = 0;
            move16();
        }

and IVAS BASOP StableHighPitchDetect_ivas_fx() it is

    IF( ... &&
        ( GT_16( *voicing0_sm, 21299 ) ) && ( GT_16( *voicing0_sm, mult_r( *voicing_sm, 22938  ) ) ) )

        {
            hVAD->hangover_cnt_music = 0;
            move16();
        }

It seems to me that the thresholds against which *voicing0_sm are compared to are wrong in EVS.


Another bug in the same files concerns the following code:

pitch_freq_point = (int16_t) ( L_FFT / pitch[1] + 0.5f );

while in EVS BASOP StableHighPitchDetect_fx() it is

tmp = div_s( shl( 1, sub( 14, exp ) ), Top );     /*Q(29 - exp)*/
L_tmp = L_mult0( tmp, L_FFT );
pitch_freq_point = extract_h( L_add( L_shl( L_tmp, sub( exp, 13 ) ), 32768 ) ); /* Q0*/

and IVAS BASOP StableHighPitchDetect_ivas_fx() it is

pitch_freq_point = idiv1616( L_FFT, Top ); /* Q0*/

The value of pitch_freq_point in EVS BASOP is usually higher (by 1) than the value in FLP and IVAS BASOP, which results in different short pitch decisions.

Edited Jan 14, 2026 by vaclav
Assignee Loading
Time tracking Loading