We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following code in ebur128_gated_loudness() is calling find_histogram_index() unconditionally (whether histogram mode is specified or not):
if (relative_threshold < histogram_energy_boundaries[0]) { start_index = 0; } else { start_index = find_histogram_index(relative_threshold); if (relative_threshold > histogram_energies[start_index]) { ++start_index; } }
As a local fix, I have moved this block of code so that the function is only called when histogram mode is specified:
for (i = 0; i < size; i++) { if (!sts[i]) continue; if (sts[i]->d->use_histogram) { if (relative_threshold < m_dHistogramEnergyBoundaries[0]) { start_index = 0; } else { start_index = find_histogram_index(relative_threshold); if (relative_threshold > m_dHistogramEnergies[start_index]) { ++start_index; } } for (j = start_index; j < 1000; ++j) { gated_loudness += sts[i]->d->block_energy_histogram[j] * m_dHistogramEnergies[j]; above_thresh_counter += sts[i]->d->block_energy_histogram[j]; } } else { STAILQ_FOREACH(it, &sts[i]->d->block_list, entries) { if (it->z >= relative_threshold) { ++above_thresh_counter; gated_loudness += it->z; } } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The following code in ebur128_gated_loudness() is calling find_histogram_index() unconditionally (whether histogram mode is specified or not):
if (relative_threshold < histogram_energy_boundaries[0]) {
start_index = 0;
} else {
start_index = find_histogram_index(relative_threshold);
if (relative_threshold > histogram_energies[start_index]) {
++start_index;
}
}
As a local fix, I have moved this block of code so that the function is only called when histogram mode is specified:
for (i = 0; i < size; i++) {
if (!sts[i]) continue;
if (sts[i]->d->use_histogram) {
if (relative_threshold < m_dHistogramEnergyBoundaries[0]) {
start_index = 0;
} else {
start_index = find_histogram_index(relative_threshold);
if (relative_threshold > m_dHistogramEnergies[start_index]) {
++start_index;
}
}
for (j = start_index; j < 1000; ++j) {
gated_loudness += sts[i]->d->block_energy_histogram[j] * m_dHistogramEnergies[j];
above_thresh_counter += sts[i]->d->block_energy_histogram[j];
}
} else {
STAILQ_FOREACH(it, &sts[i]->d->block_list, entries) {
if (it->z >= relative_threshold) {
++above_thresh_counter;
gated_loudness += it->z;
}
}
}
}
The text was updated successfully, but these errors were encountered: