#include <limits.h>
Go to the source code of this file.
Data Structures | |
struct | dither |
struct | dither_channel |
struct | dither_segment |
struct | ink_defn |
struct | stpi_dither_algorithm_t |
Defines | |
#define | D_FLOYD_HYBRID 0 |
#define | D_ADAPTIVE_BASE 4 |
#define | D_ADAPTIVE_HYBRID (D_ADAPTIVE_BASE | D_FLOYD_HYBRID) |
#define | D_ORDERED_BASE 8 |
#define | D_ORDERED (D_ORDERED_BASE) |
#define | D_FAST_BASE 16 |
#define | D_FAST (D_FAST_BASE) |
#define | D_VERY_FAST (D_FAST_BASE + 1) |
#define | D_EVENTONE 32 |
#define | D_UNITONE 64 |
#define | D_HYBRID_EVENTONE (D_ORDERED_BASE | D_EVENTONE) |
#define | D_HYBRID_UNITONE (D_ORDERED_BASE | D_UNITONE) |
#define | DITHER_FAST_STEPS (6) |
#define | ERROR_ROWS 2 |
#define | MAX_SPREAD 32 |
#define | CHANNEL(d, c) ((d)->channel[(c)]) |
#define | CHANNEL_COUNT(d) ((d)->total_channel_count) |
#define | USMIN(a, b) ((a) < (b) ? (a) : (b)) |
#define | ADVANCE_UNIDIRECTIONAL(d, bit, input, width, xerror, xstep, xmod) |
#define | ADVANCE_REVERSE(d, bit, input, width, xerror, xstep, xmod) |
#define | ADVANCE_BIDIRECTIONAL(d, bit, in, dir, width, xer, xstep, xmod, err, S) |
Typedefs | |
typedef void | stpi_ditherfunc_t (stp_vars_t *, int, const unsigned short *, int, int, const unsigned char *) |
typedef ink_defn | stpi_ink_defn_t |
typedef dither_segment | stpi_dither_segment_t |
typedef dither_channel | stpi_dither_channel_t |
typedef dither | stpi_dither_t |
Functions | |
void | stpi_dither_reverse_row_ends (stpi_dither_t *d) |
int | stpi_dither_translate_channel (stp_vars_t *v, unsigned channel, unsigned subchannel) |
void | stpi_dither_channel_destroy (stpi_dither_channel_t *channel) |
void | stpi_dither_finalize (stp_vars_t *v) |
int * | stpi_dither_get_errline (stpi_dither_t *d, int row, int color) |
Variables | |
stpi_ditherfunc_t | stpi_dither_very_fast |
stpi_ditherfunc_t | stpi_dither_ordered |
stpi_ditherfunc_t | stpi_dither_ed |
stpi_ditherfunc_t | stpi_dither_et |
stpi_ditherfunc_t | stpi_dither_ut |
|
Value: do \ { \ int ii; \ int jj; \ for (ii = 0; ii < width; ii++) \ for (jj = 0; jj < S; jj++) \ err[ii][jj] += dir; \ if (dir == 1) \ ADVANCE_UNIDIRECTIONAL(d, bit, in, width, xer, xstep, xmod); \ else \ ADVANCE_REVERSE(d, bit, in, width, xer, xstep, xmod); \ } while (0) Definition at line 237 of file dither-impl.h. Referenced by stpi_dither_ed(). |
|
Value: do \ { \ if (bit == 128) \ { \ d->ptr_offset--; \ bit = 1; \ } \ else \ bit <<= 1; \ input -= xstep; \ if (xmod) \ { \ xerror -= xmod; \ if (xerror < 0) \ { \ xerror += d->dst_width; \ input -= (width); \ } \ } \ } while (0) Definition at line 215 of file dither-impl.h. Referenced by stpi_dither_et(), and stpi_dither_ut(). |
|
Value: do \ { \ bit >>= 1; \ if (bit == 0) \ { \ d->ptr_offset++; \ bit = 128; \ } \ input += xstep; \ if (xmod) \ { \ xerror += xmod; \ if (xerror >= d->dst_width) \ { \ xerror -= d->dst_width; \ input += (width); \ } \ } \ } while (0) Definition at line 194 of file dither-impl.h. Referenced by stpi_dither_et(), stpi_dither_ordered(), stpi_dither_ut(), and stpi_dither_very_fast(). |
|
Definition at line 174 of file dither-impl.h. Referenced by et_initializer(), et_setup(), free_eventone_data(), initialize_channel(), postinit_matrix(), preinit_matrix(), shared_ed_initializer(), stp_dither_get_first_position(), stp_dither_get_last_position(), stp_dither_internal(), stp_dither_set_inks_full(), stp_dither_set_randomizer(), stp_dither_set_transition(), stpi_dither_ed(), stpi_dither_et(), stpi_dither_finalize(), stpi_dither_free(), stpi_dither_get_errline(), stpi_dither_ordered(), stpi_dither_reverse_row_ends(), stpi_dither_set_ranges(), stpi_dither_ut(), stpi_dither_very_fast(), and update_dither(). |
|
Definition at line 175 of file dither-impl.h. Referenced by et_initializer(), et_setup(), free_eventone_data(), postinit_matrix(), preinit_matrix(), shared_ed_deinitializer(), shared_ed_initializer(), stp_dither_internal(), stp_dither_set_randomizer(), stp_dither_set_transition(), stpi_dither_ed(), stpi_dither_et(), stpi_dither_finalize(), stpi_dither_free(), stpi_dither_get_errline(), stpi_dither_ordered(), stpi_dither_reverse_row_ends(), stpi_dither_ut(), and stpi_dither_very_fast(). |
|
Definition at line 47 of file dither-impl.h. Referenced by print_color(), and stpi_dither_ed(). |
|
Definition at line 48 of file dither-impl.h. Referenced by stpi_set_dither_function(). |
|
Definition at line 54 of file dither-impl.h. Referenced by stp_dither_init(), and stpi_set_dither_function(). |
|
Definition at line 52 of file dither-impl.h. Referenced by stp_dither_init(), and stpi_set_dither_function(). |
|
Definition at line 51 of file dither-impl.h. |
|
Definition at line 46 of file dither-impl.h. |
|
Definition at line 56 of file dither-impl.h. Referenced by stpi_set_dither_function(). |
|
Definition at line 57 of file dither-impl.h. Referenced by stpi_set_dither_function(). |
|
Definition at line 50 of file dither-impl.h. Referenced by print_color(), and stpi_set_dither_function(). |
|
Definition at line 49 of file dither-impl.h. Referenced by print_color(), stpi_dither_et(), and stpi_dither_ut(). |
|
Definition at line 55 of file dither-impl.h. Referenced by et_setup(), and stpi_set_dither_function(). |
|
Definition at line 53 of file dither-impl.h. Referenced by stp_dither_init(), and stpi_set_dither_function(). |
|
Definition at line 59 of file dither-impl.h. Referenced by stp_dither_init(). |
|
Definition at line 68 of file dither-impl.h. Referenced by stp_dither_init(). |
|
Definition at line 70 of file dither-impl.h. Referenced by diffuse_error(), et_setup(), stpi_dither_et(), stpi_dither_get_errline(), and stpi_dither_ut(). |
|
Definition at line 177 of file dither-impl.h. |
|
|
|
|
|
|
|
Definition at line 72 of file dither-impl.h. |
|
|
|
Definition at line 91 of file dither-inks.c. References dither_channel::dithermat, dither_channel::error_rows, dither_channel::errs, dither_channel::ink_list, dither_channel::pick, dither_channel::ranges, stp_dither_matrix_destroy(), and STP_SAFE_FREE. Referenced by free_eventone_data(), and stpi_dither_free(). |
|
Definition at line 166 of file dither-inks.c. References CHANNEL, CHANNEL_COUNT, dither::dither_matrix, dither_channel::dithermat, dither::finalized, dither_channel::pick, stp_dither_matrix_clone(), stp_get_component_data(), dither_matrix_impl::x_size, and dither_matrix_impl::y_size. Referenced by stp_dither_internal(). |
|
Definition at line 442 of file dither-main.c. References CHANNEL, CHANNEL_COUNT, dither::dst_width, dither::error_rows, dither_channel::error_rows, dither_channel::errs, MAX_SPREAD, and stp_zalloc(). Referenced by shared_ed_initializer(). |
|
Definition at line 409 of file dither-main.c. References CHANNEL, and CHANNEL_COUNT. Referenced by stpi_dither_ed(), stpi_dither_et(), and stpi_dither_ut(). |
|
Definition at line 43 of file dither-inks.c. References dither::channel_count, dither::channel_index, stp_get_component_data(), and dither::subchannel_count. Referenced by initialize_channel(), stp_dither_add_channel(), stp_dither_get_channel(), stp_dither_get_first_position(), stp_dither_get_last_position(), and stp_dither_set_inks_full(). |
|
Definition at line 182 of file dither-impl.h. |
|
Definition at line 183 of file dither-impl.h. |
|
Definition at line 181 of file dither-impl.h. |
|
Definition at line 184 of file dither-impl.h. |
|
Definition at line 180 of file dither-impl.h. |