25#ifndef SO_LDM_JPEG_COMPRESSOR_H
26#define SO_LDM_JPEG_COMPRESSOR_H
30struct jpeg_destination_mgr;
31struct jpeg_source_mgr;
32struct jpeg_compress_struct;
33struct jpeg_decompress_struct;
35struct jpeg_ldm_comp_destination_mgr;
36struct jpeg_ldm_decomp_destination_mgr;
67 SO_TYPED_CLASS_HEADER();
114 struct jpeg_compress_struct *m_cinfo;
115 struct jpeg_decompress_struct *m_dcinfo;
117 size_t allocateNeededSpace(
size_t srcLen);
130 void createCompressInfo(jpeg_compress_struct *cinfo, jpeg_error_mgr *jerr,
131 jpeg_ldm_comp_destination_mgr *destMgr);
132 static void createDecompressInfo(jpeg_decompress_struct *cinfo,
133 jpeg_error_mgr *jerr,
134 jpeg_ldm_decomp_destination_mgr *srcMgr);
136 size_t compressBatch(
void* src,
size_t srcLen,
const TileInfo& tileInfo );
137 static size_t uncompressBatch(
void* dest,
const TileInfo& tileInfo,
const unsigned char* srcBuffer,
size_t srcLen );
139 void allocBatchSizeBytes();
140 static void writeBatchSize(
unsigned char* buffer, uint64_t batchSize );
141 static uint64_t readBatchSize(
const unsigned char* buffer );
struct jpeg_decompress_struct * j_decompress_ptr
struct jpeg_compress_struct * j_compress_ptr
Class for smart character strings.
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Data com...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Jpeg dat...
virtual SbString getCompressionFormatName() const
Returns the name of the compression algorithm used by this class.
virtual bool isLossless()
This compression is lossy.
SoJpegDataCompressor()
Constructor.
virtual size_t compress(void *src, size_t srcLen, const TileInfo &tileInfo)
Compresses the given buffer into the internal buffer.
virtual size_t uncompress(void *dest, size_t destLen, const TileInfo &tileInfo)
Uncompresses data from the internal buffer to the given buffer.
virtual ~SoJpegDataCompressor()
Destructor.
This structure contains the dimension and the type of the tile being processed.