Loading lib_com/options.h +2 −1 Original line number Diff line number Diff line Loading @@ -208,6 +208,7 @@ #define FIX_485_STATIC_BUFFERS /* FhG: move static buffers in DirAC parameter estimator to the DirAC struct */ #define FIX_I503_ASAN_ERROR_IND_LIST /* VA: fix issue #503: address sanitizer error with IND_LIST_DYN */ #define FIX_473_JITTER_NONDIEGETIC_PANNING /* FhG,Orange: add missing non-diegetic panning to JITTER */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading lib_dec/ivas_ism_renderer.c +4 −0 Original line number Diff line number Diff line Loading @@ -269,7 +269,11 @@ void ivas_ism_render_sf( { /* Head rotation: rotate the object positions depending the head's orientation */ #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 && !st_ivas->hIsmMetaData[i]->non_diegetic_flag ) #else if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 ) #endif { rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, Rmat, st_ivas->hIntSetup.is_planar_setup ); if ( st_ivas->hEFAPdata != NULL ) Loading lib_dec/ivas_jbm_dec.c +25 −0 Original line number Diff line number Diff line Loading @@ -611,6 +611,9 @@ ivas_error ivas_jbm_dec_render( int16_t nchan_remapped; int32_t output_Fs; AUDIO_CONFIG output_config; #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING float pan_left, pan_right; #endif int16_t nSamplesAskedLocal; ivas_error error; float *p_output[MAX_OUTPUT_CHANNELS]; Loading Loading @@ -669,6 +672,16 @@ ivas_error ivas_jbm_dec_render( { ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, st_ivas->nchan_transport, p_output ); } #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; pan_right = 1.f - pan_left; v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], *nSamplesRendered ); v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], *nSamplesRendered ); } #endif else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { ivas_param_ism_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); Loading @@ -689,6 +702,15 @@ ivas_error ivas_jbm_dec_render( /* Convert to CICPxx; used also for ISM->CICP19->binaural_room rendering */ ivas_ism_render_sf( st_ivas, p_output, *nSamplesRendered ); } #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) { pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; pan_right = 1.f - pan_left; v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], *nSamplesRendered ); v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], *nSamplesRendered ); } #endif else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { /* Convert to Ambisonics; used also for ISM->HOA3->binaural rendering */ Loading Loading @@ -1655,6 +1677,9 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( Decoder_Struct *st_ivas ) case RENDERER_PARAM_ISM: case RENDERER_BINAURAL_MIXER_CONV: case RENDERER_BINAURAL_MIXER_CONV_ROOM: #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING case RENDERER_NON_DIEGETIC_DOWNMIX: #endif buffer_mode = TC_BUFFER_MODE_RENDERER; break; case RENDERER_MC_PARAMMC: Loading lib_dec/ivas_objectRenderer_internal.c +18 −3 Original line number Diff line number Diff line Loading @@ -113,7 +113,8 @@ void ObjRenderIVASSubframe( float *tc_local[MAX_TRANSPORT_CHANNELS]; int16_t ch, slot_size, slots_to_render, output_frame; #ifdef FIX_356_ISM_METADATA_SYNC int16_t ism_md_subframe_update_jbm = 0; /* Number of subframes to delay metadata to sync with audio */ int16_t ism_md_subframe_update_jbm = st_ivas->hTcBuffer->nb_subframes - 2; /* Number of subframes to delay metadata to sync with audio */ int16_t c_indx, nS; #endif for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { Loading Loading @@ -145,7 +146,21 @@ void ObjRenderIVASSubframe( /* Update object position(s) */ #ifdef FIX_356_ISM_METADATA_SYNC c_indx = 0; for ( nS = 0; nS < st_ivas->nchan_transport; nS++ ) { if ( !( st_ivas->ivas_format == MC_FORMAT && nS == LFE_CHANNEL ) ) /* Skip LFE for MC */ { st_ivas->hBinRendererTd->Sources[c_indx]->InputFrame_p = tc_local[nS]; st_ivas->hBinRendererTd->Sources[c_indx]->SrcRend_p->InputAvailable = TRUE; c_indx++; } } if ( subframe_idx == ism_md_subframe_update_jbm ) { TDREND_Update_object_positions( st_ivas->hBinRendererTd, st_ivas->nchan_transport, st_ivas->ivas_format, st_ivas->hIsmMetaData ); } #else TDREND_Update_object_positions( st_ivas->hBinRendererTd, st_ivas->nchan_transport, LFE_CHANNEL, st_ivas->ivas_format, st_ivas->hIsmMetaData, tc_local ); #endif Loading @@ -163,7 +178,7 @@ void ObjRenderIVASSubframe( /* Render subframe */ #ifdef FIX_356_ISM_METADATA_SYNC TDREND_GetMix( st_ivas->hBinRendererTd, output_f_local, output_frame, 0, ism_md_subframe_update_jbm ); TDREND_GetMix( st_ivas->hBinRendererTd, output_f_local, output_frame, 0, ism_md_subframe_update_jbm != subframe_idx ); #else TDREND_GetMix( st_ivas->hBinRendererTd, output_f_local, output_frame, 0 ); #endif Loading lib_dec/lib_dec.c +18 −2 Original line number Diff line number Diff line Loading @@ -891,8 +891,20 @@ static ivas_error IVAS_DEC_Setup( if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) { #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING if ( hIvasDec->st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) { *nTransportChannels = MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN; *nOutChannels = MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN; } else { #endif *nTransportChannels = 1; *nOutChannels = 1; #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING } #endif } else { Loading Loading @@ -2909,7 +2921,11 @@ static ivas_error evs_dec_main( if ( floatBuf != NULL ) { /* BE workaround */ #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING int16_t pcm_buf_local[L_FRAME48k * MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN]; #else int16_t pcm_buf_local[L_FRAME48k]; #endif /* convert 'float' output data to 'short' */ Loading Loading
lib_com/options.h +2 −1 Original line number Diff line number Diff line Loading @@ -208,6 +208,7 @@ #define FIX_485_STATIC_BUFFERS /* FhG: move static buffers in DirAC parameter estimator to the DirAC struct */ #define FIX_I503_ASAN_ERROR_IND_LIST /* VA: fix issue #503: address sanitizer error with IND_LIST_DYN */ #define FIX_473_JITTER_NONDIEGETIC_PANNING /* FhG,Orange: add missing non-diegetic panning to JITTER */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading
lib_dec/ivas_ism_renderer.c +4 −0 Original line number Diff line number Diff line Loading @@ -269,7 +269,11 @@ void ivas_ism_render_sf( { /* Head rotation: rotate the object positions depending the head's orientation */ #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 && !st_ivas->hIsmMetaData[i]->non_diegetic_flag ) #else if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 ) #endif { rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, Rmat, st_ivas->hIntSetup.is_planar_setup ); if ( st_ivas->hEFAPdata != NULL ) Loading
lib_dec/ivas_jbm_dec.c +25 −0 Original line number Diff line number Diff line Loading @@ -611,6 +611,9 @@ ivas_error ivas_jbm_dec_render( int16_t nchan_remapped; int32_t output_Fs; AUDIO_CONFIG output_config; #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING float pan_left, pan_right; #endif int16_t nSamplesAskedLocal; ivas_error error; float *p_output[MAX_OUTPUT_CHANNELS]; Loading Loading @@ -669,6 +672,16 @@ ivas_error ivas_jbm_dec_render( { ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, st_ivas->nchan_transport, p_output ); } #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; pan_right = 1.f - pan_left; v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], *nSamplesRendered ); v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], *nSamplesRendered ); } #endif else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { ivas_param_ism_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); Loading @@ -689,6 +702,15 @@ ivas_error ivas_jbm_dec_render( /* Convert to CICPxx; used also for ISM->CICP19->binaural_room rendering */ ivas_ism_render_sf( st_ivas, p_output, *nSamplesRendered ); } #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) { pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; pan_right = 1.f - pan_left; v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], *nSamplesRendered ); v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], *nSamplesRendered ); } #endif else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { /* Convert to Ambisonics; used also for ISM->HOA3->binaural rendering */ Loading Loading @@ -1655,6 +1677,9 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( Decoder_Struct *st_ivas ) case RENDERER_PARAM_ISM: case RENDERER_BINAURAL_MIXER_CONV: case RENDERER_BINAURAL_MIXER_CONV_ROOM: #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING case RENDERER_NON_DIEGETIC_DOWNMIX: #endif buffer_mode = TC_BUFFER_MODE_RENDERER; break; case RENDERER_MC_PARAMMC: Loading
lib_dec/ivas_objectRenderer_internal.c +18 −3 Original line number Diff line number Diff line Loading @@ -113,7 +113,8 @@ void ObjRenderIVASSubframe( float *tc_local[MAX_TRANSPORT_CHANNELS]; int16_t ch, slot_size, slots_to_render, output_frame; #ifdef FIX_356_ISM_METADATA_SYNC int16_t ism_md_subframe_update_jbm = 0; /* Number of subframes to delay metadata to sync with audio */ int16_t ism_md_subframe_update_jbm = st_ivas->hTcBuffer->nb_subframes - 2; /* Number of subframes to delay metadata to sync with audio */ int16_t c_indx, nS; #endif for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { Loading Loading @@ -145,7 +146,21 @@ void ObjRenderIVASSubframe( /* Update object position(s) */ #ifdef FIX_356_ISM_METADATA_SYNC c_indx = 0; for ( nS = 0; nS < st_ivas->nchan_transport; nS++ ) { if ( !( st_ivas->ivas_format == MC_FORMAT && nS == LFE_CHANNEL ) ) /* Skip LFE for MC */ { st_ivas->hBinRendererTd->Sources[c_indx]->InputFrame_p = tc_local[nS]; st_ivas->hBinRendererTd->Sources[c_indx]->SrcRend_p->InputAvailable = TRUE; c_indx++; } } if ( subframe_idx == ism_md_subframe_update_jbm ) { TDREND_Update_object_positions( st_ivas->hBinRendererTd, st_ivas->nchan_transport, st_ivas->ivas_format, st_ivas->hIsmMetaData ); } #else TDREND_Update_object_positions( st_ivas->hBinRendererTd, st_ivas->nchan_transport, LFE_CHANNEL, st_ivas->ivas_format, st_ivas->hIsmMetaData, tc_local ); #endif Loading @@ -163,7 +178,7 @@ void ObjRenderIVASSubframe( /* Render subframe */ #ifdef FIX_356_ISM_METADATA_SYNC TDREND_GetMix( st_ivas->hBinRendererTd, output_f_local, output_frame, 0, ism_md_subframe_update_jbm ); TDREND_GetMix( st_ivas->hBinRendererTd, output_f_local, output_frame, 0, ism_md_subframe_update_jbm != subframe_idx ); #else TDREND_GetMix( st_ivas->hBinRendererTd, output_f_local, output_frame, 0 ); #endif Loading
lib_dec/lib_dec.c +18 −2 Original line number Diff line number Diff line Loading @@ -891,8 +891,20 @@ static ivas_error IVAS_DEC_Setup( if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) { #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING if ( hIvasDec->st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) { *nTransportChannels = MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN; *nOutChannels = MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN; } else { #endif *nTransportChannels = 1; *nOutChannels = 1; #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING } #endif } else { Loading Loading @@ -2909,7 +2921,11 @@ static ivas_error evs_dec_main( if ( floatBuf != NULL ) { /* BE workaround */ #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING int16_t pcm_buf_local[L_FRAME48k * MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN]; #else int16_t pcm_buf_local[L_FRAME48k]; #endif /* convert 'float' output data to 'short' */ Loading