CRC4: use proper CRC4 table to avoid bit-reversal of each byte
In commit 9bd2c9ffe7cf82c5d0a12406db018717d9b78858 we fixed the CRC4
computation by bit-reversing every byte before using it in the CRC
table. This is of course a waste of CPU cycles. Let's just compute
the CRC4 table slightly different (thanks to Dietter):
The following commands using pycrc from pycrc.org were used:
./pycrc.py --width=4 --poly=0x3 --reflect-in=false --reflect-out=false --xor-out=0 --xor-in=0 --algorithm table-driven --generate c -o crc4itu.c
./pycrc.py --width=4 --poly=0x3 --reflect-in=false --reflect-out=false --xor-out=0 --xor-in=0 --algorithm table-driven --generate h -o crc4itu.h
3 files changed