Loading apps/renderer.c +0 −31 Original line number Diff line number Diff line Loading @@ -71,9 +71,7 @@ #define IVAS_MAX16B_FLT 32767.0f #define IVAS_MIN16B_FLT ( -32768.0f ) #ifdef NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS #define OMASA_TDREND_MATCHING_GAIN_DB ( -2.0f ) #endif #if !defined( DEBUGGING ) && !defined( WMOPS ) static Loading Loading @@ -589,7 +587,6 @@ static void setupWithSingleFormatInput( positionProvider->numObjects = args.inConfig.numAudioObjects; for ( int16_t i = 0; i < positionProvider->numObjects; ++i ) { #ifdef FIX_1376_MISSING_ISM_METADATA /* Check if path to metadata file was given */ if ( isEmptyString( args.inMetadataFilePaths[i] ) ) { Loading @@ -598,18 +595,11 @@ static void setupWithSingleFormatInput( } /* It is allowed on CLI to have no metadata for an ISM input - skip opening if string contains "NULL" */ #else /* It is allowed on CLI to have no metadata for an ISM input - skip opening if string is empty or contains "NULL" */ #endif char charBuf[FILENAME_MAX]; strncpy( charBuf, args.inMetadataFilePaths[i], min( FILENAME_MAX, RENDERER_MAX_CLI_ARG_LENGTH ) - 1 ); charBuf[min( FILENAME_MAX, RENDERER_MAX_CLI_ARG_LENGTH ) - 1] = '\0'; to_upper( charBuf ); #ifdef FIX_1376_MISSING_ISM_METADATA if ( strncmp( charBuf, "NULL", 4 ) == 0 ) #else if ( isEmptyString( args.inMetadataFilePaths[i] ) || strncmp( charBuf, "NULL", 4 ) == 0 ) #endif { continue; } Loading Loading @@ -1210,29 +1200,21 @@ int main( } } #ifndef NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS /* Set the total number of objects */ #endif if ( args.inConfig.numAudioObjects > 0 ) { #ifdef NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS /* Set the total number of objects */ #endif if ( ( error = IVAS_REND_SetTotalNumberOfObjects( hIvasRend, args.inConfig.numAudioObjects ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_REND_SetTotalNumberOfObjects(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } #ifdef NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS /* Set the metadata delay for objects */ #endif if ( ( error = IVAS_REND_SetIsmMetadataDelay( hIvasRend, args.syncMdDelay ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_REND_SetIsmMetadataDelay(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } #ifdef NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS /* For OMASA input and BINAURAL output, apply a gain to objects to match the loudness with MASA part */ if ( args.inConfig.numMasaBuses > 0 && args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL ) Loading @@ -1242,7 +1224,6 @@ int main( args.inConfig.audioObjects[i].gain_dB += OMASA_TDREND_MATCHING_GAIN_DB; } } #endif } IVAS_REND_LfePanMtx lfePanMatrix; Loading Loading @@ -1278,7 +1259,6 @@ int main( { masaIds[i] = 0u; } #ifdef NONBE_1377_REND_DIRATT_CONF #ifdef FIX_1377_HANDLE_ERROR_CODE if ( ( error = IVAS_REND_SetObjectIDs( hIvasRend ) ) != IVAS_ERR_OK ) { Loading @@ -1287,7 +1267,6 @@ int main( } #else IVAS_REND_SetObjectIDs( hIvasRend ); #endif #endif for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i ) Loading Loading @@ -3706,20 +3685,10 @@ static void parseCombinedFormatInput( inConfig->numAmbisonicsBuses = 1; inConfig->ambisonicsBuses[0].audioConfig = audioConfig; inConfig->ambisonicsBuses[0].inputChannelIndex = inConfig->numAudioObjects; #ifdef NONBE_1352_HARMONIZE_OSBA_LOUDNESS inConfig->ambisonicsBuses[0].gain_dB = 0.f; #else inConfig->ambisonicsBuses[0].gain_dB = -6.f; #endif *configString += 4; /* Modify input gain for objects too */ #ifndef NONBE_1352_HARMONIZE_OSBA_LOUDNESS for ( int16_t i = 0; i < inConfig->numAudioObjects; ++i ) { inConfig->audioObjects[i].gain_dB = -6.f; } #endif } else if ( audioConfig == IVAS_AUDIO_CONFIG_MASA1 || audioConfig == IVAS_AUDIO_CONFIG_MASA2 ) { Loading lib_com/cnst.h +0 −2 Original line number Diff line number Diff line Loading @@ -526,9 +526,7 @@ enum #define L_FRAME_MAX L_FRAME48k /* Max 20ms frame size @48kHz */ #define L_FRAME_PLUS 1200 /* Max frame size (long TCX frame) */ #define L_MDCT_OVLP_MAX NS2SA( 48000, ACELP_LOOK_NS ) /* = Max mdct overlap */ #ifdef FIX_1320_STACK_CPE_DECODER #define L_FRAME_PLUS_INTERNAL 800 /* Max frame size (long TCX frame) at maximum internal sampling rate */ #endif #define N_TCX10_MAX 480 /* Max size of TCX10 MDCT spectrum */ #define BITS_TEC 1 /* number of bits for TEC */ #define BITS_TFA 1 /* number of bits for TTF */ Loading lib_com/ivas_cnst.h +0 −5 Original line number Diff line number Diff line Loading @@ -172,13 +172,8 @@ typedef enum #define JBM_CLDFB_SLOTS_IN_SUBFRAME 4 #define MAX_JBM_CLDFB_TIMESLOTS 32 #define DEFAULT_JBM_CLDFB_TIMESLOTS 16 #ifdef JBM_MEMORY_OPT #define MAX_JBM_L_FRAME48k ( IVAS_MAX_FRAME_SIZE * 2 ) /* 1920: max. time-scaled frame buffer length (per channel) in samples */ #define MAX_JBM_L_FRAME_NS 40000000L /* 40 ms: time-scaled frame size in ns, proportional to MAX_JBM_L_FRAME48k */ #else #define MAX_JBM_L_FRAME48k 1920 #define MAX_JBM_L_FRAME_NS 40000000L #endif #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH #define MAX_CLDFB_DIGEST_CHANNELS 3 /* == maximum of ParamISM TCs and ParamMC TCs */ Loading lib_com/ivas_error.h +0 −4 Original line number Diff line number Diff line Loading @@ -134,9 +134,7 @@ typedef enum IVAS_ERR_BITSTREAM_READER_INVALID_FORMAT, IVAS_ERR_NO_FILE_OPEN, IVAS_ERR_SAMPLING_RATE_UNKNOWN, #ifdef FIX_1370_EXTERNAL_ORIENTATION_CHECK IVAS_ERR_EXTERNAL_ORIENTATION_INVALID_FORMAT, #endif /*----------------------------------------* * renderer (lib_rend only) * Loading Loading @@ -274,10 +272,8 @@ static inline const char *ivas_error_to_string( ivas_error error_code ) return "Invalid input format"; case IVAS_ERR_INVALID_INDEX: return "Invalid index"; #ifdef FIX_1370_EXTERNAL_ORIENTATION_CHECK case IVAS_ERR_EXTERNAL_ORIENTATION_INVALID_FORMAT: return "Euler angles were detected in the input but only Quaternions are supported"; #endif default: break; } Loading lib_com/ivas_prot.h +0 −28 Original line number Diff line number Diff line Loading @@ -262,7 +262,6 @@ uint32_t ivas_syn_output( int16_t *synth_out /* o : integer 16 bits synthesis signal */ ); #ifdef JBM_MEMORY_OPT void ivas_buffer_interleaved_to_deinterleaved( float *audio, /* i/o: audio buffer */ const int16_t n_channels, /* i : number of channels */ Loading @@ -276,14 +275,6 @@ void ivas_buffer_deinterleaved_to_interleaved( const int16_t frame_length, /* i : frame length (one channel) */ float *audio_out /* o : interleaved audio buffer */ ); #else void ivas_syn_output_f( float *synth[], /* i/o: float synthesis signal */ const int16_t output_frame, /* i : output frame length (one channel) */ const int16_t n_channels, /* i : number of output channels */ float *synth_out /* o : integer 16 bits synthesis signal */ ); #endif void ivas_initialize_handles_enc( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); Loading Loading @@ -319,14 +310,9 @@ ivas_error ivas_init_decoder( ivas_error ivas_output_buff_dec( float *p_output_f[], /* i/o: output audio buffers */ #ifdef FIX_1330_JBM_MEMORY const int16_t nchan_out_buff, /* i : number of output channels */ const int16_t Opt_tsm, /* i : TSM option flag */ DECODER_TC_BUFFER_HANDLE hTcBuffer /* i : TSM buffer handle */ #else const int16_t nchan_out_buff_old, /* i : previous frame number of output channels*/ const int16_t nchan_out_buff /* i : number of output channels */ #endif ); /*! r: flag to indicate if split rendering is enabled */ Loading Loading @@ -868,10 +854,6 @@ void 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 */ int16_t *nSamplesResidual /* o : number of samples not fitting into the renderer grid and buffer for the next call*/ #ifndef JBM_MEMORY_OPT , float *data /* i/o: time-scaled transport channels */ #endif ); void ivas_dec_prepare_renderer( Loading Loading @@ -3744,13 +3726,8 @@ void ivas_dirac_dec_render_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output */ const int16_t nchan_transport, /* i : number of transport channels */ #ifdef FIX_1319_STACK_SBA_DECODER float *pppQMfFrame_ts_re[HOA3_CHANNELS][CLDFB_NO_COL_MAX], float *pppQMfFrame_ts_im[HOA3_CHANNELS][CLDFB_NO_COL_MAX] #else float *pppQMfFrame_ts_re[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX], float *pppQMfFrame_ts_im[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX] #endif ); void computeDiffuseness_mdft( Loading Loading @@ -5884,12 +5861,7 @@ void ivas_omasa_separate_object_render_jbm( const uint16_t nSamplesRendered, /* i : number of samples rendered */ float input_f[][L_FRAME48k], /* i : separated object signal */ float *output_f[], /* o : rendered time signal */ #ifdef FIX_1330_JBM_MEMORY const int16_t subframes_rendered /* i : number of subframes rendered */ #else const int16_t subframes_rendered, /* i : number of subframes rendered */ const int16_t slots_rendered /* i : number of CLDFB slots rendered */ #endif ); void ivas_omasa_encode_masa_to_total( Loading Loading
apps/renderer.c +0 −31 Original line number Diff line number Diff line Loading @@ -71,9 +71,7 @@ #define IVAS_MAX16B_FLT 32767.0f #define IVAS_MIN16B_FLT ( -32768.0f ) #ifdef NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS #define OMASA_TDREND_MATCHING_GAIN_DB ( -2.0f ) #endif #if !defined( DEBUGGING ) && !defined( WMOPS ) static Loading Loading @@ -589,7 +587,6 @@ static void setupWithSingleFormatInput( positionProvider->numObjects = args.inConfig.numAudioObjects; for ( int16_t i = 0; i < positionProvider->numObjects; ++i ) { #ifdef FIX_1376_MISSING_ISM_METADATA /* Check if path to metadata file was given */ if ( isEmptyString( args.inMetadataFilePaths[i] ) ) { Loading @@ -598,18 +595,11 @@ static void setupWithSingleFormatInput( } /* It is allowed on CLI to have no metadata for an ISM input - skip opening if string contains "NULL" */ #else /* It is allowed on CLI to have no metadata for an ISM input - skip opening if string is empty or contains "NULL" */ #endif char charBuf[FILENAME_MAX]; strncpy( charBuf, args.inMetadataFilePaths[i], min( FILENAME_MAX, RENDERER_MAX_CLI_ARG_LENGTH ) - 1 ); charBuf[min( FILENAME_MAX, RENDERER_MAX_CLI_ARG_LENGTH ) - 1] = '\0'; to_upper( charBuf ); #ifdef FIX_1376_MISSING_ISM_METADATA if ( strncmp( charBuf, "NULL", 4 ) == 0 ) #else if ( isEmptyString( args.inMetadataFilePaths[i] ) || strncmp( charBuf, "NULL", 4 ) == 0 ) #endif { continue; } Loading Loading @@ -1210,29 +1200,21 @@ int main( } } #ifndef NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS /* Set the total number of objects */ #endif if ( args.inConfig.numAudioObjects > 0 ) { #ifdef NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS /* Set the total number of objects */ #endif if ( ( error = IVAS_REND_SetTotalNumberOfObjects( hIvasRend, args.inConfig.numAudioObjects ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_REND_SetTotalNumberOfObjects(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } #ifdef NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS /* Set the metadata delay for objects */ #endif if ( ( error = IVAS_REND_SetIsmMetadataDelay( hIvasRend, args.syncMdDelay ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_REND_SetIsmMetadataDelay(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } #ifdef NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS /* For OMASA input and BINAURAL output, apply a gain to objects to match the loudness with MASA part */ if ( args.inConfig.numMasaBuses > 0 && args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL ) Loading @@ -1242,7 +1224,6 @@ int main( args.inConfig.audioObjects[i].gain_dB += OMASA_TDREND_MATCHING_GAIN_DB; } } #endif } IVAS_REND_LfePanMtx lfePanMatrix; Loading Loading @@ -1278,7 +1259,6 @@ int main( { masaIds[i] = 0u; } #ifdef NONBE_1377_REND_DIRATT_CONF #ifdef FIX_1377_HANDLE_ERROR_CODE if ( ( error = IVAS_REND_SetObjectIDs( hIvasRend ) ) != IVAS_ERR_OK ) { Loading @@ -1287,7 +1267,6 @@ int main( } #else IVAS_REND_SetObjectIDs( hIvasRend ); #endif #endif for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i ) Loading Loading @@ -3706,20 +3685,10 @@ static void parseCombinedFormatInput( inConfig->numAmbisonicsBuses = 1; inConfig->ambisonicsBuses[0].audioConfig = audioConfig; inConfig->ambisonicsBuses[0].inputChannelIndex = inConfig->numAudioObjects; #ifdef NONBE_1352_HARMONIZE_OSBA_LOUDNESS inConfig->ambisonicsBuses[0].gain_dB = 0.f; #else inConfig->ambisonicsBuses[0].gain_dB = -6.f; #endif *configString += 4; /* Modify input gain for objects too */ #ifndef NONBE_1352_HARMONIZE_OSBA_LOUDNESS for ( int16_t i = 0; i < inConfig->numAudioObjects; ++i ) { inConfig->audioObjects[i].gain_dB = -6.f; } #endif } else if ( audioConfig == IVAS_AUDIO_CONFIG_MASA1 || audioConfig == IVAS_AUDIO_CONFIG_MASA2 ) { Loading
lib_com/cnst.h +0 −2 Original line number Diff line number Diff line Loading @@ -526,9 +526,7 @@ enum #define L_FRAME_MAX L_FRAME48k /* Max 20ms frame size @48kHz */ #define L_FRAME_PLUS 1200 /* Max frame size (long TCX frame) */ #define L_MDCT_OVLP_MAX NS2SA( 48000, ACELP_LOOK_NS ) /* = Max mdct overlap */ #ifdef FIX_1320_STACK_CPE_DECODER #define L_FRAME_PLUS_INTERNAL 800 /* Max frame size (long TCX frame) at maximum internal sampling rate */ #endif #define N_TCX10_MAX 480 /* Max size of TCX10 MDCT spectrum */ #define BITS_TEC 1 /* number of bits for TEC */ #define BITS_TFA 1 /* number of bits for TTF */ Loading
lib_com/ivas_cnst.h +0 −5 Original line number Diff line number Diff line Loading @@ -172,13 +172,8 @@ typedef enum #define JBM_CLDFB_SLOTS_IN_SUBFRAME 4 #define MAX_JBM_CLDFB_TIMESLOTS 32 #define DEFAULT_JBM_CLDFB_TIMESLOTS 16 #ifdef JBM_MEMORY_OPT #define MAX_JBM_L_FRAME48k ( IVAS_MAX_FRAME_SIZE * 2 ) /* 1920: max. time-scaled frame buffer length (per channel) in samples */ #define MAX_JBM_L_FRAME_NS 40000000L /* 40 ms: time-scaled frame size in ns, proportional to MAX_JBM_L_FRAME48k */ #else #define MAX_JBM_L_FRAME48k 1920 #define MAX_JBM_L_FRAME_NS 40000000L #endif #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH #define MAX_CLDFB_DIGEST_CHANNELS 3 /* == maximum of ParamISM TCs and ParamMC TCs */ Loading
lib_com/ivas_error.h +0 −4 Original line number Diff line number Diff line Loading @@ -134,9 +134,7 @@ typedef enum IVAS_ERR_BITSTREAM_READER_INVALID_FORMAT, IVAS_ERR_NO_FILE_OPEN, IVAS_ERR_SAMPLING_RATE_UNKNOWN, #ifdef FIX_1370_EXTERNAL_ORIENTATION_CHECK IVAS_ERR_EXTERNAL_ORIENTATION_INVALID_FORMAT, #endif /*----------------------------------------* * renderer (lib_rend only) * Loading Loading @@ -274,10 +272,8 @@ static inline const char *ivas_error_to_string( ivas_error error_code ) return "Invalid input format"; case IVAS_ERR_INVALID_INDEX: return "Invalid index"; #ifdef FIX_1370_EXTERNAL_ORIENTATION_CHECK case IVAS_ERR_EXTERNAL_ORIENTATION_INVALID_FORMAT: return "Euler angles were detected in the input but only Quaternions are supported"; #endif default: break; } Loading
lib_com/ivas_prot.h +0 −28 Original line number Diff line number Diff line Loading @@ -262,7 +262,6 @@ uint32_t ivas_syn_output( int16_t *synth_out /* o : integer 16 bits synthesis signal */ ); #ifdef JBM_MEMORY_OPT void ivas_buffer_interleaved_to_deinterleaved( float *audio, /* i/o: audio buffer */ const int16_t n_channels, /* i : number of channels */ Loading @@ -276,14 +275,6 @@ void ivas_buffer_deinterleaved_to_interleaved( const int16_t frame_length, /* i : frame length (one channel) */ float *audio_out /* o : interleaved audio buffer */ ); #else void ivas_syn_output_f( float *synth[], /* i/o: float synthesis signal */ const int16_t output_frame, /* i : output frame length (one channel) */ const int16_t n_channels, /* i : number of output channels */ float *synth_out /* o : integer 16 bits synthesis signal */ ); #endif void ivas_initialize_handles_enc( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); Loading Loading @@ -319,14 +310,9 @@ ivas_error ivas_init_decoder( ivas_error ivas_output_buff_dec( float *p_output_f[], /* i/o: output audio buffers */ #ifdef FIX_1330_JBM_MEMORY const int16_t nchan_out_buff, /* i : number of output channels */ const int16_t Opt_tsm, /* i : TSM option flag */ DECODER_TC_BUFFER_HANDLE hTcBuffer /* i : TSM buffer handle */ #else const int16_t nchan_out_buff_old, /* i : previous frame number of output channels*/ const int16_t nchan_out_buff /* i : number of output channels */ #endif ); /*! r: flag to indicate if split rendering is enabled */ Loading Loading @@ -868,10 +854,6 @@ void 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 */ int16_t *nSamplesResidual /* o : number of samples not fitting into the renderer grid and buffer for the next call*/ #ifndef JBM_MEMORY_OPT , float *data /* i/o: time-scaled transport channels */ #endif ); void ivas_dec_prepare_renderer( Loading Loading @@ -3744,13 +3726,8 @@ void ivas_dirac_dec_render_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output */ const int16_t nchan_transport, /* i : number of transport channels */ #ifdef FIX_1319_STACK_SBA_DECODER float *pppQMfFrame_ts_re[HOA3_CHANNELS][CLDFB_NO_COL_MAX], float *pppQMfFrame_ts_im[HOA3_CHANNELS][CLDFB_NO_COL_MAX] #else float *pppQMfFrame_ts_re[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX], float *pppQMfFrame_ts_im[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX] #endif ); void computeDiffuseness_mdft( Loading Loading @@ -5884,12 +5861,7 @@ void ivas_omasa_separate_object_render_jbm( const uint16_t nSamplesRendered, /* i : number of samples rendered */ float input_f[][L_FRAME48k], /* i : separated object signal */ float *output_f[], /* o : rendered time signal */ #ifdef FIX_1330_JBM_MEMORY const int16_t subframes_rendered /* i : number of subframes rendered */ #else const int16_t subframes_rendered, /* i : number of subframes rendered */ const int16_t slots_rendered /* i : number of CLDFB slots rendered */ #endif ); void ivas_omasa_encode_masa_to_total( Loading