diff --git a/lib_com/fill_spectrum.c b/lib_com/fill_spectrum.c index 9b743a5f1ce6aa260aebc1970dd8acfc67f4a331..c1837d5140b2d468d632c56ecbe4d2b804c84b43 100644 --- a/lib_com/fill_spectrum.c +++ b/lib_com/fill_spectrum.c @@ -90,10 +90,18 @@ void fill_spectrum( const int16_t element_mode /* i : element mode */ ) { +#ifdef FIX_I178_HQ_BUFFER_OVERRUN + float CodeBook[L_SPEC48k_EXT]; +#else float CodeBook[FREQ_LENGTH]; +#endif int16_t cb_size = 0; int16_t last_sfm; +#ifdef FIX_I178_HQ_BUFFER_OVERRUN + float CodeBook_mod[L_SPEC48k_EXT]; +#else float CodeBook_mod[FREQ_LENGTH]; +#endif float norm_adj[NB_SFM]; int16_t high_sfm = 23; int16_t flag_32K_env_hangover; diff --git a/lib_com/options.h b/lib_com/options.h index 9c9effa225458f4bafc19449b2ac29cda17653d8..87edfc787edce348c10670ba0a1dcf337012b3b2 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -152,6 +152,7 @@ #define FIX_155_HP20_ISSUE /* Issue 155: apply hp20 on all input channels instead of just 2 channels */ #define EFAP_FIX_POLY /* Issue 167: fix bug in EFAP polygon selection */ #define SBA_HOA_HBR_IMPROV /* issue 91: Improvements to SBA high bitrate HOA3 coding */ +#define FIX_I178_HQ_BUFFER_OVERRUN /* issue 178: Buffer overrun in HQ core decoder -- spectral filling buffer did not account for extended transition frame in IVAS */ #define PRINT_SBA_ORDER /* Issue 179: print-out also the SBA order of IVAS SBA format to stdout */