50 align->
store = store + (x_store >> 3);
51 int shift = (x & 7) - (x_store & 7);
53 align->
prefetch = &prefetch_left_shift;
54 align->
fetch = &fetch_left_shift;
55 align->
shift = -shift;
57 }
else if (shift == 0) {
59 align->
fetch = &fetch;
73 align->
fetch = &fetch_right_shift;
84 return (*align->
fetch)(align);
103 return (hi << align->
shift) | (lo >> (8 - align->
shift));
112 return *align->
store++;
122 const uint8_t lo = *align->
store++;
123 const uint8_t hi = align->
carry;
125 return (hi << (8 - align->
shift)) | (lo >> align->
shift);
void blit_phase_align_prefetch(struct blit_phase_align *align)
Prefetches the next byte into the alignment structure.
void blit_phase_align_start(struct blit_phase_align *align, int x, int x_store, const blit_scanline_t *store)
Initialises the phase alignment structure.
blit_scanline_t blit_phase_align_fetch(struct blit_phase_align *align)
Fetches the next byte from the phase alignment structure.
Phase alignment for 8-bit bytes.
uint8_t blit_scanline_t
Type definition for a scanline element.
Phase alignment structure.
blit_scanline_t(* fetch)(struct blit_phase_align *align)
Fetch the next byte with appropriate shifting.
void(* prefetch)(struct blit_phase_align *align)
Prefetch the next byte into the alignment structure.
const blit_scanline_t * store
Pointer to the data being processed.
blit_scanline_t carry
Overflow from the previous byte fetch.
int shift
Number of bits to shift the data.