Loading lib_com/ivas_cnst.h +3 −0 Original line number Diff line number Diff line Loading @@ -1318,6 +1318,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_FX 26026 #endif #define MASA_INV_ANGLE_AT_EQUATOR_DEG_Q30 (1453366656l) Loading lib_com/options.h +3 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,9 @@ #define NONBE_FIX_951_MCMASA_5MS_RENDERING /* Nokia: issue #951: Differences for 5ms and 20ms rendering for McMASA at 13.2 kbps 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 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 */ /* #################### End BASOP porting switches ############################ */ Loading lib_dec/ivas_ism_renderer_fx.c +2 −0 Original line number Diff line number Diff line Loading @@ -611,6 +611,7 @@ void ivas_omasa_separate_object_render_jbm_fx( 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 ) { Word16 tcBufferSize; Loading @@ -618,6 +619,7 @@ void ivas_omasa_separate_object_render_jbm_fx( tcBufferSize = i_mult( hSpatParamRendCom->num_slots, hSpatParamRendCom->slot_size ); delay_signal32_fx( input_fx[obj], tcBufferSize, st_ivas->hMasaIsmData->delayBuffer_fx[obj], st_ivas->hMasaIsmData->delayBuffer_size ); } #endif offsetSamples = 0; move16(); Loading lib_dec/ivas_jbm_dec_fx.c +26 −0 Original line number Diff line number Diff line Loading @@ -1728,6 +1728,32 @@ void ivas_jbm_dec_feed_tc_to_renderer_fx( { ivas_ism_dec_digest_tc_fx( 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( EQ_16( 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_fixed_16( st_ivas->hTcBuffer->tc_fx[CPE_CHANNELS + n], OMASA_TDREND_MATCHING_GAIN_FX, st_ivas->hTcBuffer->tc_fx[CPE_CHANNELS + n], st_ivas->hTcBuffer->n_samples_available ); } delay_signal32_fx( st_ivas->hTcBuffer->tc_fx[CPE_CHANNELS + n], st_ivas->hTcBuffer->n_samples_available, st_ivas->hMasaIsmData->delayBuffer_fx[n], st_ivas->hMasaIsmData->delayBuffer_size ); } } #endif } ELSE IF( EQ_16( st_ivas->ivas_format, MC_FORMAT ) ) { Loading lib_dec/ivas_omasa_dec_fx.c +34 −5 Original line number Diff line number Diff line Loading @@ -45,7 +45,9 @@ * Local constants *------------------------------------------------------------------------*/ #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS #define OMASA_TDREND_MATCHING_GAIN_FX 26026 #endif /*-------------------------------------------------------------------* * ivas_omasa_data_open() Loading Loading @@ -700,18 +702,39 @@ void ivas_omasa_dirac_rend_jbm_fx( Word16 n; Word32 data_separated_objects[MAX_NUM_OBJECTS][L_FRAME48k]; #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS test(); if ( !st_ivas->hDecoderConfig->Opt_tsm ) { *nSamplesRendered = min( nSamplesAsked, st_ivas->hTcBuffer->n_samples_available ); #endif test(); IF( EQ_32( st_ivas->ism_mode, ISM_MASA_MODE_MASA_ONE_OBJ ) || EQ_32( st_ivas->ism_mode, ISM_MASA_MODE_PARAM_ONE_OBJ ) ) { #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS Copy32( &output_f[CPE_CHANNELS][st_ivas->hTcBuffer->n_samples_rendered], data_separated_objects[0], *nSamplesRendered ); #else Copy32( 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 Copy32( &output_f[n + CPE_CHANNELS][st_ivas->hTcBuffer->n_samples_rendered], data_separated_objects[n], *nSamplesRendered ); #else Copy32( 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; move16(); Loading Loading @@ -751,10 +774,14 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm_fx( ) { Word16 n; #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS Word16 gain_fx = OMASA_TDREND_MATCHING_GAIN_FX; // Q15 #endif move16(); ivas_error error; #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS Word32 *tc_local_fx[MAX_TRANSPORT_CHANNELS]; #endif Word32 *p_sepobj_fx[MAX_NUM_OBJECTS]; // Q11 Word32 data_separated_objects_fx[MAX_NUM_OBJECTS][L_FRAME48k]; move16(); Loading @@ -771,6 +798,7 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm_fx( } /* Delay the object signals to match the CLDFB delay. Delay the whole buffer with the first rendering call of the stretched buffer. */ #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS IF( st_ivas->hSpatParamRendCom->slots_rendered == 0 ) { Word16 tcBufferSize; Loading @@ -785,6 +813,7 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm_fx( delay_signal32_fx( tc_local_fx[n], tcBufferSize, st_ivas->hMasaIsmData->delayBuffer_fx[n], st_ivas->hMasaIsmData->delayBuffer_size ); } } #endif ivas_dirac_dec_binaural_render_fx( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, nchan_transport, output_fx ); Loading Loading
lib_com/ivas_cnst.h +3 −0 Original line number Diff line number Diff line Loading @@ -1318,6 +1318,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_FX 26026 #endif #define MASA_INV_ANGLE_AT_EQUATOR_DEG_Q30 (1453366656l) Loading
lib_com/options.h +3 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,9 @@ #define NONBE_FIX_951_MCMASA_5MS_RENDERING /* Nokia: issue #951: Differences for 5ms and 20ms rendering for McMASA at 13.2 kbps 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 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 */ /* #################### End BASOP porting switches ############################ */ Loading
lib_dec/ivas_ism_renderer_fx.c +2 −0 Original line number Diff line number Diff line Loading @@ -611,6 +611,7 @@ void ivas_omasa_separate_object_render_jbm_fx( 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 ) { Word16 tcBufferSize; Loading @@ -618,6 +619,7 @@ void ivas_omasa_separate_object_render_jbm_fx( tcBufferSize = i_mult( hSpatParamRendCom->num_slots, hSpatParamRendCom->slot_size ); delay_signal32_fx( input_fx[obj], tcBufferSize, st_ivas->hMasaIsmData->delayBuffer_fx[obj], st_ivas->hMasaIsmData->delayBuffer_size ); } #endif offsetSamples = 0; move16(); Loading
lib_dec/ivas_jbm_dec_fx.c +26 −0 Original line number Diff line number Diff line Loading @@ -1728,6 +1728,32 @@ void ivas_jbm_dec_feed_tc_to_renderer_fx( { ivas_ism_dec_digest_tc_fx( 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( EQ_16( 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_fixed_16( st_ivas->hTcBuffer->tc_fx[CPE_CHANNELS + n], OMASA_TDREND_MATCHING_GAIN_FX, st_ivas->hTcBuffer->tc_fx[CPE_CHANNELS + n], st_ivas->hTcBuffer->n_samples_available ); } delay_signal32_fx( st_ivas->hTcBuffer->tc_fx[CPE_CHANNELS + n], st_ivas->hTcBuffer->n_samples_available, st_ivas->hMasaIsmData->delayBuffer_fx[n], st_ivas->hMasaIsmData->delayBuffer_size ); } } #endif } ELSE IF( EQ_16( st_ivas->ivas_format, MC_FORMAT ) ) { Loading
lib_dec/ivas_omasa_dec_fx.c +34 −5 Original line number Diff line number Diff line Loading @@ -45,7 +45,9 @@ * Local constants *------------------------------------------------------------------------*/ #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS #define OMASA_TDREND_MATCHING_GAIN_FX 26026 #endif /*-------------------------------------------------------------------* * ivas_omasa_data_open() Loading Loading @@ -700,18 +702,39 @@ void ivas_omasa_dirac_rend_jbm_fx( Word16 n; Word32 data_separated_objects[MAX_NUM_OBJECTS][L_FRAME48k]; #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS test(); if ( !st_ivas->hDecoderConfig->Opt_tsm ) { *nSamplesRendered = min( nSamplesAsked, st_ivas->hTcBuffer->n_samples_available ); #endif test(); IF( EQ_32( st_ivas->ism_mode, ISM_MASA_MODE_MASA_ONE_OBJ ) || EQ_32( st_ivas->ism_mode, ISM_MASA_MODE_PARAM_ONE_OBJ ) ) { #ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS Copy32( &output_f[CPE_CHANNELS][st_ivas->hTcBuffer->n_samples_rendered], data_separated_objects[0], *nSamplesRendered ); #else Copy32( 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 Copy32( &output_f[n + CPE_CHANNELS][st_ivas->hTcBuffer->n_samples_rendered], data_separated_objects[n], *nSamplesRendered ); #else Copy32( 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; move16(); Loading Loading @@ -751,10 +774,14 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm_fx( ) { Word16 n; #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS Word16 gain_fx = OMASA_TDREND_MATCHING_GAIN_FX; // Q15 #endif move16(); ivas_error error; #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS Word32 *tc_local_fx[MAX_TRANSPORT_CHANNELS]; #endif Word32 *p_sepobj_fx[MAX_NUM_OBJECTS]; // Q11 Word32 data_separated_objects_fx[MAX_NUM_OBJECTS][L_FRAME48k]; move16(); Loading @@ -771,6 +798,7 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm_fx( } /* Delay the object signals to match the CLDFB delay. Delay the whole buffer with the first rendering call of the stretched buffer. */ #ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS IF( st_ivas->hSpatParamRendCom->slots_rendered == 0 ) { Word16 tcBufferSize; Loading @@ -785,6 +813,7 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm_fx( delay_signal32_fx( tc_local_fx[n], tcBufferSize, st_ivas->hMasaIsmData->delayBuffer_fx[n], st_ivas->hMasaIsmData->delayBuffer_size ); } } #endif ivas_dirac_dec_binaural_render_fx( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, nchan_transport, output_fx ); Loading