mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-10-19 04:53:25 +00:00
avfilter/silenceremove_template: improve ptp detector
This commit is contained in:
parent
e71cd18049
commit
364c03d9fe
@ -286,8 +286,8 @@ static ftype fn(compute_ptp)(ftype *peak, ftype sample, ftype wsample,
|
|||||||
|
|
||||||
peak[back] = sample;
|
peak[back] = sample;
|
||||||
max = peak[front];
|
max = peak[front];
|
||||||
min = (back == front) ? -sample : sample;
|
min = sample;
|
||||||
r = FABS(max - min);
|
r = FABS(min) + FABS(max - min);
|
||||||
|
|
||||||
*ffront = front;
|
*ffront = front;
|
||||||
*bback = back;
|
*bback = back;
|
||||||
|
Loading…
Reference in New Issue
Block a user