Loading lib_com/ivas_cnst.h +3 −0 Original line number Diff line number Diff line Loading @@ -1216,6 +1216,9 @@ enum #define MASA_BIT_REDUCT_PARAM 10 #define MASA_MAXIMUM_TWO_DIR_BANDS 24 #define NBITS_HR_COH 4 #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS #define OMASA_TDREND_MATCHING_GAIN 0.7943f #endif #define MASA_JBM_RINGBUFFER_FRAMES 3 Loading lib_com/options.h +13 −1 Original line number Diff line number Diff line Loading @@ -211,13 +211,25 @@ #define BE_FIX_567_DOUBLE_STEREO_DMX /* NTT: Fix formal issues */ #define NONBE_FIX_567_DOUBLE_STEREO_DMX /* Orange: Double-precision replaced by single-precision */ #define NONBE_FIX_947_STEREO_DMX_EVS_POC /* Orange: Fix clicks on POC */ #ifdef NONBE_FIX_947_STEREO_DMX_EVS_POC #define NONBE_FIX_947_STEREO_DMX_ROMOPT /* Orange: ROM optimisation for POC*/ #endif #define NONBE_FIX_947_STEREO_DMX_EVS_PHA /* Orange: Fix issues on PHA */ #ifdef NONBE_FIX_947_STEREO_DMX_EVS_PHA #define NONBE_FIX_947_STEREO_DMX_FADOPT /* Orange: Fading optimisation */ #endif #define NONBE_FIX_951_MCMASA_5MS_RENDERING /* Nokia: issue #951: Differences for 5ms and 20ms rendering for McMASA at 13.2kbps to BINAURAL */ #define NONBE_FIX_979_OSBA_STEREO_5MS /* FhG : issue #979 : 5ms and 20ms output different for OSBA and stereo */ #define FIX_983_DISC_ISM_DIGEST_NUM_OBJS /* FhG: issue #983: the discrete ISM digest function uses the wrong number of objects */ #define FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI /* FhG: fix and undef behaviour bug in the harmonic TCX model arithmetic coder */ #define NONBE_FIX_974_OSBA_JBM_MONO_RS_USAN /* FhG : issue #974: usan in mono and stereo output in OSBA JBM RS */ #define NONBE_FIX_982_OMASA_DELAY_COMP_5MS /* FhG : issue #982 : 5ms and 20ms output different for OMASA */ #define NONBE_FIX_975_JBM_USAN /* FhG: Fix issue #975, USAN in JBM decoding ad 13.2kbps */ #define FIX_ACCESS_WITHIN_NULL_STRUCT_MC_BW_SWITCHING /* FhG: fix usan error in MCT with bw swicthing */ #define NONBE_FIX_986_MC_BW_SWITCHING /* FhG: fix crash in bw and br switching with MC */ /* #################### End BASOP porting switches ############################ */ Loading lib_dec/ivas_ism_renderer.c +2 −0 Original line number Diff line number Diff line Loading @@ -524,6 +524,7 @@ void ivas_omasa_separate_object_render_jbm( for ( obj = 0; obj < num_objects; obj++ ) { /* Delay the signal to match CLDFB delay. Delay the whole buffer with the first rendering call of the stretched buffer. */ #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS if ( slots_rendered == 0 ) { int16_t tcBufferSize; Loading @@ -531,6 +532,7 @@ void ivas_omasa_separate_object_render_jbm( tcBufferSize = hSpatParamRendCom->num_slots * hSpatParamRendCom->slot_size; delay_signal( input_f[obj], tcBufferSize, st_ivas->hMasaIsmData->delayBuffer[obj], st_ivas->hMasaIsmData->delayBuffer_size ); } #endif offsetSamples = 0; for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) Loading lib_dec/ivas_jbm_dec.c +26 −0 Original line number Diff line number Diff line Loading @@ -892,6 +892,32 @@ void ivas_jbm_dec_feed_tc_to_renderer( { ivas_ism_dec_digest_tc( st_ivas ); } #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_DIRAC ) { int16_t num_objects; /* Delay the signal to match CLDFB delay. Delay the whole buffer. */ num_objects = 0; if ( ( st_ivas->ism_mode == ISM_MASA_MODE_MASA_ONE_OBJ || st_ivas->ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ ) && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC ) { num_objects = 1; } else if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC ) { num_objects = st_ivas->nchan_ism; } for ( n = 0; n < num_objects; n++ ) { if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC ) { v_multc( st_ivas->hTcBuffer->tc[CPE_CHANNELS + n], OMASA_TDREND_MATCHING_GAIN, st_ivas->hTcBuffer->tc[CPE_CHANNELS + n], st_ivas->hTcBuffer->n_samples_available ); } delay_signal( st_ivas->hTcBuffer->tc[CPE_CHANNELS + n], st_ivas->hTcBuffer->n_samples_available, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); } } #endif } else if ( st_ivas->ivas_format == MC_FORMAT ) { Loading lib_dec/ivas_omasa_dec.c +34 −5 Original line number Diff line number Diff line Loading @@ -47,7 +47,10 @@ * Local constants *------------------------------------------------------------------------*/ #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS #define OMASA_TDREND_MATCHING_GAIN 0.7943f #endif /*-------------------------------------------------------------------* * ivas_omasa_data_open() Loading Loading @@ -600,18 +603,38 @@ void ivas_omasa_dirac_rend_jbm( int16_t n; float data_separated_objects[MAX_NUM_OBJECTS][L_FRAME48k]; #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS if ( !st_ivas->hDecoderConfig->Opt_tsm ) { *nSamplesRendered = min( nSamplesAsked, st_ivas->hTcBuffer->n_samples_available ); #endif if ( st_ivas->ism_mode == ISM_MASA_MODE_MASA_ONE_OBJ || st_ivas->ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ ) { #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS mvr2r( &output_f[CPE_CHANNELS][st_ivas->hTcBuffer->n_samples_rendered], data_separated_objects[0], *nSamplesRendered ); #else mvr2r( output_f[CPE_CHANNELS], data_separated_objects[0], nSamplesAsked ); #endif } else { for ( n = 0; n < st_ivas->nchan_ism; n++ ) { #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS mvr2r( &output_f[n + CPE_CHANNELS][st_ivas->hTcBuffer->n_samples_rendered], data_separated_objects[n], *nSamplesRendered ); #else mvr2r( output_f[n + CPE_CHANNELS], data_separated_objects[n], nSamplesAsked ); #endif } } #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS } #endif subframes_rendered = st_ivas->hSpatParamRendCom->subframes_rendered; slots_rendered = st_ivas->hSpatParamRendCom->slots_rendered; Loading Loading @@ -640,10 +663,14 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( { int16_t n; float data_separated_objects[MAX_NUM_OBJECTS][L_FRAME48k]; #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS float gain = OMASA_TDREND_MATCHING_GAIN; #endif ivas_error error; float *p_sepobj[MAX_NUM_OBJECTS]; #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS float *tc_local[MAX_TRANSPORT_CHANNELS]; #endif #ifdef SPLIT_REND_WITH_HEAD_ROT int16_t slot_idx_start; Loading @@ -655,6 +682,7 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( p_sepobj[n] = &data_separated_objects[n][0]; } #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS /* Delay the object signals to match the CLDFB delay. Delay the whole buffer with the first rendering call of the stretched buffer. */ if ( st_ivas->hSpatParamRendCom->slots_rendered == 0 ) { Loading @@ -669,6 +697,7 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( delay_signal( tc_local[n], tcBufferSize, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); } } #endif ivas_dirac_dec_binaural_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, nchan_transport, output_f ); Loading Loading
lib_com/ivas_cnst.h +3 −0 Original line number Diff line number Diff line Loading @@ -1216,6 +1216,9 @@ enum #define MASA_BIT_REDUCT_PARAM 10 #define MASA_MAXIMUM_TWO_DIR_BANDS 24 #define NBITS_HR_COH 4 #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS #define OMASA_TDREND_MATCHING_GAIN 0.7943f #endif #define MASA_JBM_RINGBUFFER_FRAMES 3 Loading
lib_com/options.h +13 −1 Original line number Diff line number Diff line Loading @@ -211,13 +211,25 @@ #define BE_FIX_567_DOUBLE_STEREO_DMX /* NTT: Fix formal issues */ #define NONBE_FIX_567_DOUBLE_STEREO_DMX /* Orange: Double-precision replaced by single-precision */ #define NONBE_FIX_947_STEREO_DMX_EVS_POC /* Orange: Fix clicks on POC */ #ifdef NONBE_FIX_947_STEREO_DMX_EVS_POC #define NONBE_FIX_947_STEREO_DMX_ROMOPT /* Orange: ROM optimisation for POC*/ #endif #define NONBE_FIX_947_STEREO_DMX_EVS_PHA /* Orange: Fix issues on PHA */ #ifdef NONBE_FIX_947_STEREO_DMX_EVS_PHA #define NONBE_FIX_947_STEREO_DMX_FADOPT /* Orange: Fading optimisation */ #endif #define NONBE_FIX_951_MCMASA_5MS_RENDERING /* Nokia: issue #951: Differences for 5ms and 20ms rendering for McMASA at 13.2kbps to BINAURAL */ #define NONBE_FIX_979_OSBA_STEREO_5MS /* FhG : issue #979 : 5ms and 20ms output different for OSBA and stereo */ #define FIX_983_DISC_ISM_DIGEST_NUM_OBJS /* FhG: issue #983: the discrete ISM digest function uses the wrong number of objects */ #define FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI /* FhG: fix and undef behaviour bug in the harmonic TCX model arithmetic coder */ #define NONBE_FIX_974_OSBA_JBM_MONO_RS_USAN /* FhG : issue #974: usan in mono and stereo output in OSBA JBM RS */ #define NONBE_FIX_982_OMASA_DELAY_COMP_5MS /* FhG : issue #982 : 5ms and 20ms output different for OMASA */ #define NONBE_FIX_975_JBM_USAN /* FhG: Fix issue #975, USAN in JBM decoding ad 13.2kbps */ #define FIX_ACCESS_WITHIN_NULL_STRUCT_MC_BW_SWITCHING /* FhG: fix usan error in MCT with bw swicthing */ #define NONBE_FIX_986_MC_BW_SWITCHING /* FhG: fix crash in bw and br switching with MC */ /* #################### End BASOP porting switches ############################ */ Loading
lib_dec/ivas_ism_renderer.c +2 −0 Original line number Diff line number Diff line Loading @@ -524,6 +524,7 @@ void ivas_omasa_separate_object_render_jbm( for ( obj = 0; obj < num_objects; obj++ ) { /* Delay the signal to match CLDFB delay. Delay the whole buffer with the first rendering call of the stretched buffer. */ #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS if ( slots_rendered == 0 ) { int16_t tcBufferSize; Loading @@ -531,6 +532,7 @@ void ivas_omasa_separate_object_render_jbm( tcBufferSize = hSpatParamRendCom->num_slots * hSpatParamRendCom->slot_size; delay_signal( input_f[obj], tcBufferSize, st_ivas->hMasaIsmData->delayBuffer[obj], st_ivas->hMasaIsmData->delayBuffer_size ); } #endif offsetSamples = 0; for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) Loading
lib_dec/ivas_jbm_dec.c +26 −0 Original line number Diff line number Diff line Loading @@ -892,6 +892,32 @@ void ivas_jbm_dec_feed_tc_to_renderer( { ivas_ism_dec_digest_tc( st_ivas ); } #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_DIRAC ) { int16_t num_objects; /* Delay the signal to match CLDFB delay. Delay the whole buffer. */ num_objects = 0; if ( ( st_ivas->ism_mode == ISM_MASA_MODE_MASA_ONE_OBJ || st_ivas->ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ ) && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC ) { num_objects = 1; } else if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC ) { num_objects = st_ivas->nchan_ism; } for ( n = 0; n < num_objects; n++ ) { if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC ) { v_multc( st_ivas->hTcBuffer->tc[CPE_CHANNELS + n], OMASA_TDREND_MATCHING_GAIN, st_ivas->hTcBuffer->tc[CPE_CHANNELS + n], st_ivas->hTcBuffer->n_samples_available ); } delay_signal( st_ivas->hTcBuffer->tc[CPE_CHANNELS + n], st_ivas->hTcBuffer->n_samples_available, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); } } #endif } else if ( st_ivas->ivas_format == MC_FORMAT ) { Loading
lib_dec/ivas_omasa_dec.c +34 −5 Original line number Diff line number Diff line Loading @@ -47,7 +47,10 @@ * Local constants *------------------------------------------------------------------------*/ #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS #define OMASA_TDREND_MATCHING_GAIN 0.7943f #endif /*-------------------------------------------------------------------* * ivas_omasa_data_open() Loading Loading @@ -600,18 +603,38 @@ void ivas_omasa_dirac_rend_jbm( int16_t n; float data_separated_objects[MAX_NUM_OBJECTS][L_FRAME48k]; #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS if ( !st_ivas->hDecoderConfig->Opt_tsm ) { *nSamplesRendered = min( nSamplesAsked, st_ivas->hTcBuffer->n_samples_available ); #endif if ( st_ivas->ism_mode == ISM_MASA_MODE_MASA_ONE_OBJ || st_ivas->ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ ) { #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS mvr2r( &output_f[CPE_CHANNELS][st_ivas->hTcBuffer->n_samples_rendered], data_separated_objects[0], *nSamplesRendered ); #else mvr2r( output_f[CPE_CHANNELS], data_separated_objects[0], nSamplesAsked ); #endif } else { for ( n = 0; n < st_ivas->nchan_ism; n++ ) { #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS mvr2r( &output_f[n + CPE_CHANNELS][st_ivas->hTcBuffer->n_samples_rendered], data_separated_objects[n], *nSamplesRendered ); #else mvr2r( output_f[n + CPE_CHANNELS], data_separated_objects[n], nSamplesAsked ); #endif } } #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS } #endif subframes_rendered = st_ivas->hSpatParamRendCom->subframes_rendered; slots_rendered = st_ivas->hSpatParamRendCom->slots_rendered; Loading Loading @@ -640,10 +663,14 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( { int16_t n; float data_separated_objects[MAX_NUM_OBJECTS][L_FRAME48k]; #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS float gain = OMASA_TDREND_MATCHING_GAIN; #endif ivas_error error; float *p_sepobj[MAX_NUM_OBJECTS]; #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS float *tc_local[MAX_TRANSPORT_CHANNELS]; #endif #ifdef SPLIT_REND_WITH_HEAD_ROT int16_t slot_idx_start; Loading @@ -655,6 +682,7 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( p_sepobj[n] = &data_separated_objects[n][0]; } #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS /* Delay the object signals to match the CLDFB delay. Delay the whole buffer with the first rendering call of the stretched buffer. */ if ( st_ivas->hSpatParamRendCom->slots_rendered == 0 ) { Loading @@ -669,6 +697,7 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( delay_signal( tc_local[n], tcBufferSize, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); } } #endif ivas_dirac_dec_binaural_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, nchan_transport, output_f ); Loading