Patch which fixes corruption at the end of the tagline on each
fax page transmitted. Caused by a calculation error
* adjusted by the look ahead, a factor of the number of
* bits pending in the G3 decoder's bit accumulator.
*/
- u_int decoded = dec.current() - roundup(dec.getPendingBits(),8) - buf;
+ u_int look_ahead = roundup(dec.getPendingBits(),8) / 8;
+ u_int decoded = dec.current() - look_ahead - buf;
if (params.vr == VR_NORMAL) {
/*
* adjusted by the look ahead, a factor of the number of
* bits pending in the G3 decoder's bit accumulator.
*/
- u_int decoded = dec.current() - roundup(dec.getPendingBits(),8) - buf;
+ u_int look_ahead = roundup(dec.getPendingBits(),8) / 8;
+ u_int decoded = dec.current() - look_ahead - buf;
if (params.vr == VR_NORMAL) {
/*
* Scale text vertically before encoding. Note the