Commit 4554d4a3 authored by Marek Szczerba's avatar Marek Szczerba
Browse files

Merge branch 'main' into philips/contribution-38-control-metadata-reverb

parents adcef49c daca8536
Loading
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -165,9 +165,9 @@ int16_t get_codec_mode(
int16_t getTcxonly(
    const int16_t element_mode, /* i  : IVAS element mode                   */
    const int32_t total_brate,  /* i  : total bitrate                       */
    const int16_t MCT_flag      /* i  : hMCT handle allocated (1) or not (0)*/
    ,
    const int16_t is_ism_format )
    const int16_t MCT_flag,     /* i  : hMCT handle allocated (1) or not (0)*/
    const int16_t is_ism_format /* i  : flag indicating ISM format          */
)
{
    int16_t tcxonly = 0;

@@ -357,8 +357,7 @@ int32_t getCoreSamplerateMode2(
    const int32_t total_brate,      /* i  : total bitrate                  */
    const int16_t bwidth,           /* i  : audio bandwidth                */
    const int16_t flag_ACELP16k,    /* i  : ACELP@16kHz flag               */
    const int16_t rf_mode        /* i  : flag to signal the RF mode     */
    ,
    const int16_t rf_mode,          /* i  : flag to signal the RF mode     */
    const IVAS_FORMAT is_ism_format /* i  : flag indicating ISM format     */
)
{
+1 −3
Original line number Diff line number Diff line
@@ -94,10 +94,8 @@ ivas_error ivas_dirac_config(
    ivas_error error;
    int16_t spar_dirac_split_band;
    IVAS_FB_MIXER_HANDLE hFbMdft;

    int16_t *dirac_to_spar_md_bands;


    error = IVAS_ERR_OK;

    if ( enc_dec == ENC )
@@ -176,7 +174,6 @@ ivas_error ivas_dirac_config(
            hConfig->enc_param_start_band = hQMetaData->q_direction[0].cfg.start_band + spar_dirac_split_band;
        }


        hConfig->dec_param_estim = TRUE;
        if ( hConfig->dec_param_estim == TRUE )
        {
@@ -452,6 +449,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 );

    return error;
+6 −7
Original line number Diff line number Diff line
@@ -332,7 +332,6 @@ void masa_sample_rate_band_correction(
    int16_t highBand;
    uint8_t numBands48k;


    numBands48k = config->numCodingBands;

    for ( band = 1; band < config->numCodingBands + 1; band++ )
@@ -343,6 +342,7 @@ void masa_sample_rate_band_correction(
        {
            config->numCodingBands = band;
            hQMetaData->numCodingBands = band;

            if ( is_encoder )
            {
                if ( hQMetaData->q_direction->cfg.nbands > band )
@@ -354,7 +354,9 @@ void masa_sample_rate_band_correction(
                    hQMetaData->q_direction[1].cfg.nbands = band;
                }
            }

            band_mapping[band] = maxBand;

            break;
        }
    }
@@ -396,6 +398,7 @@ void masa_sample_rate_band_correction(
            hQMetaData->twoDirBands[band] = 0;
        }
    }

    if ( hExtOutMeta != NULL )
    {
        /* in decoder, zero the EXT out MASA meta buffer */
@@ -637,11 +640,7 @@ void deindex_sph_idx(
    int16_t id_phi;
    int16_t no_th = gridData->no_theta;
    const int16_t *n = gridData->no_phi;
    const float ba[3] = {
        2.137991118026424e+02f,
        1.244854404591542e+02f,
        1.228408647140870e+02f,
    };
    const float ba[3] = { 2.137991118026424e+02f, 1.244854404591542e+02f, 1.228408647140870e+02f };
    const float del[3] = { 7.998262115303199e+05f, 1.300883976959332e+06f, 1.424072242426373e+06f };
    const float div[3] = { -0.237662341081474f, -0.100938185496887f, -0.092050209205032f };
    const float a4[3] = { -8.415300425381099f, -19.814106922515204f, -21.727272727270197f };
+8 −8
Original line number Diff line number Diff line
@@ -5173,7 +5173,7 @@ void ivas_binRenderer(
    BINAURAL_RENDERER_HANDLE hBinRenderer,                      /* i/o: fastconv binaural renderer handle                       */
    COMBINED_ORIENTATION_HANDLE hCombinedOrientationData,       /* i  : combined head and external orientation handle           */
    int16_t subframe_idx,                                       /* i  : subframe index                                          */
    const int16_t numTimeSlots,                                 /* i: : number of time slots to process                         */
    const int16_t numTimeSlots,                                 /* i  : number of time slots to process                         */
    float Cldfb_RealBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o  : Binaural signals             */
    float Cldfb_ImagBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o  : Binaural signals             */
    float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX],                /* i  : LS signals                   */
+40 −44
Original line number Diff line number Diff line
@@ -1675,18 +1675,15 @@ void ivas_get_spar_md_from_dirac(
    float **ppMixer_mat[IVAS_MAX_FB_MIXER_OUT_CH];
    float *pMixer_mat[IVAS_MAX_FB_MIXER_OUT_CH][IVAS_MAX_SPAR_FB_MIXER_IN_CH];
    float en_ratio_fac, diff_norm_order1, diff_norm_order2, diff_norm_order3;

    int16_t ndm, foa_ch, hoa2_ch;
    float P_dir_fact[IVAS_SPAR_MAX_CH - 1];
    const int16_t *remix_order;

    remix_order = remix_order_set[hSpar_md_cfg->remix_unmix_order];

    num_ch = ivas_sba_get_nchan_metadata( order, IVAS_256k /*dummy value as order is always 1 in this function*/
    );
    num_ch = ivas_sba_get_nchan_metadata( order, IVAS_256k /*dummy value as order is always 1 in this function*/ );

    hoa2_ch = ivas_sba_get_nchan_metadata( SBA_HOA2_ORDER, IVAS_256k /*dummy value as order is always 1 in this function*/
    );
    hoa2_ch = ivas_sba_get_nchan_metadata( SBA_HOA2_ORDER, IVAS_256k /*dummy value as order is always 1 in this function*/ );

    foa_ch = FOA_CHANNELS;
    diff_norm_order1 = 3.0f;
@@ -1835,7 +1832,7 @@ void ivas_get_spar_md_from_dirac(

            en_ratio_fac = ( 1.0f - diffuseness[band] );

            {

            for ( i = 0; i < num_ch; i++ )
            {
                for ( j = 0; j < num_ch; j++ )
@@ -1898,7 +1895,6 @@ void ivas_get_spar_md_from_dirac(
                }
            }
        }
        }

        for ( i = 0; i < num_ch; i++ )
        {
@@ -2138,7 +2134,6 @@ void ivas_spar_set_bitrate_config(
    int16_t quant_strat;
    int16_t bands_bw;


    pSpar_md_cfg->nchan_transport = ivas_spar_br_table_consts[table_idx].nchan_transport;

    for ( i = 0; i < pSpar_md_cfg->nchan_transport; i++ )
@@ -2257,6 +2252,7 @@ void ivas_spar_set_bitrate_config(
        {
            pca_bits = 0;
        }

        pSpar_md_cfg->max_md_bits_spar = pSpar_md_cfg->max_bits_per_blk + agc_bits + pca_bits;
    }

Loading