📄 rfc803.txt
字号:
can be used to form bit maps and other representations of the data.
Optionally, a printed trace of the operations performed by the algorithm
can be produced.
2.4. The Encoding Program
The encoding algorithm has been implemented in the PDP-11 MACRO-11
assembly language for the RT-11 operating system. The program accepts
facsimile data in 16-bit run-length format or bit-map format. The input
data would normally be in a file, possibly obtained by translating some
other representation (e.g., T.4 format) to run-length or bit-map format.
The program produces an output consisting of data compressed in Dacom
450 format and packed in 585-bit frames along with the corresponding
header and checksum information.
The encoding program needs to be careful about how to break data
across frames and how many bits of data to insert in each frame. The
rules mentioned in section 2.2. help to solve the first problem. The
second problem is a little less understood. The problem arises because
data bits are required by the printing mechanism at a constant rate, but
successive frames transmitted at the line rate can contain different
amounts of decoded information, leading to buffer overrun in extreme
cases.
In order to compensate for the rate mismatch, it has been found
sufficient to control the size of the data portion of the frame
according to a simple set of empirical rules which produce results quite
similar to the scanner iteslf. According to these rules, a frame is
"full" when it contains more than 500 bits of data or when the data
represents more than 4800*X pels (or columns) of information,
where X = 2 for transmission rate 2.4 kbs,
X = 1 for transmission rate 4.8 kbs,
X = 1/2 for transmission rate 9.6 kbs.
2.5. Dacom 450 File Formats
Dacom 450 facsimile data is ordinarily stored as an RT-11 file in
the so-called UCL format [4]. In this format, each 585-bit frame is
stored in a 76-byte record. The first byte specifies the length of the
record, the second specifies a command and the remaining 72 bytes
contain the 585 bits of the original Dacom 450 frame zero-filled at the
Dacom 450/500 Facsimile Data Transcoding PAGE 11
end. The command byte is coded as follows:
a. 56 (70 octal): The data field contains a setup frame (the first
record of the file). The length byte is 76 (114 octal).
b. 57 (71 octal): The data field contains a data frame (the remaining
records in the file except the last one). The length byte is 76
(114 octal).
c. 58 (72 octal): End of file (the last frame of the file). There is
no data field and the length byte is 2.
2.6. Run-Length and Bit-Map File Formats
The decode program produces 16-bit run length words as its output.
Each run is encoded in a 16-bit word, with white in positive and black
in negative two's complement values. A zero word terminates each line,
with the trailing white run suppressed if present. An all-white line is
encoded as a single run of length one followed by a zero word. The file
is terminated by a line of length zero, that is, a single zero word.
Bit-map files consist of a four-byte header followed by the data.
The header consists of two 2-byte quantities, the first of which
represents the number of pels in a line and the second the number of
lines in the page. Each scanning line of data is represented in an
integral number of bytes, the last byte of a line zero-filled if
necessary.
3. Dacom 500 Data Compression Principles
The Dacom 500 machines are high-speed versions of the Dacom 450
machines and operate in the 50-Kbps range using the T.4 compression
algorithm. This algorithm, described in the [5], is a one-dimensional
one, rather than the two-dimensional one used in the Dacom 450 and
described in previous sections. Since this algorithm is well known and
the subject of an international standard, it will not be further
discussed here.
3.1. Dacom 500 Decoding Algorithm
The decoding program has been implemented in the PDP-11 MACRO-11
assembly language for the DCNET and RT-11 operating systems. It
operates on a file containing facsimile data encoded using the T.4
algorithm and produces a file in bit-map format.
The decoding program scans the input data bit-by-bit and recognizes
sequences of bits which form valid run-length codes (see the tables in
[5]). The table of Huffman codes can be represented as a binary tree
with the values of the run lengths (e.g. 1, 2, 64, 1728, etc.) at the
terminal nodes and each branch labeled 0 or 1. The code for any run
length then is the sequence of branch labels on the path from the root
to the terminal node representing this length.
Dacom 450/500 Facsimile Data Transcoding PAGE 12
The tables for black and white run-length codes are stored as
separate binary trees in the decoding program. The decoding algorithm
starts by initializing an accumulator at zero. It then begins at the
root of the corresponding tree and traverses the tree as it consumes
bits one-by-one from the input. When a terminal node is reached, the
value stored at that node is added to the accumulator. If a make-up
node is reached, the value at that node is added to the accumulator and
the search is resumed with the same tree to obtain the terminating
value; otherwise, the accumulator represents the current run length and
the search resumes with the alternate tree.
3.2. Dacom 500 Encoding Program
The encoding program is also implemented in the PDP-11 MACRO-11
assembly language for the DCNET and RT-11 operating systems. It scans
the bit-map input and encodes each run of black or white pels by a
simple table lookup of the Huffman codes. It operates on a file
containing facsimile data in bit-map format and produces a file in T.4
format. The T.4 specifications [5] require a minimum transmission time
per scan line of 4.3 milliseconds, which at 50-Kbps corresponds to 242
bits (DATA bits plus any required FILL bits plus the EOL bits equal 242
bits minimum).
3.3. Dacom 500 File Formats
The file consists of a number of 512-byte blocks, the first of
which is the header. The header contains a list of two-byte entries,
the first of which contains the number of pages and the remaining the
lengths (in blocks) of each page in turn. The remaining blocks of the
file contain the data for each page in T.4 format. The data for each
page is preceded by a page-setup command and succeeded by a
page-end-of-record command, as transmitted by the Dacom 500. The format
of both commands consists of the 12-bit T.4 EOL code (000000000001)
repeated six times and followed by a special 4-bit code word also
repeated six times. The special code word consists of bits B1 through
B4 as defined below.
B1: VERTICAL RESOLUTION
0 = 7.7 lines per millimeter
1 = future option, not implemented
B2: OUTPUT PAPER LENGTH
0 = short length (Letter size)
1 = long length (Legal size)
B3: DOCUMENT IN SCANNER
0 = no document present (end of page)
1 = document present (beginning of page)
B4: ODD PARITY OVER B1-B4
Dacom 450/500 Facsimile Data Transcoding PAGE 13
3.4. Comparison of Facsimile Formats and Transcoding Speeds
Four different file formats are presently used in our system for
facsimile data storage: Dacom 450, Dacom 500 (T.4), 16-bit run-length
and bit-map. The sizes of typical files (in megabits) in these formats
are shown below for comparison.
File Dacom Dacom 16-bit
450 500 run-length
----------------------------------
PNGUIN 0.22 0.5 0.27
INTELP 0.62 0.77 3.3
PANDA 1.02 2.03 6.41
The file called PNGUIN is a block drawing of dancing penguins and
represents a "small" file. The file called INTELP is a composite
INTELPOST test image with text and graphics and represents a "medium"
file. Finally, the file called PANDA is a half-tone newspaper
photograph of a giant panda and represents a "monster" file (this file
was recorded on the Dacom 450 in quality mode and is therefore about
half the size it would be in detail mode). The size of the bit-map file
for all these images is 3.8 megabits.
Figure 5 shows the file sizes (in 512-byte blocks) and transcoding
times (in seconds) for the INTELPOST test page. The file sizes are
indicated on the boxes, while the transcoding times are indicated on the
arrows. All times were obtained on the LSI-11/23 processor.
193 925
+-----------+ 95 +-----------+
| |----------->| |
| T.4 | | Bit-map |
| |<-----------| |
+-----------+ 165 +-----------+
A |
60 | |
.----------------------' |110
| |
| V
+-----------+ 89 +-----------+
| |----------->| |
|Run-length | | Dacom 450 |
| |<-----------| |
+-----------+ 153 +-----------+
413 155
Figure 5. File Sizes and Transcoding Times
Dacom 450/500 Facsimile Data Transcoding PAGE 14
4. References
1. Weber, D.R. An adaptive run-length encoding algorithm. ICC-75,
IEEE, San Francisco, California, June 1975.
2. Palmer, L.C. Final Report, COMSAT Participation in the DARPA Packet
Satellite Internetworking and Speech Applications Program. COMSAT
Laboratories, July 1980.
3. Katz, A. Decoding Facsimile Data from the Rapicom 450. DARPA
Network Working Group Report RFC-798, USC/Information Sciences
Institute, September 1981.
4. Postel, J. Rapicom 450 Facsimile File Formats. DARPA Network
Working Group Report RFC-769, USC/Information Sciences Institute,
September 1980.
5. Draft Recommendation T.4 - Standardization of Group 3 Facsimile for
Document Transmission. CCITT Study Group XIV Contribution #25-E,
December 1977. (Also in RFC-804).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -