1
/* Copyright (C) 2001-2006 Artifex Software, Inc.
4
This software is provided AS-IS with no warranty, either express or
7
This software is distributed under license and may not be copied, modified
8
or distributed except as expressly authorized under the terms of that
9
license. Refer to licensing information at http://www.artifex.com/
10
or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
11
San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
14
/* $Id: gsfunc0.h 8022 2007-06-05 22:23:38Z giles $ */
15
/* Definitions for FunctionType 0 (Sampled) Functions */
17
#ifndef gsfunc0_INCLUDED
18
# define gsfunc0_INCLUDED
23
/* ---------------- Types and structures ---------------- */
25
/* Define the Function type. */
26
#define function_type_Sampled 0
28
/* Define Sampled functions. */
29
typedef struct gs_function_Sd_params_s {
30
gs_function_params_common;
31
int Order; /* 1 or 3, optional */
32
gs_data_source_t DataSource;
33
int BitsPerSample; /* 1, 2, 4, 8, 12, 16, 24, 32 */
34
const float *Encode; /* 2 x m, optional */
35
const float *Decode; /* 2 x n, optional */
36
const int *Size; /* m */
37
double *pole; /* cached poles (internal data) */
38
int *array_step; /* pole array element step by dimensions */
39
int *stream_step; /* sample stream element step by dimensions */
40
int array_size; /* The number of elements in the pole array. */
41
} gs_function_Sd_params_t;
43
#define private_st_function_Sd() /* in gsfunc.c */\
44
gs_private_st_composite(st_function_Sd, gs_function_Sd_t,\
45
"gs_function_Sd_t", function_Sd_enum_ptrs, function_Sd_reloc_ptrs)
47
/* ---------------- Procedures ---------------- */
49
/* Allocate and initialize a Sampled function. */
50
int gs_function_Sd_init(gs_function_t ** ppfn,
51
const gs_function_Sd_params_t * params,
54
/* Free the parameters of a Sampled function. */
55
void gs_function_Sd_free_params(gs_function_Sd_params_t * params,
58
#endif /* gsfunc0_INCLUDED */