JP2006217007A - Interface apparatus for companding module - Google Patents

Interface apparatus for companding module Download PDF

Info

Publication number
JP2006217007A
JP2006217007A JP2005024828A JP2005024828A JP2006217007A JP 2006217007 A JP2006217007 A JP 2006217007A JP 2005024828 A JP2005024828 A JP 2005024828A JP 2005024828 A JP2005024828 A JP 2005024828A JP 2006217007 A JP2006217007 A JP 2006217007A
Authority
JP
Japan
Prior art keywords
data
compression
image
decompression
image data
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.)
Granted
Application number
JP2005024828A
Other languages
Japanese (ja)
Other versions
JP4446389B2 (en
Inventor
Taiji Hagita
泰治 萩田
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2005024828A priority Critical patent/JP4446389B2/en
Publication of JP2006217007A publication Critical patent/JP2006217007A/en
Application granted granted Critical
Publication of JP4446389B2 publication Critical patent/JP4446389B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an interface apparatus between a DMAC and a companding module, the interface apparatus having simple configuration and capable of efficiently transferring image data. <P>SOLUTION: The interface apparatus calculates a setting value of a line length being a processing unit of a compander on the basis of line length information of data transferred from a DMA controller and a line memory capacity of the compander. When the data amount transferred from the DMA controller is greater than the line memory capacity of a compression apparatus in the case of compression, the interface apparatus divides data of one line into data whose capacity is the line memory capacity or below, and the interface apparatus transfers the divided data several times to the compression apparatus. When the data amount transferred from the DMA controller is greater than the line memory capacity of an expansion apparatus in the case of expansion, the interface apparatus merges a plurality of line data outputted from the expansion apparatus as one line and transfers the resulting data to the DMA controller. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、圧縮伸長モジュールのインターフェース装置に関し、特に、複写機やプリンタやMFPにおける、ASICに内蔵された画像圧縮伸長モジュールと汎用DMACとのインターフェース装置に関する。   The present invention relates to an interface device for a compression / decompression module, and more particularly to an interface device for an image compression / decompression module incorporated in an ASIC and a general-purpose DMAC in a copying machine, a printer, or an MFP.

プリンタやMFP等の画像処理装置は、画像をRAMやHDDなどのストレージに蓄積する際のデータ量を削減する目的で、圧縮伸長器を搭載している。圧縮伸長の方式は多種あるが、ハードウェア化されてASICに内蔵され、ラインメモリを使って圧縮伸長を行うという形態の圧縮伸長器の場合、圧縮伸長器に入力しようとする処理画像の主走査幅に制限が付く。   Image processing apparatuses such as printers and MFPs are equipped with a compression / decompression device for the purpose of reducing the amount of data when storing images in storage such as RAM and HDD. There are various compression / decompression methods, but in the case of a compression / decompression device that is built in hardware and built into the ASIC and performs compression / decompression using line memory, the main scan of the processed image to be input to the compression / decompression device The width is limited.

一般に、ラインメモリは1ライン分の画像データを蓄積するために使用される。ラインメモリを使用するケースとしては、以下のような理由がある。
(1)圧縮伸長の方式が、前ラインを参照する2次元圧縮方式であるとき。
(2)圧縮伸長器が1ラインの画像をスキャンして、最適な圧縮方式または内部パラメータを選択するとき。
(3)外部インターフェースとの速度的なボトルネックの解消などのため。
Generally, the line memory is used for storing image data for one line. There are the following reasons for using a line memory.
(1) When the compression / decompression method is a two-dimensional compression method referring to the previous line.
(2) When the compression / decompression device scans an image of one line and selects an optimal compression method or internal parameters.
(3) To eliminate speed bottlenecks with external interfaces.

専用のラインメモリを持つ場合は、容量は有限となり、処理可能な画像主走査幅に上限ができる。ここでいう画像の主走査幅は、データ容量のことであり、2値データであれば画素数と一致するが、多値データであれば、同じ画素数でもデータ量が増加する。システムが扱う画像主走査幅を超えるラインメモリを持つ場合は問題とならないが、ASICのゲート数(コスト)の制限で、十分な容量のラインメモリをもてない場合があり、問題となる。一方、ラインメモリ容量より処理画像の主走査幅が小さいケースもある。圧縮伸長器が、ラインメモリ容量単位でしか圧縮/伸長処理しない構成の場合は、予め処理画像の主走査幅がラインメモリ容量と一致するように、ダミーデータを付加する必要がある。また、ラインメモリ以下の主走査幅のデータであっても、処理単位を指定して処理可能な構成であれば、ダミーデータを最小化するような処理単位を選択することができる。   In the case of having a dedicated line memory, the capacity becomes finite, and an upper limit can be set on the processable image main scanning width. The main scanning width of the image here refers to the data capacity, and if it is binary data, it matches the number of pixels, but if it is multi-value data, the amount of data increases even with the same number of pixels. There is no problem if the system has a line memory exceeding the image main scanning width handled by the system, but there is a case where a sufficient amount of line memory cannot be provided due to the limitation of the number of gates (cost) of the ASIC. On the other hand, there is a case where the main scanning width of the processed image is smaller than the line memory capacity. If the compression / decompression unit is configured to perform compression / decompression processing only in units of line memory capacity, it is necessary to add dummy data in advance so that the main scanning width of the processed image matches the line memory capacity. Further, even if the main scanning width data is equal to or smaller than the line memory, a processing unit that minimizes dummy data can be selected as long as the processing unit can be specified and processed.

主走査幅の制限に対応するためには、予めソフトウェアによって処理画像に冗長な画像を付加するか、あるいは処理画像を複数に分割する必要がある。つまり、ソフトウェアにより以下の処理が必要である。   In order to cope with the limitation on the main scanning width, it is necessary to add a redundant image to the processed image in advance by software or to divide the processed image into a plurality of images. That is, the following processing is required by software.

圧縮時の処理は、以下のとおりである。
(1)圧縮伸長器のランメモリ容量と処理画像データ量とを比較する。
(2)以下の要領でデータを加工する。
(A)「圧縮伸長器のランメモリ容量=処理画像データ量」なら、処理画像の加工は不要である。
(B)「圧縮伸長器のランメモリ容量>処理画像データ量」なら、処理画像にダミーデータを付加する。
(C)「圧縮伸長器のランメモリ容量<処理画像データ量」なら、処理画像を分割して圧縮伸長器に入力する。ただし、
(C-1)「処理画像データ量が圧縮伸長器のランメモリ容量の整数倍」ならダミーデータの付加は不要である。
(C-2)「処理画像データ量が圧縮伸長器のランメモリ容量の整数倍」でなければ、最終ラインにダミーデータを付加する。
(3)加工情報を処理画像と対応付けてメモリに格納する。
(4)加工された画像データを圧縮伸長器に入力する。
Processing at the time of compression is as follows.
(1) The run memory capacity of the compression / decompression unit is compared with the amount of processed image data.
(2) Process the data as follows.
(A) If “run memory capacity of compression / decompressor = processed image data amount”, processing of the processed image is unnecessary.
(B) If “run memory capacity of compression / decompressor> processed image data amount”, dummy data is added to the processed image.
(C) If “run memory capacity of compression / decompression device <processed image data amount”, the processed image is divided and input to the compression / decompression device. However,
(C-1) If the “processed image data amount is an integral multiple of the run memory capacity of the compression / decompression unit”, it is not necessary to add dummy data.
(C-2) If the “processed image data amount is not an integer multiple of the run memory capacity of the compression / decompression unit”, dummy data is added to the last line.
(3) The processing information is stored in the memory in association with the processed image.
(4) The processed image data is input to the compression / decompression unit.

伸長時の処理は、以下のとおりである。
(1)伸長された画像データを圧縮伸長器の出力として得る
(2)処理画像と対応付けられた加工情報をメモリから取得する。
(3)加工情報に基づき画像データを復元する。
Processing at the time of decompression is as follows.
(1) Obtaining decompressed image data as an output of a compression / decompression machine (2) Obtain processing information associated with a processed image from a memory.
(3) The image data is restored based on the processing information.

画像DMACと圧縮伸長器の間にインターフェース回路が無い場合の、画像DMACと圧縮伸長器の動作について説明する。簡単のため符号DMACの動作説明は省略する。圧縮時には、画像DMACは、CPUの起動命令を受け付けて、RAMの所定領域の画像データを読み出し、圧縮伸長器に転送する。RAMに格納されたデータは2次元の画像データであり、そのライン長は、画像DMAC内のIWIDTHレジスタに予め格納されている。画像DMACは、IWIDTHの値に従って、ライン長毎に圧縮伸長器に対してEOL(End Of Line)信号を送出してラインの終端を示しながら、複数ラインの転送を行う。圧縮伸長器(又は圧縮器)は、画像DMACからの1ラインのデータを受け取ると、一旦そのデータをラインメモリに格納した後、圧縮処理を行う。さらに、圧縮後の符号データを、順次、符号DMACに転送する。   The operation of the image DMAC and the compression / decompression unit when there is no interface circuit between the image DMAC and the compression / decompression unit will be described. For simplicity, description of the operation of the code DMAC is omitted. At the time of compression, the image DMAC accepts a CPU activation command, reads image data in a predetermined area of the RAM, and transfers it to the compression / decompression unit. The data stored in the RAM is two-dimensional image data, and the line length is stored in advance in the IWIDTH register in the image DMAC. The image DMAC transmits a plurality of lines while indicating the end of the line by sending an EOL (End Of Line) signal to the compression / decompression unit for each line length in accordance with the value of IWIDTH. When the compression / decompression unit (or the compression unit) receives one line of data from the image DMAC, the compression / decompression unit (or the compression unit) temporarily stores the data in the line memory and then performs compression processing. Further, the compressed code data is sequentially transferred to the code DMAC.

伸長時には、画像DMACは、CPUの起動命令を受け付けて、圧縮伸長器にデータを要求する。画像DMACからデータを要求された圧縮伸長器は、符号DMACから符号データを受け取り、伸長しながらラインメモリに格納する。さらに、ラインメモリがFullになると、画像DMACに対して画像データを転送する。画像DMACは、転送されてくるデータをRAMの所定領域に格納する。これは、(1)処理画像のライン長(IWIDTH設定値)が、圧縮伸長器のラインメモリ容量を超えない、(2)圧縮伸長器は、ラインメモリの容量に満たなくても画像DMACからのEOLで処理画像のライン長を検知する、という条件のもとに成立する動作である。   At the time of decompression, the image DMAC receives a CPU activation command and requests data from the compression / decompression unit. The compression / decompression unit that has been requested for data from the image DMAC receives the code data from the code DMAC, and stores the code data in the line memory while expanding the data. Further, when the line memory becomes full, the image data is transferred to the image DMAC. The image DMAC stores the transferred data in a predetermined area of the RAM. This is because (1) the line length (IWIDTH set value) of the processed image does not exceed the line memory capacity of the compression / decompression machine, and (2) the compression / decompression machine does not receive the line memory capacity from the image DMAC. This operation is established under the condition that the line length of the processed image is detected by EOL.

データ分割やダミーデータ付加の処理のために、ラインメモリの容量(=圧縮伸長器の主走査方向の処理単位の最大設定値)と処理画像の主走査幅(画素数ではなくデータ容量をさす。以後同様)の情報に基づき、ハードウェアで自動的にデータの加工及び復元を行うインターフェース装置がある。また、圧縮伸長器の処理単位であるライン長の設定値をソフトウェアにより任意に設定することを可能としたインターフェース装置もある。   For data division and dummy data addition processing, the capacity of the line memory (= the maximum set value of the processing unit in the main scanning direction of the compression / decompression unit) and the main scanning width of the processed image (not the number of pixels but the data capacity) are indicated. There is an interface device that automatically processes and restores data based on hardware based on the same information). There is also an interface device that can arbitrarily set a set value of a line length, which is a processing unit of the compression / decompression unit, by software.

画像DMACと圧縮伸長器との間のインターフェース回路の動作について説明する。処理画像の主走査幅とラインメモリ容量との関係で、インターフェース回路の動作が異なる。その場合分けを、図8に示す。処理画像の主走査幅は、IWIDTHとして画像DMACから信号線で通知される。ラインメモリ容量は、XWIDTHとしてインターフェース回路内部のレジスタに持ち、信号線で圧縮伸長器へ通知する。
(1)「圧縮伸長器のラインメモリ容量>処理画像データ量」なら、処理画像にダミーデータを付加する。
(2)「圧縮伸長器のラインメモリ容量=処理画像データ量」なら、処理画像の加工は不要である。
(3)「圧縮伸長器のラインメモリ容量<処理画像データ量」なら、処理画像の主走査を分割する。「処理画像データ量が圧縮伸長器のラインメモリ容量の整数倍」なら、ダミーデータの付加は不要である。「処理画像データ量が圧縮伸長器のラインメモリ容量の整数倍」でなければ、最終ラインにダミーデータを付加する。
The operation of the interface circuit between the image DMAC and the compression / decompression unit will be described. The operation of the interface circuit differs depending on the relationship between the main scanning width of the processed image and the line memory capacity. The classification is shown in FIG. The main scanning width of the processed image is notified from the image DMAC as a signal line as IWIDTH. The line memory capacity is stored in the register in the interface circuit as XWIDTH, and is notified to the compression / decompression unit via a signal line.
(1) If “compressor / decompressor line memory capacity> processed image data amount”, dummy data is added to the processed image.
(2) If “line memory capacity of compression / decompression device = processed image data amount”, processing of the processed image is unnecessary.
(3) If “compressor / decompressor line memory capacity <processed image data amount”, the main scan of the processed image is divided. If the “processed image data amount is an integral multiple of the line memory capacity of the compression / decompression unit”, it is not necessary to add dummy data. If the “processed image data amount is not an integral multiple of the line memory capacity of the compression / decompression unit”, dummy data is added to the last line.

具体的な分割方法は次のとおりである。
(A)「圧縮伸長器のラインメモリ容量<処理画像データ量≦圧縮伸長器のラインメモリ容量×2」なら、処理画像の主走査を2分割する。ちょうど2分割できない場合は、ちょうど2分割できるように最終ラインにダミーデータを付加する。
(B)「圧縮伸長器のラインメモリ容量×2<処理画像データ量≦圧縮伸長器のラインメモリ容量×3」なら、処理画像の主走査を3分割する。ちょうど3分割できない場合は、ちょうど3分割できるように最終ラインにダミーデータを付加する。
(C)「圧縮伸長器のラインメモリ容量×(k−1)<処理画像データ量≦圧縮伸長器のラインメモリ容量×k」なら、処理画像の主走査をk分割する。ちょうどk分割できない場合は、ちょうどk分割できるように最終ラインにダミーデータを付加する。
A specific division method is as follows.
(A) If “compressor / decompressor line memory capacity <processed image data amount ≦ compressor / decompressor line memory capacity × 2”, the main scan of the processed image is divided into two. If it cannot be divided into two, dummy data is added to the last line so that it can be divided into two.
(B) If “compression decompressor line memory capacity × 2 <processed image data amount ≦ compress decompressor line memory capacity × 3”, the main scan of the processed image is divided into three. If it cannot be divided into three, dummy data is added to the last line so that it can be divided into three.
(C) If “compressor / decompressor line memory capacity × (k−1) <processed image data amount ≦ compressor / decompressor line memory capacity × k”, the main scan of the processed image is divided into k. If k division is not possible, dummy data is added to the last line so that k division is possible.

以下に、圧縮伸張装置の従来例を挙げる。特許文献1に開示された「画像形成装置」は、データ変換形式によらず、固定容量の記憶領域を用いて、1次記憶部に記憶された画像データの形式を変換し、その変換後の画像データを効率的に2次記憶部に転送できる装置である。メモリ制御部が、画像メモリ(1次記憶部)上に、圧縮画像記憶領域(変換画像記憶領域)を確保する。入出力画像DMACによって、画像メモリ内の通常画像記憶領域に書き込んだ画像データを、画像転送DMACによって、予め設定された所定サイズ(1バイト)毎に分割して順次読み出して、圧縮伸長器へ転送する。そこで圧縮された(他のデータ形式に変換された)分割データである符号データ(変換画像データ)を、符号転送DMACによって圧縮画像記憶領域に書き込む。その符号データを、HDDコントローラによって、HDD(2次記憶部)へ転送する。   The following is a conventional example of a compression / decompression device. The “image forming apparatus” disclosed in Patent Document 1 uses a fixed-capacity storage area to convert the format of image data stored in the primary storage unit, regardless of the data conversion format. This is an apparatus that can efficiently transfer image data to the secondary storage unit. The memory control unit secures a compressed image storage area (converted image storage area) on the image memory (primary storage unit). The image data written in the normal image storage area in the image memory by the input / output image DMAC is divided into predetermined size (1 byte) by the image transfer DMAC and read sequentially and transferred to the compression / decompressor. To do. Therefore, code data (converted image data) that is compressed (converted into another data format) is written in the compressed image storage area by the code transfer DMAC. The code data is transferred to the HDD (secondary storage unit) by the HDD controller.

特許文献2に開示された「画像処理装置」は、大きな容量のバッファメモリを用いることなく、画像データの圧縮処理/伸張処理を可能とする装置である。分割処理部では、画像読取部から入力される画像データを、圧縮用バッファメモリの一方に、所定サイズの画像データとして格納する。次の画像データを、他方の圧縮用バッファメモリに格納する。同時に、一方の圧縮用バッファメモリに格納している画像データを、圧縮処理部へ出力する。圧縮処理部は、所定サイズのブロック毎に分割されながら入力される画像データから、ブロックごとの符号データを生成して、一時記憶手段に出力する。これにより、1ページ分の画像データを格納するバッファメモリを用いることなく、画像データに基づいた符号データを生成することができる。
特開2003-018336号公報 特開2003-051952号公報
The “image processing device” disclosed in Patent Document 2 is a device that enables compression / decompression processing of image data without using a large-capacity buffer memory. The division processing unit stores the image data input from the image reading unit as image data of a predetermined size in one of the compression buffer memories. The next image data is stored in the other compression buffer memory. At the same time, the image data stored in one compression buffer memory is output to the compression processing unit. The compression processing unit generates code data for each block from the image data input while being divided for each block of a predetermined size, and outputs the code data to the temporary storage unit. Thereby, the code data based on the image data can be generated without using a buffer memory for storing the image data for one page.
JP 2003-018336 A Japanese Patent Laid-Open No. 2003-051952

しかし、従来の圧縮伸長装置では、次のような問題がある。ラインメモリを利用する圧縮器に、ラインメモリ容量より大きなライン長のデータを処理させるためには、処理データを複数回に分けて圧縮器に入力する必要がある。圧縮された符号データが、伸長器により伸長されて出力された場合は、出力された複数のラインデータを連結して1ラインとしてDMAコントローラへ転送する必要がある。これらの処理をソフトウェアで行う方法では、設定の自由度が高まる反面、ソフトウェアによる演算が必要となるため、制御が複雑になり、処理速度が低下する。このソフトウェア処理をハードウェア化する方法も提案されているが、ハードウェア構成が複雑となり、実用的ではない。処理画像に単純にダミーデータを付加する方法では、ダミーデータ転送によるオーバーヘッドが無視できないという問題がある。   However, the conventional compression / decompression apparatus has the following problems. In order for a compressor using a line memory to process data with a line length larger than the line memory capacity, it is necessary to divide the processing data into a plurality of times. When the compressed code data is decompressed and output by the decompressor, it is necessary to connect the plurality of output line data and transfer them to the DMA controller as one line. In the method in which these processes are performed by software, the degree of freedom of setting is increased, but calculation by software is required, so that the control becomes complicated and the processing speed is reduced. A method of implementing this software processing as hardware has also been proposed, but the hardware configuration becomes complicated and is not practical. The method of simply adding dummy data to the processed image has a problem that overhead due to dummy data transfer cannot be ignored.

本発明の目的は、上記従来の問題を解決して、DMAコントローラと圧縮伸長モジュールとの間のインターフェース装置において、簡単な構成で効率的に画像データを転送できるようにすることである。   SUMMARY OF THE INVENTION An object of the present invention is to solve the above-described conventional problems, and to efficiently transfer image data with a simple configuration in an interface device between a DMA controller and a compression / decompression module.

上記の課題を解決するために、本発明では、圧縮伸長器の処理単位であるライン長の設定値を、インターフェース装置のハードウェアで演算して決定する構成とした。すなわち、画像メモリの所定単位長の画像データを、DMAコントローラを介して受信し、ラインメモリを利用して設定処理単位で圧縮処理をする圧縮器に転送する圧縮伸長器用インターフェース装置に、所定単位長の画像データをラインメモリの容量以下に分割するように、所定単位長とラインメモリの容量とに基づいて圧縮器の設定処理単位のデータ長を算出する手段と、所定単位長の画像データを圧縮器の設定処理単位のデータ長に分割して圧縮器へ転送する手段とを設けた。   In order to solve the above-described problems, the present invention has a configuration in which the setting value of the line length, which is the processing unit of the compression / decompression unit, is calculated and determined by the hardware of the interface device. That is, the image data of a predetermined unit length in the image memory is received via the DMA controller, and transferred to the compressor that performs compression processing in the setting processing unit using the line memory. Means for calculating the data length of the setting unit of the compressor based on the predetermined unit length and the capacity of the line memory, and compressing the image data of the predetermined unit length so as to divide the image data into the capacity of the line memory or less And a means for transferring the data to the compressor by dividing the data length into unit setting processing units.

また、ラインメモリを利用して設定処理単位で伸長処理をする伸長器からの出力データを受信して、DMAコントローラを介して所定単位長の画像データを画像メモリに転送する圧縮伸長器用インターフェース装置に、伸長器の設定処理単位の画像データを1つまたは複数連結して所定単位長の画像データとするために、伸長器の設定処理単位のデータ長がラインメモリの容量に近くダミーデータも少なくなるように、所定単位長とラインメモリの容量とに基づいて設定処理単位を算出する手段と、伸長器から出力された設定処理単位の画像データを1つまたは複数連結して所定単位長の画像データとしてDMAコントローラを介して画像メモリへ転送する手段とを設けた。   In addition, an interface device for a compression / decompression device that receives output data from a decompressor that performs decompression processing in units of setting processing using a line memory and transfers image data of a predetermined unit length to the image memory via a DMA controller. Since one or more pieces of image data in the setting unit of the decompressor are connected to form image data of a predetermined unit length, the data length of the setting unit of the decompressor is close to the capacity of the line memory, and dummy data is also reduced. As described above, the unit for calculating the setting processing unit based on the predetermined unit length and the capacity of the line memory, and one or a plurality of setting processing unit image data output from the decompressor are connected to form the image data of the predetermined unit length. And means for transferring to the image memory via the DMA controller.

また、画像メモリの所定単位長の画像データを、DMAコントローラを介して送受信するとともに、ラインメモリを利用して設定処理単位で圧縮伸長処理をする圧縮伸長器との間でデータ転送する圧縮伸長器用インターフェース装置に、所定単位長の画像データをラインメモリの容量以下に分割するように、所定単位長とラインメモリの容量とに基づいて圧縮伸長器の設定処理単位のデータ長を算出する手段と、所定単位長の画像データを圧縮伸長器の設定処理単位のデータ長に分割して圧縮伸長器へ転送する手段と、圧縮伸長器から出力された設定処理単位の画像データを1つまたは複数連結して所定単位長の画像データとしてDMAコントローラを介して画像メモリへ転送する手段とを設けた。   Also, for image compression / decompression device that transmits / receives image data of specified unit length in image memory to / from compression / decompression device that performs compression / decompression processing by setting processing unit using line memory Means for calculating the data length of the setting processing unit of the compression / decompressor based on the predetermined unit length and the capacity of the line memory so that the interface device divides the image data of the predetermined unit length to be equal to or less than the capacity of the line memory; A unit that divides image data of a predetermined unit length into data lengths of setting processing units of the compression / decompression unit and transfers them to the compression / decompression unit, and one or a plurality of setting processing unit image data output from the compression / decompression unit are connected. And means for transferring the image data of a predetermined unit length to the image memory via the DMA controller.

本発明では、上記のように構成したことにより、DMAコントローラと圧縮器に変更を加えることなく、ラインメモリ容量より大きなライン長のデータを圧縮器に入力できる。さらに、圧縮器の処理単位であるライン長の設定値を、ソフトウェアで演算して決定する必要が無いため、制御が簡単になり、処理が高速化できる。   In the present invention, the configuration as described above allows data having a line length larger than the line memory capacity to be input to the compressor without changing the DMA controller and the compressor. Furthermore, since it is not necessary to calculate and determine the set value of the line length, which is the processing unit of the compressor, by software, the control becomes simple and the processing can be speeded up.

また、DMAコントローラと伸長器に変更を加えることなく、ラインメモリ容量より大きなライン長のデータを伸長出力として得ることができる。さらに、伸長器の処理単位であるライン長の設定値を、ソフトウェアで演算して決定する必要が無いため、制御が簡単になり、処理が高速化される。   In addition, data having a line length larger than the line memory capacity can be obtained as the decompressed output without changing the DMA controller and the decompressor. Furthermore, since it is not necessary to calculate and determine the setting value of the line length, which is the processing unit of the decompressor, by software, the control is simplified and the processing is speeded up.

また、圧縮伸長器とDMAコントローラとの間に変更を加えることなく、ラインメモリ容量より大きなライン長のデータを、圧縮器伸長器に入力できるとともに伸長出力として得ることができる。さらに、圧縮伸長器の処理単位であるライン長の設定値を、ソフトウェアで演算して決定する必要が無いため、制御が簡単になり、処理が高速化される。   In addition, data having a line length larger than the line memory capacity can be input to the compressor expander and obtained as a decompressed output without any change between the compression / decompressor and the DMA controller. Further, since it is not necessary to calculate and determine the set value of the line length, which is the processing unit of the compression / decompression unit, by software, the control is simplified and the processing is speeded up.

以下、本発明を実施するための最良の形態について、図1〜図7を参照しながら詳細に説明する。   Hereinafter, the best mode for carrying out the present invention will be described in detail with reference to FIGS.

本発明の実施例1は、DMAコントローラから転送されるデータのライン長情報と圧縮器のラインメモリ容量とに基づいて、圧縮器の処理単位であるライン長の設定値を算出し、DMAコントローラから転送されるデータ量が圧縮器のラインメモリ容量より大きい場合は、1ラインのデータをラインメモリ容量以下になるように分割し、複数回に分けて圧縮器へ転送する圧縮モジュールのインターフェース装置である。   The first embodiment of the present invention calculates the set value of the line length, which is the processing unit of the compressor, based on the line length information of the data transferred from the DMA controller and the line memory capacity of the compressor, When the amount of data to be transferred is larger than the line memory capacity of the compressor, this is an interface device for a compression module that divides one line of data so that it is less than the line memory capacity and transfers it to the compressor in multiple times. .

図1は、本発明の実施例1におけるインターフェース回路を内蔵するASICを利用したシステム構成図である。このシステムは、プリンタまたはMFPに適用した例である。図1において、プリンタコントローラ100は、プリンタまたはMPFに搭載されるプリンタ制御基板である。CPU101は、プリンタコントローラのメインCPUである。ASIC102は、圧縮伸長器を内蔵するLSIである。詳細を図2に示す。ROM103は、プログラムを内蔵するROMである。RAM104は、メインメモリである。HDD105は、ハードディスクである。拡張スロット106は、RAM/ROMの増設などのために、オプション基板を装着できるスロットである。操作部インターフェース107は、オペレーションパネルを接続するインターフェースである。エンジンインターフェース108は、プロッタやスキャナを接続するインターフェースである。ネットワークインターフェース109は、LANを接続するインターフェースである。エンジン110は、プロッタやスキャナの本体である。ホストPC111は、プロッタやスキャナを利用するコンピュータである。   FIG. 1 is a system configuration diagram using an ASIC incorporating an interface circuit according to the first embodiment of the present invention. This system is an example applied to a printer or MFP. In FIG. 1, a printer controller 100 is a printer control board mounted on a printer or MPF. The CPU 101 is the main CPU of the printer controller. The ASIC 102 is an LSI incorporating a compression / decompression unit. Details are shown in FIG. The ROM 103 is a ROM incorporating a program. The RAM 104 is a main memory. The HDD 105 is a hard disk. The expansion slot 106 is a slot into which an option board can be mounted for expansion of RAM / ROM. The operation unit interface 107 is an interface for connecting an operation panel. The engine interface 108 is an interface for connecting a plotter or a scanner. The network interface 109 is an interface for connecting a LAN. The engine 110 is a main body of a plotter or a scanner. The host PC 111 is a computer that uses a plotter or a scanner.

図2は、本発明の実施例1におけるインターフェース回路を内蔵するASIC102の構成図である。このASIC102は、RAM104に格納された画像データを圧縮伸長器で圧縮(符号化)してHDD105に蓄積し、HDD105に蓄積された符号を圧縮伸長器で伸長してRAM104に展開する構成を示している。画像や符号の蓄積デバイスは、RAM104やHDD105以外のものでもよい。図2において、CPU101は、プリンタコントローラのメインCPUである。ASIC102は、圧縮伸長器を内蔵するASICである。HDD103は、画像や符号を蓄積可能はハードディスクである。RAM104は、画像や符号を蓄積可能なメモリである。システム制御部113は、CPU101からの指令により、ASIC102内部の各モジュールを制御するとともに、RAM104やHDD105へのアクセスを制御する回路である。   FIG. 2 is a configuration diagram of the ASIC 102 incorporating the interface circuit according to the first embodiment of the present invention. This ASIC 102 shows a configuration in which image data stored in the RAM 104 is compressed (encoded) by the compression / decompression device and stored in the HDD 105, and the code stored in the HDD 105 is expanded by the compression / decompression device and expanded in the RAM 104. Yes. The image or code storage device may be other than the RAM 104 and the HDD 105. In FIG. 2, a CPU 101 is a main CPU of the printer controller. The ASIC 102 is an ASIC with a built-in compression / decompression unit. The HDD 103 is a hard disk capable of storing images and codes. The RAM 104 is a memory that can store images and codes. The system control unit 113 is a circuit that controls each module in the ASIC 102 and controls access to the RAM 104 and the HDD 105 in accordance with a command from the CPU 101.

HDDインターフェース114は、HDD105との間のインターフェース制御を行う回路である。符号DMAC115は、符号転送用のDMAコントローラである。圧縮時に、圧縮伸長器116から出力された符号をHDD105に転送するとともに、伸長時に、HDD105に蓄積された符号を圧縮伸長器116へ入力する回路である。圧縮伸長器116は、画像を圧縮及び伸長するハードウェアモジュールである。圧縮器と伸長器とに分離されていても良い。画像DMAC117は、画像転送用のDMAコントローラである。画像を2次元として扱い、主走査単位で転送を行う。圧縮時には、RAM104上の画像データを圧縮伸長器116へ入力し、伸長時には、圧縮伸長器116から出力された画像データをRAM104に転送する。RAMインターフェース118は、RAM104とのインターフェース制御を行う回路である。インターフェース回路112は、画像DMAC117と圧縮伸長器116との間でデータを転送するためのハードウェアモジュールである。ラインメモリ119は、1ライン分のデータを保持するバッファメモリである。   The HDD interface 114 is a circuit that performs interface control with the HDD 105. The code DMAC 115 is a DMA controller for code transfer. This circuit transfers the code output from the compression / decompression unit 116 to the HDD 105 during compression, and inputs the code stored in the HDD 105 to the compression / decompression unit 116 during expansion. The compression / decompression unit 116 is a hardware module that compresses and decompresses an image. It may be separated into a compressor and an expander. The image DMAC 117 is a DMA controller for image transfer. The image is treated as a two-dimensional image and transferred in main scanning units. At the time of compression, the image data on the RAM 104 is input to the compression / expansion unit 116, and at the time of expansion, the image data output from the compression / expansion unit 116 is transferred to the RAM 104. The RAM interface 118 is a circuit that performs interface control with the RAM 104. The interface circuit 112 is a hardware module for transferring data between the image DMAC 117 and the compression / decompression unit 116. The line memory 119 is a buffer memory that holds data for one line.

図3は、圧縮伸長器と周辺の構成を示す図である。インターフェース回路112は、圧縮伸長器116と画像DMAC117との間に位置している。この回路ブロックでは、REQ信号とACK信号のやり取りで、64ビットのデータをやりとりする。図3において、圧縮伸長器116は、圧縮伸長アルゴリズム実行手段を内蔵したハードウェアモジュールである。インターフェース回路112は、画像DMACと圧縮伸長器との間でデータを転送するためのハードウェアモジュールである。画像DMAC107は、メモリから圧縮伸長器(圧縮部)へのDMA転送と、圧縮伸長器(伸長部)からメモリへのDMA転送を行うハードウェアモジュールである。インターフェース回路112は、XWIDTHレジスタを持ち、ソフトウェアによって設定可能である。インターフェース回路112は、演算回路を有しており、XWIDTH_MAX(XWIDTHの最大設定値、すなわちラインメモリ容量)とIWIDTH(処理画像の主走査幅)とに基づいて、XWIDTHを算出することができる。   FIG. 3 is a diagram illustrating a configuration of the compression / decompression unit and the surroundings. The interface circuit 112 is located between the compression / decompression unit 116 and the image DMAC 117. In this circuit block, 64-bit data is exchanged by exchanging the REQ signal and the ACK signal. In FIG. 3, a compression / decompression unit 116 is a hardware module incorporating a compression / decompression algorithm executing means. The interface circuit 112 is a hardware module for transferring data between the image DMAC and the compression / decompression unit. The image DMAC 107 is a hardware module that performs DMA transfer from the memory to the compression / decompression unit (compression unit) and DMA transfer from the compression / decompression unit (decompression unit) to the memory. The interface circuit 112 has an XWIDTH register and can be set by software. The interface circuit 112 includes an arithmetic circuit, and can calculate XWIDTH based on XWIDTH_MAX (the maximum setting value of XWIDTH, that is, the line memory capacity) and IWIDTH (main scanning width of the processed image).

図4は、実施例1におけるインターフェース回路で、処理画像の主走査幅とラインメモリ容量との関係で異なる動作の場合分けを示す図である。図5は、圧縮伸長器の主走査幅を求める回路の機能ブロック図である。図6は、圧縮時のデータの流れを示す図である。   FIG. 4 is a diagram illustrating case classification of operations different in the relationship between the main scanning width of the processed image and the line memory capacity in the interface circuit according to the first embodiment. FIG. 5 is a functional block diagram of a circuit for obtaining the main scanning width of the compression / decompression unit. FIG. 6 is a diagram illustrating the flow of data during compression.

上記のように構成された本発明の実施例1におけるインターフェース回路の動作を説明する。処理画像の主走査幅とラインメモリ容量との関係で、インターフェース回路の動作が異なる。その場合分けを、図4に示す。処理画像の主走査幅は、IWIDTHとして画像DMACから信号線で通知される。ラインメモリ容量(XWIDTH_MAX)は、圧縮伸長器からインターフェース装置に信号線で通知される。ソフトウェアによって、インターフェース装置のレジスタに設定される方法でもよい。インターフェース回路は、XWIDTH_MAXとIWIDTHとの情報に基づいて演算し、インターフェース回路内部のIWIDTHレジスタに値を設定する。XWIDTHは、信号線で圧縮伸長器へ通知される。   The operation of the interface circuit according to the first embodiment of the present invention configured as described above will be described. The operation of the interface circuit differs depending on the relationship between the main scanning width of the processed image and the line memory capacity. The classification is shown in FIG. The main scanning width of the processed image is notified from the image DMAC as a signal line as IWIDTH. The line memory capacity (XWIDTH_MAX) is notified from the compression / decompression unit to the interface device through a signal line. A method of setting the register of the interface device by software may be used. The interface circuit calculates based on information of XWIDTH_MAX and IWIDTH, and sets a value in the IWIDTH register inside the interface circuit. XWIDTH is notified to the compression / decompression unit via a signal line.

ダミーデータ付加を最小にするアルゴリズムでXWIDTHを演算する方法を説明する。ダミーデータは無駄なデータであるが、処理画像とともに符号化されてしまうので、最も圧縮率の良いデータとすべきである。一般的には、白画素に対応したデータ(ALL0またはALL1)が望ましい。
(1)「圧縮伸長器のラインメモリ容量≧処理画像データ量」なら、XWIDTHにIWIDTHを代入する。「圧縮伸長器のラインメモリ容量=処理画像データ量」なら、処理画像の加工は不要である。
A method for calculating XWIDTH with an algorithm that minimizes the addition of dummy data will be described. Although the dummy data is useless data, it is encoded together with the processed image, so it should be the data with the best compression rate. In general, data corresponding to white pixels (ALL0 or ALL1) is desirable.
(1) If “compressor / decompressor line memory capacity ≧ processed image data amount”, IWIDTH is substituted into XWIDTH. If “compressor / decompressor line memory capacity = processed image data amount”, processing of the processed image is unnecessary.

(2)「圧縮伸長器のラインメモリ容量<処理画像データ量」なら、処理画像の主走査を分割する。分割方法は次のとおりである。
(A)「圧縮伸長器のラインメモリ容量<処理画像データ量≦圧縮伸長器のラインメモリ容量×2」なら、処理画像の主走査を2分割する。処理画像をちょうど2分割できれば、その値をXWIDTHに選択する。2分割できなければ、ダミーデータを付加して2分割する。ダミーデータのサイズは、(処理画像データ量 mod2)で、0か1である。
(2) If “compressor / decompressor line memory capacity <processed image data amount”, the main scan of the processed image is divided. The division method is as follows.
(A) If “compressor / decompressor line memory capacity <processed image data amount ≦ compressor / decompressor line memory capacity × 2”, the main scan of the processed image is divided into two. If the processed image can be divided into two, select the value as XWIDTH. If it cannot be divided into two, dummy data is added and divided into two. The size of the dummy data is (processed image data amount mod2) and is 0 or 1.

(B)「圧縮伸長器のラインメモリ容量×2<処理画像データ量≦圧縮伸長器のラインメモリ容量×3」なら、処理画像の主走査を3分割する。処理画像をちょうど3分割できれば、その値をXWIDTHに選択する。3分割できなければ、ダミーデータを付加して3分割する。ダミーデータのサイズは、(−処理画像データ量 mod3)で、0か1か2である。 (B) If “compression decompressor line memory capacity × 2 <processed image data amount ≦ compress decompressor line memory capacity × 3”, the main scan of the processed image is divided into three. If the processed image can be exactly divided into three, the value is selected as XWIDTH. If it cannot be divided into three, dummy data is added and divided into three. The size of the dummy data is (−processed image data amount mod3) and is 0, 1 or 2.

(C)「圧縮伸長器のラインメモリ容量×(k−1)<処理画像データ量≦圧縮伸長器のラインメモリ容量×k」なら、処理画像の主走査をk分割する。処理画像をちょうどk分割できれば、その値をXWIDTHに選択する。k分割できなければ、ダミーデータを付加してk分割する。ダミーデータのサイズは、(−処理画像データ量 modk)で、0〜(k−1)のいずれかである。 (C) If “compressor / decompressor line memory capacity × (k−1) <processed image data amount ≦ compressor / decompressor line memory capacity × k”, the main scan of the processed image is divided into k. If the processed image can be divided into k, the value is selected as XWIDTH. If k division is not possible, dummy data is added and k division is performed. The size of the dummy data is (−processed image data amount modk) and is any one of 0 to (k−1).

このようにして、処理画像を整数分割できるようなXWIDTHがなければ、分割数とダミーデータ量が最小になるようなXWIDTHを選択する方法により、インターフェース回路の演算回路で自動的にXWIDTHを算出する。XWIDTH算出のための演算回路を、図5を参照しながら説明する。図5(a)の回路では、処理画像データ量Mを、圧縮伸長器のラインメモリ容量NNで割って、その商(M/NN)を切り上げて、分割数kを求める。処理画像データ量Mの負数を分割数kで割った余り(−M modk)により、ダミーデータ量を求める。処理画像データ量Mにダミーデータ量を加算して、分割数kで割ることにより、圧縮伸長器の主走査幅Nを求める。図5(b)は、同機能の他の回路例である。分割数kが1の場合は、処理画像データ量が圧縮伸長器の主走査幅となる。分割数kが2以上の場合のダミーデータ量は、0〜(k−1)となる。図5に示した括弧内の数値は、計算例である。   In this way, if there is no XWIDTH that can divide the processed image into integers, XWIDTH is automatically calculated by the arithmetic circuit of the interface circuit by the method of selecting XWIDTH that minimizes the number of divisions and the amount of dummy data. . An arithmetic circuit for calculating XWIDTH will be described with reference to FIG. In the circuit of FIG. 5A, the processed image data amount M is divided by the line memory capacity NN of the compression / decompression unit, and the quotient (M / NN) is rounded up to obtain the division number k. The dummy data amount is obtained by the remainder (−M modk) obtained by dividing the negative number of the processed image data amount M by the division number k. The main scanning width N of the compression / decompression unit is obtained by adding the dummy data amount to the processed image data amount M and dividing by the division number k. FIG. 5B is another circuit example of the same function. When the division number k is 1, the amount of processed image data is the main scanning width of the compression / decompression unit. When the division number k is 2 or more, the dummy data amount is 0 to (k−1). The numerical values in parentheses shown in FIG. 5 are calculation examples.

インターフェース回路の動作フローを説明する。圧縮時には、圧縮伸長器のラインメモリ容量と処理画像の主走査幅とを比較する。図4の場合分けに従い、データを加工しながら画像データを圧縮伸長器に入力する。圧縮時のデータの流れを、図6に示す。画像DMACに処理画像の主走査幅をIWIDTH[13:3]として保持する。インターフェース回路には信号線で伝達する。インターフェース回路に圧縮伸長器のラインメモリ容量をXWIDTH[10:3]として保持する。図6の例では、IWIDHTは10、XWIDTHは3である。   The operation flow of the interface circuit will be described. At the time of compression, the line memory capacity of the compression / decompression device is compared with the main scanning width of the processed image. According to the case classification of FIG. 4, the image data is input to the compression / decompression unit while processing the data. The data flow during compression is shown in FIG. The main scan width of the processed image is held as IWIDTH [13: 3] in the image DMAC. The signal is transmitted to the interface circuit through a signal line. The line memory capacity of the compression / decompression unit is held as XWIDTH [10: 3] in the interface circuit. In the example of FIG. 6, IWIDHT is 10 and XWIDTH is 3.

したがって、インターフェース回路は、次の動作を行う。
(1)画像DMACから入力する画像データの1ラインを、4回に分けて圧縮伸長器へ入力する。
(2)1ラインの4回目の転送において、不足しているデータはダミーデータを付加して圧縮伸長器へ入力する。
(3)圧縮伸長器が1ラインの最終データを示すEOL(End Of Line)信号を必要とする場合は、ラインメモリ容量毎にEOLを発生する。
(4)1ライン終了後は、2ライン目以降も同様の操作で画像データの転送を行う。
Therefore, the interface circuit performs the following operation.
(1) One line of image data inputted from the image DMAC is divided into four times and inputted to the compression / decompression unit.
(2) In the fourth transfer of one line, the missing data is added with dummy data and input to the compression / decompression unit.
(3) When the compression / decompression unit requires an EOL (End Of Line) signal indicating the final data of one line, EOL is generated for each line memory capacity.
(4) After the completion of one line, the image data is transferred by the same operation for the second and subsequent lines.

図3と図6を参照しながら、圧縮時のインターフェース回路の内部動作を説明する。ハンドシェークにより、64ビットのデータのやり取りをする。データのやり取りはバースト転送で行われ、1ラインの間バーストが途切れないインターフェースであり、インターフェース回路の内部バッファは1段であり、データ入力の次クロックでデータ出力する。インターフェース回路は、転送の準備ができると、画像DMACに対してREQ_Dを出力してデータを要求する。REQ_Dを受けた画像DMACは、ACK_Dと同時にDATA_Dを出力する。ACK_Dを検出したインターフェース回路は、次クロックから1クロック毎にデータをラッチし続ける。この動作は、基本的には、周知のバーストモードDMAと同じである。DMA転送に先立ってダミーデータを用意する部分のみが異なる。   The internal operation of the interface circuit during compression will be described with reference to FIGS. 64-bit data is exchanged by handshaking. Data is exchanged by burst transfer, which is an interface in which the burst is not interrupted for one line. The interface circuit has one internal buffer, and data is output at the next clock after data input. When the interface circuit is ready for transfer, it outputs REQ_D to the image DMAC and requests data. The image DMAC that has received REQ_D outputs DATA_D simultaneously with ACK_D. The interface circuit that has detected ACK_D continues to latch data every clock from the next clock. This operation is basically the same as the known burst mode DMA. The only difference is that the dummy data is prepared prior to the DMA transfer.

DMAの転送制御のために、以下の2つのカウンタを使う。
(1)Xカウンタ:XWIDTHをカウントするカウンタである。転送開始時にXWIDTHの設定値がロードされ、画像DMACからデータが入力されるたびにカウントダウンする。カウンタ値が1のとき、再度XWIDTHがロードされる。
(2)Iカウンタ:IWIDTHをカウントするカウンタである。転送開始時にIWIDTHの設定値がロードされ、画像DMACからデータが入力されるたびにカウントダウンする。カウンタ値が1になるとカウントダウンを停止し、1を保持する。IWIDTHがXWIDTHの整数倍(同じ値の場合を含む)時には、2つのカウンタは同時に1になる。この場合、ダミーデータを付加する必要が無い。
The following two counters are used for DMA transfer control.
(1) X counter: a counter for counting XWIDTH. The setting value of XWIDTH is loaded at the start of transfer, and counts down each time data is input from the image DMAC. When the counter value is 1, XWIDTH is loaded again.
(2) I counter: A counter that counts IWIDTH. The setting value of IWIDTH is loaded at the start of transfer, and counts down each time data is input from the image DMAC. When the counter value becomes 1, the countdown is stopped and 1 is held. When IWIDTH is an integral multiple of XWIDTH (including the case of the same value), the two counters become 1 simultaneously. In this case, there is no need to add dummy data.

インターフェース回路は、2つのカウンタ値を参照しながら次の動作を行う。
(1)Xカウンタが1の時に画像DMACから入力されたデータを圧縮伸長器へ出力する際には、EOL_Uをアサートする。
(2)Iカウンタが1になると、直ちにREQ_Dをネゲートする。さらに、以降の圧縮伸長器へ内部生成したダミーデータを出力する。1以外の時は、画像DMACからの入力データを圧縮伸長器へ出力する。
(3)2つのカウンタがともに1のとき、処理画像の1ラインが終了したので、2つのカウンタには、それぞれ初期値をリロードし、次ラインの転送に備える。
The interface circuit performs the following operation while referring to the two counter values.
(1) When the data input from the image DMAC is output to the compression / decompression unit when the X counter is 1, EOL_U is asserted.
(2) When the I counter reaches 1, REQ_D is immediately negated. Further, dummy data generated internally is output to the subsequent compression / decompression unit. When the value is other than 1, input data from the image DMAC is output to the compression / decompression unit.
(3) When the two counters are both 1, one line of the processed image is completed, so the two counters are reloaded with initial values to prepare for the transfer of the next line.

上記のように、本発明の実施例1では、圧縮モジュールのインターフェース装置を、DMAコントローラから転送されるデータのライン長情報と圧縮器のラインメモリ容量とに基づいて、圧縮器の処理単位であるライン長の設定値を算出し、DMAコントローラから転送されるデータ量が圧縮器のラインメモリ容量より大きい場合は、1ラインのデータをラインメモリ容量以下になるように分割し、複数回に分けて圧縮器へ転送する構成としたので、DMAコントローラと圧縮器に変更を加えることなく、ラインメモリ容量より大きなライン長のデータを圧縮器に入力できる。   As described above, in the first embodiment of the present invention, the interface device of the compression module is a processing unit of the compressor based on the line length information of the data transferred from the DMA controller and the line memory capacity of the compressor. When the line length setting value is calculated and the amount of data transferred from the DMA controller is larger than the line memory capacity of the compressor, the data for one line is divided so that it is less than the line memory capacity and divided into multiple times. Since the data is transferred to the compressor, data having a line length larger than the line memory capacity can be input to the compressor without changing the DMA controller and the compressor.

本発明の実施例2は、DMACから転送されるデータのライン長情報と伸長器のラインメモリ容量とに基づいて、伸長器の処理単位であるライン長の設定値を算出し、処理データ量が伸長器のラインメモリ容量より大きい場合は、伸長器から出力された複数のラインデータを1ラインとして連結してDMAコントローラへ転送する伸張モジュールのインターフェース装置である。   The second embodiment of the present invention calculates the set value of the line length, which is the processing unit of the decompressor, based on the line length information of the data transferred from the DMAC and the line memory capacity of the decompressor, and the processing data amount is When it is larger than the line memory capacity of the decompressor, it is an interface device of the decompression module that connects a plurality of line data output from the decompressor as one line and transfers them to the DMA controller.

本発明の実施例2におけるインターフェース装置の構成は、実施例1と同様である。伸長器の処理単位であるライン長の設定値を算出する点が異なる。この算出回路などは、実施例1と同じであるので、説明は省略する。伸長時には、伸長された画像データを圧縮伸長器の出力として得る。図4の場合分けに従い、データを復元しながら画像データをメモリ/HDDへ転送する。   The configuration of the interface device according to the second embodiment of the present invention is the same as that of the first embodiment. The difference is that the setting value of the line length, which is the processing unit of the decompressor, is calculated. Since this calculation circuit and the like are the same as those in the first embodiment, description thereof will be omitted. At the time of decompression, the decompressed image data is obtained as the output of the compression / decompression unit. According to the case of FIG. 4, the image data is transferred to the memory / HDD while restoring the data.

伸長時のデータの流れを図7に示す。図6の条件で圧縮されたデータを伸長するので、インターフェース回路は次の動作を行う。
(1)圧縮伸長器から入力する画像データ4回分の転送を1ラインと見立てて画像DMACへ入力する。
(2)1ラインの4回目の転送において、付加されているダミーデータを削除して画像DMACへ入力する。
(3)画像DMACは処理画像の主走査幅を知っている(IWIDTHデータを保持)ので、EOL信号は不要である。
(4)1ライン終了後は、2ライン目以降も同様の操作で画像データの転送を行う。
FIG. 7 shows the data flow during decompression. Since the data compressed under the conditions of FIG. 6 is expanded, the interface circuit performs the following operation.
(1) Transfer four times of image data input from the compression / decompression device as one line and input to the image DMAC.
(2) In the fourth transfer of one line, the added dummy data is deleted and input to the image DMAC.
(3) Since the image DMAC knows the main scan width of the processed image (holds the IWIDTH data), the EOL signal is unnecessary.
(4) After the completion of one line, the image data is transferred by the same operation for the second and subsequent lines.

図3と図7を参照しながら、伸長時のインターフェース回路の内部動作を説明する。これは、基本的には、周知のバーストモードDMAと同じである。ハンドシェークにより64ビットのデータのやり取りをする。データのやり取りはバースト転送で行われ、1ラインの間バーストが途切れないインターフェースであり、インターフェース回路の内部バッファは1段であり、データ入力の次クロックでデータ出力する。インターフェース回路は、圧縮伸長器からREQ_Uを受け取ると、DATA_Uをラッチすると同時にACK_Uをアサートする。インターフェース回路は次クロックから1クロック毎にデータをラッチし続ける。   The internal operation of the interface circuit during expansion will be described with reference to FIGS. This is basically the same as the well-known burst mode DMA. 64-bit data is exchanged by handshaking. Data is exchanged by burst transfer, which is an interface in which the burst is not interrupted for one line. The interface circuit has one internal buffer, and data is output at the next clock after data input. When the interface circuit receives REQ_U from the compression / decompression unit, it latches DATA_U and asserts ACK_U at the same time. The interface circuit continues to latch data every clock from the next clock.

DMAの転送制御のために、以下の2つのカウンタを使う。
(1)Xカウンタ:XWIDTHをカウントするカウンタである。転送開始時にXWIDTHの設定値がロードされ、画像DMACからデータが入力されるたびにカウントダウンする。カウンタ値が1のとき、再度XWIDTHがロードされる。
(2)Iカウンタ:IWIDTHをカウントするカウンタである。転送開始時にIWIDTHの設定値がロードされ、画像DMACからデータが入力されるたびにカウントダウンする。カウンタ値が1になるとカウントダウンを停止し、Xカウンタが1になるまで1を保持する。IWIDTHがXWIDTHの整数倍(同じ値の場合を含む)時には、2つのカウンタは同時に1になる。この場合、伸長された画像にはダミーデータが付加されていないため、データの読み捨て動作は発生しない。
The following two counters are used for DMA transfer control.
(1) X counter: a counter for counting XWIDTH. The setting value of XWIDTH is loaded at the start of transfer, and counts down each time data is input from the image DMAC. When the counter value is 1, XWIDTH is loaded again.
(2) I counter: A counter that counts IWIDTH. The setting value of IWIDTH is loaded at the start of transfer, and counts down each time data is input from the image DMAC. When the counter value becomes 1, the countdown is stopped, and 1 is held until the X counter becomes 1. When IWIDTH is an integral multiple of XWIDTH (including the case of the same value), the two counters become 1 simultaneously. In this case, dummy data is not added to the decompressed image, and therefore no data discarding operation occurs.

インターフェース回路は、2つのカウンタ値を参照しながら次の動作を行う。
(1)Iカウンタが1になると、以降、圧縮伸長器から入力されたデータを読み捨てる。1以外の時は、圧縮伸長器からの入力データを画像DMACへ出力する。
(2)2つのカウンタがともに1のとき、処理画像の1ラインが終了したので、2つのカウンタには、それぞれ初期値をリロードし、次ラインの転送に備える。
The interface circuit performs the following operation while referring to the two counter values.
(1) When the I counter reaches 1, thereafter, the data input from the compression / decompression unit is read and discarded. When the value is other than 1, input data from the compression / decompression unit is output to the image DMAC.
(2) When both counters are 1, one line of the processed image is completed, so the two counters are reloaded with initial values to prepare for the transfer of the next line.

実施例2では、伸長時にEOL信号が無いが、EOLが必要なシステムでは、次のような処理となる。圧縮伸長器からEOLがXWIDTH毎に転送されてくるが、IWIDTHの満了時のみ画像DMACへEOLをアサートする。Iカウンタが1の時に圧縮伸長器から入力されたデータを画像DMACへ出力する際には、EOL信号をアサートする。   In the second embodiment, there is no EOL signal at the time of decompression. However, in a system that requires EOL, the following processing is performed. EOL is transferred from the compressor / decompressor every XWIDTH, but EOL is asserted to the image DMAC only when IWIDTH expires. When the data input from the compression / decompression unit is output to the image DMAC when the I counter is 1, the EOL signal is asserted.

上記のように、本発明の実施例2では、伸張モジュールのインターフェース装置を、DMAコントローラから転送されるデータのライン長情報と伸長器のラインメモリ容量とに基づいて、伸長器の処理単位であるライン長の設定値を算出し、処理データ量が伸長器のラインメモリ容量より大きい場合は、伸長器から出力された複数のラインデータを1ラインとして連結してDMAコントローラへ転送する構成としたので、DMAコントローラと圧縮器に変更を加えることなく、ラインメモリ容量より大きなライン長のデータを圧縮器に入力できる。   As described above, in the second embodiment of the present invention, the interface device of the decompression module is the processing unit of the decompressor based on the line length information of the data transferred from the DMA controller and the line memory capacity of the decompressor. When the setting value of the line length is calculated and the processing data amount is larger than the line memory capacity of the decompressor, the multiple line data output from the decompressor are connected as one line and transferred to the DMA controller. Data with a line length larger than the line memory capacity can be input to the compressor without changing the DMA controller and compressor.

本発明の実施例3は、DMAコントローラから転送されるデータのライン長情報と圧縮伸長器のラインメモリ容量とに基づいて、圧縮伸長器の処理単位であるライン長の設定値を算出し、圧縮時には、DMAコントローラから転送されるデータ量が圧縮器のラインメモリ容量より大きい場合は、1ラインのデータをラインメモリ容量以下になるように分割し、複数回に分けて圧縮器へ転送し、伸長時には、処理データ量が伸長器のラインメモリ容量より大きい場合は、伸長器から出力された複数のラインデータを1ラインとして連結してDMAコントローラへ転送する圧縮伸長モジュールのインターフェース装置である。   The third embodiment of the present invention calculates the set value of the line length, which is the processing unit of the compression / decompression unit, based on the line length information of the data transferred from the DMA controller and the line memory capacity of the compression / decompression unit, Sometimes, if the amount of data transferred from the DMA controller is larger than the line memory capacity of the compressor, the data for one line is divided so that it is less than the line memory capacity, transferred to the compressor in multiple times, and decompressed. Sometimes, when the processing data amount is larger than the line memory capacity of the decompressor, the interface device of the compression / decompression module connects the plurality of line data output from the decompressor as one line and transfers them to the DMA controller.

本発明の実施例3におけるインターフェース装置の構成は、実施例1、2と同様である。圧縮と伸長の両方向について、実施例1と実施例2の構成を適用したものである。それぞれの構成と動作は、実施例1、2と同じであるので、説明は省略する。   The configuration of the interface device in the third embodiment of the present invention is the same as in the first and second embodiments. The configurations of the first and second embodiments are applied in both the compression and decompression directions. Since the configuration and operation of each are the same as those in the first and second embodiments, the description thereof is omitted.

本発明の圧縮伸長モジュールのインターフェース装置は、複写機やプリンタやMFPにおける、ASICに内蔵された画像圧縮伸長モジュールと汎用DMACとのインターフェース装置として最適である。画像圧縮伸長装置以外の処理装置、例えば、画像補正装置や電子透かし付加装置などにも応用できる。   The interface device of the compression / decompression module according to the present invention is most suitable as an interface device between an image compression / decompression module built in an ASIC and a general-purpose DMAC in a copying machine, a printer, or an MFP. The present invention can also be applied to a processing device other than the image compression / decompression device, such as an image correction device or a digital watermark adding device.

本発明の実施例1におけるインターフェース回路を内蔵するASICを利用したシステム構成図である。1 is a system configuration diagram using an ASIC incorporating an interface circuit in Embodiment 1 of the present invention. 本発明の実施例1におけるインターフェース回路を内蔵するASICの構成図である。It is a block diagram of ASIC which incorporates the interface circuit in Example 1 of this invention. 本発明の実施例1におけるインターフェース回路と圧縮伸長器と画像DMACとの接続関係を示す図である。It is a figure which shows the connection relation of the interface circuit in Example 1 of this invention, a compression / expansion device, and image DMAC. 本発明の実施例1におけるインターフェース回路で、処理画像の主走査幅とラインメモリ容量との関係で異なる動作の場合分けを示す図である。FIG. 6 is a diagram illustrating a case of different operations in the interface circuit according to the first exemplary embodiment of the present invention depending on the relationship between the main scanning width of a processed image and the line memory capacity. 本発明の実施例1におけるインターフェース回路で、圧縮伸長器の主走査幅を求める回路の機能ブロック図である。It is a functional block diagram of a circuit for obtaining a main scanning width of a compression / decompression device in the interface circuit according to the first embodiment of the present invention. 本発明の実施例1におけるインターフェース回路で、圧縮時のデータの流れを示す図である。It is a figure which shows the flow of the data at the time of compression by the interface circuit in Example 1 of this invention. 本発明の実施例2におけるインターフェース回路で、伸長時のデータの流れを示す図である。It is a figure which shows the data flow at the time of expansion | extension by the interface circuit in Example 2 of this invention. 従来のインターフェース回路で、処理画像の主走査幅とラインメモリ容量との関係で異なる動作の場合分けを示す図である。It is a figure which shows the case division | segmentation of the operation | movement which is different in the conventional interface circuit by the relationship between the main scanning width | variety of a process image, and line memory capacity.

符号の説明Explanation of symbols

100・・・プリンタコントローラ、101・・・CPU、102・・・ASIC、103・・・ROM、104・・・RAM、105・・・HDD、106・・・拡張スロット、107・・・操作部インターフェース、108・・・エンジンインターフェース、109・・・ネットワークインターフェース、110・・・エンジン、111・・・ホストPC、112・・・インターフェース回路、113・・・システム制御部、114・・・HDDインターフェース、115・・・符号DMAC、116・・・圧縮伸長器、117・・・画像DMAC、118・・・RAMインターフェース、119・・・ラインメモリ。 100 ... Printer controller, 101 ... CPU, 102 ... ASIC, 103 ... ROM, 104 ... RAM, 105 ... HDD, 106 ... Expansion slot, 107 ... Operation unit Interface: 108 ... Engine interface, 109 ... Network interface, 110 ... Engine, 111 ... Host PC, 112 ... Interface circuit, 113 ... System control unit, 114 ... HDD interface , 115: Code DMAC, 116: Compression / decompression unit, 117: Image DMAC, 118: RAM interface, 119: Line memory.

Claims (3)

画像メモリの所定単位長の画像データを、DMAコントローラを介して受信し、ラインメモリを利用して設定処理単位で圧縮処理をする圧縮器に転送する圧縮伸長器用インターフェース装置であって、前記所定単位長の画像データを前記ラインメモリの容量以下に分割するように、前記所定単位長と前記ラインメモリの容量とに基づいて前記圧縮器の設定処理単位のデータ長を算出する手段と、前記所定単位長の画像データを前記圧縮器の設定処理単位のデータ長に分割して前記圧縮器へ転送する手段とを具備することを特徴とする圧縮伸長器用インターフェース装置。   An interface device for a compression / decompression device that receives image data of a predetermined unit length in an image memory via a DMA controller and transfers the image data to a compressor that performs compression processing in a set processing unit using a line memory, wherein the predetermined unit Means for calculating a data length of a set processing unit of the compressor based on the predetermined unit length and the capacity of the line memory, so as to divide the long image data into the capacity of the line memory or less, and the predetermined unit An interface device for a compression / decompression device, comprising: means for dividing long image data into data lengths of setting processing units of the compressor and transferring the data to the compressor. ラインメモリを利用して設定処理単位で伸長処理をする伸長器からの出力データを受信して、DMAコントローラを介して所定単位長の画像データを画像メモリに転送する圧縮伸長器用インターフェース装置であって、前記伸長器の設定処理単位の画像データを1つまたは複数連結して前記所定単位長の画像データとするために、前記伸長器の設定処理単位のデータ長が前記ラインメモリの容量に近くダミーデータも少なくなるように、前記所定単位長と前記ラインメモリの容量とに基づいて前記設定処理単位を算出する手段と、前記伸長器から出力された設定処理単位の画像データを1つまたは複数連結して前記所定単位長の画像データとして前記DMAコントローラを介して前記画像メモリへ転送する手段とを具備することを特徴とする圧縮伸長器用インターフェース装置。   An interface device for a compression / decompression device that receives output data from a decompressor that decompresses a set processing unit using a line memory and transfers image data of a predetermined unit length to the image memory via a DMA controller. In order to concatenate one or a plurality of image data of the setting unit of the decompressor into the image data of the predetermined unit length, the data length of the setting processing unit of the decompressor is a dummy close to the capacity of the line memory. A unit for calculating the setting processing unit based on the predetermined unit length and the capacity of the line memory and one or a plurality of setting processing unit image data output from the decompressor so as to reduce data And a means for transferring the image data of the predetermined unit length to the image memory via the DMA controller. Use interface device. 画像メモリの所定単位長の画像データを、DMAコントローラを介して送受信するとともに、ラインメモリを利用して設定処理単位で圧縮伸長処理をする圧縮伸長器との間でデータ転送する圧縮伸長器用インターフェース装置であって、前記所定単位長の画像データを前記ラインメモリの容量以下に分割するように、前記所定単位長と前記ラインメモリの容量とに基づいて前記圧縮伸長器の設定処理単位のデータ長を算出する手段と、前記所定単位長の画像データを前記圧縮伸長器の設定処理単位のデータ長に分割して前記圧縮伸長器へ転送する手段と、前記圧縮伸長器から出力された設定処理単位の画像データを1つまたは複数連結して前記所定単位長の画像データとして前記DMAコントローラを介して前記画像メモリへ転送する手段とを具備することを特徴とする圧縮伸長器用インターフェース装置。   An interface device for a compression / decompression device that transmits / receives image data of a predetermined unit length in an image memory to / from a compression / decompression device that performs compression / decompression processing in units of setting processing using a line memory while transmitting / receiving the image data via a DMA controller And setting the data length of the setting processing unit of the compression / decompression unit based on the predetermined unit length and the capacity of the line memory so as to divide the image data of the predetermined unit length below the capacity of the line memory. Means for calculating, means for dividing the image data of the predetermined unit length into data lengths of setting processing units of the compression / decompression unit and transferring them to the compression / decompression unit, and setting processing units output from the compression / decompression unit Means for concatenating one or a plurality of image data and transferring the image data as the predetermined unit length to the image memory via the DMA controller. Decompression dexterity interface device, characterized in that.
JP2005024828A 2005-02-01 2005-02-01 Interface device for compression / decompression module Active JP4446389B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005024828A JP4446389B2 (en) 2005-02-01 2005-02-01 Interface device for compression / decompression module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005024828A JP4446389B2 (en) 2005-02-01 2005-02-01 Interface device for compression / decompression module

Publications (2)

Publication Number Publication Date
JP2006217007A true JP2006217007A (en) 2006-08-17
JP4446389B2 JP4446389B2 (en) 2010-04-07

Family

ID=36979891

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005024828A Active JP4446389B2 (en) 2005-02-01 2005-02-01 Interface device for compression / decompression module

Country Status (1)

Country Link
JP (1) JP4446389B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010170540A (en) * 2008-12-24 2010-08-05 Semiconductor Energy Lab Co Ltd Image processing circuit, display device, and electronic device
JP2011164682A (en) * 2010-02-04 2011-08-25 Ricoh Co Ltd Data communication device and image processor

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010170540A (en) * 2008-12-24 2010-08-05 Semiconductor Energy Lab Co Ltd Image processing circuit, display device, and electronic device
US8860738B2 (en) 2008-12-24 2014-10-14 Semiconductor Energy Laboratory Co., Ltd. Image processing circuit, display device, and electronic device
KR101611165B1 (en) 2008-12-24 2016-04-11 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Image Processing Circuit, Display device, and Electronic Device
JP2011164682A (en) * 2010-02-04 2011-08-25 Ricoh Co Ltd Data communication device and image processor

Also Published As

Publication number Publication date
JP4446389B2 (en) 2010-04-07

Similar Documents

Publication Publication Date Title
US7468803B2 (en) Image processing apparatus and image processing method
US20030151759A1 (en) Multifunction system, image processing method, computer program and memory medium
US7447384B2 (en) Image processing method and apparatus
JP4446389B2 (en) Interface device for compression / decompression module
JP2001332976A (en) Device and method for processing image
JP2003316714A (en) Apparatus and method for information processing
JP3907471B2 (en) Image input / output controller
JP2018058295A (en) Image processing apparatus, image processing method and program
JP2009044547A (en) Image processor and image processing method
JP4065550B2 (en) Image input / output control device, image processing device, image processing method in image input / output control device, and image processing method in image processing device
JP2005045458A (en) Image compression method and apparatus
JPS63116569A (en) Image processing system
JP5205317B2 (en) Image processing device
JP3997851B2 (en) Image coding apparatus and image coding program
US8520964B2 (en) Image processing apparatus
JP4399965B2 (en) Printing apparatus and printing method
JP4561230B2 (en) Data transfer control device and data transfer method
JP2004120639A (en) Image processing method
JPH06161943A (en) Two-dimensional dma controller
JP2004253906A (en) Expanding apparatus
JP2003250050A (en) Image processing apparatus and control method thereof
JP2006019960A (en) Image processing unit and image-forming device
JP2007251983A (en) Image data output apparatus
JP2002244994A (en) Image forming device
JP2002262104A (en) Facsimile equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071126

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091130

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: 20100114

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100114

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

Free format text: PAYMENT UNTIL: 20130129

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4446389

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140129

Year of fee payment: 4