optimized polar encoder/decoder functions for PBCH and 41-bit DCI
This commit is contained in:
@@ -168,14 +168,12 @@ unsigned int crc24c (unsigned char * inptr,
|
||||
resbit = (bitlen % 8);
|
||||
|
||||
while (octetlen-- > 0) {
|
||||
/*#ifdef DEBUG_CRC24C
|
||||
printf("crc24c: in %x => crc %x (%x)\n",crc,*inptr,crc24cTable[(*inptr) ^ (crc >> 24)]);
|
||||
#endif*/
|
||||
crc = (crc << 8) ^ crc24cTable[(*inptr++) ^ (crc >> 24)];
|
||||
}
|
||||
|
||||
if (resbit > 0)
|
||||
if (resbit > 0) {
|
||||
crc = (crc << resbit) ^ crc24cTable[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))];
|
||||
}
|
||||
|
||||
return crc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user