diff --git a/lib_com/options.h b/lib_com/options.h index bc8ad05aa28ba711b7cc604014b21d2fe650a3f0..2b6116bf4e64328f5cd0e288c1e5b73484433f92 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -182,6 +182,7 @@ #define NONBE_FIX_809_EXTERNAL_TARGET_INTERPOLATION /* FhG: issue 809: unify external target interpolation inter and intra frame behaviour */ #define NONBE_FIX_775_OSBA_BR_SWITCHING_CRASH /* FhG: issue 775: fix crash in OSBA with bitrate switching and output order lower than input order */ #define NONBE_FIX_827_JBM_CREND_EARLY_REFLECTIONS /* FhG: issue #827: Resolve "JBM Crend early reflections are wrong" */ +#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 diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index c52d7dceb1c3019b8be5d8237bed1c97bbb9c30b..ba8194abe786f970ee44cf837447c3b73e01fe63 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -996,6 +996,11 @@ 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; @@ -1006,7 +1011,11 @@ 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 || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) + 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; for ( i = 1; i < interpolator_length; i++ ) @@ -1043,7 +1052,11 @@ void ivas_ism_dec_digest_tc( azimuth = (int16_t) floorf( st_ivas->hIsmMetaData[i]->azimuth + 0.5f ); elevation = (int16_t) floorf( st_ivas->hIsmMetaData[i]->elevation + 0.5f ); - if ( ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) && + 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 ) { if ( st_ivas->hIntSetup.is_planar_setup ) @@ -1057,7 +1070,11 @@ void ivas_ism_dec_digest_tc( efap_determine_gains( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains[i], azimuth, elevation, EFAP_MODE_EFAP ); } } - else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) + 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)*/ ivas_dirac_dec_get_response( azimuth, elevation, st_ivas->hIsmRendererData->gains[i], st_ivas->hIntSetup.ambisonics_order );