Commit 168a6787 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[cleanup] accept nested sub-switch SPLIT_REND_CLDFB_ISM

parent 3f9061a4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1557,7 +1557,7 @@ static ivas_error initOnFirstGoodFrame(
        fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) );
        return error;
    }
#ifdef SPLIT_REND_CLDFB_ISM
#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) ||
         ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED ) )
    {
+0 −1
Original line number Diff line number Diff line
@@ -186,7 +186,6 @@
//#define SPLIT_POSE_CORRECTION_DEBUG
#define SPLIT_REND_QUANT_RANGE_INC

#define SPLIT_REND_CLDFB_ISM


//#define SPLIT_REND_REAL_ONLY_ROLL
+0 −4
Original line number Diff line number Diff line
@@ -270,12 +270,8 @@ ivas_error ivas_dec(
            if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD )
            {
#ifdef SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_CLDFB_ISM
                if ( ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
                     ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
#else
                if ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
#endif
                {
                    ObjRenderIvasFrame_splitBinaural( st_ivas, output, output_frame );
                }
+0 −8
Original line number Diff line number Diff line
@@ -1320,12 +1320,8 @@ ivas_error ivas_init_decoder(
        }

#ifdef SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_CLDFB_ISM
        if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
             ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
#else
        if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
#endif
        {
            ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec, 1,
                                                  ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 );
@@ -1338,11 +1334,7 @@ ivas_error ivas_init_decoder(
            error = ivas_split_renderer_open( &st_ivas->splitBinRend.splitrend,
                                              &st_ivas->hRenderConfig->split_rend_config,
                                              hDecoderConfig->output_Fs, 0,
#ifdef SPLIT_REND_CLDFB_ISM
                                              ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0
#else
                                              0
#endif
            );

            if ( error != IVAS_ERR_OK )
+4 −21
Original line number Diff line number Diff line
@@ -3537,14 +3537,8 @@ static ivas_error initSplitRend( SPLIT_REND_WRAPPER *pSplitRendWrapper, IVAS_REN
        error = ivas_split_renderer_open( pSplitRendWrapper,
                                          pSplit_rend_config,
                                          outputSampleRate,

                                          0,
#ifdef SPLIT_REND_CLDFB_ISM
                                          ( outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0
#else
                                          0
#endif
        );
                                          ( outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 );
        if ( error != IVAS_ERR_OK )
        {
            return error;
@@ -4193,9 +4187,7 @@ ivas_error IVAS_REND_AddInput(
                /* Hack to override default split rendering codec from Dolby CLDFB to LC3plus.
                   This will not be necessary once the split rendering codec becomes selectable by the lib user. */
                closeSplitRend( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer );
#ifndef SPLIT_REND_CLDFB_ISM
                hIvasRend->hRendererConfig->split_rend_config.codec = IVAS_SPLIT_REND_CODEC_LC3PLUS;
#endif

                if ( ( error = initSplitRend( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer, &hIvasRend->hRendererConfig->split_rend_config, hIvasRend->headRotData, hIvasRend->sampleRateOut, hIvasRend->outputConfig ) ) != IVAS_ERR_OK )
                {
                    return error;
@@ -8549,11 +8541,7 @@ ivas_error IVAS_REND_GetSamples(
#endif

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( ( hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED
#ifdef SPLIT_REND_CLDFB_ISM
           || hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM
#endif
           )
    if ( ( hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
         /* The condition below is a temp fix for differences in procesing paths between split rendering of SBA and ISM. Should be unified */
         && ( ( hIvasRend->inputsIsm[0].base.inConfig != IVAS_REND_AUDIO_CONFIG_UNKNOWN ) ||
              ( hIvasRend->inputsMc[0].base.inConfig != IVAS_REND_AUDIO_CONFIG_UNKNOWN ) ) )
@@ -8579,12 +8567,7 @@ ivas_error IVAS_REND_GetSamples(
                                                    tmpBinaural,
                                                    1,
                                                    1,
#ifdef SPLIT_REND_CLDFB_ISM
                                                    ( hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0
#else
                                                    0
#endif
        );
                                                    ( hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 );
        if ( error != IVAS_ERR_OK )
        {
            return error;