Commit ad5f52b8 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[cleanup] accept SPLIT_REND_LC3PLUS_MC

parent 7898ecbd
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -218,7 +218,6 @@
#define SPLIT_REND_STACK_OPT

#define SPLIT_REND_LC3PLUS                              /* FhG: split rendering using LC3plus codec */
#define SPLIT_REND_LC3PLUS_MC                           /* FhG: split rendering using LC3plus codec for Multichannel content */
// #define SPLIT_REND_LC3PLUS_HBR_DBG                      /* Override bitrate per LC3 core */
#endif

+1 −13
Original line number Diff line number Diff line
@@ -121,14 +121,10 @@ ivas_error ivas_dec(
         ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
    {
#ifdef SPLIT_REND_LC3PLUS
#ifdef SPLIT_REND_LC3PLUS_MC
        assert( ( st_ivas->ivas_format == SBA_FORMAT ||
                  ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_DISC ) ||
                  ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCT ) ) &&
                ( output_Fs == 48000 ) && "split binaural mode is currently supported with SBA, discrete ISM, or MCT-MC formats and 48 kHz sampling rate only" );
#else
        assert( ( st_ivas->ivas_format == SBA_FORMAT || ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_DISC ) ) && ( output_Fs == 48000 ) && "split binaural mode is currently supported with SBA or discrete ISM format and 48k sampling rate only" );
#endif
#else
        assert( st_ivas->ivas_format == SBA_FORMAT && ( output_Fs == 48000 ) && "split binaural mode is currently supported with SBA format and 48k sampling rate only" );
#endif
@@ -518,14 +514,12 @@ ivas_error ivas_dec(
            /* Rendering */
            if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM )
            {
#ifdef SPLIT_REND_LC3PLUS_MC
                if ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
                {
                    ivas_rend_crendProcessSplitBin( st_ivas, output, output_frame );
                }
                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
@@ -539,9 +533,7 @@ ivas_error ivas_dec(
                    }

                    ivas_binaural_add_LFE( st_ivas, output_frame, p_output, p_output );
#ifdef SPLIT_REND_LC3PLUS_MC
                }
#endif
            }
            else if ( st_ivas->renderer_type == RENDERER_MC )
            {
@@ -553,23 +545,19 @@ ivas_error ivas_dec(
            }
            else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD )
            {
#ifdef SPLIT_REND_LC3PLUS_MC
                if ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED )
                {
                    ObjRenderIvasFrame_splitBinaural( st_ivas, output, output_frame ); // TODO tmu check
                    ObjRenderIvasFrame_splitBinaural( st_ivas, output, output_frame );
                }
                else
                {
#endif
                    if ( ( ivas_td_binaural_renderer( st_ivas, p_output, output_frame ) ) != IVAS_ERR_OK )
                    {
                        return error;
                    }

                    ivas_binaural_add_LFE( st_ivas, output_frame, p_output, p_output );
#ifdef SPLIT_REND_LC3PLUS_MC
                }
#endif
            }
        }
        else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX )
+0 −8
Original line number Diff line number Diff line
@@ -1380,9 +1380,7 @@ ivas_error ivas_init_decoder(
    }
    else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM )
    {
#ifdef SPLIT_REND_LC3PLUS_MC
        int16_t num_poses;
#endif
        if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->ivas_format == MC_FORMAT && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) )
        {
            if ( ( error = efap_init_data( &( st_ivas->hEFAPdata ), st_ivas->hIntSetup.ls_azimuth, st_ivas->hIntSetup.ls_elevation, st_ivas->hIntSetup.nchan_out_woLFE, EFAP_MODE_EFAP ) ) != IVAS_ERR_OK )
@@ -1390,7 +1388,6 @@ ivas_error ivas_init_decoder(
                return error;
            }
        }
#ifdef SPLIT_REND_LC3PLUS_MC

        if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ||
             ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
@@ -1420,17 +1417,12 @@ ivas_error ivas_init_decoder(
        {
            num_poses = 1;
        }
#endif

        if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config,
                                            st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hDecoderConfig->output_Fs
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                            ,
#ifdef SPLIT_REND_LC3PLUS_MC
                                            num_poses
#else
                                            1
#endif
#endif
                                            ) ) != IVAS_ERR_OK )
        {
+0 −4
Original line number Diff line number Diff line
@@ -207,11 +207,7 @@ void ivas_renderer_select(
            else
            {
                *internal_config = transport_config;
#ifdef SPLIT_REND_LC3PLUS_MC
                if ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
#else
                if ( output_config == AUDIO_CONFIG_BINAURAL )
#endif
                {
#ifdef DEBUGGING
                    if ( ( ( ( st_ivas->transport_config == AUDIO_CONFIG_5_1 || st_ivas->transport_config == AUDIO_CONFIG_7_1 ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) ) || ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) ) && ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) && !( st_ivas->hDecoderConfig->force_rend == FORCE_CLDFB_RENDERER ) )