65 #ifdef __PGFROISUPPORT__ 80 #ifdef __PGFROISUPPORT__ 81 m_size = BufferWidth()*m_ROI.Height();
116 if (quantParam > 0) {
118 for (UINT32 i=0; i <
m_size; i++) {
133 if (quantParam > 0) {
134 int threshold = ((1 << quantParam) * 7)/5;
136 for (UINT32 i=0; i <
m_size; i++) {
137 if (
m_data[i] < -threshold) {
139 }
else if (
m_data[i] > threshold) {
162 if (quantParam > 0) {
163 for (UINT32 i=0; i <
m_size; i++) {
178 #ifdef __PGFROISUPPORT__ 181 UINT32 xPos, yPos, w, h;
182 TilePosition(tileX, tileY, xPos, yPos, w, h);
185 encoder.Partition(
this, w, h, xPos + yPos*
m_width, m_width);
204 if (!
AllocMemory()) ReturnWithError(InsufficientMemory);
214 if (quantParam < 0) quantParam = 0;
216 #ifdef __PGFROISUPPORT__ 218 UINT32 xPos, yPos, w, h;
221 TilePosition(tileX, tileY, xPos, yPos, w, h);
223 ASSERT(xPos >= m_ROI.left && yPos >= m_ROI.top);
224 decoder.Partition(
this, quantParam, w, h, (xPos - m_ROI.left) + (yPos - m_ROI.top)*BufferWidth(), BufferWidth());
235 #ifdef __PGFROISUPPORT__ 236 void CSubband::TilePosition(UINT32 tileX, UINT32 tileY, UINT32& xPos, UINT32& yPos, UINT32& w, UINT32& h)
const {
256 UINT32 nTiles = m_nTiles;
257 ASSERT(tileX < nTiles); ASSERT(tileY < nTiles);
259 UINT32 left = 0, right = nTiles;
260 UINT32 top = 0, bottom = nTiles;
269 m = left + ((right - left) >> 1);
271 xPos += (w + 1) >> 1;
279 m = top + ((bottom - top) >> 1);
281 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