30 {0x01, 9}, {0x01, 8}, {0x01, 7}, {0x01, 6}, {0x01, 5}, {0x01, 4}, {0x01, 3},
31 {0x04, 3}, {0x05, 3}, {0x06, 3}, {0x07, 3},
32 {0x03, 3}, {0x05, 4}, {0x09, 5}, {0x11, 6}, {0x21, 7}, {0x41, 8}, {0x81, 9},
34 {0x01, 9}, {0x01, 8}, {0x01, 7}, {0x01, 6}, {0x01, 5}, {0x01, 4}, {0x01, 3},
36 {0x03, 3}, {0x05, 4}, {0x09, 5}, {0x11, 6}, {0x21, 7}, {0x41, 8}, {0x81, 9},
38 {0x01, 9}, {0x01, 8}, {0x01, 7}, {0x01, 6}, {0x01, 5}, {0x01, 4}, {0x01, 3},
40 {0x03, 3}, {0x05, 4}, {0x09, 5}, {0x11, 6}, {0x21, 7}, {0x41, 8}, {0x81, 9},
46 #define CRC_TABLE_SIZE 257
48 #define CRC_TABLE_SIZE 1024
69 crc ^=
AV_RL16(buf + buf_size - 2);
76 checksum ^= buf[buf_size-1];
83 int num_bytes = (bit_size + 2) / 8;
85 int crc =
crc_1D[buf[0] & 0x3f];
87 crc ^= buf[num_bytes - 1];
89 for (i = 0; i < ((bit_size + 2) & 7); i++) {
93 crc ^= (buf[num_bytes] >> (7 - i)) & 1;
101 uint32_t scratch = 0;
102 const uint8_t *buf_end = buf + buf_size;
104 for (; ((intptr_t) buf & 3) && buf < buf_end; buf++)
106 for (; buf < buf_end - 3; buf += 4)
107 scratch ^= *((
const uint32_t*)buf);
111 for (; buf < buf_end; buf++)