Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] consecutive bad lines > total bad lines?



On 2003.12.11 08:14 Giulio Orsero wrote:
cvs20031206, rh6x, rockwell class1.

RECV: 2291 total lines, 0 bad lines, 1 consecutive bad lines

The problem existed prior to the ECM development and was perpetuated by that development. The problem is that the decoder doesn't take into account that RTCrow is supposed to reference the row number after the last image row (the first row of the RTC/EOFB) rather than the last line of image data. I think that this was probably a result of confusion about the first row being numbered as zero (row 0).


The attached patch fixes this as well as 1) preventing the bottom one line of image data from being trimmed, and 2) it should correct some line-counting disagreement that we've seen between the HylaFAX CQ decoder and some Class 2 CQ mechanisms.

Lee.

diff -Nru hylafax-4.2.0.orig/faxd/G3Decoder.c++ hylafax-4.2.0/faxd/G3Decoder.c++
--- hylafax-4.2.0.orig/faxd/G3Decoder.c++	Wed Dec 10 13:33:42 2003
+++ hylafax-4.2.0/faxd/G3Decoder.c++	Thu Dec 11 09:52:31 2003
@@ -217,7 +217,7 @@
 	b1 = *pb++;
 #define	badlength(a0,lastx) do {			\
     if (isG4)						\
-	RTCrow = rowref-1;				\
+	RTCrow = rowref;				\
     badPixelCount("2D", a0, lastx);			\
     rowgood = false;					\
 } while (0)
@@ -228,7 +228,7 @@
 #define	badlength(a0,lastx) do {			\
     nullrow = (a0 == 0);				\
     if (nullrow && ++RTCrun == 5 && RTCrow == -1)	\
-	RTCrow = rowref-5;				\
+	RTCrow = rowref-4;				\
     badPixelCount("1D", a0, lastx);			\
     rowgood = false;					\
 } while (0)


Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services