Commit b68b603f authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into ci/update-gitignore

parents 654fa7df 09d781af
Loading
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -205,7 +205,11 @@ int16_t CountIndexBits(
 *-------------------------------------------------------------------*/

int16_t tcx_hm_render(
#ifdef FIX_1001_ARI_HM_OVERFLOW
    const int32_t lag, /* i  : pitch lag                             */
#else
    const int16_t lag, /* i  : pitch lag                             */
#endif
    const int16_t fract_res, /* i  : fractional resolution of the lag      */
    Word16 p[]               /* o  : harmonic model (Q13)                  */
)
@@ -265,7 +269,11 @@ int16_t tcx_hm_render(

void tcx_hm_modify_envelope(
    const Word16 gain, /* i  : HM gain (Q11)                         */
#ifdef FIX_1001_ARI_HM_OVERFLOW
    const int32_t lag,
#else
    const int16_t lag,
#endif
    const int16_t fract_res,
    const Word16 p[],     /* i  : harmonic model (Q13)                  */
    Word32 env[],         /* i/o: envelope (Q16)                        */
+8 −0
Original line number Diff line number Diff line
@@ -1392,9 +1392,17 @@ typedef enum
#define PARAM_MC_ICC_ERROR_BIAS_FAC              (1.15f)                    /* factor for favouring past ICC maps in the adaptive ICC map decision */
#define PARAM_MC_TRANSIENT_BAND_STEP             2                          /* Number of parameter bands combined in case of a transient frame*/
#define PARAM_MC_MAX_DECORR_CLDFB_BANDS         20                          /* Maximum number of CLDFB bands with decorrelation */
#ifdef FIX_901_PARAMMC_DEAD_CODE
#define PARAM_MC_MAX_TRANSPORT_CHANS             3                          /* Number of down mix channels */
#else
#define PARAM_MC_MAX_TRANSPORT_CHANS             4                          /* Number of down mix channels */
#endif
#define PARAM_MC_MAX_ILD_REF_CHANNELS            2                          /* Maximum number of reference channels for a coded ILD */
#ifdef FIX_901_PARAMMC_DEAD_CODE
#define PARAM_MC_NUM_CONFIGS                    14                          /* Number of available Parametric MC configurations */
#else
#define PARAM_MC_NUM_CONFIGS                    15                          /* Number of available Parametric MC configurations */
#endif
#define PARAM_MC_MAX_BAND_LFE                    1                          /* Number of parameter bands for LFE coding */
#define PARAM_MC_SZ_ICC_MAP                     11                          /* Maximum number of transmitted ICCs per parameter band */
#define PARAM_MC_SZ_ILD_MAP                     12                          /* Maximum number of transmitted channel energies per band*/
+20 −7
Original line number Diff line number Diff line
@@ -87,16 +87,22 @@ uint16_t ivas_param_mc_get_configuration_index(

void ivas_param_mc_metadata_open(
    const MC_LS_SETUP mc_ls_setup, /* i  : MC ls setup                                         */
#ifndef FIX_901_PARAMMC_DEAD_CODE
    const int16_t lfe_index, /* i  : channel index of LFE                                */
#endif
    const int32_t ivas_total_brate,            /* i  : IVAS total bitrate                                  */
    HANDLE_IVAS_PARAM_MC_METADATA hMetadataPMC /* o  : handle for the Parametric MC parameter coding state */
)
{
#ifndef FIX_901_PARAMMC_DEAD_CODE
    int16_t i;
#endif
    uint16_t config_index;
#ifndef FIX_901_PARAMMC_DEAD_CODE
    int16_t nchan_setup;

    nchan_setup = ivas_mc_ls_setup_get_num_channels( mc_ls_setup );
#endif

    /* get coding band mappings */
    set_s( hMetadataPMC->coding_band_mapping, 0, PARAM_MC_MAX_PARAMETER_BANDS );
@@ -129,21 +135,26 @@ void ivas_param_mc_metadata_open(
        assert( 0 && "nbands must be 20 or 14!" );
    }

#ifndef FIX_901_PARAMMC_DEAD_CODE
    /* create map of all possible ICCs */
    ivas_param_mc_create_full_icc_mapping( nchan_setup, lfe_index, hMetadataPMC->icc_map_full, &hMetadataPMC->icc_map_size_full );
#endif
    hMetadataPMC->icc_mapping_conf = ivas_param_mc_conf[config_index].icc_mapping_conf;
    hMetadataPMC->ild_mapping_conf = ivas_param_mc_conf[config_index].ild_mapping_conf;
    hMetadataPMC->ild_factors = ivas_param_mc_conf[config_index].ild_factors;

#ifndef FIX_901_PARAMMC_DEAD_CODE
    /* set default ICC maps */
    for ( i = 0; i < PARAM_MC_PARAMETER_FRAMES; i++ )
    {
        ivas_param_mc_default_icc_map( hMetadataPMC->icc_mapping_conf, hMetadataPMC->icc_mapping[i] );
    }

#endif
    /* init remaining flags and indices */
    hMetadataPMC->param_frame_idx = 0;
#ifndef FIX_901_PARAMMC_DEAD_CODE
    hMetadataPMC->flag_use_adaptive_icc_map = 0;
#endif
    hMetadataPMC->bAttackPresent = 0;
    hMetadataPMC->attackIndex = 0;
    hMetadataPMC->lfe_on = 1;
@@ -198,7 +209,7 @@ void ivas_param_mc_set_coded_bands(
    return;
}


#ifndef FIX_901_PARAMMC_DEAD_CODE
/*-------------------------------------------------------------------------
 * ivas_param_mc_metadata_close()
 *
@@ -223,7 +234,7 @@ void ivas_param_mc_metadata_close(

    return;
}

#endif

/*-------------------------------------------------------------------------
 * ivas_param_mc_getNumTransportChannels()
@@ -247,7 +258,7 @@ int16_t ivas_param_mc_getNumTransportChannels(
    return nchan_transport;
}


#ifndef FIX_901_PARAMMC_DEAD_CODE
/*-------------------------------------------------------------------------
 * ivas_param_mc_create_full_icc_mapping()
 *
@@ -303,7 +314,6 @@ void ivas_param_mc_create_full_icc_mapping(
    return;
}


/*-------------------------------------------------------------------------
 * ivas_param_mc_default_icc_map()
 *
@@ -326,6 +336,7 @@ void ivas_param_mc_default_icc_map(

    return;
}
#endif


/*-------------------------------------------------------------------------
@@ -408,9 +419,11 @@ static int16_t ivas_param_mc_get_num_param_bands(
                case IVAS_128k:
                    num_parameter_bands = 14;
                    break;
#ifndef FIX_901_PARAMMC_DEAD_CODE
                case IVAS_160k:
                    num_parameter_bands = 20;
                    break;
#endif
            }
            break;
        default:
+6 −1
Original line number Diff line number Diff line
@@ -3805,7 +3805,9 @@ void ivas_mc_paramupmix_dec_render(

void ivas_param_mc_metadata_open(
    const MC_LS_SETUP mc_ls_setup,                              /* i  : MC ls setup                                         */
#ifndef FIX_901_PARAMMC_DEAD_CODE
    const int16_t lfe_index,                                    /* i  : channel index of LFE                                */
#endif
    const int32_t ivas_total_brate,                             /* i  : IVAS total bitrate                                  */
    HANDLE_IVAS_PARAM_MC_METADATA hMetadataPMC                  /* o  : handle for the Parametric MC parameter coding state */
);
@@ -3814,6 +3816,7 @@ void ivas_param_mc_set_coded_bands(
    HANDLE_IVAS_PARAM_MC_METADATA hMetadataPMC                  /* i/o: handle for the Parametric MC parameter coding state */
);

#ifndef FIX_901_PARAMMC_DEAD_CODE
void ivas_param_mc_metadata_close(
    HANDLE_IVAS_PARAM_MC_METADATA hMetadataPMC                  /* i/o: handle for the Parametric MC parameter coding state */
);
@@ -3824,7 +3827,7 @@ void ivas_param_mc_create_full_icc_mapping(
    int16_t *icc_map[2],                                        /* o  : map of all possible ICCs                            */
    int16_t *icc_map_size_full                                  /* o  : number of all possible ICCs                         */
);

#endif
/*! r: number of IVAS transport channels */
int16_t ivas_param_mc_getNumTransportChannels(
    const int32_t ivas_total_bitrate,                           /* i  : IVAS total bitrate                                  */
@@ -3889,11 +3892,13 @@ void ivas_param_mc_dec(
    float *output_f[]                                           /* i/o: synthesized core-coder transport channels/DirAC output  */
);

#ifndef FIX_901_PARAMMC_DEAD_CODE
void ivas_param_mc_default_icc_map(
    const PARAM_MC_ICC_MAPPING * hIccMapping,                   /* i  : handle to ICC mapping configuration                 */
    int16_t icc_map[PARAM_MC_SZ_ICC_MAP][2]                     /* o  : copy of map from the configuration                  */
);

#endif
/*! r: number of cldfb synthesis instances */
int16_t param_mc_get_num_cldfb_syntheses( 
    Decoder_Struct *st_ivas                                     /* i  : IVAS decoder structure                              */
+10 −1
Original line number Diff line number Diff line
@@ -1973,6 +1973,7 @@ const float ivas_param_mc_ild_fac_CICP19_3tc[12] =
    0.5f
};
#ifndef FIX_901_PARAMMC_DEAD_CODE
const float ivas_param_mc_ild_fac_CICP19_4tc[12] =
{
    0.35f,
@@ -1989,6 +1990,7 @@ const float ivas_param_mc_ild_fac_CICP19_4tc[12] =
    0.2f,
};
#endif
const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP6_2tc =
{
    5,
@@ -2052,6 +2054,7 @@ const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP19_3tc =
    {{0},{1},{0},{1},{0},{1},{0},{1},{0},{1},{2},{2}}
};
#ifndef FIX_901_PARAMMC_DEAD_CODE
const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP19_4tc =
{
    11,
@@ -2061,6 +2064,7 @@ const PARAM_MC_ILD_MAPPING ivas_param_mc_ild_mapping_CICP19_4tc =
    {{0},{1},{0,1},{0},{1},{0},{1},{2},{3},{2},{3},{0,1}}
};
#endif
const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP6_2tc =
{
    4,
@@ -2161,6 +2165,7 @@ const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP19_3tc =
    }  
};
#ifndef FIX_901_PARAMMC_DEAD_CODE
const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP19_4tc =
{
    8,
@@ -2177,6 +2182,7 @@ const PARAM_MC_ICC_MAPPING ivas_param_mc_icc_mapping_CICP19_4tc =
    }  
};
#endif
const PARAM_MC_CONF ivas_param_mc_conf[PARAM_MC_NUM_CONFIGS] = 
{
    /* CICP6 48000 */
@@ -2332,7 +2338,9 @@ const PARAM_MC_CONF ivas_param_mc_conf[PARAM_MC_NUM_CONFIGS] =
        &ivas_param_mc_icc_mapping_CICP19_3tc,
        &ivas_param_mc_dmx_fac_CICP19_3tc[0],
        &ivas_param_mc_ild_fac_CICP19_3tc[0]
    },
    }
#ifndef FIX_901_PARAMMC_DEAD_CODE
		,
    /* CICP19 160000 */
    {
        MC_LS_SETUP_7_1_4,
@@ -2344,6 +2352,7 @@ const PARAM_MC_CONF ivas_param_mc_conf[PARAM_MC_NUM_CONFIGS] =
        &ivas_param_mc_dmx_fac_CICP19_4tc[0],
        &ivas_param_mc_ild_fac_CICP19_4tc[0]
    }
#endif
};
const float ivas_param_mc_quant_ild_5d1_48[PARAM_MC_SZ_ILD_QUANTIZER_4BITS] =
Loading