• Home
  • Raw
  • Download

Lines Matching refs:sp

2151             png_bytep sp = row + (png_size_t)((row_width - 1) >> 3);  in png_do_unpack()  local
2156 *dp = (png_byte)((*sp >> shift) & 0x01); in png_do_unpack()
2161 sp--; in png_do_unpack()
2175 png_bytep sp = row + (png_size_t)((row_width - 1) >> 2); in png_do_unpack() local
2180 *dp = (png_byte)((*sp >> shift) & 0x03); in png_do_unpack()
2185 sp--; in png_do_unpack()
2198 png_bytep sp = row + (png_size_t)((row_width - 1) >> 1); in png_do_unpack() local
2203 *dp = (png_byte)((*sp >> shift) & 0x0f); in png_do_unpack()
2208 sp--; in png_do_unpack()
2381 png_bytep sp = row; /* source */ in png_do_scale_16_to_8() local
2383 png_bytep ep = sp + row_info->rowbytes; /* end+1 */ in png_do_scale_16_to_8()
2385 while (sp < ep) in png_do_scale_16_to_8()
2419 png_int_32 tmp = *sp++; /* must be signed! */ in png_do_scale_16_to_8()
2420 tmp += (((int)*sp++ - tmp + 128) * 65535) >> 24; in png_do_scale_16_to_8()
2442 png_bytep sp = row; /* source */ in png_do_chop() local
2444 png_bytep ep = sp + row_info->rowbytes; /* end+1 */ in png_do_chop()
2446 while (sp < ep) in png_do_chop()
2448 *dp++ = *sp; in png_do_chop()
2449 sp += 2; /* skip low byte */ in png_do_chop()
2472 png_bytep sp = row + row_info->rowbytes; in png_do_read_swap_alpha() local
2473 png_bytep dp = sp; in png_do_read_swap_alpha()
2479 save = *(--sp); in png_do_read_swap_alpha()
2480 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2481 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2482 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2491 png_bytep sp = row + row_info->rowbytes; in png_do_read_swap_alpha() local
2492 png_bytep dp = sp; in png_do_read_swap_alpha()
2498 save[0] = *(--sp); in png_do_read_swap_alpha()
2499 save[1] = *(--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()
2502 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2503 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2504 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2505 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2518 png_bytep sp = row + row_info->rowbytes; in png_do_read_swap_alpha() local
2519 png_bytep dp = sp; in png_do_read_swap_alpha()
2525 save = *(--sp); in png_do_read_swap_alpha()
2526 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2535 png_bytep sp = row + row_info->rowbytes; in png_do_read_swap_alpha() local
2536 png_bytep dp = sp; in png_do_read_swap_alpha()
2542 save[0] = *(--sp); in png_do_read_swap_alpha()
2543 save[1] = *(--sp); in png_do_read_swap_alpha()
2544 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2545 *(--dp) = *(--sp); in png_do_read_swap_alpha()
2569 png_bytep sp = row + row_info->rowbytes; in png_do_read_invert_alpha() local
2570 png_bytep dp = sp; in png_do_read_invert_alpha()
2575 *(--dp) = (png_byte)(255 - *(--sp)); in png_do_read_invert_alpha()
2583 sp-=3; in png_do_read_invert_alpha()
2584 dp=sp; in png_do_read_invert_alpha()
2592 png_bytep sp = row + row_info->rowbytes; in png_do_read_invert_alpha() local
2593 png_bytep dp = sp; in png_do_read_invert_alpha()
2598 *(--dp) = (png_byte)(255 - *(--sp)); in png_do_read_invert_alpha()
2599 *(--dp) = (png_byte)(255 - *(--sp)); in png_do_read_invert_alpha()
2610 sp-=6; in png_do_read_invert_alpha()
2611 dp=sp; in png_do_read_invert_alpha()
2621 png_bytep sp = row + row_info->rowbytes; in png_do_read_invert_alpha() local
2622 png_bytep dp = sp; in png_do_read_invert_alpha()
2627 *(--dp) = (png_byte)(255 - *(--sp)); in png_do_read_invert_alpha()
2628 *(--dp) = *(--sp); in png_do_read_invert_alpha()
2636 png_bytep sp = row + row_info->rowbytes; in png_do_read_invert_alpha() local
2637 png_bytep dp = sp; in png_do_read_invert_alpha()
2642 *(--dp) = (png_byte)(255 - *(--sp)); in png_do_read_invert_alpha()
2643 *(--dp) = (png_byte)(255 - *(--sp)); in png_do_read_invert_alpha()
2648 sp-=2; in png_do_read_invert_alpha()
2649 dp=sp; in png_do_read_invert_alpha()
2681 png_bytep sp = row + (png_size_t)row_width; in png_do_read_filler() local
2682 png_bytep dp = sp + (png_size_t)row_width; in png_do_read_filler()
2686 *(--dp) = *(--sp); in png_do_read_filler()
2697 png_bytep sp = row + (png_size_t)row_width; in png_do_read_filler() local
2698 png_bytep dp = sp + (png_size_t)row_width; in png_do_read_filler()
2701 *(--dp) = *(--sp); in png_do_read_filler()
2716 png_bytep sp = row + (png_size_t)row_width * 2; in png_do_read_filler() local
2717 png_bytep dp = sp + (png_size_t)row_width * 2; in png_do_read_filler()
2722 *(--dp) = *(--sp); in png_do_read_filler()
2723 *(--dp) = *(--sp); in png_do_read_filler()
2735 png_bytep sp = row + (png_size_t)row_width * 2; in png_do_read_filler() local
2736 png_bytep dp = sp + (png_size_t)row_width * 2; in png_do_read_filler()
2739 *(--dp) = *(--sp); in png_do_read_filler()
2740 *(--dp) = *(--sp); in png_do_read_filler()
2758 png_bytep sp = row + (png_size_t)row_width * 3; in png_do_read_filler() local
2759 png_bytep dp = sp + (png_size_t)row_width; in png_do_read_filler()
2763 *(--dp) = *(--sp); in png_do_read_filler()
2764 *(--dp) = *(--sp); in png_do_read_filler()
2765 *(--dp) = *(--sp); in png_do_read_filler()
2776 png_bytep sp = row + (png_size_t)row_width * 3; in png_do_read_filler() local
2777 png_bytep dp = sp + (png_size_t)row_width; in png_do_read_filler()
2780 *(--dp) = *(--sp); in png_do_read_filler()
2781 *(--dp) = *(--sp); in png_do_read_filler()
2782 *(--dp) = *(--sp); in png_do_read_filler()
2797 png_bytep sp = row + (png_size_t)row_width * 6; in png_do_read_filler() local
2798 png_bytep dp = sp + (png_size_t)row_width * 2; in png_do_read_filler()
2803 *(--dp) = *(--sp); in png_do_read_filler()
2804 *(--dp) = *(--sp); in png_do_read_filler()
2805 *(--dp) = *(--sp); in png_do_read_filler()
2806 *(--dp) = *(--sp); in png_do_read_filler()
2807 *(--dp) = *(--sp); in png_do_read_filler()
2808 *(--dp) = *(--sp); in png_do_read_filler()
2820 png_bytep sp = row + (png_size_t)row_width * 6; in png_do_read_filler() local
2821 png_bytep dp = sp + (png_size_t)row_width * 2; in png_do_read_filler()
2824 *(--dp) = *(--sp); in png_do_read_filler()
2825 *(--dp) = *(--sp); in png_do_read_filler()
2826 *(--dp) = *(--sp); in png_do_read_filler()
2827 *(--dp) = *(--sp); in png_do_read_filler()
2828 *(--dp) = *(--sp); in png_do_read_filler()
2829 *(--dp) = *(--sp); in png_do_read_filler()
2862 png_bytep sp = row + (png_size_t)row_width - 1; in png_do_gray_to_rgb() local
2863 png_bytep dp = sp + (png_size_t)row_width * 2; in png_do_gray_to_rgb()
2866 *(dp--) = *sp; in png_do_gray_to_rgb()
2867 *(dp--) = *sp; in png_do_gray_to_rgb()
2868 *(dp--) = *(sp--); in png_do_gray_to_rgb()
2875 png_bytep sp = row + (png_size_t)row_width * 2 - 1; in png_do_gray_to_rgb() local
2876 png_bytep dp = sp + (png_size_t)row_width * 4; in png_do_gray_to_rgb()
2879 *(dp--) = *sp; in png_do_gray_to_rgb()
2880 *(dp--) = *(sp - 1); in png_do_gray_to_rgb()
2881 *(dp--) = *sp; in png_do_gray_to_rgb()
2882 *(dp--) = *(sp - 1); in png_do_gray_to_rgb()
2883 *(dp--) = *(sp--); in png_do_gray_to_rgb()
2884 *(dp--) = *(sp--); in png_do_gray_to_rgb()
2894 png_bytep sp = row + (png_size_t)row_width * 2 - 1; in png_do_gray_to_rgb() local
2895 png_bytep dp = sp + (png_size_t)row_width * 2; in png_do_gray_to_rgb()
2898 *(dp--) = *(sp--); in png_do_gray_to_rgb()
2899 *(dp--) = *sp; in png_do_gray_to_rgb()
2900 *(dp--) = *sp; in png_do_gray_to_rgb()
2901 *(dp--) = *(sp--); in png_do_gray_to_rgb()
2908 png_bytep sp = row + (png_size_t)row_width * 4 - 1; in png_do_gray_to_rgb() local
2909 png_bytep dp = sp + (png_size_t)row_width * 4; in png_do_gray_to_rgb()
2912 *(dp--) = *(sp--); in png_do_gray_to_rgb()
2913 *(dp--) = *(sp--); in png_do_gray_to_rgb()
2914 *(dp--) = *sp; in png_do_gray_to_rgb()
2915 *(dp--) = *(sp - 1); in png_do_gray_to_rgb()
2916 *(dp--) = *sp; in png_do_gray_to_rgb()
2917 *(dp--) = *(sp - 1); in png_do_gray_to_rgb()
2918 *(dp--) = *(sp--); in png_do_gray_to_rgb()
2919 *(dp--) = *(sp--); in png_do_gray_to_rgb()
3013 png_bytep sp = row; in png_do_rgb_to_gray() local
3019 png_byte red = *(sp++); in png_do_rgb_to_gray()
3020 png_byte green = *(sp++); in png_do_rgb_to_gray()
3021 png_byte blue = *(sp++); in png_do_rgb_to_gray()
3046 *(dp++) = *(sp++); in png_do_rgb_to_gray()
3052 png_bytep sp = row; in png_do_rgb_to_gray() local
3058 png_byte red = *(sp++); in png_do_rgb_to_gray()
3059 png_byte green = *(sp++); in png_do_rgb_to_gray()
3060 png_byte blue = *(sp++); in png_do_rgb_to_gray()
3075 *(dp++) = *(sp++); in png_do_rgb_to_gray()
3085 png_bytep sp = row; in png_do_rgb_to_gray() local
3094 hi=*(sp)++; lo=*(sp)++; red = (png_uint_16)((hi << 8) | (lo)); in png_do_rgb_to_gray()
3095 hi=*(sp)++; lo=*(sp)++; green = (png_uint_16)((hi << 8) | (lo)); in png_do_rgb_to_gray()
3096 hi=*(sp)++; lo=*(sp)++; blue = (png_uint_16)((hi << 8) | (lo)); in png_do_rgb_to_gray()
3129 *(dp++) = *(sp++); in png_do_rgb_to_gray()
3130 *(dp++) = *(sp++); in png_do_rgb_to_gray()
3137 png_bytep sp = row; in png_do_rgb_to_gray() local
3146 hi=*(sp)++; lo=*(sp)++; red = (png_uint_16)((hi << 8) | (lo)); in png_do_rgb_to_gray()
3147 hi=*(sp)++; lo=*(sp)++; green = (png_uint_16)((hi << 8) | (lo)); in png_do_rgb_to_gray()
3148 hi=*(sp)++; lo=*(sp)++; blue = (png_uint_16)((hi << 8) | (lo)); in png_do_rgb_to_gray()
3164 *(dp++) = *(sp++); in png_do_rgb_to_gray()
3165 *(dp++) = *(sp++); in png_do_rgb_to_gray()
3202 png_bytep sp; in png_do_compose() local
3218 sp = row; in png_do_compose()
3222 if ((png_uint_16)((*sp >> shift) & 0x01) in png_do_compose()
3225 unsigned int tmp = *sp & (0x7f7f >> (7 - shift)); in png_do_compose()
3227 *sp = (png_byte)(tmp & 0xff); in png_do_compose()
3233 sp++; in png_do_compose()
3247 sp = row; in png_do_compose()
3251 if ((png_uint_16)((*sp >> shift) & 0x03) in png_do_compose()
3254 unsigned int tmp = *sp & (0x3f3f >> (6 - shift)); in png_do_compose()
3256 *sp = (png_byte)(tmp & 0xff); in png_do_compose()
3261 unsigned int p = (*sp >> shift) & 0x03; in png_do_compose()
3264 unsigned int tmp = *sp & (0x3f3f >> (6 - shift)); in png_do_compose()
3266 *sp = (png_byte)(tmp & 0xff); in png_do_compose()
3272 sp++; in png_do_compose()
3283 sp = row; in png_do_compose()
3287 if ((png_uint_16)((*sp >> shift) & 0x03) in png_do_compose()
3290 unsigned int tmp = *sp & (0x3f3f >> (6 - shift)); in png_do_compose()
3292 *sp = (png_byte)(tmp & 0xff); in png_do_compose()
3298 sp++; in png_do_compose()
3313 sp = row; in png_do_compose()
3317 if ((png_uint_16)((*sp >> shift) & 0x0f) in png_do_compose()
3320 unsigned int tmp = *sp & (0x0f0f >> (4 - shift)); in png_do_compose()
3322 *sp = (png_byte)(tmp & 0xff); in png_do_compose()
3327 unsigned int p = (*sp >> shift) & 0x0f; in png_do_compose()
3330 unsigned int tmp = *sp & (0x0f0f >> (4 - shift)); in png_do_compose()
3332 *sp = (png_byte)(tmp & 0xff); in png_do_compose()
3338 sp++; in png_do_compose()
3349 sp = row; in png_do_compose()
3353 if ((png_uint_16)((*sp >> shift) & 0x0f) in png_do_compose()
3356 unsigned int tmp = *sp & (0x0f0f >> (4 - shift)); in png_do_compose()
3358 *sp = (png_byte)(tmp & 0xff); in png_do_compose()
3364 sp++; in png_do_compose()
3379 sp = row; in png_do_compose()
3380 for (i = 0; i < row_width; i++, sp++) in png_do_compose()
3382 if (*sp == png_ptr->trans_color.gray) in png_do_compose()
3383 *sp = (png_byte)png_ptr->background.gray; in png_do_compose()
3386 *sp = gamma_table[*sp]; in png_do_compose()
3392 sp = row; in png_do_compose()
3393 for (i = 0; i < row_width; i++, sp++) in png_do_compose()
3395 if (*sp == png_ptr->trans_color.gray) in png_do_compose()
3396 *sp = (png_byte)png_ptr->background.gray; in png_do_compose()
3407 sp = row; in png_do_compose()
3408 for (i = 0; i < row_width; i++, sp += 2) in png_do_compose()
3412 v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); in png_do_compose()
3417 *sp = (png_byte)((png_ptr->background.gray >> 8) in png_do_compose()
3419 *(sp + 1) = (png_byte)(png_ptr->background.gray in png_do_compose()
3425 v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; in png_do_compose()
3426 *sp = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3427 *(sp + 1) = (png_byte)(v & 0xff); in png_do_compose()
3434 sp = row; in png_do_compose()
3435 for (i = 0; i < row_width; i++, sp += 2) in png_do_compose()
3439 v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); in png_do_compose()
3443 *sp = (png_byte)((png_ptr->background.gray >> 8) in png_do_compose()
3445 *(sp + 1) = (png_byte)(png_ptr->background.gray in png_do_compose()
3466 sp = row; in png_do_compose()
3467 for (i = 0; i < row_width; i++, sp += 3) in png_do_compose()
3469 if (*sp == png_ptr->trans_color.red && in png_do_compose()
3470 *(sp + 1) == png_ptr->trans_color.green && in png_do_compose()
3471 *(sp + 2) == png_ptr->trans_color.blue) in png_do_compose()
3473 *sp = (png_byte)png_ptr->background.red; in png_do_compose()
3474 *(sp + 1) = (png_byte)png_ptr->background.green; in png_do_compose()
3475 *(sp + 2) = (png_byte)png_ptr->background.blue; in png_do_compose()
3480 *sp = gamma_table[*sp]; in png_do_compose()
3481 *(sp + 1) = gamma_table[*(sp + 1)]; in png_do_compose()
3482 *(sp + 2) = gamma_table[*(sp + 2)]; in png_do_compose()
3489 sp = row; in png_do_compose()
3490 for (i = 0; i < row_width; i++, sp += 3) in png_do_compose()
3492 if (*sp == png_ptr->trans_color.red && in png_do_compose()
3493 *(sp + 1) == png_ptr->trans_color.green && in png_do_compose()
3494 *(sp + 2) == png_ptr->trans_color.blue) in png_do_compose()
3496 *sp = (png_byte)png_ptr->background.red; in png_do_compose()
3497 *(sp + 1) = (png_byte)png_ptr->background.green; in png_do_compose()
3498 *(sp + 2) = (png_byte)png_ptr->background.blue; in png_do_compose()
3508 sp = row; in png_do_compose()
3509 for (i = 0; i < row_width; i++, sp += 6) in png_do_compose()
3511 png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); in png_do_compose()
3513 png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8) in png_do_compose()
3514 + *(sp + 3)); in png_do_compose()
3516 png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) in png_do_compose()
3517 + *(sp + 5)); in png_do_compose()
3524 *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); in png_do_compose()
3525 *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); in png_do_compose()
3526 *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) in png_do_compose()
3528 *(sp + 3) = (png_byte)(png_ptr->background.green in png_do_compose()
3530 *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) in png_do_compose()
3532 *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); in png_do_compose()
3537 png_uint_16 v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; in png_do_compose()
3538 *sp = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3539 *(sp + 1) = (png_byte)(v & 0xff); in png_do_compose()
3541 v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; in png_do_compose()
3542 *(sp + 2) = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3543 *(sp + 3) = (png_byte)(v & 0xff); in png_do_compose()
3545 v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; in png_do_compose()
3546 *(sp + 4) = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3547 *(sp + 5) = (png_byte)(v & 0xff); in png_do_compose()
3555 sp = row; in png_do_compose()
3556 for (i = 0; i < row_width; i++, sp += 6) in png_do_compose()
3558 png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); in png_do_compose()
3560 png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8) in png_do_compose()
3561 + *(sp + 3)); in png_do_compose()
3563 png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) in png_do_compose()
3564 + *(sp + 5)); in png_do_compose()
3570 *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); in png_do_compose()
3571 *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); in png_do_compose()
3572 *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) in png_do_compose()
3574 *(sp + 3) = (png_byte)(png_ptr->background.green in png_do_compose()
3576 *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) in png_do_compose()
3578 *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); in png_do_compose()
3594 sp = row; in png_do_compose()
3595 for (i = 0; i < row_width; i++, sp += 2) in png_do_compose()
3597 png_uint_16 a = *(sp + 1); in png_do_compose()
3600 *sp = gamma_table[*sp]; in png_do_compose()
3605 *sp = (png_byte)png_ptr->background.gray; in png_do_compose()
3612 v = gamma_to_1[*sp]; in png_do_compose()
3616 *sp = w; in png_do_compose()
3623 sp = row; in png_do_compose()
3624 for (i = 0; i < row_width; i++, sp += 2) in png_do_compose()
3626 png_byte a = *(sp + 1); in png_do_compose()
3629 *sp = (png_byte)png_ptr->background.gray; in png_do_compose()
3632 png_composite(*sp, *sp, a, png_ptr->background.gray); in png_do_compose()
3642 sp = row; in png_do_compose()
3643 for (i = 0; i < row_width; i++, sp += 4) in png_do_compose()
3645 png_uint_16 a = (png_uint_16)(((*(sp + 2)) << 8) in png_do_compose()
3646 + *(sp + 3)); in png_do_compose()
3652 v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; in png_do_compose()
3653 *sp = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3654 *(sp + 1) = (png_byte)(v & 0xff); in png_do_compose()
3660 *sp = (png_byte)((png_ptr->background.gray >> 8) in png_do_compose()
3662 *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff); in png_do_compose()
3669 g = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; in png_do_compose()
3676 *sp = (png_byte)((w >> 8) & 0xff); in png_do_compose()
3677 *(sp + 1) = (png_byte)(w & 0xff); in png_do_compose()
3684 sp = row; in png_do_compose()
3685 for (i = 0; i < row_width; i++, sp += 4) in png_do_compose()
3687 png_uint_16 a = (png_uint_16)(((*(sp + 2)) << 8) in png_do_compose()
3688 + *(sp + 3)); in png_do_compose()
3692 *sp = (png_byte)((png_ptr->background.gray >> 8) in png_do_compose()
3694 *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff); in png_do_compose()
3701 g = (png_uint_16)(((*sp) << 8) + *(sp + 1)); in png_do_compose()
3703 *sp = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3704 *(sp + 1) = (png_byte)(v & 0xff); in png_do_compose()
3720 sp = row; in png_do_compose()
3721 for (i = 0; i < row_width; i++, sp += 4) in png_do_compose()
3723 png_byte a = *(sp + 3); in png_do_compose()
3727 *sp = gamma_table[*sp]; in png_do_compose()
3728 *(sp + 1) = gamma_table[*(sp + 1)]; in png_do_compose()
3729 *(sp + 2) = gamma_table[*(sp + 2)]; in png_do_compose()
3735 *sp = (png_byte)png_ptr->background.red; in png_do_compose()
3736 *(sp + 1) = (png_byte)png_ptr->background.green; in png_do_compose()
3737 *(sp + 2) = (png_byte)png_ptr->background.blue; in png_do_compose()
3744 v = gamma_to_1[*sp]; in png_do_compose()
3747 *sp = w; in png_do_compose()
3749 v = gamma_to_1[*(sp + 1)]; in png_do_compose()
3752 *(sp + 1) = w; in png_do_compose()
3754 v = gamma_to_1[*(sp + 2)]; in png_do_compose()
3757 *(sp + 2) = w; in png_do_compose()
3764 sp = row; in png_do_compose()
3765 for (i = 0; i < row_width; i++, sp += 4) in png_do_compose()
3767 png_byte a = *(sp + 3); in png_do_compose()
3771 *sp = (png_byte)png_ptr->background.red; in png_do_compose()
3772 *(sp + 1) = (png_byte)png_ptr->background.green; in png_do_compose()
3773 *(sp + 2) = (png_byte)png_ptr->background.blue; in png_do_compose()
3778 png_composite(*sp, *sp, a, png_ptr->background.red); in png_do_compose()
3780 png_composite(*(sp + 1), *(sp + 1), a, in png_do_compose()
3783 png_composite(*(sp + 2), *(sp + 2), a, in png_do_compose()
3795 sp = row; in png_do_compose()
3796 for (i = 0; i < row_width; i++, sp += 8) in png_do_compose()
3798 png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6)) in png_do_compose()
3799 << 8) + (png_uint_16)(*(sp + 7))); in png_do_compose()
3805 v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; in png_do_compose()
3806 *sp = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3807 *(sp + 1) = (png_byte)(v & 0xff); in png_do_compose()
3809 v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; in png_do_compose()
3810 *(sp + 2) = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3811 *(sp + 3) = (png_byte)(v & 0xff); in png_do_compose()
3813 v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; in png_do_compose()
3814 *(sp + 4) = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3815 *(sp + 5) = (png_byte)(v & 0xff); in png_do_compose()
3821 *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); in png_do_compose()
3822 *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); in png_do_compose()
3823 *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) in png_do_compose()
3825 *(sp + 3) = (png_byte)(png_ptr->background.green in png_do_compose()
3827 *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) in png_do_compose()
3829 *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); in png_do_compose()
3836 v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; in png_do_compose()
3841 *sp = (png_byte)((w >> 8) & 0xff); in png_do_compose()
3842 *(sp + 1) = (png_byte)(w & 0xff); in png_do_compose()
3844 v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)]; in png_do_compose()
3850 *(sp + 2) = (png_byte)((w >> 8) & 0xff); in png_do_compose()
3851 *(sp + 3) = (png_byte)(w & 0xff); in png_do_compose()
3853 v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)]; in png_do_compose()
3859 *(sp + 4) = (png_byte)((w >> 8) & 0xff); in png_do_compose()
3860 *(sp + 5) = (png_byte)(w & 0xff); in png_do_compose()
3868 sp = row; in png_do_compose()
3869 for (i = 0; i < row_width; i++, sp += 8) in png_do_compose()
3871 png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6)) in png_do_compose()
3872 << 8) + (png_uint_16)(*(sp + 7))); in png_do_compose()
3876 *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); in png_do_compose()
3877 *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); in png_do_compose()
3878 *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) in png_do_compose()
3880 *(sp + 3) = (png_byte)(png_ptr->background.green in png_do_compose()
3882 *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) in png_do_compose()
3884 *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); in png_do_compose()
3891 png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); in png_do_compose()
3892 png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8) in png_do_compose()
3893 + *(sp + 3)); in png_do_compose()
3894 png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) in png_do_compose()
3895 + *(sp + 5)); in png_do_compose()
3898 *sp = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3899 *(sp + 1) = (png_byte)(v & 0xff); in png_do_compose()
3902 *(sp + 2) = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3903 *(sp + 3) = (png_byte)(v & 0xff); in png_do_compose()
3906 *(sp + 4) = (png_byte)((v >> 8) & 0xff); in png_do_compose()
3907 *(sp + 5) = (png_byte)(v & 0xff); in png_do_compose()
3936 png_bytep sp; in png_do_gamma() local
3951 sp = row; in png_do_gamma()
3954 *sp = gamma_table[*sp]; in png_do_gamma()
3955 sp++; in png_do_gamma()
3956 *sp = gamma_table[*sp]; in png_do_gamma()
3957 sp++; in png_do_gamma()
3958 *sp = gamma_table[*sp]; in png_do_gamma()
3959 sp++; in png_do_gamma()
3965 sp = row; in png_do_gamma()
3970 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; in png_do_gamma()
3971 *sp = (png_byte)((v >> 8) & 0xff); in png_do_gamma()
3972 *(sp + 1) = (png_byte)(v & 0xff); in png_do_gamma()
3973 sp += 2; in png_do_gamma()
3975 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; in png_do_gamma()
3976 *sp = (png_byte)((v >> 8) & 0xff); in png_do_gamma()
3977 *(sp + 1) = (png_byte)(v & 0xff); in png_do_gamma()
3978 sp += 2; in png_do_gamma()
3980 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; in png_do_gamma()
3981 *sp = (png_byte)((v >> 8) & 0xff); in png_do_gamma()
3982 *(sp + 1) = (png_byte)(v & 0xff); in png_do_gamma()
3983 sp += 2; in png_do_gamma()
3993 sp = row; in png_do_gamma()
3996 *sp = gamma_table[*sp]; in png_do_gamma()
3997 sp++; in png_do_gamma()
3999 *sp = gamma_table[*sp]; in png_do_gamma()
4000 sp++; in png_do_gamma()
4002 *sp = gamma_table[*sp]; in png_do_gamma()
4003 sp++; in png_do_gamma()
4005 sp++; in png_do_gamma()
4011 sp = row; in png_do_gamma()
4014 png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; in png_do_gamma()
4015 *sp = (png_byte)((v >> 8) & 0xff); in png_do_gamma()
4016 *(sp + 1) = (png_byte)(v & 0xff); in png_do_gamma()
4017 sp += 2; in png_do_gamma()
4019 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; in png_do_gamma()
4020 *sp = (png_byte)((v >> 8) & 0xff); in png_do_gamma()
4021 *(sp + 1) = (png_byte)(v & 0xff); in png_do_gamma()
4022 sp += 2; in png_do_gamma()
4024 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; in png_do_gamma()
4025 *sp = (png_byte)((v >> 8) & 0xff); in png_do_gamma()
4026 *(sp + 1) = (png_byte)(v & 0xff); in png_do_gamma()
4027 sp += 4; in png_do_gamma()
4037 sp = row; in png_do_gamma()
4040 *sp = gamma_table[*sp]; in png_do_gamma()
4041 sp += 2; in png_do_gamma()
4047 sp = row; in png_do_gamma()
4050 png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; in png_do_gamma()
4051 *sp = (png_byte)((v >> 8) & 0xff); in png_do_gamma()
4052 *(sp + 1) = (png_byte)(v & 0xff); in png_do_gamma()
4053 sp += 4; in png_do_gamma()
4063 sp = row; in png_do_gamma()
4066 int a = *sp & 0xc0; in png_do_gamma()
4067 int b = *sp & 0x30; in png_do_gamma()
4068 int c = *sp & 0x0c; in png_do_gamma()
4069 int d = *sp & 0x03; in png_do_gamma()
4071 *sp = (png_byte)( in png_do_gamma()
4076 sp++; in png_do_gamma()
4082 sp = row; in png_do_gamma()
4085 int msb = *sp & 0xf0; in png_do_gamma()
4086 int lsb = *sp & 0x0f; in png_do_gamma()
4088 *sp = (png_byte)((((int)gamma_table[msb | (msb >> 4)]) & 0xf0) in png_do_gamma()
4090 sp++; in png_do_gamma()
4096 sp = row; in png_do_gamma()
4099 *sp = gamma_table[*sp]; in png_do_gamma()
4100 sp++; in png_do_gamma()
4106 sp = row; in png_do_gamma()
4109 png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; in png_do_gamma()
4110 *sp = (png_byte)((v >> 8) & 0xff); in png_do_gamma()
4111 *(sp + 1) = (png_byte)(v & 0xff); in png_do_gamma()
4112 sp += 2; in png_do_gamma()
4201 png_bytep sp, dp; in png_do_expand_palette() local
4215 sp = row + (png_size_t)((row_width - 1) >> 3); in png_do_expand_palette()
4220 if ((*sp >> shift) & 0x01) in png_do_expand_palette()
4229 sp--; in png_do_expand_palette()
4242 sp = row + (png_size_t)((row_width - 1) >> 2); in png_do_expand_palette()
4247 value = (*sp >> shift) & 0x03; in png_do_expand_palette()
4252 sp--; in png_do_expand_palette()
4265 sp = row + (png_size_t)((row_width - 1) >> 1); in png_do_expand_palette()
4270 value = (*sp >> shift) & 0x0f; in png_do_expand_palette()
4275 sp--; in png_do_expand_palette()
4299 sp = row + (png_size_t)row_width - 1; in png_do_expand_palette()
4304 if ((int)(*sp) >= num_trans) in png_do_expand_palette()
4308 *dp-- = trans_alpha[*sp]; in png_do_expand_palette()
4310 *dp-- = palette[*sp].blue; in png_do_expand_palette()
4311 *dp-- = palette[*sp].green; in png_do_expand_palette()
4312 *dp-- = palette[*sp].red; in png_do_expand_palette()
4313 sp--; in png_do_expand_palette()
4324 sp = row + (png_size_t)row_width - 1; in png_do_expand_palette()
4329 *dp-- = palette[*sp].blue; in png_do_expand_palette()
4330 *dp-- = palette[*sp].green; in png_do_expand_palette()
4331 *dp-- = palette[*sp].red; in png_do_expand_palette()
4332 sp--; in png_do_expand_palette()
4354 png_bytep sp, dp; in png_do_expand() local
4372 sp = row + (png_size_t)((row_width - 1) >> 3); in png_do_expand()
4377 if ((*sp >> shift) & 0x01) in png_do_expand()
4386 sp--; in png_do_expand()
4400 sp = row + (png_size_t)((row_width - 1) >> 2); in png_do_expand()
4405 value = (*sp >> shift) & 0x03; in png_do_expand()
4411 sp--; in png_do_expand()
4425 sp = row + (png_size_t)((row_width - 1) >> 1); in png_do_expand()
4430 value = (*sp >> shift) & 0x0f; in png_do_expand()
4435 sp--; in png_do_expand()
4460 sp = row + (png_size_t)row_width - 1; in png_do_expand()
4465 if ((*sp & 0xffU) == gray) in png_do_expand()
4471 *dp-- = *sp--; in png_do_expand()
4479 sp = row + row_info->rowbytes - 1; in png_do_expand()
4483 if ((*(sp - 1) & 0xffU) == gray_high && in png_do_expand()
4484 (*(sp) & 0xffU) == gray_low) in png_do_expand()
4496 *dp-- = *sp--; in png_do_expand()
4497 *dp-- = *sp--; in png_do_expand()
4516 sp = row + (png_size_t)row_info->rowbytes - 1; in png_do_expand()
4520 if (*(sp - 2) == red && *(sp - 1) == green && *(sp) == blue) in png_do_expand()
4526 *dp-- = *sp--; in png_do_expand()
4527 *dp-- = *sp--; in png_do_expand()
4528 *dp-- = *sp--; in png_do_expand()
4539 sp = row + row_info->rowbytes - 1; in png_do_expand()
4543 if (*(sp - 5) == red_high && in png_do_expand()
4544 *(sp - 4) == red_low && in png_do_expand()
4545 *(sp - 3) == green_high && in png_do_expand()
4546 *(sp - 2) == green_low && in png_do_expand()
4547 *(sp - 1) == blue_high && in png_do_expand()
4548 *(sp ) == blue_low) in png_do_expand()
4560 *dp-- = *sp--; in png_do_expand()
4561 *dp-- = *sp--; in png_do_expand()
4562 *dp-- = *sp--; in png_do_expand()
4563 *dp-- = *sp--; in png_do_expand()
4564 *dp-- = *sp--; in png_do_expand()
4565 *dp-- = *sp--; in png_do_expand()
4596 png_byte *sp = row + row_info->rowbytes; /* source, last byte + 1 */ in png_do_expand_16() local
4597 png_byte *dp = sp + row_info->rowbytes; /* destination, end + 1 */ in png_do_expand_16()
4598 while (dp > sp) in png_do_expand_16()
4599 dp[-2] = dp[-1] = *--sp, dp -= 2; in png_do_expand_16()
4613 png_bytep sp, dp; in png_do_quantize() local
4624 sp = row; in png_do_quantize()
4628 r = *sp++; in png_do_quantize()
4629 g = *sp++; in png_do_quantize()
4630 b = *sp++; in png_do_quantize()
4661 sp = row; in png_do_quantize()
4665 r = *sp++; in png_do_quantize()
4666 g = *sp++; in png_do_quantize()
4667 b = *sp++; in png_do_quantize()
4668 sp++; in png_do_quantize()
4691 sp = row; in png_do_quantize()
4693 for (i = 0; i < row_width; i++, sp++) in png_do_quantize()
4695 *sp = quantize_lookup[*sp]; in png_do_quantize()