JP2012134659A - Image processing device and image processing method - Google Patents

Image processing device and image processing method Download PDF

Info

Publication number
JP2012134659A
JP2012134659A JP2010283615A JP2010283615A JP2012134659A JP 2012134659 A JP2012134659 A JP 2012134659A JP 2010283615 A JP2010283615 A JP 2010283615A JP 2010283615 A JP2010283615 A JP 2010283615A JP 2012134659 A JP2012134659 A JP 2012134659A
Authority
JP
Japan
Prior art keywords
value
slide
data
pixel
encoding
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.)
Pending
Application number
JP2010283615A
Other languages
Japanese (ja)
Inventor
Naohito Shiraishi
尚人 白石
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2010283615A priority Critical patent/JP2012134659A/en
Publication of JP2012134659A publication Critical patent/JP2012134659A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an image processing device and an image processing method capable of compressing both a multivalued image and a small-valued image with sufficient compressibility.SOLUTION: The image processing device comprises a coding part 204 which performs coding. When coding of the multivalued image is designated with a coding designation signal, the coding part 204 codes the multivalued image by a prediction error system using a prediction error value calculated by a prediction error generation processing part 301. When coding of the small-valued image is designated with the coding designation signal on the other hand, the coding part 204 codes the small-valued image by a coding system different from the prediction error system.

Description

本発明は、画像処理装置および画像処理方法に関する。   The present invention relates to an image processing apparatus and an image processing method.

プリンタなどの画像形成装置では、入力された画像データを一時的にメモリに記憶し、このメモリに記憶された画像データを所定のタイミングで読み出して、印刷動作を行う。この場合、画像データをそのままメモリに格納しようとすると、大容量のメモリが必要になりコストが上昇する。そのため、一般的には、入力された画像データを圧縮符号化してメモリに格納するようにしている。   An image forming apparatus such as a printer temporarily stores input image data in a memory, reads the image data stored in the memory at a predetermined timing, and performs a printing operation. In this case, if the image data is stored in the memory as it is, a large-capacity memory is required and the cost increases. Therefore, generally, input image data is compression-encoded and stored in a memory.

例えば特許文献1には、階調数が1ビット(階調数「2」)の2値画像(少値画像)、および、階調数が1ビットを上回る多値画像のそれぞれの圧縮時に、符号化対象の画素(「注目画素」)の画素値と、当該注目画素の画素値の予測値との差分である予測誤差値を用いた予測誤差方式で符号化を行う技術が開示されている。   For example, in Patent Document 1, a binary image (low-value image) having a gradation number of 1 bit (gradation number “2”) and a multi-value image having a gradation number exceeding 1 bit are compressed at each time. A technique is disclosed in which encoding is performed by a prediction error method using a prediction error value that is a difference between a pixel value of a pixel to be encoded (“target pixel”) and a predicted value of the pixel value of the target pixel. .

しかしながら、上述の予測誤差方式は多値画像を圧縮符号化するのに適した方式であるものの、少値画像の圧縮符号化には適していないために、少値画像について十分な圧縮率を得るのは困難であるという問題がある。   However, although the above-described prediction error method is a method suitable for compressing and encoding a multi-valued image, it is not suitable for compressing and encoding a small-valued image, so that a sufficient compression rate is obtained for a small-valued image. There is a problem that it is difficult.

本発明は、上記に鑑みてなされたものであって、多値画像および少値画像の両方を十分な圧縮率で符号化することを目的とする。   The present invention has been made in view of the above, and an object of the present invention is to encode both a multi-value image and a low-value image with a sufficient compression rate.

上述した課題を解決し、目的を達成するために、本発明は、階調数が所定数を上回る多値画像、または、階調数が前記所定数以下の少値画像を構成する複数の画素の各々の画素値が書き込まれる第1記憶手段と、前記第1記憶手段から、符号化対象である注目画素の画素値を読み出す第1読み出し手段と、前記注目画素の周辺の画素の画素値に基づいて、当該注目画素の画素値の予測値を算出する第1予測値算出手段と、前記第1予測値算出手段で算出された前記予測値と、前記注目画素の画素値との差分である予測誤差値を算出する第1予測誤差値算出手段と、前記多値画像の符号化を行う場合は、前記予測誤差算出手段で算出された前記予測誤差値を用いた予測誤差方式で符号化を行う一方、前記少値画像の符号化を行う場合は、前記予測誤差方式とは異なる符号化方式で符号化を行う符号化部と、を備えることを特徴とする。   In order to solve the above-described problems and achieve the object, the present invention provides a plurality of pixels constituting a multi-valued image having a gradation number exceeding a predetermined number or a low-value image having a gradation number equal to or less than the predetermined number. The first storage means in which each pixel value is written, the first readout means for reading out the pixel value of the target pixel to be encoded from the first storage means, and the pixel values of the pixels around the target pixel Based on the first predicted value calculating means for calculating the predicted value of the pixel value of the target pixel based on the prediction value calculated by the first predicted value calculating means and the pixel value of the target pixel. When encoding the multi-valued image with a first prediction error value calculation unit that calculates a prediction error value, encoding is performed by a prediction error method using the prediction error value calculated by the prediction error calculation unit. On the other hand, when encoding the low-value image, the pre- It characterized in that it comprises an encoding unit performs encoding in different encoding schemes and error method.

また、本発明は、階調数が所定数以上の多値画像、または、階調数が前記所定数を下回る少値画像を構成する複数の画素の各々の画素値が書き込まれる第1記憶手段から、符号化対象である注目画素の画素値を読み出す第1ステップと、前記注目画素の周辺の画素の画素値に基づいて、当該注目画素の画素値の予測値を算出する第2ステップと、前記第2ステップで算出された前記予測値と、前記注目画素の画素値との差分である予測誤差値を算出する第3ステップと、前記多値画像の符号化を行う場合は、第3ステップで算出された前記予測誤差値を用いた予測誤差方式で符号化を行う一方、前記少値画像の符号化を行う場合は、前記予測誤差方式とは異なる符号化方式で符号化を行う第4ステップと、を備えることを特徴とする。   Further, the present invention provides a first storage means in which pixel values of a plurality of pixels constituting a multi-value image having a predetermined number of gradations or a low-value image having a number of gradations less than the predetermined number are written. A first step of reading a pixel value of a target pixel that is an encoding target, and a second step of calculating a predicted value of the pixel value of the target pixel based on pixel values of pixels around the target pixel; A third step of calculating a prediction error value which is a difference between the predicted value calculated in the second step and a pixel value of the target pixel; and a third step when encoding the multi-valued image. On the other hand, when encoding is performed with the prediction error method using the prediction error value calculated in step 4, while encoding the low-value image, encoding is performed with an encoding method different from the prediction error method. And a step.

本発明によれば、多値画像の符号化を行う場合は、予測誤差方式で符号化を行う一方、少値画像の符号化を行う場合は、予測誤差方式とは異なる符号化方式で符号化を行うので、多値画像および少値画像の両方を予測誤差方式で符号化する構成に比べて、少値画像の圧縮率を高めることができるという有利な効果を奏する。   According to the present invention, when encoding a multi-level image, encoding is performed using a prediction error method, while when encoding a low-value image, encoding is performed using a coding method different from the prediction error method. Therefore, an advantageous effect is achieved in that the compression ratio of the low-value image can be increased as compared with the configuration in which both the multi-value image and the low-value image are encoded by the prediction error method.

図1は、この発明の実施形態による画像処理装置を適用可能な画像形成装置の機構部の構成例を示す略線図である。FIG. 1 is a schematic diagram illustrating a configuration example of a mechanism unit of an image forming apparatus to which an image processing apparatus according to an embodiment of the present invention can be applied. 図2は、画像形成装置における電装・制御装置の構成の一例を示すブロック図である。FIG. 2 is a block diagram illustrating an example of the configuration of the electrical / control apparatus in the image forming apparatus. 図3は、画像形成装置の全体的な動作の例を概略的に示すフローチャートである。FIG. 3 is a flowchart schematically showing an example of the overall operation of the image forming apparatus. 図4は、符号化部の構成の一例を示す図である。FIG. 4 is a diagram illustrating an example of the configuration of the encoding unit. 図5は、予測誤差生成処理部の構成の一例を示す図である。FIG. 5 is a diagram illustrating an example of the configuration of the prediction error generation processing unit. 図6は、注目画素の周辺画素を説明するための図である。FIG. 6 is a diagram for explaining the peripheral pixels of the target pixel. 図7は、予測処理の算出方法を説明するための図である。FIG. 7 is a diagram for explaining a calculation method of the prediction process. 図8は、符号フォーマットの例を示す図である。FIG. 8 is a diagram illustrating an example of a code format. 図9は、本実施形態の符号化処理を説明するための図である。FIG. 9 is a diagram for explaining the encoding process of the present embodiment. 図10−1は、スライド探索処理およびリスト探索処理におけるフラグ処理を説明するための図である。FIG. 10A is a diagram for explaining flag processing in the slide search processing and the list search processing. 図10−2は、スライド探索処理およびリスト探索処理におけるフラグ処理を説明するための図である。FIG. 10-2 is a diagram for explaining flag processing in the slide search processing and the list search processing. 図11−1は、フラグ処理を行った場合のスライド探索処理およびリスト探索処理を説明するための図である。FIG. 11A is a diagram for explaining the slide search process and the list search process when the flag process is performed. 図11−2は、フラグ処理を行った場合のスライド探索処理およびリスト探索処理を説明するための図である。FIG. 11B is a diagram for explaining the slide search process and the list search process when the flag process is performed. 図11−3は、フラグ処理を行った場合のスライド探索処理およびリスト探索処理を説明するための図である。FIG. 11C is a diagram for explaining slide search processing and list search processing when flag processing is performed. 図11−4は、フラグ処理を行った場合のスライド探索処理およびリスト探索処理を説明するための図である。FIG. 11D is a diagram for explaining the slide search process and the list search process when the flag process is performed. 図11−5は、フラグ処理を行った場合のスライド探索処理およびリスト探索処理を説明するための図である。FIG. 11-5 is a diagram for explaining slide search processing and list search processing when flag processing is performed. 図11−6は、フラグ処理を行った場合のスライド探索処理およびリスト探索処理を説明するための図である。FIG. 11-6 is a diagram for explaining slide search processing and list search processing when flag processing is performed. 図11−7は、フラグ処理を行った場合のスライド探索処理およびリスト探索処理を説明するための図である。FIG. 11-7 is a diagram for explaining the slide search process and the list search process when the flag process is performed. 図11−8は、フラグ処理を行った場合のスライド探索処理およびリスト探索処理を説明するための図である。FIG. 11-8 is a diagram for explaining slide search processing and list search processing when flag processing is performed. 図12は、本実施形態による符号化処理の全体的な流れの一例を示すフローチャートである。FIG. 12 is a flowchart illustrating an example of the overall flow of the encoding process according to the present embodiment. 図13は、スライド探索処理の詳細な内容の一例を示すフローチャートである。FIG. 13 is a flowchart illustrating an example of detailed contents of the slide search process. 図14は、リスト探索処理の詳細な内容の一例を示すフローチャートである。FIG. 14 is a flowchart illustrating an example of detailed contents of the list search process. 図15は、スライド追加処理の詳細な内容の一例を示すフローチャートである。FIG. 15 is a flowchart illustrating an example of detailed contents of the slide addition process. 図16は、符号生成処理の詳細な内容の一例を示すフローチャートである。FIG. 16 is a flowchart illustrating an example of detailed contents of the code generation process. 図17は、符号化部の詳細な構成の一例を示す図である。FIG. 17 is a diagram illustrating an example of a detailed configuration of the encoding unit. 図18は、スライド/リスト生成処理部のハードウェア構成の一例を示す図である。FIG. 18 is a diagram illustrating an example of a hardware configuration of the slide / list generation processing unit. 図19は、復号部の構成の一例を示す図である。FIG. 19 is a diagram illustrating an example of the configuration of the decoding unit. 図20は、予測処理部の詳細な構成の一例を示す図である。FIG. 20 is a diagram illustrating an example of a detailed configuration of the prediction processing unit. 図21は、復号処理の一例を示すフローチャートである。FIG. 21 is a flowchart illustrating an example of the decoding process. 図22は、Slide復号値計算処理の一例を示すフローチャートである。FIG. 22 is a flowchart illustrating an example of a slide decoded value calculation process. 図23は、ESC復号値計算処理の一例を示すフローチャートである。FIG. 23 is a flowchart illustrating an example of an ESC decoded value calculation process. 図24は、復号部の詳細な構成の一例を示す図である。FIG. 24 is a diagram illustrating an example of a detailed configuration of the decoding unit. 図25は、スライド展開部のハードウェア構成の一例を示す図である。FIG. 25 is a diagram illustrating an example of a hardware configuration of the slide development unit.

以下、添付図面を参照しながら、本発明に係る画像処理装置の一実施形態を詳細に説明する。図1は、本実施形態に係る画像処理装置を適用可能な画像形成装置(カラープリンタとする)の機構部の構成例を示す。なお、本実施形態では、本発明に係る画像処理装置および画像処理方法をカラープリンタである画像形成装置に適用した例について説明するが、文字画像を含む画像に画像処理を施すものであれば、これに限定するものではない。例えば、本発明は、複写機、ファクシミリ、複合機などの画像処理装置にも適用することができる。   Hereinafter, an embodiment of an image processing apparatus according to the present invention will be described in detail with reference to the accompanying drawings. FIG. 1 shows an example of the structure of a mechanism unit of an image forming apparatus (referred to as a color printer) to which the image processing apparatus according to the present embodiment can be applied. In this embodiment, an example in which the image processing apparatus and the image processing method according to the present invention are applied to an image forming apparatus that is a color printer will be described. However, as long as image processing is performed on an image including a character image, However, the present invention is not limited to this. For example, the present invention can be applied to an image processing apparatus such as a copying machine, a facsimile machine, and a multifunction machine.

<実施形態に適用可能なプリンタの例>
図1に例示されるプリンタ装置200は、4色(Y、M、C、K)の画像をそれぞれ独立の作像系1Y、1M、1C、1Kで形成し、この4色の画像を合成する4ドラムタンデムエンジンタイプの画像形成装置である。各作像系1Y、1M、1C、1Kは、像担持体としての感光体、例えば小径のOPC(有機感光体)ドラム2Y、2M、2C、2Kを有し、このOPCドラム2Y、2M、2C、2Kを取り囲むように作像の上流側から帯電手段としての帯電ローラ3Y、3M、3C、3Kと、OPCドラム2Y、2M、2C、2K上の静電潜像をそれぞれ現像剤で現像してY、M、C、K各色のトナー像とする現像装置4Y、4M、4C、4Kと、クリーニング装置5Y、5M、5C、5Kと、除電装置6Y、6M、6C、6Kなどが配置されている。
<Example of Printer Applicable to Embodiment>
The printer apparatus 200 illustrated in FIG. 1 forms four color (Y, M, C, K) images with independent image forming systems 1Y, 1M, 1C, and 1K, and synthesizes these four color images. This is a 4-drum tandem engine type image forming apparatus. Each of the image forming systems 1Y, 1M, 1C, and 1K includes a photoconductor as an image carrier, for example, small-diameter OPC (organic photoconductor) drums 2Y, 2M, 2C, and 2K, and the OPC drums 2Y, 2M, and 2C. The electrostatic latent images on the charging rollers 3Y, 3M, 3C, and 3K as charging means and the OPC drums 2Y, 2M, 2C, and 2K are developed with a developer from the upstream side of image formation so as to surround 2K. Developing devices 4Y, 4M, 4C, and 4K that generate toner images of Y, M, C, and K colors, cleaning devices 5Y, 5M, 5C, and 5K, and static eliminating devices 6Y, 6M, 6C, and 6K are arranged. .

各現像装置4Y、4M、4C、4Kの脇には、Yトナー、Mトナー、Cトナー、Kトナーをそれぞれ現像装置4Y、4M、4C、4Kへ補給するトナーボトルユニット7Y、7M、7C、7Kが配置されている。また、各作像系1Y、1M、1C、1Kは各々独立な光書き込み装置8Y、8M、8C、8Kが配置され、この光書き込み装置8Y、8M、8C、8Kはレーザ光源としてのレーザダイオード(LD)光源9Y、9M、9C、9Kや、コリメートレンズ10Y、10M、10C、10K、fθレンズ11Y、11M、11C、11K、といった光学部品、偏向走査手段としてのポリゴンミラー12Y、12M、12C、12K、折り返しミラー13Y、13M、13C、13K、14Y、14M、14C、14Kなどを有する。   Beside each developing device 4Y, 4M, 4C, 4K, toner bottle units 7Y, 7M, 7C, 7K for supplying Y toner, M toner, C toner, K toner to the developing devices 4Y, 4M, 4C, 4K, respectively. Is arranged. Each image forming system 1Y, 1M, 1C, and 1K is provided with an independent optical writing device 8Y, 8M, 8C, and 8K. The optical writing devices 8Y, 8M, 8C, and 8K are laser diodes (laser light sources). LD) Light source 9Y, 9M, 9C, 9K, collimating lens 10Y, 10M, 10C, 10K, fθ lens 11Y, 11M, 11C, 11K, and other optical components, polygon mirrors 12Y, 12M, 12C, 12K as deflection scanning means And folding mirrors 13Y, 13M, 13C, 13K, 14Y, 14M, 14C, 14K, and the like.

各作像系1Y、1M、1C、1Kは垂直に配列され、その右側には転写ベルトユニット15がOPCドラム2Y、2M、2C、2Kに接する形で配置される。転写ベルトユニット15は、転写ベルト16がローラ17〜20に張架されて図示しない駆動源により回転駆動される。装置下側には転写材としての転写紙が収納された給紙トレイ21が配置され、装置上部に定着装置22、排紙ローラ23及び排紙トレイ24が配設される。   The image forming systems 1Y, 1M, 1C, and 1K are arranged vertically, and the transfer belt unit 15 is arranged on the right side so as to be in contact with the OPC drums 2Y, 2M, 2C, and 2K. The transfer belt unit 15 is rotationally driven by a drive source (not shown) with the transfer belt 16 stretched around rollers 17 to 20. A paper feed tray 21 storing transfer paper as a transfer material is disposed on the lower side of the apparatus, and a fixing device 22, a paper discharge roller 23, and a paper discharge tray 24 are disposed at the top of the apparatus.

作像時には、各作像系1Y、1M、1C、1Kにおいて、それぞれ、OPCドラム2Y、2M、2C、2Kが図示しない駆動源により回転駆動され、帯電ローラ3Y、3M、3C、3KによりOPCドラム2Y、2M、2C、2Kが一様に帯電されて光書き込み装置8Y、8M、8C、8Kが各色の画像データに基づきOPCドラム2Y、2M、2C、2Kに光書込みを行うことによって、OPCドラム2Y、2M、2C、2K上に静電潜像が形成される。   At the time of image formation, in each image forming system 1Y, 1M, 1C, 1K, the OPC drums 2Y, 2M, 2C, 2K are rotationally driven by a driving source (not shown), and the OPC drums by the charging rollers 3Y, 3M, 3C, 3K. The 2Y, 2M, 2C, and 2K are uniformly charged, and the optical writing devices 8Y, 8M, 8C, and 8K perform optical writing on the OPC drums 2Y, 2M, 2C, and 2K based on the image data of each color, so that the OPC drum Electrostatic latent images are formed on 2Y, 2M, 2C, and 2K.

このOPCドラム2Y、2M、2C、2K上の静電潜像はそれぞれ現像装置4Y、4M、4C、4Kにより現像されてY、M、C、K各色のトナー像となり、一方、給紙トレイ21から給紙ローラ25により転写紙が水平方向に給紙されて搬送系により作像系1Y、1M、1C、1K方向へ垂直に搬送される。この転写紙は、転写ベルト16に静電的に吸着保持されて転写ベルト16により搬送され、図示しない転写バイアス印加手段により転写バイアスが印加されてOPCドラム2Y、2M、2C、2K上のY、M、C、K各色のトナー像が順次に重ねて転写されることでフルカラー画像が形成される。このフルカラー画像が形成された転写紙は、定着装置22によりフルカラー画像が定着されて排紙ローラ23により排紙トレイ24へ排出される。   The electrostatic latent images on the OPC drums 2Y, 2M, 2C, and 2K are developed by developing devices 4Y, 4M, 4C, and 4K, respectively, to become toner images of colors Y, M, C, and K, while the paper feed tray 21 Then, the transfer paper is fed in the horizontal direction from the paper feed roller 25 and is conveyed vertically in the image forming systems 1Y, 1M, 1C and 1K by the transport system. This transfer paper is electrostatically held by the transfer belt 16 and conveyed by the transfer belt 16, and a transfer bias is applied by a transfer bias applying means (not shown), and Y on the OPC drums 2Y, 2M, 2C, 2K, A full color image is formed by sequentially superimposing and transferring toner images of M, C, and K colors. The transfer sheet on which the full-color image is formed is fixed to the full-color image by the fixing device 22 and is discharged to the discharge tray 24 by the discharge roller 23.

図2は、図1のプリンタ装置200の電装・制御系統の構成の一例を示すブロック図である。図2の例では、プリンタ装置200は、制御部230と、メインメモリ210と、プリンタエンジン211とを備える。制御部230は、CPU(Central Processing Unit)212と、CPU I/F201と、メインメモリアービタ202と、メインメモリコントローラ203と、符号化部204と、復号部205と、階調処理部206と、マルチプレックス(MUX)207と、エンジンコントローラ208とを含む。   FIG. 2 is a block diagram showing an example of the configuration of the electrical / control system of the printer apparatus 200 of FIG. In the example of FIG. 2, the printer device 200 includes a control unit 230, a main memory 210, and a printer engine 211. The control unit 230 includes a CPU (Central Processing Unit) 212, a CPU I / F 201, a main memory arbiter 202, a main memory controller 203, an encoding unit 204, a decoding unit 205, a gradation processing unit 206, A multiplex (MUX) 207 and an engine controller 208 are included.

CPU212は、メインメモリ210に格納されるプログラムに従い、このプリンタ装置200の全体の動作を制御する。CPU212は、CPU I/F201を介してメインメモリアービタ202に接続される。メインメモリアービタ202は、CPU212、符号化部204、復号部205および通信コントローラ209の、メインメモリ210に対するアクセスを調停する。   The CPU 212 controls the overall operation of the printer apparatus 200 in accordance with a program stored in the main memory 210. The CPU 212 is connected to the main memory arbiter 202 via the CPU I / F 201. The main memory arbiter 202 arbitrates access to the main memory 210 by the CPU 212, the encoding unit 204, the decoding unit 205, and the communication controller 209.

メインメモリ210は、メインメモリコントローラ203を介してメインメモリアービタ202に接続される。メインメモリコントローラ203は、メインメモリ210に対するアクセスの制御を行う。   The main memory 210 is connected to the main memory arbiter 202 via the main memory controller 203. The main memory controller 203 controls access to the main memory 210.

メインメモリ210は、プログラム領域210A、PDLデータ格納領域210B、CMYKバンド画像データ格納領域210C、CMYKページ符号格納領域210Dおよびその他の領域210Eを有する。プログラム領域210Aは、CPU212が動作するためのプログラムが格納される。PDLデータ格納領域210Bは、例えばコンピュータ220から通信コントローラ209を介して供給されたPDLデータが格納される。CMYKバンド画像データ格納領域210Cは、CMYKバンド画像データが格納される。CMYKページ符号格納領域210Dは、バンド画像データが圧縮符号化された符号データが格納される。CMYKページ符号格納領域210Dは、例えば1ページ分のCMYKバンド画像データが圧縮符号化された符号データが格納される。領域210Eは、上述した以外のデータが格納される。   The main memory 210 has a program area 210A, a PDL data storage area 210B, a CMYK band image data storage area 210C, a CMYK page code storage area 210D, and another area 210E. The program area 210A stores a program for the CPU 212 to operate. In the PDL data storage area 210B, for example, PDL data supplied from the computer 220 via the communication controller 209 is stored. The CMYK band image data storage area 210C stores CMYK band image data. The CMYK page code storage area 210D stores code data obtained by compression-coding band image data. The CMYK page code storage area 210D stores, for example, code data obtained by compression-coding CMYK band image data for one page. The area 210E stores data other than those described above.

符号化部204は、メインメモリ210に格納されるバンド画像データを符号化する。バンド画像データが符号化された符号データは、メインメモリアービタ202およびメモリコントローラ203を介してメインメモリ210に供給され、CMYKページ符号格納領域210Dに書き込まれる。復号部205は、後述するプリンタエンジン211に同期して、メインメモリ210のCMYKページ符号格納領域210Dから符号データを読み出して復号する。復号部205が、階調数が所定数を上回る多値画像の復号処理を実行した場合は、復号された画像データは、階調処理部206に供給され、階調処理が施されてマルチプレックス207に転送される。一方、復号部205が、階調数が所定数以下の少値画像の復号処理を実行した場合は、復号された画像データは、階調処理部206には供給されずに、マルチプレックス207に直接供給される。本実施形態では、階調数が2ビット(階調数「4」)以下の画像データを少値画像とし、階調数が2ビットを上回る画像データを多値画像とするが、少値画像と多値画像とを判別するための階調数の値は任意に設定可能であり、例えば階調数が1ビット以下の画像データを少値画像とし、階調数が1ビットを上回る画像データを多値画像とすることもできる。   The encoding unit 204 encodes band image data stored in the main memory 210. Code data obtained by encoding band image data is supplied to the main memory 210 via the main memory arbiter 202 and the memory controller 203, and is written in the CMYK page code storage area 210D. The decoding unit 205 reads and decodes code data from the CMYK page code storage area 210D of the main memory 210 in synchronization with a printer engine 211 described later. When the decoding unit 205 executes a decoding process for a multi-value image in which the number of gradations exceeds a predetermined number, the decoded image data is supplied to the gradation processing unit 206 and subjected to the gradation processing to be multiplexed. 207. On the other hand, when the decoding unit 205 executes the decoding process of the low-value image having the number of gradations equal to or less than the predetermined number, the decoded image data is not supplied to the gradation processing unit 206 but is sent to the multiplex 207. Supplied directly. In this embodiment, image data having a gradation number of 2 bits (gradation number “4”) or less is a low-value image, and image data having a gradation number of more than 2 bits is a multi-value image. The value of the number of gradations for discriminating between an image and a multi-valued image can be arbitrarily set. For example, image data with a gradation number of 1 bit or less is used as a low-value image, and image data with a gradation number exceeding 1 bit. Can be a multi-valued image.

マルチプレックス207は、復号部205が、多値画像の復号処理を実行した場合は、階調処理部206により階調処理が施された画像データ(復号された画像データ)をエンジンコントローラ208へ転送する。一方、マルチプレックス207は、復号部205が、少値画像の復号処理を実行した場合は、復号部205から直接渡された画像データ(復号された画像データ)をエンジンコントローラ208へ転送する。   The multiplex 207 transfers the image data (decoded image data) subjected to the gradation processing by the gradation processing unit 206 to the engine controller 208 when the decoding unit 205 executes the decoding process of the multilevel image. To do. On the other hand, the multiplex 207 transfers the image data (decoded image data) directly passed from the decoding unit 205 to the engine controller 208 when the decoding unit 205 executes the decoding process of the low-value image.

エンジンコントローラ208は、プリンタエンジン211を制御する。図1では、プリンタエンジン211としてCMYK各色の版のうち1の版のものだけが記載され、その他の版については煩雑さを避けるために省略されている。   The engine controller 208 controls the printer engine 211. In FIG. 1, only one of the CMYK color plates is described as the printer engine 211, and the other plates are omitted to avoid complications.

通信コントローラ209は、ネットワークを介しての通信を制御する。例えば、コンピュータ220から出力されたPDL(Page DESCription Language)データは、ネットワークを介して通信コントローラ209により受信される。通信コントローラ209は、受信したPDLデータを、メインメモリアービタ202およびメインメモリコントローラ203を介してメインメモリ210に転送する。   The communication controller 209 controls communication via the network. For example, PDL (Page DESCription Language) data output from the computer 220 is received by the communication controller 209 via the network. The communication controller 209 transfers the received PDL data to the main memory 210 via the main memory arbiter 202 and the main memory controller 203.

なお、ネットワークは、LAN(Local Area Network)などの所定の範囲内で通信を行うものでもよいし、インターネットなどより広範囲に通信可能なものでもよい。また、ネットワークは、有線通信に限らず無線通信を用いたものでもよいし、USB(Universal Serial Bus)やIEEE(Institute Electrical and Electronics Engineers)1394といったシリアル通信を行うものでもよい。   The network may be one that performs communication within a predetermined range such as a LAN (Local Area Network), or may be one that can communicate over a wider range than the Internet. The network is not limited to wired communication but may be wireless communication, or may be serial communication such as USB (Universal Serial Bus) or IEEE (Institute Electrical and Electronics Engineers) 1394.

次に、図3を用いて、プリンタ装置200の全体的な動作の例について説明する。図3は、プリンタ装置200が、多値画像の符号化および復号を行う場合における全体動作の例を概略的に示すフローチャートである。   Next, an example of the overall operation of the printer apparatus 200 will be described with reference to FIG. FIG. 3 is a flowchart schematically showing an example of the overall operation when the printer apparatus 200 performs encoding and decoding of a multi-valued image.

例えばコンピュータ220で生成されたPDLデータがネットワークを介して通信コントローラ209に受信され、メインメモリ210のPDLデータ格納領域210Bに記憶される(ステップS1)。CPU212は、メインメモリ210のPDLデータ格納領域210Bから経路Aに従いPDLデータを読み出し、PDLを解析して(ステップS2)、解析結果に基づき多値CMYKのバンド画像を描画する(ステップS3)。描画された多値CMYKのバンド画像によるCMYKバンド画像データは、メインメモリ210のCMYKバンド画像データ格納領域210Cに記憶される(ステップS4)。   For example, PDL data generated by the computer 220 is received by the communication controller 209 via the network and stored in the PDL data storage area 210B of the main memory 210 (step S1). The CPU 212 reads the PDL data from the PDL data storage area 210B of the main memory 210 according to the path A, analyzes the PDL (step S2), and draws a multi-value CMYK band image based on the analysis result (step S3). The drawn CMYK band image data based on the drawn multi-value CMYK band image is stored in the CMYK band image data storage area 210C of the main memory 210 (step S4).

符号化部204は、経路Bに従いCMYKバンド画像データ格納領域210CからCMYKバンド画像データを読み出して、本発明の各実施形態による符号化方法を用いて符号化する(ステップS5)。CMYKバンド画像データが符号化された符号データは、経路Cに従いメインメモリ210のCMYKページ符号格納領域210Dに記憶される(ステップS6)。   The encoding unit 204 reads the CMYK band image data from the CMYK band image data storage area 210C according to the path B, and encodes it using the encoding method according to each embodiment of the present invention (step S5). Code data obtained by encoding the CMYK band image data is stored in the CMYK page code storage area 210D of the main memory 210 along the path C (step S6).

復号部205は、経路Dに従いCMYKページ符号格納領域210Dから符号データを読み出して画像データに復号し(ステップS7)、復号した画像データを階調処理部206に供給する。階調処理部206は、復号部205から供給された多値画像に対して階調処理を施して(ステップS8)、経路Eに従いプリンタエンジンコントローラ208に供給する。エンジンコントローラ208は、供給された画像データに基づきエンジン211を制御してプリントアウトを行う(ステップS9)。   The decoding unit 205 reads out the code data from the CMYK page code storage area 210D along the path D, decodes it into image data (step S7), and supplies the decoded image data to the gradation processing unit 206. The gradation processing unit 206 performs gradation processing on the multi-valued image supplied from the decoding unit 205 (step S8), and supplies it to the printer engine controller 208 along the path E. The engine controller 208 performs printout by controlling the engine 211 based on the supplied image data (step S9).

なお、プリンタ装置200が、少値画像の符号化および復号を行う場合の全体動作においては、上述のステップS8の階調処理部206による階調処理が省略されるが、それ以外の動作は、図3の内容とほぼ同様である。   In the overall operation when the printer device 200 encodes and decodes a low-value image, the gradation processing by the gradation processing unit 206 in step S8 described above is omitted, but other operations are as follows. This is almost the same as the contents of FIG.

<符号化処理の概略>
図4は、本実施形態に係る符号化部204の構成の一例を示す。符号化部204は、データ読み込み部300と、予測誤差生成処理部301と、マルチプレックス302,303と、スライド/リスト生成処理部304と、符号フォーマット生成処理部305と、符号書き込み部306とを有する。本実施形態では、符号化部204は、多値画像の符号化を行う場合は、予測誤差生成処理部301により生成された予測誤差値を用いた予測誤差方式で符号化を行う一方、少値画像の符号化を行う場合は、予測誤差方式とは異なる符号化方式で符号化を行う。以下、具体的な内容を詳細に説明する。
<Outline of encoding process>
FIG. 4 shows an example of the configuration of the encoding unit 204 according to this embodiment. The encoding unit 204 includes a data reading unit 300, a prediction error generation processing unit 301, multiplexes 302 and 303, a slide / list generation processing unit 304, a code format generation processing unit 305, and a code writing unit 306. Have. In the present embodiment, the encoding unit 204 encodes the prediction error method using the prediction error value generated by the prediction error generation processing unit 301 when encoding a multi-valued image, while reducing the small value. When encoding an image, encoding is performed using an encoding method different from the prediction error method. Hereinafter, specific contents will be described in detail.

データ読み込み部300は、メインメモリ210のCMYKバンド画像データ格納領域210Cから、CMYK各版毎のCMYKバンド画像データを読み出す。このとき、CMYK各版毎のCMYKバンド画像データは、データ読み込み部300によりスキャンライン毎に順次、画素単位でCMYKバンド画像データ格納領域210Cから読み出される。また、データ読み込み部300には、多値画像の符号化または少値画像の符号化の何れかを指定する符号化指定信号が、CPU212から送られる。符号化指定信号により多値画像の符号化が指定された場合は、データ読み込み部300は、読み出した画素単位の画像データ(画素値)を後段の予測誤差生成処理部301へ供給する一方、符号化指定信号により少値画像の符号化が指定された場合は、データ読み込み部300は、読み出した画素値をマルチプレックス302および303のそれぞれへ供給する。なお、本実施形態では、符号化指定信号により少値画像の符号化が指定された場合は、データ読み込み部300は、読み出した画素値を予測誤差生成処理部301へ供給しないが、これに限らず、データ読み込み部300は、少値画像の符号化が指定された場合であっても、読み出した画素値を、予測誤差生成処理部301とマルチプレックス302,303とに供給することもできる。   The data reading unit 300 reads CMYK band image data for each version of CMYK from the CMYK band image data storage area 210 </ b> C of the main memory 210. At this time, CMYK band image data for each version of CMYK is sequentially read from the CMYK band image data storage area 210C in units of pixels by the data reading unit 300 for each scan line. Also, the CPU 212 sends an encoding designation signal for designating either multi-value image encoding or low-value image encoding to the data reading unit 300. When encoding of a multi-valued image is specified by the encoding specifying signal, the data reading unit 300 supplies the read pixel unit image data (pixel value) to the prediction error generation processing unit 301 at the subsequent stage, while When encoding of a small-value image is specified by the conversion specifying signal, the data reading unit 300 supplies the read pixel value to each of the multiplexes 302 and 303. In the present embodiment, when encoding of a small-value image is specified by the encoding specifying signal, the data reading unit 300 does not supply the read pixel value to the prediction error generation processing unit 301, but this is not limitative. Instead, the data reading unit 300 can supply the read pixel values to the prediction error generation processing unit 301 and the multiplexes 302 and 303 even when encoding of a small value image is designated.

予測誤差生成処理部301は、データ読み込み部300で読み出された、符号化対象の画素(「注目画素」と呼ぶ)の画素値を受け取り、注目画素の予測画素値を算出する。そして、その算出した予測画素値と、データ読み込み部300から受け取った注目画素の画素値との差分である予測誤差値を算出する。以下、より具体的に説明する。   The prediction error generation processing unit 301 receives the pixel value of the pixel to be encoded (referred to as “target pixel”) read by the data reading unit 300, and calculates the predicted pixel value of the target pixel. Then, a prediction error value that is a difference between the calculated predicted pixel value and the pixel value of the target pixel received from the data reading unit 300 is calculated. More specific description will be given below.

図5は、予測誤差生成処理部301のより詳細な構成の一例を示す図である。図5に示すように、予測誤差生成処理部301は、ラインメモリ制御部307と、ラインメモリ308と、予測処理部309と、予測誤差処理部310とを有する。ラインメモリ制御部307は、データ読み込み部300により読み出された画素値を、ラインメモリ308に格納する。本実施形態では、ラインメモリ308は、2ライン分の画素値を格納可能であり、今回供給された画素値を格納すると共に、直前に格納した1ライン分の画素値を保持するように、ラインメモリ制御部307に制御される。   FIG. 5 is a diagram illustrating an example of a more detailed configuration of the prediction error generation processing unit 301. As illustrated in FIG. 5, the prediction error generation processing unit 301 includes a line memory control unit 307, a line memory 308, a prediction processing unit 309, and a prediction error processing unit 310. The line memory control unit 307 stores the pixel value read by the data reading unit 300 in the line memory 308. In the present embodiment, the line memory 308 can store pixel values for two lines, stores the pixel values supplied this time, and holds the pixel values for one line stored immediately before. Controlled by the memory control unit 307.

より具体的には、ラインメモリ308は、1ライン分の画素値を記憶可能であって、注目画素の画素値が順次に書き込まれる第1領域と、注目画素が属するラインの直前のラインであって、既に符号化が終了したラインの画素値が記憶される第2領域とを有する。   More specifically, the line memory 308 can store pixel values for one line, and includes a first area in which pixel values of the target pixel are sequentially written and a line immediately before the line to which the target pixel belongs. And a second area in which pixel values of lines that have already been encoded are stored.

ラインメモリ制御部307の制御により、ラインメモリ308から、注目画素の画素値と、注目画素の周辺3画素の画素値が順次に読み出され、予測処理部309に渡される。ここでラインメモリ308から読み出される周辺3画素は、注目画素に近接する、既に符号化が終了した画素である。より具体的には、図6に例示されるように、注目画素のスキャン順で直前の画素aと、当該注目画素が属する現ラインに対してスキャン順で直前の前ライン、すなわち当該注目画素が属するラインの直上のラインにおいて当該注目画素の直上に位置する画素bおよび画素bのスキャン順で直前の画素cである。なお、以下では、符号化対象である注目画素が属するラインを現ライン、現ラインに対してスキャン順で直前のラインを前ラインと呼ぶ。   Under the control of the line memory control unit 307, the pixel value of the target pixel and the pixel values of the three neighboring pixels of the target pixel are sequentially read from the line memory 308 and passed to the prediction processing unit 309. Here, the peripheral three pixels read from the line memory 308 are pixels that have already been encoded and are close to the target pixel. More specifically, as illustrated in FIG. 6, the immediately preceding pixel a in the scan order of the target pixel and the previous line in the scan order with respect to the current line to which the target pixel belongs, that is, the target pixel The pixel b located immediately above the target pixel in the line immediately above the line to which it belongs and the pixel c immediately before in the scanning order of the pixel b. In the following, the line to which the target pixel to be encoded belongs is called the current line, and the line immediately before the current line in the scan order is called the previous line.

予測処理部309は、ラインメモリ制御部307から渡された画素a、画素bおよび画素cに基づき注目画素の画素値を予測する。本実施形態では、予測処理部309は、平面予測方式を用いて注目画素の画素値を予測する。平面予測方式は、図7に例示されるように、現ラインにおける、注目画素の直前に符号化された画素aと、前ラインにおいて注目画素および画素aのそれぞれの真上に隣接する画素bおよび画素cとを用いて、下記の式(1)の計算を行い、注目画素の予測値を求める。
予測値=a+b−c …(1)
The prediction processing unit 309 predicts the pixel value of the target pixel based on the pixel a, the pixel b, and the pixel c passed from the line memory control unit 307. In the present embodiment, the prediction processing unit 309 predicts the pixel value of the target pixel using a planar prediction method. As illustrated in FIG. 7, the plane prediction method includes a pixel a encoded immediately before the target pixel in the current line, a pixel b adjacent to each of the target pixel and the pixel a in the previous line, Using the pixel c, the following equation (1) is calculated to obtain the predicted value of the target pixel.
Predicted value = a + bc (1)

なお、注目画素がラインのスキャン順で先頭画素である場合、ならびに、現ラインがスキャン順で先頭のラインである場合は、平面予測値が0であるものとする。   Note that when the target pixel is the first pixel in the line scan order and when the current line is the first line in the scan order, the plane prediction value is assumed to be zero.

再び図5に戻って説明を続ける。予測誤差処理部310は、注目画素の画素値と、予測処理部309で求められた平面予測誤差値との差分である予測誤差値を算出し、算出した予測誤差値と注目画素の画素値とを後段のマルチプレックス302,303(図4参照)へ送る。   Returning to FIG. 5 again, the description will be continued. The prediction error processing unit 310 calculates a prediction error value that is a difference between the pixel value of the target pixel and the planar prediction error value obtained by the prediction processing unit 309, and calculates the calculated prediction error value and the pixel value of the target pixel. Are sent to the subsequent multiplexes 302 and 303 (see FIG. 4).

図4に戻って説明を続ける。マルチプレックス302および303のそれぞれには、前述の符号化指定信号がCPU212から送られる。また、マルチプレックス302の一方の入力端には、データ読み込み部300により読み出された注目画素の画素値が供給され、他方の入力端には、予測誤差生成処理部301からの注目画素の画素値が供給される。マルチプレックス303の一方の入力端には、データ読み込み部300により読み出された注目画素の画素値が供給され、他方の入力端には、予測誤差生成処理部301からの予測誤差値が供給される。   Returning to FIG. 4, the description will be continued. The encoding designation signal is sent from the CPU 212 to each of the multiplexes 302 and 303. Further, the pixel value of the target pixel read by the data reading unit 300 is supplied to one input end of the multiplex 302, and the pixel of the target pixel from the prediction error generation processing unit 301 is supplied to the other input end. A value is supplied. The pixel value of the target pixel read by the data reading unit 300 is supplied to one input end of the multiplex 303, and the prediction error value from the prediction error generation processing unit 301 is supplied to the other input end. The

ここで、符号化指定信号により多値画像の符号化が指定された場合は、マルチプレックス302は、他方の入力端に供給された注目画素の画素値(予測誤差生成処理部301から供給された画素値)を、ESC符号化用データとして後段のスライド/リスト生成処理部304へ供給する。また、マルチプレックス303は、他方の入力端に供給された予測誤差値(予測誤差生成処理部301から供給された予測誤差値)を、Slide符号化用データとして後段のスライド/リスト生成処理部304へ供給する。   Here, when encoding of a multi-valued image is specified by the encoding specifying signal, the multiplex 302 receives the pixel value of the target pixel (supplied from the prediction error generation processing unit 301) supplied to the other input end. (Pixel value) is supplied to the subsequent slide / list generation processing unit 304 as ESC encoding data. In addition, the multiplex 303 uses the prediction error value supplied to the other input terminal (the prediction error value supplied from the prediction error generation processing unit 301) as Slide encoding data for the subsequent slide / list generation processing unit 304. To supply.

一方、符号化指定信号により少値画像の符号化が指定された場合は、マルチプレックス302は、一方の入力端に供給された注目画素の画素値(データ読み込み部300から供給された画素値)を、ESC符号化用データとして後段のスライド/リスト生成処理部304へ供給する。また、マルチプレックス303は、一方の入力端に供給された注目画素の画素値(データ読み込み部300から供給された画素値)を、Slide符号化用データとして後段のスライド/リスト生成処理部304へ供給する。   On the other hand, when encoding of a low-value image is specified by the encoding specification signal, the multiplex 302 receives the pixel value of the target pixel supplied to one input end (pixel value supplied from the data reading unit 300). Is supplied to the subsequent slide / list generation processing unit 304 as ESC encoding data. Also, the multiplex 303 uses the pixel value of the target pixel supplied to one input terminal (the pixel value supplied from the data reading unit 300) as Slide encoding data to the subsequent slide / list generation processing unit 304. Supply.

スライド/リスト生成処理部304は、マルチプレックス303から順次に入力されるSlide符号化用データを記憶するFIFO(First In First Out)方式のスライド記憶部を有する。本実施形態では、符号化指定信号により多値画像の符号化が指定された場合は、マルチプレックス303からスライド/リスト生成処理部304へ送られるSlide符号化用データは予測誤差値である。この場合、スライド記憶部には、一方の端から、予測誤差が順次に入力される。スライド記憶部は、その入力された予測誤差値を記憶するとともに、既に記憶された予測誤差値を他方の端部へ移動して記憶する。一方、符号化指定信号により少値画像の符号化が指定された場合は、マルチプレックス303からスライド/リスト生成処理部304へ送られるSlide符号化用データは注目画素の画素値である。この場合、スライド記憶部には、一方の端から、注目画素の画素値が順次に入力される。スライド記憶部は、その入力された画素値を記憶するとともに、既に記憶された画素値を他方の端部へ移動して記憶するという具合である。   The slide / list generation processing unit 304 includes a FIFO (First In First Out) type slide storage unit that stores Slide encoding data sequentially input from the multiplex 303. In this embodiment, when encoding of a multi-valued image is specified by the encoding specifying signal, the slide encoding data sent from the multiplex 303 to the slide / list generation processing unit 304 is a prediction error value. In this case, prediction errors are sequentially input to the slide storage unit from one end. The slide storage unit stores the input prediction error value and moves the already stored prediction error value to the other end and stores it. On the other hand, when encoding of a low-value image is specified by the encoding specifying signal, the slide encoding data sent from the multiplex 303 to the slide / list generation processing unit 304 is the pixel value of the target pixel. In this case, the pixel value of the target pixel is sequentially input from one end to the slide storage unit. The slide storage unit stores the input pixel value and moves the already stored pixel value to the other end to store it.

スライド/リスト生成処理部304は、供給されたSlide符号化用データとスライド記憶部に記憶された過去のSlide符号化用データのそれぞれとを比較する。符号化指定信号により多値画像の符号化が指定された場合は、供給された予測誤差値とスライド記憶部に記憶された過去の予測誤差値のそれぞれとを比較する一方、符号化指定信号により少値画像の符号化が指定された場合は、供給された画素値とスライド記憶部に記憶された過去の画素値のそれぞれとを比較するという具合である。   The slide / list generation processing unit 304 compares the supplied slide encoding data with each of the past slide encoding data stored in the slide storage unit. When encoding of a multi-valued image is specified by the encoding specification signal, the supplied prediction error value is compared with each of the past prediction error values stored in the slide storage unit, while the encoding specification signal is used. When encoding of a low-value image is designated, the supplied pixel value is compared with each of past pixel values stored in the slide storage unit.

スライド/リスト生成処理部304は、供給されたSlide符号化用データと過去のSlide符号化用データとが一致した場合には、順次に入力されるSlide符号化用データからなる入力データ列と一致する、既にスライド記憶部に連続的に記憶されているSlide符号化用データからなるデータ列(「リスト」と呼ぶ)を探索するリスト探索処理を行う。符号化指定信号により多値画像の符号化が指定された場合であって、かつ、供給された予測誤差値と過去の予測誤差値とが一致した場合は、順次に入力される予測誤差値データからなる入力データ列と一致する、既にスライド記憶部に連続的に記憶されている予測誤差値からなるデータ列(「リスト」)を探索する。一方、符号化指定信号により少値画像の符号化が指定された場合であって、かつ、供給された画素値と過去の画素値とが一致した場合は、順次に入力される画素値からなる入力データ列と一致する、既にスライド記憶部に連続的に記憶されている画素値からなるデータ列(「リスト」)を探索するという具合である。   When the supplied slide encoding data matches the past slide encoding data, the slide / list generation processing unit 304 matches the input data string composed of the sequentially input slide encoding data. Then, a list search process is performed to search for a data sequence (referred to as “list”) made up of Slide encoding data already stored in the slide storage unit. When encoding of a multi-valued image is specified by an encoding specifying signal, and the supplied prediction error value matches the past prediction error value, prediction error value data that is sequentially input A data string (“list”) consisting of prediction error values that are already stored in the slide storage unit and that matches the input data string consisting of is searched. On the other hand, when encoding of a low-value image is specified by the encoding specifying signal and the supplied pixel value matches the past pixel value, the pixel values are sequentially input. For example, a search is made for a data string (“list”) that is identical to the input data string and that is composed of pixel values that are already stored in the slide storage unit.

そして、スライド/リスト生成処理部304は、上述のリスト探索処理の結果から得られたリストの長さを示すレングス情報Lengthと、前述の比較が行われたときに、リスト探索処理の結果から得られたリストの開始データが記憶されていたスライド記憶部内の位置を示すアドレス情報Addressとを生成して、後段の符号フォーマット生成処理部305へ送る。   Then, the slide / list generation processing unit 304 obtains the length information Length indicating the length of the list obtained from the result of the list search process described above and the result of the list search process when the above comparison is performed. The address information Address indicating the position in the slide storage unit in which the start data of the list is stored is generated and sent to the code format generation processing unit 305 in the subsequent stage.

一方、供給されたSlide符号化用データが、スライド記憶部内の過去のSlide符号化用データのうちの何れとも一致していなかった場合は、スライド/リスト生成処理部304は、マルチプレックス302から供給されたESC符号化用データをESC値として後段の符号フォーマット生成処理部305へ出力する。また、スライド/リスト生成処理部304は、前述の比較結果を示す比較結果フラグSlideFLAGを、後段の符号フォーマット生成処理部305へ出力する。前述の比較結果が肯定の場合は、比較結果フラグSlideFLAGは「1」に設定される一方、前述の比較結果が否定の場合は、比較結果フラグSlideFLAGは「0」に設定されるという具合である。   On the other hand, if the supplied slide encoding data does not match any of the past slide encoding data in the slide storage unit, the slide / list generation processing unit 304 supplies from the multiplex 302. The obtained ESC encoding data is output as an ESC value to the subsequent code format generation processing unit 305. Further, the slide / list generation processing unit 304 outputs a comparison result flag SlideFLAG indicating the above-described comparison result to the code format generation processing unit 305 at the subsequent stage. If the comparison result is positive, the comparison result flag SlideFLAG is set to “1”, while if the comparison result is negative, the comparison result flag SlideFLAG is set to “0”. .

符号フォーマット生成処理部305は、供給されたESC値、アドレス情報Address、レングス情報Length、比較結果フラグSlideFLAGから、図8に例示されるようなフォーマットで、ESC符号、Slide符号およびライン終端符号を生成する。   The code format generation processing unit 305 generates an ESC code, a Slide code, and a line end code in the format illustrated in FIG. 8 from the supplied ESC value, address information Address, length information Length, and comparison result flag SlideFLAG. To do.

ESC符号は、ESC値を符号化したものである。図8に示すように、ESC符号は、データ長が1ビットで値が「0」のフラグSlidFLAGをヘッダとして、後に8ビットのデータ長を持つ画素値が接続されてなる。Slide符号は、データ長が1ビットで値が「1」の比較結果フラグSlideFLAGをヘッダとして、その後に、それぞれデータ長が8ビットのレングス情報Lengthおよびアドレス情報Addressが順次接続される。また、ライン終端符号は、ライン終端を示す符号であり、データ長が2ビットで値が「11」のデータで構成される。なお、この図8に例示される符号フォーマットは、一例であって、これに限られるものではない。   The ESC code is obtained by encoding an ESC value. As shown in FIG. 8, the ESC code is formed by connecting a pixel value having a data length of 8 bits with a flag SlidFLAG having a data length of 1 bit and a value “0” as a header. In the Slide code, a comparison result flag SlideFLAG having a data length of 1 bit and a value “1” is used as a header, and then length information Length and address information Address each having a data length of 8 bits are sequentially connected. The line end code is a code indicating the line end, and is composed of data having a data length of 2 bits and a value of “11”. Note that the code format illustrated in FIG. 8 is an example, and the present invention is not limited to this.

符号フォーマット生成処理部305で生成されたESC符号、Slide符号およびライン終端符号のそれぞれは、符号書き込み部306に供給される。符号書き込み部306は、供給されたESC符号、Slide符号およびライン終端符号を、メインメモリアービタ202およびメインメモリコントローラ203を介して、メインメモリ210のCMYKページ符号格納領域210Dに書き込む。   Each of the ESC code, Slide code, and line end code generated by the code format generation processing unit 305 is supplied to the code writing unit 306. The code writing unit 306 writes the supplied ESC code, Slide code, and line end code in the CMYK page code storage area 210D of the main memory 210 via the main memory arbiter 202 and the main memory controller 203.

次に、本実施形態の符号化部204で行われる符号化処理の概要について説明する。符号化部204は、基本的には、スライド探索処理とリスト探索処理とを繰り返すことによって、データの符号化を行う。スライド探索処理は、1単位(例えば1バイト)の入力データ(Slide符号化用データ)と一致する、スライド記憶部に記憶される過去の入力データ(Slide符号化用データ)を探索する。スライド記憶部内の過去のデータに、入力データと一致するデータが探索されなかった場合には、入力データそのものをESC値として用いて符号化する。   Next, an overview of the encoding process performed by the encoding unit 204 of the present embodiment will be described. The encoding unit 204 basically encodes data by repeating the slide search process and the list search process. The slide search process searches for past input data (Slide encoding data) stored in the slide storage unit that matches input data (Slide encoding data) of one unit (for example, 1 byte). If no data matching the input data is found in the past data in the slide storage unit, the input data itself is encoded using the ESC value.

スライド探索処理において、入力データに一致するスライド記憶部内の過去の入力データが探索された場合、その一致した過去のデータをルートとして、前述のリスト探索処理が行われる。そして、リスト探索処理にて探索されたリストのルートとなる過去のデータのスライド記憶部内での位置をアドレス情報Address、当該リストの長さをレングス情報Lengthとして出力し、これらの情報を符号化する。   In the slide search process, when past input data in the slide storage unit that matches the input data is searched, the list search process described above is performed using the matched past data as a route. Then, the position in the slide storage unit of the past data that becomes the root of the list searched in the list search process is output as address information Address, and the length of the list is output as length information Length, and the information is encoded. .

図9を用いてより具体的に説明する。本実施形態では、スライド記憶部は、直列に接続された128個のレジスタを持ち、FIFO(First In First Out)として構成されるが、図9の例では、番号#0〜#15の直列に接続された16個のレジスタに着目して説明する。各レジスタは、それぞれ1単位(例えば1バイト)のデータを格納可能であるものとする。なお、以下では、このスライド記憶部が有するレジスタをスライドと呼ぶ。   This will be described more specifically with reference to FIG. In the present embodiment, the slide storage unit has 128 registers connected in series and is configured as a FIFO (First In First Out), but in the example of FIG. 9, the numbers # 0 to # 15 are connected in series. Description will be made by paying attention to the 16 connected registers. Each register can store one unit (for example, 1 byte) of data. Hereinafter, a register included in the slide storage unit is referred to as a slide.

処理#1において、スライド記憶部の各スライドには、入力の新しい順、すなわち図9の右側から左側に向けて、「a,b,c,a,a,b,c,a,b,c,d,b,c,a,c,a」と、16個の過去に入力されたデータが既に格納されているものとする。最初に、スライド/リスト生成処理部304に対して入力データ「a」が入力される。スライド探索処理により、この入力データ「a」と、各スライドに記憶された過去の入力データのそれぞれとを比較し、一致しているデータを探索する。図9の例では、番号#0、#3、#4、#7、#13および#15のスライドに格納されているデータが入力データと一致していることが分かる。したがって、これらの番号のスライドに格納されているデータが、リスト探索処理におけるルートとなる。   In the process # 1, each slide in the slide storage unit has a new input order, that is, “a, b, c, a, a, b, c, a, b, c” from the right side to the left side in FIG. , D, b, c, a, c, a ”and 16 previously input data are already stored. First, input data “a” is input to the slide / list generation processing unit 304. Through the slide search process, the input data “a” is compared with each of the past input data stored in each slide to search for matching data. In the example of FIG. 9, it can be seen that the data stored in the slides with numbers # 0, # 3, # 4, # 7, # 13 and # 15 match the input data. Therefore, the data stored in the slides with these numbers is the route in the list search process.

スライド探索処理によって、各スライドに記憶された過去のデータから、入力データ「a」と一致しているデータが探索されたので、処理#2のリスト探索処理が行われる。   Since the data that matches the input data “a” is searched from the past data stored in each slide by the slide search process, the list search process of process # 2 is performed.

処理#2では、各スライドに記憶される過去のデータを左に1だけシフトさせて、処理#1で入力された入力データ「a」をスライド記憶部の番号#0のスライドに追加する。それと共に、次の入力データ「c」がスライド/リスト生成処理部304に対して入力される。リスト探索処理では、各スライドのうち、直前の処理#1において入力データと一致するデータが格納されていたスライド(#0、#3、#4、#7、#13および#15)から、新たな入力データ「c」と一致するデータを探索する。   In the process # 2, the past data stored in each slide is shifted to the left by 1, and the input data “a” input in the process # 1 is added to the slide with the number # 0 in the slide storage unit. At the same time, the next input data “c” is input to the slide / list generation processing unit 304. In the list search process, new slides (# 0, # 3, # 4, # 7, # 13, and # 15) in which data that matches the input data in the previous process # 1 are stored are newly added. Data that matches the correct input data “c” is searched.

図9の例では、処理#1において入力データと一致した番号#0および#4のスライドに格納される過去のデータは、処理#2において入力データと一致していない。一方、処理#2において、番号#3、#7、#13および#15のスライドに格納された過去のデータは、データ「c」であって、新たな入力データ「c」と一致する。   In the example of FIG. 9, the past data stored in the slides with the numbers # 0 and # 4 that match the input data in the process # 1 do not match the input data in the process # 2. On the other hand, in the process # 2, the past data stored in the slides of the numbers # 3, # 7, # 13 and # 15 is the data “c” and matches the new input data “c”.

処理#2のリスト探索処理によって、直前の処理#1において入力データが一致するデータが格納されたスライド(#0、#3、#4、#7、#13および#15)から、処理#2における入力データ「c」と一致するデータが探索されたので、次の処理はリスト探索処理となる。なお、処理#2は、リスト探索処理の開始点であるので、リストの長さを示すレングスLengthは、値「0」とされる。   From the slide (# 0, # 3, # 4, # 7, # 13 and # 15) in which the data whose input data matches in the previous process # 1 is stored by the list search process of the process # 2, the process # 2 Since the data that matches the input data “c” is searched, the next process is a list search process. Since process # 2 is the starting point of the list search process, the length Length indicating the length of the list is set to the value “0”.

処理#3では、上述の処理#2と同様にして、各スライドに記憶される過去のデータを左に1だけシフトさせて、処理#2で入力された入力データ「c」をスライド記憶部の番号#0のスライドに追加する。それと共に、次の入力データ「b」がスライド/リスト生成処理部304に対して入力される。そして、各スライドのうち、処理#1および直前の処理#2において入力データと一致する過去のデータが格納されたスライド(#3、#7、#13および#15)から、新たな入力データ「b」と一致するデータを探索する。   In the process # 3, similarly to the process # 2 described above, the past data stored in each slide is shifted to the left by 1, and the input data “c” input in the process # 2 is stored in the slide storage unit. Add to slide # 0. At the same time, the next input data “b” is input to the slide / list generation processing unit 304. Then, among the slides, new input data “# 3, # 7, # 13, and # 15” from the slide (# 3, # 7, # 13, and # 15) in which past data matching the input data in the process # 1 and the immediately preceding process # 2 is stored. Search for data matching b ”.

図9の例では、番号#15のスライドに格納される過去のデータは、処理#3において入力データと一致していない。一方、処理#3において、番号#3、#7および#13のスライドに格納される過去のデータは「b」であって、新たな入力データ「b」と一致する。次の処理#4では、この番号#3、#7および#13のスライドに格納される過去のデータが、リスト探索の対象となる。すなわち、この処理#3の段階では、番号#3、#7および#13に係るリストが残っている。処理#3では、リストの長さが「1」となり、レングスLength情報の値が「1」とされる。   In the example of FIG. 9, the past data stored in the slide of number # 15 does not match the input data in process # 3. On the other hand, in the process # 3, the past data stored in the slides of the numbers # 3, # 7 and # 13 is “b”, which matches the new input data “b”. In the next process # 4, the past data stored in the slides of the numbers # 3, # 7 and # 13 are subjected to list search. That is, at the stage of the process # 3, the lists relating to the numbers # 3, # 7, and # 13 remain. In the process # 3, the length of the list is “1”, and the value of the length Length information is “1”.

このような処理を繰り返していき、リストが最も長くなるデータ列を求める。図9の例では、処理#5において、直前の処理#4においてリスト探索された番号#13のスライドに格納される過去のデータ「c」と、新たな入力データ「g」とが一致しなくなり、リストが途切れる。そこで、処理#5では、1つ前の処理#4において残っているリストから1を選択し、リスト探索処理の直前におけるスライド探索処理(図9の例では処理#1)において、そのリストの開始データが記憶されていたスライド記憶部内の位置をアドレス情報Addressとし、そのリストの長さをレングス情報LengthとしてSlide符号に符号化する。図9の例では、アドレス情報Addressの値が「13」、レングス情報Lengthの値が「3」とされる。   Such processing is repeated to obtain a data string having the longest list. In the example of FIG. 9, in the process # 5, the past data “c” stored in the slide of the number # 13 searched in the list in the immediately preceding process # 4 and the new input data “g” no longer match. The list is interrupted. Therefore, in process # 5, 1 is selected from the list remaining in the previous process # 4, and the list starts in the slide search process (process # 1 in the example of FIG. 9) immediately before the list search process. The position in the slide storage unit where data is stored is set as address information Address, and the length of the list is encoded as Slide information as length information Length. In the example of FIG. 9, the value of the address information Address is “13”, and the value of the length information Length is “3”.

さらに、処理#5では、入力データ「g」についてスライド探索処理を行う。この例では、各スライドに過去のデータとしてデータ「g」が記憶されていないため、一致するデータがないとされる。この場合、処理は処理#6に移行され、入力データ「g」とともにスライド/リスト生成処理部304へ供給されたESC符号化用データがESC値として用いられてESC符号へ符号化される。   Further, in process # 5, a slide search process is performed on the input data “g”. In this example, since data “g” is not stored as past data in each slide, there is no matching data. In this case, the process proceeds to process # 6, and the ESC encoding data supplied to the slide / list generation processing unit 304 together with the input data “g” is used as an ESC value and encoded into an ESC code.

ESC符号への符号化が行われると、処理#7で、各スライドに記憶される過去のデータが左に1だけシフトされると共に、直前のリスト探索処理(処理#5)で入力された入力データ「g」がスライド記憶部の番号#0のスライドに追加される。そして、次の入力データ「b」に対してスライド探索処理が行われる。   When encoding to the ESC code is performed, the past data stored in each slide is shifted left by 1 in process # 7, and the input input in the previous list search process (process # 5) Data “g” is added to the slide of number # 0 in the slide storage unit. Then, the slide search process is performed on the next input data “b”.

ここで、スライド記憶部は、FIFO方式により各スライドに格納されたデータのシフトを行うことができるため、入力データとの一致を記憶したリストをそのままの状態で保持しながら、次の入力データの処理に移行することができる。   Here, since the slide storage unit can shift the data stored in each slide by the FIFO method, the list of matches with the input data is kept as it is while the next input data is stored. You can move on to processing.

例えば、図9の例では、入力データが、処理#1において番号#0、#3、#4、#7、#13および#15のスライドに格納される過去のデータと一致している。各スライドに格納されたデータを、新たなデータの入力に伴い順次シフトさせることで、例えば処理#2の当該番号#0、#3、#4、#7、#13および#15のスライドに対して次のデータが格納されることになる。したがって、スライド記憶部において、スライド探索処理で一致が探索された番号のスライドに格納されるデータを、リスト探索処理毎に入力データと比較していくことで、入力データのデータ列と一致する、過去のデータのデータ列を探索することができる。   For example, in the example of FIG. 9, the input data matches the past data stored in the slides of numbers # 0, # 3, # 4, # 7, # 13 and # 15 in the process # 1. By sequentially shifting the data stored in each slide as new data is input, for example, for the slides of the numbers # 0, # 3, # 4, # 7, # 13 and # 15 in the process # 2. Thus, the next data is stored. Therefore, in the slide storage unit, the data stored in the slide with the number searched for the match in the slide search process is compared with the input data for each list search process, thereby matching the data string of the input data. A data string of past data can be searched.

このように、スライド記憶部をFIFO方式とすることで、リスト探索処理を簡易に行うことができる。   In this way, the list search process can be easily performed by adopting the FIFO method for the slide storage unit.

<フラグ処理>
上述したスライド探索処理およびリスト探索処理は、フラグによって制御される。このスライド探索処理およびリスト探索処理におけるフラグ処理について、図10−1、図10−2を用いて説明する。
<Flag processing>
The slide search process and list search process described above are controlled by a flag. The flag process in the slide search process and the list search process will be described with reference to FIGS. 10-1 and 10-2.

図10−1は、スライド探索処理の結果を示すRフラグRFLGmを示す。図10−1に例示されるように、スライド記憶部の各スライドに対して、図の右側から左側へ向けて「a,b,c,a,a,b,c,a,b,c,d,b,c,a,c,a」のように過去のデータが格納された状態で、入力データ「a」が入力された場合、番号#0、#3、#4、#7、#13および#15のスライドで、入力データと各スライドに記憶される過去のデータとが一致する。そこで、これらの番号のスライドに対応するRフラグRFLG0、RFLG3、RFLG4、RFLG7、RFLG13およびRFLG15を、それぞれ一致したことを示す値「1」に設定する。   FIG. 10A illustrates an R flag RFLGm indicating the result of the slide search process. As illustrated in FIG. 10A, “a, b, c, a, a, b, c, a, b, c, When the input data “a” is input in a state where past data is stored as “d, b, c, a, c, a”, the numbers # 0, # 3, # 4, # 7, # In slides 13 and # 15, the input data matches the past data stored in each slide. Therefore, the R flags RFLG0, RFLG3, RFLG4, RFLG7, RFLG13, and RFLG15 corresponding to the slides of these numbers are set to a value “1” indicating that they match each other.

このように、入力データと、各スライドに記憶される過去のデータとが一致する場合は、符号化処理を行わずにリスト探索処理が行われる。このとき、RフラグRFLGmの各スライドに対する位置は、固定的である。入力データと一致する、各スライドに記憶される過去のデータが無い場合は、入力データであるSlide符号化用データと同時にスライド/リスト生成処理部304に供給されたESC符号化用データをESC値として用いてESC符号に符号化し、次の入力データに対してスライド探索処理を行う。   As described above, when the input data matches the past data stored in each slide, the list search process is performed without performing the encoding process. At this time, the position of the R flag RFLGm with respect to each slide is fixed. If there is no past data stored in each slide that matches the input data, the ESC encoding data supplied to the slide / list generation processing unit 304 at the same time as the slide encoding data that is the input data is used as the ESC value. Is used to encode into an ESC code, and slide search processing is performed on the next input data.

図10−2は、リスト探索処理の結果を示すWフラグWFLGmの例を示す。リスト探索処理では、新たに入力された入力データと一致するデータが、各スライドのうちRフラグRFLGmが「1」とされたスライドに格納されるデータから探索される。若し、一致するデータが探索されたら、当該スライドに対するWフラグWFLGmの値を、一致したことを示す値「1」に設定する。   FIG. 10-2 illustrates an example of the W flag WFLGm indicating the result of the list search process. In the list search process, data that matches the newly input data is searched from the data stored in the slide in which the R flag RFLGm is “1” among the slides. If matching data is found, the value of the W flag WFLGm for the slide is set to a value “1” indicating that the data matches.

図10−2の例では、各スライドに記憶される過去のデータのうち、RフラグRFLGmが値「1」である番号#0、#3、#4、#7、#13および#15のスライドに格納されるデータに対してリスト探索処理が行われる。これらのうち、入力データ「c」に対して、番号#3、#7、#13および#15のスライドに格納されるデータが一致するので、対応するWフラグWFLG3、WFLG7、WFLG13およびWFLG15の値を、一致したことを示す値「1」に設定する。各スライドに記憶される過去の入力データのうち、このWフラグWFLGmの値が「1」とされたスライドには、直前の入力データと一致する過去のデータと、現在の入力データと一致する過去の入力データとが連続して格納されることを示す。   In the example of FIG. 10-2, among the past data stored in each slide, the slides of numbers # 0, # 3, # 4, # 7, # 13 and # 15 whose R flag RFLGm is “1” are stored. A list search process is performed on the data stored in. Among these, since the data stored in the slides of the numbers # 3, # 7, # 13 and # 15 match the input data “c”, the values of the corresponding W flags WFLG3, WFLG7, WFLG13 and WFLG15 Is set to a value “1” indicating a match. Of the past input data stored in each slide, the slide in which the value of the W flag WFLGm is “1” includes the past data that matches the previous input data and the past that matches the current input data. Indicates that the input data is continuously stored.

次に、値が「1」のWフラグWFLGmを探索する。この値「1」のWフラグWFLGmが存在する場合は、各WフラグWFLGmを新たなRフラグRFLGmとし、上述と同様にして次の入力データに対してリスト探索処理を行う。   Next, the W flag WFLGm having a value “1” is searched. When the W flag WFLGm having this value “1” exists, each W flag WFLGm is set as a new R flag RFLGm, and the list search process is performed on the next input data in the same manner as described above.

一方、探索の結果、値が「1」のWフラグWFLGmが存在しないとされた場合は、リストが途絶えたことを意味する。この場合は、値が「1」のRフラグRFLGmを1つ選択し、選択したRフラグRFLGmに対応するスライドのアドレス情報Addressと、そのときのレングス情報LengthとをSlide符号に符号化する。   On the other hand, if the W flag WFLGm having a value “1” does not exist as a result of the search, this means that the list has been interrupted. In this case, one R flag RFLGm having a value of “1” is selected, and the slide address information Address corresponding to the selected R flag RFLGm and the length information Length at that time are encoded into a Slide code.

次に、RフラグRFLGmおよびWフラグWFLGmを用いた場合の、スライド探索処理およびリスト探索処理について、図11−1〜図11−8を用いて説明する。図11−1〜図11−8の例でも、上述した図9と同様に、番号#0〜#15の直列に接続された16個のレジスタに着目して説明する。各スライドには、新しい順すなわち番号の小さい順に、「a,b,c,a,a,b,c,a,b,c,d,b,c,a,c,a」と、過去に入力された16個のデータ(Slide符号化用データ)が既に格納されているものとする。   Next, slide search processing and list search processing when the R flag RFLGm and the W flag WFLGm are used will be described with reference to FIGS. 11-1 to 11-8. In the example of FIGS. 11-1 to 11-8, as in the case of FIG. 9 described above, the description will be made by paying attention to the 16 registers connected in series of numbers # 0 to # 15. Each slide has “a, b, c, a, a, b, c, a, b, c, d, b, c, a, c, a” in the past in the new order, that is, in ascending order. It is assumed that the 16 pieces of input data (Slide encoding data) have already been stored.

本実施形態においては、符号化を、スライド探索処理とリスト探索処理とを繰り返すことで行う。先ず、入力データ「a」が入力され、スライド探索処理が行われる(図11−1)。入力データ(Slide符号化用データ)「a」と一致するデータを、スライド記憶部の各スライドから探索する。各スライドから入力データに一致するデータが探索されなかった場合は、当該入力データと同時にスライド/リスト生成処理部304に供給されたESC符号化用データをESC値として用いて、ESC符号に符号化する。   In this embodiment, encoding is performed by repeating the slide search process and the list search process. First, input data “a” is input, and slide search processing is performed (FIG. 11-1). Data that matches the input data (Slide encoding data) “a” is searched from each slide in the slide storage unit. If no data matching the input data is found from each slide, the ESC encoding data supplied to the slide / list generation processing unit 304 at the same time as the input data is used as an ESC value to encode into the ESC code. To do.

入力データに一致するデータが格納されるスライドが探索されたら、そのスライドに対応するRフラグRFLGmの値を「1」とし、他のRフラグRFLGmの値を「0」とする。図11−1の例では、番号#0、#3、#4、#7、#13および#15のスライドに格納されるデータが入力データと一致している。このスライド探索処理において、入力データに一致したデータをルートとして、次からのリスト探索処理においてリストの生成が行われる。   When a slide storing data matching the input data is searched, the value of the R flag RFLGm corresponding to the slide is set to “1”, and the values of the other R flags RFLGm are set to “0”. In the example of FIG. 11A, the data stored in the slides with the numbers # 0, # 3, # 4, # 7, # 13 and # 15 match the input data. In this slide search process, a list is generated in the next list search process using the data that matches the input data as the root.

次に、各スライドの記憶内容を左へ1つずつシフトし、直前に入力された入力データ「a」を、番号#0のスライドに追加する。このように、スライド探索処理において入力データと一致するデータが格納されたスライドが探索されたら、符号化処理を行わずに、リスト探索処理(図11−2)に移り、レングス情報Lengthを「0」とする。また、入力データと一致するデータが格納されたスライド(番号#0、#3、#4、#7、#13および#15のスライド)に対応するRフラグRFLGm(RフラグRFLG0、RFLG3、RFLG4、RFLG7、RFLG13およびRFLG15)の値が「1」に設定され、他のRフラグRFLGmの値が「0」に設定される。   Next, the stored contents of each slide are shifted one by one to the left, and the input data “a” input immediately before is added to the slide of number # 0. As described above, when a slide storing data that matches the input data is searched in the slide search process, the encoding process is not performed and the list search process (FIG. 11-2) is performed and the length information Length is set to “0”. " In addition, R flag RFLGm (R flags RFLG0, RFLG3, RFLG4, R # RFLG0, RFLG3, RFLG4, corresponding to slides (number # 0, # 3, # 4, # 7, # 13 and # 15 slides) in which data matching the input data is stored. RFLG7, RFLG13, and RFLG15) are set to “1”, and the values of the other R flags RFLGm are set to “0”.

次に、図11−2に示すように、入力データ「c」が入力される。リスト探索処理では、対応するRフラグRFLGmの値が「1」のスライドのうち、入力データ「c」と一致するデータが格納されるスライドが探索される。図11−2の例では、RフラグRFLGmの値が「1」のスライドのうち番号#3、#7、#13および#15のスライドに格納されるデータが入力データと一致している。一方、番号#0および#4のスライドは、脱落している。したがって、図11−2に示すように、入力データと一致するデータが格納されたスライドに対応するWフラグWFLGm(WフラグWFLG3、WFLG7、WFLG13およびWFLG15)の値が「1」に設定され、他のWフラグWFLGmの値が「0」に設定される。   Next, as shown in FIG. 11B, input data “c” is input. In the list search process, a slide in which data matching the input data “c” is stored is searched for among slides having a corresponding R flag RFLGm value “1”. In the example of FIG. 11B, the data stored in the slides of the numbers # 3, # 7, # 13 and # 15 among the slides whose R flag RFLGm is “1” matches the input data. On the other hand, the slides of numbers # 0 and # 4 are missing. Therefore, as shown in FIG. 11B, the value of the W flag WFLGm (W flags WFLG3, WFLG7, WFLG13, and WFLG15) corresponding to the slide in which the data that matches the input data is stored is set to “1”. The value of the W flag WFLGm is set to “0”.

次に、各スライドの記憶内容を左へ1つずつシフトし、直前に入力された入力データ「c」を、番号#0のスライドに追加する。この場合も符号化処理を行わずに、次のリスト探索処理(図11−3)に移り、レングス情報Lengthを「1」とする。図11−3に示すように、直前のWフラグWFLGmの値(図11−2のWフラグWFLGmの値)をRフラグRFLGmに設定して、RフラグRFLGmを更新する。   Next, the stored contents of each slide are shifted one by one to the left, and the input data “c” input immediately before is added to the slide of number # 0. Also in this case, the encoding process is not performed, the process proceeds to the next list search process (FIG. 11C), and the length information Length is set to “1”. As illustrated in FIG. 11C, the value of the immediately preceding W flag WFLGm (the value of the W flag WFLGm in FIG. 11B) is set in the R flag RFLGm, and the R flag RFLGm is updated.

次に、図11−3に示すように、入力データ「b」が入力される。リスト探索処理では、対応するRフラグRFLGの値が「1」のスライドのうち、入力データ「b」と一致するデータが格納されるスライドが探索される。図11−3の例では、RフラグRFLGmの値が「1」のスライドのうち番号#3、#7および#13のスライドに格納されるデータが入力データと一致している。一方、番号#15のスライドは、脱落している。したがって、図11−3に示すように、入力データと一致するデータが格納されたスライドに対応するWフラグWFLGm(WフラグWFLG3、WFLG7およびWFLG13)の値が「1」とされ、他のWフラグWFLGmの値が「0」とされる。   Next, as shown in FIG. 11C, the input data “b” is input. In the list search process, among the slides with the corresponding R flag RFLG value “1”, a slide storing data that matches the input data “b” is searched. In the example of FIG. 11C, the data stored in the slides numbered # 3, # 7 and # 13 among the slides whose R flag RFLGm is “1” matches the input data. On the other hand, the slide of number # 15 has dropped out. Therefore, as shown in FIG. 11C, the value of the W flag WFLGm (W flags WFLG3, WFLG7 and WFLG13) corresponding to the slide storing the data matching the input data is set to “1”, and the other W flags The value of WFLGm is set to “0”.

次に、各スライドの記憶内容を左へ1つずつシフトし、直前に入力された入力データ「b」を、番号#0のスライドに追加する。この場合も符号化処理を行わずに、次のリスト探索処理(図11−4)に移り、レングス情報Lengthを「2」とする。そして、図11−4に示すように、直前のWフラグWFLGmの値(図11−3のWフラグWFLGmの値)をRフラグRFLGmに設定して、RフラグRFLGmを更新する。   Next, the stored contents of each slide are shifted one by one to the left, and the input data “b” input immediately before is added to the slide of number # 0. Also in this case, the encoding process is not performed, the process proceeds to the next list search process (FIG. 11-4), and the length information Length is set to “2”. Then, as shown in FIG. 11-4, the value of the immediately preceding W flag WFLGm (the value of the W flag WFLGm in FIG. 11-3) is set in the R flag RFLGm, and the R flag RFLGm is updated.

次に、図11−4に示すように、入力データ「d」が入力される。リスト探索処理では、対応するRフラグRFLGmの値が「1」のスライドのうち、入力データ「d」と一致するデータが格納されるスライドが探索される。図11−4の例では、番号#13のスライドに格納されるデータが入力データと一致している。一方、番号#3および#7のスライドは、脱落している。入力データと一致するデータが格納されたスライドに対応するWフラグWFLG13の値が「1」に設定される。   Next, as shown in FIG. 11-4, input data “d” is input. In the list search process, among the slides having the corresponding R flag RFLGm value “1”, a slide storing data that matches the input data “d” is searched. In the example of FIG. 11-4, the data stored in the slide with the number # 13 matches the input data. On the other hand, the slides of numbers # 3 and # 7 are missing. The value of the W flag WFLG13 corresponding to the slide storing the data that matches the input data is set to “1”.

次に、各スライドの記憶内容を左へ1つずつシフトし、直前に入力された入力データ「d」を、番号#0のスライドに追加する。この場合も符号化処理を行わずに、次のリスト探索処理(図11−5)に移り、レングス情報Lengthを「3」とする。図11−5に示すように、直前のWフラグWFLGmの値(図11−4のWフラグWFLGmの値)をRフラグRFLGmに設定して、RフラグRFLGmを更新する。   Next, the stored contents of each slide are shifted one by one to the left, and the input data “d” input immediately before is added to the slide of number # 0. Also in this case, the encoding process is not performed, and the process proceeds to the next list search process (FIG. 11-5), and the length information Length is set to “3”. As shown in FIG. 11-5, the value of the previous W flag WFLGm (the value of the W flag WFLGm in FIG. 11-4) is set in the R flag RFLGm, and the R flag RFLGm is updated.

次に、図11−5に示すように、入力データ「a」が入力される。リスト探索処理では、対応するRフラグRFLGmの値が「1」のスライドのうち、入力データ「a」と一致するデータが格納されるスライドが探索される。図11−5の例では、番号#13のスライドが脱落し、入力データ「a」と一致するデータが格納されるスライドが存在しない。すなわち、継続するリストが存在しなくなる。そのため、RフラグRFLGmの値が「1」であるスライドのスライド記憶部内での位置(図11−5の例では番号#13の位置)をアドレス情報Addressとし、レングス情報Lengthが「3」とされて、これらを図8に示したようにSlide符号に符号化する。WフラグWFLGの値は、全て「0」とされ、処理はスライド探索処理に移る(図11−6)。   Next, as shown in FIG. 11-5, input data “a” is input. In the list search process, a slide in which data matching the input data “a” is stored is searched for among slides having the corresponding R flag RFLGm value “1”. In the example of FIG. 11-5, the slide of number # 13 is dropped, and there is no slide that stores data that matches the input data “a”. That is, there is no continuing list. Therefore, the position in the slide storage unit of the slide whose R flag RFLGm is “1” (the position of the number # 13 in the example of FIG. 11-5) is the address information Address, and the length information Length is “3”. These are encoded into a Slide code as shown in FIG. The values of the W flag WFLG are all “0”, and the process proceeds to the slide search process (FIG. 11-6).

リストが途切れた後のスライド探索処理は、直前のリスト探索処理における入力データ「a」に対して行われる(図11−6)。入力データ「a」と一致するデータを、スライド記憶部の各スライドから探索する。各スライドから入力データに一致するデータが探索されなかった場合は、当該入力データ(Slide符号化用データ)と同時にスライド/リスト生成処理部304に供給されたESC符号化用データをESC値として用いて、ESC符号に符号化する。   The slide search process after the list is interrupted is performed on the input data “a” in the previous list search process (FIG. 11-6). Data matching the input data “a” is searched from each slide in the slide storage unit. If no data matching the input data is found from each slide, the ESC encoding data supplied to the slide / list generation processing unit 304 simultaneously with the input data (Slide encoding data) is used as the ESC value. And encoding into an ESC code.

入力データに一致するデータが格納されるスライドが探索されたら、そのスライドに対応するRフラグRFLGmの値を「1」とする。図11−6の例では、番号#3、#4、#7、#8および#11のスライドに格納されるデータが入力データと一致している。このスライド探索処理において、入力データに一致したデータをルートとして、次からのリスト探索処理においてリストの生成が行われる。   When a slide storing data matching the input data is searched, the value of the R flag RFLGm corresponding to the slide is set to “1”. In the example of FIG. 11-6, the data stored in the slides of numbers # 3, # 4, # 7, # 8, and # 11 match the input data. In this slide search process, a list is generated in the next list search process using the data that matches the input data as the root.

次に、各スライドの記憶内容を左へ1つずつシフトし、入力データ「a」を、番号#0のスライドに追加する。このように、スライド探索処理において入力データと一致するデータが格納されたスライドが探索されたら、符号化処理を行わずに、リスト探索処理(図11−7)に移り、レングス情報Lengthを「0」とする。また、入力データと一致するデータが格納されたスライド(番号#3、#4、#7、#8および#13のスライド)に対応するRフラグRFLGm(RフラグRFLG3、RFLG4、RFLG7、RFLG8およびRFLG13)の値が「1」に設定され、他のRフラグRFLGmの値が「0」に設定される。   Next, the stored contents of each slide are shifted one by one to the left, and the input data “a” is added to the slide of number # 0. As described above, when a slide storing data that matches the input data is searched in the slide search process, the encoding process is not performed and the process proceeds to the list search process (FIG. 11-7), and the length information Length is set to “0”. " Also, R flag RFLGm (R flags RFLG3, RFLG4, RFLG7, RFLG8 and RFLG13) corresponding to slides (slides with numbers # 3, # 4, # 7, # 8 and # 13) in which data matching the input data is stored. ) Is set to “1”, and the values of the other R flags RFLGm are set to “0”.

次に、図11−7に示すように、入力データ「f」が入力される。リスト探索処理では、対応するRフラグRFLGmの値が「1」のスライドのうち、入力データ「f」と一致するデータが格納されるスライドが探索される。図11−7の例では、入力データ「f」と一致するデータが格納されるスライドが存在しないので、WフラグWFLGmの値が全て「0」とされ、処理はスライド探索処理に移る(図11−8)。   Next, as shown in FIG. 11-7, the input data “f” is input. In the list search process, a slide in which data matching the input data “f” is stored is searched for among slides having a corresponding R flag RFLGm value “1”. In the example of FIG. 11-7, since there is no slide storing data that matches the input data “f”, the values of the W flag WFLGm are all “0”, and the process proceeds to the slide search process (FIG. 11). -8).

ここでのスライド探索処理は、直前のリスト探索処理における入力データ「f」に対して行われる(図11−8)。入力データ「f」と一致するデータを、スライド記憶部の各スライドから探索する。図11−8の例では、各スライドから入力データに一致するデータが探索されないため、当該入力データ(Slide符号化用データ)と同時にスライド/リスト生成処理部304に供給されたESC符号化用データをESC値として用いて、ESC符号に符号化する。また、RフラグRFLGmの値が全て「0」に設定される。   The slide search process here is performed on the input data “f” in the previous list search process (FIG. 11-8). Data matching the input data “f” is searched from each slide in the slide storage unit. In the example of FIG. 11-8, since data matching the input data is not searched from each slide, the ESC encoding data supplied to the slide / list generation processing unit 304 simultaneously with the input data (Slide encoding data). Is used as an ESC value to be encoded into an ESC code. Further, all the values of the R flag RFLGm are set to “0”.

そして、各スライドの記憶内容を左へ1つずつシフトし、入力データ「f」を番号#0のスライドに追加して次の入力データの符号化に進む。   Then, the stored content of each slide is shifted one by one to the left, input data “f” is added to the slide of number # 0, and the process proceeds to encoding of the next input data.

<符号化処理の詳細>
次に、本実施形態による符号化処理について、より詳細に説明する。図12は、本実施形態による符号化処理の全体的な流れを示すフローチャートの一例である。最初のステップS10で、比較結果フラグSlideFLAGの値は、「0」に初期化される。ステップS11で、スライド探索処理およびリスト探索処理のうち何れが有効であるかを示すフラグLISTFLGは、スライド探索処理を行っていることを示す値「0」に初期化される。
<Details of encoding process>
Next, the encoding process according to the present embodiment will be described in more detail. FIG. 12 is an example of a flowchart showing the overall flow of the encoding process according to this embodiment. In the first step S10, the value of the comparison result flag SlideFLAG is initialized to “0”. In step S11, a flag LISTFLG indicating which one of the slide search process and the list search process is valid is initialized to a value “0” indicating that the slide search process is being performed.

次に、ステップS12で、データ読み込み部300は、符号化対象の1画素(注目画素)の画素値を読み出す。次のステップS13で、符号化指定信号により多値画像の符号化が指定されているか否かが判断され、多値画像の符号化が指定されていると判断された場合は、処理がステップS14へ移行する。ステップS14で、ラインメモリ制御部307は、データ読み込み部300により読み出された注目画素の画素値をラインメモリ308の第1領域に書き込む。ここでは、ラインメモリ308の第2領域には、注目画素が属するラインの直前のラインであって、既に符号化が終了したラインの画素値が記憶されている。そして、ラインメモリ制御部307の制御により、ラインメモリ308から、注目画素の画素値と、注目画素の周辺3画素の画素値が読み出されて予測処理部309へ供給される。   Next, in step S12, the data reading unit 300 reads the pixel value of one pixel (target pixel) to be encoded. In the next step S13, it is determined whether or not encoding of a multi-value image is specified by an encoding specifying signal, and if it is determined that encoding of a multi-value image is specified, the process proceeds to step S14. Migrate to In step S <b> 14, the line memory control unit 307 writes the pixel value of the target pixel read by the data reading unit 300 in the first area of the line memory 308. Here, the second area of the line memory 308 stores the pixel values of the line that is the line immediately before the line to which the target pixel belongs and has already been encoded. Then, under the control of the line memory control unit 307, the pixel value of the target pixel and the pixel values of the three surrounding pixels of the target pixel are read from the line memory 308 and supplied to the prediction processing unit 309.

次に、ステップS15で、予測処理部309は、注目画素の周辺3画素(前述の画素a、画素bおよび画素c)の画素値に基づいて、注目画素の画素値の予測値を算出し、算出した予測値と、注目画素の画素値とを予測誤差処理部310へ供給する。ステップS16で、予測誤差処理部310は、注目画素の画素値と、予測処理部309で求められた予測値との差分である予測誤差値を算出し、算出した予測誤差値をマルチプレックス303へ供給するとともに、注目画素の画素値をマルチプレックス302へ供給する。   Next, in step S15, the prediction processing unit 309 calculates a predicted value of the pixel value of the target pixel based on the pixel values of the three surrounding pixels (the above-described pixel a, pixel b, and pixel c) of the target pixel, The calculated prediction value and the pixel value of the target pixel are supplied to the prediction error processing unit 310. In step S <b> 16, the prediction error processing unit 310 calculates a prediction error value that is a difference between the pixel value of the target pixel and the prediction value obtained by the prediction processing unit 309, and sends the calculated prediction error value to the multiplex 303. At the same time, the pixel value of the target pixel is supplied to the multiplex 302.

処理はステップS17に移行され、マルチプレックス302は、予測誤差処理部310から供給された予測誤差値をSlide符号化用データとしてスライド/リスト生成処理部304へ送る。また、マルチプレックス303は、予測誤差処理部310から供給された注目画素の画素値をESC符号化用データとしてスライド/リスト生成処理部304へ供給する。そして、処理はステップS19へ移行する。   The process proceeds to step S17, and the multiplex 302 sends the prediction error value supplied from the prediction error processing unit 310 to the slide / list generation processing unit 304 as Slide encoding data. Further, the multiplex 303 supplies the pixel value of the target pixel supplied from the prediction error processing unit 310 to the slide / list generation processing unit 304 as ESC encoding data. Then, the process proceeds to step S19.

また、上述のステップS13で、多値画像の符号化が指定されていない、つまりは少値画像の符号化が指定されていると判断された場合は、処理がステップS18へ移行する。ステップS18で、マルチプレックス303は、データ読み込み部300から供給された注目画素の画素値をSlide符号化用データとしてスライド/リスト生成処理部304へ供給する。また、マルチプレックス302は、データ読み込み部300から供給された注目画素の画素値をESC符号化用データとしてスライド/リスト生成処理部304へ供給する。そして、処理はステップS19へ移行する。   If it is determined in step S13 described above that encoding of a multi-value image is not specified, that is, encoding of a low-value image is specified, the process proceeds to step S18. In step S18, the multiplex 303 supplies the pixel value of the target pixel supplied from the data reading unit 300 to the slide / list generation processing unit 304 as Slide encoding data. In addition, the multiplex 302 supplies the pixel value of the pixel of interest supplied from the data reading unit 300 to the slide / list generation processing unit 304 as ESC encoding data. Then, the process proceeds to step S19.

ステップS19では、フラグLISTFLGの値は「1」であるか否かが判定される。若し、「1」ではないと判定されたら、現在スライド探索処理が有効であるとされ、処理はステップS20に移行される。ステップS20で、スライド/リスト生成処理部304はスライド探索処理を実行する。スライド探索処理の詳細な内容については後述する。   In step S19, it is determined whether or not the value of the flag LISTFLG is “1”. If it is determined that it is not “1”, it is determined that the current slide search process is valid, and the process proceeds to step S20. In step S20, the slide / list generation processing unit 304 executes a slide search process. Details of the slide search process will be described later.

次のステップS21で、スライド/リスト生成処理部304は、スライド記憶部に対してSlide符号化用データを追加するSlide追加処理を行う。Slide追加処理の詳細な内容については後述する。次のステップS22では、1ライン分の画素全てに対する処理が終了したか否かが判定される。若し、終了していないと判定された場合は、処理は上述のステップS12に戻される。一方、終了していると判定された場合は、処理はステップS23に移行され、ステップS23では、ライン終端符号が出力される。次のステップS24では、第1領域に書き込まれた、符号化が終了した1ライン分の画素の画素値が、第2領域に上書きされる。そして、処理はステップS25に移行され、全てのラインに対する処理が終了したか否かが判定される。若し、終了していると判定された場合は、一連の符号化処理は終了する。一方、終了していないと判定された場合は、処理は上述のステップS10に戻される。   In the next step S21, the slide / list generation processing unit 304 performs a slide addition process for adding slide encoding data to the slide storage unit. Details of the Slide addition process will be described later. In the next step S22, it is determined whether or not the processing for all the pixels for one line has been completed. If it is determined that the process has not ended, the process returns to step S12 described above. On the other hand, if it is determined that the process has been completed, the process proceeds to step S23, and a line end code is output in step S23. In the next step S24, the pixel values of one line of pixels that have been encoded and written in the first area are overwritten in the second area. Then, the process proceeds to step S25, and it is determined whether or not the processes for all lines have been completed. If it is determined that the processing has been completed, the series of encoding processing ends. On the other hand, if it is determined that the process has not ended, the process returns to step S10 described above.

また、上述のステップS19において、フラグLISTFLGの値が「1」であると判定された場合は、現在リスト探索処理が有効であるとされ、処理はステップS26に移行される。ステップS26で、スライド/リスト生成処理部304は、リスト探索処理を実行する。リスト探索処理の詳細な内容については後述する。ステップS26でリスト探索処理が行われた後、処理は上述のステップS21に移行される。   If it is determined in step S19 described above that the value of the flag LISTFLG is “1”, it is determined that the current list search process is valid, and the process proceeds to step S26. In step S26, the slide / list generation processing unit 304 executes list search processing. Details of the list search process will be described later. After the list search process is performed in step S26, the process proceeds to step S21 described above.

図13は、図12のステップS20で実行されるスライド探索処理の詳細な内容を示すフローチャートである。なお、以下では、スライド記憶部における第x番目(0≦x≦127)のスライドをスライド[x]のように表記する。例えばスライド記憶部における先頭のスライドは、スライド[0]と表記される。   FIG. 13 is a flowchart showing detailed contents of the slide search process executed in step S20 of FIG. In the following, the x-th (0 ≦ x ≦ 127) slide in the slide storage unit is expressed as slide [x]. For example, the first slide in the slide storage unit is expressed as slide [0].

先ず、ステップS30〜ステップS32で、レングス情報Length、フラグSFIINDFLGおよび変数IWがそれぞれ値「0」に初期化される。処理はステップS33に移行され、入力データとスライド[IW]に格納された過去の入力データとが一致するか否かが判定される。若し、一致すると判定されたら、処理はステップS34に移行され、フラグSFINDFLGの値が「1」とされ、次のステップS35で、RフラグRFLG[IW]の値が「1」とされる。   First, in steps S30 to S32, the length information Length, the flag SFIINDFLG, and the variable IW are each initialized to a value “0”. The process proceeds to step S33, and it is determined whether or not the input data matches the past input data stored in the slide [IW]. If it is determined that they match, the process proceeds to step S34, the value of the flag SFINDFLG is set to “1”, and the value of the R flag RFLG [IW] is set to “1” in the next step S35.

そして、処理はステップS37に移行され、変数IWがスライドサイズ未満、すなわち、スライド記憶部が有するスライド数(ここでは「128」)未満であるか否かが判定される。若し、変数IWがスライドサイズ未満であると判定されたら、ステップS38で変数IWに「1」が加えられ、処理がステップS33に戻される。一方、ステップS37で、変数IWがスライドサイズ以上であると判定されたら、処理はステップS39に移行される。   Then, the process proceeds to step S37, and it is determined whether or not the variable IW is less than the slide size, that is, less than the number of slides (here, “128”) that the slide storage unit has. If it is determined that the variable IW is less than the slide size, “1” is added to the variable IW in step S38, and the process returns to step S33. On the other hand, if it is determined in step S37 that the variable IW is greater than or equal to the slide size, the process proceeds to step S39.

一方、上述のステップS33で入力データとスライド[IW]に格納された過去の入力データとが一致しないと判定されたら、処理はステップS36に移行され、RフラグRFLG[IW]の値が「0」とされる。そして、処理がステップS37に移行される。   On the other hand, if it is determined in step S33 that the input data does not match the past input data stored in the slide [IW], the process proceeds to step S36, and the value of the R flag RFLG [IW] is “0”. " Then, the process proceeds to step S37.

ステップS39では、フラグSFINDFLGの値が「1」であるか否かが判定される。フラグSFINDFLGの値が「1」ではないと判定された場合は、スライド記憶部において入力データと一致する過去のデータが記憶されていないとされ、処理はステップS40に移行される。ステップS40では、比較結果フラグSlideFLAGが「0」に設定され、次のステップS41で符号生成処理が行われる。符号生成処理の詳細な内容については後述する。   In step S39, it is determined whether or not the value of the flag SFINDFLG is “1”. When it is determined that the value of the flag SFINDFLG is not “1”, it is determined that past data matching the input data is not stored in the slide storage unit, and the process proceeds to step S40. In step S40, the comparison result flag SlideFLAG is set to “0”, and the code generation process is performed in the next step S41. Details of the code generation process will be described later.

一方、上述のステップS39で、フラグSFINDFLGの値が「1」であると判定された場合は、スライド記憶部において入力データと一致する過去の入力データが記憶されているとされ、次のステップS42で、フラグLISTFLGの値が「1」に設定される。つまり、リスト探索処理が有効とされる。   On the other hand, if it is determined in step S39 described above that the value of the flag SFINDFLG is “1”, it is determined that past input data that matches the input data is stored in the slide storage unit, and the next step S42 is performed. Thus, the value of the flag LISTFLG is set to “1”. That is, the list search process is valid.

図14は、図12のステップS26で実行されるリスト探索処理の詳細な内容を示すフローチャートである。先ず、ステップS50およびステップS51で、フラグLFINDFLGおよび変数IWがそれぞれ値「0」に初期化される。   FIG. 14 is a flowchart showing detailed contents of the list search process executed in step S26 of FIG. First, in steps S50 and S51, the flag LFINDFLG and the variable IW are each initialized to the value “0”.

ステップS52で、入力データとスライド[IW]に格納された過去の入力データとが一致し、且つ、RフラグRFLG[IW]の値が「1」であるか否かが判定される。若し、それぞれの条件を満たすと判定されたら、処理はステップS53に移行され、WフラグWFLG[IW]の値が「1」とされ、次のステップS54で、フラグLFINDFLGの値が「1」とされる。そして、処理がステップS56に移行される。   In step S52, it is determined whether or not the input data matches the past input data stored in the slide [IW] and the value of the R flag RFLG [IW] is “1”. If it is determined that the respective conditions are satisfied, the process proceeds to step S53, the value of the W flag WFLG [IW] is set to “1”, and the value of the flag LFINDFLG is set to “1” in the next step S54. It is said. Then, the process proceeds to step S56.

一方、ステップS52で、上述の条件を満たさない、すなわち、入力データとスライド[IW]に格納された過去の入力データとが一致しない、または、RフラグRFLG[IW]の値が「1」でないと判定されたら、処理はステップS55に移行され、WフラグWFLG[IW]の値が「0」とされる。そして、処理がステップS56に移行される。   On the other hand, in step S52, the above condition is not satisfied, that is, the input data does not match the past input data stored in the slide [IW], or the value of the R flag RFLG [IW] is not “1”. Is determined, the process proceeds to step S55, and the value of the W flag WFLG [IW] is set to “0”. Then, the process proceeds to step S56.

ステップS56では、変数IWがスライドサイズ未満であるか否かが判定される。若し、変数IWがスライドサイズ未満であると判定されたら、ステップS57で変数IWに「1」が加えられ、処理がステップS52に戻される。一方、変数IWがスライドサイズ以上であると判定されたら、処理がステップS58に移行される。   In step S56, it is determined whether or not the variable IW is less than the slide size. If it is determined that the variable IW is less than the slide size, “1” is added to the variable IW in step S57, and the process returns to step S52. On the other hand, if it is determined that the variable IW is greater than or equal to the slide size, the process proceeds to step S58.

ステップS58では、フラグLFINDFLGの値が「0」であるか否かが判定される。若し、値が「0」であると判定されたら、処理がステップS59に移行されて変数IWが値「0」に初期化され、次のステップS60でRフラグRFLG[IW]の値が「1」であるか否かが判定される。若し、「1」であると判定されたら、処理はステップS61に移行される。   In step S58, it is determined whether or not the value of the flag LFINDFLG is “0”. If it is determined that the value is “0”, the process proceeds to step S59 to initialize the variable IW to the value “0”. In the next step S60, the value of the R flag RFLG [IW] is set to “0”. It is determined whether or not “1”. If it is determined that the value is “1”, the process proceeds to step S61.

ステップS61では、変数IWがアドレス情報Addressとされ、次のステップS62で、スライドサイズを変数IWに代入する。そして、処理がステップS63に移行される。ステップS63では、変数IWがスライドサイズ未満であるか否かが判定される。若し、変数IWがスライドサイズ未満であると判定されたら、ステップS64で変数IWに「1」が加算されて処理がステップS60に戻される。   In step S61, the variable IW is set as address information Address, and in the next step S62, the slide size is substituted into the variable IW. Then, the process proceeds to step S63. In step S63, it is determined whether or not the variable IW is less than the slide size. If it is determined that the variable IW is less than the slide size, “1” is added to the variable IW in step S64, and the process returns to step S60.

一方、ステップS63で、変数IWがスライドサイズ以上であると判定されたら処理はステップS65に移行され、比較結果フラグSlideFLAGが「1」に設定される。そして、処理は次のステップS66に移行され、符号生成処理が行われて一連の処理が終了する。符号生成処理の詳細な内容については後述する。   On the other hand, if it is determined in step S63 that the variable IW is equal to or larger than the slide size, the process proceeds to step S65, and the comparison result flag SlideFLAG is set to “1”. Then, the process proceeds to the next step S66, the code generation process is performed, and the series of processes ends. Details of the code generation process will be described later.

上述したステップS58で、フラグLFINDFLGの値が「0」ではないと判定されたら、処理はステップS67に移行され、変数IWが値「0」に初期化される。次のステップS68で、WフラグWFLG[IW]の値が「0」であるか否かが判定される。若し、WフラグWFLG[IW]の値が「0」であると判定された場合は、ステップS69でRフラグRFLG[IW]の値は「0」に設定され、処理はステップS70に移行される。一方、WフラグWFLG[IW]の値が「0」ではないと判定された場合は、RフラグRFLG[IW]の値はそのままの状態で、処理はステップS70に移行される。   If it is determined in step S58 that the value of the flag LFINDFLG is not “0”, the process proceeds to step S67, and the variable IW is initialized to the value “0”. In the next step S68, it is determined whether or not the value of the W flag WFLG [IW] is “0”. If it is determined that the value of the W flag WFLG [IW] is “0”, the value of the R flag RFLG [IW] is set to “0” in step S69, and the process proceeds to step S70. The On the other hand, if it is determined that the value of the W flag WFLG [IW] is not “0”, the value of the R flag RFLG [IW] remains unchanged and the process proceeds to step S70.

そして、ステップS70で、変数IWがスライドサイズ未満であるか否かが判定される。若し、変数IWがスライドサイズ未満であると判定されたら、ステップS71で変数IWに「1」が加算されて処理がステップS68に戻される。一方、ステップS70で変数IWがスライドサイズ以上であると判定されたら、処理はステップS72に移行され、レングス情報Lengthに対して1が加算され、一連の処理が終了する。   In step S70, it is determined whether the variable IW is less than the slide size. If it is determined that the variable IW is less than the slide size, “1” is added to the variable IW in step S71, and the process returns to step S68. On the other hand, if it is determined in step S70 that the variable IW is equal to or larger than the slide size, the process proceeds to step S72, 1 is added to the length information Length, and the series of processes ends.

図15は、図12のステップS21で実行されるSlide追加処理の詳細な内容の一例を示すフローチャートである。先ず、ステップS80で、変数IWがスライド数から1を減じた値に設定される。次のステップS81で、スライド[IW]に、スライド[IW−1]の値が格納され、ステップS82で、変数IWが「0」を超えるか否かが判定される。若し、変数IWが「0」を超えると判定されたら、処理はステップS83に移行され、変数IWから「1」が減じられる。そして、処理がステップS81に戻される。一方、ステップS82で、変数IWが「0」以下であると判定されたら、処理はステップS84に移行され、スライド[0]に対してSlide符号化用データが追加される。符号化指定信号により多値画像の符号化が指定されていた場合は、スライド[0]に対して予測誤差値が追加される一方、符号化指定信号により少値画像の符号化が指定されていた場合は、スライド[0]に対して注目画素の画素値が追加されるという具合である。   FIG. 15 is a flowchart illustrating an example of detailed contents of the slide addition process executed in step S21 of FIG. First, in step S80, the variable IW is set to a value obtained by subtracting 1 from the number of slides. In the next step S81, the value of the slide [IW-1] is stored in the slide [IW]. In step S82, it is determined whether or not the variable IW exceeds “0”. If it is determined that the variable IW exceeds “0”, the process proceeds to step S83, and “1” is subtracted from the variable IW. Then, the process returns to step S81. On the other hand, if it is determined in step S82 that the variable IW is “0” or less, the process proceeds to step S84, and Slide encoding data is added to the slide [0]. When encoding of a multi-valued image is specified by the encoding specification signal, a prediction error value is added to the slide [0], while encoding of a low-value image is specified by the encoding specification signal. In this case, the pixel value of the target pixel is added to the slide [0].

図16は、図13のステップS41および図14のステップS66の各々で実行される符号生成処理の詳細な内容の一例を示すフローチャートである。先ず、ステップS90で比較結果フラグSlideFLAGの値が「1」であるか否かが判定される。比較結果フラグSlideFLAGの値が「1」であると判定された場合は、処理はステップS91に移行され、比較結果フラグSlideFLAG、アドレス情報Addressおよびレングス情報Lengthが、図8に例示されるSlide符号に符号化される。   FIG. 16 is a flowchart showing an example of detailed contents of the code generation processing executed in each of step S41 in FIG. 13 and step S66 in FIG. First, in step S90, it is determined whether or not the value of the comparison result flag SlideFLAG is “1”. If it is determined that the value of the comparison result flag SlideFLAG is “1”, the process proceeds to step S91, and the comparison result flag SlideFLAG, the address information Address, and the length information Length are converted into the Slide code illustrated in FIG. Encoded.

一方、比較結果フラグSlideFLAGの値が「0」であると判定された場合は、処理はステップS92に移行され、比較結果フラグSlideFLAGおよびESC符号化用データ(注目画素の画素値)が、図8に例示されるESC符号に符号化される。   On the other hand, if it is determined that the value of the comparison result flag SlideFLAG is “0”, the process proceeds to step S92, and the comparison result flag SlideFLAG and the ESC encoding data (pixel value of the target pixel) are as shown in FIG. Are encoded into the ESC code illustrated in FIG.

図17は、符号化部204の一例の構成をより詳細に示す。なお、図17において、上述の図2と図4と図5と共通する部分には同一の符号を付し、詳細な説明を省略する。符号化部204は、データ読み込み部300、ラインメモリ制御部307、ラインメモリ308、予測処理部309、予測誤差処理部310、マルチプレックス302,303、スライド/リスト生成処理部304、符号フォーマット生成処理部305、および、符号書き込み部306を有すると共に、メインメモリアービタI/F313と、データアドレス生成部314と、符号アドレス生成部315とを有する。なお、ここでは、ラインメモリ308のうち現ラインが記憶される領域(第1領域)を現ラインメモリ、前ラインが記憶される領域(第2領域)を前ラインメモリと呼ぶ。   FIG. 17 shows an exemplary configuration of the encoding unit 204 in more detail. Note that, in FIG. 17, the same reference numerals are given to portions common to the above-described FIGS. 2, 4, and 5, and detailed description thereof is omitted. The encoding unit 204 includes a data reading unit 300, a line memory control unit 307, a line memory 308, a prediction processing unit 309, a prediction error processing unit 310, multiplexes 302 and 303, a slide / list generation processing unit 304, and a code format generation process. A main memory arbiter I / F 313, a data address generation unit 314, and a code address generation unit 315. Here, in the line memory 308, an area where the current line is stored (first area) is referred to as a current line memory, and an area where the previous line is stored (second area) is referred to as a previous line memory.

メインメモリアービタI/F313は、メインメモリアービタ202との接続を可能にするI/Fである。データアドレス生成部314は、メインメモリ210のCMYKバンド画像データ格納領域210Cからバンド画像データを読み出す際のメモリアドレスを生成する。データ読み込み部300は、データアドレス生成部314で生成されたメモリアドレスで特定されるバンド画像データの読み出しを、メインメモリアービタI/F313を介してメインメモリアービタ202に対して要求する。この要求に応じて、メインメモリアービタ202によりメインメモリ210のCMYKバンド画像データ格納領域210Cから読み出されたバンド画像データが、メインメモリアービタ202から符号化部204に対して供給され、メインメモリアービタI/F313を介してデータ読み込み部300に供給される。   The main memory arbiter I / F 313 is an I / F that enables connection with the main memory arbiter 202. The data address generation unit 314 generates a memory address when reading band image data from the CMYK band image data storage area 210 </ b> C of the main memory 210. The data reading unit 300 requests the main memory arbiter 202 to read the band image data specified by the memory address generated by the data address generation unit 314 via the main memory arbiter I / F 313. In response to this request, the band image data read from the CMYK band image data storage area 210C of the main memory 210 by the main memory arbiter 202 is supplied from the main memory arbiter 202 to the encoding unit 204, and the main memory arbiter The data is supplied to the data reading unit 300 via the I / F 313.

符号アドレス生成部315は、メインメモリ210のCMYKページ符号格納領域210Dのうち、符号書き込み部306による書き込み先のメモリアドレスを生成する。そして、符号書き込み部306は、符号フォーマット生成処理部305で生成された符号を、符号アドレス生成部315で生成されたメモリアドレスに従ってメインメモリ210のCMYK符号格納領域210Dに書き込むように、メインメモリアービタI/F313を解してメインメモリアービタ202に要求する。メインメモリアービタ202は、この要求に従い、供給された符号をメインメモリ210に書き込む。   The code address generation unit 315 generates a memory address to which the code writing unit 306 writes in the CMYK page code storage area 210D of the main memory 210. The code writing unit 306 then writes the code generated by the code format generation processing unit 305 in the CMYK code storage area 210D of the main memory 210 in accordance with the memory address generated by the code address generation unit 315. The main memory arbiter 202 is requested through the I / F 313. The main memory arbiter 202 writes the supplied code in the main memory 210 in accordance with this request.

<スライド/リスト生成処理部のハードウェア構成例>
図18は、上述したスライド/リスト生成処理部304のハードウェア構成の一例を示す。スライド/リスト生成処理部304は、スライド探索処理部320、スライド記憶部321、リスト探索処理部322およびコントローラ323を有する。
<Hardware configuration example of slide / list generation processing unit>
FIG. 18 shows an example of the hardware configuration of the slide / list generation processing unit 304 described above. The slide / list generation processing unit 304 includes a slide search processing unit 320, a slide storage unit 321, a list search processing unit 322, and a controller 323.

コントローラ323は、例えばマイクロプロセッサからなり、スライド/リスト生成処理部304の動作を制御する。例えば、コントローラ323は、上述したスライド探索処理およびリスト探索処理のうち何れが有効かを示すフラグLISTFLGによる動作制御を行う。   The controller 323 is composed of, for example, a microprocessor, and controls the operation of the slide / list generation processing unit 304. For example, the controller 323 performs operation control using a flag LISTFLG indicating which one of the above-described slide search process and list search process is valid.

スライド/リスト生成処理部304に対して、例えば1クロック毎に1単位のSlide符号化用データ(予測誤差値または画素値)が入力され、スライド探索処理部320、スライド記憶部321およびリスト探索処理部322にそれぞれ供給される。また、ESC符号化用データ(注目画素の画素値)は、レジスタ324に格納される。レジスタ324に格納される画素値は、ESC符号の符号化の際のデータ値として用いられる。以下では、データの1単位を1バイトとする。   For example, one unit of Slide encoding data (prediction error value or pixel value) is input to the slide / list generation processing unit 304 every clock, and the slide search processing unit 320, the slide storage unit 321 and the list search processing are performed. Each of the units 322 is supplied. Further, the ESC encoding data (pixel value of the target pixel) is stored in the register 324. The pixel value stored in the register 324 is used as a data value when encoding the ESC code. In the following, one unit of data is assumed to be 1 byte.

スライド記憶部321は、各々がレジスタからなり、それぞれ1単位のデータが格納される128個のSlide0、Slide1、…、Slide127が直列に接続されて構成される。また、各Slide0、Slide1、…、Slide127の出力は、次段のスライドに供給されると共に、後述するスライド探索処理部320の対応する比較器325の一方の入力端と、リスト探索処理部322の対応する比較器326の一方の入力端にそれぞれ供給される。   The slide storage unit 321 is composed of a register, and 128 Slide0, Slide1,..., Slide127 each storing one unit of data are connected in series. In addition, the output of each Slide 0, Slide 1,..., Slide 127 is supplied to the next slide, and one input terminal of a corresponding comparator 325 of the slide search processing unit 320 described later and the list search processing unit 322. The signal is supplied to one input terminal of the corresponding comparator 326.

スライド記憶部321は、これら128個のSlide0、Slide1、…、Slide127によりFIFOが構成され、入力されたSlide符号化用データがSlide0からSlide1、Slide2、…と1クロック毎に順次送られていく。   In the slide storage unit 321, a FIFO is composed of these 128 Slide 0, Slide 1,..., Slide 127, and the input Slide encoding data is sequentially sent from Slide 0 to Slide 1, Slide 2,.

スライド探索処理部320は、128個の比較器3250、3251、…、325127と、128入力の論理和回路327とを有する。比較器3250、3251、…、325127のそれぞれは、一方および他方の入力端に入力されたデータを比較し、両者が一致していれば値「1」を出力し、一致していなければ値「0」を出力する。 The slide search processing unit 320 includes 128 comparators 325 0 , 325 1 ,..., 325 127 and a 128-input OR circuit 327. Each of the comparators 325 0 , 325 1 ,..., 325 127 compares the data input to one and the other input terminals, and outputs a value “1” if they match, and must match. Value “0” is output.

比較器3250、3251、…、325127の一方の入力端には、上述したように、スライド記憶部321が有するSlide0、Slide1、…、Slide127の出力がそれぞれ入力される。また、比較器3250、3251、…、325127のそれぞれの他方の入力端には、Slide符号化用データが入力される。 As described above, the outputs of Slide 0, Slide 1 ,..., Slide 127 included in the slide storage unit 321 are input to one input terminal of each of the comparators 325 0 , 325 1 ,. Further, the comparator 325 0, 325 1, ..., to the respective other input of 325 127, for Slide encoded data is input.

比較器3250、3251、…、325127のそれぞれの出力は、128入力の論理和回路327に入力されると共に、後述するリスト探索処理部322のマルチプレックス(MUX)3280、3281、…、328127の一方の入力端にそれぞれ入力される。論理和回路327の出力は、フラグSFINDFLGとしてコントローラ323に供給される。このフラグSFINDFLGは、Slide0、Slide1、…、Slide127のデータのうちの少なくとも1つが入力されたSlide符号化用データと一致しているか否かを示す。 The outputs of the comparators 325 0 , 325 1 ,..., 325 127 are input to a 128-input OR circuit 327 and multiplexed (MUX) 328 0 , 328 1 , 328 of a list search processing unit 322 described later. .., And 328, 127 , respectively. The output of the OR circuit 327 is supplied to the controller 323 as the flag SFINDFLG. This flag SFINDFLG indicates whether or not at least one of the data of Slide 0, Slide 1,..., Slide 127 matches the input slide encoding data.

リスト探索処理部322は、それぞれ128個の比較器3260、3261、…、326127、マルチプレックス(MUX)3281、3282、…、328n、ならびに、レジスタ3290、3291、…、329127と、アドレス情報生成部330と、128入力の論理和回路331とを有する。比較器3260、3261、…、326127のそれぞれは、一方および他方の入力端に入力されたデータを比較し、両者が一致していれば値「1」を出力し、一致していなければ値「0」を出力する。 The list search processing unit 322 includes 128 comparators 326 0 , 326 1 ,..., 326 127 , multiplex (MUX) 328 1 , 328 2 ,..., 328 n , and registers 329 0 , 329 1 ,. 329 127 , an address information generation unit 330, and a 128-input OR circuit 331. Each of the comparators 326 0 , 326 1 ,..., 326 127 compares the data input to one and the other input terminals, and outputs a value “1” if they match, and must match. Value “0” is output.

比較器3260、3261、…、326127の一方の入力端には、上述したように、スライド記憶部321が有するSlide0、Slide1、…、Slide127の出力がそれぞれ入力される。また、比較器3260、3261、…、3260127のそれぞれの他方の入力端には、Slide符号化用データが入力される。 As described above, the outputs of Slide 0, Slide 1 ,..., Slide 127 included in the slide storage unit 321 are input to one input terminal of each of the comparators 326 0 , 326 1 ,. Further, Slide encoding data is input to the other input terminal of each of the comparators 326 0 , 326 1 ,..., 3260 127 .

比較器3260、3261、…、326127の出力は、WフラグWFLGmであって、128入力の論理和回路331にそれぞれ入力されると共に、マルチプレックス3280、3281、…、328127の他方の入力端にそれぞれ入力される。論理和回路331の出力は、フラグLFINDFLGとしてコントローラ323に供給される。フラグLFINDFLGは、WフラグWFLG0、WFLG1、…、WFLG127のうち少なくとも1の値が「1」であることを示す。 Comparators 326 0, 326 1, ..., output of 326 127, together with a W flag WFLGm, are input to the 128 input of the OR circuit 331, a multiplex 328 0, 328 1, ..., 328 127 Each is input to the other input terminal. The output of the OR circuit 331 is supplied to the controller 323 as a flag LFINDFLG. The flag LFINDFLG indicates that at least one of the W flags WFLG0, WFLG1,..., WFLG127 is “1”.

マルチプレックス3280、3281、…、328127の出力は、RフラグRFLGmとされて、それぞれレジスタ3290、3291、…、329127に格納される。マルチプレックス3280、3281、…、328127は、コントローラ323から図示しない経路を経て供給されるフラグListFLGにより、一方および他方の端子のうち何れを選択するかが制御される。 Multiplex 328 0, 328 1, ..., output of 328 127, is the R flag RFLGm, the registers 329 0, 329 1, ..., stored in 329 127. The multiplexes 328 0 , 328 1 ,..., 328 127 are controlled by the flag ListFLG supplied from the controller 323 via a path (not shown) to select one of the other terminals.

若し、フラグListFLGの値が「0」であって、現在スライド探索処理が有効であることが示されていれば、マルチプレックス3280、3281、…、328127は、それぞれの一方の入力端に入力された、スライド探索処理部320における比較器3250、3251、…、325127の出力をレジスタ3290、3291、…、329127に供給するように制御される。 Wakashi, the value of the flag ListFLG is "0", if it is shown that the current slide search process is effective, multiplex 328 0, 328 1, ..., 328 127, each of one input is input to an end, 0 comparator 325 in the slide search processing unit 320, 325 1, ..., register 329 0 output of 325 127, 329 1, ..., it is controlled to supply to the 329 127.

一方、フラグListFLGの値が「1」であって、現在リスト探索処理が有効であることが示されていれば、マルチプレックス3280、3281、…、328127は、それぞれの他方の入力端に入力された、リスト探索処理部322における比較器3260、3261、…、326127を選択してレジスタ3290、3291、…、329127に供給するように制御される。 On the other hand, the value of the flag ListFLG is "1", if it is shown that the current list search process is effective, multiplex 328 0, 328 1, ..., 328 127, each of the other input terminal It is input, the comparator 326 0, 326 1 in the list search unit 322, a ..., register 329 0 select 326 127, 329 1, ..., is controlled to supply to the 329 127.

レジスタ3290、3291、…、329127は、マルチプレックス3280、3281、…、328127からの出力が供給されると、格納されているRフラグRFLG0、RFLG1、…、RFLG127を出力する。すなわち、レジスタ3290、3291、…、329127に格納されるRフラグRFLG0、RFLG1、…、RFLG127は、マルチプレックス3280、3281、…、328127からの出力により更新される。 When the outputs from the multiplexes 328 0 , 328 1 ,..., 328 127 are supplied, the registers 329 0 , 329 1 ,..., 329 127 output the stored R flags RFLG 0, RFLG 1,. . That is, the register 329 0, 329 1, ..., R flag is stored in 329 127 RFLG0, RFLG1, ..., RFLG127 is multiplex 328 0, 328 1, ..., it is updated by the output from the 328 127.

レジスタ3290、3291、…、329127から出力されたRフラグRFLG0、RFLG1、…、RFLG127は、比較器3260、3261、…、326127の動作を制御する制御信号として、比較器3260、3261、…、326127の制御端にそれぞれ供給される。例えば、比較器326m(0≦m≦127)は、対応するレジスタ329mから供給された制御信号が値「1」を示していれば比較動作を行い、値「0」を示していれば比較動作を行わない。これは、3260、3261、…、326127それぞれの動作は、3260、3261、…、326127自身の出力により絞り込まれていくことを意味する。 Register 329 0, 329 1, ..., 329 127 R flag outputted from RFLG0, RFLG1, ..., RFLG127 includes a comparator 326 0, 326 1, ..., as a control signal for controlling the operation of 326 127, the comparator 326 0, 326 1, ..., it is supplied to the control end of 326 127. For example, the comparator 326 m (0 ≦ m ≦ 127) performs the comparison operation if the control signal supplied from the corresponding register 329 m indicates the value “1”, and if the control signal indicates the value “0”. The comparison operation is not performed. This, 326 0, 326 1, ..., 326 127 respectively operate, 326 0, 326 1, ..., means that gradually narrowed by 326 127 its output.

レジスタ3290、3291、…、329127から出力されたRフラグRFLG0、RFLG1、…、RFLG127は、さらにアドレス情報生成部330にも供給される。アドレス情報生成部330は、図9の処理#5で説明したように、リスト探索処理が終了した際に、レジスタ3290、3291、…、329127から出力されたRフラグRFLG0、RFLG1、…、RFLG127のうち、値が「1」であるRフラグRFLGmを選択し、選択されたRフラグRFLGmの番号をアドレス情報Addressとして出力する。アドレス情報生成部330から出力されたアドレス情報Addressは、レジスタ332に格納されると共に、コントローラ323に供給される。 The R flags RFLG0, RFLG1,..., RFLG127 output from the registers 329 0 , 329 1 ,..., 329 127 are also supplied to the address information generation unit 330. Address information generator 330, as described in the process # 5 in FIG. 9, when the list search process has been completed, the register 329 0, 329 1, ..., 329 127 R flag outputted from RFLG0, RFLG1, ... , RFLG127 selects an R flag RFLGm having a value of “1”, and outputs the number of the selected R flag RFLGm as address information Address. The address information Address output from the address information generation unit 330 is stored in the register 332 and supplied to the controller 323.

ここで、アドレス情報生成部330は、値が「1」であるRフラグRFLGmが複数存在する場合に、スライドの番号が小さい、すなわち、スライド記憶部321においてより入力側に近いSlideに基づくRフラグRFLGmから優先的に選択する。これは、入力に近いSlideの方が、入力データと一致する可能性が高いからである。このとき、図8を用いて説明した符号フォーマットにおいて、アドレス情報Addressが小さい方が短い符号となるように構成すると、圧縮効率が高くなり、好ましい。   Here, when there are a plurality of R flags RFLGm having a value of “1”, the address information generation unit 330 has a small slide number, that is, the R flag based on Slide closer to the input side in the slide storage unit 321. Select preferentially from RFLGm. This is because the Slide closer to the input is more likely to match the input data. At this time, in the code format described with reference to FIG. 8, it is preferable that the code having the smaller address information Address is a shorter code because the compression efficiency is increased.

コントローラ323は、スライド探索処理部320から供給されたフラグSFINDFLGと、リスト探索処理部322から供給されたフラグLFINDFLGと、アドレス情報生成部330から供給されたアドレス情報Addressとに基づき、レングス情報Lengthおよび比較結果フラグSlideFLAGを生成する。レングス情報Lengthはレジスタ333に格納され、比較結果フラグSlideFLAGはレジスタ334に格納される。   Based on the flag SFINDFLG supplied from the slide search processing unit 320, the flag LFINDFLG supplied from the list search processing unit 322, and the address information Address supplied from the address information generating unit 330, the controller 323 performs length information Length and A comparison result flag SlideFLAG is generated. The length information Length is stored in the register 333, and the comparison result flag SlideFLAG is stored in the register 334.

なお、レジスタ332〜334にそれぞれ格納されたアドレス情報Address、レングス情報Length、比較結果フラグSlideFLAGは、それぞれ符号フォーマット生成処理部305により読み出され、図8に例示する符号フォーマットに従い符号化され符号データ(第1符号データ)が生成される。また、レジスタ324に格納された注目画素の画素値も、符号フォーマット生成処理部305により読み出され、図8に例示する符号フォーマットに従い符号化され符号データ(第2符号データ)が生成される。   Note that the address information Address, length information Length, and comparison result flag SlideFLAG stored in the registers 332 to 334, respectively, are read by the code format generation processing unit 305 and encoded according to the code format illustrated in FIG. (First code data) is generated. The pixel value of the target pixel stored in the register 324 is also read by the code format generation processing unit 305 and encoded according to the code format illustrated in FIG. 8 to generate code data (second code data).

このような構成において、スライド探索処理は、以下のように行われる。すなわち、比較器3250、3251、…、325127による、入力データ(Slide符号化用データ)と、Slide0、Slide1、…、Slide127に格納された過去の入力データとの比較処理が行われる。比較結果がそれぞれ論理和回路327に供給され、フラグSFINDFLGが出力される。比較結果は、マルチプレックス3280、3281、…、328127にも供給され、スライド探索処理の間は、レジスタ3290、3291、…、329127に格納される。図18の構成によれば、この一連の処理を1クロックで実行可能である。 In such a configuration, the slide search process is performed as follows. That is, the comparator 325 0 , 325 1 ,..., 325 127 performs comparison processing between the input data (Slide encoding data) and the past input data stored in Slide 0 , Slide 1,. The comparison results are respectively supplied to the OR circuit 327 and the flag SFINDFLG is output. The result of the comparison, a multiplex 328 0, 328 1, ..., is also supplied to the 328 127, between the slide search process is register 329 0, 329 1, ..., stored in 329 127. According to the configuration of FIG. 18, this series of processing can be executed in one clock.

また、リスト探索処理は、以下のように行われる。すなわち、比較器3260、3261、…、326127による、入力データと、Slide0、Slide1、…、Slide127に格納された過去の入力データとの比較処理が行われる。このとき、レジスタ3290、3291、…、329127に格納されるRフラグRFLG0、RFLG1、…、RFLG127の値に基づき、比較器3260、3261、…、326127の比較動作が制御される。例えば、RフラグRFLG0、RFLG1、…、RFLG127の値が全て「0」であれば、比較器3260、3261、…、326127全ての比較動作が行われないことになる。この状態を、リスト探索処理が行われていない状態とする。 The list search process is performed as follows. That is, the comparator 326 0 , 326 1 ,..., 326 127 performs comparison processing between the input data and past input data stored in Slide 0, Slide 1,. At this time, the comparison operation of the comparators 326 0 , 326 1 ,..., 326 127 is controlled based on the values of the R flags RFLG 0, RFLG 1,..., RFLG 127 stored in the registers 329 0 , 329 1 ,. The For example, R flag RFLG0, RFLG1, ..., if all the values of RFLG127 "0", the comparator 326 0, 326 1, ..., so that the 326 127 all the comparison operation is not performed. This state is a state in which the list search process is not performed.

比較器3260、3261、…、326127による比較結果がそれぞれ論理和回路331に供給され、フラグLFINDFLGが出力される。また、各比較結果は、マルチプレックス3280、3281、…、328127に供給され、リスト探索処理の間は、レジスタ3290、3291、…、329127に格納される。また、レジスタ3290、3291、…、329127に格納されるRフラグRFLG0、RFLG1、…、RFLG127は、アドレス情報生成部330にも保持される。 The comparison results by the comparators 326 0 , 326 1 ,..., 326 127 are respectively supplied to the OR circuit 331 and the flag LFINDFLG is output. Each comparison result, multiplex 328 0, 328 1, ..., is supplied to 328 127, among the list search process, the register 329 0, 329 1, ..., stored in 329 127. The register 329 0, 329 1, ..., R flag RFLG0 stored in 329 127, RFLG1, ..., RFLG127 is also held in the address information generation unit 330.

アドレス情報生成部330は、レジスタ3290、3291、…、329127に格納される値が全て「0」であれば、保持しているRフラグRFLG0、RFLG1、…、RFLG127のうち値が「1」のRフラグRFLGmの位置を、アドレス情報Addressとしてコントローラ323に渡す。図18の構成によれば、このリスト探索処理による一連の処理を1クロックで実行可能である。 If the values stored in the registers 329 0 , 329 1 ,..., 329 127 are all “0”, the address information generation unit 330 sets the value among the R flags RFLG 0, RFLG 1,. The position of the R flag RFLGm of “1” is passed to the controller 323 as address information Address. According to the configuration of FIG. 18, a series of processing by this list search processing can be executed in one clock.

図18の構成によれば、スライド探索処理部320と、リスト探索処理部322とがそれぞれ別個の構成とされると共に、スライド探索処理部320とリスト探索処理部322とでスライド記憶部321を共有する。そのため、スライド探索処理部320によるスライド探索処理と、リスト探索処理部322によるリスト探索処理とを並列的に実行することが可能である。したがって、符号化処理をより高速化できる。また、図18の構成によれば、先読みバッファや大規模なマトリクスアレイなどの構成が不要なので、ハードウェア規模を小さくできる。   According to the configuration of FIG. 18, the slide search processing unit 320 and the list search processing unit 322 are configured separately from each other, and the slide search processing unit 320 and the list search processing unit 322 share the slide storage unit 321. To do. Therefore, it is possible to execute the slide search processing by the slide search processing unit 320 and the list search processing by the list search processing unit 322 in parallel. Therefore, the encoding process can be further speeded up. In addition, according to the configuration of FIG. 18, the hardware scale can be reduced because a configuration such as a prefetch buffer or a large-scale matrix array is unnecessary.

<復号部>
図19は、復号部205の構成の一例を示す。復号部205において、符号読み込み部400により、上述した符号化部204で符号化された符号データがメインメモリ210のCMYKページ符号格納領域210Dから読み込まれる。符号読み込み部400に読み込まれた符号データは、符号フォーマット解析部401に供給される。符号フォーマット解析部401は、図8を用いて説明した符号フォーマットに従い、供給された符号データを解析して注目画素の画素値を示すESC値、アドレス情報Address、レングス情報Lengthおよび比較結果フラグSlideFLAGを取り出す。取り出されたこれらのデータは、スライド展開部402に供給される。
<Decoding unit>
FIG. 19 shows an exemplary configuration of the decoding unit 205. In the decoding unit 205, the code reading unit 400 reads the code data encoded by the above-described encoding unit 204 from the CMYK page code storage area 210D of the main memory 210. The code data read by the code reading unit 400 is supplied to the code format analysis unit 401. The code format analysis unit 401 analyzes the supplied code data in accordance with the code format described with reference to FIG. 8 to obtain an ESC value indicating the pixel value of the pixel of interest, address information Address, length information Length, and comparison result flag SlideFLAG. Take out. These extracted data are supplied to the slide development unit 402.

スライド展開部402は、直列に接続された複数のレジスタがFIFOとして構成されるスライド記憶部を持つ。各レジスタは、スライドと呼ばれ、それぞれ1単位(例えば1バイト)のデータを格納可能とされる。多値画像を復号する場合は、スライド記憶部の各スライドには予測誤差値が記憶される一方、少値画像を復号する場合は、スライド記憶部の各スライドには画素値が記憶される。   The slide development unit 402 has a slide storage unit in which a plurality of registers connected in series is configured as a FIFO. Each register is called a slide, and can store one unit (for example, 1 byte) of data. When decoding a multi-valued image, a prediction error value is stored in each slide of the slide storage unit. On the other hand, when decoding a low-value image, a pixel value is stored in each slide of the slide storage unit.

スライド展開部402は、符号フォーマット解析部401から供給された比較結果フラグSlideFLGが「1」であるときは、複数のレジスタのうち、アドレス情報Addressで特定されるレジスタに記憶されたデータを読み出してSlide復号値とする。多値画像を復号する場合は、アドレス情報Addressで特定されるレジスタに記憶された予測誤差値がSlide復号値として読み出される一方、少値画像を復号する場合は、アドレス情報Addressで特定されるレジスタに記憶された画素値がSlide復号値として読み出されるという具合である。   When the comparison result flag SlideFLG supplied from the code format analysis unit 401 is “1”, the slide development unit 402 reads out the data stored in the register specified by the address information Address among the plurality of registers. Let it be Slide decoding value. When decoding a multi-valued image, the prediction error value stored in the register specified by the address information Address is read as a Slide decoded value, whereas when decoding a low-value image, the register specified by the address information Address In other words, the pixel value stored in is read as a slide decoded value.

一方、スライド展開部402は、符号フォーマット解析部401から渡された比較結果フラグSlideFLGが「0」であるときは、符号フォーマット解析部401から渡されたESC値をESC復号値とする。   On the other hand, when the comparison result flag SlideFLG passed from the code format analysis unit 401 is “0”, the slide development unit 402 sets the ESC value passed from the code format analysis unit 401 as an ESC decoded value.

また、本実施形態では、スライド展開部402には、多値画像の復号または少値画像の復号の何れかを指定する復号指定信号が、CPU212から送られる。復号指定信号により多値画像の復号が指定された場合は、スライド展開部402は、比較結果フラグSlideFLG、Slide復号値、ESC復号値を後段の予測処理部403へ供給する。一方、復号指定信号により少値画像の復号が指定された場合は、スライド展開部402は、比較結果フラグSlideFLG、Slide復号値、ESC復号値を後段のマルチプレックス404へ供給する。なお、本実施形態では、少値画像の復号を行う場合は、スライド展開部402は、比較結果フラグSlideFLG、Slide復号値、ESC復号値を予測処理部403へ供給しないが、これに限らず、少値画像の復号を行う場合であっても、スライド展開部402は、比較結果フラグSlideFLG、Slide復号値、ESC復号値を予測処理部403へ供給することもできる。   In the present embodiment, the CPU 212 receives a decoding designation signal that designates either decoding of a multi-valued image or decoding of a low-valued image. When decoding of a multi-valued image is designated by the decoding designation signal, the slide development unit 402 supplies the comparison result flag SlideFLG, Slide decoded value, and ESC decoded value to the subsequent prediction processing unit 403. On the other hand, when decoding of a small-value image is designated by the decoding designation signal, the slide development unit 402 supplies the comparison result flag SlideFLG, Slide decoded value, and ESC decoded value to the multiplex 404 at the subsequent stage. In this embodiment, when decoding a small-value image, the slide development unit 402 does not supply the comparison result flag SlideFLG, the Slide decoded value, and the ESC decoded value to the prediction processing unit 403. Even in the case of decoding a small-value image, the slide development unit 402 can also supply the comparison result flag SlideFLG, Slide decoded value, and ESC decoded value to the prediction processing unit 403.

図20は、予測処理部403のより詳細な構成の一例を示す図である。予測処理部403は、スライド展開部402から、「1」に設定された比較結果フラグSlideFLAGとSlide復号値とを供給された場合は、ラインメモリ制御部407によりラインメモリ408から読み出された、復号対象の画素(注目画素)の周辺3画素の復号済みの画素a、b、c(図6参照)の画素値に基づき、注目画素の画素値の予測値を算出する。そして、その算出した予測値と、スライド展開部402から渡されたSlide復号値(ここでは予測画素値)とから、注目画素の画素値を算出し、算出した注目画素の画素値を、後段のマルチプレックス405(図19参照)へ供給する。   FIG. 20 is a diagram illustrating an example of a more detailed configuration of the prediction processing unit 403. When the comparison result flag SlideFLAG and the Slide decoded value set to “1” are supplied from the slide development unit 402, the prediction processing unit 403 is read from the line memory 408 by the line memory control unit 407. A predicted value of the pixel value of the target pixel is calculated based on the pixel values of the decoded pixels a, b, and c (see FIG. 6) of the surrounding three pixels around the pixel to be decoded (target pixel). Then, the pixel value of the target pixel is calculated from the calculated predicted value and the slide decoded value (here, the predicted pixel value) passed from the slide development unit 402, and the calculated pixel value of the target pixel is It supplies to the multiplex 405 (refer FIG. 19).

なお、ラインメモリ408は、復号を行っている復号ラインと、直前に復号が終了した復号済みのラインとの2ライン分の画素値を格納可能である。ここでは、ラインメモリ408のうち復号ラインが記憶される領域を現ラインメモリ、復号済みのラインが記憶される領域を前ラインメモリと呼ぶ。ラインメモリ制御部407は、ラインメモリ408に対する画素値の読み書きを制御する。   Note that the line memory 408 can store pixel values for two lines, that is, a decoding line that is being decoded and a decoded line that has just been decoded. Here, in the line memory 408, an area in which a decoded line is stored is referred to as a current line memory, and an area in which a decoded line is stored is referred to as a previous line memory. The line memory control unit 407 controls reading and writing of pixel values with respect to the line memory 408.

一方、予測処理部403は、スライド展開部402から、「0」に設定された比較結果フラグSlideFLAGとESC復号値とを供給された場合は、その供給されたESC復号値を注目画素の画素値として、後段のマルチプレックス405(図19参照)へ供給する。また、このとき予測処理部403は、上述した方法と同様にして、復号対象の画素(注目画素)の画素値の予測値を算出する。そして、その算出した予測値をスライド展開部402へ供給する。スライド展開部402は、予測処理部403から供給された予測値と、符号フォーマット解析部401から供給されたESC値(注目画素の画素値)との差分である予測誤差値を算出し、その算出した予測誤差値をスライドに追加する。   On the other hand, when the comparison processing flag SlideFLAG set to “0” and the ESC decoded value are supplied from the slide development unit 402, the prediction processing unit 403 uses the supplied ESC decoded value as the pixel value of the target pixel. Is supplied to the subsequent multiplex 405 (see FIG. 19). At this time, the prediction processing unit 403 calculates the predicted value of the pixel value of the decoding target pixel (target pixel) in the same manner as described above. Then, the calculated predicted value is supplied to the slide developing unit 402. The slide development unit 402 calculates a prediction error value that is a difference between the prediction value supplied from the prediction processing unit 403 and the ESC value (pixel value of the target pixel) supplied from the code format analysis unit 401. Add the predicted error value to the slide.

再び、図19に戻って説明を続ける。図19に示すように、マルチプレックス404の一方の入力端には、スライド展開部402からのSlide復号値が供給され、他方の入力端には、スライド展開部402からのESC復号値が供給される。マルチプレックス404は、スライド展開部402から、「1」に設定された比較結果フラグSlideFLAGを供給された場合は、一方の入力端に供給されたSlide復号値で示される画素値を、マルチプレックス405へ供給する。一方、マルチプレックス404は、スライド展開部402から、「0」に設定された比較結果フラグSlideFLAGを供給された場合は、他方の入力端に供給されたESC復号値で示される画素値を、マルチプレックス405へ供給する。   Returning to FIG. 19, the description will be continued. As shown in FIG. 19, the Slide decoding value from the slide development unit 402 is supplied to one input end of the multiplex 404, and the ESC decoding value from the slide development unit 402 is supplied to the other input end. The When the comparison result flag SlideFLAG set to “1” is supplied from the slide development unit 402, the multiplex 404 converts the pixel value indicated by the Slide decoded value supplied to one input terminal into the multiplex 405. To supply. On the other hand, when the comparison result flag SlideFLAG set to “0” is supplied from the slide development unit 402, the multiplex 404 converts the pixel value indicated by the ESC decoded value supplied to the other input terminal to the multiplex 404. Supply to plex 405.

図19に示すように、マルチプレックス405には、前述の復号指定信号がCPU212から供給される。また、マルチプレックス405の一方の入力端には、予測処理部403からの画素値が供給され、他方の入力端には、マルチプレックス404からの画素値が供給される。   As shown in FIG. 19, the decoding designation signal described above is supplied from the CPU 212 to the multiplex 405. The pixel value from the prediction processing unit 403 is supplied to one input terminal of the multiplex 405, and the pixel value from the multiplex 404 is supplied to the other input terminal.

ここで、復号指定信号により多値画像の復号が指定された場合は、マルチプレックス405は、一方の入力端に供給された画素値を、画像書き込み部406へ供給する。一方、復号指定信号により少値画像の復号が指定された場合は、マルチプレックス405は、他方の入力端に供給された画素値を、画像書き込み部406へ供給する。画像書き込み部406は、マルチプレックス405から供給された画素値を、メインメモリ210のCMYKバンド画像データ格納領域210Cに書き込む。   Here, when decoding of a multi-valued image is designated by the decoding designation signal, the multiplex 405 supplies the pixel value supplied to one input end to the image writing unit 406. On the other hand, when decoding of a low-value image is designated by the decoding designation signal, the multiplex 405 supplies the pixel value supplied to the other input terminal to the image writing unit 406. The image writing unit 406 writes the pixel value supplied from the multiplex 405 to the CMYK band image data storage area 210 </ b> C of the main memory 210.

<復号処理の詳細>
図21は、上述した本実施形態の符号化方法により符号化された符号データを、復号部205で復号する一例の処理を示すフローチャートである。なお、符号読み込み部400により、メインメモリ210から予め符号データが読み込まれているものとする。先ず、ステップS100で、符号フォーマット解析部401は、符号読み込み部400により読み込まれた符号データのヘッダを読み込み、後続する符号がESC符号であるかを判定する(ステップS101)。
<Details of decryption processing>
FIG. 21 is a flowchart showing an example of processing in which the decoding unit 205 decodes code data encoded by the above-described encoding method of the present embodiment. It is assumed that the code reading unit 400 reads code data from the main memory 210 in advance. First, in step S100, the code format analysis unit 401 reads the header of the code data read by the code reading unit 400, and determines whether the subsequent code is an ESC code (step S101).

読み込まれたヘッダからESC符号であると判定された場合は、処理がステップS102に移行される。ステップS102で、符号フォーマット解析部401は、ヘッダに続く所定長のビットを画素値として読み込む。読み込まれた画素値は、ESC復号値としてスライド展開部402へ出力される(ステップS103)。次のステップS104で、スライド展開部402は、Slide復号値を算出するSlide復号値計算処理を実行する。このSlide復号値計算処理の詳細な内容は後述する。次のステップS104で、スライド展開部402は、Slide復号値をスライド記憶部に追加するSlide復号値追加処理を行う(ステップS105)。Slide復号値追加処理は、図15のフローチャートで説明したのと同様の手順により行われる。そして、処理がステップS106に移行される。ステップS106では、ESC復号値、つまりは注目画素の画素値が、ラインメモリ408の現ラインメモリに書き込まれる。   If it is determined from the read header that the code is an ESC code, the process proceeds to step S102. In step S102, the code format analysis unit 401 reads a predetermined length bit following the header as a pixel value. The read pixel value is output to the slide development unit 402 as an ESC decoded value (step S103). In the next step S104, the slide expansion unit 402 executes a slide decoded value calculation process for calculating a slide decoded value. The detailed contents of the slide decoded value calculation process will be described later. In the next step S104, the slide development unit 402 performs a slide decoded value addition process for adding the slide decoded value to the slide storage unit (step S105). The slide decoding value addition process is performed by the same procedure as described in the flowchart of FIG. Then, the process proceeds to step S106. In step S <b> 106, the ESC decoded value, that is, the pixel value of the target pixel is written into the current line memory of the line memory 408.

上述のステップS101で、読み込まれたヘッダから、ESC符号ではないと判定された場合は、Slide符号であるか否かが判定される(ステップS107)。ステップS107で、Slide符号であると判定された場合は、処理はステップS108に移行される。ステップS108では、符号フォーマット解析部401が、ヘッダに続く所定長のビットをレングス情報Lengthおよびアドレス情報Addressとして読み込む。読み込まれたレングス情報Lengthおよびアドレス情報Addressは、比較結果フラグSlideFLAGとともにスライド展開部402に供給される。   If it is determined in step S101 described above that the code is not an ESC code from the read header, it is determined whether the code is a Slide code (step S107). If it is determined in step S107 that the code is a Slide code, the process proceeds to step S108. In step S108, the code format analysis unit 401 reads bits having a predetermined length following the header as length information Length and address information Address. The read length information Length and address information Address are supplied to the slide development unit 402 together with the comparison result flag SlideFLAG.

次のステップS109で、スライド展開部402は、スライド記憶部のスライドのうち、アドレス情報Addressで示されるスライドに格納されるデータ(Slide復号値)を読み込む。そして、スライド展開部402は、読み込んだSlied復号値をスライドに追加する(ステップS110)。そして、処理がステップS111に移行される。ステップS111で、スライド展開部402は、ESC復号値を算出するESC復号値計算処理を実行する。このESC復号値計算処理の詳細な内容は後述する。   In the next step S109, the slide development unit 402 reads data (Slide decoded value) stored in the slide indicated by the address information Address among the slides in the slide storage unit. Then, the slide development unit 402 adds the read Slied decoded value to the slide (step S110). Then, the process proceeds to step S111. In step S111, the slide developing unit 402 executes an ESC decoded value calculation process for calculating an ESC decoded value. Details of the ESC decoded value calculation process will be described later.

処理はステップS112に移行され、レングス情報Lengthが「0」より大きいか否かが判定される。若し、レングス情報Lengthが「0」以下であると判定されたら、処理はステップS106に移行し、ラインメモリ408の現ラインメモリにESC復号値が書き込まれる。一方、レングス情報Lengthが「0」より大きいと判定されたら、処理はステップS113に移行される。ステップS113で、現在のレングス情報Lengthから1を減じた値が新たなレングス情報Lengthとされ、処理はステップS109に戻される。   The process proceeds to step S112, and it is determined whether or not the length information Length is greater than “0”. If it is determined that the length information Length is “0” or less, the process proceeds to step S106, and the ESC decoded value is written in the current line memory of the line memory 408. On the other hand, if it is determined that the length information Length is greater than “0”, the process proceeds to step S113. In step S113, a value obtained by subtracting 1 from the current length information Length is set as new length information Length, and the process returns to step S109.

上述のステップS107で、Slide符号ではないと判定された場合は、読み込まれた符号データは、ライン終端符号であると判定され、処理はステップS114に移行される。
ステップS114では、ラインメモリ制御部407は、現ラインメモリのデータを前ラインメモリに上書きする。そして、処理はステップS115に移行され、全ラインに対する復号処理が終了したか否かが判定される。全ラインに対する復号処理が終了していると判定された場合は、一連の処理が終了する。一方、全ラインに対する復号処理が終了していないと判定された場合は、処理はステップS100に戻される。
If it is determined in step S107 that the code is not a Slide code, the read code data is determined to be a line end code, and the process proceeds to step S114.
In step S114, the line memory control unit 407 overwrites the data in the current line memory on the previous line memory. Then, the process proceeds to step S115, and it is determined whether or not the decoding process for all lines has been completed. If it is determined that the decoding process for all lines has been completed, the series of processes ends. On the other hand, if it is determined that the decoding process for all lines has not been completed, the process returns to step S100.

図22は、図21のステップS104で実行されるSlide復号値計算処理の詳細な内容の一例を示すフローチャートである。先ず、ステップS120で、スライド展開部402は、前述の復号指定信号により多値画像の復号が指定されているか否かを判定する。多値画像の復号が指定されていると判定された場合は、スライド展開部402は、符号フォーマット解析部401から供給されたESC復号値を注目画素の画素値とする(ステップS121)。次のステップS122で、スライド展開部402は、注目画素の画素値の予測値を算出する。次のステップS123で、スライド展開部402は、注目画素の画素値と、予測値との差分である予測誤差値を算出し、その算出した予測誤差値をSlide復号値とする(ステップS124)。   FIG. 22 is a flowchart showing an example of detailed contents of the slide decoded value calculation process executed in step S104 of FIG. First, in step S120, the slide developing unit 402 determines whether or not decoding of a multi-value image is specified by the above-described decoding specifying signal. If it is determined that multi-valued image decoding is designated, the slide development unit 402 sets the ESC decoded value supplied from the code format analysis unit 401 as the pixel value of the target pixel (step S121). In the next step S122, the slide development unit 402 calculates a predicted value of the pixel value of the target pixel. In the next step S123, the slide development unit 402 calculates a prediction error value that is a difference between the pixel value of the target pixel and the prediction value, and sets the calculated prediction error value as a slide decoded value (step S124).

一方、上述のステップS120で、多値画像の復号が指定されていない、つまりは少値画像の復号が指定されていると判定された場合は、スライド展開部402は、図21のステップS102で特定したESC復号値をSlide復号値とする。   On the other hand, if it is determined in step S120 described above that decoding of a multi-valued image is not specified, that is, decoding of a low-valued image is specified, the slide developing unit 402 performs step S102 in FIG. The identified ESC decoded value is set as the Slide decoded value.

図23は、図21のステップS111で実行されるESC復号値計算処理の詳細な内容の一例を示す図である。先ず、ステップS130で、スライド展開部402は、前述の復号指定信号により多値画像の復号が指定されているか否かを判定する。多値画像の復号が指定されていると判定された場合は、スライド展開部402は、符号フォーマット解析部401から供給された予測誤差値をSlide復号値とする(ステップS131)。次のステップS132で、スライド展開部402は、注目画素の画素値の予測値を算出する。次のステップS133で、スライド展開部402は、ステップS131で特定した予測誤差値と、ステップS132で特定した予測値とから、注目画素の画素値を算出する。そして、その算出した注目画素の画素値をESC復号値とする(ステップS134)。   FIG. 23 is a diagram showing an example of detailed contents of the ESC decoded value calculation process executed in step S111 of FIG. First, in step S130, the slide developing unit 402 determines whether or not decoding of a multi-valued image is specified by the above-described decoding specifying signal. When it is determined that multi-valued image decoding is designated, the slide development unit 402 sets the prediction error value supplied from the code format analysis unit 401 as a Slide decoded value (step S131). In the next step S132, the slide development unit 402 calculates a predicted value of the pixel value of the target pixel. In the next step S133, the slide development unit 402 calculates the pixel value of the target pixel from the prediction error value specified in step S131 and the prediction value specified in step S132. Then, the calculated pixel value of the target pixel is set as an ESC decoded value (step S134).

一方、上述のステップS130で、多値画像の復号が指定されていない、つまりは少値画像の復号が指定されていると判定された場合は、スライド展開部402は、図21のステップS109で特定されたSlide復号値(この場合は注目画素の画素値)をESC復号値とする(ステップS135)。   On the other hand, if it is determined in step S130 described above that decoding of a multi-valued image is not specified, that is, decoding of a low-valued image is specified, the slide developing unit 402 performs step S109 in FIG. The identified Slide decoded value (in this case, the pixel value of the target pixel) is set as an ESC decoded value (step S135).

図24は、復号部205の一例の構成をより詳細に示す。なお、図24において、上述の図2および図19と共通する部分には同一の符号を付し、詳細な説明を省略する。復号部205は、符号読み込み部400と、符号フォーマット解析部401と、スライド展開部402と、予測処理部403と、ラインメモリ制御部407と、ラインメモリ408と、画像書き込み部406とを有すると共に、メインメモリアービタI/F409と、符号アドレス生成部410とを有する。   FIG. 24 shows an exemplary configuration of the decoding unit 205 in more detail. Note that, in FIG. 24, the same reference numerals are given to the portions common to FIGS. 2 and 19 described above, and detailed description thereof is omitted. The decoding unit 205 includes a code reading unit 400, a code format analysis unit 401, a slide development unit 402, a prediction processing unit 403, a line memory control unit 407, a line memory 408, and an image writing unit 406. A main memory arbiter I / F 409 and a code address generation unit 410.

メインメモリアービタI/F409は、メインメモリアービタ202との接続を可能にするI/Fである。メインメモリアービタI/F409は、メインメモリアービタ202に対して書き込み/読み出し要求(R/W信号)やメモリアドレスを送信することで、メインメモリ210へのデータの書き込み、メインメモリ210からのデータの読み出しなどを行う。   The main memory arbiter I / F 409 is an I / F that enables connection with the main memory arbiter 202. The main memory arbiter I / F 409 transmits a write / read request (R / W signal) and a memory address to the main memory arbiter 202, thereby writing data into the main memory 210 and transferring data from the main memory 210. Read out.

符号アドレス生成部410は、メインメモリ210のCMYKページ符号格納領域210Dから符号データを読み出す際のメモリアドレスを生成する。符号読み込み部400は、符号アドレス生成部410で生成されたメモリアドレスで特定される符号データの読み出しを、メインメモリアービタI/F409を介してメインメモリアービタ202に対して要求する。この要求に応じて、メインメモリアービタ202によりメインメモリ210のCMYKページ符号格納領域210Dから読み出された符号データが、メインメモリアービタI/F409を介して符号読み込み部400に供給される。   The code address generation unit 410 generates a memory address when reading code data from the CMYK page code storage area 210D of the main memory 210. The code reading unit 400 requests the main memory arbiter 202 to read the code data specified by the memory address generated by the code address generation unit 410 via the main memory arbiter I / F 409. In response to this request, the code data read from the CMYK page code storage area 210D of the main memory 210 by the main memory arbiter 202 is supplied to the code reading unit 400 via the main memory arbiter I / F 409.

<スライド展開部のハードウェア構成>
図25は、スライド展開部402のハードウェア構成の一例を示す。スライド展開部402は、予測誤差生成部480と、マルチプレックス490と、スライド記憶部500と、コントローラ501と、マルチプレックス520とを有する。
<Hardware configuration of slide expansion unit>
FIG. 25 shows an example of the hardware configuration of the slide development unit 402. The slide development unit 402 includes a prediction error generation unit 480, a multiplex 490, a slide storage unit 500, a controller 501, and a multiplex 520.

コントローラ501は、例えばマイクロプロセッサからなり、アドレス情報Address、レングス情報Length、比較結果フラグSlideFLAGが供給され、供給されたこれらのデータに基づき、スライド展開部402の全体の動作を制御する。例えばコントローラ501は、スライド記憶部500におけるデータ値のスライドに対する追加処理や、マルチプレックス520の動作などを制御する。   The controller 501 is composed of, for example, a microprocessor, and is supplied with address information Address, length information Length, and comparison result flag SlideFLAG, and controls the overall operation of the slide developing unit 402 based on these supplied data. For example, the controller 501 controls processing for adding data values to the slide in the slide storage unit 500, the operation of the multiplex 520, and the like.

スライド記憶部500は、各々がレジスタからなり、それぞれ1単位のデータが格納される128個のスライド5110、5111、…、511127が直列に接続されて構成されたFIFOと、当該FIFOの先頭に接続されるマルチプレックス510とを有する。各スライド5110、5111、…、511127の出力は、さらに、それぞれマルチプレックス520に供給される。 The slide storage unit 500 is composed of registers, each of which includes a FIFO in which 128 slides 511 0 , 511 1 ,..., 511 127 each storing one unit of data are connected in series, and the FIFO. And a multiplex 510 connected at the head. The outputs of the slides 511 0 , 511 1 ,..., 511 127 are further supplied to the multiplex 520.

予測誤差生成部480は、前述の予測処理部403から供給された注目画素の画素値の予測値と、前述の符号フォーマット解析部410から供給されたESC値とから、予測誤差値を生成する。予測誤差生成部480により生成された予測誤差値は、マルチプレックス490に供給される。   The prediction error generation unit 480 generates a prediction error value from the prediction value of the pixel value of the pixel of interest supplied from the prediction processing unit 403 and the ESC value supplied from the code format analysis unit 410. The prediction error value generated by the prediction error generation unit 480 is supplied to the multiplex 490.

マルチプレックス490の一方の入力端には、前述の符号フォーマット解析部410からのESC値が供給され、他方の入力端には、予測誤差生成部480からの予測誤差値が供給される。また、マルチプレックス490には、復号指定信号が供給される。マルチプレックス490は、復号指定信号により多値画像の復号が指定された場合は、他方の入力端に供給される予測誤差値を、後段のマルチプレックス510へ供給する。また、マルチプレックス490は、復号指定信号により少値画像の復号が指定された場合は、一方の入力端に供給されるESC値(画素値)を、後段のマルチプレックス510へ供給する。   The ESC value from the code format analysis unit 410 is supplied to one input terminal of the multiplex 490, and the prediction error value from the prediction error generation unit 480 is supplied to the other input terminal. The multiplex 490 is supplied with a decoding designation signal. The multiplex 490 supplies the prediction error value supplied to the other input end to the subsequent multiplex 510 when decoding of the multi-valued image is specified by the decoding specifying signal. In addition, when the decoding of the low-value image is designated by the decoding designation signal, the multiplex 490 supplies the ESC value (pixel value) supplied to one input terminal to the subsequent multiplex 510.

マルチプレックス520は、コントローラ501から供給されるアドレス情報Addressに従い、スライド記憶部500の各スライド5110、5111、…、511127に格納されたデータ値からスライド511Addressに格納されたデータ値を選択し、選択したデータ値を、Slide復号値として出力する。 The multiplex 520 converts the data value stored in the slide 511 Address from the data value stored in each slide 511 0 , 511 1 ,... 511 127 of the slide storage unit 500 according to the address information Address supplied from the controller 501. The selected data value is output as a slide decoded value.

マルチプレックス510の一方の入力端には、マルチプレックス520から出力されるSlide復号値が供給され、他方の入力端には、マルチプレックス490からの出力が供給される。マルチプレックス510には、比較結果フラグSlideFLAGが供給され、その比較結果フラグSlideFLAGの値に応じて、何れかの入力端に供給されるデータをスライドへ供給する。より具体的には、マルチプレックス510は、SlideFLAGの値が「1」の場合は、一方の入力端に供給されるマルチプレックス520からのSlide復号値をスライドへ供給し、SlideFLAGの値が「0」の場合は、他方の入力端に供給されるマルチプレックス490からの出力を、スライドへ供給するという具合である。   The Slide decoded value output from the multiplex 520 is supplied to one input terminal of the multiplex 510, and the output from the multiplex 490 is supplied to the other input terminal. The multiplex 510 is supplied with a comparison result flag SlideFLAG, and supplies data supplied to any input terminal to the slide in accordance with the value of the comparison result flag SlideFLAG. More specifically, when the value of the SlideFLAG is “1”, the multiplex 510 supplies the slide decoded value from the multiplex 520 supplied to one input terminal to the slide, and the value of the SlideFLAG is “0”. ", The output from the multiplex 490 supplied to the other input end is supplied to the slide.

<作用・効果>
以上に説明したように、本実施形態では、多値画像の符号化を行う場合は、注目画素の画素値と、当該注目画素の画素値の予測値との差分である予測誤差値を用いた予測誤差方式で符号化を行う一方、少値画像の符号化を行う場合は、予測誤差方式とは異なる符号化方式で符号化を行うので、多値画像および少値画像の両方を予測誤差方式で符号化する構成に比べて、少値画像の圧縮率を高めることができるという有利な効果を奏する。また、多値画像の符号化処理において、入力された予測誤差値が、スライド記憶部に既に記憶されている予測誤差値の何れとも一致していなかった場合は、当該入力された予測誤差値が求められた注目画素の画素値を符号化するので、当該入力された予測誤差値自体を符号化する構成に比べて、符号化に必要なビット数を少なくすることができる。これにより、圧縮率の向上が可能になるという有利な効果も奏する。
<Action and effect>
As described above, in the present embodiment, when encoding a multi-valued image, a prediction error value that is a difference between a pixel value of a target pixel and a predicted value of the pixel value of the target pixel is used. When encoding with a prediction error method, when encoding a low-value image, encoding is performed with a different encoding method from the prediction error method. As compared with the configuration of encoding with, an advantageous effect that the compression rate of the low-value image can be increased is achieved. Further, in the multi-value image encoding process, when the input prediction error value does not match any of the prediction error values already stored in the slide storage unit, the input prediction error value is Since the pixel value of the obtained target pixel is encoded, the number of bits required for encoding can be reduced as compared with the configuration in which the input prediction error value itself is encoded. Thereby, there is an advantageous effect that the compression rate can be improved.

なお、上述では、本発明がプリンタ装置に適用されるように説明したが、これは一例でありこの例に限定されない。すなわち、本発明は、データの可逆符号化をハードウェアを用いて行う他の装置にも適用することが可能である。   In the above description, the present invention has been described as applied to a printer apparatus. However, this is an example, and the present invention is not limited to this example. That is, the present invention can also be applied to other apparatuses that perform lossless encoding of data using hardware.

200 プリンタ装置
202 メインメモリアービタ
203 メインメモリコントローラ
204 符号化部
205 復号部
206 階調処理部
207 マルチプレックス
208 エンジンコントローラ
209 通信コントローラ
210B データ格納領域
210C CMYKバンド画像データ格納領域
210A プログラム領域
210D CMYKページ符号格納領域
210 メインメモリ
300 データ読み込み部
301 予測誤差生成処理部
302 マルチプレックス
303 マルチプレックス
304 スライド/リスト生成処理部
305 符号フォーマット生成処理部
306 符号書き込み部
307 ラインメモリ制御部
308 ラインメモリ
309 予測処理部
310 予測誤差処理部
400 符号読み込み部
401 符号フォーマット解析部
402 スライド展開部
403 予測処理部
406 画像書き込み部
407 ラインメモリ制御部
408 ラインメモリ
200 Printer Device 202 Main Memory Arbiter 203 Main Memory Controller 204 Encoding Unit 205 Decoding Unit 206 Gradation Processing Unit 207 Multiplex 208 Engine Controller 209 Communication Controller 210B Data Storage Area 210C CMYK Band Image Data Storage Area 210A Program Area 210D CMYK Page Code Storage area 210 Main memory 300 Data reading unit 301 Prediction error generation processing unit 302 Multiplex 303 Multiplex 304 Slide / list generation processing unit 305 Code format generation processing unit 306 Code writing unit 307 Line memory control unit 308 Line memory 309 Prediction processing unit 310 Prediction error processing unit 400 Code reading unit 401 Code format analysis unit 402 Slide development unit 403 Prediction processing unit 406 Image writing unit 407 Line memory control unit 408 Line memory

特開2002−344753号公報JP 2002-344753 A

Claims (6)

階調数が所定数を上回る多値画像、または、階調数が前記所定数以下の少値画像を構成する複数の画素の各々の画素値が書き込まれる第1記憶手段と、
前記第1記憶手段から、符号化対象である注目画素の画素値を読み出す第1読み出し手段と、
前記注目画素の周辺の画素の画素値に基づいて、当該注目画素の画素値の予測値を算出する第1予測値算出手段と、
前記第1予測値算出手段で算出された前記予測値と、前記注目画素の画素値との差分である予測誤差値を算出する第1予測誤差値算出手段と、
前記多値画像の符号化を行う場合は、前記予測誤差算出手段で算出された前記予測誤差値を用いた予測誤差方式で符号化を行う一方、前記少値画像の符号化を行う場合は、前記予測誤差方式とは異なる符号化方式で符号化を行う符号化部と、を備える、
ことを特徴とする画像処理装置。
A first storage means in which pixel values of a plurality of pixels constituting a multi-value image having a gradation number exceeding a predetermined number or a low-value image having a gradation number equal to or less than the predetermined number;
First reading means for reading out a pixel value of a target pixel to be encoded from the first storage means;
First predicted value calculation means for calculating a predicted value of a pixel value of the target pixel based on pixel values of pixels around the target pixel;
First prediction error value calculation means for calculating a prediction error value that is a difference between the prediction value calculated by the first prediction value calculation means and a pixel value of the target pixel;
When encoding the multi-valued image, encoding with the prediction error method using the prediction error value calculated by the prediction error calculating unit, while encoding the low-value image, An encoding unit that performs encoding using an encoding method different from the prediction error method,
An image processing apparatus.
前記多値画像の符号化を行う場合は、一方の端から、前記予測誤差算出手段で算出された前記予測誤差値が順次に入力され、その入力された前記予測誤差値を記憶するとともに、既に記憶された前記予測誤差値を他方の端側へ移動して記憶する第2記憶手段と、
前記多値画像の符号化を行う場合は、前記第2記憶手段の前記一方の端へ入力される前記予測誤差値を、当該第2記憶手段に既に記憶されている前記予測誤差値のそれぞれと比較する比較手段と、
前記多値画像の符号化を行う場合であって、かつ、前記比較手段による比較の結果、入力された前記予測誤差値が、前記第2記憶手段に既に記憶されている前記予測誤差値と一致していた場合は、順次に入力される前記予測誤差値からなる入力データ列と一致する、前記第2記憶手段に連続して記憶される前記予測誤差値からなるデータ列を探索する探索手段と、
前記探索手段で探索された前記データ列の長さを示すレングス情報を生成するレングス情報生成手段と、
前記探索手段で探索された前記データ列の開始データが記憶されていた前記第2記憶手段内の位置を示すアドレス情報を生成するアドレス情報生成手段と、をさらに備え、
前記符号化部は、
前記レングス情報生成手段で生成された前記レングス情報、および、前記アドレス情報生成手段で生成された前記アドレス情報を符号化して第1符号データを生成する第1符号データ生成手段と、
前記比較手段による比較の結果、入力された前記予測誤差値が、前記第2記憶手段に既に記憶されている前記予測誤差値のうちの何れとも一致していなかった場合は、当該入力された前記予測誤差値が求められた前記注目画素の画素値を符号化して第2符号データを生成する第2符号データ生成手段と、を有する、
ことを特徴とする請求項1に記載の画像処理装置。
When encoding the multi-valued image, the prediction error value calculated by the prediction error calculation means is sequentially input from one end, and the input prediction error value is stored. Second storage means for moving and storing the stored prediction error value to the other end side;
When encoding the multi-valued image, the prediction error value input to the one end of the second storage unit is replaced with each of the prediction error values already stored in the second storage unit. A comparison means for comparing;
In the case of encoding the multi-valued image, and as a result of comparison by the comparison unit, the input prediction error value is identical to the prediction error value already stored in the second storage unit. And a search means for searching for a data string consisting of the prediction error values successively stored in the second storage means, which matches an input data string consisting of the prediction error values inputted sequentially. ,
Length information generating means for generating length information indicating the length of the data string searched by the searching means;
Address information generating means for generating address information indicating a position in the second storage means in which the start data of the data string searched by the search means is stored;
The encoding unit includes:
First code data generating means for encoding the length information generated by the length information generating means and the address information generated by the address information generating means to generate first code data;
As a result of the comparison by the comparison means, if the input prediction error value does not match any of the prediction error values already stored in the second storage means, the input A second code data generating unit that generates a second code data by encoding a pixel value of the target pixel for which a prediction error value is obtained;
The image processing apparatus according to claim 1.
前記第2記憶手段は、前記少値画像の符号化を行う場合は、一方の端から順次に入力される、前記読み出し手段で読み出された前記注目画素の画素値を記憶するとともに、既に記憶された前記画素値を他方の端側へ移動して記憶し、
前記比較手段は、前記少値画像の符号化を行う場合は、前記第2記憶手段の前記一方の端へ入力される前記画素値を、当該第2記憶手段に既に記憶されている前記画素値のそれぞれと比較し、
前記探索手段は、前記少値画像の符号化を行う場合であって、かつ、前記比較手段による比較の結果、入力された前記画素値が、前記第2記憶手段に既に記憶されている前記画素値と一致していた場合は、順次に入力される前記画素値からなる入力データ列と一致する、前記第2記憶手段に連続して記憶される前記画素値からなるデータ列を探索し、
前記第2符号データ生成手段は、前記少値画像の符号化を行う場合であって、かつ、前記比較手段による比較の結果、入力された前記画素値が、前記第2記憶手段に既に記憶されている前記画素値のうちの何れとも一致していなかった場合は、当該入力された前記画素値を符号化して前記第2符号データを生成する、
ことを特徴とする請求項1または請求項2に記載の画像処理装置。
The second storage means stores the pixel value of the pixel of interest read by the reading means, which is sequentially input from one end when the low-value image is encoded, and has already been stored. Moving the pixel value to the other end side and storing it,
In the case of encoding the small-value image, the comparison unit uses the pixel value input to the one end of the second storage unit as the pixel value already stored in the second storage unit. Compared to each of the
The search means is a case where the low-value image is encoded, and the pixel value inputted as a result of comparison by the comparison means is already stored in the second storage means If it matches the value, search for a data string consisting of the pixel values stored in succession in the second storage means, which matches the input data string consisting of the pixel values sequentially input,
The second code data generation means is a case where the low-value image is encoded, and as a result of the comparison by the comparison means, the input pixel value is already stored in the second storage means. If the pixel value does not match any of the pixel values, the input pixel value is encoded to generate the second code data,
The image processing apparatus according to claim 1, wherein the image processing apparatus is an image processing apparatus.
前記第1符号データおよび前記第2符号データを記憶する第3記憶手段と、
前記第3記憶手段に記憶されたデータを読み出す第2読み出し手段と、
前記第2読み出し手段で読み出された前記データの種類を解析する解析手段と、
前記解析手段による解析の結果、前記データが前記第1符号データであった場合、当該第1符号データから前記レングス情報および前記アドレス情報を特定する第1特定手段と、
前記多値画像の復号を行う場合であって、かつ、前記解析手段による解析の結果、前記データが前記第1符号データであった場合は、前記第1特定手段で特定された前記レングス情報および前記アドレス情報を用いて、復号すべき前記画素の前記予測誤差値を特定する第2特定手段と、
既に復号化が終了した前記画素の画素値を記憶する第4記憶手段と、
前記多値画像の復号を行う場合であって、かつ、前記解析手段による解析の結果、前記データが前記第1符号データであった場合は、前記復号すべき前記画素の周辺の画素の画素値を前記第4記憶手段から読み出し、その読み出した周辺の画素の画素値に基づいて、当該復号すべき前記画素の画素値の予測値を算出する第2予測値算出手段と、
前記多値画像の復号を行う場合であって、かつ、前記解析手段による解析の結果、前記データが前記第1符号データであった場合は、前記第2特定手段で特定された前記予測誤差値と、前記第2予測値算出手段で算出された前記予測値とから、前記復号すべき前記画素の画素値を求めて復号する第1復号手段と、
前記解析手段による解析の結果、前記データが前記第2符号データであった場合は、当該第2符号データで特定される画素値を求めて復号する第2復号手段と、を備える、
ことを特徴とする請求項1から請求項3の何れか1つに記載の画像処理装置。
Third storage means for storing the first code data and the second code data;
Second reading means for reading data stored in the third storage means;
Analyzing means for analyzing the type of the data read by the second reading means;
When the data is the first code data as a result of the analysis by the analyzing means, first specifying means for specifying the length information and the address information from the first code data;
When decoding the multi-valued image, and when the data is the first code data as a result of the analysis by the analyzing unit, the length information specified by the first specifying unit and Second specifying means for specifying the prediction error value of the pixel to be decoded using the address information;
Fourth storage means for storing pixel values of the pixels that have already been decoded;
When decoding the multi-valued image, and when the data is the first code data as a result of analysis by the analysis unit, pixel values of pixels around the pixel to be decoded Second predicted value calculating means for calculating the predicted value of the pixel value of the pixel to be decoded based on the read pixel values of the surrounding pixels,
When the multi-valued image is decoded and the data is the first code data as a result of the analysis by the analysis unit, the prediction error value specified by the second specification unit And first decoding means for obtaining and decoding the pixel value of the pixel to be decoded from the predicted value calculated by the second predicted value calculating means,
When the data is the second code data as a result of analysis by the analysis means, the second decoding means for obtaining and decoding the pixel value specified by the second code data,
The image processing apparatus according to claim 1, wherein the image processing apparatus is an image processing apparatus.
前記少値画像の復号を行う場合であって、かつ、前記解析手段による解析の結果、前記データが前記第1符号データであった場合は、前記第1特定手段で特定された前記レングス情報および前記アドレス情報を用いて、復号すべき前記画素の画素値を求めて復号する第3復号手段をさらに備える、
ことを特徴とする請求項4に記載の画像処理装置。
When decoding the small-value image and, as a result of analysis by the analysis unit, the data is the first code data, the length information specified by the first specification unit and Further comprising third decoding means for obtaining and decoding a pixel value of the pixel to be decoded using the address information;
The image processing apparatus according to claim 4.
階調数が所定数以上の多値画像、または、階調数が前記所定数を下回る少値画像を構成する複数の画素の各々の画素値が書き込まれる第1記憶手段から、符号化対象である注目画素の画素値を読み出す第1ステップと、
前記注目画素の周辺の画素の画素値に基づいて、当該注目画素の画素値の予測値を算出する第2ステップと、
前記第2ステップで算出された前記予測値と、前記注目画素の画素値との差分である予測誤差値を算出する第3ステップと、
前記多値画像の符号化を行う場合は、第3ステップで算出された前記予測誤差値を用いた予測誤差方式で符号化を行う一方、前記少値画像の符号化を行う場合は、前記予測誤差方式とは異なる符号化方式で符号化を行う第4ステップと、を備える、
ことを特徴とする画像処理方法。
From the first storage means to which each pixel value of a plurality of pixels constituting a multi-valued image having a gradation number equal to or greater than a predetermined number or a low-value image having a gradation number lower than the predetermined number is written, A first step of reading a pixel value of a certain pixel of interest;
A second step of calculating a predicted value of the pixel value of the target pixel based on pixel values of pixels around the target pixel;
A third step of calculating a prediction error value which is a difference between the predicted value calculated in the second step and a pixel value of the target pixel;
When encoding the multi-valued image, encoding is performed by the prediction error method using the prediction error value calculated in the third step, while when encoding the low-value image, the prediction is performed. A fourth step of encoding with an encoding method different from the error method,
An image processing method.
JP2010283615A 2010-12-20 2010-12-20 Image processing device and image processing method Pending JP2012134659A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010283615A JP2012134659A (en) 2010-12-20 2010-12-20 Image processing device and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010283615A JP2012134659A (en) 2010-12-20 2010-12-20 Image processing device and image processing method

Publications (1)

Publication Number Publication Date
JP2012134659A true JP2012134659A (en) 2012-07-12

Family

ID=46649755

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010283615A Pending JP2012134659A (en) 2010-12-20 2010-12-20 Image processing device and image processing method

Country Status (1)

Country Link
JP (1) JP2012134659A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05151349A (en) * 1991-11-29 1993-06-18 Fujitsu Ltd Image data compressing method and encoding circuit
JPH07111595A (en) * 1993-10-13 1995-04-25 Olympus Optical Co Ltd Image encoder
JPH0937262A (en) * 1995-07-14 1997-02-07 Canon Inc Image processing unit and method
JP2000244935A (en) * 1998-12-21 2000-09-08 Nikon Corp Method for compressing picture data
JP2004112483A (en) * 2002-09-19 2004-04-08 Fuji Xerox Co Ltd Image processor
JP2006270324A (en) * 2005-03-23 2006-10-05 Fuji Xerox Co Ltd Coder, data processing apparatus, decoder, coding method, decoding method and program
JP2008193567A (en) * 2007-02-07 2008-08-21 Casio Electronics Co Ltd Data compressor, decoder thereof, their method, and program

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05151349A (en) * 1991-11-29 1993-06-18 Fujitsu Ltd Image data compressing method and encoding circuit
JPH07111595A (en) * 1993-10-13 1995-04-25 Olympus Optical Co Ltd Image encoder
JPH0937262A (en) * 1995-07-14 1997-02-07 Canon Inc Image processing unit and method
JP2000244935A (en) * 1998-12-21 2000-09-08 Nikon Corp Method for compressing picture data
JP2004112483A (en) * 2002-09-19 2004-04-08 Fuji Xerox Co Ltd Image processor
JP2006270324A (en) * 2005-03-23 2006-10-05 Fuji Xerox Co Ltd Coder, data processing apparatus, decoder, coding method, decoding method and program
JP2008193567A (en) * 2007-02-07 2008-08-21 Casio Electronics Co Ltd Data compressor, decoder thereof, their method, and program

Similar Documents

Publication Publication Date Title
JP5369982B2 (en) Image processing apparatus and image processing method
JP5081539B2 (en) Image data encoding apparatus, image data encoding method, image forming apparatus, image forming method, image data decoding apparatus, and image data decoding method
JP5509957B2 (en) Image processing apparatus, image processing method, and image forming apparatus
JP2005309865A (en) Image processing apparatus and method, and computer readable recording medium for recording program for causing computer to implement this method
JP2012129778A (en) Image processor and image processing method
JP2012134929A (en) Image processing system and image processing method
JP2012134659A (en) Image processing device and image processing method
JP5218332B2 (en) Image processing apparatus and image processing method
JP2011019096A (en) Image processor and image processing method
JP5201040B2 (en) Image processing apparatus, image processing method, and program
JP4568685B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium storing a program for causing a computer to execute the image processing method
JP6451221B2 (en) Image processing apparatus and image processing method
JP2010219777A (en) Apparatus and method for processing image, and program
JP6337494B2 (en) Image processing apparatus, image processing method, and program
JP2011019095A (en) Image processor and image processing method
JP4773223B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium
JP2006121437A (en) Image processor and image processing method and computer-readable recording medium with program for making computer perform image processing method recorded
JP2010219776A (en) Image processing apparatus and method, and program
JP2004289203A (en) Image processing apparatus, image processing method, and program
JP2006192729A (en) Image forming apparatus and method of processing data therein
JP2008044236A (en) Image processor, image processing method, and program for being executed by computer
JP4450651B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium storing a program for causing a computer to execute the image processing method
JP2005305873A (en) Image processor, method of processing image, and computer readable recording medium containing program for allowing computer to execute the method
JP5123721B2 (en) Image forming apparatus, method, and program
JP2005260871A (en) Image processor and image processing method, and computer-readable recording medium with program for allowing computer to execute image processing method recorded thereon

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131111

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141211

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141216

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150407