Commit 19214a47 authored by Vidhya V P's avatar Vidhya V P
Browse files

Resolving linux compilation warnings in SPAR module

parent 0fcb812a
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -153,7 +153,7 @@
#define FIX_879_USAN_ERROR_IN_MASA_DECODING             /* FhG: Issue 879 : avoid arithmetic with NULL pointer in the DirAC decoder to fix USAN error */

#define FIX_740_MASA_PREREND_VALIDITY_CHECK             /* Nokia: issue 740: fix incorrect validity check in lib_rend to allow use of MASA prerenderer */

#define RESOLVE_SBA_COMPILE_WARNINGS
/* #################### End BE switches ################################## */


+22 −1
Original line number Diff line number Diff line
@@ -351,13 +351,26 @@ ivas_error front_vad_spar(
    const int16_t input_frame             /* i  : input frame length              */
)
{
#ifndef RESOLVE_SBA_COMPILE_WARNINGS
    FRONT_VAD_ENC_HANDLE hFrontVad;
#else
    FRONT_VAD_ENC_HANDLE hfront_vad[CPE_CHANNELS];
    FRONT_VAD_ENC_HANDLE hFrontVad;
#endif
    float input[L_FRAME48k];
    int16_t vad_flag_dtx[1];
    float fr_bands[1][2 * NB_BANDS];
#ifndef RESOLVE_SBA_COMPILE_WARNINGS
    float Etot[1];
#else
    float Etot[CPE_CHANNELS];
#endif
    float lf_E[1][2 * VOIC_BINS];
#ifndef RESOLVE_SBA_COMPILE_WARNINGS
    int16_t localVAD_HE_SAD[1];
#else
    int16_t localVAD_HE_SAD[CPE_CHANNELS];
#endif
    int16_t vad_hover_flag[1];
    float band_energies[2 * NB_BANDS];
    int16_t high_lpn_flag;
@@ -387,7 +400,12 @@ ivas_error front_vad_spar(

    push_wmops( "front_vad_SPAR" );
    error = IVAS_ERR_OK;
#ifndef RESOLVE_SBA_COMPILE_WARNINGS
    hFrontVad = hSpar->hFrontVad;
#else
    hfront_vad[0] = hSpar->hFrontVad;
    hFrontVad = hfront_vad[0];
#endif
    st = hSpar->hCoreCoderVAD;

    if ( hEncoderConfig->Opt_DTX_ON && hEncoderConfig->ivas_total_brate <= SBA_DTX_BITRATE_THRESHOLD )
@@ -466,8 +484,11 @@ ivas_error front_vad_spar(
        ivas_smc_gmm( st, NULL, localVAD_HE_SAD[0], Etot[0], lsp_new, cor_map_sum, epsP, PS, non_staX, relE, &high_lpn_flag, flag_spitch );

        /* long-term energy update */
#ifndef RESOLVE_SBA_COMPILE_WARNINGS
        long_enr( st, -1, localVAD_HE_SAD[0], high_lpn_flag, &hFrontVad, 1, localVAD_HE_SAD, Etot );

#else
        long_enr( st, -1, localVAD_HE_SAD[0], high_lpn_flag, hfront_vad, 1, localVAD_HE_SAD, Etot );
#endif
        /* increase ini_frame counter */
        hFrontVad->ini_frame = min( hFrontVad->ini_frame + 1, MAX_FRAME_COUNTER );
        st->ini_frame = hFrontVad->ini_frame;