Commit 42fac338 authored by thomas dettbarn's avatar thomas dettbarn
Browse files

replaced idiv1616(x, L_SUBFR) with shr(x, L_SUBFR_LOG2), which is equivalen,...

replaced idiv1616(x, L_SUBFR) with shr(x, L_SUBFR_LOG2), which is equivalen, in ib_com/bits_alloc_fx.c, dec_ace_fx.c, /dec_amr_wb_fx.c, dec_gen_voic_fx.c, dec_tran_fx.c, dec_uv_fx.c
parent e17b605a
Loading
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -570,7 +570,7 @@ static ivas_error acelp_FCB_allocator_fx(
        SWAP( fixed_cdk_index[0], fixed_cdk_index[tc_subfr / L_SUBFR] );

        /* TRANSITION coding: allocate second highest FCBQ bit-budget to the last subframe */
        IF( LT_16( idiv1616( tc_subfr, L_SUBFR ), sub( nb_subfr, 1 ) ) )
        IF( LT_16( shr( tc_subfr, L_SUBFR_LOG2 ), sub( nb_subfr, 1 ) ) )
        {
            SWAP( fixed_cdk_index[sub( tc_subfr, L_SUBFR ) / L_SUBFR], fixed_cdk_index[nb_subfr - 1] );
        }
@@ -1134,7 +1134,7 @@ ivas_error config_acelp1_fx(
                test();
                IF( EQ_16( acelp_cfg->ltf_mode, NORMAL_OPERATION ) && NE_16( tc_subfr, 192 ) )
                {
                    bits = sub( bits, idiv1616( sub( L_FRAME - L_SUBFR, tc_subfr ), L_SUBFR ) ); /* LP filtering flag */
                    bits = sub( bits, shr( sub( L_FRAME - L_SUBFR, tc_subfr ), L_SUBFR_LOG2 ) ); /* LP filtering flag */
                }
            }
            ELSE
@@ -1147,7 +1147,7 @@ ivas_error config_acelp1_fx(
                test();
                IF( EQ_16( acelp_cfg->ltf_mode, NORMAL_OPERATION ) && NE_16( tc_subfr, 192 ) )
                {
                    bits = sub( bits, idiv1616( sub( L_FRAME - L_SUBFR, tc_subfr ), L_SUBFR ) ); /* LP filtering flag */
                    bits = sub( bits, shr( sub( L_FRAME - L_SUBFR, tc_subfr ), L_SUBFR_LOG2 ) ); /* LP filtering flag */
                }
            }
        }
@@ -1167,7 +1167,7 @@ ivas_error config_acelp1_fx(

            IF( NE_16( tc_subfr, 256 ) )
            {
                bits = sub( bits, idiv1616( sub( L_FRAME16k - L_SUBFR, tc_subfr ), L_SUBFR ) ); /* LP filtering flag */
                bits = sub( bits, shr( sub( L_FRAME16k - L_SUBFR, tc_subfr ), L_SUBFR_LOG2 ) ); /* LP filtering flag */
            }
        }

+3 −3
Original line number Diff line number Diff line
@@ -265,7 +265,7 @@ void decoder_acelp_fx(
        Word16 idx = 0;
        IF( i_subfr != 0 )
        {
            idx = idiv1616( i_subfr, L_SUBFR );
            idx = shr( i_subfr, L_SUBFR_LOG2 );
        }

        test();
@@ -658,7 +658,7 @@ void decoder_acelp_fx(
        Word16 L_frame_fr = 0;
        IF( st->L_frame != 0 )
        {
            L_frame_fr = idiv1616( st->L_frame, L_SUBFR );
            L_frame_fr = shr( st->L_frame, L_SUBFR_LOG2 );
        }

        FOR( i = 0; i < L_frame_fr; i++ )
@@ -717,7 +717,7 @@ void decoder_acelp_fx(
        move16();
        IF( i_subfr != 0 )
        {
            idx = idiv1616( i_subfr, L_SUBFR );
            idx = shr( i_subfr, L_SUBFR_LOG2 );
        }
        *pT++ = round_fx( pitch_buf[idx] ); // Q0
    }
+1 −1
Original line number Diff line number Diff line
@@ -141,7 +141,7 @@ void decod_amr_wb_fx(
        move16();
        IF( i_subfr != 0 )
        {
            idx = idiv1616( i_subfr, L_SUBFR );
            idx = shr( i_subfr, L_SUBFR_LOG2 );
        }

        /*voice_factors[i_subfr/L_SUBFR] = min( max(0.0f, voice_fac), 1.0f);*/
+1 −1
Original line number Diff line number Diff line
@@ -323,7 +323,7 @@ ivas_error decod_gen_voic_fx(
        move16();
        IF( i_subfr_fx != 0 )
        {
            idx = idiv1616( i_subfr_fx, L_SUBFR );
            idx = shr( i_subfr_fx, L_SUBFR_LOG2 );
        }

#ifdef FIX_2010_PREP_TBE_EXC
+2 −2
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ void decod_tran_fx(
        move16();
        if ( i_subfr != 0 )
        {
            tmp_idx_2 = idiv1616( i_subfr, L_SUBFR );
            tmp_idx_2 = shr( i_subfr, L_SUBFR_LOG2 );
        }

#ifdef FIX_2010_PREP_TBE_EXC
@@ -304,7 +304,7 @@ void decod_tran_fx(
        move16();
        if ( i_subfr != 0 )
        {
            tmp_idx = idiv1616( i_subfr, L_SUBFR );
            tmp_idx = shr( i_subfr, L_SUBFR_LOG2 );
        }
        p_Aq_fx += ( M + 1 );
        pt_pitch_fx++;
Loading