Lines Matching defs:sp
2337 png_bytep sp = row + (png_size_t)((row_width - 1) >> 3);
2342 *dp = (png_byte)((*sp >> shift) & 0x01);
2347 sp--;
2361 png_bytep sp = row + (png_size_t)((row_width - 1) >> 2);
2366 *dp = (png_byte)((*sp >> shift) & 0x03);
2371 sp--;
2384 png_bytep sp = row + (png_size_t)((row_width - 1) >> 1);
2389 *dp = (png_byte)((*sp >> shift) & 0x0f);
2394 sp--;
2544 png_bytep sp = row; /* source */
2546 png_bytep ep = sp + row_info->rowbytes; /* end+1 */
2548 while (sp < ep)
2582 png_int_32 tmp = *sp++; /* must be signed! */
2583 tmp += (((int)*sp++ - tmp + 128) * 65535) >> 24;
2605 png_bytep sp = row; /* source */
2607 png_bytep ep = sp + row_info->rowbytes; /* end+1 */
2609 while (sp < ep)
2611 *dp++ = *sp;
2612 sp += 2; /* skip low byte */
2635 png_bytep sp = row + row_info->rowbytes;
2636 png_bytep dp = sp;
2642 save = *(--sp);
2643 *(--dp) = *(--sp);
2644 *(--dp) = *(--sp);
2645 *(--dp) = *(--sp);
2654 png_bytep sp = row + row_info->rowbytes;
2655 png_bytep dp = sp;
2661 save[0] = *(--sp);
2662 save[1] = *(--sp);
2663 *(--dp) = *(--sp);
2664 *(--dp) = *(--sp);
2665 *(--dp) = *(--sp);
2666 *(--dp) = *(--sp);
2667 *(--dp) = *(--sp);
2668 *(--dp) = *(--sp);
2681 png_bytep sp = row + row_info->rowbytes;
2682 png_bytep dp = sp;
2688 save = *(--sp);
2689 *(--dp) = *(--sp);
2698 png_bytep sp = row + row_info->rowbytes;
2699 png_bytep dp = sp;
2705 save[0] = *(--sp);
2706 save[1] = *(--sp);
2707 *(--dp) = *(--sp);
2708 *(--dp) = *(--sp);
2732 png_bytep sp = row + row_info->rowbytes;
2733 png_bytep dp = sp;
2738 *(--dp) = (png_byte)(255 - *(--sp));
2741 *(--dp) = *(--sp);
2742 *(--dp) = *(--sp);
2743 *(--dp) = *(--sp);
2746 sp-=3;
2747 dp=sp;
2755 png_bytep sp = row + row_info->rowbytes;
2756 png_bytep dp = sp;
2761 *(--dp) = (png_byte)(255 - *(--sp));
2762 *(--dp) = (png_byte)(255 - *(--sp));
2765 *(--dp) = *(--sp);
2766 *(--dp) = *(--sp);
2767 *(--dp) = *(--sp);
2768 *(--dp) = *(--sp);
2769 *(--dp) = *(--sp);
2770 *(--dp) = *(--sp);
2773 sp-=6;
2774 dp=sp;
2784 png_bytep sp = row + row_info->rowbytes;
2785 png_bytep dp = sp;
2790 *(--dp) = (png_byte)(255 - *(--sp));
2791 *(--dp) = *(--sp);
2799 png_bytep sp = row + row_info->rowbytes;
2800 png_bytep dp = sp;
2805 *(--dp) = (png_byte)(255 - *(--sp));
2806 *(--dp) = (png_byte)(255 - *(--sp));
2808 *(--dp) = *(--sp);
2809 *(--dp) = *(--sp);
2811 sp-=2;
2812 dp=sp;
2844 png_bytep sp = row + (png_size_t)row_width;
2845 png_bytep dp = sp + (png_size_t)row_width;
2849 *(--dp) = *(--sp);
2860 png_bytep sp = row + (png_size_t)row_width;
2861 png_bytep dp = sp + (png_size_t)row_width;
2864 *(--dp) = *(--sp);
2879 png_bytep sp = row + (png_size_t)row_width * 2;
2880 png_bytep dp = sp + (png_size_t)row_width * 2;
2885 *(--dp) = *(--sp);
2886 *(--dp) = *(--sp);
2898 png_bytep sp = row + (png_size_t)row_width * 2;
2899 png_bytep dp = sp + (png_size_t)row_width * 2;
2902 *(--dp) = *(--sp);
2903 *(--dp) = *(--sp);
2921 png_bytep sp = row + (png_size_t)row_width * 3;
2922 png_bytep dp = sp + (png_size_t)row_width;
2926 *(--dp) = *(--sp);
2927 *(--dp) = *(--sp);
2928 *(--dp) = *(--sp);
2939 png_bytep sp = row + (png_size_t)row_width * 3;
2940 png_bytep dp = sp + (png_size_t)row_width;
2943 *(--dp) = *(--sp);
2944 *(--dp) = *(--sp);
2945 *(--dp) = *(--sp);
2960 png_bytep sp = row + (png_size_t)row_width * 6;
2961 png_bytep dp = sp + (png_size_t)row_width * 2;
2966 *(--dp) = *(--sp);
2967 *(--dp) = *(--sp);
2968 *(--dp) = *(--sp);
2969 *(--dp) = *(--sp);
2970 *(--dp) = *(--sp);
2971 *(--dp) = *(--sp);
2983 png_bytep sp = row + (png_size_t)row_width * 6;
2984 png_bytep dp = sp + (png_size_t)row_width * 2;
2987 *(--dp) = *(--sp);
2988 *(--dp) = *(--sp);
2989 *(--dp) = *(--sp);
2990 *(--dp) = *(--sp);
2991 *(--dp) = *(--sp);
2992 *(--dp) = *(--sp);
3025 png_bytep sp = row + (png_size_t)row_width - 1;
3026 png_bytep dp = sp + (png_size_t)row_width * 2;
3029 *(dp--) = *sp;
3030 *(dp--) = *sp;
3031 *(dp--) = *(sp--);
3038 png_bytep sp = row + (png_size_t)row_width * 2 - 1;
3039 png_bytep dp = sp + (png_size_t)row_width * 4;
3042 *(dp--) = *sp;
3043 *(dp--) = *(sp - 1);
3044 *(dp--) = *sp;
3045 *(dp--) = *(sp - 1);
3046 *(dp--) = *(sp--);
3047 *(dp--) = *(sp--);
3057 png_bytep sp = row + (png_size_t)row_width * 2 - 1;
3058 png_bytep dp = sp + (png_size_t)row_width * 2;
3061 *(dp--) = *(sp--);
3062 *(dp--) = *sp;
3063 *(dp--) = *sp;
3064 *(dp--) = *(sp--);
3071 png_bytep sp = row + (png_size_t)row_width * 4 - 1;
3072 png_bytep dp = sp + (png_size_t)row_width * 4;
3075 *(dp--) = *(sp--);
3076 *(dp--) = *(sp--);
3077 *(dp--) = *sp;
3078 *(dp--) = *(sp - 1);
3079 *(dp--) = *sp;
3080 *(dp--) = *(sp - 1);
3081 *(dp--) = *(sp--);
3082 *(dp--) = *(sp--);
3142 png_bytep sp = row;
3147 png_byte red = png_ptr->gamma_to_1[*(sp++)];
3148 png_byte green = png_ptr->gamma_to_1[*(sp++)];
3149 png_byte blue = png_ptr->gamma_to_1[*(sp++)];
3159 *(dp++) = *(sp - 1);
3165 png_bytep sp = row;
3169 png_byte red = *(sp++);
3170 png_byte green = *(sp++);
3171 png_byte blue = *(sp++);
3180 *(dp++) = *(sp - 1);
3191 png_bytep sp = row;
3197 red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
3198 green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
3199 blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
3227 png_bytep sp = row;
3233 red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
3234 green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
3235 blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
3254 png_bytep sp = row;
3258 png_byte red = png_ptr->gamma_to_1[*(sp++)];
3259 png_byte green = png_ptr->gamma_to_1[*(sp++)];
3260 png_byte blue = png_ptr->gamma_to_1[*(sp++)];
3268 *(dp++) = *(sp++); /* alpha */
3274 png_bytep sp = row;
3278 png_byte red = *(sp++);
3279 png_byte green = *(sp++);
3280 png_byte blue = *(sp++);
3285 *(dp++) = *(sp++); /* alpha */
3295 png_bytep sp = row;
3301 red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
3302 green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
3303 blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
3331 *(dp++) = *(sp++); /* alpha */
3332 *(dp++) = *(sp++);
3338 png_bytep sp = row;
3343 red = (png_uint_16)((*(sp)<<8) | *(sp + 1)); sp += 2;
3344 green = (png_uint_16)((*(sp)<<8) | *(sp + 1)); sp += 2;
3345 blue = (png_uint_16)((*(sp)<<8) | *(sp + 1)); sp += 2;
3353 *(dp++) = *(sp++); /* alpha */
3354 *(dp++) = *(sp++);
3447 png_bytep sp;
3464 sp = row;
3468 if ((png_uint_16)((*sp >> shift) & 0x01)
3471 *sp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff);
3472 *sp |= (png_byte)(png_ptr->background.gray << shift);
3478 sp++;
3492 sp = row;
3496 if ((png_uint_16)((*sp >> shift) & 0x03)
3499 *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);
3500 *sp |= (png_byte)(png_ptr->background.gray << shift);
3505 png_byte p = (png_byte)((*sp >> shift) & 0x03);
3508 *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);
3509 *sp |= (png_byte)(g << shift);
3515 sp++;
3526 sp = row;
3530 if ((png_uint_16)((*sp >> shift) & 0x03)
3533 *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);
3534 *sp |= (png_byte)(png_ptr->background.gray << shift);
3540 sp++;
3555 sp = row;
3559 if ((png_uint_16)((*sp >> shift) & 0x0f)
3562 *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
3563 *sp |= (png_byte)(png_ptr->background.gray << shift);
3568 png_byte p = (png_byte)((*sp >> shift) & 0x0f);
3571 *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
3572 *sp |= (png_byte)(g << shift);
3578 sp++;
3589 sp = row;
3593 if ((png_uint_16)((*sp >> shift) & 0x0f)
3596 *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
3597 *sp |= (png_byte)(png_ptr->background.gray << shift);
3603 sp++;
3618 sp = row;
3619 for (i = 0; i < row_width; i++, sp++)
3621 if (*sp == png_ptr->trans_color.gray)
3622 *sp = (png_byte)png_ptr->background.gray;
3625 *sp = gamma_table[*sp];
3631 sp = row;
3632 for (i = 0; i < row_width; i++, sp++)
3634 if (*sp == png_ptr->trans_color.gray)
3635 *sp = (png_byte)png_ptr->background.gray;
3646 sp = row;
3647 for (i = 0; i < row_width; i++, sp += 2)
3651 v = (png_uint_16)(((*sp) << 8) + *(sp + 1));
3656 *sp = (png_byte)((png_ptr->background.gray >> 8) & 0xff);
3657 *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff);
3662 v = gamma_16[*(sp + 1) >> gamma_shift][*sp];
3663 *sp = (png_byte)((v >> 8) & 0xff);
3664 *(sp + 1) = (png_byte)(v & 0xff);
3671 sp = row;
3672 for (i = 0; i < row_width; i++, sp += 2)
3676 v = (png_uint_16)(((*sp) << 8) + *(sp + 1));
3680 *sp = (png_byte)((png_ptr->background.gray >> 8) & 0xff);
3681 *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff);
3701 sp = row;
3702 for (i = 0; i < row_width; i++, sp += 3)
3704 if (*sp == png_ptr->trans_color.red &&
3705 *(sp + 1) == png_ptr->trans_color.green &&
3706 *(sp + 2) == png_ptr->trans_color.blue)
3708 *sp = (png_byte)png_ptr->background.red;
3709 *(sp + 1) = (png_byte)png_ptr->background.green;
3710 *(sp + 2) = (png_byte)png_ptr->background.blue;
3715 *sp = gamma_table[*sp];
3716 *(sp + 1) = gamma_table[*(sp + 1)];
3717 *(sp + 2) = gamma_table[*(sp + 2)];
3724 sp = row;
3725 for (i = 0; i < row_width; i++, sp += 3)
3727 if (*sp == png_ptr->trans_color.red &&
3728 *(sp + 1) == png_ptr->trans_color.green &&
3729 *(sp + 2) == png_ptr->trans_color.blue)
3731 *sp = (png_byte)png_ptr->background.red;
3732 *(sp + 1) = (png_byte)png_ptr->background.green;
3733 *(sp + 2) = (png_byte)png_ptr->background.blue;
3743 sp = row;
3744 for (i = 0; i < row_width; i++, sp += 6)
3746 png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1));
3748 png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8)
3749 + *(sp + 3));
3751 png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8)
3752 + *(sp + 5));
3759 *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff);
3760 *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff);
3761 *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) & 0xff);
3762 *(sp + 3) = (png_byte)(png_ptr->background.green & 0xff);
3763 *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) & 0xff);
3764 *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff);
3769 png_uint_16 v = gamma_16[*(sp + 1) >> gamma_shift][*sp];
3770 *sp = (png_byte)((v >> 8) & 0xff);
3771 *(sp + 1) = (png_byte)(v & 0xff);
3773 v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)];
3774 *(sp + 2) = (png_byte)((v >> 8) & 0xff);
3775 *(sp + 3) = (png_byte)(v & 0xff);
3777 v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)];
3778 *(sp + 4) = (png_byte)((v >> 8) & 0xff);
3779 *(sp + 5) = (png_byte)(v & 0xff);
3787 sp = row;
3788 for (i = 0; i < row_width; i++, sp += 6)
3790 png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1));
3792 png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8)
3793 + *(sp + 3));
3795 png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8)
3796 + *(sp + 5));
3802 *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff);
3803 *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff);
3804 *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) & 0xff);
3805 *(sp + 3) = (png_byte)(png_ptr->background.green & 0xff);
3806 *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) & 0xff);
3807 *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff);
3823 sp = row;
3824 for (i = 0; i < row_width; i++, sp += 2)
3826 png_uint_16 a = *(sp + 1);
3829 *sp = gamma_table[*sp];
3834 *sp = (png_byte)png_ptr->background.gray;
3841 v = gamma_to_1[*sp];
3845 *sp = w;
3852 sp = row;
3853 for (i = 0; i < row_width; i++, sp += 2)
3855 png_byte a = *(sp + 1);
3858 *sp = (png_byte)png_ptr->background.gray;
3861 png_composite(*sp, *sp, a, png_ptr->background_1.gray);
3871 sp = row;
3872 for (i = 0; i < row_width; i++, sp += 4)
3874 png_uint_16 a = (png_uint_16)(((*(sp + 2)) << 8)
3875 + *(sp + 3));
3881 v = gamma_16[*(sp + 1) >> gamma_shift][*sp];
3882 *sp = (png_byte)((v >> 8) & 0xff);
3883 *(sp + 1) = (png_byte)(v & 0xff);
3889 *sp = (png_byte)((png_ptr->background.gray >> 8) & 0xff);
3890 *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff);
3897 g = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp];
3903 *sp = (png_byte)((w >> 8) & 0xff);
3904 *(sp + 1) = (png_byte)(w & 0xff);
3911 sp = row;
3912 for (i = 0; i < row_width; i++, sp += 4)
3914 png_uint_16 a = (png_uint_16)(((*(sp + 2)) << 8)
3915 + *(sp + 3));
3919 *sp = (png_byte)((png_ptr->background.gray >> 8) & 0xff);
3920 *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff);
3927 g = (png_uint_16)(((*sp) << 8) + *(sp + 1));
3929 *sp = (png_byte)((v >> 8) & 0xff);
3930 *(sp + 1) = (png_byte)(v & 0xff);
3946 sp = row;
3947 for (i = 0; i < row_width; i++, sp += 4)
3949 png_byte a = *(sp + 3);
3953 *sp = gamma_table[*sp];
3954 *(sp + 1) = gamma_table[*(sp + 1)];
3955 *(sp + 2) = gamma_table[*(sp + 2)];
3961 *sp = (png_byte)png_ptr->background.red;
3962 *(sp + 1) = (png_byte)png_ptr->background.green;
3963 *(sp + 2) = (png_byte)png_ptr->background.blue;
3970 v = gamma_to_1[*sp];
3973 *sp = w;
3975 v = gamma_to_1[*(sp + 1)];
3978 *(sp + 1) = w;
3980 v = gamma_to_1[*(sp + 2)];
3983 *(sp + 2) = w;
3990 sp = row;
3991 for (i = 0; i < row_width; i++, sp += 4)
3993 png_byte a = *(sp + 3);
3997 *sp = (png_byte)png_ptr->background.red;
3998 *(sp + 1) = (png_byte)png_ptr->background.green;
3999 *(sp + 2) = (png_byte)png_ptr->background.blue;
4004 png_composite(*sp, *sp, a, png_ptr->background.red);
4006 png_composite(*(sp + 1), *(sp + 1), a,
4009 png_composite(*(sp + 2), *(sp + 2), a,
4021 sp = row;
4022 for (i = 0; i < row_width; i++, sp += 8)
4024 png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6))
4025 << 8) + (png_uint_16)(*(sp + 7)));
4031 v = gamma_16[*(sp + 1) >> gamma_shift][*sp];
4032 *sp = (png_byte)((v >> 8) & 0xff);
4033 *(sp + 1) = (png_byte)(v & 0xff);
4035 v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)];
4036 *(sp + 2) = (png_byte)((v >> 8) & 0xff);
4037 *(sp + 3) = (png_byte)(v & 0xff);
4039 v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)];
4040 *(sp + 4) = (png_byte)((v >> 8) & 0xff);
4041 *(sp + 5) = (png_byte)(v & 0xff);
4047 *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff);
4048 *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff);
4049 *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) & 0xff);
4050 *(sp + 3) = (png_byte)(png_ptr->background.green & 0xff);
4051 *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) & 0xff);
4052 *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff);
4059 v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp];
4063 *sp = (png_byte)((w >> 8) & 0xff);
4064 *(sp + 1) = (png_byte)(w & 0xff);
4066 v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)];
4071 *(sp + 2) = (png_byte)((w >> 8) & 0xff);
4072 *(sp + 3) = (png_byte)(w & 0xff);
4074 v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)];
4079 *(sp + 4) = (png_byte)((w >> 8) & 0xff);
4080 *(sp + 5) = (png_byte)(w & 0xff);
4088 sp = row;
4089 for (i = 0; i < row_width; i++, sp += 8)
4091 png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6))
4092 << 8) + (png_uint_16)(*(sp + 7)));
4096 *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff);
4097 *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff);
4098 *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) & 0xff);
4099 *(sp + 3) = (png_byte)(png_ptr->background.green & 0xff);
4100 *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) & 0xff);
4101 *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff);
4108 png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1));
4109 png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8)
4110 + *(sp + 3));
4111 png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8)
4112 + *(sp + 5));
4115 *sp = (png_byte)((v >> 8) & 0xff);
4116 *(sp + 1) = (png_byte)(v & 0xff);
4119 *(sp + 2) = (png_byte)((v >> 8) & 0xff);
4120 *(sp + 3) = (png_byte)(v & 0xff);
4123 *(sp + 4) = (png_byte)((v >> 8) & 0xff);
4124 *(sp + 5) = (png_byte)(v & 0xff);
4153 png_bytep sp;
4168 sp = row;
4171 *sp = gamma_table[*sp];
4172 sp++;
4173 *sp = gamma_table[*sp];
4174 sp++;
4175 *sp = gamma_table[*sp];
4176 sp++;
4182 sp = row;
4187 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
4188 *sp = (png_byte)((v >> 8) & 0xff);
4189 *(sp + 1) = (png_byte)(v & 0xff);
4190 sp += 2;
4192 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
4193 *sp = (png_byte)((v >> 8) & 0xff);
4194 *(sp + 1) = (png_byte)(v & 0xff);
4195 sp += 2;
4197 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
4198 *sp = (png_byte)((v >> 8) & 0xff);
4199 *(sp + 1) = (png_byte)(v & 0xff);
4200 sp += 2;
4210 sp = row;
4213 *sp = gamma_table[*sp];
4214 sp++;
4216 *sp = gamma_table[*sp];
4217 sp++;
4219 *sp = gamma_table[*sp];
4220 sp++;
4222 sp++;
4228 sp = row;
4231 png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
4232 *sp = (png_byte)((v >> 8) & 0xff);
4233 *(sp + 1) = (png_byte)(v & 0xff);
4234 sp += 2;
4236 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
4237 *sp = (png_byte)((v >> 8) & 0xff);
4238 *(sp + 1) = (png_byte)(v & 0xff);
4239 sp += 2;
4241 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
4242 *sp = (png_byte)((v >> 8) & 0xff);
4243 *(sp + 1) = (png_byte)(v & 0xff);
4244 sp += 4;
4254 sp = row;
4257 *sp = gamma_table[*sp];
4258 sp += 2;
4264 sp = row;
4267 png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
4268 *sp = (png_byte)((v >> 8) & 0xff);
4269 *(sp + 1) = (png_byte)(v & 0xff);
4270 sp += 4;
4280 sp = row;
4283 int a = *sp & 0xc0;
4284 int b = *sp & 0x30;
4285 int c = *sp & 0x0c;
4286 int d = *sp & 0x03;
4288 *sp = (png_byte)(
4293 sp++;
4299 sp = row;
4302 int msb = *sp & 0xf0;
4303 int lsb = *sp & 0x0f;
4305 *sp = (png_byte)((((int)gamma_table[msb | (msb >> 4)]) & 0xf0)
4307 sp++;
4313 sp = row;
4316 *sp = gamma_table[*sp];
4317 sp++;
4323 sp = row;
4326 png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
4327 *sp = (png_byte)((v >> 8) & 0xff);
4328 *(sp + 1) = (png_byte)(v & 0xff);
4329 sp += 2;
4418 png_bytep sp, dp;
4432 sp = row + (png_size_t)((row_width - 1) >> 3);
4437 if ((*sp >> shift) & 0x01)
4446 sp--;
4459 sp = row + (png_size_t)((row_width - 1) >> 2);
4464 value = (*sp >> shift) & 0x03;
4469 sp--;
4482 sp = row + (png_size_t)((row_width - 1) >> 1);
4487 value = (*sp >> shift) & 0x0f;
4492 sp--;
4516 sp = row + (png_size_t)row_width - 1;
4521 if ((int)(*sp) >= num_trans)
4525 *dp-- = trans_alpha[*sp];
4527 *dp-- = palette[*sp].blue;
4528 *dp-- = palette[*sp].green;
4529 *dp-- = palette[*sp].red;
4530 sp--;
4541 sp = row + (png_size_t)row_width - 1;
4546 *dp-- = palette[*sp].blue;
4547 *dp-- = palette[*sp].green;
4548 *dp-- = palette[*sp].red;
4549 sp--;
4571 png_bytep sp, dp;
4589 sp = row + (png_size_t)((row_width - 1) >> 3);
4594 if ((*sp >> shift) & 0x01)
4603 sp--;
4617 sp = row + (png_size_t)((row_width - 1) >> 2);
4622 value = (*sp >> shift) & 0x03;
4628 sp--;
4642 sp = row + (png_size_t)((row_width - 1) >> 1);
4647 value = (*sp >> shift) & 0x0f;
4652 sp--;
4677 sp = row + (png_size_t)row_width - 1;
4682 if (*sp == gray)
4688 *dp-- = *sp--;
4696 sp = row + row_info->rowbytes - 1;
4700 if (*(sp - 1) == gray_high && *(sp) == gray_low)
4712 *dp-- = *sp--;
4713 *dp-- = *sp--;
4731 sp = row + (png_size_t)row_info->rowbytes - 1;
4735 if (*(sp - 2) == red && *(sp - 1) == green && *(sp) == blue)
4741 *dp-- = *sp--;
4742 *dp-- = *sp--;
4743 *dp-- = *sp--;
4754 sp = row + row_info->rowbytes - 1;
4758 if (*(sp - 5) == red_high &&
4759 *(sp - 4) == red_low &&
4760 *(sp - 3) == green_high &&
4761 *(sp - 2) == green_low &&
4762 *(sp - 1) == blue_high &&
4763 *(sp ) == blue_low)
4775 *dp-- = *sp--;
4776 *dp-- = *sp--;
4777 *dp-- = *sp--;
4778 *dp-- = *sp--;
4779 *dp-- = *sp--;
4780 *dp-- = *sp--;
4811 png_byte *sp = row + row_info->rowbytes; /* source, last byte + 1 */
4812 png_byte *dp = sp + row_info->rowbytes; /* destination, end + 1 */
4813 while (dp > sp)
4814 dp[-2] = dp[-1] = *--sp, dp -= 2;
4828 png_bytep sp, dp;
4839 sp = row;
4843 r = *sp++;
4844 g = *sp++;
4845 b = *sp++;
4876 sp = row;
4880 r = *sp++;
4881 g = *sp++;
4882 b = *sp++;
4883 sp++;
4906 sp = row;
4908 for (i = 0; i < row_width; i++, sp++)
4910 *sp = quantize_lookup[*sp];