~ubuntu-branches/ubuntu/precise/gwenview/precise-proposed

« back to all changes in this revision

Viewing changes to lib/libjpeg-62/transupp.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-15 14:17:54 UTC
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: package-import@ubuntu.com-20111215141754-z043hyx69dulbggf
Tags: upstream-4.7.90
ImportĀ upstreamĀ versionĀ 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
/* If you happen not to want the image transform support, disable it here */
24
24
#ifndef TRANSFORMS_SUPPORTED
25
 
#define TRANSFORMS_SUPPORTED 1          /* 0 disables transform code */
 
25
#define TRANSFORMS_SUPPORTED 1      /* 0 disables transform code */
26
26
#endif
27
27
 
28
28
/* Short forms of external names for systems with brain-damaged linkers. */
29
29
 
30
30
#ifdef NEED_SHORT_EXTERNAL_NAMES
31
 
#define jtransform_request_workspace            jTrRequest
32
 
#define jtransform_adjust_parameters            jTrAdjust
33
 
#define jtransform_execute_transformation       jTrExec
34
 
#define jcopy_markers_setup                     jCMrkSetup
35
 
#define jcopy_markers_execute                   jCMrkExec
 
31
#define jtransform_request_workspace        jTrRequest
 
32
#define jtransform_adjust_parameters        jTrAdjust
 
33
#define jtransform_execute_transformation   jTrExec
 
34
#define jcopy_markers_setup         jCMrkSetup
 
35
#define jcopy_markers_execute           jCMrkExec
36
36
#endif /* NEED_SHORT_EXTERNAL_NAMES */
37
37
 
38
 
 
39
38
/*
40
39
 * Codes for supported types of image transformations.
41
40
 */
42
41
 
43
42
typedef enum {
44
 
        JXFORM_NONE,            /* no transformation */
45
 
        JXFORM_FLIP_H,          /* horizontal flip */
46
 
        JXFORM_FLIP_V,          /* vertical flip */
47
 
        JXFORM_TRANSPOSE,       /* transpose across UL-to-LR axis */
48
 
        JXFORM_TRANSVERSE,      /* transpose across UR-to-LL axis */
49
 
        JXFORM_ROT_90,          /* 90-degree clockwise rotation */
50
 
        JXFORM_ROT_180,         /* 180-degree rotation */
51
 
        JXFORM_ROT_270          /* 270-degree clockwise (or 90 ccw) */
 
43
    JXFORM_NONE,        /* no transformation */
 
44
    JXFORM_FLIP_H,      /* horizontal flip */
 
45
    JXFORM_FLIP_V,      /* vertical flip */
 
46
    JXFORM_TRANSPOSE,   /* transpose across UL-to-LR axis */
 
47
    JXFORM_TRANSVERSE,  /* transpose across UR-to-LL axis */
 
48
    JXFORM_ROT_90,      /* 90-degree clockwise rotation */
 
49
    JXFORM_ROT_180,     /* 180-degree rotation */
 
50
    JXFORM_ROT_270      /* 270-degree clockwise (or 90 ccw) */
52
51
} JXFORM_CODE;
53
52
 
54
53
/*
87
86
 */
88
87
 
89
88
typedef struct {
90
 
  /* Options: set by caller */
91
 
  JXFORM_CODE transform;        /* image transform operator */
92
 
  boolean trim;                 /* if TRUE, trim partial MCUs as needed */
93
 
  boolean force_grayscale;      /* if TRUE, convert color image to grayscale */
 
89
    /* Options: set by caller */
 
90
    JXFORM_CODE transform;    /* image transform operator */
 
91
    boolean trim;         /* if TRUE, trim partial MCUs as needed */
 
92
    boolean force_grayscale;  /* if TRUE, convert color image to grayscale */
94
93
 
95
 
  /* Internal workspace: caller should not touch these */
96
 
  int num_components;           /* # of components in workspace */
97
 
  jvirt_barray_ptr * workspace_coef_arrays; /* workspace for transformations */
 
94
    /* Internal workspace: caller should not touch these */
 
95
    int num_components;       /* # of components in workspace */
 
96
    jvirt_barray_ptr * workspace_coef_arrays; /* workspace for transformations */
98
97
} jpeg_transform_info;
99
98
 
100
 
 
101
99
#if TRANSFORMS_SUPPORTED
102
100
 
103
101
/* Request any required workspace */
104
102
EXTERN(void) jtransform_request_workspace
105
 
        JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info));
 
103
JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info));
106
104
/* Adjust output image parameters */
107
105
EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters
108
 
        JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
109
 
             jvirt_barray_ptr *src_coef_arrays,
110
 
             jpeg_transform_info *info));
 
106
JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
 
107
     jvirt_barray_ptr *src_coef_arrays,
 
108
     jpeg_transform_info *info));
111
109
/* Execute the actual transformation, if any */
112
110
EXTERN(void) jtransform_execute_transformation
113
 
        JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
114
 
             jvirt_barray_ptr *src_coef_arrays,
115
 
             jpeg_transform_info *info));
 
111
JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
 
112
     jvirt_barray_ptr *src_coef_arrays,
 
113
     jpeg_transform_info *info));
116
114
 
117
115
#endif /* TRANSFORMS_SUPPORTED */
118
116
 
119
 
 
120
117
/*
121
118
 * Support for copying optional markers from source to destination file.
122
119
 */
123
120
 
124
121
typedef enum {
125
 
        JCOPYOPT_NONE,          /* copy no optional markers */
126
 
        JCOPYOPT_COMMENTS,      /* copy only comment (COM) markers */
127
 
        JCOPYOPT_ALL            /* copy all optional markers */
 
122
    JCOPYOPT_NONE,      /* copy no optional markers */
 
123
    JCOPYOPT_COMMENTS,  /* copy only comment (COM) markers */
 
124
    JCOPYOPT_ALL        /* copy all optional markers */
128
125
} JCOPY_OPTION;
129
126
 
130
 
#define JCOPYOPT_DEFAULT  JCOPYOPT_COMMENTS     /* recommended default */
 
127
#define JCOPYOPT_DEFAULT  JCOPYOPT_COMMENTS /* recommended default */
131
128
 
132
129
/* Setup decompression object to save desired markers in memory */
133
130
EXTERN(void) jcopy_markers_setup
134
 
        JPP((j_decompress_ptr srcinfo, JCOPY_OPTION option));
 
131
JPP((j_decompress_ptr srcinfo, JCOPY_OPTION option));
135
132
/* Copy markers saved in the given source object to the destination object */
136
133
EXTERN(void) jcopy_markers_execute
137
 
        JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
138
 
             JCOPY_OPTION option));
 
134
JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
 
135
     JCOPY_OPTION option));
139
136
 
140
137
#endif
141
138