JP2006229688A - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP2006229688A
JP2006229688A JP2005042180A JP2005042180A JP2006229688A JP 2006229688 A JP2006229688 A JP 2006229688A JP 2005042180 A JP2005042180 A JP 2005042180A JP 2005042180 A JP2005042180 A JP 2005042180A JP 2006229688 A JP2006229688 A JP 2006229688A
Authority
JP
Japan
Prior art keywords
data
image
unit
packet
output
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.)
Withdrawn
Application number
JP2005042180A
Other languages
Japanese (ja)
Inventor
Yoshinobu Umeda
嘉伸 梅田
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 JP2005042180A priority Critical patent/JP2006229688A/en
Publication of JP2006229688A publication Critical patent/JP2006229688A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To generate packets with the smallest amount of data by selecting coding data/raw data, referring to the amount of coding data. <P>SOLUTION: The image processing device comprises an image input means which inputting image information; a division means for dividing into a predetermined unit the image information inputted from the image input means; two or more encoding means for carrying out, respectively coding processing of two or more data of a predetermined unit divided by the division means, while the image information divided by the division means, having two or more data; a comparison means for measuring the data amount of data of before and after being coded by the encoding means; and a data output means for selecting which of the data before coding or the data after coding and for outputting the selected data, on the basis of the comparison result of the comparison means. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、画像読取装置により読み込んだ画像データや、ネットワークを介して取得した画像データを任意の単位に分割して符号化処理を行い、符号化した画像データをメモリに格納する画像処理装置に関する。また、特には画像データの他に画像データの状態を表す付帯情報を有し、前記付帯情報も画像データと同様に任意の単位に分割し、前記分割した付帯情報に対して符号化処理を行う画像処理装置に関する。   The present invention relates to an image processing apparatus that divides image data read by an image reading apparatus or image data acquired via a network into arbitrary units, performs encoding processing, and stores the encoded image data in a memory. . In particular, it has auxiliary information indicating the state of the image data in addition to the image data. The auxiliary information is divided into arbitrary units in the same manner as the image data, and the divided auxiliary information is encoded. The present invention relates to an image processing apparatus.

従来、画像処理装置に画像データを格納する場合、画像データ及び画像データの状態を表す付帯情報(以下、画像付加情報と記す)を格納するためのメモリ容量を削減するために、画像処理装置に取り込んだ画像データ及び画像付加情報に対して符号化処理を行い、データ量を減らしてから画像処理装置内部のメモリに格納することが一般的である。   2. Description of the Related Art Conventionally, when storing image data in an image processing apparatus, the image processing apparatus is provided with an image processing apparatus in order to reduce the memory capacity for storing the image data and incidental information representing the state of the image data (hereinafter referred to as image additional information). In general, encoding processing is performed on the captured image data and image additional information, and the data amount is reduced, and then stored in a memory inside the image processing apparatus.

このとき、画像データ及び画像付加情報はそれぞれの特徴を考慮した符号化処理が行われる。例えば、画像データに対しては画像劣化が発生しても圧縮率を上げるためにJPEG符号化処理を、またビット毎に意味がある画像付加情報に対しては復合化したときに情報の欠落がないようにランレングス符号化の1つであるパックビッツ符号化処理をおこなうといった処理が行われる。   At this time, the image data and the image additional information are subjected to encoding processing in consideration of the respective characteristics. For example, when image data is degraded, JPEG encoding processing is performed to increase the compression rate even when image degradation occurs, and image additional information that is meaningful for each bit is lost when it is decoded. In order to prevent this, a process such as performing a pack bits encoding process which is one of the run length encodings is performed.

これらの画像データ及び画像付加情報は所定の単位(以下パケットと記す)に分割され、分割した画像データ及び画像付加情報はパケットごとに上記符号化処理が行われる(例えば、特許文献1参照)。
特開2000−244925号公報
These image data and image additional information are divided into predetermined units (hereinafter referred to as packets), and the divided image data and image additional information are subjected to the above encoding process for each packet (see, for example, Patent Document 1).
JP 2000-244925 A

しかし上記従来例では、画像データ及び画像付加情報は前もって決めた設定により符号化処理を行うため、例えば複雑な画像が存在するパケットに対して画像データ及び画像付加情報を符号化すると、圧縮率が上がらずにかえって符号化する前のデータ量よりも多くなってしまうことがあった。   However, in the above conventional example, since the image data and the image additional information are encoded according to a predetermined setting, for example, if the image data and the image additional information are encoded for a packet in which a complex image exists, the compression rate is increased. In some cases, the amount of data before encoding does not increase.

本発明は、以上の点に着目して成されたもので、符号化データ量を参照して符号化データ/符号化する前のデータを選択することでデータ量の最も少ないパケットを生成する画像処理装置を提供することを目的とする。   The present invention has been made paying attention to the above points, and is an image that generates a packet with the smallest data amount by referring to the encoded data amount and selecting encoded data / data before encoding. An object is to provide a processing apparatus.

符号化したデータ量が符号化する前のデータ量よりも多くなってしまう場合、符号化したデータの代わりに符号化する前のデータ(以下、生データと記す)を出力することで後段に出力するデータ量を符号化したデータ量よりも少なくすることができる。   When the amount of encoded data is larger than the amount of data before encoding, the data before encoding (hereinafter referred to as raw data) is output to the subsequent stage instead of the encoded data. The amount of data to be performed can be made smaller than the amount of encoded data.

しかしパケット内に複数のデータに対して複数の符号化処理を行う場合、例えは画像データを符号化した結果、画像データの符号化データが生データ量よりも多くても、画像付加情報の符号化データ量が少なければ、画像データ及び画像付加情報を含んだパケット単位としては符号化データ量(画像データの符号化データ量と画像付加情報の符号化データ量の加算値)が生データ量(画像データの生データ量と画像付加情報の生データ量の加算値)よりも少ないといった状態が起こりうる。   However, when a plurality of encoding processes are performed on a plurality of data in a packet, the image additional information is encoded even if the encoded data of the image data is larger than the raw data amount as a result of encoding the image data. If the encoded data amount is small, the encoded data amount (added value of the encoded data amount of the image data and the encoded data amount of the image additional information) as the packet unit including the image data and the image additional information is the raw data amount ( There is a possibility that the state is smaller than the sum of the raw data amount of the image data and the raw data amount of the image additional information.

また、逆に画像付加情報を符号化した結果、画像付加情報の符号化データが生データ量よりも多くても、画像データの符号化データ量が少なければ、画像データ及び画像付加情報を含んだパケット単位としては符号化データ量(画像データの符号化データ量と画像付加情報の符号化データ量の加算値)が生データ量(画像データの生データ量と画像付加情報の生データ量の加算値)よりも少ないといった状態が起こりうる。   On the other hand, as a result of encoding the image additional information, even if the encoded data of the image additional information is larger than the raw data amount, if the encoded data amount of the image data is small, the image data and the image additional information are included. As a packet unit, the amount of encoded data (added value of encoded data amount of image data and encoded data amount of image additional information) is raw data amount (addition of raw data amount of image data and raw data amount of image additional information) The value may be less than (value).

このときパケットの圧縮率としては、符号化したデータのデータ量は生データのデータ量よりも少なくなることから、画像データ及び画像付加情報とも符号化データを出力することも考えられるが、本発明では、出力するパケットのデータ量を最小にするために画像データ及び画像付加情報はそれぞれ独立に符号化データ量と生データのデータ量を比較し、符号化データ量が生データ量よりも多い場合は生データを出力する構成としている。   At this time, as the compression rate of the packet, the data amount of the encoded data is smaller than the data amount of the raw data, so that it is possible to output the encoded data for both the image data and the image additional information. Then, in order to minimize the data amount of the packet to be output, the image data and the image additional information are independently compared between the encoded data amount and the raw data amount, and the encoded data amount is larger than the raw data amount. Is configured to output raw data.

以上の構成により、本発明の画像処理装置では、
画像データ及び画像付加情報とも符号化データ
画像データは符号化データ、画像付加情報は生データ
画像データは生データ、画像付加情報は符号化データ
画像データ及び画像付加情報とも生データ
という4種類の、常に最小のデータ量となるパケットが生成され、1ページ分のデータ量も最小のデータ量のデータが生成される。
With the above configuration, in the image processing apparatus of the present invention,
Image data and image additional information are both encoded data Image data is encoded data, image additional information is raw data Image data is raw data, image additional information is encoded data Image data and image additional information are both raw data A packet having a minimum data amount is always generated, and data having a minimum data amount for one page is generated.

以上、本発明について説明したが、更に説明すれば、前記課題を解決するため、本発明では次の(1)のとおりに構成する。   The present invention has been described above. If further described, in order to solve the above-described problem, the present invention is configured as follows (1).

(1)画像情報を入力する画像入力手段、
前記画像入力手段から入力された画像情報を所定の単位に分割する分割手段、
前記分割手段によって分割された画像情報は複数のデータを有する、
前記分割手段により分割した所定の単位の複数のデータをそれぞれ符号化処理する複数の符号化手段、
前記符号化手段により符号化される前と後のデータのデータ量を比較する比較手段、
前記比較手段の比較結果によって、前記符号化されたデータと符号化される前のデータのどちらを出力するかを選択して出力するデータ出力手段、
を有することを特徴とする画像処理装置。
(1) Image input means for inputting image information,
A dividing unit for dividing the image information input from the image input unit into predetermined units;
The image information divided by the dividing means has a plurality of data.
A plurality of encoding means for encoding each of a plurality of data in a predetermined unit divided by the dividing means;
Comparison means for comparing the amount of data before and after being encoded by the encoding means;
Data output means for selecting and outputting either the encoded data or the data before encoding according to the comparison result of the comparison means;
An image processing apparatus comprising:

本発明によれば、画像データ及び画像付加情報という複数種類のデータを符号化する画像処理装置において、画像データ及び画像付加情報の符号化データ量をそれぞれ独立に符号化処理前の生データのデータ量と比較し、符号化データ量が生データ量よりも多い場合は符号化データの代わりに生データを用いることによって、常に最小のデータ量となるパケットが生成され、これにより1ページ分のデータ量も最小のデータ量のデータが生成される。   According to the present invention, in an image processing apparatus that encodes a plurality of types of data, that is, image data and image additional information, the encoded data amounts of the image data and the image additional information are independently determined as raw data data before the encoding process. When the amount of encoded data is larger than the amount of raw data, the raw data is used instead of the encoded data, so that a packet having the minimum amount of data is always generated. Data with a minimum amount of data is generated.

以下本発明を実施するための最良の形態を、実施例により詳しく説明する。   Hereinafter, the best mode for carrying out the present invention will be described in detail with reference to examples.

[第一の実施例]
以下で本発明の装置及びその動作について詳細に説明する。
[First embodiment]
The apparatus of the present invention and its operation will be described in detail below.

[ハードウェア]
全体構成
全体構成図を図12に示す。
Controller Unit (2000)は画像入力デバイスであるScanner(2070)や画像出力デバイスであるPrinter(2095)と接続し、一方ではLAN(2011)や公衆回線(WAN)(2051)と接続することで、画像情報やデバイス情報の入出力、PDLデータのイメージ展開を行う為のコントローラである。
[hardware]
Overall Configuration FIG. 12 shows an overall configuration diagram.
Controller Unit (2000) is connected to Scanner (2070), which is an image input device, and Printer (2095), which is an image output device. This is a controller for inputting / outputting image information and device information and developing images of PDL data.

CPU(2001)はシステム全体を制御するプロセッサである。本実施例では2つのCPUを用いた例を示す。これら二つのCPUは、共通のCPUバス(2126)に接続され、さらに、システムバスブリッジ(2007)に接続される。   A CPU (2001) is a processor that controls the entire system. In this embodiment, an example using two CPUs is shown. These two CPUs are connected to a common CPU bus (2126) and further connected to a system bus bridge (2007).

システムバスブリッジ(2007)は、バススイッチであり、CPUバス(2126)、RAMコントローラ(2124)、ROMコントローラ(2125)、IOバス1(2127)、サブバススイッチ(2128)、IOバス2(2129)、画像リングインターフェース1(2147)、画像リングインターフェース2(2148)が接続される。   The system bus bridge (2007) is a bus switch, and includes a CPU bus (2126), a RAM controller (2124), a ROM controller (2125), an IO bus 1 (2127), a sub bus switch (2128), and an IO bus 2 (2129). ), The image ring interface 1 (2147) and the image ring interface 2 (2148) are connected.

サブバススイッチ(2128)は、第二のバススイッチであり、画像DMA1(2130)、画像DMA2(2132)、フォント伸張部(3134)、ソート回路(2135)、ビットマップトレース部(2136)が接続され、これらのDMAから出力されるメモリアクセス要求を調停し、システムバスブリッジへの接続を行う。   The sub bus switch (2128) is a second bus switch to which the image DMA1 (2130), the image DMA2 (2132), the font expansion unit (3134), the sort circuit (2135), and the bitmap trace unit (2136) are connected. Then, the memory access request output from these DMAs is arbitrated to connect to the system bus bridge.

RAM(2002)はCPU(2001)が動作するためのシステムワークメモリであり、画像データを一時記憶するための画像メモリでもある。RAMコントローラ(2124)により制御される、本実施例では、ダイレクトRDRAMを採用する例を示す。   A RAM (2002) is a system work memory for operating the CPU (2001), and is also an image memory for temporarily storing image data. In this embodiment, which is controlled by the RAM controller (2124), an example in which a direct RDRAM is employed is shown.

ROM(2003)はブートROMであり、システムのブートプログラムが格納されている。ROMコントローラ(2125)により制御される。   A ROM (2003) is a boot ROM, which stores a system boot program. It is controlled by the ROM controller (2125).

画像DMA1(2130)は、画像圧縮部(3131)に接続し、レジスタアクセスリング(2137)を介して設定された情報に基づき、画像圧縮部(2131)を制御し、RAM(2002)上にある非圧縮データの読み出し、圧縮、圧縮後データの書き戻しを行う、本実施例では、JPEGを圧縮アルゴリズムに採用した例を示す。   The image DMA1 (2130) is connected to the image compression unit (3131), controls the image compression unit (2131) based on information set through the register access ring (2137), and is on the RAM (2002). In this embodiment, in which uncompressed data is read, compressed, and compressed data is written back, an example in which JPEG is adopted as a compression algorithm is shown.

画像DMA2(2132)は、画像伸張部(2133)に接続し、レジスタアクセスリング(2137)を介して設定された情報に基づき、画像伸張部(2133)を制御し、RAM(2002)上にある圧縮データの読み出し、伸張、伸張後データの書き戻しを行う、本実施例では、JPEGを伸張アルゴリズムに採用した例を示す。   The image DMA2 (2132) is connected to the image expansion unit (2133), controls the image expansion unit (2133) based on the information set through the register access ring (2137), and is on the RAM (2002). In this embodiment, in which compressed data is read, decompressed, and data is written back after decompression, JPEG is used as the decompression algorithm.

フォント伸張部(2134)は、LANインターフェース(2010)等を介し外部より転送されるPDLデータに含まれるフォントコードに基づき、ROM(2003)もしくは、RAM(2002)内に格納された、圧縮フォントデータの伸張を行う。本実施例では、FBEアルゴリズムを採用した例を示す。   The font decompression unit (2134) is a compressed font data stored in the ROM (2003) or RAM (2002) based on the font code included in the PDL data transferred from the outside via the LAN interface (2010) or the like. Stretching. In this embodiment, an example in which the FBE algorithm is adopted is shown.

ソート回路(2135)は、PDLデータを展開する段階で生成されるディスプレイリストのオブジェクトの順番を並び替える回路である。   The sort circuit (2135) is a circuit that rearranges the order of the objects in the display list generated at the stage of developing the PDL data.

ビットマップトレース回路(2136)は、ビットマップデータより、エッジ情報を抽出する回路である。   The bitmap trace circuit (2136) is a circuit that extracts edge information from bitmap data.

IOバス1(2127)は、内部IOバスの一種であり、標準バスであるUSBバスのコントローラ、USBインターフェース(2138)、汎用シリアルポート(2139)、インタラプトコントローラ(2140)、GPIOインターフェース(2141)が接続される。IOバス1には、バスアービタ(図示せず)が含まれる。   The IO bus 1 (2127) is a kind of internal IO bus, and includes a standard USB bus controller, a USB interface (2138), a general-purpose serial port (2139), an interrupt controller (2140), and a GPIO interface (2141). Connected. The IO bus 1 includes a bus arbiter (not shown).

操作部I/F(2006)は操作部(UI)(2012)とインターフェース部で、操作部(2012)に表示する画像データを操作部(2012)に対して出力する。また、操作部(2012)から本システム使用者が入力した情報を、CPU(2001)に伝える役割をする。   An operation unit I / F (2006) is an operation unit (UI) (2012) and an interface unit, and outputs image data to be displayed on the operation unit (2012) to the operation unit (2012). Also, it plays a role of transmitting information input by the system user from the operation unit (2012) to the CPU (2001).

IOバス2(2129)は内部IOバスの一種であり、汎用バスインターフェース1及び2(2142)と、LANコントローラ(2010)が接続される。IOバス2にはバスアービタ(図示せず)が含まれる。   The IO bus 2 (2129) is a kind of internal IO bus, and is connected to the general-purpose bus interfaces 1 and 2 (2142) and the LAN controller (2010). The IO bus 2 includes a bus arbiter (not shown).

汎用バスインターフェース(2142)は、2つの同一のバスインターフェースから成り、標準IOバスをサポートするバスブリッジである。本実施例では、PCIバス(2143)を採用した例を示す。   The general-purpose bus interface (2142) is a bus bridge that includes two identical bus interfaces and supports a standard IO bus. In this embodiment, an example in which a PCI bus (2143) is employed is shown.

HDD(2004)はハードディスクドライブで、システムソフトウェア、画像データを格納する。ディスクコントローラ(2144)を介して一方のPCIバス(2143)に接続される。   An HDD (2004) is a hard disk drive that stores system software and image data. It is connected to one PCI bus (2143) via the disk controller (2144).

LANコントローラ(2010)は、MAC回路(2145)、PHY/PMD回路(2146)を介しLAN(2011)に接続し、情報の入出力を行う。   The LAN controller (2010) is connected to the LAN (2011) via the MAC circuit (2145) and the PHY / PMD circuit (2146), and inputs and outputs information.

Modem(2050)は公衆回線(2051)に接続し、情報の入出力を行う。   The Modem (2050) is connected to the public line (2051) and inputs / outputs information.

画像リングインターフェース1(2147)及び画像リングインターフェース2(2148)は、システムバスブリッジ(2007)と画像データを高速で転送する画像リング(2008)を接続し、タイル化後に圧縮されたデータをRAM(2002)とタイル画像処理部(2149)間で転送するDMAコントローラである。   The image ring interface 1 (2147) and the image ring interface 2 (2148) connect the system bus bridge (2007) and the image ring (2008) for transferring image data at high speed, and the compressed data after tiling is stored in RAM ( 2002) and a tile controller (2149).

画像リング(2008)は、一対の単方向接続経路の組み合わせにより構成される(画像リング1及び画像リング2)。画像リング(2008)は、タイル画像処理部(2149)内で、画像リングインターフェース3(2101)及びタイル画像インターフェース4(2102)を介し、タイル伸張部(2103)、コマンド処理部(2104)、ステータス処理部(2105)、タイル圧縮部(2106)に接続される。本実施例では、タイル伸張部(2103)を2組、タイル圧縮部を3組実装する例を示す。   The image ring (2008) is configured by a combination of a pair of unidirectional connection paths (image ring 1 and image ring 2). The image ring (2008) includes a tile expansion unit (2103), a command processing unit (2104), a status via the image ring interface 3 (2101) and the tile image interface 4 (2102) in the tile image processing unit (2149). The processing unit (2105) and the tile compression unit (2106) are connected. In this embodiment, an example is shown in which two sets of tile expansion units (2103) and three sets of tile compression units are mounted.

タイル伸張部(2103)は、画像リングインターフェースへの接続に加え、タイルバス(2107)に接続され、画像リングより入力された圧縮後の画像データを伸張し、タイルバス(2107)へ転送するバスブリッジである。本実施例では、JPEG及びパックビッツ方式による伸張アルゴリズムを採用した例を示す。   The tile expansion unit (2103) is connected to the tile bus (2107) in addition to the connection to the image ring interface, and expands the compressed image data input from the image ring and transfers the compressed image data to the tile bus (2107). It is a bridge. In this embodiment, an example in which a decompression algorithm based on the JPEG and Packbits methods is employed will be described.

タイル圧縮部(2106)は、画像リングインターフェースへの接続に加え、タイルバス(2107)に接続され、タイルバスより入力された圧縮前の画像データを圧縮し、画像リング(2008)へ転送するバスブリッジである。本実施例では、タイル伸張部と同じ様にJPEG及びパックビッツ方式による圧縮アルゴリズムを採用した例を示す。   The tile compression unit (2106) is connected to the tile bus (2107) in addition to the connection to the image ring interface, compresses the uncompressed image data input from the tile bus, and transfers the compressed image data to the image ring (2008). It is a bridge. In the present embodiment, an example in which a compression algorithm based on JPEG and Packbits is employed as in the tile expansion unit is shown.

コマンド処理部(2104)は、画像リングインターフェースへの接続に加え、レジスタ設定バス(2109)に接続され、画像リングを介して入力したCPU(2001)より発行されたレジスタ設定要求を、レジスタ設定バス(2109)に接続される該当ブロックへ書き込む。また、CPU(2001)より発行されたレジスタ読み出し要求に基づき、レジスタ設定バスを介して該当レジスタより情報を読み出し。画像リングインターフェース4(2102)に転送する。   The command processing unit (2104) is connected to the register setting bus (2109) in addition to the connection to the image ring interface, and receives a register setting request issued from the CPU (2001) input via the image ring. Write to the corresponding block connected to (2109). Further, based on a register read request issued by the CPU (2001), information is read from the corresponding register via the register setting bus. The image is transferred to the image ring interface 4 (2102).

ステータス処理部(2105)は各画像処理部の情報を監視し、CPU(2001)に対してインタラプトを発行するためのインタラプトバケットを生成し、画像リングインターフェース4に出力する。   The status processing unit (2105) monitors information of each image processing unit, generates an interrupt bucket for issuing an interrupt to the CPU (2001), and outputs it to the image ring interface 4.

タイルバス(2107)には上記ブロックに加え、以下の機能ブロックが接続される。   In addition to the above blocks, the following functional blocks are connected to the tile bus (2107).

レンダリング部インターフェース(2110)、画像入力インターフェース(2112)、画像出力インターフェース(2113)、多値化部(2119)、2値化部(2118)、色空間変換部(2117)、画像回転部(2030)、解像度変換部(2116)。   Rendering unit interface (2110), image input interface (2112), image output interface (2113), multi-value conversion unit (2119), binarization unit (2118), color space conversion unit (2117), image rotation unit (2030) ), A resolution conversion unit (2116).

レンダリング部インターフェース(2110)は、後述するレンダリング部により生成されたビットマップイメージを入力するインターフェースである。レンダリング部とレンダリング部インターフェースは、一般的なビデオ信号(2111)にて接続される。レンダリング部インターフェースは、タイルバス(2107)に加え、メモリバス(2108)、レジスタ設定バス(2109)への接続を有し、入力された、ラスタ画像をレジスタ設定バスを介して設定された、所定の方法によりタイル画像への構造変換をすると同時にクロックの同期化を行い、タイルバス(2107)に対し出力を行う。   The rendering unit interface (2110) is an interface for inputting a bitmap image generated by a rendering unit described later. The rendering unit and the rendering unit interface are connected by a general video signal (2111). The rendering unit interface has a connection to the memory bus (2108) and the register setting bus (2109) in addition to the tile bus (2107), and the input raster image is set via the register setting bus, and is a predetermined one. The structure is converted into a tile image by the above method, and at the same time, the clock is synchronized and output to the tile bus (2107).

画像入力インターフェースは(2112)は、後述するスキャナ用画像処理部(2114)により補正画像処理されたラスタイメージデータを入力とし、レジスタ設定バスを介して設定された、所定の方法によりタイル画像への構造変換とクロックの同期化を行い、タイルバス(2107)に対し出力を行う。   The image input interface (2112) receives raster image data subjected to correction image processing by a scanner image processing unit (2114) to be described later, and inputs the raster image data to the tile image by a predetermined method set via the register setting bus. The structure conversion and clock synchronization are performed and output to the tile bus (2107).

画像出力インターフェースは、タイルバスからのタイル画像データを入力とし、ラスタ画像への構造変換及び、クロックレートの変更を行い、ラスタ画像をプリンタ用画像処理部(2115)へ出力する。   The image output interface receives tile image data from the tile bus, converts the structure into a raster image and changes the clock rate, and outputs the raster image to the printer image processing unit (2115).

画像回転部(2030)は画像データの回転を行う。   An image rotation unit (2030) rotates image data.

解像度変換部(2116)は画像の解像度の変更を行う。   A resolution converter (2116) changes the resolution of the image.

色空間変換部(2117)はカラー及びグレースケール画像の色空間の変換を行う。   A color space conversion unit (2117) converts the color space of the color and gray scale image.

2値化部(2118)は、多値(カラー、グレースケール)画像を2値化する。   A binarization unit (2118) binarizes a multi-value (color, gray scale) image.

多値化部(2119)は2値画像を多値データへ変換する。   A multi-value conversion unit (2119) converts a binary image into multi-value data.

外部バスインターフェース部(2120)は、画像リングインターフェース1、2,3,4、コマンド処理部、レジスタ設定バスを介し、CPU(2001)により発行された、書き込み、読み出し要求を外部バス3(2121)に変換出力するバスブリッジである。外部バス3(2121)は本実施例では、プリンタ用画像処理部(2115)、スキャナ用画像処理部(2114)に接続されている。   The external bus interface unit (2120) sends write / read requests issued by the CPU (2001) via the image ring interfaces 1, 2, 3, 4, command processing unit, and register setting bus to the external bus 3 (2121). This is a bus bridge that converts and outputs to In this embodiment, the external bus 3 (2121) is connected to the printer image processing unit (2115) and the scanner image processing unit (2114).

メモリ制御部(2122)は、メモリバス(2108)に接続され、各画像処理部の要求に従い、あらかじめ設定されたアドレス分割により、画像メモリ1及び画像メモリ2(2123)に対して、画像データの書き込み、読み出し、必要に応じてリフレッシュ等の動作を行う。本実施例では、画像メモリにSDRAMを用いた例を示す。   The memory control unit (2122) is connected to the memory bus (2108), and in accordance with the request of each image processing unit, the image data is transferred to the image memory 1 and the image memory 2 (2123) by preset address division. Write, read, and refresh operations are performed as necessary. In this embodiment, an example in which an SDRAM is used as an image memory is shown.

スキャナ用画像処理部(2114)では、画像入力デバイスであるスキャナ(2070)によりスキャンされた画像データを補正画像処理する。   The scanner image processing unit (2114) performs correction image processing on the image data scanned by the scanner (2070) as an image input device.

プリンタ用画像処理部では、プリンタ出力のための補正画像処理を行い、結果をPrinter(2095)へ出力する。   The printer image processing unit performs corrected image processing for printer output, and outputs the result to the Printer (2095).

レンダリング部(2060)はPDLコードもしくは、中間ディスプレイリストをビットマップイメージに展開する。   The rendering unit (2060) develops the PDL code or the intermediate display list into a bitmap image.

[システム全体]
本発明のネットワークシステム全体の構成図を図11に示す。
[Whole system]
FIG. 11 shows a configuration diagram of the entire network system of the present invention.

1001は本発明の装置で、スキャナとプリンタから構成され、スキャナから読み込んだ画像をローカルエリアネットワーク(1010)(以下LAN)に出力したり、LANから受信した画像をプリンタによりプリントアウトできる。また、スキャナから読んだ画像を図示しないFAX送信手段により、PSTNまたはISDN(1030)に送信したり、PSTNまたはISDNから受信した画像をプリンタによりプリントアウトできる。1002は、データベースサーバで、本発明の装置(1001)により読み込んだ2値画像及び多値画像をデータベースとして管理する。   An apparatus 1001 according to the present invention includes a scanner and a printer, and can output an image read from the scanner to a local area network (1010) (hereinafter referred to as a LAN) and print out an image received from the LAN. Further, the image read from the scanner can be transmitted to the PSTN or ISDN (1030) by a FAX transmission means (not shown), and the image received from the PSTN or ISDN can be printed out by the printer. Reference numeral 1002 denotes a database server which manages binary images and multi-valued images read by the apparatus (1001) of the present invention as a database.

1003は、データベースサーバ(1002)のデータベースクライアントで、データベース(1002)に保存されている画像データを閲覧/検索等できる。   Reference numeral 1003 denotes a database client of the database server (1002), which can browse / search image data stored in the database (1002).

1004は、電子メールサーバで、本発明の装置(1001)により読み取った画像を電子メールの添付として受け取ることができる。1005は、電子メールのクライアントで、電子メールサーバ(1004)の受け取ったメールを受信し閲覧したり、電子メールを送信したり、可能である。   An e-mail server 1004 can receive an image read by the apparatus (1001) of the present invention as an e-mail attachment. Reference numeral 1005 denotes an e-mail client that can receive and browse e-mail received by the e-mail server (1004) and send e-mail.

1006がHTML文書をLANに提供するWWWサーバで、本発明の装置(1001)によりWWWサーバで提供されるHTML文書をプリントアウトできる。   Reference numeral 1006 denotes a WWW server that provides an HTML document to a LAN, and an HTML document provided by the WWW server can be printed out by the apparatus (1001) of the present invention.

1007は、ルータでLAN(1010)をインターネット/イントラネット(1012)と連結する。インターネット/イントラネットに、前述したデータベースサーバ(1002)、WWWサーバ(1006)、電子メールサーバ(1004)、本発明の装置(1001)と同様の装置が、それぞれ1020、1021、1022、1023として連結している。一方、本発明の装置(1001)は、PSTNまたはISDN(1030)を介して、FAX装置(1031)と送受信可能になっている。   Reference numeral 1007 denotes a router that connects the LAN (1010) to the Internet / intranet (1012). The database server (1002), WWW server (1006), e-mail server (1004), and apparatus similar to the apparatus (1001) of the present invention are connected to the Internet / intranet as 1020, 1021, 1022, and 1023, respectively. ing. On the other hand, the apparatus (1001) of the present invention can transmit and receive with the FAX apparatus (1031) via the PSTN or ISDN (1030).

また、LAN上にプリンタ(1040)も連結されており、本発明の装置(1001)により読み取った画像をプリントアウト可能なように構成されている。   A printer (1040) is also connected to the LAN, and is configured to print out an image read by the apparatus (1001) of the present invention.

[タイル画像(パケット)フォーマット]
本発明によるSystem Controller Unit(2000)内では、画像データ、CPU(2001)によるコマンド、各ブロックより発行される割り込み情報を、パケット化された形式で転送する。本実施例では、図13に示すデータパケット、図14に示すコマンドパケット、図15に示すインタラプトパケットの3種の異なる種類のパケットが使用される。
[Tile image (packet) format]
In the System Controller Unit (2000) according to the present invention, image data, commands from the CPU (2001), and interrupt information issued from each block are transferred in a packetized form. In this embodiment, three different types of packets are used: a data packet shown in FIG. 13, a command packet shown in FIG. 14, and an interrupt packet shown in FIG.

データパケット(図13)
本実施例では画像データを32pixel x 32pixelのTile単位の画像データ(3002)に分割して取り扱う。このTile単位の画像に、必要なヘッダ情報(3001)及び画像付加情報等(3003)を付加してデータパケットとする。画像データと画像付加情報の間、及び画像付加情報の後にはそれぞれのデータ長を所定の長さに調整するためのパディングデータが付加される。
Data packet (Figure 13)
In this embodiment, the image data is handled by being divided into image data (3002) in units of Tile of 32 pixels x 32 pixels. Necessary header information (3001) and image additional information (3003) are added to the image in units of tiles to form a data packet. Padding data for adjusting each data length to a predetermined length is added between the image data and the image additional information and after the image additional information.

以下にヘッダ情報(3001)に含まれる情報について説明を行なう。   Information included in the header information (3001) will be described below.

パケットはヘッダ情報(3001)内のPckt Type(3004)内のPacket Type ID(3023)の値によってデータパケット、コマンドパケット及びインタラプトパケットに区別される。本実施例では、Packet Type ID3ビットに対して、
001b又は101b : データパケット
010b : コマンドパケット
100b : インタラプトパケット
を割り付けている。
The packet is classified into a data packet, a command packet, and an interrupt packet according to the value of the packet type ID (3023) in the packet type (3004) in the header information (3001). In this embodiment, for the Packet Type ID 3 bits,
001b or 101b: Data packet 010b: Command packet 100b: An interrupt packet is allocated.

また、Pckt Type(3004)にはRepeat Flag(3022)が含まれており、データパケットの画像データ及び画像付加情報(3003)、ヘッダ情報(3001)内の所定の情報がシステム制御部2150に出力したデータパケットと一致する場合、Repeat Flag(3022)に1をセットしてヘッダ情報3001のみシステム制御部2150に出力する。   Also, the Pckt Type (3004) includes a Repeat Flag (3022), and image data of the data packet, image additional information (3003), and predetermined information in the header information (3001) are output to the system control unit 2150. When the data packet matches, the Repeat Flag (3022) is set to 1, and only the header information 3001 is output to the system control unit 2150.

システム制御部2150は、Repeat Flag(3022)に1が設定されたデータパケットが入力されると、そのデータパケットの画像データ及び画像付加情報は直前に入力されたデータパケットの画像データ及び画像付加情報と同一と判断して処理を行う。これにより、システム制御部2150と画像処理部2149間のデータ転送量の削減を行う。   When a data packet in which 1 is set in the Repeat Flag (3022) is input to the system control unit 2150, the image data and image additional information of the data packet are the image data and image additional information of the data packet input immediately before. It is determined that it is the same as the process. As a result, the amount of data transferred between the system control unit 2150 and the image processing unit 2149 is reduced.

Chip ID(3005)はパケットを送信するターゲットとなるチップのIDを示し、画像処理部及びシステム制御部が複数接続された場合に、パケットを送信するターゲットを示すことによってデータパケットを所望のブロックへ出力するための識別に用いる。   Chip ID (3005) indicates the ID of a target chip that transmits a packet. When a plurality of image processing units and system control units are connected, a data packet is sent to a desired block by indicating a target that transmits the packet. Used for identification for output.

Image Type(3006)では画像データのタイプを示す。本実施例ではImage Type8ビットのうち上位2ビットを用いて画像データのタイプを以下のように規定している。
00b : 1画素を1ビットで表す
01b : 1画素を8ビットデータ1成分で表す
10b : 1画素を8ビットデータ3成分、計24ビットで表す
11b : 1画素を8ビットデータ4成分、計32ビットで表す
Image Type (3006) indicates the type of image data. In this embodiment, the image data type is defined as follows using the upper 2 bits of the 8 bits of Image Type.
00b: 1 pixel is represented by 1 bit 01b: 1 pixel is represented by 8 bits of data 1 component 10b: 1 pixel is represented by 3 components of 8 bits of data 11b: 1 pixel is represented by 4 components of 8 bits of data, 32 in total Represented in bits

Page ID(3007)はデータパケットが含まれるページを示し、Job ID(3008)にはソフトウェアで管理するためのJob IDを格納する。   Page ID (3007) indicates a page including a data packet, and Job ID (3008) stores a Job ID for management by software.

Packet ID Y−coordinate(3009)及びX−coorhdinate(3010)はページ上におけるデータパケットの位置を示しており、これによりシステム制御部2150は画像処理部2149から出力された順番に関わらず各データパケットの位置関係を知ることができる。   Packet ID Y-coordinate (3009) and X-coordinate (3010) indicate the position of the data packet on the page, and the system control unit 2150 allows each data packet to be output regardless of the order output from the image processing unit 2149. You can know the positional relationship.

Process Instruction(3011)では画像処理部の各ユニットで処理を行うための動作モードを指定する。Process Instruction(3011)は左詰で8bit毎に各処理ユニットの処理順に設定し、各処理Unitは処理後Process Instructionを左に8BitShiftして次の処理Unitに渡す。Process Instruction(3011)はUnitID(3024)とMode(3025)の組が8組格納され、UnitID(3024)は各処理Unitの指定を、Mode(3025)は各処理Unitでの動作Modeを指定する。これにより、1つのパケットで連続して8つのUnitで画像処理を行うことができる。   In Process Instruction (3011), an operation mode for performing processing in each unit of the image processing unit is designated. The Process Instruction (3011) is left-justified and set in the processing order of each processing unit every 8 bits, and each processing unit passes the processed processing instruction to the left by 8 BitShift and passes it to the next processing unit. In Process Instruction (3011), eight sets of UnitID (3024) and Mode (3025) are stored, UnitID (3024) specifies the specification of each processing unit, and Mode (3025) specifies the operation mode in each processing unit. . Thereby, it is possible to perform image processing with eight units continuously in one packet.

Packet Byte Length(3012)はパケットのトータルバイト数を示す。   Packet Byte Length (3012) indicates the total number of bytes of the packet.

Image Data ByteLengh(3015)及びZData Byte Length(3016)はそれぞれ画像データのバイト数、画像付加情報のバイト数を表し、Image Data Offset(3013)及びZ Data Offset(3014)はそれぞれのパケットの先頭からデータが格納されている部分までのOffset値を表している。なお、ここで示される画像データ及び画像付加情報のバイト長はパディングデータの分は含まない。   Image Data Byte Length (3015) and Z Data Byte Length (3016) represent the number of bytes of image data and the number of bytes of image additional information, respectively. Image Data Offset (3013) and Z Data Offset (3014) are from the head of each packet. It represents the Offset value up to the part where data is stored. Note that the byte lengths of the image data and the image additional information shown here do not include the padding data.

Compress Flag(3017)内のImage Data(3026)及びZdata(3027)は画像データ及び画像付加情報が圧縮されている状態か、または非圧縮の状態であるかをそれぞれ1ビットで示す。   Image Data (3026) and Zdata (3027) in the Compress Flag (3017) each indicate whether the image data and the image additional information are compressed or uncompressed with one bit.

Compress Flag(3017)内のQ−Table ID(3028)には画像データを圧縮した時の情報が格納される。本実施例では、後述するようにImage Type(3006)の上位2ビットが01b、10b、11b、すなわち複数のビットにより1画素が表現されている場合、画像データはJPEG方式による圧縮が行われるため、Q−Table ID(3028)には圧縮に使用した量子化テーブルを示す情報が格納されている。   Information when the image data is compressed is stored in the Q-Table ID (3028) in the Compress Flag (3017). In this embodiment, as will be described later, when the upper 2 bits of the Image Type (3006) are 01b, 10b, 11b, that is, when one pixel is represented by a plurality of bits, the image data is compressed by the JPEG method. , Q-Table ID (3028) stores information indicating the quantization table used for compression.

タイル圧縮部2106及びタイル伸張部2103はQ−Table ID(3028)に格納された値を参照することにより、対応する量子化テーブルを用いて圧縮/慎重処理を行う。   The tile compressing unit 2106 and the tile decompressing unit 2103 refer to the value stored in the Q-Table ID (3028), and performs compression / careful processing using the corresponding quantization table.

Source ID(3018)は画像データ及び画像付加情報が生成されたソースを示す。   Source ID (3018) indicates a source from which image data and image additional information are generated.

Misc(3019)はその他の情報を格納する。本実施例では画像付加情報の補助的な情報であるデータパケット全体の付加情報を表すChar−flag(3029)及び、JPEG圧縮時に量子化テーブルをパケットごとに切り替えるためのQ−Table Sel(3030)が用意されている。   Misc (3019) stores other information. In this embodiment, Char-flag (3029) representing additional information of the entire data packet, which is auxiliary information of the image additional information, and Q-Table Sel (3030) for switching the quantization table for each packet during JPEG compression. Is prepared.

Ztype(3020)は画像付加情報の有効bit幅を示す。Ztype(3020)で示したbit以外の画像付加情報は無効情報とする。   Ztype (3020) indicates the effective bit width of the image additional information. Image additional information other than the bits indicated by Ztype (3020) is invalid information.

Ignore Flag(3022)は後述する再符号化処理において、再符号化を行うためのトリガとして使用する。システム制御部2150はIgnore Flag(3022)がセットされたデータパケットを受け取ると、RAM2002をクリアして改めて画像データ(データパケット)の取得を開始する。   The Ignor Flag (3022) is used as a trigger for performing re-encoding in a re-encoding process described later. When the system control unit 2150 receives the data packet in which the Ignor Flag (3022) is set, the system control unit 2150 clears the RAM 2002 and starts acquiring image data (data packet) again.

Thumbnail Data(3021)にはデータパケットの画像データを代表する値(サムネール値)を格納する。本実施例ではthumbnail Data(3021)に成分ごとに最大4つの値を格納することができる。   A value (thumbnail value) representing the image data of the data packet is stored in Thumbnail Data (3021). In this embodiment, a maximum of four values can be stored for each component in the thumbnail data (3021).

Packet Table(図16)
図16はデータパケットがRAM(2002)に格納されている状態を示している。各データパケットはPacket Table(6001)によって管理する。Packet Table(6001)の構成要素は次の通りで、それぞれTableの値に0を5bit付加すると、パケットの先頭アドレス(6002)、パケットのByte Length(6005)となる。
Packet Table (Fig. 16)
FIG. 16 shows a state where data packets are stored in the RAM (2002). Each data packet is managed by a packet table (6001). The components of the Packet Table (6001) are as follows. When 5 bits are added to the value of the Table, the packet start address (6002) and the packet Byte Length (6005) are obtained.

Packet Address Pointer(27bit)+5b00000=Packet先頭Address
Packet Length(11bit)+5b00000=PacketのByte Length
Packet Address Pointer (27 bits) + 5b00000 = Packet head Address
Packet Length (11 bits) + 5b00000 = Packet Byte Length

Packet Address Pointer はデータパケットが1つ入力されると、そのPacket のByte Lengthの値だけ加算され、次のPacketの先頭Addressを示す。   When one data packet is input to Packet Address Pointer, only the value of Byte Length of the packet is added, and indicates the first address of the next packet.

なお、Packet Table(6001)とChain Table(6010)は分割されないものとする。   Note that the packet table (6001) and the chain table (6010) are not divided.

Packet Table(6001)は常に走査方向に並んでおり、Yn/Xn=000/000,000/001,000/002,....という順で並んでいる。このPacket Table(6001)のEntryは一意にひとつのTileを示す。また、Yn/Xmaxの次のEntryはYn+1/Xとなる。 The Packet Table (6001) is always arranged in the scanning direction, and Yn / Xn = 000 / 000,000 / 001,000 / 002,. . . . It is lined up in this order. The entry of the packet table (6001) uniquely indicates one tile. In addition, the following Entry of Yn / Xmax becomes Yn + 1 / X 0.

ここで上記Yn及びXnはヘッダ情報(3001)のPacket ID Y−coordinate(3009)及びX−coorhdinate(3010)と同じ値である。   Here, Yn and Xn are the same values as Packet ID Y-coordinate (3009) and X-coordinate (3010) of the header information (3001).

ヘッダ情報(3001)内のRepeat Flag(3002)がセットされているパケットが入力される場合は、そのパケットはMemory上には書かず、Packet TableのEntryに1つ前のEntryと同じPacket Address Pointer、Packet Lengthを格納する。1つのPacket Dataを2つのTable Entryが指すかたちになる。この場合、2つめのTable EntryのRepeat Flag(6003)がSetされる。   When a packet in which the Repeat Flag (3002) in the header information (3001) is set is input, the packet is not written on the Memory, and is the same Packet Address Pointer as the previous Entry in the Entry of the Packet Table. , Packet Length is stored. A single packet data is pointed to by two table entries. In this case, Repeat Flag (6003) of the second Table Entry is set.

PacketがChain DMAにより複数に分断された場合は、Divide Flag(6004)をSetし、そのPacketの先頭部分が入っているChain BlockのChain Table番号(6006)をSetする。   When the packet is divided into a plurality by Chain DMA, the Divide Flag (6004) is set, and the Chain Table number (6006) of the Chain Block containing the head portion of the packet is set.

Chain Table(6010)のEntryはChain Block Address(6011)とChain Block Length(6012)からなっており、Tableの最後のEntryにはAddress、Length共に0を格納しておく。   The entry of the chain table (6010) is composed of a chain block address (6011) and a chain block length (6012), and 0 is stored in both the address and the length of the last entry of the table.

Command Packet Format(図14)
本Packet Formatはレジスタ設定バス(2109)へのアクセスを行うためのものである。本パケットを用いることにより、COU(2001)より画像メモリ(2123)へのアクセスも可能である。
Command Packet Format (Figure 14)
This Packet Format is used to access the register setting bus (2109). By using this packet, the COU (2001) can also access the image memory (2123).

Chip ID(4004)にはコマンドパケットの送信先となる画像処理部(2149)を表すIDが格納される。   The Chip ID (4004) stores an ID representing the image processing unit (2149) that is the transmission destination of the command packet.

Page ID(4007)、Job ID(4008)はソフトウェアで管理するためのPage IDとJob IDを格納する。   Page ID (4007) and Job ID (4008) store Page ID and Job ID for management by software.

Packet ID(4009)は1次元で表される。Data PacketのX−coordinateのみを使用する。   Packet ID (4009) is expressed in one dimension. Only X-coordinate of Data Packet is used.

パケットバイトレングス(4010)は128Byte固定である。   The packet byte length (4010) is fixed to 128 bytes.

パケットデータ部(4002)には、アドレス(4011)とデータ(4012)の組を1つのコマンドとして、最大12個のコマンドを格納することが可能である。ライトかリードかのコマンドのタイプはCmdType(4005)で示され、コマンドの数はCmdnum(4006)で示される。   The packet data part (4002) can store a maximum of 12 commands, with a set of address (4011) and data (4012) as one command. The type of command for writing or reading is indicated by CmdType (4005), and the number of commands is indicated by Cmdnum (4006).

Interrupt Packet Format(図15)
本PacketFormatは画像処理部(2149)からCPU(2001)への割り込みを通知するためのものである。ステータス処理部(2105)はInterrupt Packetを送信すると、次に送信の許可がされるまではInterrupt Packetを送信してはならない。
Interrupt Packet Format (FIG. 15)
This PacketFormat is for notifying an interruption from the image processing unit (2149) to the CPU (2001). When the status processing unit (2105) transmits the interrupt packet, the status processing unit (2105) must not transmit the interrupt packet until the next transmission is permitted.

パケットバイトレングス(5006)は128Byte固定である。   The packet byte length (5006) is fixed to 128 bytes.

パケットデータ部(5002)には、画像処理部(2149)の各内部モジュールのステータス情報(5007)が格納されている。ステータス処理部(2105)は画像処理部(2149)内の各モジュールのステータス情報を集め、一括してシステム制御部(2150)に送ることができる。   The packet data part (5002) stores status information (5007) of each internal module of the image processing part (2149). The status processing unit (2105) can collect the status information of each module in the image processing unit (2149) and collectively send it to the system control unit (2150).

Chip ID(5004)にはInterrupt Packetの送信先となるシステム制御部(2150)を表すIDが、また、IntChip ID(5005)にはInterrupt Packetの送信元となる画像処理部(2149)を表すIDが格納される。   The Chip ID (5004) is an ID representing the system control unit (2150) that is the destination of the Interrupt Packet, and the IntChip ID (5005) is an ID representing the image processing unit (2149) that is the source of the Interrupt Packet. Is stored.

[タイル圧縮部]
図12におけるタイル圧縮部2106のブロック図を図1に示す。
[Tile compression section]
FIG. 1 is a block diagram of the tile compression unit 2106 in FIG.

図1において、101はタイルバスインターフェイス部であり、タイルバス2107とハンドシェイクを行い、タイルバス2107から入力されるデータパケットを取得し、後段に接続された各処理ブロックへそれぞれのデータを出力する。   In FIG. 1, reference numeral 101 denotes a tile bus interface unit, which performs handshaking with the tile bus 2107, acquires a data packet input from the tile bus 2107, and outputs each data to each processing block connected to the subsequent stage. .

また、タイルバスインターフェイス部101ではタイルバスから送られてくるヘッダ情報(3001)の解析を行い、ヘッダ情報に矛盾がある場合は後述のレジスタ設定部109に割り込み信号を出力した後、リセット信号(不図示)が入力されるまでタイルバスからデータパケットの取得を停止する。   Further, the tile bus interface unit 101 analyzes the header information (3001) sent from the tile bus. If there is a contradiction in the header information, the tile bus interface unit 101 outputs an interrupt signal to a register setting unit 109 described later, and then outputs a reset signal ( The acquisition of the data packet from the tile bus is stopped until (not shown) is input.

ヘッダ情報(3001)に矛盾がない場合は、後段に接続されたヘッダ情報保持部102に対してヘッダ情報を出力した後、タイルバスから画像データと画像付加情報を取得する。取得した画像データ及び画像付加情報はヘッダ情報のImage Type(3006)を参照して第1圧縮処理部103(本実施例ではJPEG方式による圧縮処理を行う)又は第2圧縮処理部104(本実施例ではパックビッツ方式による圧縮処理を行う)それぞれに画像データと画像付加情報を出力する。   If there is no contradiction in the header information (3001), the header information is output to the header information holding unit 102 connected in the subsequent stage, and then image data and image additional information are acquired from the tile bus. For the acquired image data and image additional information, the first compression processing unit 103 (in this embodiment performs compression processing by the JPEG method) or the second compression processing unit 104 (in this embodiment) refers to the header information Image Type (3006). In the example, the compression process is performed by the Packbits method), and image data and image additional information are output to each.

具体的には、ヘッダ情報におけるImage Typeの上位2ビットが00b(画像データが1ビット)の場合は、画像データは第2圧縮処理部204へ出力される。このとき画像付加情報はタイルバスインターフェイス部101で捨てられる。   Specifically, when the upper 2 bits of the Image Type in the header information are 00b (image data is 1 bit), the image data is output to the second compression processing unit 204. At this time, the image additional information is discarded by the tile bus interface unit 101.

また、ImageTypeの上位2ビットが00b以外の場合、画像データを第1圧縮処理部103へ、画像付加情報を第2圧縮処理部104へ出力する。ただし、Ztype(3020)が画像付加情報がないことを表している場合、画像付加情報は2圧縮処理部に出力されず、第2圧縮処理部による圧縮処理は行わない。   If the upper 2 bits of ImageType are other than 00b, the image data is output to the first compression processing unit 103 and the image additional information is output to the second compression processing unit 104. However, when Ztype (3020) indicates that there is no image additional information, the image additional information is not output to the second compression processing unit, and the compression processing by the second compression processing unit is not performed.

102はヘッダ情報保持部であり、第1圧縮処理部103及び第2圧縮処理部104において画像データ及び画像付加情報の圧縮処理を行う間ヘッダ情報を保持する。また、ヘッダ情報保持部102は格納したヘッダ情報の中から圧縮処理に必要な情報を第1圧縮処理部及び第2圧縮処理部に対して出力する。   Reference numeral 102 denotes a header information holding unit that holds header information while the first compression processing unit 103 and the second compression processing unit 104 perform compression processing of image data and image additional information. In addition, the header information holding unit 102 outputs information necessary for compression processing from the stored header information to the first compression processing unit and the second compression processing unit.

103は第1圧縮処理部であり、本実施例ではJPEG方式による圧縮を行っている。   Reference numeral 103 denotes a first compression processing unit, which performs compression using the JPEG method in this embodiment.

尚、設定によって第1圧縮処理部で圧縮処理を行わずにパケット生成部へ画像データを出力することも可能である。   Note that it is also possible to output image data to the packet generation unit without performing compression processing in the first compression processing unit, depending on the setting.

また、本実施例では第1圧縮処理部はシステム制御部2150に出力する第1の画像データと、後述する再符号部により再符号化処理を行うための第2の画像データを生成し、2つの符号化した画像データをパケット生成部105に出力する。また、パケット生成部105から生データ出力の要求があると、第1圧縮処理部はパケット生成部105に対して圧縮処理を行う前の画像データを出力する。
第1圧縮部103については、後で詳細な説明を行う。
In this embodiment, the first compression processing unit generates first image data to be output to the system control unit 2150 and second image data for performing re-encoding processing by a re-encoding unit to be described later. Two encoded image data are output to the packet generator 105. Further, when there is a request for raw data output from the packet generation unit 105, the first compression processing unit outputs image data before compression processing to the packet generation unit 105.
The first compression unit 103 will be described in detail later.

104は第2圧縮処理部であり、本実施例では情報ロスのない圧縮方式、具体的にはパックビッツ方式による圧縮を行う。   Reference numeral 104 denotes a second compression processing unit, which performs compression according to a compression method with no information loss, specifically, a pack bits method in this embodiment.

第2圧縮処理部では、ヘッダ情報のImage Type(3006)の上位2ビットが00b(画像データが1ビット)の場合は画像データに対する圧縮処理を行い、Image Type(3006)の上位2ビットが00b以外の場合は画像付加情報の圧縮処理を行う。尚、第2圧縮処理部において画像データの圧縮処理を行う場合は第1圧縮処理部は動作しない。   In the second compression processing unit, when the upper 2 bits of the Image Type (3006) of the header information is 00b (image data is 1 bit), the image data is compressed, and the upper 2 bits of the Image Type (3006) is 00b. Otherwise, the image additional information is compressed. The first compression processing unit does not operate when image data compression processing is performed in the second compression processing unit.

尚、設定によって第2圧縮処理部で圧縮処理を行わずにパケット生成部へ画像付加情報又は画像データを出力することも可能である。   Depending on the setting, it is also possible to output image additional information or image data to the packet generation unit without performing compression processing in the second compression processing unit.

また、本実施例では第2圧縮処理部においてもシステム制御部2150に出力する第1の画像付加情報と、後述する再符号部により再符号化処理を行うための第2の画像付加情報を生成し、2つの符号化した画像付加情報をパケット生成部105に出力する。また、パケット生成部105から生データ出力の要求があると、第2圧縮処理部はパケット生成部105に対して圧縮処理を行う前の画像付加情報又は画像データを出力する。   In this embodiment, the second compression processing unit also generates first image additional information output to the system control unit 2150 and second image additional information for performing re-encoding processing by a re-encoding unit described later. Then, the two encoded image additional information is output to the packet generator 105. Further, when there is a request for raw data output from the packet generation unit 105, the second compression processing unit outputs image additional information or image data before the compression processing to the packet generation unit 105.

第2圧縮部104についても、後で詳細な説明を行う。   The second compression unit 104 will also be described in detail later.

105はパケット生成部であり、ヘッダ情報保持部102からはヘッダ情報、第1圧縮処理部103及び第2圧縮処理部104からは符号化した画像データ及び画像付加情報を取得し、ヘッダ情報に対して所定の値を設定してから図13に示すデータパケットを生成して画像リング出力部107及び再符号部106に出力する。   Reference numeral 105 denotes a packet generation unit that acquires header information from the header information holding unit 102, and encoded image data and image additional information from the first compression processing unit 103 and the second compression processing unit 104. After the predetermined value is set, the data packet shown in FIG. 13 is generated and output to the image ring output unit 107 and the re-encoding unit 106.

尚、第1圧縮処理部103及び第2圧縮処理部104から取得した符号化画像データ及び符号化画像付加情報のデータ量によっては、パケット生成部105は後段に対して符号化した画像データ及び画像付加情報の替わりに符号化しない画像データ及び画像付加情報(以下、生画像データ及び生画像付加情報と呼ぶ)を出力する。   Depending on the encoded image data and the amount of encoded image additional information acquired from the first compression processing unit 103 and the second compression processing unit 104, the packet generation unit 105 may encode the image data and the image encoded for the subsequent stage. Instead of the additional information, image data and image additional information (hereinafter referred to as raw image data and raw image additional information) that are not encoded are output.

そのために、パケット生成部105は第1圧縮処理部103及び第2圧縮処理部104に対して生画像データ及び/又は生画像付加情報の出力要求を行う。   For this purpose, the packet generation unit 105 requests the first compression processing unit 103 and the second compression processing unit 104 to output raw image data and / or raw image additional information.

このとき、第1圧縮処理部103及び第2圧縮処理部104に対して生画像データ又は生画像付加情報の出力要求を行う条件として、以下の3つが考えられる。   At this time, the following three conditions can be considered as conditions for requesting the first compression processing unit 103 and the second compression processing unit 104 to output raw image data or raw image additional information.

1.第1圧縮処理部103から取得した符号化画像データのデータ量が生画像データ量よりも大きい(圧縮率が1以下)場合、第1圧縮処理部103に生データ出力要求を行い、生画像データを取得する。   1. When the data amount of the encoded image data acquired from the first compression processing unit 103 is larger than the raw image data amount (compression ratio is 1 or less), a raw data output request is made to the first compression processing unit 103, and the raw image data To get.

2.第2圧縮処理部104から取得した符号化画像付加情報のデータ量が生画像付加情報のデータ量よりも大きい(圧縮率が1以下)場合、第2圧縮処理部104に生データ出力要求を行い、生画像付加情報を取得する。   2. When the data amount of the encoded image additional information acquired from the second compression processing unit 104 is larger than the data amount of the raw image additional information (compression ratio is 1 or less), a raw data output request is made to the second compression processing unit 104. The raw image additional information is acquired.

3.第1圧縮処理部103から取得した符号化画像データのデータ量及び第2圧縮処理部104から取得した符号化画像付加情報のデータ量の加算値が、生画像データ及び生画像付加情報のデータ量の加算値よりも大きい場合、第1圧縮処理部103及び第2圧縮処理部104に対して生データ出力要求を行い、生画像データ及び生画像付加情報を取得する。   3. The added value of the data amount of the encoded image data acquired from the first compression processing unit 103 and the data amount of the encoded image additional information acquired from the second compression processing unit 104 is the data amount of the raw image data and the raw image additional information. Is greater than the added value, a raw data output request is issued to the first compression processing unit 103 and the second compression processing unit 104, and raw image data and raw image additional information are acquired.

上記1及び2の条件では、画像データ及び画像符号化情報はそれぞれ独立に符号化データ又は生データを出力する。すなわち画像データは符号化した画像データのデータ量のみを参照して生データを出力するか符号化データを出力するかを選択する。   Under the above conditions 1 and 2, the image data and the image encoding information output encoded data or raw data independently. That is, the image data is selected with reference to only the data amount of the encoded image data to output raw data or encoded data.

同様に、画像付加情報は符号化した画像付加情報のデータ量のみを参照して生データを出力するか符号化データを出力するかを選択する。   Similarly, the image additional information selects whether to output raw data or encoded data by referring only to the data amount of the encoded image additional information.

上記1及び2の条件で出力するデータを選択すると、パケットのデータ量を最小にすることができる。   When data to be output is selected under the conditions 1 and 2, the data amount of the packet can be minimized.

また、3の条件は符号化した画像データ又は画像付加情報の一方のデータ量が生データより大きくても、符号化した画像データ及び画像付加情報の合計のデータ量が画像データ又は画像付加情報の生データ量の合計よりも小さい場合には符号化したデータを出力することができる。本実施例の構成上、後述する再符号化部において再符号化を行うためには、符号化された画像データが必要であるため、3の条件を使用してパケットを生成してもよい。   The condition 3 is that the total amount of the encoded image data and the image additional information is equal to that of the image data or the image additional information, even if one of the encoded image data or the image additional information is larger than the raw data. If it is smaller than the total amount of raw data, encoded data can be output. In order to perform re-encoding in a re-encoding unit, which will be described later, in the configuration of the present embodiment, encoded image data is necessary. Therefore, a packet may be generated using the three conditions.

本実施例では符号化したデータ量が最小にするために、1及び2の条件で符号化データを出力するか生データを出力するかの選択を行う。   In this embodiment, in order to minimize the amount of encoded data, it is selected whether to output encoded data or raw data under the conditions 1 and 2.

106は再符号部であり、パケット生成部105から送られたデータパケットを再符号化部内にあるローカルメモリに格納する。また、画像リング出力部107からの要求に従い、ローカルメモリに格納しているデータパケットを画像リング出力部に送るとともにデータパケットに含まれる画像データを再圧縮して再びローカルメモリに格納する。   A re-encoding unit 106 stores the data packet sent from the packet generation unit 105 in a local memory in the re-encoding unit. Further, in accordance with a request from the image ring output unit 107, the data packet stored in the local memory is sent to the image ring output unit, and the image data included in the data packet is recompressed and stored in the local memory again.

再符号部106については、後でブロック図を用いて詳細な説明を行う。   The re-encoding unit 106 will be described in detail later using a block diagram.

107は画像リング出力部であり、パケット生成部105及び再符号部106から送られてくるデータパケットを画像リングインターフェース4(2102)に出力する。また、画像リング出力部はデータパケットのヘッダ情報を参照してRAM2002に送ったデータパケットのバイト量を加算し、その加算値が所定の値を越えるとそのデータパケットのヘッダ情報(3001)のIgnore Flag(3022)をセットしてシステム制御部2150に出力するとともに、再符号部106及び第1圧縮処理部103に対して符号量制御信号を出力する。   An image ring output unit 107 outputs a data packet sent from the packet generation unit 105 and the re-encoding unit 106 to the image ring interface 4 (2102). Further, the image ring output unit adds the byte amount of the data packet sent to the RAM 2002 with reference to the header information of the data packet, and when the added value exceeds a predetermined value, the Ignore of the header information (3001) of the data packet. Flag (3022) is set and output to the system control unit 2150, and a code amount control signal is output to the re-encoding unit 106 and the first compression processing unit 103.

109はタイル圧縮部2106内部の処理に関する所設定を行うためのレジスタ設定部であり、タイル圧縮部2106に所定の圧縮処理を行わせるためには、レジスタ設定部109に所定の値を設定する必要がある。   Reference numeral 109 denotes a register setting unit for performing setting related to processing in the tile compression unit 2106. In order to cause the tile compression unit 2106 to perform predetermined compression processing, it is necessary to set a predetermined value in the register setting unit 109 There is.

これらの設定は図14に示すコマンドパケットを用いてシステム制御部2150から画像処理部2149のコマンド処理部2104に送られ、コマンド処理部からレジスタ設定バス2109を介してタイル圧縮部2106に送られる。   These settings are sent from the system control unit 2150 to the command processing unit 2104 of the image processing unit 2149 using the command packet shown in FIG. 14, and are sent from the command processing unit to the tile compression unit 2106 via the register setting bus 2109.

レジスタ設定部109に設定された値は、第1圧縮処理部103及び第2圧縮処理部104に送られ、両圧縮処理部はそれらの設定値を参照することにより決められた処理を行う。   The value set in the register setting unit 109 is sent to the first compression processing unit 103 and the second compression processing unit 104, and both compression processing units perform processing determined by referring to these setting values.

尚、レジスタ設定部へはコマンドパケットを用いて値を設定するだけでなく、コマンドパケットを用いてレジスタ設定部が保持している設定値をシステム制御部2150へ出力することも可能である。   In addition to setting a value to the register setting unit using a command packet, it is also possible to output a setting value held by the register setting unit to the system control unit 2150 using a command packet.

さらに、レジスタ設定部ではヘッダ情報を格納するためのレジスタを持ち、タイルバスインターフェイス部101から割り込み信号が入力されると、タイルバスインターフェイス101からヘッダ情報を取り込んでレジスタに設定するとともに、ステータス処理部2105に対して割り込みが発生したことを知らせるインタラプト信号及びエラーの状態を表すステータス信号を出力する。   Further, the register setting unit has a register for storing header information. When an interrupt signal is input from the tile bus interface unit 101, the header information is fetched from the tile bus interface 101 and set in the register, and the status processing unit An interrupt signal notifying that an interrupt has occurred and a status signal indicating an error state are output to 2105.

108はレジスタ設定バスインターフェイス部であり、レジスタ設定バス2109とレジスタ設定部109とのフォーマット変換を行うためのブロックである。   A register setting bus interface unit 108 is a block for performing format conversion between the register setting bus 2109 and the register setting unit 109.

[第1圧縮処理部]
図2に第1圧縮処理部103のブロック図を示す。
[First compression processing unit]
FIG. 2 shows a block diagram of the first compression processing unit 103.

図2において、201はタイルバスインターフェイス部101から送られてきた画像データを格納するための第1のデータバッファであり、所定量のデータが送られると後段に接続されたDCT変換部202に対して所定の順序に従ってデータを出力する。   In FIG. 2, reference numeral 201 denotes a first data buffer for storing image data sent from the tile bus interface unit 101. When a predetermined amount of data is sent, the DCT conversion unit 202 connected to the subsequent stage is sent to the first data buffer. The data is output according to a predetermined order.

尚、第1のデータバッファにはヘッダ情報保持部102からヘッダ情報のImageType(3006)が入力されており、第1のデータバッファからDCT変換部202へ出力するデータの順序はImage Typeによって制御される。   The first data buffer receives the header information ImageType (3006) from the header information holding unit 102, and the order of the data output from the first data buffer to the DCT conversion unit 202 is controlled by the image type. The

また、パケット生成部105の要求があると格納した画像データを所定の順序に従ってパケット生成部105へ出力する。   When there is a request from the packet generation unit 105, the stored image data is output to the packet generation unit 105 in a predetermined order.

202はDCT変換部であり、第1のデータバッファ201からデータが入力されると、離散コサイン変換を行って周波数成分データに変換する。また、このとき離散コサイン変換によって生成されたDC成分値をラッチ信号とともに後述のサムネール生成部212に出力する。   When a data is input from the first data buffer 201, a DCT conversion unit 202 performs discrete cosine transform and converts it into frequency component data. At this time, the DC component value generated by the discrete cosine transform is output to the thumbnail generation unit 212 (to be described later) together with the latch signal.

また、DCT変換部は後述するサムネール値生成のために離散コサイン変換を行う度にラッチ信号とDC成分値を出力する。   The DCT transform unit outputs a latch signal and a DC component value each time discrete cosine transform is performed to generate a thumbnail value to be described later.

203は量子化部であり、DCT変換部202から出力された周波数成分データに対して、それぞれ所定の量子化値を用いて量子化を行う。尚、量子化に使用する値は後述する量子化テーブルから入力される。量子化に使用する量子化テーブルはヘッダ情報を参照することにより決定される。   A quantization unit 203 quantizes the frequency component data output from the DCT conversion unit 202 using predetermined quantization values. A value used for quantization is input from a quantization table described later. The quantization table used for quantization is determined by referring to the header information.

204及び205は符号量制御部であり、量子化部203で量子化された周波数成分データに対して後述するハフマン符号化部で符号化を行う際に符号量が減少するようデータの制御を行う。   Reference numerals 204 and 205 denote code amount control units that control data so that the code amount is reduced when the frequency component data quantized by the quantization unit 203 is encoded by a Huffman encoding unit described later. .

本実施例では、符号量制御部に入力されるデータを2のn乗(n=0,1,・・・・)で除算することにより符号量の制御を行っている。なお、nの値はレジスタ設定部109のレジスタ値及び画像リング出力部107から入力されている符号量制御信号により符号量制御部204及び205各々独立に設定することができる。   In this embodiment, the code amount is controlled by dividing the data input to the code amount control unit by the power of 2 (n = 0, 1,...). Note that the value of n can be set independently for each of the code amount control units 204 and 205 based on the register value of the register setting unit 109 and the code amount control signal input from the image ring output unit 107.

206及び207はハフマン符号化部であり、符号量制御部204及び205から出力されたデータに対して所定の符号化処理を行って符号化データを生成する。   Reference numerals 206 and 207 denote Huffman encoding units that perform predetermined encoding processing on the data output from the code amount control units 204 and 205 to generate encoded data.

208及び209は第2のデータバッファ及び第3のデータバッファであり、ハフマン符号化部206及び207で符号化した符号化データを格納するためのバッファである。   Reference numerals 208 and 209 denote a second data buffer and a third data buffer, which are buffers for storing the encoded data encoded by the Huffman encoding units 206 and 207, respectively.

第2のデータバッファ208はハフマン符号化部206からの符号化データの入力を終了すると、符号化されたデータ量をData Byte Length 1 として出力するとともに、パケット生成部105の要求に対して格納したデータの出力を行う。   When the second data buffer 208 finishes inputting the encoded data from the Huffman encoding unit 206, the second data buffer 208 outputs the encoded data amount as Data Byte Length 1 and stores it in response to the request of the packet generation unit 105 Output data.

同様に、第3のデータバッファ209もハフマン符号化部207からの符号化データの入力を終了すると、Data Byte Length 2 として符号化されたデータ量を出力し、パケット生成部105の要求に対して格納したデータの出力を行う。   Similarly, when the third data buffer 209 also finishes inputting the encoded data from the Huffman encoding unit 207, the third data buffer 209 outputs the amount of data encoded as Data Byte Length 2, and responds to the request from the packet generation unit 105. Output the stored data.

212はサムネール生成部であり、DCT変換部202からラッチ信号に同期して出力されるDC成分値を用いてタイルごとにサムネール値を生成し、パケット生成部105に出力する。   A thumbnail generation unit 212 generates a thumbnail value for each tile using a DC component value output in synchronization with the latch signal from the DCT conversion unit 202 and outputs the thumbnail value to the packet generation unit 105.

生成されたサムネール値はThumbnail Dataとしてパケット生成部105に出力され、ヘッダ情報のThumbnail Data(3021)に所定のフォーマットで格納される。   The generated thumbnail value is output as Thumbnail Data to the packet generation unit 105, and stored in Thumbnail Data (3021) of the header information in a predetermined format.

210は量子化テーブルであり、量子化部203において量子化を行うための量子化値を格納している。本実施例の量子化テーブルには複数の量子化テーブルが格納されており、後述の量子化テーブル選択部から入力される選択信号によって所定の量子化テーブルを選択して量子化部203に量子化値を出力する。   Reference numeral 210 denotes a quantization table, which stores quantization values for the quantization unit 203 to perform quantization. A plurality of quantization tables are stored in the quantization table of the present embodiment, and a predetermined quantization table is selected by a selection signal input from a quantization table selection unit described later, and the quantization unit 203 performs quantization. Output the value.

213は量子化テーブル選択部であり、量子化テーブル210に対して量子化テーブル選択信号を出力することによって量子化テーブルに格納されている複数のテーブルの中から所定のテーブルを選択する。   Reference numeral 213 denotes a quantization table selection unit, which outputs a quantization table selection signal to the quantization table 210 to select a predetermined table from a plurality of tables stored in the quantization table.

量子化テーブル選択部213にはヘッダ情報保持部202からImageType(3006)、Mode(3025)、Char−flag(3029)、Q−Table Sel(3030)が入力されており、量子化テーブル選択部はこれらのヘッダ情報から使用する量子化テーブルを決定する。   The quantization table selection unit 213 receives ImageType (3006), Mode (3025), Char-flag (3029), and Q-Table Sel (3030) from the header information holding unit 202, and the quantization table selection unit The quantization table to be used is determined from these header information.

使用する量子化テーブルが決まると、量子化テーブル選択部は所定の量子化テーブルを選択するよう量子化テーブル選択信号を量子化テーブルに出力する。また、選択した量子化テーブルを表すQ−Table IDをパケット生成部105に出力する。   When the quantization table to be used is determined, the quantization table selection unit outputs a quantization table selection signal to the quantization table so as to select a predetermined quantization table. Further, the Q-Table ID representing the selected quantization table is output to the packet generation unit 105.

以上説明した、Data Byte Length1、Data Byte Length2、Q−Table ID及びThumbnail Dataはパケット生成部105においてヘッダ情報を生成する際に参照される。   Data Byte Length 1, Data Byte Length 2, Q-Table ID, and Thumbnail Data described above are referred to when the packet generation unit 105 generates header information.

[第2圧縮処理部]
図9に第2圧縮処理部104のブロック図を示す。
[Second compression processing unit]
FIG. 9 shows a block diagram of the second compression processing unit 104.

図9において、901はタイルバスインターフェイス部101から送られてきた画像データ又は画像付加情報を格納するための第4のデータバッファであり、後段に接続されたデータマスク部及びデータ量検出部に対して従ってデータを出力する。   In FIG. 9, reference numeral 901 denotes a fourth data buffer for storing image data or image additional information sent from the tile bus interface unit 101. For the data mask unit and the data amount detection unit connected in the subsequent stage, Therefore, data is output.

また、パケット生成部105の要求があると格納した画像付加情報又は画像データを所定の順序に従ってパケット生成部105へ出力する。   Further, when there is a request from the packet generation unit 105, the stored image additional information or image data is output to the packet generation unit 105 in a predetermined order.

902及び903はデータマスク部であり、データバッファ4から出力された画像付加情報に対して、所定のビットをすべて1又は0に固定するデータマスク処理を行う。   Reference numerals 902 and 903 denote data mask units, which perform data mask processing for fixing all predetermined bits to 1 or 0 for the image additional information output from the data buffer 4.

入力される画像付加情報には、その画素が文字領域内に含まれる画素であるかどうか、有彩色画素であるか無彩色画素であるかといった各画素の画像情報が格納されている。データマスク部ではこれらの画像付加情報の所定の情報を1又は0に固定する。これにより後段のパックビッツ符号化部に入力される。   The input image additional information stores image information of each pixel such as whether the pixel is a pixel included in the character area, whether it is a chromatic color pixel or an achromatic color pixel. In the data mask section, the predetermined information of the image additional information is fixed to 1 or 0. As a result, the data is input to the packbits encoding unit at the subsequent stage.

図10に本実施例におけるデータマスク部によるデータマスク処理を示す。本実施例では画像付加情報は8ビットで構成されており、それぞれのビットが以下の情報を表している。
bit 7−5:固定値
bit 4−3:文字内部信号(文字の太さを表す)
bit 2 :文字信号(その画素が文字に含まれるかどうかを表す)
bit 1 :無彩色信号(その画素が無彩色か結う彩色かを表す)
bit 0 :網中文字(その画素が網点内部の文字であるかどうかを表す)
FIG. 10 shows data mask processing by the data mask unit in this embodiment. In this embodiment, the image additional information is composed of 8 bits, and each bit represents the following information.
bit 7-5: Fixed value bit 4-3: Character internal signal (represents character thickness)
bit 2: Character signal (indicates whether or not the pixel is included in the character)
bit 1: Achromatic signal (represents whether the pixel is achromatic or connected)
bit 0: halftone character (indicates whether the pixel is a character inside a halftone dot)

データマスク部では画像付加情報のこれらの情報に対して、以下に示す5段階のデータマスク処理を行う。
マスクレベル0 マスク無しない(データマスク部に入力された画像付加情報を出力する)
マスクレベル1 文字信号(bit2)が0の場合、無彩色信号(bit1)を強制的に0にする
マスクレベル2 文字信号が0の場合、文字内部フラグ(bit4,3)を強制的に0にする
マスクレベル3 文字信号が0の場合、網中文字フラグ(bit0)を強制的に0にする
マスクレベル4 文字信号以外のbitを0にする
The data mask unit performs the following five stages of data mask processing on these pieces of information of the image additional information.
Mask level 0 No mask (outputs additional image information input to the data mask part)
Mask level 1 When the character signal (bit2) is 0, the achromatic signal (bit1) is forcibly set to 0. Mask level 2 When the character signal is 0, the character internal flag (bits 4 and 3) is forcibly set to 0. Mask level 3 When the character signal is 0, the character flag (bit 0) in the network is forced to 0. Mask level 4 Bits other than the character signal are set to 0.

画像付加情報に対して、上記のデータマスク処理を行うことにより、データマスク部から出力される画像付加情報は同じ値が連続して出力されることが多くなり、そのため後段に接続されたパックビッツ符号化部で符号化を行うと、データマスク処理を行う前の画像付加情報を符号化する場合に比べて符号化後のデータ量を減少させることができる。   By performing the above-described data mask processing on the image additional information, the same value is frequently output continuously from the data mask information output from the data mask unit. When encoding is performed by the encoding unit, the amount of data after encoding can be reduced as compared to the case where image additional information before data mask processing is encoded.

本実施例ではデータマスク部で行われるマスクレベルの設定は、レジスタ設定部109のレジスタ値及び画像リング出力部107から入力されている符号量制御信号により、データマスク部902及び903各々独立に設定することができる。   In this embodiment, the mask level setting performed by the data mask unit is set independently for each of the data mask units 902 and 903 based on the register value of the register setting unit 109 and the code amount control signal input from the image ring output unit 107. can do.

尚、本実施例において上記説明したデータマスク処理を行うのは第2圧縮処理部104に画像付加情報が入力された場合に限る。第2圧縮処理部104に1ビットの画像データが入力された場合はマスク処理は行われない。   Note that the data mask processing described above in the present embodiment is performed only when image additional information is input to the second compression processing unit 104. When 1-bit image data is input to the second compression processing unit 104, mask processing is not performed.

904及び905はパックビッツ符号化部であり、データマスク部902及び903から出力された画像付加情報に対してパックビッツ方式の符号化処理を行って符号化データを生成する。   Numerals 904 and 905 denote pack bits encoding units, which generate encoded data by performing pack bit encoding processing on the image additional information output from the data mask units 902 and 903.

906及び907は第5のデータバッファ及び第6のデータバッファであり、パックビッツ符号化部904及び905で符号化した符号化データを格納するためのバッファである。   Reference numerals 906 and 907 denote a fifth data buffer and a sixth data buffer, which are buffers for storing the encoded data encoded by the Packbits encoding units 904 and 905, respectively.

第5のデータバッファ906はパックビッツ符号化部904からの符号化データの入力を終了すると、パケット生成部105の要求に対して格納したデータの出力を行う。   When the fifth data buffer 906 finishes inputting the encoded data from the Packbits encoding unit 904, the fifth data buffer 906 outputs the stored data in response to the request from the packet generation unit 105.

同様に、第6のデータバッファ907もパックビッツ符号化部905からの符号化データの入力を終了すると、パケット生成部105の要求に対して格納したデータの出力を行う。   Similarly, the sixth data buffer 907 also outputs the stored data in response to the request from the packet generation unit 105 when the input of the encoded data from the Packbits encoding unit 905 is completed.

908はデータ量検出部であり、入力される画像付加情報に対して図10に示した各マスクレベルでデータマスク処理を行った場合に、それぞれのマスクレベルでマスク処理を行った画像付加情報に対してパックビッツ符号化部904又は905でパックビッツ処理を行った場合のデータ量を計算するためのブロックである。   Reference numeral 908 denotes a data amount detection unit. When data mask processing is performed on the input image additional information at each mask level shown in FIG. 10, the image additional information subjected to the mask processing at each mask level is displayed. On the other hand, this is a block for calculating the amount of data when pack bits processing is performed by the pack bits encoding unit 904 or 905.

尚、データ量検出部908ではパックビッツ符号化は行わず、パックビッツ符号化処理を行った際の符号化データ量の算出だけを行う。データ量検出部からはパケット生成部105に対して、マスクレベル0〜4の5つのデータ量の値がZdata Byte Lengthとして出力される。   Note that the data amount detection unit 908 does not perform pack bit encoding but only calculates the amount of encoded data when the pack bit encoding process is performed. From the data amount detection unit, five data amount values of mask levels 0 to 4 are output as Zdata Byte Length to the packet generation unit 105.

[再符号部]
図8に再符号部106のブロック図を示す。
[Recode part]
FIG. 8 shows a block diagram of the re-encoding unit 106.

図8において、801はパケット生成部105から送られるデータパケットを一時格納するためのデータバッファ1であり、データパケット1個分の容量を持つ。データバッファ1には図2においてデータバッファ3(209)に格納された符号化データを用いて生成されたパケットデータが格納される。   In FIG. 8, reference numeral 801 denotes a data buffer 1 for temporarily storing a data packet sent from the packet generator 105, and has a capacity for one data packet. The data buffer 1 stores packet data generated using the encoded data stored in the data buffer 3 (209) in FIG.

データバッファ1に格納されたデータパケットは再符号部内のメモリに格納するためにメモリコントローラ802に出力される。   The data packet stored in the data buffer 1 is output to the memory controller 802 to be stored in the memory in the re-encoding unit.

802はメモリコントローラであり、メモリへのリード動作/ライト動作の制御を行う。メモリコントローラ802には前述のデータバッファ1(801)、後述するデータバッファ2(804)及びデータバッファ3(808)が接続されており、各データバッファのリード/ライト要求によりメモリの所定のアドレスに対してリード/ライトを行う。   Reference numeral 802 denotes a memory controller that controls read / write operations to the memory. The above-mentioned data buffer 1 (801), data buffer 2 (804) and data buffer 3 (808) described later are connected to the memory controller 802, and a predetermined address of the memory is set by a read / write request of each data buffer. Read / write is performed.

803は再符号部内のページメモリであり、パケット生成部105から入力されたデータパケットはデータバッファ1(801)とメモリコントローラ802を介してメモリ803内に格納される。   Reference numeral 803 denotes a page memory in the re-encoding unit, and a data packet input from the packet generation unit 105 is stored in the memory 803 via the data buffer 1 (801) and the memory controller 802.

また、メモリ803はメモリコントローラ802からの要求に対してメモリ内に格納されたデータをメモリコントローラを介してデータバッファ2(804)に出力するとともに、前記データに対して後述する再符号処理を施されたデータをメモリコントローラを介して再びメモリ内部に格納する。   The memory 803 outputs data stored in the memory to the data buffer 2 (804) via the memory controller in response to a request from the memory controller 802, and performs re-encoding processing described later on the data. The obtained data is stored again in the memory via the memory controller.

804は画像リング出力部207の要求によってメモリ803に格納されたデータパケットを画像リング出力部に出力するためのデータバッファ2(804)であり、データパケット1個分の容量を持つ。   Reference numeral 804 denotes a data buffer 2 (804) for outputting a data packet stored in the memory 803 to the image ring output unit in response to a request from the image ring output unit 207, and has a capacity for one data packet.

804に格納されたデータパケットは画像リング出力部に送られるとともに、ヘッダ情報はデータパケット3へ、画像付加情報及び画像データは再符号処理のためにはデータマスク部809及びハフマン復号化部805へ送られる。   The data packet stored in 804 is sent to the image ring output unit, header information is sent to data packet 3, and image additional information and image data are sent to data mask unit 809 and Huffman decoding unit 805 for re-encoding processing. Sent.

805はハフマン復号化部であり、データバッファ2から送られてきた符号化された画像データに対して復号処理を行い、量子化された周波数成分データを生成して符号量制御部806に送る。   A Huffman decoding unit 805 performs decoding processing on the encoded image data sent from the data buffer 2, generates quantized frequency component data, and sends the quantized frequency component data to the code amount control unit 806.

806は符号量制御部であり、前記ハフマン復号化部で生成された量子化周波数成分データに対して符号量が減少するようデータの制御を行う。   Reference numeral 806 denotes a code amount control unit which controls data so that the code amount is reduced with respect to the quantized frequency component data generated by the Huffman decoding unit.

本実施例では、図2における符号量制御部204及び205と同じ様に符号量制御部に入力されたデータに対して2のn乗(n=0,1,・・・・)で除することにより符号量の制御を行う。なお、nの値は不図示のレジスタ又は画像リング出力部107から送られる符号量制御信号により設定することができる。   In this embodiment, the data input to the code amount control unit is divided by 2 to the nth power (n = 0, 1,...) As in the code amount control units 204 and 205 in FIG. Thus, the code amount is controlled. Note that the value of n can be set by a code amount control signal sent from a register (not shown) or the image ring output unit 107.

807はハフマン符号化部であり、前記符号量制御部806から出力されたデータに対して所定の符号化処理を行って符号化データを生成する。本実施例では図2におけるハフマン符号化部206及び207と同等の動作を行う。   Reference numeral 807 denotes a Huffman encoding unit that performs predetermined encoding processing on the data output from the code amount control unit 806 to generate encoded data. In this embodiment, an operation equivalent to that of the Huffman encoders 206 and 207 in FIG. 2 is performed.

809はデータ部分マスク処理部であり、データバッファ2から出力されたパックビッツ符号化された画像付加情報に対して、データ値を表す部分にのみデータマスク部902及び903と同じ処理を行う。すなわち、データバッファ2から入力されるパックビッツ符号化されたデータはデータ値を表す「データ値部分」と、データ値が連続する数又はデータ値が入力される数を表す「数値部分」とから構成されている。データ部分マスク処理部809では入力されるパックビッツ符号化データを解析して「データ値部分」にのみデータマスク処理を行う。   A data partial mask processing unit 809 performs the same processing as the data mask units 902 and 903 only on the portion representing the data value for the pack-bits-encoded image additional information output from the data buffer 2. That is, the Packbits-encoded data input from the data buffer 2 includes a “data value portion” that represents a data value and a “numerical value portion” that represents the number of consecutive data values or the number of input data values. It is configured. The data portion mask processing unit 809 analyzes the input Packbits encoded data and performs data mask processing only on the “data value portion”.

尚、データバッファ2から符号化されていないデータが入力された場合は、入力されたすべてのデータに対してデータマスク処理を行う。   If unencoded data is input from the data buffer 2, data mask processing is performed on all input data.

データ部分マスク処理部809で行うデータマスク処理のマスクレベルは符号量制御信号として画像リング出力部から出力される。   The mask level of the data mask processing performed by the data partial mask processing unit 809 is output from the image ring output unit as a code amount control signal.

810は冗長部パックビッツ符号化部であり、データ部分マスク処理部809においてマスク処理を行った結果、同じ値が連続する部分が多く発生して符号化データ内に発生した冗長部分に対して、再度パックビッツ符号化処理を行う。   810 is a redundant part pack bits encoding unit, and as a result of performing mask processing in the data part mask processing unit 809, for the redundant part generated in the encoded data due to occurrence of many parts where the same value continues, The Packbits encoding process is performed again.

また、データ部分マスク処理部809から符号化されていないデータが出力された場合は、冗長部パックビッツ符号化部810では通常のパックビッツ符号化処理が行われる。   When unencoded data is output from the data partial mask processing unit 809, the redundant part pack bits encoding unit 810 performs normal pack bits encoding processing.

冗長部パックビッツ符号化部で再度圧縮したパックビッツ符号化データはデータバッファ3に格納される。   Pack bit encoded data compressed again by the redundant portion pack bit encoding section is stored in the data buffer 3.

尚、冗長部パックビッツ符号化部810で発生した冗長部分を冗長部パックビッツ符号化部810でパックビッツ圧縮すると、ごくたまにデータ値の連続する部分が多くなるにも関わらず、圧縮後のデータ量がデータマスク処理を行う前のデータ量よりも多くなってしまうことがある。その場合は、冗長部パックビッツ符号化部では圧縮処理を行わずに冗長部分を含んだままデータバッファ3へと出力する。   In addition, when the redundant part generated by the redundant part pack bits encoding unit 810 is pack bit compressed by the redundant part pack bits encoding unit 810, the data after compression is rarely increased even though there are many consecutive data values. The amount may be larger than the data amount before the data mask process is performed. In that case, the redundant part pack bits encoding unit outputs the data to the data buffer 3 without including the redundant part without performing the compression process.

ここで、冗長部パックビッツ符号化部810でパックビッツ圧縮するとデータ量が増えてしまうかどうかの判断は、図9におけるデータ量検出部908から出力される各マスクレベルにおけるパックビッツ符号化データ量であるZdata Byte Lengthを参照することにより行う。   Here, it is determined whether or not the data amount is increased when the pack-bits compression is performed by the redundant part pack-bits encoding unit 810. The pack-bits encoded data amount at each mask level output from the data amount detection unit 908 in FIG. This is done by referring to Zdata Byte Length.

808はデータバッファ3であり、データパケット1個分の容量を持つ。   Reference numeral 808 denotes a data buffer 3, which has a capacity for one data packet.

データバッファ3ではデータバッファ2からヘッダ情報を、ハフマン符号化部807から符号化された画像データを、冗長部パックビッツ符号化部810から画像付加情報を取得し、バッファ内部でヘッダ情報内の所定の情報をあらためて設定した後、符号化画像データ及び画像付加情報から新たなデータパケットを生成する。   The data buffer 3 acquires header information from the data buffer 2, image data encoded from the Huffman encoding unit 807, and image additional information from the redundant portion Packbits encoding unit 810, and stores predetermined information in the header information within the buffer. Then, a new data packet is generated from the encoded image data and the image additional information.

生成したデータパケットはメモリコントローラを介してメモリに格納する。   The generated data packet is stored in the memory via the memory controller.

図7は画像リング出力部107の動作を中心にした本実施例のフローチャートである。図7では便宜的にスキャナ2070から複数ビットのスキャンデータが入力された場合の動作を示しているが、タイル圧縮部に入力される画像データが複数ビットであるデータパケットであれば同様の処理が可能である。   FIG. 7 is a flowchart of the present embodiment focusing on the operation of the image ring output unit 107. FIG. 7 shows the operation when a plurality of bits of scan data is input from the scanner 2070 for convenience, but the same processing is performed if the image data input to the tile compression unit is a data packet having a plurality of bits. Is possible.

また、以下図7及び図3〜図6では画像データのみ説明を行い、画像付加情報の再符号化は省略して説明する。   In the following, only image data will be described in FIGS. 7 and 3 to 6, and re-encoding of image additional information will be omitted.

以下、図7を用いて動作説明を行う。   The operation will be described below with reference to FIG.

まず始めにタイル圧縮部ではデータパケットを受ける前に、初期設定として符号量制御部204に対してn=0(入力されたデータを出力する)、符号量制御部205にn=1(入力されたデータを2で除して出力)、符号量制御部806に対してn=1(符号量制御部205と同様)が設定される。   First, before receiving a data packet in the tile compression unit, n = 0 (outputs the input data) to the code amount control unit 204 as an initial setting, and n = 1 (inputs to the code amount control unit 205). And n = 1 (similar to the code amount control unit 205) is set for the code amount control unit 806.

また、画像リング出力部107内部にあるページカウンタの値を0にする(ステップ701)。   Further, the value of the page counter in the image ring output unit 107 is set to 0 (step 701).

スキャナ2070から原稿をスキャンした画像データのデータパケットがタイル圧縮部に入力されると、画像データは第1の画像圧縮処理部103に送られ、DCT変換、量子化、符号量制御部204及び205による符号量制御、並びにハフマン符号化によりJPEG変換が行われる。   When a data packet of image data obtained by scanning a document from the scanner 2070 is input to the tile compression unit, the image data is sent to the first image compression processing unit 103, and is subjected to DCT conversion, quantization, and code amount control units 204 and 205. The JPEG conversion is performed by the code amount control by, and the Huffman coding.

ここで、符号量制御部204はステップ701によりスルー(1/1)が設定されているため、符号量制御部204を通ってJPEG変換された画像データは量子化部203で設定された量子化値によって量子化されたデータに対してハフマン符号化を行った第1の画像符号データが生成される。   Here, since the code amount control unit 204 is set to “through” (1/1) in step 701, the image data subjected to JPEG conversion through the code amount control unit 204 is quantized by the quantization unit 203. First image code data obtained by performing Huffman coding on the data quantized by the value is generated.

一方、符号量制御部205はステップ701により入力データに対して1/2して出力するよう設定されているため、符号量制御部205を通ってJPEG変換された画像データは量子化部に設定された量子化値の2倍の量子化を行ったデータに対してハフマン符号化を行った第2の画像符号データが生成される。   On the other hand, since the code amount control unit 205 is set to output half the input data in step 701, the image data JPEG converted through the code amount control unit 205 is set in the quantization unit. Second image code data obtained by performing Huffman coding on the data that has been quantized twice the quantized value is generated.

ここで、前記第2の画像符号データは、より大きな値で量子化を行っているため前記第1の画像符号データに比べての符号データの容量が少なくなる。   Here, since the second image code data is quantized with a larger value, the capacity of the code data is smaller than that of the first image code data.

パケット生成部105ではヘッダ情報部102、第1圧縮処理部103及び第2圧縮処理部104から所定のデータが入力されると、それらのデータから前記第1の画像符号化データを用いた第1のデータパケット及び第2の画像符号化データを用いた第2のデータパケットを生成して画像リング出力部にデータの出力要求を行う。   When predetermined data is input from the header information unit 102, the first compression processing unit 103, and the second compression processing unit 104, the packet generation unit 105 uses the first encoded image data from the data. The second data packet using the second data packet and the second image encoded data is generated, and a data output request is made to the image ring output unit.

画像リング出力部は上記パケット生成部105からのデータ出力要求があると(ステップ702)、パケット生成部から第1のデータパケットを受け取り(ステップ703)、第2のデータパケットをローカルメモリ803に格納する(ステップ704)。   When there is a data output request from the packet generation unit 105 (step 702), the image ring output unit receives the first data packet from the packet generation unit (step 703) and stores the second data packet in the local memory 803. (Step 704).

画像リング出力部では第1のデータパケットのヘッダ情報を参照することによりデータパケットの容量を取得してページカウンタに前記容量を加算し(ステップ705)、その後ページカウンタの値とメインメモリ容量(RAM2002のデータパケット格納のための容量)を比較する(ステップ706)。   The image ring output unit obtains the capacity of the data packet by referring to the header information of the first data packet, adds the capacity to the page counter (step 705), and then the value of the page counter and the main memory capacity (RAM 2002). Are compared (step 706).

ステップ706において、ページカウンタの値がメインメモリ容量以下の場合、メインメモリ上には画像リング出力部が取得したデータパケットを格納するだけの容量があるので、画像リング出力部からシステム制御部システム制御部2150にデータパケットを出力し、RAM2002にデータパケットを格納して(ステップ707)、1パケット分のデータ転送を終了する。   In step 706, if the value of the page counter is less than or equal to the main memory capacity, the main memory has a capacity to store the data packet acquired by the image ring output unit. The data packet is output to the unit 2150, the data packet is stored in the RAM 2002 (step 707), and the data transfer for one packet is completed.

1パケット分のデータ転送を終えると、画像リング出力部では1ページ分のデータパケットを出力したか判断を行い(ステップ708)、1ページ分のデータパケットの転送が終了している場合は動作を終了する。また、データパケットの転送が終了していない場合は、ステップ702に戻り、上記ステップ702からステップ707の動作を繰り返す。   When the data transfer for one packet is completed, the image ring output unit determines whether the data packet for one page has been output (step 708), and the operation is performed when the transfer of the data packet for one page has been completed. finish. On the other hand, if the transfer of the data packet has not ended, the process returns to step 702 and the operations from step 702 to step 707 are repeated.

一方、ステップ706においてページカウンタの値がメインメモリの容量を越えると、メインメモリは1ページ分のデータパケットを格納することができないため圧縮率の高い、データ容量の少ないデータをページの初めから再度メインメモリに格納する必要が生ずる。   On the other hand, if the value of the page counter exceeds the capacity of the main memory in step 706, the main memory cannot store a data packet for one page, so that data with a high compression ratio and a small data capacity is re-started from the beginning of the page. There is a need to store it in main memory.

そのために、画像リング出力部はまずパケット生成部から取得したデータパケットのヘッダ情報3001内のIgnore Flag(3022)をセットし、そのデータパケットをシステム制御部に出力してメインメモリのクリアを行う(ステップ709)とともに、ページカウンタ値を0にクリアする(ステップ710)。   For this purpose, the image ring output unit first sets the Ignore Flag (3022) in the header information 3001 of the data packet acquired from the packet generation unit, and outputs the data packet to the system control unit to clear the main memory ( At the same time as step 709), the page counter value is cleared to 0 (step 710).

システム制御部ではIgnore Flagがセットされたデータパケットを取得すると、RAMコントローラ2124によりRAMをクリアする(具体的には図6におけるPacket Address Pointerを0にする)ことで、それまでRAMに格納したデータパケットを無効とする。   When the system controller obtains the data packet in which the Ignor Flag is set, the RAM controller 2124 clears the RAM (specifically, the Packet Address Pointer in FIG. 6 is set to 0), so that the data stored in the RAM until then. Invalidate the packet.

メインメモリとページカウンタがクリアされると、次に画像リング出力部はローカルメモル803に対して格納したデータパケットを出力するよう指示を行う(ステップ711)。   When the main memory and the page counter are cleared, the image ring output unit next instructs the local memory 803 to output the stored data packet (step 711).

これによりローカルメモリは、それまでにローカルメモリ内に格納したデータパケットを画像リング出力部に全て出力するまで画像リング出力部に対して出力要求を行う。   As a result, the local memory issues an output request to the image ring output unit until all the data packets stored in the local memory are output to the image ring output unit.

また、画像リング出力部は符号量制御部204及び205に符号量の制御を行うように符号量制御信号の出力を行う。符号量制御部は画像リング部から符号量制御信号が入力されると、符号量制御部に設定されている除算の値を、それまで設定されていた値に対して1/2した値を新たに設定する(ステップ712)。   The image ring output unit outputs a code amount control signal so that the code amount control units 204 and 205 control the code amount. When the code amount control signal is input from the image ring unit, the code amount control unit newly sets a value obtained by halving the division value set in the code amount control unit to the previously set value. (Step 712).

これにより、DCT変換部202から出力された周波数成分データは、ハフマン符号化を行う前にそれまでの2倍の値で量子化が行われる。   As a result, the frequency component data output from the DCT transform unit 202 is quantized with a value twice that before the Huffman coding.

また、ステップ711により符号量制御部204に新たに設定された値は、それまで符号量制御部205に設定されていた値であるため、ステップ711以降にハフマン符号化部206からパケット生成部105及び画像リング出力部107を介してメインメモリに出力されるデータパケットと、ステップ711以前にハフマン符号化部207からパケット生成部105を介してローカルメモリに出力されたデータパケットは同一の量子化値により量子化された画像データとなる。   Further, since the value newly set in the code amount control unit 204 in step 711 is the value set in the code amount control unit 205 until then, the Huffman encoding unit 206 to the packet generation unit 105 after step 711. The data packet output to the main memory via the image ring output unit 107 and the data packet output from the Huffman encoding unit 207 to the local memory via the packet generation unit 105 before step 711 have the same quantized value. The image data is quantized by.

ステップ711により符号量制御部の設定値を変更すると、画像リング出力部はステップ702に戻ってパケット生成部からスキャンデータの出力要求があるかを判定する。ここでスキャンデータの出力要求があるとステップ703〜705により再びスキャンデータを取得してメインメモリ及びローカルメモリにデータパケットを格納する。   When the setting value of the code amount control unit is changed in step 711, the image ring output unit returns to step 702 and determines whether there is a scan data output request from the packet generation unit. If there is a scan data output request, the scan data is acquired again in steps 703 to 705, and the data packet is stored in the main memory and the local memory.

また、ステップ702でパケット生成部からスキャンデータの出力要求がない場合はステップ713に進み、ローカルメモリから出力要求が出ている場合はローカルメモリからデータパケットを取得する(ステップ714)とともに、取得したデータパケットをハフマン復号化部805、符号量制御部806及びハフマン符号化部807により画像データに対して再符号化を行い、再びデータパケットを生成してローカルメモリに格納する(ステップ715)。   If there is no scan data output request from the packet generation unit in step 702, the process proceeds to step 713. If an output request is issued from the local memory, the data packet is acquired from the local memory (step 714). The data packet is re-encoded with respect to the image data by the Huffman decoding unit 805, the code amount control unit 806, and the Huffman encoding unit 807, and the data packet is generated again and stored in the local memory (step 715).

尚、ステップ713においてローカルメモリから出力要求が出ていない場合は、ステップ702に戻り再びスキャンデータの出力要求を検知する。   If no output request is issued from the local memory in step 713, the process returns to step 702 to detect the scan data output request again.

図3〜6は本実施例におけるタイル圧縮部の画像データの流れを示す図である。以降、本実施例の動作を図3〜6を用いて説明する。   3 to 6 are diagrams showing the flow of image data of the tile compression unit in the present embodiment. Hereinafter, the operation of the present embodiment will be described with reference to FIGS.

尚、図3〜6では主要な部分のみを示している。   3 to 6 show only main parts.

図3はスキャン動作が開始されて、ページカウンタ値がメインメモリ容量を越える前の状態を示しており、符号量制御部204及び205はステップ701で設定した値で動作している。これにより、メインメモリには量子化部203で量子化された符号化画像データが、ローカルメモリには量子化部203で量子化された後、さらに1/2の値にされた(量子化部に設定された値の2倍の値で量子化された)符号化画像データが格納される。   FIG. 3 shows a state before the scan operation is started and the page counter value exceeds the main memory capacity. The code amount control units 204 and 205 operate with the values set in step 701. As a result, the encoded image data quantized by the quantizing unit 203 in the main memory is quantized by the quantizing unit 203 in the local memory and further reduced to a half value (quantizing unit). Encoded image data (quantized with a value twice the value set in) is stored.

図3において、301はローカルメモリ内部、302はメインメモリであるRAM2002のメモリ内部の状態を示している。メインメモリ内には量子化部203で量子化された符号化画像データ(縦線で表示)が格納され、一方ローカルメモリ内には量子化部に設定された値の2倍の値で量子化された符号化画像データ(斜線で表示)が格納される。   In FIG. 3, reference numeral 301 denotes the internal state of the local memory, and 302 denotes the internal state of the RAM 2002, which is the main memory. Encoded image data quantized by the quantizing unit 203 (displayed by vertical lines) is stored in the main memory, while the local memory is quantized with a value twice the value set in the quantizing unit. The encoded image data (displayed with diagonal lines) is stored.

図4はステップ706においてページカウンタの値がメインメモリ容量を越えた後の状態を示している。符号量制御部204及び205はステップ712によりそれぞれ204には1/2、205には1/4が設定され、メインメモリには量子化部に設定された値の2倍の値で量子化された符号化画像データが、ローカルメモリには量子化部で量子化された後で1/4の値にされた(量子化部に設定された値の4倍の値で量子化された)画像データが格納される。   FIG. 4 shows a state after the value of the page counter exceeds the main memory capacity in step 706. In step 712, the code amount control units 204 and 205 are set to 1/2 in 204 and 1/4 in 205, respectively, and the main memory is quantized with a value twice the value set in the quantization unit. The encoded image data is quantized in the local memory after being quantized by the quantizing unit, and is reduced to a quarter value (quantized by four times the value set in the quantizing unit). Data is stored.

またローカルメモリからは、それまでに格納されていた(量子化部に設定された値の2倍の値で量子化された)画像データをメインメモリに対して出力するとともに、ハフマン複合化部805、符号量制御部806(ステップ701により1/2に設定されている)及びハフマン符合化部807により量子化部に設定された値の4倍の値で量子化された符号化画像データを生成してローカルメモリに格納する。   Further, the local memory outputs the image data (quantized with a value twice the value set in the quantization unit) stored so far to the main memory, and the Huffman complexing unit 805. Code amount control unit 806 (set to 1/2 by step 701) and Huffman encoding unit 807 generate encoded image data quantized with a value four times the value set in the quantization unit And store it in local memory.

以上の動作により、ローカルメモリには301に示すようにメインメモリに出力するための量子化部に設定された値の2倍の値で量子化された符号化画像データ(斜線で表示)と、ハフマン符号化部207及び807で生成された量子化部に設定された値の4倍の値で量子化された符号化画像データ(網線で表示)が格納される。   As a result of the above operation, the encoded image data (displayed with diagonal lines) quantized with a value twice the value set in the quantization unit for output to the main memory as shown in 301 in the local memory, Stored is encoded image data (displayed by a halftone line) quantized with a value four times the value set in the quantization unit generated by the Huffman encoding units 207 and 807.

また、メインメモリにはローカルメモリに格納された量子化部に設定された値の2倍の値で量子化された符号化画像データ及びハフマン符号化206で生成された量子化部に設定された値の2倍の値で量子化された符号化画像データ(斜線で表示)が格納される。   The main memory is set to the quantized unit generated by the Huffman encoding 206 and the encoded image data quantized with a value twice the value set in the quantizing unit stored in the local memory. Encoded image data (displayed with diagonal lines) quantized with twice the value is stored.

尚、図4においてメインメモリに格納される画像データは、ローカルメモリから出力される画像データとパケット生成部から入力されるスキャンデータが順不同でメインメモリに格納される。また、ローカルメモリに格納される量子化部に設定された値の4倍の値で量子化された符号化画像データも、ハフマン符号化部207から出力された画像データと807から出力された画像データが順不同で格納される。   In FIG. 4, the image data stored in the main memory has the image data output from the local memory and the scan data input from the packet generation unit stored in the main memory in no particular order. Also, the encoded image data quantized with a value four times the value set in the quantization unit stored in the local memory is the image data output from the Huffman encoding unit 207 and the image output from 807. Data is stored out of order.

これらの画像はヘッダ情報3001のPacket ID(3009)及び(3010)により原稿上の位置、及び印字順序の管理を行う。   These images manage the position on the document and the printing order based on the packet IDs (3009) and (3010) of the header information 3001.

図5は図4において、ローカルメモリから量子化部に設定された値の2倍の値で量子化された符号化画像データを全てメインメモリに格納した後の状態を示している。図4ではローカルメモリからメインメモリへ画像データが転送されず、またハフマン復号化部805、符号量制御部806及びハフマン符号化部807は動作を停止している。   FIG. 5 shows a state after all the encoded image data quantized with a value twice the value set in the quantization unit from the local memory in FIG. 4 is stored in the main memory. In FIG. 4, the image data is not transferred from the local memory to the main memory, and the operation of the Huffman decoding unit 805, the code amount control unit 806, and the Huffman encoding unit 807 is stopped.

そしてメインメモリには量子化部に設定された値の2の値で量子化された符号化画像データが、ローカルメモリには量子化部に設定された値の4倍の値で量子化された符号化画像データがそれぞれ格納される。   Then, the encoded image data quantized with the value 2 set in the quantization unit in the main memory is quantized with a value four times the value set in the quantization unit in the local memory. Each of the encoded image data is stored.

図6は図5の状態から、ステップ706で再びページカウンタの値がメインメモリ容量を越えた後の状態を示している。符号量制御部204及び204はステップ712によりそれぞれ204には1/4、205には1/8が設定され、メインメモリには量子化部に設定された値の4倍の値で量子化された符号化画像データが、ローカルメモリには量子化部に設定された値の8倍の値で量子化された画像データが格納される。   FIG. 6 shows a state after the value of the page counter exceeds the main memory capacity again in step 706 from the state of FIG. In step 712, the code amount control units 204 and 204 are set to 1/4 in 204 and 1/8 in 205, respectively, and the main memory is quantized with a value four times the value set in the quantization unit. The encoded image data obtained by quantizing the encoded image data with a value eight times the value set in the quantization unit is stored in the local memory.

それと同時に、ローカルメモリからはそれまでに格納された画像データをメインメモリに対して出力するとともに、ハフマン複合化部805、符号量制御部806及びハフマン符合化部807により量子化部に設定された値の8倍の値で量子化された符号化画像データを生成してローカルメモリに格納する(横線で表示)。   At the same time, the image data stored so far is output from the local memory to the main memory, and set in the quantization unit by the Huffman combination unit 805, the code amount control unit 806, and the Huffman encoding unit 807. Coded image data quantized with 8 times the value is generated and stored in the local memory (indicated by a horizontal line).

以上の動作をスキャナからのデータ入力を終了するまで繰り返すことで、メインメモリにはメモリ内に格納できる最適な圧縮率による画像が格納できる。   By repeating the above operation until the data input from the scanner is completed, the main memory can store an image having an optimum compression rate that can be stored in the memory.

尚、上記説明では符号量制御部で入力されたデータを所定の値で除す事によって符号量制御を行っていたが、後段に接続されるハフマン符号化によってデータ容量が減少する、すなわちJPEG圧縮を行った際に圧縮率が向上するならば、符号量制御部の動作を限定するものではない。   In the above description, the code amount control is performed by dividing the data input by the code amount control unit by a predetermined value. However, the data capacity is reduced by the Huffman coding connected to the subsequent stage, that is, JPEG compression. If the compression rate is improved when performing the above, the operation of the code amount control unit is not limited.

また、上記説明では画像データの圧縮方法にJPEG方式を使用したが、本実施例はJPEG圧縮方式に限定するものではなく、設定により圧縮率を変えることができる圧縮方法であればパックビッツ方式又はそれ以外の圧縮方法により画像データを圧縮することも可能である。   In the above description, the JPEG method is used as a method for compressing image data. However, the present embodiment is not limited to the JPEG compression method. If the compression method can change the compression rate according to the setting, the Packbits method or It is also possible to compress the image data by other compression methods.

さらに、上記説明ではページカウンタ値とメインメモリ容量を比較することによりメインメモリに格納する圧縮率を変更していたが、ページカウンタ値と比較する値は他の値でも構わず、また、読み込むべき全画像データに対する読み込まれた画像データの割合によって変化させることも可能である。   Further, in the above description, the compression ratio stored in the main memory is changed by comparing the page counter value with the main memory capacity. However, the value to be compared with the page counter value may be another value and should be read. It is also possible to change the ratio according to the ratio of read image data to all image data.

本実施例におけるタイル圧縮部2106のブロック図Block diagram of the tile compression unit 2106 in the present embodiment 第1圧縮処理部103のブロック図Block diagram of the first compression processing unit 103 本実施例における第1の動作説明図First operation explanatory diagram in this embodiment 本実施例における第2の動作説明図Second operation explanatory diagram in the present embodiment 本実施例における第3の動作説明図3rd operation explanatory drawing in a present Example 本実施例における第4の動作説明図4th operation explanatory drawing in a present Example. 本実施例における動作を示すフローチャートFlow chart showing the operation in this embodiment 再符号部106のブロック図Block diagram of re-encoding unit 106 第2圧縮処理部103のブロック図Block diagram of the second compression processing unit 103 データマスク部902及び903の動作を説明するための図The figure for demonstrating operation | movement of the data mask parts 902 and 903 本システムの実使用環境を表す図Diagram showing actual usage environment of this system 本システムコントローラの全体ブロック図Overall block diagram of this system controller イメージパケットを表す図A diagram representing an image packet コマンドパケットを表す図Diagram showing command packet インタラプトパケットを表す図Diagram showing interrupt packet パケットテーブルを表す図Diagram showing packet table

符号の説明Explanation of symbols

101 タイルバスインターフェイス部
102 ヘッダ情報保持部
103 第1圧縮処理部
104 第2圧縮処理部
105 パケット生成部
106 再符号部
107 画像リング出力部
108 レジスタ設定バスインターフェイス部
109 レジスタ設定部
101 tile bus interface unit 102 header information holding unit 103 first compression processing unit 104 second compression processing unit 105 packet generation unit 106 recoding unit 107 image ring output unit 108 register setting bus interface unit 109 register setting unit

Claims (4)

画像情報を入力する画像入力手段、
前記画像入力手段から入力された画像情報を所定の単位に分割する分割手段、
前記分割手段によって分割された画像情報は複数のデータを有する、
前記分割手段により分割した所定の単位の複数のデータをそれぞれ符号化処理する複数の符号化手段、
前記符号化手段により符号化される前と後のデータのデータ量を比較する比較手段、
前記比較手段の比較結果によって、前記符号化されたデータと符号化される前のデータのどちらを出力するかを選択して出力するデータ出力手段、
を有することを特徴とする画像処理装置。
Image input means for inputting image information;
A dividing unit for dividing the image information input from the image input unit into predetermined units;
The image information divided by the dividing means has a plurality of data.
A plurality of encoding means for encoding each of a plurality of data in a predetermined unit divided by the dividing means;
Comparison means for comparing the amount of data before and after being encoded by the encoding means;
Data output means for selecting and outputting either the encoded data or the data before encoding according to the comparison result of the comparison means;
An image processing apparatus comprising:
請求項1記載の画像処理装置において、前記画像入力手段はスキャナなどの原稿読取装置であることを特徴とする画像処理装置。   2. The image processing apparatus according to claim 1, wherein the image input means is a document reading apparatus such as a scanner. 請求項1記載の画像処理装置において、前記複数の符号化手段のひとつはJPEG方式による符号化処理であることを特徴とする画像処理装置。   2. The image processing apparatus according to claim 1, wherein one of the plurality of encoding means is an encoding process by a JPEG method. 請求項1記載の画像処理装置において、前記複数の符号化手段のひとつはパックビッツ方式による符号化処理であることを特徴とする画像処理装置。   The image processing apparatus according to claim 1, wherein one of the plurality of encoding units is an encoding process by a Packbits method.
JP2005042180A 2005-02-18 2005-02-18 Image processing device Withdrawn JP2006229688A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005042180A JP2006229688A (en) 2005-02-18 2005-02-18 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005042180A JP2006229688A (en) 2005-02-18 2005-02-18 Image processing device

Publications (1)

Publication Number Publication Date
JP2006229688A true JP2006229688A (en) 2006-08-31

Family

ID=36990620

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005042180A Withdrawn JP2006229688A (en) 2005-02-18 2005-02-18 Image processing device

Country Status (1)

Country Link
JP (1) JP2006229688A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008124969A (en) * 2006-11-15 2008-05-29 Ikegami Tsushinki Co Ltd Lossless image coding method and lossless image coding apparatus
US8515188B2 (en) 2010-02-04 2013-08-20 Canon Kabushiki Kaisha Image processing apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008124969A (en) * 2006-11-15 2008-05-29 Ikegami Tsushinki Co Ltd Lossless image coding method and lossless image coding apparatus
US8515188B2 (en) 2010-02-04 2013-08-20 Canon Kabushiki Kaisha Image processing apparatus

Similar Documents

Publication Publication Date Title
US7468803B2 (en) Image processing apparatus and image processing method
US7130072B2 (en) Multifunction system, image processing method, computer program and memory medium
JP2006067117A (en) Device and method for encoding image, computer program, and computer readable storage medium
US7447384B2 (en) Image processing method and apparatus
JP3862605B2 (en) Image processing device
JP2004221998A (en) Image processor
JP2006229688A (en) Image processing device
JP2003316714A (en) Apparatus and method for information processing
US6879725B2 (en) Method, system, and program for decoding a section from compressed data
JP2001332976A (en) Device and method for processing image
JP2003189109A (en) Image processor and image processing method, and computer program
US20080025620A1 (en) Data compression apparatus and data compressing program storage medium
US6069980A (en) Adaptive character image generation and synthesis
JP2005045458A (en) Image compression method and apparatus
JP2003348355A (en) Image processing apparatus and control method therefor
JP4136573B2 (en) Image processing method, image processing apparatus, program, and recording medium
JP2003078770A (en) Image processing method and its apparatus
JP2003234904A (en) Multifunction system controller
JP2003250050A (en) Image processing apparatus and control method thereof
JP2003234909A (en) Image processing apparatus
JP2004253906A (en) Expanding apparatus
JP2003234910A (en) Multifunction system
JP2003069831A (en) Image processor, image display method and computer program
JP2003234908A (en) Image processing apparatus
JP2004120135A (en) Image processor, and control method therefor

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20080513