From 54045e89d1ef9d17f84c5185220719f9d7eb9893 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 14 Jul 2022 08:33:04 +0200 Subject: [PATCH 01/10] [cleanup] accept FIX_IVAS_180_PLC_SIGNAL_LAST_OVLP_IN_TCX10 --- lib_com/options.h | 1 - lib_com/prot.h | 2 -- lib_dec/dec_prm.c | 8 -------- lib_dec/ivas_mdct_core_dec.c | 8 -------- lib_dec/ivas_tcx_core_dec.c | 4 ---- lib_enc/ivas_mdct_core_enc.c | 4 ---- lib_enc/ivas_tcx_core_enc.c | 6 ------ 7 files changed, 33 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 2cf1458b54..baf971223d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -144,7 +144,6 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ /*#define FIX_IVAS_185_MDCT_ST_PLC_FADEOUT*/ /* IVAS-185 fix bug in TCX-PLC fadeout for MDCT-Stereo and improve fadeout by fading to background noise instead of white noise */ -#define FIX_IVAS_180_PLC_SIGNAL_LAST_OVLP_IN_TCX10 /* IVAS-180 write last overlap mode in TCX10 frames to allow for correct TCX10/TCX5 subframe decomposition in TCX10 frames after a lost frame */ /*#define FIX_I1_113*/ /* under review : MCT bit distribution optimization for SBA high bitrates*/ #define FIX_1_CUSTOM_LS /* fix bug 1-ivas-internal-error-in-decoder-for-custom-loudspeaker-format-with-sba-input-at-24-4kbps */ diff --git a/lib_com/prot.h b/lib_com/prot.h index 4357e98284..d7e42cec54 100644 --- a/lib_com/prot.h +++ b/lib_com/prot.h @@ -6784,9 +6784,7 @@ void getTCXMode( void getTCXWindowing( const int16_t core, /* i : current frame mode */ const int16_t last_core, /* i : last frame mode */ -#ifdef FIX_IVAS_180_PLC_SIGNAL_LAST_OVLP_IN_TCX10 const int16_t element_mode, -#endif TCX_CONFIG_HANDLE hTcxCfg, /* i/o: TCX configuration handle */ Decoder_State *st0 /* i : bitstream */ ); diff --git a/lib_dec/dec_prm.c b/lib_dec/dec_prm.c index c6d2b1a439..d004091f48 100644 --- a/lib_dec/dec_prm.c +++ b/lib_dec/dec_prm.c @@ -214,9 +214,7 @@ void getTCXMode( void getTCXWindowing( const int16_t core, /* i : current core */ const int16_t last_core, /* i : last frame core */ -#ifdef FIX_IVAS_180_PLC_SIGNAL_LAST_OVLP_IN_TCX10 const int16_t element_mode, -#endif TCX_CONFIG_HANDLE hTcxCfg, /* i/o: TCX configuration handle */ Decoder_State *st0 /* i : bitstream */ ) @@ -262,7 +260,6 @@ void getTCXWindowing( } } -#ifdef FIX_IVAS_180_PLC_SIGNAL_LAST_OVLP_IN_TCX10 if ( element_mode != EVS_MONO && core == TCX_10_CORE ) { /* also read last overlap */ @@ -275,7 +272,6 @@ void getTCXWindowing( hTcxCfg->tcx_last_overlap_mode = overlap_code; } -#endif return; } @@ -840,11 +836,7 @@ void dec_prm( if ( !st->use_partial_copy ) { -#ifdef FIX_IVAS_180_PLC_SIGNAL_LAST_OVLP_IN_TCX10 getTCXWindowing( st->core, st->last_core, st->element_mode, st->hTcxCfg, st ); -#else - getTCXWindowing( st->core, st->last_core, st->hTcxCfg, st ); -#endif if ( st->enableGplc ) /* SIDE INFO. DECODING */ { diff --git a/lib_dec/ivas_mdct_core_dec.c b/lib_dec/ivas_mdct_core_dec.c index 0d340ca9f6..b86cc6aa95 100644 --- a/lib_dec/ivas_mdct_core_dec.c +++ b/lib_dec/ivas_mdct_core_dec.c @@ -154,11 +154,7 @@ static void dec_prm_tcx_sidebits( st->last_core_from_bs = get_next_indice( st0, 1 ); /* ACELP -> TCX_10 transitions are forbidden */ -#ifdef FIX_IVAS_180_PLC_SIGNAL_LAST_OVLP_IN_TCX10 /* put under this switch for documentation, even though it is actually a general bug */ if ( st->core == TCX_10_CORE && st->last_core == ACELP_CORE ) -#else - if ( st->core == TCX_10_CORE && st->last_core == ACELP_CORE && st->last_total_brate == FRAME_NO_DATA ) -#endif { st->last_core = TCX_20_CORE; } @@ -169,11 +165,7 @@ static void dec_prm_tcx_sidebits( st->last_core_from_bs = st->last_core; } -#ifdef FIX_IVAS_180_PLC_SIGNAL_LAST_OVLP_IN_TCX10 getTCXWindowing( st->core, st->last_core, st->element_mode, st->hTcxCfg, st0 ); -#else - getTCXWindowing( st->core, st->last_core, st->hTcxCfg, st0 ); -#endif st->hTcxDec->kernel_type[0] = st->hTcxDec->kernel_type[1] = MDCT_IV; if ( st->element_mode == IVAS_CPE_MDCT && st->mct_chan_mode != MCT_CHAN_MODE_LFE ) diff --git a/lib_dec/ivas_tcx_core_dec.c b/lib_dec/ivas_tcx_core_dec.c index 1fc0de4a88..e3462f21bc 100644 --- a/lib_dec/ivas_tcx_core_dec.c +++ b/lib_dec/ivas_tcx_core_dec.c @@ -898,11 +898,7 @@ static void dec_prm_tcx( { if ( st->element_mode != IVAS_CPE_MDCT ) { -#ifdef FIX_IVAS_180_PLC_SIGNAL_LAST_OVLP_IN_TCX10 getTCXWindowing( st->core, st->last_core, st->element_mode, st->hTcxCfg, st ); -#else - getTCXWindowing( st->core, st->last_core, st->hTcxCfg, st ); -#endif } st->flagGuidedAcelp = 0; diff --git a/lib_enc/ivas_mdct_core_enc.c b/lib_enc/ivas_mdct_core_enc.c index 98b3a354c5..6385d20b2d 100644 --- a/lib_enc/ivas_mdct_core_enc.c +++ b/lib_enc/ivas_mdct_core_enc.c @@ -89,15 +89,11 @@ static void enc_prm_pre_mdct( /* write last_core for core switching and error concealment */ push_next_indice( hBstr, st->last_core != ACELP_CORE, 1 ); -#ifdef FIX_IVAS_180_PLC_SIGNAL_LAST_OVLP_IN_TCX10 writeTCXWindowing( hBstr, st->hTcxCfg->tcx_curr_overlap_mode ); if ( st->core == TCX_10_CORE ) { writeTCXWindowing( hBstr, st->hTcxCfg->tcx_last_overlap_mode ); } -#else - writeTCXWindowing( hBstr, st->hTcxCfg->tcx_curr_overlap_mode ); -#endif if ( st->element_mode == IVAS_CPE_MDCT && st->mct_chan_mode != MCT_CHAN_MODE_LFE ) { diff --git a/lib_enc/ivas_tcx_core_enc.c b/lib_enc/ivas_tcx_core_enc.c index fa0851a52a..2cd7a66b04 100644 --- a/lib_enc/ivas_tcx_core_enc.c +++ b/lib_enc/ivas_tcx_core_enc.c @@ -249,9 +249,7 @@ void stereo_tcx_core_enc( { st->core = TCX_10_CORE; n_subframes = 2; -#ifdef FIX_IVAS_180_PLC_SIGNAL_LAST_OVLP_IN_TCX10 nbits_header += ( st->hTcxCfg->tcx_last_overlap_mode == HALF_OVERLAP || st->hTcxCfg->tcx_last_overlap_mode == MIN_OVERLAP ) ? 2 : 1; -#endif } else if ( hTcxEnc->tcxMode == TCX_20 ) { @@ -280,15 +278,11 @@ void stereo_tcx_core_enc( push_next_indice( hBstr, ( st->last_core != ACELP_CORE || st->core == TCX_10_CORE ), 1 ); /* write TCX overlap mode (1 bit: full, 2 bits: half or no overlap) */ -#ifdef FIX_IVAS_180_PLC_SIGNAL_LAST_OVLP_IN_TCX10 writeTCXWindowing( hBstr, st->hTcxCfg->tcx_curr_overlap_mode ); if ( st->core == TCX_10_CORE ) { writeTCXWindowing( hBstr, st->hTcxCfg->tcx_last_overlap_mode ); } -#else - writeTCXWindowing( hBstr, st->hTcxCfg->tcx_curr_overlap_mode ); -#endif assert( nbits_header == ( hBstr->nb_bits_tot - nbits_start ) ); #ifdef DEBUG_MODE_TCX -- GitLab From 92f7e4dcfc3e12528bcc1afff881c07c1e794ba5 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 14 Jul 2022 08:34:27 +0200 Subject: [PATCH 02/10] [cleanup] accept FIX_1_CUSTOM_LS --- lib_com/options.h | 1 - lib_dec/ivas_spar_foa_dec.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index baf971223d..967cbb3000 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -146,7 +146,6 @@ /*#define FIX_IVAS_185_MDCT_ST_PLC_FADEOUT*/ /* IVAS-185 fix bug in TCX-PLC fadeout for MDCT-Stereo and improve fadeout by fading to background noise instead of white noise */ /*#define FIX_I1_113*/ /* under review : MCT bit distribution optimization for SBA high bitrates*/ -#define FIX_1_CUSTOM_LS /* fix bug 1-ivas-internal-error-in-decoder-for-custom-loudspeaker-format-with-sba-input-at-24-4kbps */ #define FIX_TDREND_STANDALONE /* Fix for TD standalone renderer (broken after update of hHrtfTD pointer and addition of hRenderConfig */ #define FIX_MDCT_KERNEL_RATE_SWITCHING_PLC /* force kernel that can handle ACELP -> TCX transition frame lengths for transition frames in decoder */ #define FIX_SBA_CLEAN_UP_OPT /* Fix for tickets #6, #10, #17 and #20 */ diff --git a/lib_dec/ivas_spar_foa_dec.c b/lib_dec/ivas_spar_foa_dec.c index 55460493c6..6678f2d0da 100644 --- a/lib_dec/ivas_spar_foa_dec.c +++ b/lib_dec/ivas_spar_foa_dec.c @@ -1182,11 +1182,7 @@ void ivas_spar_dec_upmixer( ivas_spar_get_skip_mat( hSpar, numch_out, numch_in, num_spar_bands, b_skip_mat ); /* this can be precomputed based on bitrate and format*/ #endif -#ifdef FIX_1_CUSTOM_LS numch_out_dirac = st_ivas->hDecoderConfig->nchan_out; -#else - numch_out_dirac = audioCfg2channels( st_ivas->hDecoderConfig->output_config ); -#endif for ( int16_t i_sf = 0; i_sf < MAX_PARAM_SPATIAL_SUBFRAMES; i_sf++ ) { -- GitLab From c52f58700f5cdf2d4fd8b5633ff222b6b09dab65 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 14 Jul 2022 08:37:09 +0200 Subject: [PATCH 03/10] [cleanup] accept FIX_TDREND_STANDALONE --- lib_com/options.h | 1 - lib_dec/ivas_objectRenderer.c | 23 ------------------- .../renderer_standalone.c | 8 ------- 3 files changed, 32 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 967cbb3000..3f775087ca 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -146,7 +146,6 @@ /*#define FIX_IVAS_185_MDCT_ST_PLC_FADEOUT*/ /* IVAS-185 fix bug in TCX-PLC fadeout for MDCT-Stereo and improve fadeout by fading to background noise instead of white noise */ /*#define FIX_I1_113*/ /* under review : MCT bit distribution optimization for SBA high bitrates*/ -#define FIX_TDREND_STANDALONE /* Fix for TD standalone renderer (broken after update of hHrtfTD pointer and addition of hRenderConfig */ #define FIX_MDCT_KERNEL_RATE_SWITCHING_PLC /* force kernel that can handle ACELP -> TCX transition frame lengths for transition frames in decoder */ #define FIX_SBA_CLEAN_UP_OPT /* Fix for tickets #6, #10, #17 and #20 */ #define FIX_28_SBA_LS_RENDER /* FhG: fix for discontinuities in SBA LS renderer */ diff --git a/lib_dec/ivas_objectRenderer.c b/lib_dec/ivas_objectRenderer.c index 0c3233880e..05e617b3bf 100644 --- a/lib_dec/ivas_objectRenderer.c +++ b/lib_dec/ivas_objectRenderer.c @@ -302,7 +302,6 @@ ivas_error ObjRenderIVASFrame( TDREND_MIX_SRC_SetPlayState( st_ivas->hBinRendererTd, nS, TDREND_PLAYSTATUS_PLAYING ); } } -#ifdef FIX_TDREND_STANDALONE if ( st_ivas->hRenderConfig != NULL ) /* Renderer Configuration not enabled in TD standalone renderer */ { if ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) @@ -317,23 +316,9 @@ ivas_error ObjRenderIVASFrame( } } } -#else - if ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) - { - if ( st_ivas->ini_frame == 0 ) - { - ivas_reverb_open( &st_ivas->hCrend->hReverb, NULL, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ); - } - for ( subframe_idx = 0; subframe_idx < 4; subframe_idx++ ) - { - ivas_reverb_process( st_ivas->hCrend->hReverb, st_ivas->transport_config, 0, output, reverb_signal, subframe_idx ); - } - } -#endif /* Call the renderer */ TDREND_GetMix( st_ivas->hBinRendererTd, output, output_frame, st_ivas->hDecoderConfig->output_Fs ); -#ifdef FIX_TDREND_STANDALONE if ( st_ivas->hRenderConfig != NULL ) /* Renderer Configuration not enabled in TD standalone renderer */ { if ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) @@ -343,14 +328,6 @@ ivas_error ObjRenderIVASFrame( v_add( reverb_signal[1], output[1], output[1], output_frame ); } } -#else - if ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) - { - /* add reverb to rendered signals */ - v_add( reverb_signal[0], output[0], output[0], output_frame ); - v_add( reverb_signal[1], output[1], output[1], output_frame ); - } -#endif return IVAS_ERR_OK; } diff --git a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c index aa82df64c3..8afcd73603 100644 --- a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c +++ b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c @@ -151,12 +151,8 @@ int main( int argc, char *argv[] ) /*------------------------------------------------------------------------------------------* * Struct initializations *------------------------------------------------------------------------------------------*/ -#ifdef FIX_TDREND_STANDALONE st_ivas->hHrtfTD = NULL; st_ivas->hRenderConfig = NULL; -#else - st_ivas->hHrtf = NULL; -#endif st_ivas->hHeadTrackData = NULL; st_ivas->ivas_format = ISM_FORMAT; f_quat_traj = NULL; @@ -471,11 +467,7 @@ int main( int argc, char *argv[] ) ivas_td_binaural_close( &st_ivas->hBinRendererTd ); count_free( st_ivas->hDecoderConfig ); -#ifdef FIX_TDREND_STANDALONE st_ivas->hHrtfTD = NULL; -#else - ivas_HRTF_binary_close( &st_ivas->hHrtfTD ); -#endif /* ISM metadata handles */ for ( n = 0; n < MAX_NUM_OBJECTS; n++ ) -- GitLab From 9cee7a66da7f8f6b4a494d78c490cb469c302fcf Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 14 Jul 2022 08:38:12 +0200 Subject: [PATCH 04/10] [cleanup] accept FIX_MDCT_KERNEL_RATE_SWITCHING_PLC --- lib_com/options.h | 1 - lib_dec/ivas_mdct_core_dec.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 3f775087ca..26ad0895fb 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -146,7 +146,6 @@ /*#define FIX_IVAS_185_MDCT_ST_PLC_FADEOUT*/ /* IVAS-185 fix bug in TCX-PLC fadeout for MDCT-Stereo and improve fadeout by fading to background noise instead of white noise */ /*#define FIX_I1_113*/ /* under review : MCT bit distribution optimization for SBA high bitrates*/ -#define FIX_MDCT_KERNEL_RATE_SWITCHING_PLC /* force kernel that can handle ACELP -> TCX transition frame lengths for transition frames in decoder */ #define FIX_SBA_CLEAN_UP_OPT /* Fix for tickets #6, #10, #17 and #20 */ #define FIX_28_SBA_LS_RENDER /* FhG: fix for discontinuities in SBA LS renderer */ diff --git a/lib_dec/ivas_mdct_core_dec.c b/lib_dec/ivas_mdct_core_dec.c index b86cc6aa95..a4eb47570e 100644 --- a/lib_dec/ivas_mdct_core_dec.c +++ b/lib_dec/ivas_mdct_core_dec.c @@ -846,11 +846,7 @@ void ivas_mdct_core_reconstruct( { decoder_tcx_imdct( st, L_frame_global[ch], L_frame_globalTCX[ch], L_spec[ch], tcx_offset[ch], tcx_offsetFB[ch], L_frame[ch], L_frameTCX[ch], left_rect[ch], &x[ch][k][0], xn_buf, -#ifdef FIX_MDCT_KERNEL_RATE_SWITCHING_PLC (( hCPE->nchan_out == 1 && st->hTcxDec->kernel_type[k] == MDST_IV ) || st->hTcxCfg->tcx_last_overlap_mode == TRANSITION_OVERLAP ) ? MDCT_IV : st->hTcxDec->kernel_type[k], -#else - ( hCPE->nchan_out == 1 && st->hTcxDec->kernel_type[k] == MDST_IV ) ? MDCT_IV : st->hTcxDec->kernel_type[k], -#endif fUseTns[ch][k], &synth[k * L_frame[ch]], &synthFB[k * L_frameTCX[ch]], bfi, k, isLFE, 0 ); } else -- GitLab From 4d07a07aeed2fd8caac5aa7c6141cda812def52c Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 14 Jul 2022 08:40:24 +0200 Subject: [PATCH 05/10] [cleanup] accept FIX_SBA_CLEAN_UP_OPT --- lib_com/ivas_cnst.h | 13 - lib_com/ivas_dirac_com.c | 8 - lib_com/ivas_entropy_coder_common.c | 4 - lib_com/ivas_fb_mixer.c | 57 - lib_com/ivas_prot.h | 184 -- lib_com/ivas_rom_com.c | 4435 --------------------------- lib_com/ivas_rom_com.h | 6 - lib_com/ivas_spar_com.c | 46 - lib_com/ivas_spar_com_quant_util.c | 20 - lib_com/ivas_spar_foa_br_dist.c | 12 - lib_com/ivas_stat_com.h | 47 - lib_com/options.h | 1 - lib_dec/ivas_dec.c | 4 - lib_dec/ivas_entropy_decoder.c | 142 - lib_dec/ivas_init_dec.c | 41 - lib_dec/ivas_masa_dec.c | 8 - lib_dec/ivas_sba_dec.c | 4 - lib_dec/ivas_sba_rendering.c | 62 - lib_dec/ivas_sce_dec.c | 4 - lib_dec/ivas_spar_decoder.c | 36 - lib_dec/ivas_spar_foa_dec.c | 338 -- lib_dec/ivas_spar_foa_md_dec.c | 335 -- lib_dec/ivas_stat_dec.h | 51 - lib_enc/ivas_dirac_enc.c | 5 - lib_enc/ivas_entropy_coder.c | 155 - lib_enc/ivas_sce_enc.c | 4 - lib_enc/ivas_spar_encoder.c | 31 - lib_enc/ivas_spar_foa_enc.c | 196 -- lib_enc/ivas_spar_foa_md_enc.c | 206 -- lib_enc/ivas_stat_enc.h | 59 - 30 files changed, 6514 deletions(-) diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index cc600418c6..e573688459 100644 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -945,16 +945,6 @@ typedef enum #define SPAR_SID_BITS_TAR_PER_BAND 18 -#ifndef FIX_SBA_CLEAN_UP_OPT -typedef enum -{ - WYXZ = 0, - WY = 0, - WX, - WZ, - WYiX, -} ivas_spar_foa_pmx_strings_t; -#else typedef enum { WYXZ = 0, @@ -963,7 +953,6 @@ typedef enum WZ, WYiX, } ivas_spar_pmx_strings_t; -#endif #define NUM_MD_Q_COEFS_SET 4 @@ -1034,7 +1023,6 @@ typedef enum PCA_MODE_INACTIVE = 1 } ivas_pca_bypass_mode; -#ifdef FIX_SBA_CLEAN_UP_OPT enum { PRED_Q_1 = 0, @@ -1068,7 +1056,6 @@ enum DECD_Q_11, TOTAL_DECD_QUANT_STRATS }; -#endif /*----------------------------------------------------------------------------------* * MASA constants diff --git a/lib_com/ivas_dirac_com.c b/lib_com/ivas_dirac_com.c index 0489f76714..09b01ee229 100644 --- a/lib_com/ivas_dirac_com.c +++ b/lib_com/ivas_dirac_com.c @@ -92,11 +92,7 @@ ivas_error ivas_dirac_config( sba_mode = ( (Encoder_Struct *) st_ivas )->sba_mode; if ( ( (Encoder_Struct *) st_ivas )->hSpar != NULL ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - hFbMdft = ( (Encoder_Struct *) st_ivas )->hSpar->hSparFoa->hFbMixer; -#else hFbMdft = ( (Encoder_Struct *) st_ivas )->hSpar->hFbMixer; -#endif } else { @@ -121,11 +117,7 @@ ivas_error ivas_dirac_config( sba_mode = ( (Decoder_Struct *) st_ivas )->sba_mode; if ( ( (Decoder_Struct *) st_ivas )->hSpar != NULL ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - hFbMdft = ( (Decoder_Struct *) st_ivas )->hSpar->hSparFoa->hFbMixer; -#else hFbMdft = ( (Decoder_Struct *) st_ivas )->hSpar->hFbMixer; -#endif } else { diff --git a/lib_com/ivas_entropy_coder_common.c b/lib_com/ivas_entropy_coder_common.c index 5fb3f76977..6bd27544a7 100644 --- a/lib_com/ivas_entropy_coder_common.c +++ b/lib_com/ivas_entropy_coder_common.c @@ -36,11 +36,9 @@ #include "debug.h" #endif #include "ivas_prot.h" -#ifdef FIX_SBA_CLEAN_UP_OPT #include "ivas_rom_com.h" #include "math.h" #include "prot.h" -#endif #include "wmops.h" @@ -97,7 +95,6 @@ void ivas_get_cum_freq_model( return; } -#ifdef FIX_SBA_CLEAN_UP_OPT /*-----------------------------------------------------------------------------------------* * Function ivas_map_num_pred_r_to_idx() * @@ -452,4 +449,3 @@ void ivas_spar_huff_coeffs_com_init( return; } -#endif diff --git a/lib_com/ivas_fb_mixer.c b/lib_com/ivas_fb_mixer.c index 0827c24b59..11746c64ef 100644 --- a/lib_com/ivas_fb_mixer.c +++ b/lib_com/ivas_fb_mixer.c @@ -276,15 +276,6 @@ ivas_error ivas_FB_mixer_open( ivas_get_active_bins( &pActive_bins_per_band, &pActive_bins_per_band_abs, &pStart_offset, &pStart_offset_abs, sampling_rate ); -#ifndef FIX_SBA_CLEAN_UP_OPT - for ( i = 0; i < num_bands; i++ ) - { - if ( ( hFbMixer->pFb->fb_bin_to_band.pFb_bin_to_band[i] = (float *) count_malloc( sizeof( float ) * pActive_bins_per_band_abs[i] ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer encoder" ); - } - } -#else if ( fb_cfg->active_w_mixing != -1 ) { for ( i = 0; i < num_bands; i++ ) @@ -295,7 +286,6 @@ ivas_error ivas_FB_mixer_open( } } } -#endif if ( sampling_rate != 48000 ) { @@ -429,13 +419,6 @@ void ivas_FB_mixer_close( { num_bands = hFbMixer->pFb->filterbank_num_bands; -#ifndef FIX_SBA_CLEAN_UP_OPT - for ( i = 0; i < num_bands; i++ ) - { - count_free( hFbMixer->pFb->fb_bin_to_band.pFb_bin_to_band[i] ); - hFbMixer->pFb->fb_bin_to_band.pFb_bin_to_band[i] = NULL; - } -#else if ( fb_cfg->active_w_mixing != -1 ) { for ( i = 0; i < num_bands; i++ ) @@ -444,7 +427,6 @@ void ivas_FB_mixer_close( hFbMixer->pFb->fb_bin_to_band.pFb_bin_to_band[i] = NULL; } } -#endif if ( sampling_rate != 48000 ) { @@ -816,16 +798,10 @@ void ivas_fb_mixer_get_in_out_mapping( * Function to calculate number of active bands *-----------------------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -static int16_t ivas_calculate_abs_fr( - ivas_filterbank_t *pFb, - const int32_t sampling_rate ) -#else static int16_t ivas_calculate_abs_fr( ivas_filterbank_t *pFb, const int32_t sampling_rate, const int16_t alloc_fb_resp ) -#endif { int16_t frame_len; float ppFilterbank_FRs_s[L_FRAME48k]; @@ -963,17 +939,10 @@ static int16_t ivas_calculate_abs_fr( temp = 0; } -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( j < ( abs_active_bins + abs_start_offset ) && j >= abs_start_offset ) - { - pFb->fb_bin_to_band.pFb_bin_to_band[i][idx++] = temp; - } -#else if ( j < ( abs_active_bins + abs_start_offset ) && j >= abs_start_offset && alloc_fb_resp != -1 ) { pFb->fb_bin_to_band.pFb_bin_to_band[i][idx++] = temp; } -#endif ppFilterbank_FRs_s[j] += temp; } @@ -987,23 +956,6 @@ static int16_t ivas_calculate_abs_fr( } } -#ifndef FIX_SBA_CLEAN_UP_OPT - for ( j = 0; j < bands; j++ ) - { - int16_t abs_active_bins = pFb->fb_bin_to_band.pFb_active_bins_per_band[j]; - int16_t abs_start_offset = pFb->fb_bin_to_band.pFb_start_bin_per_band[j]; - - for ( i = 0; i < abs_active_bins; i++ ) - { - pFb->fb_bin_to_band.pFb_bin_to_band[j][i] /= ppFilterbank_FRs_s[i + abs_start_offset]; - /*if(pFb->fb_bin_to_band.pFb_bin_to_band[j][i] > 0.5f) - { - num_active_bands = j + 1; - break; - }*/ - } - } -#else if ( alloc_fb_resp != -1 ) { for ( j = 0; j < bands; j++ ) @@ -1022,7 +974,6 @@ static int16_t ivas_calculate_abs_fr( } } } -#endif return num_active_bands; } @@ -1164,11 +1115,7 @@ static ivas_error ivas_filterbank_setup( offset += pFb->fb_consts.pFilterbank_bins_per_band[j]; } -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_calculate_abs_fr( pFb, sampling_rate ); -#else ivas_calculate_abs_fr( pFb, sampling_rate, pCfg->active_w_mixing ); -#endif } else { @@ -1219,11 +1166,7 @@ static ivas_error ivas_filterbank_setup( pFb->fb_consts.ppFilterbank_FRs[1][j] = (const float *) pFb->fb_consts.ppFilterbank_FRs_non48k[1][j]; } -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_calculate_abs_fr( pFb, sampling_rate ); -#else ivas_calculate_abs_fr( pFb, sampling_rate, pCfg->active_w_mixing ); -#endif } } diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 0b5fb14d51..ac4cd3fce1 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -3805,19 +3805,11 @@ int16_t ivas_get_spar_num_TCs( const int16_t sba_order /* i : IVAS SBA order */ ); -#ifndef FIX_SBA_CLEAN_UP_OPT -void ivas_spar_set_bitrate_config( - ivas_spar_foa_md_com_cfg *pSpar_md_cfg, /* i/o: SPAR MD config. handle */ - const int16_t table_idx, /* i : config. table index */ - const int16_t num_bands /* i : number of bands */ -); -#else void ivas_spar_set_bitrate_config( ivas_spar_md_com_cfg *pSpar_md_cfg, /* i/o: SPAR MD config. handle */ const int16_t table_idx, /* i : config. table index */ const int16_t num_bands /* i : number of bands */ ); -#endif #ifdef FIX_I1_113 void ivas_spar_bitrate_dist( @@ -3836,47 +3828,6 @@ void ivas_imdct( const float *pIn, float *pOut, const int16_t length ); void ivas_itda( const float *re, float *pOut, const int16_t length ); /* FOA module */ -#ifndef FIX_SBA_CLEAN_UP_OPT -ivas_error ivas_spar_foa_enc_open( - ivas_spar_foa_enc_state_t **hSparFoa, /* i/o: SPAR FOA encoder handle */ - const ENCODER_CONFIG_HANDLE hEncoderConfig /* i : configuration structure */ -); - -void ivas_spar_foa_enc_close( - ivas_spar_foa_enc_state_t **hSparFoa, /* i/o: SPAR FOA encoder handle */ - const int32_t input_Fs, /* i : input sampling rate */ - const int16_t nchan_inp /* i : number of input channels */ -); - -ivas_error ivas_spar_foa_enc_process( - Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ - const ENCODER_CONFIG_HANDLE hEncoderConfig, /* i : configuration structure */ - BSTR_ENC_HANDLE hMetaData, /* i/o: MetaData handle */ - const int16_t front_vad_flag, /* i : front-VAD decision */ - float ppPcm_in[][L_FRAME48k] /* i/o: input/transport audio channels */ -); - -ivas_error ivas_spar_foa_dec_open( - ivas_spar_foa_dec_state_t **hSparFoa, /* i/o: SPAR FOA decoder handle */ - const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ -#ifdef SBA_CLEANING - const int16_t sba_order, /* i : Ambisonic (SBA) order */ -#endif - const int16_t nchan_internal /* i : number of internal channels */ -); - -void ivas_spar_get_cldfb_gains( - ivas_spar_foa_dec_state_t *hSparFoa, - HANDLE_CLDFB_FILTER_BANK cldfbAnaDec0, - HANDLE_CLDFB_FILTER_BANK cldfbSynDec0, - const DECODER_CONFIG_HANDLE hDecoderConfig -); - -void ivas_spar_foa_dec_close( - ivas_spar_foa_dec_state_t **hSparFoa, /* i/o: SPAR FOA decoder handle */ - const int32_t output_Fs /* i : output sampling rate */ -); -#else ivas_error ivas_spar_enc_process( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ const ENCODER_CONFIG_HANDLE hEncoderConfig, /* i : configuration structure */ @@ -3891,7 +3842,6 @@ void ivas_spar_get_cldfb_gains( HANDLE_CLDFB_FILTER_BANK cldfbSynDec0, const DECODER_CONFIG_HANDLE hDecoderConfig ); -#endif /* !r: 1 if prediction residual channel */ int16_t ivas_is_res_channel( @@ -3899,32 +3849,6 @@ int16_t ivas_is_res_channel( const int16_t nchan_transport /* i : number of transport channels (1-4) */ ); -#ifndef FIX_SBA_CLEAN_UP_OPT -void ivas_spar_foa_dec_upmixer( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - float output[][L_FRAME48k], /* i/o: input/output audio channels */ - const int16_t nchan_internal, /* i : number of internal channels */ - const int16_t output_frame /* i : output frame length */ -); - -/* FOA MD module */ -ivas_error ivas_spar_foa_md_enc_open( - ivas_spar_foa_md_enc_state_t **hMdEnc, /* i/o: SPAR MD encoder handle */ - const ENCODER_CONFIG_HANDLE hEncoderConfig /* i : configuration structure */ -); - -void ivas_spar_foa_md_enc_close( - ivas_spar_foa_md_enc_state_t **hMdEnc /* i/o: SPAR MD encoder handle */ -); - -ivas_error ivas_spar_foa_md_enc_process( - ivas_spar_foa_md_enc_state_t *hMdEnc, /* i/o: SPAR MD encoder handle */ - const ENCODER_CONFIG_HANDLE hEncoderConfig, /* i : configuration structure */ - ivas_spar_foa_md_enc_in_buf_t *pIn_buf, - BSTR_ENC_HANDLE hMetaData, /* i/o: MetaData handle */ - const int16_t dtx_silence_mode -); -#else void ivas_spar_dec_upmixer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float output[][L_FRAME48k], /* i/o: input/output audio channels */ @@ -3949,7 +3873,6 @@ ivas_error ivas_spar_md_enc_process( BSTR_ENC_HANDLE hMetaData, /* i/o: MetaData handle */ const int16_t dtx_silence_mode ); -#endif void ivas_compute_spar_params( float *pppCov_mat_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], @@ -3962,11 +3885,7 @@ void ivas_compute_spar_params( const int16_t num_ch, const int16_t bands_bw, const int16_t active_w, -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_com_cfg *hSparCfg, -#else ivas_spar_md_com_cfg *hSparCfg, -#endif ivas_spar_md_t *hSparMd, float *pWscale, const int16_t from_dirac @@ -3980,11 +3899,7 @@ void ivas_create_fullr_dmx_mat( const int16_t start_band, const int16_t end_band, const int16_t active_w, -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_com_cfg *hMdCfg -#else ivas_spar_md_com_cfg *hMdCfg -#endif ); void ivas_calc_c_p_coeffs( @@ -4007,11 +3922,7 @@ void ivas_get_spar_md_from_dirac( const int16_t n_ts, float ***mixer_mat, ivas_spar_md_t *hSpar_md, -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_com_cfg *hSpar_md_cfg, -#else ivas_spar_md_com_cfg *hSpar_md_cfg, -#endif const int16_t start_band, const int16_t end_band, const int16_t order, @@ -4019,73 +3930,6 @@ void ivas_get_spar_md_from_dirac( float Wscale_d[IVAS_MAX_NUM_BANDS] ); -#ifndef FIX_SBA_CLEAN_UP_OPT -ivas_error ivas_spar_foa_md_dec_open( - ivas_spar_foa_md_dec_state_t **hMdDec_out, /* i/o: SPAR MD decoder handle */ - const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ - const int16_t num_channels /* i : number of internal channels */ -); - -void ivas_spar_foa_md_dec_close( - ivas_spar_foa_md_dec_state_t **hMdDec /* i/o: SPAR MD decoder handle */ -); - -void ivas_spar_foa_dec_MD( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - Decoder_State *st0 /* i/o: decoder state structure - for bitstream handling*/ -); - -void ivas_spar_get_parameters( - ivas_spar_foa_dec_state_t *hSparFoa, /* i/o: SPAR FOA decoder handle */ - const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ - const int16_t ts, /* i : time slot index */ - const int16_t num_ch_out, /* i : number of channels out */ - const int16_t num_ch_in, /* i : number of channels in */ - const int16_t num_spar_bands, /* i : number of SPAR bands */ - float par_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS] /* o : mixing matrix */ -); - -ivas_error ivas_spar_foa_md_dec_init( - ivas_spar_foa_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ - const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ - const int16_t num_channels /* i : number of internal channels */ -); - -void ivas_spar_foa_md_dec_process( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - Decoder_State *st0, /* i/o: decoder state structure - for bitstream handling*/ - const int16_t num_bands_out, /* i : number of output bands */ - const int16_t sba_order /* i : SBA order */ -); - -void ivas_spar_to_dirac( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - ivas_spar_foa_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ - const int16_t dtx_vad, /* i : DTX frame flag */ - const int16_t num_bands_out /* i : number of output bands */ -); - -void ivas_spar_foa_update_md_hist( - ivas_spar_foa_md_dec_state_t *hMdDec /* i/o: SPAR MD decoder handle */ -); - -void ivas_spar_foa_smooth_md_dtx( - ivas_spar_foa_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ - const int16_t num_bands_out /* i : number of output bands */ -); - -void ivas_spar_foa_setup_md_smoothing( - ivas_spar_foa_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ - const int16_t num_bands_out /* i : number of output bands */ -); - -void ivas_spar_foa_dec_gen_umx_mat( - ivas_spar_foa_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ - const int16_t nchan_transport, /* i : number of transport channels */ - const int16_t num_bands_out, /* i : number of output bands */ - const int16_t bfi /* i : bad frame indicator */ -); -#else ivas_error ivas_spar_md_dec_open( ivas_spar_md_dec_state_t **hMdDec_out, /* i/o: SPAR MD decoder handle */ const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ @@ -4151,7 +3995,6 @@ void ivas_spar_dec_gen_umx_mat( const int16_t num_bands_out, /* i : number of output bands */ const int16_t bfi /* i : bad frame indicator */ ); -#endif /* Covariance module */ ivas_error ivas_spar_covar_enc_open( @@ -4371,20 +4214,11 @@ int16_t ivas_get_bits_to_encode( ); void ivas_huffman_encode( ivas_huffman_cfg_t *huff_cfg, int16_t in, int16_t *hcode, int16_t *hlen ); -#ifndef FIX_SBA_CLEAN_UP_OPT -void ivas_huff_coeffs_enc_init( ivas_huff_coeffs_t *pHuff_coeffs, const int16_t table_idx ); -void ivas_arith_coeffs_enc_init( ivas_arith_coeffs_t *pArith_coeffs, ivas_spar_foa_md_com_cfg *pSpar_cfg, const int16_t table_idx ); -#else void ivas_spar_huff_coeffs_com_init( ivas_huff_coeffs_t *pHuff_coeffs, ivas_spar_md_com_cfg *pSpar_cfg, const int16_t table_idx, int16_t codec_mode ); void ivas_spar_arith_coeffs_com_init( ivas_arith_coeffs_t *pArith_coeffs, ivas_spar_md_com_cfg *pSpar_cfg, const int16_t table_idx, int16_t codec_mode ); -#endif void ivas_arith_encode_cmplx_cell_array(ivas_arith_t *pArith_re, ivas_arith_t *pArith_re_diff, const int16_t *pDo_diff, const int16_t nB, int16_t *pSymbol_re, int16_t *pSymbol_old_re, ivas_cell_dim_t *pCell_dims, BSTR_ENC_HANDLE hMetaData, const int16_t any_diff); ivas_error ivas_huffman_decode( ivas_huffman_cfg_t *huff_cfg, Decoder_State *st0, int16_t *dec_out ); void ivas_arith_decode_cmplx_cell_array( ivas_arith_t *pArith_re, ivas_arith_t *pArith_re_diff, Decoder_State *st0, ivas_cell_dim_t *pCell_dims, int16_t *pDo_diff, const int16_t nB, int16_t *pSymbol_re, int16_t *pSymbol_re_old ); -#ifndef FIX_SBA_CLEAN_UP_OPT -void ivas_arith_coeffs_dec_init( ivas_arith_coeffs_t *pArith_coeffs, ivas_spar_foa_md_com_cfg *pSpar_cfg, const int16_t table_idx ); -void ivas_huff_coeffs_dec_init( ivas_huff_coeffs_t *pHuff_coeffs, ivas_spar_foa_md_com_cfg *pSpar_cfg, const int16_t table_idx ); -#endif void ivas_ari_start_decoding_14bits_ext_1_lfe( Decoder_State *st, Tastat *s, int16_t *extra_bits_read ); uint16_t ivas_ari_decode_14bits_bit_ext_1_lfe( Decoder_State *st, Tastat *s, const uint16_t *cum_freq, int16_t *extra_bits_read ); @@ -4394,11 +4228,9 @@ void ivas_ari_encode_14bits_ext( BSTR_ENC_HANDLE hBstr, Tastat *s, int32_t symbo void ivas_wrap_arround( int16_t *pArr, const int16_t min_val, const int16_t max_val, const int16_t length ); void ivas_get_cum_freq_model( const int16_t *pFreq_model, const int16_t length, int16_t *pCum_freq_model ); -#ifdef FIX_SBA_CLEAN_UP_OPT int16_t ivas_map_num_pred_r_to_idx( const int16_t num_quant_points_pred_r, const int16_t active_w_flag ); int16_t ivas_map_num_drct_r_to_idx( const int16_t num_quant_points_drct_r ); int16_t ivas_map_num_decd_r_to_idx( const int16_t num_quant_points_decd_r ); -#endif /* Quantization utilities */ void ivas_quantise_real_values( @@ -4412,38 +4244,22 @@ void ivas_quantise_real_values( const int16_t dim2 ); -#ifndef FIX_SBA_CLEAN_UP_OPT -void ivas_spar_foa_get_uniform_quant_strat( - ivas_spar_foa_md_com_cfg *pSpar_md_com_cfg, - const int16_t table_idx -); -#else void ivas_spar_get_uniform_quant_strat( ivas_spar_md_com_cfg *pSpar_md_com_cfg, const int16_t table_idx ); -#endif void ivas_spar_quant_dtx_init( ivas_spar_md_t *spar_md, float *min_max ); -#ifndef FIX_SBA_CLEAN_UP_OPT -void ivas_map_prior_coeffs_quant( - ivas_spar_md_prev_t *pSpar_md_prior, - ivas_spar_foa_md_com_cfg *pSpar_md_cfg, - const int16_t qsi, - const int16_t nB -); -#else void ivas_map_prior_coeffs_quant( ivas_spar_md_prev_t *pSpar_md_prior, ivas_spar_md_com_cfg *pSpar_md_cfg, const int16_t qsi, const int16_t nB ); -#endif void ivas_copy_band_coeffs_idx_to_arr( ivas_band_coeffs_ind_t *pBands_idx, diff --git a/lib_com/ivas_rom_com.c b/lib_com/ivas_rom_com.c index 63fed2c134..b6a4f15889 100644 --- a/lib_com/ivas_rom_com.c +++ b/lib_com/ivas_rom_com.c @@ -958,7 +958,6 @@ const ivas_spar_br_table_t ivas_spar_br_table_consts[IVAS_SPAR_BR_TABLE_LEN] = }; -#ifdef FIX_SBA_CLEAN_UP_OPT const ivas_freq_models_t ivas_arith_pred_r_consts[TOTAL_PRED_QUANT_STRATS_ARITH] = { /* entry for 1 quantization points */ @@ -1351,3504 +1350,7 @@ const ivas_freq_models_t ivas_arith_pred_r_consts[TOTAL_PRED_QUANT_STRATS_ARITH] 4, 4 } }; -#else -const ivas_arith_consts_t ivas_arith_consts[IVAS_SPAR_BR_TABLE_LEN][MAX_QUANT_STRATS] = -{ - /* tbl_idx 0 -- 24.4kbps FOA */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,9,23,56,133,318,757,1800,10192,1800,757,318,133,56,23,9, }, - { 0,156,240,371,573,883,1363,2102,5008,2102,1363,883,573,371,240,156, }, - { 0,241,372,575,886,1367,2109,5027,2109,1367,886,575,372,241,156,101, }, - { 0,101,156,241,372,575,886,1367,2109,5027,2109,1367,886,575,372,241, }, - }, - /* pred_R real differential */ - { - { 0,1,3,12,39,125,397,1260,12710,1260,397,125,39,12,3,1, }, - { 0,66,119,212,378,674,1201,2140,6804,2140,1201,674,378,212,119,66, }, - { 0,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119,67,37, }, - { 0,37,67,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119, }, - }, - /* pred_R real : values for general and differential */ - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11157,2788,1394,697,348, }, - { 0,7186,3592,2540,1796,1270, }, - { 0,2512,3166,5028,3166,2512, }, - { 0,3048,3267,3754,3267,3048, }, - }, - /* decd_R real differential */ - { - { 0,406,1289,12994,1289,406, }, - { 0,1460,2601,8262,2601,1460, }, - { 0,2707,8599,2707,1519,852, }, - { 0,852,1519,2707,8599,2707, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4 },{ -2,-1,0,1,2 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,9,23,56,133,318,757,1800,10192,1800,757,318,133,56,23,9, }, - { 0,156,240,371,573,883,1363,2102,5008,2102,1363,883,573,371,240,156, }, - { 0,241,372,575,886,1367,2109,5027,2109,1367,886,575,372,241,156,101, }, - { 0,101,156,241,372,575,886,1367,2109,5027,2109,1367,886,575,372,241, }, - }, - /* pred_R real differential */ - { - { 0,1,3,12,39,125,397,1260,12710,1260,397,125,39,12,3,1, }, - { 0,66,119,212,378,674,1201,2140,6804,2140,1201,674,378,212,119,66, }, - { 0,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119,67,37, }, - { 0,37,67,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119, }, - }, - /* pred_R real : values for general and differential */ - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11917,2978,1489, }, - { 0,8840,4419,3125, }, - { 0,4567,7250,4567, }, - { 0,5203,5978,5203, }, - }, - /* decd_R real differential */ - { - { 0,1356,13672,1356, }, - { 0,3166,10052,3166, }, - { 0,10984,3459,1941, }, - { 0,1941,3459,10984, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2 },{ -1,0,1 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,327,778,1851,10472,1851,778,327, }, - { 0,1057,1630,2514,5982,2514,1630,1057, }, - { 0,1668,2572,6122,2572,1668,1081,701, }, - { 0,701,1081,1668,2572,6122,2572,1668, }, - }, - /* pred_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* pred_R real : values for general and differential */ - { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11917,2978,1489, }, - { 0,8840,4419,3125, }, - { 0,4567,7250,4567, }, - { 0,5203,5978,5203, }, - }, - /* decd_R real differential */ - { - { 0,1356,13672,1356, }, - { 0,3166,10052,3166, }, - { 0,10984,3459,1941, }, - { 0,1941,3459,10984, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2 },{ -1,0,1 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 1 -- 32kbps FOA */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,1,1,4,9,23,56,133,318,756,1799,10184,1799,756,318,133,56,23,9,4,1,1, }, - { 0,41,64,98,152,234,362,558,861,1329,2049,4888,2049,1329,861,558,362,234,152,98,64,41, }, - { 0,64,98,152,235,362,559,862,1330,2051,4891,2051,1330,862,559,362,235,152,98,64,41,26, }, - { 0,26,41,64,98,152,235,362,559,862,1330,2051,4891,2051,1330,862,559,362,235,152,98,64, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, }, - { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, }, - { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, }, - { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, }, - }, - /* pred_R real : values for general and differential */ - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11157,2788,1394,697,348, }, - { 0,7186,3592,2540,1796,1270, }, - { 0,2512,3166,5028,3166,2512, }, - { 0,3048,3267,3754,3267,3048, }, - }, - /* decd_R real differential */ - { - { 0,406,1289,12994,1289,406, }, - { 0,1460,2601,8262,2601,1460, }, - { 0,2707,8599,2707,1519,852, }, - { 0,852,1519,2707,8599,2707, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4 },{ -2,-1,0,1,2 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,9,23,56,133,318,757,1800,10192,1800,757,318,133,56,23,9, }, - { 0,156,240,371,573,883,1363,2102,5008,2102,1363,883,573,371,240,156, }, - { 0,241,372,575,886,1367,2109,5027,2109,1367,886,575,372,241,156,101, }, - { 0,101,156,241,372,575,886,1367,2109,5027,2109,1367,886,575,372,241, }, - }, - /* pred_R real differential */ - { - { 0,1,3,12,39,125,397,1260,12710,1260,397,125,39,12,3,1, }, - { 0,66,119,212,378,674,1201,2140,6804,2140,1201,674,378,212,119,66, }, - { 0,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119,67,37, }, - { 0,37,67,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119, }, - }, - /* pred_R real : values for general and differential */ - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11157,2788,1394,697,348, }, - { 0,7186,3592,2540,1796,1270, }, - { 0,2512,3166,5028,3166,2512, }, - { 0,3048,3267,3754,3267,3048, }, - }, - /* decd_R real differential */ - { - { 0,406,1289,12994,1289,406, }, - { 0,1460,2601,8262,2601,1460, }, - { 0,2707,8599,2707,1519,852, }, - { 0,852,1519,2707,8599,2707, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4 },{ -2,-1,0,1,2 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,9,23,56,133,318,757,1800,10192,1800,757,318,133,56,23,9, }, - { 0,156,240,371,573,883,1363,2102,5008,2102,1363,883,573,371,240,156, }, - { 0,241,372,575,886,1367,2109,5027,2109,1367,886,575,372,241,156,101, }, - { 0,101,156,241,372,575,886,1367,2109,5027,2109,1367,886,575,372,241, }, - }, - /* pred_R real differential */ - { - { 0,1,3,12,39,125,397,1260,12710,1260,397,125,39,12,3,1, }, - { 0,66,119,212,378,674,1201,2140,6804,2140,1201,674,378,212,119,66, }, - { 0,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119,67,37, }, - { 0,37,67,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119, }, - }, - /* pred_R real : values for general and differential */ - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11917,2978,1489, }, - { 0,8840,4419,3125, }, - { 0,4567,7250,4567, }, - { 0,5203,5978,5203, }, - }, - /* decd_R real differential */ - { - { 0,1356,13672,1356, }, - { 0,3166,10052,3166, }, - { 0,10984,3459,1941, }, - { 0,1941,3459,10984, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2 },{ -1,0,1 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 2 -- 48kbps FOA */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,32,64,128,257,514,1028,2056,8226,2056,1028,514,257,128,64,32, }, - { 0,565,672,799,950,1130,1344,1598,2268,1598,1344,1130,950,799,672,565, }, - { 0,353,500,707,1000,1414,2000,4010,2000,1414,1000,707,500,353,250,176, }, - { 0,176,250,353,500,707,1000,1414,2000,4010,2000,1414,1000,707,500,353, }, - }, - /* pred_R real differential */ - { - { 0,1,3,12,39,125,397,1260,12710,1260,397,125,39,12,3,1, }, - { 0,66,119,212,378,674,1201,2140,6804,2140,1201,674,378,212,119,66, }, - { 0,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119,67,37, }, - { 0,37,67,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119, }, - }, - /* pred_R real : values for general and differential */ - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,988,1244,1568,1976,2489,3136,4983, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* drct_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* drct_R real : values for general and differential */ - { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11157,2788,1394,697,348, }, - { 0,7186,3592,2540,1796,1270, }, - { 0,2512,3166,5028,3166,2512, }, - { 0,3048,3267,3754,3267,3048, }, - }, - /* decd_R real differential */ - { - { 0,406,1289,12994,1289,406, }, - { 0,1460,2601,8262,2601,1460, }, - { 0,2707,8599,2707,1519,852, }, - { 0,852,1519,2707,8599,2707, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4 },{ -2,-1,0,1,2 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,32,64,128,257,514,1028,2056,8226,2056,1028,514,257,128,64,32, }, - { 0,565,672,799,950,1130,1344,1598,2268,1598,1344,1130,950,799,672,565, }, - { 0,353,500,707,1000,1414,2000,4010,2000,1414,1000,707,500,353,250,176, }, - { 0,176,250,353,500,707,1000,1414,2000,4010,2000,1414,1000,707,500,353, }, - }, - /* pred_R real differential */ - { - { 0,1,3,12,39,125,397,1260,12710,1260,397,125,39,12,3,1, }, - { 0,66,119,212,378,674,1201,2140,6804,2140,1201,674,378,212,119,66, }, - { 0,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119,67,37, }, - { 0,37,67,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119, }, - }, - /* pred_R real : values for general and differential */ - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,988,1244,1568,1976,2489,3136,4983, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* drct_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* drct_R real : values for general and differential */ - { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11917,2978,1489, }, - { 0,8840,4419,3125, }, - { 0,4567,7250,4567, }, - { 0,5203,5978,5203, }, - }, - /* decd_R real differential */ - { - { 0,1356,13672,1356, }, - { 0,3166,10052,3166, }, - { 0,10984,3459,1941, }, - { 0,1941,3459,10984, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2 },{ -1,0,1 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,546,1092,2184,8740,2184,1092,546, }, - { 0,1779,2116,2516,3562,2516,2116,1779, }, - { 0,1848,2614,5229,2614,1848,1307,924, }, - { 0,924,1307,1848,2614,5229,2614,1848, }, - }, - /* pred_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* pred_R real : values for general and differential */ - { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,988,1244,1568,1976,2489,3136,4983, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* drct_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* drct_R real : values for general and differential */ - { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11917,2978,1489, }, - { 0,8840,4419,3125, }, - { 0,4567,7250,4567, }, - { 0,5203,5978,5203, }, - }, - /* decd_R real differential */ - { - { 0,1356,13672,1356, }, - { 0,3166,10052,3166, }, - { 0,10984,3459,1941, }, - { 0,1941,3459,10984, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2 },{ -1,0,1 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 3 -- 64kbps FOA */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,4,8,16,32,64,128,256,512,1024,2049,8198,2049,1024,512,256,128,64,32,16,8,4, }, - { 0,292,348,414,492,585,696,828,984,1171,1392,1980,1392,1171,984,828,696,585,492,414,348,292, }, - { 0,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119,84,59, }, - { 0,59,84,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, }, - { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, }, - { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, }, - { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, }, - }, - /* pred_R real : values for general and differential */ - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,988,1244,1568,1976,2489,3136,4983, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* drct_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* drct_R real : values for general and differential */ - { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11157,2788,1394,697,348, }, - { 0,7186,3592,2540,1796,1270, }, - { 0,2512,3166,5028,3166,2512, }, - { 0,3048,3267,3754,3267,3048, }, - }, - /* decd_R real differential */ - { - { 0,406,1289,12994,1289,406, }, - { 0,1460,2601,8262,2601,1460, }, - { 0,2707,8599,2707,1519,852, }, - { 0,852,1519,2707,8599,2707, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4 },{ -2,-1,0,1,2 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,32,64,128,257,514,1028,2056,8226,2056,1028,514,257,128,64,32, }, - { 0,565,672,799,950,1130,1344,1598,2268,1598,1344,1130,950,799,672,565, }, - { 0,353,500,707,1000,1414,2000,4010,2000,1414,1000,707,500,353,250,176, }, - { 0,176,250,353,500,707,1000,1414,2000,4010,2000,1414,1000,707,500,353, }, - }, - /* pred_R real differential */ - { - { 0,1,3,12,39,125,397,1260,12710,1260,397,125,39,12,3,1, }, - { 0,66,119,212,378,674,1201,2140,6804,2140,1201,674,378,212,119,66, }, - { 0,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119,67,37, }, - { 0,37,67,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119, }, - }, - /* pred_R real : values for general and differential */ - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,988,1244,1568,1976,2489,3136,4983, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* drct_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* drct_R real : values for general and differential */ - { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11157,2788,1394,697,348, }, - { 0,7186,3592,2540,1796,1270, }, - { 0,2512,3166,5028,3166,2512, }, - { 0,3048,3267,3754,3267,3048, }, - }, - /* decd_R real differential */ - { - { 0,406,1289,12994,1289,406, }, - { 0,1460,2601,8262,2601,1460, }, - { 0,2707,8599,2707,1519,852, }, - { 0,852,1519,2707,8599,2707, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4 },{ -2,-1,0,1,2 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,32,64,128,257,514,1028,2056,8226,2056,1028,514,257,128,64,32, }, - { 0,565,672,799,950,1130,1344,1598,2268,1598,1344,1130,950,799,672,565, }, - { 0,353,500,707,1000,1414,2000,4010,2000,1414,1000,707,500,353,250,176, }, - { 0,176,250,353,500,707,1000,1414,2000,4010,2000,1414,1000,707,500,353, }, - }, - /* pred_R real differential */ - { - { 0,1,3,12,39,125,397,1260,12710,1260,397,125,39,12,3,1, }, - { 0,66,119,212,378,674,1201,2140,6804,2140,1201,674,378,212,119,66, }, - { 0,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119,67,37, }, - { 0,37,67,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119, }, - }, - /* pred_R real : values for general and differential */ - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,988,1244,1568,1976,2489,3136,4983, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* drct_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* drct_R real : values for general and differential */ - { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11917,2978,1489, }, - { 0,8840,4419,3125, }, - { 0,4567,7250,4567, }, - { 0,5203,5978,5203, }, - }, - /* decd_R real differential */ - { - { 0,1356,13672,1356, }, - { 0,3166,10052,3166, }, - { 0,10984,3459,1941, }, - { 0,1941,3459,10984, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2 },{ -1,0,1 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 4 -- 80kbps FOA */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,4,8,16,32,64,128,256,512,1024,2049,8198,2049,1024,512,256,128,64,32,16,8,4, }, - { 0,292,348,414,492,585,696,828,984,1171,1392,1980,1392,1171,984,828,696,585,492,414,348,292, }, - { 0,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119,84,59, }, - { 0,59,84,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, }, - { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, }, - { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, }, - { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, }, - }, - /* pred_R real : values for general and differential */ - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,988,1244,1568,1976,2489,3136,4983, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* drct_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* drct_R real : values for general and differential */ - { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11157,2788,1394,697,348, }, - { 0,7186,3592,2540,1796,1270, }, - { 0,2512,3166,5028,3166,2512, }, - { 0,3048,3267,3754,3267,3048, }, - }, - /* decd_R real differential */ - { - { 0,406,1289,12994,1289,406, }, - { 0,1460,2601,8262,2601,1460, }, - { 0,2707,8599,2707,1519,852, }, - { 0,852,1519,2707,8599,2707, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4 },{ -2,-1,0,1,2 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,32,64,128,257,514,1028,2056,8226,2056,1028,514,257,128,64,32, }, - { 0,565,672,799,950,1130,1344,1598,2268,1598,1344,1130,950,799,672,565, }, - { 0,353,500,707,1000,1414,2000,4010,2000,1414,1000,707,500,353,250,176, }, - { 0,176,250,353,500,707,1000,1414,2000,4010,2000,1414,1000,707,500,353, }, - }, - /* pred_R real differential */ - { - { 0,1,3,12,39,125,397,1260,12710,1260,397,125,39,12,3,1, }, - { 0,66,119,212,378,674,1201,2140,6804,2140,1201,674,378,212,119,66, }, - { 0,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119,67,37, }, - { 0,37,67,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119, }, - }, - /* pred_R real : values for general and differential */ - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,988,1244,1568,1976,2489,3136,4983, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* drct_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* drct_R real : values for general and differential */ - { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11157,2788,1394,697,348, }, - { 0,7186,3592,2540,1796,1270, }, - { 0,2512,3166,5028,3166,2512, }, - { 0,3048,3267,3754,3267,3048, }, - }, - /* decd_R real differential */ - { - { 0,406,1289,12994,1289,406, }, - { 0,1460,2601,8262,2601,1460, }, - { 0,2707,8599,2707,1519,852, }, - { 0,852,1519,2707,8599,2707, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4 },{ -2,-1,0,1,2 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,32,64,128,257,514,1028,2056,8226,2056,1028,514,257,128,64,32, }, - { 0,565,672,799,950,1130,1344,1598,2268,1598,1344,1130,950,799,672,565, }, - { 0,353,500,707,1000,1414,2000,4010,2000,1414,1000,707,500,353,250,176, }, - { 0,176,250,353,500,707,1000,1414,2000,4010,2000,1414,1000,707,500,353, }, - }, - /* pred_R real differential */ - { - { 0,1,3,12,39,125,397,1260,12710,1260,397,125,39,12,3,1, }, - { 0,66,119,212,378,674,1201,2140,6804,2140,1201,674,378,212,119,66, }, - { 0,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119,67,37, }, - { 0,37,67,119,212,379,675,1203,2144,6816,2144,1203,675,379,212,119, }, - }, - /* pred_R real : values for general and differential */ - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - { -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,988,1244,1568,1976,2489,3136,4983, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* drct_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* drct_R real : values for general and differential */ - { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11917,2978,1489, }, - { 0,8840,4419,3125, }, - { 0,4567,7250,4567, }, - { 0,5203,5978,5203, }, - }, - /* decd_R real differential */ - { - { 0,1356,13672,1356, }, - { 0,3166,10052,3166, }, - { 0,10984,3459,1941, }, - { 0,1941,3459,10984, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2 },{ -1,0,1 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 5 -- 96kbps FOA */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,4,8,16,32,64,128,256,512,1024,2049,8198,2049,1024,512,256,128,64,32,16,8,4, }, - { 0,292,348,414,492,585,696,828,984,1171,1392,1980,1392,1171,984,828,696,585,492,414,348,292, }, - { 0,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119,84,59, }, - { 0,59,84,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, }, - { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, }, - { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, }, - { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, }, - }, - /* pred_R real : values for general and differential */ - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,39,125,397,1263,12736,1263,397,125,39, }, - { 0,397,708,1262,2250,7150,2250,1262,708,397, }, - { 0,573,722,909,1146,1444,1819,2292,2888,4591, }, - { 0,1587,1701,1824,1955,2250,1955,1824,1701,1587, }, - }, - /* drct_R real differential */ - { - { 0,39,125,397,1263,12736,1263,397,125,39, }, - { 0,397,708,1262,2250,7150,2250,1262,708,397, }, - { 0,716,1276,2274,7225,2274,1276,716,402,225, }, - { 0,225,402,716,1276,2274,7225,2274,1276,716, }, - }, - /* drct_R real : values for general and differential */ - { -4,-3,-2,-1,0,1,2,3,4 },{ -4,-3,-2,-1,0,1,2,3,4 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,10941,2734,1367,683,341,170,85,42,21, }, - { 0,6305,3150,2227,1575,1113,787,556,393,278, }, - { 0,1101,1388,1749,2203,3502,2203,1749,1388,1101, }, - { 0,1587,1701,1824,1955,2250,1955,1824,1701,1587, }, - }, - /* decd_R real differential */ - { - { 0,39,125,397,1263,12736,1263,397,125,39, }, - { 0,397,708,1262,2250,7150,2250,1262,708,397, }, - { 0,716,1276,2274,7225,2274,1276,716,402,225, }, - { 0,225,402,716,1276,2274,7225,2274,1276,716, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4,5,6,7,8 },{ -4,-3,-2,-1,0,1,2,3,4 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,4,8,16,32,64,128,256,512,1024,2049,8198,2049,1024,512,256,128,64,32,16,8,4, }, - { 0,292,348,414,492,585,696,828,984,1171,1392,1980,1392,1171,984,828,696,585,492,414,348,292, }, - { 0,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119,84,59, }, - { 0,59,84,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, }, - { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, }, - { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, }, - { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, }, - }, - /* pred_R real : values for general and differential */ - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,988,1244,1568,1976,2489,3136,4983, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* drct_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* drct_R real : values for general and differential */ - { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11157,2788,1394,697,348, }, - { 0,7186,3592,2540,1796,1270, }, - { 0,2512,3166,5028,3166,2512, }, - { 0,3048,3267,3754,3267,3048, }, - }, - /* decd_R real differential */ - { - { 0,406,1289,12994,1289,406, }, - { 0,1460,2601,8262,2601,1460, }, - { 0,2707,8599,2707,1519,852, }, - { 0,852,1519,2707,8599,2707, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4 },{ -2,-1,0,1,2 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,4,8,16,32,64,128,256,512,1024,2049,8198,2049,1024,512,256,128,64,32,16,8,4, }, - { 0,292,348,414,492,585,696,828,984,1171,1392,1980,1392,1171,984,828,696,585,492,414,348,292, }, - { 0,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119,84,59, }, - { 0,59,84,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, }, - { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, }, - { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, }, - { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, }, - }, - /* pred_R real : values for general and differential */ - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,988,1244,1568,1976,2489,3136,4983, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* drct_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* drct_R real : values for general and differential */ - { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,11157,2788,1394,697,348, }, - { 0,7186,3592,2540,1796,1270, }, - { 0,2512,3166,5028,3166,2512, }, - { 0,3048,3267,3754,3267,3048, }, - }, - /* decd_R real differential */ - { - { 0,406,1289,12994,1289,406, }, - { 0,1460,2601,8262,2601,1460, }, - { 0,2707,8599,2707,1519,852, }, - { 0,852,1519,2707,8599,2707, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4 },{ -2,-1,0,1,2 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 6 -- 128kbps FOA */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,4,8,16,32,64,128,256,512,1024,2049,8198,2049,1024,512,256,128,64,32,16,8,4, }, - { 0,292,348,414,492,585,696,828,984,1171,1392,1980,1392,1171,984,828,696,585,492,414,348,292, }, - { 0,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119,84,59, }, - { 0,59,84,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, }, - { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, }, - { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, }, - { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, }, - }, - /* pred_R real : values for general and differential */ - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,343,433,546,687,866,1092,1375,1733,2184,2751,4374, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* drct_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* drct_R real : values for general and differential */ - { -5,-4,-3,-2,-1,0,1,2,3,4,5 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,10941,2734,1367,683,341,170,85,42,21, }, - { 0,6305,3150,2227,1575,1113,787,556,393,278, }, - { 0,1101,1388,1749,2203,3502,2203,1749,1388,1101, }, - { 0,1587,1701,1824,1955,2250,1955,1824,1701,1587, }, - }, - /* decd_R real differential */ - { - { 0,39,125,397,1263,12736,1263,397,125,39, }, - { 0,397,708,1262,2250,7150,2250,1262,708,397, }, - { 0,716,1276,2274,7225,2274,1276,716,402,225, }, - { 0,225,402,716,1276,2274,7225,2274,1276,716, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4,5,6,7,8 },{ -4,-3,-2,-1,0,1,2,3,4 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,4,8,16,32,64,128,256,512,1024,2049,8198,2049,1024,512,256,128,64,32,16,8,4, }, - { 0,292,348,414,492,585,696,828,984,1171,1392,1980,1392,1171,984,828,696,585,492,414,348,292, }, - { 0,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119,84,59, }, - { 0,59,84,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, }, - { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, }, - { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, }, - { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, }, - }, - /* pred_R real : values for general and differential */ - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,39,125,397,1263,12736,1263,397,125,39, }, - { 0,397,708,1262,2250,7150,2250,1262,708,397, }, - { 0,573,722,909,1146,1444,1819,2292,2888,4591, }, - { 0,1587,1701,1824,1955,2250,1955,1824,1701,1587, }, - }, - /* drct_R real differential */ - { - { 0,39,125,397,1263,12736,1263,397,125,39, }, - { 0,397,708,1262,2250,7150,2250,1262,708,397, }, - { 0,716,1276,2274,7225,2274,1276,716,402,225, }, - { 0,225,402,716,1276,2274,7225,2274,1276,716, }, - }, - /* drct_R real : values for general and differential */ - { -4,-3,-2,-1,0,1,2,3,4 },{ -4,-3,-2,-1,0,1,2,3,4 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,10983,2744,1372,686,343,171,85, }, - { 0,6573,3285,2322,1642,1161,821,580, }, - { 0,1603,2020,2546,4046,2546,2020,1603, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* decd_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4,5,6 },{ -3,-2,-1,0,1,2,3 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,4,8,16,32,64,128,256,512,1024,2049,8198,2049,1024,512,256,128,64,32,16,8,4, }, - { 0,292,348,414,492,585,696,828,984,1171,1392,1980,1392,1171,984,828,696,585,492,414,348,292, }, - { 0,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119,84,59, }, - { 0,59,84,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, }, - { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, }, - { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, }, - { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, }, - }, - /* pred_R real : values for general and differential */ - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,988,1244,1568,1976,2489,3136,4983, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* drct_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* drct_R real : values for general and differential */ - { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,10983,2744,1372,686,343,171,85, }, - { 0,6573,3285,2322,1642,1161,821,580, }, - { 0,1603,2020,2546,4046,2546,2020,1603, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* decd_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4,5,6 },{ -3,-2,-1,0,1,2,3 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 7 -- 160kbps FOA */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,4,8,16,32,64,128,256,512,1024,2049,8198,2049,1024,512,256,128,64,32,16,8,4, }, - { 0,292,348,414,492,585,696,828,984,1171,1392,1980,1392,1171,984,828,696,585,492,414,348,292, }, - { 0,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119,84,59, }, - { 0,59,84,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, }, - { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, }, - { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, }, - { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, }, - }, - /* pred_R real : values for general and differential */ - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,343,433,546,687,866,1092,1375,1733,2184,2751,4374, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* drct_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* drct_R real : values for general and differential */ - { -5,-4,-3,-2,-1,0,1,2,3,4,5 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,10932,2731,1365,682,341,170,85,42,21,10,5, }, - { 0,6181,3086,2182,1543,1091,771,545,385,272,192,136, }, - { 0,790,995,1254,1580,1991,3164,1991,1580,1254,995,790, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* decd_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4,5,6,7,8,9,10 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,4,8,16,32,64,128,256,512,1024,2049,8198,2049,1024,512,256,128,64,32,16,8,4, }, - { 0,292,348,414,492,585,696,828,984,1171,1392,1980,1392,1171,984,828,696,585,492,414,348,292, }, - { 0,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119,84,59, }, - { 0,59,84,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, }, - { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, }, - { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, }, - { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, }, - }, - /* pred_R real : values for general and differential */ - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,39,125,397,1263,12736,1263,397,125,39, }, - { 0,397,708,1262,2250,7150,2250,1262,708,397, }, - { 0,573,722,909,1146,1444,1819,2292,2888,4591, }, - { 0,1587,1701,1824,1955,2250,1955,1824,1701,1587, }, - }, - /* drct_R real differential */ - { - { 0,39,125,397,1263,12736,1263,397,125,39, }, - { 0,397,708,1262,2250,7150,2250,1262,708,397, }, - { 0,716,1276,2274,7225,2274,1276,716,402,225, }, - { 0,225,402,716,1276,2274,7225,2274,1276,716, }, - }, - /* drct_R real : values for general and differential */ - { -4,-3,-2,-1,0,1,2,3,4 },{ -4,-3,-2,-1,0,1,2,3,4 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,10941,2734,1367,683,341,170,85,42,21, }, - { 0,6305,3150,2227,1575,1113,787,556,393,278, }, - { 0,1101,1388,1749,2203,3502,2203,1749,1388,1101, }, - { 0,1587,1701,1824,1955,2250,1955,1824,1701,1587, }, - }, - /* decd_R real differential */ - { - { 0,39,125,397,1263,12736,1263,397,125,39, }, - { 0,397,708,1262,2250,7150,2250,1262,708,397, }, - { 0,716,1276,2274,7225,2274,1276,716,402,225, }, - { 0,225,402,716,1276,2274,7225,2274,1276,716, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4,5,6,7,8 },{ -4,-3,-2,-1,0,1,2,3,4 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,4,8,16,32,64,128,256,512,1024,2049,8198,2049,1024,512,256,128,64,32,16,8,4, }, - { 0,292,348,414,492,585,696,828,984,1171,1392,1980,1392,1171,984,828,696,585,492,414,348,292, }, - { 0,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119,84,59, }, - { 0,59,84,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, }, - { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, }, - { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, }, - { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, }, - }, - /* pred_R real : values for general and differential */ - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,988,1244,1568,1976,2489,3136,4983, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* drct_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* drct_R real : values for general and differential */ - { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,10983,2744,1372,686,343,171,85, }, - { 0,6573,3285,2322,1642,1161,821,580, }, - { 0,1603,2020,2546,4046,2546,2020,1603, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* decd_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4,5,6 },{ -3,-2,-1,0,1,2,3 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 8 -- 192kbps FOA */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,4,8,16,32,64,128,256,512,1024,2049,8198,2049,1024,512,256,128,64,32,16,8,4, }, - { 0,292,348,414,492,585,696,828,984,1171,1392,1980,1392,1171,984,828,696,585,492,414,348,292, }, - { 0,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119,84,59, }, - { 0,59,84,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, }, - { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, }, - { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, }, - { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, }, - }, - /* pred_R real : values for general and differential */ - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,343,433,546,687,866,1092,1375,1733,2184,2751,4374, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* drct_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* drct_R real : values for general and differential */ - { -5,-4,-3,-2,-1,0,1,2,3,4,5 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,10932,2731,1365,682,341,170,85,42,21,10,5, }, - { 0,6181,3086,2182,1543,1091,771,545,385,272,192,136, }, - { 0,790,995,1254,1580,1991,3164,1991,1580,1254,995,790, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* decd_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4,5,6,7,8,9,10 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,4,8,16,32,64,128,256,512,1024,2049,8198,2049,1024,512,256,128,64,32,16,8,4, }, - { 0,292,348,414,492,585,696,828,984,1171,1392,1980,1392,1171,984,828,696,585,492,414,348,292, }, - { 0,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119,84,59, }, - { 0,59,84,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, }, - { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, }, - { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, }, - { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, }, - }, - /* pred_R real : values for general and differential */ - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,39,125,397,1263,12736,1263,397,125,39, }, - { 0,397,708,1262,2250,7150,2250,1262,708,397, }, - { 0,573,722,909,1146,1444,1819,2292,2888,4591, }, - { 0,1587,1701,1824,1955,2250,1955,1824,1701,1587, }, - }, - /* drct_R real differential */ - { - { 0,39,125,397,1263,12736,1263,397,125,39, }, - { 0,397,708,1262,2250,7150,2250,1262,708,397, }, - { 0,716,1276,2274,7225,2274,1276,716,402,225, }, - { 0,225,402,716,1276,2274,7225,2274,1276,716, }, - }, - /* drct_R real : values for general and differential */ - { -4,-3,-2,-1,0,1,2,3,4 },{ -4,-3,-2,-1,0,1,2,3,4 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,10941,2734,1367,683,341,170,85,42,21, }, - { 0,6305,3150,2227,1575,1113,787,556,393,278, }, - { 0,1101,1388,1749,2203,3502,2203,1749,1388,1101, }, - { 0,1587,1701,1824,1955,2250,1955,1824,1701,1587, }, - }, - /* decd_R real differential */ - { - { 0,39,125,397,1263,12736,1263,397,125,39, }, - { 0,397,708,1262,2250,7150,2250,1262,708,397, }, - { 0,716,1276,2274,7225,2274,1276,716,402,225, }, - { 0,225,402,716,1276,2274,7225,2274,1276,716, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4,5,6,7,8 },{ -4,-3,-2,-1,0,1,2,3,4 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,4,8,16,32,64,128,256,512,1024,2049,8198,2049,1024,512,256,128,64,32,16,8,4, }, - { 0,292,348,414,492,585,696,828,984,1171,1392,1980,1392,1171,984,828,696,585,492,414,348,292, }, - { 0,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119,84,59, }, - { 0,59,84,119,168,238,336,476,673,952,1346,1904,3817,1904,1346,952,673,476,336,238,168,119, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,3,12,39,125,397,1260,12704,1260,397,125,39,12,3,1,1,1,1, }, - { 0,11,20,37,66,118,210,375,668,1191,2122,6748,2122,1191,668,375,210,118,66,37,20,11, }, - { 0,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20,11,6, }, - { 0,6,11,20,37,66,118,210,375,668,1191,2123,6751,2123,1191,668,375,210,118,66,37,20, }, - }, - /* pred_R real : values for general and differential */ - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - { -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,988,1244,1568,1976,2489,3136,4983, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* drct_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* drct_R real : values for general and differential */ - { -3,-2,-1,0,1,2,3 },{ -3,-2,-1,0,1,2,3 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,10983,2744,1372,686,343,171,85, }, - { 0,6573,3285,2322,1642,1161,821,580, }, - { 0,1603,2020,2546,4046,2546,2020,1603, }, - { 0,2111,2262,2425,2788,2425,2262,2111, }, - }, - /* decd_R real differential */ - { - { 0,125,399,1269,12798,1269,399,125, }, - { 0,744,1327,2365,7512,2365,1327,744, }, - { 0,1354,2413,7664,2413,1354,760,426, }, - { 0,426,760,1354,2413,7664,2413,1354, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4,5,6 },{ -3,-2,-1,0,1,2,3 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 9 -- 256kbps FOA */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,1,1,1,1,2,4,8,16,32,64,128,256,512,1024,2048,8188,2048,1024,512,256,128,64,32,16,8,4,2,1,1,1,1, }, - { 0,110,131,156,186,221,263,313,373,443,527,627,746,887,1055,1255,1798,1255,1055,887,746,627,527,443,373,313,263,221,186,156,131,110, }, - { 0,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20,14,10, }, - { 0,10,14,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,1,1,1,1,1,3,12,39,125,397,1260,12694,1260,397,125,39,12,3,1,1,1,1,1,1,1,1,1, }, - { 0,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1, }, - { 0,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1,1, }, - { 0,1,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1, }, - }, - /* pred_R real : values for general and differential */ - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 10 -- 256kbps HOA2 */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,1,1,1,1,2,4,8,16,32,64,128,256,512,1024,2048,8188,2048,1024,512,256,128,64,32,16,8,4,2,1,1,1,1, }, - { 0,110,131,156,186,221,263,313,373,443,527,627,746,887,1055,1255,1798,1255,1055,887,746,627,527,443,373,313,263,221,186,156,131,110, }, - { 0,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20,14,10, }, - { 0,10,14,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,1,1,1,1,1,3,12,39,125,397,1260,12694,1260,397,125,39,12,3,1,1,1,1,1,1,1,1,1, }, - { 0,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1, }, - { 0,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1,1, }, - { 0,1,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1, }, - }, - /* pred_R real : values for general and differential */ - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,343,433,546,687,866,1092,1375,1733,2184,2751,4374, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* drct_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* drct_R real : values for general and differential */ - { -5,-4,-3,-2,-1,0,1,2,3,4,5 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,10932,2731,1365,682,341,170,85,42,21,10,5, }, - { 0,6181,3086,2182,1543,1091,771,545,385,272,192,136, }, - { 0,790,995,1254,1580,1991,3164,1991,1580,1254,995,790, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* decd_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4,5,6,7,8,9,10 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 11 -- 256kbps HOA3 */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,1,1,1,1,2,4,8,16,32,64,128,256,512,1024,2048,8188,2048,1024,512,256,128,64,32,16,8,4,2,1,1,1,1, }, - { 0,110,131,156,186,221,263,313,373,443,527,627,746,887,1055,1255,1798,1255,1055,887,746,627,527,443,373,313,263,221,186,156,131,110, }, - { 0,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20,14,10, }, - { 0,10,14,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,1,1,1,1,1,3,12,39,125,397,1260,12694,1260,397,125,39,12,3,1,1,1,1,1,1,1,1,1, }, - { 0,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1, }, - { 0,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1,1, }, - { 0,1,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1, }, - }, - /* pred_R real : values for general and differential */ - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,343,433,546,687,866,1092,1375,1733,2184,2751,4374, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* drct_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* drct_R real : values for general and differential */ - { -5,-4,-3,-2,-1,0,1,2,3,4,5 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,10932,2731,1365,682,341,170,85,42,21,10,5, }, - { 0,6181,3086,2182,1543,1091,771,545,385,272,192,136, }, - { 0,790,995,1254,1580,1991,3164,1991,1580,1254,995,790, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* decd_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4,5,6,7,8,9,10 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 12 -- 384kbps FOA */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,1,1,1,1,2,4,8,16,32,64,128,256,512,1024,2048,8188,2048,1024,512,256,128,64,32,16,8,4,2,1,1,1,1, }, - { 0,110,131,156,186,221,263,313,373,443,527,627,746,887,1055,1255,1798,1255,1055,887,746,627,527,443,373,313,263,221,186,156,131,110, }, - { 0,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20,14,10, }, - { 0,10,14,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,1,1,1,1,1,3,12,39,125,397,1260,12694,1260,397,125,39,12,3,1,1,1,1,1,1,1,1,1, }, - { 0,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1, }, - { 0,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1,1, }, - { 0,1,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1, }, - }, - /* pred_R real : values for general and differential */ - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 13 -- 384kbps HOA2 */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,1,1,1,1,2,4,8,16,32,64,128,256,512,1024,2048,8188,2048,1024,512,256,128,64,32,16,8,4,2,1,1,1,1, }, - { 0,110,131,156,186,221,263,313,373,443,527,627,746,887,1055,1255,1798,1255,1055,887,746,627,527,443,373,313,263,221,186,156,131,110, }, - { 0,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20,14,10, }, - { 0,10,14,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,1,1,1,1,1,3,12,39,125,397,1260,12694,1260,397,125,39,12,3,1,1,1,1,1,1,1,1,1, }, - { 0,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1, }, - { 0,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1,1, }, - { 0,1,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1, }, - }, - /* pred_R real : values for general and differential */ - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,343,433,546,687,866,1092,1375,1733,2184,2751,4374, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* drct_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* drct_R real : values for general and differential */ - { -5,-4,-3,-2,-1,0,1,2,3,4,5 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,10932,2731,1365,682,341,170,85,42,21,10,5, }, - { 0,6181,3086,2182,1543,1091,771,545,385,272,192,136, }, - { 0,790,995,1254,1580,1991,3164,1991,1580,1254,995,790, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* decd_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4,5,6,7,8,9,10 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 14 -- 384kbps HOA3 */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,1,1,1,1,2,4,8,16,32,64,128,256,512,1024,2048,8188,2048,1024,512,256,128,64,32,16,8,4,2,1,1,1,1, }, - { 0,110,131,156,186,221,263,313,373,443,527,627,746,887,1055,1255,1798,1255,1055,887,746,627,527,443,373,313,263,221,186,156,131,110, }, - { 0,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20,14,10, }, - { 0,10,14,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,1,1,1,1,1,3,12,39,125,397,1260,12694,1260,397,125,39,12,3,1,1,1,1,1,1,1,1,1, }, - { 0,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1, }, - { 0,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1,1, }, - { 0,1,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1, }, - }, - /* pred_R real : values for general and differential */ - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,343,433,546,687,866,1092,1375,1733,2184,2751,4374, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* drct_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* drct_R real : values for general and differential */ - { -5,-4,-3,-2,-1,0,1,2,3,4,5 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,10932,2731,1365,682,341,170,85,42,21,10,5, }, - { 0,6181,3086,2182,1543,1091,771,545,385,272,192,136, }, - { 0,790,995,1254,1580,1991,3164,1991,1580,1254,995,790, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* decd_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4,5,6,7,8,9,10 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 15 -- 512kbps FOA */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,1,1,1,1,2,4,8,16,32,64,128,256,512,1024,2048,8188,2048,1024,512,256,128,64,32,16,8,4,2,1,1,1,1, }, - { 0,110,131,156,186,221,263,313,373,443,527,627,746,887,1055,1255,1798,1255,1055,887,746,627,527,443,373,313,263,221,186,156,131,110, }, - { 0,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20,14,10, }, - { 0,10,14,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,1,1,1,1,1,3,12,39,125,397,1260,12694,1260,397,125,39,12,3,1,1,1,1,1,1,1,1,1, }, - { 0,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1, }, - { 0,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1,1, }, - { 0,1,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1, }, - }, - /* pred_R real : values for general and differential */ - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 16 -- 512kbps HOA2 */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,1,1,1,1,2,4,8,16,32,64,128,256,512,1024,2048,8188,2048,1024,512,256,128,64,32,16,8,4,2,1,1,1,1, }, - { 0,110,131,156,186,221,263,313,373,443,527,627,746,887,1055,1255,1798,1255,1055,887,746,627,527,443,373,313,263,221,186,156,131,110, }, - { 0,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20,14,10, }, - { 0,10,14,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,1,1,1,1,1,3,12,39,125,397,1260,12694,1260,397,125,39,12,3,1,1,1,1,1,1,1,1,1, }, - { 0,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1, }, - { 0,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1,1, }, - { 0,1,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1, }, - }, - /* pred_R real : values for general and differential */ - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,343,433,546,687,866,1092,1375,1733,2184,2751,4374, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* drct_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* drct_R real : values for general and differential */ - { -5,-4,-3,-2,-1,0,1,2,3,4,5 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,10932,2731,1365,682,341,170,85,42,21,10,5, }, - { 0,6181,3086,2182,1543,1091,771,545,385,272,192,136, }, - { 0,790,995,1254,1580,1991,3164,1991,1580,1254,995,790, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* decd_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4,5,6,7,8,9,10 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - /* tbl_idx 17 -- 512kbps HOA3 */ - { - /* Quant strat = 0 */ - { - { - /* pred_R real */ - { - { 0,1,1,1,1,2,4,8,16,32,64,128,256,512,1024,2048,8188,2048,1024,512,256,128,64,32,16,8,4,2,1,1,1,1, }, - { 0,110,131,156,186,221,263,313,373,443,527,627,746,887,1055,1255,1798,1255,1055,887,746,627,527,443,373,313,263,221,186,156,131,110, }, - { 0,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20,14,10, }, - { 0,10,14,20,29,41,58,82,116,164,233,329,466,659,932,1318,1864,3738,1864,1318,932,659,466,329,233,164,116,82,58,41,29,20, }, - }, - /* pred_R real differential */ - { - { 0,1,1,1,1,1,1,1,1,1,3,12,39,125,397,1260,12694,1260,397,125,39,12,3,1,1,1,1,1,1,1,1,1, }, - { 0,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1, }, - { 0,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1,1,1, }, - { 0,1,1,1,2,3,6,11,20,37,66,117,210,374,667,1189,2118,6740,2118,1189,667,374,210,117,66,37,20,11,6,3,2,1, }, - }, - /* pred_R real : values for general and differential */ - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - { -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,343,433,546,687,866,1092,1375,1733,2184,2751,4374, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* drct_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* drct_R real : values for general and differential */ - { -5,-4,-3,-2,-1,0,1,2,3,4,5 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,10932,2731,1365,682,341,170,85,42,21,10,5, }, - { 0,6181,3086,2182,1543,1091,771,545,385,272,192,136, }, - { 0,790,995,1254,1580,1991,3164,1991,1580,1254,995,790, }, - { 0,1254,1344,1441,1544,1655,1908,1655,1544,1441,1344,1254, }, - }, - /* decd_R real differential */ - { - { 0,12,39,125,397,1261,12716,1261,397,125,39,12, }, - { 0,217,387,689,1229,2190,6960,2190,1229,689,387,217, }, - { 0,389,694,1236,2203,7000,2203,1236,694,389,218,122, }, - { 0,122,218,389,694,1236,2203,7000,2203,1236,694,389, }, - }, - /* decd_R real : values for general and differential */ - { 0,1,2,3,4,5,6,7,8,9,10 },{ -5,-4,-3,-2,-1,0,1,2,3,4,5 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 1 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - /* Quant strat = 2 */ - { - { - /* pred_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* pred_R real : values for general and differential */ - { 0 },{ 0 }, - /* pred_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* drct_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* drct_R real : values for general and differential */ - { 0 },{ 0 }, - /* drct_R real : num dyn models for general and differential */ - 4, 4 - }, - { - /* decd_R real */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real differential */ - { - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - { 0,16384, }, - }, - /* decd_R real : values for general and differential */ - { 0 },{ 0 }, - /* decd_R real : num dyn models for general and differential */ - 4, 4 - }, - }, - }, - -}; -#endif -#ifdef FIX_SBA_CLEAN_UP_OPT const ivas_huff_models_t ivas_huff_pred_r_consts[TOTAL_PRED_QUANT_STRATS_HUFF] = { /* entry for 1 quantization points for br_table_idx */ @@ -4961,943 +1463,6 @@ const ivas_huff_models_t ivas_huff_decd_r_consts[TOTAL_DECD_QUANT_STRATS] = { { -5, 4, 10 },{ -4, 4, 11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 } }, }, }; -#else -const ivas_huff_consts_t ivas_huff_const[IVAS_SPAR_BR_TABLE_LEN][MAX_QUANT_STRATS] = -{ - /* tbl_idx 0 -- 24.4kbps FOA */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - /* pred_R differential codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - }, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - { - /* decd_R codebook */ - { { 0,3,6 },{ 1,2,0 },{ 2,2,1 },{ 3,2,2 },{ 4,3,7 }, }, - /* decd_R differential codebook */ - { { -2,3,6 },{ -1,2,0 },{ 0,2,1 },{ 1,2,2 },{ 2,3,7 }, }, - }, - }, - /* Quant strat 1 */ - { - { - /* pred_R codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - /* pred_R differential codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - }, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - { - /* decd_R codebook */ - { { 0,2,2 },{ 1,1,0 },{ 2,2,3 }, }, - /* decd_R differential codebook */ - { { -1,2,2 },{ 0,1,0 },{ 1,2,3 }, }, - }, - }, - /* Quant strat 2 */ - { - { - /* pred_R codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - /* pred_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - { - /* decd_R codebook */ - { { 0,2,2 },{ 1,1,0 },{ 2,2,3 }, }, - /* decd_R differential codebook */ - { { -1,2,2 },{ 0,1,0 },{ 1,2,3 }, }, - }, - }, - }, - /* tbl_idx 1 -- 32kbps FOA */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - /* pred_R differential codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - }, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - { - /* decd_R codebook */ - { { 0,3,6 },{ 1,2,0 },{ 2,2,1 },{ 3,2,2 },{ 4,3,7 }, }, - /* decd_R differential codebook */ - { { -2,3,6 },{ -1,2,0 },{ 0,2,1 },{ 1,2,2 },{ 2,3,7 }, }, - }, - }, - /* Quant strat 1 */ - { - { - /* pred_R codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - /* pred_R differential codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - }, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - { - /* decd_R codebook */ - { { 0,3,6 },{ 1,2,0 },{ 2,2,1 },{ 3,2,2 },{ 4,3,7 }, }, - /* decd_R differential codebook */ - { { -2,3,6 },{ -1,2,0 },{ 0,2,1 },{ 1,2,2 },{ 2,3,7 }, }, - }, - }, - /* Quant strat 2 */ - { - { - /* pred_R codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - /* pred_R differential codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - }, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - { - /* decd_R codebook */ - { { 0,2,2 },{ 1,1,0 },{ 2,2,3 }, }, - /* decd_R differential codebook */ - { { -1,2,2 },{ 0,1,0 },{ 1,2,3 }, }, - }, - }, - }, - /* tbl_idx 2 -- 48kbps FOA */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - /* pred_R differential codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - }, - { - /* drct_R codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - /* drct_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - { - /* decd_R codebook */ - { { 0,3,6 },{ 1,2,0 },{ 2,2,1 },{ 3,2,2 },{ 4,3,7 }, }, - /* decd_R differential codebook */ - { { -2,3,6 },{ -1,2,0 },{ 0,2,1 },{ 1,2,2 },{ 2,3,7 }, }, - }, - }, - /* Quant strat 1 */ - { - { - /* pred_R codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - /* pred_R differential codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - }, - { - /* drct_R codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - /* drct_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - { - /* decd_R codebook */ - { { 0,2,2 },{ 1,1,0 },{ 2,2,3 }, }, - /* decd_R differential codebook */ - { { -1,2,2 },{ 0,1,0 },{ 1,2,3 }, }, - }, - }, - /* Quant strat 2 */ - { - { - /* pred_R codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - /* pred_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - { - /* drct_R codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - /* drct_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - { - /* decd_R codebook */ - { { 0,2,2 },{ 1,1,0 },{ 2,2,3 }, }, - /* decd_R differential codebook */ - { { -1,2,2 },{ 0,1,0 },{ 1,2,3 }, }, - }, - }, - }, - /* tbl_idx 3 -- 64kbps FOA */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - /* pred_R differential codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - /* drct_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - { - /* decd_R codebook */ - { { 0,3,6 },{ 1,2,0 },{ 2,2,1 },{ 3,2,2 },{ 4,3,7 }, }, - /* decd_R differential codebook */ - { { -2,3,6 },{ -1,2,0 },{ 0,2,1 },{ 1,2,2 },{ 2,3,7 }, }, - }, - }, - /* Quant strat 1 */ - { - { - /* pred_R codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - /* pred_R differential codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - }, - { - /* drct_R codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - /* drct_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - { - /* decd_R codebook */ - { { 0,3,6 },{ 1,2,0 },{ 2,2,1 },{ 3,2,2 },{ 4,3,7 }, }, - /* decd_R differential codebook */ - { { -2,3,6 },{ -1,2,0 },{ 0,2,1 },{ 1,2,2 },{ 2,3,7 }, }, - }, - }, - /* Quant strat 2 */ - { - { - /* pred_R codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - /* pred_R differential codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - }, - { - /* drct_R codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - /* drct_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - { - /* decd_R codebook */ - { { 0,2,2 },{ 1,1,0 },{ 2,2,3 }, }, - /* decd_R differential codebook */ - { { -1,2,2 },{ 0,1,0 },{ 1,2,3 }, }, - }, - }, - }, - /* tbl_idx 4 -- 80kbps FOA */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - /* pred_R differential codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - /* drct_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - { - /* decd_R codebook */ - { { 0,3,6 },{ 1,2,0 },{ 2,2,1 },{ 3,2,2 },{ 4,3,7 }, }, - /* decd_R differential codebook */ - { { -2,3,6 },{ -1,2,0 },{ 0,2,1 },{ 1,2,2 },{ 2,3,7 }, }, - }, - }, - /* Quant strat 1 */ - { - { - /* pred_R codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - /* pred_R differential codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - }, - { - /* drct_R codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - /* drct_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - { - /* decd_R codebook */ - { { 0,3,6 },{ 1,2,0 },{ 2,2,1 },{ 3,2,2 },{ 4,3,7 }, }, - /* decd_R differential codebook */ - { { -2,3,6 },{ -1,2,0 },{ 0,2,1 },{ 1,2,2 },{ 2,3,7 }, }, - }, - }, - /* Quant strat 2 */ - { - { - /* pred_R codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - /* pred_R differential codebook */ - { { -7,4,2 },{ -6,4,3 },{ -5,4,4 },{ -4,4,5 },{ -3,4,6 },{ -2,4,7 },{ -1,4,8 },{ 0,3,0 },{ 1,4,9 },{ 2,4,10 },{ 3,4,11 },{ 4,4,12 },{ 5,4,13 },{ 6,4,14 },{ 7,4,15 }, }, - }, - { - /* drct_R codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - /* drct_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - { - /* decd_R codebook */ - { { 0,2,2 },{ 1,1,0 },{ 2,2,3 }, }, - /* decd_R differential codebook */ - { { -1,2,2 },{ 0,1,0 },{ 1,2,3 }, }, - }, - }, - }, - /* tbl_idx 5 -- 96kbps FOA */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - /* pred_R differential codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -4,4,14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 }, }, - /* drct_R differential codebook */ - { { -4,4,14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 }, }, - }, - { - /* decd_R codebook */ - { { 0,4,14 },{ 1,3,0 },{ 2,3,1 },{ 3,3,2 },{ 4,3,3 },{ 5,3,4 },{ 6,3,5 },{ 7,3,6 },{ 8,4,15 }, }, - /* decd_R differential codebook */ - { { -4,4,14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 }, }, - }, - }, - /* Quant strat 1 */ - { - { - /* pred_R codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - /* pred_R differential codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - /* drct_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - { - /* decd_R codebook */ - { { 0,3,6 },{ 1,2,0 },{ 2,2,1 },{ 3,2,2 },{ 4,3,7 }, }, - /* decd_R differential codebook */ - { { -2,3,6 },{ -1,2,0 },{ 0,2,1 },{ 1,2,2 },{ 2,3,7 }, }, - }, - }, - /* Quant strat 2 */ - { - { - /* pred_R codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - /* pred_R differential codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - /* drct_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - { - /* decd_R codebook */ - { { 0,3,6 },{ 1,2,0 },{ 2,2,1 },{ 3,2,2 },{ 4,3,7 }, }, - /* decd_R differential codebook */ - { { -2,3,6 },{ -1,2,0 },{ 0,2,1 },{ 1,2,2 },{ 2,3,7 }, }, - }, - }, - }, - /* tbl_idx 6 -- 128kbps FOA */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - /* pred_R differential codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - /* drct_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - { - /* decd_R codebook */ - { { 0,4,14 },{ 1,3,0 },{ 2,3,1 },{ 3,3,2 },{ 4,3,3 },{ 5,3,4 },{ 6,3,5 },{ 7,3,6 },{ 8,4,15 }, }, - /* decd_R differential codebook */ - { { -4,4,14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 }, }, - }, - }, - /* Quant strat 1 */ - { - { - /* pred_R codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - /* pred_R differential codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -4,4,14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 }, }, - /* drct_R differential codebook */ - { { -4,4,14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 }, }, - }, - { - /* decd_R codebook */ - { { 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,2,0 },{ 4,3,5 },{ 5,3,6 },{ 6,3,7 }, }, - /* decd_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - }, - /* Quant strat 2 */ - { - { - /* pred_R codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - /* pred_R differential codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - /* drct_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - { - /* decd_R codebook */ - { { 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,2,0 },{ 4,3,5 },{ 5,3,6 },{ 6,3,7 }, }, - /* decd_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - }, - }, - /* tbl_idx 7 -- 160kbps FOA */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - /* pred_R differential codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - /* drct_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - { - /* decd_R codebook */ - { { 0,4,10 },{ 1,4,11 },{ 2,4,12 },{ 3,3,0 },{ 4,3,1 },{ 5,3,2 },{ 6,3,3 },{ 7,3,4 },{ 8,4,13 },{ 9,4,14 },{ 10,4,15 }, }, - /* decd_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - }, - /* Quant strat 1 */ - { - { - /* pred_R codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - /* pred_R differential codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -4,4,14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 }, }, - /* drct_R differential codebook */ - { { -4,4,14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 }, }, - }, - { - /* decd_R codebook */ - { { 0,4,14 },{ 1,3,0 },{ 2,3,1 },{ 3,3,2 },{ 4,3,3 },{ 5,3,4 },{ 6,3,5 },{ 7,3,6 },{ 8,4,15 }, }, - /* decd_R differential codebook */ - { { -4,4,14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 }, }, - }, - }, - /* Quant strat 2 */ - { - { - /* pred_R codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - /* pred_R differential codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - /* drct_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - { - /* decd_R codebook */ - { { 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,2,0 },{ 4,3,5 },{ 5,3,6 },{ 6,3,7 }, }, - /* decd_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - }, - }, - /* tbl_idx 8 -- 192kbps FOA */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - /* pred_R differential codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - /* drct_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - { - /* decd_R codebook */ - { { 0,4,10 },{ 1,4,11 },{ 2,4,12 },{ 3,3,0 },{ 4,3,1 },{ 5,3,2 },{ 6,3,3 },{ 7,3,4 },{ 8,4,13 },{ 9,4,14 },{ 10,4,15 }, }, - /* decd_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - }, - /* Quant strat 1 */ - { - { - /* pred_R codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - /* pred_R differential codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -4,4,14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 }, }, - /* drct_R differential codebook */ - { { -4,4,14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 }, }, - }, - { - /* decd_R codebook */ - { { 0,4,14 },{ 1,3,0 },{ 2,3,1 },{ 3,3,2 },{ 4,3,3 },{ 5,3,4 },{ 6,3,5 },{ 7,3,6 },{ 8,4,15 }, }, - /* decd_R differential codebook */ - { { -4,4,14 },{ -3,3,0 },{ -2,3,1 },{ -1,3,2 },{ 0,3,3 },{ 1,3,4 },{ 2,3,5 },{ 3,3,6 },{ 4,4,15 }, }, - }, - }, - /* Quant strat 2 */ - { - { - /* pred_R codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - /* pred_R differential codebook */ - { { -10,5,22 },{ -9,5,23 },{ -8,5,24 },{ -7,5,25 },{ -6,5,26 },{ -5,4,0 },{ -4,4,1 },{ -3,4,2 },{ -2,4,3 },{ -1,4,4 },{ 0,4,5 },{ 1,4,6 },{ 2,4,7 },{ 3,4,8 },{ 4,4,9 },{ 5,4,10 },{ 6,5,27 },{ 7,5,28 },{ 8,5,29 },{ 9,5,30 },{ 10,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - /* drct_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - { - /* decd_R codebook */ - { { 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,2,0 },{ 4,3,5 },{ 5,3,6 },{ 6,3,7 }, }, - /* decd_R differential codebook */ - { { -3,3,2 },{ -2,3,3 },{ -1,3,4 },{ 0,2,0 },{ 1,3,5 },{ 2,3,6 },{ 3,3,7 }, }, - }, - }, - }, - /* tbl_idx 9 -- 256kbps FOA */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - /* pred_R differential codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - }, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - /* Quant strat 1 */ - { - /* pred_R */ - {{{ 0 }}, {{ 0 }}}, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - /* Quant strat 2 */ -{ - /* pred_R */ - {{{ 0 }}, {{ 0 }}}, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - }, - /* tbl_idx 10 -- 256kbps HOA2 */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - /* pred_R differential codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - /* drct_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - { - /* decd_R codebook */ - { { 0,4,10 },{ 1,4,11 },{ 2,4,12 },{ 3,3,0 },{ 4,3,1 },{ 5,3,2 },{ 6,3,3 },{ 7,3,4 },{ 8,4,13 },{ 9,4,14 },{ 10,4,15 }, }, - /* decd_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - }, - /* Quant strat 1 */ - { - /* pred_R */ - {{{ 0 }}, {{ 0 }}}, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - /* Quant strat 2 */ - { - /* pred_R */ - {{{ 0 }}, {{ 0 }}}, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - }, - /* tbl_idx 11 -- 256kbps HOA3 */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - /* pred_R differential codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - /* drct_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - { - /* decd_R codebook */ - { { 0,4,10 },{ 1,4,11 },{ 2,4,12 },{ 3,3,0 },{ 4,3,1 },{ 5,3,2 },{ 6,3,3 },{ 7,3,4 },{ 8,4,13 },{ 9,4,14 },{ 10,4,15 }, }, - /* decd_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - }, - /* Quant strat 1 */ - { - /* pred_R */ - {{{ 0 }}, {{ 0 }}}, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - /* Quant strat 2 */ - { - /* pred_R */ - {{{ 0 }}, {{ 0 }}}, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - }, - /* tbl_idx 12 -- 384kbps FOA */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - /* pred_R differential codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - }, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - /* Quant strat 1 */ - { - /* pred_R */ - {{{ 0 }}, {{ 0 }}}, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - /* Quant strat 2 */ - { - /* pred_R */ - {{{ 0 }}, {{ 0 }}}, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - }, - /* tbl_idx 13 -- 384kbps HOA2 */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - /* pred_R differential codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - /* drct_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - { - /* decd_R codebook */ - { { 0,4,10 },{ 1,4,11 },{ 2,4,12 },{ 3,3,0 },{ 4,3,1 },{ 5,3,2 },{ 6,3,3 },{ 7,3,4 },{ 8,4,13 },{ 9,4,14 },{ 10,4,15 }, }, - /* decd_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - }, - /* Quant strat 1 */ - { - /* pred_R */ - {{{ 0 }}, {{ 0 }}}, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - /* Quant strat 2 */ - { - /* pred_R */ - {{{ 0 }}, {{ 0 }}}, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - }, - /* tbl_idx 14 -- 384kbps HOA3 */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - /* pred_R differential codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - /* drct_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - { - /* decd_R codebook */ - { { 0,4,10 },{ 1,4,11 },{ 2,4,12 },{ 3,3,0 },{ 4,3,1 },{ 5,3,2 },{ 6,3,3 },{ 7,3,4 },{ 8,4,13 },{ 9,4,14 },{ 10,4,15 }, }, - /* decd_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - }, - /* Quant strat 1 */ - { - /* pred_R */ - {{{ 0 }}, {{ 0 }}}, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - /* Quant strat 2 */ - { - /* pred_R */ - {{{ 0 }}, {{ 0 }}}, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - }, - /* tbl_idx 15 -- 512kbps FOA */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - /* pred_R differential codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - }, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - /* Quant strat 1 */ - { - { - /* pred_R codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - /* pred_R differential codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - }, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - /* Quant strat 2 */ - { - { - /* pred_R codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - /* pred_R differential codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - }, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - }, - /* tbl_idx 16 -- 512kbps HOA2 */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - /* pred_R differential codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - /* drct_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - { - /* decd_R codebook */ - { { 0,4,10 },{ 1,4,11 },{ 2,4,12 },{ 3,3,0 },{ 4,3,1 },{ 5,3,2 },{ 6,3,3 },{ 7,3,4 },{ 8,4,13 },{ 9,4,14 },{ 10,4,15 }, }, - /* decd_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - }, - /* Quant strat 1 */ - { - /* pred_R */ - {{{ 0 }}, {{ 0 }}}, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - /* Quant strat 2 */ - { - /* pred_R */ - {{{ 0 }}, {{ 0 }}}, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - }, - /* tbl_idx 17 -- 512kbps HOA3 */ - { - /* Quant strat 0 */ - { - { - /* pred_R codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - /* pred_R differential codebook */ - { { -15,5,2 },{ -14,5,3 },{ -13,5,4 },{ -12,5,5 },{ -11,5,6 },{ -10,5,7 },{ -9,5,8 },{ -8,5,9 },{ -7,5,10 },{ -6,5,11 },{ -5,5,12 },{ -4,5,13 },{ -3,5,14 },{ -2,5,15 },{ -1,5,16 },{ 0,4,0 },{ 1,5,17 },{ 2,5,18 },{ 3,5,19 },{ 4,5,20 },{ 5,5,21 },{ 6,5,22 },{ 7,5,23 },{ 8,5,24 },{ 9,5,25 },{ 10,5,26 },{ 11,5,27 },{ 12,5,28 },{ 13,5,29 },{ 14,5,30 },{ 15,5,31 }, }, - }, - { - /* drct_R codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - /* drct_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - { - /* decd_R codebook */ - { { 0,4,10 },{ 1,4,11 },{ 2,4,12 },{ 3,3,0 },{ 4,3,1 },{ 5,3,2 },{ 6,3,3 },{ 7,3,4 },{ 8,4,13 },{ 9,4,14 },{ 10,4,15 }, }, - /* decd_R differential codebook */ - { { -5,4,10 },{ -4,4,11 },{ -3,4,12 },{ -2,3,0 },{ -1,3,1 },{ 0,3,2 },{ 1,3,3 },{ 2,3,4 },{ 3,4,13 },{ 4,4,14 },{ 5,4,15 }, }, - }, - }, - /* Quant strat 1 */ - { - /* pred_R */ - {{{ 0 }}, {{ 0 }}}, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - /* Quant strat 2 */ - { - /* pred_R */ - {{{ 0 }}, {{ 0 }}}, - /* drct_R */ - {{{ 0 }}, {{ 0 }}}, - /* decd_R */ - {{{ 0 }}, {{ 0 }}}, - }, - }, -}; -#endif /* DTX quantization and bitstream constants */ diff --git a/lib_com/ivas_rom_com.h b/lib_com/ivas_rom_com.h index 0b64eabf7a..9549d9e0e4 100644 --- a/lib_com/ivas_rom_com.h +++ b/lib_com/ivas_rom_com.h @@ -170,19 +170,13 @@ extern const int16_t DirAC_block_grouping_5ms_MDFT[MAX_PARAM_SPATIAL_SUBFRAMES + * SPAR ROM tables *------------------------------------------------------------------------------------------*/ -#ifdef FIX_SBA_CLEAN_UP_OPT extern const ivas_freq_models_t ivas_arith_pred_r_consts[TOTAL_PRED_QUANT_STRATS_ARITH]; extern const ivas_freq_models_t ivas_arith_drct_r_consts[TOTAL_DRCT_QUANT_STRATS]; extern const ivas_freq_models_t ivas_arith_decd_r_consts[TOTAL_DECD_QUANT_STRATS]; extern const ivas_huff_models_t ivas_huff_pred_r_consts[TOTAL_PRED_QUANT_STRATS_HUFF]; extern const ivas_huff_models_t ivas_huff_drct_r_consts[TOTAL_DRCT_QUANT_STRATS]; extern const ivas_huff_models_t ivas_huff_decd_r_consts[TOTAL_DECD_QUANT_STRATS]; -#endif extern const ivas_spar_br_table_t ivas_spar_br_table_consts[IVAS_SPAR_BR_TABLE_LEN]; -#ifndef FIX_SBA_CLEAN_UP_OPT -extern const ivas_arith_consts_t ivas_arith_consts[IVAS_SPAR_BR_TABLE_LEN][MAX_QUANT_STRATS]; -extern const ivas_huff_consts_t ivas_huff_const[IVAS_SPAR_BR_TABLE_LEN][MAX_QUANT_STRATS]; -#endif extern const int16_t remix_order_set[1][IVAS_SPAR_MAX_CH]; extern const int16_t keep_planar[IVAS_SPAR_MAX_CH - FOA_CHANNELS]; extern const int16_t HOA_keep_ind[IVAS_SPAR_MAX_CH]; diff --git a/lib_com/ivas_spar_com.c b/lib_com/ivas_spar_com.c index 388f4e57f3..a3da676db3 100644 --- a/lib_com/ivas_spar_com.c +++ b/lib_com/ivas_spar_com.c @@ -704,17 +704,6 @@ static void ivas_get_Wscaling_factor( * Calculation of downmix matrix *-----------------------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -void ivas_create_fullr_dmx_mat( - float pred_coeffs_re[IVAS_SPAR_MAX_CH - 1][IVAS_MAX_NUM_BANDS], - float dm_fv_re[IVAS_SPAR_MAX_CH - 1][IVAS_MAX_NUM_BANDS], - float ***mixer_mat, - const int16_t in_chans, - const int16_t start_band, - const int16_t end_band, - const int16_t active_w, - ivas_spar_foa_md_com_cfg *hMdCfg ) -#else void ivas_create_fullr_dmx_mat( float pred_coeffs_re[IVAS_SPAR_MAX_CH - 1][IVAS_MAX_NUM_BANDS], float dm_fv_re[IVAS_SPAR_MAX_CH - 1][IVAS_MAX_NUM_BANDS], @@ -724,7 +713,6 @@ void ivas_create_fullr_dmx_mat( const int16_t end_band, const int16_t active_w, ivas_spar_md_com_cfg *hMdCfg ) -#endif { int16_t i, j, k, b; const int16_t *order; @@ -1545,23 +1533,6 @@ static int16_t ivas_is_mat_inv( * *-----------------------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -void ivas_compute_spar_params( - float *pppCov_mat_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], - float dm_fv_re[IVAS_SPAR_MAX_CH - 1][IVAS_MAX_NUM_BANDS], - const int16_t i_ts, - float ***mixer_mat, - const int16_t start_band, - const int16_t end_band, - const int16_t dtx_vad, - const int16_t num_ch, - const int16_t bands_bw, - const int16_t active_w, - ivas_spar_foa_md_com_cfg *hSparCfg, - ivas_spar_md_t *hSparMd, - float *pWscale, - const int16_t from_dirac ) -#else void ivas_compute_spar_params( float *pppCov_mat_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], float dm_fv_re[IVAS_SPAR_MAX_CH - 1][IVAS_MAX_NUM_BANDS], @@ -1577,7 +1548,6 @@ void ivas_compute_spar_params( ivas_spar_md_t *hSparMd, float *pWscale, const int16_t from_dirac ) -#endif { float pred_coeffs_re[IVAS_SPAR_MAX_CH - 1][IVAS_MAX_NUM_BANDS]; int16_t b, i, ndm; @@ -1671,21 +1641,6 @@ void ivas_compute_spar_params( * *-----------------------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -void ivas_get_spar_md_from_dirac( - float azi_dirac[IVAS_MAX_NUM_BANDS][MAX_PARAM_SPATIAL_SUBFRAMES], - float ele_dirac[IVAS_MAX_NUM_BANDS][MAX_PARAM_SPATIAL_SUBFRAMES], - float diffuseness[IVAS_MAX_NUM_BANDS], - const int16_t n_ts, - float ***mixer_mat, - ivas_spar_md_t *hSpar_md, - ivas_spar_foa_md_com_cfg *hSpar_md_cfg, - const int16_t start_band, - const int16_t end_band, - const int16_t order, - const int16_t dtx_vad, - float Wscale_d[IVAS_MAX_NUM_BANDS] ) -#else void ivas_get_spar_md_from_dirac( float azi_dirac[IVAS_MAX_NUM_BANDS][MAX_PARAM_SPATIAL_SUBFRAMES], float ele_dirac[IVAS_MAX_NUM_BANDS][MAX_PARAM_SPATIAL_SUBFRAMES], @@ -1699,7 +1654,6 @@ void ivas_get_spar_md_from_dirac( const int16_t order, const int16_t dtx_vad, float Wscale_d[IVAS_MAX_NUM_BANDS] ) -#endif { int16_t num_ch, band, i, j; int16_t block, ch; diff --git a/lib_com/ivas_spar_com_quant_util.c b/lib_com/ivas_spar_com_quant_util.c index c8e8a4e92e..9b0a936018 100644 --- a/lib_com/ivas_spar_com_quant_util.c +++ b/lib_com/ivas_spar_com_quant_util.c @@ -130,17 +130,6 @@ void ivas_quantise_real_values( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_spar_foa_get_uniform_quant_strat() - * - * Sets the quant strat values - *-----------------------------------------------------------------------------------------*/ - -void ivas_spar_foa_get_uniform_quant_strat( - ivas_spar_foa_md_com_cfg *pSpar_md_com_cfg, - const int16_t table_idx ) -#else /*-----------------------------------------------------------------------------------------* * Function ivas_spar_get_uniform_quant_strat() * @@ -149,7 +138,6 @@ void ivas_spar_foa_get_uniform_quant_strat( void ivas_spar_get_uniform_quant_strat( ivas_spar_md_com_cfg *pSpar_md_com_cfg, const int16_t table_idx ) -#endif { int16_t i; int16_t active_w = ivas_spar_br_table_consts[table_idx].active_w; @@ -220,19 +208,11 @@ void ivas_spar_get_uniform_quant_strat( * Map prior coeffs *-----------------------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -void ivas_map_prior_coeffs_quant( - ivas_spar_md_prev_t *pSpar_md_prior, - ivas_spar_foa_md_com_cfg *pSpar_md_cfg, - const int16_t qsi, - const int16_t nB ) -#else void ivas_map_prior_coeffs_quant( ivas_spar_md_prev_t *pSpar_md_prior, ivas_spar_md_com_cfg *pSpar_md_cfg, const int16_t qsi, const int16_t nB ) -#endif { int16_t i, j; diff --git a/lib_com/ivas_spar_foa_br_dist.c b/lib_com/ivas_spar_foa_br_dist.c index 46db9de8e0..19b2f338fd 100644 --- a/lib_com/ivas_spar_foa_br_dist.c +++ b/lib_com/ivas_spar_foa_br_dist.c @@ -50,19 +50,11 @@ * Set SPAR bitrate config *-----------------------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -void ivas_spar_set_bitrate_config( - ivas_spar_foa_md_com_cfg *pSpar_md_cfg, /* i/o: SPAR MD config. handle */ - const int16_t table_idx, /* i : config. table index */ - const int16_t num_bands /* i : number of bands */ -) -#else void ivas_spar_set_bitrate_config( ivas_spar_md_com_cfg *pSpar_md_cfg, /* i/o: SPAR MD config. handle */ const int16_t table_idx, /* i : config. table index */ const int16_t num_bands /* i : number of bands */ ) -#endif { int32_t ivas_total_brate; int16_t i, total_bits, max_bits, code, length; @@ -77,11 +69,7 @@ void ivas_spar_set_bitrate_config( pSpar_md_cfg->active_w = ivas_spar_br_table_consts[table_idx].active_w; pSpar_md_cfg->agc_bits_ch_idx = ivas_spar_br_table_consts[table_idx].agc_bits_ch_idx; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_get_uniform_quant_strat( pSpar_md_cfg, table_idx ); -#else ivas_spar_get_uniform_quant_strat( pSpar_md_cfg, table_idx ); -#endif if ( pSpar_md_cfg->quant_strat->C.q_levels[0] == 0 || pSpar_md_cfg->quant_strat->C.q_levels[1] == 0 || pSpar_md_cfg->quant_strat->PR.q_levels[0] == 0 || pSpar_md_cfg->quant_strat->PR.q_levels[1] == 0 || pSpar_md_cfg->quant_strat->P_c.q_levels[0] == 0 || pSpar_md_cfg->quant_strat->P_c.q_levels[1] == 0 || pSpar_md_cfg->quant_strat->P_r.q_levels[0] == 0 || pSpar_md_cfg->quant_strat->P_r.q_levels[1] == 0 ) { diff --git a/lib_com/ivas_stat_com.h b/lib_com/ivas_stat_com.h index 3a98931276..8c54421f04 100644 --- a/lib_com/ivas_stat_com.h +++ b/lib_com/ivas_stat_com.h @@ -187,11 +187,7 @@ typedef struct ivas_band_coeffs_ind_t typedef struct ivas_spar_md_t { -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_band_coeffs_t band_coeffs[IVAS_MAX_NUM_BANDS * MAX_PARAM_SPATIAL_SUBFRAMES]; -#else ivas_band_coeffs_t *band_coeffs; -#endif ivas_band_coeffs_ind_t band_coeffs_idx[IVAS_MAX_NUM_BANDS]; int16_t num_bands; float min_max[2]; @@ -224,29 +220,6 @@ typedef struct ivas_quant_strat_t } ivas_quant_strat_t; -#ifndef FIX_SBA_CLEAN_UP_OPT -typedef struct ivas_spar_foa_md_com_cfg -{ - int16_t max_freq_per_chan[IVAS_SPAR_MAX_CH]; - int16_t num_dmx_chans_per_band[IVAS_MAX_NUM_BANDS]; - int16_t num_decorr_per_band[IVAS_MAX_NUM_BANDS]; - int16_t active_w; - int16_t remix_unmix_order; - ivas_quant_strat_t quant_strat[MAX_QUANT_STRATS]; - int16_t gen_bs; - int16_t quant_strat_bits; - int16_t nchan_transport; - int16_t num_quant_strats; - int16_t prior_strat; - int16_t tgt_bits_per_blk; - int16_t max_bits_per_blk; - int16_t prev_quant_idx; - int16_t agc_bits_ch_idx; - int16_t planarCP; - int16_t num_umx_chs; - -} ivas_spar_foa_md_com_cfg; -#else typedef struct ivas_spar_md_com_cfg { int16_t max_freq_per_chan[IVAS_SPAR_MAX_CH]; @@ -268,7 +241,6 @@ typedef struct ivas_spar_md_com_cfg int16_t num_umx_chs; } ivas_spar_md_com_cfg; -#endif /* arithmetic coder structures */ @@ -297,21 +269,6 @@ typedef struct ivas_huff_models_t } ivas_huff_models_t; -#ifndef FIX_SBA_CLEAN_UP_OPT -typedef struct ivas_arith_consts_t -{ - ivas_freq_models_t pred_r; - ivas_freq_models_t drct_r; - ivas_freq_models_t decd_r; -} ivas_arith_consts_t; - -typedef struct ivas_huff_const_t -{ - ivas_huff_models_t pred_r; - ivas_huff_models_t drct_r; - ivas_huff_models_t decd_r; -} ivas_huff_consts_t; -#endif /* Entropy coder structures */ typedef struct ivas_huffman_cfg_t @@ -411,11 +368,7 @@ typedef struct ivas_spar_br_table_t int16_t bwidth; int16_t fpcs; int16_t nchan_transport; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_pmx_strings_t dmx_str; -#else ivas_spar_pmx_strings_t dmx_str; -#endif int16_t active_w; int16_t tmode; int32_t evs_brs[FOA_CHANNELS][3]; diff --git a/lib_com/options.h b/lib_com/options.h index 26ad0895fb..11ccb6491a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -146,7 +146,6 @@ /*#define FIX_IVAS_185_MDCT_ST_PLC_FADEOUT*/ /* IVAS-185 fix bug in TCX-PLC fadeout for MDCT-Stereo and improve fadeout by fading to background noise instead of white noise */ /*#define FIX_I1_113*/ /* under review : MCT bit distribution optimization for SBA high bitrates*/ -#define FIX_SBA_CLEAN_UP_OPT /* Fix for tickets #6, #10, #17 and #20 */ #define FIX_28_SBA_LS_RENDER /* FhG: fix for discontinuities in SBA LS renderer */ #define SIMPLIFY_SBA_RENDERING_LOGIC /* SBA rendering maintenance related to ticket #45 */ diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 5b6d95e5e8..ae9483d807 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -242,11 +242,7 @@ ivas_error ivas_dec( if ( st_ivas->hQMetaData != NULL ) { st = ( st_ivas->nSCE > 0 ) ? st_ivas->hSCE[0]->hCoreCoder[0] : st_ivas->hCPE[0]->hCoreCoder[0]; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_dirac_dec_read_BS( ivas_total_brate, st, st_ivas->hDirAC, st_ivas->hQMetaData, &nb_bits_metadata[0], st_ivas->sba_mode, st_ivas->hSpar->hSparFoa->dirac_to_spar_md_bands ); -#else ivas_dirac_dec_read_BS( ivas_total_brate, st, st_ivas->hDirAC, st_ivas->hQMetaData, &nb_bits_metadata[0], st_ivas->sba_mode, st_ivas->hSpar->dirac_to_spar_md_bands ); -#endif } if ( ( error = ivas_spar_dec( st_ivas, nb_bits_metadata ) ) != IVAS_ERR_OK ) diff --git a/lib_dec/ivas_entropy_decoder.c b/lib_dec/ivas_entropy_decoder.c index d26b9af819..310844eee4 100644 --- a/lib_dec/ivas_entropy_decoder.c +++ b/lib_dec/ivas_entropy_decoder.c @@ -50,50 +50,6 @@ static int16_t ivas_huffman_code_bits_present( const int16_t *codebook, const int16_t code, const int16_t bits, const int16_t len ); -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_arith_dec_init() - * - * arith decoder init - *-----------------------------------------------------------------------------------------*/ - -static void ivas_arith_dec_init( - ivas_arith_t *pArith, - const ivas_freq_models_t *pFreq_models, - ivas_arith_t *pArith_diff, - const int16_t q_levels ) -{ - int16_t i; - - pArith->vals = pFreq_models->vals; - pArith->range = q_levels; - pArith->num_models = pFreq_models->num_models; - pArith->dyn_model_bits = ivas_get_bits_to_encode( pArith->num_models - 1 ); - pArith->pFreq_model = pFreq_models->freq_model[0]; - ivas_get_cum_freq_model( pArith->pFreq_model, pArith->range, pArith->cum_freq[0] ); - - for ( i = 0; i < pArith->num_models - 1; i++ ) - { - pArith->pAlt_freq_models[i] = pFreq_models->freq_model[i + 1]; - ivas_get_cum_freq_model( pArith->pAlt_freq_models[i], pArith->range, pArith->cum_freq[i + 1] ); - } - - pArith_diff->vals = pFreq_models->diff_vals; - pArith_diff->range = q_levels; - pArith_diff->num_models = pFreq_models->diff_num_models; - pArith_diff->dyn_model_bits = ivas_get_bits_to_encode( pArith_diff->num_models - 1 ); - pArith_diff->pFreq_model = pFreq_models->diff_freq_model[0]; - ivas_get_cum_freq_model( pArith_diff->pFreq_model, pArith_diff->range, pArith_diff->cum_freq[0] ); - - for ( i = 0; i < pArith_diff->num_models - 1; i++ ) - { - pArith_diff->pAlt_freq_models[i] = pFreq_models->diff_freq_model[i + 1]; - ivas_get_cum_freq_model( pArith_diff->pAlt_freq_models[i], pArith_diff->range, pArith_diff->cum_freq[i + 1] ); - } - - return; -} -#endif /*-----------------------------------------------------------------------------------------* @@ -194,40 +150,6 @@ static void ivas_arithCoder_decode_array_diff( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_huffman_dec_init_min_max_len() - * - * Find min and max length in codebook and finalize initialization of ivas_huffman_cfg_t. - *-----------------------------------------------------------------------------------------*/ -static void ivas_huffman_dec_init_min_max_len( - ivas_huffman_cfg_t *p_huff_cfg ) -{ - int16_t i, code_len; - const int16_t *codebook; - - codebook = p_huff_cfg->codebook; - - p_huff_cfg->min_len = p_huff_cfg->sym_len; - p_huff_cfg->max_len = 0; - - for ( i = 0; i < p_huff_cfg->sym_len; i++ ) - { - code_len = codebook[1]; - if ( p_huff_cfg->min_len > code_len ) - { - p_huff_cfg->min_len = code_len; - } - if ( p_huff_cfg->max_len < code_len ) - { - p_huff_cfg->max_len = code_len; - } - codebook = codebook + 3; - } - - return; -} -#endif /*-----------------------------------------------------------------------------------------* @@ -500,67 +422,3 @@ void ivas_arith_decode_cmplx_cell_array( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_arith_coeffs_dec_init() - * - * Init for Arith. decoding - *-----------------------------------------------------------------------------------------*/ - -void ivas_arith_coeffs_dec_init( - ivas_arith_coeffs_t *pArith_coeffs, - ivas_spar_foa_md_com_cfg *pSpar_cfg, - const int16_t table_idx ) -{ - int16_t i; - for ( i = 0; i < MAX_QUANT_STRATS; i++ ) - { - - ivas_arith_dec_init( &pArith_coeffs->pred_arith_re[i], &ivas_arith_consts[table_idx][i].pred_r, - &pArith_coeffs->pred_arith_re_diff[i], pSpar_cfg->quant_strat[i].PR.q_levels[0] ); - - ivas_arith_dec_init( &pArith_coeffs->drct_arith_re[i], &ivas_arith_consts[table_idx][i].drct_r, - &pArith_coeffs->drct_arith_re_diff[i], pSpar_cfg->quant_strat[i].C.q_levels[0] ); - - ivas_arith_dec_init( &pArith_coeffs->decd_arith_re[i], &ivas_arith_consts[table_idx][i].decd_r, - &pArith_coeffs->decd_arith_re_diff[i], pSpar_cfg->quant_strat[i].P_r.q_levels[0] ); - } - - return; -} - - -/*-----------------------------------------------------------------------------------------* - * Function ivas_huff_coeffs_dec_init() - * - * Init for Huffman decoding - *-----------------------------------------------------------------------------------------*/ - -void ivas_huff_coeffs_dec_init( - ivas_huff_coeffs_t *pHuff_coeffs, - ivas_spar_foa_md_com_cfg *pSpar_cfg, - const int16_t table_idx ) -{ - int16_t i; - ivas_huffman_cfg_t *p_huff_cfg; - for ( i = 0; i < MAX_QUANT_STRATS; i++ ) - { - p_huff_cfg = &pHuff_coeffs->pred_huff_re[i]; - p_huff_cfg->codebook = &ivas_huff_const[table_idx][i].pred_r.code_book[0][0]; - p_huff_cfg->sym_len = pSpar_cfg->quant_strat[i].PR.q_levels[0]; - ivas_huffman_dec_init_min_max_len( p_huff_cfg ); - - p_huff_cfg = &pHuff_coeffs->drct_huff_re[i]; - p_huff_cfg->codebook = &ivas_huff_const[table_idx][i].drct_r.code_book[0][0]; - p_huff_cfg->sym_len = pSpar_cfg->quant_strat[i].C.q_levels[0]; - ivas_huffman_dec_init_min_max_len( p_huff_cfg ); - - p_huff_cfg = &pHuff_coeffs->decd_huff_re[i]; - p_huff_cfg->codebook = &ivas_huff_const[table_idx][i].decd_r.code_book[0][0]; - p_huff_cfg->sym_len = pSpar_cfg->quant_strat[i].P_r.q_levels[0]; - ivas_huffman_dec_init_min_max_len( p_huff_cfg ); - } - - return; -} -#endif diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 41e07e485f..fcacf77e9b 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -874,34 +874,14 @@ ivas_error ivas_init_decoder( } for ( k = 0; k < DIRAC_MAX_NBANDS; k++ ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - st_ivas->hSpar->hSparFoa->dirac_to_spar_md_bands[k] = st_ivas->hDirAC->dirac_to_spar_md_bands[k]; -#else st_ivas->hSpar->dirac_to_spar_md_bands[k] = st_ivas->hDirAC->dirac_to_spar_md_bands[k]; -#endif } -#ifndef FIX_SBA_CLEAN_UP_OPT - st_ivas->hSpar->hSparFoa->enc_param_start_band = st_ivas->hDirAC->hConfig->enc_param_start_band; -#else st_ivas->hSpar->enc_param_start_band = st_ivas->hDirAC->hConfig->enc_param_start_band; -#endif } else { int16_t band_grouping[IVAS_MAX_NUM_BANDS + 1]; -#ifndef FIX_SBA_CLEAN_UP_OPT - st_ivas->hSpar->hSparFoa->enc_param_start_band = min( IVAS_MAX_NUM_BANDS, SPAR_DIRAC_SPLIT_START_BAND ); - - ivas_dirac_config_bands( - band_grouping, - IVAS_MAX_NUM_BANDS, - (int16_t) ( st_ivas->hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ), - st_ivas->hSpar->hSparFoa->dirac_to_spar_md_bands, - st_ivas->hQMetaData->useLowerBandRes, - st_ivas->hSpar->hSparFoa->enc_param_start_band, - 0 ); -#else st_ivas->hSpar->enc_param_start_band = min( IVAS_MAX_NUM_BANDS, SPAR_DIRAC_SPLIT_START_BAND ); ivas_dirac_config_bands( @@ -912,7 +892,6 @@ ivas_error ivas_init_decoder( st_ivas->hQMetaData->useLowerBandRes, st_ivas->hSpar->enc_param_start_band, 0 ); -#endif } } else @@ -1356,11 +1335,7 @@ ivas_error ivas_init_decoder( /* CLDFB Interpolation weights */ if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_get_cldfb_gains( st_ivas->hSpar->hSparFoa, st_ivas->cldfbAnaDec[0], st_ivas->cldfbSynDec[0], hDecoderConfig ); -#else ivas_spar_get_cldfb_gains( st_ivas->hSpar, st_ivas->cldfbAnaDec[0], st_ivas->cldfbSynDec[0], hDecoderConfig ); -#endif } /*-----------------------------------------------------------------* @@ -1852,11 +1827,7 @@ void ivas_init_dec_get_num_cldfb_instances( case RENDERER_DIRAC: if ( st_ivas->sba_mode == SBA_MODE_SPAR ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - *numCldfbAnalyses = st_ivas->hSpar->hSparFoa->hFbMixer->fb_cfg->num_in_chans; -#else *numCldfbAnalyses = st_ivas->hSpar->hFbMixer->fb_cfg->num_in_chans; -#endif if ( st_ivas->hOutSetup.is_loudspeaker_setup && st_ivas->renderer_type == RENDERER_DIRAC ) @@ -1865,11 +1836,7 @@ void ivas_init_dec_get_num_cldfb_instances( } else if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_FOA ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - *numCldfbSyntheses = st_ivas->hSpar->hSparFoa->hFbMixer->fb_cfg->num_out_chans; -#else *numCldfbSyntheses = st_ivas->hSpar->hFbMixer->fb_cfg->num_out_chans; -#endif } else { @@ -1919,11 +1886,7 @@ void ivas_init_dec_get_num_cldfb_instances( case RENDERER_BINAURAL_FASTCONV_ROOM: if ( st_ivas->sba_mode == SBA_MODE_SPAR ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - *numCldfbAnalyses = st_ivas->hSpar->hSparFoa->hFbMixer->fb_cfg->num_in_chans; -#else *numCldfbAnalyses = st_ivas->hSpar->hFbMixer->fb_cfg->num_in_chans; -#endif if ( st_ivas->hOutSetup.is_loudspeaker_setup && st_ivas->renderer_type == RENDERER_DIRAC ) { @@ -1931,11 +1894,7 @@ void ivas_init_dec_get_num_cldfb_instances( } else if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_FOA ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - *numCldfbSyntheses = st_ivas->hSpar->hSparFoa->hFbMixer->fb_cfg->num_out_chans; -#else *numCldfbSyntheses = st_ivas->hSpar->hFbMixer->fb_cfg->num_out_chans; -#endif } else { diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index 4c1a39649d..4bdf5ed614 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -1150,11 +1150,7 @@ void ivas_spar_param_to_masa_param_mapping( { for ( j = 0; j < FOA_CHANNELS; j++ ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - mixer_mat_sf_bands_real[sf][band][i][j] = st_ivas->hSpar->hSparFoa->hMdDec->mixer_mat_prev[mixer_mat_index][i][j][band]; -#else mixer_mat_sf_bands_real[sf][band][i][j] = st_ivas->hSpar->hMdDec->mixer_mat_prev[mixer_mat_index][i][j][band]; -#endif } } } @@ -1168,11 +1164,7 @@ void ivas_spar_param_to_masa_param_mapping( { for ( j = 0; j < FOA_CHANNELS; j++ ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - mixer_mat_sf_bands_real[sf][band][i][j] = st_ivas->hSpar->hSparFoa->hMdDec->mixer_mat[i][j][band + mixer_mat_index * IVAS_MAX_NUM_BANDS]; -#else mixer_mat_sf_bands_real[sf][band][i][j] = st_ivas->hSpar->hMdDec->mixer_mat[i][j][band + mixer_mat_index * IVAS_MAX_NUM_BANDS]; -#endif } } } diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 1fc9c81676..26c6cff50d 100644 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -511,11 +511,7 @@ ivas_error ivas_sba_dec_reconfigure( { int16_t sba_order_internal; sba_order_internal = min( st_ivas->sba_order, IVAS_MAX_SBA_ORDER ); -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_config( st_ivas->hDecoderConfig->ivas_total_brate, sba_order_internal, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->hSpar->hSparFoa->core_nominal_brate, st_ivas->sid_format ); -#else ivas_spar_config( st_ivas->hDecoderConfig->ivas_total_brate, sba_order_internal, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->hSpar->core_nominal_brate, st_ivas->sid_format ); -#endif if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->element_mode_init, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->sba_order, st_ivas->sba_planar, st_ivas->sba_mode, IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) != IVAS_ERR_OK ) diff --git a/lib_dec/ivas_sba_rendering.c b/lib_dec/ivas_sba_rendering.c index e565145a0b..dde5d0abd5 100644 --- a/lib_dec/ivas_sba_rendering.c +++ b/lib_dec/ivas_sba_rendering.c @@ -258,11 +258,7 @@ void ivas_sba_upmixer_renderer( #else /* Upmixer */ #endif -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_dec_upmixer( st_ivas, output, nchan_internal, output_frame ); -#else ivas_spar_dec_upmixer( st_ivas, output, nchan_internal, output_frame ); -#endif #ifndef SIMPLIFY_SBA_RENDERING_LOGIC /* Renderer */ @@ -320,11 +316,7 @@ void ivas_sba_mix_matrix_determiner( { int16_t i, ch; float temp; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_dec_state_t *pState; -#else SPAR_DEC_HANDLE pState; -#endif int16_t num_bands_out, nchan_transport, nchan_out; /* Convert numeric range */ @@ -349,11 +341,7 @@ void ivas_sba_mix_matrix_determiner( } /* AGC */ -#ifndef FIX_SBA_CLEAN_UP_OPT - pState = st_ivas->hSpar->hSparFoa; -#else pState = st_ivas->hSpar; -#endif nchan_transport = pState->hMdDec->spar_md_cfg.nchan_transport; nchan_out = nchan_transport; ivas_agc_dec_process( pState->hAgcDec, output, output, nchan_transport, output_frame ); @@ -369,11 +357,7 @@ void ivas_sba_mix_matrix_determiner( /* Mixing matrix determiner */ num_bands_out = pState->hFbMixer->pFb->filterbank_num_bands; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_dec_gen_umx_mat( pState->hMdDec, nchan_transport, num_bands_out, st_ivas->bfi ); -#else ivas_spar_dec_gen_umx_mat( pState->hMdDec, nchan_transport, num_bands_out, st_ivas->bfi ); -#endif wmops_sub_end(); @@ -396,11 +380,7 @@ void ivas_sba_prototype_renderer( ) { float mixer_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS]; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_dec_state_t *hSparFoa; -#else SPAR_DEC_HANDLE hSpar; -#endif DECODER_CONFIG_HANDLE hDecoderConfig; int16_t num_spar_bands, spar_band; int16_t b, ts; @@ -412,30 +392,16 @@ void ivas_sba_prototype_renderer( wmops_sub_start( "ivas_sba_prototype_renderer" ); -#ifndef FIX_SBA_CLEAN_UP_OPT - hSparFoa = st_ivas->hSpar->hSparFoa; -#else hSpar = st_ivas->hSpar; -#endif hDecoderConfig = st_ivas->hDecoderConfig; -#ifndef FIX_SBA_CLEAN_UP_OPT - num_spar_bands = hSparFoa->hFbMixer->pFb->filterbank_num_bands; -#else num_spar_bands = hSpar->hFbMixer->pFb->filterbank_num_bands; -#endif firstSlot = firstSubframe * ( CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES ); slotEnd = ( firstSubframe + nSubframes ) * ( CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES ); -#ifndef FIX_SBA_CLEAN_UP_OPT - num_cldfb_bands = hSparFoa->hFbMixer->pFb->fb_bin_to_band.num_cldfb_bands; - numch_in = hSparFoa->hFbMixer->fb_cfg->num_in_chans; - numch_out = hSparFoa->hFbMixer->fb_cfg->num_out_chans; -#else num_cldfb_bands = hSpar->hFbMixer->pFb->fb_bin_to_band.num_cldfb_bands; numch_in = hSpar->hFbMixer->fb_cfg->num_in_chans; numch_out = hSpar->hFbMixer->fb_cfg->num_out_chans; -#endif if ( st_ivas->nchan_transport == 1 ) { @@ -456,22 +422,14 @@ void ivas_sba_prototype_renderer( for ( ts = firstSlot; ts < slotEnd; ts++ ) { /* determine SPAR parameters for this time slot */ -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_get_parameters( hSparFoa, hDecoderConfig, ts, numch_out, numch_in, num_spar_bands, mixer_mat ); -#else ivas_spar_get_parameters( hSpar, hDecoderConfig, ts, numch_out, numch_in, num_spar_bands, mixer_mat ); -#endif for ( cldfb_band = 0; cldfb_band < num_cldfb_bands; cldfb_band++ ) { float out_re[IVAS_SPAR_MAX_CH]; float out_im[IVAS_SPAR_MAX_CH]; float cldfb_par; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_fb_bin_to_band_data_t *bin2band = &hSparFoa->hFbMixer->pFb->fb_bin_to_band; -#else ivas_fb_bin_to_band_data_t *bin2band = &hSpar->hFbMixer->pFb->fb_bin_to_band; -#endif for ( out_ch = firstOutCh; out_ch < outChEnd; out_ch++ ) { @@ -512,25 +470,6 @@ void ivas_sba_prototype_renderer( if ( ( ( ts + 1 ) % MAX_PARAM_SPATIAL_SUBFRAMES ) == 0 ) { sf_idx = ts / MAX_PARAM_SPATIAL_SUBFRAMES; -#ifndef FIX_SBA_CLEAN_UP_OPT - hSparFoa->i_subframe++; - hSparFoa->i_subframe = min( hSparFoa->i_subframe, MAX_PARAM_SPATIAL_SUBFRAMES ); - mvr2r( hSparFoa->hMdDec->mixer_mat_prev[1][0][0], hSparFoa->hMdDec->mixer_mat_prev[0][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); - mvr2r( hSparFoa->hMdDec->mixer_mat_prev[2][0][0], hSparFoa->hMdDec->mixer_mat_prev[1][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); - mvr2r( hSparFoa->hMdDec->mixer_mat_prev[3][0][0], hSparFoa->hMdDec->mixer_mat_prev[2][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); - mvr2r( hSparFoa->hMdDec->mixer_mat_prev[4][0][0], hSparFoa->hMdDec->mixer_mat_prev[3][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); - - for ( out_ch = 0; out_ch < numch_out; out_ch++ ) - { - for ( in_ch = 0; in_ch < numch_in; in_ch++ ) - { - for ( b = 0; b < num_spar_bands; b++ ) - { - hSparFoa->hMdDec->mixer_mat_prev[4][out_ch][in_ch][b] = hSparFoa->hMdDec->mixer_mat[out_ch][in_ch][b + sf_idx * IVAS_MAX_NUM_BANDS]; - } - } - } -#else hSpar->i_subframe++; hSpar->i_subframe = min( hSpar->i_subframe, MAX_PARAM_SPATIAL_SUBFRAMES ); mvr2r( hSpar->hMdDec->mixer_mat_prev[1][0][0], hSpar->hMdDec->mixer_mat_prev[0][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); @@ -548,7 +487,6 @@ void ivas_sba_prototype_renderer( } } } -#endif } } diff --git a/lib_dec/ivas_sce_dec.c b/lib_dec/ivas_sce_dec.c index fbcf859c30..5b83a41f81 100644 --- a/lib_dec/ivas_sce_dec.c +++ b/lib_dec/ivas_sce_dec.c @@ -153,11 +153,7 @@ ivas_error ivas_sce_dec( } else if ( st_ivas->sba_mode == SBA_MODE_SPAR ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - st->bits_frame_nominal = (int16_t) ( st_ivas->hSpar->hSparFoa->core_nominal_brate / FRAMES_PER_SEC ); -#else st->bits_frame_nominal = (int16_t) ( st_ivas->hSpar->core_nominal_brate / FRAMES_PER_SEC ); -#endif } else { diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index c208fc6511..87ff95a81a 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -59,11 +59,9 @@ ivas_error ivas_spar_dec_open( SPAR_DEC_HANDLE hSpar; ivas_error error; int16_t sba_order_internal, num_channels_internal; -#ifdef FIX_SBA_CLEAN_UP_OPT IVAS_FB_CFG *fb_cfg; int16_t i, j, b, active_w_mixing; int32_t output_Fs; -#endif error = IVAS_ERR_OK; sba_order_internal = min( st_ivas->sba_order, IVAS_MAX_SBA_ORDER ); @@ -75,12 +73,6 @@ ivas_error ivas_spar_dec_open( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR decoder" ); } -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( ( error = ivas_spar_foa_dec_open( &hSpar->hSparFoa, st_ivas->hDecoderConfig, num_channels_internal ) ) != IVAS_ERR_OK ) - { - return error; - } -#else output_Fs = st_ivas->hDecoderConfig->output_Fs; /* TD decorr. */ @@ -90,17 +82,10 @@ ivas_error ivas_spar_dec_open( } /* MD handle */ -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( ( error = ivas_spar_foa_md_dec_open( &hSpar->hMdDec, st_ivas->hDecoderConfig, num_channels_internal ) ) != IVAS_ERR_OK ) - { - return error; - } -#else if ( ( error = ivas_spar_md_dec_open( &hSpar->hMdDec, st_ivas->hDecoderConfig, num_channels_internal ) ) != IVAS_ERR_OK ) { return error; } -#endif hSpar->hMdDec->td_decorr_flag = 1; hSpar->hMdDec->table_idx = -1; @@ -155,17 +140,12 @@ ivas_error ivas_spar_dec_open( } } hSpar->i_subframe = 0; -#endif /*-----------------------------------------------------------------* * Configuration - set SPAR high-level parameters *-----------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_config( st_ivas->hDecoderConfig->ivas_total_brate, sba_order_internal, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &hSpar->hSparFoa->core_nominal_brate, st_ivas->sid_format ); -#else ivas_spar_config( st_ivas->hDecoderConfig->ivas_total_brate, sba_order_internal, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &hSpar->core_nominal_brate, st_ivas->sid_format ); -#endif switch ( sba_order_internal ) { @@ -199,21 +179,10 @@ void ivas_spar_dec_close( const int32_t output_Fs /* i : output sampling rate */ ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - /* SPAR FOA handle */ - ivas_spar_foa_dec_close( &hSpar->hSparFoa, output_Fs ); - - count_free( hSpar ); - hSpar = NULL; -#else if ( hSpar != NULL ) { /* MD handle */ -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_dec_close( &hSpar->hMdDec ); -#else ivas_spar_md_dec_close( &hSpar->hMdDec ); -#endif /* Covar. State handle */ ivas_spar_td_decorr_dec_close( &hSpar->hTdDecorr ); @@ -234,7 +203,6 @@ void ivas_spar_dec_close( count_free( hSpar ); hSpar = NULL; } -#endif return; } @@ -281,11 +249,7 @@ ivas_error ivas_spar_dec( st0->bits_frame = min( MAX_BITS_METADATA, last_bit_pos + 1 ); st0->total_brate = hDecoderConfig->ivas_total_brate; /* to avoid BER detect */ -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_dec_MD( st_ivas, st0 ); -#else ivas_spar_dec_MD( st_ivas, st0 ); -#endif *nb_bits_read = st0->next_bit_pos + nb_bits_read_orig; st0->bit_stream = bit_stream_orig; diff --git a/lib_dec/ivas_spar_foa_dec.c b/lib_dec/ivas_spar_foa_dec.c index 6678f2d0da..7abedce581 100644 --- a/lib_dec/ivas_spar_foa_dec.c +++ b/lib_dec/ivas_spar_foa_dec.c @@ -185,19 +185,11 @@ static void matrix_inverse( * *---------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -void ivas_spar_get_cldfb_gains( - ivas_spar_foa_dec_state_t *hSparFoa, - HANDLE_CLDFB_FILTER_BANK cldfbAnaDec0, - HANDLE_CLDFB_FILTER_BANK cldfbSynDec0, - const DECODER_CONFIG_HANDLE hDecoderConfig ) -#else void ivas_spar_get_cldfb_gains( SPAR_DEC_HANDLE hSpar, HANDLE_CLDFB_FILTER_BANK cldfbAnaDec0, HANDLE_CLDFB_FILTER_BANK cldfbSynDec0, const DECODER_CONFIG_HANDLE hDecoderConfig ) -#endif { float output_Fs = (float) hDecoderConfig->output_Fs; int16_t pt_len, stride, num_cldfb_bands, decfb_delay; @@ -224,17 +216,10 @@ void ivas_spar_get_cldfb_gains( encfb_delay = NS2SA( output_Fs, IVAS_FB_ENC_DELAY_NS ); decfb_delay = NS2SA( output_Fs, IVAS_FB_DEC_DELAY_NS ); -#ifndef FIX_SBA_CLEAN_UP_OPT - cf_start = (int16_t) hSparFoa->hFbMixer->cross_fade_start_offset - encfb_delay + decfb_delay; /* time domain after CLDFB synthesis*/ - cf_end = (int16_t) hSparFoa->hFbMixer->cross_fade_end_offset - encfb_delay + decfb_delay; - cf_len = cf_end - cf_start; - weights = hSparFoa->hFbMixer->cldfb_cross_fade; -#else cf_start = (int16_t) hSpar->hFbMixer->cross_fade_start_offset - encfb_delay + decfb_delay; /* time domain after CLDFB synthesis*/ cf_end = (int16_t) hSpar->hFbMixer->cross_fade_end_offset - encfb_delay + decfb_delay; cf_len = cf_end - cf_start; weights = hSpar->hFbMixer->cldfb_cross_fade; -#endif cf_cldfb_start = (int16_t) ceil( ( cf_start - decfb_delay / 2 ) / (float) stride - 0.5f ); cf_cldfb_end = (int16_t) ( ( cf_start - decfb_delay / 2 + cf_len ) / (float) stride - 0.5f ); @@ -248,26 +233,16 @@ void ivas_spar_get_cldfb_gains( set_f( tgt, 0, ( 3 - 1 ) * CLDFB_NO_CHANNELS_MAX + 10 * CLDFB_NO_CHANNELS_MAX ); cf_start_s = ( cf_start - decfb_delay / 2 ) / output_Fs; -#ifndef FIX_SBA_CLEAN_UP_OPT - cf_len_s = hSparFoa->hFbMixer->cross_fade_end_offset / output_Fs - hSparFoa->hFbMixer->cross_fade_start_offset / output_Fs; -#else cf_len_s = hSpar->hFbMixer->cross_fade_end_offset / output_Fs - hSpar->hFbMixer->cross_fade_start_offset / output_Fs; -#endif for ( ts = 0; ts < CLDFB_NO_COL_MAX; ts++ ) { weights[ts] = ( ( ( ts + 0.5f ) * stride / output_Fs ) - cf_start_s ) / cf_len_s; weights[ts] = max( min( weights[ts], 1.0f ), 0.0f ); } -#ifndef FIX_SBA_CLEAN_UP_OPT - hSparFoa->hFbMixer->cldfb_cross_fade_start = cf_cldfb_start; - hSparFoa->hFbMixer->cldfb_cross_fade_end = cf_cldfb_end; - hSparFoa->hFbMixer->cldfb_latency = decfb_delay; -#else hSpar->hFbMixer->cldfb_cross_fade_start = cf_cldfb_start; hSpar->hFbMixer->cldfb_cross_fade_end = cf_cldfb_end; hSpar->hFbMixer->cldfb_latency = decfb_delay; -#endif if ( num_cf_slots > 3 || pt_len > 10 * CLDFB_NO_CHANNELS_MAX || stride > CLDFB_NO_CHANNELS_MAX || split_band == IVAS_MAX_NUM_BANDS ) { @@ -280,11 +255,7 @@ void ivas_spar_get_cldfb_gains( for ( sample = 0; sample < cf_len; sample++ ) { /* increasing window function */ -#ifndef FIX_SBA_CLEAN_UP_OPT - tgt[tmp_idx++] = hSparFoa->hFbMixer->pFilterbank_cross_fade[sample]; -#else tgt[tmp_idx++] = hSpar->hFbMixer->pFilterbank_cross_fade[sample]; -#endif } for ( ; tmp_idx < num_samples; tmp_idx++ ) @@ -383,152 +354,6 @@ void ivas_spar_get_cldfb_gains( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*------------------------------------------------------------------------- - * ivas_spar_foa_dec_open() - * - * Allocate and initialize SPAR decoder handle for static memory - *------------------------------------------------------------------------*/ - -ivas_error ivas_spar_foa_dec_open( - ivas_spar_foa_dec_state_t **hSparFoa, /* i/o: SPAR FOA decoder handle */ - const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ -#ifdef SBA_CLEANING - const int16_t sba_order, /* i : Ambisonic (SBA) order */ -#endif - const int16_t nchan_internal /* i : number of internal channels */ -) -{ - ivas_spar_foa_dec_state_t *pState; - IVAS_FB_CFG *fb_cfg; - int16_t i, j, b, active_w_mixing; - int32_t output_Fs; - ivas_error error; - - error = IVAS_ERR_OK; - - if ( ( pState = (ivas_spar_foa_dec_state_t *) count_malloc( sizeof( ivas_spar_foa_dec_state_t ) ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR decoder" ); - } - - output_Fs = hDecoderConfig->output_Fs; - - /* TD decorr. */ - if ( ( error = ivas_spar_td_decorr_dec_open( &pState->hTdDecorr, output_Fs, nchan_internal, 1 ) ) != IVAS_ERR_OK ) - { - return error; - } - - /* MD handle */ - if ( ( error = ivas_spar_foa_md_dec_open( &pState->hMdDec, hDecoderConfig, nchan_internal ) ) != IVAS_ERR_OK ) - { - return error; - } - pState->hMdDec->td_decorr_flag = 1; - pState->hMdDec->table_idx = -1; - - /* set FB config. */ - active_w_mixing = -1; - if ( ( error = ivas_fb_set_cfg( &fb_cfg, SBA_FORMAT, SBA_MODE_SPAR, nchan_internal, nchan_internal, active_w_mixing, output_Fs ) ) != IVAS_ERR_OK ) - { - return error; - } - fb_cfg->pcm_offset = NS2SA( output_Fs, DELAY_FB_1_NS + IVAS_ENC_DELAY_NS + IVAS_DEC_DELAY_NS ); - fb_cfg->remix_order = remix_order_set[pState->hMdDec->spar_md_cfg.remix_unmix_order]; - - /* FB mixer handle */ - if ( ( error = ivas_FB_mixer_open( &pState->hFbMixer, output_Fs, fb_cfg ) ) != IVAS_ERR_OK ) - { - return error; - } - - /* AGC */ - if ( ( error = ivas_spar_agc_dec_open( &pState->hAgcDec, output_Fs ) ) != IVAS_ERR_OK ) - { - return error; - } - - /* PCA */ -#ifdef SBA_CLEANING - pState->hPCA = NULL; - if ( hDecoderConfig->ivas_total_brate == PCA_BRATE && sba_order == 1 ) -#endif - { - if ( ( pState->hPCA = (PCA_DEC_STATE *) count_malloc( sizeof( PCA_DEC_STATE ) ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for PCA decoder" ); - } - - ivas_pca_dec_init( pState->hPCA ); - } - - /* mixer_mat intitialization */ - for ( i = 0; i < nchan_internal; i++ ) - { - for ( j = 0; j < nchan_internal; j++ ) - { - for ( b = 0; b < IVAS_MAX_NUM_BANDS; b++ ) - { - pState->hMdDec->mixer_mat[i][j][b] = 0.0f; - for ( int16_t i_ts = 0; i_ts < ( MAX_PARAM_SPATIAL_SUBFRAMES + 1 ); i_ts++ ) - { - pState->hMdDec->mixer_mat_prev[i_ts][i][j][b] = 0.0f; - } - } - } - } - pState->i_subframe = 0; - - *hSparFoa = pState; - - return error; -} - - -/*------------------------------------------------------------------------- - * ivas_spar_foa_dec_close() - * - * Deallocate SPAR decoder handle for static memory - *------------------------------------------------------------------------*/ - -void ivas_spar_foa_dec_close( - ivas_spar_foa_dec_state_t **hSparFoa, /* i/o: SPAR FOA decoder handle */ - const int32_t output_Fs /* i : output sampling rate */ -) -{ - ivas_spar_foa_dec_state_t *pState; - - pState = *hSparFoa; - - if ( pState != NULL ) - { - /* MD handle */ - ivas_spar_foa_md_dec_close( &pState->hMdDec ); - - /* Covar. State handle */ - ivas_spar_td_decorr_dec_close( &pState->hTdDecorr ); - - /* FB mixer handle */ - ivas_FB_mixer_close( &pState->hFbMixer, output_Fs ); - - /* AGC */ - ivas_spar_agc_dec_close( &pState->hAgcDec ); - - /* PCA */ - if ( pState->hPCA != NULL ) - { - count_free( pState->hPCA ); - pState->hPCA = NULL; - } - - count_free( pState ); - pState = NULL; - } - - return; -} -#endif /*---------------------------------------------------------------------* @@ -561,18 +386,6 @@ int16_t ivas_is_res_channel( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-------------------------------------------------------------------* - * ivas_spar_foa_dec_MD() - * - * IVAS SPAR MD decoder - *-------------------------------------------------------------------*/ - -void ivas_spar_foa_dec_MD( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - Decoder_State *st0 /* i/o: decoder state structure - for bitstream handling*/ -) -#else /*-------------------------------------------------------------------* * ivas_spar_dec_MD() * @@ -583,20 +396,13 @@ void ivas_spar_dec_MD( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ Decoder_State *st0 /* i/o: decoder state structure - for bitstream handling*/ ) -#endif { int16_t num_channels, table_idx, num_bands_out, bfi, sba_order; int32_t ivas_total_brate; DECODER_CONFIG_HANDLE hDecoderConfig = st_ivas->hDecoderConfig; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_dec_state_t *pState = st_ivas->hSpar->hSparFoa; - - wmops_sub_start( "ivas_spar_foa_dec_MD" ); -#else SPAR_DEC_HANDLE pState = st_ivas->hSpar; wmops_sub_start( "ivas_spar_dec_MD" ); -#endif /*---------------------------------------------------------------------* * Initialization @@ -621,11 +427,7 @@ void ivas_spar_dec_MD( pState->hMdDec->table_idx = table_idx; pState->hTdDecorr->ducking_flag = ivas_spar_br_table_consts[table_idx].td_ducking; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_dec_init( pState->hMdDec, hDecoderConfig, num_channels ); -#else ivas_spar_md_dec_init( pState->hMdDec, hDecoderConfig, num_channels ); -#endif } } @@ -633,11 +435,7 @@ void ivas_spar_dec_MD( * Decode MD *---------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_dec_process( st_ivas, st0, num_bands_out, sba_order ); -#else ivas_spar_md_dec_process( st_ivas, st0, num_bands_out, sba_order ); -#endif /*---------------------------------------------------------------------* * read PCA bits @@ -673,16 +471,6 @@ void ivas_spar_dec_MD( * MD smoothing *---------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( st0->m_old_frame_type == ZERO_FRAME && ivas_total_brate == IVAS_SID_5k && st0->prev_bfi == 0 && pState->hMdDec->spar_md_cfg.nchan_transport == 1 ) - { - ivas_spar_foa_setup_md_smoothing( pState->hMdDec, num_bands_out ); - } - else - { - ivas_spar_foa_update_md_hist( pState->hMdDec ); - } -#else if ( st0->m_old_frame_type == ZERO_FRAME && ivas_total_brate == IVAS_SID_5k && st0->prev_bfi == 0 && pState->hMdDec->spar_md_cfg.nchan_transport == 1 ) { ivas_spar_setup_md_smoothing( pState->hMdDec, num_bands_out ); @@ -691,17 +479,12 @@ void ivas_spar_dec_MD( { ivas_spar_update_md_hist( pState->hMdDec ); } -#endif } else { if ( !bfi ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_smooth_md_dtx( pState->hMdDec, num_bands_out ); -#else ivas_spar_smooth_md_dtx( pState->hMdDec, num_bands_out ); -#endif } set_s( pState->hMdDec->valid_bands, 0, IVAS_MAX_NUM_BANDS ); @@ -718,15 +501,6 @@ void ivas_spar_dec_MD( * *-------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -static float ivas_spar_get_cldfb_slot_gain( - ivas_spar_foa_dec_state_t *hSparFoa, /* i/o: SPAR FOA decoder handle */ - const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ - const int16_t time_slot_idx, - int16_t *time_slot_idx0, - int16_t *time_slot_idx1, - float *weight_lowfreq ) -#else static float ivas_spar_get_cldfb_slot_gain( SPAR_DEC_HANDLE hSpar, /* i/o: SPAR FOA decoder handle */ const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ @@ -734,13 +508,8 @@ static float ivas_spar_get_cldfb_slot_gain( int16_t *time_slot_idx0, int16_t *time_slot_idx1, float *weight_lowfreq ) -#endif { -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_dec_state_t *pState = hSparFoa; -#else SPAR_DEC_HANDLE pState = hSpar; -#endif float weight; float output_Fs, encfb_delay, decfb_delay; float xfade_start_ns; @@ -761,11 +530,7 @@ static float ivas_spar_get_cldfb_slot_gain( if ( split_band < IVAS_MAX_NUM_BANDS ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( hSparFoa->i_subframe > 3 ) -#else if ( hSpar->i_subframe > 3 ) -#endif { weight = (float) ( time_slot_idx % MAX_PARAM_SPATIAL_SUBFRAMES ) / (float) MAX_PARAM_SPATIAL_SUBFRAMES; } @@ -794,16 +559,6 @@ static float ivas_spar_get_cldfb_slot_gain( * *-------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -void ivas_spar_get_parameters( - ivas_spar_foa_dec_state_t *hSparFoa, /* i/o: SPAR FOA decoder handle */ - const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ - const int16_t ts, - const int16_t num_ch_out, - const int16_t num_ch_in, - const int16_t num_spar_bands, - float par_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS] ) -#else void ivas_spar_get_parameters( SPAR_DEC_HANDLE hSpar, /* i/o: SPAR FOA decoder handle */ const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ @@ -812,17 +567,12 @@ void ivas_spar_get_parameters( const int16_t num_ch_in, const int16_t num_spar_bands, float par_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS] ) -#endif { int16_t spar_band, out_ch, in_ch; float weight, weight_20ms; int16_t ts0, ts1, split_band; -#ifndef FIX_SBA_CLEAN_UP_OPT - weight = ivas_spar_get_cldfb_slot_gain( hSparFoa, hDecoderConfig, ts, &ts0, &ts1, &weight_20ms ); -#else weight = ivas_spar_get_cldfb_slot_gain( hSpar, hDecoderConfig, ts, &ts0, &ts1, &weight_20ms ); -#endif split_band = SPAR_DIRAC_SPLIT_START_BAND; for ( spar_band = 0; spar_band < num_spar_bands; spar_band++ ) @@ -831,29 +581,11 @@ void ivas_spar_get_parameters( { for ( in_ch = 0; in_ch < num_ch_in; in_ch++ ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( split_band < IVAS_MAX_NUM_BANDS - /* 20ms cross-fade for Transport channels in all frequency bands */ - && ( 0 == ivas_is_res_channel( out_ch, hSparFoa->hMdDec->spar_md_cfg.nchan_transport ) ) /* sub-frame processing for missing channels in all frequency bands*/ - ) -#else if ( split_band < IVAS_MAX_NUM_BANDS /* 20ms cross-fade for Transport channels in all frequency bands */ && ( 0 == ivas_is_res_channel( out_ch, hSpar->hMdDec->spar_md_cfg.nchan_transport ) ) /* sub-frame processing for missing channels in all frequency bands*/ ) -#endif { -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( hSparFoa->i_subframe > 3 ) - { - par_mat[out_ch][in_ch][spar_band] = ( 1.0f - weight ) * hSparFoa->hMdDec->mixer_mat_prev[ts0][out_ch][in_ch][spar_band] + - weight * hSparFoa->hMdDec->mixer_mat_prev[ts1][out_ch][in_ch][spar_band]; - } - else - { - par_mat[out_ch][in_ch][spar_band] = hSparFoa->hMdDec->mixer_mat[out_ch][in_ch][spar_band]; - } -#else if ( hSpar->i_subframe > 3 ) { par_mat[out_ch][in_ch][spar_band] = ( 1.0f - weight ) * hSpar->hMdDec->mixer_mat_prev[ts0][out_ch][in_ch][spar_band] + @@ -863,19 +595,12 @@ void ivas_spar_get_parameters( { par_mat[out_ch][in_ch][spar_band] = hSpar->hMdDec->mixer_mat[out_ch][in_ch][spar_band]; } -#endif } else { -#ifndef FIX_SBA_CLEAN_UP_OPT - /* 20ms Transport channel reconstruction with matching encoder/decoder processing */ - int16_t prev_idx = SPAR_DIRAC_SPLIT_START_BAND < IVAS_MAX_NUM_BANDS ? 1 : 0; /* if SPAR_DIRAC_SPLIT_START_BAND == IVAS_MAX_NUM_BANDS, then the sub-frame mixer_mat delay line is not active */ - par_mat[out_ch][in_ch][spar_band] = ( 1.0f - weight_20ms ) * hSparFoa->hMdDec->mixer_mat_prev[prev_idx][out_ch][in_ch][spar_band] + weight_20ms * hSparFoa->hMdDec->mixer_mat[out_ch][in_ch][spar_band]; -#else /* 20ms Transport channel reconstruction with matching encoder/decoder processing */ int16_t prev_idx = SPAR_DIRAC_SPLIT_START_BAND < IVAS_MAX_NUM_BANDS ? 1 : 0; /* if SPAR_DIRAC_SPLIT_START_BAND == IVAS_MAX_NUM_BANDS, then the sub-frame mixer_mat delay line is not active */ par_mat[out_ch][in_ch][spar_band] = ( 1.0f - weight_20ms ) * hSpar->hMdDec->mixer_mat_prev[prev_idx][out_ch][in_ch][spar_band] + weight_20ms * hSpar->hMdDec->mixer_mat[out_ch][in_ch][spar_band]; -#endif } } } @@ -891,21 +616,12 @@ void ivas_spar_get_parameters( * *-------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -static void ivas_spar_get_skip_mat( - ivas_spar_foa_dec_state_t *hSparFoa, /* i/o: SPAR FOA decoder handle */ - const int16_t num_ch_out, - const int16_t num_ch_in, - const int16_t num_spar_bands, - int16_t skip_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH] ) -#else static void ivas_spar_get_skip_mat( SPAR_DEC_HANDLE hSpar, /* i/o: SPAR FOA decoder handle */ const int16_t num_ch_out, const int16_t num_ch_in, const int16_t num_spar_bands, int16_t skip_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH] ) -#endif { int16_t spar_band, out_ch, in_ch; int16_t i_ts, skip_flag; @@ -921,11 +637,7 @@ static void ivas_spar_get_skip_mat( { for ( spar_band = 0; spar_band < num_spar_bands; spar_band++ ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( hSparFoa->hMdDec->mixer_mat_prev[1 + i_ts][out_ch][in_ch][spar_band] != 0.0f || hSparFoa->hMdDec->mixer_mat[out_ch][in_ch][spar_band + i_ts * MAX_PARAM_SPATIAL_SUBFRAMES] != 0.0f ) -#else if ( hSpar->hMdDec->mixer_mat_prev[1 + i_ts][out_ch][in_ch][spar_band] != 0.0f || hSpar->hMdDec->mixer_mat[out_ch][in_ch][spar_band + i_ts * MAX_PARAM_SPATIAL_SUBFRAMES] != 0.0f ) -#endif { skip_flag = 0; break; @@ -945,20 +657,6 @@ static void ivas_spar_get_skip_mat( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-------------------------------------------------------------------* - * ivas_spar_foa_dec_upmixer() - * - * IVAS SPAR FOA upmixer - *-------------------------------------------------------------------*/ - -void ivas_spar_foa_dec_upmixer( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - float output[][L_FRAME48k], /* i/o: input/output audio channels */ - const int16_t nchan_internal, /* i : number of internal channels */ - const int16_t output_frame /* i : output frame length */ -) -#else /*-------------------------------------------------------------------* * ivas_spar_foa_dec_upmixer() * @@ -971,7 +669,6 @@ void ivas_spar_dec_upmixer( const int16_t nchan_internal, /* i : number of internal channels */ const int16_t output_frame /* i : output frame length */ ) -#endif { int16_t cldfb_band, num_cldfb_bands, numch_in, numch_out; float *cldfb_in_ts_re[MAX_OUTPUT_CHANNELS][CLDFB_NO_COL_MAX]; @@ -985,38 +682,19 @@ void ivas_spar_dec_upmixer( float mixer_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS]; int16_t b_skip_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH]; DECODER_CONFIG_HANDLE hDecoderConfig; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_dec_state_t *pState, *hSparFoa; -#else SPAR_DEC_HANDLE pState, hSpar; -#endif -#ifndef FIX_SBA_CLEAN_UP_OPT - wmops_sub_start( "ivas_spar_foa_dec_upmixer" ); -#else wmops_sub_start( "ivas_spar_dec_upmixer" ); -#endif -#ifndef FIX_SBA_CLEAN_UP_OPT - hSparFoa = st_ivas->hSpar->hSparFoa; - pState = hSparFoa; -#else hSpar = st_ivas->hSpar; pState = hSpar; -#endif hDecoderConfig = st_ivas->hDecoderConfig; num_bands_out = pState->hFbMixer->pFb->filterbank_num_bands; nchan_transport = pState->hMdDec->spar_md_cfg.nchan_transport; -#ifndef FIX_SBA_CLEAN_UP_OPT - num_cldfb_bands = hSparFoa->hFbMixer->pFb->fb_bin_to_band.num_cldfb_bands; - numch_in = hSparFoa->hFbMixer->fb_cfg->num_in_chans; - numch_out = hSparFoa->hFbMixer->fb_cfg->num_out_chans; -#else num_cldfb_bands = hSpar->hFbMixer->pFb->fb_bin_to_band.num_cldfb_bands; numch_in = hSpar->hFbMixer->fb_cfg->num_in_chans; numch_out = hSpar->hFbMixer->fb_cfg->num_out_chans; -#endif #ifdef DEBUG_SPAR_FOA if ( fFb_pcm != NULL ) @@ -1157,30 +835,18 @@ void ivas_spar_dec_upmixer( * Gen umx mat *---------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_dec_gen_umx_mat( pState->hMdDec, nchan_transport, num_bands_out, st_ivas->bfi ); -#else ivas_spar_dec_gen_umx_mat( pState->hMdDec, nchan_transport, num_bands_out, st_ivas->bfi ); -#endif /*---------------------------------------------------------------------* * CLDFB Processing and Synthesis *---------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT - num_spar_bands = hSparFoa->hFbMixer->pFb->filterbank_num_bands; -#else num_spar_bands = hSpar->hFbMixer->pFb->filterbank_num_bands; -#endif /* apply parameters */ /* determine if we can skip certain data */ -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_get_skip_mat( hSparFoa, numch_out, numch_in, num_spar_bands, b_skip_mat ); /* this can be precomputed based on bitrate and format*/ -#else ivas_spar_get_skip_mat( hSpar, numch_out, numch_in, num_spar_bands, b_skip_mat ); /* this can be precomputed based on bitrate and format*/ -#endif numch_out_dirac = st_ivas->hDecoderConfig->nchan_out; @@ -1203,11 +869,7 @@ void ivas_spar_dec_upmixer( for ( ts = 0; ts < MAX_PARAM_SPATIAL_SUBFRAMES; ts++ ) { /* determine SPAR parameters for this time slots */ -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_get_parameters( hSparFoa, hDecoderConfig, ts + i_sf * MAX_PARAM_SPATIAL_SUBFRAMES, numch_out, numch_in, num_spar_bands, mixer_mat ); -#else ivas_spar_get_parameters( hSpar, st_ivas->hDecoderConfig, ts + i_sf * MAX_PARAM_SPATIAL_SUBFRAMES, numch_out, numch_in, num_spar_bands, mixer_mat ); -#endif for ( cldfb_band = 0; cldfb_band < num_cldfb_bands; cldfb_band++ ) { diff --git a/lib_dec/ivas_spar_foa_md_dec.c b/lib_dec/ivas_spar_foa_md_dec.c index 79007c54f7..56fdf91bcf 100644 --- a/lib_dec/ivas_spar_foa_md_dec.c +++ b/lib_dec/ivas_spar_foa_md_dec.c @@ -64,19 +64,11 @@ static const int16_t ivas_spar_dec_plc_spatial_target[IVAS_SPAR_MAX_CH] = { 1, 0 * Static functions declaration *------------------------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -static void ivas_get_spar_matrices( ivas_spar_foa_md_dec_state_t *pState, const int16_t num_bands_out, const int16_t n_ts, const int16_t bw, const int16_t dtx_vad, const int16_t nB, const int16_t sba_order ); - -static void ivas_decode_arith_bs( ivas_spar_foa_md_dec_state_t *pState, Decoder_State *st, const uint16_t qsi, const int16_t nB, const int16_t bands_bw, int16_t *pDo_diff, const int16_t freq_diff, const int16_t planarCP ); - -static void ivas_decode_huffman_bs( ivas_spar_foa_md_dec_state_t *pState, Decoder_State *st, const uint16_t qsi, const int16_t nB, const int16_t bands_bw, const int16_t planarCP ); -#else static void ivas_get_spar_matrices( ivas_spar_md_dec_state_t *pState, const int16_t num_bands_out, const int16_t n_ts, const int16_t bw, const int16_t dtx_vad, const int16_t nB, const int16_t sba_order ); static void ivas_decode_arith_bs( ivas_spar_md_dec_state_t *pState, Decoder_State *st, const uint16_t qsi, const int16_t nB, const int16_t bands_bw, int16_t *pDo_diff, const int16_t freq_diff, const int16_t planarCP ); static void ivas_decode_huffman_bs( ivas_spar_md_dec_state_t *pState, Decoder_State *st, const uint16_t qsi, const int16_t nB, const int16_t bands_bw, const int16_t planarCP ); -#endif static void ivas_fill_band_coeffs_idx( ivas_band_coeffs_ind_t *pBands_idx, const int16_t nB, int16_t *pSymbol_re, ivas_cell_dim_t *pCell_dims, ivas_coeffs_type_t coeff_type, const int16_t planarCP ); @@ -84,43 +76,19 @@ static void ivas_get_band_idx_from_differential( ivas_spar_md_t *pSpar_md, const static void ivas_mat_col_rearrange( float in_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], const int16_t order[IVAS_SPAR_MAX_CH], const int16_t i_ts, float ***mixer_mat, const int16_t bands, const int16_t num_ch ); -#ifndef FIX_SBA_CLEAN_UP_OPT -static void ivas_spar_foa_dec_compute_ramp_down_post_matrix( ivas_spar_foa_md_dec_state_t *pState, const int16_t num_bands, const int16_t bfi ); -#else static void ivas_spar_dec_compute_ramp_down_post_matrix( ivas_spar_md_dec_state_t *pState, const int16_t num_bands, const int16_t bfi ); -#endif static void ivas_spar_md_fill_invalid_bands( ivas_spar_dec_matrices_t *pSpar_coeffs, ivas_spar_dec_matrices_t *pSpar_coeffs_prev, int16_t *valid_bands, int16_t *base_band_age, const int16_t num_bands, const int16_t sba_order ); -#ifndef FIX_SBA_CLEAN_UP_OPT -static ivas_error ivas_spar_foa_set_dec_config( ivas_spar_foa_md_dec_state_t *pState, const int16_t nchan_transport, float *pFC ); -#else static ivas_error ivas_spar_set_dec_config( ivas_spar_md_dec_state_t *pState, const int16_t nchan_transport, float *pFC ); -#endif static void ivas_parse_parameter_bitstream_dtx( ivas_spar_md_t *pSpar_md, Decoder_State *st, const int16_t bw, const int16_t num_bands, int16_t *num_dmx_per_band, int16_t *num_dec_per_band ); static ivas_error ivas_deindex_real_index( int16_t **index, const int16_t q_levels, const float min_value, const float max_value, float **quant, const int16_t num_ch, const int16_t dim2 ); -#ifndef FIX_SBA_CLEAN_UP_OPT -static void ivas_spar_foa_dec_parse_md_bs( ivas_spar_foa_md_dec_state_t *hMdDec, Decoder_State *st, int16_t *nB, int16_t *bands_bw, int16_t *dtx_vad, const int32_t ivas_total_brate, const int16_t use_planar_coeff, const int16_t sba_inactive_mode ); -#else static void ivas_spar_foa_dec_parse_md_bs( ivas_spar_md_dec_state_t *hMdDec, Decoder_State *st, int16_t *nB, int16_t *bands_bw, int16_t *dtx_vad, const int32_t ivas_total_brate, const int16_t use_planar_coeff, const int16_t sba_inactive_mode ); -#endif - -#ifndef FIX_SBA_CLEAN_UP_OPT -/*------------------------------------------------------------------------- - * ivas_spar_foa_md_dec_matrix_open() - * - * Allocate and initialize SPAR MD decoder matrices - *------------------------------------------------------------------------*/ -static ivas_error ivas_spar_foa_md_dec_matrix_open( - ivas_spar_foa_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ - const int16_t num_channels /* i : number of internal channels */ -) -#else /*------------------------------------------------------------------------- * ivas_spar_md_dec_matrix_open() * @@ -131,16 +99,13 @@ static ivas_error ivas_spar_md_dec_matrix_open( ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ const int16_t num_channels /* i : number of internal channels */ ) -#endif { int16_t i, j; -#ifdef FIX_SBA_CLEAN_UP_OPT if ( ( hMdDec->spar_md.band_coeffs = (ivas_band_coeffs_t *) count_malloc( IVAS_MAX_NUM_BANDS * MAX_PARAM_SPATIAL_SUBFRAMES * sizeof( ivas_band_coeffs_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for band_coeffs in SPAR MD" ); } -#endif if ( ( hMdDec->mixer_mat = (float ***) count_malloc( num_channels * sizeof( float ** ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); @@ -210,17 +175,10 @@ static ivas_error ivas_spar_md_dec_matrix_open( } for ( j = 0; j < num_channels; j++ ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( ( hMdDec->spar_coeffs_prev.C_re[i][j] = (float *) count_malloc( MAX_PARAM_SPATIAL_SUBFRAMES * IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); - } -#else if ( ( hMdDec->spar_coeffs_prev.C_re[i][j] = (float *) count_malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } -#endif } } @@ -236,17 +194,10 @@ static ivas_error ivas_spar_md_dec_matrix_open( } for ( j = 0; j < num_channels; j++ ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( ( hMdDec->spar_coeffs_prev.P_re[i][j] = (float *) count_malloc( MAX_PARAM_SPATIAL_SUBFRAMES * IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); - } -#else if ( ( hMdDec->spar_coeffs_prev.P_re[i][j] = (float *) count_malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } -#endif } } @@ -262,17 +213,10 @@ static ivas_error ivas_spar_md_dec_matrix_open( } for ( j = 0; j < num_channels; j++ ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( ( hMdDec->spar_coeffs_tar.C_re[i][j] = (float *) count_malloc( MAX_PARAM_SPATIAL_SUBFRAMES * IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); - } -#else if ( ( hMdDec->spar_coeffs_tar.C_re[i][j] = (float *) count_malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } -#endif } } @@ -288,17 +232,10 @@ static ivas_error ivas_spar_md_dec_matrix_open( } for ( j = 0; j < num_channels; j++ ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( ( hMdDec->spar_coeffs_tar.P_re[i][j] = (float *) count_malloc( MAX_PARAM_SPATIAL_SUBFRAMES * IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); - } -#else if ( ( hMdDec->spar_coeffs_tar.P_re[i][j] = (float *) count_malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } -#endif } } @@ -306,19 +243,6 @@ static ivas_error ivas_spar_md_dec_matrix_open( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*------------------------------------------------------------------------- - * ivas_spar_foa_md_dec_open() - * - * Allocate and initialize SPAR MD decoder handle - *------------------------------------------------------------------------*/ - -ivas_error ivas_spar_foa_md_dec_open( - ivas_spar_foa_md_dec_state_t **hMdDec_out, /* i/o: SPAR MD decoder handle */ - const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ - const int16_t num_channels /* i : number of internal channels */ -) -#else /*------------------------------------------------------------------------- * ivas_spar_md_dec_open() * @@ -330,54 +254,28 @@ ivas_error ivas_spar_md_dec_open( const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ const int16_t num_channels /* i : number of internal channels */ ) -#endif { -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_dec_state_t *hMdDec; -#else ivas_spar_md_dec_state_t *hMdDec; -#endif ivas_error error; error = IVAS_ERR_OK; -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( ( hMdDec = (ivas_spar_foa_md_dec_state_t *) count_malloc( sizeof( ivas_spar_foa_md_dec_state_t ) ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD decoder" ); - } -#else if ( ( hMdDec = (ivas_spar_md_dec_state_t *) count_malloc( sizeof( ivas_spar_md_dec_state_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD decoder" ); } -#endif -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( ( error = ivas_spar_foa_md_dec_matrix_open( hMdDec, num_channels ) ) != IVAS_ERR_OK ) - { - return error; - } -#else if ( ( error = ivas_spar_md_dec_matrix_open( hMdDec, num_channels ) ) != IVAS_ERR_OK ) { return error; } -#endif hMdDec->table_idx = 0; /* just to initialize state variables*/ -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( ( error = ivas_spar_foa_md_dec_init( hMdDec, hDecoderConfig, num_channels ) ) != IVAS_ERR_OK ) - { - return error; - } -#else if ( ( error = ivas_spar_md_dec_init( hMdDec, hDecoderConfig, num_channels ) ) != IVAS_ERR_OK ) { return error; } -#endif *hMdDec_out = hMdDec; @@ -391,27 +289,18 @@ ivas_error ivas_spar_md_dec_open( * Deallocate SPAR MD decoder matrices *------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -static void ivas_spar_foa_md_dec_matrix_close( - ivas_spar_foa_md_dec_state_t *hMdDecoder, /* i/o: SPAR MD decoder handle */ - const int16_t num_channels /* i : number of internal channels */ -) -#else static void ivas_spar_foa_md_dec_matrix_close( ivas_spar_md_dec_state_t *hMdDecoder, /* i/o: SPAR MD decoder handle */ const int16_t num_channels /* i : number of internal channels */ ) -#endif { int16_t i, j; -#ifdef FIX_SBA_CLEAN_UP_OPT if ( hMdDecoder->spar_md.band_coeffs != NULL ) { count_free( hMdDecoder->spar_md.band_coeffs ); hMdDecoder->spar_md.band_coeffs = NULL; } -#endif if ( hMdDecoder->mixer_mat != NULL ) { for ( i = 0; i < num_channels; i++ ) @@ -507,17 +396,6 @@ static void ivas_spar_foa_md_dec_matrix_close( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*------------------------------------------------------------------------- - * ivas_spar_foa_md_dec_close() - * - * Deallocate SPAR MD decoder handle - *------------------------------------------------------------------------*/ - -void ivas_spar_foa_md_dec_close( - ivas_spar_foa_md_dec_state_t **hMdDec /* i/o: SPAR MD decoder handle */ -) -#else /*------------------------------------------------------------------------- * ivas_spar_md_dec_close() * @@ -527,13 +405,8 @@ void ivas_spar_foa_md_dec_close( void ivas_spar_md_dec_close( ivas_spar_md_dec_state_t **hMdDec /* i/o: SPAR MD decoder handle */ ) -#endif { -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_dec_state_t *hMdDecoder; -#else ivas_spar_md_dec_state_t *hMdDecoder; -#endif int16_t num_channels; hMdDecoder = *hMdDec; @@ -551,19 +424,6 @@ void ivas_spar_md_dec_close( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_spar_foa_md_dec_init() - * - * Init call for md dec process - *-----------------------------------------------------------------------------------------*/ - -ivas_error ivas_spar_foa_md_dec_init( - ivas_spar_foa_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ - const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ - const int16_t num_channels /* i : number of internal channels */ -) -#else /*-----------------------------------------------------------------------------------------* * Function ivas_spar_md_dec_init() * @@ -575,16 +435,11 @@ ivas_error ivas_spar_md_dec_init( const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ const int16_t num_channels /* i : number of internal channels */ ) -#endif { int16_t i, j, k; int16_t nchan_transport; float pFC[IVAS_MAX_NUM_BANDS], PR_minmax[2]; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_dec_state_t *pState = hMdDec; -#else ivas_spar_md_dec_state_t *pState = hMdDec; -#endif pState->spar_md_cfg.gen_bs = 1; ivas_spar_set_bitrate_config( &pState->spar_md_cfg, pState->table_idx, min( IVAS_MAX_NUM_BANDS, SPAR_DIRAC_SPLIT_START_BAND ) ); @@ -597,11 +452,7 @@ ivas_error ivas_spar_md_dec_init( pFC[i] = ivas_fb_fcs_12band_1ms[i] * hDecoderConfig->output_Fs * 0.5f; } -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_set_dec_config( pState, nchan_transport, pFC ); -#else ivas_spar_set_dec_config( pState, nchan_transport, pFC ); -#endif if ( nchan_transport != 2 && ( ( pState->spar_md_cfg.remix_unmix_order == 2 ) || ( pState->spar_md_cfg.remix_unmix_order == 1 ) ) ) { @@ -613,13 +464,8 @@ ivas_error ivas_spar_md_dec_init( PR_minmax[1] = pState->spar_md_cfg.quant_strat[0].PR.max; ivas_spar_quant_dtx_init( &pState->spar_md, PR_minmax ); -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_arith_coeffs_dec_init( &pState->arith_coeffs, &pState->spar_md_cfg, pState->table_idx ); - ivas_huff_coeffs_dec_init( &pState->huff_coeffs, &pState->spar_md_cfg, pState->table_idx ); -#else ivas_spar_arith_coeffs_com_init( &pState->arith_coeffs, &pState->spar_md_cfg, pState->table_idx, DEC ); ivas_spar_huff_coeffs_com_init( &pState->huff_coeffs, &pState->spar_md_cfg, pState->table_idx, DEC ); -#endif pState->spar_md_cfg.prev_quant_idx = -1; @@ -691,18 +537,6 @@ ivas_error ivas_spar_md_dec_init( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_spar_foa_set_dec_config() - * - * Set configuration for SPAR FOA md dec - *-----------------------------------------------------------------------------------------*/ - -static ivas_error ivas_spar_foa_set_dec_config( - ivas_spar_foa_md_dec_state_t *pState, - const int16_t nchan_transport, - float *pFC ) -#else /*-----------------------------------------------------------------------------------------* * Function ivas_spar_set_dec_config() * @@ -713,7 +547,6 @@ static ivas_error ivas_spar_set_dec_config( ivas_spar_md_dec_state_t *pState, const int16_t nchan_transport, float *pFC ) -#endif { int16_t i, j, nchan, dmx_ch; @@ -767,20 +600,6 @@ static ivas_error ivas_spar_set_dec_config( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_spar_foa_md_dec_process() - * - * SPAR FOA Meta Data decoder process - *-----------------------------------------------------------------------------------------*/ - -void ivas_spar_foa_md_dec_process( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - Decoder_State *st0, /* i/o: decoder state structure - for bitstream handling*/ - const int16_t num_bands_out, /* i : number of output bands */ - const int16_t sba_order /* i : Ambisonic (SBA) order */ -) -#else /*-----------------------------------------------------------------------------------------* * Function ivas_spar_foa_md_dec_process() * @@ -793,18 +612,9 @@ void ivas_spar_md_dec_process( const int16_t num_bands_out, /* i : number of output bands */ const int16_t sba_order /* i : Ambisonic (SBA) order */ ) -#endif { int16_t j, b, bw, dtx_vad, nB, i_ts; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_dec_state_t *hMdDec = st_ivas->hSpar->hSparFoa->hMdDec; -#else -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_dec_state_t *hMdDec = st_ivas->hSpar->hMdDec; -#else ivas_spar_md_dec_state_t *hMdDec = st_ivas->hSpar->hMdDec; -#endif -#endif ivas_spar_foa_dec_parse_md_bs( hMdDec, st0, &nB, &bw, &dtx_vad, st_ivas->hDecoderConfig->ivas_total_brate, ivas_spar_br_table_consts[hMdDec->table_idx].usePlanarCoeff, @@ -875,20 +685,6 @@ void ivas_spar_md_dec_process( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_spar_foa_smooth_md_dtx() - * - * Smooth MD during no data frame during DTX - *-----------------------------------------------------------------------------------------*/ -#ifdef SPAR_HOA_DBG -/* NOTE: No changes here as DTX only operates below 160kbps */ -#endif -void ivas_spar_foa_smooth_md_dtx( - ivas_spar_foa_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ - const int16_t num_bands_out /* i : number of output bands */ -) -#else /*-----------------------------------------------------------------------------------------* * Function ivas_spar_foa_smooth_md_dtx() * @@ -901,15 +697,10 @@ void ivas_spar_smooth_md_dtx( ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ const int16_t num_bands_out /* i : number of output bands */ ) -#endif { int16_t j, k, b; int16_t dmx_ch; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_dec_state_t *pState = hMdDec; -#else ivas_spar_md_dec_state_t *pState = hMdDec; -#endif float ramp, tar, prev, new_val; ramp = (float) pState->dtx_md_smoothing_cntr / IVAS_DEFAULT_DTX_CNG_RAMP; @@ -974,18 +765,6 @@ void ivas_spar_smooth_md_dtx( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_spar_foa_setup_md_smoothing() - * - * Set up smoothing of SPAR MD when SID update frame is received - *-----------------------------------------------------------------------------------------*/ - -void ivas_spar_foa_setup_md_smoothing( - ivas_spar_foa_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ - const int16_t num_bands_out /* i : number of output bands */ -) -#else /*-----------------------------------------------------------------------------------------* * Function ivas_spar_setup_md_smoothing() * @@ -996,7 +775,6 @@ void ivas_spar_setup_md_smoothing( ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ const int16_t num_bands_out /* i : number of output bands */ ) -#endif { /* copy the coeffs */ int16_t num_channels, i, j, k; @@ -1047,26 +825,12 @@ void ivas_spar_setup_md_smoothing( } } -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_smooth_md_dtx( hMdDec, num_bands_out ); -#else ivas_spar_smooth_md_dtx( hMdDec, num_bands_out ); -#endif return; } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_spar_update_md_hist() - * - * Update previous and target MD - *-----------------------------------------------------------------------------------------*/ - -void ivas_spar_foa_update_md_hist( - ivas_spar_foa_md_dec_state_t *hMdDec ) -#else /*-----------------------------------------------------------------------------------------* * Function ivas_spar_update_md_hist() * @@ -1075,7 +839,6 @@ void ivas_spar_foa_update_md_hist( void ivas_spar_update_md_hist( ivas_spar_md_dec_state_t *hMdDec ) -#endif { int16_t num_channels, i, j, k; @@ -1135,16 +898,6 @@ void ivas_spar_update_md_hist( * Get SPAR matrices *-----------------------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -static void ivas_get_spar_matrices( - ivas_spar_foa_md_dec_state_t *pState, - const int16_t num_bands_out, - const int16_t n_ts, - const int16_t bw, - const int16_t dtx_vad, - const int16_t nB, - const int16_t sba_order ) -#else static void ivas_get_spar_matrices( ivas_spar_md_dec_state_t *pState, const int16_t num_bands_out, @@ -1153,7 +906,6 @@ static void ivas_get_spar_matrices( const int16_t dtx_vad, const int16_t nB, const int16_t sba_order ) -#endif { int16_t numch_out, num_bands, dmx_ch; int16_t i, j, k, m, b, i_ts, active_w; @@ -1535,20 +1287,6 @@ static void ivas_mat_col_rearrange( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_spar_foa_dec_gen_umx_mat() - * - * generates upmix matrix - *-----------------------------------------------------------------------------------------*/ - -void ivas_spar_foa_dec_gen_umx_mat( - ivas_spar_foa_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ - const int16_t nchan_transport, /* i : number of transport channels */ - const int16_t num_bands_out, /* i : number of output bands */ - const int16_t bfi /* i : bad frame indicator */ -) -#else /*-----------------------------------------------------------------------------------------* * Function ivas_spar_dec_gen_umx_mat() * @@ -1561,16 +1299,11 @@ void ivas_spar_dec_gen_umx_mat( const int16_t num_bands_out, /* i : number of output bands */ const int16_t bfi /* i : bad frame indicator */ ) -#endif { int16_t i, j, b, i_ts; int16_t fb_ducking_flag = 0; int16_t num_out_ch = hMdDec->spar_md_cfg.num_umx_chs; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_dec_state_t *pState = hMdDec; -#else ivas_spar_md_dec_state_t *pState = hMdDec; -#endif for ( i_ts = 0; i_ts < MAX_PARAM_SPATIAL_SUBFRAMES; i_ts++ ) { @@ -1634,33 +1367,12 @@ void ivas_spar_dec_gen_umx_mat( }*/ #endif -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_dec_compute_ramp_down_post_matrix( pState, num_bands_out, bfi ); -#else ivas_spar_dec_compute_ramp_down_post_matrix( pState, num_bands_out, bfi ); -#endif return; } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_spar_foa_dec_parse_md_bs() - * - * Parses MD bitstream - *-----------------------------------------------------------------------------------------*/ - -static void ivas_spar_foa_dec_parse_md_bs( - ivas_spar_foa_md_dec_state_t *hMdDec, - Decoder_State *st0, - int16_t *nB, - int16_t *bands_bw, - int16_t *dtx_vad, - const int32_t ivas_total_brate, - const int16_t use_planar_coeff, - const int16_t sba_inactive_mode ) -#else /*-----------------------------------------------------------------------------------------* * Function ivas_spar_foa_dec_parse_md_bs() * @@ -1676,16 +1388,11 @@ static void ivas_spar_foa_dec_parse_md_bs( const int32_t ivas_total_brate, const int16_t use_planar_coeff, const int16_t sba_inactive_mode ) -#endif { int16_t i, j, k, num_bands; uint16_t qsi; ivas_quant_strat_t qs; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_dec_state_t *pState = hMdDec; -#else ivas_spar_md_dec_state_t *pState = hMdDec; -#endif int16_t strat, freq_diff, no_ec; int16_t do_diff[IVAS_MAX_NUM_BANDS]; int16_t planarCP = 0; @@ -2029,11 +1736,7 @@ static void ivas_spar_foa_dec_parse_md_bs( *-----------------------------------------------------------------------------------------*/ static void ivas_decode_arith_bs( -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_dec_state_t *pState, -#else ivas_spar_md_dec_state_t *pState, -#endif Decoder_State *st0, /* i/o: decoder state structure - for bitstream handling*/ const uint16_t qsi, const int16_t nB, @@ -2310,15 +2013,6 @@ static void ivas_fill_band_coeffs_idx( * decode bitstream with huffman decoder *-----------------------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -static void ivas_decode_huffman_bs( - ivas_spar_foa_md_dec_state_t *pState, - Decoder_State *st0, /* i/o: decoder state structure - for bitstream handling*/ - const uint16_t qsi, - const int16_t nB, - const int16_t bands_bw, - const int16_t planarCP ) -#else static void ivas_decode_huffman_bs( ivas_spar_md_dec_state_t *pState, Decoder_State *st0, /* i/o: decoder state structure - for bitstream handling*/ @@ -2326,7 +2020,6 @@ static void ivas_decode_huffman_bs( const int16_t nB, const int16_t bands_bw, const int16_t planarCP ) -#endif { int16_t i, j; @@ -2503,19 +2196,6 @@ static void ivas_spar_md_fill_invalid_bands( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* -* Function ivas_spar_foa_dec_compute_ramp_down_post_matrix() -* -* ivas_spar_foa_dec_compute_ramp_down_post_matrix - -*-----------------------------------------------------------------------------------------*/ - -static void ivas_spar_foa_dec_compute_ramp_down_post_matrix( - ivas_spar_foa_md_dec_state_t *pState, - const int16_t num_bands_out, - const int16_t bfi ) -#else /*-----------------------------------------------------------------------------------------* * Function ivas_spar_dec_compute_ramp_down_post_matrix() * @@ -2527,7 +2207,6 @@ static void ivas_spar_dec_compute_ramp_down_post_matrix( ivas_spar_md_dec_state_t *pState, const int16_t num_bands_out, const int16_t bfi ) -#endif { int16_t num_in_ch, num_out_ch, i, j, b; @@ -2823,21 +2502,12 @@ static ivas_error ivas_deindex_real_index( * *-----------------------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -void ivas_spar_to_dirac( - Decoder_Struct *st_ivas, - ivas_spar_foa_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ - const int16_t dtx_vad, /* i : DTX frame flag */ - const int16_t num_bands_out /* i : number of output bands */ -) -#else void ivas_spar_to_dirac( Decoder_Struct *st_ivas, ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ const int16_t dtx_vad, /* i : DTX frame flag */ const int16_t num_bands_out /* i : number of output bands */ ) -#endif { DIRAC_DEC_HANDLE hDirAC; int16_t start_band, end_band, band, qmf_band_start, qmf_band_end; @@ -2869,13 +2539,8 @@ void ivas_spar_to_dirac( end_band = min( num_bands_out, SPAR_DIRAC_SPLIT_START_BAND ); hDirAC = st_ivas->hDirAC; -#ifndef FIX_SBA_CLEAN_UP_OPT - dirac_to_spar_md_bands = st_ivas->hSpar->hSparFoa->dirac_to_spar_md_bands; - enc_param_start_band = st_ivas->hSpar->hSparFoa->enc_param_start_band; -#else dirac_to_spar_md_bands = st_ivas->hSpar->dirac_to_spar_md_bands; enc_param_start_band = st_ivas->hSpar->enc_param_start_band; -#endif if ( hDirAC != NULL ) { diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index e7bb2e1267..e09632c1f5 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -788,32 +788,6 @@ typedef struct ivas_spar_dec_matrices_t } ivas_spar_dec_matrices_t; -#ifndef FIX_SBA_CLEAN_UP_OPT -typedef struct ivas_spar_foa_md_dec_state_t -{ - ivas_spar_md_t spar_md; - ivas_spar_md_prev_t spar_md_prev; - ivas_spar_dec_matrices_t spar_coeffs; - ivas_spar_dec_matrices_t spar_coeffs_prev; - ivas_spar_dec_matrices_t spar_coeffs_tar; - int16_t dtx_md_smoothing_cntr; - int16_t valid_bands[IVAS_MAX_NUM_BANDS]; - int16_t base_band_age[IVAS_MAX_NUM_BANDS]; - int16_t spar_plc_num_lost_frames; - int16_t num_decorr; - int16_t td_decorr_flag; - int16_t spar_plc_enable_fadeout_flag; - float ***mixer_mat; - /*TODO : reuse hFbMixer->prior_mixer for this as that buffer is unused in decoder with FB_HARMONIZATION*/ - float mixer_mat_prev[MAX_PARAM_SPATIAL_SUBFRAMES + 1][IVAS_MAX_FB_MIXER_OUT_CH][IVAS_MAX_SPAR_FB_MIXER_IN_CH][IVAS_MAX_NUM_BANDS]; - ivas_spar_foa_md_com_cfg spar_md_cfg; - ivas_arith_coeffs_t arith_coeffs; - ivas_huff_coeffs_t huff_coeffs; - int16_t table_idx; - int16_t dtx_vad; - -} ivas_spar_foa_md_dec_state_t; -#else typedef struct ivas_spar_md_dec_state_t { ivas_spar_md_t spar_md; @@ -838,7 +812,6 @@ typedef struct ivas_spar_md_dec_state_t int16_t dtx_vad; } ivas_spar_md_dec_state_t; -#endif /* AGC structure */ @@ -893,29 +866,6 @@ typedef struct } PCA_DEC_STATE; /* SPAR FOA structures */ -#ifndef FIX_SBA_CLEAN_UP_OPT -typedef struct ivas_spar_foa_dec_state_t -{ - ivas_td_decorr_state_t *hTdDecorr; - ivas_spar_foa_md_dec_state_t *hMdDec; - IVAS_FB_MIXER_HANDLE hFbMixer; - int16_t AGC_flag; - ivas_agc_dec_state_t *hAgcDec; - PCA_DEC_STATE *hPCA; - int16_t dirac_to_spar_md_bands[DIRAC_MAX_NBANDS]; - int16_t enc_param_start_band; - - int32_t core_nominal_brate; /* Nominal bitrate for core coding */ - int32_t i_subframe; -} ivas_spar_foa_dec_state_t; - -/* main SPAR decoder structure */ -typedef struct ivas_spar_dec_lib_t -{ - ivas_spar_foa_dec_state_t *hSparFoa; - -} SPAR_DEC_DATA, *SPAR_DEC_HANDLE; -#else /* main SPAR decoder structure */ typedef struct ivas_spar_dec_lib_t { @@ -930,7 +880,6 @@ typedef struct ivas_spar_dec_lib_t int32_t core_nominal_brate; /* Nominal bitrate for core coding */ int32_t i_subframe; } SPAR_DEC_DATA, *SPAR_DEC_HANDLE; -#endif /*----------------------------------------------------------------------------------* diff --git a/lib_enc/ivas_dirac_enc.c b/lib_enc/ivas_dirac_enc.c index 6ca568f7db..3660dec23b 100644 --- a/lib_enc/ivas_dirac_enc.c +++ b/lib_enc/ivas_dirac_enc.c @@ -181,13 +181,8 @@ ivas_error ivas_dirac_enc_open( if ( st_ivas->sba_mode == SBA_MODE_SPAR ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - mvs2s( st_ivas->hDirAC->dirac_to_spar_md_bands, st_ivas->hSpar->hSparFoa->dirac_to_spar_md_bands, DIRAC_MAX_NBANDS ); - st_ivas->hSpar->hSparFoa->enc_param_start_band = st_ivas->hDirAC->hConfig->enc_param_start_band; -#else mvs2s( st_ivas->hDirAC->dirac_to_spar_md_bands, st_ivas->hSpar->dirac_to_spar_md_bands, DIRAC_MAX_NBANDS ); st_ivas->hSpar->enc_param_start_band = st_ivas->hDirAC->hConfig->enc_param_start_band; -#endif } return error; diff --git a/lib_enc/ivas_entropy_coder.c b/lib_enc/ivas_entropy_coder.c index 4ab6256852..bd46ad1105 100644 --- a/lib_enc/ivas_entropy_coder.c +++ b/lib_enc/ivas_entropy_coder.c @@ -55,107 +55,6 @@ extern FILE *fModels_data; #define IVAS_MAX_ENCODED_BITS ( 150 ) -#ifndef FIX_SBA_CLEAN_UP_OPT -/*---------------------------------------------------------------------------------------- - * - * Function ivas_arith_enc_init() - * - * arith coder init - *---------------------------------------------------------------------------------------- - */ - -static void ivas_arith_enc_init( - ivas_arith_t *pArith, - const ivas_freq_models_t *pFreq_models, - ivas_arith_t *pArith_diff, - const int16_t q_levels ) -{ - int16_t i, j; - float sum = 0; - - pArith->vals = pFreq_models->vals; - pArith->range = q_levels; - pArith->num_models = pFreq_models->num_models; - pArith->dyn_model_bits = ivas_get_bits_to_encode( pArith->num_models - 1 ); - pArith->pFreq_model = pFreq_models->freq_model[0]; - ivas_get_cum_freq_model( pArith->pFreq_model, pArith->range, pArith->cum_freq[0] ); - - for ( i = 0; i < pArith->num_models - 1; i++ ) - { - pArith->pAlt_freq_models[i] = pFreq_models->freq_model[i + 1]; - ivas_get_cum_freq_model( pArith->pAlt_freq_models[i], pArith->range, pArith->cum_freq[i + 1] ); - } - - for ( i = 1; i < pArith->range + 1; i++ ) - { - sum += pArith->pFreq_model[i]; - } - - for ( i = 1; i < pArith->range + 1; i++ ) - { - pArith->saved_dist_arr[0][i - 1] = log2f( max( 1e-10f, pArith->pFreq_model[i] ) ); - pArith->saved_dist_arr[0][i - 1] -= log2f( max( 1e-10f, sum ) ); - } - - for ( j = 0; j < pArith->num_models - 1; j++ ) - { - sum = 0; - - for ( i = 1; i < pArith->range + 1; i++ ) - { - sum += pArith->pAlt_freq_models[j][i]; - } - - for ( i = 1; i < pArith->range + 1; i++ ) - { - pArith->saved_dist_arr[j + 1][i - 1] = log2f( max( 1e-10f, pArith->pAlt_freq_models[j][i] ) ); - pArith->saved_dist_arr[j + 1][i - 1] -= log2f( max( 1e-10f, sum ) ); - } - } - - pArith_diff->vals = pFreq_models->diff_vals; - pArith_diff->range = q_levels; - pArith_diff->num_models = pFreq_models->diff_num_models; - pArith_diff->dyn_model_bits = ivas_get_bits_to_encode( pArith_diff->num_models - 1 ); - pArith_diff->pFreq_model = pFreq_models->diff_freq_model[0]; - ivas_get_cum_freq_model( pArith_diff->pFreq_model, pArith_diff->range, pArith_diff->cum_freq[0] ); - - sum = 0; - - for ( i = 0; i < pArith_diff->num_models - 1; i++ ) - { - pArith_diff->pAlt_freq_models[i] = pFreq_models->diff_freq_model[i + 1]; - ivas_get_cum_freq_model( pArith_diff->pAlt_freq_models[i], pArith_diff->range, pArith_diff->cum_freq[i + 1] ); - } - - for ( i = 1; i < pArith_diff->range + 1; i++ ) - { - sum += pArith_diff->pFreq_model[i]; - } - - for ( i = 1; i < pArith_diff->range + 1; i++ ) - { - pArith_diff->saved_dist_arr[0][i - 1] = log2f( max( 1e-10f, pArith_diff->pFreq_model[i] ) ); - pArith_diff->saved_dist_arr[0][i - 1] -= log2f( max( 1e-10f, sum ) ); - } - - for ( j = 0; j < pArith_diff->num_models - 1; j++ ) - { - sum = 0; - - for ( i = 1; i < pArith_diff->range + 1; i++ ) - { - sum += pArith_diff->pAlt_freq_models[j][i]; - } - - for ( i = 1; i < pArith_diff->range + 1; i++ ) - { - pArith_diff->saved_dist_arr[j + 1][i - 1] = log2f( max( 1e-10f, pArith_diff->pAlt_freq_models[j][i] ) ); - pArith_diff->saved_dist_arr[j + 1][i - 1] -= log2f( max( 1e-10f, sum ) ); - } - } - - return; -} -#endif /*-----------------------------------------------------------------------------------------* @@ -354,60 +253,6 @@ void ivas_huffman_encode( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_arith_coeffs_enc_init() - * - * Init for Arithm. coding - *-----------------------------------------------------------------------------------------*/ - -void ivas_arith_coeffs_enc_init( - ivas_arith_coeffs_t *pArith_coeffs, - ivas_spar_foa_md_com_cfg *pSpar_cfg, - const int16_t table_idx ) -{ - int16_t i; - - for ( i = 0; i < MAX_QUANT_STRATS; i++ ) - { - ivas_arith_enc_init( &pArith_coeffs->pred_arith_re[i], &ivas_arith_consts[table_idx][i].pred_r, - &pArith_coeffs->pred_arith_re_diff[i], pSpar_cfg->quant_strat[i].PR.q_levels[0] ); - - ivas_arith_enc_init( &pArith_coeffs->drct_arith_re[i], &ivas_arith_consts[table_idx][i].drct_r, - &pArith_coeffs->drct_arith_re_diff[i], pSpar_cfg->quant_strat[i].C.q_levels[0] ); - - ivas_arith_enc_init( &pArith_coeffs->decd_arith_re[i], &ivas_arith_consts[table_idx][i].decd_r, - &pArith_coeffs->decd_arith_re_diff[i], pSpar_cfg->quant_strat[i].P_r.q_levels[0] ); - } - - return; -} - - -/*-----------------------------------------------------------------------------------------* - * Function ivas_huff_coeffs_enc_init() - * - * Init for Huffman coding - *-----------------------------------------------------------------------------------------*/ - -void ivas_huff_coeffs_enc_init( - ivas_huff_coeffs_t *pHuff_coeffs, - const int16_t table_idx ) -{ - int16_t i; - - for ( i = 0; i < MAX_QUANT_STRATS; i++ ) - { - pHuff_coeffs->pred_huff_re[i].codebook = &ivas_huff_const[table_idx][i].pred_r.code_book[0][0]; - - pHuff_coeffs->drct_huff_re[i].codebook = &ivas_huff_const[table_idx][i].drct_r.code_book[0][0]; - - pHuff_coeffs->decd_huff_re[i].codebook = &ivas_huff_const[table_idx][i].decd_r.code_book[0][0]; - } - - return; -} -#endif /*-----------------------------------------------------------------------------------------* diff --git a/lib_enc/ivas_sce_enc.c b/lib_enc/ivas_sce_enc.c index 9c0fcf3edd..c6bf72e4a7 100644 --- a/lib_enc/ivas_sce_enc.c +++ b/lib_enc/ivas_sce_enc.c @@ -155,11 +155,7 @@ ivas_error ivas_sce_enc( } else if ( st_ivas->hSpar != NULL ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - st->bits_frame_nominal = (int16_t) ( st_ivas->hSpar->hSparFoa->core_nominal_brate / FRAMES_PER_SEC ); -#else st->bits_frame_nominal = (int16_t) ( st_ivas->hSpar->core_nominal_brate / FRAMES_PER_SEC ); -#endif } else { diff --git a/lib_enc/ivas_spar_encoder.c b/lib_enc/ivas_spar_encoder.c index 448cd248c6..8254f306b7 100644 --- a/lib_enc/ivas_spar_encoder.c +++ b/lib_enc/ivas_spar_encoder.c @@ -55,12 +55,10 @@ ivas_error ivas_spar_enc_open( { SPAR_ENC_HANDLE hSpar; ENCODER_CONFIG_HANDLE hEncoderConfig; -#ifdef FIX_SBA_CLEAN_UP_OPT IVAS_FB_CFG *fb_cfg; int16_t nchan_inp, nchan_transport, sba_order_internal; int16_t table_idx, active_w_mixing; int32_t input_Fs, ivas_total_brate; -#endif ivas_error error; hEncoderConfig = st_ivas->hEncoderConfig; @@ -72,12 +70,6 @@ ivas_error ivas_spar_enc_open( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR encoder" ); } -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( ( error = ivas_spar_foa_enc_open( &hSpar->hSparFoa, hEncoderConfig ) ) != IVAS_ERR_OK ) - { - return error; - } -#else input_Fs = hEncoderConfig->input_Fs; sba_order_internal = min( hEncoderConfig->sba_order, IVAS_MAX_SBA_ORDER ); @@ -138,19 +130,13 @@ ivas_error ivas_spar_enc_open( /* initialization */ hSpar->hMdEnc->table_idx = -1; -#endif /*-----------------------------------------------------------------* * Configuration - set SPAR high-level parameters *-----------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_config( hEncoderConfig->ivas_total_brate, min( hEncoderConfig->sba_order, IVAS_MAX_SBA_ORDER ), - &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &hSpar->hSparFoa->core_nominal_brate, -1 ); -#else ivas_spar_config( hEncoderConfig->ivas_total_brate, min( hEncoderConfig->sba_order, IVAS_MAX_SBA_ORDER ), &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &hSpar->core_nominal_brate, -1 ); -#endif if ( st_ivas->nchan_transport == 1 ) { @@ -219,9 +205,7 @@ void ivas_spar_enc_close( const int16_t nchan_inp /* i : number of input channels */ ) { -#ifdef FIX_SBA_CLEAN_UP_OPT int16_t num_chans; -#endif if ( hSpar != NULL ) { /* core-coder-VAD handle */ @@ -238,19 +222,12 @@ void ivas_spar_enc_close( hSpar->hFrontVad = NULL; } -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_enc_close( &hSpar->hSparFoa, input_Fs, nchan_inp ); -#else num_chans = hSpar->hFbMixer->fb_cfg->num_in_chans; assert( num_chans <= nchan_inp ); /* MD handle */ -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_enc_close( &hSpar->hMdEnc ); -#else ivas_spar_md_enc_close( &hSpar->hMdEnc ); -#endif /* Covar. State handle */ ivas_spar_covar_enc_close( &hSpar->hCovEnc, num_chans ); @@ -270,7 +247,6 @@ void ivas_spar_enc_close( count_free( hSpar->hPCA ); hSpar->hPCA = NULL; } -#endif count_free( hSpar ); hSpar = NULL; @@ -321,17 +297,10 @@ ivas_error ivas_spar_enc( ivas_sba_zero_vert_comp( data_f, hEncoderConfig->sba_order, hEncoderConfig->sba_planar, input_frame ); } -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( ( error = ivas_spar_foa_enc_process( st_ivas, hEncoderConfig, hMetaData, st_ivas->hSpar->front_vad_flag, data_f ) ) != IVAS_ERR_OK ) - { - return error; - } -#else if ( ( error = ivas_spar_enc_process( st_ivas, hEncoderConfig, hMetaData, st_ivas->hSpar->front_vad_flag, data_f ) ) != IVAS_ERR_OK ) { return error; } -#endif if ( hEncoderConfig->sba_planar ) { diff --git a/lib_enc/ivas_spar_foa_enc.c b/lib_enc/ivas_spar_foa_enc.c index e6d1945d84..35589ec3a8 100644 --- a/lib_enc/ivas_spar_foa_enc.c +++ b/lib_enc/ivas_spar_foa_enc.c @@ -49,167 +49,8 @@ extern FILE *fFb_out[4]; #endif -#ifndef FIX_SBA_CLEAN_UP_OPT -/*------------------------------------------------------------------------- - * ivas_spar_foa_enc_open() - * - * Allocate and initialize SPAR encoder handle for static memory - *------------------------------------------------------------------------*/ - -ivas_error ivas_spar_foa_enc_open( - ivas_spar_foa_enc_state_t **hSparFoa, /* i/o: SPAR FOA encoder handle */ - const ENCODER_CONFIG_HANDLE hEncoderConfig /* i : configuration structure */ -) -{ - ivas_spar_foa_enc_state_t *pState; - IVAS_FB_CFG *fb_cfg; - int16_t nchan_inp, nchan_transport, sba_order_internal; - int16_t table_idx, active_w_mixing; - int32_t input_Fs, ivas_total_brate; - ivas_error error; - - error = IVAS_ERR_OK; - - input_Fs = hEncoderConfig->input_Fs; - - sba_order_internal = min( hEncoderConfig->sba_order, IVAS_MAX_SBA_ORDER ); - nchan_inp = ivas_sba_get_nchan_metadata( sba_order_internal ); - assert( nchan_inp <= hEncoderConfig->nchan_inp ); - ivas_total_brate = hEncoderConfig->ivas_total_brate; - nchan_transport = ivas_get_spar_num_TCs( hEncoderConfig->ivas_total_brate, sba_order_internal ); - // bw = ivas_get_bw_idx_from_sample_rate(pCfg->input_Fs); - table_idx = ivas_get_spar_table_idx( ivas_total_brate, sba_order_internal, SPAR_CONFIG_BW, NULL, NULL ); - /* FOA encoder handle */ - if ( ( pState = (ivas_spar_foa_enc_state_t *) count_malloc( sizeof( ivas_spar_foa_enc_state_t ) ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR encoder" ); - } - - /* MD handle */ - if ( ( error = ivas_spar_foa_md_enc_open( &( pState->hMdEnc ), hEncoderConfig ) ) != IVAS_ERR_OK ) - { - return error; - } - - /* set FB config. */ - active_w_mixing = ivas_spar_br_table_consts[table_idx].active_w; // VE: this parameter is different between enc and dec - ivas_fb_set_cfg( &fb_cfg, SBA_FORMAT, SBA_MODE_SPAR, nchan_inp, nchan_transport, active_w_mixing, input_Fs ); - fb_cfg->remix_order = remix_order_set[pState->hMdEnc->spar_md_cfg.remix_unmix_order]; - - /* FB mixer handle */ - if ( ( error = ivas_FB_mixer_open( &( pState->hFbMixer ), input_Fs, fb_cfg ) ) != IVAS_ERR_OK ) - { - return error; - } - - /* Covariance handle */ - if ( ( error = ivas_spar_covar_enc_open( &( pState->hCovEnc ), pState->hFbMixer->pFb, input_Fs, nchan_inp ) ) != IVAS_ERR_OK ) - { - return error; - } - - /* Transient Detector handle */ - if ( ( error = ivas_spar_transient_det_open( &( pState->hTranDet ), input_Fs ) ) != IVAS_ERR_OK ) - { - return error; - } - - /* AGC */ - if ( ( error = ivas_spar_agc_enc_open( &pState->hAgcEnc, input_Fs, nchan_inp ) ) != IVAS_ERR_OK ) - { - return error; - } - - /* PCA */ - pState->hPCA = NULL; - if ( hEncoderConfig->Opt_PCA_ON ) - { - if ( ( pState->hPCA = (PCA_ENC_STATE *) count_malloc( sizeof( PCA_ENC_STATE ) ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR PCA encoder" ); - } - - ivas_pca_enc_init( pState->hPCA ); - } - - /* initializations */ - pState->hMdEnc->table_idx = -1; - - *hSparFoa = pState; - - return error; -} - - -/*------------------------------------------------------------------------- - * ivas_spar_foa_enc_close() - * - * Deallocate SPAR encoder handle for static memory - *------------------------------------------------------------------------*/ - -void ivas_spar_foa_enc_close( - ivas_spar_foa_enc_state_t **hSparFoa, /* i/o: SPAR FOA encoder handle */ - const int32_t input_Fs, /* i : input sampling rate */ - const int16_t nchan_inp /* i : number of input channels */ -) -{ - ivas_spar_foa_enc_state_t *pState; - int16_t num_chans; - - pState = *hSparFoa; - num_chans = pState->hFbMixer->fb_cfg->num_in_chans; - assert( num_chans <= nchan_inp ); - - if ( pState != NULL ) - { - /* MD handle */ - ivas_spar_foa_md_enc_close( &pState->hMdEnc ); - - /* Covar. State handle */ - ivas_spar_covar_enc_close( &pState->hCovEnc, num_chans ); - - /* FB mixer handle */ - ivas_FB_mixer_close( &pState->hFbMixer, input_Fs ); - - /* Trans Det handle */ - ivas_spar_transient_det_close( &pState->hTranDet ); - - /* AGC */ - ivas_spar_agc_enc_close( &pState->hAgcEnc ); - - /* PCA */ - if ( pState->hPCA != NULL ) - { - count_free( pState->hPCA ); - pState->hPCA = NULL; - } - - count_free( pState ); - pState = NULL; - } - - return; -} -#endif - - -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_spar_foa_enc_get_windowed_fr() - * - * Get windowed FRs - *-----------------------------------------------------------------------------------------*/ - -static void ivas_spar_foa_enc_get_windowed_fr( - IVAS_FB_MIXER_HANDLE hFbMixer, - float *pIn_blocks[IVAS_SPAR_MAX_CH], - ivas_enc_cov_handler_in_buf_t *pCov_in_buf, - const int16_t input_frame, - const int16_t nchan_inp, - const int16_t num_past_samples ) -#else /*-----------------------------------------------------------------------------------------* * Function ivas_spar_enc_get_windowed_fr() * @@ -223,7 +64,6 @@ static void ivas_spar_enc_get_windowed_fr( const int16_t input_frame, const int16_t nchan_inp, const int16_t num_past_samples ) -#endif { int16_t i, j, rev_offset; @@ -274,21 +114,6 @@ static void ivas_spar_enc_get_windowed_fr( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_spar_foa_enc_process() - * - * Process call for SPAR FOA encoder - *-----------------------------------------------------------------------------------------*/ - -ivas_error ivas_spar_foa_enc_process( - Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ - const ENCODER_CONFIG_HANDLE hEncoderConfig, /* i : configuration structure */ - BSTR_ENC_HANDLE hMetaData, /* i/o: MetaData handle */ - const int16_t front_vad_flag, /* i : front-VAD decision */ - float data_f[][L_FRAME48k] /* i/o: input/transport audio channels */ -) -#else /*-----------------------------------------------------------------------------------------* * Function ivas_spar_enc_process() * @@ -302,7 +127,6 @@ ivas_error ivas_spar_enc_process( const int16_t front_vad_flag, /* i : front-VAD decision */ float data_f[][L_FRAME48k] /* i/o: input/transport audio channels */ ) -#endif { float pcm_tmp[IVAS_SPAR_MAX_CH][L_FRAME48k * 2]; float *p_pcm_tmp[IVAS_SPAR_MAX_CH]; @@ -312,21 +136,13 @@ ivas_error ivas_spar_enc_process( ivas_enc_cov_handler_in_buf_t cov_in_buf; float *cov_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH]; float *cov_dtx_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH]; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_enc_in_buf_t md_in_buf; -#else ivas_spar_md_enc_in_buf_t md_in_buf; -#endif int16_t nchan_inp, nchan_transport, bwidth, sba_order; int16_t table_idx; int16_t in_out_mixer_map[IVAS_MAX_FB_MIXER_OUT_CH][IVAS_MAX_SPAR_FB_MIXER_IN_CH]; ivas_error error; const int16_t *order; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_enc_state_t *pState = st_ivas->hSpar->hSparFoa; -#else SPAR_ENC_HANDLE pState = st_ivas->hSpar; -#endif IVAS_QMETADATA_HANDLE hQMetaData = st_ivas->hQMetaData; int16_t ts, l_ts, orig_dirac_bands, num_del_samples; float *ppIn_FR_real[IVAS_SPAR_MAX_CH], *ppIn_FR_imag[IVAS_SPAR_MAX_CH]; @@ -587,11 +403,7 @@ ivas_error ivas_spar_enc_process( md_in_buf.dtx_vad = dtx_vad; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_enc_process( pState->hMdEnc, hEncoderConfig, &md_in_buf, hMetaData, dtx_silence_mode ); -#else ivas_spar_md_enc_process( pState->hMdEnc, hEncoderConfig, &md_in_buf, hMetaData, dtx_silence_mode ); -#endif if ( st_ivas->sba_mode == SBA_MODE_SPAR ) { @@ -602,20 +414,12 @@ ivas_error ivas_spar_enc_process( int16_t d_start_band, d_end_band; int16_t dirac_band_idx; -#ifndef FIX_SBA_CLEAN_UP_OPT - d_start_band = st_ivas->hSpar->hSparFoa->enc_param_start_band; -#else d_start_band = st_ivas->hSpar->enc_param_start_band; -#endif d_end_band = IVAS_MAX_NUM_BANDS; for ( b = d_start_band; b < d_end_band; b++ ) { -#ifndef FIX_SBA_CLEAN_UP_OPT - dirac_band_idx = st_ivas->hSpar->hSparFoa->dirac_to_spar_md_bands[b] - d_start_band; -#else dirac_band_idx = st_ivas->hSpar->dirac_to_spar_md_bands[b] - d_start_band; -#endif for ( i_ts = 0; i_ts < hQMetaData->q_direction->cfg.nblocks; i_ts++ ) { azi_dirac[b][i_ts] = hQMetaData->q_direction->band_data[dirac_band_idx].azimuth[i_ts]; diff --git a/lib_enc/ivas_spar_foa_md_enc.c b/lib_enc/ivas_spar_foa_md_enc.c index a05345faa9..f99c21c1df 100644 --- a/lib_enc/ivas_spar_foa_md_enc.c +++ b/lib_enc/ivas_spar_foa_md_enc.c @@ -87,32 +87,14 @@ static void ivas_band_mixer( float *cov_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], static void ivas_get_band_differential_index( ivas_band_coeffs_ind_t *pBand_idx, const int16_t q_levels[2], const int16_t one_sided, const int16_t nB, const int16_t complex_cov, const int16_t dim, const ivas_coeffs_type_t coeff_type ); -#ifndef FIX_SBA_CLEAN_UP_OPT -static void ivas_get_huffman_coded_bs( ivas_spar_foa_md_enc_state_t *pState, BSTR_ENC_HANDLE hMetaData, const int16_t nB, const int16_t qsi, const int16_t planarCP ); - -static void ivas_get_arith_coded_bs( ivas_spar_foa_md_enc_state_t *pState, BSTR_ENC_HANDLE hMetaData, const int16_t *pDo_diff, const int16_t bands_bw, const int16_t nB, const int16_t qsi, const int16_t planarCP ); - -static ivas_error ivas_spar_foa_set_enc_config( ivas_spar_foa_md_enc_state_t *pState, int16_t *max_freq_per_chan, const int16_t nchan_transport, float *pFC, const int16_t nchan_inp ); -#else static void ivas_get_huffman_coded_bs( ivas_spar_md_enc_state_t *pState, BSTR_ENC_HANDLE hMetaData, const int16_t nB, const int16_t qsi, const int16_t planarCP ); static void ivas_get_arith_coded_bs( ivas_spar_md_enc_state_t *pState, BSTR_ENC_HANDLE hMetaData, const int16_t *pDo_diff, const int16_t bands_bw, const int16_t nB, const int16_t qsi, const int16_t planarCP ); static ivas_error ivas_spar_set_enc_config( ivas_spar_md_enc_state_t *pState, int16_t *max_freq_per_chan, const int16_t nchan_transport, float *pFC, const int16_t nchan_inp ); -#endif static void ivas_select_next_strat( ivas_strats_t prior_strat, ivas_strats_t cs[MAX_QUANT_STRATS], const int16_t dmx_switch, const int16_t dtx_vad ); -#ifndef FIX_SBA_CLEAN_UP_OPT -static void ivas_store_prior_coeffs( ivas_spar_foa_md_enc_state_t *hMdEnc, const int16_t num_bands, const int16_t bands_bw, const int16_t strat, const int16_t dtx_vad, const int16_t qsi ); - -static void ivas_write_parameter_bitstream( ivas_spar_foa_md_enc_state_t *hMdEnc, const int16_t nB, const int16_t bands_bw, BSTR_ENC_HANDLE hMetaData, const int32_t ivas_total_brate, const int16_t dtx_silence_mode, const int16_t strat, const int16_t qsi, const int16_t planarCP ); - -static ivas_error ivas_spar_foa_md_enc_init( ivas_spar_foa_md_enc_state_t *pState, const ENCODER_CONFIG_HANDLE hEncoderConfig ); - -static void ivas_spar_foa_quant_pred_coeffs_dtx( ivas_spar_md_t *pSpar_md, float **ppValues, const int16_t ndm, int16_t **ppIndex, const int16_t dim1, float **ppQuant ); - -#else static void ivas_store_prior_coeffs( ivas_spar_md_enc_state_t *hMdEnc, const int16_t num_bands, const int16_t bands_bw, const int16_t strat, const int16_t dtx_vad, const int16_t qsi ); static void ivas_write_parameter_bitstream( ivas_spar_md_enc_state_t *hMdEnc, const int16_t nB, const int16_t bands_bw, BSTR_ENC_HANDLE hMetaData, const int32_t ivas_total_brate, const int16_t dtx_silence_mode, const int16_t strat, const int16_t qsi, const int16_t planarCP ); @@ -120,7 +102,6 @@ static void ivas_write_parameter_bitstream( ivas_spar_md_enc_state_t *hMdEnc, co static ivas_error ivas_spar_md_enc_init( ivas_spar_md_enc_state_t *pState, const ENCODER_CONFIG_HANDLE hEncoderConfig ); static void ivas_spar_quant_pred_coeffs_dtx( ivas_spar_md_t *pSpar_md, float **ppValues, const int16_t ndm, int16_t **ppIndex, const int16_t dim1, float **ppQuant ); -#endif static void ivas_quant_p_per_band_dtx( float **ppP_mat, const int16_t num_dec, const int16_t num_dmx, int16_t *ppIdx_pd, float **ppP_out, const int16_t num_ch ); @@ -133,18 +114,6 @@ static void ivas_quant_c_per_band( ivas_band_coeffs_t *pband_coeffs, ivas_band_c static void ivas_quant_pred_coeffs_per_band( ivas_band_coeffs_t *pband_coeffs, ivas_band_coeffs_ind_t *pBand_coeffs_idx, ivas_quant_strat_t *pQs, const int16_t num_ch ); -#ifndef FIX_SBA_CLEAN_UP_OPT -/*------------------------------------------------------------------------- - * ivas_spar_foa_md_enc_open() - * - * Allocate and initialize SPAR MD encoder handle - *------------------------------------------------------------------------*/ - -ivas_error ivas_spar_foa_md_enc_open( - ivas_spar_foa_md_enc_state_t **hMdEnc_in, /* i/o: SPAR MD encoder handle */ - const ENCODER_CONFIG_HANDLE hEncoderConfig /* i : configuration structure */ -) -#else /*------------------------------------------------------------------------- * ivas_spar_md_enc_open() * @@ -155,39 +124,25 @@ ivas_error ivas_spar_md_enc_open( ivas_spar_md_enc_state_t **hMdEnc_in, /* i/o: SPAR MD encoder handle */ const ENCODER_CONFIG_HANDLE hEncoderConfig /* i : configuration structure */ ) -#endif { -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_enc_state_t *hMdEnc; -#else ivas_spar_md_enc_state_t *hMdEnc; -#endif ivas_error error; int16_t num_channels, i, j, order; order = min( hEncoderConfig->sba_order, IVAS_MAX_SBA_ORDER ); error = IVAS_ERR_OK; -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( ( hMdEnc = (ivas_spar_foa_md_enc_state_t *) count_malloc( sizeof( ivas_spar_foa_md_enc_state_t ) ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD encoder" ); - } -#else if ( ( hMdEnc = (ivas_spar_md_enc_state_t *) count_malloc( sizeof( ivas_spar_md_enc_state_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD encoder" ); } -#endif num_channels = 2 * order + 2; -#ifdef FIX_SBA_CLEAN_UP_OPT if ( ( hMdEnc->spar_md.band_coeffs = (ivas_band_coeffs_t *) count_malloc( IVAS_MAX_NUM_BANDS * sizeof( ivas_band_coeffs_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for band_coeffs in SPAR MD" ); } -#endif if ( ( hMdEnc->mixer_mat = (float ***) count_malloc( num_channels * sizeof( float ** ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); @@ -264,17 +219,10 @@ ivas_error ivas_spar_md_enc_open( } } -#ifndef FIX_SBA_CLEAN_UP_OPT - if ( ( error = ivas_spar_foa_md_enc_init( hMdEnc, hEncoderConfig ) ) != IVAS_ERR_OK ) - { - return error; - } -#else if ( ( error = ivas_spar_md_enc_init( hMdEnc, hEncoderConfig ) ) != IVAS_ERR_OK ) { return error; } -#endif *hMdEnc_in = hMdEnc; @@ -282,17 +230,6 @@ ivas_error ivas_spar_md_enc_open( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*------------------------------------------------------------------------- - * ivas_spar_foa_md_enc_close() - * - * Deallocate SPAR MD encoder handle - *------------------------------------------------------------------------*/ - -void ivas_spar_foa_md_enc_close( - ivas_spar_foa_md_enc_state_t **hMdEnc_in /* i/o: SPAR MD encoder handle */ -) -#else /*------------------------------------------------------------------------- * ivas_spar_md_enc_close() * @@ -302,25 +239,18 @@ void ivas_spar_foa_md_enc_close( void ivas_spar_md_enc_close( ivas_spar_md_enc_state_t **hMdEnc_in /* i/o: SPAR MD encoder handle */ ) -#endif { int16_t num_channels, i, j; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_enc_state_t *hMdEnc; -#else ivas_spar_md_enc_state_t *hMdEnc; -#endif hMdEnc = *hMdEnc_in; num_channels = hMdEnc->num_umx_ch; -#ifdef FIX_SBA_CLEAN_UP_OPT if ( hMdEnc->spar_md.band_coeffs != NULL ) { count_free( hMdEnc->spar_md.band_coeffs ); hMdEnc->spar_md.band_coeffs = NULL; } -#endif if ( hMdEnc->mixer_mat != NULL ) { for ( i = 0; i < num_channels; i++ ) @@ -386,18 +316,6 @@ void ivas_spar_md_enc_close( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_spar_foa_md_enc_init() - * - * Init call for md gen process - *-----------------------------------------------------------------------------------------*/ - -static ivas_error ivas_spar_foa_md_enc_init( - ivas_spar_foa_md_enc_state_t *pState, /* o : MD encoder handle */ - const ENCODER_CONFIG_HANDLE hEncoderConfig /* i : configuration structure */ -) -#else /*-----------------------------------------------------------------------------------------* * Function ivas_spar_md_enc_init() * @@ -408,7 +326,6 @@ static ivas_error ivas_spar_md_enc_init( ivas_spar_md_enc_state_t *pState, /* o : MD encoder handle */ const ENCODER_CONFIG_HANDLE hEncoderConfig /* i : configuration structure */ ) -#endif { float pFC[IVAS_MAX_NUM_BANDS]; int16_t table_idx; @@ -431,11 +348,7 @@ static ivas_error ivas_spar_md_enc_init( pFC[i] = ivas_fb_fcs_12band_1ms[i] * hEncoderConfig->input_Fs * 0.5f; } -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_set_enc_config( pState, pState->spar_md_cfg.max_freq_per_chan, pState->spar_md_cfg.nchan_transport, pFC, num_channels ); -#else ivas_spar_set_enc_config( pState, pState->spar_md_cfg.max_freq_per_chan, pState->spar_md_cfg.nchan_transport, pFC, num_channels ); -#endif /* if(pState->spar_md_cfg.quant_strat[0].C.q_levels[0] == 0 || pState->spar_md_cfg.quant_strat[0].C.q_levels[1] == 0 || pState->spar_md_cfg.quant_strat[0].PR.q_levels[0] == 0 || pState->spar_md_cfg.quant_strat[0].PR.q_levels[1] == 0 @@ -455,13 +368,8 @@ static ivas_error ivas_spar_md_enc_init( return IVAS_ERR_INTERNAL; } -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_arith_coeffs_enc_init( &pState->arith_coeffs, &pState->spar_md_cfg, table_idx ); - ivas_huff_coeffs_enc_init( &pState->huff_coeffs, table_idx ); -#else ivas_spar_arith_coeffs_com_init( &pState->arith_coeffs, &pState->spar_md_cfg, table_idx, ENC ); ivas_spar_huff_coeffs_com_init( &pState->huff_coeffs, NULL, table_idx, ENC ); -#endif if ( hEncoderConfig->Opt_DTX_ON == 1 ) { @@ -506,20 +414,6 @@ static ivas_error ivas_spar_md_enc_init( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_spar_foa_set_enc_config() - * - * Set configuration for SPAR FOA md gen - *-----------------------------------------------------------------------------------------*/ - -static ivas_error ivas_spar_foa_set_enc_config( - ivas_spar_foa_md_enc_state_t *pState, - int16_t *max_freq_per_chan, - const int16_t nchan_transport, - float *pFC, - const int16_t nchan_inp ) -#else /*-----------------------------------------------------------------------------------------* * Function ivas_spar_set_enc_config() * @@ -532,7 +426,6 @@ static ivas_error ivas_spar_set_enc_config( const int16_t nchan_transport, float *pFC, const int16_t nchan_inp ) -#endif { int16_t i, j; int16_t tmp_dmx_ch; @@ -576,19 +469,11 @@ static ivas_error ivas_spar_set_enc_config( * Band limit downmix matrix *-----------------------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -static void ivas_band_limit_dmx_matrix( - ivas_spar_foa_md_enc_state_t *hMdEnc, /* i/o: SPAR MD encoder handle */ - const int16_t num_ch, - const int16_t num_bands, - const int16_t bands_bw ) -#else static void ivas_band_limit_dmx_matrix( ivas_spar_md_enc_state_t *hMdEnc, /* i/o: SPAR MD encoder handle */ const int16_t num_ch, const int16_t num_bands, const int16_t bands_bw ) -#endif { int16_t i, j, b, ndm; @@ -615,21 +500,12 @@ static void ivas_band_limit_dmx_matrix( * Band mixing downmix matrix *-----------------------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -static void ivas_band_mixing( - ivas_spar_foa_md_enc_state_t *hMdEnc, /* i/o: SPAR MD encoder handle */ - const int16_t num_ch, - const int16_t num_bands, - const int16_t nchan_transport, - const int16_t upmixed_bands ) -#else static void ivas_band_mixing( ivas_spar_md_enc_state_t *hMdEnc, /* i/o: SPAR MD encoder handle */ const int16_t num_ch, const int16_t num_bands, const int16_t nchan_transport, const int16_t upmixed_bands ) -#endif { int16_t i, j, k, b; int16_t red_band_fact; @@ -687,20 +563,6 @@ static void write_metadata_buffer( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_spar_foa_md_enc_process() - * - * SPAR FoA Meta Data generation process - *-----------------------------------------------------------------------------------------*/ - -ivas_error ivas_spar_foa_md_enc_process( - ivas_spar_foa_md_enc_state_t *hMdEnc, /* i/o: SPAR MD encoder handle */ - const ENCODER_CONFIG_HANDLE hEncoderConfig, /* i : configuration structure */ - ivas_spar_foa_md_enc_in_buf_t *pIn_buf, - BSTR_ENC_HANDLE hMetaData, /* i/o: MetaData handle */ - const int16_t dtx_silence_mode ) -#else /*-----------------------------------------------------------------------------------------* * Function ivas_spar_md_enc_process() * @@ -713,7 +575,6 @@ ivas_error ivas_spar_md_enc_process( ivas_spar_md_enc_in_buf_t *pIn_buf, BSTR_ENC_HANDLE hMetaData, /* i/o: MetaData handle */ const int16_t dtx_silence_mode ) -#endif { float pred_coeffs_re[IVAS_SPAR_MAX_CH - 1][IVAS_MAX_NUM_BANDS]; float dm_fv_re[IVAS_SPAR_MAX_CH - 1][IVAS_MAX_NUM_BANDS]; @@ -730,11 +591,7 @@ ivas_error ivas_spar_md_enc_process( BSTR_ENC_DATA hMetaData_tmp; Indice ind_list_tmp[MAX_BITS_METADATA]; // IVAS_fmToDo: size to be optimized float Wscale[IVAS_MAX_NUM_BANDS]; -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_md_enc_state_t *pState = hMdEnc; -#else ivas_spar_md_enc_state_t *pState = hMdEnc; -#endif int16_t num_quant_strats = pState->spar_md_cfg.num_quant_strats; #ifdef DEBUG_SPAR_FOA int16_t count; @@ -1011,11 +868,7 @@ ivas_error ivas_spar_md_enc_process( pState->spar_md.band_coeffs[b].pred_quant_re[i] = 0; } -#ifndef FIX_SBA_CLEAN_UP_OPT - ivas_spar_foa_quant_pred_coeffs_dtx( &pState->spar_md, ppPred_re, ndm, ppPred_idx, num_ch - 1, ppPred_quant ); -#else ivas_spar_quant_pred_coeffs_dtx( &pState->spar_md, ppPred_re, ndm, ppPred_idx, num_ch - 1, ppPred_quant ); -#endif } } @@ -1330,18 +1183,6 @@ static void ivas_band_mixer( * Write MD parameters into bitstream *-----------------------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -static void ivas_write_parameter_bitstream( - ivas_spar_foa_md_enc_state_t *hMdEnc, - const int16_t nB, - const int16_t bands_bw, - BSTR_ENC_HANDLE hMetaData, - const int32_t ivas_total_brate, - const int16_t dtx_silence_mode, - const int16_t strat, - const int16_t qsi, - const int16_t planarCP ) -#else static void ivas_write_parameter_bitstream( ivas_spar_md_enc_state_t *hMdEnc, const int16_t nB, @@ -1352,7 +1193,6 @@ static void ivas_write_parameter_bitstream( const int16_t strat, const int16_t qsi, const int16_t planarCP ) -#endif { int16_t no_ec, i; int16_t do_diff[IVAS_MAX_NUM_BANDS]; @@ -1450,21 +1290,12 @@ static void ivas_write_parameter_bitstream( * Generate huffman coded bitstream *-----------------------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -static void ivas_get_huffman_coded_bs( - ivas_spar_foa_md_enc_state_t *hMdEnc, - BSTR_ENC_HANDLE hMetaData, - const int16_t nB, - const int16_t qsi, - const int16_t planarCP ) -#else static void ivas_get_huffman_coded_bs( ivas_spar_md_enc_state_t *hMdEnc, BSTR_ENC_HANDLE hMetaData, const int16_t nB, const int16_t qsi, const int16_t planarCP ) -#endif { int16_t i, j; @@ -1532,16 +1363,6 @@ static void ivas_get_huffman_coded_bs( * Generate arithmetic coded bitstream *-----------------------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -static void ivas_get_arith_coded_bs( - ivas_spar_foa_md_enc_state_t *hMdEnc, - BSTR_ENC_HANDLE hMetaData, - const int16_t *pDo_diff, - const int16_t bands_bw, - const int16_t nB, - const int16_t qsi, - const int16_t planarCP ) -#else static void ivas_get_arith_coded_bs( ivas_spar_md_enc_state_t *hMdEnc, BSTR_ENC_HANDLE hMetaData, @@ -1550,7 +1371,6 @@ static void ivas_get_arith_coded_bs( const int16_t nB, const int16_t qsi, const int16_t planarCP ) -#endif { int16_t i, any_diff; ivas_cell_dim_t pred_cell_dims[IVAS_MAX_NUM_BANDS]; @@ -1708,15 +1528,6 @@ static void ivas_select_next_strat( * Store prior coeffs *-----------------------------------------------------------------------------------------*/ -#ifndef FIX_SBA_CLEAN_UP_OPT -static void ivas_store_prior_coeffs( - ivas_spar_foa_md_enc_state_t *hMdEnc, - const int16_t num_bands, - const int16_t bands_bw, - const int16_t strat, - const int16_t dtx_vad, - const int16_t qsi ) -#else static void ivas_store_prior_coeffs( ivas_spar_md_enc_state_t *hMdEnc, const int16_t num_bands, @@ -1724,7 +1535,6 @@ static void ivas_store_prior_coeffs( const int16_t strat, const int16_t dtx_vad, const int16_t qsi ) -#endif { int16_t i, j, b; @@ -1760,21 +1570,6 @@ static void ivas_store_prior_coeffs( } -#ifndef FIX_SBA_CLEAN_UP_OPT -/*-----------------------------------------------------------------------------------------* - * Function ivas_spar_foa_quant_pred_coeffs_dtx() - * - * Calculate quantization pred coeffs - *-----------------------------------------------------------------------------------------*/ - -static void ivas_spar_foa_quant_pred_coeffs_dtx( - ivas_spar_md_t *pSpar_md, - float **ppValues, - const int16_t ndm, - int16_t **ppIndex, - const int16_t dim1, - float **ppQuant ) -#else /*-----------------------------------------------------------------------------------------* * Function ivas_spar_quant_pred_coeffs_dtx() * @@ -1788,7 +1583,6 @@ static void ivas_spar_quant_pred_coeffs_dtx( int16_t **ppIndex, const int16_t dim1, float **ppQuant ) -#endif { int16_t i; int16_t q_lvl; diff --git a/lib_enc/ivas_stat_enc.h b/lib_enc/ivas_stat_enc.h index a063b4e705..b542859db0 100644 --- a/lib_enc/ivas_stat_enc.h +++ b/lib_enc/ivas_stat_enc.h @@ -636,34 +636,6 @@ typedef struct ivas_enc_cov_handler_in_buf_t } ivas_enc_cov_handler_in_buf_t; -#ifndef FIX_SBA_CLEAN_UP_OPT -/* SPAR FOA MD structures */ -typedef struct ivas_spar_foa_md_enc_state_t -{ - ivas_spar_md_t spar_md; - ivas_spar_md_prev_t spar_md_prior; - int16_t num_umx_ch; - int16_t num_decorr; - - float ***mixer_mat; - float ***cov_real; - float ***cov_dtx_real; - float ***mixer_mat_local; - ivas_spar_foa_md_com_cfg spar_md_cfg; - ivas_arith_coeffs_t arith_coeffs; - ivas_huff_coeffs_t huff_coeffs; - int16_t table_idx; - -} ivas_spar_foa_md_enc_state_t; - -typedef struct ivas_spar_foa_md_enc_in_buf_t -{ - float *cov_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH]; - int16_t num_bands; - int16_t dtx_vad; - -} ivas_spar_foa_md_enc_in_buf_t; -#else /* SPAR MD structures */ typedef struct ivas_spar_md_enc_state_t { @@ -691,7 +663,6 @@ typedef struct ivas_spar_md_enc_in_buf_t int16_t dtx_vad; } ivas_spar_md_enc_in_buf_t; -#endif /* PCA structure */ @@ -709,38 +680,9 @@ typedef struct /* SPAR FOA structures */ -#ifndef FIX_SBA_CLEAN_UP_OPT -typedef struct ivas_spar_foa_enc_state_t -{ - ivas_spar_foa_md_enc_state_t *hMdEnc; - IVAS_FB_MIXER_HANDLE hFbMixer; - ivas_enc_cov_handler_state_t *hCovEnc; - ivas_trans_det_state_t *hTranDet; - ivas_agc_enc_state_t *hAgcEnc; - int16_t dirac_to_spar_md_bands[DIRAC_MAX_NBANDS]; - int16_t enc_param_start_band; - PCA_ENC_STATE *hPCA; - int32_t core_nominal_brate; /* Nominal bitrate for core coding */ - -} ivas_spar_foa_enc_state_t; -#endif /* SPAR main structure */ -#ifndef FIX_SBA_CLEAN_UP_OPT -typedef struct ivas_spar_enc_lib_t -{ - ivas_spar_foa_enc_state_t *hSparFoa; - - FRONT_VAD_ENC_HANDLE hFrontVad; /* front-VAD handle */ - ENC_CORE_HANDLE hCoreCoderVAD; /* core-coder handle for front-VAD module */ - - int16_t front_vad_flag; - int16_t front_vad_dtx_flag; - int16_t force_front_vad; - -} SPAR_ENC_DATA, *SPAR_ENC_HANDLE; -#else typedef struct ivas_spar_enc_lib_t { ivas_spar_md_enc_state_t *hMdEnc; @@ -760,7 +702,6 @@ typedef struct ivas_spar_enc_lib_t int16_t force_front_vad; } SPAR_ENC_DATA, *SPAR_ENC_HANDLE; -#endif /*----------------------------------------------------------------------------------* -- GitLab From ff51b978b55d33b7caf570bfdb2783dd655adf15 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 14 Jul 2022 08:41:39 +0200 Subject: [PATCH 06/10] [cleanup] accept FIX_28_SBA_LS_RENDER --- lib_com/options.h | 1 - lib_dec/ivas_spar_foa_dec.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 11ccb6491a..cf4b7f1db9 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -146,7 +146,6 @@ /*#define FIX_IVAS_185_MDCT_ST_PLC_FADEOUT*/ /* IVAS-185 fix bug in TCX-PLC fadeout for MDCT-Stereo and improve fadeout by fading to background noise instead of white noise */ /*#define FIX_I1_113*/ /* under review : MCT bit distribution optimization for SBA high bitrates*/ -#define FIX_28_SBA_LS_RENDER /* FhG: fix for discontinuities in SBA LS renderer */ #define SIMPLIFY_SBA_RENDERING_LOGIC /* SBA rendering maintenance related to ticket #45 */ #define SBA_CLEANING /* SBA maintenance related to ticket #45 */ diff --git a/lib_dec/ivas_spar_foa_dec.c b/lib_dec/ivas_spar_foa_dec.c index 7abedce581..437e724f37 100644 --- a/lib_dec/ivas_spar_foa_dec.c +++ b/lib_dec/ivas_spar_foa_dec.c @@ -940,11 +940,7 @@ void ivas_spar_dec_upmixer( { if ( ( st_ivas->hOutSetup.num_lfe > 0 ) && ( st_ivas->hOutSetup.index_lfe[idx_lfe] == ch ) ) { -#ifdef FIX_28_SBA_LS_RENDER set_zero( &( output[ch][i_sf * MAX_PARAM_SPATIAL_SUBFRAMES * num_cldfb_bands] ), MAX_PARAM_SPATIAL_SUBFRAMES * num_cldfb_bands ); -#else - set_zero( &( output[ch][0] ), CLDFB_NO_COL_MAX * num_cldfb_bands ); -#endif if ( idx_lfe < ( st_ivas->hDirAC->hOutSetup.num_lfe - 1 ) ) { -- GitLab From cadd688a6e8bd456af4e89af23f01938a21fe9fe Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 14 Jul 2022 08:43:02 +0200 Subject: [PATCH 07/10] [cleanup] accept FIX_038_TV_FIX_DEC_CRASH_DURING_FEC --- lib_com/options.h | 1 - lib_dec/ivas_cpe_dec.c | 14 -------------- lib_enc/ivas_cpe_enc.c | 17 ----------------- 3 files changed, 32 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index cf4b7f1db9..c9531ede8c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -151,7 +151,6 @@ #define SBA_CLEANING /* SBA maintenance related to ticket #45 */ -#define FIX_038_TV_FIX_DEC_CRASH_DURING_FEC /* IVAS-038 Fixed potential decoder crash on frame lost, due to loss of synchronisation between encoder and decoder */ #define FIX_047_ERROR_ENABLING_AGC /* IVAS-047, Fix the error reporting when AGC is enabled*/ diff --git a/lib_dec/ivas_cpe_dec.c b/lib_dec/ivas_cpe_dec.c index 19c1ad43fb..62daa625e4 100644 --- a/lib_dec/ivas_cpe_dec.c +++ b/lib_dec/ivas_cpe_dec.c @@ -75,9 +75,6 @@ ivas_error ivas_cpe_dec( float res_buf[STEREO_DFT_N_8k]; CPE_DEC_HANDLE hCPE; Decoder_State **sts; -#ifndef FIX_038_TV_FIX_DEC_CRASH_DURING_FEC - int16_t last_tdm_LRTD_flag; -#endif int32_t ivas_total_brate; ivas_error error; @@ -96,13 +93,6 @@ ivas_error ivas_cpe_dec( sts[0]->BER_detect |= st_ivas->BER_detect; sts[1]->BER_detect |= st_ivas->BER_detect; -#ifndef FIX_038_TV_FIX_DEC_CRASH_DURING_FEC - last_tdm_LRTD_flag = 0; - if ( hCPE->hStereoTD != NULL ) - { - last_tdm_LRTD_flag = hCPE->hStereoTD->tdm_LRTD_flag; - } -#endif /*------------------------------------------------------------------* * Read stereo technology info & audio bandwidth *-----------------------------------------------------------------*/ @@ -189,11 +179,7 @@ ivas_error ivas_cpe_dec( } } -#ifdef FIX_038_TV_FIX_DEC_CRASH_DURING_FEC if ( hCPE->element_mode == IVAS_CPE_TD ) -#else - if ( hCPE->element_mode == IVAS_CPE_TD && last_tdm_LRTD_flag != hCPE->hStereoTD->tdm_LRTD_flag ) -#endif { if ( hCPE->hStereoTD->tdm_LRTD_flag ) { diff --git a/lib_enc/ivas_cpe_enc.c b/lib_enc/ivas_cpe_enc.c index 1fabe9ddac..96f8680fa5 100644 --- a/lib_enc/ivas_cpe_enc.c +++ b/lib_enc/ivas_cpe_enc.c @@ -87,11 +87,7 @@ ivas_error ivas_cpe_enc( float currFlatness[CPE_CHANNELS]; /* flatness parameter */ float fft_buff[CPE_CHANNELS][2 * L_FFT]; /* FFT buffer */ int16_t tdm_ratio_idx, tdm_ratio_idx_SM; /* temp. TD stereo parameters */ -#ifdef FIX_038_TV_FIX_DEC_CRASH_DURING_FEC int16_t tdm_SM_or_LRTD_Pri; /* temp. TD stereo parameters */ -#else - int16_t tdm_SM_or_LRTD_Pri, last_tdm_LRTD_flag; /* temp. TD stereo parameters */ -#endif float tdm_last_ratio; /* temp. TD stereo parameters */ int16_t nb_bits; /* number of DFT stereo side bits */ float fr_bands[CPE_CHANNELS][2 * NB_BANDS]; /* energy in frequency bands */ @@ -125,19 +121,10 @@ ivas_error ivas_cpe_enc( *-----------------------------------------------------------------*/ tdm_SM_or_LRTD_Pri = 0; -#ifndef FIX_038_TV_FIX_DEC_CRASH_DURING_FEC - last_tdm_LRTD_flag = 0; -#endif tdm_ratio_idx = -1; tdm_ratio_idx_SM = -1; tdm_last_ratio = 0; -#ifndef FIX_038_TV_FIX_DEC_CRASH_DURING_FEC - if ( hCPE->hStereoTD != NULL ) - { - last_tdm_LRTD_flag = hCPE->hStereoTD->tdm_LRTD_flag; - } -#endif #ifdef DEBUGGING if ( hCPE->hCoreCoder[0]->ini_frame == 0 ) { @@ -290,11 +277,7 @@ ivas_error ivas_cpe_enc( stereo_dft_config( hCPE->hStereoDft == NULL ? NULL : hCPE->hStereoDft->hConfig, hCPE->element_brate, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); } } -#ifdef FIX_038_TV_FIX_DEC_CRASH_DURING_FEC if ( hCPE->element_mode == IVAS_CPE_TD ) -#else - if ( hCPE->element_mode == IVAS_CPE_TD && last_tdm_LRTD_flag != hCPE->hStereoTD->tdm_LRTD_flag ) -#endif { if ( hCPE->hStereoTD->tdm_LRTD_flag ) { -- GitLab From cc10590c33abcf5ab1b9a392c8f3465d95d35231 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 14 Jul 2022 08:44:27 +0200 Subject: [PATCH 08/10] [cleanup] accept FIX_047_ERROR_ENABLING_AGC --- lib_com/options.h | 1 - lib_enc/lib_enc.c | 6 ------ 2 files changed, 7 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index c9531ede8c..3429351609 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -152,7 +152,6 @@ -#define FIX_047_ERROR_ENABLING_AGC /* IVAS-047, Fix the error reporting when AGC is enabled*/ #define REFACTOR_REVERB_INIT_ADD_CFG_CHECKS /* Simplify and improve reverb initialization + add range checks on config parameter values */ diff --git a/lib_enc/lib_enc.c b/lib_enc/lib_enc.c index 81f13d40d2..d2886c39a7 100644 --- a/lib_enc/lib_enc.c +++ b/lib_enc/lib_enc.c @@ -762,13 +762,7 @@ static ivas_error configureEncoder( /* IVAS_fmToDo: needs more work in case of bitrate switching */ hEncoderConfig->sba_order = 1; } -#ifndef FIX_047_ERROR_ENABLING_AGC -#ifndef SBA_CLEANING - st_ivas->sba_mode = ivas_sba_mode_select( hEncoderConfig->ivas_total_brate ); // VE: is it needed here? -#endif -#else st_ivas->sba_mode = ivas_sba_mode_select( hEncoderConfig->ivas_total_brate ); -#endif } else if ( hEncoderConfig->ivas_format == MASA_FORMAT ) { -- GitLab From e70b26c13468a0ba9834efb4defd5bf2d1265921 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 14 Jul 2022 08:57:59 +0200 Subject: [PATCH 09/10] [cleanup] formatting --- apps/encoder.c | 2 +- lib_com/ivas_entropy_coder_common.c | 2 +- lib_com/ivas_pca_tools.c | 2 +- lib_com/ivas_spar_com.c | 4 +- lib_com/ivas_spar_foa_br_dist.c | 4 +- lib_dec/ivas_dec.c | 2 +- lib_dec/ivas_entropy_decoder.c | 6 -- lib_dec/ivas_mdct_core_dec.c | 2 +- lib_dec/ivas_reverb.c | 117 ++++++++++++++-------------- lib_dec/ivas_reverb_filter_design.c | 2 +- lib_dec/ivas_reverb_utils.c | 4 +- lib_dec/ivas_spar_foa_dec.c | 4 +- lib_enc/ivas_entropy_coder.c | 4 - lib_enc/ivas_sba_enc.c | 2 +- lib_enc/ivas_spar_foa_enc.c | 2 - lib_util/jbm_file_reader.c | 2 +- lib_util/render_config_reader.c | 40 +++++----- 17 files changed, 93 insertions(+), 108 deletions(-) mode change 100644 => 100755 apps/encoder.c mode change 100644 => 100755 lib_com/ivas_entropy_coder_common.c mode change 100644 => 100755 lib_com/ivas_pca_tools.c mode change 100644 => 100755 lib_com/ivas_spar_com.c mode change 100644 => 100755 lib_com/ivas_spar_foa_br_dist.c mode change 100644 => 100755 lib_dec/ivas_dec.c mode change 100644 => 100755 lib_dec/ivas_entropy_decoder.c mode change 100644 => 100755 lib_dec/ivas_mdct_core_dec.c mode change 100644 => 100755 lib_dec/ivas_reverb.c mode change 100644 => 100755 lib_dec/ivas_reverb_filter_design.c mode change 100644 => 100755 lib_dec/ivas_reverb_utils.c mode change 100644 => 100755 lib_dec/ivas_spar_foa_dec.c mode change 100644 => 100755 lib_enc/ivas_entropy_coder.c mode change 100644 => 100755 lib_enc/ivas_sba_enc.c mode change 100644 => 100755 lib_enc/ivas_spar_foa_enc.c mode change 100644 => 100755 lib_util/jbm_file_reader.c mode change 100644 => 100755 lib_util/render_config_reader.c diff --git a/apps/encoder.c b/apps/encoder.c old mode 100644 new mode 100755 index 607e377e3b..ab9d29b3f8 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -515,7 +515,7 @@ int main( #endif /*------------------------------------------------------------------------------------------* - * Allocate input data buffer + * Allocate input data buffer *------------------------------------------------------------------------------------------*/ int16_t pcmBufSize; diff --git a/lib_com/ivas_entropy_coder_common.c b/lib_com/ivas_entropy_coder_common.c old mode 100644 new mode 100755 index 6bd27544a7..5f23b0637d --- a/lib_com/ivas_entropy_coder_common.c +++ b/lib_com/ivas_entropy_coder_common.c @@ -405,7 +405,7 @@ void ivas_spar_huff_coeffs_com_init( ivas_huff_coeffs_t *pHuff_coeffs, ivas_spar_md_com_cfg *pSpar_cfg, const int16_t table_idx, - int16_t codec_mode) + int16_t codec_mode ) { int16_t i; int16_t pred_r_index, drct_r_index, decd_r_index; diff --git a/lib_com/ivas_pca_tools.c b/lib_com/ivas_pca_tools.c old mode 100644 new mode 100755 index dbf8f07c20..3f96e81294 --- a/lib_com/ivas_pca_tools.c +++ b/lib_com/ivas_pca_tools.c @@ -604,7 +604,7 @@ void quat_shortestpath( * Compute determinant of 4D matrix - brute-force version *---------------------------------------------------------------------*/ -float mat_det4( +float mat_det4( const float *m ) { float d; diff --git a/lib_com/ivas_spar_com.c b/lib_com/ivas_spar_com.c old mode 100644 new mode 100755 index a3da676db3..93dd07bdd1 --- a/lib_com/ivas_spar_com.c +++ b/lib_com/ivas_spar_com.c @@ -300,9 +300,9 @@ void lfe_window_init( #ifdef SBA_CLEANING hLFEWindow->fade_len = NS2SA( sampling_rate, IVAS_LFE_FADE_NS ); #else - hLFEWindow->fade_len = ( int16_t )( sampling_rate * IVAS_LFE_FADE_LEN_SEC_FLOAT ); + hLFEWindow->fade_len = (int16_t) ( sampling_rate * IVAS_LFE_FADE_LEN_SEC_FLOAT ); #endif - hLFEWindow->zero_pad_len = ( int16_t )( IVAS_ZERO_PAD_LEN_MULT_FAC * ( hLFEWindow->dct_len - hLFEWindow->fade_len ) ); + hLFEWindow->zero_pad_len = (int16_t) ( IVAS_ZERO_PAD_LEN_MULT_FAC * ( hLFEWindow->dct_len - hLFEWindow->fade_len ) ); hLFEWindow->full_len = hLFEWindow->zero_pad_len + hLFEWindow->fade_len + hLFEWindow->dct_len; return; diff --git a/lib_com/ivas_spar_foa_br_dist.c b/lib_com/ivas_spar_foa_br_dist.c old mode 100644 new mode 100755 index 19b2f338fd..5bbb771848 --- a/lib_com/ivas_spar_foa_br_dist.c +++ b/lib_com/ivas_spar_foa_br_dist.c @@ -52,8 +52,8 @@ void ivas_spar_set_bitrate_config( ivas_spar_md_com_cfg *pSpar_md_cfg, /* i/o: SPAR MD config. handle */ - const int16_t table_idx, /* i : config. table index */ - const int16_t num_bands /* i : number of bands */ + const int16_t table_idx, /* i : config. table index */ + const int16_t num_bands /* i : number of bands */ ) { int32_t ivas_total_brate; diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c old mode 100644 new mode 100755 index ae9483d807..aa1687aabe --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -329,7 +329,7 @@ ivas_error ivas_dec( { ivas_dirac_dec_binaural( st_ivas, output, nchan_remapped ); } - else if( st_ivas->sba_mode == SBA_MODE_DIRAC || st_ivas->ivas_format == MASA_FORMAT ) + else if ( st_ivas->sba_mode == SBA_MODE_DIRAC || st_ivas->ivas_format == MASA_FORMAT ) { if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC ) { diff --git a/lib_dec/ivas_entropy_decoder.c b/lib_dec/ivas_entropy_decoder.c old mode 100644 new mode 100755 index 310844eee4..cc3fab8656 --- a/lib_dec/ivas_entropy_decoder.c +++ b/lib_dec/ivas_entropy_decoder.c @@ -50,8 +50,6 @@ static int16_t ivas_huffman_code_bits_present( const int16_t *codebook, const int16_t code, const int16_t bits, const int16_t len ); - - /*-----------------------------------------------------------------------------------------* * Function ivas_arith_decode_array() * @@ -150,8 +148,6 @@ static void ivas_arithCoder_decode_array_diff( } - - /*-----------------------------------------------------------------------------------------* * Function ivas_huffman_code_bits_present() * @@ -420,5 +416,3 @@ void ivas_arith_decode_cmplx_cell_array( return; } - - diff --git a/lib_dec/ivas_mdct_core_dec.c b/lib_dec/ivas_mdct_core_dec.c old mode 100644 new mode 100755 index a4eb47570e..ed5114c651 --- a/lib_dec/ivas_mdct_core_dec.c +++ b/lib_dec/ivas_mdct_core_dec.c @@ -846,7 +846,7 @@ void ivas_mdct_core_reconstruct( { decoder_tcx_imdct( st, L_frame_global[ch], L_frame_globalTCX[ch], L_spec[ch], tcx_offset[ch], tcx_offsetFB[ch], L_frame[ch], L_frameTCX[ch], left_rect[ch], &x[ch][k][0], xn_buf, - (( hCPE->nchan_out == 1 && st->hTcxDec->kernel_type[k] == MDST_IV ) || st->hTcxCfg->tcx_last_overlap_mode == TRANSITION_OVERLAP ) ? MDCT_IV : st->hTcxDec->kernel_type[k], + ( ( hCPE->nchan_out == 1 && st->hTcxDec->kernel_type[k] == MDST_IV ) || st->hTcxCfg->tcx_last_overlap_mode == TRANSITION_OVERLAP ) ? MDCT_IV : st->hTcxDec->kernel_type[k], fUseTns[ch][k], &synth[k * L_frame[ch]], &synthFB[k * L_frameTCX[ch]], bfi, k, isLFE, 0 ); } else diff --git a/lib_dec/ivas_reverb.c b/lib_dec/ivas_reverb.c old mode 100644 new mode 100755 index fb28481f12..bf562c7a79 --- a/lib_dec/ivas_reverb.c +++ b/lib_dec/ivas_reverb.c @@ -1519,15 +1519,15 @@ ivas_error ivas_reverb_process( * Local constants *------------------------------------------------------------------------------------------*/ -#define INNER_BLK_SIZE 80 /* size of data blocks used for more efficient delay line and IIR filter processing */ - /* should be a divisor of the frame length at any sampling rate and an even number*/ -#define FFT_FILTER_WND_FLAT_REGION ( 0.40f ) /* flat section (==1) length of FFT filter window, in proportion to overlap */ -#define FFT_FILTER_WND_TRANS_REGION ( 0.15f ) /* transition (1->0) length of FFT filter window, in proportion to overlap */ -#define REF_LF_MIN ( 100.0f ) -#define REF_LF_MAX ( 250.0f ) -#define REF_HF_MIN ( 5000.0f ) -#define REF_HF_MAX ( 7950.0f ) -#define LF_BIAS ( 0.5f ) +#define INNER_BLK_SIZE 80 /* size of data blocks used for more efficient delay line and IIR filter processing */ +/* should be a divisor of the frame length at any sampling rate and an even number*/ +#define FFT_FILTER_WND_FLAT_REGION ( 0.40f ) /* flat section (==1) length of FFT filter window, in proportion to overlap */ +#define FFT_FILTER_WND_TRANS_REGION ( 0.15f ) /* transition (1->0) length of FFT filter window, in proportion to overlap */ +#define REF_LF_MIN ( 100.0f ) +#define REF_LF_MAX ( 250.0f ) +#define REF_HF_MIN ( 5000.0f ) +#define REF_HF_MAX ( 7950.0f ) +#define LF_BIAS ( 0.5f ) #define DEFAULT_SRC_DIST ( 1.5f ) /* default source distance [m] for reverb dmx factor computing */ @@ -1538,7 +1538,7 @@ ivas_error ivas_reverb_process( #define IVAS_REVERB_FFT_N_SUBBLOCKS_32K ( 1 ) #define IVAS_REVERB_FFT_N_SUBBLOCKS_16K ( 1 ) -#define MAX_NR_OUTPUTS ( 2 ) +#define MAX_NR_OUTPUTS ( 2 ) const int16_t init_loop_delay[IVAS_REV_MAX_NR_BRANCHES] = { 37, 31, 29, 23, 19, 17, 13, 11 }; const int16_t default_loop_delay_48k[IVAS_REV_MAX_NR_BRANCHES] = { 2309, 1861, 1523, 1259, 1069, 919, 809, 719 }; @@ -1551,33 +1551,33 @@ const int16_t default_loop_delay_16k[IVAS_REV_MAX_NR_BRANCHES] = { 769, 619, 509 typedef struct ivas_reverb_params_t { - int16_t pre_delay; /* Delay of the FDC reverb, first peak after pre_delay samples. Note that */ - /* there may be non-zero samples earlier due to the filters being */ - /* linear-phase. */ - int16_t nr_loops; /* Number of feedback loops (= L) */ - int16_t pLoop_delays[IVAS_REV_MAX_NR_BRANCHES]; /* Delay for each feedback loop in samples. */ - float pLoop_feedback_matrix[IVAS_REV_MAX_NR_BRANCHES * IVAS_REV_MAX_NR_BRANCHES]; /* Feedback [L][L] matrix that mixes the signals of the loops. */ - int16_t nr_outputs; /* Nr of signals extracted from the loops (= S). */ - /* Currently this is fixed to 2. */ - float pLoop_extract_matrix[MAX_NR_OUTPUTS * IVAS_REV_MAX_NR_BRANCHES]; /* Mix [S][L] matrix from feedback loops to outputs. */ - /* In Matlab: [S x L] - Currently S=2, later may be more than 2 for speaker playback. */ - int16_t t60_filter_order; /* Filter order (length of vector) */ - float pT60_filter_coeff[MAX_NR_OUTPUTS * IVAS_REV_MAX_NR_BRANCHES * IVAS_REV_MAX_IIR_FILTER_LENGTH];/* Filters [][] in feedback loops, controlling T60. */ - /* In Matlab: IIR: [(2 * L) x ( + 1)] (odd: b-vector, even: a-vector) */ - /* In Matlab: FIR: [L x ] */ - float *pFc; /* Center frequencies for FFT filter design */ - float *pRt60; /* RT60 values at these frequencies */ - float *pDsr; /* DSR values at these frequencies */ - float *pHrtf_avg_pwr_response_l; /* The HRTF set's average left ear power response */ - float *pHrtf_avg_pwr_response_r; /* The HRTF set's average right ear power response */ - float *pHrtf_inter_aural_coherence; /* The HRTF set's inter-aural coherence for diffuse sound */ - const float *pHrtf_avg_pwr_response_l_const; /* The HRTF set's average left ear power response */ - const float *pHrtf_avg_pwr_response_r_const; /* The HRTF set's average right ear power response */ - const float *pHrtf_inter_aural_coherence_const; /* The HRTF set's inter-aural coherence for diffuse sound */ - - int16_t do_corr_filter; /* Flag indicating whether correlation filters should be used. */ - /* Correlation only supported and needed for binaural playback (i.e. */ - /* when nr_outputs != 2 correlation filtering is never supported). */ + int16_t pre_delay; /* Delay of the FDC reverb, first peak after pre_delay samples. Note that */ + /* there may be non-zero samples earlier due to the filters being */ + /* linear-phase. */ + int16_t nr_loops; /* Number of feedback loops (= L) */ + int16_t pLoop_delays[IVAS_REV_MAX_NR_BRANCHES]; /* Delay for each feedback loop in samples. */ + float pLoop_feedback_matrix[IVAS_REV_MAX_NR_BRANCHES * IVAS_REV_MAX_NR_BRANCHES]; /* Feedback [L][L] matrix that mixes the signals of the loops. */ + int16_t nr_outputs; /* Nr of signals extracted from the loops (= S). */ + /* Currently this is fixed to 2. */ + float pLoop_extract_matrix[MAX_NR_OUTPUTS * IVAS_REV_MAX_NR_BRANCHES]; /* Mix [S][L] matrix from feedback loops to outputs. */ + /* In Matlab: [S x L] - Currently S=2, later may be more than 2 for speaker playback. */ + int16_t t60_filter_order; /* Filter order (length of vector) */ + float pT60_filter_coeff[MAX_NR_OUTPUTS * IVAS_REV_MAX_NR_BRANCHES * IVAS_REV_MAX_IIR_FILTER_LENGTH]; /* Filters [][] in feedback loops, controlling T60. */ + /* In Matlab: IIR: [(2 * L) x ( + 1)] (odd: b-vector, even: a-vector) */ + /* In Matlab: FIR: [L x ] */ + float *pFc; /* Center frequencies for FFT filter design */ + float *pRt60; /* RT60 values at these frequencies */ + float *pDsr; /* DSR values at these frequencies */ + float *pHrtf_avg_pwr_response_l; /* The HRTF set's average left ear power response */ + float *pHrtf_avg_pwr_response_r; /* The HRTF set's average right ear power response */ + float *pHrtf_inter_aural_coherence; /* The HRTF set's inter-aural coherence for diffuse sound */ + const float *pHrtf_avg_pwr_response_l_const; /* The HRTF set's average left ear power response */ + const float *pHrtf_avg_pwr_response_r_const; /* The HRTF set's average right ear power response */ + const float *pHrtf_inter_aural_coherence_const; /* The HRTF set's inter-aural coherence for diffuse sound */ + + int16_t do_corr_filter; /* Flag indicating whether correlation filters should be used. */ + /* Correlation only supported and needed for binaural playback (i.e. */ + /* when nr_outputs != 2 correlation filtering is never supported). */ } ivas_reverb_params_t; @@ -1585,7 +1585,7 @@ typedef struct ivas_reverb_params_t * Static functions declarations *------------------------------------------------------------------------------------------*/ -static ivas_error calc_jot_t60_coeffs( float *pH_dB, const uint16_t nrFrequencies, float *pFrequencies, float *pCoeffA, float *pCoeffB, float fNyquist ); +static ivas_error calc_jot_t60_coeffs( float *pH_dB, const uint16_t nrFrequencies, float *pFrequencies, float *pCoeffA, float *pCoeffB, float fNyquist ); /*-----------------------------------------------------------------------------------------* * Function compute_feedback_matrix() @@ -1778,7 +1778,7 @@ static void calc_predelay( { int16_t predelay, fbdelay, output_frame; - predelay = (int16_t) roundf( acoustic_predelay_sec * (float)output_Fs ); + predelay = (int16_t) roundf( acoustic_predelay_sec * (float) output_Fs ); output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); fbdelay = pParams->pLoop_delays[pParams->nr_loops - 1]; predelay -= fbdelay; @@ -1824,7 +1824,7 @@ static ivas_error compute_t60_coeffs( error = IVAS_ERR_OK; tf_T60_len = nr_fc_fft_filter; len = pParams->t60_filter_order + 1; - freq_Nyquist = 0.5f * (float)output_Fs; + freq_Nyquist = 0.5f * (float) output_Fs; /* normalize pFrequencies: 0 .. 1/2 output_Fs --> 0.0 .. 1.0 */ inv_hfs = 1.0f / freq_Nyquist; @@ -1835,11 +1835,11 @@ static ivas_error compute_t60_coeffs( for ( loop_idx = 0; loop_idx < pParams->nr_loops; loop_idx++ ) { - loop_delay_sec = (float)pParams->pLoop_delays[loop_idx] / (float)output_Fs; + loop_delay_sec = (float) pParams->pLoop_delays[loop_idx] / (float) output_Fs; for ( bin_idx = 0; bin_idx < tf_T60_len; bin_idx++ ) { target_gains_db[bin_idx] = -60.0f * loop_delay_sec / targetT60[bin_idx]; - target_gains_db[bin_idx]= max( target_gains_db[bin_idx], -120.0f ); + target_gains_db[bin_idx] = max( target_gains_db[bin_idx], -120.0f ); } pCoeffs_a = &pParams->pT60_filter_coeff[2 * len * loop_idx + len]; @@ -1871,7 +1871,7 @@ static void calc_low_shelf_first_order_filter( float *pNum, float *pDen, const float f0, - const float lin_gain_lf, + const float lin_gain_lf, const float lin_gain_hf ) { float w0, gain; @@ -2212,10 +2212,10 @@ static void clear_buffers( /*-----------------------------------------------------------------------------------------* -* Function set_fft_and_datablock_sizes() -* -* Sets frame size and fft-filter related sizes -*-----------------------------------------------------------------------------------------*/ + * Function set_fft_and_datablock_sizes() + * + * Sets frame size and fft-filter related sizes + *-----------------------------------------------------------------------------------------*/ static void set_fft_and_datablock_sizes( REVERB_HANDLE pState, int16_t subframe_len ) { @@ -2244,13 +2244,12 @@ static void set_fft_and_datablock_sizes( REVERB_HANDLE pState, int16_t subframe_ /*-----------------------------------------------------------------------------------------* -* Function set_reverb_acoustic_data() -* -* Sets reverb acoustic data (room acoustics and HRTF), interpolating it to the filter grid -*-----------------------------------------------------------------------------------------*/ + * Function set_reverb_acoustic_data() + * + * Sets reverb acoustic data (room acoustics and HRTF), interpolating it to the filter grid + *-----------------------------------------------------------------------------------------*/ -static void set_reverb_acoustic_data( ivas_reverb_params_t * pParams, const HRTFS_HANDLE hHrtf, - ivas_roomAcoustics_t * pRoomAcoustics, int16_t subframe_len, int16_t nr_fc_input, int16_t nr_fc_fft_filter ) +static void set_reverb_acoustic_data( ivas_reverb_params_t *pParams, const HRTFS_HANDLE hHrtf, ivas_roomAcoustics_t *pRoomAcoustics, int16_t subframe_len, int16_t nr_fc_input, int16_t nr_fc_fft_filter ) { int16_t nr_out_ch, hrtf_idx, offset, iter_idx, bin_idx; float ln_1e6_inverted, delay_diff, exp_argument; @@ -2321,12 +2320,12 @@ static void set_reverb_acoustic_data( ivas_reverb_params_t * pParams, const HRTF /*-----------------------------------------------------------------------------------------* -* Function setup_FDN_branches() -* -* Sets up feedback delay network system -*-----------------------------------------------------------------------------------------*/ + * Function setup_FDN_branches() + * + * Sets up feedback delay network system + *-----------------------------------------------------------------------------------------*/ -static ivas_error setup_FDN_branches( REVERB_HANDLE pState, ivas_reverb_params_t * pParams ) +static ivas_error setup_FDN_branches( REVERB_HANDLE pState, ivas_reverb_params_t *pParams ) { int16_t nr_coefs, branch_idx, channel_idx; ivas_error error; @@ -2539,7 +2538,7 @@ ivas_error ivas_reverb_open( ivas_rev_delay_line_init( &( pState->predelay_line ), pState->pPredelay_buffer, params.pre_delay, predelay_bf_len ); /* set up feedback delay network */ - if ( ( error = setup_FDN_branches( pState, ¶ms ) ) != IVAS_ERR_OK ) + if ( ( error = setup_FDN_branches( pState, ¶ms ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_dec/ivas_reverb_filter_design.c b/lib_dec/ivas_reverb_filter_design.c old mode 100644 new mode 100755 index e0dabaa734..3adfaa8a7d --- a/lib_dec/ivas_reverb_filter_design.c +++ b/lib_dec/ivas_reverb_filter_design.c @@ -544,7 +544,7 @@ void ivas_reverb_calc_color_levels( pTarget_color_L[freq_idx] = sqrtf( pAcoustic_dsr[freq_idx] * revEnergyFactor * pHrtf_avg_pwr_L[freq_idx] ) / sqrtf( revPredNormEnergy ); pTarget_color_R[freq_idx] = sqrtf( pAcoustic_dsr[freq_idx] * revEnergyFactor * pHrtf_avg_pwr_R[freq_idx] ) / sqrtf( revPredNormEnergy ); -#else /* REFACTOR_REVERB_INIT_ADD_CFG_CHECKS */ +#else /* REFACTOR_REVERB_INIT_ADD_CFG_CHECKS */ pTarget_color_L[freq_idx] = sqrtf( pAcoustic_dsr[freq_idx] * revEnergyFactor * pHrtf_avg_pwr_L[freq_idx] ) / max( sqrtf( revPredNormEnergy ), EPS ); pTarget_color_R[freq_idx] = sqrtf( pAcoustic_dsr[freq_idx] * revEnergyFactor * pHrtf_avg_pwr_R[freq_idx] ) / max( sqrtf( revPredNormEnergy ), EPS ); diff --git a/lib_dec/ivas_reverb_utils.c b/lib_dec/ivas_reverb_utils.c old mode 100644 new mode 100755 index 9e528a7300..760ddc199f --- a/lib_dec/ivas_reverb_utils.c +++ b/lib_dec/ivas_reverb_utils.c @@ -97,7 +97,7 @@ void ivas_reverb_prepare_cldfb_params( #ifndef REFACTOR_REVERB_INIT_ADD_CFG_CHECKS float delay_diff; float ln_1e6_inverted; -#else /* REFACTOR_REVERB_INIT_ADD_CFG_CHECKS */ +#else /* REFACTOR_REVERB_INIT_ADD_CFG_CHECKS */ float delay_diff, ln_1e6_inverted, exp_argument; #endif /* REFACTOR_REVERB_INIT_ADD_CFG_CHECKS */ const float dist = DEFAULT_SRC_DIST; @@ -118,7 +118,7 @@ void ivas_reverb_prepare_cldfb_params( #ifndef REFACTOR_REVERB_INIT_ADD_CFG_CHECKS const float tau = pOutput_t60[idx] * ln_1e6_inverted; pOutput_ene[idx] *= expf( delay_diff / tau ); -#else /* REFACTOR_REVERB_INIT_ADD_CFG_CHECKS */ +#else /* REFACTOR_REVERB_INIT_ADD_CFG_CHECKS */ exp_argument = delay_diff / ( pOutput_t60[idx] * ln_1e6_inverted ); /* Limit exponent to approx +/-100 dB in case of incoherent value of delay_diff, to prevent overflow */ exp_argument = min( exp_argument, 23.0f ); diff --git a/lib_dec/ivas_spar_foa_dec.c b/lib_dec/ivas_spar_foa_dec.c old mode 100644 new mode 100755 index 437e724f37..cbc685bb76 --- a/lib_dec/ivas_spar_foa_dec.c +++ b/lib_dec/ivas_spar_foa_dec.c @@ -354,8 +354,6 @@ void ivas_spar_get_cldfb_gains( } - - /*---------------------------------------------------------------------* * Function ivas_is_res_channel() * @@ -940,7 +938,7 @@ void ivas_spar_dec_upmixer( { if ( ( st_ivas->hOutSetup.num_lfe > 0 ) && ( st_ivas->hOutSetup.index_lfe[idx_lfe] == ch ) ) { - set_zero( &( output[ch][i_sf * MAX_PARAM_SPATIAL_SUBFRAMES * num_cldfb_bands] ), MAX_PARAM_SPATIAL_SUBFRAMES * num_cldfb_bands ); + set_zero( &( output[ch][i_sf * MAX_PARAM_SPATIAL_SUBFRAMES * num_cldfb_bands] ), MAX_PARAM_SPATIAL_SUBFRAMES * num_cldfb_bands ); if ( idx_lfe < ( st_ivas->hDirAC->hOutSetup.num_lfe - 1 ) ) { diff --git a/lib_enc/ivas_entropy_coder.c b/lib_enc/ivas_entropy_coder.c old mode 100644 new mode 100755 index bd46ad1105..3dfe74fef2 --- a/lib_enc/ivas_entropy_coder.c +++ b/lib_enc/ivas_entropy_coder.c @@ -55,8 +55,6 @@ extern FILE *fModels_data; #define IVAS_MAX_ENCODED_BITS ( 150 ) - - /*-----------------------------------------------------------------------------------------* * Function ivas_get_dyn_freq_model() * @@ -253,8 +251,6 @@ void ivas_huffman_encode( } - - /*-----------------------------------------------------------------------------------------* * Function arith_encode_cell_array() * diff --git a/lib_enc/ivas_sba_enc.c b/lib_enc/ivas_sba_enc.c old mode 100644 new mode 100755 index c2ff8bc5db..3e9094c8e3 --- a/lib_enc/ivas_sba_enc.c +++ b/lib_enc/ivas_sba_enc.c @@ -413,7 +413,7 @@ ivas_error ivas_sba_enc_reconfigure( if ( st_ivas->hEncoderConfig->Opt_DTX_ON ) { - st_ivas->hCPE[cpe_id]->hCoreCoder[n]->cng_sba_flag = 1; + st_ivas->hCPE[cpe_id]->hCoreCoder[n]->cng_sba_flag = 1; } } } diff --git a/lib_enc/ivas_spar_foa_enc.c b/lib_enc/ivas_spar_foa_enc.c old mode 100644 new mode 100755 index 35589ec3a8..913ed599bb --- a/lib_enc/ivas_spar_foa_enc.c +++ b/lib_enc/ivas_spar_foa_enc.c @@ -49,8 +49,6 @@ extern FILE *fFb_out[4]; #endif - - /*-----------------------------------------------------------------------------------------* * Function ivas_spar_enc_get_windowed_fr() * diff --git a/lib_util/jbm_file_reader.c b/lib_util/jbm_file_reader.c old mode 100644 new mode 100755 index cde35ac3e4..7360f0ced6 --- a/lib_util/jbm_file_reader.c +++ b/lib_util/jbm_file_reader.c @@ -85,7 +85,7 @@ JbmFileReader *JbmFileReader_open( *---------------------------------------------------------------------*/ ivas_error JbmFileReader_readCAconfig( - JbmFileReader* self, /* i/o: JbmFileReader handle */ + JbmFileReader *self, /* i/o: JbmFileReader handle */ IVAS_ENC_CHANNEL_AWARE_CONFIG *caConfig /* i/o: configuration of channel-aware mode */ ) { diff --git a/lib_util/render_config_reader.c b/lib_util/render_config_reader.c old mode 100644 new mode 100755 index 4e61f7319a..9ac30c98fb --- a/lib_util/render_config_reader.c +++ b/lib_util/render_config_reader.c @@ -49,22 +49,22 @@ #define N_REVERB_VECTORS ( 3 ) #ifdef REFACTOR_REVERB_INIT_ADD_CFG_CHECKS -#define SHORTEST_REV_DEL_LINE ( 0.015f ) -#define N_BANDS_MIN ( 2 ) -#define N_BANDS_MAX ( 60 ) -#define FC_INPUT_MIN ( 0.0f ) -#define FC_INPUT_MAX ( 1.0e+5f ) -#define ACOUSTIC_RT60_MIN ( 1.0e-3f ) -#define ACOUSTIC_RT60_MAX ( 1.0e+2f ) -#define ACOUSTIC_DSR_MIN ( 0.0f ) -#define ACOUSTIC_DSR_MAX ( 1.0e+2f ) -#define ACOUSTIC_DSR_EPSILON ( 1.0e-15f ) +#define SHORTEST_REV_DEL_LINE ( 0.015f ) +#define N_BANDS_MIN ( 2 ) +#define N_BANDS_MAX ( 60 ) +#define FC_INPUT_MIN ( 0.0f ) +#define FC_INPUT_MAX ( 1.0e+5f ) +#define ACOUSTIC_RT60_MIN ( 1.0e-3f ) +#define ACOUSTIC_RT60_MAX ( 1.0e+2f ) +#define ACOUSTIC_DSR_MIN ( 0.0f ) +#define ACOUSTIC_DSR_MAX ( 1.0e+2f ) +#define ACOUSTIC_DSR_EPSILON ( 1.0e-15f ) #define ACOUSTICPREDELAY_JOTREV_MIN ( SHORTEST_REV_DEL_LINE ) -#define ACOUSTICPREDELAY_JOTREV_MAX ( SHORTEST_REV_DEL_LINE + 1.0f / ( float )FRAMES_PER_SEC ) -#define ACOUSTICPREDELAY_FDREV_MIN ( 1.0f / ( float )( 16 * FRAMES_PER_SEC ) ) -#define ACOUSTICPREDELAY_FDREV_MAX ( ( float )( REVERB_PREDELAY_MAX ) / ( float )( 16 * FRAMES_PER_SEC ) ) -#define INPUTPREDELAY_MIN ( 0.0f ) -#define INPUTPREDELAY_MAX ( 1.0e+2f ) +#define ACOUSTICPREDELAY_JOTREV_MAX ( SHORTEST_REV_DEL_LINE + 1.0f / (float) FRAMES_PER_SEC ) +#define ACOUSTICPREDELAY_FDREV_MIN ( 1.0f / (float) ( 16 * FRAMES_PER_SEC ) ) +#define ACOUSTICPREDELAY_FDREV_MAX ( (float) ( REVERB_PREDELAY_MAX ) / (float) ( 16 * FRAMES_PER_SEC ) ) +#define INPUTPREDELAY_MIN ( 0.0f ) +#define INPUTPREDELAY_MAX ( 1.0e+2f ) #endif /* REFACTOR_REVERB_INIT_ADD_CFG_CHECKS */ /*------------------------------------------------------------------------------------------* @@ -230,11 +230,11 @@ static int32_t errorHandler( * Verifies if the configuration parameters lie within acceptable limits *------------------------------------------------------------------------------------------*/ static ivas_error RenderConfigReader_checkValues( - IVAS_RENDER_CONFIG_HANDLE hRenderConfig /* o : Renderer configuration handle */ + IVAS_RENDER_CONFIG_HANDLE hRenderConfig /* o : Renderer configuration handle */ ) { int16_t band_idx, tab_value_err_count; - IVAS_ROOM_ACOUSTICS_CONFIG_DATA * pRoom_acoustics; + IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pRoom_acoustics; pRoom_acoustics = &hRenderConfig->room_acoustics; tab_value_err_count = 0; @@ -254,9 +254,9 @@ static ivas_error RenderConfigReader_checkValues( for ( band_idx = 0; band_idx < pRoom_acoustics->nBands; band_idx++ ) { /* Verify if the frequencies are in the ascending order (required for interpolation) */ - if( band_idx != 0 ) + if ( band_idx != 0 ) { - if( pRoom_acoustics->pFc_input[band_idx] <= pRoom_acoustics->pFc_input[band_idx - 1] ) + if ( pRoom_acoustics->pFc_input[band_idx] <= pRoom_acoustics->pFc_input[band_idx - 1] ) { tab_value_err_count++; } @@ -564,7 +564,7 @@ ivas_error RenderConfigReader_read( #ifndef REFACTOR_REVERB_INIT_ADD_CFG_CHECKS return IVAS_ERR_OK; -#else /* REFACTOR_REVERB_INIT_ADD_CFG_CHECKS */ +#else /* REFACTOR_REVERB_INIT_ADD_CFG_CHECKS */ return RenderConfigReader_checkValues( hRenderConfig ); #endif /* REFACTOR_REVERB_INIT_ADD_CFG_CHECKS */ } -- GitLab From 59b879b1b35b21a4e261e7993924fc47a5dcc24c Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 14 Jul 2022 08:59:48 +0200 Subject: [PATCH 10/10] [cleanup] lineendings --- apps/encoder.c | 0 lib_com/ivas_entropy_coder_common.c | 0 lib_com/ivas_pca_tools.c | 0 lib_com/ivas_spar_com.c | 0 lib_com/ivas_spar_foa_br_dist.c | 0 lib_dec/ivas_dec.c | 0 lib_dec/ivas_entropy_decoder.c | 0 lib_dec/ivas_mdct_core_dec.c | 0 lib_dec/ivas_reverb.c | 0 lib_dec/ivas_reverb_filter_design.c | 0 lib_dec/ivas_reverb_utils.c | 0 lib_dec/ivas_spar_foa_dec.c | 0 lib_enc/ivas_entropy_coder.c | 0 lib_enc/ivas_sba_enc.c | 0 lib_enc/ivas_spar_foa_enc.c | 0 lib_util/jbm_file_reader.c | 0 lib_util/render_config_reader.c | 0 17 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 apps/encoder.c mode change 100755 => 100644 lib_com/ivas_entropy_coder_common.c mode change 100755 => 100644 lib_com/ivas_pca_tools.c mode change 100755 => 100644 lib_com/ivas_spar_com.c mode change 100755 => 100644 lib_com/ivas_spar_foa_br_dist.c mode change 100755 => 100644 lib_dec/ivas_dec.c mode change 100755 => 100644 lib_dec/ivas_entropy_decoder.c mode change 100755 => 100644 lib_dec/ivas_mdct_core_dec.c mode change 100755 => 100644 lib_dec/ivas_reverb.c mode change 100755 => 100644 lib_dec/ivas_reverb_filter_design.c mode change 100755 => 100644 lib_dec/ivas_reverb_utils.c mode change 100755 => 100644 lib_dec/ivas_spar_foa_dec.c mode change 100755 => 100644 lib_enc/ivas_entropy_coder.c mode change 100755 => 100644 lib_enc/ivas_sba_enc.c mode change 100755 => 100644 lib_enc/ivas_spar_foa_enc.c mode change 100755 => 100644 lib_util/jbm_file_reader.c mode change 100755 => 100644 lib_util/render_config_reader.c diff --git a/apps/encoder.c b/apps/encoder.c old mode 100755 new mode 100644 diff --git a/lib_com/ivas_entropy_coder_common.c b/lib_com/ivas_entropy_coder_common.c old mode 100755 new mode 100644 diff --git a/lib_com/ivas_pca_tools.c b/lib_com/ivas_pca_tools.c old mode 100755 new mode 100644 diff --git a/lib_com/ivas_spar_com.c b/lib_com/ivas_spar_com.c old mode 100755 new mode 100644 diff --git a/lib_com/ivas_spar_foa_br_dist.c b/lib_com/ivas_spar_foa_br_dist.c old mode 100755 new mode 100644 diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c old mode 100755 new mode 100644 diff --git a/lib_dec/ivas_entropy_decoder.c b/lib_dec/ivas_entropy_decoder.c old mode 100755 new mode 100644 diff --git a/lib_dec/ivas_mdct_core_dec.c b/lib_dec/ivas_mdct_core_dec.c old mode 100755 new mode 100644 diff --git a/lib_dec/ivas_reverb.c b/lib_dec/ivas_reverb.c old mode 100755 new mode 100644 diff --git a/lib_dec/ivas_reverb_filter_design.c b/lib_dec/ivas_reverb_filter_design.c old mode 100755 new mode 100644 diff --git a/lib_dec/ivas_reverb_utils.c b/lib_dec/ivas_reverb_utils.c old mode 100755 new mode 100644 diff --git a/lib_dec/ivas_spar_foa_dec.c b/lib_dec/ivas_spar_foa_dec.c old mode 100755 new mode 100644 diff --git a/lib_enc/ivas_entropy_coder.c b/lib_enc/ivas_entropy_coder.c old mode 100755 new mode 100644 diff --git a/lib_enc/ivas_sba_enc.c b/lib_enc/ivas_sba_enc.c old mode 100755 new mode 100644 diff --git a/lib_enc/ivas_spar_foa_enc.c b/lib_enc/ivas_spar_foa_enc.c old mode 100755 new mode 100644 diff --git a/lib_util/jbm_file_reader.c b/lib_util/jbm_file_reader.c old mode 100755 new mode 100644 diff --git a/lib_util/render_config_reader.c b/lib_util/render_config_reader.c old mode 100755 new mode 100644 -- GitLab