Commit 35793688 authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/main' into revision_of_todos

parents 32d77eb9 488c37c9
Loading
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2255,8 +2255,7 @@ static ivas_error decodeVoIP(


        /* decode and get samples */
        if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms,
                                                 &nSamplesAvailableNext
        if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms, &nSamplesAvailableNext
#ifdef SUPPORT_JBM_TRACEFILE
                                                 ,
                                                 writeJbmTraceFileFrameWrapper,
+20 −15
Original line number Diff line number Diff line
@@ -229,7 +229,7 @@ Word16 rate2EVSmode(

ivas_error ind_list_realloc(
    BSTR_ENC_HANDLE hBstr,        /* i/o: encoder bitstream handle                          */
    int16_t max_num_indices /* i  : new maximum number of allowed indices in the list */
    const int16_t max_num_indices /* i  : new maximum number of allowed indices in the list */
)
{
    int16_t i, ind_list_pos;
@@ -281,7 +281,8 @@ ivas_error ind_list_realloc(
 * Get the maximum allowed number of indices in the encoder
 *-----------------------------------------------------------------------*/

int16_t get_ivas_max_num_indices(                                /* o  : maximum number of indices */
/*! r: maximum number of indices */
int16_t get_ivas_max_num_indices(
    const IVAS_FORMAT ivas_format, /* i  : IVAS format               */
    const int32_t ivas_total_brate /* i  : IVAS total bitrate        */
)
@@ -519,7 +520,8 @@ int16_t get_ivas_max_num_indices( /* o : maximum
 * Get the maximum allowed number of indices in the core coder
 *-----------------------------------------------------------------------*/

int16_t get_core_max_num_indices(                           /* o  : maximum number of indices */
/*! r: maximum number of indices */
int16_t get_core_max_num_indices(
    const int16_t core,       /* i  : core                      */
    const int32_t total_brate /* i  : total bitrate             */
)
@@ -694,7 +696,8 @@ int16_t get_core_max_num_indices( /* o : maximum numb
 * Get the maximum number of indices in the BWE
 *-----------------------------------------------------------------------*/

int16_t get_BWE_max_num_indices(                          /* o  : maximum number of indices */
/*! r: maximum number of indices */
int16_t get_BWE_max_num_indices(
    const int32_t extl_brate /* i  : extensiona layer bitrate  */
)
{
@@ -716,7 +719,8 @@ int16_t get_BWE_max_num_indices( /* o : maximum number
 * Set the maximum allowed number of metadata indices in the list
 *-----------------------------------------------------------------------*/

int16_t get_ivas_max_num_indices_metadata(                                /* o  : maximum number of indices */
/*! r: maximum number of indices */
int16_t get_ivas_max_num_indices_metadata(
    const IVAS_FORMAT ivas_format, /* i  : IVAS format              */
    const int32_t ivas_total_brate /* i  : IVAS total bitrate       */
)
@@ -1377,7 +1381,7 @@ void push_next_bits(
/*! r: result: index of the indice in the list, -1 if not found */
int16_t find_indice(
    BSTR_ENC_HANDLE hBstr, /* i  : encoder bitstream handle                    */
    int16_t id,            /* i  : ID of the indice                            */
    const int16_t id,      /* i  : ID of the indice                            */
    uint16_t *value,       /* o  : value of the quantized indice               */
    int16_t *nb_bits       /* o  : number of bits used to quantize the indice  */
)
@@ -1397,6 +1401,7 @@ int16_t find_indice(
    return -1;
}


/*-------------------------------------------------------------------*
 * delete_indice()
 *
@@ -1406,7 +1411,7 @@ int16_t find_indice(
/*! r: number of deleted indices */
uint16_t delete_indice(
    BSTR_ENC_HANDLE hBstr, /* i  : encoder bitstream handle                    */
    int16_t id             /* i  : ID of the indice                            */
    const int16_t id       /* i  : ID of the indice                            */
)
{
    int16_t i, j;
+3 −4
Original line number Diff line number Diff line
@@ -983,8 +983,7 @@ typedef enum
typedef enum
{
    DIRAC_OPEN,                                 /* initialize to default value              */
    DIRAC_RECONFIGURE                           /* HOA3                                     */
    ,
    DIRAC_RECONFIGURE,                          /* HOA3                                     */
    DIRAC_RECONFIGURE_MODE
} DIRAC_CONFIG_FLAG;

@@ -1005,13 +1004,13 @@ typedef enum

#define IVAS_SPAR_HOA3_NP_CHS                   8                           /* number of higher order non-planar channels */

#define SPAR_NUM_CODING_STRAT_BITS              ( 3 )
#define SPAR_NUM_CODING_STRAT_BITS              3

/* AGC constants */
#define AGC_BITS_PER_CH                         3
#define AGC_EMAX                                0
#define AGC_SIGNALLING_BITS                     1
#define IVAS_SPAR_ARITH_OVERSHOOT_BITS               (16)
#define IVAS_SPAR_ARITH_OVERSHOOT_BITS          16

/* Common SPAR metadata constants */
#define IVAS_ACTIVEW_DM_F_SCALE                 0.5f
+8 −10
Original line number Diff line number Diff line
@@ -52,8 +52,8 @@ static void ivas_set_up_cov_smoothing(
    ivas_filterbank_t *pFb,
    const float max_update_rate,
    const int16_t min_pool_size,
    const COV_SMOOTHING_TYPE smooth_mode /* i  : flag multichannel vs SPAR       */
    ,
    const COV_SMOOTHING_TYPE smooth_mode, /* i  : flag multichannel vs SPAR       */

    const int32_t ivas_total_brate )
{
    int16_t j, k;
@@ -150,9 +150,8 @@ ivas_error ivas_spar_covar_smooth_enc_open(
    ivas_cov_smooth_state_t **hCovState_out,     /* i/o: SPAR Covar. smoothing handle       */
    const ivas_cov_smooth_cfg_t *cov_smooth_cfg, /* i  : SPAR config. handle                */
    ivas_filterbank_t *pFb,                      /* i/o: FB handle                          */
    const int16_t nchan_inp                      /* i  : number of input channels       */
    ,
    COV_SMOOTHING_TYPE smooth_mode, /* i : Smooth covariance for SPAR or MC */
    const int16_t nchan_inp,                     /* i  : number of input channels           */
    const COV_SMOOTHING_TYPE smooth_mode,        /* i  : Smooth covariance for SPAR or MC   */
    const int32_t ivas_total_brate               /* i  : IVAS total bitrate                 */
)
{
@@ -181,7 +180,6 @@ ivas_error ivas_spar_covar_smooth_enc_open(
        }
    }


    ivas_set_up_cov_smoothing( hCovState, pFb, cov_smooth_cfg->max_update_rate, cov_smooth_cfg->min_pool_size, smooth_mode, ivas_total_brate );

    *hCovState_out = hCovState;
+9 −7
Original line number Diff line number Diff line
@@ -312,12 +312,18 @@ void ivas_dirac_config_bands(
    return;
}

/*-------------------------------------------------------------------*
 * ivas_sba_get_max_md_bits()
 *
 * Return maximum SBA DirAC metadata bit-budget and nominal bit-budget
 *-------------------------------------------------------------------*/

void ivas_get_dirac_sba_max_md_bits(
    const int32_t sba_total_brate,
    int16_t *bits_frame_nominal,
    int16_t *metadata_max_bits,
    int16_t *qmetadata_max_bit_req,
    int16_t nbands )
    const int16_t nbands )
{
    if ( sba_total_brate <= IVAS_13k2 )
    {
@@ -375,6 +381,7 @@ void ivas_get_dirac_sba_max_md_bits(
    return;
}


/*-------------------------------------------------------------------------
 * ivas_dirac_sba_config()
 *
@@ -448,12 +455,7 @@ ivas_error ivas_dirac_sba_config(
            return error;
        }
    }
    ivas_get_dirac_sba_max_md_bits(
        sba_total_brate,
        &hQMetaData->bits_frame_nominal,
        &hQMetaData->metadata_max_bits,
        &hQMetaData->qmetadata_max_bit_req,
        hQMetaData->q_direction[0].cfg.nbands );
    ivas_get_dirac_sba_max_md_bits( sba_total_brate, &hQMetaData->bits_frame_nominal, &hQMetaData->metadata_max_bits, &hQMetaData->qmetadata_max_bit_req, hQMetaData->q_direction[0].cfg.nbands );

    return error;
}
Loading