Loading apps/decoder.c +0 −22 Original line number Diff line number Diff line Loading @@ -1387,24 +1387,15 @@ static ivas_error initOnFirstGoodFrame( /* If outputting MASA, open output file and write metadata for initial bad frames */ else if ( *pBsFormat == IVAS_DEC_BS_MASA ) { #ifdef FIX_350_MASA_DELAY_COMP if ( ( error = MasaFileWriter_open( arg.outputWavFilename, arg.delayCompensationEnabled, ppMasaWriter ) ) != IVAS_ERR_OK ) #else if ( ( error = MasaFileWriter_open( arg.outputWavFilename, ppMasaWriter ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError: Error opening MASA decoded metadata file %s\n", MasaFileWriter_getFilePath( *ppMasaWriter ) ); return error; } /* Duplicate good first frame metadata to fill the beginning of stream. */ #ifdef FIX_350_MASA_DELAY_COMP MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta = NULL; if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #else IVAS_MASA_QMETADATA_HANDLE qMetadata = NULL; if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &qMetadata ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); return error; Loading @@ -1412,11 +1403,7 @@ static ivas_error initOnFirstGoodFrame( for ( int16_t j = 0; j < numInitialBadFrames; ++j ) { #ifdef FIX_350_MASA_DELAY_COMP if ( ( error = MasaFileWriter_writeFrame( *ppMasaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #else if ( ( error = MasaFileWriter_writeFrame( *ppMasaWriter, qMetadata ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( *ppMasaWriter ) ); return error; Loading Loading @@ -1676,23 +1663,14 @@ static ivas_error decodeG192( } else if ( bsFormat == IVAS_DEC_BS_MASA ) { #ifdef FIX_350_MASA_DELAY_COMP MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #else IVAS_MASA_QMETADATA_HANDLE qMetadata; if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &qMetadata ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef FIX_350_MASA_DELAY_COMP if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #else if ( ( error = MasaFileWriter_writeFrame( masaWriter, qMetadata ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); goto cleanup; Loading apps/renderer.c +0 −7 Original line number Diff line number Diff line Loading @@ -657,9 +657,6 @@ int main( fprintf( stderr, "Sampling rate must be specified on command line when using raw PCM input\n" ); exit( -1 ); } #ifndef FIX_389_EXT_REND_PCM_SR args.sampleRate = inFileSampleRate; #endif break; default: fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); Loading Loading @@ -691,11 +688,7 @@ int main( } /* === Configure === */ #ifdef FIX_392_LATE_REVERB if ( ( error = IVAS_REND_InitConfig( hIvasRend, args.outConfig.audioConfig ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_InitConfig( hIvasRend, ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) || ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL ) ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Error in Renderer Config Init\n" ); exit( -1 ); Loading lib_com/bitstream.c +0 −7 Original line number Diff line number Diff line Loading @@ -833,13 +833,6 @@ static ivas_error write_indices_element( /* restore previous pointer position */ pt_stream_loc = pt_stream_backup; } #ifndef ISSUE_24_CLEANUP_MCT_LFE /* TODO implemented only for MCT for now */ if ( ( st_ivas->hEncoderConfig->ivas_format == MC_FORMAT ) && ( st_ivas->mc_mode == MC_MODE_MCT ) && ( element_id * CPE_CHANNELS + n == LFE_CHANNEL ) ) { continue; } #endif #ifdef ENABLE_BITRATE_VERIFICATION total_nb_bits = #endif Loading lib_com/common_api_types.h +0 −4 Original line number Diff line number Diff line Loading @@ -97,11 +97,7 @@ typedef struct } IVAS_VECTOR3; typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE; #ifdef FIX_350_MASA_DELAY_COMP typedef struct ivas_masa_decoder_ext_out_meta_struct *MASA_DECODER_EXT_OUT_META_HANDLE; #else typedef struct ivas_masa_qmetadata_frame_struct *IVAS_MASA_QMETADATA_HANDLE; #endif typedef struct TDREND_HRFILT_FiltSet_struct *IVAS_DEC_HRTF_HANDLE; typedef struct ivas_hrtfs_crend_structure *IVAS_DEC_HRTF_CREND_HANDLE; Loading lib_com/core_com_config.c +8 −45 Original line number Diff line number Diff line Loading @@ -250,18 +250,10 @@ int16_t getTnsAllowed( const int32_t total_brate, /* i : total bitrate */ const int16_t igf, /* i : flag indicating IGF activity*/ const int16_t element_mode /* i : IVAS element mode */ #ifndef ISSUE_24_CLEANUP_MCT_LFE , const MCT_CHAN_MODE mct_chan_mode /* i : MCT channel mode */ #endif ) { int16_t tnsAllowed = 0; #ifndef ISSUE_24_CLEANUP_MCT_LFE if ( mct_chan_mode != MCT_CHAN_MODE_LFE ) { #endif if ( igf ) { if ( total_brate > HQ_16k40 || ( ( total_brate > HQ_13k20 ) && element_mode == IVAS_CPE_DFT ) ) Loading @@ -273,9 +265,6 @@ int16_t getTnsAllowed( { tnsAllowed = 1; } #ifndef ISSUE_24_CLEANUP_MCT_LFE } #endif return tnsAllowed; } Loading Loading @@ -419,20 +408,10 @@ int16_t getIgfPresent( const int32_t total_brate, /* i : total bitrate */ const int16_t bwidth, /* i : audio bandwidth */ const int16_t rf_mode /* i : flag to signal the RF mode */ #ifndef ISSUE_24_CLEANUP_MCT_LFE , const int16_t mct_chan_mode /* i : MCT channel mode */ #endif ) { int16_t igfPresent = 0; #ifndef ISSUE_24_CLEANUP_MCT_LFE if ( mct_chan_mode == MCT_CHAN_MODE_LFE ) { return igfPresent; } #endif if ( bwidth == SWB ) { Loading Loading @@ -820,12 +799,7 @@ void init_tcx_cfg( const int16_t infoIGFStopFreq, const int16_t element_mode, const int16_t ini_frame, const int16_t MCT_flag #ifndef ISSUE_24_CLEANUP_MCT_LFE , const MCT_CHAN_MODE mct_chan_mode /* i : MDCT channel mode */ #endif ) const int16_t MCT_flag ) { int16_t i; int16_t mdctWindowLength; Loading Loading @@ -855,20 +829,9 @@ void init_tcx_cfg( /* set number of coded lines */ hTcxCfg->tcx_coded_lines = getNumTcxCodedLines( bwidth ); #ifndef ISSUE_24_CLEANUP_MCT_LFE if ( mct_chan_mode == MCT_CHAN_MODE_LFE ) { hTcxCfg->tcx_coded_lines = MCT_LFE_MAX_LINE; } #endif /* TNS in TCX */ hTcxCfg->pCurrentTnsConfig = NULL; hTcxCfg->fIsTNSAllowed = getTnsAllowed( total_brate, igf, element_mode #ifndef ISSUE_24_CLEANUP_MCT_LFE , mct_chan_mode #endif ); hTcxCfg->fIsTNSAllowed = getTnsAllowed( total_brate, igf, element_mode ); if ( hTcxCfg->fIsTNSAllowed ) { Loading Loading
apps/decoder.c +0 −22 Original line number Diff line number Diff line Loading @@ -1387,24 +1387,15 @@ static ivas_error initOnFirstGoodFrame( /* If outputting MASA, open output file and write metadata for initial bad frames */ else if ( *pBsFormat == IVAS_DEC_BS_MASA ) { #ifdef FIX_350_MASA_DELAY_COMP if ( ( error = MasaFileWriter_open( arg.outputWavFilename, arg.delayCompensationEnabled, ppMasaWriter ) ) != IVAS_ERR_OK ) #else if ( ( error = MasaFileWriter_open( arg.outputWavFilename, ppMasaWriter ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError: Error opening MASA decoded metadata file %s\n", MasaFileWriter_getFilePath( *ppMasaWriter ) ); return error; } /* Duplicate good first frame metadata to fill the beginning of stream. */ #ifdef FIX_350_MASA_DELAY_COMP MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta = NULL; if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #else IVAS_MASA_QMETADATA_HANDLE qMetadata = NULL; if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &qMetadata ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); return error; Loading @@ -1412,11 +1403,7 @@ static ivas_error initOnFirstGoodFrame( for ( int16_t j = 0; j < numInitialBadFrames; ++j ) { #ifdef FIX_350_MASA_DELAY_COMP if ( ( error = MasaFileWriter_writeFrame( *ppMasaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #else if ( ( error = MasaFileWriter_writeFrame( *ppMasaWriter, qMetadata ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( *ppMasaWriter ) ); return error; Loading Loading @@ -1676,23 +1663,14 @@ static ivas_error decodeG192( } else if ( bsFormat == IVAS_DEC_BS_MASA ) { #ifdef FIX_350_MASA_DELAY_COMP MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #else IVAS_MASA_QMETADATA_HANDLE qMetadata; if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &qMetadata ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef FIX_350_MASA_DELAY_COMP if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #else if ( ( error = MasaFileWriter_writeFrame( masaWriter, qMetadata ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); goto cleanup; Loading
apps/renderer.c +0 −7 Original line number Diff line number Diff line Loading @@ -657,9 +657,6 @@ int main( fprintf( stderr, "Sampling rate must be specified on command line when using raw PCM input\n" ); exit( -1 ); } #ifndef FIX_389_EXT_REND_PCM_SR args.sampleRate = inFileSampleRate; #endif break; default: fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); Loading Loading @@ -691,11 +688,7 @@ int main( } /* === Configure === */ #ifdef FIX_392_LATE_REVERB if ( ( error = IVAS_REND_InitConfig( hIvasRend, args.outConfig.audioConfig ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_InitConfig( hIvasRend, ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) || ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL ) ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Error in Renderer Config Init\n" ); exit( -1 ); Loading
lib_com/bitstream.c +0 −7 Original line number Diff line number Diff line Loading @@ -833,13 +833,6 @@ static ivas_error write_indices_element( /* restore previous pointer position */ pt_stream_loc = pt_stream_backup; } #ifndef ISSUE_24_CLEANUP_MCT_LFE /* TODO implemented only for MCT for now */ if ( ( st_ivas->hEncoderConfig->ivas_format == MC_FORMAT ) && ( st_ivas->mc_mode == MC_MODE_MCT ) && ( element_id * CPE_CHANNELS + n == LFE_CHANNEL ) ) { continue; } #endif #ifdef ENABLE_BITRATE_VERIFICATION total_nb_bits = #endif Loading
lib_com/common_api_types.h +0 −4 Original line number Diff line number Diff line Loading @@ -97,11 +97,7 @@ typedef struct } IVAS_VECTOR3; typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE; #ifdef FIX_350_MASA_DELAY_COMP typedef struct ivas_masa_decoder_ext_out_meta_struct *MASA_DECODER_EXT_OUT_META_HANDLE; #else typedef struct ivas_masa_qmetadata_frame_struct *IVAS_MASA_QMETADATA_HANDLE; #endif typedef struct TDREND_HRFILT_FiltSet_struct *IVAS_DEC_HRTF_HANDLE; typedef struct ivas_hrtfs_crend_structure *IVAS_DEC_HRTF_CREND_HANDLE; Loading
lib_com/core_com_config.c +8 −45 Original line number Diff line number Diff line Loading @@ -250,18 +250,10 @@ int16_t getTnsAllowed( const int32_t total_brate, /* i : total bitrate */ const int16_t igf, /* i : flag indicating IGF activity*/ const int16_t element_mode /* i : IVAS element mode */ #ifndef ISSUE_24_CLEANUP_MCT_LFE , const MCT_CHAN_MODE mct_chan_mode /* i : MCT channel mode */ #endif ) { int16_t tnsAllowed = 0; #ifndef ISSUE_24_CLEANUP_MCT_LFE if ( mct_chan_mode != MCT_CHAN_MODE_LFE ) { #endif if ( igf ) { if ( total_brate > HQ_16k40 || ( ( total_brate > HQ_13k20 ) && element_mode == IVAS_CPE_DFT ) ) Loading @@ -273,9 +265,6 @@ int16_t getTnsAllowed( { tnsAllowed = 1; } #ifndef ISSUE_24_CLEANUP_MCT_LFE } #endif return tnsAllowed; } Loading Loading @@ -419,20 +408,10 @@ int16_t getIgfPresent( const int32_t total_brate, /* i : total bitrate */ const int16_t bwidth, /* i : audio bandwidth */ const int16_t rf_mode /* i : flag to signal the RF mode */ #ifndef ISSUE_24_CLEANUP_MCT_LFE , const int16_t mct_chan_mode /* i : MCT channel mode */ #endif ) { int16_t igfPresent = 0; #ifndef ISSUE_24_CLEANUP_MCT_LFE if ( mct_chan_mode == MCT_CHAN_MODE_LFE ) { return igfPresent; } #endif if ( bwidth == SWB ) { Loading Loading @@ -820,12 +799,7 @@ void init_tcx_cfg( const int16_t infoIGFStopFreq, const int16_t element_mode, const int16_t ini_frame, const int16_t MCT_flag #ifndef ISSUE_24_CLEANUP_MCT_LFE , const MCT_CHAN_MODE mct_chan_mode /* i : MDCT channel mode */ #endif ) const int16_t MCT_flag ) { int16_t i; int16_t mdctWindowLength; Loading Loading @@ -855,20 +829,9 @@ void init_tcx_cfg( /* set number of coded lines */ hTcxCfg->tcx_coded_lines = getNumTcxCodedLines( bwidth ); #ifndef ISSUE_24_CLEANUP_MCT_LFE if ( mct_chan_mode == MCT_CHAN_MODE_LFE ) { hTcxCfg->tcx_coded_lines = MCT_LFE_MAX_LINE; } #endif /* TNS in TCX */ hTcxCfg->pCurrentTnsConfig = NULL; hTcxCfg->fIsTNSAllowed = getTnsAllowed( total_brate, igf, element_mode #ifndef ISSUE_24_CLEANUP_MCT_LFE , mct_chan_mode #endif ); hTcxCfg->fIsTNSAllowed = getTnsAllowed( total_brate, igf, element_mode ); if ( hTcxCfg->fIsTNSAllowed ) { Loading