Lines Matching refs:sp
2147 png_bytep sp = row + (png_size_t)((row_width - 1) >> 3); in png_do_unpack() local
2152 *dp = (png_byte)((*sp >> shift) & 0x01); in png_do_unpack()
2157 sp--; in png_do_unpack()
2171 png_bytep sp = row + (png_size_t)((row_width - 1) >> 2); in png_do_unpack() local
2176 *dp = (png_byte)((*sp >> shift) & 0x03); in png_do_unpack()
2181 sp--; in png_do_unpack()
2194 png_bytep sp = row + (png_size_t)((row_width - 1) >> 1); in png_do_unpack() local
2199 *dp = (png_byte)((*sp >> shift) & 0x0f); in png_do_unpack()
2204 sp--; in png_do_unpack()
2377 png_bytep sp = row; /* source */ in png_do_scale_16_to_8() local
2379 png_bytep ep = sp + row_info->rowbytes; /* end+1 */ in png_do_scale_16_to_8()
2381 while (sp < ep) in png_do_scale_16_to_8()
2415 png_int_32 tmp = *sp++; /* must be signed! */ in png_do_scale_16_to_8()
2416 tmp += (((int)*sp++ - tmp + 128) * 65535) >> 24; in png_do_scale_16_to_8()
2438 png_bytep sp = row; /* source */ in png_do_chop() local
2440 png_bytep ep = sp + row_info->rowbytes; /* end+1 */ in png_do_chop()
2442 while (sp < ep) in png_do_chop()
2444 *dp++ = *sp; in png_do_chop()
2445 sp += 2; /* skip low byte */ in png_do_chop()
2468 png_bytep sp = row + row_info->rowbytes; in png_do_read_swap_alpha() local
2469 png_bytep dp = sp; in png_do_read_swap_alpha()
2475 save = *(--sp); in png_do_read_swap_alpha()
2476 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2477 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2478 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2487 png_bytep sp = row + row_info->rowbytes; in png_do_read_swap_alpha() local
2488 png_bytep dp = sp; in png_do_read_swap_alpha()
2494 save[0] = *(--sp); in png_do_read_swap_alpha()
2495 save[1] = *(--sp); in png_do_read_swap_alpha()
2496 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2497 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2498 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2499 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2500 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2501 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2514 png_bytep sp = row + row_info->rowbytes; in png_do_read_swap_alpha() local
2515 png_bytep dp = sp; in png_do_read_swap_alpha()
2521 save = *(--sp); in png_do_read_swap_alpha()
2522 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2531 png_bytep sp = row + row_info->rowbytes; in png_do_read_swap_alpha() local
2532 png_bytep dp = sp; in png_do_read_swap_alpha()
2538 save[0] = *(--sp); in png_do_read_swap_alpha()
2539 save[1] = *(--sp); in png_do_read_swap_alpha()
2540 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2541 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2565 png_bytep sp = row + row_info->rowbytes; in png_do_read_invert_alpha() local
2566 png_bytep dp = sp; in png_do_read_invert_alpha()
2571 *(--dp) = (png_byte)(255 - *(--sp)); in png_do_read_invert_alpha()
2579 sp-=3; in png_do_read_invert_alpha()
2580 dp=sp; in png_do_read_invert_alpha()
2588 png_bytep sp = row + row_info->rowbytes; in png_do_read_invert_alpha() local
2589 png_bytep dp = sp; in png_do_read_invert_alpha()
2594 *(--dp) = (png_byte)(255 - *(--sp)); in png_do_read_invert_alpha()
2595 *(--dp) = (png_byte)(255 - *(--sp)); in png_do_read_invert_alpha()
2606 sp-=6; in png_do_read_invert_alpha()
2607 dp=sp; in png_do_read_invert_alpha()
2617 png_bytep sp = row + row_info->rowbytes; in png_do_read_invert_alpha() local
2618 png_bytep dp = sp; in png_do_read_invert_alpha()
2623 *(--dp) = (png_byte)(255 - *(--sp)); in png_do_read_invert_alpha()
2624 *(--dp) = *(--sp); in png_do_read_invert_alpha()
2632 png_bytep sp = row + row_info->rowbytes; in png_do_read_invert_alpha() local
2633 png_bytep dp = sp; in png_do_read_invert_alpha()
2638 *(--dp) = (png_byte)(255 - *(--sp)); in png_do_read_invert_alpha()
2639 *(--dp) = (png_byte)(255 - *(--sp)); in png_do_read_invert_alpha()
2644 sp-=2; in png_do_read_invert_alpha()
2645 dp=sp; in png_do_read_invert_alpha()
2677 png_bytep sp = row + (png_size_t)row_width; in png_do_read_filler() local
2678 png_bytep dp = sp + (png_size_t)row_width; in png_do_read_filler()
2682 *(--dp) = *(--sp); in png_do_read_filler()
2693 png_bytep sp = row + (png_size_t)row_width; in png_do_read_filler() local
2694 png_bytep dp = sp + (png_size_t)row_width; in png_do_read_filler()
2697 *(--dp) = *(--sp); in png_do_read_filler()
2712 png_bytep sp = row + (png_size_t)row_width * 2; in png_do_read_filler() local
2713 png_bytep dp = sp + (png_size_t)row_width * 2; in png_do_read_filler()
2718 *(--dp) = *(--sp); in png_do_read_filler()
2719 *(--dp) = *(--sp); in png_do_read_filler()
2731 png_bytep sp = row + (png_size_t)row_width * 2; in png_do_read_filler() local
2732 png_bytep dp = sp + (png_size_t)row_width * 2; in png_do_read_filler()
2735 *(--dp) = *(--sp); in png_do_read_filler()
2736 *(--dp) = *(--sp); in png_do_read_filler()
2754 png_bytep sp = row + (png_size_t)row_width * 3; in png_do_read_filler() local
2755 png_bytep dp = sp + (png_size_t)row_width; in png_do_read_filler()
2759 *(--dp) = *(--sp); in png_do_read_filler()
2760 *(--dp) = *(--sp); in png_do_read_filler()
2761 *(--dp) = *(--sp); in png_do_read_filler()
2772 png_bytep sp = row + (png_size_t)row_width * 3; in png_do_read_filler() local
2773 png_bytep dp = sp + (png_size_t)row_width; in png_do_read_filler()
2776 *(--dp) = *(--sp); in png_do_read_filler()
2777 *(--dp) = *(--sp); in png_do_read_filler()
2778 *(--dp) = *(--sp); in png_do_read_filler()
2793 png_bytep sp = row + (png_size_t)row_width * 6; in png_do_read_filler() local
2794 png_bytep dp = sp + (png_size_t)row_width * 2; in png_do_read_filler()
2799 *(--dp) = *(--sp); in png_do_read_filler()
2800 *(--dp) = *(--sp); in png_do_read_filler()
2801 *(--dp) = *(--sp); in png_do_read_filler()
2802 *(--dp) = *(--sp); in png_do_read_filler()
2803 *(--dp) = *(--sp); in png_do_read_filler()
2804 *(--dp) = *(--sp); in png_do_read_filler()
2816 png_bytep sp = row + (png_size_t)row_width * 6; in png_do_read_filler() local
2817 png_bytep dp = sp + (png_size_t)row_width * 2; in png_do_read_filler()
2820 *(--dp) = *(--sp); in png_do_read_filler()
2821 *(--dp) = *(--sp); in png_do_read_filler()
2822 *(--dp) = *(--sp); in png_do_read_filler()
2823 *(--dp) = *(--sp); in png_do_read_filler()
2824 *(--dp) = *(--sp); in png_do_read_filler()
2825 *(--dp) = *(--sp); in png_do_read_filler()
2858 png_bytep sp = row + (png_size_t)row_width - 1; in png_do_gray_to_rgb() local
2859 png_bytep dp = sp + (png_size_t)row_width * 2; in png_do_gray_to_rgb()
2862 *(dp--) = *sp; in png_do_gray_to_rgb()
2863 *(dp--) = *sp; in png_do_gray_to_rgb()
2864 *(dp--) = *(sp--); in png_do_gray_to_rgb()
2871 png_bytep sp = row + (png_size_t)row_width * 2 - 1; in png_do_gray_to_rgb() local
2872 png_bytep dp = sp + (png_size_t)row_width * 4; in png_do_gray_to_rgb()
2875 *(dp--) = *sp; in png_do_gray_to_rgb()
2876 *(dp--) = *(sp - 1); in png_do_gray_to_rgb()
2877 *(dp--) = *sp; in png_do_gray_to_rgb()
2878 *(dp--) = *(sp - 1); in png_do_gray_to_rgb()
2879 *(dp--) = *(sp--); in png_do_gray_to_rgb()
2880 *(dp--) = *(sp--); in png_do_gray_to_rgb()
2890 png_bytep sp = row + (png_size_t)row_width * 2 - 1; in png_do_gray_to_rgb() local
2891 png_bytep dp = sp + (png_size_t)row_width * 2; in png_do_gray_to_rgb()
2894 *(dp--) = *(sp--); in png_do_gray_to_rgb()
2895 *(dp--) = *sp; in png_do_gray_to_rgb()
2896 *(dp--) = *sp; in png_do_gray_to_rgb()
2897 *(dp--) = *(sp--); in png_do_gray_to_rgb()
2904 png_bytep sp = row + (png_size_t)row_width * 4 - 1; in png_do_gray_to_rgb() local
2905 png_bytep dp = sp + (png_size_t)row_width * 4; in png_do_gray_to_rgb()
2908 *(dp--) = *(sp--); in png_do_gray_to_rgb()
2909 *(dp--) = *(sp--); in png_do_gray_to_rgb()
2910 *(dp--) = *sp; in png_do_gray_to_rgb()
2911 *(dp--) = *(sp - 1); in png_do_gray_to_rgb()
2912 *(dp--) = *sp; in png_do_gray_to_rgb()
2913 *(dp--) = *(sp - 1); in png_do_gray_to_rgb()
2914 *(dp--) = *(sp--); in png_do_gray_to_rgb()
2915 *(dp--) = *(sp--); in png_do_gray_to_rgb()
3009 png_bytep sp = row; in png_do_rgb_to_gray() local
3015 png_byte red = *(sp++); in png_do_rgb_to_gray()
3016 png_byte green = *(sp++); in png_do_rgb_to_gray()
3017 png_byte blue = *(sp++); in png_do_rgb_to_gray()
3042 *(dp++) = *(sp++); in png_do_rgb_to_gray()
3048 png_bytep sp = row; in png_do_rgb_to_gray() local
3054 png_byte red = *(sp++); in png_do_rgb_to_gray()
3055 png_byte green = *(sp++); in png_do_rgb_to_gray()
3056 png_byte blue = *(sp++); in png_do_rgb_to_gray()
3071 *(dp++) = *(sp++); in png_do_rgb_to_gray()
3081 png_bytep sp = row; in png_do_rgb_to_gray() local
3089 red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; in png_do_rgb_to_gray()
3090 green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; in png_do_rgb_to_gray()
3091 blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; in png_do_rgb_to_gray()
3124 *(dp++) = *(sp++); in png_do_rgb_to_gray()
3125 *(dp++) = *(sp++); in png_do_rgb_to_gray()
3132 png_bytep sp = row; in png_do_rgb_to_gray() local
3140 red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; in png_do_rgb_to_gray()
3141 green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; in png_do_rgb_to_gray()
3142 blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; in png_do_rgb_to_gray()
3158 *(dp++) = *(sp++); in png_do_rgb_to_gray()
3159 *(dp++) = *(sp++); in png_do_rgb_to_gray()
3196 png_bytep sp; in png_do_compose() local
3212 sp = row; in png_do_compose()
3216 if ((png_uint_16)((*sp >> shift) & 0x01) in png_do_compose()
3219 unsigned int tmp = *sp & (0x7f7f >> (7 - shift)); in png_do_compose()
3221 *sp = (png_byte)(tmp & 0xff); in png_do_compose()
3227 sp++; in png_do_compose()
3241 sp = row; in png_do_compose()
3245 if ((png_uint_16)((*sp >> shift) & 0x03) in png_do_compose()
3248 unsigned int tmp = *sp & (0x3f3f >> (6 - shift)); in png_do_compose()
3250 *sp = (png_byte)(tmp & 0xff); in png_do_compose()
3255 unsigned int p = (*sp >> shift) & 0x03; in png_do_compose()
3258 unsigned int tmp = *sp & (0x3f3f >> (6 - shift)); in png_do_compose()
3260 *sp = (png_byte)(tmp & 0xff); in png_do_compose()
3266 sp++; in png_do_compose()
3277 sp = row; in png_do_compose()
3281 if ((png_uint_16)((*sp >> shift) & 0x03) in png_do_compose()
3284 unsigned int tmp = *sp & (0x3f3f >> (6 - shift)); in png_do_compose()
3286 *sp = (png_byte)(tmp & 0xff); in png_do_compose()
3292 sp++; in png_do_compose()
3307 sp = row; in png_do_compose()
3311 if ((png_uint_16)((*sp >> shift) & 0x0f) in png_do_compose()
3314 unsigned int tmp = *sp & (0xf0f >> (4 - shift)); in png_do_compose()
3316 *sp = (png_byte)(tmp & 0xff); in png_do_compose()
3321 unsigned int p = (*sp >> shift) & 0x0f; in png_do_compose()
3324 unsigned int tmp = *sp & (0xf0f >> (4 - shift)); in png_do_compose()
3326 *sp = (png_byte)(tmp & 0xff); in png_do_compose()
3332 sp++; in png_do_compose()
3343 sp = row; in png_do_compose()
3347 if ((png_uint_16)((*sp >> shift) & 0x0f) in png_do_compose()
3350 unsigned int tmp = *sp & (0xf0f >> (4 - shift)); in png_do_compose()
3352 *sp = (png_byte)(tmp & 0xff); in png_do_compose()
3358 sp++; in png_do_compose()
3373 sp = row; in png_do_compose()
3374 for (i = 0; i < row_width; i++, sp++) in png_do_compose()
3376 if (*sp == png_ptr->trans_color.gray) in png_do_compose()
3377 *sp = (png_byte)png_ptr->background.gray; in png_do_compose()
3380 *sp = gamma_table[*sp]; in png_do_compose()
3386 sp = row; in png_do_compose()
3387 for (i = 0; i < row_width; i++, sp++) in png_do_compose()
3389 if (*sp == png_ptr->trans_color.gray) in png_do_compose()
3390 *sp = (png_byte)png_ptr->background.gray; in png_do_compose()
3401 sp = row; in png_do_compose()
3402 for (i = 0; i < row_width; i++, sp += 2) in png_do_compose()
3406 v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); in png_do_compose()
3411 *sp = (png_byte)((png_ptr->background.gray >> 8) in png_do_compose()
3413 *(sp + 1) = (png_byte)(png_ptr->background.gray in png_do_compose()
3419 v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; in png_do_compose()
3420 *sp = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3421 *(sp + 1) = (png_byte)(v & 0xff); in png_do_compose()
3428 sp = row; in png_do_compose()
3429 for (i = 0; i < row_width; i++, sp += 2) in png_do_compose()
3433 v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); in png_do_compose()
3437 *sp = (png_byte)((png_ptr->background.gray >> 8) in png_do_compose()
3439 *(sp + 1) = (png_byte)(png_ptr->background.gray in png_do_compose()
3460 sp = row; in png_do_compose()
3461 for (i = 0; i < row_width; i++, sp += 3) in png_do_compose()
3463 if (*sp == png_ptr->trans_color.red && in png_do_compose()
3464 *(sp + 1) == png_ptr->trans_color.green && in png_do_compose()
3465 *(sp + 2) == png_ptr->trans_color.blue) in png_do_compose()
3467 *sp = (png_byte)png_ptr->background.red; in png_do_compose()
3468 *(sp + 1) = (png_byte)png_ptr->background.green; in png_do_compose()
3469 *(sp + 2) = (png_byte)png_ptr->background.blue; in png_do_compose()
3474 *sp = gamma_table[*sp]; in png_do_compose()
3475 *(sp + 1) = gamma_table[*(sp + 1)]; in png_do_compose()
3476 *(sp + 2) = gamma_table[*(sp + 2)]; in png_do_compose()
3483 sp = row; in png_do_compose()
3484 for (i = 0; i < row_width; i++, sp += 3) in png_do_compose()
3486 if (*sp == png_ptr->trans_color.red && in png_do_compose()
3487 *(sp + 1) == png_ptr->trans_color.green && in png_do_compose()
3488 *(sp + 2) == png_ptr->trans_color.blue) in png_do_compose()
3490 *sp = (png_byte)png_ptr->background.red; in png_do_compose()
3491 *(sp + 1) = (png_byte)png_ptr->background.green; in png_do_compose()
3492 *(sp + 2) = (png_byte)png_ptr->background.blue; in png_do_compose()
3502 sp = row; in png_do_compose()
3503 for (i = 0; i < row_width; i++, sp += 6) in png_do_compose()
3505 png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); in png_do_compose()
3507 png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8) in png_do_compose()
3508 + *(sp + 3)); in png_do_compose()
3510 png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) in png_do_compose()
3511 + *(sp + 5)); in png_do_compose()
3518 *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); in png_do_compose()
3519 *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); in png_do_compose()
3520 *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) in png_do_compose()
3522 *(sp + 3) = (png_byte)(png_ptr->background.green in png_do_compose()
3524 *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) in png_do_compose()
3526 *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); in png_do_compose()
3531 png_uint_16 v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; in png_do_compose()
3532 *sp = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3533 *(sp + 1) = (png_byte)(v & 0xff); in png_do_compose()
3535 v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; in png_do_compose()
3536 *(sp + 2) = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3537 *(sp + 3) = (png_byte)(v & 0xff); in png_do_compose()
3539 v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; in png_do_compose()
3540 *(sp + 4) = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3541 *(sp + 5) = (png_byte)(v & 0xff); in png_do_compose()
3549 sp = row; in png_do_compose()
3550 for (i = 0; i < row_width; i++, sp += 6) in png_do_compose()
3552 png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); in png_do_compose()
3554 png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8) in png_do_compose()
3555 + *(sp + 3)); in png_do_compose()
3557 png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) in png_do_compose()
3558 + *(sp + 5)); in png_do_compose()
3564 *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); in png_do_compose()
3565 *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); in png_do_compose()
3566 *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) in png_do_compose()
3568 *(sp + 3) = (png_byte)(png_ptr->background.green in png_do_compose()
3570 *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) in png_do_compose()
3572 *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); in png_do_compose()
3588 sp = row; in png_do_compose()
3589 for (i = 0; i < row_width; i++, sp += 2) in png_do_compose()
3591 png_uint_16 a = *(sp + 1); in png_do_compose()
3594 *sp = gamma_table[*sp]; in png_do_compose()
3599 *sp = (png_byte)png_ptr->background.gray; in png_do_compose()
3606 v = gamma_to_1[*sp]; in png_do_compose()
3610 *sp = w; in png_do_compose()
3617 sp = row; in png_do_compose()
3618 for (i = 0; i < row_width; i++, sp += 2) in png_do_compose()
3620 png_byte a = *(sp + 1); in png_do_compose()
3623 *sp = (png_byte)png_ptr->background.gray; in png_do_compose()
3626 png_composite(*sp, *sp, a, png_ptr->background.gray); in png_do_compose()
3636 sp = row; in png_do_compose()
3637 for (i = 0; i < row_width; i++, sp += 4) in png_do_compose()
3639 png_uint_16 a = (png_uint_16)(((*(sp + 2)) << 8) in png_do_compose()
3640 + *(sp + 3)); in png_do_compose()
3646 v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; in png_do_compose()
3647 *sp = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3648 *(sp + 1) = (png_byte)(v & 0xff); in png_do_compose()
3654 *sp = (png_byte)((png_ptr->background.gray >> 8) in png_do_compose()
3656 *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff); in png_do_compose()
3663 g = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; in png_do_compose()
3669 *sp = (png_byte)((w >> 8) & 0xff); in png_do_compose()
3670 *(sp + 1) = (png_byte)(w & 0xff); in png_do_compose()
3677 sp = row; in png_do_compose()
3678 for (i = 0; i < row_width; i++, sp += 4) in png_do_compose()
3680 png_uint_16 a = (png_uint_16)(((*(sp + 2)) << 8) in png_do_compose()
3681 + *(sp + 3)); in png_do_compose()
3685 *sp = (png_byte)((png_ptr->background.gray >> 8) in png_do_compose()
3687 *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff); in png_do_compose()
3694 g = (png_uint_16)(((*sp) << 8) + *(sp + 1)); in png_do_compose()
3696 *sp = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3697 *(sp + 1) = (png_byte)(v & 0xff); in png_do_compose()
3713 sp = row; in png_do_compose()
3714 for (i = 0; i < row_width; i++, sp += 4) in png_do_compose()
3716 png_byte a = *(sp + 3); in png_do_compose()
3720 *sp = gamma_table[*sp]; in png_do_compose()
3721 *(sp + 1) = gamma_table[*(sp + 1)]; in png_do_compose()
3722 *(sp + 2) = gamma_table[*(sp + 2)]; in png_do_compose()
3728 *sp = (png_byte)png_ptr->background.red; in png_do_compose()
3729 *(sp + 1) = (png_byte)png_ptr->background.green; in png_do_compose()
3730 *(sp + 2) = (png_byte)png_ptr->background.blue; in png_do_compose()
3737 v = gamma_to_1[*sp]; in png_do_compose()
3740 *sp = w; in png_do_compose()
3742 v = gamma_to_1[*(sp + 1)]; in png_do_compose()
3745 *(sp + 1) = w; in png_do_compose()
3747 v = gamma_to_1[*(sp + 2)]; in png_do_compose()
3750 *(sp + 2) = w; in png_do_compose()
3757 sp = row; in png_do_compose()
3758 for (i = 0; i < row_width; i++, sp += 4) in png_do_compose()
3760 png_byte a = *(sp + 3); in png_do_compose()
3764 *sp = (png_byte)png_ptr->background.red; in png_do_compose()
3765 *(sp + 1) = (png_byte)png_ptr->background.green; in png_do_compose()
3766 *(sp + 2) = (png_byte)png_ptr->background.blue; in png_do_compose()
3771 png_composite(*sp, *sp, a, png_ptr->background.red); in png_do_compose()
3773 png_composite(*(sp + 1), *(sp + 1), a, in png_do_compose()
3776 png_composite(*(sp + 2), *(sp + 2), a, in png_do_compose()
3788 sp = row; in png_do_compose()
3789 for (i = 0; i < row_width; i++, sp += 8) in png_do_compose()
3791 png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6)) in png_do_compose()
3792 << 8) + (png_uint_16)(*(sp + 7))); in png_do_compose()
3798 v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; in png_do_compose()
3799 *sp = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3800 *(sp + 1) = (png_byte)(v & 0xff); in png_do_compose()
3802 v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; in png_do_compose()
3803 *(sp + 2) = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3804 *(sp + 3) = (png_byte)(v & 0xff); in png_do_compose()
3806 v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; in png_do_compose()
3807 *(sp + 4) = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3808 *(sp + 5) = (png_byte)(v & 0xff); in png_do_compose()
3814 *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); in png_do_compose()
3815 *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); in png_do_compose()
3816 *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) in png_do_compose()
3818 *(sp + 3) = (png_byte)(png_ptr->background.green in png_do_compose()
3820 *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) in png_do_compose()
3822 *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); in png_do_compose()
3829 v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; in png_do_compose()
3834 *sp = (png_byte)((w >> 8) & 0xff); in png_do_compose()
3835 *(sp + 1) = (png_byte)(w & 0xff); in png_do_compose()
3837 v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)]; in png_do_compose()
3843 *(sp + 2) = (png_byte)((w >> 8) & 0xff); in png_do_compose()
3844 *(sp + 3) = (png_byte)(w & 0xff); in png_do_compose()
3846 v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)]; in png_do_compose()
3852 *(sp + 4) = (png_byte)((w >> 8) & 0xff); in png_do_compose()
3853 *(sp + 5) = (png_byte)(w & 0xff); in png_do_compose()
3861 sp = row; in png_do_compose()
3862 for (i = 0; i < row_width; i++, sp += 8) in png_do_compose()
3864 png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6)) in png_do_compose()
3865 << 8) + (png_uint_16)(*(sp + 7))); in png_do_compose()
3869 *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); in png_do_compose()
3870 *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); in png_do_compose()
3871 *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) in png_do_compose()
3873 *(sp + 3) = (png_byte)(png_ptr->background.green in png_do_compose()
3875 *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) in png_do_compose()
3877 *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); in png_do_compose()
3884 png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); in png_do_compose()
3885 png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8) in png_do_compose()
3886 + *(sp + 3)); in png_do_compose()
3887 png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) in png_do_compose()
3888 + *(sp + 5)); in png_do_compose()
3891 *sp = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3892 *(sp + 1) = (png_byte)(v & 0xff); in png_do_compose()
3895 *(sp + 2) = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3896 *(sp + 3) = (png_byte)(v & 0xff); in png_do_compose()
3899 *(sp + 4) = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3900 *(sp + 5) = (png_byte)(v & 0xff); in png_do_compose()
3929 png_bytep sp; in png_do_gamma() local
3944 sp = row; in png_do_gamma()
3947 *sp = gamma_table[*sp]; in png_do_gamma()
3948 sp++; in png_do_gamma()
3949 *sp = gamma_table[*sp]; in png_do_gamma()
3950 sp++; in png_do_gamma()
3951 *sp = gamma_table[*sp]; in png_do_gamma()
3952 sp++; in png_do_gamma()
3958 sp = row; in png_do_gamma()
3963 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; in png_do_gamma()
3964 *sp = (png_byte)((v >> 8) & 0xff); in png_do_gamma()
3965 *(sp + 1) = (png_byte)(v & 0xff); in png_do_gamma()
3966 sp += 2; in png_do_gamma()
3968 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; in png_do_gamma()
3969 *sp = (png_byte)((v >> 8) & 0xff); in png_do_gamma()
3970 *(sp + 1) = (png_byte)(v & 0xff); in png_do_gamma()
3971 sp += 2; in png_do_gamma()
3973 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; in png_do_gamma()
3974 *sp = (png_byte)((v >> 8) & 0xff); in png_do_gamma()
3975 *(sp + 1) = (png_byte)(v & 0xff); in png_do_gamma()
3976 sp += 2; in png_do_gamma()
3986 sp = row; in png_do_gamma()
3989 *sp = gamma_table[*sp]; in png_do_gamma()
3990 sp++; in png_do_gamma()
3992 *sp = gamma_table[*sp]; in png_do_gamma()
3993 sp++; in png_do_gamma()
3995 *sp = gamma_table[*sp]; in png_do_gamma()
3996 sp++; in png_do_gamma()
3998 sp++; in png_do_gamma()
4004 sp = row; in png_do_gamma()
4007 png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; in png_do_gamma()
4008 *sp = (png_byte)((v >> 8) & 0xff); in png_do_gamma()
4009 *(sp + 1) = (png_byte)(v & 0xff); in png_do_gamma()
4010 sp += 2; in png_do_gamma()
4012 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; in png_do_gamma()
4013 *sp = (png_byte)((v >> 8) & 0xff); in png_do_gamma()
4014 *(sp + 1) = (png_byte)(v & 0xff); in png_do_gamma()
4015 sp += 2; in png_do_gamma()
4017 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; in png_do_gamma()
4018 *sp = (png_byte)((v >> 8) & 0xff); in png_do_gamma()
4019 *(sp + 1) = (png_byte)(v & 0xff); in png_do_gamma()
4020 sp += 4; in png_do_gamma()
4030 sp = row; in png_do_gamma()
4033 *sp = gamma_table[*sp]; in png_do_gamma()
4034 sp += 2; in png_do_gamma()
4040 sp = row; in png_do_gamma()
4043 png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; in png_do_gamma()
4044 *sp = (png_byte)((v >> 8) & 0xff); in png_do_gamma()
4045 *(sp + 1) = (png_byte)(v & 0xff); in png_do_gamma()
4046 sp += 4; in png_do_gamma()
4056 sp = row; in png_do_gamma()
4059 int a = *sp & 0xc0; in png_do_gamma()
4060 int b = *sp & 0x30; in png_do_gamma()
4061 int c = *sp & 0x0c; in png_do_gamma()
4062 int d = *sp & 0x03; in png_do_gamma()
4064 *sp = (png_byte)( in png_do_gamma()
4069 sp++; in png_do_gamma()
4075 sp = row; in png_do_gamma()
4078 int msb = *sp & 0xf0; in png_do_gamma()
4079 int lsb = *sp & 0x0f; in png_do_gamma()
4081 *sp = (png_byte)((((int)gamma_table[msb | (msb >> 4)]) & 0xf0) in png_do_gamma()
4083 sp++; in png_do_gamma()
4089 sp = row; in png_do_gamma()
4092 *sp = gamma_table[*sp]; in png_do_gamma()
4093 sp++; in png_do_gamma()
4099 sp = row; in png_do_gamma()
4102 png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; in png_do_gamma()
4103 *sp = (png_byte)((v >> 8) & 0xff); in png_do_gamma()
4104 *(sp + 1) = (png_byte)(v & 0xff); in png_do_gamma()
4105 sp += 2; in png_do_gamma()
4194 png_bytep sp, dp; in png_do_expand_palette() local
4208 sp = row + (png_size_t)((row_width - 1) >> 3); in png_do_expand_palette()
4213 if ((*sp >> shift) & 0x01) in png_do_expand_palette()
4222 sp--; in png_do_expand_palette()
4235 sp = row + (png_size_t)((row_width - 1) >> 2); in png_do_expand_palette()
4240 value = (*sp >> shift) & 0x03; in png_do_expand_palette()
4245 sp--; in png_do_expand_palette()
4258 sp = row + (png_size_t)((row_width - 1) >> 1); in png_do_expand_palette()
4263 value = (*sp >> shift) & 0x0f; in png_do_expand_palette()
4268 sp--; in png_do_expand_palette()
4292 sp = row + (png_size_t)row_width - 1; in png_do_expand_palette()
4297 if ((int)(*sp) >= num_trans) in png_do_expand_palette()
4301 *dp-- = trans_alpha[*sp]; in png_do_expand_palette()
4303 *dp-- = palette[*sp].blue; in png_do_expand_palette()
4304 *dp-- = palette[*sp].green; in png_do_expand_palette()
4305 *dp-- = palette[*sp].red; in png_do_expand_palette()
4306 sp--; in png_do_expand_palette()
4317 sp = row + (png_size_t)row_width - 1; in png_do_expand_palette()
4322 *dp-- = palette[*sp].blue; in png_do_expand_palette()
4323 *dp-- = palette[*sp].green; in png_do_expand_palette()
4324 *dp-- = palette[*sp].red; in png_do_expand_palette()
4325 sp--; in png_do_expand_palette()
4347 png_bytep sp, dp; in png_do_expand() local
4365 sp = row + (png_size_t)((row_width - 1) >> 3); in png_do_expand()
4370 if ((*sp >> shift) & 0x01) in png_do_expand()
4379 sp--; in png_do_expand()
4393 sp = row + (png_size_t)((row_width - 1) >> 2); in png_do_expand()
4398 value = (*sp >> shift) & 0x03; in png_do_expand()
4404 sp--; in png_do_expand()
4418 sp = row + (png_size_t)((row_width - 1) >> 1); in png_do_expand()
4423 value = (*sp >> shift) & 0x0f; in png_do_expand()
4428 sp--; in png_do_expand()
4453 sp = row + (png_size_t)row_width - 1; in png_do_expand()
4458 if (*sp == gray) in png_do_expand()
4464 *dp-- = *sp--; in png_do_expand()
4472 sp = row + row_info->rowbytes - 1; in png_do_expand()
4476 if (*(sp - 1) == gray_high && *(sp) == gray_low) in png_do_expand()
4488 *dp-- = *sp--; in png_do_expand()
4489 *dp-- = *sp--; in png_do_expand()
4507 sp = row + (png_size_t)row_info->rowbytes - 1; in png_do_expand()
4511 if (*(sp - 2) == red && *(sp - 1) == green && *(sp) == blue) in png_do_expand()
4517 *dp-- = *sp--; in png_do_expand()
4518 *dp-- = *sp--; in png_do_expand()
4519 *dp-- = *sp--; in png_do_expand()
4530 sp = row + row_info->rowbytes - 1; in png_do_expand()
4534 if (*(sp - 5) == red_high && in png_do_expand()
4535 *(sp - 4) == red_low && in png_do_expand()
4536 *(sp - 3) == green_high && in png_do_expand()
4537 *(sp - 2) == green_low && in png_do_expand()
4538 *(sp - 1) == blue_high && in png_do_expand()
4539 *(sp ) == blue_low) in png_do_expand()
4551 *dp-- = *sp--; in png_do_expand()
4552 *dp-- = *sp--; in png_do_expand()
4553 *dp-- = *sp--; in png_do_expand()
4554 *dp-- = *sp--; in png_do_expand()
4555 *dp-- = *sp--; in png_do_expand()
4556 *dp-- = *sp--; in png_do_expand()
4587 png_byte *sp = row + row_info->rowbytes; /* source, last byte + 1 */ in png_do_expand_16() local
4588 png_byte *dp = sp + row_info->rowbytes; /* destination, end + 1 */ in png_do_expand_16()
4589 while (dp > sp) in png_do_expand_16()
4590 dp[-2] = dp[-1] = *--sp, dp -= 2; in png_do_expand_16()
4604 png_bytep sp, dp; in png_do_quantize() local
4615 sp = row; in png_do_quantize()
4619 r = *sp++; in png_do_quantize()
4620 g = *sp++; in png_do_quantize()
4621 b = *sp++; in png_do_quantize()
4652 sp = row; in png_do_quantize()
4656 r = *sp++; in png_do_quantize()
4657 g = *sp++; in png_do_quantize()
4658 b = *sp++; in png_do_quantize()
4659 sp++; in png_do_quantize()
4682 sp = row; in png_do_quantize()
4684 for (i = 0; i < row_width; i++, sp++) in png_do_quantize()
4686 *sp = quantize_lookup[*sp]; in png_do_quantize()