Resolve "Error-prone condition in ivas_decision_matrix_enc_fx()"

Reason why this change is needed

  • In ivas_decision_matrix_enc_fx() we have a wrong or at least error prone condition compared to the floating-point code, at line 343:

    BASOP:

    ELSE IF( GE_16( extract_l( st->total_brate ), MIN_BRATE_WB_BWE ) && !st->flag_ACELP16k )

    Float:

    else if ( st->total_brate >= MIN_BRATE_WB_BWE && !st->flag_ACELP16k )

    The problem is really the extract_l() around st->total_brate, which only extracts the lowest 16 bits. I.e. in case st->total_brate > 32767 this check might fail.

    In my opinion, the extract_l() should be removed and GE_16() should be replaced by GE_32().

Description of the change

  • Describe what is done.

Affected operating points

  • possibly not BE on under certain conditions

Closes #2530 (closed)

Edited by vaillancour

Merge request reports

Loading