Commit f82745bd authored by multrus's avatar multrus
Browse files

Merge branch '2085-fix-fp-leftovers-ivas_dirac_config_fx' into 'main'

Resolve: "Floating-point leftovers: lib_com/ivas_dirac_com_fx.c, ivas_dirac_config_fx.c"

Closes #2085

See merge request !2349
parents 0db3d064 59af466e
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;
}
+1 −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 */