]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Bug 223: implements MMR in Class 1.
authorLee Howard <faxguy@howardsilvan.com>
Thu, 9 Oct 2003 22:47:52 +0000 (22:47 +0000)
committerLee Howard <faxguy@howardsilvan.com>
Thu, 9 Oct 2003 22:47:52 +0000 (22:47 +0000)
faxd/CopyQuality.c++
faxd/FaxModem.c++
faxd/G3Decoder.c++
faxd/TagLine.c++
faxd/tagtest.c++

index a879c6bddd9d31ccd0e1642a9b8f4b723f66b435..5556a3228e5636570403c0d2e8bdf6bb78cc60b3 100644 (file)
@@ -181,7 +181,7 @@ FaxModem::recvPageDLEData(TIFF* tif, bool checkQuality,
                 * 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) {
@@ -271,7 +271,7 @@ FaxModem::recvPageDLEData(TIFF* tif, bool checkQuality,
        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();
index e5474554339491ca9f7351330d3ad01569349f8a..27f3003a8ad3696fd3a0b3cf8bd12cc7fa966d0f 100644 (file)
@@ -858,7 +858,7 @@ u_char* MemoryDecoder::cutExtraRTC()
         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
index 3faf770a20b64f5556ecc9ab1b6000159f4f160c..eb3cacbbba66b18fa2b2ccbb9535f8ed13e893bb 100644 (file)
@@ -131,20 +131,20 @@ void G3Decoder::raiseRTC()        { siglongjmp(jmpRTC, 1); }
  * 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;
        }
@@ -190,7 +190,7 @@ G3Decoder::isNextRow1D()
  * 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;
index 41dc93b078a30805dfd85f04b37203999f4512ea..a0e6841b0468452fb6f0aa19fbefe1df95e27cc1 100644 (file)
@@ -259,7 +259,7 @@ FaxModem::imageTagLine(u_char* buf, u_int fillorder, const Class2Params& params)
      */
     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
index 29d6d866e2490cbb143c10e36e20746aed95d0d5..9c60eb420abbef66e71fe57feda6a9d5203eae4b 100644 (file)
@@ -289,7 +289,7 @@ imageTagLine(u_char* buf, u_int fillorder, const Class2Params& params)
      */
     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
     /*