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

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/f_ebur128.c+3−1
@@ -692,11 +692,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) · 691 unmodified lines
692692 double peak = dsp->find_peak(ebur128->true_peaks_per_frame, nb_channels,
693693 swr_samples, ret);
694694
695− ebur128->true_peak = DBFS(peak);
696695 for (int ch = 0; ch < nb_channels; ch++) {
696+ peak = FFMAX(peak, ebur128->true_peaks[ch]);
697697 ebur128->true_peaks[ch] = FFMAX(ebur128->true_peaks[ch],
698698 ebur128->true_peaks_per_frame[ch]);
699699 }
700+
701+ ebur128->true_peak = DBFS(peak);
700702 }
701703 #endif
702704

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