Commit a0c31173 authored by fotopoulou's avatar fotopoulou
Browse files

Merge branch 'main' into 1680_basop_port-object-editing-API

parents d5db4897 c7ea1c01
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -799,8 +799,12 @@ enum
#define CLDFB_NO_COL_MAX_SWITCH             6                      /* CLDFB resampling - max number of CLDFB col. for switching */
#define CLDFB_NO_COL_MAX_SWITCH_BFI         10                     /* CLDFB resampling - max number of CLDFB col. for switching, BFI */
#define CLDFB_OVRLP_MIN_SLOTS               3                      /* CLDFB resampling - minimize processing to minimum required for transition frame ACELP->TCX/HQ */

#ifndef FIX_2085_FLOATING_POINT_LEFTOVERS
#define INV_CLDFB_BANDWIDTH                 ( 1.f / 800.f )
#define INV_CLDFB_BANDWIDTH_Q31             ( 2684355l )
#endif

#define INV_CLDFB_BANDWIDTH_Q31             ( 2684355l )           /* ( 1.f / 800.f ) Q31 */
#define INV_CLDFB_BANDWIDTH_MDFT_FAC_Q31    ( 10737418 )
#define CLDFB_BANDWIDTH                     800

+12 −0
Original line number Diff line number Diff line
@@ -218,6 +218,17 @@ ivas_error ivas_dirac_config_fx(
    }

    test();
#ifdef FIX_2085_FLOATING_POINT_LEFTOVERS
    IF( EQ_32( ivas_format, SBA_FORMAT ) || EQ_32( ivas_format, SBA_ISM_FORMAT ) )
    {
        // 100861_dirac_dec
        ivas_dirac_config_bands_fx( band_grouping, IVAS_MAX_NUM_BANDS, extract_l( Mpy_32_32_r( Fs, INV_CLDFB_BANDWIDTH_Q31 ) ), dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hConfig->enc_param_start_band, hFbMdft, 1 );
    }
    ELSE
    {
        ivas_dirac_config_bands_fx( band_grouping, hConfig->nbands, extract_l( Mpy_32_32_r( Fs, INV_CLDFB_BANDWIDTH_Q31 ) ), NULL, 0, 0, hFbMdft, 1 );
    }
#else
    IF( EQ_32( ivas_format, SBA_FORMAT ) || EQ_32( ivas_format, SBA_ISM_FORMAT ) )
    {
        // 100861_dirac_dec
@@ -227,6 +238,7 @@ ivas_error ivas_dirac_config_fx(
    {
        ivas_dirac_config_bands_fx( band_grouping, hConfig->nbands, (Word16) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), NULL, 0, 0, hFbMdft, 1 );
    }
#endif

    return error;
}
+2 −0
Original line number Diff line number Diff line
@@ -112,6 +112,7 @@
#define FIX_2602_NONBE_SAT_IN_SWB_TBE_SCALE                  /* Dolby/FhG: fix for issue 2026: Saturation in SWB TBE re-scaling function preventing StereoDownmix complexity job to complete */
#define FIX_2021_BANDWIDTH_EXTENSION_PROBLEM                 /* FhG: increase cldfb buffer precision*/

#define FIX_2085_FLOATING_POINT_LEFTOVERS                    /* FhG: convert floating-point leftovers in ivas_dirac_config_fx() */
/* #################### Start BASOP porting switches ############################ */

#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 */
@@ -149,6 +150,7 @@
#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 NONBE_1296_TDREND_ITD_OUT_OF_BOUNDS_ACCESS      /* Eri: issue 1296: ITD resampling can occasionally read out of bounds, especially when the requested subframes are short (1.25 ms). Seen for headtracking+JBM. */
#define FIX_1349_TNS_CRASH                              /* FhG: Fix crash in TNS entropy coding, in case order of joint TNS coding is reduced to 0 */

// object-editing feature porting
#define OBJ_EDITING_API                                 /* object editing changes related to the API */
+13 −0
Original line number Diff line number Diff line
@@ -5128,6 +5128,19 @@ void TNSAnalysisStereo_fx(
                                        move16();
                                        move16();
                                    }
#ifdef FIX_1349_TNS_CRASH
                                    ELSE
                                    {
                                        pFilter[0]->filterType = TNS_FILTER_OFF;
                                        pFilter[1]->filterType = TNS_FILTER_OFF;
                                        sts[0]->hTcxEnc->tnsData[k].nFilters = 0;
                                        sts[1]->hTcxEnc->tnsData[k].nFilters = 0;
                                        move16();
                                        move16();
                                        move16();
                                        move16();
                                    }
#endif
                                }
                            }
                        }