JP3880578B2 - Encoding device and encoding method - Google Patents

Encoding device and encoding method Download PDF

Info

Publication number
JP3880578B2
JP3880578B2 JP2004024483A JP2004024483A JP3880578B2 JP 3880578 B2 JP3880578 B2 JP 3880578B2 JP 2004024483 A JP2004024483 A JP 2004024483A JP 2004024483 A JP2004024483 A JP 2004024483A JP 3880578 B2 JP3880578 B2 JP 3880578B2
Authority
JP
Japan
Prior art keywords
encoding
data
raster
group
indicating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004024483A
Other languages
Japanese (ja)
Other versions
JP2005217954A (en
Inventor
清 梅田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2004024483A priority Critical patent/JP3880578B2/en
Publication of JP2005217954A publication Critical patent/JP2005217954A/en
Application granted granted Critical
Publication of JP3880578B2 publication Critical patent/JP3880578B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

本発明は、画像データを符号化する技術に関するものであり、例えば、コンピュータ等のホスト装置からプリンタへ転送する画像データを符号化する為の符号化技術に関するものである。   The present invention relates to a technique for encoding image data, for example, an encoding technique for encoding image data transferred from a host device such as a computer to a printer.

従来より、ホスト装置であるコンピュータとプリンタとの間で通信されるプリント用データを圧縮するための方法が提案されている。
特開2003−174565号公報
Conventionally, a method for compressing print data communicated between a computer as a host device and a printer has been proposed.
JP 2003-174565 A

ところで、近年、プリンタの印字解像度は増加の一途をたどり、プリンタにプリントデータを送出するコンピュータが保持するこのプリンタのためのドライバ(ドライバ部)で生成されるプリントデータの解像度は600dpiあるいはそれ以上となっている。例えば600dpiの場合、A4サイズの用紙全面にCMYK4色でプリントすることを考えると、たとえ各色、疑似階調処理によって1画素あたり2bitに量子化されていたとしても、圧縮前のデータ量は1ページあたり約32MBと膨大なものとなってしまう。   By the way, in recent years, the print resolution of a printer has been increasing, and the resolution of print data generated by a driver (driver section) for this printer held by a computer that sends print data to the printer is 600 dpi or more. It has become. For example, in the case of 600 dpi, considering that CMYK 4 colors are printed on the entire surface of an A4 size paper, even if each pixel is quantized to 2 bits per pixel by pseudo gradation processing, the data amount before compression is 1 page. It will be a huge amount of about 32MB.

一方、プリンタの印字速度も近年飛躍的な向上を遂げており、プリンタのエンジン性能を100%発揮するためには、上記のような膨大なプリントデータを可能な限り高速にプリンタへ転送する必要がある。   On the other hand, the printing speed of printers has also drastically improved in recent years, and it is necessary to transfer the enormous amount of print data as described above to the printer as fast as possible in order to achieve 100% of the engine performance of the printer. is there.

しかし近年では、有線インターフェースの転送速度が飛躍的に向上する反面、Bluetoothのような転送速度が1Mbps未満である低速無線インターフェースが、携帯型パーソナルコンピュータや携帯電話などに搭載され始めており、これらのデバイスから無線でドキュメントを印字したいというニーズも高まってきている。   However, in recent years, while the transfer speed of wired interfaces has improved dramatically, low-speed wireless interfaces with a transfer speed of less than 1 Mbps, such as Bluetooth, have begun to be installed in portable personal computers and mobile phones. There is also a growing need to print documents wirelessly.

すなわち、近年のプリンティング環境における傾向としては、印字解像度の増加に伴ってプリントデータは増加し、かつプリンタのエンジンスピードが向上したにもかかわらず、ホストデバイスとプリンタを接続するインターフェースの転送速度は低下するという相反する状況になっている。これらの状況を鑑みると、ドライバ部で生成したプリントデータを如何に効率よく圧縮し、できるだけ短時間のうちにプリンタに転送できるか、という課題は必ず解決しなければならない重要な要素となってきている。   That is, the trend in the printing environment in recent years is that the print data increases as the print resolution increases, and the transfer speed of the interface connecting the host device and the printer decreases despite the improvement in the printer engine speed. The situation is in conflict. In view of these situations, the issue of how efficiently the print data generated by the driver unit can be compressed and transferred to the printer in the shortest possible time has become an important factor that must be solved. Yes.

この課題を解決する一つの手段としては、より高能率な圧縮方法を採用することが考えられる。従来のシステムで採用されている圧縮方式は、単純なランレングス符号化によるものが大部分を占めている。このランレングス符号化は、注目データと直前のデータを比較し、同じデータが複数個連続している場合にはその連続量を出力し、直前のデータと一致しない場合には生データとして出力するというものである。このような符号化法は高い圧縮率は望めないものの、処理が単純ありプリンタ内部でデコーダを容易にハードウェア化することができるため、従来より採用され続けていた。   One means for solving this problem is to employ a more efficient compression method. Most of the compression methods employed in conventional systems are based on simple run-length encoding. In this run-length encoding, the data of interest is compared with the immediately preceding data, and when a plurality of the same data is continuous, the continuous amount is output, and when it does not match the immediately preceding data, it is output as raw data. That's it. Although such a coding method cannot be expected to have a high compression rate, it has been used in the past because it is simple in processing and can easily implement a decoder in the printer.

しかし、近年ではプリンタ内部に搭載されるCPUの性能も向上し、搭載できるRAMの容量も増加したため、従来よりも複雑な処理を高速に行うことが可能となっている。このため、例えば、Lempel-Ziv77(LZ77), Lempel-Ziv78(LZ78)系の符号化法、あるいは上記特許文献1に示すような方法をプリンティングシステムに適用することにより、従来よりもプリントデータの転送効率を向上させることができると考えられる。   However, in recent years, the performance of the CPU mounted inside the printer has improved and the capacity of the RAM that can be mounted has increased, making it possible to perform more complex processing at a higher speed than before. For this reason, for example, by applying the encoding method of Lempel-Ziv77 (LZ77), Lempel-Ziv78 (LZ78) system, or the method shown in the above-mentioned Patent Document 1 to the printing system, the transfer of print data is conventionally performed. It is thought that efficiency can be improved.

ここで、LZ77系符号化とは、圧縮対象データに任意の大きさの移動窓を設定し、同窓内に注目データと同じデータ系列が存在するか否かを探索して、一致すれば、そのオフセット位置を符号として出力するものである。またLZ78系は、圧縮対象となるデータ系列と同じ系列が保持している辞書データの中に存在するか否かを検索し、存在すればそのインデックスを出力し、存在しなければ生データとして出力すると共に、データ系列を新たに辞書データに加えるというものである。   Here, LZ77 encoding means that a moving window of an arbitrary size is set in the data to be compressed, and whether or not the same data series as the data of interest exists in the same window. The offset position is output as a code. Also, the LZ78 system searches for whether or not the same sequence as the data sequence to be compressed exists in the dictionary data, and outputs the index if it exists, otherwise outputs as raw data At the same time, a new data series is added to the dictionary data.

また、上記特許文献1による方法では、注目画素位置の上方と左方に対して、注目データ系列と一致する系列があるか否かを検査し、一致すればその位置(上方あるいは左方)情報と一致する長さを符号化する。その際に、最近符号化した値はキャッシュバッファと呼ばれるバッファに格納しておき、例え注目位置近傍に一致するデータ系列がなかったとしても、該キャッシュバッファを探索して同じデータあれば、生データではなく、キャッシュバッファ上のインデックスを符号化することにより、圧縮処理の効率化を図っている。   In the method according to Patent Document 1, it is checked whether there is a sequence that matches the target data sequence with respect to the upper and left sides of the target pixel position. If they match, the position (upper or left) information is obtained. Encode a length that matches. At that time, the recently encoded value is stored in a buffer called a cache buffer, and even if there is no data sequence matching the position of interest, if the cache buffer is searched and the same data exists, the raw data Instead, the compression processing efficiency is improved by encoding the index on the cache buffer.

これらの符号化法は、いずれもデータ系列が符号化済みデータ系列と一致するか否かを検査し、一致すればその位置と長さを符号化するという点で類似している。また、いずれの方法も、一致するか否かを比較するための参照位置が、注目データの直前に限定されないため、従来のランレングス符号化と比較すると符号化効率は飛躍的に向上することになる。   These encoding methods are similar in that both check whether the data sequence matches the encoded data sequence, and if they match, the position and length are encoded. Also, in any method, the reference position for comparing whether or not they match is not limited to immediately before the data of interest, so that the encoding efficiency is dramatically improved as compared with the conventional run-length encoding. Become.

しかし、これらの符号化法を現状のプリンティングシステムに適用しようとすると、以下のような問題が発生する。   However, when these encoding methods are applied to the current printing system, the following problems occur.

現在のドライバ部における処理は、入力されたドキュメントデータに対して、OSから印字解像度に展開した後の画像データを受け取り、該画像データに対して以降の処理を行っている。このOSの印字解像度への展開は、ここでは例えば図3に示すようにラスタ単位で行われていると仮定する。ドライバ部は、それとは異なった ラスタ単位で色処理後の画像データを圧縮し、図4に示すようなコマンドを付加して転送データを生成している。もし、この ラスタが全てNULL、すなわち印字媒体上には何も印字されない領域であるとすると、図4の中のラスタスキップコマンド(0xFF 0x05)を送信することで、転送効率を向上させる工夫がなされている。以後では、OSが印字解像度へ展開する単位であるラスタ領域をドライバ処理単位、また圧縮符号化を行う単位であるラスタ領域を符号化処理単位と呼ぶことにする。また、図5には生成されたプリントデータの例が示されている。   In the current processing in the driver unit, image data that has been expanded from the OS to the print resolution is received for the input document data, and the subsequent processing is performed on the image data. Here, it is assumed that the development to the printing resolution of the OS is performed in units of rasters as shown in FIG. 3, for example. The driver unit compresses the image data after color processing in a different raster unit, and adds transfer commands as shown in FIG. 4 to generate transfer data. If this raster is all null, that is, an area where nothing is printed on the print medium, the raster skip command (0xFF 0x05) in FIG. 4 is sent to improve the transfer efficiency. ing. Hereinafter, a raster area, which is a unit for the OS to develop to the print resolution, is referred to as a driver processing unit, and a raster area, which is a unit for performing compression encoding, is referred to as an encoding processing unit. FIG. 5 shows an example of the generated print data.

なぜこの両者(ドライバ処理単位と符号化処理単位)が異なるかというと、ドライバ処理単位を決定するラスタ数が、各OSによって異なり、かつ同じページ内部においても、ドキュメントの種類やドライバ部の処理中に利用可能なメモリ量等に応じて動的に変化するためである。しかしプリンタ側から見れば、印字時のホストコンピュータの動作環境がどのようなものであったとしても、一定の単位で処理された符号化データを受け取り、プリンタ内部のファームウェアあるいはハードウェアにおいて、あらかじめ定められた所定の単位で復号化することが効率的である。これらの理由により、上記ドライバ処理単位とは異なったラスタ単位で、圧縮符号化処理は施されている。   The reason why the two (the driver processing unit and the encoding processing unit) are different is that the number of rasters that determine the driver processing unit differs depending on each OS, and even within the same page, the document type and driver part are being processed. This is because it changes dynamically according to the amount of memory available to the user. However, from the viewpoint of the printer, whatever the operating environment of the host computer at the time of printing is, the encoded data processed in a certain unit is received and determined in advance in the firmware or hardware inside the printer. It is efficient to perform decoding in a predetermined unit. For these reasons, compression encoding processing is performed in raster units different from the driver processing units.

このような場合、先に触れたような符号化処理単位が全てNULLであった場合、どのような動作でラスタスキップコマンドを送信すべきか、以下に説明する。   In such a case, the operation of transmitting the raster skip command when all the encoding processing units as mentioned above are NULL will be described below.

通常、ドライバ処理単位内において、例えば今から処理しようとする ラスタが全てNULLラスタであることがわかったなら、それらの領域は以降の色変換処理や疑似階調処理などを行うことなく、ラスタスキップコマンドを送信することが最も効率的だと考えられる。しかし、ドライバ処理単位の境界付近においては、そのような処理を行うことができない。なぜなら、現状、次のドライバ処理単位を印字解像度に展開して最初の数ラスタを参照することが困難であるシステムが多いためである。通常、色変換処理や疑似階調処理はドライバ処理単位毎に行われ、該単位での処理が終了した後、処理後の画像データは破棄され、次のドライバ処理単位が印字解像度に展開される。   Normally, within the driver processing unit, for example, if it is found that all rasters to be processed from now on are null rasters, those areas are raster skipped without performing subsequent color conversion processing or pseudo gradation processing. Sending commands is considered the most efficient. However, such processing cannot be performed in the vicinity of the boundary between driver processing units. This is because there are many systems where it is difficult to refer to the first several rasters by developing the next driver processing unit to the print resolution. Normally, color conversion processing and pseudo gradation processing are performed for each driver processing unit. After the processing in that unit is completed, the processed image data is discarded, and the next driver processing unit is developed to the print resolution. .

このような仕組みの上でラスタスキップコマンドを送信する場合、ドライバ内部では、あるラスタが例えNULLラスタであったとしても、以降の色変換処理、疑似階調処理、およびランレングス符号化による圧縮処理が施され、処理後のデータはメモリ領域に格納される。このとき、処理したラスタがNULLであったことを記憶しておくため、メモリ領域内部に確保されているNULLラスタカウンタをインクリメントさせる。   When a raster skip command is sent based on such a mechanism, even if a certain raster is a NULL raster, the following color conversion processing, pseudo gradation processing, and compression processing by run length encoding are performed inside the driver. The processed data is stored in the memory area. At this time, in order to store that the processed raster is NULL, the NULL raster counter secured in the memory area is incremented.

このような処理を継続し、 ラスタ処理後、もしNULLラスタカウンタが同じ になっていた場合には、これまで処理した符号化処理単位である ラスタは全てNULLラスタであったことになり、これまで符号化した結果を破棄してラスタスキップコマンドを送信している。   If such processing continues and after the raster processing, if the NULL raster counter is the same, all the rasters that have been processed so far have been NULL rasters. The encoded result is discarded and a raster skip command is transmitted.

現状のドライバ処理ではこのような方法を用いることにより、ドライバ処理単位と符号化処理単位が異なっていたとしても、ドライバ処理単位の境界に依存することなくラスタスキップコマンドの送信を行うことが可能となっている。   By using such a method in the current driver processing, even if the driver processing unit and the encoding processing unit are different, it is possible to transmit the raster skip command without depending on the boundary of the driver processing unit. It has become.

しかし、このような現状のシステムに対して、上述したような高能率符号化を適用しようとした場合、ある問題が生じる。それは、LZ77、LZ78、あるいは上記特許文献1がいずれも、符号化処理の過程で動的なパラメータを保持するという点である。   However, when trying to apply the high-efficiency coding as described above to such a current system, a certain problem arises. That is, LZ77, LZ78, or the above-mentioned Patent Document 1 all retain dynamic parameters in the course of the encoding process.

動的パラメータとは、LZ78系であれば辞書データベースであったり、上記特許文献1に開示された符号化法であればハッシュテーブルなどが挙げられる。   The dynamic parameters include a dictionary database in the case of the LZ78 system, and a hash table in the case of the encoding method disclosed in Patent Document 1.

これらの動的なパラメータは、NULLラスタを符号化している最中にも変化する可能性がある。そのため、符号化後に結果的に所定のラスタがNULLだったからといって、動的パラメータを破棄してラスタスキップコマンドに変更してしまうと、動的パラメータの整合性が符号化側と復号化側で取れなくなり、そのためプリンタ内部で復号化できなくなる可能性がある。すなわち、現状のドライバ処理システムを大きく変更することなく、上述した高能率符号化法を適用することができないのである。   These dynamic parameters can change while encoding a NULL raster. Therefore, even if the predetermined raster is NULL after encoding, if the dynamic parameter is discarded and changed to the raster skip command, the consistency of the dynamic parameter is changed between the encoding side and the decoding side. May not be able to be removed by the printer, and therefore may not be able to be decrypted inside the printer. That is, the above-described high-efficiency encoding method cannot be applied without greatly changing the current driver processing system.

本発明は以上の問題に鑑みてなされたものであり、符号化時に使用した動的パラメータを復号化側でも用いる場合に、この動的パラメータの整合性を符号化側と復号化側とで確実にとれるようにするための技術を提供することを目的とする。   The present invention has been made in view of the above problems. When the dynamic parameters used at the time of encoding are also used on the decoding side, the consistency of the dynamic parameters is surely ensured on the encoding side and the decoding side. The purpose is to provide a technique for making it possible to be taken.

本発明の目的を達成するために、例えば本発明の符号化方法は以下の構成を備える。   In order to achieve the object of the present invention, for example, the encoding method of the present invention comprises the following arrangement.

本発明の目的を達成するために、例えば、本発明の符号化方法は以下の構成を備える。
即ち、画像をラスタ群毎に順次符号化する符号化方法であって、
第N番目のラスタ群を符号化する前に、当該第N番目のラスタ群の前に符号化を行った第(N−1)番目のラスタ群が空白領域を示すデータ群であるか否かを判断する判断工程と、
前記第(N−1)番目のラスタ群が空白領域を示すデータ群ではない場合には、第1の保持手段に保持されていて、前記符号化及び前記符号化に対する復号化の過程で動的に変化するパラメータを第2の保持手段に保存して、前記第(N−1)番目のラスタ群の符号化データを出力する第1の出力工程と、
前記第(N−1)番目のラスタ群が空白領域を示すデータ群である場合には、前記第1の保持手段に保持されていて、前記符号化及び前記符号化に対する復号化の過程で動的に変化するパラメータを第(N−1)番目のラスタ群の符号化以前に保存された状態に更新して、前記第(N−1)番目のラスタ群が空白領域を示すデータ群であることを示す情報を出力する第2の出力工程と、
前記第1の出力工程、若しくは前記第2の出力工程による処理の終了後、前記第1の保持手段に保存されているパラメータを用いて前記第N番目のラスタ群を符号化する符号化工程と
を備えることを特徴とする。
In order to achieve the object of the present invention, for example, the encoding method of the present invention comprises the following arrangement.
That is, an encoding method for sequentially encoding an image for each raster group,
Before encoding the Nth raster group, whether or not the (N-1) th raster group encoded before the Nth raster group is a data group indicating a blank area. A judging process for judging
If the (N-1) th raster group is not a data group indicating a blank area, it is held in the first holding means, and is dynamically changed in the process of encoding and decoding for the encoding. A first output step of storing in the second holding means and outputting the encoded data of the (N-1) th raster group,
When the (N-1) th raster group is a data group indicating a blank area, it is held in the first holding means and is moved in the process of encoding and decoding for the encoding. Are changed to a state stored before the encoding of the (N-1) th raster group, and the (N-1) th raster group is a data group indicating a blank area. A second output step for outputting information indicating that;
An encoding step of encoding the Nth raster group using a parameter stored in the first holding means after completion of the processing in the first output step or the second output step; It is characterized by providing.

本発明の目的を達成するために、例えば本発明の符号化装置は以下の構成を備える。   In order to achieve the object of the present invention, for example, an encoding apparatus of the present invention comprises the following arrangement.

本発明の目的を達成するために、例えば、本発明の符号化装置は以下の構成を備える。
即ち、画像をラスタ群毎に順次符号化する符号化装置であって、
第N番目のラスタ群を符号化する前に、当該第N番目のラスタ群の前に符号化を行った第(N−1)番目のラスタ群が空白領域を示すデータ群であるか否かを判断する判断手段と、
前記第(N−1)番目のラスタ群が空白領域を示すデータ群ではない場合には、第1の保持手段に保持されていて、前記符号化及び前記符号化に対する復号化の過程で動的に変化するパラメータを第2の保持手段に保存して、前記第(N−1)番目のラスタ群の符号化データを出力する第1の出力手段と、
前記第(N−1)番目のラスタ群が空白領域を示すデータ群である場合には、前記第1の保持手段に保持されていて、前記符号化及び前記符号化に対する復号化の過程で動的に変化するパラメータを第(N−1)番目のラスタ群の符号化以前に保存された状態に更新して、前記第(N−1)番目のラスタ群が空白領域を示すデータ群であることを示す情報を出力する第2の出力手段と、
前記第1の出力手段、若しくは前記第2の出力手段による処理の終了後、前記第1の保持手段に保存されているパラメータを用いて前記第N番目のラスタ群を符号化する符号化手段と
を備えることを特徴とする。
In order to achieve the object of the present invention, for example, an encoding apparatus of the present invention comprises the following arrangement.
That is, an encoding device that sequentially encodes an image for each raster group,
Before encoding the Nth raster group, whether or not the (N-1) th raster group encoded before the Nth raster group is a data group indicating a blank area. A judging means for judging
If the (N-1) th raster group is not a data group indicating a blank area, it is held in the first holding means, and is dynamically changed in the process of encoding and decoding for the encoding. A first output means for storing the (N-1) -th raster group encoded data in a second holding means,
When the (N-1) th raster group is a data group indicating a blank area, it is held in the first holding means and is moved in the process of encoding and decoding for the encoding. Are changed to a state stored before the encoding of the (N-1) th raster group, and the (N-1) th raster group is a data group indicating a blank area. Second output means for outputting information indicating that;
Encoding means for encoding the Nth raster group using parameters stored in the first holding means after completion of processing by the first output means or the second output means; It is characterized by providing.

本発明の構成により、符号化時に使用した動的パラメータを復号化側でも用いる場合に、この動的パラメータの整合性を符号化側と復号化側とで確実にとれるようにすることができる。   According to the configuration of the present invention, when the dynamic parameter used at the time of encoding is also used on the decoding side, the consistency of the dynamic parameter can be reliably ensured on the encoding side and the decoding side.

以下添付図面を参照して、本発明を公的な実施形態に従って詳細に説明する。   Hereinafter, the present invention will be described in detail according to official embodiments with reference to the accompanying drawings.

[第1の実施形態]
図1は、本実施形態にかかるプリントシステムを構成するコンピュータとプリンタの基本構成を示すブロック図である。
[First Embodiment]
FIG. 1 is a block diagram showing the basic configuration of a computer and a printer that constitute the printing system according to the present embodiment.

コンピュータ100は後述するプリンタ107に対してプリントしようとするデータを送出するとともに、プリントの指示を送出する為のものである。以下、コンピュータ100の基本構成について説明する。   The computer 100 is for sending data to be printed to a printer 107, which will be described later, and sending a print instruction. Hereinafter, the basic configuration of the computer 100 will be described.

CPU101は、RAM103やROM102に格納されているプログラムやデータを用いてコンピュータ100全体の制御を行うとともに、コンピュータ100が行うべき後述の各処理を実行する。   The CPU 101 controls the entire computer 100 using programs and data stored in the RAM 103 and the ROM 102, and executes processes described later that should be performed by the computer 100.

ROM102にはコンピュータ100のブートプログラムや各種の設定データ等が格納されている。   The ROM 102 stores a boot program for the computer 100 and various setting data.

RAM103には2次記憶装置105に保存されており、CPU101の制御によりロードされたプログラムやデータを保存するためのエリアを備えるとともに、CPU101が各種の処理を行うために必要なワークエリアを備える。   The RAM 103 is stored in the secondary storage device 105 and includes an area for storing a program and data loaded under the control of the CPU 101 and a work area necessary for the CPU 101 to perform various processes.

ユーザI/F(I/F)104は、キーボードやマウスなどのポインティングデバイスにより構成されており、コンピュータ100のユーザが各種の指示をCPU101に入力するためのものである。   A user I / F (I / F) 104 is configured by a pointing device such as a keyboard and a mouse, and is used by the user of the computer 100 to input various instructions to the CPU 101.

2次記憶装置105は例えばハードディスクドライブ装置などの大容量情報記憶装置であって、ここにOSやプリンタ107のドライバプログラムなどを保存しており、これらは必要に応じてCPU101の制御によりRAM103に読み出されるものである。   The secondary storage device 105 is a large-capacity information storage device such as a hard disk drive device, and stores an OS and a driver program of the printer 107 and the like, and these are read out to the RAM 103 under the control of the CPU 101 as necessary. It is what

I/F106は、コンピュータ100にプリンタ107を接続するためのものである。   The I / F 106 is for connecting the printer 107 to the computer 100.

以上がコンピュータ100の基本構成であるが、コンピュータ100の基本構成はこれに限定するものではなく、適宜必要なデバイスを付加してもよい。   The above is the basic configuration of the computer 100. However, the basic configuration of the computer 100 is not limited to this, and necessary devices may be added as appropriate.

次にプリンタ107の基本構成について説明する。   Next, the basic configuration of the printer 107 will be described.

CPU108はRAM110やROM109に格納されているプログラムやデータを用いてプリンタ107全体の制御を行うとともに、プリンタ107が行うべき後述の各処理を実行する。   The CPU 108 controls the entire printer 107 using programs and data stored in the RAM 110 and the ROM 109, and executes each process to be described later that should be performed by the printer 107.

ROM109にはプリンタ107が行うべき後述の各処理をCPU108に実行させるためのプログラムやデータが格納されている。   The ROM 109 stores programs and data for causing the CPU 108 to execute processes to be described later that should be performed by the printer 107.

RAM110にはコンピュータ100からI/F106、I/F111を介して送出されたデータを一時的に記憶するためのエリアが備わっているとともに、CPU108が各種の処理を行うために必要とするワークエリアを備える。   The RAM 110 has an area for temporarily storing data sent from the computer 100 via the I / F 106 and I / F 111, and a work area necessary for the CPU 108 to perform various processes. Prepare.

I/F111はプリンタ107をコンピュータ100に接続するためのもので、I/F106、I/F111を介してコンピュータ100とプリンタ107とは互いにデータ通信を行うことができる。なお、I/F106、I/F111としては、USB(Universal Serial Bus)やIEEE1394による有線の接続や、Bluetooth、IEEE802.11x系の無線による接続などが考えられる。   The I / F 111 is used to connect the printer 107 to the computer 100, and the computer 100 and the printer 107 can perform data communication with each other via the I / F 106 and the I / F 111. As the I / F 106 and I / F 111, a wired connection based on USB (Universal Serial Bus) or IEEE1394, a wireless connection based on Bluetooth or IEEE802.11x, or the like can be considered.

プリンタエンジン112は、CPU108からの指示に基づいて与えられたデータに従ってプリント動作を行う。   The printer engine 112 performs a printing operation in accordance with data given based on an instruction from the CPU 108.

図2は、コンピュータ100のRAM103にロードされているドライバ(ドライバ部)とプリンタ107(プリンタ部)の機能構成を示すブロック図である。   FIG. 2 is a block diagram illustrating functional configurations of a driver (driver unit) and a printer 107 (printer unit) loaded in the RAM 103 of the computer 100.

ドライバ部200の前処理部201は、入力されたドキュメントデータに対して前処理を行う。この前処理は、オリジナルのドキュメントデータに対して、例えば鮮鋭化処理を行ったり、人が好ましいと感じる色への変換を行ったりする処理などが含まれる。   The preprocessing unit 201 of the driver unit 200 performs preprocessing on the input document data. This pre-processing includes, for example, a process of performing sharpening processing on original document data or converting the original document data into a color that a person feels preferable.

次に印字解像度展開部202は、前処理部201によって前処理が施されたデータに対して印字解像度展開処理を行う。これは、ドライバ部200に入力されたドキュメントデータを、プリンタ107が印字を行う際の解像度に変換する処理である。例えば、入力されたドキュメントデータの解像度が300dpi、プリンタの出力解像度が600dpiであった場合、印字解像度展開部202は、縦横方向の解像度をそれぞれ2倍に拡大した画像データを生成する。この印字解像度展開部202による処理は、通常OS(オペレーティングシステム)が行うことが多く、ドライバ部200は印字解像度に展開した画像データを、OSから所定のライン数毎受け取り、以後の処理を行う。この受け取る単位が、上述の「ドライバ処理単位」である。   Next, the print resolution developing unit 202 performs a print resolution developing process on the data preprocessed by the preprocessing unit 201. This is a process of converting the document data input to the driver unit 200 into a resolution when the printer 107 performs printing. For example, when the resolution of the input document data is 300 dpi and the output resolution of the printer is 600 dpi, the print resolution development unit 202 generates image data in which the vertical and horizontal resolutions are each doubled. The processing by the print resolution development unit 202 is usually performed by an OS (operating system) in many cases, and the driver unit 200 receives image data developed to the print resolution from the OS for each predetermined number of lines, and performs subsequent processing. This receiving unit is the above-mentioned “driver processing unit”.

次に、RGB−CMYK色変換部203は、印字解像度に展開された画像データに対してRGB-CMYK色変換を行って、RGB値からインク色であるCMYKデータに変換し、更に疑似階調処理部204によって同データに対してディザ、あるいは誤差拡散(ED)などの疑似階調処理が施され、1画素あたりの階調数を例えば8bitから2bitに低下させる。全ての画像処理が施されたデータは、圧縮符号化部205に入力され、後述する圧縮処理により圧縮を行う。この圧縮処理は、各色データ毎に施される。   Next, the RGB-CMYK color conversion unit 203 performs RGB-CMYK color conversion on the image data expanded to the print resolution, converts the RGB value into CMYK data that is an ink color, and further performs pseudo gradation processing. The unit 204 performs pseudo gradation processing such as dithering or error diffusion (ED) on the same data, and reduces the number of gradations per pixel from, for example, 8 bits to 2 bits. Data subjected to all image processing is input to the compression encoding unit 205, and is compressed by a compression process described later. This compression processing is performed for each color data.

この圧縮対象となる疑似階調処理後の画像データは、各色毎に1画素あたり1バイトで構成されていてもよいし、上述したように各色2bitに量子化されている場合には、連続する4画素が1バイトにパッキングされていてもよい。さらに、CMYK4色が1バイトにパッキングされていてもよい。圧縮されたデータには、図4に示すような様々なコマンドデータが付加されて、図5に示すようなフォーマットのプリントデータが生成され、I/F106、I/F111を介してプリンタ107にプリントデータとして送出される。   The image data after pseudo gradation processing to be compressed may be composed of 1 byte per pixel for each color, or continuous when quantized to 2 bits for each color as described above. Four pixels may be packed in one byte. Furthermore, CMYK 4 colors may be packed into 1 byte. Various command data as shown in FIG. 4 is added to the compressed data to generate print data in the format as shown in FIG. 5 and printed on the printer 107 via the I / F 106 and I / F 111. Sent as data.

プリンタ107(同図ではプリンタ部207)におけるコマンド解釈部208は、入力されたプリントデータに対して、図4に示す如くプリントデータに含まれるコマンドを解釈し、圧縮復号化部209は、圧縮符号化部205によって符号化(圧縮)された疑似階調処理後のデータを伸張、復元する。その結果得られたデータは印字部210により印字媒体上にプリントされる。   The command interpretation unit 208 in the printer 107 (printer unit 207 in the figure) interprets the command included in the print data as shown in FIG. 4 for the input print data, and the compression decoding unit 209 displays the compression code. The data after pseudo gradation processing encoded (compressed) by the encoding unit 205 is expanded and restored. The data obtained as a result is printed on a printing medium by the printing unit 210.

次に、ドライバ部200により行われる符号化処理についてより詳細に説明する。図6,7は、後述の符号化処理について用いられるコマンド群を示す図である。   Next, the encoding process performed by the driver unit 200 will be described in more detail. 6 and 7 are diagrams showing command groups used for the encoding process described later.

図8,9は、符号化対象となる注目画素位置を符号化する処理を説明する為の図である。また、図11は本実施形態にかかる符号化処理のフローチャートである。以下、図6,7,8,9,11を用いて、本実施形態にかかる符号化処理について説明する。なお、図11のフローチャートに従ったプログラムは、プリンタ107のドライバプログラムとしてRAM103にロードされており、CPU101がこれを実行することにより、コンピュータ100は以下説明する符号化処理を行うことになる。   8 and 9 are diagrams for explaining processing for encoding a target pixel position to be encoded. FIG. 11 is a flowchart of the encoding process according to this embodiment. Hereinafter, the encoding process according to the present embodiment will be described with reference to FIGS. The program according to the flowchart of FIG. 11 is loaded in the RAM 103 as a driver program for the printer 107. When the CPU 101 executes the program, the computer 100 performs the encoding process described below.

先ず入力された画像データに対して、現在位置を画像の先頭、すなわち画像の左上隅の位置に設定する(ステップS1100)。   First, for the input image data, the current position is set to the top of the image, that is, the position of the upper left corner of the image (step S1100).

次に、まず注目画素位置のすぐ上方にこれから符号化しようとしているデータ系列と同じものが存在するか否かのチェックを行い、存在する場合にはその長さを算出する(ステップS1101)。ステップS1101における処理を図8を用いて説明すると、図8に示した各ますが画素を表し、ます内の数値は画素値であるとする。同図の例では、注目画素を含む右方3画素の各画素値は、注目画素の上方に位置する画素(上方参照位置における画素)を含む右方3画素分の各画素値と一致している。従って同図の場合、ステップS1101で求める長さは「3」である。   Next, it is first checked whether or not the same data series as the data to be encoded exists immediately above the target pixel position, and if it exists, its length is calculated (step S1101). The processing in step S1101 will be described with reference to FIG. 8. Each square shown in FIG. 8 represents a pixel, and the numerical value in the square is a pixel value. In the example shown in the figure, the pixel values of the right three pixels including the target pixel coincide with the pixel values of the right three pixels including the pixel located above the target pixel (the pixel at the upper reference position). Yes. Therefore, in the case of the figure, the length obtained in step S1101 is “3”.

求めた長さが0ではない場合(ステップS1102)、処理をステップS1103に進め、図6に示したコマンド群のうち「COPY UP」コマンドを示す符号「1」を、RAM103上に確保された「符号化済みデータを格納するためのバッファ」(以下、符号化済みデータバッファ)に出力する。   If the obtained length is not 0 (step S1102), the process proceeds to step S1103, and the code “1” indicating the “COPY UP” command in the command group shown in FIG. The data is output to a “buffer for storing encoded data” (hereinafter, “encoded data buffer”).

また、一致する長さについては、図7に示す如く、長さを示すためのコマンド(COUNT符号)を参照し、例えばステップS1101で求めた長さが「3」である場合には、「長さ2−3」の符号として2進数01を、長さが2であるか3であるかを示すビットとして「010」もしくは「011」のいずれかを符号化済みデータバッファに出力する。   For the matching length, refer to the command (COUNT code) for indicating the length as shown in FIG. 7, and when the length obtained in step S1101 is “3”, for example, A binary number 01 is output as a code of “2-3”, and “010” or “011” is output as a bit indicating whether the length is 2 or 3 to the encoded data buffer.

同図の場合、符号が010であれば長さは2、011であれば長さは3である。したがって、「注目画素から上方に3画素一致するデータが存在する」場合には先に符号化済みデータバッファに出力した「COPY UP」コマンドを示す符号「1」と長さを示すためのコマンド「011」とを連結した「1011」というビット系列を符号化済みデータバッファに出力することになる。   In the figure, the length is 2 if the code is 010, and the length is 3 if the code is 011. Therefore, when “data matching three pixels above the target pixel exists”, the code “1” indicating the “COPY UP” command previously output to the encoded data buffer and the command “ The bit sequence “1011” concatenated with “011” is output to the encoded data buffer.

図11に戻って、注目画素位置の上方には一致するデータ系列がなかった場合(ステップS1102)、処理をステップS1102からステップS1104に進め、注目画素の左方に対してデータが一致するか否かを検査し、一致する場合にはその長さを算出する(ステップS1104)。ステップS1104における処理を図9を用いて説明すると、図9に示した各ますが画素を表し、ます内の数値は画素値であるとする。同図の例では、注目画素を含む右方4画素の各画素値は、注目画素の左方に位置する画素(左方参照位置における画素)の各画素値と一致している。従って同図の場合、ステップS1104で求める長さは「4」である。   Returning to FIG. 11, when there is no matching data series above the target pixel position (step S1102), the process proceeds from step S1102 to step S1104, and whether the data matches the left side of the target pixel. If they match, the length is calculated (step S1104). The processing in step S1104 will be described with reference to FIG. 9. Each square shown in FIG. 9 represents a pixel, and the numerical value in the square is a pixel value. In the example shown in the figure, the pixel values of the four pixels on the right side including the pixel of interest are the same as the pixel values of the pixel located on the left side of the pixel of interest (the pixel at the left reference position). Therefore, in the case of the figure, the length obtained in step S1104 is “4”.

求めた長さが0ではない場合(ステップS1105)、処理をステップS1106に進め、図6に示したコマンド群のうち「COPY LEFT」コマンドを示す符号「0001」を符号化済みデータバッファに出力する。   If the obtained length is not 0 (step S1105), the process proceeds to step S1106, and the code “0001” indicating the “COPY LEFT” command in the command group shown in FIG. 6 is output to the encoded data buffer. .

また、一致する長さについては、図7に示す如く、長さを示すためのコマンド(COUNT符号)を参照し、例えばステップS1104で求めた長さが「4」である場合には、「長さ4−7」の符号として2進数001を、長さが4から7の何れであるかを示すビットとして「001」+「長さが4なら00,長さが5なら01,長さが6なら10,長さが7なら11」を符号化済みデータバッファに出力する。   For the matching length, as shown in FIG. 7, a command (COUNT code) for indicating the length is referred to. For example, when the length obtained in step S1104 is “4”, “length” "4-7" is a binary number 001, and a bit indicating whether the length is 4 to 7 is "001" + "00 if the length is 4, 01 if the length is 5, 10 is output to the encoded data buffer if the length is 6, and 11 if the length is 7.

したがって、「注目画素から左方に4画素一致するデータが存在する」場合には先に符号化済みデータバッファに出力した「COPY LEFT」コマンドを示す符号「0001」と長さを示すためのコマンド「001 00」とを連結した「0001 001 00」というビット系列を符号化済みデータバッファに出力することになる。   Therefore, if “there is data that matches four pixels to the left from the pixel of interest”, the code “0001” indicating the “COPY LEFT” command output to the encoded data buffer and the command for indicating the length A bit sequence “0001 001 00” concatenated with “001 00” is output to the encoded data buffer.

図11に戻って、注目画素位置の左方には一致するデータ系列がなかった場合(ステップS1105)、処理をステップS1105からステップS1107に進め、注目画素データが図10に示すキャッシュバッファ内に格納されているか否かを判定する。このキャッシュバッファはRAM103内に設けられたものである。   Returning to FIG. 11, if there is no matching data series on the left of the target pixel position (step S1105), the process proceeds from step S1105 to step S1107, and the target pixel data is stored in the cache buffer shown in FIG. It is determined whether or not it has been done. This cache buffer is provided in the RAM 103.

以下ではまず、キャッシュバッファの動作の説明を行う。   Hereinafter, the operation of the cache buffer will be described first.

注目画素近傍に一致するデータ系列がなかった場合、図6に示す「RAW」コマンドを示す符号と共に生データ(注目画素の画素値を示すデータ)を出力する。その際に、圧縮効率を少しでも上げるために、出力した生データは図10に示すようなキャッシュバッファに格納しておく。   If there is no matching data series in the vicinity of the target pixel, raw data (data indicating the pixel value of the target pixel) is output together with a code indicating the “RAW” command shown in FIG. At this time, in order to increase the compression efficiency as much as possible, the output raw data is stored in a cache buffer as shown in FIG.

図10は、ある画像データ系列が入力された場合のキャッシュバッファの動作例を示す図である。   FIG. 10 is a diagram illustrating an operation example of the cache buffer when a certain image data series is input.

例えば、1画素あたり1バイトのデータで、7画素分の各画素値のデータ[00,01,02,03,01,02,03]という画像データが入力された場合、最初の4バイトはRAWコマンドと共に生データとして出力されるので、8バイト分用意されたキャッシュバッファに生データを格納する。次に5バイト目の[01]というデータが入力された場合、生データとして出力する前にキャッシュバッファ内を検索すると、キャッシュバッファのインデックス2番目に、同じ値が格納されていることがわかる。この場合には、「CACHE」コマンド(符号「01」)と3ビットのインデックス値(この場合、キャッシュバッファの先頭からの位置が「2」であるので「2」を示す3ビットの符号「010」)で出力することにより、RAWコマンドと共に1バイトの生データとして出力するよりも符号量を小さくすることが可能となる。以上が、キャッシュバッファの機能の説明である。   For example, when image data of data [00, 01, 02, 03, 01, 02, 03] of 7 pixel values is input with 1 byte of data per pixel, the first 4 bytes are RAW. Since it is output as raw data together with the command, the raw data is stored in a cache buffer prepared for 8 bytes. Next, when data [01] in the fifth byte is input, if the cache buffer is searched before being output as raw data, it is found that the same value is stored in the second index of the cache buffer. In this case, a “CACHE” command (code “01”) and a 3-bit index value (in this case, since the position from the top of the cache buffer is “2”, a 3-bit code “010” indicating “2”) ”), The amount of code can be made smaller than when it is output as 1-byte raw data together with the RAW command. The above is the description of the function of the cache buffer.

このようにキャッシュバッファの内容は、符号化処理が進むに従って適宜更新される。   As described above, the contents of the cache buffer are appropriately updated as the encoding process proceeds.

従って、図11に戻って、注目画素近傍に一致するデータ系列がなかった場合(ステップS1105)には、処理をステップS1105からステップS1107に進め、上記説明と同様にキャッシュバッファの中を検索し、注目画素の画素値と一致する画素値が格納されていた場合には(ステップS1107)、処理をステップS1107からステップS1108に進め、「CACHE」コマンドを示す符号とともに、注目画素の画素値と一致した画素値が格納されているキャッシュバッファ中の位置(インデックス)を出力し(ステップS1108)、出力したデータをキャッシュバッファに登録し、キャッシュバッファ内を更新する(ステップS1110)。本実施形態ではキャッシュバッファの容量は8バイトとしているため、インデックスは3ビットで表現することが可能である。また、各色データ毎に圧縮符号化を行う場合には、このキャッシュバッファは各色毎に保持されることになる。   Accordingly, referring back to FIG. 11, if there is no data series matching the vicinity of the target pixel (step S1105), the process proceeds from step S1105 to step S1107, and the cache buffer is searched in the same manner as described above. If a pixel value that matches the pixel value of the target pixel is stored (step S1107), the process proceeds from step S1107 to step S1108, and the pixel value of the target pixel matches with the code indicating the “CACHE” command. The position (index) in the cache buffer where the pixel value is stored is output (step S1108), the output data is registered in the cache buffer, and the cache buffer is updated (step S1110). In this embodiment, the cache buffer has a capacity of 8 bytes, so the index can be expressed by 3 bits. Further, when compression encoding is performed for each color data, this cache buffer is held for each color.

また、キャッシュバッファ内にも、注目画素の画素値と一致する画素値が格納されていない場合には(ステップS1107)、処理をステップS1107からステップS1109に進め、「RAW」コマンドを示す符号と共に、1バイトの生データとして注目画素の画素値を出力し(ステップS1109)、出力したデータをキャッシュバッファに登録し、キャッシュバッファ内を更新する(ステップS1110)。   If the pixel value matching the pixel value of the target pixel is not stored in the cache buffer (step S1107), the process proceeds from step S1107 to step S1109, along with a code indicating the “RAW” command, The pixel value of the target pixel is output as 1-byte raw data (step S1109), the output data is registered in the cache buffer, and the cache buffer is updated (step S1110).

そしてステップS1100で符号化対象画像の先頭に設定された現在位置をずらし(ステップS1111)、すらした位置における画素についてステップS1101以降の処理を行う。   In step S1100, the current position set at the head of the encoding target image is shifted (step S1111), and the processing in step S1101 and subsequent steps is performed on the pixel at the even position.

以上の処理を符号化対象画像を構成する全ての画素について行うと、最後に「EOB」コマンドを符号化済みデータバッファに出力し、以上の処理を完了する。   When the above processing is performed for all the pixels constituting the encoding target image, the “EOB” command is finally output to the encoded data buffer, and the above processing is completed.

以上が、本実施形態にかかる符号化処理である。   The above is the encoding process according to the present embodiment.

次に、プリンタ107側で行われる復号処理について以下説明する。復号対象は以上の符号化処理によって符号化されたデータである。   Next, the decoding process performed on the printer 107 side will be described below. The decoding target is data encoded by the above encoding process.

図12は、本実施形態にかかる復号処理のフローチャートである。なお、図12のフローチャートに従ったプログラムはROM109に記録されたプログラムであり、CPU108がこれを実行することにより、プリンタ107は以下説明する符号化処理を行うことになる。なお、図12に示したフローチャートに従った処理はこのようにファームウェア以外にも、プリンタ107内に設けられたハードウェアでもって行うようにしても良い。   FIG. 12 is a flowchart of the decoding process according to this embodiment. The program according to the flowchart of FIG. 12 is a program recorded in the ROM 109. When the CPU 108 executes the program, the printer 107 performs an encoding process described below. The processing according to the flowchart shown in FIG. 12 may be performed by hardware provided in the printer 107 in addition to the firmware as described above.

コンピュータ100からI/F106、I/F111を介してプリンタ107内のRAM110に符号化されたプリントデータが入力されると、先ず現在位置の初期化を行う(ステップS1200)。次に、符号化されたプリントデータを1ビットずつ解析し、「COPY UP」コマンドであった場合には(ステップS1201)、処理をステップS1201からステップS1202に進め、現在位置(復号画素位置)の上方位置から「COPY UP」コマンドに続く「COUNT」符合で示された個数分データをRAM110中のテンポラリ領域に格納される。テンポラリ領域に出力された各データは復号済みの画素のデータである。   When encoded data is input from the computer 100 to the RAM 110 in the printer 107 via the I / F 106 and I / F 111, the current position is first initialized (step S1200). Next, the encoded print data is analyzed bit by bit, and if it is a “COPY UP” command (step S1201), the process proceeds from step S1201 to step S1202, and the current position (decoded pixel position) is determined. The number of pieces of data indicated by the “COUNT” symbol following the “COPY UP” command from the upper position is stored in the temporary area in the RAM 110. Each data output to the temporary area is decoded pixel data.

また、解析した結果が「COPY LEFT」コマンドであった場合には(ステップS1203)、処理をステップS1203からステップS1204に進め、復号画素位置の左方から「COPY LEFT」コマンドに続く「COUNT」符合で示された個数分データをテンポラリ領域にコピーする。   If the analyzed result is the “COPY LEFT” command (step S1203), the process proceeds from step S1203 to step S1204, and the “COUNT” sign following the “COPY LEFT” command from the left of the decoded pixel position. The number of data indicated by is copied to the temporary area.

さらに、解析した結果が「CACHE」コマンドであった場合には(ステップS1205)、処理をステップS1205からステップS1206に進め、RAM110中の現在のキャッシュバッファの中の「CACHE」コマンドに続くインデックスで示された領域に格納された値を、復号化画素としてテンポラリ領域に出力する(ステップS1206)。また、復号化画素の画素値のデータを符号化時と同様にしてキャッシュバッファに格納し、キャッシュバッファを更新する(ステップS1208)。   Further, if the analyzed result is a “CACHE” command (step S1205), the process proceeds from step S1205 to step S1206, and is indicated by an index following the “CACHE” command in the current cache buffer in the RAM 110. The value stored in the designated area is output as a decoded pixel to the temporary area (step S1206). Further, the pixel value data of the decoded pixel is stored in the cache buffer in the same manner as in the encoding, and the cache buffer is updated (step S1208).

また、解析した結果が上記何れのコマンドでもない場合には(ステップS1205)、処理をステップS1205からステップS1207に進め、解析結果が「RAW」コマンドであると解釈し、「RAW」コマンドに続く1バイトのデータを復号化画素としてテンポラリ領域に出力し(ステップS1207)、復号化画素の画素値のデータを符号化時と同様にしてキャッシュバッファに格納し、キャッシュバッファを更新する(ステップS1208)。   If the analyzed result is not one of the above commands (step S1205), the process proceeds from step S1205 to step S1207, the analysis result is interpreted as a “RAW” command, and 1 follows the “RAW” command. The byte data is output as a decoded pixel to the temporary area (step S1207), and the pixel value data of the decoded pixel is stored in the cache buffer in the same manner as in the encoding, and the cache buffer is updated (step S1208).

そしてステップS1200で設定された現在位置をずらし(ステップS1209)、すらした位置における画素についてステップS1201以降の処理を行う。   Then, the current position set in step S1200 is shifted (step S1209), and the processing in step S1201 and subsequent steps is performed on the pixel at the even position.

以上の処理を入力されたデータ全てについて行うと、以上の処理を完了する。   When the above processing is performed for all input data, the above processing is completed.

以上が、本実施形態にかかる復号化処理である。   The above is the decryption processing according to the present embodiment.

次に、以上説明した符号化処理をドライバプログラムに適用した場合に、符号化側(ドライバプログラム)で復号した結果を復号化側(プリンタ107)で的確に復号可能なようにするために、本実施形態にかかるドライバプログラムでもって実現すべき処理について説明する。   Next, in order to enable the decoding side (printer 107) to accurately decode the result decoded on the encoding side (driver program) when the encoding processing described above is applied to the driver program, Processing to be realized by the driver program according to the embodiment will be described.

図13は、以上説明した符号化処理をドライバプログラムに適用した場合に、このドライバプログラムをCPU101が実行することでなされる符号化処理のフローチャートである。   FIG. 13 is a flowchart of the encoding process performed when the CPU 101 executes the driver program when the encoding process described above is applied to the driver program.

図14は、印字解像度展開、色変換処理、疑似階調処理が施された後の符号化対象画像データを示す図である。   FIG. 14 is a diagram illustrating the encoding target image data after the print resolution development, the color conversion process, and the pseudo gradation process are performed.

図14において、Unit:00〜02はそれぞれ符号化処理単位を示しており、上述したように所定のラスタ単位Mで構成されている。また、同図中の網点部分は印字データが存在する領域を示しており、それ以外の領域は印字データが全く存在しない空白領域を示している。すなわち、空白領域はすべてNULLラスタで構成されている。   In FIG. 14, Unit: 00 to 02 each indicate an encoding processing unit, and is composed of a predetermined raster unit M as described above. Further, the halftone dot portion in the figure shows an area where print data exists, and the other area shows a blank area where no print data exists. That is, all blank areas are composed of null rasters.

このような画像データに対してラスタ毎に順次、上記符号化法を適用することになるが、その際の動作の説明を、図13のフローチャートに従って説明する。   The above encoding method is sequentially applied to such image data for each raster, and the operation at that time will be described with reference to the flowchart of FIG.

先ず、これから符号化しようとする位置が各符号化処理単位の先頭であるか否かを判断し(ステップS1300)、先頭であった場合には処理をステップS1300からステップS1301に進め、直前に符号化した符号化処理単位(前符号化処理単位)が空白領域、すなわち全てNULLラスタで構成されていたか否かの判定を行う(ステップS1301)。   First, it is determined whether or not the position to be encoded is the head of each encoding processing unit (step S1300). If it is the head, the process proceeds from step S1300 to step S1301, and the encoding is performed immediately before. It is determined whether or not the encoded encoding processing unit (pre-encoding processing unit) is composed of a blank area, that is, all null rasters (step S1301).

ステップS1301における判定は、後述するNullCounterを用いて行う。すなわち、NullCounterが符号化処理単位を構成するラスタ数(=M)であった場合には、前符号化処理単位が空白領域であったと判断する。   The determination in step S1301 is performed using a NullCounter described later. That is, when NullCounter is the number of rasters (= M) constituting the encoding processing unit, it is determined that the previous encoding processing unit is a blank area.

一方、ステップS1301において前符号化処理単位が空白領域でなかったと判定された場合には、処理をステップS1301からステップS1303に進め、符号化処理の過程で動的に変化し、復号側でも同様に使用されるパラメータを、RAM103上に確保されたテンポラリ領域に保存する(ステップS1303)。この動的に変化するパラメータとは、本実施形態では、上述したキャッシュバッファ(具体的にはキャッシュバッファ上のデータ(例えば図10に示したキャッシュバッファ内のデータ))が該当する。   On the other hand, if it is determined in step S1301 that the pre-encoding processing unit is not a blank area, the process proceeds from step S1301 to step S1303, and dynamically changes during the encoding process. The parameters to be used are stored in a temporary area secured on the RAM 103 (step S1303). In this embodiment, the dynamically changing parameter corresponds to the above-described cache buffer (specifically, data on the cache buffer (for example, data in the cache buffer shown in FIG. 10)).

すなわち本実施形態では、ステップS1303ではキャッシュバッファをテンポラリ領域に一時的に保存することになる。そして、前符号化処理単位の符号化結果に対して図4に示したコマンドを付加し、RAM103上のプリンタ転送用のバッファに出力する(ステップS1305)。そして、NULLラスタをカウントするカウンタであるNullCounterを0に初期化する(ステップS1306)。   That is, in this embodiment, in step S1303, the cache buffer is temporarily stored in the temporary area. Then, the command shown in FIG. 4 is added to the encoding result of the pre-encoding processing unit and output to the printer transfer buffer on the RAM 103 (step S1305). Then, NullCounter, which is a counter for counting null rasters, is initialized to 0 (step S1306).

そして処理をステップS1307に進め、符号化対象ラスタに対して全てのデータが0であるか否か(すなわちこれから符号化しようとする符号化処理単位がNULLラスタであるか否か)のチェックを行い(ステップS1307)、データ全てが0であった場合には、同ラスタはNULLラスタであると判断し、処理をステップS1307からステップS1308に進め、NullCounterを1つインクリメントする(ステップS1308)。ここで、符号化対象ラスタ中に1つでも0ではない値のデータが存在した場合には、NullCounterはインクリメントせず、次の処理に移動する。   Then, the process proceeds to step S1307 to check whether or not all data is 0 for the encoding target raster (that is, whether or not the encoding processing unit to be encoded is a NULL raster). (Step S1307) If all the data is 0, it is determined that the raster is a null raster, the process proceeds from step S1307 to step S1308, and NullCounter is incremented by one (step S1308). If there is even one non-zero value data in the encoding target raster, NullCounter is not incremented and moves to the next process.

そして、符号化対象ラスタがNULLラスタであるか否かに関わらず、同ラスタの符号化処理を行う。この符号化処理は上述した符号化処理(図11のフローチャートに従った処理)であるので、説明は省略する。この時、NULLラスタを符号化する場合においても、上述したキャッシュバッファが変化する可能性があることに注意されたい。   Then, regardless of whether or not the encoding target raster is a NULL raster, encoding processing of the raster is performed. Since this encoding process is the above-described encoding process (a process according to the flowchart of FIG. 11), description thereof is omitted. At this time, it should be noted that the cache buffer described above may change even when a NULL raster is encoded.

符号化対象ラスタを構成するラスタの符号化処理が終了すると、同ラスタが印刷ページを構成する最後のラスタであるか否かのチェックを行い(ステップS1310)、最後ではなかった場合には、処理をステップS1300に戻し、以降の処理を行う。   When the encoding process of the raster constituting the encoding target raster is completed, it is checked whether or not the raster is the last raster constituting the print page (step S1310). Is returned to step S1300, and the subsequent processing is performed.

次の符号化処理単位の先頭では、処理はステップS1300からステップS1301に進み、前回符号化した符号化対象ラスタ(前符号化処理単位)が空白領域であったか否かの判定を、NullCounterがMであるか否かを判定することにより判定する(ステップS1301)。   At the head of the next encoding processing unit, the process proceeds from step S1300 to step S1301 to determine whether or not the encoding target raster (pre-encoding processing unit) encoded last time is a blank area, and NullCounter is M. It is determined by determining whether or not there is (step S1301).

そしてNullCounterの値がMと同値、すなわち、前符号化処理単位が空白領域である場合には処理をステップS1301からステップS1302に進め、上記テンポラリ領域に保存しておいたキャッシュバッファのデータを、これから使用するキャッシュバッファのデータとして以降使用する。すなわち、現在のキャッシュバッファのデータを、保存していたキャッシュバッファのデータに戻す処理を行う(ステップS1302)。   If the value of NullCounter is the same as M, that is, if the pre-encoding processing unit is a blank area, the process proceeds from step S1301 to step S1302, and the cache buffer data stored in the temporary area is changed. Used as data for the cache buffer to be used. That is, a process for returning the current cache buffer data to the stored cache buffer data is performed (step S1302).

次に、前符号化処理単位を符号化した結果はRAM103上から破棄し、図4に示すラスタスキップコマンド(0xFF,0x05)を、RAM103上のプリンタ転送用バッファに出力する。   Next, the result of encoding the previous encoding processing unit is discarded from the RAM 103, and the raster skip command (0xFF, 0x05) shown in FIG. 4 is output to the printer transfer buffer on the RAM 103.

このように、各符号化対象ラスタを符号化する際に、第1の符号化対象ラスタとその後符号化する第2の符号化対象ラスタとの間にNULLラスタが存在しても、第2の符号化対象ラスタの符号化を開始するときには、第1の符号化対象ラスタの符号化終了時のキャッシュバッファを使用できる。   Thus, when each encoding target raster is encoded, even if a NULL raster exists between the first encoding target raster and the second encoding target raster to be encoded thereafter, the second raster When starting the encoding of the encoding target raster, the cache buffer at the end of the encoding of the first encoding target raster can be used.

以上説明した動作を図14を参照しながら確認する。まず最初の符号化処理単位であるUnit:00の先頭では、Unit:00直前の符号化処理単位が空白領域でなかった場合、現在の動的パラメータを保存し、続いてUnit:00の各ラスタを符号化し、符号化出力用のバッファに出力する。   The operation described above will be confirmed with reference to FIG. First, at the beginning of Unit: 00, which is the first encoding processing unit, if the encoding processing unit immediately before Unit: 00 is not a blank area, the current dynamic parameters are saved, and then each raster of Unit: 00 is stored. Is output to a buffer for encoding output.

次にUnit:01の先頭でUnit:00が空白領域であるか否かを判定すると、図14の場合空白領域ではないため、同様に現在の動的パラメータの保存を行う。Unit:01が全てNULLラスタであるか否かは、Unit:01の途中にドライバ処理単位の境界が存在する可能性があるため、Unit:01の先頭時点では不明である。   Next, when it is determined whether or not Unit: 00 is a blank area at the beginning of Unit: 01, since it is not a blank area in the case of FIG. 14, the current dynamic parameters are similarly stored. Whether all Unit: 01 are null rasters is unknown at the beginning of Unit: 01 because there may be a boundary between driver processing units in the middle of Unit: 01.

従って、Unit:01の各ラスタに対しても符号化処理が施される。次にUnit:02の先頭でUnit:01が空白領域であるか否かを判断すると、この時点ではUnit:01が空白領域であることがわかっているため、動的パラメータを保存してある状態に復元するとともに、ラスタスキップコマンドを出力する。   Therefore, the encoding process is also performed for each raster of Unit: 01. Next, when it is determined whether or not Unit: 01 is a blank area at the beginning of Unit: 02, since it is known that Unit: 01 is a blank area at this point, the dynamic parameters are saved And a raster skip command is output.

以上説明したように、本実施形態によれば、一連の符号化データを受け取ったプリンタから見れば、符号化処理単位は存在しなかったことと同義になり、符号化側と復号化側で動的に変化するパラメータの整合性が失われることはない。よって、従来のシステムを大きく変更することなく、動的パラメータを保持するような高能率符号化法を適用することができる。   As described above, according to the present embodiment, when viewed from a printer that has received a series of encoded data, it is synonymous with the fact that there is no encoding processing unit, and the encoding side and the decoding side are operated. There is no loss of the consistency of the changing parameters. Therefore, it is possible to apply a high-efficiency encoding method that retains dynamic parameters without greatly changing the conventional system.

[第2の実施形態]
第1の実施形態で用いた符号化方法は、上記特許文献1に記載の符号化方法であったが、ほかの符号化方法を用いても良い。
[Second Embodiment]
The encoding method used in the first embodiment is the encoding method described in Patent Document 1, but other encoding methods may be used.

第1の実施形態では、注目しているデータと一致するデータ系列が存在するか否かの判定を行う参照画素位置は、隣接する上方と左方の2箇所であるとして説明したが、図15に示すように、これらの位置は複数であっても構わない。この場合、図15に図示するように、注目画素に近い位置を第1参照位置、遠い位置を第2参照位置とする。符号化処理においては、第1上方参照位置、第1左方参照位置、第2上方参照位置、第2左方参照位置、という順序で探索を行い、一致するデータ系列が存在していた場合には、その参照位置を示す符号と一致する長さを示す符号を出力する。この場合のコマンド符号化は、例えば図16に図示するようなものになる。図16は、本実施形態にかかる符号化処理について用いられるコマンド群及び符号群を示す図である。   In the first embodiment, it has been described that the reference pixel positions for determining whether or not there is a data series that matches the data of interest exist in two places, upper and left adjacent to each other. As shown in FIG. 6, there may be a plurality of these positions. In this case, as shown in FIG. 15, a position close to the target pixel is a first reference position, and a position far from the target pixel is a second reference position. In the encoding process, when a search is performed in the order of the first upper reference position, the first left reference position, the second upper reference position, and the second left reference position, and a matching data sequence exists. Outputs a code indicating a length that matches the code indicating the reference position. The command encoding in this case is as shown in FIG. 16, for example. FIG. 16 is a diagram illustrating a command group and a code group used for the encoding process according to the present embodiment.

これらの参照位置は、符号化の最中に動的に入れ替わることで、圧縮効率を向上させることができる。すなわち、上記順番に検索している仮定で、第1上方参照位置には一致するデータは存在しなかったが、第2上方参照位置には存在していた場合、第2上方参照位置近辺の方がデータの相関性は高いと判断し、第1上方参照位置と第2上方参照位置を入れ替えるようにする。すなわち、図15であれば、次のデータからは、まず注目画素位置から3画素上方に一致するデータがあるか比較し、なければ、第1左方参照位置との比較を行うようにする。   These reference positions can be dynamically changed during encoding to improve compression efficiency. In other words, if no matching data exists at the first upper reference position but the second upper reference position exists when the search is performed in the above order, the data near the second upper reference position. However, it is determined that the correlation of the data is high, and the first upper reference position and the second upper reference position are switched. That is, in FIG. 15, from the next data, first, it is compared whether there is data that matches three pixels above the target pixel position, and if not, comparison is made with the first left reference position.

上記のような改善を加えた場合、現在どの位置が第1参照位置となっているかという情報は動的パラメータとなるため、第1の実施形態で説明したものと同様に、キャッシュバッファと共にテンポラリ領域に保存しておくことで、例え印字ページの途中に空白領域が存在していたとしても、符号化側と復号化側での参照位置の整合性が失われることはない。   When the above improvement is made, the information indicating which position is the first reference position is a dynamic parameter. Therefore, the temporary area together with the cache buffer is the same as that described in the first embodiment. Thus, even if a blank area exists in the middle of the print page, the consistency of the reference position on the encoding side and the decoding side is not lost.

なお、これらの参照位置は2箇所に限ったものではなく、さらに多数の参照位置が存在していても良いことはいうまでもない。   Needless to say, these reference positions are not limited to two, and a larger number of reference positions may exist.

[第3の実施形態]
第2の実施形態でも説明したとおり、ほかの符号化方法を用いても良い。本実施形態では、LZ78系の符号化法を用いる。
[Third Embodiment]
As described in the second embodiment, other encoding methods may be used. In the present embodiment, an LZ78 encoding method is used.

LZ78系符号化法に関しては、その詳細を説明する文献は数多く存在するため、ここでは処理の詳細は割愛する。その概要は、入力データ系列に対して、新しく出現した系列の組み合わせをフレーズとして辞書に登録し、同辞書を参照することで、圧縮効率の向上を図るものである。   Regarding the LZ78 encoding method, since there are many documents explaining the details, the details of the processing are omitted here. The outline is that a combination of newly appearing sequences is registered as a phrase in the dictionary with respect to the input data sequence, and the compression efficiency is improved by referring to the dictionary.

図17は、入力データ系列に対してLZ78で圧縮符号化した際に作成される辞書データとその出力結果の例を示す図である。図示したようなデータ系列が入力された場合、LZ78符号化では、最初の[01,02,03]というデータは辞書にはあらかじめ存在しないため、それぞれ[P1,P2,P3]として辞書データに登録する。   FIG. 17 is a diagram showing an example of dictionary data created when the input data series is compression-encoded with LZ78 and the output result thereof. When a data series as shown in the figure is input, in LZ78 encoding, since the first data [01, 02, 03] does not exist in the dictionary in advance, it is registered in the dictionary data as [P1, P2, P3], respectively. To do.

4バイト目に[01]というデータが入力された時、辞書データを検索すると、P1として登録されていることがわかる。しかし続く[01,02]というフレーズは未だ辞書データには登録されていない。   When data [01] is input at the fourth byte, it is found that it is registered as P1 when the dictionary data is searched. However, the following phrase [01, 02] is not yet registered in the dictionary data.

従って、符号化器は[P1,02]という符号を出力し、[01,02]というフレーズをP4として辞書に登録する。次の、入力データは[01,02,03]であるが、辞書データを検索すると[01,02]というフレーズは存在するものの、[01,02,03]というフレーズは存在しないことがわかる。   Therefore, the encoder outputs a code [P1,02] and registers the phrase [01,02] in the dictionary as P4. The next input data is [01,02,03], but when the dictionary data is searched, it can be seen that although the phrase [01,02] exists, the phrase [01,02,03] does not exist.

従って符号化器は、[P4,03]という符号を出力し、[01,02,03]というフレーズをP5として辞書に登録する。以上の動作を続けてゆくことにより、圧縮符号化処理を行う。以上が、LZ78系符号化の処理の概要である。   Therefore, the encoder outputs the code [P4, 03] and registers the phrase [01, 02, 03] in the dictionary as P5. The compression encoding process is performed by continuing the above operation. The above is the outline of the LZ78 encoding process.

上記符号化法は、辞書データサイズが大きくなればなるほど、高能率の符号化を行うことが可能であるが、通常は登録できるフレーズの数やフレーズの長さは有限なものとなっている。そのため、登録できるフレーズが一杯になると、古いフレーズから破棄してゆくようになっている。そのため、符号化の最中にこの辞書データは動的に変化してゆくことになる。   The above encoding method can perform highly efficient encoding as the dictionary data size increases, but usually the number of phrases and the length of phrases that can be registered are limited. Therefore, when the phrases that can be registered are full, old phrases are discarded. Therefore, this dictionary data changes dynamically during encoding.

従って、このような符号化法を第1,2の実施形態で説明したようにプリンティングシステムに適用しようとした場合、辞書データを動的パラメータとしてキャッシュバッファ、その他と同様に保存、復元することで、例え印字ページの途中に空白領域が存在していたとしても、符号化側と復号化側で辞書データの整合性が失われることはない。   Therefore, when such an encoding method is applied to a printing system as described in the first and second embodiments, dictionary data is saved and restored as a dynamic parameter in the same manner as a cache buffer. Even if a blank area exists in the middle of the print page, the consistency of the dictionary data is not lost on the encoding side and the decoding side.

[その他の実施形態]
本発明は、以上説明した符号化のみに適用されるものではなく、符号化の過程でまだ符号化されていない部分を符号化するために参照され得るデータに関し、符号化処理の過程で動的に変化し得るパラメータを用いる符号化処理全般に適用可能であることは言うまでもない。
[Other Embodiments]
The present invention is not only applied to the above-described encoding, but relates to data that can be referred to for encoding a portion that has not been encoded in the encoding process. Needless to say, the present invention can be applied to the entire encoding process using parameters that can be changed.

例えば、LZ77系のハッシュテーブルが動的パラメータに相当するし、LZ78符号化の改良版であるLZW(Ziv−Lempel−Welch)符号化に対しても同様に適用することが可能である。   For example, an LZ77-based hash table corresponds to a dynamic parameter, and can be similarly applied to LZW (Ziv-Lempel-Welch) encoding, which is an improved version of LZ78 encoding.

なお、本発明は、複数の機器(例えばホストコンピュータ、インタフェイス機器、リーダ、プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置など)に適用してもよい。   Note that the present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, and a printer), and a device (for example, a copying machine and a facsimile device) including a single device. You may apply to.

また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   Another object of the present invention is to supply a storage medium (or recording medium) in which a program code of software that realizes the functions of the above-described embodiments is recorded to a system or apparatus, and the computer (or CPU or Needless to say, this can also be achieved by the MPU) reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.

さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   Furthermore, after the program code read from the storage medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, the function is determined based on the instruction of the program code. It goes without saying that the CPU or the like provided in the expansion card or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.

以上説明したように、第1,2の実施形態等によれば、従来のランレングス符号化よりも高性能である符号化法をプリンティングシステムに適用した場合に、例え該符号化方式が内部に動的パラメータを保持していたとしても、従来のシステムを大きく変更することなく、適用することが可能となる。   As described above, according to the first and second embodiments, when an encoding method having higher performance than conventional run-length encoding is applied to a printing system, for example, the encoding method is internally included. Even if the dynamic parameters are retained, the conventional system can be applied without greatly changing.

また、第3、及びその他の実施形態等によれば、第1、2の実施形態で用いた符号化法に限定することなく、種々の動的パラメータを保持するような圧縮符号化方法を、現在のプリンティングシステムに適用することも可能である。   Further, according to the third and other embodiments, the compression encoding method that holds various dynamic parameters is not limited to the encoding method used in the first and second embodiments, It can also be applied to current printing systems.

本発明の第1の実施形態にかかるプリントシステムを構成するコンピュータとプリンタの基本構成を示すブロック図である。1 is a block diagram showing a basic configuration of a computer and a printer that constitute a printing system according to a first embodiment of the present invention. コンピュータ100のRAM103にロードされているドライバ(ドライバ部)とプリンタ107(プリンタ部)の機能構成を示すブロック図である。FIG. 3 is a block diagram illustrating functional configurations of a driver (driver unit) and a printer 107 (printer unit) loaded in a RAM 103 of the computer 100. OSの印字解像度への展開を説明するための図である。It is a figure for demonstrating expansion | deployment to the printing resolution of OS. 圧縮された色処理後の画像データに付加されるコマンドを示す図である。It is a figure which shows the command added to the image data after the compressed color process. プリントデータの一例を示す図である。FIG. 4 is a diagram illustrating an example of print data. 本発明の第1の実施形態にかかる符号化処理について用いられるコマンド群を示す図である。It is a figure which shows the command group used about the encoding process concerning the 1st Embodiment of this invention. 本発明の第1の実施形態にかかる符号化処理について用いられるコマンド群を示す図である。It is a figure which shows the command group used about the encoding process concerning the 1st Embodiment of this invention. 符号化対象となる注目画素位置を符号化する処理を説明する為の図である。It is a figure for demonstrating the process which encodes the attention pixel position used as encoding object. 符号化対象となる注目画素位置を符号化する処理を説明する為の図である。It is a figure for demonstrating the process which encodes the attention pixel position used as encoding object. ある画像データ系列が入力された場合のキャッシュバッファの動作例を示す図である。It is a figure which shows the operation example of the cache buffer when a certain image data series is input. 本発明の第1の実施形態にかかる符号化処理のフローチャートである。It is a flowchart of the encoding process concerning the 1st Embodiment of this invention. 本発明の第1の実施形態にかかる復号処理のフローチャートである。It is a flowchart of the decoding process concerning the 1st Embodiment of this invention. 本発明の第1の実施形態にかかる符号化処理をドライバプログラムに適用した場合に、このドライバプログラムをCPU101が実行することでなされる符号化処理のフローチャートである。6 is a flowchart of an encoding process performed by a CPU 101 executing the driver program when the encoding process according to the first embodiment of the present invention is applied to the driver program. 印字解像度展開、色変換処理、疑似階調処理が施された後の符号化対象画像データを示す図である。It is a figure which shows the encoding target image data after performing printing resolution expansion | deployment, a color conversion process, and a pseudo gradation process. 本発明の第2の実施形態における符号化処理における、複数の参照画素位置を示す図である。It is a figure which shows the some reference pixel position in the encoding process in the 2nd Embodiment of this invention. 本発明の第2の実施形態にかかる符号化処理について用いられるコマンド群及び符号群を示す図である。It is a figure which shows the command group and code group which are used about the encoding process concerning the 2nd Embodiment of this invention. 入力データ系列に対してLZ78で圧縮符号化した際に作成される辞書データとその出力結果の例を示す図である。It is a figure which shows the example of the dictionary data produced when carrying out the compression encoding by LZ78 with respect to an input data series, and its output result.

Claims (10)

画像をラスタ群毎に順次符号化する符号化方法であって、
第N番目のラスタ群を符号化する前に、当該第N番目のラスタ群の前に符号化を行った第(N−1)番目のラスタ群が空白領域を示すデータ群であるか否かを判断する判断工程と、
前記第(N−1)番目のラスタ群が空白領域を示すデータ群ではない場合には、第1の保持手段に保持されていて、前記符号化及び前記符号化に対する復号化の過程で動的に変化するパラメータを第2の保持手段に保存して、前記第(N−1)番目のラスタ群の符号化データを出力する第1の出力工程と、
前記第(N−1)番目のラスタ群が空白領域を示すデータ群である場合には、前記第1の保持手段に保持されていて、前記符号化及び前記符号化に対する復号化の過程で動的に変化するパラメータを第(N−1)番目のラスタ群の符号化以前に保存された状態に更新して、前記第(N−1)番目のラスタ群が空白領域を示すデータ群であることを示す情報を出力する第2の出力工程と、
前記第1の出力工程、若しくは前記第2の出力工程による処理の終了後、前記第1の保持手段に保存されているパラメータを用いて前記第N番目のラスタ群を符号化する符号化工程と
を備えることを特徴とする符号化方法。
An encoding method for sequentially encoding an image for each raster group,
Before encoding the Nth raster group, whether or not the (N-1) th raster group encoded before the Nth raster group is a data group indicating a blank area. A judging process for judging
If the (N-1) th raster group is not a data group indicating a blank area, it is held in the first holding means, and is dynamically changed in the process of encoding and decoding for the encoding. A first output step of storing in the second holding means and outputting the encoded data of the (N-1) th raster group,
When the (N-1) th raster group is a data group indicating a blank area, it is held in the first holding means and is moved in the process of encoding and decoding for the encoding. Are changed to a state stored before the encoding of the (N-1) th raster group, and the (N-1) th raster group is a data group indicating a blank area. A second output step for outputting information indicating that;
An encoding step of encoding the Nth raster group using a parameter stored in the first holding means after completion of the processing in the first output step or the second output step; An encoding method comprising:
更に、前記符号化工程での符号化時に、空白を示すラスタをカウントするカウント工程を備え、
前記判断工程では、前記カウント工程によるカウント数が、符号化単位のラスタ数と同じである場合には、空白領域であると判断することを特徴とする請求項に記載の符号化方法。
Furthermore, it comprises a counting step of counting rasters indicating blanks during encoding in the encoding step,
The encoding method according to claim 1 , wherein in the determination step, when the count number in the counting step is the same as the number of rasters in the encoding unit, it is determined as a blank area.
前記パラメータは、前記符号化工程によりまだ符号化されていないラスタ部分を符号化するために参照され得る、符号化済みの画素のデータ群を含むことを特徴とする請求項1に記載の符号化方法。   The encoding of claim 1, wherein the parameters include a group of encoded pixel data that can be referenced to encode a raster portion that has not yet been encoded by the encoding step. Method. 前記パラメータは、注目画素以降のデータ群と一致するか否かを検査するために参照する画素位置の参照順序を含むことを特徴とする請求項1に記載の符号化方法。   The encoding method according to claim 1, wherein the parameters include a reference order of pixel positions to be referred to in order to check whether or not the data group after the target pixel matches. 前記パラメータは、符号化済みデータ群をフレーズとして登録しておくための辞書データベースを含むことを特徴とする請求項1に記載の符号化方法。   The encoding method according to claim 1, wherein the parameter includes a dictionary database for registering an encoded data group as a phrase. 前記パラメータは、注目画素以降のデータ群と同じ系列となる符号化済みデータ群の位置を記憶しておくためのハッシュテーブルを含むことを特徴とする請求項1に記載の符号化方法。   The encoding method according to claim 1, wherein the parameter includes a hash table for storing a position of an encoded data group that is in the same series as the data group after the pixel of interest. 前記第2の出力工程では、ラスタスキップコマンドを出力することを特徴とする請求項に記載の符号化方法。 The encoding method according to claim 1 , wherein a raster skip command is output in the second output step. 画像をラスタ群毎に順次符号化する符号化装置であって、
第N番目のラスタ群を符号化する前に、当該第N番目のラスタ群の前に符号化を行った第(N−1)番目のラスタ群が空白領域を示すデータ群であるか否かを判断する判断手段と、
前記第(N−1)番目のラスタ群が空白領域を示すデータ群ではない場合には、第1の保持手段に保持されていて、前記符号化及び前記符号化に対する復号化の過程で動的に変化するパラメータを第2の保持手段に保存して、前記第(N−1)番目のラスタ群の符号化データを出力する第1の出力手段と、
前記第(N−1)番目のラスタ群が空白領域を示すデータ群である場合には、前記第1の保持手段に保持されていて、前記符号化及び前記符号化に対する復号化の過程で動的に変化するパラメータを第(N−1)番目のラスタ群の符号化以前に保存された状態に更新して、前記第(N−1)番目のラスタ群が空白領域を示すデータ群であることを示す情報を出力する第2の出力手段と、
前記第1の出力手段、若しくは前記第2の出力手段による処理の終了後、前記第1の保持手段に保存されているパラメータを用いて前記第N番目のラスタ群を符号化する符号化手段と
を備えることを特徴とする符号化装置。
An encoding device that sequentially encodes an image for each raster group,
Before encoding the Nth raster group, whether or not the (N-1) th raster group encoded before the Nth raster group is a data group indicating a blank area. A judging means for judging
If the (N-1) th raster group is not a data group indicating a blank area, it is held in the first holding means, and is dynamically changed in the process of encoding and decoding for the encoding. A first output means for storing the (N-1) -th raster group encoded data in a second holding means,
When the (N-1) th raster group is a data group indicating a blank area, it is held in the first holding means and is moved in the process of encoding and decoding for the encoding. Are changed to a state stored before the encoding of the (N-1) th raster group, and the (N-1) th raster group is a data group indicating a blank area. Second output means for outputting information indicating that;
Encoding means for encoding the Nth raster group using parameters stored in the first holding means after completion of processing by the first output means or the second output means; An encoding device comprising:
コンピュータに請求項1乃至の何れか1項に記載の符号化方法を実行させる為のプログラム。 A program for causing a computer to execute the encoding method according to any one of claims 1 to 7 . 請求項に記載のプログラムを格納したことを特徴とするコンピュータ読みとり可能な記憶媒体。 A computer-readable storage medium storing the program according to claim 9 .
JP2004024483A 2004-01-30 2004-01-30 Encoding device and encoding method Expired - Fee Related JP3880578B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004024483A JP3880578B2 (en) 2004-01-30 2004-01-30 Encoding device and encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004024483A JP3880578B2 (en) 2004-01-30 2004-01-30 Encoding device and encoding method

Publications (2)

Publication Number Publication Date
JP2005217954A JP2005217954A (en) 2005-08-11
JP3880578B2 true JP3880578B2 (en) 2007-02-14

Family

ID=34907154

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004024483A Expired - Fee Related JP3880578B2 (en) 2004-01-30 2004-01-30 Encoding device and encoding method

Country Status (1)

Country Link
JP (1) JP3880578B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4964541B2 (en) * 2006-09-11 2012-07-04 オリンパス株式会社 Imaging apparatus, image processing apparatus, imaging system, and image processing program
JP4909003B2 (en) * 2006-10-03 2012-04-04 キヤノン株式会社 Image processing apparatus and method

Also Published As

Publication number Publication date
JP2005217954A (en) 2005-08-11

Similar Documents

Publication Publication Date Title
JP5558767B2 (en) Image processing apparatus and processing method thereof
US8259338B2 (en) Image forming apparatus and method of file conversion
JP5404303B2 (en) Image processing apparatus, image processing method, and program
US5768486A (en) Printing apparatus
AU2004277271B2 (en) Split runlength encoding method and apparatus
JP2000295113A (en) Huffman coded data compressor
JP4781198B2 (en) Image processing apparatus and method, computer program, and computer-readable storage medium
JP2008311792A (en) Device for encoding image and control method therefor
JP4888566B2 (en) Data compression method
JP2011254405A (en) Image processor and image processing method
JP3880578B2 (en) Encoding device and encoding method
JP4633576B2 (en) Data compression apparatus and data compression program
US6587222B2 (en) Image processing apparatus for converting image data in accordance with characteristics of an image obtained at the time of expansion
JP4173498B2 (en) Data compression apparatus and data compression program
JP4936524B2 (en) Image processing system and image processing method
JP4377351B2 (en) Data compression apparatus and data compression program
JP4435586B2 (en) Data compression apparatus and data compression program
JP3624155B2 (en) Image compression apparatus, image compression method, and information processing system
JP2005260408A (en) Data compression apparatus and data compression program
JP3683667B2 (en) Printer controller
JP3792881B2 (en) Image processing apparatus, data processing method for image processing apparatus, and storage medium storing computer-readable program
JP4741317B2 (en) Data compression apparatus and data compression program
US20060139693A1 (en) Printing system, computer readable medium recording a driver program, and printing device
US20120033239A1 (en) Mechanism for Inserting Information Into a Bitmap
JP5263717B2 (en) Image processing apparatus, image processing system, and program

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060306

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060508

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060710

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060809

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20060919

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20061027

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061107

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101117

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101117

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111117

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121117

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131117

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees