diff --git a/lib_com/ivas_fb_mixer.c b/lib_com/ivas_fb_mixer.c index d51f88943c96af6eb71490eb75acca0e1e3bbbfb..2b11a084052bef5f06d9ab698b6382b8cc99015c 100644 --- a/lib_com/ivas_fb_mixer.c +++ b/lib_com/ivas_fb_mixer.c @@ -726,19 +726,22 @@ void ivas_fb_mixer_process( *-----------------------------------------------------------------------------------------*/ void ivas_fb_mixer_get_in_out_mapping( - const IVAS_FB_CFG *fb_cfg, /* i : FB config. handle */ - const int16_t nchan_transport, /* i : number of transport channels */ - const int16_t enc_dec_flag, /* i : encoder or decoder flag */ - const int16_t *order, /* i : downmix order */ + const IVAS_FB_CFG *fb_cfg, /* i : FB config. handle */ +#ifndef REMOVE_UNUSED_FUNCTION + const int16_t nchan_transport, /* i : number of transport channels */ + const int16_t enc_dec_flag, /* i : encoder or decoder flag */ + const int16_t *order, /* i : downmix order */ +#endif int16_t in_out_mixer_map[IVAS_MAX_FB_MIXER_OUT_CH][IVAS_MAX_SPAR_FB_MIXER_IN_CH] /* i/o: mixing mapping */ ) { int16_t i, j; set_s( (int16_t *) in_out_mixer_map, 0, IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_SPAR_FB_MIXER_IN_CH ); - +#ifndef REMOVE_UNUSED_FUNCTION if ( enc_dec_flag == ENC ) { +#endif if ( fb_cfg->active_w_mixing ) { for ( i = 0; i < fb_cfg->num_out_chans; i++ ) @@ -757,6 +760,7 @@ void ivas_fb_mixer_get_in_out_mapping( in_out_mixer_map[i][0] = 1; } } +#ifndef REMOVE_UNUSED_FUNCTION } else { @@ -788,7 +792,7 @@ void ivas_fb_mixer_get_in_out_mapping( } } } - +#endif return; } diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 817ba618bebf046442cc8981acc0688b90ac66d0..06b5e86191c07198501a2c8c852f98ed73d6dfd9 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -110,12 +110,12 @@ ivas_error mct_enc_reconfigure( ivas_error ivas_sba_enc_reconfigure( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); - +#ifndef REMOVE_UNUSED_FUNCTION /*! r: maximum SBA metadata bit-budget */ int16_t ivas_sba_get_max_md_bits( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); - +#endif void destroy_sce_enc( SCE_ENC_HANDLE hSCE /* i/o: SCE encoder structure */ ); @@ -4163,8 +4163,10 @@ ivas_error ivas_sba_linear_renderer( const int16_t nchan_in, /* i : number of input ambisonics channels */ const int16_t nchan_ism, const AUDIO_CONFIG output_config, /* i : output audio configuration */ - const IVAS_OUTPUT_SETUP output_setup, /* i : output format setup */ - const float hoa_dec_mtx[] /* i : HOA decoding mtx */ + const IVAS_OUTPUT_SETUP output_setup /* i : output format setup */ +#ifndef REMOVE_UNUSED_FUNCTION + ,const float hoa_dec_mtx[] /* i : HOA decoding mtx */ +#endif ); void ivas_sba_mix_matrix_determiner( @@ -6034,9 +6036,11 @@ void ivas_fb_mixer_process( void ivas_fb_mixer_get_in_out_mapping( const IVAS_FB_CFG *fb_cfg, /* i : FB config. handle */ +#ifndef REMOVE_UNUSED_FUNCTION const int16_t nchan_transport, /* i : number of transport channels */ const int16_t enc_dec_flag, /* i : encoder or decoder flag */ const int16_t *order, /* i : downmix order */ +#endif int16_t in_out_mixer_map[IVAS_MAX_FB_MIXER_OUT_CH][IVAS_MAX_SPAR_FB_MIXER_IN_CH] /* i/o: mixing mapping */ ); diff --git a/lib_com/ivas_spar_com.c b/lib_com/ivas_spar_com.c index 90dc1b0a841bb6800a542fe593e97e2c057a9e00..d2ad98012f38dd1457ce1a93f75ae524b745bb31 100644 --- a/lib_com/ivas_spar_com.c +++ b/lib_com/ivas_spar_com.c @@ -251,18 +251,20 @@ int16_t ivas_get_sba_num_TCs( ) { int16_t table_idx, nchan_transport; - +#ifndef REMOVE_UNUSED_FUNCTION if ( ivas_total_brate == IVAS_SID_5k2 ) { nchan_transport = 1; } else { +#endif table_idx = ivas_get_spar_table_idx( ivas_total_brate, sba_order, SPAR_CONFIG_BW, NULL, NULL ); nchan_transport = ivas_spar_br_table_consts[table_idx].nchan_transport; +#ifndef REMOVE_UNUSED_FUNCTION } - +#endif return nchan_transport; } diff --git a/lib_com/options.h b/lib_com/options.h index 99ef133b39a7e5a4b58233eee8dd67d0538e295c..0d417a8f843db91830c40c1145c9e909c9e73e0d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -158,6 +158,7 @@ #define ROM_TO_RAM /*Dlb : ROM optimization in SR mode*/ #define FIX_712_713_SPLIT_REND_MASA_MC /*Dlb : Fix for issue 712 and 713*/ #endif +#define REMOVE_UNUSED_FUNCTION /* Dlb: Remove functions that are unhit/unused */ #define FIX_708_DPID_COMMAND_LINE /* issue 708: sanity checks for '-dpid' command-line */ @@ -169,6 +170,7 @@ /* #################### End BE switches ################################## */ + /* #################### Start NON-BE switches ############################ */ /* any switch which is non-be wrt selection floating point code */ /* all switches in this category should start with "NONBE_" */ diff --git a/lib_dec/ivas_agc_dec.c b/lib_dec/ivas_agc_dec.c index 56a679de596ff92bddf09b764a8cb404b51a320e..c1ddd8c05d0e33f89779920ab6ced24217346388 100644 --- a/lib_dec/ivas_agc_dec.c +++ b/lib_dec/ivas_agc_dec.c @@ -255,6 +255,7 @@ void ivas_agc_read_bits( /* read AGC parameters */ if ( AGC_flag == 1 ) { +#ifndef REMOVE_UNUSED_FUNCTION if ( n_channels > 1 ) { for ( i = 0; i < n_channels; i++ ) @@ -264,9 +265,11 @@ void ivas_agc_read_bits( } else { +#endif per_ch_bit[0] = 1; +#ifndef REMOVE_UNUSED_FUNCTION } - +#endif assert( AGC_BITS_PER_CH == ( pState->agc_com.betaE + 1 ) ); for ( i = 0; i < n_channels; i++ ) { diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index ee08ba17df05f7e4a2694bf6a1d0652b5e55fea0..95a2823dddac8c9cf2f91f21f4fbc675516f65e9 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -442,7 +442,14 @@ ivas_error ivas_dec( { if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC ) { - if ( ( error = ivas_sba_linear_renderer( p_output, output_frame, nchan_remapped, 0, output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_sba_linear_renderer( p_output, output_frame, nchan_remapped, + 0, + output_config, st_ivas->hOutSetup +#ifndef REMOVE_UNUSED_FUNCTION + , + st_ivas->hoa_dec_mtx +#endif + ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 9244cc128406e481020d79260cd8d4228fc8bb59..8768d763002e667d143b7d1294803db2451a5ac3 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -310,11 +310,12 @@ static ivas_error ivas_dirac_rend_config( /* Directional and diffuses components in SHD */ /* Diffuseness components up to 1st order */ hDirACRend->num_outputs_diff = ( min( hDirACRend->hOutSetup.ambisonics_order, 1 ) + 1 ) * ( min( hDirACRend->hOutSetup.ambisonics_order, 1 ) + 1 ); +#ifndef REMOVE_UNUSED_FUNCTION if ( ( st_ivas->ivas_format == SBA_FORMAT ) && ( ivas_total_brate >= IVAS_96k ) && ( hDirACRend->hOutSetup.ambisonics_order > 1 ) && ( nchan_transport < 4 ) ) { hDirACRend->num_outputs_diff += 2; /* Add 2nd-order planar components for HRs */ } - +#endif hDirACRend->num_outputs_dir = ivas_sba_get_nchan( hDirACRend->hOutSetup.ambisonics_order, 0 ); } else if ( hDirACRend->synthesisConf == DIRAC_SYNTHESIS_PSD_SHD ) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 5d17cb4d8bac0b1434e9f40a63f2d3c0a2a8f41c..55ee06e676aab8b9a4da2573c05b11831984c1d7 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1124,7 +1124,14 @@ ivas_error ivas_jbm_dec_render( mvr2r( st_ivas->hTcBuffer->tc[n] + st_ivas->hTcBuffer->n_samples_rendered, p_output[n], *nSamplesRendered ); } - if ( ( error = ivas_sba_linear_renderer( p_output, *nSamplesRendered, nchan_remapped, 0, output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_sba_linear_renderer( p_output, *nSamplesRendered, nchan_remapped, + 0, + output_config, st_ivas->hOutSetup +#ifndef REMOVE_UNUSED_FUNCTION + , + st_ivas->hoa_dec_mtx +#endif + ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_dec/ivas_lfe_dec.c b/lib_dec/ivas_lfe_dec.c index 2641a32ae53ac67383b12ce01040af7672a478b8..25ab513af5d6c0e78da88bf0013a7185604ab9da 100644 --- a/lib_dec/ivas_lfe_dec.c +++ b/lib_dec/ivas_lfe_dec.c @@ -357,7 +357,9 @@ ivas_error ivas_create_lfe_dec( { float low_pass_delay_dec_out, block_offset_s; int16_t filt_order, output_frame; +#ifndef REMOVE_UNUSED_FUNCTION const float *filt_coeff; +#endif LFE_DEC_HANDLE hLFE; float lfe_addl_delay_s; int16_t i, j; @@ -402,7 +404,7 @@ ivas_error ivas_create_lfe_dec( hLFE->lfe_block_delay_s = ( IVAS_LFE_FADE_NS / 1000000000.f ) + ivas_lfe_lpf_delay[IVAS_FILTER_ORDER_4 - 3]; block_offset_s = BLOCK_OFFSET_MS * 0.001f; - +#ifndef REMOVE_UNUSED_FUNCTION if ( ( block_offset_s - hLFE->lfe_block_delay_s ) >= ivas_lfe_lpf_delay[IVAS_FILTER_ORDER_4 - 3] ) { filt_order = IVAS_FILTER_ORDER_4; @@ -415,8 +417,10 @@ ivas_error ivas_create_lfe_dec( } else { +#endif filt_order = 0; low_pass_delay_dec_out = 0; +#ifndef REMOVE_UNUSED_FUNCTION } if ( filt_order > 0 ) @@ -427,9 +431,11 @@ ivas_error ivas_create_lfe_dec( } else { +#endif hLFE->filter_state.order = filt_order; +#ifndef REMOVE_UNUSED_FUNCTION } - +#endif hLFE->lfe_block_delay_s = hLFE->lfe_block_delay_s + low_pass_delay_dec_out; hLFE->lfe_prior_buf_len = NS2SA( output_Fs, IVAS_LFE_FADE_NS ); diff --git a/lib_dec/ivas_qmetadata_dec.c b/lib_dec/ivas_qmetadata_dec.c index 462e8e3c451fddae85bb6aad4fd689e5a11388ce..3fe570e8d455c68ffc9efa89cf3ec6574f341eb6 100644 --- a/lib_dec/ivas_qmetadata_dec.c +++ b/lib_dec/ivas_qmetadata_dec.c @@ -88,9 +88,9 @@ static int16_t ivas_diffuseness_huff_ec_decode( const uint16_t *bitstream, int16 static int16_t read_GR_min_removed_data( uint16_t *bitstream, int16_t *p_bit_pos, const int16_t *no_cv_vec, const int16_t no_data, int16_t *decoded_idx, const int16_t no_symb ); static int16_t decode_fixed_rate_composed_index_coherence( uint16_t *bitstream, int16_t *p_bit_pos, const int16_t no_bands, int16_t *no_cv_vec, uint16_t *decoded_index, const int16_t no_symb ); - +#ifndef REMOVE_UNUSED_FUNCTION static int16_t ivas_qmetadata_entropy_decode_diffuseness_hr( uint16_t *bitstream, int16_t *index, IVAS_QDIRECTION *q_direction, uint16_t *diffuseness_index_max_ec_frame ); - +#endif static int16_t ivas_qmetadata_entropy_decode_diffuseness_hr_512( uint16_t *bitstream, int16_t *index, IVAS_QDIRECTION *q_direction ); static int16_t ivas_qmetadata_raw_decode_dir_512( IVAS_QDIRECTION *q_direction, uint16_t *bitstream, int16_t *index, const int16_t nbands, const int16_t start_band, const SPHERICAL_GRID_DATA *sph_grid16 ); @@ -1570,7 +1570,7 @@ static int16_t ivas_qmetadata_entropy_decode_diffuseness( return ( index_start - *index ); } - +#ifndef REMOVE_UNUSED_FUNCTION /*-------------------------------------------------------------------* * ivas_qmetadata_entropy_decode_diffuseness_hr() * @@ -1651,7 +1651,7 @@ static int16_t ivas_qmetadata_entropy_decode_diffuseness_hr( return ( index_start - *index ); } - +#endif /*-------------------------------------------------------------------* * ivas_qmetadata_entropy_decode_diffuseness_hr_512() * diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index c4c2d737653b412e4fe8615010f0603dc48df1ec..7b2b73977d6c2d0e754a17b1ff45812591478d0b 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -872,8 +872,9 @@ ivas_error ivas_sba_dec_render( SPAR_DEC_HANDLE hSpar; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; float *output_f_local[MAX_OUTPUT_CHANNELS]; +#ifndef REMOVE_UNUSED_FUNCTION ivas_error error; - +#endif hSpar = st_ivas->hSpar; hSpatParamRendCom = st_ivas->hSpatParamRendCom; nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); @@ -917,10 +918,14 @@ ivas_error ivas_sba_dec_render( if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC ) { - if ( ( error = ivas_sba_linear_renderer( output_f, *nSamplesRendered, st_ivas->hIntSetup.nchan_out_woLFE, 0, st_ivas->hDecoderConfig->output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ) ) != IVAS_ERR_OK ) - { - return error; - } + ivas_sba_linear_renderer( output_f, *nSamplesRendered, st_ivas->hIntSetup.nchan_out_woLFE, + 0, + st_ivas->hDecoderConfig->output_config, st_ivas->hOutSetup +#ifndef REMOVE_UNUSED_FUNCTION + , + st_ivas->hoa_dec_mtx +#endif + ); } if ( st_ivas->hDirAC != NULL && hSpar->slots_rendered == hSpar->num_slots ) diff --git a/lib_dec/ivas_sba_rendering_internal.c b/lib_dec/ivas_sba_rendering_internal.c index f685dc8ef6cc71e095bb9610656171d7c60db7ba..37635b0810259bd9b60058ae6782b23a5b95b941 100644 --- a/lib_dec/ivas_sba_rendering_internal.c +++ b/lib_dec/ivas_sba_rendering_internal.c @@ -496,7 +496,12 @@ ivas_error ivas_sba_upmixer_renderer( output_f[ch] = output[ch]; } - if ( ( error = ivas_sba_linear_renderer( output_f, output_frame, st_ivas->hIntSetup.nchan_out_woLFE, st_ivas->nchan_ism, output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_sba_linear_renderer( output_f, output_frame, st_ivas->hIntSetup.nchan_out_woLFE, st_ivas->nchan_ism, output_config, st_ivas->hOutSetup +#ifndef REMOVE_UNUSED_FUNCTION + , + st_ivas->hoa_dec_mtx +#endif + ) ) != IVAS_ERR_OK ) { return error; } @@ -506,7 +511,7 @@ ivas_error ivas_sba_upmixer_renderer( return IVAS_ERR_OK; } - +#ifndef REMOVE_UNUSED_FUNCTION /*-------------------------------------------------------------------* * ivas_sba_mtx_mult() * @@ -566,7 +571,7 @@ static void ivas_sba_mtx_mult( return; } - +#endif /*-------------------------------------------------------------------* * ivas_sba_linear_renderer() * @@ -578,13 +583,18 @@ ivas_error ivas_sba_linear_renderer( const int16_t output_frame, /* i : output frame length per channel */ const int16_t nchan_in, /* i : number of input ambisonics channels */ const int16_t nchan_ism, - const AUDIO_CONFIG output_config, /* i : output audio configuration */ - const IVAS_OUTPUT_SETUP output_setup, /* i : output format setup */ - const float hoa_dec_mtx[] /* i : HOA decoding mtx */ + const AUDIO_CONFIG output_config, /* i : output audio configuration */ + const IVAS_OUTPUT_SETUP output_setup /* i : output format setup */ +#ifndef REMOVE_UNUSED_FUNCTION + , + const float hoa_dec_mtx[] /* i : HOA decoding mtx */ +#endif ) { int16_t i; +#ifndef REMOVE_UNUSED_FUNCTION float dmx_l; +#endif int16_t nchan_hoa; ivas_error error; @@ -604,6 +614,7 @@ ivas_error ivas_sba_linear_renderer( switch ( output_config ) { +#ifndef REMOVE_UNUSED_FUNCTION case IVAS_AUDIO_CONFIG_MONO: /* If stereo DMX, MONO = W = Cardioids L + R*/ if ( nchan_in == 2 ) @@ -638,6 +649,7 @@ ivas_error ivas_sba_linear_renderer( case IVAS_AUDIO_CONFIG_LS_CUSTOM: ivas_sba_mtx_mult( output_f, output_frame, nchan_hoa, output_setup, hoa_dec_mtx ); break; +#endif case IVAS_AUDIO_CONFIG_FOA: /* Ambisonics output, order: 1 */ case IVAS_AUDIO_CONFIG_HOA2: /* Ambisonics output, order: 2 */ case IVAS_AUDIO_CONFIG_HOA3: /* Ambisonics output, order: 3 */ diff --git a/lib_dec/ivas_spar_md_dec.c b/lib_dec/ivas_spar_md_dec.c index 682f7fd29e1db449d6d9139a5c12e984134016de..d87aafac2761a5ae4c841e41016e3f701e714b62 100644 --- a/lib_dec/ivas_spar_md_dec.c +++ b/lib_dec/ivas_spar_md_dec.c @@ -2238,7 +2238,9 @@ static void ivas_parse_parameter_bitstream_dtx( int16_t idx; float pr_min_max[2]; int16_t pr_q_lvls, pr, pd, pd_q_lvls, pr_pd_bits; +#ifndef REMOVE_UNUSED_FUNCTION int16_t pr_q_lvls1, pr_q_lvls2, pr_idx1, pr_idx2, pr_pr_bits; +#endif int16_t zero_pad_bits, sid_bits_len; sid_bits_len = st0->next_bit_pos; @@ -2262,8 +2264,10 @@ static void ivas_parse_parameter_bitstream_dtx( if ( pr_idx_1 != 0 || pd_idx_1 != 0 || pr_idx_2 != 0 || pd_idx_2 != 0 ) { +#ifndef REMOVE_UNUSED_FUNCTION if ( pr_idx_1 == 0 || pr_idx_2 == 0 ) { +#endif pr_q_lvls = dtx_pr_real_q_levels[ndm - 1][pd_idx_1 - 1]; if ( ( j + 1 ) > ndec ) @@ -2295,6 +2299,7 @@ static void ivas_parse_parameter_bitstream_dtx( } pSpar_md->band_coeffs_idx[i].pred_index_re[pd_idx_1 - 1] = pr; +#ifndef REMOVE_UNUSED_FUNCTION } else { @@ -2319,6 +2324,7 @@ static void ivas_parse_parameter_bitstream_dtx( pSpar_md->band_coeffs_idx[i].pred_index_re[pr_idx_1 - 1] = pr_idx1; pSpar_md->band_coeffs_idx[i].pred_index_re[pr_idx_2 - 1] = pr_idx2; } +#endif } } } diff --git a/lib_enc/ivas_qmetadata_enc.c b/lib_enc/ivas_qmetadata_enc.c index 9f48c553921673d9a71eb3c4583920fe2be90259..2233d16489f7e35a655846cfdbda8d19669b89ae 100644 --- a/lib_enc/ivas_qmetadata_enc.c +++ b/lib_enc/ivas_qmetadata_enc.c @@ -114,17 +114,17 @@ static int16_t write_2dir_info( BSTR_ENC_HANDLE hMetaData, uint8_t *twoDirBands, static void transform_azimuth_dir2( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *dir2_bands ); static int16_t calc_var_azi( const IVAS_QDIRECTION *q_direction, const int16_t diffuseness_index_max_ec_frame, const float avg_azimuth, float *avg_azimuth_out ); - +#ifndef REMOVE_UNUSED_FUNCTION static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *needed_bits, int16_t *nbits_diff, int16_t *dfRatioBits, const int16_t bits_dir_hr ); - +#endif static int16_t ivas_qmetadata_entropy_encode_diffuseness_hr( BSTR_ENC_HANDLE hMetaData, IVAS_QDIRECTION *q_direction, uint16_t *diffuseness_index_max_ec_frame ); static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr_512( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *needed_bits, const int16_t bits_dir_hr, BSTR_ENC_HANDLE hMetaData ); static int16_t encode_surround_coherence_hr( IVAS_QMETADATA *hQMetaData, BSTR_ENC_HANDLE hMetaData ); - +#ifndef REMOVE_UNUSED_FUNCTION static void ivas_qmetadata_reorder_2dir_bands_hr( IVAS_QMETADATA_HANDLE hQMetaData ); - +#endif static int16_t ivas_qmetadata_quantize_coherence_hr_512( IVAS_QMETADATA *hQMetaData, const int16_t idx_d, const int16_t all_coherence_zero, BSTR_ENC_HANDLE hMetaData, const int16_t bits_coh ); static int16_t write_stream_dct_coeffs_omasa( int16_t *q_idx, const int16_t len_stream, BSTR_ENC_HANDLE hMetaData, const int16_t first_line, const int16_t low_bitrate_mode ); @@ -1361,7 +1361,7 @@ int16_t quantize_direction2D( return idx_sph; } - +#ifndef REMOVE_UNUSED_FUNCTION /*------------------------------------------------------------------------- * ivas_qmetadata_quantize_diffuseness_nrg_ratios() * @@ -1506,7 +1506,7 @@ static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr( return; } - +#endif static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr_512( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *needed_bits, @@ -5834,7 +5834,7 @@ static void ivas_qmetadata_reorder_2dir_bands( return; } - +#ifndef REMOVE_UNUSED_FUNCTION /*-------------------------------------------------------------------* * ivas_qmetadata_reorder_2dir_bands_hr() * @@ -5892,7 +5892,7 @@ static void ivas_qmetadata_reorder_2dir_bands_hr( return; } - +#endif /*-------------------------------------------------------------------* * write_2dir_info() diff --git a/lib_enc/ivas_sba_enc.c b/lib_enc/ivas_sba_enc.c index 011cb3aded124d3657eb8ea437c6da79060329bc..0798f8bbeefbe517ccdcc353c3cf821c9bd60af9 100644 --- a/lib_enc/ivas_sba_enc.c +++ b/lib_enc/ivas_sba_enc.c @@ -262,7 +262,7 @@ ivas_error ivas_sba_enc_reconfigure( return error; } - +#ifndef REMOVE_UNUSED_FUNCTION /*-------------------------------------------------------------------* * ivas_sba_get_max_md_bits() * @@ -294,3 +294,4 @@ int16_t ivas_sba_get_max_md_bits( return max_md_bits; } +#endif diff --git a/lib_enc/ivas_spar_encoder.c b/lib_enc/ivas_spar_encoder.c index 3617390c0c09ab71a50d9ab25c30fde346f242fd..e4df2995532052fa9f605853051dc53a02a24816 100644 --- a/lib_enc/ivas_spar_encoder.c +++ b/lib_enc/ivas_spar_encoder.c @@ -784,7 +784,15 @@ static ivas_error ivas_spar_enc_process( * FB mixer *-----------------------------------------------------------------------------------------*/ - ivas_fb_mixer_get_in_out_mapping( hSpar->hFbMixer->fb_cfg, nchan_transport, ENC, remix_order_set[hSpar->hMdEnc->spar_md_cfg.remix_unmix_order], in_out_mixer_map ); + ivas_fb_mixer_get_in_out_mapping( hSpar->hFbMixer->fb_cfg, +#ifndef REMOVE_UNUSED_FUNCTION + nchan_transport, + + ENC, + + remix_order_set[hSpar->hMdEnc->spar_md_cfg.remix_unmix_order], +#endif + in_out_mixer_map ); #ifdef DEBUG_SBA_MD_DUMP { diff --git a/lib_enc/ivas_spar_md_enc.c b/lib_enc/ivas_spar_md_enc.c index 8b21c62a6bcac8808be1257929729bd50eb03a02..d8348c5f67a4fda12476119c754c40521f796620 100644 --- a/lib_enc/ivas_spar_md_enc.c +++ b/lib_enc/ivas_spar_md_enc.c @@ -1719,8 +1719,10 @@ static void ivas_write_parameter_bitstream_dtx( if ( pr_idx_1 != 0 || pd_idx_1 != 0 || pr_idx_2 != 0 || pd_idx_2 != 0 ) { +#ifndef REMOVE_UNUSED_FUNCTION if ( pr_idx_1 == 0 || pr_idx_2 == 0 ) { +#endif pr_q_lvls = dtx_pr_real_q_levels[ndm - 1][pd_idx_1 - 1]; pr = pSpar_md->band_coeffs_idx[i].pred_index_re[pd_idx_1 - 1]; @@ -1748,6 +1750,7 @@ static void ivas_write_parameter_bitstream_dtx( value = (uint16_t) ( pr * pd_q_lvls + pd ); push_next_indice( hMetaData, value, pr_pd_bits ); +#ifndef REMOVE_UNUSED_FUNCTION } else { @@ -1775,6 +1778,7 @@ static void ivas_write_parameter_bitstream_dtx( push_next_indice( hMetaData, value, pr_pr_bits ); } +#endif } } }