Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated the working draft. Improved the performance of the AC coding

modes by allocating separate contexts for chroma. Fixed a bug in
the JPEG LS color decorrelation transformation - or rather in the
workaround for a mis-specification in the standard.
  • Loading branch information...
commit 3db9ffa36f8f8651fcd8193e445c12e43511f8ca 1 parent 47e0fc9
@thorfdbg authored
View
BIN  WD2.pdf
Binary file not shown
View
10 colortrafo/lslosslesstrafo.cpp
@@ -46,7 +46,7 @@ the committee itself.
/*
** This file provides the transformation from RGB to YCbCr
**
-** $Id: lslosslesstrafo.cpp,v 1.3 2012-07-20 16:30:00 thor Exp $
+** $Id: lslosslesstrafo.cpp,v 1.4 2012-11-26 11:43:01 thor Exp $
**
*/
@@ -197,14 +197,14 @@ void LSLosslessTrafo<external,count>::RGB2YCbCr(const RectAngle<LONG> &r,const s
switch(count) {
case 4:
if (dst[3] < m_lNear) dst[3] = m_lNear;
- if (dst[3] > m_lMaxTrans + m_lNear) dst[3] = m_lMaxTrans - m_lNear;
+ if (dst[3] > m_lMaxTrans - m_lNear) dst[3] = m_lMaxTrans - m_lNear;
case 3:
if (dst[2] < m_lNear) dst[2] = m_lNear;
- if (dst[2] > m_lMaxTrans + m_lNear) dst[2] = m_lMaxTrans - m_lNear;
+ if (dst[2] > m_lMaxTrans - m_lNear) dst[2] = m_lMaxTrans - m_lNear;
if (dst[1] < m_lNear) dst[1] = m_lNear;
- if (dst[1] > m_lMaxTrans + m_lNear) dst[1] = m_lMaxTrans - m_lNear;
+ if (dst[1] > m_lMaxTrans - m_lNear) dst[1] = m_lMaxTrans - m_lNear;
if (dst[0] < m_lNear) dst[0] = m_lNear;
- if (dst[0] > m_lMaxTrans + m_lNear) dst[0] = m_lMaxTrans - m_lNear;
+ if (dst[0] > m_lMaxTrans - m_lNear) dst[0] = m_lMaxTrans - m_lNear;
}
}
// Step two: Transform with the matrix using the lifting steps of the
View
6 marker/scan.cpp
@@ -47,7 +47,7 @@ the committee itself.
**
** Represents all data in a single scan, and hence is the SOS marker.
**
-** $Id: scan.cpp,v 1.77 2012-10-07 15:58:08 thor Exp $
+** $Id: scan.cpp,v 1.78 2012-11-25 16:18:05 thor Exp $
**
*/
@@ -502,7 +502,7 @@ void Scan::InstallDefaults(UBYTE depth,const struct JPG_TagItem *tags)
for(UBYTE i = 0;i < depth;i++) {
m_ucComponent[i] = i; // simply sequential
- if (ishuffman && colortrafo) {
+ if (/*ishuffman &&*/ colortrafo) {
m_ucDCTable[i] = (i == 0)?(0):(1);
} else {
m_ucDCTable[i] = 0;
@@ -510,7 +510,7 @@ void Scan::InstallDefaults(UBYTE depth,const struct JPG_TagItem *tags)
//
// AC coding not required for predictive.
- if (ishuffman && !ispredictive && colortrafo) {
+ if (/*ishuffman &&*/ !ispredictive && colortrafo) {
m_ucACTable[i] = (i == 0)?(0):(1);
} else {
m_ucACTable[i] = 0;
Please sign in to comment.
Something went wrong with that request. Please try again.