aboutsummaryrefslogtreecommitdiff
path: root/image/codecs/indeo
diff options
context:
space:
mode:
authorPaul Gilbert2016-09-10 22:18:05 -0400
committerPaul Gilbert2016-09-10 22:18:05 -0400
commita5f43663875e789baa8b7d9e79d5da4b3362f04a (patch)
tree8d9235abe82273f3b0902bcb8d1f6d5c7a732393 /image/codecs/indeo
parent2f7da2d3d9a6c9ef998a8e1b91a4554e6d1b9d74 (diff)
downloadscummvm-rg350-a5f43663875e789baa8b7d9e79d5da4b3362f04a.tar.gz
scummvm-rg350-a5f43663875e789baa8b7d9e79d5da4b3362f04a.tar.bz2
scummvm-rg350-a5f43663875e789baa8b7d9e79d5da4b3362f04a.zip
IMAGE: Fix leading spaces into tabs in Indeo decoders
Diffstat (limited to 'image/codecs/indeo')
-rw-r--r--image/codecs/indeo/get_bits.cpp8
-rw-r--r--image/codecs/indeo/indeo.cpp1092
-rw-r--r--image/codecs/indeo/indeo.h352
-rw-r--r--image/codecs/indeo/indeo_dsp.cpp826
-rw-r--r--image/codecs/indeo/indeo_dsp.h2
-rw-r--r--image/codecs/indeo/mem.cpp22
-rw-r--r--image/codecs/indeo/vlc.cpp183
-rw-r--r--image/codecs/indeo/vlc.h6
8 files changed, 1246 insertions, 1245 deletions
diff --git a/image/codecs/indeo/get_bits.cpp b/image/codecs/indeo/get_bits.cpp
index ede5fa2a8f..f808a96e76 100644
--- a/image/codecs/indeo/get_bits.cpp
+++ b/image/codecs/indeo/get_bits.cpp
@@ -27,12 +27,12 @@ namespace Indeo {
int GetBits::getVLC2(int16 (*table)[2], int bits, int maxDepth) {
int code;
- int n, nbBits;
- unsigned int index;
+ int n, nbBits;
+ unsigned int index;
index = peekBits(bits);
- code = table[index][0];
- n = table[index][1];
+ code = table[index][0];
+ n = table[index][1];
if (maxDepth > 1 && n < 0) {
skip(bits);
diff --git a/image/codecs/indeo/indeo.cpp b/image/codecs/indeo/indeo.cpp
index 0ce3b7d296..12b7b1f5e9 100644
--- a/image/codecs/indeo/indeo.cpp
+++ b/image/codecs/indeo/indeo.cpp
@@ -48,32 +48,32 @@ namespace Indeo {
* startup from these descriptors.
*/
- /**
- * Static macroblock huffman tables
- */
+/**
+ * Static macroblock huffman tables
+ */
static const IVIHuffDesc ivi_mb_huff_desc[8] = {
- {8, {0, 4, 5, 4, 4, 4, 6, 6}},
- {12, {0, 2, 2, 3, 3, 3, 3, 5, 3, 2, 2, 2}},
- {12, {0, 2, 3, 4, 3, 3, 3, 3, 4, 3, 2, 2}},
- {12, {0, 3, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2}},
- {13, {0, 4, 4, 3, 3, 3, 3, 2, 3, 3, 2, 1, 1}},
- {9, {0, 4, 4, 4, 4, 3, 3, 3, 2}},
- {10, {0, 4, 4, 4, 4, 3, 3, 2, 2, 2}},
- {12, {0, 4, 4, 4, 3, 3, 2, 3, 2, 2, 2, 2}}
+ {8, {0, 4, 5, 4, 4, 4, 6, 6}},
+ {12, {0, 2, 2, 3, 3, 3, 3, 5, 3, 2, 2, 2}},
+ {12, {0, 2, 3, 4, 3, 3, 3, 3, 4, 3, 2, 2}},
+ {12, {0, 3, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2}},
+ {13, {0, 4, 4, 3, 3, 3, 3, 2, 3, 3, 2, 1, 1}},
+ {9, {0, 4, 4, 4, 4, 3, 3, 3, 2}},
+ {10, {0, 4, 4, 4, 4, 3, 3, 2, 2, 2}},
+ {12, {0, 4, 4, 4, 3, 3, 2, 3, 2, 2, 2, 2}}
};
/**
* static block huffman tables
*/
static const IVIHuffDesc ivi_blk_huff_desc[8] = {
- {10, {1, 2, 3, 4, 4, 7, 5, 5, 4, 1}},
- {11, {2, 3, 4, 4, 4, 7, 5, 4, 3, 3, 2}},
- {12, {2, 4, 5, 5, 5, 5, 6, 4, 4, 3, 1, 1}},
- {13, {3, 3, 4, 4, 5, 6, 6, 4, 4, 3, 2, 1, 1}},
- {11, {3, 4, 4, 5, 5, 5, 6, 5, 4, 2, 2}},
- {13, {3, 4, 5, 5, 5, 5, 6, 4, 3, 3, 2, 1, 1}},
- {13, {3, 4, 5, 5, 5, 6, 5, 4, 3, 3, 2, 1, 1}},
- {9, {3, 4, 4, 5, 5, 5, 6, 5, 5}}
+ {10, {1, 2, 3, 4, 4, 7, 5, 5, 4, 1} },
+ {11, {2, 3, 4, 4, 4, 7, 5, 4, 3, 3, 2} },
+ {12, {2, 4, 5, 5, 5, 5, 6, 4, 4, 3, 1, 1} },
+ {13, {3, 3, 4, 4, 5, 6, 6, 4, 4, 3, 2, 1, 1} },
+ {11, {3, 4, 4, 5, 5, 5, 6, 5, 4, 2, 2} },
+ {13, {3, 4, 5, 5, 5, 5, 6, 4, 3, 3, 2, 1, 1} },
+ {13, {3, 4, 5, 5, 5, 6, 5, 4, 3, 3, 2, 1, 1} },
+ {9, {3, 4, 4, 5, 5, 5, 6, 5, 5} }
};
/*------------------------------------------------------------------------*/
@@ -86,36 +86,36 @@ static const IVIHuffDesc ivi_blk_huff_desc[8] = {
/*------------------------------------------------------------------------*/
int IVIHuffDesc::createHuffFromDesc(VLC *vlc, bool flag) const {
- int pos, i, j, codesPerRow, prefix, notLastRow;
- uint16 codewords[256];
- uint8 bits[256];
+ int pos, i, j, codesPerRow, prefix, notLastRow;
+ uint16 codewords[256];
+ uint8 bits[256];
- pos = 0; // current position = 0
+ pos = 0; // current position = 0
- for (i = 0; i < _numRows; i++) {
- codesPerRow = 1 << _xBits[i];
- notLastRow = (i != _numRows - 1);
- prefix = ((1 << i) - 1) << (_xBits[i] + notLastRow);
+ for (i = 0; i < _numRows; i++) {
+ codesPerRow = 1 << _xBits[i];
+ notLastRow = (i != _numRows - 1);
+ prefix = ((1 << i) - 1) << (_xBits[i] + notLastRow);
- for (j = 0; j < codesPerRow; j++) {
- if (pos >= 256) // Some Indeo5 codebooks can have more than 256
- break; // elements, but only 256 codes are allowed!
+ for (j = 0; j < codesPerRow; j++) {
+ if (pos >= 256) // Some Indeo5 codebooks can have more than 256
+ break; // elements, but only 256 codes are allowed!
- bits[pos] = i + _xBits[i] + notLastRow;
- if (bits[pos] > IVI_VLC_BITS)
- return -1; // invalid descriptor
+ bits[pos] = i + _xBits[i] + notLastRow;
+ if (bits[pos] > IVI_VLC_BITS)
+ return -1; // invalid descriptor
- codewords[pos] = invertBits((prefix | j), bits[pos]);
- if (!bits[pos])
- bits[pos] = 1;
+ codewords[pos] = invertBits((prefix | j), bits[pos]);
+ if (!bits[pos])
+ bits[pos] = 1;
- pos++;
- }//for j
- }//for i
+ pos++;
+ }//for j
+ }//for i
- // number of codewords = pos
+ // number of codewords = pos
return vlc->init_vlc(IVI_VLC_BITS, pos, bits, 1, 1, codewords, 2, 2,
- (flag ? INIT_VLC_USE_NEW_STATIC : 0) | INIT_VLC_LE);
+ (flag ? INIT_VLC_USE_NEW_STATIC : 0) | INIT_VLC_LE);
}
/*------------------------------------------------------------------------*/
@@ -957,7 +957,7 @@ int IndeoDecoderBase::processEmptyTile(IVIBandDesc *band,
mb->_bufOffs = mbOffset;
mb->_type = 1; // set the macroblocks _type = INTER
- mb->_cbp = 0; // all blocks are empty
+ mb->_cbp = 0; // all blocks are empty
if (!band->_qdeltaPresent && !band->_plane && !band->_bandNum) {
mb->_qDelta = band->_globQuant;
@@ -1059,138 +1059,138 @@ int IndeoDecoderBase::decodeTileDataSize(GetBits *gb) {
}
int IndeoDecoderBase::decodeBlocks(GetBits *_gb, IVIBandDesc *band, IVITile *tile) {
- int mbn, blk, numBlocks, blkSize, ret, isIntra;
- int mcType = 0, mcType2 = -1;
- int mvX = 0, mvY = 0, mvX2 = 0, mvY2 = 0;
- int32 prevDc;
- uint32 cbp, quant, bufOffs;
- IVIMbInfo *mb;
- IviMCFunc mcWithDeltaFunc, mcNoDeltaFunc;
- IviMCAvgFunc mcAvgWithDeltaFunc, mcAvgNoDeltaFunc;
- const uint8 *scaleTab;
-
- // init intra prediction for the DC coefficient
- prevDc = 0;
- blkSize = band->_blkSize;
- // number of blocks per mb
- numBlocks = (band->_mbSize != blkSize) ? 4 : 1;
- if (blkSize == 8) {
- mcWithDeltaFunc = IndeoDSP::ffIviMc8x8Delta;
- mcNoDeltaFunc = IndeoDSP::ffIviMc8x8NoDelta;
- mcAvgWithDeltaFunc = IndeoDSP::ffIviMcAvg8x8Delta;
- mcAvgNoDeltaFunc = IndeoDSP::ffIviMcAvg8x8NoDelta;
- } else {
- mcWithDeltaFunc = IndeoDSP::ffIviMc4x4Delta;
- mcNoDeltaFunc = IndeoDSP::ffIviMc4x4NoDelta;
- mcAvgWithDeltaFunc = IndeoDSP::ffIviMcAvg4x4Delta;
- mcAvgNoDeltaFunc = IndeoDSP::ffIviMcAvg4x4NoDelta;
- }
-
- for (mbn = 0, mb = tile->_mbs; mbn < tile->_numMBs; mb++, mbn++) {
- isIntra = !mb->_type;
- cbp = mb->_cbp;
- bufOffs = mb->_bufOffs;
-
- quant = band->_globQuant + mb->_qDelta;
- if (_ctx._isIndeo4)
- quant = avClipUintp2(quant, 5);
- else
- quant = av_clip((int)quant, 0, 23);
-
- scaleTab = isIntra ? band->_intraScale : band->_interScale;
- if (scaleTab)
- quant = scaleTab[quant];
-
- if (!isIntra) {
- mvX = mb->_mvX;
- mvY = mb->_mvY;
- mvX2 = mb->_bMvX;
- mvY2 = mb->_bMvY;
- if (band->_isHalfpel) {
- mcType = ((mvY & 1) << 1) | (mvX & 1);
- mcType2 = ((mvY2 & 1) << 1) | (mvX2 & 1);
- mvX >>= 1;
- mvY >>= 1;
- mvX2 >>= 1;
- mvY2 >>= 1; // convert halfpel vectors into fullpel ones
- }
- if (mb->_type == 2)
- mcType = -1;
- if (mb->_type != 2 && mb->_type != 3)
- mcType2 = -1;
- if (mb->_type) {
- int dmv_x, dmv_y, cx, cy;
-
- dmv_x = mb->_mvX >> band->_isHalfpel;
- dmv_y = mb->_mvY >> band->_isHalfpel;
- cx = mb->_mvX & band->_isHalfpel;
- cy = mb->_mvY & band->_isHalfpel;
-
- if (mb->_xPos + dmv_x < 0 ||
- mb->_xPos + dmv_x + band->_mbSize + cx > band->_pitch ||
- mb->_yPos + dmv_y < 0 ||
- mb->_yPos + dmv_y + band->_mbSize + cy > band->_aHeight) {
- return -1;
- }
- }
- if (mb->_type == 2 || mb->_type == 3) {
- int dmv_x, dmv_y, cx, cy;
-
- dmv_x = mb->_bMvX >> band->_isHalfpel;
- dmv_y = mb->_bMvY >> band->_isHalfpel;
- cx = mb->_bMvX & band->_isHalfpel;
- cy = mb->_bMvY & band->_isHalfpel;
-
- if (mb->_xPos + dmv_x < 0 ||
- mb->_xPos + dmv_x + band->_mbSize + cx > band->_pitch ||
- mb->_yPos + dmv_y < 0 ||
- mb->_yPos + dmv_y + band->_mbSize + cy > band->_aHeight) {
- return -1;
- }
- }
- }
-
- for (blk = 0; blk < numBlocks; blk++) {
- // adjust block position in the buffer according to its number
- if (blk & 1) {
- bufOffs += blkSize;
- } else if (blk == 2) {
- bufOffs -= blkSize;
- bufOffs += blkSize * band->_pitch;
- }
-
- if (cbp & 1) { // block coded ?
- ret = ivi_decode_coded_blocks(_gb, band, mcWithDeltaFunc,
- mcAvgWithDeltaFunc,
- mvX, mvY, mvX2, mvY2,
- &prevDc, isIntra,
- mcType, mcType2, quant,
- bufOffs);
- if (ret < 0)
- return ret;
- } else {
- // block not coded
- // for intra blocks apply the dc slant transform
- // for inter - perform the motion compensation without delta
- if (isIntra) {
- ret = ivi_dc_transform(band, &prevDc, bufOffs, blkSize);
- if (ret < 0)
- return ret;
- } else {
- ret = iviMc(band, mcNoDeltaFunc, mcAvgNoDeltaFunc,
- bufOffs, mvX, mvY, mvX2, mvY2,
- mcType, mcType2);
- if (ret < 0)
- return ret;
- }
- }
-
- cbp >>= 1;
- }// for blk
- }// for mbn
+ int mbn, blk, numBlocks, blkSize, ret, isIntra;
+ int mcType = 0, mcType2 = -1;
+ int mvX = 0, mvY = 0, mvX2 = 0, mvY2 = 0;
+ int32 prevDc;
+ uint32 cbp, quant, bufOffs;
+ IVIMbInfo *mb;
+ IviMCFunc mcWithDeltaFunc, mcNoDeltaFunc;
+ IviMCAvgFunc mcAvgWithDeltaFunc, mcAvgNoDeltaFunc;
+ const uint8 *scaleTab;
+
+ // init intra prediction for the DC coefficient
+ prevDc = 0;
+ blkSize = band->_blkSize;
+ // number of blocks per mb
+ numBlocks = (band->_mbSize != blkSize) ? 4 : 1;
+ if (blkSize == 8) {
+ mcWithDeltaFunc = IndeoDSP::ffIviMc8x8Delta;
+ mcNoDeltaFunc = IndeoDSP::ffIviMc8x8NoDelta;
+ mcAvgWithDeltaFunc = IndeoDSP::ffIviMcAvg8x8Delta;
+ mcAvgNoDeltaFunc = IndeoDSP::ffIviMcAvg8x8NoDelta;
+ } else {
+ mcWithDeltaFunc = IndeoDSP::ffIviMc4x4Delta;
+ mcNoDeltaFunc = IndeoDSP::ffIviMc4x4NoDelta;
+ mcAvgWithDeltaFunc = IndeoDSP::ffIviMcAvg4x4Delta;
+ mcAvgNoDeltaFunc = IndeoDSP::ffIviMcAvg4x4NoDelta;
+ }
+
+ for (mbn = 0, mb = tile->_mbs; mbn < tile->_numMBs; mb++, mbn++) {
+ isIntra = !mb->_type;
+ cbp = mb->_cbp;
+ bufOffs = mb->_bufOffs;
+
+ quant = band->_globQuant + mb->_qDelta;
+ if (_ctx._isIndeo4)
+ quant = avClipUintp2(quant, 5);
+ else
+ quant = av_clip((int)quant, 0, 23);
+
+ scaleTab = isIntra ? band->_intraScale : band->_interScale;
+ if (scaleTab)
+ quant = scaleTab[quant];
+
+ if (!isIntra) {
+ mvX = mb->_mvX;
+ mvY = mb->_mvY;
+ mvX2 = mb->_bMvX;
+ mvY2 = mb->_bMvY;
+ if (band->_isHalfpel) {
+ mcType = ((mvY & 1) << 1) | (mvX & 1);
+ mcType2 = ((mvY2 & 1) << 1) | (mvX2 & 1);
+ mvX >>= 1;
+ mvY >>= 1;
+ mvX2 >>= 1;
+ mvY2 >>= 1; // convert halfpel vectors into fullpel ones
+ }
+ if (mb->_type == 2)
+ mcType = -1;
+ if (mb->_type != 2 && mb->_type != 3)
+ mcType2 = -1;
+ if (mb->_type) {
+ int dmv_x, dmv_y, cx, cy;
+
+ dmv_x = mb->_mvX >> band->_isHalfpel;
+ dmv_y = mb->_mvY >> band->_isHalfpel;
+ cx = mb->_mvX & band->_isHalfpel;
+ cy = mb->_mvY & band->_isHalfpel;
+
+ if (mb->_xPos + dmv_x < 0 ||
+ mb->_xPos + dmv_x + band->_mbSize + cx > band->_pitch ||
+ mb->_yPos + dmv_y < 0 ||
+ mb->_yPos + dmv_y + band->_mbSize + cy > band->_aHeight) {
+ return -1;
+ }
+ }
+ if (mb->_type == 2 || mb->_type == 3) {
+ int dmv_x, dmv_y, cx, cy;
+
+ dmv_x = mb->_bMvX >> band->_isHalfpel;
+ dmv_y = mb->_bMvY >> band->_isHalfpel;
+ cx = mb->_bMvX & band->_isHalfpel;
+ cy = mb->_bMvY & band->_isHalfpel;
+
+ if (mb->_xPos + dmv_x < 0 ||
+ mb->_xPos + dmv_x + band->_mbSize + cx > band->_pitch ||
+ mb->_yPos + dmv_y < 0 ||
+ mb->_yPos + dmv_y + band->_mbSize + cy > band->_aHeight) {
+ return -1;
+ }
+ }
+ }
+
+ for (blk = 0; blk < numBlocks; blk++) {
+ // adjust block position in the buffer according to its number
+ if (blk & 1) {
+ bufOffs += blkSize;
+ } else if (blk == 2) {
+ bufOffs -= blkSize;
+ bufOffs += blkSize * band->_pitch;
+ }
+
+ if (cbp & 1) { // block coded ?
+ ret = ivi_decode_coded_blocks(_gb, band, mcWithDeltaFunc,
+ mcAvgWithDeltaFunc,
+ mvX, mvY, mvX2, mvY2,
+ &prevDc, isIntra,
+ mcType, mcType2, quant,
+ bufOffs);
+ if (ret < 0)
+ return ret;
+ } else {
+ // block not coded
+ // for intra blocks apply the dc slant transform
+ // for inter - perform the motion compensation without delta
+ if (isIntra) {
+ ret = ivi_dc_transform(band, &prevDc, bufOffs, blkSize);
+ if (ret < 0)
+ return ret;
+ } else {
+ ret = iviMc(band, mcNoDeltaFunc, mcAvgNoDeltaFunc,
+ bufOffs, mvX, mvY, mvX2, mvY2,
+ mcType, mcType2);
+ if (ret < 0)
+ return ret;
+ }
+ }
+
+ cbp >>= 1;
+ }// for blk
+ }// for mbn
_gb->align();
- return 0;
+ return 0;
}
int IndeoDecoderBase::scaleMV(int mv, int mvScale) {
@@ -1198,39 +1198,39 @@ int IndeoDecoderBase::scaleMV(int mv, int mvScale) {
}
int IndeoDecoderBase::iviMc(IVIBandDesc *band, IviMCFunc mc, IviMCAvgFunc mcAvg,
- int offs, int mvX, int mvY, int mvX2, int mvY2,
- int mcType, int mcType2) {
- int refOffs = offs + mvY * band->_pitch + mvX;
- int bufSize = band->_pitch * band->_aHeight;
- int minSize = band->_pitch * (band->_blkSize - 1) + band->_blkSize;
- int refSize = (mcType > 1) * band->_pitch + (mcType & 1);
-
- if (mcType != -1) {
- assert(offs >= 0 && refOffs >= 0 && band->_refBuf);
- assert(bufSize - minSize >= offs);
- assert(bufSize - minSize - refSize >= refOffs);
- }
-
- if (mcType2 == -1) {
- mc(band->_buf + offs, band->_refBuf + refOffs, band->_pitch, mcType);
- } else {
- int ref_offs2 = offs + mvY2 * band->_pitch + mvX2;
- int ref_size2 = (mcType2 > 1) * band->_pitch + (mcType2 & 1);
- if (offs < 0 || ref_offs2 < 0 || !band->_bRefBuf)
- return -1;
- if (bufSize - minSize - ref_size2 < ref_offs2)
- return -1;
-
- if (mcType == -1)
- mc(band->_buf + offs, band->_bRefBuf + ref_offs2,
- band->_pitch, mcType2);
- else
- mcAvg(band->_buf + offs, band->_refBuf + refOffs,
- band->_bRefBuf + ref_offs2, band->_pitch,
- mcType, mcType2);
- }
-
- return 0;
+ int offs, int mvX, int mvY, int mvX2, int mvY2,
+ int mcType, int mcType2) {
+ int refOffs = offs + mvY * band->_pitch + mvX;
+ int bufSize = band->_pitch * band->_aHeight;
+ int minSize = band->_pitch * (band->_blkSize - 1) + band->_blkSize;
+ int refSize = (mcType > 1) * band->_pitch + (mcType & 1);
+
+ if (mcType != -1) {
+ assert(offs >= 0 && refOffs >= 0 && band->_refBuf);
+ assert(bufSize - minSize >= offs);
+ assert(bufSize - minSize - refSize >= refOffs);
+ }
+
+ if (mcType2 == -1) {
+ mc(band->_buf + offs, band->_refBuf + refOffs, band->_pitch, mcType);
+ } else {
+ int ref_offs2 = offs + mvY2 * band->_pitch + mvX2;
+ int ref_size2 = (mcType2 > 1) * band->_pitch + (mcType2 & 1);
+ if (offs < 0 || ref_offs2 < 0 || !band->_bRefBuf)
+ return -1;
+ if (bufSize - minSize - ref_size2 < ref_offs2)
+ return -1;
+
+ if (mcType == -1)
+ mc(band->_buf + offs, band->_bRefBuf + ref_offs2,
+ band->_pitch, mcType2);
+ else
+ mcAvg(band->_buf + offs, band->_refBuf + refOffs,
+ band->_bRefBuf + ref_offs2, band->_pitch,
+ mcType, mcType2);
+ }
+
+ return 0;
}
int IndeoDecoderBase::ivi_decode_coded_blocks(GetBits *gb, IVIBandDesc *band,
@@ -1374,355 +1374,355 @@ const uint8 IndeoDecoderBase::_ffIviDirectScan4x4[16] = {
const RVMapDesc IVI45DecContext::_ff_ivi_rvmap_tabs[9] = {
{ // MapTab0
- 5, // _eobSym
- 2, // _escSym
- // run table
- {1, 1, 0, 1, 1, 0, 1, 1, 2, 2, 1, 1, 1, 1, 3, 3,
- 1, 1, 2, 2, 1, 1, 4, 4, 1, 1, 1, 1, 2, 2, 5, 5,
- 1, 1, 3, 3, 1, 1, 6, 6, 1, 2, 1, 2, 7, 7, 1, 1,
- 8, 8, 1, 1, 4, 2, 1, 4, 2, 1, 3, 3, 1, 1, 1, 9,
- 9, 1, 2, 1, 2, 1, 5, 5, 1, 1, 10, 10, 1, 1, 3, 3,
- 2, 2, 1, 1, 11, 11, 6, 4, 4, 1, 6, 1, 2, 1, 2, 12,
- 8, 1, 12, 7, 8, 7, 1, 16, 1, 16, 1, 3, 3, 13, 1, 13,
- 2, 2, 1, 15, 1, 5, 14, 15, 1, 5, 14, 1, 17, 8, 17, 8,
- 1, 4, 4, 2, 2, 1, 25, 25, 24, 24, 1, 3, 1, 3, 1, 8,
- 6, 7, 6, 1, 18, 8, 18, 1, 7, 23, 2, 2, 23, 1, 1, 21,
- 22, 9, 9, 22, 19, 1, 21, 5, 19, 5, 1, 33, 20, 33, 20, 8,
- 4, 4, 1, 32, 2, 2, 8, 3, 32, 26, 3, 1, 7, 7, 26, 6,
- 1, 6, 1, 1, 16, 1, 10, 1, 10, 2, 16, 29, 28, 2, 29, 28,
- 1, 27, 5, 8, 5, 27, 1, 8, 3, 7, 3, 31, 41, 31, 1, 41,
- 6, 1, 6, 7, 4, 4, 1, 1, 2, 1, 2, 11, 34, 30, 11, 1,
- 30, 15, 15, 34, 36, 40, 36, 40, 35, 35, 37, 37, 39, 39, 38, 38},
-
- // value table
- { 1, -1, 0, 2, -2, 0, 3, -3, 1, -1, 4, -4, 5, -5, 1, -1,
- 6, -6, 2, -2, 7, -7, 1, -1, 8, -8, 9, -9, 3, -3, 1, -1,
- 10, -10, 2, -2, 11, -11, 1, -1, 12, 4, -12, -4, 1, -1, 13, -13,
- 1, -1, 14, -14, 2, 5, 15, -2, -5, -15, -3, 3, 16, -16, 17, 1,
- -1, -17, 6, 18, -6, -18, 2, -2, 19, -19, 1, -1, 20, -20, 4, -4,
- 7, -7, 21, -21, 1, -1, 2, 3, -3, 22, -2, -22, 8, 23, -8, 1,
- 2, -23, -1, 2, -2, -2, 24, 1, -24, -1, 25, 5, -5, 1, -25, -1,
- 9, -9, 26, 1, -26, 3, 1, -1, 27, -3, -1, -27, 1, 3, -1, -3,
- 28, -4, 4, 10, -10, -28, 1, -1, 1, -1, 29, 6, -29, -6, 30, -4,
- 3, 3, -3, -30, 1, 4, -1, 31, -3, 1, 11, -11, -1, -31, 32, -1,
- -1, 2, -2, 1, 1, -32, 1, 4, -1, -4, 33, -1, 1, 1, -1, 5,
- 5, -5, -33, -1, -12, 12, -5, -7, 1, 1, 7, 34, 4, -4, -1, 4,
- -34, -4, 35, 36, -2, -35, -2, -36, 2, 13, 2, -1, 1, -13, 1, -1,
- 37, 1, -5, 6, 5, -1, 38, -6, -8, 5, 8, -1, 1, 1, -37, -1,
- 5, 39, -5, -5, 6, -6, -38, -39, -14, 40, 14, 2, 1, 1, -2, -40,
- -1, -2, 2, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1}
+ 5, // _eobSym
+ 2, // _escSym
+ // run table
+ {1, 1, 0, 1, 1, 0, 1, 1, 2, 2, 1, 1, 1, 1, 3, 3,
+ 1, 1, 2, 2, 1, 1, 4, 4, 1, 1, 1, 1, 2, 2, 5, 5,
+ 1, 1, 3, 3, 1, 1, 6, 6, 1, 2, 1, 2, 7, 7, 1, 1,
+ 8, 8, 1, 1, 4, 2, 1, 4, 2, 1, 3, 3, 1, 1, 1, 9,
+ 9, 1, 2, 1, 2, 1, 5, 5, 1, 1, 10, 10, 1, 1, 3, 3,
+ 2, 2, 1, 1, 11, 11, 6, 4, 4, 1, 6, 1, 2, 1, 2, 12,
+ 8, 1, 12, 7, 8, 7, 1, 16, 1, 16, 1, 3, 3, 13, 1, 13,
+ 2, 2, 1, 15, 1, 5, 14, 15, 1, 5, 14, 1, 17, 8, 17, 8,
+ 1, 4, 4, 2, 2, 1, 25, 25, 24, 24, 1, 3, 1, 3, 1, 8,
+ 6, 7, 6, 1, 18, 8, 18, 1, 7, 23, 2, 2, 23, 1, 1, 21,
+ 22, 9, 9, 22, 19, 1, 21, 5, 19, 5, 1, 33, 20, 33, 20, 8,
+ 4, 4, 1, 32, 2, 2, 8, 3, 32, 26, 3, 1, 7, 7, 26, 6,
+ 1, 6, 1, 1, 16, 1, 10, 1, 10, 2, 16, 29, 28, 2, 29, 28,
+ 1, 27, 5, 8, 5, 27, 1, 8, 3, 7, 3, 31, 41, 31, 1, 41,
+ 6, 1, 6, 7, 4, 4, 1, 1, 2, 1, 2, 11, 34, 30, 11, 1,
+ 30, 15, 15, 34, 36, 40, 36, 40, 35, 35, 37, 37, 39, 39, 38, 38},
+
+ // value table
+ { 1, -1, 0, 2, -2, 0, 3, -3, 1, -1, 4, -4, 5, -5, 1, -1,
+ 6, -6, 2, -2, 7, -7, 1, -1, 8, -8, 9, -9, 3, -3, 1, -1,
+ 10, -10, 2, -2, 11, -11, 1, -1, 12, 4, -12, -4, 1, -1, 13, -13,
+ 1, -1, 14, -14, 2, 5, 15, -2, -5, -15, -3, 3, 16, -16, 17, 1,
+ -1, -17, 6, 18, -6, -18, 2, -2, 19, -19, 1, -1, 20, -20, 4, -4,
+ 7, -7, 21, -21, 1, -1, 2, 3, -3, 22, -2, -22, 8, 23, -8, 1,
+ 2, -23, -1, 2, -2, -2, 24, 1, -24, -1, 25, 5, -5, 1, -25, -1,
+ 9, -9, 26, 1, -26, 3, 1, -1, 27, -3, -1, -27, 1, 3, -1, -3,
+ 28, -4, 4, 10, -10, -28, 1, -1, 1, -1, 29, 6, -29, -6, 30, -4,
+ 3, 3, -3, -30, 1, 4, -1, 31, -3, 1, 11, -11, -1, -31, 32, -1,
+ -1, 2, -2, 1, 1, -32, 1, 4, -1, -4, 33, -1, 1, 1, -1, 5,
+ 5, -5, -33, -1, -12, 12, -5, -7, 1, 1, 7, 34, 4, -4, -1, 4,
+ -34, -4, 35, 36, -2, -35, -2, -36, 2, 13, 2, -1, 1, -13, 1, -1,
+ 37, 1, -5, 6, 5, -1, 38, -6, -8, 5, 8, -1, 1, 1, -37, -1,
+ 5, 39, -5, -5, 6, -6, -38, -39, -14, 40, 14, 2, 1, 1, -2, -40,
+ -1, -2, 2, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1}
},{
- // MapTab1
- 0, // _eobSym
- 38, // _escSym
- // run table
- {0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 8, 6, 8, 7,
- 7, 9, 9, 10, 10, 11, 11, 1, 12, 1, 12, 13, 13, 16, 14, 16,
- 14, 15, 15, 17, 17, 18, 0, 18, 19, 20, 21, 19, 22, 21, 20, 22,
- 25, 24, 2, 25, 24, 23, 23, 2, 26, 28, 26, 28, 29, 27, 29, 27,
- 33, 33, 1, 32, 1, 3, 32, 30, 36, 3, 36, 30, 31, 31, 35, 34,
- 37, 41, 34, 35, 37, 4, 41, 4, 49, 8, 8, 49, 40, 38, 5, 38,
- 40, 39, 5, 39, 42, 43, 42, 7, 57, 6, 43, 44, 6, 50, 7, 44,
- 57, 48, 50, 48, 45, 45, 46, 47, 51, 46, 47, 58, 1, 51, 58, 1,
- 52, 59, 53, 9, 52, 55, 55, 59, 53, 56, 54, 56, 54, 9, 64, 64,
- 60, 63, 60, 63, 61, 62, 61, 62, 2, 10, 2, 10, 11, 1, 11, 13,
- 12, 1, 12, 13, 16, 16, 8, 8, 14, 3, 3, 15, 14, 15, 4, 4,
- 1, 17, 17, 5, 1, 7, 7, 5, 6, 1, 2, 2, 6, 22, 1, 25,
- 21, 22, 8, 24, 1, 21, 25, 24, 8, 18, 18, 23, 9, 20, 23, 33,
- 29, 33, 20, 1, 19, 1, 29, 36, 9, 36, 19, 41, 28, 57, 32, 3,
- 28, 3, 1, 27, 49, 49, 1, 32, 26, 26, 2, 4, 4, 7, 57, 41,
- 2, 7, 10, 5, 37, 16, 10, 27, 8, 8, 13, 16, 37, 13, 1, 5},
-
- // value table
- {0, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1,
- -1, 1, -1, 1, -1, 1, -1, 2, 1, -2, -1, 1, -1, 1, 1, -1,
- -1, 1, -1, 1, -1, 1, 0, -1, 1, 1, 1, -1, 1, -1, -1, -1,
- 1, 1, 2, -1, -1, 1, -1, -2, 1, 1, -1, -1, 1, 1, -1, -1,
- 1, -1, 3, 1, -3, 2, -1, 1, 1, -2, -1, -1, -1, 1, 1, 1,
- 1, 1, -1, -1, -1, 2, -1, -2, 1, 2, -2, -1, 1, 1, 2, -1,
- -1, 1, -2, -1, 1, 1, -1, 2, 1, 2, -1, 1, -2, -1, -2, -1,
- -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 4, -1, -1, -4,
- 1, 1, 1, 2, -1, -1, 1, -1, -1, 1, -1, -1, 1, -2, 1, -1,
- 1, 1, -1, -1, 1, 1, -1, -1, 3, 2, -3, -2, 2, 5, -2, 2,
- 2, -5, -2, -2, -2, 2, -3, 3, 2, 3, -3, 2, -2, -2, 3, -3,
- 6, 2, -2, 3, -6, 3, -3, -3, 3, 7, -4, 4, -3, 2, -7, 2,
- 2, -2, -4, 2, 8, -2, -2, -2, 4, 2, -2, 2, 3, 2, -2, -2,
- 2, 2, -2, -8, -2, 9, -2, 2, -3, -2, 2, -2, 2, 2, 2, 4,
- -2, -4, 10, 2, 2, -2, -9, -2, 2, -2, 5, 4, -4, 4, -2, 2,
- -5, -4, -3, 4, 2, -3, 3, -2, -5, 5, 3, 3, -2, -3, -10, -4}
+ // MapTab1
+ 0, // _eobSym
+ 38, // _escSym
+ // run table
+ {0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 8, 6, 8, 7,
+ 7, 9, 9, 10, 10, 11, 11, 1, 12, 1, 12, 13, 13, 16, 14, 16,
+ 14, 15, 15, 17, 17, 18, 0, 18, 19, 20, 21, 19, 22, 21, 20, 22,
+ 25, 24, 2, 25, 24, 23, 23, 2, 26, 28, 26, 28, 29, 27, 29, 27,
+ 33, 33, 1, 32, 1, 3, 32, 30, 36, 3, 36, 30, 31, 31, 35, 34,
+ 37, 41, 34, 35, 37, 4, 41, 4, 49, 8, 8, 49, 40, 38, 5, 38,
+ 40, 39, 5, 39, 42, 43, 42, 7, 57, 6, 43, 44, 6, 50, 7, 44,
+ 57, 48, 50, 48, 45, 45, 46, 47, 51, 46, 47, 58, 1, 51, 58, 1,
+ 52, 59, 53, 9, 52, 55, 55, 59, 53, 56, 54, 56, 54, 9, 64, 64,
+ 60, 63, 60, 63, 61, 62, 61, 62, 2, 10, 2, 10, 11, 1, 11, 13,
+ 12, 1, 12, 13, 16, 16, 8, 8, 14, 3, 3, 15, 14, 15, 4, 4,
+ 1, 17, 17, 5, 1, 7, 7, 5, 6, 1, 2, 2, 6, 22, 1, 25,
+ 21, 22, 8, 24, 1, 21, 25, 24, 8, 18, 18, 23, 9, 20, 23, 33,
+ 29, 33, 20, 1, 19, 1, 29, 36, 9, 36, 19, 41, 28, 57, 32, 3,
+ 28, 3, 1, 27, 49, 49, 1, 32, 26, 26, 2, 4, 4, 7, 57, 41,
+ 2, 7, 10, 5, 37, 16, 10, 27, 8, 8, 13, 16, 37, 13, 1, 5},
+
+ // value table
+ {0, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1,
+ -1, 1, -1, 1, -1, 1, -1, 2, 1, -2, -1, 1, -1, 1, 1, -1,
+ -1, 1, -1, 1, -1, 1, 0, -1, 1, 1, 1, -1, 1, -1, -1, -1,
+ 1, 1, 2, -1, -1, 1, -1, -2, 1, 1, -1, -1, 1, 1, -1, -1,
+ 1, -1, 3, 1, -3, 2, -1, 1, 1, -2, -1, -1, -1, 1, 1, 1,
+ 1, 1, -1, -1, -1, 2, -1, -2, 1, 2, -2, -1, 1, 1, 2, -1,
+ -1, 1, -2, -1, 1, 1, -1, 2, 1, 2, -1, 1, -2, -1, -2, -1,
+ -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 4, -1, -1, -4,
+ 1, 1, 1, 2, -1, -1, 1, -1, -1, 1, -1, -1, 1, -2, 1, -1,
+ 1, 1, -1, -1, 1, 1, -1, -1, 3, 2, -3, -2, 2, 5, -2, 2,
+ 2, -5, -2, -2, -2, 2, -3, 3, 2, 3, -3, 2, -2, -2, 3, -3,
+ 6, 2, -2, 3, -6, 3, -3, -3, 3, 7, -4, 4, -3, 2, -7, 2,
+ 2, -2, -4, 2, 8, -2, -2, -2, 4, 2, -2, 2, 3, 2, -2, -2,
+ 2, 2, -2, -8, -2, 9, -2, 2, -3, -2, 2, -2, 2, 2, 2, 4,
+ -2, -4, 10, 2, 2, -2, -9, -2, 2, -2, 5, 4, -4, 4, -2, 2,
+ -5, -4, -3, 4, 2, -3, 3, -2, -5, 5, 3, 3, -2, -3, -10, -4}
},{
- // MapTab2
- 2, // _eobSym
- 11, // _escSym
- // run table
- {1, 1, 0, 2, 2, 1, 1, 3, 3, 4, 4, 0, 1, 1, 5, 5,
- 2, 2, 6, 6, 7, 7, 1, 8, 1, 8, 3, 3, 9, 9, 1, 2,
- 2, 1, 4, 10, 4, 10, 11, 11, 1, 5, 12, 12, 1, 5, 13, 13,
- 3, 3, 6, 6, 2, 2, 14, 14, 16, 16, 15, 7, 15, 8, 8, 7,
- 1, 1, 17, 17, 4, 4, 1, 1, 18, 18, 2, 2, 5, 5, 25, 3,
- 9, 3, 25, 9, 19, 24, 19, 24, 1, 21, 20, 1, 21, 22, 20, 22,
- 23, 23, 8, 6, 33, 6, 8, 33, 7, 7, 26, 26, 1, 32, 1, 32,
- 28, 4, 28, 10, 29, 27, 27, 10, 41, 4, 29, 2, 2, 41, 36, 31,
- 49, 31, 34, 30, 34, 36, 30, 35, 1, 49, 11, 5, 35, 11, 1, 3,
- 3, 5, 37, 37, 8, 40, 8, 40, 12, 12, 42, 42, 1, 38, 16, 57,
- 1, 6, 16, 39, 38, 6, 7, 7, 13, 13, 39, 43, 2, 43, 57, 2,
- 50, 9, 44, 9, 50, 4, 15, 48, 44, 4, 1, 15, 48, 14, 14, 1,
- 45, 45, 8, 3, 5, 8, 51, 47, 3, 46, 46, 47, 5, 51, 1, 17,
- 17, 58, 1, 58, 2, 52, 52, 2, 53, 7, 59, 6, 6, 56, 53, 55,
- 7, 55, 1, 54, 59, 56, 54, 10, 1, 10, 4, 60, 1, 60, 8, 4,
- 8, 64, 64, 61, 1, 63, 3, 63, 62, 61, 5, 11, 5, 3, 11, 62},
-
- // value table
- { 1, -1, 0, 1, -1, 2, -2, 1, -1, 1, -1, 0, 3, -3, 1, -1,
- 2, -2, 1, -1, 1, -1, 4, 1, -4, -1, 2, -2, 1, -1, 5, 3,
- -3, -5, 2, 1, -2, -1, 1, -1, 6, 2, 1, -1, -6, -2, 1, -1,
- 3, -3, 2, -2, 4, -4, 1, -1, 1, -1, 1, 2, -1, 2, -2, -2,
- 7, -7, 1, -1, 3, -3, 8, -8, 1, -1, 5, -5, 3, -3, 1, 4,
- 2, -4, -1, -2, 1, 1, -1, -1, 9, 1, 1, -9, -1, 1, -1, -1,
- 1, -1, 3, -3, 1, 3, -3, -1, 3, -3, 1, -1, 10, 1, -10, -1,
- 1, 4, -1, 2, 1, -1, 1, -2, 1, -4, -1, 6, -6, -1, 1, 1,
- 1, -1, 1, 1, -1, -1, -1, 1, 11, -1, -2, 4, -1, 2, -11, 5,
- -5, -4, -1, 1, 4, 1, -4, -1, -2, 2, 1, -1, 12, 1, -2, 1,
- -12, 4, 2, 1, -1, -4, 4, -4, 2, -2, -1, 1, 7, -1, -1, -7,
- -1, -3, 1, 3, 1, 5, 2, 1, -1, -5, 13, -2, -1, 2, -2, -13,
- 1, -1, 5, 6, 5, -5, 1, 1, -6, 1, -1, -1, -5, -1, 14, 2,
- -2, 1, -14, -1, 8, 1, -1, -8, 1, 5, 1, 5, -5, 1, -1, 1,
- -5, -1, 15, 1, -1, -1, -1, 3, -15, -3, 6, 1, 16, -1, 6, -6,
- -6, 1, -1, 1, -16, 1, 7, -1, 1, -1, -6, -3, 6, -7, 3, -1}
+ // MapTab2
+ 2, // _eobSym
+ 11, // _escSym
+ // run table
+ {1, 1, 0, 2, 2, 1, 1, 3, 3, 4, 4, 0, 1, 1, 5, 5,
+ 2, 2, 6, 6, 7, 7, 1, 8, 1, 8, 3, 3, 9, 9, 1, 2,
+ 2, 1, 4, 10, 4, 10, 11, 11, 1, 5, 12, 12, 1, 5, 13, 13,
+ 3, 3, 6, 6, 2, 2, 14, 14, 16, 16, 15, 7, 15, 8, 8, 7,
+ 1, 1, 17, 17, 4, 4, 1, 1, 18, 18, 2, 2, 5, 5, 25, 3,
+ 9, 3, 25, 9, 19, 24, 19, 24, 1, 21, 20, 1, 21, 22, 20, 22,
+ 23, 23, 8, 6, 33, 6, 8, 33, 7, 7, 26, 26, 1, 32, 1, 32,
+ 28, 4, 28, 10, 29, 27, 27, 10, 41, 4, 29, 2, 2, 41, 36, 31,
+ 49, 31, 34, 30, 34, 36, 30, 35, 1, 49, 11, 5, 35, 11, 1, 3,
+ 3, 5, 37, 37, 8, 40, 8, 40, 12, 12, 42, 42, 1, 38, 16, 57,
+ 1, 6, 16, 39, 38, 6, 7, 7, 13, 13, 39, 43, 2, 43, 57, 2,
+ 50, 9, 44, 9, 50, 4, 15, 48, 44, 4, 1, 15, 48, 14, 14, 1,
+ 45, 45, 8, 3, 5, 8, 51, 47, 3, 46, 46, 47, 5, 51, 1, 17,
+ 17, 58, 1, 58, 2, 52, 52, 2, 53, 7, 59, 6, 6, 56, 53, 55,
+ 7, 55, 1, 54, 59, 56, 54, 10, 1, 10, 4, 60, 1, 60, 8, 4,
+ 8, 64, 64, 61, 1, 63, 3, 63, 62, 61, 5, 11, 5, 3, 11, 62},
+
+ // value table
+ { 1, -1, 0, 1, -1, 2, -2, 1, -1, 1, -1, 0, 3, -3, 1, -1,
+ 2, -2, 1, -1, 1, -1, 4, 1, -4, -1, 2, -2, 1, -1, 5, 3,
+ -3, -5, 2, 1, -2, -1, 1, -1, 6, 2, 1, -1, -6, -2, 1, -1,
+ 3, -3, 2, -2, 4, -4, 1, -1, 1, -1, 1, 2, -1, 2, -2, -2,
+ 7, -7, 1, -1, 3, -3, 8, -8, 1, -1, 5, -5, 3, -3, 1, 4,
+ 2, -4, -1, -2, 1, 1, -1, -1, 9, 1, 1, -9, -1, 1, -1, -1,
+ 1, -1, 3, -3, 1, 3, -3, -1, 3, -3, 1, -1, 10, 1, -10, -1,
+ 1, 4, -1, 2, 1, -1, 1, -2, 1, -4, -1, 6, -6, -1, 1, 1,
+ 1, -1, 1, 1, -1, -1, -1, 1, 11, -1, -2, 4, -1, 2, -11, 5,
+ -5, -4, -1, 1, 4, 1, -4, -1, -2, 2, 1, -1, 12, 1, -2, 1,
+ -12, 4, 2, 1, -1, -4, 4, -4, 2, -2, -1, 1, 7, -1, -1, -7,
+ -1, -3, 1, 3, 1, 5, 2, 1, -1, -5, 13, -2, -1, 2, -2, -13,
+ 1, -1, 5, 6, 5, -5, 1, 1, -6, 1, -1, -1, -5, -1, 14, 2,
+ -2, 1, -14, -1, 8, 1, -1, -8, 1, 5, 1, 5, -5, 1, -1, 1,
+ -5, -1, 15, 1, -1, -1, -1, 3, -15, -3, 6, 1, 16, -1, 6, -6,
+ -6, 1, -1, 1, -16, 1, 7, -1, 1, -1, -6, -3, 6, -7, 3, -1}
},{
- // MapTab3
- 0, // _eobSym
- 35, // _escSym
- // run table
- {0, 1, 1, 2, 2, 3, 3, 4, 4, 1, 1, 5, 5, 6, 6, 7,
- 7, 8, 8, 9, 9, 2, 2, 10, 10, 1, 1, 11, 11, 12, 12, 3,
- 3, 13, 13, 0, 14, 14, 16, 15, 16, 15, 4, 4, 17, 1, 17, 1,
- 5, 5, 18, 18, 2, 2, 6, 6, 8, 19, 7, 8, 7, 19, 20, 20,
- 21, 21, 22, 24, 22, 24, 23, 23, 1, 1, 25, 25, 3, 3, 26, 26,
- 9, 9, 27, 27, 28, 28, 33, 29, 4, 33, 29, 1, 4, 1, 32, 32,
- 2, 2, 31, 10, 30, 10, 30, 31, 34, 34, 5, 5, 36, 36, 35, 41,
- 35, 11, 41, 11, 37, 1, 8, 8, 37, 6, 1, 6, 40, 7, 7, 40,
- 12, 38, 12, 39, 39, 38, 49, 13, 49, 13, 3, 42, 3, 42, 16, 16,
- 43, 43, 14, 14, 1, 1, 44, 15, 44, 15, 2, 2, 57, 48, 50, 48,
- 57, 50, 4, 45, 45, 4, 46, 47, 47, 46, 1, 51, 1, 17, 17, 51,
- 8, 9, 9, 5, 58, 8, 58, 5, 52, 52, 55, 56, 53, 56, 55, 59,
- 59, 53, 54, 1, 6, 54, 7, 7, 6, 1, 2, 3, 2, 3, 64, 60,
- 60, 10, 10, 64, 61, 62, 61, 63, 1, 63, 62, 1, 18, 24, 18, 4,
- 25, 4, 8, 21, 21, 1, 24, 22, 25, 22, 8, 11, 19, 11, 23, 1,
- 20, 23, 19, 20, 5, 12, 5, 1, 16, 2, 12, 13, 2, 13, 1, 16},
-
- // value table
- { 0, 1, -1, 1, -1, 1, -1, 1, -1, 2, -2, 1, -1, 1, -1, 1,
- -1, 1, -1, 1, -1, 2, -2, 1, -1, 3, -3, 1, -1, 1, -1, 2,
- -2, 1, -1, 0, 1, -1, 1, 1, -1, -1, 2, -2, 1, 4, -1, -4,
- 2, -2, 1, -1, -3, 3, 2, -2, 2, 1, 2, -2, -2, -1, 1, -1,
- 1, -1, 1, 1, -1, -1, 1, -1, 5, -5, 1, -1, 3, -3, 1, -1,
- 2, -2, 1, -1, 1, -1, 1, 1, 3, -1, -1, 6, -3, -6, -1, 1,
- 4, -4, 1, 2, 1, -2, -1, -1, 1, -1, 3, -3, 1, -1, 1, 1,
- -1, 2, -1, -2, 1, 7, -3, 3, -1, 3, -7, -3, 1, -3, 3, -1,
- 2, 1, -2, 1, -1, -1, 1, 2, -1, -2, -4, -1, 4, 1, 2, -2,
- 1, -1, -2, 2, 8, -8, -1, 2, 1, -2, -5, 5, 1, -1, -1, 1,
- -1, 1, 4, -1, 1, -4, -1, -1, 1, 1, 9, 1, -9, 2, -2, -1,
- -4, 3, -3, -4, -1, 4, 1, 4, 1, -1, 1, -1, 1, 1, -1, 1,
- -1, -1, -1, 10, 4, 1, 4, -4, -4, -10, 6, 5, -6, -5, 1, -1,
- 1, 3, -3, -1, 1, -1, -1, -1, 11, 1, 1, -11, -2, -2, 2, 5,
- -2, -5, -5, 2, -2, 12, 2, -2, 2, 2, 5, -3, -2, 3, -2, -12,
- -2, 2, 2, 2, -5, 3, 5, 13, -3, 7, -3, -3, -7, 3, -13, 3}
+ // MapTab3
+ 0, // _eobSym
+ 35, // _escSym
+ // run table
+ {0, 1, 1, 2, 2, 3, 3, 4, 4, 1, 1, 5, 5, 6, 6, 7,
+ 7, 8, 8, 9, 9, 2, 2, 10, 10, 1, 1, 11, 11, 12, 12, 3,
+ 3, 13, 13, 0, 14, 14, 16, 15, 16, 15, 4, 4, 17, 1, 17, 1,
+ 5, 5, 18, 18, 2, 2, 6, 6, 8, 19, 7, 8, 7, 19, 20, 20,
+ 21, 21, 22, 24, 22, 24, 23, 23, 1, 1, 25, 25, 3, 3, 26, 26,
+ 9, 9, 27, 27, 28, 28, 33, 29, 4, 33, 29, 1, 4, 1, 32, 32,
+ 2, 2, 31, 10, 30, 10, 30, 31, 34, 34, 5, 5, 36, 36, 35, 41,
+ 35, 11, 41, 11, 37, 1, 8, 8, 37, 6, 1, 6, 40, 7, 7, 40,
+ 12, 38, 12, 39, 39, 38, 49, 13, 49, 13, 3, 42, 3, 42, 16, 16,
+ 43, 43, 14, 14, 1, 1, 44, 15, 44, 15, 2, 2, 57, 48, 50, 48,
+ 57, 50, 4, 45, 45, 4, 46, 47, 47, 46, 1, 51, 1, 17, 17, 51,
+ 8, 9, 9, 5, 58, 8, 58, 5, 52, 52, 55, 56, 53, 56, 55, 59,
+ 59, 53, 54, 1, 6, 54, 7, 7, 6, 1, 2, 3, 2, 3, 64, 60,
+ 60, 10, 10, 64, 61, 62, 61, 63, 1, 63, 62, 1, 18, 24, 18, 4,
+ 25, 4, 8, 21, 21, 1, 24, 22, 25, 22, 8, 11, 19, 11, 23, 1,
+ 20, 23, 19, 20, 5, 12, 5, 1, 16, 2, 12, 13, 2, 13, 1, 16},
+
+ // value table
+ { 0, 1, -1, 1, -1, 1, -1, 1, -1, 2, -2, 1, -1, 1, -1, 1,
+ -1, 1, -1, 1, -1, 2, -2, 1, -1, 3, -3, 1, -1, 1, -1, 2,
+ -2, 1, -1, 0, 1, -1, 1, 1, -1, -1, 2, -2, 1, 4, -1, -4,
+ 2, -2, 1, -1, -3, 3, 2, -2, 2, 1, 2, -2, -2, -1, 1, -1,
+ 1, -1, 1, 1, -1, -1, 1, -1, 5, -5, 1, -1, 3, -3, 1, -1,
+ 2, -2, 1, -1, 1, -1, 1, 1, 3, -1, -1, 6, -3, -6, -1, 1,
+ 4, -4, 1, 2, 1, -2, -1, -1, 1, -1, 3, -3, 1, -1, 1, 1,
+ -1, 2, -1, -2, 1, 7, -3, 3, -1, 3, -7, -3, 1, -3, 3, -1,
+ 2, 1, -2, 1, -1, -1, 1, 2, -1, -2, -4, -1, 4, 1, 2, -2,
+ 1, -1, -2, 2, 8, -8, -1, 2, 1, -2, -5, 5, 1, -1, -1, 1,
+ -1, 1, 4, -1, 1, -4, -1, -1, 1, 1, 9, 1, -9, 2, -2, -1,
+ -4, 3, -3, -4, -1, 4, 1, 4, 1, -1, 1, -1, 1, 1, -1, 1,
+ -1, -1, -1, 10, 4, 1, 4, -4, -4, -10, 6, 5, -6, -5, 1, -1,
+ 1, 3, -3, -1, 1, -1, -1, -1, 11, 1, 1, -11, -2, -2, 2, 5,
+ -2, -5, -5, 2, -2, 12, 2, -2, 2, 2, 5, -3, -2, 3, -2, -12,
+ -2, 2, 2, 2, -5, 3, 5, 13, -3, 7, -3, -3, -7, 3, -13, 3}
},{
- // MapTab4
- 0, // _eobSym
- 34, // _escSym
- // run table
- {0, 1, 1, 1, 2, 2, 1, 3, 3, 1, 1, 1, 4, 4, 1, 5,
- 2, 1, 5, 2, 1, 1, 6, 6, 1, 1, 1, 1, 1, 7, 3, 1,
- 2, 3, 0, 1, 2, 7, 1, 1, 1, 8, 1, 1, 8, 1, 1, 1,
- 9, 1, 9, 1, 2, 1, 1, 2, 1, 1, 10, 4, 1, 10, 1, 4,
- 1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 2, 1, 5, 1, 1, 1,
- 2, 5, 1, 11, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 1, 6, 1, 6, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 12,
- 3, 1, 12, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1,
- 4, 1, 1, 1, 2, 1, 1, 4, 1, 1, 1, 1, 1, 1, 2, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, 1, 1, 5,
- 1, 1, 1, 1, 1, 7, 1, 7, 1, 1, 2, 3, 1, 1, 1, 1,
- 5, 1, 1, 1, 1, 1, 1, 2, 13, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 13, 2, 1, 1, 4, 1, 1, 1,
- 3, 1, 6, 1, 1, 1, 14, 1, 1, 1, 1, 1, 14, 6, 1, 1,
- 1, 1, 15, 2, 4, 1, 2, 3, 15, 1, 1, 1, 8, 1, 1, 8,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1},
-
- // value table
- { 0, 1, -1, 2, 1, -1, -2, 1, -1, 3, -3, 4, 1, -1, -4, 1,
- 2, 5, -1, -2, -5, 6, 1, -1, -6, 7, -7, 8, -8, 1, 2, 9,
- 3, -2, 0, -9, -3, -1, 10, -10, 11, 1, -11, 12, -1, -12, 13, -13,
- 1, 14, -1, -14, 4, 15, -15, -4, 16, -16, 1, 2, 17, -1, -17, -2,
- 18, -18, 19, -19, 20, 3, -20, 21, -21, -3, 5, 22, 2, -22, -23, 23,
- -5, -2, 24, 1, -24, -1, 25, -25, 26, -26, -27, 27, 28, 29, -28, -29,
- 6, 30, 2, -31, -2, -30, 31, -6, -32, 32, 33, -33, 34, -35, -34, 1,
- 4, -36, -1, 35, 37, 36, 7, -37, 38, -4, -38, 39, 41, 40, -40, -39,
- 3, 42, -43, -41, -7, -42, 43, -3, 44, -44, 45, -45, 46, 47, 8, -47,
- -48, -46, 50, -50, 48, 49, 51, -49, 52, -52, 5, -51, -8, -53, 53, 3,
- -56, 56, 55, 54, -54, 2, 60, -2, -55, 58, 9, -5, 59, 57, -57, -63,
- -3, -58, -60, -61, 61, -59, -62, -9, 1, 64, 62, 69, -64, 63, 65, -67,
- -68, 66, -65, 68, -66, -69, 67, -70, -1, 10, 71, -71, 4, 73, 72, 70,
- 6, -76, -3, 74, -78, -74, 1, 78, 80, -72, -75, 76, -1, 3, -73, 79,
- 75, 77, 1, 11, -4, -79, -10, -6, -1, -77, -83, -80, 2, 81, -84, -2,
- 83, -81, 82, -82, 84, -87, -86, 85, -11, -85, 86, -89, 87, -88, 88, 89}
+ // MapTab4
+ 0, // _eobSym
+ 34, // _escSym
+ // run table
+ {0, 1, 1, 1, 2, 2, 1, 3, 3, 1, 1, 1, 4, 4, 1, 5,
+ 2, 1, 5, 2, 1, 1, 6, 6, 1, 1, 1, 1, 1, 7, 3, 1,
+ 2, 3, 0, 1, 2, 7, 1, 1, 1, 8, 1, 1, 8, 1, 1, 1,
+ 9, 1, 9, 1, 2, 1, 1, 2, 1, 1, 10, 4, 1, 10, 1, 4,
+ 1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 2, 1, 5, 1, 1, 1,
+ 2, 5, 1, 11, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 1, 6, 1, 6, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 12,
+ 3, 1, 12, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1,
+ 4, 1, 1, 1, 2, 1, 1, 4, 1, 1, 1, 1, 1, 1, 2, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, 1, 1, 5,
+ 1, 1, 1, 1, 1, 7, 1, 7, 1, 1, 2, 3, 1, 1, 1, 1,
+ 5, 1, 1, 1, 1, 1, 1, 2, 13, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 13, 2, 1, 1, 4, 1, 1, 1,
+ 3, 1, 6, 1, 1, 1, 14, 1, 1, 1, 1, 1, 14, 6, 1, 1,
+ 1, 1, 15, 2, 4, 1, 2, 3, 15, 1, 1, 1, 8, 1, 1, 8,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1},
+
+ // value table
+ { 0, 1, -1, 2, 1, -1, -2, 1, -1, 3, -3, 4, 1, -1, -4, 1,
+ 2, 5, -1, -2, -5, 6, 1, -1, -6, 7, -7, 8, -8, 1, 2, 9,
+ 3, -2, 0, -9, -3, -1, 10, -10, 11, 1, -11, 12, -1, -12, 13, -13,
+ 1, 14, -1, -14, 4, 15, -15, -4, 16, -16, 1, 2, 17, -1, -17, -2,
+ 18, -18, 19, -19, 20, 3, -20, 21, -21, -3, 5, 22, 2, -22, -23, 23,
+ -5, -2, 24, 1, -24, -1, 25, -25, 26, -26, -27, 27, 28, 29, -28, -29,
+ 6, 30, 2, -31, -2, -30, 31, -6, -32, 32, 33, -33, 34, -35, -34, 1,
+ 4, -36, -1, 35, 37, 36, 7, -37, 38, -4, -38, 39, 41, 40, -40, -39,
+ 3, 42, -43, -41, -7, -42, 43, -3, 44, -44, 45, -45, 46, 47, 8, -47,
+ -48, -46, 50, -50, 48, 49, 51, -49, 52, -52, 5, -51, -8, -53, 53, 3,
+ -56, 56, 55, 54, -54, 2, 60, -2, -55, 58, 9, -5, 59, 57, -57, -63,
+ -3, -58, -60, -61, 61, -59, -62, -9, 1, 64, 62, 69, -64, 63, 65, -67,
+ -68, 66, -65, 68, -66, -69, 67, -70, -1, 10, 71, -71, 4, 73, 72, 70,
+ 6, -76, -3, 74, -78, -74, 1, 78, 80, -72, -75, 76, -1, 3, -73, 79,
+ 75, 77, 1, 11, -4, -79, -10, -6, -1, -77, -83, -80, 2, 81, -84, -2,
+ 83, -81, 82, -82, 84, -87, -86, 85, -11, -85, 86, -89, 87, -88, 88, 89}
},{
- // MapTab5
- 2, // _eobSym
- 33, // _escSym
- // run table
- {1, 1, 0, 2, 1, 2, 1, 3, 3, 1, 1, 4, 4, 2, 2, 1,
- 1, 5, 5, 6, 1, 6, 1, 7, 7, 3, 3, 2, 8, 2, 8, 1,
- 1, 0, 9, 9, 1, 1, 10, 4, 10, 4, 11, 11, 2, 1, 2, 1,
- 12, 12, 3, 3, 1, 1, 13, 5, 5, 13, 14, 1, 1, 14, 2, 2,
- 6, 6, 15, 1, 1, 15, 16, 4, 7, 16, 4, 7, 1, 1, 3, 3,
- 8, 8, 2, 2, 1, 1, 17, 17, 1, 1, 18, 18, 5, 5, 2, 2,
- 1, 1, 9, 19, 9, 19, 20, 3, 3, 20, 1, 10, 21, 1, 10, 4,
- 4, 21, 22, 6, 6, 22, 1, 1, 23, 24, 2, 2, 23, 24, 11, 1,
- 1, 11, 7, 25, 7, 1, 1, 25, 8, 8, 3, 26, 3, 1, 12, 2,
- 2, 26, 1, 12, 5, 5, 27, 4, 1, 4, 1, 27, 28, 1, 28, 13,
- 1, 13, 2, 29, 2, 1, 32, 6, 1, 30, 14, 29, 14, 6, 3, 31,
- 3, 1, 30, 1, 32, 31, 33, 9, 33, 1, 1, 7, 9, 7, 2, 2,
- 1, 1, 4, 36, 34, 4, 5, 10, 10, 5, 34, 1, 1, 35, 8, 8,
- 36, 3, 35, 1, 15, 3, 2, 1, 16, 15, 16, 2, 37, 1, 37, 1,
- 1, 1, 6, 6, 38, 1, 38, 11, 1, 39, 39, 40, 11, 2, 41, 4,
- 40, 1, 2, 4, 1, 1, 1, 41, 3, 1, 3, 1, 5, 7, 5, 7},
-
- // value table
- { 1, -1, 0, 1, 2, -1, -2, 1, -1, 3, -3, 1, -1, 2, -2, 4,
- -4, 1, -1, 1, 5, -1, -5, 1, -1, 2, -2, 3, 1, -3, -1, 6,
- -6, 0, 1, -1, 7, -7, 1, 2, -1, -2, 1, -1, 4, 8, -4, -8,
- 1, -1, 3, -3, 9, -9, 1, 2, -2, -1, 1, 10, -10, -1, 5, -5,
- 2, -2, 1, 11, -11, -1, 1, 3, 2, -1, -3, -2, 12, -12, 4, -4,
- 2, -2, -6, 6, 13, -13, 1, -1, 14, -14, 1, -1, 3, -3, 7, -7,
- 15, -15, 2, 1, -2, -1, 1, 5, -5, -1, -16, 2, 1, 16, -2, 4,
- -4, -1, 1, 3, -3, -1, 17, -17, 1, 1, -8, 8, -1, -1, 2, 18,
- -18, -2, 3, 1, -3, 19, -19, -1, 3, -3, 6, 1, -6, 20, 2, 9,
- -9, -1, -20, -2, 4, -4, 1, -5, 21, 5, -21, -1, 1, -22, -1, 2,
- 22, -2, 10, 1, -10, 23, 1, 4, -23, 1, 2, -1, -2, -4, -7, 1,
- 7, -24, -1, 24, -1, -1, 1, 3, -1, -25, 25, 4, -3, -4, 11, -11,
- 26, -26, 6, 1, 1, -6, -5, -3, 3, 5, -1, -27, 27, 1, 4, -4,
- -1, -8, -1, 28, 2, 8, -12, -28, -2, -2, 2, 12, -1, 29, 1, -29,
- 30, -30, 5, -5, 1, -31, -1, 3, 31, -1, 1, 1, -3, -13, 1, -7,
- -1, -32, 13, 7, 32, 33, -33, -1, -9, -34, 9, 34, -6, 5, 6, -5}
+ // MapTab5
+ 2, // _eobSym
+ 33, // _escSym
+ // run table
+ {1, 1, 0, 2, 1, 2, 1, 3, 3, 1, 1, 4, 4, 2, 2, 1,
+ 1, 5, 5, 6, 1, 6, 1, 7, 7, 3, 3, 2, 8, 2, 8, 1,
+ 1, 0, 9, 9, 1, 1, 10, 4, 10, 4, 11, 11, 2, 1, 2, 1,
+ 12, 12, 3, 3, 1, 1, 13, 5, 5, 13, 14, 1, 1, 14, 2, 2,
+ 6, 6, 15, 1, 1, 15, 16, 4, 7, 16, 4, 7, 1, 1, 3, 3,
+ 8, 8, 2, 2, 1, 1, 17, 17, 1, 1, 18, 18, 5, 5, 2, 2,
+ 1, 1, 9, 19, 9, 19, 20, 3, 3, 20, 1, 10, 21, 1, 10, 4,
+ 4, 21, 22, 6, 6, 22, 1, 1, 23, 24, 2, 2, 23, 24, 11, 1,
+ 1, 11, 7, 25, 7, 1, 1, 25, 8, 8, 3, 26, 3, 1, 12, 2,
+ 2, 26, 1, 12, 5, 5, 27, 4, 1, 4, 1, 27, 28, 1, 28, 13,
+ 1, 13, 2, 29, 2, 1, 32, 6, 1, 30, 14, 29, 14, 6, 3, 31,
+ 3, 1, 30, 1, 32, 31, 33, 9, 33, 1, 1, 7, 9, 7, 2, 2,
+ 1, 1, 4, 36, 34, 4, 5, 10, 10, 5, 34, 1, 1, 35, 8, 8,
+ 36, 3, 35, 1, 15, 3, 2, 1, 16, 15, 16, 2, 37, 1, 37, 1,
+ 1, 1, 6, 6, 38, 1, 38, 11, 1, 39, 39, 40, 11, 2, 41, 4,
+ 40, 1, 2, 4, 1, 1, 1, 41, 3, 1, 3, 1, 5, 7, 5, 7},
+
+ // value table
+ { 1, -1, 0, 1, 2, -1, -2, 1, -1, 3, -3, 1, -1, 2, -2, 4,
+ -4, 1, -1, 1, 5, -1, -5, 1, -1, 2, -2, 3, 1, -3, -1, 6,
+ -6, 0, 1, -1, 7, -7, 1, 2, -1, -2, 1, -1, 4, 8, -4, -8,
+ 1, -1, 3, -3, 9, -9, 1, 2, -2, -1, 1, 10, -10, -1, 5, -5,
+ 2, -2, 1, 11, -11, -1, 1, 3, 2, -1, -3, -2, 12, -12, 4, -4,
+ 2, -2, -6, 6, 13, -13, 1, -1, 14, -14, 1, -1, 3, -3, 7, -7,
+ 15, -15, 2, 1, -2, -1, 1, 5, -5, -1, -16, 2, 1, 16, -2, 4,
+ -4, -1, 1, 3, -3, -1, 17, -17, 1, 1, -8, 8, -1, -1, 2, 18,
+ -18, -2, 3, 1, -3, 19, -19, -1, 3, -3, 6, 1, -6, 20, 2, 9,
+ -9, -1, -20, -2, 4, -4, 1, -5, 21, 5, -21, -1, 1, -22, -1, 2,
+ 22, -2, 10, 1, -10, 23, 1, 4, -23, 1, 2, -1, -2, -4, -7, 1,
+ 7, -24, -1, 24, -1, -1, 1, 3, -1, -25, 25, 4, -3, -4, 11, -11,
+ 26, -26, 6, 1, 1, -6, -5, -3, 3, 5, -1, -27, 27, 1, 4, -4,
+ -1, -8, -1, 28, 2, 8, -12, -28, -2, -2, 2, 12, -1, 29, 1, -29,
+ 30, -30, 5, -5, 1, -31, -1, 3, 31, -1, 1, 1, -3, -13, 1, -7,
+ -1, -32, 13, 7, 32, 33, -33, -1, -9, -34, 9, 34, -6, 5, 6, -5}
},{
- // MapTab6
- 2, // _eobSym
- 13, // _escSym
- // run table
- {1, 1, 0, 1, 1, 2, 2, 1, 1, 3, 3, 1, 1, 0, 2, 2,
- 4, 1, 4, 1, 1, 1, 5, 5, 1, 1, 6, 6, 2, 2, 1, 1,
- 3, 3, 7, 7, 1, 1, 8, 8, 1, 1, 2, 2, 1, 9, 1, 9,
- 4, 4, 10, 1, 1, 10, 1, 1, 11, 11, 3, 3, 1, 2, 1, 2,
- 1, 1, 12, 12, 5, 5, 1, 1, 13, 1, 1, 13, 2, 2, 1, 1,
- 6, 6, 1, 1, 4, 14, 4, 14, 3, 1, 3, 1, 1, 1, 15, 7,
- 15, 2, 2, 7, 1, 1, 1, 8, 1, 8, 16, 16, 1, 1, 1, 1,
- 2, 1, 1, 2, 1, 1, 3, 5, 5, 3, 4, 1, 1, 4, 1, 1,
- 17, 17, 9, 1, 1, 9, 2, 2, 1, 1, 10, 10, 1, 6, 1, 1,
- 6, 18, 1, 1, 18, 1, 1, 1, 2, 2, 3, 1, 3, 1, 1, 1,
- 4, 1, 19, 1, 19, 7, 1, 1, 20, 1, 4, 20, 1, 7, 11, 2,
- 1, 11, 21, 2, 8, 5, 1, 8, 1, 5, 21, 1, 1, 1, 22, 1,
- 1, 22, 1, 1, 3, 3, 1, 23, 2, 12, 24, 1, 1, 2, 1, 1,
- 12, 23, 1, 1, 24, 1, 1, 1, 4, 1, 1, 1, 2, 1, 6, 6,
- 4, 2, 1, 1, 1, 1, 1, 1, 1, 14, 13, 3, 1, 25, 9, 25,
- 14, 1, 9, 3, 13, 1, 1, 1, 1, 1, 10, 1, 1, 2, 10, 2},
-
- // value table
- {-20, -1, 0, 2, -2, 1, -1, 3, -3, 1, -1, 4, -4, 0, 2, -2,
- 1, 5, -1, -5, 6, -6, 1, -1, 7, -7, 1, -1, 3, -3, 8, -8,
- 2, -2, 1, -1, 9, -9, 1, -1, 10, -10, 4, -4, 11, 1, -11, -1,
- 2, -2, 1, 12, -12, -1, 13, -13, 1, -1, 3, -3, 14, 5, -14, -5,
- -15, 15, -1, 1, 2, -2, 16, -16, 1, 17, -17, -1, 6, -6, 18, -18,
- 2, -2, -19, 19, -3, 1, 3, -1, 4, 20, -4, 1, -21, 21, 1, 2,
- -1, -7, 7, -2, 22, -22, 23, 2, -23, -2, 1, -1, -24, 24, -25, 25,
- -8, -26, 26, 8, -27, 27, 5, 3, -3, -5, -4, 28, -28, 4, 29, -29,
- 1, -1, -2, -30, 30, 2, 9, -9, -31, 31, 2, -2, -32, 3, 32, -33,
- -3, 1, 33, -34, -1, 34, -35, 35, -10, 10, -6, 36, 6, -36, 37, -37,
- -5, 38, 1, -38, -1, 3, 39, -39, -1, 40, 5, 1, -40, -3, 2, -11,
- -41, -2, 1, 11, -3, -4, 41, 3, 42, 4, -1, -43, -42, 43, 1, -44,
- 45, -1, 44, -45, -7, 7, -46, 1, -12, 2, 1, -47, 46, 12, 47, 48,
- -2, -1, -48, 49, -1, -50, -49, 50, -6, -51, 51, 52, -13, 53, -4, 4,
- 6, 13, -53, -52, -54, 55, 54, -55, -56, -2, 2, -8, 56, 1, -3, -1,
- 2, 58, 3, 8, -2, 57, -58, -60, -59, -57, -3, 60, 59, -14, 3, 14}
+ // MapTab6
+ 2, // _eobSym
+ 13, // _escSym
+ // run table
+ {1, 1, 0, 1, 1, 2, 2, 1, 1, 3, 3, 1, 1, 0, 2, 2,
+ 4, 1, 4, 1, 1, 1, 5, 5, 1, 1, 6, 6, 2, 2, 1, 1,
+ 3, 3, 7, 7, 1, 1, 8, 8, 1, 1, 2, 2, 1, 9, 1, 9,
+ 4, 4, 10, 1, 1, 10, 1, 1, 11, 11, 3, 3, 1, 2, 1, 2,
+ 1, 1, 12, 12, 5, 5, 1, 1, 13, 1, 1, 13, 2, 2, 1, 1,
+ 6, 6, 1, 1, 4, 14, 4, 14, 3, 1, 3, 1, 1, 1, 15, 7,
+ 15, 2, 2, 7, 1, 1, 1, 8, 1, 8, 16, 16, 1, 1, 1, 1,
+ 2, 1, 1, 2, 1, 1, 3, 5, 5, 3, 4, 1, 1, 4, 1, 1,
+ 17, 17, 9, 1, 1, 9, 2, 2, 1, 1, 10, 10, 1, 6, 1, 1,
+ 6, 18, 1, 1, 18, 1, 1, 1, 2, 2, 3, 1, 3, 1, 1, 1,
+ 4, 1, 19, 1, 19, 7, 1, 1, 20, 1, 4, 20, 1, 7, 11, 2,
+ 1, 11, 21, 2, 8, 5, 1, 8, 1, 5, 21, 1, 1, 1, 22, 1,
+ 1, 22, 1, 1, 3, 3, 1, 23, 2, 12, 24, 1, 1, 2, 1, 1,
+ 12, 23, 1, 1, 24, 1, 1, 1, 4, 1, 1, 1, 2, 1, 6, 6,
+ 4, 2, 1, 1, 1, 1, 1, 1, 1, 14, 13, 3, 1, 25, 9, 25,
+ 14, 1, 9, 3, 13, 1, 1, 1, 1, 1, 10, 1, 1, 2, 10, 2},
+
+ // value table
+ {-20, -1, 0, 2, -2, 1, -1, 3, -3, 1, -1, 4, -4, 0, 2, -2,
+ 1, 5, -1, -5, 6, -6, 1, -1, 7, -7, 1, -1, 3, -3, 8, -8,
+ 2, -2, 1, -1, 9, -9, 1, -1, 10, -10, 4, -4, 11, 1, -11, -1,
+ 2, -2, 1, 12, -12, -1, 13, -13, 1, -1, 3, -3, 14, 5, -14, -5,
+ -15, 15, -1, 1, 2, -2, 16, -16, 1, 17, -17, -1, 6, -6, 18, -18,
+ 2, -2, -19, 19, -3, 1, 3, -1, 4, 20, -4, 1, -21, 21, 1, 2,
+ -1, -7, 7, -2, 22, -22, 23, 2, -23, -2, 1, -1, -24, 24, -25, 25,
+ -8, -26, 26, 8, -27, 27, 5, 3, -3, -5, -4, 28, -28, 4, 29, -29,
+ 1, -1, -2, -30, 30, 2, 9, -9, -31, 31, 2, -2, -32, 3, 32, -33,
+ -3, 1, 33, -34, -1, 34, -35, 35, -10, 10, -6, 36, 6, -36, 37, -37,
+ -5, 38, 1, -38, -1, 3, 39, -39, -1, 40, 5, 1, -40, -3, 2, -11,
+ -41, -2, 1, 11, -3, -4, 41, 3, 42, 4, -1, -43, -42, 43, 1, -44,
+ 45, -1, 44, -45, -7, 7, -46, 1, -12, 2, 1, -47, 46, 12, 47, 48,
+ -2, -1, -48, 49, -1, -50, -49, 50, -6, -51, 51, 52, -13, 53, -4, 4,
+ 6, 13, -53, -52, -54, 55, 54, -55, -56, -2, 2, -8, 56, 1, -3, -1,
+ 2, 58, 3, 8, -2, 57, -58, -60, -59, -57, -3, 60, 59, -14, 3, 14}
},{
- // MapTab7
- 2, // _eobSym
- 38, // _escSym
- // run table
- {1, 1, 0, 2, 2, 1, 1, 3, 3, 4, 4, 5, 5, 1, 1, 6,
- 6, 2, 2, 7, 7, 8, 8, 1, 1, 3, 3, 9, 9, 10, 10, 1,
- 1, 2, 2, 4, 4, 11, 0, 11, 12, 12, 13, 13, 1, 1, 5, 5,
- 14, 14, 15, 16, 15, 16, 3, 3, 1, 6, 1, 6, 2, 2, 7, 7,
- 8, 8, 17, 17, 1, 1, 4, 4, 18, 18, 2, 2, 1, 19, 1, 20,
- 19, 20, 21, 21, 3, 3, 22, 22, 5, 5, 24, 1, 1, 23, 9, 23,
- 24, 9, 2, 2, 10, 1, 1, 10, 6, 6, 25, 4, 4, 25, 7, 7,
- 26, 8, 1, 8, 3, 1, 26, 3, 11, 11, 27, 27, 2, 28, 1, 2,
- 28, 1, 12, 12, 5, 5, 29, 13, 13, 29, 32, 1, 1, 33, 31, 30,
- 32, 4, 30, 33, 4, 31, 3, 14, 1, 1, 3, 34, 34, 2, 2, 14,
- 6, 6, 35, 36, 35, 36, 1, 15, 1, 16, 16, 15, 7, 9, 7, 9,
- 37, 8, 8, 37, 1, 1, 39, 2, 38, 39, 2, 40, 5, 38, 40, 5,
- 3, 3, 4, 4, 10, 10, 1, 1, 1, 1, 41, 2, 41, 2, 6, 6,
- 1, 1, 11, 42, 11, 43, 3, 42, 3, 17, 4, 43, 1, 17, 7, 1,
- 8, 44, 4, 7, 44, 5, 8, 2, 5, 1, 2, 48, 45, 1, 12, 45,
- 12, 48, 13, 13, 1, 9, 9, 46, 1, 46, 47, 47, 49, 18, 18, 49},
-
- // value table
- { 1, -1, 0, 1, -1, 2, -2, 1, -1, 1, -1, 1, -1, 3, -3, 1,
- -1, -2, 2, 1, -1, 1, -1, 4, -4, -2, 2, 1, -1, 1, -1, 5,
- -5, -3, 3, 2, -2, 1, 0, -1, 1, -1, 1, -1, 6, -6, 2, -2,
- 1, -1, 1, 1, -1, -1, -3, 3, 7, 2, -7, -2, -4, 4, 2, -2,
- 2, -2, 1, -1, 8, -8, 3, -3, 1, -1, -5, 5, 9, 1, -9, 1,
- -1, -1, 1, -1, -4, 4, 1, -1, 3, -3, 1, -10, 10, 1, 2, -1,
- -1, -2, 6, -6, 2, 11, -11, -2, 3, -3, 1, -4, 4, -1, 3, -3,
- 1, 3, 12, -3, -5, -12, -1, 5, 2, -2, 1, -1, -7, 1, 13, 7,
- -1, -13, 2, -2, 4, -4, 1, 2, -2, -1, 1, 14, -14, 1, 1, 1,
- -1, -5, -1, -1, 5, -1, -6, 2, -15, 15, 6, 1, -1, -8, 8, -2,
- -4, 4, 1, 1, -1, -1, 16, 2, -16, -2, 2, -2, 4, 3, -4, -3,
- -1, -4, 4, 1, -17, 17, -1, -9, 1, 1, 9, 1, -5, -1, -1, 5,
- -7, 7, 6, -6, 3, -3, 18, -18, 19, -19, 1, -10, -1, 10, -5, 5,
- 20, -20, -3, 1, 3, 1, 8, -1, -8, 2, 7, -1, -21, -2, 5, 21,
- 5, -1, -7, -5, 1, -6, -5, -11, 6, 22, 11, 1, 1, -22, -3, -1,
- 3, -1, 3, -3, -23, 4, -4, 1, 23, -1, 1, -1, 1, -2, 2, -1}
+ // MapTab7
+ 2, // _eobSym
+ 38, // _escSym
+ // run table
+ {1, 1, 0, 2, 2, 1, 1, 3, 3, 4, 4, 5, 5, 1, 1, 6,
+ 6, 2, 2, 7, 7, 8, 8, 1, 1, 3, 3, 9, 9, 10, 10, 1,
+ 1, 2, 2, 4, 4, 11, 0, 11, 12, 12, 13, 13, 1, 1, 5, 5,
+ 14, 14, 15, 16, 15, 16, 3, 3, 1, 6, 1, 6, 2, 2, 7, 7,
+ 8, 8, 17, 17, 1, 1, 4, 4, 18, 18, 2, 2, 1, 19, 1, 20,
+ 19, 20, 21, 21, 3, 3, 22, 22, 5, 5, 24, 1, 1, 23, 9, 23,
+ 24, 9, 2, 2, 10, 1, 1, 10, 6, 6, 25, 4, 4, 25, 7, 7,
+ 26, 8, 1, 8, 3, 1, 26, 3, 11, 11, 27, 27, 2, 28, 1, 2,
+ 28, 1, 12, 12, 5, 5, 29, 13, 13, 29, 32, 1, 1, 33, 31, 30,
+ 32, 4, 30, 33, 4, 31, 3, 14, 1, 1, 3, 34, 34, 2, 2, 14,
+ 6, 6, 35, 36, 35, 36, 1, 15, 1, 16, 16, 15, 7, 9, 7, 9,
+ 37, 8, 8, 37, 1, 1, 39, 2, 38, 39, 2, 40, 5, 38, 40, 5,
+ 3, 3, 4, 4, 10, 10, 1, 1, 1, 1, 41, 2, 41, 2, 6, 6,
+ 1, 1, 11, 42, 11, 43, 3, 42, 3, 17, 4, 43, 1, 17, 7, 1,
+ 8, 44, 4, 7, 44, 5, 8, 2, 5, 1, 2, 48, 45, 1, 12, 45,
+ 12, 48, 13, 13, 1, 9, 9, 46, 1, 46, 47, 47, 49, 18, 18, 49},
+
+ // value table
+ { 1, -1, 0, 1, -1, 2, -2, 1, -1, 1, -1, 1, -1, 3, -3, 1,
+ -1, -2, 2, 1, -1, 1, -1, 4, -4, -2, 2, 1, -1, 1, -1, 5,
+ -5, -3, 3, 2, -2, 1, 0, -1, 1, -1, 1, -1, 6, -6, 2, -2,
+ 1, -1, 1, 1, -1, -1, -3, 3, 7, 2, -7, -2, -4, 4, 2, -2,
+ 2, -2, 1, -1, 8, -8, 3, -3, 1, -1, -5, 5, 9, 1, -9, 1,
+ -1, -1, 1, -1, -4, 4, 1, -1, 3, -3, 1, -10, 10, 1, 2, -1,
+ -1, -2, 6, -6, 2, 11, -11, -2, 3, -3, 1, -4, 4, -1, 3, -3,
+ 1, 3, 12, -3, -5, -12, -1, 5, 2, -2, 1, -1, -7, 1, 13, 7,
+ -1, -13, 2, -2, 4, -4, 1, 2, -2, -1, 1, 14, -14, 1, 1, 1,
+ -1, -5, -1, -1, 5, -1, -6, 2, -15, 15, 6, 1, -1, -8, 8, -2,
+ -4, 4, 1, 1, -1, -1, 16, 2, -16, -2, 2, -2, 4, 3, -4, -3,
+ -1, -4, 4, 1, -17, 17, -1, -9, 1, 1, 9, 1, -5, -1, -1, 5,
+ -7, 7, 6, -6, 3, -3, 18, -18, 19, -19, 1, -10, -1, 10, -5, 5,
+ 20, -20, -3, 1, 3, 1, 8, -1, -8, 2, 7, -1, -21, -2, 5, 21,
+ 5, -1, -7, -5, 1, -6, -5, -11, 6, 22, 11, 1, 1, -22, -3, -1,
+ 3, -1, 3, -3, -23, 4, -4, 1, 23, -1, 1, -1, 1, -2, 2, -1}
},{
- // MapTab8
- 4, // _eobSym
- 11, // _escSym
- // run table
- {1, 1, 1, 1, 0, 2, 2, 1, 1, 3, 3, 0, 1, 1, 2, 2,
- 4, 4, 1, 1, 5, 5, 1, 1, 2, 2, 3, 3, 6, 6, 1, 1,
- 7, 7, 8, 1, 8, 2, 2, 1, 4, 4, 1, 3, 1, 3, 9, 9,
- 2, 2, 1, 5, 1, 5, 10, 10, 1, 1, 11, 11, 3, 6, 3, 4,
- 4, 6, 2, 2, 1, 12, 1, 12, 7, 13, 7, 13, 1, 1, 8, 8,
- 2, 2, 14, 14, 16, 15, 16, 5, 5, 1, 3, 15, 1, 3, 4, 4,
- 1, 1, 17, 17, 2, 2, 6, 6, 1, 18, 1, 18, 22, 21, 22, 21,
- 25, 24, 25, 19, 9, 20, 9, 23, 19, 24, 20, 3, 23, 7, 3, 1,
- 1, 7, 28, 26, 29, 5, 28, 26, 5, 8, 29, 4, 8, 27, 2, 2,
- 4, 27, 1, 1, 10, 36, 10, 33, 33, 36, 30, 1, 32, 32, 1, 30,
- 6, 31, 31, 35, 3, 6, 11, 11, 3, 2, 35, 2, 34, 1, 34, 1,
- 37, 37, 12, 7, 12, 5, 41, 5, 4, 7, 1, 8, 13, 4, 1, 41,
- 13, 38, 8, 38, 9, 1, 40, 40, 9, 1, 39, 2, 2, 49, 39, 42,
- 3, 3, 14, 16, 49, 14, 16, 42, 43, 43, 6, 6, 15, 1, 1, 15,
- 44, 44, 1, 1, 50, 48, 4, 5, 4, 7, 5, 2, 10, 10, 48, 7,
- 50, 45, 2, 1, 45, 8, 8, 1, 46, 46, 3, 47, 47, 3, 1, 1},
-
- // value table
- { 1, -1, 2, -2, 0, 1, -1, 3, -3, 1, -1, 0, 4, -4, 2, -2,
- 1, -1, 5, -5, 1, -1, 6, -6, 3, -3, 2, -2, 1, -1, 7, -7,
- 1, -1, 1, 8, -1, 4, -4, -8, 2, -2, 9, 3, -9, -3, 1, -1,
- 5, -5, 10, 2, -10, -2, 1, -1, 11, -11, 1, -1, -4, 2, 4, 3,
- -3, -2, 6, -6, 12, 1, -12, -1, 2, 1, -2, -1, 13, -13, 2, -2,
- 7, -7, 1, -1, 1, 1, -1, 3, -3, 14, 5, -1, -14, -5, 4, -4,
- 15, -15, 1, -1, 8, -8, -3, 3, 16, 1, -16, -1, 1, 1, -1, -1,
- 1, 1, -1, 1, 2, 1, -2, 1, -1, -1, -1, 6, -1, 3, -6, 17,
- -17, -3, 1, 1, 1, 4, -1, -1, -4, 3, -1, 5, -3, -1, -9, 9,
- -5, 1, 18, -18, 2, 1, -2, 1, -1, -1, 1, 19, -1, 1, -19, -1,
- 4, 1, -1, 1, 7, -4, -2, 2, -7, 10, -1, -10, 1, 20, -1, -20,
- 1, -1, 2, 4, -2, 5, 1, -5, 6, -4, 21, 4, 2, -6, -21, -1,
- -2, 1, -4, -1, -3, 22, -1, 1, 3, -22, -1, 11, -11, 1, 1, 1,
- 8, -8, 2, 2, -1, -2, -2, -1, 1, -1, -5, 5, 2, 23, -23, -2,
- 1, -1, 24, -24, -1, -1, 7, 6, -7, 5, -6, 12, -3, 3, 1, -5,
- 1, 1, -12, 25, -1, -5, 5, -25, -1, 1, 9, 1, -1, -9, 26, -26}
+ // MapTab8
+ 4, // _eobSym
+ 11, // _escSym
+ // run table
+ {1, 1, 1, 1, 0, 2, 2, 1, 1, 3, 3, 0, 1, 1, 2, 2,
+ 4, 4, 1, 1, 5, 5, 1, 1, 2, 2, 3, 3, 6, 6, 1, 1,
+ 7, 7, 8, 1, 8, 2, 2, 1, 4, 4, 1, 3, 1, 3, 9, 9,
+ 2, 2, 1, 5, 1, 5, 10, 10, 1, 1, 11, 11, 3, 6, 3, 4,
+ 4, 6, 2, 2, 1, 12, 1, 12, 7, 13, 7, 13, 1, 1, 8, 8,
+ 2, 2, 14, 14, 16, 15, 16, 5, 5, 1, 3, 15, 1, 3, 4, 4,
+ 1, 1, 17, 17, 2, 2, 6, 6, 1, 18, 1, 18, 22, 21, 22, 21,
+ 25, 24, 25, 19, 9, 20, 9, 23, 19, 24, 20, 3, 23, 7, 3, 1,
+ 1, 7, 28, 26, 29, 5, 28, 26, 5, 8, 29, 4, 8, 27, 2, 2,
+ 4, 27, 1, 1, 10, 36, 10, 33, 33, 36, 30, 1, 32, 32, 1, 30,
+ 6, 31, 31, 35, 3, 6, 11, 11, 3, 2, 35, 2, 34, 1, 34, 1,
+ 37, 37, 12, 7, 12, 5, 41, 5, 4, 7, 1, 8, 13, 4, 1, 41,
+ 13, 38, 8, 38, 9, 1, 40, 40, 9, 1, 39, 2, 2, 49, 39, 42,
+ 3, 3, 14, 16, 49, 14, 16, 42, 43, 43, 6, 6, 15, 1, 1, 15,
+ 44, 44, 1, 1, 50, 48, 4, 5, 4, 7, 5, 2, 10, 10, 48, 7,
+ 50, 45, 2, 1, 45, 8, 8, 1, 46, 46, 3, 47, 47, 3, 1, 1},
+
+ // value table
+ { 1, -1, 2, -2, 0, 1, -1, 3, -3, 1, -1, 0, 4, -4, 2, -2,
+ 1, -1, 5, -5, 1, -1, 6, -6, 3, -3, 2, -2, 1, -1, 7, -7,
+ 1, -1, 1, 8, -1, 4, -4, -8, 2, -2, 9, 3, -9, -3, 1, -1,
+ 5, -5, 10, 2, -10, -2, 1, -1, 11, -11, 1, -1, -4, 2, 4, 3,
+ -3, -2, 6, -6, 12, 1, -12, -1, 2, 1, -2, -1, 13, -13, 2, -2,
+ 7, -7, 1, -1, 1, 1, -1, 3, -3, 14, 5, -1, -14, -5, 4, -4,
+ 15, -15, 1, -1, 8, -8, -3, 3, 16, 1, -16, -1, 1, 1, -1, -1,
+ 1, 1, -1, 1, 2, 1, -2, 1, -1, -1, -1, 6, -1, 3, -6, 17,
+ -17, -3, 1, 1, 1, 4, -1, -1, -4, 3, -1, 5, -3, -1, -9, 9,
+ -5, 1, 18, -18, 2, 1, -2, 1, -1, -1, 1, 19, -1, 1, -19, -1,
+ 4, 1, -1, 1, 7, -4, -2, 2, -7, 10, -1, -10, 1, 20, -1, -20,
+ 1, -1, 2, 4, -2, 5, 1, -5, 6, -4, 21, 4, 2, -6, -21, -1,
+ -2, 1, -4, -1, -3, 22, -1, 1, 3, -22, -1, 11, -11, 1, 1, 1,
+ 8, -8, 2, 2, -1, -2, -2, -1, 1, -1, -5, 5, 2, 23, -23, -2,
+ 1, -1, 24, -24, -1, -1, 7, 6, -7, 5, -6, 12, -3, 3, 1, -5,
+ 1, 1, -12, 25, -1, -5, 5, -25, -1, 1, 9, 1, -1, -9, 26, -26}
}
};
diff --git a/image/codecs/indeo/indeo.h b/image/codecs/indeo/indeo.h
index bff5501bcb..3b0b1854f5 100644
--- a/image/codecs/indeo/indeo.h
+++ b/image/codecs/indeo/indeo.h
@@ -46,18 +46,18 @@ namespace Indeo {
* Indeo 4 frame types.
*/
enum {
- IVI4_FRAMETYPE_INTRA = 0,
- IVI4_FRAMETYPE_INTRA1 = 1, ///< intra frame with slightly different bitstream coding
- IVI4_FRAMETYPE_INTER = 2, ///< non-droppable P-frame
- IVI4_FRAMETYPE_BIDIR = 3, ///< bidirectional frame
- IVI4_FRAMETYPE_INTER_NOREF = 4, ///< droppable P-frame
- IVI4_FRAMETYPE_NULL_FIRST = 5, ///< empty frame with no data
- IVI4_FRAMETYPE_NULL_LAST = 6 ///< empty frame with no data
+ IVI4_FRAMETYPE_INTRA = 0,
+ IVI4_FRAMETYPE_INTRA1 = 1, ///< intra frame with slightly different bitstream coding
+ IVI4_FRAMETYPE_INTER = 2, ///< non-droppable P-frame
+ IVI4_FRAMETYPE_BIDIR = 3, ///< bidirectional frame
+ IVI4_FRAMETYPE_INTER_NOREF = 4, ///< droppable P-frame
+ IVI4_FRAMETYPE_NULL_FIRST = 5, ///< empty frame with no data
+ IVI4_FRAMETYPE_NULL_LAST = 6 ///< empty frame with no data
};
enum {
- IVI_MB_HUFF = 0, /// Huffman table is used for coding macroblocks
- IVI_BLK_HUFF = 1 /// Huffman table is used for coding blocks
+ IVI_MB_HUFF = 0, /// Huffman table is used for coding macroblocks
+ IVI_BLK_HUFF = 1 /// Huffman table is used for coding blocks
};
/**
@@ -83,16 +83,16 @@ typedef void (*IviMCAvgFunc)(int16 *buf, const int16 *refBuf1, const int16 *refB
* calculate number of macroblocks in a tile
*/
#define IVI_MBs_PER_TILE(tileWidth, tileHeight, mbSize) \
- ((((tileWidth) + (mbSize) - 1) / (mbSize)) * (((tileHeight) + (mbSize) - 1) / (mbSize)))
+ ((((tileWidth) + (mbSize) - 1) / (mbSize)) * (((tileHeight) + (mbSize) - 1) / (mbSize)))
/**
* huffman codebook descriptor
*/
struct IVIHuffDesc {
- int32 _numRows;
- uint8 _xBits[16];
+ int32 _numRows;
+ uint8 _xBits[16];
- /*
+ /**
* Generate a huffman codebook from the given descriptor
* and convert it into the FFmpeg VLC table.
*
@@ -102,7 +102,7 @@ struct IVIHuffDesc {
*/
int createHuffFromDesc(VLC *vlc, bool flag) const;
- /*
+ /**
* Compare two huffman codebook descriptors.
*
* @param[in] desc2 Ptr to the 2nd descriptor to compare
@@ -110,7 +110,7 @@ struct IVIHuffDesc {
*/
bool huffDescCompare(const IVIHuffDesc *desc2) const;
- /*
+ /**
* Copy huffman codebook descriptors.
*
* @param[in] src ptr to the source descriptor
@@ -127,11 +127,11 @@ struct IVIHuffTab {
public:
int32 _tabSel; /// index of one of the predefined tables
/// or "7" for custom one
- VLC * _tab; /// pointer to the table associated with tab_sel
+ VLC * _tab; /// pointer to the table associated with tab_sel
- /// the following are used only when tab_sel == 7
- IVIHuffDesc _custDesc; /// custom Huffman codebook descriptor
- VLC _custTab; /// vlc table for custom codebook
+ /// the following are used only when tab_sel == 7
+ IVIHuffDesc _custDesc; /// custom Huffman codebook descriptor
+ VLC _custTab; /// vlc table for custom codebook
/**
* Constructor
@@ -154,26 +154,26 @@ public:
* run-value (RLE) table descriptor
*/
struct RVMapDesc {
- uint8 _eobSym; ///< end of block symbol
- uint8 _escSym; ///< escape symbol
- uint8 _runtab[256];
- int8 _valtab[256];
+ uint8 _eobSym; ///< end of block symbol
+ uint8 _escSym; ///< escape symbol
+ uint8 _runtab[256];
+ int8 _valtab[256];
};
/**
* information for Indeo macroblock (16x16, 8x8 or 4x4)
*/
struct IVIMbInfo {
- int16 _xPos;
- int16 _yPos;
- uint32 _bufOffs; ///< address in the output buffer for this mb
- uint8 _type; ///< macroblock type: 0 - INTRA, 1 - INTER
- uint8 _cbp; ///< coded block pattern
- int8 _qDelta; ///< quant delta
- int8 _mvX; ///< motion vector (x component)
- int8 _mvY; ///< motion vector (y component)
- int8 _bMvX; ///< second motion vector (x component)
- int8 _bMvY; ///< second motion vector (y component)
+ int16 _xPos;
+ int16 _yPos;
+ uint32 _bufOffs; ///< address in the output buffer for this mb
+ uint8 _type; ///< macroblock type: 0 - INTRA, 1 - INTER
+ uint8 _cbp; ///< coded block pattern
+ int8 _qDelta; ///< quant delta
+ int8 _mvX; ///< motion vector (x component)
+ int8 _mvY; ///< motion vector (y component)
+ int8 _bMvX; ///< second motion vector (x component)
+ int8 _bMvY; ///< second motion vector (y component)
IVIMbInfo();
};
@@ -182,16 +182,16 @@ struct IVIMbInfo {
* information for Indeo tile
*/
struct IVITile {
- int _xPos;
- int _yPos;
- int _width;
- int _height;
- int _mbSize;
- bool _isEmpty;
- int _dataSize; ///< size of the data in bytes
- int _numMBs; ///< number of macroblocks in this tile
- IVIMbInfo * _mbs; ///< array of macroblock descriptors
- IVIMbInfo * _refMbs; ///< ptr to the macroblock descriptors of the reference tile
+ int _xPos;
+ int _yPos;
+ int _width;
+ int _height;
+ int _mbSize;
+ bool _isEmpty;
+ int _dataSize; ///< size of the data in bytes
+ int _numMBs; ///< number of macroblocks in this tile
+ IVIMbInfo * _mbs; ///< array of macroblock descriptors
+ IVIMbInfo * _refMbs; ///< ptr to the macroblock descriptors of the reference tile
IVITile();
};
@@ -200,49 +200,49 @@ struct IVITile {
* information for Indeo wavelet band
*/
struct IVIBandDesc {
- int _plane; ///< plane number this band belongs to
- int _bandNum; ///< band number
- int _width;
- int _height;
- int _aHeight; ///< aligned band height
- const uint8 * _dataPtr; ///< ptr to the first byte of the band data
- int _dataSize; ///< size of the band data
- int16 * _buf; ///< pointer to the output buffer for this band
- int16 * _refBuf; ///< pointer to the reference frame buffer (for motion compensation)
- int16 * _bRefBuf; ///< pointer to the second reference frame buffer (for motion compensation)
- int16 * _bufs[4]; ///< array of pointers to the band buffers
- int _pitch; ///< _pitch associated with the buffers above
- bool _isEmpty;
- int _mbSize; ///< macroblock size
- int _blkSize; ///< block size
- uint8 _isHalfpel; ///< precision of the motion compensation: 0 - fullpel, 1 - halfpel
- bool _inheritMv; ///< tells if motion vector is inherited from reference macroblock
- bool _inheritQDelta; ///< tells if quantiser delta is inherited from reference macroblock
- bool _qdeltaPresent; ///< tells if Qdelta signal is present in the bitstream (Indeo5 only)
- int _quantMat; ///< dequant matrix index
- int _globQuant; ///< quant base for this band
- const uint8 * _scan; ///< ptr to the scan pattern
- int _scanSize; ///< size of the scantable
-
- IVIHuffTab _blkVlc; ///< vlc table for decoding block data
-
- int _numCorr; ///< number of correction entries
- uint8 _corr[61 * 2]; ///< rvmap correction pairs
- int _rvmapSel; ///< rvmap table selector
- RVMapDesc * _rvMap; ///< ptr to the RLE table for this band
- int _numTiles; ///< number of tiles in this band
- IVITile * _tiles; ///< array of tile descriptors
- InvTransformPtr *_invTransform;
- int _transformSize;
- DCTransformPtr *_dcTransform;
- bool _is2dTrans;
- int32 _checksum; ///< for debug purposes
- int _checksumPresent;
- int _bufSize; ///< band buffer size in bytes
- const uint16 * _intraBase; ///< quantization matrix for intra blocks
- const uint16 * _interBase; ///< quantization matrix for inter blocks
- const uint8 * _intraScale; ///< quantization coefficient for intra blocks
- const uint8 * _interScale; ///< quantization coefficient for inter blocks
+ int _plane; ///< plane number this band belongs to
+ int _bandNum; ///< band number
+ int _width;
+ int _height;
+ int _aHeight; ///< aligned band height
+ const uint8 * _dataPtr; ///< ptr to the first byte of the band data
+ int _dataSize; ///< size of the band data
+ int16 * _buf; ///< pointer to the output buffer for this band
+ int16 * _refBuf; ///< pointer to the reference frame buffer (for motion compensation)
+ int16 * _bRefBuf; ///< pointer to the second reference frame buffer (for motion compensation)
+ int16 * _bufs[4]; ///< array of pointers to the band buffers
+ int _pitch; ///< _pitch associated with the buffers above
+ bool _isEmpty;
+ int _mbSize; ///< macroblock size
+ int _blkSize; ///< block size
+ uint8 _isHalfpel; ///< precision of the motion compensation: 0 - fullpel, 1 - halfpel
+ bool _inheritMv; ///< tells if motion vector is inherited from reference macroblock
+ bool _inheritQDelta; ///< tells if quantiser delta is inherited from reference macroblock
+ bool _qdeltaPresent; ///< tells if Qdelta signal is present in the bitstream (Indeo5 only)
+ int _quantMat; ///< dequant matrix index
+ int _globQuant; ///< quant base for this band
+ const uint8 * _scan; ///< ptr to the scan pattern
+ int _scanSize; ///< size of the scantable
+
+ IVIHuffTab _blkVlc; ///< vlc table for decoding block data
+
+ int _numCorr; ///< number of correction entries
+ uint8 _corr[61 * 2]; ///< rvmap correction pairs
+ int _rvmapSel; ///< rvmap table selector
+ RVMapDesc * _rvMap; ///< ptr to the RLE table for this band
+ int _numTiles; ///< number of tiles in this band
+ IVITile * _tiles; ///< array of tile descriptors
+ InvTransformPtr *_invTransform;
+ int _transformSize;
+ DCTransformPtr *_dcTransform;
+ bool _is2dTrans;
+ int32 _checksum; ///< for debug purposes
+ int _checksumPresent;
+ int _bufSize; ///< band buffer size in bytes
+ const uint16 * _intraBase; ///< quantization matrix for intra blocks
+ const uint16 * _interBase; ///< quantization matrix for inter blocks
+ const uint8 * _intraScale; ///< quantization coefficient for intra blocks
+ const uint8 * _interScale; ///< quantization coefficient for inter blocks
IVIBandDesc();
@@ -250,14 +250,14 @@ struct IVIBandDesc {
};
struct IVIPicConfig {
- uint16 _picWidth;
- uint16 _picHeight;
- uint16 _chromaWidth;
- uint16 _chromaHeight;
- uint16 _tileWidth;
- uint16 _tileHeight;
- uint8 _lumaBands;
- uint8 _chromaBands;
+ uint16 _picWidth;
+ uint16 _picHeight;
+ uint16 _chromaWidth;
+ uint16 _chromaHeight;
+ uint16 _tileWidth;
+ uint16 _tileHeight;
+ uint8 _lumaBands;
+ uint8 _chromaBands;
IVIPicConfig();
@@ -271,10 +271,10 @@ struct IVIPicConfig {
* color plane (luma or chroma) information
*/
struct IVIPlaneDesc {
- uint16 _width;
- uint16 _height;
- uint8 _numBands; ///< number of bands this plane subdivided into
- IVIBandDesc * _bands; ///< array of band descriptors
+ uint16 _width;
+ uint16 _height;
+ uint8 _numBands; ///< number of bands this plane subdivided into
+ IVIBandDesc * _bands; ///< array of band descriptors
IVIPlaneDesc();
@@ -282,7 +282,7 @@ struct IVIPlaneDesc {
static int initTiles(IVIPlaneDesc *planes, int tileWidth, int tileHeight);
- /*
+ /**
* Free planes, bands and macroblocks buffers.
*
* @param[in] planes pointer to the array of the plane descriptors
@@ -309,35 +309,35 @@ struct AVFrame {
#define AV_NUM_DATA_POINTERS 3
/**
- * pointer to the picture/channel planes.
- * This might be different from the first allocated byte
- *
- * Some decoders access areas outside 0,0 - width,height, please
- * see avcodec_align_dimensions2(). Some filters and swscale can read
- * up to 16 bytes beyond the planes, if these filters are to be used,
- * then 16 extra bytes must be allocated.
- *
- * NOTE: Except for hwaccel formats, pointers not needed by the format
- * MUST be set to NULL.
- */
+ * pointer to the picture/channel planes.
+ * This might be different from the first allocated byte
+ *
+ * Some decoders access areas outside 0,0 - width,height, please
+ * see avcodec_align_dimensions2(). Some filters and swscale can read
+ * up to 16 bytes beyond the planes, if these filters are to be used,
+ * then 16 extra bytes must be allocated.
+ *
+ * NOTE: Except for hwaccel formats, pointers not needed by the format
+ * MUST be set to NULL.
+ */
uint8 *_data[AV_NUM_DATA_POINTERS];
- /**
- * For video, size in bytes of each picture line.
- * For audio, size in bytes of each plane.
- *
- * For audio, only linesize[0] may be set. For planar audio, each channel
- * plane must be the same size.
- *
- * For video the linesizes should be multiples of the CPUs alignment
- * preference, this is 16 or 32 for modern desktop CPUs.
- * Some code requires such alignment other code can be slower without
- * correct alignment, for yet other it makes no difference.
- *
- * @note The linesize may be larger than the size of usable data -- there
- * may be extra padding present for performance reasons.
- */
- int _linesize[AV_NUM_DATA_POINTERS];
+ /**
+ * For video, size in bytes of each picture line.
+ * For audio, size in bytes of each plane.
+ *
+ * For audio, only linesize[0] may be set. For planar audio, each channel
+ * plane must be the same size.
+ *
+ * For video the linesizes should be multiples of the CPUs alignment
+ * preference, this is 16 or 32 for modern desktop CPUs.
+ * Some code requires such alignment other code can be slower without
+ * correct alignment, for yet other it makes no difference.
+ *
+ * @note The linesize may be larger than the size of usable data -- there
+ * may be extra padding present for performance reasons.
+ */
+ int _linesize[AV_NUM_DATA_POINTERS];
/**
* Constructor
@@ -372,56 +372,56 @@ private:
VLC _iviMbVlcTabs[8]; ///< static macroblock Huffman tables
VLC _iviBlkVlcTabs[8]; ///< static block Huffman tables
public:
- GetBits * _gb;
- RVMapDesc _rvmapTabs[9]; ///< local corrected copy of the static rvmap tables
-
- uint32 _frameNum;
- int _frameType;
- int _prevFrameType; ///< frame type of the previous frame
- uint32 _dataSize; ///< size of the frame data in bytes from picture header
- int _isScalable;
- const uint8 * _frameData; ///< input frame data pointer
- int _interScal; ///< signals a sequence of scalable inter frames
- uint32 _frameSize; ///< frame size in bytes
- uint32 _picHdrSize; ///< picture header size in bytes
- uint8 _frameFlags;
- uint16 _checksum; ///< frame _checksum
-
- IVIPicConfig _picConf;
- IVIPlaneDesc _planes[3]; ///< color planes
-
- int _bufSwitch; ///< used to switch between three buffers
- int _dstBuf; ///< buffer index for the currently decoded frame
- int _refBuf; ///< inter frame reference buffer index
- int _ref2Buf; ///< temporal storage for switching buffers
- int _bRefBuf; ///< second reference frame buffer index
-
- IVIHuffTab _mbVlc; ///< current macroblock table descriptor
- IVIHuffTab _blkVlc; ///< current block table descriptor
-
- uint8 _rvmapSel;
- bool _inImf;
- bool _inQ; ///< flag for explicitly stored quantiser delta
- uint8 _picGlobQuant;
- uint8 _unknown1;
-
- uint16 _gopHdrSize;
- uint8 _gopFlags;
- uint32 _lockWord;
-
- bool _hasBFrames;
- bool _hasTransp; ///< transparency mode enabled
- bool _usesTiling;
- bool _usesHaar;
- bool _usesFullpel;
-
- bool _gopInvalid;
- int _bufInvalid[4];
-
- bool _isIndeo4;
-
- AVFrame * _pFrame;
- bool _gotPFrame;
+ GetBits * _gb;
+ RVMapDesc _rvmapTabs[9]; ///< local corrected copy of the static rvmap tables
+
+ uint32 _frameNum;
+ int _frameType;
+ int _prevFrameType; ///< frame type of the previous frame
+ uint32 _dataSize; ///< size of the frame data in bytes from picture header
+ int _isScalable;
+ const uint8 * _frameData; ///< input frame data pointer
+ int _interScal; ///< signals a sequence of scalable inter frames
+ uint32 _frameSize; ///< frame size in bytes
+ uint32 _picHdrSize; ///< picture header size in bytes
+ uint8 _frameFlags;
+ uint16 _checksum; ///< frame _checksum
+
+ IVIPicConfig _picConf;
+ IVIPlaneDesc _planes[3]; ///< color planes
+
+ int _bufSwitch; ///< used to switch between three buffers
+ int _dstBuf; ///< buffer index for the currently decoded frame
+ int _refBuf; ///< inter frame reference buffer index
+ int _ref2Buf; ///< temporal storage for switching buffers
+ int _bRefBuf; ///< second reference frame buffer index
+
+ IVIHuffTab _mbVlc; ///< current macroblock table descriptor
+ IVIHuffTab _blkVlc; ///< current block table descriptor
+
+ uint8 _rvmapSel;
+ bool _inImf;
+ bool _inQ; ///< flag for explicitly stored quantiser delta
+ uint8 _picGlobQuant;
+ uint8 _unknown1;
+
+ uint16 _gopHdrSize;
+ uint8 _gopFlags;
+ uint32 _lockWord;
+
+ bool _hasBFrames;
+ bool _hasTransp; ///< transparency mode enabled
+ bool _usesTiling;
+ bool _usesHaar;
+ bool _usesFullpel;
+
+ bool _gopInvalid;
+ int _bufInvalid[4];
+
+ bool _isIndeo4;
+
+ AVFrame * _pFrame;
+ bool _gotPFrame;
IVI45DecContext();
private:
diff --git a/image/codecs/indeo/indeo_dsp.cpp b/image/codecs/indeo/indeo_dsp.cpp
index d4803b8b93..15626e9473 100644
--- a/image/codecs/indeo/indeo_dsp.cpp
+++ b/image/codecs/indeo/indeo_dsp.cpp
@@ -35,597 +35,597 @@ namespace Indeo {
* butterfly operation for the inverse Haar transform
*/
#define IVI_HAAR_BFLY(s1, s2, o1, o2, t) \
- t = ((s1) - (s2)) >> 1;\
- o1 = ((s1) + (s2)) >> 1;\
- o2 = (t);\
+ t = ((s1) - (s2)) >> 1;\
+ o1 = ((s1) + (s2)) >> 1;\
+ o2 = (t);\
/**
* inverse 8-point Haar transform
*/
#define INV_HAAR8(s1, s5, s3, s7, s2, s4, s6, s8,\
- d1, d2, d3, d4, d5, d6, d7, d8,\
- t0, t1, t2, t3, t4, t5, t6, t7, t8) {\
- t1 = (s1) << 1; t5 = (s5) << 1;\
- IVI_HAAR_BFLY(t1, t5, t1, t5, t0); IVI_HAAR_BFLY(t1, s3, t1, t3, t0);\
- IVI_HAAR_BFLY(t5, s7, t5, t7, t0); IVI_HAAR_BFLY(t1, s2, t1, t2, t0);\
- IVI_HAAR_BFLY(t3, s4, t3, t4, t0); IVI_HAAR_BFLY(t5, s6, t5, t6, t0);\
- IVI_HAAR_BFLY(t7, s8, t7, t8, t0);\
- d1 = COMPENSATE(t1);\
- d2 = COMPENSATE(t2);\
- d3 = COMPENSATE(t3);\
- d4 = COMPENSATE(t4);\
- d5 = COMPENSATE(t5);\
- d6 = COMPENSATE(t6);\
- d7 = COMPENSATE(t7);\
- d8 = COMPENSATE(t8); }
+ d1, d2, d3, d4, d5, d6, d7, d8,\
+ t0, t1, t2, t3, t4, t5, t6, t7, t8) {\
+ t1 = (s1) << 1; t5 = (s5) << 1;\
+ IVI_HAAR_BFLY(t1, t5, t1, t5, t0); IVI_HAAR_BFLY(t1, s3, t1, t3, t0);\
+ IVI_HAAR_BFLY(t5, s7, t5, t7, t0); IVI_HAAR_BFLY(t1, s2, t1, t2, t0);\
+ IVI_HAAR_BFLY(t3, s4, t3, t4, t0); IVI_HAAR_BFLY(t5, s6, t5, t6, t0);\
+ IVI_HAAR_BFLY(t7, s8, t7, t8, t0);\
+ d1 = COMPENSATE(t1);\
+ d2 = COMPENSATE(t2);\
+ d3 = COMPENSATE(t3);\
+ d4 = COMPENSATE(t4);\
+ d5 = COMPENSATE(t5);\
+ d6 = COMPENSATE(t6);\
+ d7 = COMPENSATE(t7);\
+ d8 = COMPENSATE(t8); }
/**
* inverse 4-point Haar transform
*/
#define INV_HAAR4(s1, s3, s5, s7, d1, d2, d3, d4, t0, t1, t2, t3, t4) {\
- IVI_HAAR_BFLY(s1, s3, t0, t1, t4);\
- IVI_HAAR_BFLY(t0, s5, t2, t3, t4);\
- d1 = COMPENSATE(t2);\
- d2 = COMPENSATE(t3);\
- IVI_HAAR_BFLY(t1, s7, t2, t3, t4);\
- d3 = COMPENSATE(t2);\
- d4 = COMPENSATE(t3); }
+ IVI_HAAR_BFLY(s1, s3, t0, t1, t4);\
+ IVI_HAAR_BFLY(t0, s5, t2, t3, t4);\
+ d1 = COMPENSATE(t2);\
+ d2 = COMPENSATE(t3);\
+ IVI_HAAR_BFLY(t1, s7, t2, t3, t4);\
+ d3 = COMPENSATE(t2);\
+ d4 = COMPENSATE(t3); }
void IndeoDSP::ffIviInverseHaar8x8(const int32 *in, int16 *out, uint32 pitch,
- const uint8 *flags) {
- int i, shift, sp1, sp2, sp3, sp4;
- const int32 *src;
- int32 * dst;
- int tmp[64];
- int t0, t1, t2, t3, t4, t5, t6, t7, t8;
-
- // apply the InvHaar8 to all columns
+ const uint8 *flags) {
+ int i, shift, sp1, sp2, sp3, sp4;
+ const int32 *src;
+ int32 * dst;
+ int tmp[64];
+ int t0, t1, t2, t3, t4, t5, t6, t7, t8;
+
+ // apply the InvHaar8 to all columns
#define COMPENSATE(x) (x)
- src = in;
- dst = tmp;
- for (i = 0; i < 8; i++) {
- if (flags[i]) {
- // pre-scaling
- shift = !(i & 4);
- sp1 = src[ 0] << shift;
- sp2 = src[ 8] << shift;
- sp3 = src[16] << shift;
- sp4 = src[24] << shift;
- INV_HAAR8( sp1, sp2, sp3, sp4,
- src[32], src[40], src[48], src[56],
- dst[ 0], dst[ 8], dst[16], dst[24],
- dst[32], dst[40], dst[48], dst[56],
- t0, t1, t2, t3, t4, t5, t6, t7, t8);
- } else {
- dst[ 0] = dst[ 8] = dst[16] = dst[24] =
- dst[32] = dst[40] = dst[48] = dst[56] = 0;
+ src = in;
+ dst = tmp;
+ for (i = 0; i < 8; i++) {
+ if (flags[i]) {
+ // pre-scaling
+ shift = !(i & 4);
+ sp1 = src[ 0] << shift;
+ sp2 = src[ 8] << shift;
+ sp3 = src[16] << shift;
+ sp4 = src[24] << shift;
+ INV_HAAR8( sp1, sp2, sp3, sp4,
+ src[32], src[40], src[48], src[56],
+ dst[ 0], dst[ 8], dst[16], dst[24],
+ dst[32], dst[40], dst[48], dst[56],
+ t0, t1, t2, t3, t4, t5, t6, t7, t8);
+ } else {
+ dst[ 0] = dst[ 8] = dst[16] = dst[24] =
+ dst[32] = dst[40] = dst[48] = dst[56] = 0;
}
- src++;
- dst++;
- }
+ src++;
+ dst++;
+ }
#undef COMPENSATE
- // apply the InvHaar8 to all rows
+ // apply the InvHaar8 to all rows
#define COMPENSATE(x) (x)
- src = tmp;
- for (i = 0; i < 8; i++) {
- if ( !src[0] && !src[1] && !src[2] && !src[3]
- && !src[4] && !src[5] && !src[6] && !src[7]) {
- memset(out, 0, 8 * sizeof(out[0]));
- } else {
- INV_HAAR8(src[0], src[1], src[2], src[3],
- src[4], src[5], src[6], src[7],
- out[0], out[1], out[2], out[3],
- out[4], out[5], out[6], out[7],
- t0, t1, t2, t3, t4, t5, t6, t7, t8);
- }
- src += 8;
- out += pitch;
- }
+ src = tmp;
+ for (i = 0; i < 8; i++) {
+ if ( !src[0] && !src[1] && !src[2] && !src[3]
+ && !src[4] && !src[5] && !src[6] && !src[7]) {
+ memset(out, 0, 8 * sizeof(out[0]));
+ } else {
+ INV_HAAR8(src[0], src[1], src[2], src[3],
+ src[4], src[5], src[6], src[7],
+ out[0], out[1], out[2], out[3],
+ out[4], out[5], out[6], out[7],
+ t0, t1, t2, t3, t4, t5, t6, t7, t8);
+ }
+ src += 8;
+ out += pitch;
+ }
#undef COMPENSATE
}
void IndeoDSP::ffIviRowHaar8(const int32 *in, int16 *out, uint32 pitch,
- const uint8 *flags) {
- int i;
- int t0, t1, t2, t3, t4, t5, t6, t7, t8;
+ const uint8 *flags) {
+ int i;
+ int t0, t1, t2, t3, t4, t5, t6, t7, t8;
- // apply the InvHaar8 to all rows
+ // apply the InvHaar8 to all rows
#define COMPENSATE(x) (x)
- for (i = 0; i < 8; i++) {
- if ( !in[0] && !in[1] && !in[2] && !in[3]
- && !in[4] && !in[5] && !in[6] && !in[7]) {
- memset(out, 0, 8 * sizeof(out[0]));
- } else {
- INV_HAAR8(in[0], in[1], in[2], in[3],
- in[4], in[5], in[6], in[7],
- out[0], out[1], out[2], out[3],
- out[4], out[5], out[6], out[7],
- t0, t1, t2, t3, t4, t5, t6, t7, t8);
- }
- in += 8;
- out += pitch;
- }
+ for (i = 0; i < 8; i++) {
+ if ( !in[0] && !in[1] && !in[2] && !in[3]
+ && !in[4] && !in[5] && !in[6] && !in[7]) {
+ memset(out, 0, 8 * sizeof(out[0]));
+ } else {
+ INV_HAAR8(in[0], in[1], in[2], in[3],
+ in[4], in[5], in[6], in[7],
+ out[0], out[1], out[2], out[3],
+ out[4], out[5], out[6], out[7],
+ t0, t1, t2, t3, t4, t5, t6, t7, t8);
+ }
+ in += 8;
+ out += pitch;
+ }
#undef COMPENSATE
}
void IndeoDSP::ffIviColHaar8(const int32 *in, int16 *out, uint32 pitch,
- const uint8 *flags) {
- int i;
- int t0, t1, t2, t3, t4, t5, t6, t7, t8;
+ const uint8 *flags) {
+ int i;
+ int t0, t1, t2, t3, t4, t5, t6, t7, t8;
- // apply the InvHaar8 to all columns
+ // apply the InvHaar8 to all columns
#define COMPENSATE(x) (x)
- for (i = 0; i < 8; i++) {
- if (flags[i]) {
- INV_HAAR8(in[ 0], in[ 8], in[16], in[24],
- in[32], in[40], in[48], in[56],
- out[0 * pitch], out[1 * pitch],
- out[2 * pitch], out[3 * pitch],
- out[4 * pitch], out[5 * pitch],
- out[6 * pitch], out[7 * pitch],
- t0, t1, t2, t3, t4, t5, t6, t7, t8);
- } else {
- out[0 * pitch] = out[1 * pitch] =
- out[2 * pitch] = out[3 * pitch] =
- out[4 * pitch] = out[5 * pitch] =
- out[6 * pitch] = out[7 * pitch] = 0;
+ for (i = 0; i < 8; i++) {
+ if (flags[i]) {
+ INV_HAAR8(in[ 0], in[ 8], in[16], in[24],
+ in[32], in[40], in[48], in[56],
+ out[0 * pitch], out[1 * pitch],
+ out[2 * pitch], out[3 * pitch],
+ out[4 * pitch], out[5 * pitch],
+ out[6 * pitch], out[7 * pitch],
+ t0, t1, t2, t3, t4, t5, t6, t7, t8);
+ } else {
+ out[0 * pitch] = out[1 * pitch] =
+ out[2 * pitch] = out[3 * pitch] =
+ out[4 * pitch] = out[5 * pitch] =
+ out[6 * pitch] = out[7 * pitch] = 0;
}
- in++;
- out++;
- }
+ in++;
+ out++;
+ }
#undef COMPENSATE
}
void IndeoDSP::ffIviInverseHaar4x4(const int32 *in, int16 *out, uint32 pitch,
- const uint8 *flags) {
- int i, shift, sp1, sp2;
- const int32 *src;
- int32 * dst;
- int tmp[16];
- int t0, t1, t2, t3, t4;
-
- // apply the InvHaar4 to all columns
+ const uint8 *flags) {
+ int i, shift, sp1, sp2;
+ const int32 *src;
+ int32 * dst;
+ int tmp[16];
+ int t0, t1, t2, t3, t4;
+
+ // apply the InvHaar4 to all columns
#define COMPENSATE(x) (x)
- src = in;
- dst = tmp;
- for (i = 0; i < 4; i++) {
- if (flags[i]) {
- // pre-scaling
- shift = !(i & 2);
- sp1 = src[0] << shift;
- sp2 = src[4] << shift;
- INV_HAAR4( sp1, sp2, src[8], src[12],
- dst[0], dst[4], dst[8], dst[12],
- t0, t1, t2, t3, t4);
- } else {
- dst[0] = dst[4] = dst[8] = dst[12] = 0;
+ src = in;
+ dst = tmp;
+ for (i = 0; i < 4; i++) {
+ if (flags[i]) {
+ // pre-scaling
+ shift = !(i & 2);
+ sp1 = src[0] << shift;
+ sp2 = src[4] << shift;
+ INV_HAAR4( sp1, sp2, src[8], src[12],
+ dst[0], dst[4], dst[8], dst[12],
+ t0, t1, t2, t3, t4);
+ } else {
+ dst[0] = dst[4] = dst[8] = dst[12] = 0;
}
- src++;
- dst++;
- }
+ src++;
+ dst++;
+ }
#undef COMPENSATE
- // apply the InvHaar8 to all rows
+ // apply the InvHaar8 to all rows
#define COMPENSATE(x) (x)
- src = tmp;
- for (i = 0; i < 4; i++) {
- if (!src[0] && !src[1] && !src[2] && !src[3]) {
- memset(out, 0, 4 * sizeof(out[0]));
- } else {
- INV_HAAR4(src[0], src[1], src[2], src[3],
- out[0], out[1], out[2], out[3],
- t0, t1, t2, t3, t4);
- }
- src += 4;
- out += pitch;
- }
+ src = tmp;
+ for (i = 0; i < 4; i++) {
+ if (!src[0] && !src[1] && !src[2] && !src[3]) {
+ memset(out, 0, 4 * sizeof(out[0]));
+ } else {
+ INV_HAAR4(src[0], src[1], src[2], src[3],
+ out[0], out[1], out[2], out[3],
+ t0, t1, t2, t3, t4);
+ }
+ src += 4;
+ out += pitch;
+ }
#undef COMPENSATE
}
void IndeoDSP::ffIviRowHaar4(const int32 *in, int16 *out, uint32 pitch,
- const uint8 *flags) {
- int i;
- int t0, t1, t2, t3, t4;
+ const uint8 *flags) {
+ int i;
+ int t0, t1, t2, t3, t4;
- // apply the InvHaar4 to all rows
+ // apply the InvHaar4 to all rows
#define COMPENSATE(x) (x)
- for (i = 0; i < 4; i++) {
- if (!in[0] && !in[1] && !in[2] && !in[3]) {
- memset(out, 0, 4 * sizeof(out[0]));
- } else {
- INV_HAAR4(in[0], in[1], in[2], in[3],
- out[0], out[1], out[2], out[3],
- t0, t1, t2, t3, t4);
- }
- in += 4;
- out += pitch;
- }
+ for (i = 0; i < 4; i++) {
+ if (!in[0] && !in[1] && !in[2] && !in[3]) {
+ memset(out, 0, 4 * sizeof(out[0]));
+ } else {
+ INV_HAAR4(in[0], in[1], in[2], in[3],
+ out[0], out[1], out[2], out[3],
+ t0, t1, t2, t3, t4);
+ }
+ in += 4;
+ out += pitch;
+ }
#undef COMPENSATE
}
void IndeoDSP::ffIviColHaar4(const int32 *in, int16 *out, uint32 pitch,
- const uint8 *flags) {
- int i;
- int t0, t1, t2, t3, t4;
+ const uint8 *flags) {
+ int i;
+ int t0, t1, t2, t3, t4;
- // apply the InvHaar8 to all columns
+ // apply the InvHaar8 to all columns
#define COMPENSATE(x) (x)
- for (i = 0; i < 4; i++) {
- if (flags[i]) {
- INV_HAAR4(in[0], in[4], in[8], in[12],
- out[0 * pitch], out[1 * pitch],
- out[2 * pitch], out[3 * pitch],
- t0, t1, t2, t3, t4);
- } else {
- out[0 * pitch] = out[1 * pitch] =
- out[2 * pitch] = out[3 * pitch] = 0;
+ for (i = 0; i < 4; i++) {
+ if (flags[i]) {
+ INV_HAAR4(in[0], in[4], in[8], in[12],
+ out[0 * pitch], out[1 * pitch],
+ out[2 * pitch], out[3 * pitch],
+ t0, t1, t2, t3, t4);
+ } else {
+ out[0 * pitch] = out[1 * pitch] =
+ out[2 * pitch] = out[3 * pitch] = 0;
}
- in++;
- out++;
- }
+ in++;
+ out++;
+ }
#undef COMPENSATE
}
void IndeoDSP::ffIviDcHaar2d(const int32 *in, int16 *out, uint32 pitch,
- int blkSize) {
- int x, y;
- int16 dcCoeff;
+ int blkSize) {
+ int x, y;
+ int16 dcCoeff;
- dcCoeff = (*in + 0) >> 3;
+ dcCoeff = (*in + 0) >> 3;
- for (y = 0; y < blkSize; out += pitch, y++) {
- for (x = 0; x < blkSize; x++)
- out[x] = dcCoeff;
- }
+ for (y = 0; y < blkSize; out += pitch, y++) {
+ for (x = 0; x < blkSize; x++)
+ out[x] = dcCoeff;
+ }
}
//* butterfly operation for the inverse slant transform
#define IVI_SLANT_BFLY(s1, s2, o1, o2, t) \
- t = (s1) - (s2);\
- o1 = (s1) + (s2);\
- o2 = (t);\
+ t = (s1) - (s2);\
+ o1 = (s1) + (s2);\
+ o2 = (t);\
//* This is a reflection a,b = 1/2, 5/4 for the inverse slant transform
#define IVI_IREFLECT(s1, s2, o1, o2, t) \
- t = (((s1) + (s2)*2 + 2) >> 2) + (s1);\
- o2 = (((s1)*2 - (s2) + 2) >> 2) - (s2);\
- o1 = (t);\
+ t = (((s1) + (s2)*2 + 2) >> 2) + (s1);\
+ o2 = (((s1)*2 - (s2) + 2) >> 2) - (s2);\
+ o1 = (t);\
//* This is a reflection a,b = 1/2, 7/8 for the inverse slant transform
#define IVI_SLANT_PART4(s1, s2, o1, o2, t) \
- t = (s2) + (((s1)*4 - (s2) + 4) >> 3);\
- o2 = (s1) + ((-(s1) - (s2)*4 + 4) >> 3);\
- o1 = (t);\
+ t = (s2) + (((s1)*4 - (s2) + 4) >> 3);\
+ o2 = (s1) + ((-(s1) - (s2)*4 + 4) >> 3);\
+ o1 = (t);\
//* inverse slant8 transform
#define IVI_INV_SLANT8(s1, s4, s8, s5, s2, s6, s3, s7,\
- d1, d2, d3, d4, d5, d6, d7, d8,\
- t0, t1, t2, t3, t4, t5, t6, t7, t8) {\
- IVI_SLANT_PART4(s4, s5, t4, t5, t0);\
+ d1, d2, d3, d4, d5, d6, d7, d8,\
+ t0, t1, t2, t3, t4, t5, t6, t7, t8) {\
+ IVI_SLANT_PART4(s4, s5, t4, t5, t0);\
\
- IVI_SLANT_BFLY(s1, t5, t1, t5, t0); IVI_SLANT_BFLY(s2, s6, t2, t6, t0);\
- IVI_SLANT_BFLY(s7, s3, t7, t3, t0); IVI_SLANT_BFLY(t4, s8, t4, t8, t0);\
+ IVI_SLANT_BFLY(s1, t5, t1, t5, t0); IVI_SLANT_BFLY(s2, s6, t2, t6, t0);\
+ IVI_SLANT_BFLY(s7, s3, t7, t3, t0); IVI_SLANT_BFLY(t4, s8, t4, t8, t0);\
\
- IVI_SLANT_BFLY(t1, t2, t1, t2, t0); IVI_IREFLECT (t4, t3, t4, t3, t0);\
- IVI_SLANT_BFLY(t5, t6, t5, t6, t0); IVI_IREFLECT (t8, t7, t8, t7, t0);\
- IVI_SLANT_BFLY(t1, t4, t1, t4, t0); IVI_SLANT_BFLY(t2, t3, t2, t3, t0);\
- IVI_SLANT_BFLY(t5, t8, t5, t8, t0); IVI_SLANT_BFLY(t6, t7, t6, t7, t0);\
- d1 = COMPENSATE(t1);\
- d2 = COMPENSATE(t2);\
- d3 = COMPENSATE(t3);\
- d4 = COMPENSATE(t4);\
- d5 = COMPENSATE(t5);\
- d6 = COMPENSATE(t6);\
- d7 = COMPENSATE(t7);\
- d8 = COMPENSATE(t8);}
+ IVI_SLANT_BFLY(t1, t2, t1, t2, t0); IVI_IREFLECT (t4, t3, t4, t3, t0);\
+ IVI_SLANT_BFLY(t5, t6, t5, t6, t0); IVI_IREFLECT (t8, t7, t8, t7, t0);\
+ IVI_SLANT_BFLY(t1, t4, t1, t4, t0); IVI_SLANT_BFLY(t2, t3, t2, t3, t0);\
+ IVI_SLANT_BFLY(t5, t8, t5, t8, t0); IVI_SLANT_BFLY(t6, t7, t6, t7, t0);\
+ d1 = COMPENSATE(t1);\
+ d2 = COMPENSATE(t2);\
+ d3 = COMPENSATE(t3);\
+ d4 = COMPENSATE(t4);\
+ d5 = COMPENSATE(t5);\
+ d6 = COMPENSATE(t6);\
+ d7 = COMPENSATE(t7);\
+ d8 = COMPENSATE(t8);}
//* inverse slant4 transform
#define IVI_INV_SLANT4(s1, s4, s2, s3, d1, d2, d3, d4, t0, t1, t2, t3, t4) {\
- IVI_SLANT_BFLY(s1, s2, t1, t2, t0); IVI_IREFLECT (s4, s3, t4, t3, t0);\
+ IVI_SLANT_BFLY(s1, s2, t1, t2, t0); IVI_IREFLECT (s4, s3, t4, t3, t0);\
\
- IVI_SLANT_BFLY(t1, t4, t1, t4, t0); IVI_SLANT_BFLY(t2, t3, t2, t3, t0);\
- d1 = COMPENSATE(t1);\
- d2 = COMPENSATE(t2);\
- d3 = COMPENSATE(t3);\
- d4 = COMPENSATE(t4);}
+ IVI_SLANT_BFLY(t1, t4, t1, t4, t0); IVI_SLANT_BFLY(t2, t3, t2, t3, t0);\
+ d1 = COMPENSATE(t1);\
+ d2 = COMPENSATE(t2);\
+ d3 = COMPENSATE(t3);\
+ d4 = COMPENSATE(t4);}
void IndeoDSP::ffIviInverseSlant8x8(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) {
- int i;
- const int32 *src;
- int32 * dst;
- int tmp[64];
- int t0, t1, t2, t3, t4, t5, t6, t7, t8;
+ int i;
+ const int32 *src;
+ int32 * dst;
+ int tmp[64];
+ int t0, t1, t2, t3, t4, t5, t6, t7, t8;
#define COMPENSATE(x) (x)
- src = in;
- dst = tmp;
- for (i = 0; i < 8; i++) {
- if (flags[i]) {
- IVI_INV_SLANT8(src[0], src[8], src[16], src[24], src[32], src[40], src[48], src[56],
- dst[0], dst[8], dst[16], dst[24], dst[32], dst[40], dst[48], dst[56],
- t0, t1, t2, t3, t4, t5, t6, t7, t8);
- } else {
- dst[0] = dst[8] = dst[16] = dst[24] = dst[32] = dst[40] = dst[48] = dst[56] = 0;
+ src = in;
+ dst = tmp;
+ for (i = 0; i < 8; i++) {
+ if (flags[i]) {
+ IVI_INV_SLANT8(src[0], src[8], src[16], src[24], src[32], src[40], src[48], src[56],
+ dst[0], dst[8], dst[16], dst[24], dst[32], dst[40], dst[48], dst[56],
+ t0, t1, t2, t3, t4, t5, t6, t7, t8);
+ } else {
+ dst[0] = dst[8] = dst[16] = dst[24] = dst[32] = dst[40] = dst[48] = dst[56] = 0;
}
src++;
- dst++;
- }
+ dst++;
+ }
#undef COMPENSATE
#define COMPENSATE(x) (((x) + 1)>>1)
- src = tmp;
- for (i = 0; i < 8; i++) {
- if (!src[0] && !src[1] && !src[2] && !src[3] && !src[4] && !src[5] && !src[6] && !src[7]) {
- memset(out, 0, 8*sizeof(out[0]));
- } else {
- IVI_INV_SLANT8(src[0], src[1], src[2], src[3], src[4], src[5], src[6], src[7],
- out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
- t0, t1, t2, t3, t4, t5, t6, t7, t8);
- }
- src += 8;
- out += pitch;
- }
+ src = tmp;
+ for (i = 0; i < 8; i++) {
+ if (!src[0] && !src[1] && !src[2] && !src[3] && !src[4] && !src[5] && !src[6] && !src[7]) {
+ memset(out, 0, 8*sizeof(out[0]));
+ } else {
+ IVI_INV_SLANT8(src[0], src[1], src[2], src[3], src[4], src[5], src[6], src[7],
+ out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
+ t0, t1, t2, t3, t4, t5, t6, t7, t8);
+ }
+ src += 8;
+ out += pitch;
+ }
#undef COMPENSATE
}
void IndeoDSP::ffIviInverseSlant4x4(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) {
- int i;
- const int32 *src;
- int32 * dst;
- int tmp[16];
- int t0, t1, t2, t3, t4;
+ int i;
+ const int32 *src;
+ int32 * dst;
+ int tmp[16];
+ int t0, t1, t2, t3, t4;
#define COMPENSATE(x) (x)
- src = in;
- dst = tmp;
- for (i = 0; i < 4; i++) {
- if (flags[i]) {
- IVI_INV_SLANT4(src[0], src[4], src[8], src[12],
- dst[0], dst[4], dst[8], dst[12],
- t0, t1, t2, t3, t4);
- } else {
- dst[0] = dst[4] = dst[8] = dst[12] = 0;
+ src = in;
+ dst = tmp;
+ for (i = 0; i < 4; i++) {
+ if (flags[i]) {
+ IVI_INV_SLANT4(src[0], src[4], src[8], src[12],
+ dst[0], dst[4], dst[8], dst[12],
+ t0, t1, t2, t3, t4);
+ } else {
+ dst[0] = dst[4] = dst[8] = dst[12] = 0;
}
src++;
dst++;
- }
+ }
#undef COMPENSATE
#define COMPENSATE(x) (((x) + 1)>>1)
- src = tmp;
- for (i = 0; i < 4; i++) {
- if (!src[0] && !src[1] && !src[2] && !src[3]) {
- out[0] = out[1] = out[2] = out[3] = 0;
- } else {
- IVI_INV_SLANT4(src[0], src[1], src[2], src[3],
- out[0], out[1], out[2], out[3],
- t0, t1, t2, t3, t4);
- }
- src += 4;
- out += pitch;
- }
+ src = tmp;
+ for (i = 0; i < 4; i++) {
+ if (!src[0] && !src[1] && !src[2] && !src[3]) {
+ out[0] = out[1] = out[2] = out[3] = 0;
+ } else {
+ IVI_INV_SLANT4(src[0], src[1], src[2], src[3],
+ out[0], out[1], out[2], out[3],
+ t0, t1, t2, t3, t4);
+ }
+ src += 4;
+ out += pitch;
+ }
#undef COMPENSATE
}
void IndeoDSP::ffIviDcSlant2d(const int32 *in, int16 *out, uint32 pitch,
int blkSize) {
- int x, y;
- int16 dcCoeff;
+ int x, y;
+ int16 dcCoeff;
- dcCoeff = (*in + 1) >> 1;
+ dcCoeff = (*in + 1) >> 1;
- for (y = 0; y < blkSize; out += pitch, y++) {
- for (x = 0; x < blkSize; x++)
- out[x] = dcCoeff;
- }
+ for (y = 0; y < blkSize; out += pitch, y++) {
+ for (x = 0; x < blkSize; x++)
+ out[x] = dcCoeff;
+ }
}
void IndeoDSP::ffIviRowSlant8(const int32 *in, int16 *out, uint32 pitch,
const uint8 *flags) {
- int i;
- int t0, t1, t2, t3, t4, t5, t6, t7, t8;
+ int i;
+ int t0, t1, t2, t3, t4, t5, t6, t7, t8;
#define COMPENSATE(x) (((x) + 1)>>1)
- for (i = 0; i < 8; i++) {
- if (!in[0] && !in[1] && !in[2] && !in[3] && !in[4] && !in[5] && !in[6] && !in[7]) {
- memset(out, 0, 8*sizeof(out[0]));
- } else {
- IVI_INV_SLANT8( in[0], in[1], in[2], in[3], in[4], in[5], in[6], in[7],
- out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
- t0, t1, t2, t3, t4, t5, t6, t7, t8);
- }
- in += 8;
- out += pitch;
- }
+ for (i = 0; i < 8; i++) {
+ if (!in[0] && !in[1] && !in[2] && !in[3] && !in[4] && !in[5] && !in[6] && !in[7]) {
+ memset(out, 0, 8*sizeof(out[0]));
+ } else {
+ IVI_INV_SLANT8( in[0], in[1], in[2], in[3], in[4], in[5], in[6], in[7],
+ out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
+ t0, t1, t2, t3, t4, t5, t6, t7, t8);
+ }
+ in += 8;
+ out += pitch;
+ }
#undef COMPENSATE
}
void IndeoDSP::ffIviDcRowSlant(const int32 *in, int16 *out, uint32 pitch, int blkSize) {
- int x, y;
- int16 dcCoeff;
+ int x, y;
+ int16 dcCoeff;
- dcCoeff = (*in + 1) >> 1;
+ dcCoeff = (*in + 1) >> 1;
- for (x = 0; x < blkSize; x++)
- out[x] = dcCoeff;
+ for (x = 0; x < blkSize; x++)
+ out[x] = dcCoeff;
- out += pitch;
+ out += pitch;
- for (y = 1; y < blkSize; out += pitch, y++) {
- for (x = 0; x < blkSize; x++)
- out[x] = 0;
- }
+ for (y = 1; y < blkSize; out += pitch, y++) {
+ for (x = 0; x < blkSize; x++)
+ out[x] = 0;
+ }
}
void IndeoDSP::ffIviColSlant8(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) {
- int i, row2, row4, row8;
- int t0, t1, t2, t3, t4, t5, t6, t7, t8;
+ int i, row2, row4, row8;
+ int t0, t1, t2, t3, t4, t5, t6, t7, t8;
- row2 = pitch << 1;
- row4 = pitch << 2;
- row8 = pitch << 3;
+ row2 = pitch << 1;
+ row4 = pitch << 2;
+ row8 = pitch << 3;
#define COMPENSATE(x) (((x) + 1)>>1)
- for (i = 0; i < 8; i++) {
- if (flags[i]) {
- IVI_INV_SLANT8(in[0], in[8], in[16], in[24], in[32], in[40], in[48], in[56],
- out[0], out[pitch], out[row2], out[row2 + pitch], out[row4],
- out[row4 + pitch], out[row4 + row2], out[row8 - pitch],
- t0, t1, t2, t3, t4, t5, t6, t7, t8);
- } else {
- out[0] = out[pitch] = out[row2] = out[row2 + pitch] = out[row4] =
- out[row4 + pitch] = out[row4 + row2] = out[row8 - pitch] = 0;
- }
-
- in++;
- out++;
- }
+ for (i = 0; i < 8; i++) {
+ if (flags[i]) {
+ IVI_INV_SLANT8(in[0], in[8], in[16], in[24], in[32], in[40], in[48], in[56],
+ out[0], out[pitch], out[row2], out[row2 + pitch], out[row4],
+ out[row4 + pitch], out[row4 + row2], out[row8 - pitch],
+ t0, t1, t2, t3, t4, t5, t6, t7, t8);
+ } else {
+ out[0] = out[pitch] = out[row2] = out[row2 + pitch] = out[row4] =
+ out[row4 + pitch] = out[row4 + row2] = out[row8 - pitch] = 0;
+ }
+
+ in++;
+ out++;
+ }
#undef COMPENSATE
}
void IndeoDSP::ffIviDcColSlant(const int32 *in, int16 *out, uint32 pitch, int blkSize) {
- int x, y;
- int16 dcCoeff;
+ int x, y;
+ int16 dcCoeff;
- dcCoeff = (*in + 1) >> 1;
+ dcCoeff = (*in + 1) >> 1;
- for (y = 0; y < blkSize; out += pitch, y++) {
- out[0] = dcCoeff;
- for (x = 1; x < blkSize; x++)
- out[x] = 0;
- }
+ for (y = 0; y < blkSize; out += pitch, y++) {
+ out[0] = dcCoeff;
+ for (x = 1; x < blkSize; x++)
+ out[x] = 0;
+ }
}
void IndeoDSP::ffIviRowSlant4(const int32 *in, int16 *out,
uint32 pitch, const uint8 *flags) {
- int i;
- int t0, t1, t2, t3, t4;
+ int i;
+ int t0, t1, t2, t3, t4;
#define COMPENSATE(x) (((x) + 1)>>1)
- for (i = 0; i < 4; i++) {
- if (!in[0] && !in[1] && !in[2] && !in[3]) {
- memset(out, 0, 4*sizeof(out[0]));
- } else {
- IVI_INV_SLANT4( in[0], in[1], in[2], in[3],
- out[0], out[1], out[2], out[3],
- t0, t1, t2, t3, t4);
- }
- in += 4;
- out += pitch;
- }
+ for (i = 0; i < 4; i++) {
+ if (!in[0] && !in[1] && !in[2] && !in[3]) {
+ memset(out, 0, 4*sizeof(out[0]));
+ } else {
+ IVI_INV_SLANT4( in[0], in[1], in[2], in[3],
+ out[0], out[1], out[2], out[3],
+ t0, t1, t2, t3, t4);
+ }
+ in += 4;
+ out += pitch;
+ }
#undef COMPENSATE
}
void IndeoDSP::ffIviColSlant4(const int32 *in, int16 *out, uint32 pitch,
const uint8 *flags) {
- int i, row2;
- int t0, t1, t2, t3, t4;
+ int i, row2;
+ int t0, t1, t2, t3, t4;
- row2 = pitch << 1;
+ row2 = pitch << 1;
#define COMPENSATE(x) (((x) + 1)>>1)
- for (i = 0; i < 4; i++) {
- if (flags[i]) {
- IVI_INV_SLANT4(in[0], in[4], in[8], in[12],
- out[0], out[pitch], out[row2], out[row2 + pitch],
- t0, t1, t2, t3, t4);
- } else {
- out[0] = out[pitch] = out[row2] = out[row2 + pitch] = 0;
- }
-
- in++;
- out++;
- }
+ for (i = 0; i < 4; i++) {
+ if (flags[i]) {
+ IVI_INV_SLANT4(in[0], in[4], in[8], in[12],
+ out[0], out[pitch], out[row2], out[row2 + pitch],
+ t0, t1, t2, t3, t4);
+ } else {
+ out[0] = out[pitch] = out[row2] = out[row2 + pitch] = 0;
+ }
+
+ in++;
+ out++;
+ }
#undef COMPENSATE
}
void IndeoDSP::ffIviPutPixels8x8(const int32 *in, int16 *out, uint32 pitch,
const uint8 *flags) {
- int x, y;
+ int x, y;
- for (y = 0; y < 8; out += pitch, in += 8, y++)
- for (x = 0; x < 8; x++)
- out[x] = in[x];
+ for (y = 0; y < 8; out += pitch, in += 8, y++)
+ for (x = 0; x < 8; x++)
+ out[x] = in[x];
}
void IndeoDSP::ffIviPutDcPixel8x8(const int32 *in, int16 *out, uint32 pitch,
int blkSize) {
- int y;
+ int y;
- out[0] = in[0];
- memset(out + 1, 0, 7*sizeof(out[0]));
- out += pitch;
+ out[0] = in[0];
+ memset(out + 1, 0, 7*sizeof(out[0]));
+ out += pitch;
- for (y = 1; y < 8; out += pitch, y++)
- memset(out, 0, 8*sizeof(out[0]));
+ for (y = 1; y < 8; out += pitch, y++)
+ memset(out, 0, 8*sizeof(out[0]));
}
#define IVI_MC_TEMPLATE(size, suffix, OP) \
static void iviMc ## size ##x## size ## suffix(int16 *buf, \
- uint32 dpitch, \
- const int16 *refBuf, \
- uint32 pitch, int mcType) \
+ uint32 dpitch, \
+ const int16 *refBuf, \
+ uint32 pitch, int mcType) \
{ \
- int i, j; \
- const int16 *wptr; \
+ int i, j; \
+ const int16 *wptr; \
\
- switch (mcType) { \
- case 0: /* fullpel (no interpolation) */ \
- for (i = 0; i < size; i++, buf += dpitch, refBuf += pitch) { \
- for (j = 0; j < size; j++) {\
- OP(buf[j], refBuf[j]); \
- } \
- } \
- break; \
- case 1: /* horizontal halfpel interpolation */ \
- for (i = 0; i < size; i++, buf += dpitch, refBuf += pitch) \
- for (j = 0; j < size; j++) \
- OP(buf[j], (refBuf[j] + refBuf[j+1]) >> 1); \
- break; \
- case 2: /* vertical halfpel interpolation */ \
- wptr = refBuf + pitch; \
- for (i = 0; i < size; i++, buf += dpitch, wptr += pitch, refBuf += pitch) \
- for (j = 0; j < size; j++) \
- OP(buf[j], (refBuf[j] + wptr[j]) >> 1); \
- break; \
- case 3: /* vertical and horizontal halfpel interpolation */ \
- wptr = refBuf + pitch; \
- for (i = 0; i < size; i++, buf += dpitch, wptr += pitch, refBuf += pitch) \
- for (j = 0; j < size; j++) \
- OP(buf[j], (refBuf[j] + refBuf[j+1] + wptr[j] + wptr[j+1]) >> 2); \
- break; \
- } \
+ switch (mcType) { \
+ case 0: /* fullpel (no interpolation) */ \
+ for (i = 0; i < size; i++, buf += dpitch, refBuf += pitch) { \
+ for (j = 0; j < size; j++) {\
+ OP(buf[j], refBuf[j]); \
+ } \
+ } \
+ break; \
+ case 1: /* horizontal halfpel interpolation */ \
+ for (i = 0; i < size; i++, buf += dpitch, refBuf += pitch) \
+ for (j = 0; j < size; j++) \
+ OP(buf[j], (refBuf[j] + refBuf[j+1]) >> 1); \
+ break; \
+ case 2: /* vertical halfpel interpolation */ \
+ wptr = refBuf + pitch; \
+ for (i = 0; i < size; i++, buf += dpitch, wptr += pitch, refBuf += pitch) \
+ for (j = 0; j < size; j++) \
+ OP(buf[j], (refBuf[j] + wptr[j]) >> 1); \
+ break; \
+ case 3: /* vertical and horizontal halfpel interpolation */ \
+ wptr = refBuf + pitch; \
+ for (i = 0; i < size; i++, buf += dpitch, wptr += pitch, refBuf += pitch) \
+ for (j = 0; j < size; j++) \
+ OP(buf[j], (refBuf[j] + refBuf[j+1] + wptr[j] + wptr[j+1]) >> 2); \
+ break; \
+ } \
} \
\
void IndeoDSP::ffIviMc ## size ##x## size ## suffix(int16 *buf, const int16 *refBuf, \
- uint32 pitch, int mcType) \
+ uint32 pitch, int mcType) \
{ \
- iviMc ## size ##x## size ## suffix(buf, pitch, refBuf, pitch, mcType); \
+ iviMc ## size ##x## size ## suffix(buf, pitch, refBuf, pitch, mcType); \
}
#define IVI_MC_AVG_TEMPLATE(size, suffix, OP) \
void IndeoDSP::ffIviMcAvg ## size ##x## size ## suffix(int16 *buf, \
- const int16 *refBuf, \
- const int16 *refBuf2, \
- uint32 pitch, \
- int mcType, int mcType2) \
+ const int16 *refBuf, \
+ const int16 *refBuf2, \
+ uint32 pitch, \
+ int mcType, int mcType2) \
{ \
- int16 tmp[size * size]; \
- int i, j; \
+ int16 tmp[size * size]; \
+ int i, j; \
\
- iviMc ## size ##x## size ## NoDelta(tmp, size, refBuf, pitch, mcType); \
- iviMc ## size ##x## size ## Delta(tmp, size, refBuf2, pitch, mcType2); \
- for (i = 0; i < size; i++, buf += pitch) { \
- for (j = 0; j < size; j++) {\
- OP(buf[j], tmp[i * size + j] >> 1); \
- } \
- } \
+ iviMc ## size ##x## size ## NoDelta(tmp, size, refBuf, pitch, mcType); \
+ iviMc ## size ##x## size ## Delta(tmp, size, refBuf2, pitch, mcType2); \
+ for (i = 0; i < size; i++, buf += pitch) { \
+ for (j = 0; j < size; j++) {\
+ OP(buf[j], tmp[i * size + j] >> 1); \
+ } \
+ } \
}
#define OP_PUT(a, b) (a) = (b)
diff --git a/image/codecs/indeo/indeo_dsp.h b/image/codecs/indeo/indeo_dsp.h
index 5f4b04f9db..8ea223b634 100644
--- a/image/codecs/indeo/indeo_dsp.h
+++ b/image/codecs/indeo/indeo_dsp.h
@@ -20,8 +20,6 @@
*
*/
-#include "common/scummsys.h"
-
/* VLC code
*
* Original copyright note:
diff --git a/image/codecs/indeo/mem.cpp b/image/codecs/indeo/mem.cpp
index 326729b27d..77a5fabd0a 100644
--- a/image/codecs/indeo/mem.cpp
+++ b/image/codecs/indeo/mem.cpp
@@ -71,14 +71,14 @@ const uint8 ffZigZagDirect[64] = {
* @return 0 on success, AVERROR(EINVAL) on overflow
*/
static inline int avSizeMult(size_t a, size_t b, size_t *r) {
- size_t t = a * b;
-
- // Hack inspired from glibc: don't try the division if nelem and elsize
- // are both less than sqrt(SIZE_MAX).
- if ((a | b) >= ((size_t)1 << (sizeof(size_t) * 4)) && a && t / a != b)
- return -1;
- *r = t;
- return 0;
+ size_t t = a * b;
+
+ // Hack inspired from glibc: don't try the division if nelem and elsize
+ // are both less than sqrt(SIZE_MAX).
+ if ((a | b) >= ((size_t)1 << (sizeof(size_t) * 4)) && a && t / a != b)
+ return -1;
+ *r = t;
+ return 0;
}
/*------------------------------------------------------------------------*/
@@ -96,9 +96,9 @@ void *avMallocZ(size_t size) {
}
void *avMallocArray(size_t nmemb, size_t size) {
- if (!size || nmemb >= MAX_INTEGER / size)
- return nullptr;
- return malloc(nmemb * size);
+ if (!size || nmemb >= MAX_INTEGER / size)
+ return nullptr;
+ return malloc(nmemb * size);
}
void *avMallocZArray(size_t nmemb, size_t size) {
diff --git a/image/codecs/indeo/vlc.cpp b/image/codecs/indeo/vlc.cpp
index e526a0998a..5b9e96cd96 100644
--- a/image/codecs/indeo/vlc.cpp
+++ b/image/codecs/indeo/vlc.cpp
@@ -41,97 +41,97 @@ namespace Indeo {
* happen with non constructed input.
*/
#define AV_QSORT(p, num, type, cmp) do {\
- void *stack[64][2];\
- int sp = 1;\
- stack[0][0] = p;\
- stack[0][1] = (p)+(num)-1;\
- while(sp){\
- type *start = (type *)stack[--sp][0];\
- type *end = (type *)stack[ sp][1];\
- while (start < end) {\
- if (start < end-1) {\
- int checksort = 0;\
- type *right = end - 2;\
- type *left = start + 1;\
- type *mid = start + ((end - start) >> 1);\
- if(cmp(start, end) > 0) {\
- if(cmp( end, mid) > 0) SWAP(*start, *mid);\
- else SWAP(*start, *end);\
- } else {\
- if(cmp(start, mid) > 0) SWAP(*start, *mid);\
- else checksort = 1;\
- }\
- if (cmp(mid, end) > 0) { \
- SWAP(*mid, *end);\
- checksort = 0;\
- }\
- if(start == end - 2) break;\
- SWAP(end[-1], *mid);\
- while (left <= right) {\
- while (left<=right && cmp(left, end - 1) < 0)\
- left++;\
- while (left<=right && cmp(right, end - 1) > 0)\
- right--;\
- if (left <= right) {\
- SWAP(*left, *right);\
- left++;\
- right--;\
- }\
- }\
- SWAP(end[-1], *left);\
- if(checksort && (mid == left - 1 || mid == left)){\
- mid= start;\
- while(mid<end && cmp(mid, mid+1) <= 0)\
- mid++;\
- if(mid==end)\
- break;\
- }\
- if (end - left < left - start){\
- stack[sp ][0] = start;\
- stack[sp++][1] = right;\
- start = left + 1;\
- } else {\
- stack[sp ][0] = left+1;\
- stack[sp++][1] = end;\
- end = right;\
- }\
- } else {\
- if (cmp(start, end) > 0)\
- SWAP(*start, *end);\
- break;\
- }\
- }\
- }\
+ void *stack[64][2];\
+ int sp = 1;\
+ stack[0][0] = p;\
+ stack[0][1] = (p)+(num)-1;\
+ while(sp){\
+ type *start = (type *)stack[--sp][0];\
+ type *end = (type *)stack[ sp][1];\
+ while (start < end) {\
+ if (start < end-1) {\
+ int checksort = 0;\
+ type *right = end - 2;\
+ type *left = start + 1;\
+ type *mid = start + ((end - start) >> 1);\
+ if(cmp(start, end) > 0) {\
+ if(cmp( end, mid) > 0) SWAP(*start, *mid);\
+ else SWAP(*start, *end);\
+ } else {\
+ if(cmp(start, mid) > 0) SWAP(*start, *mid);\
+ else checksort = 1;\
+ }\
+ if (cmp(mid, end) > 0) { \
+ SWAP(*mid, *end);\
+ checksort = 0;\
+ }\
+ if(start == end - 2) break;\
+ SWAP(end[-1], *mid);\
+ while (left <= right) {\
+ while (left<=right && cmp(left, end - 1) < 0)\
+ left++;\
+ while (left<=right && cmp(right, end - 1) > 0)\
+ right--;\
+ if (left <= right) {\
+ SWAP(*left, *right);\
+ left++;\
+ right--;\
+ }\
+ }\
+ SWAP(end[-1], *left);\
+ if(checksort && (mid == left - 1 || mid == left)){\
+ mid= start;\
+ while(mid<end && cmp(mid, mid+1) <= 0)\
+ mid++;\
+ if(mid==end)\
+ break;\
+ }\
+ if (end - left < left - start){\
+ stack[sp ][0] = start;\
+ stack[sp++][1] = right;\
+ start = left + 1;\
+ } else {\
+ stack[sp ][0] = left+1;\
+ stack[sp++][1] = end;\
+ end = right;\
+ }\
+ } else {\
+ if (cmp(start, end) > 0)\
+ SWAP(*start, *end);\
+ break;\
+ }\
+ }\
+ }\
} while (0)
#define COPY(condition)\
- for (i = 0; i < nbCodes; i++) { \
- buf[j].bits = getData(p_bits, i, bitsWrap, bitsSize); \
- if (!(condition)) \
- continue; \
- if (buf[j].bits > (3 * nbBits) || buf[j].bits > 32) { \
- warning("Too long VLC (%d) in init_vlc", buf[j].bits); \
- if (!(flags & INIT_VLC_USE_NEW_STATIC)) \
- free(buf); \
- return -1; \
- } \
- buf[j].code = getData(codes, i, codesWrap, codesSize); \
- if (buf[j].code >= (1LL << buf[j].bits)) { \
- warning("Invalid code %x for %d in init_vlc", buf[j].code, i); \
- if (!(flags & INIT_VLC_USE_NEW_STATIC)) \
- free(buf); \
- return -1; \
- } \
- if (flags & INIT_VLC_LE) \
- buf[j].code = bitswap32(buf[j].code); \
- else \
- buf[j].code <<= 32 - buf[j].bits; \
- if (symbols) \
- buf[j].symbol = getData(symbols, i, symbolsWrap, symbolsSize); \
- else \
- buf[j].symbol = i; \
- j++; \
- }
+ for (i = 0; i < nbCodes; i++) { \
+ buf[j].bits = getData(p_bits, i, bitsWrap, bitsSize); \
+ if (!(condition)) \
+ continue; \
+ if (buf[j].bits > (3 * nbBits) || buf[j].bits > 32) { \
+ warning("Too long VLC (%d) in init_vlc", buf[j].bits); \
+ if (!(flags & INIT_VLC_USE_NEW_STATIC)) \
+ free(buf); \
+ return -1; \
+ } \
+ buf[j].code = getData(codes, i, codesWrap, codesSize); \
+ if (buf[j].code >= (1LL << buf[j].bits)) { \
+ warning("Invalid code %x for %d in init_vlc", buf[j].code, i); \
+ if (!(flags & INIT_VLC_USE_NEW_STATIC)) \
+ free(buf); \
+ return -1; \
+ } \
+ if (flags & INIT_VLC_LE) \
+ buf[j].code = bitswap32(buf[j].code); \
+ else \
+ buf[j].code <<= 32 - buf[j].bits; \
+ if (symbols) \
+ buf[j].symbol = getData(symbols, i, symbolsWrap, symbolsSize); \
+ else \
+ buf[j].symbol = i; \
+ j++; \
+ }
/*------------------------------------------------------------------------*/
@@ -313,20 +313,23 @@ int VLC::allocTable(int size, int useStatic) {
memset(vlc->_table + vlc->_tableAllocated - (1 << vlc->_bits), 0, sizeof(VLC_TYPE) * 2 << vlc->_bits);
}
+
return index;
}
uint VLC::getData(const void *table, uint idx, uint wrap, uint size) {
- const uint8 *ptr = (const uint8 *)table + idx * wrap;
+ const uint8 *ptr = (const uint8 *)table + idx * wrap;
switch(size) {
case 1:
return *(const uint8 *)ptr;
+
case 2:
return *(const uint16 *)ptr;
+
default:
return *(const uint32 *)ptr;
- }
+ }
}
} // End of namespace Indeo
diff --git a/image/codecs/indeo/vlc.h b/image/codecs/indeo/vlc.h
index 51e887d3ae..a6dd692732 100644
--- a/image/codecs/indeo/vlc.h
+++ b/image/codecs/indeo/vlc.h
@@ -67,9 +67,9 @@ private:
*/
static uint getData(const void *table, uint idx, uint wrap, uint size);
public:
- int _bits;
- VLC_TYPE (*_table)[2]; ///< code, bits
- int _tableSize, _tableAllocated;
+ int _bits;
+ VLC_TYPE (*_table)[2]; ///< code, bits
+ int _tableSize, _tableAllocated;
VLC();