Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoder bug fixes #60

Merged
merged 2 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion decoder/ixheaacd_create.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ WORD32 ixheaacd_dec_data_init(VOID *handle,
&usac_data->ccfl, &usac_data->output_samples,
&pstr_frame_data->str_layer.sample_rate_layer,
&layer_config->samp_frequency_index);

if (!pstr_frame_data->str_layer.sample_rate_layer) {
return -1;
}
pstr_stream_config->sampling_frequency =
pstr_frame_data->str_layer.sample_rate_layer;
pstr_stream_config->samp_frequency_index = layer_config->samp_frequency_index;
Expand Down
12 changes: 9 additions & 3 deletions decoder/ixheaacd_esbr_envcal.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,13 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data, FLOAT32
c++;
}

if (!int_mode) {
if (!int_mode && ui != li) {
for (nrg = 0, k = c - (ui - li); k < c; k++) {
nrg += nrg_est_pvc[k][t];
}
nrg /= (ui - li);
} else {
nrg = 0;
}
c -= (ui - li);

Expand Down Expand Up @@ -453,11 +455,13 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data, FLOAT32
c++;
}

if (!int_mode) {
if (!int_mode && ui != li) {
for (nrg = 0, k = c - (ui - li); k < c; k++) {
nrg += nrg_est_pvc[k][t];
}
nrg /= (ui - li);
} else {
nrg = 0;
}
c -= (ui - li);

Expand Down Expand Up @@ -669,11 +673,13 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data, FLOAT32
rate * p_frame_info->border_vec[i]);
}
}
if (!int_mode) {
if (!int_mode && ui != li) {
for (nrg = 0, k = c - (ui - li); k < c; k++) {
nrg += nrg_est[k];
}
nrg /= (ui - li);
} else {
nrg = 0;
}
c -= (ui - li);

Expand Down