In printers that employ laser engines as the "print mechanism", data must be provided at a speed that is fast enough to keep up with the print action (which can be measured by the rate of movement of the paper past the imaging drum). In such printers, formatting is either performed on the host computer, with large volumes of rasterized image data shipped to the printer at high speed, or on a formatter within the printer itself. Since a conventional laser printer engine operates at a constant speed, if rasterized image data is not available when a previous segment of image data has been imprinted, a "print overrun" or "punt" occurs and the page is not printable. In essence, the Image Processor that rasterizes the image data "races" the Output Video Task that images the data onto the imaging drum. This is commonly termed "racing the laser".
Several methods have been used in the prior art to avoid print overruns. First, a full raster bit map of an entire page may be stored in the printer so that the print mechanism always has rasterized data awaiting printing. However, this solution requires large amounts of random access memory (RAM) for each page. A second method for assuring the availability of print data to a laser printer is to construct a display list from the commands describing a page. During formatting, a page description received from a host is converted into a series of simple commands, called display commands, that describe what must be printed. The display commands are parsed and sorted according to their vertical position on the page. The page is then logically divided into sections called bands (or page strips), which bands are then individually rendered (i.e., the described objects in the bands are rendered) into a raster bit map and passed to the print engine for printing. This procedure enables lesser amounts of RAM to be used for the print image.
When the display commands are rendered at a fast enough pace, the same memory used to store a first band can be reused for a subsequent band further down the page. For example, in certain prior art printers it is known to employ three raster buffers for storing bands. During page processing, the first buffer is reused for a fourth band on the page, the second is reused for a fifth band, etc. However, under standard (generally maximum) page-per-minute performance, little time is left between finishing printing of a band and when a next band is required to be rasterized from the same print buffer.
Under certain circumstances, "complex" bands will include many display commands and require a longer than normal time for rasterization. Additionally, to rasterize a band (whether "complex" or not), more memory space may be required than is currently available--depending upon several factors associated with the printer, including memory size, memory fragmentation, job to be printed, and other printer system activities. In the case of a complex band, rasterization time may increase to such an extent that the succeeding band can not be delivered on time, thus causing a print overrun to occur. Accordingly, pre-rasterization is commonly performed on a complex band to ensure that the video imaging race with the laser will not cause a print overrun.
Racing the laser requires making a determination regarding how to get the best trade off between printer memory and real time processing requirements. In a properly working printer, a print overrun is avoided because the Image Processor task just manages to win every race with the direct memory access (DMA) video output task. It is undesirable to avoid print overruns by unilaterally pre-rasterizing every video band because (even with compression) that consumes too much precious printer memory for video DMA buffers. As such, one process has been developed to permit minimization of the number of pre-rasterized video buffers and is disclosed in U.S. Pat. No. 5,129,049 to Cuzzo et al., the disclosure of which is incorporated in full herein by reference. This was extended for compression and empirical Image Processor cost measurements in U.S. Pat. No. 5,479,587 to Campbell et al., also incorporated in full herein by reference.
In Campbell et al., in the event of low available memory for processing print commands, each band of a page may be reevaluated and passed through several steps in attempt to reduce memory allocation requirements and free up more memory. For example, each band may be rasterized and compressed using one of several compression techniques. After a band is rasterized and compressed, the memory allocation requirement for that band is determined. If the compressed band's memory allocation requirement is less than the memory allocation requirement of the display list for that same band (relative to a comparison threshold), then the rasterized and compressed version will be used and stored in memory rather than the display list. The rasterized and compressed band is stored in memory by being dissected into fragments (segments) and then linked and distributed into "holes" in the memory. The "holes" are, typically, smaller isolated free areas of memory surrounded by larger unavailable (used) areas. On the other hand, if the rasterized and compressed band's memory allocation requirement is not less than the memory allocation requirement for its display list (per the threshold), then the band may be processed again using a different compression technique. These steps of rasterizing a band, compressing it, comparing the size of the compressed version to the display list, and determining if the memory allocation requirement of the compressed version is less than that of the display list, may be repeated multiple times using differing compression techniques and/or thresholds until the band's allocation requirement is less than that of its display list.
Once all of the bands have been rasterized, compressed, evaluated and distributed (when the threshold was met) then processing of the print commands resumes at the point where the event of low available memory was previously detected (i.e., the point that initiated the reevaluation process for the page). The band that was previously attempting a memory allocation (but detected the low available memory event) should now have a better chance of being able to satisfy its memory allocation.
Distinguishing now from Campbell et al., U.S. Pat. No. 5,483,622 (Zimmerman et al.) discloses a Page Printer Having Automatic Font Compression and is also incorporated herein by reference in full. In Zimmerman et al., in the event of low available memory for processing print commands, alternative steps occur to alleviate the low memory error including: (i) compressing raster graphic images, and (ii) if no raster graphic images are present or if compression of the raster graphic images does not remove the low memory error, then compressing font characters. Additionally, a large size font whose size exceeds a threshold may automatically be compressed, regardless of a memory low/out signal being present.
With regard to any data that is compressed during image processing, it is generally desirable to utilize a compression algorithm that achieves a high compression ratio in order to minimize memory usage and maximize free space. However, a greater decompression time typically accompanies an increased compression ratio that is achieved. Importantly, the decompression time must be accounted for when the compressed data is output/rendered by the video task. Simply stated, too much decompression time can cause a print overrun (punt) in the race against the laser.
Accordingly, an object of the present invention is to improve punt protection processing by balancing memory savings compression requirements with resultant decompression times in the race against the laser.