Loading lib_dec/ivas_jbm_dec.c +5 −0 Original line number Diff line number Diff line Loading @@ -851,6 +851,11 @@ void ivas_dec_feed_tc_to_renderer( p_data_f[n] = &st_ivas->p_output_f[n][0]; } for ( n = 0; n < ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); n++ ) { st_ivas->hTcBuffer->tc[n] = st_ivas->p_output_f[n]; /* note: buffers needed in the TD decorellator */ } hTcBuffer->n_samples_buffered = nSamplesForRendering; hTcBuffer->n_samples_available = hTcBuffer->n_samples_buffered; *nSamplesResidual = 0; Loading lib_dec/ivas_mc_paramupmix_dec.c +0 −10 Original line number Diff line number Diff line Loading @@ -528,16 +528,6 @@ static void ivas_param_upmix_dec_decorr_subframes( nSamplesLeftForTD = nSamplesForRendering; nchan_internal = MC_PARAMUPMIX_COMBINATIONS; #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS if ( !st_ivas->hDecoderConfig->Opt_tsm ) { for ( ch = 0; ch < ivas_get_nchan_buffers_dec( st_ivas, -1, st_ivas->hDecoderConfig->ivas_total_brate ); ch++ ) { st_ivas->hTcBuffer->tc[ch] = st_ivas->p_output_f[ch]; } } #endif for ( ch = 0; ch < nchan_internal; ch++ ) { pPcm_tmp[ch] = st_ivas->hTcBuffer->tc[ch + 8]; Loading lib_dec/lib_dec.c +41 −7 Original line number Diff line number Diff line Loading @@ -112,7 +112,11 @@ static void IVAS_DEC_Close_VoIP( IVAS_DEC_VOIP *hVoIP ); #ifdef SUPPORT_JBM_TRACEFILE static void store_JbmData( IVAS_DEC_VOIP *hVoIP, JB4_DATAUNIT_HANDLE dataUnit, const uint32_t systemTimestamp_ms, const uint16_t extBufferedSamples, const int32_t output_Fs ); #endif #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS static ivas_error evs_dec_main( Decoder_Struct *st_ivas, const int16_t nOutSamples, float *floatBuf ); #else static ivas_error evs_dec_main( Decoder_Struct *st_ivas, const int16_t nOutSamples, float *floatBuf, int16_t *pcmBuf ); #endif static ivas_error input_format_API_to_internal( IVAS_DEC_INPUT_FORMAT input_format, int16_t *bitstream_format_internal, int16_t *sdp_hf_only, const bool is_voip_enabled ); static void init_decoder_config( DECODER_CONFIG_HANDLE hDecoderConfig ); static ivas_error IVAS_DEC_VoIP_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ); Loading Loading @@ -1999,7 +2003,11 @@ static ivas_error IVAS_DEC_GetTcSamples( if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) { #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS if ( ( error = evs_dec_main( st_ivas, *nOutSamples, pcmBuf ) ) != IVAS_ERR_OK ) #else if ( ( error = evs_dec_main( st_ivas, *nOutSamples, pcmBuf, NULL ) ) != IVAS_ERR_OK ) #endif { return error; } Loading Loading @@ -4247,10 +4255,15 @@ void IVAS_DEC_PrintDisclaimer( void ) *---------------------------------------------------------------------*/ static ivas_error evs_dec_main( Decoder_Struct *st_ivas, const int16_t nOutSamples, Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t nOutSamples, /* i : number of samples per channel */ #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS float *floatBuf /* o : buffer for decoded PCM output */ #else float *floatBuf, int16_t *pcmBuf ) int16_t *pcmBuf #endif ) { DEC_CORE_HANDLE *hCoreCoder; float mixer_left, mixer_rigth; Loading Loading @@ -4321,15 +4334,35 @@ static ivas_error evs_dec_main( v_multc( p_output[0], mixer_left, p_output[0], nOutSamples ); } #ifndef UNIFIED_DECODING_PATHS_LEFTOVERS #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS if ( !st_ivas->hDecoderConfig->Opt_tsm ) { ivas_jbm_dec_copy_tc_no_tsm( st_ivas, p_output, nOutSamples ); } else if ( floatBuf != NULL ) #else if ( st_ivas->hDecoderConfig->Opt_tsm ) { /* BE workaround */ int16_t pcm_buf_local[L_FRAME48k * MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN]; if ( floatBuf != NULL ) { return ( IVAS_ERROR( IVAS_ERR_UNEXPECTED_NULL_POINTER, "APA buffer is missing in JBM processing\n" ) ); } /* convert 'float' output data to 'short' */ #ifdef DEBUGGING st_ivas->noClipping += #endif ivas_syn_output( p_output, nOutSamples, st_ivas->hDecoderConfig->nchan_out, pcm_buf_local ); mvs2r( pcm_buf_local, floatBuf, nOutSamples * st_ivas->hDecoderConfig->nchan_out ); } #else if ( !st_ivas->hDecoderConfig->Opt_tsm ) { ivas_jbm_dec_copy_tc_no_tsm( st_ivas, p_output, nOutSamples ); } else if ( floatBuf != NULL ) { /* BE workaround */ int16_t pcm_buf_local[L_FRAME48k * MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN]; Loading @@ -4349,6 +4382,7 @@ static ivas_error evs_dec_main( #endif ivas_syn_output( p_output, nOutSamples, st_ivas->hDecoderConfig->nchan_out, pcmBuf ); } #endif return IVAS_ERR_OK; } Loading Loading
lib_dec/ivas_jbm_dec.c +5 −0 Original line number Diff line number Diff line Loading @@ -851,6 +851,11 @@ void ivas_dec_feed_tc_to_renderer( p_data_f[n] = &st_ivas->p_output_f[n][0]; } for ( n = 0; n < ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); n++ ) { st_ivas->hTcBuffer->tc[n] = st_ivas->p_output_f[n]; /* note: buffers needed in the TD decorellator */ } hTcBuffer->n_samples_buffered = nSamplesForRendering; hTcBuffer->n_samples_available = hTcBuffer->n_samples_buffered; *nSamplesResidual = 0; Loading
lib_dec/ivas_mc_paramupmix_dec.c +0 −10 Original line number Diff line number Diff line Loading @@ -528,16 +528,6 @@ static void ivas_param_upmix_dec_decorr_subframes( nSamplesLeftForTD = nSamplesForRendering; nchan_internal = MC_PARAMUPMIX_COMBINATIONS; #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS if ( !st_ivas->hDecoderConfig->Opt_tsm ) { for ( ch = 0; ch < ivas_get_nchan_buffers_dec( st_ivas, -1, st_ivas->hDecoderConfig->ivas_total_brate ); ch++ ) { st_ivas->hTcBuffer->tc[ch] = st_ivas->p_output_f[ch]; } } #endif for ( ch = 0; ch < nchan_internal; ch++ ) { pPcm_tmp[ch] = st_ivas->hTcBuffer->tc[ch + 8]; Loading
lib_dec/lib_dec.c +41 −7 Original line number Diff line number Diff line Loading @@ -112,7 +112,11 @@ static void IVAS_DEC_Close_VoIP( IVAS_DEC_VOIP *hVoIP ); #ifdef SUPPORT_JBM_TRACEFILE static void store_JbmData( IVAS_DEC_VOIP *hVoIP, JB4_DATAUNIT_HANDLE dataUnit, const uint32_t systemTimestamp_ms, const uint16_t extBufferedSamples, const int32_t output_Fs ); #endif #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS static ivas_error evs_dec_main( Decoder_Struct *st_ivas, const int16_t nOutSamples, float *floatBuf ); #else static ivas_error evs_dec_main( Decoder_Struct *st_ivas, const int16_t nOutSamples, float *floatBuf, int16_t *pcmBuf ); #endif static ivas_error input_format_API_to_internal( IVAS_DEC_INPUT_FORMAT input_format, int16_t *bitstream_format_internal, int16_t *sdp_hf_only, const bool is_voip_enabled ); static void init_decoder_config( DECODER_CONFIG_HANDLE hDecoderConfig ); static ivas_error IVAS_DEC_VoIP_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ); Loading Loading @@ -1999,7 +2003,11 @@ static ivas_error IVAS_DEC_GetTcSamples( if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) { #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS if ( ( error = evs_dec_main( st_ivas, *nOutSamples, pcmBuf ) ) != IVAS_ERR_OK ) #else if ( ( error = evs_dec_main( st_ivas, *nOutSamples, pcmBuf, NULL ) ) != IVAS_ERR_OK ) #endif { return error; } Loading Loading @@ -4247,10 +4255,15 @@ void IVAS_DEC_PrintDisclaimer( void ) *---------------------------------------------------------------------*/ static ivas_error evs_dec_main( Decoder_Struct *st_ivas, const int16_t nOutSamples, Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t nOutSamples, /* i : number of samples per channel */ #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS float *floatBuf /* o : buffer for decoded PCM output */ #else float *floatBuf, int16_t *pcmBuf ) int16_t *pcmBuf #endif ) { DEC_CORE_HANDLE *hCoreCoder; float mixer_left, mixer_rigth; Loading Loading @@ -4321,15 +4334,35 @@ static ivas_error evs_dec_main( v_multc( p_output[0], mixer_left, p_output[0], nOutSamples ); } #ifndef UNIFIED_DECODING_PATHS_LEFTOVERS #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS if ( !st_ivas->hDecoderConfig->Opt_tsm ) { ivas_jbm_dec_copy_tc_no_tsm( st_ivas, p_output, nOutSamples ); } else if ( floatBuf != NULL ) #else if ( st_ivas->hDecoderConfig->Opt_tsm ) { /* BE workaround */ int16_t pcm_buf_local[L_FRAME48k * MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN]; if ( floatBuf != NULL ) { return ( IVAS_ERROR( IVAS_ERR_UNEXPECTED_NULL_POINTER, "APA buffer is missing in JBM processing\n" ) ); } /* convert 'float' output data to 'short' */ #ifdef DEBUGGING st_ivas->noClipping += #endif ivas_syn_output( p_output, nOutSamples, st_ivas->hDecoderConfig->nchan_out, pcm_buf_local ); mvs2r( pcm_buf_local, floatBuf, nOutSamples * st_ivas->hDecoderConfig->nchan_out ); } #else if ( !st_ivas->hDecoderConfig->Opt_tsm ) { ivas_jbm_dec_copy_tc_no_tsm( st_ivas, p_output, nOutSamples ); } else if ( floatBuf != NULL ) { /* BE workaround */ int16_t pcm_buf_local[L_FRAME48k * MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN]; Loading @@ -4349,6 +4382,7 @@ static ivas_error evs_dec_main( #endif ivas_syn_output( p_output, nOutSamples, st_ivas->hDecoderConfig->nchan_out, pcmBuf ); } #endif return IVAS_ERR_OK; } Loading