Commit 53255308 authored by vaclav's avatar vaclav
Browse files

Merge branch 'cleanup_20251014' into 'main'

Cleanup 20251014

See merge request !2290
parents 57605b90 b7d8b783
Loading
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1235,15 +1235,11 @@ int main(
        masaIds[i] = 0u;
    }

#ifdef FIX_1377_HANDLE_ERROR_CODE
    if ( ( error = IVAS_REND_SetObjectIDs( hIvasRend ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nIVAS_REND_SetObjectIDs: %s\n", ivas_error_to_string( error ) );
        goto cleanup;
    }
#else
    IVAS_REND_SetObjectIDs( hIvasRend );
#endif

    for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i )
    {
@@ -2617,14 +2613,10 @@ static CmdlnArgs defaultArgs(
    args.outConfig.audioConfig = IVAS_AUDIO_CONFIG_INVALID;
    args.outConfig.outSetupCustom.num_spk = 0;
    args.outConfig.outSetupCustom.num_lfe = 0;
#ifdef FIX_HRTF_LEFTOVERS
    for ( i = 0; i < RENDERER_MAX_SBA_INPUTS; ++i )
    {
        args.inConfig.ambisonicsBuses[i].audioConfig = IVAS_AUDIO_CONFIG_INVALID;
    }
#else
    args.inConfig.ambisonicsBuses->audioConfig = IVAS_AUDIO_CONFIG_INVALID;
#endif

    for ( i = 0; i < RENDERER_MAX_ISM_INPUTS + RENDERER_MAX_MASA_INPUTS; ++i )
    {
+0 −2
Original line number Diff line number Diff line
@@ -229,9 +229,7 @@ typedef enum
/* format signaling in SID frames */
#define SID_FORMAT_NBITS                        3                           /* Bit 0 | Bit 1 | Bit 2 */
                                                                            /*-------|-------|------ */
#ifdef FIX_1384_MSAN_ivas_spar_dec_open
#define SID_FORMAT_NONE                         (-0x1)                      /*    n/a|    n/a|    n/a*/
#endif
#define SID_DFT_STEREO                          0x0                         /*      0|      0|     0 */
#define SID_MDCT_STEREO                         0x1                         /*      1|      0|     0 */
#define SID_ISM                                 0x2                         /*      0|      1|     0 */
+0 −11
Original line number Diff line number Diff line
@@ -168,15 +168,6 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define FIX_1119_SPLIT_RENDERING_VOIP                   /* FhG: Add split rendering support to decoder in VoIP mode */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define FIX_1377_HANDLE_ERROR_CODE                      /* Eri: Add missing error code handling from IVAS_REND_SetObjectIDs */
#define FIX_HRTF_LEFTOVERS                              /* VA: HRTF updates - bring float main in line with BASOP main */
#define FIX_1384_MSAN_ivas_spar_dec_open                /* VA: issue 1386: fix use-of-uninitialized value in ivas_spar_dec_open() */
#define FIX_1384_MSAN_stereo_tcx_core_enc               /* VA: issue 1384: fix use-of-uninitialized value in stereo_tcx_core_enc() */
#define FIX_1388_MSAN_ivas_init_decoder                 /* VA: issue 1388: fix use-of-uninitialized value in ivas_init_decoder() */
#define FIX_1383_HEAD_TRACK_SANITIZER                   /* Nok: issue 1383: Fix head tracking struc values reading in renderer */
#define FIX_1385_INIT_IGF_STOP_FREQ                     /* FhG: Initialize infoIGFStopFreq in init_igf_dec() */
#define FIX_1387_INIT_PRM_SQQ                           /* FhG: initialize pointer prm_sqQ, which might be uninitialized in case of bfi == 1 */
#define FIX_1349_TNS_CRASH                              /* FhG: Fix crash in TNS entropy coding, in case order of joint TNS coding is reduced to 0 */


/* #################### End BE switches ################################## */
@@ -188,8 +179,6 @@

#define NONBE_1244_FIX_SWB_BWE_MEMORY                   /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ 
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define NONBE_1328_FIX_NON_LINEARITY                    /* VA: Fix possible issue when computing bwe_exc_extended and previous frame were almost 0  */
#define NONBE_1344_REND_MASA_LOW_FS                     /* Nokia: Issue 1344: Fix sanitizer errors when using IVAS_rend to render MASA with lower sampling rates */
#define NONBE_1399_1400_FIX_OBJ_EDIT_ISSUES             /* Nokia: Fix for issues 1399: obj edit broken with MC/SBA output in VOIP, and 1400: negative energy estimate used for gaining. */

/* ##################### End NON-BE switches ########################### */
+9 −12
Original line number Diff line number Diff line
@@ -2652,11 +2652,8 @@ void non_linearity(
    float *prev_scale,            /* i/o: memory                                    */
    const int16_t coder_type,     /* i  : Coder Type                                */
    const float *voice_factors,   /* i  : Voice Factors                             */
    const int16_t L_frame         /* i  : ACELP frame length                      */
#ifdef NONBE_1328_FIX_NON_LINEARITY
    ,
    const int16_t L_frame,        /* i  : ACELP frame length                        */
    const int16_t element_mode    /* i  : element_mode to differentiate EVS and IVAS*/
#endif
);

void interp_code_5over2(
+14 −24
Original line number Diff line number Diff line
@@ -1352,11 +1352,8 @@ void non_linearity(
    float *prev_scale,            /* i/o: memory                                    */
    const int16_t coder_type,     /* i  : Coder Type                                */
    const float *voice_factors,   /* i  : Voice Factors                             */
    const int16_t L_frame         /* i  : ACELP frame length  */
#ifdef NONBE_1328_FIX_NON_LINEARITY
    ,
    const int16_t L_frame,        /* i  : ACELP frame length                        */
    const int16_t element_mode    /* i  : element_mode to differentiate EVS and IVAS*/
#endif
)
{
    int16_t i, j;
@@ -1369,17 +1366,16 @@ void non_linearity(
    int16_t en_abs = 0;
    float v_fac = 0, ths;
    int16_t nframes;
#ifdef NONBE_1328_FIX_NON_LINEARITY
    float sc_factor;
#endif

    if ( L_frame == L_FRAME16k )
    {
        nframes = 5;
        nframes = NB_SUBFR16k;
        ths = 0.87f;
    }
    else
    {
        nframes = 4;
        nframes = NB_SUBFR;
        ths = 0.94f;
    }

@@ -1416,17 +1412,14 @@ void non_linearity(
        scale = 0.67f;
    }

#ifdef NONBE_1328_FIX_NON_LINEARITY
    sc_factor = 1024.0f;
    if ( element_mode > EVS_MONO )
    {
        sc_factor = (float) ( 1 << max( 13 - norm_s( j + 1 ), 0 ) ); /* Adapt the scaling factor allowed depending of max position  */
        sc_factor = max( sc_factor, 2.0f );
    }

    if ( *prev_scale <= 0.0 || *prev_scale > sc_factor * scale )
#else
    if ( *prev_scale <= 0.0 || *prev_scale > 1024.0f * scale )
#endif
    {
        scale_step = 1.0;
        *prev_scale = scale;
@@ -1483,17 +1476,14 @@ void non_linearity(
        scale = 0.67f;
    }

#ifdef NONBE_1328_FIX_NON_LINEARITY
    sc_factor = 1024.0f;
    if ( element_mode > EVS_MONO )
    {
        sc_factor = (float) ( 1 << max( 12 - norm_s( j - length / 2 + 1 ), 0 ) ); /* allowed intra frame jump is smaller */
        sc_factor = max( sc_factor, 2.0f );
    }

    if ( *prev_scale <= 0.0 || *prev_scale > sc_factor * scale )
#else
    if ( *prev_scale <= 0.0 || *prev_scale > 1024.0f * scale )
#endif
    {
        scale_step = 1.0;
        *prev_scale = scale;
Loading