Commit 89e4deb3 authored by TYAGIRIS's avatar TYAGIRIS
Browse files

address review comments

parent a8dbcb32
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -164,9 +164,9 @@
#define NONBE_FIX_943_RECONFIG_IGF_AFTER_SETTING_BW           /* FhG: issue 943: fix crash in BW switchin from WB in MDCT-Stereo core encoder */

#ifdef SPLIT_REND_WITH_HEAD_ROT
#define SPLIT_REND_HF_TUNING
#define SPLIT_REND_MC_FIX_LFE
#define SPLIT_EXT_REND_FIX_LIMITER_POS
#define SPLIT_REND_HF_TUNING                                  /* Dlb: issue 950: split rendering MD tuning change at high frequencies*/
#define SPLIT_REND_MC_FIX_LFE                                 /* Dlb: issue 950: split rendering LFE fix for 7.1 and 5.1 MC mode*/
#define SPLIT_EXT_REND_FIX_LIMITER_POS                        /* Dlb: issue 950: fixing limiter position in split rendering mode in external renderer*/
#endif

/* ##################### End NON-BE switches ########################### */
+10 −0
Original line number Diff line number Diff line
@@ -1535,6 +1535,9 @@ void ivas_binaural_add_LFE(
{
    int16_t render_lfe, idx_lfe;
    float gain;
#ifdef SPLIT_REND_MC_FIX_LFE
    float lfe_tc[L_FRAME48k];
#endif

    if ( st_ivas->hBinRenderer != NULL )
    {
@@ -1558,10 +1561,17 @@ void ivas_binaural_add_LFE(

        for ( idx_lfe = 0; idx_lfe < st_ivas->hIntSetup.num_lfe; idx_lfe++ )
        {
#ifdef SPLIT_REND_MC_FIX_LFE
            v_multc( input_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], gain, lfe_tc, output_frame );
            /* copy LFE to left and right channels */
            v_add( output_f[0], lfe_tc, output_f[0], output_frame );
            v_add( output_f[1], lfe_tc, output_f[1], output_frame );
#else
            v_multc( input_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], gain, input_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], output_frame );
            /* copy LFE to left and right channels */
            v_add( output_f[0], input_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], output_f[0], output_frame );
            v_add( output_f[1], input_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], output_f[1], output_frame );
#endif
        }
    }

+3 −2
Original line number Diff line number Diff line
@@ -608,8 +608,8 @@ static void ComputeCoeffs(
            hMd->pred_mat_re[0][1] = 0.0f;
        }
        else
#endif
        {
#endif
            cov_norm_fact = GetNormFact( cov_ii_re, cov_ii_im, cov_io_re, cov_io_im, cov_oo_re );

            /* normalize the covariance */
@@ -742,7 +742,9 @@ static void ComputeCoeffs(
                    hMd->pred_mat_im[i][1] *= gr2;
                }
            }
#ifdef SPLIT_REND_HF_TUNING
        }
#endif
    }

    return;
@@ -1402,7 +1404,6 @@ void ivas_SplitRenderer_GetRotMd(
#ifndef SPLIT_REND_HF_TUNING
            if ( b < COMPLEX_MD_BAND_THRESH )
#else
            // if ( ( b < COMPLEX_MD_BAND_THRESH_LOW ) || ( !ro_md_flag && b < COMPLEX_MD_BAND_THRESH ) )
            if ( ( b < SPLIT_REND_RO_MD_BAND_THRESH ) || ( !ro_md_flag && b < COMPLEX_MD_BAND_THRESH ) )
#endif
            {
+8 −11
Original line number Diff line number Diff line
@@ -8293,7 +8293,7 @@ static ivas_error getSamplesInternal(
        float Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX];
        int16_t ch;
#ifdef SPLIT_REND_HF_TUNING
        int16_t i, numIsmInputs, ro_md_flag;
        int16_t i, ro_md_flag;
#endif
        float *tmpBinaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS], tmpBinaural_buff[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][L_FRAME48k];

@@ -8317,19 +8317,16 @@ static ivas_error getSamplesInternal(
        convertBitsBufferToInternalBitsBuff( *hBits, &bits );

#ifdef SPLIT_REND_HF_TUNING
        numIsmInputs = 0;
        ro_md_flag = 0;
        for ( i = 0; i < RENDERER_MAX_ISM_INPUTS; ++i )
        {
            numIsmInputs += ( hIvasRend->inputsIsm[i].base.inConfig != IVAS_AUDIO_CONFIG_INVALID ) ? 1 : 0;
        }
        if ( numIsmInputs > 0 )
            if ( hIvasRend->inputsIsm[i].base.inConfig != IVAS_AUDIO_CONFIG_INVALID )
            {
                ro_md_flag = 1;
                break;
            }
        else
        {
            ro_md_flag = 0;
        }

        if ( ( error = ivas_renderMultiBinToSplitBinaural( &hIvasRend->splitRendWrapper, hIvasRend->headRotData.headPositions[0], hIvasRend->hRendererConfig->split_rend_config.splitRendBitRate, hIvasRend->hRendererConfig->split_rend_config.codec, hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms,
                                                           &bits, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, ( const int16_t )( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ), tmpBinaural, 1, cldfb_in_flag, ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0, ro_md_flag ) ) != IVAS_ERR_OK )
#else