[FFmpeg-devel] [PATCH] lavu/intmath: add faster clz support

Ganesh Ajjanagadde gajjanagadde at gmail.com
Thu Dec 17 18:23:53 CET 2015


On Thu, Dec 17, 2015 at 9:20 AM, Kieran Kunhya <kierank at obe.tv> wrote:
>>> +static av_always_inline av_const unsigned ff_clz_c(unsigned v)
>>> +{
>>> +    unsigned i = sizeof(x) * 8;
>>> +
>>> +    while (x) {
>>> +        x >>= 1;
>>> +        i--;
>>> +    }
>>> +
>>> +    return i;
>>> +}
>>> +#endif
>>> +
>
> erm, does even work?

you mean in what sense? I literally copy/pasted it from avfilter/af_sofalizer.
If you mean building correctly, I don't know as I have the built-in.
But then this patch does not actually use it yet; merely adds it to
the header.


More information about the ffmpeg-devel mailing list