Decoder changes related to DRC scaling and x86 build
Some checks failed
CMake / build (push) Has been cancelled

Significance:
==============
- DRC scaling changes
- Some minor warning fixes

Testing:
=========
- CTS tested
- Conformance tested on Windows
This commit is contained in:
Rumaan Khan 2026-01-14 15:52:06 +05:30 committed by Divya B M
parent f4d4dc7a1a
commit bed38628ae
7 changed files with 18 additions and 20 deletions

View file

@ -75,6 +75,7 @@ IA_ERRORCODE ia_drc_dec_api(pVOID p_ia_drc_dec_obj, WORD32 i_cmd, WORD32 i_idx,
pWORD8 pb_value = pv_value;
SIZE_T *ps_value = pv_value;
pWORD32 pi_value = pv_value;
FLOAT32 *pf_value = pv_value;
switch (i_cmd) {
case IA_API_CMD_GET_MEM_INFO_SIZE:
@ -318,12 +319,12 @@ IA_ERRORCODE ia_drc_dec_api(pVOID p_ia_drc_dec_obj, WORD32 i_cmd, WORD32 i_idx,
break;
}
case IA_DRC_DEC_CONFIG_DRC_BOOST: {
p_obj_drc->str_config.boost = (*pus_value)/100.0f;
p_obj_drc->str_config.boost = *pf_value;
p_obj_drc->str_config.boost_set = 1;
break;
}
case IA_DRC_DEC_CONFIG_DRC_CUT: {
p_obj_drc->str_config.compress = (*pus_value)/100.0f;
case IA_DRC_DEC_CONFIG_DRC_COMPRESS: {
p_obj_drc->str_config.compress = *pf_value;
p_obj_drc->str_config.compress_set = 1;
break;
}

View file

@ -43,7 +43,7 @@
#define IA_DRC_DEC_CONFIG_DRC_LOUD_NORM 0x0013
#define IA_DRC_DEC_CONFIG_DRC_ALBUM_MODE 0x0014
#define IA_DRC_DEC_CONFIG_DRC_BOOST 0x0015
#define IA_DRC_DEC_CONFIG_DRC_CUT 0x0016
#define IA_DRC_DEC_CONFIG_DRC_COMPRESS 0x0016
#define IA_DRC_DEC_CONFIG_PARAM_APPLY_CROSSFADE 0x0017
#define IA_DRC_DEC_CONFIG_PARAM_CONFIG_CHANGED 0x0018
#ifdef LOUDNESS_LEVELING_SUPPORT

View file

@ -121,6 +121,8 @@ IA_ERRORCODE impd_drc_set_default_config(ia_drc_api_struct *p_obj_drc) {
p_obj_drc->str_config.album_mode = 0;
p_obj_drc->str_config.boost = 1.0f;
p_obj_drc->str_config.compress = 1.0f;
p_obj_drc->str_config.boost_set = 0;
p_obj_drc->str_config.compress_set = 0;
memset(&p_obj_drc->str_bit_handler, 0, sizeof(p_obj_drc->str_bit_handler));
return IA_NO_ERROR;
@ -410,11 +412,6 @@ IA_ERRORCODE impd_drc_init(ia_drc_api_struct *p_obj_drc) {
if (err_code != IA_NO_ERROR) return err_code;
}
if (!p_obj_drc->str_config.boost_set) p_obj_drc->str_config.boost = 1.0f;
if (!p_obj_drc->str_config.compress_set)
p_obj_drc->str_config.compress = 1.0f;
err_code = impd_drc_dec_interface_add_effect_type(
p_obj_drc->str_payload.pstr_drc_interface, p_obj_drc->str_config.effect_type,
p_obj_drc->str_config.target_loudness, p_obj_drc->str_config.loud_norm_flag,

View file

@ -962,13 +962,13 @@ IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_xheaac_dec_obj, WORD32 i_cmd,
#endif
else if (IA_XHEAAC_DEC_CONFIG_PARAM_DRC_CUT == i_idx) {
UWORD32 *ui_value = (UWORD32 *)(&p_obj_exhaacplus_dec->aac_config.ui_drc_cut);
*pui_value = *ui_value;
*pf_value = (*ui_value) / 100.0f;
} else if (IA_XHEAAC_DEC_CONFIG_PARAM_DRC_BOOST == i_idx) {
UWORD32 *ui_value = (UWORD32 *)(&p_obj_exhaacplus_dec->aac_config.ui_drc_boost);
*pui_value = *ui_value;
*pf_value = (*ui_value) / 100.0f;
} else if (IA_XHEAAC_DEC_CONFIG_PARAM_DRC_MODE_CUT == i_idx) {
UWORD8 *ui_value = (&p_obj_exhaacplus_dec->aac_config.ui_drc_mode_cut);
*pb_value = *ui_value;
*pb_value = (*ui_value);
} else if (IA_XHEAAC_DEC_CONFIG_PARAM_DRC_MODE_BOOST == i_idx) {
UWORD8 *ui_value = (&p_obj_exhaacplus_dec->aac_config.ui_drc_mode_boost);
*pb_value = *ui_value;

View file

@ -70,7 +70,7 @@
#define MAX_RES_SAMP_FREQ_IDX 11
#if defined(__clang__) || defined(__GNUC__)
#if defined(__clang__)
#define ATTR_NO_SANITIZE_INTEGER __attribute__((no_sanitize("integer")))
#else
#define ATTR_NO_SANITIZE_INTEGER

View file

@ -635,7 +635,7 @@ VOID ixheaacd_usac_tcx_ec(ia_usac_data_struct *pstr_usac_data, ia_usac_lpd_decod
memmove(&ptr_synth[sf_idx], &ptr_syn[sf_idx], LEN_SUBFR * sizeof(FLOAT32));
}
memcpy(st->xcitation_prev, ptr_exc + len_subfrm - (MAX_PITCH + ORDER + 1),
memcpy(st->xcitation_prev, exc_buf + len_subfrm,
sizeof(FLOAT32) * (MAX_PITCH + ORDER + 1));
memcpy(st->synth_prev_ec, synth_buf + len_subfrm, sizeof(FLOAT32) * ORDER);
return;

View file

@ -911,8 +911,8 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
WORD32 drc_flag = 0;
WORD32 mpegd_drc_present = 0;
WORD32 uo_num_chan;
UWORD32 ui_boost = 0;
UWORD32 ui_cut = 0;
FLOAT32 f_boost = 0;
FLOAT32 f_cut = 0;
UWORD8 ui_drc_mode_cut = 0;
UWORD8 ui_drc_mode_boost = 0;
#ifdef LOUDNESS_LEVELING_SUPPORT
@ -1453,11 +1453,11 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
if (ui_drc_mode_cut) {
err_code = (*p_ia_process_api)(pv_ia_process_api_obj, IA_API_CMD_GET_CONFIG_PARAM,
IA_XHEAAC_DEC_CONFIG_PARAM_DRC_CUT, &ui_cut);
IA_XHEAAC_DEC_CONFIG_PARAM_DRC_CUT, &f_cut);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
err_code = ia_drc_dec_api(pv_ia_drc_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
IA_DRC_DEC_CONFIG_DRC_CUT, &ui_cut);
IA_DRC_DEC_CONFIG_DRC_CUT, &f_cut);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
}
@ -1472,11 +1472,11 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) {
if (ui_drc_mode_boost) {
err_code = (*p_ia_process_api)(pv_ia_process_api_obj, IA_API_CMD_GET_CONFIG_PARAM,
IA_XHEAAC_DEC_CONFIG_PARAM_DRC_BOOST, &ui_boost);
IA_XHEAAC_DEC_CONFIG_PARAM_DRC_BOOST, &f_boost);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
err_code = ia_drc_dec_api(pv_ia_drc_process_api_obj, IA_API_CMD_SET_CONFIG_PARAM,
IA_DRC_DEC_CONFIG_DRC_BOOST, &ui_boost);
IA_DRC_DEC_CONFIG_DRC_BOOST, &f_boost);
_IA_HANDLE_ERROR(p_proc_err_info, (pWORD8) "", err_code);
}
}