Commit 9a0b58a8 authored by vaclav's avatar vaclav
Browse files

update

parent c9539e4c
Loading
Loading
Loading
Loading
Loading
+20 −10
Original line number Diff line number Diff line
@@ -264,16 +264,6 @@ void hq_lr_dec(
        exp = sub( exp, 30 );
        Ep_fx[i] = L_shl( L_tmp, sub( exp, 6 ) ); /* Q -6 */
        Ep[i] = (float) ( Ep_fx[i] / pow( 2.0, -6 ) );
#ifdef NONBE_1118_EVS_LR_HQ_BITERROR

        /* safety check in case of bit errors */
        if ( Ep_fx[i] > 536788991 /* max(Q30) */ )
        {
            st->BER_detect = 1;
            set_f( yout, 0, inner_frame );
            return;
        }
#endif
    }

    FOR( i = 0; i < bands; i++ )
@@ -645,10 +635,30 @@ void hq_lr_dec(

            IF( sub( i, highband ) >= 0 )
            {
#ifdef NONBE_1118_EVS_LR_HQ_BITERROR
                /* safety check in case of bit errors */
                if ( Ep_fx[i] > 536788991 /* max(Q30) */ )
                {
                    st->BER_detect = 1;
                    set_f( yout, 0, inner_frame );
                    return;
                }

#endif
                enerH_fx = L_add( enerH_fx, L_shl( Ep_fx[i], 2 ) ); /*Q0 */
            }
            ELSE IF( sub( i, lowband ) >= 0 )
            {
#ifdef NONBE_1118_EVS_LR_HQ_BITERROR
                /* safety check in case of bit errors */
                if ( Ep_fx[i] > 536788991 /* max(Q30) */ )
                {
                    st->BER_detect = 1;
                    set_f( yout, 0, inner_frame );
                    return;
                }

#endif
                enerL_fx = L_add( enerL_fx, L_shl( Ep_fx[i], 2 ) ); /*Q0 */
            }
        }