History

avfilter/af_apsyclip: fix peak overestimation

Ignore more samples that are near the edge of the block. The reason is that the filtering tends to cause these samples to go above the window more than the samples near the middle. If these samples are included in the unwindowed peak estimation, the peak can be overestimated. Because the block is windowed again before overlapping, overshoots near the edge of the block are not very important. 0.1 is the value from the version originally contributed to calf.

Jason Jang committed 4 years ago

Commit 18fceb91 parent b4ad1341 file · +1 −1Browse files

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

Unified · Split

libavfilter/af_apsyclip.c+1−1
@@ -87,7 +87,7 @@ static void generate_hann_window(float *window, float *inv_window, int size) · 86 unmodified lines
87 87
88 window[i] = value;88 window[i] = value;
89 // 1/window to calculate unwindowed peak.89 // 1/window to calculate unwindowed peak.
90 inv_window[i] = value > 0.01f ? 1.f / value : 0.f;90 inv_window[i] = value > 0.1f ? 1.f / value : 0.f;
91 }91 }
92}92}
93 93

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