Commit 860fefe4 authored by Adam Mills's avatar Adam Mills
Browse files

Merge branch 'main' into 648-SBA-cleanup

parents 20877092 29cd5ad3
Loading
Loading
Loading
Loading
Loading
+0 −39
Original line number Diff line number Diff line
@@ -1002,18 +1002,6 @@ static void ivas_calc_post_pred_per_band(
            postpred_cov_re[i][j] = postpred_cov_re[j][i];
        }
    }
#ifdef SPAR_HOA_DBG
    /*fprintf(stderr, "\n\n Postpred cov: (band %d)\n", band_idx);
    for (i = 0; i < num_ch; i++)
    {
        for (j = 0; j < num_ch; j++)
        {
            fprintf(stderr, "%f, ", postpred_cov_re[i][j]);
        }
        fprintf(stderr, "\n");
    }
    fprintf(stderr, "\n\n"); */
#endif

    return;
}
@@ -1646,35 +1634,8 @@ void ivas_compute_spar_params(
#endif
    );

#ifdef SPAR_HOA_DBG
    /*fprintf(stderr, "\n\n Prediction Coefficients:\n");

    for (i = 0; i < num_ch - 1; i++)
    {
        for (j = start_band; j < end_band; j++)
        {
            fprintf(stderr, "%f, ", pred_coeffs_re[i][j]);
        }
        fprintf(stderr, "\n");
    }
    fprintf(stderr, "\n\n"); */
#endif
    ivas_create_fullr_dmx_mat( pred_coeffs_re, dm_fv_re, mixer_mat, num_ch, start_band, end_band, active_w, hSparCfg );

#ifdef SPAR_HOA_DBG
    /*fprintf(stderr, "\n\n 1st DMX matrix (band 0):\n");

    for (i = 0; i < num_ch; i++)
    {
        for (j = 0; j < num_ch; j++)
        {
            fprintf(stderr, "%f, ", mixer_mat[i][j][0]);
        }
        fprintf(stderr, "\n");
    }
    fprintf(stderr, "\n\n");*/
#endif

    ivas_get_Wscaling_factor( cov_real, pred_coeffs_re, mixer_mat, start_band, end_band, dtx_vad, num_ch,
                              hSparCfg->num_dmx_chans_per_band, bands_bw, active_w,
                              active_w_vlbr,
+0 −32
Original line number Diff line number Diff line
@@ -356,38 +356,6 @@ void ivas_arith_decode_cmplx_cell_array(

            arith_decode_cell_array_diff( cell_dims_diff, st0, num_bands, pArith_re, pArith_re_diff, cell_arr_diff_out, cell_arr_diff );


#ifdef SPAR_HOA_DBG
            /*if ( 0 ) */ /*(pCell_dims[0].dim1 == 12) */
                          /*{
                              idx = 0;
                              fprintf( stdout, "\n\n OLD/NEW: \n\n" );
                              for ( i = 0; i < num_bands; i++ )
                              {
                                  len = ( cell_dims[i].dim1 * cell_dims[i].dim2 );
                                  fprintf( stdout, "Non-diff Band %d: \n", i );
              
                                  for ( j = 0; j < len; j++ )
                                  {
                                      fprintf( stdout, ">>%d: %d \n", idx, cell_arr_no_diff[idx] );
                                      idx++;
                                  }
                              }
                              idx = 0;
                              for ( i = 0; i < num_bands; i++ )
                              {
                                  len = ( cell_dims_diff[i].dim1 * cell_dims_diff[i].dim2 );
                                  fprintf( stdout, "Diff Band %d: \n", i );
              
                                  for ( j = 0; j < len; j++ )
                                  {
                                      fprintf( stdout, ">>%d: %d\t %d\n", idx, cell_arr_diff[idx], cell_arr_diff_out[idx] );
                                      idx++;
                                  }
                              }
                          }*/
#endif

            idx = 0;
            idx1 = 0;
            for ( i = 0; i < num_bands; i++ )
+0 −409

File changed.

Preview size limit exceeded, changes collapsed.

+0 −30
Original line number Diff line number Diff line
@@ -379,36 +379,6 @@ int16_t ivas_arith_encode_cmplx_cell_array(
            }
            total_len += len;
        }
#ifdef SPAR_HOA_DBG
        /*if ( 0 )*/ /*(pCell_dims[0].dim1 == 12)*/
                     /*
                     {
                         idx = 0;
                         fprintf( stdout, "\n\n OLD/NEW: \n\n" );
                         for ( i = 0; i < nB; i++ )
                         {
                             len = ( cell_dim[i].dim1 * cell_dim[i].dim2 );
                             fprintf( stdout, "Non-diff Band %d: \n", i );
             
                             for ( j = 0; j < len; j++ )
                             {
                                 fprintf( stdout, ">>%d: %d \n", idx, input[idx] );
                                 idx++;
                             }
                         }
                         idx = 0;
                         for ( i = 0; i < nB; i++ )
                         {
                             len = ( cell_dim_diff[i].dim1 * cell_dim_diff[i].dim2 );
                             fprintf( stdout, "Diff Band %d: \n", i );
                             for ( j = 0; j < len; j++ )
                             {
                                 fprintf( stdout, ">>%d: %d\t %d\n", idx, input_old[idx], input_new[idx] );
                                 idx++;
                             }
                         }
                     }*/
#endif

        arith_result = arith_encode_cell_array( cell_dim, hMetaData, nB, pArith_re, input, wc_strat_arith );
        if ( arith_result < 0 )
+0 −22
Original line number Diff line number Diff line
@@ -111,9 +111,7 @@ ivas_error ivas_spar_enc_open(

    nchan_transport = ivas_get_sba_num_TCs( hEncoderConfig->ivas_total_brate, sba_order_internal );

    // bw = ivas_get_bw_idx_from_sample_rate(pCfg->input_Fs);
    table_idx = ivas_get_spar_table_idx( ivas_total_brate, sba_order_internal, SPAR_CONFIG_BW, NULL, NULL );
    // ivas_set_bitrate_config(&hSpar->hMdEnc->spar_md_cfg, table_idx);

    /* MD handle */
    if ( ( error = ivas_spar_md_enc_open( &( hSpar->hMdEnc ), hEncoderConfig, sba_order_internal ) ) != IVAS_ERR_OK )
@@ -607,14 +605,8 @@ static ivas_error ivas_spar_enc_process(
#endif
    int16_t nchan_fb_in;

    /* ToDo: Commented for now*/
    /*int16_t start_nb_bits;
    int16_t total_md_bits, total_sba_bits;*/
    push_wmops( "ivas_spar_enc_process" );

    /* ToDo: Commented for now*/
    // start_nb_bits = hMetaData->nb_bits_tot;

    /*-----------------------------------------------------------------------------------------*
     * Initialization
     *-----------------------------------------------------------------------------------------*/
@@ -1095,20 +1087,6 @@ static ivas_error ivas_spar_enc_process(
    ivas_spar_dump_signal_wav( input_frame, p_pcm_tmp, NULL, nchan_transport, spar_foa_enc_wav[0], "ivas_pca_enc()" );
#endif

#ifdef SPAR_HOA_DBG
    /*FILE *fp = fopen("int_enc_dmx.raw", "ab");
    for (int16_t t = 0; t < 960; t++)
    {
        for (int16_t c = 0; c < hSpar->hFbMixer->filterbank_num_out_chans; c++)
        {
            for ( k = 0; k < 2; k++ )
            {
                fb_mixer_in_buf.ppMixer[i][j][k] = hSpar->hMdEnc->mixer_mat[i][j];
            }
        }
    }
    fclose( fp );*/
#endif
    /*-----------------------------------------------------------------------------------------*
     * AGC
     *-----------------------------------------------------------------------------------------*/
Loading