Permalink
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...
Thomas Richter
Thomas Richter committed Dec 3, 2012
1 parent 47e0fc9 commit 3db9ffa36f8f8651fcd8193e445c12e43511f8ca
Showing with 8 additions and 8 deletions.
  1. BIN WD2.pdf
  2. +5 −5 colortrafo/lslosslesstrafo.cpp
  3. +3 −3 marker/scan.cpp
View
BIN WD2.pdf
Binary file not shown.
@@ -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
@@ -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,15 +502,15 @@ 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;
}
//
// 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;

0 comments on commit 3db9ffa

Please sign in to comment.