[FFmpeg-devel] [PATCH] lavc/ccaption_dec: simplify parity check
u at pkh.me
Sun Jan 3 18:53:34 CET 2016
On Sun, Jan 03, 2016 at 05:43:26PM +0000, Derek Buitenhuis wrote:
> On 1/3/2016 5:33 PM, Clément Bœsch wrote:
> > + return (0x6996966996696996ULL >> (x & 63) ^ (x>>7) ^ (x>>6)) & 1;
> I mean, I see how it works, but it's incredibly non-obvious without the
> patch context (table removal).
Any suggestion? Maybe a comment? Or you prefer the 32 lines table of 256
bytes to store 256 redundant bits of information?
The name of the function gives the context here, if you look up the web
for "bit parity" you'll get what you are looking for. I'm not sure the
table is much more obvious about what's this parity is all about.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 473 bytes
Desc: not available
More information about the ffmpeg-devel