Lines Matching defs:shift

3260   // The VBD is 21 bits in the middle of t->repr. Left shift the high (64 - 21
3261 // - ETC__SHIFT) bits off, then right shift (sign-extending) back down.
3688 // shift by 24, not just by 16, because the return value is 8-bit color, not
4069 uint32_t shift = ((plane & 0x03) * 8) + 6;
4070 return (s->repr >> shift) & 0x03;
4077 uint32_t shift = ((plane & 0x03) * 8) + 4;
4078 return ((s->repr >> shift) & 0x03) + 1;
4084 uint32_t shift = ((plane & 0x03) * 8) + 2;
4085 return (s->repr >> shift) & 0x03;
4092 uint32_t shift = ((plane & 0x03) * 8) + 0;
4093 return ((s->repr >> shift) & 0x03) + 1;
11340 uint32_t shift = 8 * (8 - n);
11341 return ((a << shift) == (x << shift)) ? 0 : 2;
12355 // script/print-hpd-left-shift.go. That script has an optional -comments flag,
13139 uint32_t shift = ((uint32_t)(1051 - exp)); // 1051 = 0x3F0 + 53 - 10.
13140 uint64_t shifted_man = man >> shift;
13143 ret.lossy = (shifted_man << shift) != man;
13149 // Re-bias from 1023 to 15 and shift above f16's 10 mantissa bits.
13203 uint32_t shift = ((uint32_t)(926 - exp)); // 926 = 0x380 + 53 - 23.
13204 uint64_t shifted_man = man >> shift;
13207 ret.lossy = (shifted_man << shift) != man;
13213 // Re-bias from 1023 to 127 and shift above f32's 23 mantissa bits.
13569 // returns the number of additional decimal digits when left-shifting by shift.
13575 uint32_t shift) {
13579 shift &= 63;
13581 uint32_t x_a = wuffs_base__private_implementation__hpd_left_shift[shift];
13582 uint32_t x_b = wuffs_base__private_implementation__hpd_left_shift[shift + 1];
13655 // number (where 'x' is 'l' or 'r' for left or right) by a small shift value.
13660 // - shift is non-zero.
13661 // - shift is "a small shift".
13666 // "A small shift" means not more than
13674 // two preconditions but not the last two. Its shift argument is signed and
13675 // does not need to be "small": zero is a no-op, positive means left shift and
13676 // negative means right shift.
13681 uint32_t shift) {
13687 h, shift);
13694 n += ((uint64_t)(h->digits[rx])) << shift;
13733 uint32_t shift) {
13738 // Pick up enough leading digits to cover the first shift.
13739 while ((n >> shift) == 0) {
13748 while ((n >> shift) == 0) {
13758 // After the shift, h's number is effectively zero.
13766 uint64_t mask = (((uint64_t)(1)) << shift) - 1;
13768 uint8_t new_digit = ((uint8_t)(n >> shift));
13775 uint8_t new_digit = ((uint8_t)(n >> shift));
13792 int32_t shift) {
13793 if (shift > 0) {
13794 while (shift > +WUFFS_BASE__PRIVATE_IMPLEMENTATION__HPD__SHIFT__MAX_INCL) {
13797 shift -= WUFFS_BASE__PRIVATE_IMPLEMENTATION__HPD__SHIFT__MAX_INCL;
13800 h, ((uint32_t)(+shift)));
13801 } else if (shift < 0) {
13802 while (shift < -WUFFS_BASE__PRIVATE_IMPLEMENTATION__HPD__SHIFT__MAX_INCL) {
13805 shift += WUFFS_BASE__PRIVATE_IMPLEMENTATION__HPD__SHIFT__MAX_INCL;
13808 h, ((uint32_t)(-shift)));
14092 // - 65536 = 1<<16 is arbitrary but a power of 2, so division is a shift.
14111 // Before we shift right by at least 9 bits, recall that the look-up table
14117 // If overflow occurs, that adds 1 to x_hi. Since we're about to shift right
14179 // MSB (before shifting) was on, adjust ret_exp2 for the larger shift.
14205 // carrying up overflowed, shift again.
14391 // our exponent (in base-2). First we shift right, possibly a little too
14397 uint32_t shift =
14402 wuffs_base__private_implementation__high_prec_dec__small_rshift(h, shift);
14407 exp2 += (int32_t)shift;
14409 // ...then we shift left, putting us in [½ .. 1].
14411 uint32_t shift;
14416 shift = (h->digits[0] < 2) ? 2 : 1;
14419 shift = (n < num_powers)
14424 wuffs_base__private_implementation__high_prec_dec__small_lshift(h, shift);
14429 exp2 -= (int32_t)shift;
14455 // Rounding might have added one bit. If so, shift and re-check overflow.