• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/flac-1.2.1/src/libFLAC/

Lines Matching refs:word

52 /* Things should be fastest when this matches the machine word size */
55 /* also, some sections currently only have fast versions for 4 or 8 bytes per word */
70 /* counts the # of zero MSBs in a word */
71 #define COUNT_ZERO_MSBS(word) ( \
72 (word) <= 0xffff ? \
73 ( (word) <= 0xff? byte_to_unary_table[word] + 24 : byte_to_unary_table[(word) >> 8] + 16 ) : \
74 ( (word) <= 0xffffff? byte_to_unary_table[word >> 16] + 8 : byte_to_unary_table[(word) >> 24] ) \
77 #define COUNT_ZERO_MSBS2(word) ( (word) <= 0xff ? byte_to_unary_table[word] + 24 : ((word) <= 0xffff ? byte_to_unary_table[(word) >> 8] + 16 : ((word) <= 0xffffff ? byte_to_unary_table[(word) >> 16] + 8 : byte_to_unary_table[(word) >> 24])) )
137 /* any partially-consumed word at the head will stay right-justified as bits are consumed from the left */
138 /* any incomplete word at the tail will be left-justified, and bytes from the read callback are added on the right */
142 unsigned bytes; /* # of bytes in incomplete word at buffer[words] */
144 unsigned consumed_bits; /* ... + (#bits of head word) already consumed from the front of buffer */
146 unsigned crc16_align; /* the number of bits in the current consumed word that should not be CRC'd */
178 static FLaC__INLINE void crc16_update_word_(FLAC__BitReader *br, brword word)
183 case 0: crc = FLAC__CRC16_UPDATE((unsigned)(word >> 24), crc);
184 case 8: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 16) & 0xff), crc);
185 case 16: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 8) & 0xff), crc);
186 case 24: br->read_crc16 = FLAC__CRC16_UPDATE((unsigned)(word & 0xff), crc);
190 case 0: crc = FLAC__CRC16_UPDATE((unsigned)(word >> 56), crc);
191 case 8: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 48) & 0xff), crc);
192 case 16: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 40) & 0xff), crc);
193 case 24: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 32) & 0xff), crc);
194 case 32: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 24) & 0xff), crc);
195 case 40: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 16) & 0xff), crc);
196 case 48: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 8) & 0xff), crc);
197 case 56: br->read_crc16 = FLAC__CRC16_UPDATE((unsigned)(word & 0xff), crc);
201 crc = FLAC__CRC16_UPDATE((unsigned)((word >> (FLAC__BITS_PER_WORD-8-br->crc16_align)) & 0xff), crc);
225 * set the target for reading, taking into account word alignment and endianness
233 * bitstream : 11 22 33 44 55 br->words=1 br->bytes=1 (partial tail word is left-justified)
237 * on LE machines, have to byteswap the odd tail word so nothing is
411 /* CRC any tail bytes in a partially-consumed word */
456 if(br->consumed_words < br->words) { /* if we've not consumed up to a partial tail word... */
461 const brword word = br->buffer[br->consumed_words];
463 *val = (word & (FLAC__WORD_ALL_ONES >> br->consumed_bits)) >> (n-bits);
467 *val = word & (FLAC__WORD_ALL_ONES >> br->consumed_bits);
469 crc16_update_word_(br, word);
472 if(bits) { /* if there are still bits left to read, there have to be less than 32 so they will all be in the next word */
480 const brword word = br->buffer[br->consumed_words];
482 *val = word >> (FLAC__BITS_PER_WORD-bits);
487 *val = word;
488 crc16_update_word_(br, word);
494 /* in this case we're starting our read at a partial tail word;
614 /* step 1: skip over partial head word to get word aligned */
615 while(nvals && br->consumed_bits) { /* i.e. run until we read 'nvals' bytes or we hit the end of the head word */
649 /* step 1: read from partial head word to get word aligned */
650 while(nvals && br->consumed_bits) { /* i.e. run until we read 'nvals' bytes or we hit the end of the head word */
661 const brword word = br->buffer[br->consumed_words++];
663 val[0] = (FLAC__byte)(word >> 24);
664 val[1] = (FLAC__byte)(word >> 16);
665 val[2] = (FLAC__byte)(word >> 8);
666 val[3] = (FLAC__byte)word;
668 val[0] = (FLAC__byte)(word >> 56);
669 val[1] = (FLAC__byte)(word >> 48);
670 val[2] = (FLAC__byte)(word >> 40);
671 val[3] = (FLAC__byte)(word >> 32);
672 val[4] = (FLAC__byte)(word >> 24);
673 val[5] = (FLAC__byte)(word >> 16);
674 val[6] = (FLAC__byte)(word >> 8);
675 val[7] = (FLAC__byte)word;
678 val[x] = (FLAC__byte)(word >> (8*(FLAC__BYTES_PER_WORD-x-1)));
725 while(br->consumed_words < br->words) { /* if we've not consumed up to a partial tail word... */
750 * don't have a whole word. note though if the client is feeding
838 while(cwords < br->words) { /* if we've not consumed up to a partial tail word... */
873 * don't have a whole word. note though if the client is feeding
922 if(cwords < br->words) { /* if we've not consumed up to a partial tail word... */
926 const brword word = br->buffer[cwords];
929 uval |= (word & (FLAC__WORD_ALL_ONES >> cbits)) >> (n-bits);
934 uval |= word & (FLAC__WORD_ALL_ONES >> cbits);
936 crc16_update_word_(br, word);
939 if(bits) { /* if there are still bits left to read, there have to be less than 32 so they will all be in the next word */
955 /* in this case we're starting our read at a partial tail word;
1021 while(cwords < br->words) { /* if we've not consumed up to a partial tail word... */
1056 * don't have a whole word. note though if the client is feeding
1113 if(cwords < br->words) { /* if we've not consumed up to a partial tail word... */
1117 const brword word = br->buffer[cwords];
1120 uval |= (word & (FLAC__WORD_ALL_ONES >> cbits)) >> (n-parameter);
1125 uval |= word & (FLAC__WORD_ALL_ONES >> cbits);
1126 crc16_update_word_(br, word);
1129 if(cbits) { /* parameter > n, i.e. if there are still bits left to read, there have to be less than 32 so they will all be in the next word */
1142 /* in this case we're starting our read at a partial tail word;