Commit 1f2c31e4 authored by vaclav's avatar vaclav
Browse files

Merge branch '1926-ref-PortFlpMr2050' into 'ivas-float-update'

Port MR2050 from float to FLP-ref

See merge request !2115
parents 7434cffa b2780af6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -211,6 +211,7 @@
#define NONBE_FIX_1337_MISSING_DIRECTIVITY_DISTATT_EXTREND /* Eri: issue 1337: Missing directivity setting and distance attenuation in external renderer IVAS_rend */
#define FIX_1348_OVERFLOW                               /* FhG: fix BASOP overflow in hq_lr_dec(), brings floating-point code inline with FX */
#define FIX_VOIP_FUNCTIONS                              /* VA: fix data type mismatch in IVAS_DEC_VoIP_SetScale() + add sanity checks to API functions */
#define FIX_1298_MEMORY_OPT_IVAS_CORE_ENC               /* VA: issue 1298: Memory saving in ivas_core_enc() */
#define FIX_587_DEFAULT_REVERB                          /* Philips: issue 587: inconsistent default reverb parameters across renderers */
#define NONBE_1214_PLC_LSF_MEMORY                       /* VA: issue 1224: reset ACELP PLC FEC memory in case of switching from MDCT stereo to TD/DFT stereo */
#define NONBE_1293_SR_HRTF                              /* VA: issue 1293: add support of external HRTFs in split rendering */
+15 −1
Original line number Diff line number Diff line
@@ -90,8 +90,13 @@ ivas_error ivas_core_enc(
    float *inp[CPE_CHANNELS];
    float new_inp_resamp16k[CPE_CHANNELS][L_FRAME16k]; /* new input signal @16kHz, non pre-emphasised, used by the WB TBE/BWE */
    float old_syn_12k8_16k[CPE_CHANNELS][L_FRAME16k];  /* ACELP core synthesis at 12.8kHz or 16kHz to be used by the SWB BWE */
#ifdef FIX_1298_MEMORY_OPT_IVAS_CORE_ENC
    float *shb_speech;
    float *hb_speech;
#else
    float shb_speech[L_FRAME16k];
    float hb_speech[L_FRAME16k / 4];
#endif
    float *new_swb_speech;
    float new_swb_speech_buffer[L_FRAME48k + STEREO_DFT_OVL_MAX];
    float bwe_exc_extended[CPE_CHANNELS][L_FRAME32k + NL_BUFF_OFFSET];
@@ -158,8 +163,9 @@ ivas_error ivas_core_enc(

    input_Fs = sts[0]->input_Fs;
    input_frame = (int16_t) ( input_Fs / FRAMES_PER_SEC );

#ifndef FIX_1298_MEMORY_OPT_IVAS_CORE_ENC
    set_f( new_swb_speech_buffer, 0, L_FRAME48k + STEREO_DFT_OVL_MAX );
#endif

    for ( n = 0; n < n_CoreChannels; n++ )
    {
@@ -348,6 +354,10 @@ ivas_error ivas_core_enc(
         * WB BWE encoding
         *---------------------------------------------------------------------*/

#ifdef FIX_1298_MEMORY_OPT_IVAS_CORE_ENC
        hb_speech = new_swb_speech_buffer; /* reuse existing buffer: hb_speech[L_FRAME16k/4]; */
#endif

        if ( input_Fs >= 16000 && st->bwidth < SWB && st->hBWE_TD != NULL )
        {
            /* Common pre-processing for WB TBE and WB BWE */
@@ -371,6 +381,10 @@ ivas_error ivas_core_enc(
         *---------------------------------------------------------------------*/

        new_swb_speech = new_swb_speech_buffer + STEREO_DFT_OVL_MAX;
#ifdef FIX_1298_MEMORY_OPT_IVAS_CORE_ENC
        set_f( new_swb_speech_buffer, 0, L_FRAME48k + STEREO_DFT_OVL_MAX );
        shb_speech = new_inp_resamp16k[n]; /* reuse existing buffer: shb_speech[L_FRAME16k] */
#endif

        if ( !st->Opt_SC_VBR && input_Fs >= 32000 && st->hBWE_TD != NULL )
        {