Commit ec67e270 authored by vaclav's avatar vaclav
Browse files

revert change of declarations

parent 7664fbd6
Loading
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -2136,7 +2136,7 @@ static void ivas_spar_md_fill_invalid_bands(
    const int16_t sba_order /* i  : SBA order                   */
)
{
    int16_t i, j, b, all_valid, i_ts;
    int16_t i, j, b, all_valid;
    int16_t valid_band_idx[IVAS_MAX_NUM_BANDS], idx = -1;
    int16_t last_valid_band_idx[IVAS_MAX_NUM_BANDS];
    float w = 0;
@@ -2224,6 +2224,7 @@ static void ivas_spar_md_fill_invalid_bands(

            if ( valid_bands[b] == 0 )
            {
                int16_t i_ts;
                for ( i = 0; i < num_channels; i++ )
                {
                    for ( j = 0; j < num_channels; j++ )
@@ -2254,10 +2255,7 @@ static void ivas_spar_dec_compute_ramp_down_post_matrix(
    const int16_t num_bands_out,
    const int16_t bfi )
{
    int16_t num_in_ch, num_out_ch, i, j, b, i_ts;
    int16_t gain_dB;
    float gain;
    float post_matrix[IVAS_SPAR_MAX_CH];
    int16_t num_in_ch, num_out_ch, i, j, b;

    num_in_ch = hMdDec->spar_md_cfg.num_umx_chs;
    num_out_ch = hMdDec->spar_md_cfg.num_umx_chs;
@@ -2279,6 +2277,10 @@ static void ivas_spar_dec_compute_ramp_down_post_matrix(
        if ( hMdDec->spar_plc_num_lost_frames > ivas_spar_dec_plc_num_frames_keep )
        {
            int16_t num_fade_frames;
            int16_t gain_dB;
            float gain;
            float post_matrix[IVAS_SPAR_MAX_CH];

            num_fade_frames = max( hMdDec->spar_plc_num_lost_frames - ivas_spar_dec_plc_num_frames_keep, 0 );
            gain_dB = -min( num_fade_frames, ivas_spar_dec_plc_max_num_frames_ramp_down ) * ivas_spar_dec_plc_per_frame_ramp_down_gain_dB;
            gain = powf( 10, ( ( (float) gain_dB ) / 20 ) );
@@ -2290,7 +2292,7 @@ static void ivas_spar_dec_compute_ramp_down_post_matrix(
            }

            /* apply the post matrix */
            for ( i_ts = 0; i_ts < MAX_PARAM_SPATIAL_SUBFRAMES; i_ts++ )
            for ( int16_t i_ts = 0; i_ts < MAX_PARAM_SPATIAL_SUBFRAMES; i_ts++ )
            {
                for ( i = 0; i < num_out_ch; i++ )
                {
@@ -2378,9 +2380,6 @@ static void ivas_parse_parameter_bitstream_dtx(
    int16_t pr_q_lvls, pr, pd, pd_q_lvls, pr_pd_bits;
    int16_t pr_q_lvls1, pr_q_lvls2, pr_idx1, pr_idx2, pr_pr_bits;
    int16_t zero_pad_bits, sid_bits_len;
    int16_t pr_idx_1, pr_idx_2, pd_idx_1, pd_idx_2;
    uint16_t value;

    sid_bits_len = st0->next_bit_pos;
    pr_min_max[0] = pSpar_md->min_max[0];
    pr_min_max[1] = pSpar_md->min_max[1];
@@ -2392,6 +2391,9 @@ static void ivas_parse_parameter_bitstream_dtx(

        for ( j = 0; j < FOA_CHANNELS - 1; j++ )
        {
            int16_t pr_idx_1, pr_idx_2, pd_idx_1, pd_idx_2;
            uint16_t value;

            pr_idx_1 = pr_pr_idx_pairs[ndm - 1][j][0];
            pr_idx_2 = pr_pr_idx_pairs[ndm - 1][j][1];
            pd_idx_1 = pr_pd_idx_pairs[ndm - 1][j][0];