[FFmpeg-devel] [PATCH 2/2] lavfi/af_anequalizer: replace pow(x, -2) by 1/(x*x)

Paul B Mahol onemda at gmail.com
Mon Dec 28 09:14:15 CET 2015


On 12/28/15, Ganesh Ajjanagadde <gajjanagadde at gmail.com> wrote:
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
>  libavfilter/af_anequalizer.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavfilter/af_anequalizer.c b/libavfilter/af_anequalizer.c
> index d7b5b6c..649c0b9 100644
> --- a/libavfilter/af_anequalizer.c
> +++ b/libavfilter/af_anequalizer.c
> @@ -391,8 +391,8 @@ static void chebyshev1_bp_filter(EqualizatorFilter *f,
>
>      epsilon = sqrt((G*G - Gb*Gb) / (Gb*Gb - G0*G0));
>      g0 = pow(G0,1.0/N);
> -    alfa = pow(1.0/epsilon    + sqrt(1 + pow(epsilon,-2.0)), 1.0/N);
> -    beta = pow(G/epsilon + Gb * sqrt(1 + pow(epsilon,-2.0)), 1.0/N);
> +    alfa = pow(1.0/epsilon    + sqrt(1 + 1/(epsilon*epsilon)), 1.0/N);
> +    beta = pow(G/epsilon + Gb * sqrt(1 + 1/(epsilon*epsilon)), 1.0/N);
>      a = 0.5 * (alfa - 1.0/alfa);
>      b = 0.5 * (beta - g0*g0*(1/beta));
>      tetta_b = tan(wb/2);
> --
> 2.6.4
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

both patches ok


More information about the ffmpeg-devel mailing list