History

avfilter/f_ebur128: properly propagate true peak

After 3b26b782ee, `ebur128->true_peak` was only set to the maximum of the current "true peak per frame" values, when it should report the true peak for the entire stream.

Niklas Haas committed 1 year ago

Commit f67ca101 parent 60fc0281 file · +3 −1Browse files

Unified · Split

libavfilter/f_ebur128.c+3−1
@@ -692,11 +692,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) · 691 unmodified lines
692 double peak = dsp->find_peak(ebur128->true_peaks_per_frame, nb_channels,692 double peak = dsp->find_peak(ebur128->true_peaks_per_frame, nb_channels,
693 swr_samples, ret);693 swr_samples, ret);
694 694
695 ebur128->true_peak = DBFS(peak);
696 for (int ch = 0; ch < nb_channels; ch++) {695 for (int ch = 0; ch < nb_channels; ch++) {
696 peak = FFMAX(peak, ebur128->true_peaks[ch]);
697 ebur128->true_peaks[ch] = FFMAX(ebur128->true_peaks[ch],697 ebur128->true_peaks[ch] = FFMAX(ebur128->true_peaks[ch],
698 ebur128->true_peaks_per_frame[ch]);698 ebur128->true_peaks_per_frame[ch]);
699 }699 }
700
701 ebur128->true_peak = DBFS(peak);
700 }702 }
701#endif703#endif
702 704

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t