Commit 32d3ff79 authored by vaclav's avatar vaclav
Browse files

use existing function ivas_sba_get_nchan() wherever possible

parent f8c1706d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1763,8 +1763,10 @@ void ivas_get_spar_md_from_dirac(
                /* average responses in all subframes*/
                {
                    float norm;
                    int16_t num_ch_order = ( order + 1 ) * ( order + 1 );
                    int16_t hoa2_ch_order = 9;
                    int16_t num_ch_order, hoa2_ch_order;

                    num_ch_order = ivas_sba_get_nchan( order, 0 );
                    hoa2_ch_order = 9;

                    for ( ch = 0; ch < num_ch_order; ch++ )
                    {
+1 −1
Original line number Diff line number Diff line
@@ -144,7 +144,7 @@ ivas_error ivas_sba_get_hoa_dec_matrix(
            return error;
        }

        num_harm = ( ambisonics_order + 1 ) * ( ambisonics_order + 1 );
        num_harm = ivas_sba_get_nchan( ambisonics_order, 0 );

        /* Get t-design values */
        num_td = SBA_T_DESIGN_11_SIZE;
+13 −13
Original line number Diff line number Diff line
@@ -368,7 +368,7 @@ ivas_error ivas_dirac_dec_config(
            hDirAC->num_outputs_diff += 2; /* Add 2nd-order planar components for HRs */
        }

        hDirAC->num_outputs_dir = ( hDirAC->hOutSetup.ambisonics_order + 1 ) * ( hDirAC->hOutSetup.ambisonics_order + 1 );
        hDirAC->num_outputs_dir = ivas_sba_get_nchan( hDirAC->hOutSetup.ambisonics_order, 0 );
    }
    else if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_PSD_SHD )
    {
@@ -2457,7 +2457,7 @@ void compute_hoa_encoder_mtx(
{
    int16_t k, num_sh;

    num_sh = ( ambisonics_order + 1 ) * ( ambisonics_order + 1 );
    num_sh = ivas_sba_get_nchan( ambisonics_order, 0 );

    for ( k = 0; k < num_responses; k++ )
    {