diff options
-rw-r--r-- | base/gxicolor.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/base/gxicolor.c b/base/gxicolor.c index 6425f5257..05e28a345 100644 --- a/base/gxicolor.c +++ b/base/gxicolor.c | |||
@@ -786,16 +786,16 @@ image_render_color_thresh(gx_image_enum *penum_orig, const byte *buffer, int dat | |||
786 | *(devc_contone_gray+1) = *psrc_temp; | 786 | *(devc_contone_gray+1) = *psrc_temp; |
787 | } | 787 | } |
788 | } else { | 788 | } else { |
789 | /* Mono case, forward */ | 789 | /* Mono case, forward */ |
790 | psrc_temp = psrc_cm; | 790 | psrc_temp = psrc_cm; |
791 | for (k=0; k<src_size; k++) { | 791 | for (k=0; k<src_size; k++) { |
792 | dda_next(dda_ht); | 792 | dda_next(dda_ht); |
793 | xn = fixed2int_var_rounded(dda_current(dda_ht)); | 793 | xn = fixed2int_var_rounded(dda_current(dda_ht)); |
794 | while (xr < xn) { | 794 | while (xr < xn) { |
795 | *devc_contone_gray++ = *psrc_temp; | 795 | *devc_contone_gray++ = *psrc_temp; |
796 | xr++; | 796 | xr++; |
797 | } /* at loop exit xn will be >= xr */ | 797 | } /* at loop exit xn will be >= xr */ |
798 | psrc_temp++; | 798 | psrc_temp++; |
799 | } | 799 | } |
800 | } | 800 | } |
801 | } else { | 801 | } else { |
@@ -810,7 +810,7 @@ image_render_color_thresh(gx_image_enum *penum_orig, const byte *buffer, int dat | |||
810 | xr--; | 810 | xr--; |
811 | } /* at loop exit xn will be >= xr */ | 811 | } /* at loop exit xn will be >= xr */ |
812 | psrc_temp++; | 812 | psrc_temp++; |
813 | } | 813 | } |
814 | } | 814 | } |
815 | break; | 815 | break; |
816 | /* Monochrome landscape */ | 816 | /* Monochrome landscape */ |
@@ -953,10 +953,9 @@ image_render_color_thresh(gx_image_enum *penum_orig, const byte *buffer, int dat | |||
953 | dda_next(dda_ht); | 953 | dda_next(dda_ht); |
954 | xn = fixed2int_var_rounded(dda_current(dda_ht)); | 954 | xn = fixed2int_var_rounded(dda_current(dda_ht)); |
955 | while (xr > xn) { | 955 | while (xr > xn) { |
956 | for (j = 0; j < spp_out; j++) { | 956 | for (j = 0; j < spp_out; j++) |
957 | *(devc_contone[j] + position) = (psrc_plane[j])[i]; | 957 | *(devc_contone[j] + position) = (psrc_plane[j])[i]; |
958 | position -= LAND_BITS; | 958 | position -= LAND_BITS; |
959 | } | ||
960 | xr--; | 959 | xr--; |
961 | } /* at loop exit xn will be <= xr */ | 960 | } /* at loop exit xn will be <= xr */ |
962 | i++; | 961 | i++; |
@@ -967,9 +966,8 @@ image_render_color_thresh(gx_image_enum *penum_orig, const byte *buffer, int dat | |||
967 | and 2x scaling which we will run into in 300 and | 966 | and 2x scaling which we will run into in 300 and |
968 | 600dpi devices and content */ | 967 | 600dpi devices and content */ |
969 | /* Apply initial offset */ | 968 | /* Apply initial offset */ |
970 | for (k = 0; k < spp_out; k++) { | 969 | for (k = 0; k < spp_out; k++) |
971 | devc_contone[k] = devc_contone[k] + position; | 970 | devc_contone[k] = devc_contone[k] + position; |
972 | } | ||
973 | if (src_size == dest_height) { | 971 | if (src_size == dest_height) { |
974 | for (k = 0; k < data_length; k++) { | 972 | for (k = 0; k < data_length; k++) { |
975 | /* Is it better to unwind this? We know it is 4 */ | 973 | /* Is it better to unwind this? We know it is 4 */ |
@@ -995,10 +993,9 @@ image_render_color_thresh(gx_image_enum *penum_orig, const byte *buffer, int dat | |||
995 | dda_next(dda_ht); | 993 | dda_next(dda_ht); |
996 | xn = fixed2int_var_rounded(dda_current(dda_ht)); | 994 | xn = fixed2int_var_rounded(dda_current(dda_ht)); |
997 | while (xr > xn) { | 995 | while (xr > xn) { |
998 | for (j = 0; j < spp_out; j++) { | 996 | for (j = 0; j < spp_out; j++) |
999 | *(devc_contone[j] + position) = (psrc_plane[j])[i]; | 997 | *(devc_contone[j] + position) = (psrc_plane[j])[i]; |
1000 | position -= LAND_BITS; | 998 | position -= LAND_BITS; |
1001 | } | ||
1002 | xr--; | 999 | xr--; |
1003 | } /* at loop exit xn will be <= xr */ | 1000 | } /* at loop exit xn will be <= xr */ |
1004 | i++; | 1001 | i++; |