diff --git a/apps/decoder.c b/apps/decoder.c index 614309b2081fb93533fd8a21d9e8906bd2028187..ce9567c13acd2b368f2587cfac26f8b4d5e8b6ae 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -481,12 +481,10 @@ int main( goto cleanup; } -#ifdef FIX_1449_RENDERER_FRAME_SIZE_UNCLEAR_IN_ISAR if ( !arg.renderConfigEnabled && ( arg.render_num_subframes != asked_num_subframes ) ) { fprintf( stderr, "\nChanged render framesize, only 20ms are allowed for non-0dof split rendering!\n" ); } -#endif } /*------------------------------------------------------------------------------------------* diff --git a/apps/renderer.c b/apps/renderer.c index 0694b0cf5911ae48feb3a6d5897c20947d20e532..152850006cce4b3e7df8019a643fee8f993958a1 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -48,9 +48,6 @@ #include "rotation_file_reader.h" #include "aeid_file_reader.h" #include "split_render_file_read_write.h" -#ifndef FIX_1494_SET_SPLITBFI_UNUSED -#include "split_rend_bfi_file_reader.h" -#endif #include "vector3_pair_file_reader.h" #ifdef DEBUGGING #include "debug.h" @@ -170,9 +167,6 @@ typedef struct int16_t numInMetadataFiles; char outMetadataFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; char headRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; -#ifndef FIX_1494_SET_SPLITBFI_UNUSED - char splitRendBFIFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; -#endif char referenceVectorFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; char referenceRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; char externalOrientationFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; @@ -223,9 +217,6 @@ typedef enum CmdLnOptionId_listFormats, CmdLnOptionId_inputGain, CmdLnOptionId_outputMetadata, -#ifndef FIX_1494_SET_SPLITBFI_UNUSED - CmdLnOptionId_SplitRendBFIFile, -#endif CmdLnOptionId_referenceVectorFile, CmdLnOptionId_exteriorOrientationFile, CmdLnOptionId_framing, @@ -284,14 +275,6 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "om", .description = "coded metadata file for BINAURAL_SPLIT_PCM output mode", }, -#ifndef FIX_1494_SET_SPLITBFI_UNUSED - { - .id = CmdLnOptionId_SplitRendBFIFile, - .match = "post_rend_bfi_file", - .matchShort = "prbfi", - .description = "Split rendering option: bfi file", - }, -#endif { .id = CmdLnOptionId_refRotFile, .match = "reference_rotation_file", @@ -696,9 +679,6 @@ int main( IVAS_CLDFB_FILTER_BANK_HANDLE cldfbAna[RENDERER_MAX_INPUT_CHANNELS]; IVAS_CLDFB_FILTER_BANK_HANDLE cldfbSyn[RENDERER_MAX_INPUT_CHANNELS]; int16_t cldfb_in_flag, CLDFBframeSize_smpls; -#ifndef FIX_1494_SET_SPLITBFI_UNUSED - SplitRendBFIFileReader *splitRendBFIReader = NULL; -#endif Vector3PairFileReader *referenceVectorReader = NULL; hrtfFileReader *hrtfFileReader = NULL; IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend = NULL; @@ -829,13 +809,6 @@ int main( } } -#ifndef FIX_1494_SET_SPLITBFI_UNUSED - if ( !isEmptyString( args.splitRendBFIFilePath ) ) - { - convert_backslash( args.splitRendBFIFilePath ); - SplitRendBFIFileReader_open( args.splitRendBFIFilePath, &splitRendBFIReader ); - } -#endif if ( !isEmptyString( args.externalOrientationFilePath ) ) { @@ -2080,9 +2053,6 @@ cleanup: } split_rend_reader_writer_close( &hSplitRendFileReadWrite ); -#ifndef FIX_1494_SET_SPLITBFI_UNUSED - SplitRendBFIFileReader_close( &splitRendBFIReader ); -#endif for ( i = 0; i < RENDERER_MAX_MC_INPUTS; ++i ) { @@ -2699,9 +2669,6 @@ static CmdlnArgs defaultArgs( clearString( args.headRotationFilePath ); clearString( args.outMetadataFilePath ); -#ifndef FIX_1494_SET_SPLITBFI_UNUSED - clearString( args.splitRendBFIFilePath ); -#endif clearString( args.referenceVectorFilePath ); clearString( args.referenceRotationFilePath ); clearString( args.customHrtfFilePath ); @@ -2808,12 +2775,6 @@ static void parseOption( assert( numOptionValues == 1 ); strncpy( args->outMetadataFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; -#ifndef FIX_1494_SET_SPLITBFI_UNUSED - case CmdLnOptionId_SplitRendBFIFile: - assert( numOptionValues == 1 ); - strncpy( args->splitRendBFIFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); - break; -#endif case CmdLnOptionId_referenceVectorFile: assert( numOptionValues == 1 ); strncpy( args->referenceVectorFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 32ac8e52beb8b33edb98e83f833c783e18282de4..1aa64fd416f8b74ed877ec45b7dd14076d046431 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -3580,10 +3580,6 @@ void ivas_sba_dirac_stereo_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output[CPE_CHANNELS], /* o : output synthesis signal */ const int16_t output_frame /* i : output frame length per channel */ -#ifndef REMOVE_UNUSED_CODE_IVAS_DEC - , - const int16_t mcmasa /* i : McMASA flag */ -#endif ); void ivas_sba_dirac_stereo_config( diff --git a/lib_com/options.h b/lib_com/options.h index c237d7b25a78f6df88c5ba7e951f147fa267800d..35878c7e3c3ef1175bfc82b82efb56a34fc475c7 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -162,14 +162,6 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */ #define NONBE_1122_KEEP_EVS_MODE_UNCHANGED /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR. */ -#define FIX_1486_INIT_OUTPUT_POINTERS /* FhG: always initialize pointers in renderer flush */ -#define FIX_1449_RENDERER_FRAME_SIZE_UNCLEAR_IN_ISAR /* Dolby: Fix for issue 1449: renderer frame size unclear in ISAR */ -#define FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR /* Dolby: remove unused noise generator from ISAR */ -#define FIX_1495_INCORRECT_FREAD_CALL /* Eri: Switched size and number of elements in fread call. */ -#define FIX_1494_SET_SPLITBFI_UNUSED /* Dolby: Fix issue 1494, remove unused function setting BFI flag in ISAR renderer */ -#define FIX_1479_MSAN_SPAR_UNINITIALIZED_VALUE /* Dolby: Fix for issue 1479, MSAN error due to uninitialized value in SPAR */ -#define REMOVE_UNUSED_CODE_IVAS_DEC /* VA: remove unused code in ivas_jbm_dec_tc_fx() */ -#define REMOVE_CAM_FROM_IVAS /* VA: basop issue 210: remove obsoelte CAM code from IVAS */ #define FIX_2344_ALIGN_PREPROC /* VA: basop issue 2344: Align pre_proc_ivas() between FLP and BASOP */ #define FIX_FLOAT_1501_UNIT_VALUE_IN_OMASA /* Nokia: Fix float issue 1501, uninitialized value in ivas_masa_combine_directions for OMASA */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 9624993b056338c95c8614aa74bdf236f451aa52..7daf20ab32d05c1e4e615e0e13d0bbecf59912c6 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -106,25 +106,7 @@ ivas_error ivas_dec( * Decoding + pre-rendering *----------------------------------------------------------------*/ -#ifndef REMOVE_UNUSED_CODE_IVAS_DEC - if ( st_ivas->bfi && st_ivas->ini_frame == 0 ) - { - /* zero output when first frame(s) is lost */ - for ( n = 0; n < nchan_out; n++ ) - { - set_f( p_output[n], 0.0f, output_frame ); - } - -#ifdef DEBUG_MODE_INFO - create_sce_dec( st_ivas, 0, ivas_total_brate ); - output_debug_mode_info_dec( st_ivas->hSCE[0]->hCoreCoder, 1, output_frame, NULL ); - destroy_sce_dec( st_ivas->hSCE[0] ); - st_ivas->hSCE[0] = NULL; -#endif - } - else -#endif - if ( st_ivas->ivas_format == STEREO_FORMAT ) + if ( st_ivas->ivas_format == STEREO_FORMAT ) { st_ivas->hCPE[0]->element_brate = ivas_total_brate; if ( ( error = ivas_cpe_dec( st_ivas, 0, p_output, output_frame, 0 ) ) != IVAS_ERR_OK ) @@ -270,11 +252,7 @@ ivas_error ivas_dec( ivas_spar_dec_gen_umx_mat( st_ivas->hSpar->hMdDec, st_ivas->nchan_transport, IVAS_MAX_NUM_BANDS, st_ivas->bfi, ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, ivas_total_brate, st_ivas->last_active_ivas_total_brate ) ); } -#ifdef REMOVE_UNUSED_CODE_IVAS_DEC ivas_sba_dirac_stereo_dec( st_ivas, p_output, output_frame ); -#else - ivas_sba_dirac_stereo_dec( st_ivas, p_output, output_frame, st_ivas->ivas_format == MC_FORMAT ); -#endif } else if ( st_ivas->ivas_format == MASA_FORMAT && ivas_total_brate < MASA_STEREO_MIN_BITRATE && ( ivas_total_brate > IVAS_SID_5k2 || ( ivas_total_brate <= IVAS_SID_5k2 && st_ivas->nCPE > 0 && st_ivas->hCPE[0]->nchan_out == 1 ) ) ) { @@ -476,11 +454,7 @@ ivas_error ivas_dec( ivas_spar_dec_gen_umx_mat( st_ivas->hSpar->hMdDec, st_ivas->nchan_transport, IVAS_MAX_NUM_BANDS, st_ivas->bfi, ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->last_active_ivas_total_brate ) ); -#ifdef REMOVE_UNUSED_CODE_IVAS_DEC ivas_sba_dirac_stereo_dec( st_ivas, &p_output[sba_ch_idx], output_frame ); -#else - ivas_sba_dirac_stereo_dec( st_ivas, &p_output[sba_ch_idx], output_frame, 0 ); -#endif } /* HP filtering */ @@ -706,11 +680,7 @@ ivas_error ivas_dec( if ( st_ivas->sba_dirac_stereo_flag ) /* use the flag to trigger the DFT upmix */ { -#ifdef REMOVE_UNUSED_CODE_IVAS_DEC ivas_sba_dirac_stereo_dec( st_ivas, p_output, output_frame ); -#else - ivas_sba_dirac_stereo_dec( st_ivas, p_output, output_frame, 1 ); -#endif } /* HP filtering */ @@ -1417,9 +1387,7 @@ ivas_error ivas_jbm_dec_flush_renderer( int16_t n_samples_still_available; int16_t n_slots_still_available; int16_t n_samples_to_render; -#ifdef FIX_1486_INIT_OUTPUT_POINTERS int16_t ch_idx; -#endif int16_t n_samples_granularity; DECODER_TC_BUFFER_HANDLE hTcBuffer; float *p_output[MAX_LS_CHANNELS + MAX_NUM_OBJECTS]; @@ -1429,12 +1397,10 @@ ivas_error ivas_jbm_dec_flush_renderer( return IVAS_ERR_OK; } -#ifdef FIX_1486_INIT_OUTPUT_POINTERS for ( ch_idx = 0; ch_idx < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ ) { p_output[ch_idx] = st_ivas->p_output_f[ch_idx]; } -#endif *nSamplesRendered = 0; hTcBuffer = st_ivas->hTcBuffer; @@ -1453,10 +1419,6 @@ ivas_error ivas_jbm_dec_flush_renderer( if ( n_slots_still_available ) { -#ifndef FIX_1486_INIT_OUTPUT_POINTERS - int16_t ch_idx; - -#endif /* render available full slots (with new lower granularity) */ for ( ch_idx = 0; ch_idx < max( hTcBuffer->nchan_transport_rend, hTcBuffer->nchan_buffer_full ); ch_idx++ ) { @@ -1476,12 +1438,6 @@ ivas_error ivas_jbm_dec_flush_renderer( hTcBuffer->n_samples_flushed = n_samples_to_render; hTcBuffer->n_samples_rendered = 0; -#ifndef FIX_1486_INIT_OUTPUT_POINTERS - for ( ch_idx = 0; ch_idx < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ ) - { - p_output[ch_idx] = st_ivas->p_output_f[ch_idx]; - } -#endif if ( st_ivas->ivas_format == ISM_FORMAT ) { diff --git a/lib_dec/ivas_sba_dirac_stereo_dec.c b/lib_dec/ivas_sba_dirac_stereo_dec.c index c184deb3a70ff8f07c32898b063aede593c0d9c6..e2fed3b0ca8c993e60356c553d0e44d091e01543 100644 --- a/lib_dec/ivas_sba_dirac_stereo_dec.c +++ b/lib_dec/ivas_sba_dirac_stereo_dec.c @@ -828,18 +828,12 @@ void ivas_sba_dirac_stereo_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output[CPE_CHANNELS], /* i/o: output synthesis signal */ const int16_t output_frame /* i : output frame length per channel */ -#ifndef REMOVE_UNUSED_CODE_IVAS_DEC - , - const int16_t mcmasa /* i : McMASA flag */ -#endif ) { int16_t dtx_flag, fd_cng_flag; int16_t sba_mono_flag; int16_t memOffset; -#ifdef REMOVE_UNUSED_CODE_IVAS_DEC int32_t output_Fs; -#endif float tmp_buf[NS2SA( 48000, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS )]; float tmp_synth[L_FRAME16k]; float hb_gain[NB_DIV]; @@ -848,11 +842,9 @@ void ivas_sba_dirac_stereo_dec( SCE_DEC_HANDLE hSCE; CPE_DEC_HANDLE hCPE; STEREO_DFT_DEC_DATA_HANDLE hStereoDft; -#ifdef REMOVE_UNUSED_CODE_IVAS_DEC int16_t mcmasa = st_ivas->ivas_format == MC_FORMAT; output_Fs = st_ivas->hDecoderConfig->output_Fs; -#endif hSCE = st_ivas->hSCE[0]; hCPE = st_ivas->hCPE[0]; @@ -873,11 +865,7 @@ void ivas_sba_dirac_stereo_dec( memOffset = NS2SA( output_frame * FRAMES_PER_SEC, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS ); ivas_sba_dirac_stereo_config( hStereoDft->hConfig ); -#ifdef REMOVE_UNUSED_CODE_IVAS_DEC hStereoDft->nbands = ivas_sba_dirac_stereo_band_config( hStereoDft->band_limits, output_Fs, hStereoDft->NFFT, ( ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT ) && !mcmasa ) ); -#else - hStereoDft->nbands = ivas_sba_dirac_stereo_band_config( hStereoDft->band_limits, st_ivas->hDecoderConfig->output_Fs, hStereoDft->NFFT, ( ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT ) && !mcmasa ) ); -#endif stereo_dft_dec_update( hStereoDft, output_frame, 1 /*st_ivas->sba_dirac_stereo_flag*/ ); if ( st_ivas->nchan_transport > 1 ) { @@ -909,13 +897,8 @@ void ivas_sba_dirac_stereo_dec( } /* DFT Stereo upmix */ -#ifdef REMOVE_UNUSED_CODE_IVAS_DEC stereo_dft_dec( hStereoDft, hCPE->hCoreCoder[0], DFT, NULL, NULL, 1 /*st_ivas->sba_dirac_stereo_flag*/, sba_mono_flag, ( st_ivas->hSpar != NULL && !mcmasa ) ? st_ivas->hSpar->hMdDec : NULL, ( st_ivas->hSpar != NULL && !mcmasa ) ? st_ivas->hSpar->hFbMixer->cross_fade_start_offset : 0, output_Fs, st_ivas->nchan_transport, ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->last_active_ivas_total_brate ) ); -#else - stereo_dft_dec( hStereoDft, hCPE->hCoreCoder[0], DFT, NULL, NULL, 1 /*st_ivas->sba_dirac_stereo_flag*/, sba_mono_flag, ( st_ivas->hSpar != NULL && !mcmasa ) ? st_ivas->hSpar->hMdDec : NULL, ( st_ivas->hSpar != NULL && !mcmasa ) ? st_ivas->hSpar->hFbMixer->cross_fade_start_offset : 0, - st_ivas->hDecoderConfig->output_Fs, st_ivas->nchan_transport, ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->last_active_ivas_total_brate ) ); -#endif /* DFT synthesis */ stereo_dft_dec_synthesize( hCPE, DFT, 0, output[0], output_frame ); diff --git a/lib_dec/ivas_spar_md_dec.c b/lib_dec/ivas_spar_md_dec.c index c6c2a5985bd3db10a0181056333738d5c13da5a3..532466a633f7237911f3178c0bc00e3e21d13683 100644 --- a/lib_dec/ivas_spar_md_dec.c +++ b/lib_dec/ivas_spar_md_dec.c @@ -585,10 +585,8 @@ ivas_error ivas_spar_md_dec_init( } hMdDec->first_valid_frame = 1; -#ifdef FIX_1479_MSAN_SPAR_UNINITIALIZED_VALUE hMdDec->spar_md.res_ind = 0; hMdDec->spar_md.prior_dyn_active_w_flag = 0; -#endif return IVAS_ERR_OK; } diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 94a7bdbadd9582ebe7193f6d13b95016ba12e672..013d2975fdf1c5b16bc733da378e573fa0c5e622 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -2150,22 +2150,9 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( /* convert to int16 with limiting for BINAURAL_SPLIT_PCM */ if ( pcm_out_flag ) { -#ifdef FIX_1449_RENDERER_FRAME_SIZE_UNCLEAR_IN_ISAR #ifndef DISABLE_LIMITER ivas_limiter_dec( st_ivas->hLimiter, p_head_pose_buf, st_ivas->hDecoderConfig->nchan_out, numSamplesPerChannelToOutput, st_ivas->BER_detect ); #endif -#else - if ( st_ivas->hDecoderConfig->render_num_subframes == IVAS_RENDER_NUM_SUBFR_5MS ) - { -#ifndef DISABLE_LIMITER - ivas_limiter_dec( st_ivas->hLimiter, p_head_pose_buf, st_ivas->hDecoderConfig->nchan_out, numSamplesPerChannelToOutput, st_ivas->BER_detect ); -#endif - } - else - { - ivas_limiter_dec( st_ivas->hLimiter, p_head_pose_buf, st_ivas->hDecoderConfig->nchan_out, numSamplesPerChannelToOutput, st_ivas->BER_detect ); - } -#endif #ifdef DEBUGGING st_ivas->noClipping += @@ -4077,22 +4064,9 @@ static ivas_error ivas_dec_voip_get_samples_common( /* Synthesise PCM output if split PCM */ if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { -#ifdef FIX_1449_RENDERER_FRAME_SIZE_UNCLEAR_IN_ISAR #ifndef DISABLE_LIMITER ivas_limiter_dec( st_ivas->hLimiter, p_head_pose_buf, st_ivas->hDecoderConfig->nchan_out, *nSamplesRendered, st_ivas->BER_detect ); #endif -#else - if ( st_ivas->hDecoderConfig->render_num_subframes == IVAS_RENDER_NUM_SUBFR_5MS ) - { -#ifndef DISABLE_LIMITER - ivas_limiter_dec( st_ivas->hLimiter, p_head_pose_buf, st_ivas->hDecoderConfig->nchan_out, *nSamplesRendered, st_ivas->BER_detect ); -#endif - } - else - { - ivas_limiter_dec( st_ivas->hLimiter, p_head_pose_buf, st_ivas->hDecoderConfig->nchan_out, *nSamplesRendered, st_ivas->BER_detect ); - } -#endif #ifdef DEBUGGING st_ivas->noClipping += diff --git a/lib_enc/ivas_core_enc.c b/lib_enc/ivas_core_enc.c index 8d33f4831e08e8c95c81612e1894b578bcd6487c..9b8e53791a2343b28d2fa5bd1220111e44139575 100644 --- a/lib_enc/ivas_core_enc.c +++ b/lib_enc/ivas_core_enc.c @@ -418,13 +418,6 @@ ivas_error ivas_core_enc( stereo_icBWE_enc( hCPE, shb_speech, new_swb_speech_buffer, voice_factors[0] ); } -#ifndef REMOVE_CAM_FROM_IVAS - /*---------------------------------------------------------------------* - * Channel-aware mode - write signaling information into the bitstream - *---------------------------------------------------------------------*/ - - signaling_enc_rf( st ); -#endif /*---------------------------------------------------------------------* * Common updates *---------------------------------------------------------------------*/ diff --git a/lib_isar/isar_lcld_decoder.c b/lib_isar/isar_lcld_decoder.c index db7a464df0a4a337b7babfcd22d6b5821c6ab5b6..148ee523eb9c7daed0d01f8a8c1ef00587e539da 100644 --- a/lib_isar/isar_lcld_decoder.c +++ b/lib_isar/isar_lcld_decoder.c @@ -101,9 +101,6 @@ struct LCLD_DECODER int32_t ***pppiQLCLDImag; PredictionDecoder *psPredictionDecoder; -#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR - NoiseGen *psNoiseGen; -#endif }; @@ -583,9 +580,6 @@ ivas_error CreateLCLDDecoder( { return error; } -#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR - psLCLDDecoder->psNoiseGen = NULL; /* CreateNoiseGen(); No noise fill for now*/ -#endif *psLCLDDecoder_out = psLCLDDecoder; return IVAS_ERR_OK; @@ -747,12 +741,6 @@ void DeleteLCLDDecoder( psLCLDDecoder->psPredictionDecoder = NULL; } -#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR - if ( psLCLDDecoder->psNoiseGen != NULL ) - { - DeleteNoiseGen( psLCLDDecoder->psNoiseGen ); - } -#endif free( psLCLDDecoder ); } @@ -771,12 +759,7 @@ static void ApplyRMSEnvelope( const int32_t iNumBands, const int32_t *piBandwidt static void ReplaceSign( const int32_t iNumBlocks, const int32_t iNumLCLDBands, int32_t **ppiSignReal, int32_t **ppiSignImag, float **ppfReal, float **ppfImag, const int32_t *piBandwidths ); -static void InvQuantizeSpectrum( const int32_t iNumGroups, const int32_t *piGroupLengths, const int32_t iNumBands, const int32_t *piBandwidths, int32_t **ppiAlloc, int32_t **ppiQReal, int32_t **ppiQImag, float **ppfReal, float **ppfImag -#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR - , - NoiseGen *psNoiseGen -#endif -); +static void InvQuantizeSpectrum( const int32_t iNumGroups, const int32_t *piGroupLengths, const int32_t iNumBands, const int32_t *piBandwidths, int32_t **ppiAlloc, int32_t **ppiQReal, int32_t **ppiQImag, float **ppfReal, float **ppfImag ); static void InvMSCoding( const int32_t iNumBlocks, const int32_t iNumBands, const int32_t *piBandwidths, const int32_t iMSMode, const int32_t *piMSFlags, const int32_t *piLRPhaseDiffs, const int32_t *piMSPredCoefs, float ***pppfReal, float ***pppfImag ); @@ -1032,12 +1015,7 @@ int32_t DecodeLCLDFrame( psLCLDDecoder->pppiAlloc[n], psLCLDDecoder->pppiQLCLDReal[n], psLCLDDecoder->pppiQLCLDImag[n], - pppfLCLDReal[n], pppfLCLDImag[n] -#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR - , - psLCLDDecoder->psNoiseGen -#endif - ); + pppfLCLDReal[n], pppfLCLDImag[n] ); ReplaceSign( psLCLDDecoder->iNumBlocks, psLCLDDecoder->iNumBands, psLCLDDecoder->pppiLCLDSignReal[n], @@ -1186,12 +1164,7 @@ static void InvQuantizeSpectrum( int32_t **ppiQReal, int32_t **ppiQImag, float **ppfReal, - float **ppfImag -#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR - , - NoiseGen *psNoiseGen /* Pass in NULL to switch off noise gen */ -#endif -) + float **ppfImag ) { int32_t b, k, n; int32_t iBlockOffest, iFBOffset; @@ -1226,18 +1199,6 @@ static void InvQuantizeSpectrum( iFBOffset++; } } -#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR - else if ( psNoiseGen != NULL ) - { - for ( m = 0; m < piBandwidths[b]; m++ ) - { - ppfReal[iBlockOffest][iFBOffset] = 0.7f * GetNoise( psNoiseGen ); - ppfImag[iBlockOffest][iFBOffset] = 0.7f * GetNoise( psNoiseGen ); - - iFBOffset++; - } - } -#endif else { iFBOffset += piBandwidths[b]; diff --git a/lib_isar/isar_lcld_prot.h b/lib_isar/isar_lcld_prot.h index 078eb13db47e4e37cc385798fc9eb32364558be3..4296ffc7e372df5ef5ebf01d2f5610aa9c20a7dd 100644 --- a/lib_isar/isar_lcld_prot.h +++ b/lib_isar/isar_lcld_prot.h @@ -164,36 +164,6 @@ int32_t CountMSBits( const int32_t *piMSPredCoef ); -#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR - -/*----------------------------------------------------------------------------------* - * NoiseGen prototypes - *----------------------------------------------------------------------------------*/ - -typedef struct NOISE_GEN -{ - int32_t iNoiseBufferLength; - int32_t iNoiseBufferMask; - int32_t iNoiseBufferIndex; - float *pfNoiseBuffer; -} NoiseGen; - -void DeleteNoiseGen( - NoiseGen *psNoiseGen -); - -inline float GetNoise( NoiseGen *psNoiseGen ) -{ - float fNoiseSample; - - fNoiseSample = psNoiseGen->pfNoiseBuffer[psNoiseGen->iNoiseBufferIndex]; - psNoiseGen->iNoiseBufferIndex++; - psNoiseGen->iNoiseBufferIndex &= psNoiseGen->iNoiseBufferMask; - - return fNoiseSample; -} - -#endif /*----------------------------------------------------------------------------------* * PereptualModel prototypes diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index e7d9e1c907fdf03dfe42924e7b0c10e387a52aa4..47719baf53b1d8ce8247b52cbc96712bb476335d 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -89,9 +89,6 @@ typedef struct const EFAP_WRAPPER *pEfapOutWrapper; const IVAS_REND_HeadRotData *pHeadRotData; const RENDER_CONFIG_HANDLE *hhRendererConfig; -#ifndef FIX_1494_SET_SPLITBFI_UNUSED - const int16_t *pSplitRendBFI; -#endif const SPLIT_REND_WRAPPER *pSplitRendWrapper; const COMBINED_ORIENTATION_HANDLE *pCombinedOrientationData; const IVAS_DefaultReverbSize *pSelectedRoomReverbSize; @@ -215,9 +212,6 @@ struct IVAS_REND EFAP_WRAPPER efapOutWrapper; IVAS_LSSETUP_CUSTOM_STRUCT customLsOut; -#ifndef FIX_1494_SET_SPLITBFI_UNUSED - int16_t splitRendBFI; -#endif SPLIT_REND_WRAPPER *splitRendWrapper; IVAS_REND_AudioBuffer splitRendEncBuffer; @@ -1240,9 +1234,6 @@ static rendering_context getRendCtx( ctx.pEfapOutWrapper = &hIvasRend->efapOutWrapper; ctx.pHeadRotData = &hIvasRend->headRotData; ctx.hhRendererConfig = &hIvasRend->hRendererConfig; -#ifndef FIX_1494_SET_SPLITBFI_UNUSED - ctx.pSplitRendBFI = &hIvasRend->splitRendBFI; -#endif ctx.pSplitRendWrapper = hIvasRend->splitRendWrapper; ctx.pCombinedOrientationData = &hIvasRend->hCombinedOrientationData; ctx.pSelectedRoomReverbSize = &hIvasRend->selectedRoomReverbSize; @@ -5032,27 +5023,6 @@ ivas_error IVAS_REND_DisableHeadRotation( } -#ifndef FIX_1494_SET_SPLITBFI_UNUSED - -/*-------------------------------------------------------------------* - * IVAS_REND_SetSplitRendBFI() - * - * - *-------------------------------------------------------------------*/ - -ivas_error IVAS_REND_SetSplitRendBFI( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - const int16_t bfi /* i : bad frame indicator */ -) -{ - hIvasRend->splitRendBFI = bfi; - - return IVAS_ERR_OK; -} - -#endif - - /*-------------------------------------------------------------------* * IVAS_REND_SetOrientationTrackingMode() * diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index a37fe00e40ae88ab23582be5f1b9bd4341c97b10..6f61d0d0f6db9574c32d05cd67a1476dc15d6adc 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -338,12 +338,6 @@ ivas_error IVAS_REND_SetReferenceVector( const IVAS_VECTOR3 refPos /* i : Reference position */ ); -#ifndef FIX_1494_SET_SPLITBFI_UNUSED -ivas_error IVAS_REND_SetSplitRendBFI( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - const int16_t bfi /* i : bad frame indicator */ -); -#endif ivas_error IVAS_REND_SetExternalOrientation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ diff --git a/lib_util/hrtf_file_reader.c b/lib_util/hrtf_file_reader.c index 907e04453bee2039a2c849fdb8c1f9bf4220341a..50337a27748676aac0e75b59633f99ba2047ea62 100644 --- a/lib_util/hrtf_file_reader.c +++ b/lib_util/hrtf_file_reader.c @@ -302,11 +302,7 @@ static ivas_error TDREND_LoadBSplineBinaryITD( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); } -#ifdef FIX_1495_INCORRECT_FREAD_CALL fread( &factor_Q, sizeof( int16_t ), 1, f_hrtf ); -#else - fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); -#endif q_scale = powf( 2.f, -1.f * factor_Q ); fread( v_tmp16, sizeof( int16_t ), modelITD->elevDim3 - 2, f_hrtf ); for ( j = 0; j < modelITD->elevDim3 - 2; j++ ) @@ -322,11 +318,7 @@ static ivas_error TDREND_LoadBSplineBinaryITD( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); } -#ifdef FIX_1495_INCORRECT_FREAD_CALL fread( &factor_Q, sizeof( int16_t ), 1, f_hrtf ); -#else - fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); -#endif q_scale = powf( 2.f, -1.f * factor_Q ); fread( v_tmp16, sizeof( int16_t ), ( modelITD->azimDim3 + 1 ) / 2 - 2, f_hrtf ); for ( j = 0; j < ( modelITD->azimDim3 + 1 ) / 2 - 2; j++ ) @@ -342,11 +334,7 @@ static ivas_error TDREND_LoadBSplineBinaryITD( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); } -#ifdef FIX_1495_INCORRECT_FREAD_CALL fread( &factor_Q, sizeof( int16_t ), 1, f_hrtf ); -#else - fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); -#endif q_scale = powf( 2.f, -1.f * factor_Q ); v_tmp16 = (int16_t *) malloc( tmp * sizeof( int16_t ) ); if ( v_tmp16 == NULL ) @@ -381,11 +369,7 @@ static ivas_error TDREND_LoadBSplineBinaryITD( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); } -#ifdef FIX_1495_INCORRECT_FREAD_CALL fread( &factor_Q, sizeof( int16_t ), 1, f_hrtf ); -#else - fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); -#endif q_scale = powf( 2.f, -1.f * factor_Q ); fread( v_tmp16, sizeof( int16_t ), tmp, f_hrtf ); for ( j = 0; j < tmp; j++ ) @@ -422,11 +406,7 @@ static ivas_error TDREND_LoadBSplineBinaryITD( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); } -#ifdef FIX_1495_INCORRECT_FREAD_CALL fread( &factor_Q, sizeof( int16_t ), 1, f_hrtf ); -#else - fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); -#endif q_scale = powf( 2.f, -1.f * factor_Q ); fread( v_tmp16, sizeof( int16_t ), tmp, f_hrtf ); for ( j = 0; j < tmp; j++ ) @@ -472,17 +452,9 @@ static ivas_error TDREND_LoadBSplineBinary( return IVAS_ERR_UNEXPECTED_NULL_POINTER; } -#ifdef FIX_1495_INCORRECT_FREAD_CALL fread( &factor_Q, sizeof( int16_t ), 1, f_hrtf ); -#else - fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); -#endif q_scale = powf( 2.f, -1.f * factor_Q ); -#ifdef FIX_1495_INCORRECT_FREAD_CALL fread( &tmp32, sizeof( int32_t ), 1, f_hrtf ); -#else - fread( &tmp32, 1, sizeof( int32_t ), f_hrtf ); -#endif HrFiltSet_p->latency_s = tmp32 * q_scale; model = &( HrFiltSet_p->ModelParams ); @@ -529,11 +501,7 @@ static ivas_error TDREND_LoadBSplineBinary( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); } -#ifdef FIX_1495_INCORRECT_FREAD_CALL fread( &factor_Q, sizeof( int16_t ), 1, f_hrtf ); -#else - fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); -#endif q_scale = powf( 2.f, -1.f * factor_Q ); fread( v_tmp16, sizeof( int16_t ), model->elevDim3 - 2, f_hrtf ); for ( j = 0; j < model->elevDim3 - 2; j++ ) @@ -561,11 +529,7 @@ static ivas_error TDREND_LoadBSplineBinary( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); } -#ifdef FIX_1495_INCORRECT_FREAD_CALL fread( &factor_Q, sizeof( int16_t ), 1, f_hrtf ); -#else - fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); -#endif q_scale = powf( 2.f, -1.f * factor_Q ); fread( v_tmp16, sizeof( int16_t ), ( model->azimDim3_dyn[i] + 1 ), f_hrtf ); for ( j = 0; j < model->azimDim3_dyn[i] + 1; j++ ) @@ -582,11 +546,7 @@ static ivas_error TDREND_LoadBSplineBinary( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); } -#ifdef FIX_1495_INCORRECT_FREAD_CALL fread( &factor_Q, sizeof( int16_t ), 1, f_hrtf ); -#else - fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); -#endif q_scale = powf( 2.f, -1.f * factor_Q ); fread( v_tmp16, sizeof( int16_t ), model->AlphaN * model->K, f_hrtf ); @@ -626,11 +586,7 @@ static ivas_error TDREND_LoadBSplineBinary( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); } -#ifdef FIX_1495_INCORRECT_FREAD_CALL fread( &factor_Q, sizeof( int16_t ), 1, f_hrtf ); -#else - fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); -#endif q_scale = powf( 2.f, -1.f * factor_Q ); v_tmp16 = (int16_t *) malloc( tmp * sizeof( int16_t ) ); if ( v_tmp16 == NULL ) @@ -682,11 +638,7 @@ static ivas_error TDREND_LoadBSplineBinary( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); } -#ifdef FIX_1495_INCORRECT_FREAD_CALL fread( &factor_Q, sizeof( int16_t ), 1, f_hrtf ); -#else - fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); -#endif q_scale = powf( 2.f, -1.f * factor_Q ); fread( v_tmp16, sizeof( int16_t ), tmp, f_hrtf ); for ( j = 0; j < tmp; j++ ) @@ -702,11 +654,7 @@ static ivas_error TDREND_LoadBSplineBinary( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); } -#ifdef FIX_1495_INCORRECT_FREAD_CALL fread( &factor_Q, sizeof( int16_t ), 1, f_hrtf ); -#else - fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); -#endif q_scale = powf( 2.f, -1.f * factor_Q ); fread( (int32_t *) model->EL_dyn, sizeof( int32_t ), model->AlphaN * HRTF_MODEL_N_SECTIONS, f_hrtf ); @@ -955,11 +903,7 @@ static ivas_error TDREND_MIX_LoadHRTF( /* try if it is old format for BE tests*/ fseek( f_hrtf, 0, SEEK_SET ); -#ifdef FIX_1495_INCORRECT_FREAD_CALL if ( fread( &tmp, sizeof( int16_t ), 1, f_hrtf ) == 0 ) -#else - if ( fread( &tmp, 1, sizeof( int16_t ), f_hrtf ) == 0 ) -#endif { header_check_result = IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF file reading" ); } @@ -1031,11 +975,7 @@ static ivas_error TDREND_MIX_LoadHRTF( if ( is_tdrend ) { -#ifdef FIX_1495_INCORRECT_FREAD_CALL if ( fread( &tmp, sizeof( int16_t ), 1, f_hrtf ) == 0 ) -#else - if ( fread( &tmp, 1, sizeof( int16_t ), f_hrtf ) == 0 ) -#endif { return IVAS_ERROR( IVAS_ERR_FAILED_FILE_READ, "Error in HRTF file reading" ); }