📄 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 algorithmcan be produced.2.4. The Encoding Program The encoding algorithm has been implemented in the PDP-11 MACRO-11assembly language for the RT-11 operating system. The program acceptsfacsimile data in 16-bit run-length format or bit-map format. The inputdata would normally be in a file, possibly obtained by translating someother representation (e.g., T.4 format) to run-length or bit-map format.The program produces an output consisting of data compressed in Dacom450 format and packed in 585-bit frames along with the correspondingheader and checksum information. The encoding program needs to be careful about how to break dataacross frames and how many bits of data to insert in each frame. Therules mentioned in section 2.2. help to solve the first problem. Thesecond problem is a little less understood. The problem arises becausedata bits are required by the printing mechanism at a constant rate, butsuccessive frames transmitted at the line rate can contain differentamounts of decoded information, leading to buffer overrun in extremecases. In order to compensate for the rate mismatch, it has been foundsufficient to control the size of the data portion of the frameaccording to a simple set of empirical rules which produce results quitesimilar to the scanner iteslf. According to these rules, a frame is"full" when it contains more than 500 bits of data or when the datarepresents 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 inthe so-called UCL format [4]. In this format, each 585-bit frame isstored in a 76-byte record. The first byte specifies the length of therecord, the second specifies a command and the remaining 72 bytescontain the 585 bits of the original Dacom 450 frame zero-filled at theDacom 450/500 Facsimile Data Transcoding PAGE 11end. 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 blackin negative two's complement values. A zero word terminates each line,with the trailing white run suppressed if present. An all-white line isencoded as a single run of length one followed by a zero word. The fileis 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 whichrepresents the number of pels in a line and the second the number oflines in the page. Each scanning line of data is represented in anintegral number of bytes, the last byte of a line zero-filled ifnecessary.3. Dacom 500 Data Compression Principles The Dacom 500 machines are high-speed versions of the Dacom 450machines and operate in the 50-Kbps range using the T.4 compressionalgorithm. This algorithm, described in the [5], is a one-dimensionalone, rather than the two-dimensional one used in the Dacom 450 anddescribed in previous sections. Since this algorithm is well known andthe subject of an international standard, it will not be furtherdiscussed here.3.1. Dacom 500 Decoding Algorithm The decoding program has been implemented in the PDP-11 MACRO-11assembly language for the DCNET and RT-11 operating systems. Itoperates on a file containing facsimile data encoded using the T.4algorithm and produces a file in bit-map format. The decoding program scans the input data bit-by-bit and recognizessequences of bits which form valid run-length codes (see the tables in[5]). The table of Huffman codes can be represented as a binary treewith the values of the run lengths (e.g. 1, 2, 64, 1728, etc.) at theterminal nodes and each branch labeled 0 or 1. The code for any runlength then is the sequence of branch labels on the path from the rootto 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 asseparate binary trees in the decoding program. The decoding algorithmstarts by initializing an accumulator at zero. It then begins at theroot of the corresponding tree and traverses the tree as it consumesbits one-by-one from the input. When a terminal node is reached, thevalue stored at that node is added to the accumulator. If a make-upnode is reached, the value at that node is added to the accumulator andthe search is resumed with the same tree to obtain the terminatingvalue; otherwise, the accumulator represents the current run length andthe search resumes with the alternate tree.3.2. Dacom 500 Encoding Program The encoding program is also implemented in the PDP-11 MACRO-11assembly language for the DCNET and RT-11 operating systems. It scansthe bit-map input and encodes each run of black or white pels by asimple table lookup of the Huffman codes. It operates on a filecontaining facsimile data in bit-map format and produces a file in T.4format. The T.4 specifications [5] require a minimum transmission timeper scan line of 4.3 milliseconds, which at 50-Kbps corresponds to 242bits (DATA bits plus any required FILL bits plus the EOL bits equal 242bits minimum).3.3. Dacom 500 File Formats The file consists of a number of 512-byte blocks, the first ofwhich is the header. The header contains a list of two-byte entries,the first of which contains the number of pages and the remaining thelengths (in blocks) of each page in turn. The remaining blocks of thefile contain the data for each page in T.4 format. The data for eachpage is preceded by a page-setup command and succeeded by apage-end-of-record command, as transmitted by the Dacom 500. The formatof both commands consists of the 12-bit T.4 EOL code (000000000001)repeated six times and followed by a special 4-bit code word alsorepeated six times. The special code word consists of bits B1 throughB4 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-B4Dacom 450/500 Facsimile Data Transcoding PAGE 133.4. Comparison of Facsimile Formats and Transcoding Speeds Four different file formats are presently used in our system forfacsimile data storage: Dacom 450, Dacom 500 (T.4), 16-bit run-lengthand bit-map. The sizes of typical files (in megabits) in these formatsare 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.41The file called PNGUIN is a block drawing of dancing penguins andrepresents a "small" file. The file called INTELP is a compositeINTELPOST test image with text and graphics and represents a "medium"file. Finally, the file called PANDA is a half-tone newspaperphotograph of a giant panda and represents a "monster" file (this filewas recorded on the Dacom 450 in quality mode and is therefore abouthalf the size it would be in detail mode). The size of the bit-map filefor all these images is 3.8 megabits. Figure 5 shows the file sizes (in 512-byte blocks) and transcodingtimes (in seconds) for the INTELPOST test page. The file sizes areindicated on the boxes, while the transcoding times are indicated on thearrows. 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 TimesDacom 450/500 Facsimile Data Transcoding PAGE 144. References1. 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 + -