Commit e6b45e18 authored by TYAGIRIS's avatar TYAGIRIS
Browse files

Merge branch 'dlb_sba_vlbr_20ms_optimization' into 'main'

SBA VLBR 20ms Optimization

See merge request !701
parents 93750309 136091c1
Loading
Loading
Loading
Loading
Loading
+17 −3
Original line number Diff line number Diff line
@@ -4227,6 +4227,10 @@ 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 */
@@ -4525,9 +4529,19 @@ 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                              /* i  : IVAS total bitrate                      */
);
    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 */
    
#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                 */
+1 −2
Original line number Diff line number Diff line
@@ -143,8 +143,7 @@
/* 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 */
+8 −0
Original line number Diff line number Diff line
@@ -67,6 +67,9 @@ 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;

@@ -380,7 +383,12 @@ 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 )
            {
+8 −0
Original line number Diff line number Diff line
@@ -82,6 +82,9 @@ 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;

@@ -282,7 +285,12 @@ 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
            {
+4 −0
Original line number Diff line number Diff line
@@ -1169,7 +1169,11 @@ 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