Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 16770 → Rev 16771

/trunk/Scribus/scribus/third_party/pgf/Subband.cpp
1,26 → 1,31
/*
* The Progressive Graphics File; http://www.libpgf.org
*
*
* $Date: 2006-06-04 22:05:59 +0200 (So, 04 Jun 2006) $
* $Revision: 229 $
*
*
* This file Copyright (C) 2006 xeraina GmbH, Switzerland
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
 
//////////////////////////////////////////////////////////////////////
/// @file Subband.cpp
/// @brief PGF wavelet subband class implementation
/// @author C. Stamm
 
#include "Subband.h"
#include "Encoder.h"
#include "Decoder.h"
29,7 → 34,7
// Default constructor
CSubband::CSubband() : m_size(0), m_data(0)
#ifdef __PGFROISUPPORT__
, m_ROIs(0), m_dataWidth(0)
, m_ROIs(0), m_dataWidth(0)
#endif
{
}
43,8 → 48,6
/////////////////////////////////////////////////////////////////////
// Initialize subband parameters
void CSubband::Initialize(UINT32 width, UINT32 height, int level, Orientation orient) {
ASSERT(!m_data);
 
m_width = width;
m_height = height;
m_size = m_width*m_height;
53,6 → 56,7
m_data = 0;
m_dataPos = 0;
#ifdef __PGFROISUPPORT__
m_ROIs = 0;
m_dataWidth = width;
#endif
}
144,8 → 148,7
/// A scalar quantization (with dead-zone) is used. A large quantization value
/// results in strong quantization and therefore in big quality loss.
/// @param quantParam A quantization parameter (larger or equal to 0)
/// @param level Level
void CSubband::Dequantize(int quantParam, int /*level*/) {
void CSubband::Dequantize(int quantParam) {
if (m_orientation == LL) {
quantParam -= m_level + 1;
} else if (m_orientation == HH) {
181,7 → 184,7
 
// write values into buffer using partitiong scheme
encoder.Partition(this, w, h, xPos + yPos*m_width, m_width);
} else
} else
#endif
{
// write values into buffer using partitiong scheme
220,7 → 223,7
 
// read values into buffer using partitiong scheme
decoder.Partition(this, quantParam, w, h, (xPos - roi.left) + (yPos - roi.top)*m_dataWidth, m_dataWidth);
} else
} else
#endif
{
// read values into buffer using partitiong scheme
244,7 → 247,7
// band = HH, w = 30, ldTiles = 2 -> 4 tiles in a row/column
// --> tile widths
// 8 7 8 7
//
//
// tile partitioning scheme
// 0 1 2 3
// 4 5 6 7