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

Ganesh Ajjanagadde gajjanag at mit.edu
Sat Dec 19 23:24:16 CET 2015


On Thu, Dec 17, 2015 at 9:29 AM, Ganesh Ajjanagadde <gajjanag at mit.edu> wrote:
> On Thu, Dec 17, 2015 at 9:25 AM, Clément Bœsch <u at pkh.me> wrote:
>> On Thu, Dec 17, 2015 at 09:23:53AM -0800, Ganesh Ajjanagadde wrote:
>>> 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.
>>
>> v → x in arg
>
> oops, fixed, along with the signature locally.

forgot to mention that it has been pushed, thanks

>
>>
>> --
>> Clément B.
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>


More information about the ffmpeg-devel mailing list