Commit e5185f1c authored by vaclav's avatar vaclav
Browse files

fix

parent b421817f
Loading
Loading
Loading
Loading
Loading
+15 −7
Original line number Diff line number Diff line
@@ -808,6 +808,7 @@ void ivas_spar_get_cldfb_gains_fx(
        tgt_fx[sample] = L_shl( Mpy_32_32( tgt_fx[sample], L_add( T_fx[sample][0], L_add( T_fx[sample][1], T_fx[sample][2] ) ) ), 10 ); /*Q31*/
        move32();
    }

    /* compute matrices */
    FOR( slot_row = 0; slot_row < num_cf_slots; slot_row++ )
    {
@@ -842,6 +843,7 @@ void ivas_spar_get_cldfb_gains_fx(
    Word16 output_q = 27;
    move16();
    matrix_inverse_fx( Tt_T_fx, Tt_T_inv_fx, num_cf_slots, &output_q );

    /* compute the optimal coefficients */
    FOR( slot_row = 0; slot_row < num_cf_slots; slot_row++ )
    {
@@ -862,6 +864,8 @@ void ivas_spar_get_cldfb_gains_fx(

    return;
}


Word16 ivas_is_res_channel(
    const Word16 ch,             /* i  : ch index in WYZX ordering          Q0*/
    const Word16 nchan_transport /* i  : number of transport channels (1-4) Q0*/
@@ -1190,8 +1194,6 @@ void ivas_spar_get_parameters_fx(
            }
            ELSE
            {


                FOR( spar_band = 0; spar_band < num_spar_bands; spar_band++ )
                {
                    FOR( in_ch = 0; in_ch < num_ch_in; in_ch++ )
@@ -1220,6 +1222,7 @@ void ivas_spar_get_parameters_fx(
            }
        }
    }

    return;
}

@@ -1316,8 +1319,10 @@ static void ivas_spar_calc_smooth_facs_fx(
    Word32 smooth_short_avg_fx[IVAS_MAX_NUM_BANDS];
    Word32 L_temp;
    Word16 exp_tmp, q_tmp;

    bin = 0;
    move16();

    FOR( b = 0; b < nbands_spar; b++ )
    {
        test();
@@ -1640,7 +1645,6 @@ void ivas_spar_dec_digest_tc_fx(

            IF( hSpar->hTdDecorr )
            {

                ivas_td_decorr_process_fx( hSpar->hTdDecorr, p_tc, pPcm_tmp, nSamplesToDecorr );
                st_ivas->hTcBuffer->q_tc_fx = s_min( st_ivas->hTcBuffer->q_tc_fx, q_format );
                move16();
@@ -1719,6 +1723,7 @@ void ivas_spar_dec_upmixer_sf_fx(
    Word16 q1 = 30;
    Word16 prod;
    move16();

    push_wmops( "ivas_spar_dec_upmixer_sf_fx" );
    hSpar = st_ivas->hSpar;
    hDecoderConfig = st_ivas->hDecoderConfig;
@@ -1770,7 +1775,6 @@ void ivas_spar_dec_upmixer_sf_fx(
        }
    }


    /*---------------------------------------------------------------------*
     * TD Decorr and pcm ingest
     *---------------------------------------------------------------------*/
@@ -1793,12 +1797,16 @@ void ivas_spar_dec_upmixer_sf_fx(
    hSpar->hFbMixer->fb_cfg->num_in_chans = num_in_ingest; /*Q0*/
    move16();


    /*---------------------------------------------------------------------*
     * Prepare CLDFB buffers
     *---------------------------------------------------------------------*/

#ifdef FIX_1319_STACK_SBA_DECODER
    set_zero_fx( &Pcm_tmp_fx[0][0], HOA3_CHANNELS * 2 * L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES );
#else
    set_zero_fx( &Pcm_tmp_fx[0][0], ( MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS ) * L_FRAME48k );
#endif

    /* set-up pointers */
    IF( NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_FOA ) )
    {
@@ -1842,7 +1850,6 @@ void ivas_spar_dec_upmixer_sf_fx(
    numch_out_dirac = hDecoderConfig->nchan_out;
    move16();


    /* CLDFB analysis of incoming frame */
    FOR( in_ch = 0; in_ch < numch_in; in_ch++ )
    {
@@ -1908,6 +1915,7 @@ void ivas_spar_dec_upmixer_sf_fx(
                }
            }
        }

        /* Note: This version splits the cldfb band loop into 2 loops, removing some inner-loop IF_statements */
        Word16 min_cldf_band = s_min( CLDFB_PAR_WEIGHT_START_BAND, num_cldfb_bands );
        Word32 out_re_fx[IVAS_SPAR_MAX_CH];
@@ -1949,7 +1957,6 @@ void ivas_spar_dec_upmixer_sf_fx(
            }
        }


        /* Second loop from min_cldf_band (CLDFB_PAR_WEIGHT_START_BAND) till num_cldfb_bands */
        FOR( ; cldfb_band < num_cldfb_bands; cldfb_band++ )
        {
@@ -1989,6 +1996,7 @@ void ivas_spar_dec_upmixer_sf_fx(
                move32();
            }
        }

        test();
        IF( ( EQ_16( ( add( add( slot_idx_start, ts ), 1 ) ), hSpar->num_slots ) ) || ( NE_16( ( shr( md_idx, 2 ) /* md_idx / JBM_CLDFB_SLOTS_IN_SUBFRAME */ ), ( hSpar->render_to_md_map[( ( slot_idx_start + ts ) + 1 )] / JBM_CLDFB_SLOTS_IN_SUBFRAME /*It's value is 4*/ ) ) ) )
        {