On Sun, Jan 03, 2016 at 08:21:00PM +0100, Clément Bœsch wrote:
[...]
> +static av_always_inline av_const int ff_parity(uint32_t v)
> +{
> +#if HAVE_PARITY
> +    return __builtin_parity(v);
> +#else
> +    return av_popcount(v) & 1;

doing a popcount being overkill, this could be replaced with
(0x6996966996696996ULL >> (x & 63) ^ (x>>7) ^ (x>>6)) & 1

Whatever people prefers

-- 
Clément B.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to