Lines Matching refs:sptr
336 * sptr: source color scale buffer
342 pixma_r_to_ir (uint8_t * gptr, uint8_t * sptr, unsigned w, unsigned c)
350 *gptr++ = *sptr++;
351 if (c == 6) *gptr++ = *sptr++; /* 48 bit RGB: high byte */
352 sptr += (c == 6) ? 4 : 2; /* drop G + B */
361 * sptr: source color scale buffer
367 pixma_rgb_to_gray (uint8_t * gptr, uint8_t * sptr, unsigned w, unsigned c)
377 unsigned r = sptr[0] + (sptr[1] << 8);
378 unsigned y = sptr[2] + (sptr[3] << 8);
379 unsigned b = sptr[4] + (sptr[5] << 8);
382 sptr += 6;
386 g = (sptr[0] * 2126) + (sptr[1] * 7152) + (sptr[2] * 722);
387 sptr += 3;