diff --git a/apps/decoder.c b/apps/decoder.c index a4ec82dc5380ab61429aaa7b8cefdf11f30c1425..959d7f5094b82908eba65956b6b5ec49603e6a82 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -196,11 +196,7 @@ int main( RotFileReader *refRotReader = NULL; Vector3PairFileReader *referenceVectorReader = NULL; RenderConfigReader *renderConfigReader = NULL; -#ifdef FIX_847_OUTPUT_PCM_BUFFER int16_t *pcmBuf = NULL; -#else - int16_t pcmBuf[MAX_OUTPUT_PCM_BUFFER_SIZE]; -#endif #ifdef DEBUGGING int32_t noClipping; int32_t cnt_frames_limited; @@ -743,7 +739,6 @@ int main( } } -#ifdef FIX_847_OUTPUT_PCM_BUFFER /*------------------------------------------------------------------------------------------* * Allocate output data buffer *------------------------------------------------------------------------------------------*/ @@ -757,8 +752,6 @@ int main( pcmBuf = malloc( pcmBufSize * sizeof( int16_t ) ); -#endif - /*-----------------------------------------------------------------* * Decoding *-----------------------------------------------------------------*/ @@ -812,9 +805,7 @@ int main( cleanup: -#ifdef FIX_847_OUTPUT_PCM_BUFFER free( pcmBuf ); -#endif #ifdef DEBUG_SBA_AUDIO_DUMP IVAS_DEC_GetSbaDebugParams( hIvasDec, &numOutChannels, &numTransportChannels, &pca_ingest_channels ); diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index af4825a4d942399c171d00d389ed0df8b88ff215..113676751d5fa532665578e6e58afb89a6910748 100755 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -181,13 +181,7 @@ typedef enum #define MAX_JBM_L_FRAME48k 1920 #define MAX_JBM_L_FRAME_NS 40000000L #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH -#ifdef JBM_FOR_OSBA #define MAX_CLDFB_DIGEST_CHANNELS (FOA_CHANNELS + MAX_NUM_OBJECTS) -#else -#define MAX_CLDFB_DIGEST_CHANNELS 4 -#endif - -#define MASA_JBM_RINGBUFFER_FRAMES 3 typedef enum { @@ -1224,6 +1218,8 @@ enum #define MASA_MAXIMUM_TWO_DIR_BANDS 24 #define NBITS_HR_COH 4 +#define MASA_JBM_RINGBUFFER_FRAMES 3 + typedef enum { MASA_STEREO_NOT_DEFINED, diff --git a/lib_com/ivas_error.h b/lib_com/ivas_error.h index 158e05c8bc5af6904141415a94bfb1b14d03e140..ff803803f2cac45caf14a28c41ac3f8e248e2792 100644 --- a/lib_com/ivas_error.h +++ b/lib_com/ivas_error.h @@ -65,9 +65,7 @@ typedef enum IVAS_ERR_INVALID_FEC_CONFIG, IVAS_ERR_INVALID_FEC_OFFSET, IVAS_ERR_INVALID_INPUT_BUFFER_SIZE, -#ifdef FIX_847_OUTPUT_PCM_BUFFER IVAS_ERR_INVALID_OUTPUT_BUFFER_SIZE, -#endif IVAS_ERR_DTX_NOT_SUPPORTED, IVAS_ERR_UNEXPECTED_NULL_POINTER, IVAS_ERR_METADATA_NOT_EXPECTED, @@ -217,10 +215,8 @@ static inline const char *ivas_error_to_string( ivas_error error_code ) return "Invalid FEC offset"; case IVAS_ERR_INVALID_INPUT_BUFFER_SIZE: return "Invalid input buffer size"; -#ifdef FIX_847_OUTPUT_PCM_BUFFER case IVAS_ERR_INVALID_OUTPUT_BUFFER_SIZE: return "Invalid output buffer size"; -#endif case IVAS_ERR_DTX_NOT_SUPPORTED: return "DTX is not supported in this IVAS format and element mode"; case IVAS_ERR_UNEXPECTED_NULL_POINTER: diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index d78de4603ab3d2bb4f040806659ecf06679feebe..66350fb694ce824290f7dce3d26619c9a20b5646 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -3467,9 +3467,7 @@ void ivas_sba_set_cna_cng_flag( ); ivas_error ivas_sba_dec_reconfigure( - Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ -#ifdef JBM_FOR_OSBA - , + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ uint16_t *nSamplesFlushed, /* o : number of samples flushed */ #ifdef SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ @@ -3477,7 +3475,6 @@ ivas_error ivas_sba_dec_reconfigure( #else int16_t *data /* o : output synthesis signal */ #endif -#endif ); ivas_error ivas_sba_digest_tc( @@ -5701,7 +5698,6 @@ ivas_error ivas_osba_data_open( Decoder_Struct *st_ivas /* i/o: IVAS decoder handle */ ); -#ifdef JBM_FOR_OSBA ivas_error ivas_osba_dirac_td_binaural_jbm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ @@ -5709,7 +5705,6 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ float *output_f[] /* o : rendered time signal */ ); -#endif ivas_error ivas_osba_dirac_td_binaural( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ diff --git a/lib_com/options.h b/lib_com/options.h index 220d5fc629d7a040483896dbcdef046507bfebf4..9348bf96aa50ce1ab1f6849493c456476d5d5bc3 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -148,14 +148,9 @@ /* only BE switches wrt selection floating point code */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ - /*#define SPLIT_REND_WITH_HEAD_ROT*/ /* Dlb,FhG: Split Rendering contributions 21 and 35 */ -#define REMOVE_UNUSED_FUNCTION /* Dlb: Remove functions that are unhit/unused */ -#define FIX_MSAN_USAN_ERROR_JBM /* Dlb: Resolve MSAN and USAN errors in the SBA-JBM test case added*/ -#define FIX_818_DOUBLE_PREC_KERNEL_SW /* FhG: Issue 818: Avoid double precision in kernel switching */ -#define FIX_822_REFACTOR_BIN_REVERB_OPEN /* Nokia: Addresses first step of issue 822 by refactoring ivas_binaural_reverb_open */ -#define FIX_847_OUTPUT_PCM_BUFFER /* VA: issue 847: Allocate decoder output PCM buffer dynamically */ + /* #################### End BE switches ################################## */ @@ -164,17 +159,6 @@ /* any switch which is non-be wrt selection floating point code */ /* all switches in this category should start with "NONBE_" */ -#define NONBE_FIX_833_OSBA_JBM_OBJECT_GAINS /* Fhg: issue #833: Resolve "JBM OSBA: the gains for the discrete objects are not computed" */ -#define JBM_FOR_OSBA /* FhG: implement OSBA format in the JBM path */ -#ifdef JBM_FOR_OSBA -#define OSBA_ROOM_IR -#endif -#define NONBE_FIX_808_JBM_PARAMUPMIX_RS /* FhG: Issue 808: fix JBM MC rate switching */ -#define NONBE_FIX_846_JBM_MASA_SIDSTART /* FhG: Issue #846: fix JBM for MASA DTX when the first frame is a SID frame */ -#define NONBE_FIX_841_MC_RS_TDOBJ_RENDERER /* FhG: Issue #841: [Non-BE] Resolve "MC RS HRFT handle not set to NULL" */ -#define NONBE_FIX_840_PARAMMC_RS /* FhG: Issue #840: Resolve "MC RS ParamMC hoa encoder wrongly set to zero" */ -#define NONBE_FIX_826_JBM_MASA_CNA_CNG /* FhG: issue #826: Resolve "JBM MASA: CNA and CNG not in sync with non-JBM decoding" */ -#define NONBE_FIX_835_JBM_PARAMUPMIX_HEADROT /* FhG: issue #835: Resolve "JBM: ParamUpmix head rotation broken" */ #define NONBE_FIX_838_CRASH_24_4_WB /* FhG: Issue 838: fix encoder crashes for Unified Stereo and MASA 2 TC at 24.4 kbps WB due to missing IGF (re-) allocation */ #define NONBE_FIX_839_MC_RS_CHANNEL_ALLOC /* FhG: Issues #839: problems with reallocation of the channels on the heap in case of MC RS */ #define BE_FIX_832_ASAN_ERROR_EFAP_OSBA /* FhG: issue #832: fix ASAN error caused by re-allocating EFAP memories in OSBA*/ diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index d427bf249fb96ac61125d4997a4331851d8a3967..e31abae1d8d1fdc8bdb2db943acfec5f4597c0e8 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -1232,11 +1232,7 @@ ivas_error ivas_binRenderer_open( /* Allocate memories needed for reverb module */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV && st_ivas->hIntSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { -#ifdef FIX_822_REFACTOR_BIN_REVERB_OPEN if ( ( error = ivas_binaural_reverb_open_fastconv( &( hBinRenderer->hReverb ), hBinRenderer->conv_band, hBinRenderer->timeSlots, &( st_ivas->hRenderConfig->roomAcoustics ), st_ivas->hIntSetup.output_config, st_ivas->hDecoderConfig->output_Fs, st_ivas->hHrtfFastConv ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_binaural_reverb_open( &( hBinRenderer->hReverb ), hBinRenderer->conv_band, hBinRenderer->timeSlots, &( st_ivas->hRenderConfig->roomAcoustics ), st_ivas->hIntSetup.output_config, st_ivas->hDecoderConfig->output_Fs, RENDERER_BINAURAL_FASTCONV, st_ivas->hHrtfFastConv, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#endif { return error; } diff --git a/lib_dec/ivas_corecoder_dec_reconfig.c b/lib_dec/ivas_corecoder_dec_reconfig.c index 9583b3dacc1702312db37c1eed61980c9d58e2bb..3d965ae036caac46fffbf7e808d03c153899cc78 100644 --- a/lib_dec/ivas_corecoder_dec_reconfig.c +++ b/lib_dec/ivas_corecoder_dec_reconfig.c @@ -151,14 +151,12 @@ ivas_error ivas_corecoder_dec_reconfig( st_ivas->hSCE[sce_id] = NULL; } -#ifdef JBM_FOR_OSBA if ( sba_dirac_stereo_flag_old && nCPE_old == 0 && st_ivas->hCPE[0] ) { st_ivas->hCPE[0]->hCoreCoder[0] = 0; /* this has been deallocated as part of the SCE it actually belongs to */ destroy_cpe_dec( st_ivas->hCPE[0] ); st_ivas->hCPE[0] = NULL; } -#endif for ( cpe_id = st_ivas->nCPE; cpe_id < nCPE_old; cpe_id++ ) { diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index a38645242bfdd3764a73239fbf6bcc8685181573..a329fc7b7d84b6b8c52269ec39a6e6bf4b52d996 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -733,11 +733,8 @@ ivas_error ivas_dec( delay_signal( p_output[n], output_frame, st_ivas->hSbaIsmData->delayBuffer[n], st_ivas->hSbaIsmData->delayBuffer_size ); } } -#ifdef JBM_FOR_OSBA + if ( ( error = ivas_sba_upmixer_renderer( st_ivas, p_output, output_frame ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_sba_upmixer_renderer( st_ivas, &p_output[sba_ch_idx], output_frame ) ) != IVAS_ERR_OK ) -#endif { return error; } diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 141ac1a3a52a01444d3727866d0a22515a39a7a4..6a4bc7fe9eead601ab6f027cd700bfd4adfb73e8 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1530,13 +1530,10 @@ void ivas_dirac_dec_set_md_map( hSpatParamRendCom->subframes_rendered = 0; ivas_jbm_dec_get_adapted_subframes( nCldfbTs, hSpatParamRendCom->subframe_nbslots, &hSpatParamRendCom->nb_subframes ); + /* copy also to tc buffer */ /* only for non-combined formats and combinded formats w/o discrete objects */ - if ( ( st_ivas->ivas_format != MASA_ISM_FORMAT || st_ivas->ism_mode != ISM_MASA_MODE_DISC ) -#ifdef JBM_FOR_OSBA - && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) -#endif - ) + if ( ( st_ivas->ivas_format != MASA_ISM_FORMAT || st_ivas->ism_mode != ISM_MASA_MODE_DISC ) && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) ) { st_ivas->hTcBuffer->nb_subframes = hSpatParamRendCom->nb_subframes; mvs2s( hSpatParamRendCom->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hSpatParamRendCom->nb_subframes ); @@ -2380,7 +2377,6 @@ void ivas_dirac_dec_render_sf( if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { -#ifdef OSBA_ROOM_IR /* render objects in combined format onto the CICP19 channels for BINAURAL_ROOM_IR */ if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { @@ -2463,7 +2459,6 @@ void ivas_dirac_dec_render_sf( } } } -#endif #ifdef SPLIT_REND_WITH_HEAD_ROT if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 2f84f3c1169896ea9be58e432f290cdec26fbe7e..5d9a8369d32f19a9e175d817a2ed9b13cc96ba6c 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -359,16 +359,11 @@ ivas_error ivas_dec_setup( num_bits_read += SBA_ORDER_BITS; if ( st_ivas->ini_frame > 0 && ivas_total_brate != st_ivas->last_active_ivas_total_brate && ivas_total_brate > IVAS_SID_5k2 ) { - if ( ( error = ivas_sba_dec_reconfigure( st_ivas -#ifdef JBM_FOR_OSBA - , - nSamplesRendered, #ifdef SPLIT_REND_WITH_HEAD_ROT - pcm_resolution, -#endif - data + if ( ( error = ivas_sba_dec_reconfigure( st_ivas, nSamplesRendered, pcm_resolution, data ) ) != IVAS_ERR_OK ) +#else + if ( ( error = ivas_sba_dec_reconfigure( st_ivas, nSamplesRendered, data ) ) != IVAS_ERR_OK ) #endif - ) ) != IVAS_ERR_OK ) { return error; } @@ -476,32 +471,21 @@ ivas_error ivas_dec_setup( st_ivas->sba_order = 3; } -#ifndef JBM_FOR_OSBA - /* set Ambisonic (SBA) order used for analysis and coding */ - st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order ); -#endif if ( st_ivas->ini_frame > 0 && ivas_total_brate != st_ivas->last_active_ivas_total_brate ) { - if ( ( error = ivas_sba_dec_reconfigure( st_ivas -#ifdef JBM_FOR_OSBA - , - nSamplesRendered, #ifdef SPLIT_REND_WITH_HEAD_ROT - pcm_resolution, -#endif - data + if ( ( error = ivas_sba_dec_reconfigure( st_ivas, nSamplesRendered, pcm_resolution, data ) ) != IVAS_ERR_OK ) +#else + if ( ( error = ivas_sba_dec_reconfigure( st_ivas, nSamplesRendered, data ) ) != IVAS_ERR_OK ) #endif - ) ) != IVAS_ERR_OK ) { return error; } } else { -#ifdef JBM_FOR_OSBA /* set Ambisonic (SBA) order used for analysis and coding */ st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order ); -#endif ivas_sba_config( ivas_total_brate, st_ivas->sba_analysis_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->element_mode_init ); @@ -627,16 +611,11 @@ ivas_error ivas_dec_setup( st_ivas->hDecoderConfig->ivas_total_brate = IVAS_24k4; } - if ( ( error = ivas_sba_dec_reconfigure( st_ivas -#ifdef JBM_FOR_OSBA - , - nSamplesRendered, #ifdef SPLIT_REND_WITH_HEAD_ROT - pcm_resolution, -#endif - data + if ( ( error = ivas_sba_dec_reconfigure( st_ivas, nSamplesRendered, pcm_resolution, data ) ) != IVAS_ERR_OK ) +#else + if ( ( error = ivas_sba_dec_reconfigure( st_ivas, nSamplesRendered, data ) ) != IVAS_ERR_OK ) #endif - ) ) != IVAS_ERR_OK ) { return error; } @@ -1171,7 +1150,6 @@ ivas_error ivas_init_decoder( ivas_output_init( &( st_ivas->hOutSetup ), output_config ); -#ifdef OSBA_ROOM_IR if ( st_ivas->ivas_format == SBA_ISM_FORMAT && output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) { st_ivas->hOutSetup.ambisonics_order = SBA_HOA3_ORDER; @@ -1179,7 +1157,6 @@ ivas_error ivas_init_decoder( st_ivas->hOutSetup.output_config = st_ivas->intern_config; st_ivas->hOutSetup.nchan_out_woLFE = audioCfg2channels( st_ivas->intern_config ); } -#endif if ( st_ivas->ivas_format == SBA_ISM_FORMAT && output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) { @@ -2915,12 +2892,11 @@ void ivas_init_dec_get_num_cldfb_instances( { *numCldfbSyntheses = MAX_OUTPUT_CHANNELS; } -#ifdef OSBA_ROOM_IR + if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { *numCldfbAnalyses = st_ivas->nchan_ism + st_ivas->hSpar->hFbMixer->fb_cfg->num_in_chans; } -#endif } } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 2a6d88370e3aeeae4b6c8e7faa698918aafbf4d6..fda2762c2b0ecfb3ca7e34c2a2fcc19e36d91997 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -997,11 +997,9 @@ void ivas_ism_dec_digest_tc( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || -#ifdef NONBE_FIX_833_OSBA_JBM_OBJECT_GAINS st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS || st_ivas->renderer_type == RENDERER_OSBA_STEREO || -#endif ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->hDecoderConfig->Opt_Headrotation == 0 ) ) { int16_t i, num_objects; @@ -1012,10 +1010,9 @@ void ivas_ism_dec_digest_tc( if ( ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ) == st_ivas->hTcBuffer->n_samples_available ) { int16_t interpolator_length = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || -#ifdef NONBE_FIX_833_OSBA_JBM_OBJECT_GAINS st_ivas->renderer_type == RENDERER_OSBA_AMBI || -#endif st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { st_ivas->hIsmRendererData->interpolator[0] = 0.0f; @@ -1054,9 +1051,7 @@ void ivas_ism_dec_digest_tc( elevation = (int16_t) floorf( st_ivas->hIsmMetaData[i]->elevation + 0.5f ); if ( ( st_ivas->renderer_type == RENDERER_TD_PANNING || -#ifdef NONBE_FIX_833_OSBA_JBM_OBJECT_GAINS st_ivas->renderer_type == RENDERER_OSBA_LS || -#endif st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) && st_ivas->hCombinedOrientationData == NULL ) { @@ -1072,9 +1067,7 @@ void ivas_ism_dec_digest_tc( } } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || -#ifdef NONBE_FIX_833_OSBA_JBM_OBJECT_GAINS st_ivas->renderer_type == RENDERER_OSBA_AMBI || -#endif st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { /*get HOA gets for direction (ACN/SN3D)*/ diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 25167ac38166e2c76a39e1ea2718b41acd0c7f8d..268b90f963d18efd5ed3a1ca845b5160d4d18ab6 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -260,12 +260,11 @@ void ivas_ism_render_sf( float gain, prev_gain; num_objects = st_ivas->nchan_transport; -#ifdef JBM_FOR_OSBA if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { num_objects = st_ivas->nchan_ism; } -#endif + nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; tc_offset = st_ivas->hTcBuffer->n_samples_rendered; diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 1a04da9e8a78dd79a51135027bd9b29db6e9c8ac..eccf5169c1992c83d4ef92f9580856622adcabbf 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -393,7 +393,6 @@ ivas_error ivas_jbm_dec_tc( ivas_jbm_dec_copy_masa_meta_to_buffer( st_ivas ); } } -#ifdef JBM_FOR_OSBA else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { int16_t nchan_ism, sba_ch_idx; @@ -512,7 +511,6 @@ ivas_error ivas_jbm_dec_tc( } } } -#endif else if ( st_ivas->ivas_format == MC_FORMAT ) { st = ( st_ivas->nSCE > 0 ) ? st_ivas->hSCE[0]->hCoreCoder[0] : st_ivas->hCPE[0]->hCoreCoder[0]; @@ -824,7 +822,6 @@ void ivas_jbm_dec_feed_tc_to_renderer( { ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available ); } -#ifdef JBM_FOR_OSBA else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { @@ -860,7 +857,6 @@ void ivas_jbm_dec_feed_tc_to_renderer( ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available ); } } -#endif else if ( st_ivas->ivas_format == MASA_ISM_FORMAT ) { if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->ism_mode == ISM_MASA_MODE_DISC ) @@ -915,29 +911,20 @@ ivas_error ivas_jbm_dec_render( const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else - int16_t *data /* o : output synthesis signal */ + int16_t *data /* o : output synthesis signal */ #endif ) { int16_t n, nchan_out; int16_t nchan_transport; -#ifdef JBM_FOR_OSBA float output[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS][L_FRAME48k]; /* 'float' buffer for output synthesis */ -#else - float output[MAX_OUTPUT_CHANNELS][L_FRAME48k]; /* 'float' buffer for output synthesis */ -#endif int16_t nchan_remapped; int32_t output_Fs; AUDIO_CONFIG output_config; int16_t nSamplesAskedLocal; ivas_error error; -#ifdef JBM_FOR_OSBA float *p_output[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS]; float *p_tc[MAX_TRANSPORT_CHANNELS + MAX_NUM_OBJECTS]; -#else - float *p_output[MAX_OUTPUT_CHANNELS]; - float *p_tc[MAX_TRANSPORT_CHANNELS]; -#endif SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; push_wmops( "ivas_dec_render" ); @@ -952,11 +939,7 @@ ivas_error ivas_jbm_dec_render( output_config = st_ivas->hDecoderConfig->output_config; nSamplesAskedLocal = nSamplesAsked + st_ivas->hTcBuffer->n_samples_discard; -#ifdef JBM_FOR_OSBA for ( n = 0; n < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; n++ ) -#else - for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) -#endif { p_output[n] = &output[n][0]; } @@ -1126,7 +1109,6 @@ ivas_error ivas_jbm_dec_render( ivas_omasa_dirac_rend_jbm( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); } } -#ifdef JBM_FOR_OSBA else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { nchan_remapped = nchan_transport; @@ -1169,18 +1151,14 @@ ivas_error ivas_jbm_dec_render( return error; } -#ifdef OSBA_ROOM_IR if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) -#endif { ivas_ism_render_sf( st_ivas, p_output_ism, *nSamplesRendered ); } for ( n = 0; n < nchan_out; n++ ) { -#ifdef OSBA_ROOM_IR if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) -#endif { v_add( p_output[n], p_output_ism[n], p_output[n], *nSamplesRendered ); } @@ -1234,7 +1212,6 @@ ivas_error ivas_jbm_dec_render( } } } -#endif else if ( st_ivas->ivas_format == MC_FORMAT ) { if ( st_ivas->mc_mode == MC_MODE_MCT ) @@ -1602,7 +1579,6 @@ ivas_error ivas_jbm_dec_flush_renderer( } } } -#ifdef JBM_FOR_OSBA else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { float *tc_local[MAX_TRANSPORT_CHANNELS]; @@ -1644,7 +1620,6 @@ ivas_error ivas_jbm_dec_flush_renderer( return error; } } -#endif else { return IVAS_ERROR( IVAS_ERR_WRONG_MODE, "Wrong IVAS format in VoIP renderer flushing!" ); @@ -1654,9 +1629,7 @@ ivas_error ivas_jbm_dec_flush_renderer( #endif } -#ifdef JBM_FOR_OSBA *nSamplesRendered = n_samples_to_render; -#endif /* Only write out the valid data*/ #ifdef SPLIT_REND_WITH_HEAD_ROT @@ -1972,11 +1945,7 @@ int16_t ivas_jbm_dec_get_num_tc_channels( { num_tc = CPE_CHANNELS; } - else if ( st_ivas->ivas_format == MASA_FORMAT && ivas_total_brate < MASA_STEREO_MIN_BITRATE && ( ivas_total_brate > IVAS_SID_5k2 || ( ivas_total_brate <= IVAS_SID_5k2 && st_ivas->nCPE > 0 && -#ifdef NONBE_FIX_846_JBM_MASA_SIDSTART - st_ivas->hCPE[0] != NULL && -#endif - st_ivas->hCPE[0]->nchan_out == 1 ) ) ) + else if ( st_ivas->ivas_format == MASA_FORMAT && ivas_total_brate < MASA_STEREO_MIN_BITRATE && ( ivas_total_brate > IVAS_SID_5k2 || ( ivas_total_brate <= IVAS_SID_5k2 && st_ivas->nCPE > 0 && st_ivas->hCPE[0] != NULL && st_ivas->hCPE[0]->nchan_out == 1 ) ) ) { num_tc = 1; /* Only one channel transported */ } @@ -2008,7 +1977,6 @@ int16_t ivas_jbm_dec_get_num_tc_channels( } } } -#ifdef JBM_FOR_OSBA else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { if ( st_ivas->sba_dirac_stereo_flag ) @@ -2024,7 +1992,6 @@ int16_t ivas_jbm_dec_get_num_tc_channels( num_tc += st_ivas->nchan_ism; } } -#endif else if ( st_ivas->ivas_format == MC_FORMAT ) { if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_MONO ) @@ -2227,11 +2194,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open( { hTcBuffer->tc_buffer = NULL; -#ifdef JBM_FOR_OSBA for ( ch_idx = 0; ch_idx < MAX_TRANSPORT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ ) -#else - for ( ch_idx = 0; ch_idx < MAX_TRANSPORT_CHANNELS; ch_idx++ ) -#endif { hTcBuffer->tc[ch_idx] = NULL; } @@ -2258,11 +2221,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open( { hTcBuffer->tc_buffer = NULL; -#ifdef JBM_FOR_OSBA for ( ch_idx = 0; ch_idx < MAX_TRANSPORT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ ) -#else - for ( ch_idx = 0; ch_idx < MAX_TRANSPORT_CHANNELS; ch_idx++ ) -#endif { hTcBuffer->tc[ch_idx] = NULL; } @@ -2286,11 +2245,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open( hTcBuffer->tc[ch_idx] = &hTcBuffer->tc_buffer[offset]; offset += n_samp_residual; } -#ifdef JBM_FOR_OSBA for ( ; ch_idx < MAX_TRANSPORT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ ) -#else - for ( ; ch_idx < MAX_TRANSPORT_CHANNELS; ch_idx++ ) -#endif { hTcBuffer->tc[ch_idx] = NULL; } @@ -2404,11 +2359,7 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( offset += n_samp_residual; } -#ifdef JBM_FOR_OSBA for ( ; ch_idx < MAX_TRANSPORT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ ) -#else - for ( ; ch_idx < MAX_TRANSPORT_CHANNELS; ch_idx++ ) -#endif { hTcBuffer->tc[ch_idx] = NULL; } @@ -2471,11 +2422,7 @@ void ivas_jbm_dec_tc_buffer_close( if ( *phTcBuffer != NULL ) { -#ifdef JBM_FOR_OSBA for ( i = 0; i < MAX_TRANSPORT_CHANNELS + MAX_NUM_OBJECTS; i++ ) -#else - for ( i = 0; i < MAX_TRANSPORT_CHANNELS; i++ ) -#endif { ( *phTcBuffer )->tc[i] = NULL; } diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index c69e1d3625f635c2edf4440cb3cab5f7a08e1f40..5c5411a41f97710315f348d6ccdfcea898f073b6 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -624,11 +624,8 @@ ivas_error ivas_masa_dec_open( /* allocate transport channels*/ if ( st_ivas->hDecoderConfig->Opt_5ms && st_ivas->hTcBuffer == NULL && st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) { - int16_t nchan_to_allocate; + int16_t nchan_to_allocate, nchan_transport; TC_BUFFER_MODE buffer_mode; -#ifdef NONBE_FIX_826_JBM_MASA_CNA_CNG - int16_t nchan_transport; -#endif buffer_mode = TC_BUFFER_MODE_RENDERER; if ( st_ivas->mc_mode == MC_MODE_MCMASA && ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_MONO ) ) @@ -640,32 +637,21 @@ ivas_error ivas_masa_dec_open( buffer_mode = TC_BUFFER_MODE_BUFFER; } -#ifdef NONBE_FIX_826_JBM_MASA_CNA_CNG nchan_transport = ivas_jbm_dec_get_num_tc_channels( st_ivas ); nchan_to_allocate = nchan_transport; -#else - nchan_to_allocate = ivas_jbm_dec_get_num_tc_channels( st_ivas ); -#endif + if ( st_ivas->ivas_format == MASA_ISM_FORMAT && st_ivas->renderer_type == RENDERER_MONO_DOWNMIX ) { -#ifdef NONBE_FIX_826_JBM_MASA_CNA_CNG nchan_transport = 1; -#endif nchan_to_allocate = 1; } -#ifdef NONBE_FIX_826_JBM_MASA_CNA_CNG else if ( st_ivas->nchan_transport == 1 && ( st_ivas->renderer_type == RENDERER_DIRAC ) ) { /* addtl channel for CNG */ nchan_to_allocate++; } -#endif -#ifdef NONBE_FIX_826_JBM_MASA_CNA_CNG if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, buffer_mode, nchan_transport, nchan_to_allocate, nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, buffer_mode, nchan_to_allocate, nchan_to_allocate, nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -1514,13 +1500,12 @@ ivas_error ivas_masa_dec_reconfigure( } } } -#ifdef NONBE_FIX_826_JBM_MASA_CNA_CNG else if ( st_ivas->nchan_transport == 1 && ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirACRend->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) ) { /* addtl channel for CNG */ tc_nchan_to_allocate++; } -#endif + if ( tc_nchan_transport != st_ivas->hTcBuffer->nchan_transport_jbm || tc_nchan_to_allocate != st_ivas->hTcBuffer->nchan_transport_internal || buffer_mode_new != st_ivas->hTcBuffer->tc_buffer_mode ) { if ( ( error = ivas_jbm_dec_tc_buffer_reconfigure( st_ivas, buffer_mode_new, tc_nchan_transport, tc_nchan_to_allocate, tc_nchan_to_allocate, n_samples_granularity ) ) != IVAS_ERR_OK ) @@ -1613,11 +1598,8 @@ void ivas_spar_param_to_masa_param_mapping( for ( slot_idx = 0; slot_idx < hSpar->subframe_nbslots[subframe]; slot_idx++ ) { sf = hSpar->render_to_md_map[slot_idx + slot_idx_start] / JBM_CLDFB_SLOTS_IN_SUBFRAME; -#ifndef FIX_MSAN_USAN_ERROR_JBM - if ( subframe < SPAR_META_DELAY_SUBFRAMES ) -#else + if ( ( sf < SPAR_META_DELAY_SUBFRAMES ) ) -#endif { mixer_mat_index = sf + MAX_PARAM_SPATIAL_SUBFRAMES - SPAR_META_DELAY_SUBFRAMES + 1; for ( band = 0; band < SPAR_DIRAC_SPLIT_START_BAND; band++ ) diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 2b23d7ec5ee6133eef225c9cfebd603ae5cbe5bc..cfc070a02ff21f949900e5c710f39856e24cda31 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -584,9 +584,6 @@ ivas_error ivas_param_mc_dec_reconfig( hTransportSetup = st_ivas->hTransSetup; mc_ls_setup = ivas_mc_map_output_config_to_mc_ls_setup( st_ivas->transport_config ); nchan_out_transport = st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe; -#ifndef NONBE_FIX_840_PARAMMC_RS - hParamMC->hoa_encoder = NULL; -#endif if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_COV || hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) { diff --git a/lib_dec/ivas_mc_paramupmix_dec.c b/lib_dec/ivas_mc_paramupmix_dec.c index ba20432e2546fc026663a9f15924cccefaec4f63..f3640d5a6990017a9b77c15d23fecc3874a5b563 100644 --- a/lib_dec/ivas_mc_paramupmix_dec.c +++ b/lib_dec/ivas_mc_paramupmix_dec.c @@ -662,7 +662,6 @@ ivas_error ivas_mc_paramupmix_dec_open( hMCParamUpmix->free_param_interpolator = 0; hMCParamUpmix->param_interpolator = NULL; -#ifdef NONBE_FIX_808_JBM_PARAMUPMIX_RS if ( st_ivas->hDecoderConfig->Opt_5ms == 1 ) { if ( ( hMCParamUpmix->param_interpolator = (float *) malloc( MAX_JBM_CLDFB_TIMESLOTS * sizeof( float ) ) ) == NULL ) @@ -673,7 +672,6 @@ ivas_error ivas_mc_paramupmix_dec_open( ivas_jbm_dec_get_adapted_linear_interpolator( DEFAULT_JBM_CLDFB_TIMESLOTS, DEFAULT_JBM_CLDFB_TIMESLOTS, hMCParamUpmix->param_interpolator ); } -#endif if ( st_ivas->hDecoderConfig->Opt_5ms == 1 && st_ivas->hTcBuffer == NULL ) { @@ -684,12 +682,6 @@ ivas_error ivas_mc_paramupmix_dec_open( buffer_mode = TC_BUFFER_MODE_RENDERER; nchan_tc = ivas_jbm_dec_get_num_tc_channels( st_ivas ); nchan_to_allocate = MC_PARAMUPMIX_MAX_INPUT_CHANS; -#ifndef NONBE_FIX_808_JBM_PARAMUPMIX_RS - if ( ( hMCParamUpmix->param_interpolator = (float *) malloc( MAX_JBM_CLDFB_TIMESLOTS * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for interpolator\n" ) ); - } -#endif if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_MONO ) { @@ -706,11 +698,6 @@ ivas_error ivas_mc_paramupmix_dec_open( { return error; } -#ifndef NONBE_FIX_808_JBM_PARAMUPMIX_RS - hMCParamUpmix->free_param_interpolator = 1; - - ivas_jbm_dec_get_adapted_linear_interpolator( DEFAULT_JBM_CLDFB_TIMESLOTS, DEFAULT_JBM_CLDFB_TIMESLOTS, hMCParamUpmix->param_interpolator ); -#endif } st_ivas->hMCParamUpmix = hMCParamUpmix; @@ -1029,7 +1016,6 @@ static void ivas_mc_paramupmix_dec_sf( int16_t noparamupmix_delay, n_samples_rendered; MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix; int16_t subframeIdx, idx_in, maxBand; -#ifdef NONBE_FIX_835_JBM_PARAMUPMIX_HEADROT float Cldfb_RealBuffer_subfr[MAX_INTERN_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; float Cldfb_ImagBuffer_subfr[MAX_INTERN_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; #ifdef SPLIT_REND_WITH_HEAD_ROT @@ -1038,20 +1024,6 @@ static void ivas_mc_paramupmix_dec_sf( #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]; -#endif -#else -#ifdef SPLIT_REND_WITH_HEAD_ROT - float Cldfb_RealBuffer_subfr[MC_PARAMUPMIX_MAX_INPUT_CHANS][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; - float Cldfb_ImagBuffer_subfr[MC_PARAMUPMIX_MAX_INPUT_CHANS][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; - float Cldfb_RealBuffer_Binaural[1][BINAURAL_CHANNELS][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; - float Cldfb_ImagBuffer_Binaural[1][BINAURAL_CHANNELS][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; - int16_t idx_lfe; -#else - float Cldfb_RealBuffer_subfr[3 + MC_PARAMUPMIX_MAX_TRANSPORT_CHANS][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; - float Cldfb_ImagBuffer_subfr[3 + MC_PARAMUPMIX_MAX_TRANSPORT_CHANS][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; - float Cldfb_RealBuffer_Binaural[BINAURAL_CHANNELS][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; - float Cldfb_ImagBuffer_Binaural[BINAURAL_CHANNELS][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; -#endif #endif hMCParamUpmix = st_ivas->hMCParamUpmix; @@ -1140,7 +1112,6 @@ static void ivas_mc_paramupmix_dec_sf( idx_in += 2; } -#ifdef NONBE_FIX_835_JBM_PARAMUPMIX_HEADROT if ( st_ivas->hCombinedOrientationData && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { for ( slot_idx = 0; slot_idx < st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->subframes_rendered]; slot_idx++ ) @@ -1148,24 +1119,11 @@ static void ivas_mc_paramupmix_dec_sf( ivas_param_mc_mc2sba_cldfb( st_ivas->hTransSetup, hMCParamUpmix->hoa_encoder, slot_idx, Cldfb_RealBuffer_subfr, Cldfb_ImagBuffer_subfr, maxBand, GAIN_LFE ); } } -#endif #ifdef SPLIT_REND_WITH_HEAD_ROT /*LFE handling for split rendering cases*/ if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { -#ifndef NONBE_FIX_835_JBM_PARAMUPMIX_HEADROT - for ( idx_lfe = 0; idx_lfe < st_ivas->hIntSetup.num_lfe; idx_lfe++ ) - { - ch = st_ivas->hIntSetup.index_lfe[idx_lfe]; - for ( slot_idx = 0; slot_idx < st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->subframes_rendered]; slot_idx++ ) - { - cldfbAnalysis_ts( &( output_f[ch][maxBand * slot_idx] ), Cldfb_RealBuffer_subfr[idx_in][slot_idx], Cldfb_ImagBuffer_subfr[idx_in][slot_idx], maxBand, st_ivas->cldfbAnaDec[idx_in] ); - } - idx_in++; - } -#endif - if ( st_ivas->hSplitBinRend.hCldfbDataOut != NULL ) { for ( slot_idx = 0; slot_idx < st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->subframes_rendered]; slot_idx++ ) diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 6579139a85615aa42721283d38662e0339b10ac9..51b8fde619bc586840d71c9b108308f3116f7bbc 100755 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -1214,9 +1214,7 @@ static ivas_error ivas_mc_dec_reconfig( if ( st_ivas->hBinRendererTd != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_OBJECTS_TD ) ) { ivas_td_binaural_close( &st_ivas->hBinRendererTd ); -#ifdef NONBE_FIX_841_MC_RS_TDOBJ_RENDERER st_ivas->hHrtfTD = NULL; -#endif } #ifdef SPLIT_REND_WITH_HEAD_ROT @@ -1347,7 +1345,6 @@ static ivas_error ivas_mc_dec_reconfig( { tc_nchan_full_new = 0; } -#ifdef NONBE_FIX_808_JBM_PARAMUPMIX_RS else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) { tc_nchan_allocate_new = MC_PARAMUPMIX_MAX_INPUT_CHANS; @@ -1360,7 +1357,6 @@ static ivas_error ivas_mc_dec_reconfig( } tc_nchan_full_new = tc_nchan_allocate_new; } -#endif /* reconfigure buffer */ if ( hTcBuffer->tc_buffer_mode != tc_buffer_mode_new || hTcBuffer->nchan_transport_jbm != tc_nchan_tc_new || diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index dfaba8a0d3139b1e68ffcc7a65e6e4a74de1aa9c..11e71c925c6fed7f9f39f1555381275b4b973586 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -138,14 +138,12 @@ ivas_error ivas_td_binaural_renderer_sf( nchan_ism = st_ivas->nchan_ism; ch_offset = 2; } -#ifdef JBM_FOR_OSBA else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { nchan_ism_internal = st_ivas->nchan_ism; nchan_ism = st_ivas->nchan_ism; ch_offset = 0; } -#endif else { nchan_ism_internal = st_ivas->hTcBuffer->nchan_transport_internal; diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 3e06345a5df06e1db42b444ebdbabc4233709f22..9b23a45f7528da18f4a8a0d64936a0d9e9533705 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -124,7 +124,6 @@ void ivas_osba_data_close( * Binaural rendering in JBM OSBA format *--------------------------------------------------------------------------*/ -#ifdef JBM_FOR_OSBA ivas_error ivas_osba_dirac_td_binaural_jbm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ @@ -157,7 +156,6 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( return IVAS_ERR_OK; } -#endif /*--------------------------------------------------------------------------* @@ -202,11 +200,7 @@ ivas_error ivas_osba_dirac_td_binaural( if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { -#ifdef JBM_FOR_OSBA if ( ( error = ivas_sba_upmixer_renderer( st_ivas, output, output_frame ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_sba_upmixer_renderer( st_ivas, &output[channel_offset], output_frame ) ) != IVAS_ERR_OK ) -#endif { return error; } diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index 657fa827c4590a8a18c127c15025f2c39287d766..15d185efa0d572c1409ac77d140a0c1591efdff8 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -173,12 +173,10 @@ void ivas_renderer_select( *renderer_type = RENDERER_BINAURAL_FASTCONV_ROOM; } -#ifdef OSBA_ROOM_IR if ( st_ivas->ivas_format == SBA_ISM_FORMAT && *renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { *internal_config = IVAS_AUDIO_CONFIG_7_1_4; } -#endif if ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) { diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 2ca1c191d11ab1056a7e5bdaf340977bf70c4f41..203bf0ff48fac4a7f451e9e13f7f9eb2a3f15c0e 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -101,16 +101,13 @@ void ivas_sba_set_cna_cng_flag( *-------------------------------------------------------------------*/ ivas_error ivas_sba_dec_reconfigure( - Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ -#ifdef JBM_FOR_OSBA - , - uint16_t *nSamplesFlushed, /* o : number of samples flushed */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + uint16_t *nSamplesFlushed, /* o : number of samples flushed */ #ifdef SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ - void *data /* o : output synthesis signal */ + void *data /* o : output synthesis signal */ #else - int16_t *data /* o : output synthesis signal */ -#endif + int16_t *data /* o : output synthesis signal */ #endif ) { @@ -127,23 +124,17 @@ ivas_error ivas_sba_dec_reconfigure( int16_t ch, nchan_out_buff, nchan_out_buff_old; #endif int16_t sba_analysis_order_old; -#ifdef JBM_FOR_OSBA int16_t sba_analysis_order_old_flush; -#endif DECODER_CONFIG_HANDLE hDecoderConfig; ivas_error error; ISM_MODE ism_mode_old; -#ifdef JBM_FOR_OSBA int16_t granularity_new; -#endif ism_mode_old = st_ivas->ism_mode; hDecoderConfig = st_ivas->hDecoderConfig; ivas_total_brate = hDecoderConfig->ivas_total_brate; last_ivas_total_brate = st_ivas->last_active_ivas_total_brate; -#ifdef JBM_FOR_OSBA sba_analysis_order_old_flush = st_ivas->sba_analysis_order; -#endif sba_analysis_order_old = ivas_sba_get_analysis_order( last_ivas_total_brate, st_ivas->sba_order ); /*-----------------------------------------------------------------* @@ -178,7 +169,6 @@ ivas_error ivas_sba_dec_reconfigure( st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order ); -#ifdef JBM_FOR_OSBA *nSamplesFlushed = 0; granularity_new = st_ivas->hTcBuffer->n_samples_granularity; @@ -236,11 +226,7 @@ ivas_error ivas_sba_dec_reconfigure( if ( granularity_new < st_ivas->hTcBuffer->n_samples_granularity ) { /* write back info for correct rendering of the flushable samples */ -#ifdef JBM_FOR_OSBA st_ivas->sba_analysis_order = sba_analysis_order_old_flush; -#else - st_ivas->sba_analysis_order = sba_analysis_order_old; -#endif st_ivas->hDecoderConfig->ivas_total_brate = last_ivas_total_brate; #ifdef SPLIT_REND_WITH_HEAD_ROT @@ -264,12 +250,9 @@ ivas_error ivas_sba_dec_reconfigure( } } } -#endif /* save old */ -#ifdef JBM_FOR_OSBA if ( ism_mode_old != ISM_SBA_MODE_DISC ) -#endif { if ( st_ivas->hDirAC == NULL && st_ivas->hSpar != NULL ) { @@ -351,14 +334,6 @@ ivas_error ivas_sba_dec_reconfigure( hSpar = st_ivas->hSpar; st_ivas->sba_dirac_stereo_flag = ivas_get_sba_dirac_stereo_flag( st_ivas ); -#ifndef JBM_FOR_OSBA - /* synchronize subframe info */ - st_ivas->hSpar->num_slots = st_ivas->hTcBuffer->num_slots; - st_ivas->hSpar->nb_subframes = st_ivas->hTcBuffer->nb_subframes; - st_ivas->hSpar->slots_rendered = st_ivas->hTcBuffer->slots_rendered; - st_ivas->hSpar->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; - mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpar->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); -#endif if ( st_ivas->nchan_transport == 1 ) { st_ivas->element_mode_init = IVAS_SCE; @@ -399,7 +374,6 @@ ivas_error ivas_sba_dec_reconfigure( ivas_binRenderer_close( &st_ivas->hBinRenderer ); } -#ifdef JBM_FOR_OSBA if ( st_ivas->renderer_type == RENDERER_MONO_DOWNMIX && st_ivas->hMonoDmxRenderer == NULL ) { if ( ( error = ivas_mono_dmx_renderer_open( st_ivas ) ) != IVAS_ERR_OK ) @@ -412,7 +386,6 @@ ivas_error ivas_sba_dec_reconfigure( { ivas_mono_dmx_renderer_close( &st_ivas->hMonoDmxRenderer ); } -#endif if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) ) != IVAS_ERR_OK ) { @@ -433,18 +406,6 @@ ivas_error ivas_sba_dec_reconfigure( { return error; } - -#ifndef JBM_FOR_OSBA - /* synchronize subframe info */ - if ( st_ivas->hSpatParamRendCom != NULL ) - { - st_ivas->hSpatParamRendCom->num_slots = st_ivas->hTcBuffer->num_slots; - st_ivas->hSpatParamRendCom->nb_subframes = st_ivas->hTcBuffer->nb_subframes; - st_ivas->hSpatParamRendCom->slots_rendered = st_ivas->hTcBuffer->slots_rendered; - st_ivas->hSpatParamRendCom->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; - mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpatParamRendCom->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); - } -#endif } else { @@ -624,11 +585,7 @@ ivas_error ivas_sba_dec_reconfigure( * JBM TC buffers *-----------------------------------------------------------------*/ -#ifdef JBM_FOR_OSBA if ( st_ivas->hDecoderConfig->Opt_5ms == 1 || st_ivas->ivas_format == SBA_ISM_FORMAT ) -#else - if ( st_ivas->hDecoderConfig->Opt_5ms == 1 ) -#endif { int16_t tc_nchan_to_allocate; int16_t tc_nchan_tc; @@ -639,14 +596,12 @@ ivas_error ivas_sba_dec_reconfigure( tc_nchan_to_allocate = tc_nchan_tc; if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_MONO ) { -#ifdef JBM_FOR_OSBA if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO ) ) { tc_nchan_tc = st_ivas->hDecoderConfig->nchan_out + st_ivas->nchan_ism; tc_nchan_to_allocate = tc_nchan_tc; } else -#endif { tc_buffer_mode = TC_BUFFER_MODE_BUFFER; tc_nchan_tc = st_ivas->hDecoderConfig->nchan_out; @@ -657,20 +612,14 @@ ivas_error ivas_sba_dec_reconfigure( { tc_nchan_to_allocate = 2 * BINAURAL_CHANNELS; } - -#ifdef JBM_FOR_OSBA else if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT ) -#else - else if ( st_ivas->ivas_format == SBA_FORMAT ) -#endif { tc_nchan_to_allocate = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); -#ifdef JBM_FOR_OSBA + if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { tc_nchan_to_allocate += st_ivas->nchan_ism; } -#endif } else { @@ -680,24 +629,15 @@ ivas_error ivas_sba_dec_reconfigure( } } -#ifdef JBM_FOR_OSBA if ( tc_nchan_tc != st_ivas->hTcBuffer->nchan_transport_jbm || tc_nchan_to_allocate != st_ivas->hTcBuffer->nchan_transport_internal || tc_buffer_mode != st_ivas->hTcBuffer->tc_buffer_mode || granularity_new != st_ivas->hTcBuffer->n_samples_granularity ) -#else - if ( tc_nchan_tc != st_ivas->hTcBuffer->nchan_transport_jbm || tc_nchan_to_allocate != st_ivas->hTcBuffer->nchan_transport_internal || tc_buffer_mode != st_ivas->hTcBuffer->tc_buffer_mode ) -#endif { -#ifdef JBM_FOR_OSBA if ( ( error = ivas_jbm_dec_tc_buffer_reconfigure( st_ivas, tc_buffer_mode, tc_nchan_tc, tc_nchan_to_allocate, tc_nchan_to_allocate, granularity_new ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_jbm_dec_tc_buffer_reconfigure( st_ivas, tc_buffer_mode, tc_nchan_tc, tc_nchan_to_allocate, tc_nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) -#endif { return error; } } } -#ifdef JBM_FOR_OSBA /* resync SPAR and DirAC JBM info from TC Buffer */ if ( st_ivas->hSpatParamRendCom != NULL ) { @@ -722,7 +662,6 @@ ivas_error ivas_sba_dec_reconfigure( st_ivas->hSpatParamRendCom->subframe_nbslots[n] = st_ivas->hTcBuffer->subframe_nbslots[n] * granularityMultiplier; } } -#endif /*-----------------------------------------------------------------* * floating-point output audio buffers @@ -776,10 +715,7 @@ void ivas_sba_dec_digest_tc( const int16_t nSamplesForRendering /* i : number of samples provided */ ) { - int16_t ch_idx; -#ifdef NONBE_FIX_826_JBM_MASA_CNA_CNG - int16_t nchan_transport; -#endif + int16_t ch_idx, nchan_transport; /* set the md map */ if ( st_ivas->hDirAC ) @@ -787,11 +723,7 @@ void ivas_sba_dec_digest_tc( ivas_dirac_dec_set_md_map( st_ivas, nCldfbSlots ); } -#ifdef JBM_FOR_OSBA if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT ) -#else - if ( st_ivas->ivas_format == SBA_FORMAT ) -#endif { ivas_spar_dec_digest_tc( st_ivas, st_ivas->nchan_transport, nCldfbSlots, nSamplesForRendering ); } @@ -842,17 +774,14 @@ void ivas_sba_dec_digest_tc( } /* if we have a late CNG generation, do it here */ -#ifdef NONBE_FIX_826_JBM_MASA_CNA_CNG nchan_transport = st_ivas->nchan_transport; if ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->hDecoderConfig->ivas_total_brate < MASA_STEREO_MIN_BITRATE && ( st_ivas->hDecoderConfig->ivas_total_brate > IVAS_SID_5k2 || ( st_ivas->hDecoderConfig->ivas_total_brate <= IVAS_SID_5k2 && st_ivas->nCPE > 0 && st_ivas->hCPE[0]->nchan_out == 1 ) ) ) { nchan_transport = 1; /* Only one channel transported */ } + if ( ( ( st_ivas->ivas_format != SBA_FORMAT && st_ivas->ivas_format != SBA_ISM_FORMAT ) && st_ivas->nchan_transport == 1 && st_ivas->hSCE[0]->hCoreCoder[0] != NULL && st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag ) || ( ( st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC ) && ( nchan_transport == 1 && st_ivas->nchan_transport != 2 && st_ivas->hSCE[0]->hCoreCoder[0] != NULL && st_ivas->hSCE[0]->hCoreCoder[0]->cng_sba_flag ) ) ) -#else - if ( st_ivas->nchan_transport == 1 && st_ivas->hSCE[0]->hCoreCoder[0] != NULL && st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag && st_ivas->ivas_format == SBA_FORMAT ) -#endif { Decoder_State *st = st_ivas->hSCE[0]->hCoreCoder[0]; generate_masking_noise_lb_dirac( st->hFdCngDec->hFdCngCom, st_ivas->hTcBuffer->tc[1], nCldfbSlots, st->cna_dirac_flag && st->flag_cna ); diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 1d4687240507b3c60cf512211ce43f9829426f42..9c6b45a2ed7b61416919417a8a0de814e371126c 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -211,63 +211,49 @@ ivas_error ivas_spar_dec_open( } /* allocate transport channels*/ -#ifdef JBM_FOR_OSBA if ( ( st_ivas->hDecoderConfig->Opt_5ms || st_ivas->ivas_format == SBA_ISM_FORMAT ) && st_ivas->hTcBuffer == NULL ) -#else - if ( ( st_ivas->hDecoderConfig->Opt_5ms ) && st_ivas->hTcBuffer == NULL ) -#endif { int16_t nchan_to_allocate; int16_t nchan_tc; TC_BUFFER_MODE buffer_mode; -#ifdef JBM_FOR_OSBA int16_t granularity; -#endif buffer_mode = TC_BUFFER_MODE_RENDERER; nchan_tc = ivas_jbm_dec_get_num_tc_channels( st_ivas ); nchan_to_allocate = num_channels_internal; -#ifdef JBM_FOR_OSBA if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { nchan_to_allocate += st_ivas->nchan_ism; } granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); -#endif if ( ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_MONO ) ) { -#ifdef JBM_FOR_OSBA if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO ) ) { nchan_tc = st_ivas->hDecoderConfig->nchan_out + st_ivas->nchan_ism; nchan_to_allocate = nchan_tc; } else -#endif { buffer_mode = TC_BUFFER_MODE_BUFFER; nchan_tc = st_ivas->hDecoderConfig->nchan_out; nchan_to_allocate = nchan_tc; } } - else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { nchan_to_allocate = 2 * BINAURAL_CHANNELS; } -#ifdef JBM_FOR_OSBA if ( st_ivas->ivas_format == SBA_ISM_FORMAT && ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { /* get correct granularity in case of binaural rendering of the discrete objects with the td obj renderer */ granularity = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ); } -#endif -#ifdef JBM_FOR_OSBA /* make sure we have a TC buffer with the correct granularity for rate switching in OSBA */ if ( !st_ivas->hDecoderConfig->Opt_5ms ) { @@ -276,9 +262,6 @@ ivas_error ivas_spar_dec_open( } if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, buffer_mode, nchan_tc, nchan_to_allocate, nchan_to_allocate, granularity ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, buffer_mode, nchan_tc, nchan_to_allocate, nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -1248,9 +1231,7 @@ void ivas_spar_dec_set_render_map( /* copy also to tc buffer */ /* only for non-combined formats and combinded formats w/o discrete objects */ -#ifdef JBM_FOR_OSBA if ( !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) ) -#endif { st_ivas->hTcBuffer->nb_subframes = hSpar->nb_subframes; mvs2s( hSpar->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hSpar->nb_subframes ); @@ -1310,12 +1291,9 @@ void ivas_spar_dec_digest_tc( float *pPcm_tmp[MAX_SPAR_INTERNAL_CHANNELS]; float *p_tc[MAX_SPAR_INTERNAL_CHANNELS]; int16_t nchan_internal, ch; -#ifdef JBM_FOR_OSBA int16_t ch_sba_idx; -#endif int16_t nSamplesLeftForTD, default_frame; -#ifdef JBM_FOR_OSBA ch_sba_idx = 0; if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { @@ -1324,7 +1302,6 @@ void ivas_spar_dec_digest_tc( ch_sba_idx = st_ivas->nchan_ism; } } -#endif /* TD decorrelator */ default_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); @@ -1334,11 +1311,7 @@ void ivas_spar_dec_digest_tc( for ( ch = 0; ch < nchan_internal; ch++ ) { pPcm_tmp[ch] = Pcm_tmp[ch]; -#ifdef JBM_FOR_OSBA p_tc[ch] = st_ivas->hTcBuffer->tc[ch + ch_sba_idx]; -#else - p_tc[ch] = st_ivas->hTcBuffer->tc[ch]; -#endif } while ( nSamplesLeftForTD ) @@ -1403,17 +1376,14 @@ void ivas_spar_dec_upmixer( float *output_f_local[MAX_OUTPUT_CHANNELS]; float Pcm_tmp[MAX_OUTPUT_CHANNELS][L_FRAME48k]; float *pPcm_tmp[MAX_OUTPUT_CHANNELS]; -#ifdef JBM_FOR_OSBA int16_t nchan_internal_total; int16_t sba_ch_offset; -#endif hSpar = st_ivas->hSpar; nchan_transport = hSpar->hMdDec->spar_md_cfg.nchan_transport; nchan_out = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; n_samples_sf = JBM_CLDFB_SLOTS_IN_SUBFRAME * NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); -#ifdef JBM_FOR_OSBA nchan_internal_total = nchan_internal; sba_ch_offset = 0; if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) @@ -1421,22 +1391,13 @@ void ivas_spar_dec_upmixer( nchan_internal_total += st_ivas->nchan_ism; sba_ch_offset = st_ivas->nchan_ism; } -#endif for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) { -#ifdef JBM_FOR_OSBA output_f_local[n] = output[n + sba_ch_offset]; -#else - output_f_local[n] = output[n]; -#endif } -#ifdef JBM_FOR_OSBA for ( n = 0; n < nchan_internal_total; n++ ) -#else - for ( n = 0; n < nchan_internal; n++ ) -#endif { st_ivas->hTcBuffer->tc[n] = output[n]; } @@ -1454,39 +1415,25 @@ void ivas_spar_dec_upmixer( { if ( hSpar->hTdDecorr ) { -#ifdef JBM_FOR_OSBA ivas_td_decorr_process( hSpar->hTdDecorr, output_f_local, pPcm_tmp, output_frame ); -#else - ivas_td_decorr_process( hSpar->hTdDecorr, st_ivas->hTcBuffer->tc, pPcm_tmp, output_frame ); -#endif + if ( hSpar->hTdDecorr->num_apd_outputs >= ( nchan_internal - nchan_transport ) ) { for ( i = 0; i < nchan_internal - nchan_transport; i++ ) { -#ifdef JBM_FOR_OSBA mvr2r( pPcm_tmp[hSpar->hTdDecorr->num_apd_outputs - 1 - i], st_ivas->hTcBuffer->tc[nchan_internal_total - 1 - i], output_frame ); -#else - mvr2r( pPcm_tmp[hSpar->hTdDecorr->num_apd_outputs - 1 - i], st_ivas->hTcBuffer->tc[nchan_internal - 1 - i], output_frame ); -#endif } } else { for ( i = 0; i < nchan_internal - nchan_transport; i++ ) { -#ifdef JBM_FOR_OSBA set_zero( st_ivas->hTcBuffer->tc[nchan_internal_total - 1 - i], output_frame ); -#else - set_zero( st_ivas->hTcBuffer->tc[nchan_internal - 1 - i], output_frame ); -#endif } + for ( i = 0; i < hSpar->hTdDecorr->num_apd_outputs; i++ ) { -#ifdef JBM_FOR_OSBA mvr2r( pPcm_tmp[hSpar->hTdDecorr->num_apd_outputs - 1 - i], st_ivas->hTcBuffer->tc[nchan_internal_total - 1 - i], output_frame ); -#else - mvr2r( pPcm_tmp[hSpar->hTdDecorr->num_apd_outputs - 1 - i], st_ivas->hTcBuffer->tc[nchan_internal - 1 - i], output_frame ); -#endif } } } @@ -1509,11 +1456,7 @@ void ivas_spar_dec_upmixer( } } -#ifdef JBM_FOR_OSBA for ( n = 0; n < nchan_internal_total; n++ ) -#else - for ( n = 0; n < nchan_internal; n++ ) -#endif { st_ivas->hTcBuffer->tc[n] = NULL; } @@ -1548,28 +1491,15 @@ void ivas_spar_dec_upmixer_sf( ) { int16_t cldfb_band, num_cldfb_bands, numch_in, numch_out; -#ifdef OSBA_ROOM_IR float *cldfb_in_ts_re[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS][CLDFB_NO_COL_MAX]; float *cldfb_in_ts_im[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS][CLDFB_NO_COL_MAX]; -#else - float *cldfb_in_ts_re[MAX_OUTPUT_CHANNELS][CLDFB_NO_COL_MAX]; - float *cldfb_in_ts_im[MAX_OUTPUT_CHANNELS][CLDFB_NO_COL_MAX]; -#endif int16_t i, b, ts, out_ch, in_ch; int16_t num_spar_bands, spar_band, nchan_transport; int16_t num_in_ingest, split_band; int16_t slot_size, slot_idx_start; -#ifdef OSBA_ROOM_IR float *p_tc[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS]; -#else - float *p_tc[MAX_OUTPUT_CHANNELS]; -#endif int16_t md_idx; -#ifdef OSBA_ROOM_IR float Pcm_tmp[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS][L_FRAME48k]; -#else - float Pcm_tmp[MAX_OUTPUT_CHANNELS][L_FRAME48k]; -#endif int16_t numch_out_dirac; float mixer_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS]; int16_t b_skip_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH]; @@ -1578,7 +1508,6 @@ void ivas_spar_dec_upmixer_sf( int16_t num_md_sub_frames; push_wmops( "ivas_spar_dec_upmixer_sf" ); - hSpar = st_ivas->hSpar; hDecoderConfig = st_ivas->hDecoderConfig; nchan_transport = hSpar->hMdDec->spar_md_cfg.nchan_transport; @@ -1590,7 +1519,6 @@ void ivas_spar_dec_upmixer_sf( slot_size = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); slot_idx_start = hSpar->slots_rendered; -#ifdef JBM_FOR_OSBA if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) { int16_t nchan_ism; @@ -1602,7 +1530,6 @@ void ivas_spar_dec_upmixer_sf( p_tc[i] = st_ivas->hTcBuffer->tc[i + nchan_ism] + slot_idx_start * slot_size; } -#ifdef OSBA_ROOM_IR if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { for ( i = 0; i < nchan_ism; i++ ) @@ -1610,10 +1537,8 @@ void ivas_spar_dec_upmixer_sf( p_tc[i + nchan_internal] = st_ivas->hTcBuffer->tc[i] + slot_idx_start * slot_size; } } -#endif } else -#endif { for ( i = 0; i < nchan_internal; i++ ) { @@ -1689,11 +1614,7 @@ void ivas_spar_dec_upmixer_sf( if ( hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_FOA ) { /* at this point, output channels are used as intermediate procesing buffers */ -#ifdef OSBA_ROOM_IR for ( in_ch = 0; in_ch < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; in_ch++ ) -#else - for ( in_ch = 0; in_ch < MAX_OUTPUT_CHANNELS; in_ch++ ) -#endif { for ( ts = 0; ts < MAX_PARAM_SPATIAL_SUBFRAMES; ts++ ) { @@ -1740,11 +1661,9 @@ void ivas_spar_dec_upmixer_sf( } } -#ifdef OSBA_ROOM_IR if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { - int16_t nchan_all = st_ivas->nchan_ism + numch_in; - for ( ; in_ch < nchan_all; in_ch++ ) + for ( ; in_ch < st_ivas->nchan_ism + numch_in; in_ch++ ) { for ( ts = 0; ts < hSpar->subframe_nbslots[hSpar->subframes_rendered]; ts++ ) { @@ -1752,7 +1671,6 @@ void ivas_spar_dec_upmixer_sf( } } } -#endif if ( ( hDecoderConfig->ivas_total_brate < IVAS_24k4 ) && ( ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_HOA2 ) || ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_HOA3 ) ) ) { @@ -1881,11 +1799,8 @@ void ivas_spar_dec_upmixer_sf( #ifdef SPLIT_REND_WITH_HEAD_ROT || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM #endif - ) ) -#ifdef OSBA_ROOM_IR - && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) -#endif - ) + ) ) && + !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) ) { for ( ts = 0; ts < hSpar->subframe_nbslots[hSpar->subframes_rendered]; ts++ ) { diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index d6174b3d890d872a362e303cb256fad7446f4906..1a428a0590f5e8055f2d69e1df343cb386535130 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -910,20 +910,16 @@ typedef struct ivas_masa_ism_data_structure typedef struct decoder_tc_buffer_structure { - float *tc_buffer; /* the buffer itself */ -#ifdef JBM_FOR_OSBA + float *tc_buffer; /* the buffer itself */ float *tc[MAX_TRANSPORT_CHANNELS + MAX_NUM_OBJECTS]; /* pointers into the buffer to the beginning of each tc */ -#else - float *tc[MAX_TRANSPORT_CHANNELS]; /* pointers into the buffer to the beginning of each tc */ -#endif - TC_BUFFER_MODE tc_buffer_mode; /* mode of the buffer (no buffering, render buffering, out buffering) */ - int16_t nchan_transport_jbm; /* number of TCs after TC decoding */ - int16_t nchan_transport_internal; /* total number of TC buffer channels, can include e.g. TD decorr data */ - int16_t nchan_buffer_full; /* number of channels to be fully buffered */ - int16_t n_samples_available; /* samples still available for rendering in the current frame */ - int16_t n_samples_buffered; /* full number of samples in the buffer (including spill to next frame) */ - int16_t n_samples_rendered; /* samples already rendered in the current frame */ - int16_t n_samples_granularity; /* render granularity */ + TC_BUFFER_MODE tc_buffer_mode; /* mode of the buffer (no buffering, render buffering, out buffering) */ + int16_t nchan_transport_jbm; /* number of TCs after TC decoding */ + int16_t nchan_transport_internal; /* total number of TC buffer channels, can include e.g. TD decorr data */ + int16_t nchan_buffer_full; /* number of channels to be fully buffered */ + int16_t n_samples_available; /* samples still available for rendering in the current frame */ + int16_t n_samples_buffered; /* full number of samples in the buffer (including spill to next frame) */ + int16_t n_samples_rendered; /* samples already rendered in the current frame */ + int16_t n_samples_granularity; /* render granularity */ int16_t n_samples_flushed; int16_t subframe_nbslots[MAX_JBM_SUBFRAMES_5MS]; int16_t nb_subframes; diff --git a/lib_dec/jbm_jb4_jmf.c b/lib_dec/jbm_jb4_jmf.c index 4e43650904f52fc62193a798b8c99853de4a38aa..5d7dfa2e6c055fa2cf284ab88943672e484ddde3 100644 --- a/lib_dec/jbm_jb4_jmf.c +++ b/lib_dec/jbm_jb4_jmf.c @@ -205,11 +205,8 @@ int16_t JB4_JMF_PushPacket( h->lastRtpTimeStamp = rtpTimeStamp; return 0; } -#ifndef FIX_MSAN_USAN_ERROR_JBM - rtpTimeDiff = rtpTimeStamp - h->lastRtpTimeStamp; -#else + rtpTimeDiff = (int32_t) ( rtpTimeStamp - h->lastRtpTimeStamp ); -#endif sysTimeDiff = sysTime - h->lastSysTime; offset = sysTime - rtpTimeStamp; diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 87757c3e0092e649da7389bee87dde1e1a8330fd..bedf202625ea1a11986d4fe4e126a777740c5bb7 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1413,7 +1413,6 @@ ivas_error IVAS_DEC_GetFormat( } -#ifdef FIX_847_OUTPUT_PCM_BUFFER /*---------------------------------------------------------------------* * getInputBufferSize() * @@ -1476,7 +1475,6 @@ ivas_error IVAS_DEC_GetOutputBufferSize( return IVAS_ERR_OK; } } -#endif /*---------------------------------------------------------------------* diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 4da8e13b3d82d8bd71401236ed9e8e897bf21622..7b798dea6e547f8019a17bcd4671fbe654e8f8b9 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -360,13 +360,11 @@ ivas_error IVAS_DEC_GetFormat( IVAS_DEC_BS_FORMAT *format /* o : format detected from bitstream fed to the decoder */ ); -#ifdef FIX_847_OUTPUT_PCM_BUFFER /*! r: error code */ ivas_error IVAS_DEC_GetOutputBufferSize( const IVAS_DEC_HANDLE hIvasDec, /* i : IVAS decoder handle */ int16_t *outputBufferSize /* o : total number of samples expected in the output buffer for current decoder configuration */ ); -#endif /*! r: error code */ ivas_error IVAS_DEC_GetNumOutputChannels( diff --git a/lib_enc/ivas_mdct_core_enc.c b/lib_enc/ivas_mdct_core_enc.c index 74d8404fb0159fda72a00eab2a59c9c6d7e6c0c3..f37eeb435174b4fb74abb4ba58791a4bf489e915 100644 --- a/lib_enc/ivas_mdct_core_enc.c +++ b/lib_enc/ivas_mdct_core_enc.c @@ -228,11 +228,7 @@ static void kernel_switch_trafo( edxt( inputBuffer, y, l / 2 + m + r / 2, kernelType, FALSE ); -#ifdef FIX_818_DOUBLE_PREC_KERNEL_SW v_multc( y, sqrtf( (float) NORM_MDCT_FACTOR / ( l / 2 + m + r / 2 ) ), y, l / 2 + m + r / 2 ); -#else - v_multc( y, (float) sqrt( (float) NORM_MDCT_FACTOR / ( l / 2 + m + r / 2 ) ), y, l / 2 + m + r / 2 ); -#endif return; } @@ -281,11 +277,7 @@ static void kernel_switch_update_transforms( edxt( windowedTimeSignal, sigR, s, kernelType, FALSE ); -#ifdef FIX_818_DOUBLE_PREC_KERNEL_SW v_multc( sigR, sqrtf( (float) NORM_MDCT_FACTOR / s ), sigR, s ); -#else - v_multc( sigR, (float) sqrt( (float) NORM_MDCT_FACTOR / s ), sigR, s ); -#endif } else /* 2 TCX5 subframes or 1 TCX10 or 1 transitory TCX20 */ { diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 8bd9574d2114f27c7368ea705221c67255d56df7..55299076d521f6683ab5edc849237d9c5b8285c2 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -234,12 +234,8 @@ ivas_error ivas_dirac_dec_init_binaural_data( if ( hDiracDecBin->hReverb == NULL ) #endif { -#ifdef FIX_822_REFACTOR_BIN_REVERB_OPEN /* Todo Philips: Room acoustics should be passed here once the underlying part works. Probably enough to pick it from st_ivas but you know best. */ if ( ( error = ivas_binaural_reverb_open_parambin( &hDiracDecBin->hReverb, nBins, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, NULL, output_Fs, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_binaural_reverb_open( &hDiracDecBin->hReverb, nBins, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, NULL, st_ivas->hIntSetup.output_config, output_Fs, RENDERER_BINAURAL_PARAMETRIC_ROOM, st_ivas->hHrtfFastConv, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#endif { return error; } diff --git a/lib_rend/ivas_output_init.c b/lib_rend/ivas_output_init.c index 5799049e2044341b14a0d4d4ec0aa785a8ebbd7c..aec94224609b632a158a79184e32667a83770cbf 100644 --- a/lib_rend/ivas_output_init.c +++ b/lib_rend/ivas_output_init.c @@ -377,9 +377,7 @@ int16_t ivas_get_nchan_buffers_dec( nchan_out_buff = st_ivas->hDecoderConfig->nchan_out + st_ivas->nchan_ism; /*take into account sba_ch_idx' in ivas_dec() */ } -#ifdef JBM_FOR_OSBA if ( !( output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO ) ) -#endif { nchan_out_buff = max( nchan_out_buff, nchan_internal + st_ivas->nchan_ism ); } diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 0b1d16fde18b57d51eccb020e835048e9e7ff383..a8b9c029b086f0dd20bb6b908c0f94122d548e0a 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -885,51 +885,37 @@ ivas_error ivas_rend_crendProcessSubframe( * Reverberator *----------------------------------------------------------------------------------*/ -#ifdef FIX_822_REFACTOR_BIN_REVERB_OPEN ivas_error ivas_binaural_reverb_open_fastconv( - REVERB_STRUCT_HANDLE *hReverbPr, /* i/o: binaural reverb handle */ - const int16_t numBins, /* i : number of CLDFB bins */ - const int16_t numCldfbSlotsPerFrame, /* i : number of CLDFB slots per frame */ - IVAS_ROOM_ACOUSTICS_CONFIG_DATA *roomAcoustics, /* i/o: room acoustics parameters */ - const AUDIO_CONFIG internal_config, /* i : internal audio config for FastConv */ - const int32_t sampling_rate, /* i : sampling rate */ - const HRTFS_FASTCONV_HANDLE hHrtfFastConv /* i : FastConv HRTF handle */ + REVERB_STRUCT_HANDLE *hReverbPr, /* i/o: binaural reverb handle */ + const int16_t numBins, /* i : number of CLDFB bins */ + const int16_t numCldfbSlotsPerFrame, /* i : number of CLDFB slots per frame */ + IVAS_ROOM_ACOUSTICS_CONFIG_DATA *roomAcoustics, /* i/o: room acoustics parameters */ + const AUDIO_CONFIG internal_config, /* i : internal audio config for FastConv */ + const int32_t sampling_rate, /* i : sampling rate */ + const HRTFS_FASTCONV_HANDLE hHrtfFastConv /* i : FastConv HRTF handle */ ); ivas_error ivas_binaural_reverb_open_parambin( - REVERB_STRUCT_HANDLE *hReverbPr, /* i/o: binaural reverb handle */ - const int16_t numBins, /* i : number of CLDFB bins */ - const int16_t numCldfbSlotsPerFrame, /* i : number of CLDFB slots per frame */ - IVAS_ROOM_ACOUSTICS_CONFIG_DATA *roomAcoustics, /* i/o: room acoustics parameters */ - const int32_t sampling_rate, /* i : sampling rate */ - const HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : Parametric binauralizer HRTF handle */ -); -#else -ivas_error ivas_binaural_reverb_open( REVERB_STRUCT_HANDLE *hReverbPr, /* i/o: binaural reverb handle */ const int16_t numBins, /* i : number of CLDFB bins */ const int16_t numCldfbSlotsPerFrame, /* i : number of CLDFB slots per frame */ IVAS_ROOM_ACOUSTICS_CONFIG_DATA *roomAcoustics, /* i/o: room acoustics parameters */ - const AUDIO_CONFIG output_config, /* i : output audio configuration */ const int32_t sampling_rate, /* i : sampling rate */ - const RENDERER_TYPE renderer_type, /* i : renderer type */ - const HRTFS_FASTCONV_HANDLE hHrtfFastConv, /* i : FastConv HRTF handle */ const HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : Parametric binauralizer HRTF handle */ ); -#endif void ivas_binaural_reverb_close( REVERB_STRUCT_HANDLE *hReverb /* i/o: binaural reverb handle */ ); void ivas_binaural_reverb_processSubframe( - REVERB_STRUCT_HANDLE hReverb, /* i/o: binaural reverb handle */ - const int16_t numInChannels, /* i : num input channels to be processed */ - const int16_t numSlots, /* i : number of slots to be processed */ - float inReal[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : input CLDFB data real */ - float inImag[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : input CLDFB data imag */ - float outReal[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* o : output CLDFB data real */ - float outImag[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX] /* o : output CLDFB data imag */ + REVERB_STRUCT_HANDLE hReverb, /* i/o: binaural reverb handle */ + const int16_t numInChannels, /* i : num input channels to be processed*/ + const int16_t numSlots, /* i : number of slots to be processed */ + float inReal[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : input CLDFB data real */ + float inImag[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : input CLDFB data imag */ + float outReal[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* o : output CLDFB data real */ + float outImag[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX] /* o : output CLDFB data imag */ ); ivas_error ivas_reverb_open( diff --git a/lib_rend/ivas_reverb.c b/lib_rend/ivas_reverb.c index 1f43d39913a256c340f9dc6ce177c1b6e0929730..2a34a24c48f69fdffdc0ab0d2c054e09e88c49f8 100644 --- a/lib_rend/ivas_reverb.c +++ b/lib_rend/ivas_reverb.c @@ -1777,7 +1777,6 @@ void ivas_binaural_reverb_processSubframe( * Allocate and initialize binaural room reverberator handle *------------------------------------------------------------------------*/ -#ifdef FIX_822_REFACTOR_BIN_REVERB_OPEN static ivas_error ivas_binaural_reverb_open( REVERB_STRUCT_HANDLE *hReverbPr, /* i/o: binaural reverb handle */ const int16_t numBins, /* i : number of CLDFB bins */ @@ -1787,28 +1786,9 @@ static ivas_error ivas_binaural_reverb_open( const float *revEnes, /* i : spectrum for reverberated sound at each CLDFB bin */ const int16_t preDelay /* i : reverb pre-delay in CLDFB slots */ ) -#else -ivas_error ivas_binaural_reverb_open( - REVERB_STRUCT_HANDLE *hReverbPr, /* i/o: binaural reverb handle */ - const int16_t numBins, /* i : number of CLDFB bins */ - const int16_t numCldfbSlotsPerFrame, /* i : number of CLDFB slots per frame */ - IVAS_ROOM_ACOUSTICS_CONFIG_DATA *roomAcoustics, /* i/o: room acoustics parameters */ - const AUDIO_CONFIG output_config, /* i : output audio configuration */ - const int32_t sampling_rate, /* i : sampling rate */ - const RENDERER_TYPE renderer_type, /* i : renderer type */ - const HRTFS_FASTCONV_HANDLE hHrtfFastConv, /* i : FastConv HRTF handle */ - const HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : Parametric binauralizer HRTF handle */ -) -#endif { int16_t bin, chIdx, k, len; REVERB_STRUCT_HANDLE hReverb; -#ifndef FIX_822_REFACTOR_BIN_REVERB_OPEN - const float *revTimes; - float t60[CLDFB_NO_CHANNELS_MAX]; - float ene[CLDFB_NO_CHANNELS_MAX]; - ivas_error error; -#endif if ( ( *hReverbPr = (REVERB_STRUCT_HANDLE) malloc( sizeof( REVERB_STRUCT ) ) ) == NULL ) { @@ -1830,23 +1810,6 @@ ivas_error ivas_binaural_reverb_open( set_f( hReverb->preDelayBufferImag[k], 0.0f, hReverb->numBins ); } -#ifndef FIX_822_REFACTOR_BIN_REVERB_OPEN - if ( renderer_type == RENDERER_BINAURAL_FASTCONV ) - { - if ( !roomAcoustics->override ) - { - revTimes = hHrtfFastConv->fastconvReverberationTimes; - } - else - { - revTimes = t60; - } - } - else - { - revTimes = hHrtfParambin->parametricReverberationTimes; - } -#endif for ( bin = 0; bin < hReverb->numBins; bin++ ) { /* Loop Buffer */ @@ -1909,40 +1872,14 @@ ivas_error ivas_binaural_reverb_open( } } -#ifdef FIX_822_REFACTOR_BIN_REVERB_OPEN ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, revTimes, revEnes ); ivas_binaural_reverb_setPreDelay( hReverb, preDelay ); -#else - if ( ( roomAcoustics ) && ( roomAcoustics->override ) ) - { - if ( ( error = ivas_reverb_prepare_cldfb_params( roomAcoustics, hHrtfFastConv, output_config, false, sampling_rate, t60, ene ) ) != IVAS_ERR_OK ) - { - return error; - } - ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, t60, ene ); - ivas_binaural_reverb_setPreDelay( hReverb, (int16_t) roundf( 48000.0f * roomAcoustics->acousticPreDelay / CLDFB_NO_CHANNELS_MAX ) ); - } - else - { - if ( renderer_type == RENDERER_BINAURAL_FASTCONV ) - { - ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, hHrtfFastConv->fastconvReverberationTimes, hHrtfFastConv->fastconvReverberationEneCorrections ); - ivas_binaural_reverb_setPreDelay( hReverb, 10 ); - } - else - { - ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, hHrtfParambin->parametricReverberationTimes, hHrtfParambin->parametricReverberationEneCorrections ); - ivas_binaural_reverb_setPreDelay( hReverb, 10 ); - } - } -#endif return IVAS_ERR_OK; } -#ifdef FIX_822_REFACTOR_BIN_REVERB_OPEN /*------------------------------------------------------------------------- * ivas_binaural_reverb_open_fastconv() * @@ -2037,7 +1974,7 @@ ivas_error ivas_binaural_reverb_open_parambin( return error; } -#endif + /*------------------------------------------------------------------------- * ivas_binaural_reverb_close()