Commit 81a2e4e0 authored by thomas dettbarn's avatar thomas dettbarn
Browse files

replaced div10 with equivalent *26215 >>18 operations.

parent 66423def
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -509,7 +509,7 @@ static void paramupmix_td_decorr_process_jbm_fx(
    Word16 offset;
    Word32 in_duck_gain[L_FRAME48k], out_duck_gain[L_FRAME48k]; // Q30

    offset = idiv1616( output_frame, 10 );
    offset = extract_l( L_shr( imult3216( 10923, output_frame ), 18 ) ); /* equivalent to output_frame/10 */

    /* Look-ahead delay */
    FOR( k = 0; k < MC_PARAMUPMIX_COMBINATIONS; k++ )
+1 −1
Original line number Diff line number Diff line
@@ -2418,7 +2418,7 @@ void smooth_dft2td_transition_fx(
        ilen = shr( output_frame, 1 ); /* Q0 */

        /* correlation length */
        corr_len = extract_L( L_shr( imult3216( 26215, output_frame ), 19 ) ); /* Q0. equivalent to output_frame/20 */
        corr_len = extract_l( L_shr( imult3216( 26215, output_frame ), 19 ) ); /* Q0. equivalent to output_frame/20 */
        subsampl = 4;

        FOR( ch = 0; ch < hCPE->nchan_out; ch++ )
+1 −1
Original line number Diff line number Diff line
@@ -953,7 +953,7 @@ static void JB4_adaptActivePlayout(
                    temp3 = W_add( temp3, 1 );
                }
                rate = (UWord32) W_add( temp3, dropRateMin );
                *scale = idiv1616( sub( 1000, (Word16) rate ), 10 );
                *scale = extract_l( L_shr( imult3216( 10923, sub( 1000, (Word16) rate ) ), 18 ) ); /* equivalent to (1000-rate)/10 */
                /* Limit max scaling to the duration of one frame. APA will not exceed this limit
                 * anyway due to the 50% limitation of APA_MIN_SCALE and APA_MAX_SCALE. Limiting
                 * the value to a sensible range here avoids integer overflows at later stages when
+1 −1
Original line number Diff line number Diff line
@@ -216,7 +216,7 @@ static void stereo_td_channel_extrapolate_fx(
    move16();
    move16();

    pred_ovlp = idiv1616( input_frame, 10 );
    pred_ovlp = extract_l( L_shr( imult3216( 10923, input_frame ), 18 ) ); /* equivalent to input_frame/10 */

    /*get pitch lag from previous frame */
    // pitch_lag = (int16_t) ( pitch0 * ( (float) input_frame / L_FRAME ) );