Patent GB-1347031-A (GB)
Title: Variable length coding method and apparatus
IPC: G09G1/14
Filed: 1971-04-20
Abstract: 1347031 Image transmission INFORMATION INTERNATIONAL Inc 20 April 1971 [22 April 1970] 10068/71 Headings H4F and H4P In a system wherein a two-tone pattern is scanned in successive parallel lines and the length of each differently toned line segment is coded as an equivalent binary "word", i.e. a run length encoding scheme, the length of each encoding word is made a function of the segment length, thereby reducing the total signal length. Such a system is of particular use when generating electronic fonts (or drawings, photographs &c.) for storage in a memory of limited capacity. As described, each word consists of an integral number of four-bit groups, the number of groups being determined by segment length. The first bit "C<SP>1</SP>" of each group is reserved for coding for the start of each word (becomes "1" instead of "0"). The second bit "C 2 " of each word is "0" unless (a) the first segment is black when "C 2 " for the first word is "1" i.e. it codes for the tone of the first segment, and consecutive segments necessarily alternate in tone, or (b) it is the last word in the scanline, when "B"="1" instructs for the trace to be returned to the start of the next scanline. For a scanline of 2<SP>10</SP> elements, a maximum of four groups is therefore required (11 length encoding bits, 4 bits "C 1 " and one bit "C 2 ") for each word. Depending on whether the segment is less than 2<SP>8</SP>, 2<SP>5</SP> or 2<SP>2</SP> elements in length, the corresponding one, two or three groups will consist solely of zeros and are omitted, Figs. 2 and 3 (not shown). A further compaction of the signal is obtained in that if the final segment is of a predetermined one of the tones, e.g. white, its length is not encoded (so that the final word is 0011 irrespective of segment length) since it is only part of the background, and the reproducing trace, on a cathode-ray tube for example, is caused to retrace immediately after the preceding segment. In the detailed circuit diagram, Figs. 4a and 4b, the output 60 of a flying spot scanner scanning, e.g. a transparency of a letter, Fig. 1 (not shown), is converted by inverter 70, AND gates 62, 72 and clock 64 to black and white pulse trains B and W, which are directed to respective counters 68, 74, bi-stables A, B, C, A<SP>1</SP>, B<SP>1</SP>, C<SP>1</SP>, of registers 102, 102<SP>1</SP> also being set when the count exceeds 2<SP>2</SP>, 2<SP>5</SP> or 2<SP>8</SP>. A signal 55 starts the scanning, the clock 64 and resets counters 68, 74. Bi-stables 116, 116<SP>1</SP> are set and serve to detect the occurrence of an "all black" (ABS) or "not all black" (ABS) scan (up to the point being scanned) and the white counterparts. Logic circuits 118, 120-122 detect transitions between consecutive segments and provide timing pulses B(W)TP 1 -B(W)TP 5  for reading out the length of the preceding segment as four sequential parallel groups of three binary digits each, using AND gates 75-86 and OR gates 92, 94, 96, which are recorded in a memory 98. For a particular group to be stored the corresponding bi-stable A, B, C must have been set during the count so that the corresponding timing pulse activates a gate 104-106, and then via a delay 112 the memory 98. The fourth binary bit of each group is supplied by an OR gate 91 which is activated only by the timing pulse B(W)TP 4 . The fifth pulse B(W)TP 5  serves to reset the respective counter and register 102. The twelfth portion of each counter is an independent bi-stable C 2 . That of counter 68 is set if the initial segment is black by simultaneous signals SS and B, gate 132, or by an "end of scan" signal ES. During the rest of the line it is inhibited due to the occurrence of a W input at gate 134. C 2  of counter 74 may only be set at the end of a scan, by simultaneous ES and AWS pulses or by a signal ABSP indicating that the entire line is black. Thus the bit C 2  of the first word is "0" or "1" depending on the first segment tone, and is "0" for successive words with the exception of the last word. If the entire line or the final segment is black, the ES signal activates generator 90<SP>1</SP> (gate 121<SP>1</SP>) and after the coded length is stored, generator 90 is activated via gate 124, giving a final word 0011. If the final segment is white, a gate 114 inhibits gates 76-86 so that the final word is still 0011 from counter 74 regardless of the segment length. If the entire line is white C 2  of counter 74 remains at "0" and the ES pulse sets C 2  of counter 68 to "1" and activates generator 90 via gate 118 giving a word 0001 since gate 114 provides an inhibiting signal "I". Thereafter gate 124<SP>1</SP> activates generator 90<SP>1</SP> to provide a final word 0011. In each case the final word 0011 instructs the reproducer to execute a retrace, without completing the rest of the scan, which is only background. The two groups for an all white scan may alternatively be replaced by a count to cause the line to be shipped during reproduction. The reproducer may be identical with a cathode-ray tube used as the flying spot scanner when generating the signals to be stored, the scanned transparency being replaced by a photographic film.