Commit c83a6f02 authored by Manuel Jander's avatar Manuel Jander
Browse files

Fix NONBE_FIX_2493_CHECK_EXTRACT_L_E_LPC_a_isp_conversion

parent adc1743b
Loading
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -290,14 +290,16 @@ void E_LPC_a_isp_conversion( const Word16 a[], Word16 isp[], const Word16 old_is
                    tmp = shl( tmp, exp );
                tmp = div_s( (Word16) 16383, tmp );
                t0 = L_mult( x, tmp );
                t0 = L_shr( t0, sub( 20, exp ) );
#ifdef NONBE_FIX_2493_CHECK_EXTRACT_L_E_LPC_a_isp_conversion
                t0 = L_shr( t0, sub( 20 - 5, exp ) );

                /* Restore Sign */
                if ( y < 0 )
                    t0 = L_negate( t0 );

                t0 = Mpy_32_16_1( t0, ylow ); /* result in Q26 */
                t0 = Mpy_32_16_1( t0, ylow ); /* result in Q15 */
#else
                t0 = L_shr( t0, sub( 20, exp ) );
#ifdef FIX_2493_CHECK_EXTRACT_L
                tmp = extract_l2( t0 ); /* y = (xhigh-xlow)/(yhigh-ylow) in Q11 */
#else
@@ -309,8 +311,8 @@ void E_LPC_a_isp_conversion( const Word16 a[], Word16 isp[], const Word16 old_is
                    tmp = negate( tmp );

                t0 = L_mult( ylow, tmp ); /* result in Q26 */
#endif
                t0 = L_shr( t0, 11 );     /* result in Q15 */
#endif
#ifdef FIX_2493_CHECK_EXTRACT_L
                xlow = sub( xlow, extract_l2( t0 ) ); /* xint = xlow - ylow*y */
#else
@@ -1164,14 +1166,16 @@ void E_LPC_a_lsp_conversion(
                    tmp = shl( tmp, exp );
                tmp = div_s( (Word16) 16383 / 2, tmp );
                t0 = L_mult( x, tmp );
                t0 = L_shr( t0, sub( 20, exp ) );
#ifdef NONBE_FIX_2493_CHECK_EXTRACT_L_E_LPC_a_isp_conversion
                t0 = L_shr( t0, sub( 20 - 5, exp ) );

                /* Restore Sign */
                if ( y < 0 )
                    t0 = L_negate( t0 );

                t0 = Mpy_32_16_1( t0, ylow ); /* result in Q26 */
                t0 = Mpy_32_16_1( t0, ylow ); /* result in Q15 */
#else
                t0 = L_shr( t0, sub( 20, exp ) );
#ifdef FIX_2493_CHECK_EXTRACT_L
                tmp = extract_l2( t0 ); /* y = (xhigh-xlow)/(yhigh-ylow) in Q11 */
#else
@@ -1183,8 +1187,8 @@ void E_LPC_a_lsp_conversion(
                    tmp = negate( tmp );

                t0 = L_mult( ylow, tmp ); /* result in Q26 */
#endif
                t0 = L_shr( t0, 11 );     /* result in Q15 */
#endif
#ifdef FIX_2493_CHECK_EXTRACT_L
                xlow = sub( xlow, extract_l2( t0 ) ); /* xint = xlow - ylow*y */
#else