[FFmpeg-devel] [PATCH] lavfi/avf_showspectrum: replace pow(x, 0.25) by sqrt(sqrt(x))

Ganesh Ajjanagadde gajjanag at mit.edu
Fri Jan 8 02:24:43 CET 2016


On Thu, Jan 7, 2016 at 2:25 PM, Michael Niedermayer
<michael at niedermayer.cc> wrote:
> On Wed, Jan 06, 2016 at 08:26:43PM -0800, Ganesh Ajjanagadde wrote:
>> On Mon, Jan 4, 2016 at 6:38 PM, Ganesh Ajjanagadde
>> <gajjanagadde at gmail.com> wrote:
>> > This is faster; precision assured as result is a float.
>> >
>> > Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>> > ---
>> >  libavfilter/avf_showspectrum.c | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
>> > index accd8c7..cff98ff 100644
>> > --- a/libavfilter/avf_showspectrum.c
>> > +++ b/libavfilter/avf_showspectrum.c
>> > @@ -578,7 +578,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
>> >                  a = cbrt(a);
>> >                  break;
>> >              case FOURTHRT:
>> > -                a = pow(a, 0.25);
>> > +                a = sqrt(sqrt(a));
>> >                  break;
>> >              case FIFTHRT:
>> >                  a = pow(a, 0.20);
>> > --
>> > 2.6.4
>> >
>>
>> ping
>
> should be ok but iam not maintainer of this

pushed, thanks

>
> [...]
>
> thx
>
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Its not that you shouldnt use gotos but rather that you should write
> readable code and code with gotos often but not always is less readable
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list