Commit 657b7b34 authored by eichenseer's avatar eichenseer
Browse files

Accepted SCALING_OFF, removed TMP_FIX2, added TMP_FIX4.

parent 5aee5a88
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -153,9 +153,6 @@ typedef struct ivas_param_ism_data_structure

    float long_term_energy_stereo_dmx_enc[PARAM_ISM_MAX_DMX][PARAM_ISM_HYS_BUF_SIZE];
    float coh;
#ifndef SCALING_OFF
    float ene_ratio;
#endif
#endif

} PARAM_ISM_CONFIG_DATA, *PARAM_ISM_CONFIG_HANDLE;
+1 −3
Original line number Diff line number Diff line
@@ -159,12 +159,10 @@
#ifdef PARAM_ISM_DTX_CNG
#define PARAM_ISM_DTX_CNG_STABILIZE_SW_DECISION         /* Patch to stabilize the switching decision */
#define PARAM_ISM_DTX_CNG_EST_RES_SPEC_DEC              /* Patch to estimate noise at decoder, includes USE_NOISE_EST_FROM_CORE_PARAM_ISM_DTX */
// helper switches:
#define SCALING_OFF                                     /* Remove the energy ratio/scaling parameter previously transmitted in the SID frames */
// choose one of the following:
#define TMP_FIX                                         /* set cng_type to FD_CNG, quick hack; TODO: move init to correct place */
//#define TMP_FIX2                                        /* cng_type init here? seems to not quite produce the same results; to check */
//#define TMP_FIX3                                        /* cng_type here could work, to be verified */
//#define TMP_FIX4
#define PARAM_ISM_DTX_PARABIN_RATIO_FIX                 /* Nokia: Better value for energy ratio for parametric binauralizer when in DTX */
#endif

+0 −6
Original line number Diff line number Diff line
@@ -407,12 +407,6 @@ typedef struct
    float coherence;      /* inter-channel coherence of noise */
    int16_t no_side_flag; /* indicates whether the side noise shape should be zeroed-out or not */

#ifdef PARAM_ISM_DTX_CNG
#ifndef SCALING_OFF
    float scaling;
#endif
#endif

} FD_CNG_COM, *HANDLE_FD_CNG_COM;


+0 −21
Original line number Diff line number Diff line
@@ -1078,25 +1078,8 @@ void generate_comfort_noise_dec(
    int16_t tcx_transition;
    float enr, att;

#ifdef PARAM_ISM_DTX_CNG
    if ( st->element_mode == IVAS_SCE && st->cng_paramISM_flag )
    {
#ifdef SCALING_OFF
        scale = 1.0f;
#else
        scale = hFdCngCom->scaling;
#endif
        scaleCldfb = ( CLDFB_SCALING / hFdCngCom->scalingFactor ) * scale;
    }
    else
    {
    scale = 1.f;
    scaleCldfb = CLDFB_SCALING / hFdCngCom->scalingFactor;
    }
#else
    scale = 1.f;
    scaleCldfb = CLDFB_SCALING / hFdCngCom->scalingFactor;
#endif  

    c1 = (float) sqrt( hFdCngCom->coherence );
    c2 = (float) sqrt( 1 - hFdCngCom->coherence );
@@ -1387,10 +1370,6 @@ void generate_comfort_noise_dec_hf(

        c1 = (float)sqrt(hFdCngCom->coherence);
        c2 = (float)sqrt(1 - hFdCngCom->coherence);

#ifndef SCALING_OFF
        scale *= hFdCngCom->scaling;
#endif
    }
#endif 

+4 −0
Original line number Diff line number Diff line
@@ -805,6 +805,10 @@ ivas_error ivas_init_decoder(
            }

            reset_indices_dec( st_ivas->hSCE[sce_id]->hCoreCoder[0] );

#ifdef TMP_FIX4
            st_ivas->hSCE[sce_id]->hCoreCoder[0]->cng_type = FD_CNG; /* use FD-CNG in both ParamISM and discrete ISM */
#endif
        }

#ifdef PARAM_ISM_DTX_CNG
Loading