00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
#ifndef DJEIJG12_H
00035
#define DJEIJG12_H
00036
00037
#include "osconfig.h"
00038
#include "oflist.h"
00039
#include "djencabs.h"
00040
00041
extern "C"
00042 {
00043
struct jpeg_compress_struct;
00044
typedef struct jpeg_compress_struct * j_compress_ptr;
00045
struct jpeg_decompress_struct;
00046
typedef struct jpeg_decompress_struct * j_decompress_ptr;
00047 }
00048
00049
class DJCodecParameter;
00050
00051
00055 class DJCompressIJG12Bit:
public DJEncoder
00056 {
00057
public:
00058
00064
DJCompressIJG12Bit(
const DJCodecParameter& cp, EJ_Mode mode, Uint8
quality);
00065
00071
DJCompressIJG12Bit(
const DJCodecParameter& cp, EJ_Mode mode,
int prediction,
int ptrans);
00072
00074
virtual ~DJCompressIJG12Bit();
00075
00088
virtual OFCondition encode(
00089 Uint16 columns,
00090 Uint16 rows,
00091 EP_Interpretation interpr,
00092 Uint16 samplesPerPixel,
00093 Uint16 *image_buffer,
00094 Uint8 *&to,
00095 Uint32 &length);
00096
00109
virtual OFCondition encode(
00110 Uint16 columns,
00111 Uint16 rows,
00112 EP_Interpretation interpr,
00113 Uint16 samplesPerPixel,
00114 Uint8 *image_buffer,
00115 Uint8 *&to,
00116 Uint32 &length);
00117
00120 virtual Uint16
bytesPerSample()
const {
return 2; }
00121
00124 virtual Uint16
bitsPerSample()
const {
return 12; }
00125
00130
void initDestination(jpeg_compress_struct *cinfo);
00131
00136
int emptyOutputBuffer(jpeg_compress_struct *cinfo);
00137
00142
void termDestination(jpeg_compress_struct *cinfo);
00143
00148
virtual void outputMessage(
void *arg)
const;
00149
00150
private:
00151
00153
DJCompressIJG12Bit(
const DJCompressIJG12Bit&);
00154
00156
DJCompressIJG12Bit&
operator=(
const DJCompressIJG12Bit&);
00157
00159
void cleanup();
00160
00162 const DJCodecParameter *
cparam;
00163
00165 Uint8 quality;
00166
00168 int psv;
00169
00171 int pt;
00172
00174 EJ_Mode
modeofOperation;
00175
00177 OFList<unsigned char *> pixelDataList;
00178
00180 size_t
bytesInLastBlock;
00181
00182 };
00183
00184
#endif
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198