Commit d94c66c5 authored by vaclav's avatar vaclav
Browse files

Merge branch 'main' into 76-SBA-order-in-the-bitstream

parents a33558e9 b379d47c
Loading
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -2155,9 +2155,7 @@ void stereo_mdct_core_dec(
void splitAvailableBits(
    const int16_t total_bits,                                   /* i  : total available bits for TCX coding     */
    const int16_t split_ratio,                                  /* i  : split ratio                             */
#ifdef LBR_SBA_CORE_CODING_TUNING
    const int16_t isSBAStereoMode,                              /* i  : signal core coding for sba              */
#endif
    int16_t *bits_ch0,                                          /* o  : bits for channel 0                      */
    int16_t *bits_ch1                                           /* o  : bits for channel 1                      */
);
@@ -2175,9 +2173,7 @@ void parse_stereo_from_bitstream(
    STEREO_MDCT_DEC_DATA_HANDLE hStereoMdct,                    /* i/o: MDCT stereo decoder structure           */
    Decoder_State **sts,                                        /* i/o: decoder state structure                 */
    const int16_t mct_on,                                       /* i  : flag mct block (1) or stereo (0)        */
#ifdef LBR_SBA_CORE_CODING_TUNING
    const int16_t isSBAStereoMode,                              /* i: flag core coding for sba         */
#endif
    Decoder_State *st0,                                         /* i/o: decoder state structure for Bstr        */
    int16_t ms_mask[NB_DIV][MAX_SFB]                            /* o  : bandwise MS mask                        */
);
@@ -2513,10 +2509,8 @@ ivas_error stereo_memory_enc(
    const int16_t max_bwidth,                                   /* i  : maximum audio bandwidth                 */
    float *tdm_last_ratio,                                      /* o  : TD stereo last ratio                    */
    const IVAS_FORMAT ivas_format                               /* i  : IVAS format                             */
#ifdef LBR_SBA_CORE_CODING_TUNING
    ,
    const int16_t nchan_transport                               /* i  : number transport chans                  */
#endif

);

@@ -3013,11 +3007,7 @@ void ivas_dirac_param_est_enc(
 *----------------------------------------------------------------------------------*/

/*! r: SBA format mode */
#ifdef LBR_SBA_CORE_CODING_TUNING
SBA_MODE ivas_sba_mode_select( 
#else
int16_t ivas_sba_mode_select( 
#endif
    const int32_t ivas_total_brate                              /* i  : IVAS total bitrate                      */
);

+0 −4
Original line number Diff line number Diff line
@@ -46,9 +46,7 @@
void splitAvailableBits(
    const int16_t total_bits,      /* i  : total available bits for TCX coding   */
    const int16_t split_ratio,     /* i  : split ratio                           */
#ifdef LBR_SBA_CORE_CODING_TUNING
    const int16_t isSBAStereoMode, /* i  : signal core coding for sba            */
#endif
    int16_t *bits_ch0,             /* o  : bits for channel 0                    */
    int16_t *bits_ch1              /* o  : bits for channel 1                    */
)
@@ -56,13 +54,11 @@ void splitAvailableBits(
    assert( split_ratio >= 1 && split_ratio < SMDCT_BITRATE_RATIO_RANGE );

    *bits_ch0 = split_ratio * total_bits / SMDCT_BITRATE_RATIO_RANGE;
#ifdef LBR_SBA_CORE_CODING_TUNING
    /* for SBA mode bias the distribution towards the W channel */
    if ( split_ratio < 7 && isSBAStereoMode )
    {
        *bits_ch0 += (int16_t) ( 0.2 * *bits_ch0 );
    }
#endif
    *bits_ch1 = total_bits - *bits_ch0;

    return;

lib_com/options.h

100755 → 100644
+5 −1
Original line number Diff line number Diff line
@@ -147,13 +147,17 @@
/*#define FIX_I1_113*/                                  /* under review : MCT bit distribution optimization for SBA high bitrates*/


#define LBR_SBA_CORE_CODING_TUNING                      /* Contribution "3 Core Coder Tuning for low bitrate SBA with 2 TCs" */

#define FIX_WRONG_NBANDS_IN_ITD_ESTIMATION              /* Issue 85: fix incorrect setting of nbands in calc_mean_E_ratio() if bwidth is limited on commandline*/


#define FIX_I87                                         /*  fix for issue 86: incorrect Ambisonics order set for head rotation in SBA */
#define SBA_ORDER_BITSTREAM                             /* issue 76: Use input sba order for bitstream coding */

/* NTT switches */
#define NTT_UPDATE_ITD_SW                               /* contribution 4: Update of ITD switch in stereo downmix for EVS */
#define NTT_REMOVE_EPS_ROM                              /* contribution 4: Reduction of ROM size in stereo downmix for EVS */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
#endif
+0 −17
Original line number Diff line number Diff line
@@ -361,27 +361,10 @@ ivas_error ivas_cpe_dec(

    if ( hCPE->element_mode != IVAS_CPE_DFT || ( hCPE->nchan_out == 1 && hCPE->hStereoDft->hConfig->res_cod_mode == STEREO_DFT_RES_COD_OFF ) )
    {
#ifndef LBR_SBA_CORE_CODING_TUNING
        if (  st_ivas->renderer_type == RENDERER_MC_PARAMMC && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) )
        {
            if ( ( error = ivas_core_dec( st_ivas, NULL, hCPE, st_ivas->hMCT, n_channels, output, outputHB, NULL, 0 ) ) != IVAS_ERR_OK )
            {
                return error;
            }
        }
        else
        {
            if ( ( error = ivas_core_dec( NULL, NULL, hCPE, st_ivas->hMCT, n_channels, output, outputHB, NULL, 0 ) ) != IVAS_ERR_OK )
            {
                return error;
            }
        }
#else
        if ( ( error = ivas_core_dec( st_ivas, NULL, hCPE, st_ivas->hMCT, n_channels, output, outputHB, NULL, 0 ) ) != IVAS_ERR_OK )
        {
            return error;
        }
#endif
    }

    if ( st_ivas->hMCT )
+0 −4
Original line number Diff line number Diff line
@@ -147,11 +147,7 @@ void ivas_mct_dec_mct(
        p_st[0] = sts[hBlock->ch1];
        p_st[1] = sts[hBlock->ch2];

#ifdef LBR_SBA_CORE_CODING_TUNING
        parse_stereo_from_bitstream( hBlock->hStereoMdct, p_st, 1, 0, sts[0], hBlock->mask );
#else
        parse_stereo_from_bitstream( hBlock->hStereoMdct, p_st, 1, sts[0], hBlock->mask );
#endif
    }

    return;
Loading