Loading apps/decoder.c +6 −14 Original line number Diff line number Diff line Loading @@ -84,7 +84,6 @@ static #endif #ifdef JBM_TSM_ON_TCS #define JBM_FRONTEND_FETCH_FRAMESIZE_MS 20 #define FRAME_SIZE_NS 20000000L #endif typedef struct Loading Loading @@ -2574,6 +2573,7 @@ static ivas_error decodeVariableSpeed( #endif nSamplesAvailableNext = 0; nOutSamples = (int16_t) ( arg.output_Fs / 1000 * VARIABLE_SPEED_FETCH_FRAMESIZE_MS ); /*------------------------------------------------------------------------------------------* * Loop for every packet (frame) of bitstream data * - Read the bitstream packet Loading Loading @@ -2641,13 +2641,10 @@ static ivas_error decodeVariableSpeed( /* decode and get samples */ do { error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, 0, &nSamplesAvailableNext error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, 0, &nSamplesAvailableNext #ifdef SUPPORT_JBM_TRACEFILE , writeJbmTraceFileFrameWrapper, jbmTraceWriter writeJbmTraceFileFrameWrapper, jbmTraceWriter #endif ); if ( error != IVAS_ERR_OK && error != IVAS_ERR_VS_FRAME_NEEDED ) Loading Loading @@ -2746,7 +2743,6 @@ static ivas_error decodeVariableSpeed( } } /* Write current frame */ if ( decodedGoodFrame ) { Loading Loading @@ -2833,6 +2829,7 @@ static ivas_error decodeVariableSpeed( /*------------------------------------------------------------------------------------------* * Flush what is still left in the VoIP Buffers.... *------------------------------------------------------------------------------------------*/ while ( nSamplesAvailableNext > 0 ) { int16_t nSamplesFlushed; Loading Loading @@ -2893,25 +2890,19 @@ static ivas_error decodeVariableSpeed( } /* decode and get samples */ if ( ( error = IVAS_DEC_VoIP_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesAvailableNext, &nSamplesFlushed ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_VoIP_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesAvailableNext, &nSamplesFlushed ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_VoIP_Flush: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } /* Write current frame */ if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, nSamplesFlushed * nOutChannels ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nOutput audio file writer error\n" ); goto cleanup; } /* Write ISm metadata to external file(s) */ if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) { Loading Loading @@ -2969,6 +2960,7 @@ static ivas_error decodeVariableSpeed( #endif } } /*------------------------------------------------------------------------------------------* * Printouts after decoding has finished *------------------------------------------------------------------------------------------*/ Loading lib_com/fd_cng_com.c +1 −1 Original line number Diff line number Diff line Loading @@ -966,7 +966,6 @@ void SynthesisSTFT_dirac( mvr2r( olapBuffer + hFdCngCom->frameSize, olapBuffer, hFdCngCom->frameSize ); set_f( olapBuffer + hFdCngCom->frameSize, 0.0f, hFdCngCom->frameSize ); /*olapBuffer, fftBuffer, olapWin*/ for ( i = hFdCngCom->frameSize / 4; i < 3 * hFdCngCom->frameSize / 4; i++ ) { olapBuffer[i] += fftBuffer[i] * olapWin[i - hFdCngCom->frameSize / 4]; Loading Loading @@ -1009,6 +1008,7 @@ void SynthesisSTFT_dirac( } #endif /*------------------------------------------------------------------- * mhvals() * Loading lib_com/ivas_cnst.h +1 −0 Original line number Diff line number Diff line Loading @@ -219,6 +219,7 @@ typedef enum #define MAX_JBM_L_FRAME_NS 40000000L #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH #define MAX_CLDFB_DIGEST_CHANNELS 4 typedef enum { TC_BUFFER_MODE_NONE = 0, Loading lib_com/ivas_prot.h +13 −9 Original line number Diff line number Diff line Loading @@ -767,7 +767,7 @@ void dtx_read_padding_bits( ivas_error ivas_jbm_dec_tc( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *data /* o : output synthesis signal */ float *data /* o : output synthesis signals */ ); ivas_error ivas_jbm_dec_render( Loading Loading @@ -841,7 +841,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open( const TC_BUFFER_MODE tc_buffer_mode, /* i : buffer mode */ const int16_t nchan_transport_jbm, /* i : number of real transport channels */ const int16_t nchan_transport_internal, /* i : number of totally buffered channels */ const int16_t nchan_full, /* i : nubmer of channels to fully store */ const int16_t nchan_full, /* i : number of channels to fully store */ const int16_t n_samples_granularity /* i : granularity of the renderer/buffer */ ); Loading Loading @@ -1044,7 +1044,7 @@ void ivas_param_ism_dec( #ifdef JBM_TSM_ON_TCS void ivas_ism_dec_digest_tc( Decoder_Struct *st_ivas Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); void ivas_param_ism_dec_digest_tc( Loading Loading @@ -3698,7 +3698,8 @@ void generate_masking_noise_lb_dirac( void ivas_dirac_dec_set_md_map( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ int16_t nCldfbTs ); const int16_t nCldfbTs /* i : number of CLDFB time slots */ ); void ivas_dirac_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Loading Loading @@ -4581,7 +4582,7 @@ void ivas_spar_dec_agc_pca( void ivas_spar_dec_set_render_map( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ int16_t nCldfbTs const int16_t nCldfbTs /* i : number of CLDFB time slots */ ); void ivas_spar_dec_set_render_params( Loading Loading @@ -5304,8 +5305,9 @@ void ivas_binaural_cldfb( #ifdef JBM_TSM_ON_TCS void ivas_binaural_cldfb_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t n_samples_to_render, const int16_t n_samples_to_render, /* i : output frame length per channel */ float *output_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ ); #endif Loading Loading @@ -5404,6 +5406,8 @@ void ivas_ism2sba_sf( const int16_t sba_order /* i : Ambisonic (SBA) order */ ); #endif /*----------------------------------------------------------------------------------* * Amplitude Panning VBAP prototypes *----------------------------------------------------------------------------------*/ Loading Loading @@ -5479,7 +5483,7 @@ void ivas_ls_setup_conversion_process_mdct_param_mc( void ivas_lssetupconversion_process_param_mc( Decoder_Struct *st_ivas, /* i/o: LS setup conversion renderer handle */ #ifdef JBM_TSM_ON_TCS int16_t num_timeslots, /* i : number of time slots to process */ const int16_t num_timeslots, /* i : number of time slots to process */ #endif float Cldfb_RealBuffer_InOut[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i/o: LS signals */ float Cldfb_ImagBuffer_InOut[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i/o: LS signals */ Loading lib_com/ivas_td_decorr.c +1 −1 Original line number Diff line number Diff line Loading @@ -480,7 +480,7 @@ static void ivas_td_decorr_APD_sections( void ivas_td_decorr_process( ivas_td_decorr_state_t *hTdDecorr, /* i/o: SPAR Covar. decoder handle */ #ifdef JBM_TSM_ON_TCS float *pcm_in[], float *pcm_in[], /* i : input audio channels */ #else float pcm_in[][L_FRAME48k], /* i : input audio channels */ #endif Loading Loading
apps/decoder.c +6 −14 Original line number Diff line number Diff line Loading @@ -84,7 +84,6 @@ static #endif #ifdef JBM_TSM_ON_TCS #define JBM_FRONTEND_FETCH_FRAMESIZE_MS 20 #define FRAME_SIZE_NS 20000000L #endif typedef struct Loading Loading @@ -2574,6 +2573,7 @@ static ivas_error decodeVariableSpeed( #endif nSamplesAvailableNext = 0; nOutSamples = (int16_t) ( arg.output_Fs / 1000 * VARIABLE_SPEED_FETCH_FRAMESIZE_MS ); /*------------------------------------------------------------------------------------------* * Loop for every packet (frame) of bitstream data * - Read the bitstream packet Loading Loading @@ -2641,13 +2641,10 @@ static ivas_error decodeVariableSpeed( /* decode and get samples */ do { error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, 0, &nSamplesAvailableNext error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, 0, &nSamplesAvailableNext #ifdef SUPPORT_JBM_TRACEFILE , writeJbmTraceFileFrameWrapper, jbmTraceWriter writeJbmTraceFileFrameWrapper, jbmTraceWriter #endif ); if ( error != IVAS_ERR_OK && error != IVAS_ERR_VS_FRAME_NEEDED ) Loading Loading @@ -2746,7 +2743,6 @@ static ivas_error decodeVariableSpeed( } } /* Write current frame */ if ( decodedGoodFrame ) { Loading Loading @@ -2833,6 +2829,7 @@ static ivas_error decodeVariableSpeed( /*------------------------------------------------------------------------------------------* * Flush what is still left in the VoIP Buffers.... *------------------------------------------------------------------------------------------*/ while ( nSamplesAvailableNext > 0 ) { int16_t nSamplesFlushed; Loading Loading @@ -2893,25 +2890,19 @@ static ivas_error decodeVariableSpeed( } /* decode and get samples */ if ( ( error = IVAS_DEC_VoIP_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesAvailableNext, &nSamplesFlushed ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_VoIP_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesAvailableNext, &nSamplesFlushed ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_VoIP_Flush: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } /* Write current frame */ if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, nSamplesFlushed * nOutChannels ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nOutput audio file writer error\n" ); goto cleanup; } /* Write ISm metadata to external file(s) */ if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) { Loading Loading @@ -2969,6 +2960,7 @@ static ivas_error decodeVariableSpeed( #endif } } /*------------------------------------------------------------------------------------------* * Printouts after decoding has finished *------------------------------------------------------------------------------------------*/ Loading
lib_com/fd_cng_com.c +1 −1 Original line number Diff line number Diff line Loading @@ -966,7 +966,6 @@ void SynthesisSTFT_dirac( mvr2r( olapBuffer + hFdCngCom->frameSize, olapBuffer, hFdCngCom->frameSize ); set_f( olapBuffer + hFdCngCom->frameSize, 0.0f, hFdCngCom->frameSize ); /*olapBuffer, fftBuffer, olapWin*/ for ( i = hFdCngCom->frameSize / 4; i < 3 * hFdCngCom->frameSize / 4; i++ ) { olapBuffer[i] += fftBuffer[i] * olapWin[i - hFdCngCom->frameSize / 4]; Loading Loading @@ -1009,6 +1008,7 @@ void SynthesisSTFT_dirac( } #endif /*------------------------------------------------------------------- * mhvals() * Loading
lib_com/ivas_cnst.h +1 −0 Original line number Diff line number Diff line Loading @@ -219,6 +219,7 @@ typedef enum #define MAX_JBM_L_FRAME_NS 40000000L #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH #define MAX_CLDFB_DIGEST_CHANNELS 4 typedef enum { TC_BUFFER_MODE_NONE = 0, Loading
lib_com/ivas_prot.h +13 −9 Original line number Diff line number Diff line Loading @@ -767,7 +767,7 @@ void dtx_read_padding_bits( ivas_error ivas_jbm_dec_tc( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *data /* o : output synthesis signal */ float *data /* o : output synthesis signals */ ); ivas_error ivas_jbm_dec_render( Loading Loading @@ -841,7 +841,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open( const TC_BUFFER_MODE tc_buffer_mode, /* i : buffer mode */ const int16_t nchan_transport_jbm, /* i : number of real transport channels */ const int16_t nchan_transport_internal, /* i : number of totally buffered channels */ const int16_t nchan_full, /* i : nubmer of channels to fully store */ const int16_t nchan_full, /* i : number of channels to fully store */ const int16_t n_samples_granularity /* i : granularity of the renderer/buffer */ ); Loading Loading @@ -1044,7 +1044,7 @@ void ivas_param_ism_dec( #ifdef JBM_TSM_ON_TCS void ivas_ism_dec_digest_tc( Decoder_Struct *st_ivas Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); void ivas_param_ism_dec_digest_tc( Loading Loading @@ -3698,7 +3698,8 @@ void generate_masking_noise_lb_dirac( void ivas_dirac_dec_set_md_map( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ int16_t nCldfbTs ); const int16_t nCldfbTs /* i : number of CLDFB time slots */ ); void ivas_dirac_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Loading Loading @@ -4581,7 +4582,7 @@ void ivas_spar_dec_agc_pca( void ivas_spar_dec_set_render_map( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ int16_t nCldfbTs const int16_t nCldfbTs /* i : number of CLDFB time slots */ ); void ivas_spar_dec_set_render_params( Loading Loading @@ -5304,8 +5305,9 @@ void ivas_binaural_cldfb( #ifdef JBM_TSM_ON_TCS void ivas_binaural_cldfb_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t n_samples_to_render, const int16_t n_samples_to_render, /* i : output frame length per channel */ float *output_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ ); #endif Loading Loading @@ -5404,6 +5406,8 @@ void ivas_ism2sba_sf( const int16_t sba_order /* i : Ambisonic (SBA) order */ ); #endif /*----------------------------------------------------------------------------------* * Amplitude Panning VBAP prototypes *----------------------------------------------------------------------------------*/ Loading Loading @@ -5479,7 +5483,7 @@ void ivas_ls_setup_conversion_process_mdct_param_mc( void ivas_lssetupconversion_process_param_mc( Decoder_Struct *st_ivas, /* i/o: LS setup conversion renderer handle */ #ifdef JBM_TSM_ON_TCS int16_t num_timeslots, /* i : number of time slots to process */ const int16_t num_timeslots, /* i : number of time slots to process */ #endif float Cldfb_RealBuffer_InOut[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i/o: LS signals */ float Cldfb_ImagBuffer_InOut[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i/o: LS signals */ Loading
lib_com/ivas_td_decorr.c +1 −1 Original line number Diff line number Diff line Loading @@ -480,7 +480,7 @@ static void ivas_td_decorr_APD_sections( void ivas_td_decorr_process( ivas_td_decorr_state_t *hTdDecorr, /* i/o: SPAR Covar. decoder handle */ #ifdef JBM_TSM_ON_TCS float *pcm_in[], float *pcm_in[], /* i : input audio channels */ #else float pcm_in[][L_FRAME48k], /* i : input audio channels */ #endif Loading