Commit 1eb27907 authored by Arash Azizi's avatar Arash Azizi
Browse files

Revert "Issue 2551: trying to get the function even shorter by removing conditionals"

This reverts commit ead99c7b.
parent f3f1aa8a
Loading
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -1460,6 +1460,21 @@ void tcx_scalar_quantization_fx(
        xq[i] = tmp16;
        move16();
#else
        if ( EQ_16( element_mode, EVS_MONO ) )
        {
            offs32 = Mpy_32_16_1( L_abs( x[i] ), gain ); /* multiply */
            offs32 = L_shl_sat( offs32, s );             /* convert to 15Q16 */
            tmp16 = mac_r_sat( offs32, offset, 1 );      /* add offset and truncate */
            IF( x[i] < 0 )
            {
                tmp16 = negate( tmp16 ); /* restore sign */
            }

            xq[i] = tmp16;
            move16();
        }
        else
        {
            offs32 = Mpy_32_16_1( x[i], gain );
            offs32 = L_shl_sat( offs32, s ); /* convert to 15Q16 */

@@ -1476,6 +1491,7 @@ void tcx_scalar_quantization_fx(
            }
            xq[i] = tmp16;
            move16();
        }
#endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN
    }