60 #ifdef __PGFROISUPPORT__ 75 #ifdef __PGFROISUPPORT__ 76 m_size = BufferWidth()*m_ROI.Height();
111 if (quantParam > 0) {
113 for (UINT32 i=0; i <
m_size; i++) {
128 if (quantParam > 0) {
129 int threshold = ((1 << quantParam) * 7)/5;
131 for (UINT32 i=0; i <
m_size; i++) {
132 if (
m_data[i] < -threshold) {
134 }
else if (
m_data[i] > threshold) {
157 if (quantParam > 0) {
158 for (UINT32 i=0; i <
m_size; i++) {
173 #ifdef __PGFROISUPPORT__ 176 UINT32 xPos, yPos, w, h;
177 TilePosition(tileX, tileY, xPos, yPos, w, h);
180 encoder.Partition(
this, w, h, xPos + yPos*
m_width, m_width);
199 if (!
AllocMemory()) ReturnWithError(InsufficientMemory);
209 if (quantParam < 0) quantParam = 0;
211 #ifdef __PGFROISUPPORT__ 213 UINT32 xPos, yPos, w, h;
216 TilePosition(tileX, tileY, xPos, yPos, w, h);
218 ASSERT(xPos >= m_ROI.left && yPos >= m_ROI.top);
219 decoder.Partition(
this, quantParam, w, h, (xPos - m_ROI.left) + (yPos - m_ROI.top)*BufferWidth(), BufferWidth());
230 #ifdef __PGFROISUPPORT__ 231 void CSubband::TilePosition(UINT32 tileX, UINT32 tileY, UINT32& xPos, UINT32& yPos, UINT32& w, UINT32& h)
const {
251 UINT32 nTiles = m_nTiles;
252 ASSERT(tileX < nTiles); ASSERT(tileY < nTiles);
254 UINT32 left = 0, right = nTiles;
255 UINT32 top = 0, bottom = nTiles;
264 m = (left + right) >> 1;
266 xPos += (w + 1) >> 1;
274 m = (top + bottom) >> 1;
276 yPos += (h + 1) >> 1;
void Dequantize(int quantParam)
UINT32 m_width
width in pixels
void ExtractTile(CEncoder &encoder, bool tile=false, UINT32 tileX=0, UINT32 tileY=0) THROW_
UINT32 m_height
height in pixels
void Initialize(UINT32 width, UINT32 height, int level, Orientation orient)
CSubband()
Standard constructor.
PGF wavelet subband class.
UINT32 m_size
size of data buffer m_data
void FreeMemory()
Delete the memory buffer of this subband.
void Quantize(int quantParam)
int m_level
recursion level
UINT32 m_dataPos
current position in m_data
void PlaceTile(CDecoder &decoder, int quantParam, bool tile=false, UINT32 tileX=0, UINT32 tileY=0) THROW_
Orientation m_orientation
0=LL, 1=HL, 2=LH, 3=HH L=lowpass filtered, H=highpass filterd