Commit 3291069a authored by vaclav's avatar vaclav
Browse files

Merge branch '20231024_acceptance_of_switches' into 'main'

20231024 acceptance of switches

See merge request !1191
parents 48d5b89d dff6c5c2
Loading
Loading
Loading
Loading
Loading
+2 −35
Original line number Diff line number Diff line
@@ -4682,19 +4682,11 @@ void ivas_td_decorr_APD_iir_filter(
    out1_re = ( in1_re * in2_re ) - ( in1_im * in2_im ); MAC(1); MULT(1);    \
    out1_im = ( in1_re * in2_im ) + ( in2_re * in1_im ); MAC(1); MULT(1);

#ifdef FIX_820_DOUBLE_PREC_MACROS
#define IVAS_CALCULATE_ABS( re, im, out ) \
    out = sqrtf( ( re * re ) + ( im * im ) ); MAC(1); MULT(1); SQRT(1);

#define IVAS_CALCULATE_RABS( re, out ) \
    out = sqrtf( re * re ); MULT(1); SQRT(1);
#else
#define IVAS_CALCULATE_ABS( re, im, out ) \
    out = (float) sqrt( ( re * re ) + ( im * im ) ); MAC(1); MULT(1); SQRT(1);

#define IVAS_CALCULATE_RABS( re, out ) \
    out = (float) sqrt( re * re ); MULT(1); SQRT(1);
#endif

#define IVAS_CALCULATE_SQ_ABS( re, im, out ) \
    out = (float) ( ( re * re ) + ( im * im ) ); MAC(1); MULT(1);
@@ -5357,15 +5349,10 @@ void ivas_ism2sba_sf(
    const int16_t sba_order                                     /* i  : Ambisonic (SBA) order                           */
);

#ifndef FIX_866_MOVE_VBAP
/*----------------------------------------------------------------------------------*
 * Amplitude Panning tool prototypes
 *----------------------------------------------------------------------------------*/
#else

/*----------------------------------------------------------------------------------*
 * Amplitude Panning VBAP prototypes
 *----------------------------------------------------------------------------------*/
#endif

void panning_wrap_angles(
    const float azi_deg,                                        /* i  : azimuth in degrees for panning direction (positive left) */
@@ -5373,27 +5360,6 @@ void panning_wrap_angles(
    float *azi_wrapped,                                         /* o  : wrapped azimuth component                                */
    float *ele_wrapped                                          /* o  : wrapped elevation component                              */
);
#ifndef FIX_866_MOVE_VBAP
ivas_error vbap_init_data(
    VBAP_HANDLE *hVBAPdata,                                     /* i/o: handle for VBAP data structure that will be initialized  */
    const float *speaker_node_azi_deg,                          /* i  : vector of speaker node azimuths (positive left)          */
    const float *speaker_node_ele_deg,                          /* i  : vector of speaker node elevations (positive up)          */
    const int16_t num_speaker_nodes,                            /* i  : number of speaker nodes in the set                       */
    const IVAS_FORMAT ivas_format                               /* i  : IVAS format                                              */
);

void vbap_free_data(
    VBAP_HANDLE *hVBAPdata                                      /* i/o: VBAP handle to be freed                                  */
);

void vbap_determine_gains(
    const VBAP_HANDLE hVBAPdata,                                /* i  : VBAP structure                                           */
    float *gains,                                               /* o  : gain vector for speaker nodes for given direction        */
    const int16_t azi_deg,                                      /* i  : azimuth in degrees for panning direction (positive left) */
    const int16_t ele_deg,                                      /* i  : elevation in degrees for panning direction (positive up) */
    const int16_t use_object_mode                               /* i  : select between object mode panning and spatial mode panning */
);
#endif

void v_sort_ind(
    float *x,                                                   /* i/o: Vector to be sorted                                      */
@@ -5401,6 +5367,7 @@ void v_sort_ind(
    const int16_t len                                           /* i  : vector length                                            */
);


/*----------------------------------------------------------------------------------*
 * LS Renderer prototypes
 *----------------------------------------------------------------------------------*/
+0 −8
Original line number Diff line number Diff line
@@ -150,10 +150,6 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
/*#define SPLIT_REND_WITH_HEAD_ROT  */                  /* Dlb,FhG: Split Rendering contributions 21 and 35 */

#define FIX_820_DOUBLE_PREC_MACROS                      /* VA: issue 820: Double precision arithmetic in IVAS_CALCULATE_ABS() */
#define FIX_814_DOUBLE_PREC_IN_REVERB                   /* Philips: Issue 814: Replace double precision arithmetic in reverb */
#define FIX_866_MOVE_VBAP                               /* Nokia: Issue 866: Move VBAP to lib_rend */
#define FIX_863_REMOVE_REDUNDANCIES_OMASA               /* Nokia/VA: Issue 863: Remove redundancies in stereo_classifier for OMASA */
#define FIX_879_USAN_ERROR_IN_MASA_DECODING             /* FhG: Issue 879 : avoid arithmetic with NULL pointer in the DirAC decoder to fix USAN error */

/* #################### End BE switches ################################## */
@@ -165,10 +161,6 @@

#define NONBE_FIX_856_TCX_LTP_SYNTH_FILTER                    /* FhG: issue 856: correct filtering length for tcx-ltp synth filtering*/
#define NONBE_UNIFIED_DECODING_PATHS                          /* FhG: unify decoding paths   */
#define NONBE_FIX_861_MASA_CRASH_STEREO_SWITCHING             /* VA: issue 861: fix MASA 2TC crash when switching from MDCT stereo to TD/DFT stereo */
#define BE_FIX_867_PARAMC_RECONFIG                            /* FhG: issue #867: fix ParamMC CLDFB buffer dealloc when reconfiguring */
#define NONBE_FIX_850_MASA_HBR_META_RATIO_DECODING            /* Nokia: issue #850: Fixes rare non-valid diffuseness and energy ratio values in 2dir MASA. */
#define NONBE_FIX_MDCT_STEREO_DTX_MONO_OUT                    /* FhG: fix clicks in DTX -> active transition frames in MDCT-Stereo with mono output */
#define NONBE_FIX_836_PARAMUPMIX_HEADROT                      /* Dlb: issue #836: Resolve "ParamUpmix MC to SBA conversion done on the already binaurlized output" */

/* ##################### End NON-BE switches ########################### */
+0 −19
Original line number Diff line number Diff line
@@ -184,7 +184,6 @@ static ivas_error ivas_binRenderer_convModuleOpen(
        {
            hBinRenConvModule->numTapsArray[bandIdx] = hBinRenConvModule->numTaps;
        }
#ifdef FIX_814_DOUBLE_PREC_IN_REVERB
        for ( ; bandIdx < 10; bandIdx++ )
        {
            hBinRenConvModule->numTapsArray[bandIdx] = (int16_t) ceilf( 0.6f * hBinRenConvModule->numTaps );
@@ -201,24 +200,6 @@ static ivas_error ivas_binRenderer_convModuleOpen(
        {
            hBinRenConvModule->numTapsArray[bandIdx] = (int16_t) ceilf( 0.3f * hBinRenConvModule->numTaps );
        }
#else
        for ( ; bandIdx < 10; bandIdx++ )
        {
            hBinRenConvModule->numTapsArray[bandIdx] = (int16_t) ceil( 0.6f * hBinRenConvModule->numTaps );
        }
        for ( ; bandIdx < 20; bandIdx++ )
        {
            hBinRenConvModule->numTapsArray[bandIdx] = (int16_t) ceil( 0.5f * hBinRenConvModule->numTaps );
        }
        for ( ; bandIdx < 30; bandIdx++ )
        {
            hBinRenConvModule->numTapsArray[bandIdx] = (int16_t) ceil( 0.4f * hBinRenConvModule->numTaps );
        }
        for ( ; bandIdx < hBinRenderer->conv_band; bandIdx++ )
        {
            hBinRenConvModule->numTapsArray[bandIdx] = (int16_t) ceil( 0.3f * hBinRenConvModule->numTaps );
        }
#endif
    }
    else
    {
+0 −2
Original line number Diff line number Diff line
@@ -1260,14 +1260,12 @@ void ivas_qmetadata_to_dirac(
                        hSpatParamRendCom->energy_ratio2[meta_write_index][b] = q_direction->band_data[band].energy_ratio[block];
                        hSpatParamRendCom->diffuseness_vector[meta_write_index][b] -= q_direction->band_data[band].energy_ratio[block];

#ifdef NONBE_FIX_850_MASA_HBR_META_RATIO_DECODING
                        /* Sanitize diffuseness for rare cases where floating point inaccuracy could result in negative diffuseness. */
                        if ( hSpatParamRendCom->diffuseness_vector[meta_write_index][b] < 0.0f )
                        {
                            hSpatParamRendCom->diffuseness_vector[meta_write_index][b] = 0.0f;
                        }

#endif
                        if ( q_direction->coherence_band_data != NULL )
                        {
                            hSpatParamRendCom->spreadCoherence2[meta_write_index][b] = q_direction->coherence_band_data[band].spread_coherence[block] / 255.0f;
+0 −18
Original line number Diff line number Diff line
@@ -982,26 +982,16 @@ ivas_error ivas_param_mc_dec_reconfig(
        {
            int16_t n_cldfb_slots;


            if ( hParamMC->Cldfb_RealBuffer_tc != NULL )
            {
                free( hParamMC->Cldfb_RealBuffer_tc );
                hParamMC->Cldfb_RealBuffer_tc = NULL;
            }

#ifdef BE_FIX_867_PARAMC_RECONFIG
            if ( hParamMC->Cldfb_ImagBuffer_tc != NULL )
            {
                free( hParamMC->Cldfb_ImagBuffer_tc );
                hParamMC->Cldfb_ImagBuffer_tc = NULL;
            }
#else
            if ( hParamMC->Cldfb_RealBuffer_tc != NULL )
            {
                free( hParamMC->Cldfb_RealBuffer_tc );
                hParamMC->Cldfb_RealBuffer_tc = NULL;
            }
#endif

            n_cldfb_slots = DEFAULT_JBM_CLDFB_TIMESLOTS;
            if ( st_ivas->hDecoderConfig->Opt_tsm )
@@ -1027,19 +1017,11 @@ ivas_error ivas_param_mc_dec_reconfig(
                free( hParamMC->Cldfb_RealBuffer_tc );
                hParamMC->Cldfb_RealBuffer_tc = NULL;
            }
#ifdef BE_FIX_867_PARAMC_RECONFIG
            if ( hParamMC->Cldfb_ImagBuffer_tc != NULL )
            {
                free( hParamMC->Cldfb_ImagBuffer_tc );
                hParamMC->Cldfb_ImagBuffer_tc = NULL;
            }
#else
            if ( hParamMC->Cldfb_RealBuffer_tc != NULL )
            {
                free( hParamMC->Cldfb_RealBuffer_tc );
                hParamMC->Cldfb_RealBuffer_tc = NULL;
            }
#endif
        }
    }
#endif
Loading