* later for deciding whether or not the page quality
* is acceptable.
*/
- bool decodeOK = decodeRow(recvRow, rowpixels, false); // MMR uses ECM below
+ bool decodeOK = decodeRow(recvRow, rowpixels);
if (seenRTC()) // seen RTC, flush everything
continue;
if (decodeOK) {
if (!RTCraised()) {
for (;;) {
raw.reset();
- (void) decodeRow(NULL, rowpixels, (params.df == DF_2DMMR));
+ (void) decodeRow(NULL, rowpixels);
if (seenRTC())
continue;
u_int n = raw.getLength();
u_int look_ahead = roundup(getPendingBits(),8) / 8;
endOfData = current() - look_ahead;
for (;;) {
- if( decodeRow(NULL, width, isG4) ){
+ if( decodeRow(NULL, width) ){
/*
* endOfData is now after last good row. Thus we correctly handle
* RTC, single EOL in the end, or no RTC/EOL at all
* the decoded data in raster.
*/
void
-G3Decoder::decode(void* raster, u_int w, u_int h, bool isG4)
+G3Decoder::decode(void* raster, u_int w, u_int h)
{
u_int rowbytes = howmany(w, 8);
if (curruns == NULL) {
tiff_runlen_t runs[2*4864]; // run arrays for cur+ref rows
setRuns(runs, runs+4864, w);
while (h-- > 0) {
- decodeRow(raster, w, isG4);
+ decodeRow(raster, w);
if (raster)
raster = (u_char*) raster + rowbytes;
}
} else {
while (h-- > 0) {
- decodeRow(raster, w, isG4);
+ decodeRow(raster, w);
if (raster)
raster = (u_char*) raster + rowbytes;
}
* the decoded data in the scanline buffer.
*/
bool
-G3Decoder::decodeRow(void* scanline, u_int lastx, bool isG4)
+G3Decoder::decodeRow(void* scanline, u_int lastx)
{
DECLARE_STATE_2D();
bool rowgood = true;
*/
u_int n;
for (n = 0; n < 4 && !dec.isNextRow1D(); n++)
- dec.decodeRow(NULL, w, (params.df == DF_2DMMR));
+ dec.decodeRow(NULL, w);
th += n; // compensate for discarded rows
/*
* Things get tricky trying to identify the last byte in
*/
for (; row < th+4 && !dec.isNextRow1D(); row++) {
dec.setRowNum(row);
- dec.decodeRow(NULL, w, (params.df == DF_2DMMR));
+ dec.decodeRow(NULL, w);
}
th = row; // add in discarded rows
/*