Commit 3a4e9d6f authored by Ke Zhao's avatar Ke Zhao
Browse files

Merge branch 'split_rendering_masa_and_mc_fixes' into 627-add-split-rendering-ci-tests

parents fbd4808b 775d29c2
Loading
Loading
Loading
Loading
Loading
+23 −1
Original line number Diff line number Diff line
@@ -1507,6 +1507,9 @@ typedef enum
    PITCH_ONLY,
    ANY_ROLL,
	PRED_ONLY,
#ifdef SPLIT_REND_PRED_QUANT_63_PNTS
	PRED_ROLL_ONLY,
#endif
	COM_GAIN_ONLY,
	LR_GAIN_ONLY
} IVAS_SPLIT_REND_POSE_TYPE;
@@ -1545,9 +1548,18 @@ typedef enum
#define COMPLEX_MD_BAND_THRESH                  (MAX_SPLIT_REND_MD_BANDS)
#define COMPLEX_MD_BAND_THRESH_LOW              (5)


#ifndef SPLIT_REND_PRED_QUANT_63_PNTS
#define IVAS_SPLIT_REND_NUM_QUANT_STRATS (3)
#else
#define IVAS_SPLIT_REND_NUM_QUANT_STRATS (4)
#endif
#ifdef SPLIT_REND_PRED_QUANT_63_PNTS
#define IVAS_SPLIT_REND_PRED_63QUANT_PNTS ( 63 )
#define IVAS_SPLIT_REND_PRED_31QUANT_PNTS ( 31 )
#define IVAS_SPLIT_REND_ROLL_PRED_QUANT_PNTS ( 31 )
#else
#define IVAS_SPLIT_REND_PRED_QUANT_PNTS ( 31 )
#endif
#define IVAS_SPLIT_REND_D_QUANT_PNTS    ( 15 )
#define IVAS_SPLIT_REND_PRED_MIN_VAL    ( -1.4f )
#define IVAS_SPLIT_REND_PRED_MAX_VAL    ( 1.4f )
@@ -1558,8 +1570,18 @@ typedef enum
#define IVAS_SPLIT_REND_D_MIN_VAL       ( 0.0f )
#define IVAS_SPLIT_REND_D_MAX_VAL       ( 1.0f )

#ifdef SPLIT_REND_PRED_QUANT_63_PNTS
#define IVAS_SPLIT_REND_PRED_ROLL_Q_STEP        (( IVAS_SPLIT_REND_PRED_MAX_VAL - IVAS_SPLIT_REND_PRED_MIN_VAL ) / ( IVAS_SPLIT_REND_ROLL_PRED_QUANT_PNTS - 1 ))
#define IVAS_SPLIT_REND_PRED_ROLL_1BYQ_STEP     (( IVAS_SPLIT_REND_ROLL_PRED_QUANT_PNTS - 1 )/( IVAS_SPLIT_REND_PRED_MAX_VAL - IVAS_SPLIT_REND_PRED_MIN_VAL )) 
#define IVAS_SPLIT_REND_PRED31_Q_STEP        (( IVAS_SPLIT_REND_PRED_MAX_VAL - IVAS_SPLIT_REND_PRED_MIN_VAL ) / ( IVAS_SPLIT_REND_PRED_31QUANT_PNTS - 1 ))
#define IVAS_SPLIT_REND_PRED31_1BYQ_STEP     (( IVAS_SPLIT_REND_PRED_31QUANT_PNTS - 1 )/( IVAS_SPLIT_REND_PRED_MAX_VAL - IVAS_SPLIT_REND_PRED_MIN_VAL )) 
#define IVAS_SPLIT_REND_PRED63_Q_STEP        (( IVAS_SPLIT_REND_PRED_MAX_VAL - IVAS_SPLIT_REND_PRED_MIN_VAL ) / ( IVAS_SPLIT_REND_PRED_63QUANT_PNTS - 1 ))
#define IVAS_SPLIT_REND_PRED63_1BYQ_STEP     (( IVAS_SPLIT_REND_PRED_63QUANT_PNTS - 1 )/( IVAS_SPLIT_REND_PRED_MAX_VAL - IVAS_SPLIT_REND_PRED_MIN_VAL )) 
#else
#define IVAS_SPLIT_REND_PRED_Q_STEP        (( IVAS_SPLIT_REND_PRED_MAX_VAL - IVAS_SPLIT_REND_PRED_MIN_VAL ) / ( IVAS_SPLIT_REND_PRED_QUANT_PNTS - 1 ))
#define IVAS_SPLIT_REND_PRED_1BYQ_STEP     (( IVAS_SPLIT_REND_PRED_QUANT_PNTS - 1 )/( IVAS_SPLIT_REND_PRED_MAX_VAL - IVAS_SPLIT_REND_PRED_MIN_VAL )) 
#endif

#define IVAS_SPLIT_REND_D_Q_STEP           (( IVAS_SPLIT_REND_D_MAX_VAL - IVAS_SPLIT_REND_D_MIN_VAL ) / ( IVAS_SPLIT_REND_D_QUANT_PNTS - 1 ))
#define IVAS_SPLIT_REND_D_1BYQ_STEP        (( IVAS_SPLIT_REND_D_QUANT_PNTS - 1 )/( IVAS_SPLIT_REND_D_MAX_VAL - IVAS_SPLIT_REND_D_MIN_VAL )) 
#define IVAS_SPLIT_REND_PITCH_G_Q_STEP     (( IVAS_SPLIT_REND_PITCH_G_MAX_VAL - IVAS_SPLIT_REND_PITCH_G_MIN_VAL ) / ( IVAS_SPLIT_REND_PITCH_G_QUANT_PNTS - 1 ))

lib_com/options.h

100755 → 100644
+4 −0
Original line number Diff line number Diff line
@@ -201,12 +201,16 @@
#define TD_REND_FIX_DIV_BY_ZERO                         /* FhG: avoid division by zero in sincResample fn */
#define RENAME_GWLPR                                    /* FhG: Rename clashing symbol */
#define SPLIT_REND_WITH_HEAD_ROT                        /* Dlb,FhG: Split Rendering contributions 21 and 35 */
#ifdef SPLIT_REND_WITH_HEAD_ROT
#define SPLIT_REND_PRED_QUANT_63_PNTS
#endif
#define FIX_594_STL_INCLUDE                             /* FhG: issue 594: Missing include of stl.h */

#define FIX_619_ADD_UNDEF_VAL_FOR_CONCEALMENT_MODE      /* FhG: fix usan error */
#define FIX_622_SILENCE_USAN_WARNING                    /* FhG: silenceusan warning in ifft code */

#define FIX_615_UBSAN_SPAR_TO_DIRAC                     /*Dlb : Fix for UBSAN issue 615*/
#define SPLIT_REND_WITH_HEAD_ROT_PARAMBIN               /* Nokia: Issue 623: Split rendering support for parambin renderer */
#define FIX_626_VARIABLE_TYPE_MDCT_CONC                 /* FhG: trivial fix to fix USAN error */
#define FIX_616_DIV_ZERO_MCT                            /*FhG : Fix UBSAN division by zero error of issue 616*/

+124 −5
Original line number Diff line number Diff line
@@ -1270,8 +1270,8 @@ void ivas_binaural_cldfb(
    float Cldfb_RealBuffer[MAX_INTERN_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
    float Cldfb_ImagBuffer[MAX_INTERN_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
#ifdef SPLIT_REND_WITH_HEAD_ROT
    float Cldfb_RealBuffer_Binaural[1][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
    float Cldfb_ImagBuffer_Binaural[1][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
    float Cldfb_RealBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
    float Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
#else
    float Cldfb_RealBuffer_Binaural[BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
    float Cldfb_ImagBuffer_Binaural[BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
@@ -1309,6 +1309,33 @@ void ivas_binaural_cldfb(
                    idx_in++;
                }
            }
#ifdef SPLIT_REND_WITH_HEAD_ROT
            /*LFE handling for split rendering cases*/
            if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
                 ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
            {
                for ( idx_lfe = 0; idx_lfe < st_ivas->hIntSetup.num_lfe; idx_lfe++ )
                {
                    ch = st_ivas->hIntSetup.index_lfe[idx_lfe];
                    cldfbAnalysis_ts( &( output_f[ch][maxBand * index_slot] ),
                                      Cldfb_RealBuffer[idx_in][slot_idx],
                                      Cldfb_ImagBuffer[idx_in][slot_idx],
                                      maxBand, st_ivas->cldfbAnaDec[idx_in] );
                    idx_in++;
                }
#ifdef SPLIT_REND_WITH_HEAD_ROT
                if ( st_ivas->splitBinRend.hCldfbDataOut != NULL )
                {
                    for ( ch = 0; ch < ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ); ch++ )
                    {
                        mvr2r( Cldfb_RealBuffer[ch][slot_idx], st_ivas->splitBinRend.hCldfbDataOut->Cldfb_RealBuffer[ch][( subframeIdx * JBM_CLDFB_SLOTS_IN_SUBFRAME ) + slot_idx], maxBand );
                        mvr2r( Cldfb_ImagBuffer[ch][slot_idx], st_ivas->splitBinRend.hCldfbDataOut->Cldfb_ImagBuffer[ch][( subframeIdx * JBM_CLDFB_SLOTS_IN_SUBFRAME ) + slot_idx], maxBand );
                    }
                    st_ivas->splitBinRend.hCldfbDataOut->config = st_ivas->hIntSetup.output_config;
                }
#endif
            }
#endif
        }

        /* Implement binaural rendering */
@@ -1325,6 +1352,44 @@ void ivas_binaural_cldfb(
                          Cldfb_RealBuffer,
                          Cldfb_ImagBuffer );

#ifdef SPLIT_REND_WITH_HEAD_ROT
        if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
             ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
        {
            int16_t pos_idx;
            for ( slot_idx = 0; slot_idx < JBM_CLDFB_SLOTS_IN_SUBFRAME; slot_idx++ )
            {
                if ( st_ivas->hIntSetup.num_lfe > 0 )
                {
                    v_multc( Cldfb_RealBuffer[st_ivas->hIntSetup.nchan_out_woLFE][slot_idx], GAIN_LFE, Cldfb_RealBuffer[st_ivas->hIntSetup.nchan_out_woLFE][slot_idx], maxBand );
                    v_multc( Cldfb_ImagBuffer[st_ivas->hIntSetup.nchan_out_woLFE][slot_idx], GAIN_LFE, Cldfb_ImagBuffer[st_ivas->hIntSetup.nchan_out_woLFE][slot_idx], maxBand );
                }
            }
            for ( pos_idx = 0; pos_idx < st_ivas->hBinRenderer->numPoses; pos_idx++ )
            {
                for ( slot_idx = 0; slot_idx < JBM_CLDFB_SLOTS_IN_SUBFRAME; slot_idx++ )
                {
                    for ( ch = 0; ch < st_ivas->hDecoderConfig->nchan_out; ch++ )
                    {
                        if ( st_ivas->hIntSetup.num_lfe > 0 )
                        {
                            v_add( Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx],
                                   Cldfb_RealBuffer[st_ivas->hIntSetup.nchan_out_woLFE][slot_idx],
                                   Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx],
                                   maxBand );
                            v_add( Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx],
                                   Cldfb_ImagBuffer[st_ivas->hIntSetup.nchan_out_woLFE][slot_idx],
                                   Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx],
                                   maxBand );
                        }
                        mvr2r( Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->splitBinRend.hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][( subframeIdx * JBM_CLDFB_SLOTS_IN_SUBFRAME ) + slot_idx], maxBand );
                        mvr2r( Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->splitBinRend.hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][( subframeIdx * JBM_CLDFB_SLOTS_IN_SUBFRAME ) + slot_idx], maxBand );
                    }
                }
            }
        }
#endif

        /* Implement CLDFB synthesis */
        for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ )
        {
@@ -1370,8 +1435,8 @@ void ivas_binaural_cldfb_sf(
    float Cldfb_RealBuffer[MAX_INTERN_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
    float Cldfb_ImagBuffer[MAX_INTERN_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
#ifdef SPLIT_REND_WITH_HEAD_ROT
    float Cldfb_RealBuffer_Binaural[1][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
    float Cldfb_ImagBuffer_Binaural[1][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
    float Cldfb_RealBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
    float Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
#else
    float Cldfb_RealBuffer_Binaural[BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
    float Cldfb_ImagBuffer_Binaural[BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
@@ -1431,6 +1496,33 @@ void ivas_binaural_cldfb_sf(
                    idx_in++;
                }
            }
#ifdef SPLIT_REND_WITH_HEAD_ROT
            /*LFE handling for split rendering cases*/
            if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
                 ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
            {
                for ( idx_lfe = 0; idx_lfe < st_ivas->hIntSetup.num_lfe; idx_lfe++ )
                {
                    ch = st_ivas->hIntSetup.index_lfe[idx_lfe];
                    cldfbAnalysis_ts( &( output_f[ch][maxBand * index_slot] ),
                                      Cldfb_RealBuffer[idx_in][slot_idx],
                                      Cldfb_ImagBuffer[idx_in][slot_idx],
                                      maxBand, st_ivas->cldfbAnaDec[idx_in] );
                    idx_in++;
                }
#ifdef SPLIT_REND_WITH_HEAD_ROT
                if ( st_ivas->splitBinRend.hCldfbDataOut != NULL )
                {
                    for ( ch = 0; ch < ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ); ch++ )
                    {
                        mvr2r( Cldfb_RealBuffer[ch][slot_idx], st_ivas->splitBinRend.hCldfbDataOut->Cldfb_RealBuffer[ch][slot_index_start + slot_idx], maxBand );
                        mvr2r( Cldfb_ImagBuffer[ch][slot_idx], st_ivas->splitBinRend.hCldfbDataOut->Cldfb_ImagBuffer[ch][slot_index_start + slot_idx], maxBand );
                    }
                    st_ivas->splitBinRend.hCldfbDataOut->config = st_ivas->hIntSetup.output_config;
                }
#endif
            }
#endif
        }

        /* Implement binaural rendering */
@@ -1440,6 +1532,25 @@ void ivas_binaural_cldfb_sf(
#endif
                          st_ivas->hCombinedOrientationData, subframeIdx, st_ivas->hTcBuffer->subframe_nbslots[subframeIdx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer );

#ifdef SPLIT_REND_WITH_HEAD_ROT
        if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
             ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
        {
            int16_t pos_idx;
            for ( pos_idx = 0; pos_idx < st_ivas->hBinRenderer->numPoses; pos_idx++ )
            {
                for ( slot_idx = 0; slot_idx < st_ivas->hTcBuffer->subframe_nbslots[subframeIdx]; slot_idx++ )
                {
                    for ( ch = 0; ch < st_ivas->hDecoderConfig->nchan_out; ch++ )
                    {
                        mvr2r( Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->splitBinRend.hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][slot_index_start + slot_idx], maxBand );
                        mvr2r( Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->splitBinRend.hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][slot_index_start + slot_idx], maxBand );
                    }
                }
            }
        }
#endif

        /* Implement CLDFB synthesis */
        for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ )
        {
@@ -1594,7 +1705,15 @@ void ivas_binRenderer(


                    QuatToRotMat( Quaternions_rel, Rmat_local );
                    if ( hBinRenderer->hInputSetup->is_loudspeaker_setup == 0 )
                    {
                        rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, Rmat_local, hBinRenderer->hInputSetup->nchan_out_woLFE, numTimeSlots, 3 );
                    }
                    else
                    {
                        rotateFrame_sd_cldfb( Rmat_local, RealBuffer, ImagBuffer, hBinRenderer->hInputSetup, hBinRenderer->hEFAPdata, numTimeSlots, hBinRenderer->conv_band );
                    }

                    ivas_binRenderer_filterModule( Cldfb_RealBuffer_Binaural[pos_idx], Cldfb_ImagBuffer_Binaural[pos_idx], RealBuffer, ImagBuffer, numTimeSlots, hBinRenderer, pos_idx );
                }

+31 −37
Original line number Diff line number Diff line
@@ -124,10 +124,20 @@ ivas_error ivas_dec(
    if ( ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
         ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
    {
#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN
        assert( ( st_ivas->ivas_format == SBA_FORMAT ||
                  st_ivas->ivas_format == MASA_FORMAT ||
                  st_ivas->ivas_format == ISM_FORMAT ||
                  st_ivas->ivas_format == MC_FORMAT ) &&
                ( output_Fs == 48000 ) && "split binaural mode is currently supported with SBA, MASA, discrete and parametric ISM, or MC formats and 48 kHz sampling rate only" );
#else
        assert( ( st_ivas->ivas_format == SBA_FORMAT ||
                  st_ivas->ivas_format == MASA_FORMAT ||
                  st_ivas->ivas_format == ISM_FORMAT ||
                  ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode != ISM_MODE_PARAM ) ||
                  ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode != MC_MODE_MCMASA ) ) &&
                ( output_Fs == 48000 ) && "split binaural mode is currently supported with SBA, discrete ISM, or MCT-MC formats and 48 kHz sampling rate only" );
#endif
        ivas_set_split_rend_setup( &st_ivas->splitBinRend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hCombinedOrientationData, hSplitRendBits );
    }
#endif
@@ -607,6 +617,10 @@ ivas_error ivas_dec(
            ivas_mc_paramupmix_dec( st_ivas, output );

            /* HP filtering */
#ifdef SPLIT_REND_WITH_HEAD_ROT
            if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM )
#endif
            {
                for ( n = 0; n < st_ivas->nchan_transport; n++ )
                {
                    if ( n != LFE_CHANNEL )
@@ -614,6 +628,7 @@ ivas_error ivas_dec(
                        hp20( output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs );
                    }
                }
            }

            if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) )
            {
@@ -624,45 +639,15 @@ ivas_error ivas_dec(
#ifdef JBM_PARAMUPMIX
            if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
            {
                ivas_binaural_add_LFE( st_ivas, output_frame, p_output, p_output );
#else
            if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM )
            {
#ifdef SPLIT_REND_WITH_HEAD_ROT
                if ( ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
                     ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
                {
                    ivas_rend_crendProcessSplitBin(
                        st_ivas->hCrendWrapper,
                        st_ivas->intern_config,
                        st_ivas->hOutSetup.output_config,
                        &st_ivas->splitBinRend.splitrend.multiBinPoseData,
                        st_ivas->hDecoderConfig,
                        st_ivas->hCombinedOrientationData,
                        &st_ivas->hIntSetup,
                        st_ivas->hEFAPdata,
                        p_output,
                        output_Fs );
                }
                else
                {
#endif
                    if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig,
                                                           st_ivas->hCombinedOrientationData, &st_ivas->hIntSetup, st_ivas->hEFAPdata, p_output, output_Fs
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                                           ,
                                                           0
                if ( ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) &&
                     ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
#endif
                                                           ) ) != IVAS_ERR_OK )
                {
                        return error;
                    }
#ifdef SPLIT_REND_WITH_HEAD_ROT
                    ivas_binaural_add_LFE( st_ivas, output_frame, p_output, p_output );
                }
#endif
#endif /* JBM_PARAMUPMIX */
            }
#endif /* JBM_PARAMUPMIX */
            else if ( st_ivas->renderer_type == RENDERER_MC )
            {
                if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) || ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) )
@@ -845,6 +830,11 @@ ivas_error ivas_dec(
        IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend;
        int16_t max_band;
        int16_t pcm_out;
#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN
        int16_t td_input;

        td_input = st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC;
#endif
        hSplitBinRend = &st_ivas->splitBinRend;
        max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 );
        pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0;
@@ -857,7 +847,11 @@ ivas_error ivas_dec(
                                            hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural,
                                            hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural,
                                            max_band, output, 1,
#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN
                                            td_input,
#else
                                            st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV,
#endif
                                            pcm_out );

        free( st_ivas->splitBinRend.hMultiBinCldfbData );
+97 −5

File changed.

Preview size limit exceeded, changes collapsed.

Loading