Loading apps/decoder.c +0 −35 Original line number Diff line number Diff line Loading @@ -122,9 +122,6 @@ typedef struct FILE *agcBitstream; /* temporary */ #endif #endif #ifdef DEBUG_JBM_NO_RENDERING uint8_t nChannelsOut; #endif #ifdef DEBUG_JBM_CMD_OPTION bool noBadFrameDelay; Loading Loading @@ -511,11 +508,7 @@ int main( if ( arg.voipMode ) { #ifdef JBM_TSM_ON_TCS #ifdef DEBUG_JBM_NO_RENDERING if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, arg.nChannelsOut, IVAS_DEC_VOIP_MODE_VOIP, 100, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VOIP, 100, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) #endif #else #ifdef VARIABLE_SPEED_DECODING if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VOIP, 100, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) Loading @@ -533,11 +526,7 @@ int main( #ifdef VARIABLE_SPEED_DECODING else if ( arg.variableSpeedMode ) { #ifdef DEBUG_JBM_NO_RENDERING if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, arg.nChannelsOut, IVAS_DEC_VOIP_MODE_VARIABLE_SPEED, arg.tsmScale, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VARIABLE_SPEED, arg.tsmScale, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nCould not enable Variable Play Speed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -908,27 +897,6 @@ static bool parseCmdlIVAS_dec( #endif /* #ifdef DEBUG_MODE_INFO_TWEAK */ #endif /* #ifdef DEBUG_MODE_INFO */ #endif /* #ifdef DEBUGGING */ #ifdef DEBUG_JBM_NO_RENDERING else if ( strcmp( argv_to_upper, "-NC" ) == 0 ) { i++; int tmp; if ( i < argc - 4 ) { if ( !is_digits_only( argv[i] ) ) { return false; } if ( sscanf( argv[i], "%d", &tmp ) > 0 ) { i++; } arg->nChannelsOut = (uint8_t) tmp; } } #endif #ifdef DEBUG_JBM_CMD_OPTION else if ( strcmp( argv_to_upper, "-VOIP_NO_BAD_FRAME" ) == 0 ) { Loading Loading @@ -1197,9 +1165,6 @@ static void usage_dec( void ) fprintf( stdout, "-VOIP : VoIP mode: RTP in G192\n" ); fprintf( stdout, "-VOIP_hf_only=0 : VoIP mode: EVS RTP Payload Format hf_only=0 in rtpdump\n" ); fprintf( stdout, "-VOIP_hf_only=1 : VoIP mode: EVS RTP Payload Format hf_only=1 in rtpdump\n" ); #ifdef DEBUG_JBM_NO_RENDERING fprintf( stdout, "-NC C : VoIP mode: number C of transport channels (mandatory in VOIP mode) \n" ); #endif #ifdef DEBUG_JBM_CMD_OPTION fprintf( stdout, "-VOIP_no_bad_frame : VoIP mode: do not put out bad frames in the beginning as silence \n" ); #endif Loading lib_com/ivas_cnst.h +1 −3 Original line number Diff line number Diff line Loading @@ -208,9 +208,7 @@ typedef enum { TC_BUFFER_MODE_NONE = 0, TC_BUFFER_MODE_RENDERER, TC_BUFFER_MODE_OUT, TC_BUFFER_MODE_FULL, TC_BUFFER_MODE_RESIDUAL TC_BUFFER_MODE_BUFFER } TC_BUFFER_MODE; #endif Loading lib_com/ivas_prot.h +55 −9 Original line number Diff line number Diff line Loading @@ -334,6 +334,11 @@ ivas_error ivas_dec( ivas_error ivas_dec_setup( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ #ifdef JBM_TSM_ON_TCS , uint16_t *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ int16_t *data /* o : flushed PCM samples */ #endif ); ivas_error create_sce_dec( Loading Loading @@ -671,6 +676,11 @@ ivas_error ivas_mc_enc_config( ivas_error ivas_mc_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t idx /* i : LS config. index */ #ifdef JBM_TSM_ON_TCS , uint16_t *nSamplesRendered, /* o : samples flushed from last frame (JBM) */ int16_t *data /* o : flushed samples (JBM) */ #endif ); /*! r: MC format mode (MCT, McMASA, ParamMC) */ Loading Loading @@ -824,6 +834,18 @@ ivas_error ivas_jbm_dec_render( float *cldfbData /* o : synthesis signal in the CLDFB domain */ ); ivas_error ivas_jbm_dec_flush_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t tc_granularity_new, /* i : new renderer granularity */ const RENDERER_TYPE renderer_type_old, /* i : old renderer type */ const AUDIO_CONFIG intern_config_old, /* i : old internal config */ const IVAS_OUTPUT_SETUP_HANDLE hIntSetupOld, /* i : old internal output setup */ const MC_MODE mc_mode_old, /* i : old MC mode */ const ISM_MODE ism_mode_old, /* i : old ISM mode */ uint16_t *nSamplesRendered, /* o : number of samples flushed */ int16_t *data /* o : rendered samples */ ); ivas_error ivas_jbm_dec_feed_tc_to_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t nSamplesForRendering, /* i: : number of TC samples available for rendering */ Loading @@ -835,6 +857,11 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( #endif ); ivas_error ivas_jbm_dec_set_discard_samples( Decoder_Struct *st_ivas, /* i/o: main IVAS decoder structre */ const int16_t tc_granularity_new /* i : new renderer granularitx */ ); void ivas_jbm_dec_get_adapted_linear_interpolator( const int16_t default_interp_length, /* i : default length of the (full-frame) interpolator */ const int16_t interp_length, /* i : length of the interpolator to be created */ Loading @@ -859,16 +886,30 @@ void ivas_jbm_dec_get_md_map( int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas ); /* i : IVAS decoder handle */ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( Decoder_Struct *st_ivas Decoder_Struct *st_ivas /* i : IVAS decoder handle */ ); int16_t ivas_jbm_dec_get_render_granularity( /* o : render granularity */ const RENDERER_TYPE rendererType, /* i : renderer type */ const int32_t output_Fs /* i : sampling rate */ ); ivas_error ivas_jbm_dec_tc_buffer_open( Decoder_Struct *st_ivas, const TC_BUFFER_MODE tc_buffer_mode, const int16_t nchan_transport_jbm, const int16_t nchan_transport_internal, const int16_t nchan_full, const int16_t n_samples_granularity Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ 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 n_samples_granularity /* i : granularity of the renderer/buffer */ ); ivas_error ivas_jbm_dec_tc_buffer_reconfigure( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const TC_BUFFER_MODE tc_buffer_mode, /* i : new buffer mode */ const int16_t nchan_transport_jbm, /* i : new number of real transport channels */ const int16_t nchan_transport_internal, /* i : new number of totally buffered channels */ const int16_t nchan_full, /* i : new number of channels to fully store */ const int16_t n_samples_granularity /* i : new granularity of the renderer/buffer */ ); void ivas_jbm_dec_tc_buffer_close( Loading Loading @@ -1009,6 +1050,11 @@ ivas_error ivas_ism_enc_config( ivas_error ivas_ism_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t num_obj /* i : number of objects in the bitstream */ #ifdef JBM_TSM_ON_TCS , uint16_t *nSamplesRendered, /* o : number of samples flushed on renderer change */ int16_t *data /* o : flushed PCM samples */ #endif ); ivas_error ivas_param_ism_dec_open( Loading Loading @@ -3246,7 +3292,7 @@ ivas_error ivas_sba_dec_reinit( #endif #endif #ifdef JBM_SBA #ifdef JBM_TSM_ON_TCS ivas_error ivas_sba_digest_tc( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const int16_t nchan_transport, /* i : number of transport channels */ Loading Loading @@ -4274,7 +4320,7 @@ int16_t ivas_is_res_channel( const int16_t nchan_transport /* i : number of transport channels (1-4) */ ); #ifdef JBM_SBA #ifdef JBM_TSM_ON_TCS void ivas_spar_dec_agc_pca( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float output[][L_FRAME48k], /* i/o: input/output audio channels */ Loading lib_com/options.h +0 −10 Original line number Diff line number Diff line Loading @@ -162,18 +162,8 @@ #define VARIABLE_SPEED_DECODING /* FhG: variable speed decoding employing the JBM functioniality */ #define JBM_TSM_ON_TCS /* FhG: run the TSM part of JBM on the TCs instead of the final output pcm waveforms */ #ifdef JBM_TSM_ON_TCS /*#define DEBUG_JBM_NO_RENDERING*/ #define JBM_PARAMMC #define JBM_STEREO #define JBM_SBA #define JBM_MASA #define JBM_MCT #define JBM_MCMASA #define JBM_ISM #define JBM_PARAM_ISM #define TEST_BIN_RENDERER_BE /*#define JBM_DIRAC_DEBUG_BE*/ #define JBM_DEV /*remove after all formats work...*/ #define FLOAT_TSM /* FhG: WSOLA TSM on float values instead of 16 bit PCM */ #endif /* ################## End DEVELOPMENT switches ######################### */ Loading lib_dec/ivas_dec.c +5 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,11 @@ ivas_error ivas_dec( if ( st_ivas->bfi == 0 ) { #ifdef JBM_TSM_ON_TCS if ( ( error = ivas_dec_setup( st_ivas, NULL, NULL ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_dec_setup( st_ivas ) ) != IVAS_ERR_OK ) #endif { return error; } Loading Loading @@ -373,7 +377,7 @@ ivas_error ivas_dec( { ivas_sba_mix_matrix_determiner( st_ivas->hSpar, output, st_ivas->bfi, nchan_remapped, output_frame ); } #ifdef JBM_SBA #ifdef JBM_TSM_ON_TCS else if ( st_ivas->sba_mode == SBA_MODE_SPAR ) { ivas_spar_dec_agc_pca( st_ivas, output, output_frame ); Loading Loading
apps/decoder.c +0 −35 Original line number Diff line number Diff line Loading @@ -122,9 +122,6 @@ typedef struct FILE *agcBitstream; /* temporary */ #endif #endif #ifdef DEBUG_JBM_NO_RENDERING uint8_t nChannelsOut; #endif #ifdef DEBUG_JBM_CMD_OPTION bool noBadFrameDelay; Loading Loading @@ -511,11 +508,7 @@ int main( if ( arg.voipMode ) { #ifdef JBM_TSM_ON_TCS #ifdef DEBUG_JBM_NO_RENDERING if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, arg.nChannelsOut, IVAS_DEC_VOIP_MODE_VOIP, 100, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VOIP, 100, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) #endif #else #ifdef VARIABLE_SPEED_DECODING if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VOIP, 100, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) Loading @@ -533,11 +526,7 @@ int main( #ifdef VARIABLE_SPEED_DECODING else if ( arg.variableSpeedMode ) { #ifdef DEBUG_JBM_NO_RENDERING if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, arg.nChannelsOut, IVAS_DEC_VOIP_MODE_VARIABLE_SPEED, arg.tsmScale, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VARIABLE_SPEED, arg.tsmScale, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nCould not enable Variable Play Speed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -908,27 +897,6 @@ static bool parseCmdlIVAS_dec( #endif /* #ifdef DEBUG_MODE_INFO_TWEAK */ #endif /* #ifdef DEBUG_MODE_INFO */ #endif /* #ifdef DEBUGGING */ #ifdef DEBUG_JBM_NO_RENDERING else if ( strcmp( argv_to_upper, "-NC" ) == 0 ) { i++; int tmp; if ( i < argc - 4 ) { if ( !is_digits_only( argv[i] ) ) { return false; } if ( sscanf( argv[i], "%d", &tmp ) > 0 ) { i++; } arg->nChannelsOut = (uint8_t) tmp; } } #endif #ifdef DEBUG_JBM_CMD_OPTION else if ( strcmp( argv_to_upper, "-VOIP_NO_BAD_FRAME" ) == 0 ) { Loading Loading @@ -1197,9 +1165,6 @@ static void usage_dec( void ) fprintf( stdout, "-VOIP : VoIP mode: RTP in G192\n" ); fprintf( stdout, "-VOIP_hf_only=0 : VoIP mode: EVS RTP Payload Format hf_only=0 in rtpdump\n" ); fprintf( stdout, "-VOIP_hf_only=1 : VoIP mode: EVS RTP Payload Format hf_only=1 in rtpdump\n" ); #ifdef DEBUG_JBM_NO_RENDERING fprintf( stdout, "-NC C : VoIP mode: number C of transport channels (mandatory in VOIP mode) \n" ); #endif #ifdef DEBUG_JBM_CMD_OPTION fprintf( stdout, "-VOIP_no_bad_frame : VoIP mode: do not put out bad frames in the beginning as silence \n" ); #endif Loading
lib_com/ivas_cnst.h +1 −3 Original line number Diff line number Diff line Loading @@ -208,9 +208,7 @@ typedef enum { TC_BUFFER_MODE_NONE = 0, TC_BUFFER_MODE_RENDERER, TC_BUFFER_MODE_OUT, TC_BUFFER_MODE_FULL, TC_BUFFER_MODE_RESIDUAL TC_BUFFER_MODE_BUFFER } TC_BUFFER_MODE; #endif Loading
lib_com/ivas_prot.h +55 −9 Original line number Diff line number Diff line Loading @@ -334,6 +334,11 @@ ivas_error ivas_dec( ivas_error ivas_dec_setup( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ #ifdef JBM_TSM_ON_TCS , uint16_t *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ int16_t *data /* o : flushed PCM samples */ #endif ); ivas_error create_sce_dec( Loading Loading @@ -671,6 +676,11 @@ ivas_error ivas_mc_enc_config( ivas_error ivas_mc_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t idx /* i : LS config. index */ #ifdef JBM_TSM_ON_TCS , uint16_t *nSamplesRendered, /* o : samples flushed from last frame (JBM) */ int16_t *data /* o : flushed samples (JBM) */ #endif ); /*! r: MC format mode (MCT, McMASA, ParamMC) */ Loading Loading @@ -824,6 +834,18 @@ ivas_error ivas_jbm_dec_render( float *cldfbData /* o : synthesis signal in the CLDFB domain */ ); ivas_error ivas_jbm_dec_flush_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t tc_granularity_new, /* i : new renderer granularity */ const RENDERER_TYPE renderer_type_old, /* i : old renderer type */ const AUDIO_CONFIG intern_config_old, /* i : old internal config */ const IVAS_OUTPUT_SETUP_HANDLE hIntSetupOld, /* i : old internal output setup */ const MC_MODE mc_mode_old, /* i : old MC mode */ const ISM_MODE ism_mode_old, /* i : old ISM mode */ uint16_t *nSamplesRendered, /* o : number of samples flushed */ int16_t *data /* o : rendered samples */ ); ivas_error ivas_jbm_dec_feed_tc_to_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t nSamplesForRendering, /* i: : number of TC samples available for rendering */ Loading @@ -835,6 +857,11 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( #endif ); ivas_error ivas_jbm_dec_set_discard_samples( Decoder_Struct *st_ivas, /* i/o: main IVAS decoder structre */ const int16_t tc_granularity_new /* i : new renderer granularitx */ ); void ivas_jbm_dec_get_adapted_linear_interpolator( const int16_t default_interp_length, /* i : default length of the (full-frame) interpolator */ const int16_t interp_length, /* i : length of the interpolator to be created */ Loading @@ -859,16 +886,30 @@ void ivas_jbm_dec_get_md_map( int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas ); /* i : IVAS decoder handle */ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( Decoder_Struct *st_ivas Decoder_Struct *st_ivas /* i : IVAS decoder handle */ ); int16_t ivas_jbm_dec_get_render_granularity( /* o : render granularity */ const RENDERER_TYPE rendererType, /* i : renderer type */ const int32_t output_Fs /* i : sampling rate */ ); ivas_error ivas_jbm_dec_tc_buffer_open( Decoder_Struct *st_ivas, const TC_BUFFER_MODE tc_buffer_mode, const int16_t nchan_transport_jbm, const int16_t nchan_transport_internal, const int16_t nchan_full, const int16_t n_samples_granularity Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ 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 n_samples_granularity /* i : granularity of the renderer/buffer */ ); ivas_error ivas_jbm_dec_tc_buffer_reconfigure( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const TC_BUFFER_MODE tc_buffer_mode, /* i : new buffer mode */ const int16_t nchan_transport_jbm, /* i : new number of real transport channels */ const int16_t nchan_transport_internal, /* i : new number of totally buffered channels */ const int16_t nchan_full, /* i : new number of channels to fully store */ const int16_t n_samples_granularity /* i : new granularity of the renderer/buffer */ ); void ivas_jbm_dec_tc_buffer_close( Loading Loading @@ -1009,6 +1050,11 @@ ivas_error ivas_ism_enc_config( ivas_error ivas_ism_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t num_obj /* i : number of objects in the bitstream */ #ifdef JBM_TSM_ON_TCS , uint16_t *nSamplesRendered, /* o : number of samples flushed on renderer change */ int16_t *data /* o : flushed PCM samples */ #endif ); ivas_error ivas_param_ism_dec_open( Loading Loading @@ -3246,7 +3292,7 @@ ivas_error ivas_sba_dec_reinit( #endif #endif #ifdef JBM_SBA #ifdef JBM_TSM_ON_TCS ivas_error ivas_sba_digest_tc( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const int16_t nchan_transport, /* i : number of transport channels */ Loading Loading @@ -4274,7 +4320,7 @@ int16_t ivas_is_res_channel( const int16_t nchan_transport /* i : number of transport channels (1-4) */ ); #ifdef JBM_SBA #ifdef JBM_TSM_ON_TCS void ivas_spar_dec_agc_pca( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float output[][L_FRAME48k], /* i/o: input/output audio channels */ Loading
lib_com/options.h +0 −10 Original line number Diff line number Diff line Loading @@ -162,18 +162,8 @@ #define VARIABLE_SPEED_DECODING /* FhG: variable speed decoding employing the JBM functioniality */ #define JBM_TSM_ON_TCS /* FhG: run the TSM part of JBM on the TCs instead of the final output pcm waveforms */ #ifdef JBM_TSM_ON_TCS /*#define DEBUG_JBM_NO_RENDERING*/ #define JBM_PARAMMC #define JBM_STEREO #define JBM_SBA #define JBM_MASA #define JBM_MCT #define JBM_MCMASA #define JBM_ISM #define JBM_PARAM_ISM #define TEST_BIN_RENDERER_BE /*#define JBM_DIRAC_DEBUG_BE*/ #define JBM_DEV /*remove after all formats work...*/ #define FLOAT_TSM /* FhG: WSOLA TSM on float values instead of 16 bit PCM */ #endif /* ################## End DEVELOPMENT switches ######################### */ Loading
lib_dec/ivas_dec.c +5 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,11 @@ ivas_error ivas_dec( if ( st_ivas->bfi == 0 ) { #ifdef JBM_TSM_ON_TCS if ( ( error = ivas_dec_setup( st_ivas, NULL, NULL ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_dec_setup( st_ivas ) ) != IVAS_ERR_OK ) #endif { return error; } Loading Loading @@ -373,7 +377,7 @@ ivas_error ivas_dec( { ivas_sba_mix_matrix_determiner( st_ivas->hSpar, output, st_ivas->bfi, nchan_remapped, output_frame ); } #ifdef JBM_SBA #ifdef JBM_TSM_ON_TCS else if ( st_ivas->sba_mode == SBA_MODE_SPAR ) { ivas_spar_dec_agc_pca( st_ivas, output, output_frame ); Loading