Commit dc9d509a authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Merge remote-tracking branch 'origin/ivas-float-update' into...

Merge remote-tracking branch 'origin/ivas-float-update' into 1892_remove_unintended_basop_instructions
parents d0c28127 957cd45f
Loading
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -170,6 +170,7 @@
#define NONBE_1215_FIX_JBM_MAX_SCALING                  /* FhG: issue 1215: Fix assert hit in a specific VoIP decoder config. Caused by integer overflow in max scaling calculation. */
#define NONBE_FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT   /* fix 1070 USAN: nullptr-with-offset and Segfaults in 7_1_4 to BINAURAL and BINAURAL_ROOM_REVERB decoding with bitrate switching and head rotation*/
#define FIX_1068_ASAN_IN_MC_2_BINAURAL_ROOM_IR          /* issue 1068 : Memory leak in MC to BINAURAL_ROOM decoding with bitrate switching*/
#define FIX_1129_EXT_REND_OUTPUT_HIGH                   /* Philips: issue 1129: External renderer BINAURAL_ROOM_REVERB format output level too high compared to internal rendering output */
#define NONBE_FIX_MC_LFE_LPF                                  /* Dlb: Adding the LFE LPF filter back for MC content. */
#define FIX_1050_EFAP_ALLOC                             /* FhG: issue 1050: reduction of memory allocated to EFAP handle */
#define NONBE_FIX_1052_SBA_EXT                          /* Dlb: SBA external output support */
@@ -215,8 +216,10 @@
#define FIX_587_DEFAULT_REVERB                          /* Philips: issue 587: inconsistent default reverb parameters across renderers */
#define NONBE_1214_PLC_LSF_MEMORY                       /* VA: issue 1224: reset ACELP PLC FEC memory in case of switching from MDCT stereo to TD/DFT stereo */
#define NONBE_1293_SR_HRTF                              /* VA: issue 1293: add support of external HRTFs in split rendering */
#define FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX          /* VA: issue 1249: remove obsolete code around ALLRAD decoder matrix */
#define NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH             /* VA: issue 1220: fix bug in renderer flush in OMASA 1ISM JBM bitrate switching */
#define FIX_1369_HQ_LR_OVERFLOW                         /* FhG: fix BASOP overflow in hq_lr_enc(), brings floating-point code inline with FX */
#define NONBE_1118_EVS_LR_HQ_BITERROR                   /* VA: issue 1118: fix EVS decoder crash in LR-HQ in case of bit errors */
#define FIX_1139_REV_COLORATION_SHORT_T60               /* Nokia,FhG: Fix issue 1139, prevent sound coloration artefacts at very low reverberation times */

/* #################### End BASOP porting switches ############################ */
+20 −0
Original line number Diff line number Diff line
@@ -616,10 +616,30 @@ void hq_lr_dec(

            IF( sub( i, highband ) >= 0 )
            {
#ifdef NONBE_1118_EVS_LR_HQ_BITERROR
                /* safety check in case of bit errors */
                if ( Ep_fx[i] > 536788991 /* max(Q30) */ )
                {
                    st->BER_detect = 1;
                    set_f( yout, 0, inner_frame );
                    return;
                }

#endif
                enerH_fx = L_add( enerH_fx, L_shl( Ep_fx[i], 2 ) ); /*Q0 */
            }
            ELSE IF( sub( i, lowband ) >= 0 )
            {
#ifdef NONBE_1118_EVS_LR_HQ_BITERROR
                /* safety check in case of bit errors */
                if ( Ep_fx[i] > 536788991 /* max(Q30) */ )
                {
                    st->BER_detect = 1;
                    set_f( yout, 0, inner_frame );
                    return;
                }

#endif
                enerL_fx = L_add( enerL_fx, L_shl( Ep_fx[i], 2 ) ); /*Q0 */
            }
        }
+4 −2
Original line number Diff line number Diff line
@@ -1643,7 +1643,7 @@ ivas_error ivas_init_decoder(
        {
            return error;
        }

#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX
        if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC && st_ivas->hOutSetup.is_loudspeaker_setup )
        {
            if ( ( error = ivas_sba_get_hoa_dec_matrix( st_ivas->hOutSetup, &st_ivas->hoa_dec_mtx, st_ivas->hIntSetup.ambisonics_order ) ) != IVAS_ERR_OK )
@@ -1651,6 +1651,7 @@ ivas_error ivas_init_decoder(
                return error;
            }
        }
#endif

        if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ),
                                              st_ivas->ivas_format ) ) != IVAS_ERR_OK )
@@ -1801,7 +1802,7 @@ ivas_error ivas_init_decoder(
        {
            return error;
        }

#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX
        if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC && st_ivas->hOutSetup.is_loudspeaker_setup )
        {
            if ( ( error = ivas_sba_get_hoa_dec_matrix( st_ivas->hOutSetup, &st_ivas->hoa_dec_mtx, st_ivas->hIntSetup.ambisonics_order ) ) != IVAS_ERR_OK )
@@ -1809,6 +1810,7 @@ ivas_error ivas_init_decoder(
                return error;
            }
        }
#endif

        if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ),
                                              st_ivas->ivas_format ) ) != IVAS_ERR_OK )
+9 −0
Original line number Diff line number Diff line
@@ -338,6 +338,12 @@ void ivas_renderer_select(
            {
                *internal_config = output_config;
            }
#ifdef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX
            else
            {
                *internal_config = IVAS_AUDIO_CONFIG_HOA3;
            }
#else
            else if ( output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO )
            {
                *internal_config = IVAS_AUDIO_CONFIG_FOA;
@@ -350,6 +356,7 @@ void ivas_renderer_select(
            {
                *internal_config = IVAS_AUDIO_CONFIG_HOA3;
            }
#endif
            *renderer_type = RENDERER_SBA_LINEAR_DEC;
        }
        else if ( ( ivas_format == MASA_FORMAT && output_config == IVAS_AUDIO_CONFIG_MONO && st_ivas->nchan_transport == 1 ) ||
@@ -369,10 +376,12 @@ void ivas_renderer_select(
        {
            *renderer_type = RENDERER_DISABLE;
        }
#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX
        else if ( ivas_format == SBA_FORMAT && output_config == IVAS_AUDIO_CONFIG_MONO )
        {
            *renderer_type = RENDERER_SBA_LINEAR_DEC;
        }
#endif
        else if ( ivas_format == SBA_ISM_FORMAT && output_config == IVAS_AUDIO_CONFIG_STEREO )
        {
            *renderer_type = RENDERER_OSBA_STEREO;
+2 −2
Original line number Diff line number Diff line
@@ -605,11 +605,11 @@ static void calc_poc(
        /* Channel selection based on ILD     */
        if ( hPHA->trns_aux_energy[0] > hPHA->trns_aux_energy[1] * hPHA->pha_ipd_ild_thresh )
        {
            pha_ipd_ild_chan2rephase = 0;
            pha_ipd_ild_chan2rephase = 1;
        }
        else if ( hPHA->trns_aux_energy[1] > hPHA->trns_aux_energy[0] * hPHA->pha_ipd_ild_thresh )
        {
            pha_ipd_ild_chan2rephase = 1;
            pha_ipd_ild_chan2rephase = 0;
        }
        else
        {
Loading