Loading apps/decoder.c +2 −2 Original line number Diff line number Diff line Loading @@ -1010,7 +1010,7 @@ static bool parseCmdlIVAS_dec( else if ( strcmp( argv_to_upper, "-VS" ) == 0 ) { i++; int tmp = 100; int32_t tmp = 100; arg->variableSpeedMode = true; if ( i < argc - 3 ) { Loading @@ -1037,7 +1037,7 @@ static bool parseCmdlIVAS_dec( else if ( strcmp( argv_to_upper, "-VOIP_FRAMESIZE" ) == 0 ) { i++; int tmp; int32_t tmp; if ( i < argc - 3 ) { if ( !is_digits_only( argv[i] ) ) Loading lib_com/ivas_prot.h +2 −2 Original line number Diff line number Diff line Loading @@ -5715,10 +5715,10 @@ ivas_error ivas_td_binaural_renderer( ); #ifdef JBM_TSM_ON_TCS void ObjRenderIVASSubframe( ivas_error ivas_td_binaural_renderer_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output[], /* i/o: SCE channels / Binaural synthesis */ const int16_t output_frame /* i : output frame length */ const int16_t n_samples_granularity /* i : granularity of the renderer/buffer */ ); #endif Loading lib_dec/ivas_jbm_dec.c +17 −4 Original line number Diff line number Diff line Loading @@ -716,6 +716,7 @@ ivas_error ivas_jbm_dec_render( else /* ISM_MODE_DISC */ { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); /* Loudspeaker or Ambisonics rendering */ if ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { Loading @@ -731,7 +732,9 @@ ivas_error ivas_jbm_dec_render( /* Binaural rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { ObjRenderIVASSubframe( st_ivas, p_output, *nSamplesRendered ); if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) { return error; } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { Loading Loading @@ -834,7 +837,11 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { ObjRenderIVASSubframe( st_ivas, p_output, *nSamplesRendered ); if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) { return error; } ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, st_ivas->hTcBuffer->tc, p_output ); } } Loading Loading @@ -995,7 +1002,9 @@ ivas_error ivas_jbm_dec_flush_renderer( /* Binaural rendering */ if ( renderer_type_old == RENDERER_BINAURAL_OBJECTS_TD ) { ObjRenderIVASSubframe( st_ivas, p_output, hTcBuffer->n_samples_granularity ); if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, hTcBuffer->n_samples_granularity ) ) != IVAS_ERR_OK ) { return error; } else if ( renderer_type_old == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { Loading Loading @@ -1050,7 +1059,11 @@ ivas_error ivas_jbm_dec_flush_renderer( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { ObjRenderIVASSubframe( st_ivas, p_output, hTcBuffer->n_samples_granularity ); if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, hTcBuffer->n_samples_granularity ) ) != IVAS_ERR_OK ) { return error; } ivas_binaural_add_LFE( st_ivas, hTcBuffer->n_samples_granularity, st_ivas->hTcBuffer->tc, p_output ); } } Loading lib_dec/ivas_objectRenderer_internal.c +5 −4 Original line number Diff line number Diff line Loading @@ -85,16 +85,17 @@ ivas_error ivas_td_binaural_renderer( #ifdef JBM_TSM_ON_TCS /*---------------------------------------------------------------------* * ObjRenderIVASFrame() * ivas_td_binaural_renderer_sf() * * Receives the current frames for the object streams, updates metadata * and renders the current frame. *---------------------------------------------------------------------*/ void ObjRenderIVASSubframe( ivas_error ivas_td_binaural_renderer_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output[], /* i/o: SCE channels / Binaural synthesis */ const int16_t n_samples_asked ) const int16_t n_samples_granularity /* i : granularity of the renderer/buffer */ ) { int16_t first_sf, last_sf, subframe_idx; float reverb_signal[BINAURAL_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; Loading @@ -116,7 +117,7 @@ void ObjRenderIVASSubframe( } slot_size = st_ivas->hTcBuffer->n_samples_granularity; /* loop for synthesis, assume we always have to render in multiples of 5ms subframes with spills */ slots_to_render = min( st_ivas->hTcBuffer->num_slots - st_ivas->hTcBuffer->slots_rendered, n_samples_asked / slot_size ); slots_to_render = min( st_ivas->hTcBuffer->num_slots - st_ivas->hTcBuffer->slots_rendered, n_samples_granularity / slot_size ); first_sf = st_ivas->hTcBuffer->subframes_rendered; last_sf = first_sf; st_ivas->hTcBuffer->slots_rendered += slots_to_render; Loading lib_dec/lib_dec.c +34 −3 Original line number Diff line number Diff line Loading @@ -1889,6 +1889,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( return IVAS_ERR_VS_FRAME_NEEDED; } #endif #ifdef JBM_TSM_ON_TCS if ( hVoIP->nSamplesAvailableNext == 0 ) { Loading @@ -1907,6 +1908,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( extBufferedTime_ms = extBufferedSamples * 1000 / hDecoderConfig->output_Fs; dataUnit = NULL; #ifdef VARIABLE_SPEED_DECODING if ( hVoIP->mode == IVAS_DEC_VOIP_MODE_VOIP ) { Loading Loading @@ -1966,6 +1968,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( #ifdef VARIABLE_SPEED_DECODING } #endif /* decode */ if ( !hIvasDec->hasBeenFedFirstGoodFrame ) { Loading Loading @@ -2060,6 +2063,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( hVoIP->lastDecodedWasActive = 1; } #endif /* limit scale to range supported by time scaler */ if ( scale < APA_MIN_SCALE ) { Loading Loading @@ -3195,14 +3199,30 @@ static ivas_error input_format_API_to_internal( return IVAS_ERR_OK; } #ifdef JBM_TSM_ON_TCS static int16_t IVAS_DEC_VoIP_GetRenderGranularity( Decoder_Struct *st_ivas ) /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_GetRenderGranularity() * * *---------------------------------------------------------------------*/ static int16_t IVAS_DEC_VoIP_GetRenderGranularity( Decoder_Struct *st_ivas ) { return st_ivas->hTcBuffer->n_samples_granularity; } static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( IVAS_DEC_HANDLE hIvasDec ) /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_GetRendererConfig() * * *---------------------------------------------------------------------*/ static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( IVAS_DEC_HANDLE hIvasDec ) { JBM_RENDERER_TYPE rendererType; rendererType = JBM_RENDERER_NONE; Loading @@ -3219,7 +3239,17 @@ static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( IVAS_DEC_HANDLE hIvasD return rendererType; } ivas_error IVAS_DEC_VoIP_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ) /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_reconfigure() * * *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_VoIP_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ) { IVAS_DEC_VOIP *hVoIP; Loading @@ -3240,6 +3270,7 @@ ivas_error IVAS_DEC_VoIP_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t n #else startQuality = 1.0f; #endif /* get current renderer type*/ hVoIP->rendererType = IVAS_DEC_VoIP_GetRendererConfig( hIvasDec ); hDecoderConfig = hIvasDec->st_ivas->hDecoderConfig; Loading Loading
apps/decoder.c +2 −2 Original line number Diff line number Diff line Loading @@ -1010,7 +1010,7 @@ static bool parseCmdlIVAS_dec( else if ( strcmp( argv_to_upper, "-VS" ) == 0 ) { i++; int tmp = 100; int32_t tmp = 100; arg->variableSpeedMode = true; if ( i < argc - 3 ) { Loading @@ -1037,7 +1037,7 @@ static bool parseCmdlIVAS_dec( else if ( strcmp( argv_to_upper, "-VOIP_FRAMESIZE" ) == 0 ) { i++; int tmp; int32_t tmp; if ( i < argc - 3 ) { if ( !is_digits_only( argv[i] ) ) Loading
lib_com/ivas_prot.h +2 −2 Original line number Diff line number Diff line Loading @@ -5715,10 +5715,10 @@ ivas_error ivas_td_binaural_renderer( ); #ifdef JBM_TSM_ON_TCS void ObjRenderIVASSubframe( ivas_error ivas_td_binaural_renderer_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output[], /* i/o: SCE channels / Binaural synthesis */ const int16_t output_frame /* i : output frame length */ const int16_t n_samples_granularity /* i : granularity of the renderer/buffer */ ); #endif Loading
lib_dec/ivas_jbm_dec.c +17 −4 Original line number Diff line number Diff line Loading @@ -716,6 +716,7 @@ ivas_error ivas_jbm_dec_render( else /* ISM_MODE_DISC */ { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); /* Loudspeaker or Ambisonics rendering */ if ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { Loading @@ -731,7 +732,9 @@ ivas_error ivas_jbm_dec_render( /* Binaural rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { ObjRenderIVASSubframe( st_ivas, p_output, *nSamplesRendered ); if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) { return error; } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { Loading Loading @@ -834,7 +837,11 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { ObjRenderIVASSubframe( st_ivas, p_output, *nSamplesRendered ); if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) { return error; } ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, st_ivas->hTcBuffer->tc, p_output ); } } Loading Loading @@ -995,7 +1002,9 @@ ivas_error ivas_jbm_dec_flush_renderer( /* Binaural rendering */ if ( renderer_type_old == RENDERER_BINAURAL_OBJECTS_TD ) { ObjRenderIVASSubframe( st_ivas, p_output, hTcBuffer->n_samples_granularity ); if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, hTcBuffer->n_samples_granularity ) ) != IVAS_ERR_OK ) { return error; } else if ( renderer_type_old == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { Loading Loading @@ -1050,7 +1059,11 @@ ivas_error ivas_jbm_dec_flush_renderer( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { ObjRenderIVASSubframe( st_ivas, p_output, hTcBuffer->n_samples_granularity ); if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, hTcBuffer->n_samples_granularity ) ) != IVAS_ERR_OK ) { return error; } ivas_binaural_add_LFE( st_ivas, hTcBuffer->n_samples_granularity, st_ivas->hTcBuffer->tc, p_output ); } } Loading
lib_dec/ivas_objectRenderer_internal.c +5 −4 Original line number Diff line number Diff line Loading @@ -85,16 +85,17 @@ ivas_error ivas_td_binaural_renderer( #ifdef JBM_TSM_ON_TCS /*---------------------------------------------------------------------* * ObjRenderIVASFrame() * ivas_td_binaural_renderer_sf() * * Receives the current frames for the object streams, updates metadata * and renders the current frame. *---------------------------------------------------------------------*/ void ObjRenderIVASSubframe( ivas_error ivas_td_binaural_renderer_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output[], /* i/o: SCE channels / Binaural synthesis */ const int16_t n_samples_asked ) const int16_t n_samples_granularity /* i : granularity of the renderer/buffer */ ) { int16_t first_sf, last_sf, subframe_idx; float reverb_signal[BINAURAL_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; Loading @@ -116,7 +117,7 @@ void ObjRenderIVASSubframe( } slot_size = st_ivas->hTcBuffer->n_samples_granularity; /* loop for synthesis, assume we always have to render in multiples of 5ms subframes with spills */ slots_to_render = min( st_ivas->hTcBuffer->num_slots - st_ivas->hTcBuffer->slots_rendered, n_samples_asked / slot_size ); slots_to_render = min( st_ivas->hTcBuffer->num_slots - st_ivas->hTcBuffer->slots_rendered, n_samples_granularity / slot_size ); first_sf = st_ivas->hTcBuffer->subframes_rendered; last_sf = first_sf; st_ivas->hTcBuffer->slots_rendered += slots_to_render; Loading
lib_dec/lib_dec.c +34 −3 Original line number Diff line number Diff line Loading @@ -1889,6 +1889,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( return IVAS_ERR_VS_FRAME_NEEDED; } #endif #ifdef JBM_TSM_ON_TCS if ( hVoIP->nSamplesAvailableNext == 0 ) { Loading @@ -1907,6 +1908,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( extBufferedTime_ms = extBufferedSamples * 1000 / hDecoderConfig->output_Fs; dataUnit = NULL; #ifdef VARIABLE_SPEED_DECODING if ( hVoIP->mode == IVAS_DEC_VOIP_MODE_VOIP ) { Loading Loading @@ -1966,6 +1968,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( #ifdef VARIABLE_SPEED_DECODING } #endif /* decode */ if ( !hIvasDec->hasBeenFedFirstGoodFrame ) { Loading Loading @@ -2060,6 +2063,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( hVoIP->lastDecodedWasActive = 1; } #endif /* limit scale to range supported by time scaler */ if ( scale < APA_MIN_SCALE ) { Loading Loading @@ -3195,14 +3199,30 @@ static ivas_error input_format_API_to_internal( return IVAS_ERR_OK; } #ifdef JBM_TSM_ON_TCS static int16_t IVAS_DEC_VoIP_GetRenderGranularity( Decoder_Struct *st_ivas ) /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_GetRenderGranularity() * * *---------------------------------------------------------------------*/ static int16_t IVAS_DEC_VoIP_GetRenderGranularity( Decoder_Struct *st_ivas ) { return st_ivas->hTcBuffer->n_samples_granularity; } static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( IVAS_DEC_HANDLE hIvasDec ) /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_GetRendererConfig() * * *---------------------------------------------------------------------*/ static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( IVAS_DEC_HANDLE hIvasDec ) { JBM_RENDERER_TYPE rendererType; rendererType = JBM_RENDERER_NONE; Loading @@ -3219,7 +3239,17 @@ static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( IVAS_DEC_HANDLE hIvasD return rendererType; } ivas_error IVAS_DEC_VoIP_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ) /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_reconfigure() * * *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_VoIP_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ) { IVAS_DEC_VOIP *hVoIP; Loading @@ -3240,6 +3270,7 @@ ivas_error IVAS_DEC_VoIP_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t n #else startQuality = 1.0f; #endif /* get current renderer type*/ hVoIP->rendererType = IVAS_DEC_VoIP_GetRendererConfig( hIvasDec ); hDecoderConfig = hIvasDec->st_ivas->hDecoderConfig; Loading