Commit f859a9ed authored by vaclav's avatar vaclav
Browse files

simplify ivas core coder functions; under SIMPLIFY_IVAS_CORE

parent 7dc55586
Loading
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -525,8 +525,11 @@ void stereo_tcx_core_dec(
    const int16_t last_element_mode,                            /* i  : last element mode                       */
    const int16_t flag_sec_CNA,                                 /* i  : CNA flag for secondary channel          */
    STEREO_CNG_DEC_HANDLE hStereoCng,                           /* i  : Stereo CNG handle                       */
    const int16_t nchan_out,                                    /* i  : number of output channels               */
    const int16_t nchan_out                                     /* i  : number of output channels               */
#ifndef SIMPLIFY_IVAS_CORE
    ,
    const IVAS_FORMAT ivas_format                               /* i  : IVAS format                             */
#endif
);

void stereo_tcx_init_dec(
+1 −0
Original line number Diff line number Diff line
@@ -160,6 +160,7 @@

/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define TMP_FIX_1119_SPLIT_RENDERING_VOIP               /* FhG: Add error check for unsupported config: split rendering with VoIP mode */
#define SIMPLIFY_IVAS_CORE                              /* VA: simplify ivas core coder functions */

/* #################### End BE switches ################################## */

+7 −5
Original line number Diff line number Diff line
@@ -5914,7 +5914,9 @@ ivas_error core_switching_post_dec(
    float *synth,       /* i/o: output synthesis                        */
    float *output,      /* i/o: LB synth/upsampled LB synth             */
    float output_mem[], /* i  : OLA memory from last TCX/HQ frame       */
#ifndef SIMPLIFY_IVAS_CORE
    const IVAS_FORMAT ivas_format, /* i  : IVAS format                             */
#endif
    const int16_t use_cldfb_for_dft,     /* i  : flag to use of CLDFB for DFT Stereo     */
    const int16_t output_frame,          /* i  : frame length                            */
    const int16_t core_switching_flag,   /* i  : ACELP->HQ switching frame flag          */
+11 −5
Original line number Diff line number Diff line
@@ -557,7 +557,9 @@ ivas_error core_switching_post_dec(
    float *synth,       /* i/o: output synthesis                    */
    float *output,      /* i/o: LB synth/upsampled LB synth         */
    float output_mem[], /* i  : OLA memory from last TCX/HQ frame   */
#ifndef SIMPLIFY_IVAS_CORE
    const IVAS_FORMAT ivas_format, /* i  : IVAS format                         */
#endif
    const int16_t use_cldfb_for_dft,     /* i  : flag to use of CLDFB for DFT Stereo */
    const int16_t output_frame,          /* i  : frame length                        */
    const int16_t core_switching_flag,   /* i  : ACELP->HQ switching flag            */
@@ -679,7 +681,11 @@ ivas_error core_switching_post_dec(
                    synth[i + delay_comp] = ( synth[i + delay_comp] * i + ( tmpDelta - i ) * st->previoussynth[i + delay_comp] ) / tmpDelta;
                }

#ifdef SIMPLIFY_IVAS_CORE
                if ( ( st->element_mode == IVAS_CPE_MDCT || ( st->is_ism_format && st->core == TCX_20_CORE /* <- means TCX in general, TCX10 is forbidden after ACELP */ ) ) && st->last_core_brate <= SID_2k40 && st->core_brate > SID_2k40 )
#else
                if ( ( st->element_mode == IVAS_CPE_MDCT || ( ivas_format == ISM_FORMAT && st->core == TCX_20_CORE /* <- means TCX in general, TCX10 is forbidden after ACELP */ ) ) && st->last_core_brate <= SID_2k40 && st->core_brate > SID_2k40 )
#endif
                {
                    /* smooth transitions to avoid pops in car noise items */
                    smoothTransitionDtxToTcx( synth, output_frame, delay_comp );
+4 −1
Original line number Diff line number Diff line
@@ -274,12 +274,15 @@ ivas_error evs_dec(
         * Postprocessing for ACELP/MDCT core switching
         *---------------------------------------------------------------------*/

#ifdef SIMPLIFY_IVAS_CORE
        if ( ( error = core_switching_post_dec( st, synth, NULL, NULL, 0, output_frame, core_switching_flag, 0, -1, EVS_MONO ) ) != IVAS_ERR_OK )
#else
        if ( ( error = core_switching_post_dec( st, synth, NULL, NULL, 0, MONO_FORMAT, output_frame, core_switching_flag, 0, -1, EVS_MONO ) ) != IVAS_ERR_OK )
#endif
        {
            return error;
        }


        /*---------------------------------------------------------------------*
         * Pre-processing for bandwidth switching
         *---------------------------------------------------------------------*/
Loading