Commit 66b4b203 authored by vaclav's avatar vaclav
Browse files

- Merge remote-tracking branch 'remotes/origin/main' into 764-output-buffers-harmonization

parents 99f4eeb8 aeb35ece
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ ivas_error ivas_dirac_config(

        if ( hQMetaData != NULL )
        {
            if ( enc_dec == ENC || ( ivas_format != SBA_FORMAT && ivas_format != SBA_ISM_FORMAT ) ) /* Todo: This condition should probably be corrected in main */
            if ( enc_dec == ENC )
            {
                hConfig->nbands = hQMetaData->q_direction[0].cfg.nbands;
            }
+10 −12
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ static void ivas_reorder_array( float in_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][

static void ivas_get_Wscaling_factor( float *pppCov_mat_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], float pred_coeffs_re[IVAS_SPAR_MAX_CH - 1][IVAS_MAX_NUM_BANDS], float ***mixer_mat, const int16_t start_band, const int16_t end_band, const int16_t dtx_vad, const int16_t num_ch, const int16_t *pNum_dmx, const int16_t bands_bw, const int16_t active_w, const int16_t active_w_vlbr, float *pWscale, const int16_t dyn_active_w_flag );

static void ivas_calc_post_pred_per_band( float *pppCov_mat_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], float ***mixer_mat, const int16_t num_ch, const int16_t num_dmx, const int16_t band_idx, float postpred_cov_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH] );
static void ivas_calc_post_pred_per_band( float *pppCov_mat_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], float ***mixer_mat, const int16_t num_ch, const int16_t band_idx, float postpred_cov_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH] );

static int16_t ivas_is_mat_inv( float in_re[MAX_MAT_DIM][MAX_MAT_DIM], const int16_t dim );

@@ -682,7 +682,7 @@ static void ivas_get_Wscaling_factor(
{
    int16_t b, ch;
    float dm_f_local, abs_val;
    float postpred_cov_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH];
    float postpred_cov_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH] = { 0 };

    if ( dtx_vad == 0 )
    {
@@ -701,7 +701,10 @@ static void ivas_get_Wscaling_factor(
        {
            float Gw_sq, g_sq = 0;

            ivas_calc_post_pred_per_band( cov_real, mixer_mat, num_ch, pNum_dmx[b * bands_bw], b, postpred_cov_re );
            if ( num_ch != pNum_dmx[b * bands_bw] )
            {
                ivas_calc_post_pred_per_band( cov_real, mixer_mat, num_ch, b, postpred_cov_re );
            }

            Gw_sq = cov_real[0][0][b] / max( postpred_cov_re[0][0], IVAS_FLT_EPS );

@@ -877,7 +880,6 @@ static void ivas_calc_post_pred_per_band(
    float *cov_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH],
    float ***mixer_mat,
    const int16_t num_ch,
    const int16_t num_dmx,
    const int16_t band_idx,
    float postpred_cov_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH] )
{
@@ -886,9 +888,6 @@ static void ivas_calc_post_pred_per_band(
    float temp_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH];
    float tmp_re;

    // NOTE: What is this doing?
    if ( num_dmx != num_ch )
    {
    for ( i = 0; i < num_ch; i++ )
    {
        for ( j = 0; j < num_ch; j++ )
@@ -896,7 +895,6 @@ static void ivas_calc_post_pred_per_band(
            dmx_mat_conj[i][j] = mixer_mat[j][i][band_idx];
        }
    }
    }

    for ( i = 0; i < num_ch; i++ )
    {
@@ -1255,7 +1253,7 @@ void ivas_calc_c_p_coeffs(

    if ( num_dmx != num_ch )
    {
        ivas_calc_post_pred_per_band( cov_real, mixer_mat, num_ch, num_dmx, band_idx, postpred_cov_re );
        ivas_calc_post_pred_per_band( cov_real, mixer_mat, num_ch, band_idx, postpred_cov_re );

        if ( num_dmx != 1 )
        {
+4 −1
Original line number Diff line number Diff line
@@ -159,6 +159,9 @@
#define ROM_TO_RAM                                     /*Dlb : ROM optimization in SR mode*/     
#define FIX_712_713_SPLIT_REND_MASA_MC                 /*Dlb : Fix for issue 712 and 713*/
#endif
#define FIX_705_REND_CONF_FALSE_WARNING                 /* Eri: Bug in MSVC ftell() for UNIX-style line endings trigger false warning messages in renderer configuration. */

/* #################### End BE switches ################################## */

#define IGF_MEMORY_ALLOC_OPT                            /* FhG: Issue 157: allocate IGF encoder structure only when needed */
#define FIX_732_PLANAR_SBA_OSBA                         /* Dlb : issue 732: fix for crash in planar mode in OSBA format*/
@@ -169,10 +172,10 @@
#define FIX_632_USAN_ERROR_NULL_POINTER                 /* FhG: issue 632 USAN offset to null pointer proto_diffuse_buffer_f in dirac rendering*/
#define FIX_759_CODE_COVERAGE_OSBA                      /* VA: issue 759: remove obsolete code in the OSBA encoder */
#define FIX_708_AEID_COMMAND_LINE                       /* VA: issue 708: improve AEID command-line robustness */
#define FIX_518_ISM_BRIR_EXTREND                        /* FhG: fix issue #518, cleanup ISM to BINAURAL_ROOM_IR rendering in the external renderer */
#define FIX_764_HARM_CODE                               /* VA: issue 764: introduce new function for the same code block at four different places */


/* #################### End BE switches ################################## */

/* #################### Start NON-BE switches ############################ */
/* any switch which is non-be wrt selection floating point code */
+1 −11
Original line number Diff line number Diff line
@@ -202,16 +202,6 @@ void ivas_spar_dump_signal_wav(
    {
        for ( i = 0; i < no_channel; i++, k++ )
        {
#if 0
            if ( ppPcm )
            {
                tmp_value = roundf( ppPcm[i][j] * PCM16_TO_FLT_FAC );
            }
            else
            {
                tmp_value = roundf( pcm_array[i][j] * PCM16_TO_FLT_FAC );
            }
#else
            if ( ppPcm )
            {
                tmp_value = roundf( ppPcm[i][j] );
@@ -220,7 +210,7 @@ void ivas_spar_dump_signal_wav(
            {
                tmp_value = roundf( pcm_array[i][j] );
            }
#endif

            if ( tmp_value > MAX16B_FLT )
            {
                largest_value = (float) fabs( tmp_value ) > largest_value ? (float) fabs( tmp_value ) : largest_value;
+1 −1
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ ivas_error ivas_sba_dec_reconfigure(
    st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order );

    /* save old */
    if ( st_ivas->hDirAC == NULL && st_ivas->hSpar != NULL ) // ToDo; this never happens
    if ( st_ivas->hDirAC == NULL && st_ivas->hSpar != NULL )
    {
        st_ivas->hTcBuffer->num_slots = st_ivas->hSpar->num_slots;
        st_ivas->hTcBuffer->nb_subframes = st_ivas->hSpar->nb_subframes;
Loading