Method and apparatus for delta row decompression

Abstract: A hardware implementation of a method of decompressing delta row compressed data to uncompressed data having line buffer memory (70) with incrementally advanceable current address (72). Offset counter (78) is used to determine the number of repeating bytes of data stored in line buffer memory (70) for a first row are to be reused in a second row, and replacement counter (76) is used to store the number of sequential replacement data bytes. A RAM controller state machine (84) reads data bytes from line buffer memory (70) to a laser printer engine, and after reading, checks through decompression state machine (82) to determine if a replacement data byte is called for at the current address in the next row of data, writing it in if called for, otherwise, merely incrementally advancing to the next current address in the line buffer memory.

Description: Background of the Invention Technical Field This invention generally relates to a hardware implementation of a method of decompressing Printer Control Language Mode Three compressed data to uncompressed data directly usable as rasterized data for the laser printer engine of a laser printer. Background Art The typical page or laser printer in use today has a dither pattern matrix resolution of 300 dots per inch (DPI) and up to 600 dots per inch (DPI). This translates, for a typical 8-1/2 x 11" paper size to image data of one megabyte at a 300 DPI resolution rasterized data information to four megabytes at 600 DPI resolution rasterized data information. In the typical laser printer, visual image data from the host processor would be sent to the on-board processor of the laser printer where it would be processed into strips of rasterized data, stored in the random aceess memory (RAM) of the printer and transmitted sequentially as lines of rasterized data to the print engine, where it would be used as command signals to turn on and off the laser of the print engine to form rasterized lines of image data on the print engine drum for subsequent transfer of charged particles of toner to the printed paper. One of the well known problems in the art is that laser print engines operate at a constant speed and as a result rasterized data must be transmitted to the print engine at a sufficient rate of speed to continuously supply the engine with data. If the engine were to run out of data midway through a printing operation, a print overrun occurs, wherein printing is aborted. It is generally known that the baud rate of transfer of information from a host processor to a printer is usually insufficient to keep up with the print engine, and as a result, an on-board printer processor is utilized to convert the image data from the host processor to rasterized - strips of uncompressed data which are stored in on-board memory storage for future transmission to the printer. In order to reduce the hardware cost of the printers in today's competitive market, a variety of techniques and hardware changes are used to increase the rate of data transmission from the host processor to the printer and also to reduce the amount of on-board memory required to store uncompressed data for the print engine. With the development of color printers utilizing toners of three primary colors, plus black, for inclusion in a dither pattern matrix of a laser printer image, the memory required for data image storage triples. Without the use of data compression techniques, the amount of memory required for a color image at a 600 DPI resolution would increase to approximately 16 megabytes per page. One of the techniques to increase the rate of transfer of information from the host processor to the printer is to send the information in compressed data format. There are a variety of well known data compression formats, which include, amongst others, run length encoding wherein data that repeats is encoded by indicating the identity of the data and then the run length of the repeat. Another compression technique, a modified form of which is utilized and implemented by the present invention, is known as Printer Control Language (PCL) Mode Three compression or delta row compression. Printer control language (PCL) is a trademark of the assignee of the present invention. In this compression technique, the basis of the compression is that only changes between the current row and the previous row are stored, together with some overhead, for transmission from the host processor to the printer, where the on-board processor decompresses the information to form rasterized rows of uncompressed image data which are stored as strips in memory storage and sent to the print engine as required in printer operation. Regardless of which compression technique is used in the prior art, the compressed data has to be decompressed in the on-board printer/processor RAM, and stored in RAM prior to transmission to the laser print engine. As can be seen, this still takes a considerable amount of printer memory capacity. This requirement for high printer memory capacity could be reduced if the rasterized strips could be stored in compressed data format, in the on-board RAM and then be directly decompressed at the interface with the print engine by means of a hardware implementation of the delta row decompression technique. DISCLOSURE OF INVENTION These objectives are achieved in the apparatus and method of the present invention, as defined in claims 1 and 7. A modified version of Printer Control Language (PCL) delta row compression, or Mode Three compression can be used. In this implementation the normal escape sequences, namely the commands "repeat number of rows", "zero number of rows", and "set seed row width" are not supported. Instead, four elements exist in the present implementation of delta row compression, namely a seed row, command bytes, offset bytes and data bytes. The seed row, or reference row for the first row of data after power up or a reset, is an arbitrarily defined "null" row, and for all the subsequent rows of data it is always the previous row. The command byte contains information as to the location of the changes in the seed row, and the number of bytes to be updated. The command bytes is divided into two parts, with three bits indicating the number of data bytes following the command byte for inclusion in the rasterized line of data. The offset data in the command byte, ranges from a value of zero, meaning that the replacement data byte is the next byte to be sent, up to a value of thirty. If the value of the offset equals thirty one, then the value of the byte immediately following the command byte, defined as an offset byte, will be added to the offset. If the offset byte has a value of 255, the byte following the offset byte will also be interpreted as an offset byte and added to the offset. when the offset byte has a value of less than 255, it will be treated as the last offset byte and the bytes following will be treated as replacement data bytes. A host processor is utilized to transmit visual image data through an input\output port to a printer bus of a laser page printer. The information transmitted form the host processor can be in a variety of compressed or uncompressed formats, including common postscript and graphics languages. Regardless of the language or format in which the data is received form the host processor, the visual data information received form the host processor is processed directly into this modified Printer Control Language delta row compressed format. This information is stored in RAM until it is needed by the laser printer engine and is then sent directly to decompression hardware circuitry where the method of decompression is implemented as the data is sent to the laser printer engine. A line buffer RAM holds a row of rasterized, uncompressed data which is about to be sent to a laser print engine. Current data address increup through each of the addresses in line buffer RAM as a RAM controller state machine is used to first Read the data in current address to the laser print engine, and then either leave the data unchanged or Write a replacement data byte into that current address, if that is what is called for in the next row of rasterized data being created in the decompression process. The process begins with a print engine data request to the RAM controller state machine from the laser print engine. This initiates in the RAM controller state machine a direct memory access (DMA) replacement data byte request to the on-board printer RAM and a second direct memory access data request from the decompression state machine to on-board RAM for a command byte. Upon receipt of the DMA requests, the RAM sends the command byte to a replacement counter and an offset counter and the associated replacement data bytes to a replacement byte bus. The offset information in the command byte is used to determine whether the offset is either 0, between a value of between 1 and 30, or of a value of 31. If the offset equals 0, then the next replacement byte is Read as current data out of the replacement byte bus and Written into the current address of the line buffer RAM immediately after the data byte that was Written in that current address in Read out to laser print engine. Once the replacement data byte has been Read into the current address, the RAM controller state machine increments the current data address and sends a byte strobe signal to the decompression state machine. A RAM address counter utilizes a line synchronize signal from laser print engine which indicates end of line as a reset to zero signal at the beginning of each new line of rasterized data. The byte strobe signal is used as a decrementing signal for the replacement counter and the offset counter. Concurrently, the replacement counter stores the information from the command byte indicating the number of replacement bytes to be sent and continues transmission of the sequence of replacement bytes by incrementally loading each byte into current data as byte strobe information is received indicating that the previous row data byte has been sent to the print engine. As each replacement byte is loaded and sent, the replacement counter is decremented down by the decompression state machine until the replacement value of the command byte equals 0. If the offset contained in the command byte does not equal 0 and does not equal 31, then the current data byte from the seed row stored in the line buffer RAM is sent to the print engine with the offset counter decrementing down, by a value of one for each byte of recurring data being sent until the offset value in the offset counter reaches a value of 0. Upon the offset counter reaching a value of 0, the transmission of replacement bytes to the current data addresses in the RAM begins again and the replacement counter begins again a decremental decrease resulting from the transmission of the replacement bytes into current data, until the replacement counter again reaches a value of 0. If the offset value of the command data byte, when initially loaded, equals 31, then again current data bytes from the seed row stored in the line buffer RAM are sent to the print engine until the offset counter again reaches a value of 0, at which time the decompression state machine makes a DMA request for the offset byte and also initiates a multiplexing function so that the 8-bit offset byte can be loaded to the offset counter. If the value of the offset byte equals 0, the replacement byte transmission sequence is immediately initiated. If the value of the offset byte does not equal either 0 or 255, the transmission of seed row data bytes sequence is initiated. If the value of the offset byte loaded is equal to 255, then in addition to the initiation of the transmission of seed row data bytes sequence, when offset counter again reaches a value of 0, a second command is initiated to load a next offset byte. This cycle would continue until the offset value of the last offset byte loaded equals something less than 255. The RAM controller state machine in reading and accepting data at the beginning of each cycle, is reset to all zeroes and upon the receipt of a print engine data request, initiates a Read of the data in the current address of line buffer RAM. If a replacement byte is called for in the next row of data, the RAM controller state machine will initiate a Write replacement data byte from the replacement bus to the current address in the line buffer RAM and then increment the current address. In the event that no replacement data byte is called for in the next row of data, indicating that seed row data bytes are to be retained and resent, no Write occurs and the address of the current data address is incrementally advanced. Concurrently with the incremental address advance, the RAM controller state machine generates the byte strobe signal which is sent to the decompression state machine where it is used as a decrementing signal. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a pictorial representation of a command byte. Fig. 2 is a pictorial representation of the line buffer RAM of the present invention showing a current address location. Fig. 3 is a high-level block diagram of a page printer unit that is adapted to carry out the invention. Fig. 4 is a global flow diagram illustrating the overall procedure of the invention. Fig. 5 is a high-level block diagram illustrating the procedure of the invention. Fig. 6 is a global flow diagram illustrating the sub routine for the RAM controller of the present invention. BEST MODE FOR CARRYING OUT INVENTION In the present invention, a modified version of Printer Control Language (PCL) delta row compression, or Mode Three compression, is utilized. In this implementation the normal escape sequences, namely the commands "repeat number of rows", "zero number of rows", and "set seed row width" are not supported. Instead, four elements exist in the present implementation of delta row compression, namely a seed row, command bytes, offset bytes and data bytes. The seed row, or reference row for the first row of data after power up or a reset, is an arbitrarily defined "null" row, and for all subsequent rows of data it is always the previous row. The command byte contains information as to the location of the changes in the seed row, and the number of bytes to be updated. As shown in Fig. 1, a command byte contains information as to the location of the changes from the seed row and the number of bytes to be updated. The byte is divided into two parts, with bit positions 5 through 7 containing information as to the number of replacement bytes and bit positions 0 through 4 containing information concerning the offset from the current position for the data byte or bytes following the command byte. Following the command byte, the new replacement data bytes are sent. As previously stated, the command byte is divided into two parts, with three bits, namely bits 5 through 7 indicating the number of data bytes following the command bytes for inclusion in the rasterized line of data with bit values 000 equaling a value of one, 001 equaling value 2, through 111 equaling the value of eight. This is possible since, by definition, a command byte is always followed by at least one substitute or replacement data byte. However, regarding the offset data in the command byte, it can range from a value of zero, meaning that the replacement data byte is the next byte to be sent, up to a value of thirty. In the present implementation of this delta row decompression technique, if the value of the offset equals thirty one, then the value of the byte immediately following the command byte, defined as an offset byte, will be added to the offset. If the offset byte has a value of 255, the byte following the offset byte will also be interpreted as an offset byte and added to the offset. When the offset byte has a value of less than 255, it will be treated as the last offset byte and the bytes following will be treated as replacement data bytes. An example of this compression technique is shown in detail in Tables 1 and 2 as follows: As can be seen, there is no end of row or repeat row commands provided in the compressed data. These functions are unnecessary since they can be performed by inherent design of the hardware of the laser print engine which generates an end of line signal which can be used to reset the RAM address counter. Referring to Figs. 3, 4 and 5, the hardware implementation circuitry of the present invention is shown in generalized format. Referring to Fig. 3, host processor 12 is utilized to transmit the visual image data through input\output port 14 to printer bus 16 of laser page printer 10. The information being transmitted from host processor 12 can be in a variety of compressed or uncompressed formats, including common postscript and graphics languages. Regardless of the language or format in which the data is received from the host processor, it is stored in printer RAM 20 and processed by on-board processor 18, using a variety of subroutines stored in memory storage 22. In the present invention, visual data information received from the host processor is processed directly into this modified Printer Control Language delta row compressed format as above described in this specification. This information is stored in RAM 20 until it is needed by print engine 24 and is then sent directly to decompression hardware circuitry 26 where the method of decompression is implemented as the data is sent to print engine 24. As previously stated, this hardware implementation and process reduces the amount of memory required for storing raster strips of information, as well as reducing the memory band width of the shared memory consumed by the engine Direct Memory Access (DMA) with a net result of faster processing and printer operation. The conceptual key to the present hardware implementation of this decompression method lies in the interplay between line buffer RAM 70 and RAM controller state machine 84 which are shown conceptually in Figs. 2 and 6. As shown in Fig. 2, line buffer RAM 70 can be thought of as a holding a row of rasterized, uncompressed data which is about to be sent to laser print engine 24. Current data RAM 72 increments up through each of the addresses in line buffer RAM 70 as RAM controller state machine 24 is used to first Read the data in current address 72 to the laser print engine 24, and then either leave the data unchanged or Write a replacement data byte into current address 72, if that is what is called for in the next row of rasterized data being created in the decompression process. Referring now to Figs. 4 and 5, the present invention is shown in global or flow chart format. The process begins with a print engine data request to RAM controller state machine 84 from the laser print engine and a data request acknowledgment. This initiates in RAM controller state machine 84 a direct memory access (DMA) replacement data byte request to RAM 20 (as shown in Fig. 3) and a second direct memory access data request from decompression state machine 82 to RAM 20 for a command byte. Upon receipt of both DMA requests, RAM 20 sends an acknowledgment of the requests and then sends the command byte to replacement counter 76 and offset counter 78 and the associated replacement data bytes to replacement byte bus 68. As previously stated, the command byte contains information as to the number of replacement data bytes and the offset of the replacement data bytes from the current seed row data bytes stored in line buffer ram 70. As shown in circle 40 of Fig. 4, the process starts with a "power up" reset and a DMA command byte request resulting in the transmission of a command byte with bits 5 through 7 being loaded through multiplexer 80 to offset counter 78 of Fig. 5 and used in decision circle 42 of Fig. 4 to determine whether the offset is either 0, between a value of between 1 and 30, or of a value of 31. The replacement data bytes are sent to and temporarily stored in replacement byte bus 68 as shown in Fig. 5. If the offset equals 0, as shown in circle 58 of Fig. 4, then the next replacement byte is Read as current data out of replacement byte bus 68 and Written into current address 72 of the line buffer RAM 70 immediately after the data byte that was Written in that current address in Read out to laser print engine 24. Once the replacement data byte has been Read into current address 72, RAM controller state machine 84 increments the current data address 72 and sends a byte strobe signal to decompression state machine 82. RAM address counter 86 utilizes a line synchronize signal from laser print engine 24 which indicates end of line as a reset to zero signal at the beginning of each new line of rasterized data. The byte strobe signal is used as a decrementing signal for replacement counter 76 and offset counter 78 as shown in Fig. 5, and representationally in circles 48, 52 and 60 in Fig. 4. Concurrently, as shown in circle 60 of Fig. 4, replacement counter 76 of Fig. 5 stores the information from the command byte indicating the number of replacement bytes to be sent and continues transmission of the sequence of replacement bytes by incrementally loading each byte into current data as byte strobe information is received indicating that the previous row data byte has been sent to print engine 24. As each replacement byte is loaded and sent, replacement counter 76 is decremented down by decompression state machine 82 until the replacement value of the command byte equals 0. As shown in circle 46 of Fig. 4, if the offset in decision box 42 does not equal 0 and does not equal 31, then the current data byte from the seed row stored in line buffer RAM 70 is sent to the print engine with offset counter 78 decrementing down, as shown in circle 48, by a value of one for each byte of recurring data being sent until the offset value in offset counter 78 reaches a value of 0. Upon offset counter reaching a value of 0, the transmission of replacement bytes to current data RAM 72 begins again as shown in circle 58 and replacement counter 76 of Fig. 5 and circle 60 of Fig. 4 begins again a decremental decrease resulting from the transmission of the replacement bytes into current data, until replacement counter 76 again reaches a value of 0. If the offset value of the command data byte equals 31, as shown in circle 50 of Fig. 4, then again current data bytes from the seed row stored in line buffer RAM 70 are sent to print engine 24 until, as shown representationally in circle 52 of Fig. 4, until offset counter 78 again reaches a value of 0, at which time decompression state machine 82 makes a DMA request for the offset byte and also initiates a multiplexing function as shown in box 80 of Fig. 5, so that the 8-bit offset byte, including bits 5, 6 and 7, can be loaded to offset counter 78. As shown in circle 56 of Fig. 4, if the value of the offset byte equals 0, the replacement byte transmission sequence of circle 58 is immediately initiated. If the value of the offset byte does not equal either 0 or 255, the transmission of seed row data bytes sequence of circles 46 and 48 is initiated. If the value of the offset byte loaded is equal to 255, as shown in circle 56 of Fig. 4, then in addition to the initiation of the transmission of seed row data bytes sequence of circles 46 and 48, when offset counter again reaches a value of 0, a second command is initiated at circle 50 to load a next offset byte at circle 54. This cycle would continue until the offset value of the last offset byte loaded equals something less than 255. Fig. 6 shows RAM controller state machine 84 in system flow chart format, wherein RAM controller state machine 84 in reading and accepting data at the beginning of each cycle is reset to all zeroes in circle 90 and upon the receipt of a print engine data request, in circle 92, it initiates a Read of the data in the current address of RAM 72. If circle 58 of Fig. 4 is "on", RAM controller state machine will initiate a Write replacement data byte from replacement bus 68 to the next current address RAM 72 and then increment the current address in circle 96. In the event that circle 58 is "off" indicating that seed row data bytes are to be sent, after the Read in circle 92, no Write occurs and the address of current data 72 is incrementally advanced in circle 96. Concurrently with the incremental address advance in circle 96, RAM controller state machine generates the byte strobe signal which is sent to decompression state machine 82 where it is used as a decrementing signal.

Claims: An electronic apparatus for decompressing data, the data having been compressed based on changes between a current row and a preceding row, the apparatus characterized by: a line buffer memory (70) for storing a seed row of decompressed data; means (76, 78) for receiving command data bytes; means (68) for receiving replacement data bytes following the command data bytes; means for identifying (82) from the information contained in a command data byte the location and number of data bytes within the seed row of data to be replaced with replacement data bytes when forming a current row of decompressed data; means for sending (70, 72, 84, 86), seriatim, data of the seed row and the current row to a laser printer engine (26); and means for replacing (70, 72, 78, 80, 82, 84, 86) each identified data byte of the seed row with a replacement data byte as each identified data byte of the current row is sent to said laser printer engine (26). The apparatus of Claim 1 further characterized in that the means for sending (70, 72, 84, 86), seriatim, data of the seed row and the current row to a laser printer engine (26) and the means for replacing (70, 72, 78, 80, 82, 84, 86) each identified data byte of the seed row with a replacement data byte as each identified data byte of the current row is sent to said laser printer engine (26) comprises: a memory controller state machine (84) for, upon receiving an engine data request from the laser printer engine (26), reading data from a current address (72) in said line buffer memory (70), determining whether the current address (72) is to be the location of a replacement data byte in said current row of decompressed data, and if it is to be the location of a replacement data byte in said current row of decompressed data, then writing said replacement data byte into the current address (72) within said line buffer memory (70) and then incrementing the current address (72) to the next address within said line buffer memory (70), or if the current address (72) is not to be the location of a replacement data byte in said current row of decompressed data, then incrementing the current address (72) to the next address within said line buffer memory (70). The apparatus of Claim 2 further characterized in that said memory controller state machine (84) includes a RAM and means for generating and sending a signal upon said incrementing of said current address (72) within said line buffer memory (70). The apparatus of any one of Claim 1, 2 or 3 further characterized in that said means for identifying (82) from the information contained in a command data byte the location and number of data bytes within the seed row of data to be replaced with replacement data bytes when forming a current row of decompressed data comprises: means for determining (78, 80, 82) the number of incremental addresses within the line buffer memory (70) between said current address (72) and the address into which a first replacement data byte will be sent; and means for determining (76, 82) the number of additional replacement data bytes to be sent, seriatim, after the first replacement data byte has been sent. The apparatus of Claim 4 further characterized in that said means for determining (78, 80, 82) the number of incremental addresses within the line buffer memory (70) between said current address (72) and the address into which a first replacement data byte will be sent comprises: a decompression state machine (82) for determining from the command data byte the number of addresses within the line buffer memory (70) between the present current address (72) within said line buffer memory (70) and the address into which a first replacement data byte will be written and loading said number of addresses to an offset counter (78), said decompression state machine (82) being capable of receiving the signal from the memory controller state machine (84) and upon receipt of a signal from said memory controller state machine (84) sending a decrementing signal to an offset counter (78) after said current address (72) of the line buffer memory (70) has been read to the laser printer engine (26) and has been incremented away from without having been rewritten with a replacement data byte; and an offset counter (78) for storing said number of addresses and decrementing said number down by a value of one upon receipt of a decrementing signal from said decompression state machine (82). The apparatus of Claim 4 or 5 further characterized in that said means for determining (76, 82) the number of additional replacement data bytes to be sent, seriatim, after the first replacement data byte has been sent comprises: a decompression state machine (82) for determining from the command data byte a number of replacement data bytes and loading said number of replacement data bytes to a replacement counter (76), said decompression state machine (82) being capable of receiving the signal from the memory controller state machine (84) and upon receipt of a signal from said memory controller state machine (84) sending a decrementing signal to a replacement counter (76) after a replacement data byte has been written to said current address (72) in the line buffer memory (70); and a replacement counter (76) for storing said number of replacement data bytes and decrementing said number down by a value of one upon receipt of a decrementing signal from said decompression state machine (82). A method of decompressing data, the data having been compressed based on changes between a current row and a preceding row, the method characterized by: storing a seed row of decompressed data in a memory line buffer; receiving command data bytes and replacement data bytes; identifying from the information contained in a command data byte the location and number of data bytes within the seed row of data to be replaced with replacement data bytes when forming a current row of decompressed data; sending, seriatim, data of the seed row and the current row to a laser printer engine; and replacing each identified data byte of the seed row with a replacement data byte as each identified data byte of the current row is sent to said laser printer engine. The method of Claim 7 further characterized in that sending, seriatim, the data of the seed row and the current row to said laser printer engine and replacing each identified data byte of the seed row with a replacement data byte as each identified data byte of the current row is sent to said laser printer engine comprises: in a memory controller state machine, upon receiving an engine data request from said laser printer engine, reading data from a current address in said line buffer memory; determining whether said current address is to be the location of a replacement data byte in the current row of decompressed data; and if it is to be the location of a replacement data byte in the current row of decompressed data then writing said replacement data into said current address within said line buffer random access memory; and then incrementing said current address to the next address within said line buffer random access memory; or if the current address is not to be the location of a replacement data byte in the current row of decompressed data then incrementing the current address to the next address within said line buffer random access memory. The method of Claim 8 further characterized in that said identifying from the information contained in the command data byte the location and number of data bytes within the seed row of data to be replaced with replacement data bytes when forming a current row of decompressed data comprises: determining the number of incremental addresses within the line buffer memory between the current address and the address into which a first replacement data byte will be sent; and determining the number of additional replacement bytes to be sent, seriatim, after the first replacement data byte has been sent.

Inventors: VONDRAN GARY L, VONDRAN, GARY L.
Applicants: HEWLETT PACKARD CO, HEWLETT-PACKARD COMPANY
Application year: 1993
Main classification: G06K15
IPC codes: H03M7, B41J2, G06F5, H03M3, G06F3, G06K15