Commit 8fc4bcfd authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

merge main to branch

parents 32d9ad9a 45bdd90e
Loading
Loading
Loading
Loading
Loading
+3 −17
Original line number Diff line number Diff line
@@ -4227,10 +4227,6 @@ void ivas_sba_mix_matrix_determiner(
    const int16_t bfi,                                          /* i  : BFI flag                                */
    const int16_t nchan_remapped,                               /* i  : num channels after remapping of TCs     */
    const int16_t output_frame                                  /* i  : output frame length                     */
#ifdef VLBR_20MS_MD
    ,
    const int16_t num_md_sub_frames                             /* i : number of subframes in mixing matrix  */
#endif
);

/* AGC */
@@ -4529,19 +4525,9 @@ void ivas_get_spar_md_from_dirac(
/*! r: number of MD subframes */
int16_t ivas_get_spar_dec_md_num_subframes(
    const int16_t sba_order,                                    /* i  : Ambisonic (SBA) order                   */
    const int32_t ivas_total_brate );
#ifdef VLBR_20MS_MD

ivas_error ivas_spar_md_dec_matrix_open(
    ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle       */
    const int16_t num_channels,       /* i  : number of internal channels  */
    const int16_t num_md_sub_frames );

void ivas_spar_md_dec_matrix_close(
    ivas_spar_md_dec_state_t *hMdDecoder, /* i/o: SPAR MD decoder handle      */
    const int16_t num_channels );            /* i  : number of internal channels */
    const int32_t ivas_total_brate                              /* i  : IVAS total bitrate                      */
);

#endif
ivas_error ivas_spar_md_dec_open(
    ivas_spar_md_dec_state_t **hMdDec_out,                      /* i/o: SPAR MD decoder handle                  */
    const DECODER_CONFIG_HANDLE hDecoderConfig,                 /* i  : configuration structure                 */
+3 −1
Original line number Diff line number Diff line
@@ -142,7 +142,8 @@
/* only BE switches wrt operation points tested in selection */

/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define VLBR_20MS_MD                                    /* Dlb: SBA VLBR 20ms Optimization*/


#define FIX_563_PARAMMC_LIMITER                         /* FhG: issue 563: fix ILD limiter when coming from silence w/o transient set             */
#define FIX_560_VAD_FLAG                                /* Eri: Issue 560 - VAD flag issue for unified stereo */
#define FIX_549_DMX_GAIN                                /* FhG: issue 549: ParamISM output too quiet */
@@ -165,6 +166,7 @@
#define FIX_580_PARAMMC_ENER_BURSTS                     /* FhG: issue 580: energy bursts due to ILD holding when energy relations change too much */
#define FIX_593_STL_INCLUDE                             /* FhG: Issue 593: correct include of stl.h in lib_enc/ivas_stereo_eclvq_enc.c */
#define FIX_583_CLANG_TRANS_DET                         /* FhG: Issue 583: clang left shift on ramp_up_flag in transient detector */
#define NONBE_FIX_589_JBM_TC_OFFSETS                    /* FhG: issue 589: wrong offset into the TC buffers is used in some rendering paths in the JBM main rendering function */
#define FIX_MEM_REALLOC_IND_LIST                        /* VA: issue 601: failure of the automatic memory re-allocation mechanism when ind_list[] buffer is depleted in MASA mode with 2 TC*/

/* ################## End BE DEVELOPMENT switches ######################### */
+0 −8
Original line number Diff line number Diff line
@@ -67,9 +67,6 @@ ivas_error ivas_dec(
    float pan_left, pan_right;
    ivas_error error;
    float *p_output[MAX_OUTPUT_CHANNELS];
#ifdef VLBR_20MS_MD
    int16_t num_md_sub_frames;
#endif

    error = IVAS_ERR_OK;

@@ -383,12 +380,7 @@ ivas_error ivas_dec(

            if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM )
            {
#ifdef VLBR_20MS_MD
                num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate );
                ivas_sba_mix_matrix_determiner( st_ivas->hSpar, output, st_ivas->bfi, nchan_remapped, output_frame, num_md_sub_frames );
#else
                ivas_sba_mix_matrix_determiner( st_ivas->hSpar, output, st_ivas->bfi, nchan_remapped, output_frame );
#endif
            }
            else if ( st_ivas->renderer_type != RENDERER_DISABLE )
            {
+18 −10
Original line number Diff line number Diff line
@@ -82,9 +82,6 @@ ivas_error ivas_jbm_dec_tc(
    AUDIO_CONFIG output_config;
    ivas_error error;
    float *p_output[MAX_TRANSPORT_CHANNELS];
#ifdef VLBR_20MS_MD
    int16_t num_md_sub_frames;
#endif

    error = IVAS_ERR_OK;

@@ -285,12 +282,7 @@ ivas_error ivas_jbm_dec_tc(

            if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM )
            {
#ifdef VLBR_20MS_MD
                num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate );
                ivas_sba_mix_matrix_determiner( st_ivas->hSpar, output, st_ivas->bfi, nchan_remapped, output_frame, num_md_sub_frames );
#else
                ivas_sba_mix_matrix_determiner( st_ivas->hSpar, output, st_ivas->bfi, nchan_remapped, output_frame );
#endif
            }
            else
            {
@@ -709,8 +701,13 @@ ivas_error ivas_jbm_dec_render(
                *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal );
                pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f;
                pan_right = 1.f - pan_left;
#ifdef NONBE_FIX_589_JBM_TC_OFFSETS
                v_multc( p_tc[0], pan_right, output[1], *nSamplesRendered );
                v_multc( p_tc[0], pan_left, output[0], *nSamplesRendered );
#else
                v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], *nSamplesRendered );
                v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], *nSamplesRendered );
#endif
            }
            else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC )
            {
@@ -737,8 +734,13 @@ ivas_error ivas_jbm_dec_render(
            {
                pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f;
                pan_right = 1.f - pan_left;
#ifdef NONBE_FIX_589_JBM_TC_OFFSETS
                v_multc( p_tc[0], pan_right, output[1], *nSamplesRendered );
                v_multc( p_tc[0], pan_left, output[0], *nSamplesRendered );
#else
                v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], *nSamplesRendered );
                v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], *nSamplesRendered );
#endif
            }
            else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV )
            {
@@ -824,8 +826,11 @@ ivas_error ivas_jbm_dec_render(
                {
                    return error;
                }

#ifdef NONBE_FIX_589_JBM_TC_OFFSETS
                ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_tc, p_output );
#else
                ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, st_ivas->hTcBuffer->tc, p_output );
#endif
            }
            else if ( st_ivas->renderer_type == RENDERER_MC )
            {
@@ -842,8 +847,11 @@ ivas_error ivas_jbm_dec_render(
                {
                    return error;
                }

#ifdef NONBE_FIX_589_JBM_TC_OFFSETS
                ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_tc, p_output );
#else
                ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, st_ivas->hTcBuffer->tc, p_output );
#endif
            }
        }
        else if ( st_ivas->mc_mode == MC_MODE_PARAMMC )
+0 −4
Original line number Diff line number Diff line
@@ -1169,11 +1169,7 @@ void ivas_spar_param_to_masa_param_mapping(
        }
        else
        {
#ifdef VLBR_20MS_MD
            mixer_mat_index = ( ivas_get_spar_dec_md_num_subframes( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ) == 1 ) ? 0 : ( sf - SPAR_META_DELAY_SUBFRAMES );
#else
            mixer_mat_index = sf - SPAR_META_DELAY_SUBFRAMES;
#endif
            for ( band = 0; band < SPAR_DIRAC_SPLIT_START_BAND; band++ )
            {
                for ( i = 0; i < FOA_CHANNELS; i++ )
Loading