1 /* Copyright (C) 2001-2019 Artifex Software, Inc. 2 All Rights Reserved. 3 4 This software is provided AS-IS with no warranty, either express or 5 implied. 6 7 This software is distributed under license and may not be copied, 8 modified or distributed except as expressly authorized under the terms 9 of the license contained in the file LICENSE in this distribution. 10 11 Refer to licensing information at http://www.artifex.com or contact 12 Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato, 13 CA 94945, U.S.A., +1(415)492-9861, for further information. 14 */ 15 16 17 /* $Id: gsht_thresh.h $ */ 18 /* Threshhold based halftoning prototypes */ 19 20 #ifndef gsht_thresh_INCLUDED 21 # define gsht_thresh_INCLUDED 22 23 #include "gxdda.h" 24 #include "gsiparam.h" 25 #include "gxiclass.h" 26 27 #define RAW_HT_DUMP 0 28 #define USE_FAST_HT_CODE 1 29 /* #define PACIFY_VALGRIND */ 30 31 #if RAW_HT_DUMP 32 void gx_ht_threshold_row_byte(byte *contone, byte *threshold_strip, 33 int contone_stride, byte *halftone, 34 int dithered_stride, int width, int num_rows); 35 #endif 36 void gx_ht_threshold_row_bit(byte *contone, byte *threshold_strip, 37 int contone_stride, byte *halftone, 38 int dithered_stride, int width, int num_rows, 39 int offset_bits); 40 void gx_ht_threshold_row_bit_sub(byte *contone, byte *threshold_strip, 41 int contone_stride, byte *halftone, 42 int dithered_stride, int width, int num_rows, 43 int offset_bits); 44 void gx_ht_threshold_landscape(byte *contone_align, byte *thresh_align, 45 ht_landscape_info_t *ht_landscape, byte *halftone, 46 int data_length); 47 void gx_ht_threshold_landscape_sub(byte *contone_align, byte *thresh_align, 48 ht_landscape_info_t *ht_landscape, byte *halftone, 49 int data_length); 50 int gxht_thresh_image_init(gx_image_enum *penum); 51 int gxht_thresh_planes(gx_image_enum *penum, fixed xrun, int dest_width, 52 int dest_height, byte *thresh_align, gx_device * dev, 53 int offset_contone[], int contone_stride); 54 55 /* Helper function for an operation performed several times */ 56 int gxht_dda_length(gx_dda_fixed *dda, int src_size); 57 58 #endif /* gshtx_INCLUDED */ 59