Re: [FFmpeg-devel] [PATCH] dynaudnorm: Increment input outside of the FFMIN macro so it doesn't get double incremented.

2017-08-09 Thread Paul B Mahol
On 8/9/17, andyndeanna  wrote:
> Greetings,
>
> Please find attached a patch for the dynaudnorm filter.  Under certain
> conditions, the output to the filter will clip at the beginning.  This can
> be demonstrated with the following:
>
> ffmpeg -filter_complex "aevalsrc=0:s=48000:d=0.6
> [a_in0];aevalsrc=0.1*sin(440*2*PI*t)*cos(0.5*2*PI*t):s=48000:d=20
> [a_in1];[a_in0] [a_in1] concat=n=2:v=0:a=1 [a_in];[a_in]
> dynaudnorm=b=1:m=100.0 [a_out]" -map "[a_out]" test.wav
>
>
> The root cause is that the FFMIN macro evaluates the minimum argument
> twice, resulting in the variable "input" getting incremented twice.
>

applied, thanks
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] dynaudnorm: Increment input outside of the FFMIN macro so it doesn't get double incremented.

2017-08-08 Thread andyndeanna
Greetings,

Please find attached a patch for the dynaudnorm filter.  Under certain
conditions, the output to the filter will clip at the beginning.  This can
be demonstrated with the following:

ffmpeg -filter_complex "aevalsrc=0:s=48000:d=0.6
[a_in0];aevalsrc=0.1*sin(440*2*PI*t)*cos(0.5*2*PI*t):s=48000:d=20
[a_in1];[a_in0] [a_in1] concat=n=2:v=0:a=1 [a_in];[a_in]
dynaudnorm=b=1:m=100.0 [a_out]" -map "[a_out]" test.wav


The root cause is that the FFMIN macro evaluates the minimum argument
twice, resulting in the variable "input" getting incremented twice.

Thanks,
Andy


0001-Increment-input-outside-of-the-FFMIN-macro-so-it-doe.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel