Commit f1d4bca8 authored by eichenseer's avatar eichenseer
Browse files

[fixed] Accepted PARAM_ISM_DTX_PARABIN_RATIO_FIX and PARAM_ISM_DTX_CORE_FIX...

[fixed] Accepted PARAM_ISM_DTX_PARABIN_RATIO_FIX and PARAM_ISM_DTX_CORE_FIX (part of PARAM_ISM_DTX_CNG).
parent 6516582b
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -522,7 +522,7 @@ void stereo_tcx_core_dec(
    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               */
#ifdef PARAM_ISM_DTX_CORE_FIX
#ifdef PARAM_ISM_DTX_CNG
    ,
    const IVAS_FORMAT ivas_format,                              /* i  : IVAS format                             */
    const ISM_MODE ism_mode                                     /* i  : ISM mode (only needed if format is ISM) */
+0 −5
Original line number Diff line number Diff line
@@ -163,12 +163,7 @@

#define FIX_343_TO_UPPER                                /* VA: issue 343: safeguard for function to_upper() */


#define PARAM_ISM_DTX_CNG                               /* Support of DTX/CNG for Param-ISM, includes updates */ 
#ifdef PARAM_ISM_DTX_CNG
#define PARAM_ISM_DTX_PARABIN_RATIO_FIX                 /* Nokia: Better value for energy ratio for parametric binauralizer when in DTX */
#define PARAM_ISM_DTX_CORE_FIX                          /* FhG: restrict core coder changes to ParamISM DTX */
#endif

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+1 −1
Original line number Diff line number Diff line
@@ -341,7 +341,7 @@ ivas_error ivas_core_dec(
        if ( ( st->core == TCX_20_CORE || st->core == TCX_10_CORE ) && st->element_mode != IVAS_CPE_MDCT )
        {
            /* TCX decoder */
#ifdef PARAM_ISM_DTX_CORE_FIX
#ifdef PARAM_ISM_DTX_CNG
            stereo_tcx_core_dec( st, frameMode[n], output[n], synth[n], pitch_buf[n], sba_dirac_stereo_flag, hStereoTD, last_element_mode, flag_sec_CNA, hCPE == NULL ? NULL : hCPE->hStereoCng, nchan_out, st_ivas == NULL ? NULL : st_ivas->ivas_format, st_ivas == NULL ? NULL : st_ivas->ism_mode );
#else
            stereo_tcx_core_dec( st, frameMode[n], output[n], synth[n], pitch_buf[n], sba_dirac_stereo_flag, hStereoTD, last_element_mode, flag_sec_CNA, hCPE == NULL ? NULL : hCPE->hStereoCng, nchan_out );
+3 −6
Original line number Diff line number Diff line
@@ -1004,10 +1004,9 @@ void ivas_param_ism_params_to_masa_param_mapping(
#ifdef PARAM_ISM_DTX_CNG
        if ( hDirAC->hParamIsm->paramISM_DTX_CNG_FLAG )
        {
#ifdef PARAM_ISM_DTX_PARABIN_RATIO_FIX
            float energy_ratio;
            energy_ratio = powf( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence, 2.0f );
#endif

            hDirAC->numSimultaneousDirections = 1;
            azimuth[0] = (int16_t) roundf( hDirAC->azimuth_values[0] );
            elevation[0] = (int16_t) roundf( hDirAC->elevation_values[0] );
@@ -1017,11 +1016,9 @@ void ivas_param_ism_params_to_masa_param_mapping(
                {
                    hDirAC->azimuth[sf_idx][bin_idx] = azimuth[0];
                    hDirAC->elevation[sf_idx][bin_idx] = elevation[0];
#ifdef PARAM_ISM_DTX_PARABIN_RATIO_FIX

                    hDirAC->energy_ratio1[sf_idx][bin_idx] = energy_ratio;
#else
                    hDirAC->energy_ratio1[sf_idx][bin_idx] = 1.0f;
#endif

                    hDirAC->spreadCoherence[sf_idx][bin_idx] = 0.0f;
                    hDirAC->surroundingCoherence[sf_idx][bin_idx] = 0.0;
                }
+1 −1
Original line number Diff line number Diff line
@@ -274,7 +274,7 @@ ivas_error ivas_sce_dec(
     * Decoder
     *----------------------------------------------------------------*/

#ifdef PARAM_ISM_DTX_CORE_FIX
#ifdef PARAM_ISM_DTX_CNG
    if ( ( error = ivas_core_dec( st_ivas, hSCE, NULL, NULL, 1, output, outputHB, NULL, st_ivas->sba_dirac_stereo_flag ) ) != IVAS_ERR_OK )
#else
    if ( ( error = ivas_core_dec( NULL, hSCE, NULL, NULL, 1, output, outputHB, NULL, st_ivas->sba_dirac_stereo_flag ) ) != IVAS_ERR_OK )
Loading