JP2010074444A - Image compression apparatus and method, image decoding apparatus and method, and computer program - Google Patents

Image compression apparatus and method, image decoding apparatus and method, and computer program Download PDF

Info

Publication number
JP2010074444A
JP2010074444A JP2008238712A JP2008238712A JP2010074444A JP 2010074444 A JP2010074444 A JP 2010074444A JP 2008238712 A JP2008238712 A JP 2008238712A JP 2008238712 A JP2008238712 A JP 2008238712A JP 2010074444 A JP2010074444 A JP 2010074444A
Authority
JP
Japan
Prior art keywords
pixel
value
difference
run
image
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
JP2008238712A
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 JP2008238712A priority Critical patent/JP2010074444A/en
Publication of JP2010074444A publication Critical patent/JP2010074444A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image compression apparatus and method for highly efficiently compressing the image data short in run length, in which the same pixel values in the raster order of images are continuous number, and to provide a computer program and an information recording medium. <P>SOLUTION: The image compression apparatus includes: a difference acquisition means for acquiring a difference between the pixel value of the pixel and a pixel value having a pixel index corresponding to each different pixel value for each pixel configuring the image; a pixel index means for selecting the pixel index corresponding to one pixel value on the basis of the difference for each pixel configuring the image; a run length acquisition means for acquiring the run length which is the number of the continuation of the pixels whose pixel index is the same in the raster order of the image; and an encoding means for encoding the selected pixel index, the difference and the run length. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、画像圧縮装置、画像圧縮方法、画像復号装置、画像復号方法、及び、コンピュータプログラムに関する。   The present invention relates to an image compression apparatus, an image compression method, an image decoding apparatus, an image decoding method, and a computer program.

従来から、画像形成装置等において画像処理を行う際に、画像データをメモリに格納する際に、画像データを圧縮することがある。これにより、大容量のメモリを要しない装置構成とすることができる。   Conventionally, when image processing is performed in an image forming apparatus or the like, image data may be compressed when the image data is stored in a memory. As a result, a device configuration that does not require a large capacity memory can be obtained.

例えば、2値画像を高圧縮率で圧縮する2次元圧縮方式の国際標準であるJBIG(Joint Bi−level Image Expert Group, ISO/IEC 11544)等が有名である。JBIGは、エントロピ符号として算術符号器であるQM_コーダを使用している。しかし、QM_コーダは、コンテキストメモリや、コンテキストを生成するラインメモリ等の装備が必要であり、ハードウェアコストが高くなる課題と、処理の高速化が難しいという課題とがある。   For example, JBIG (Joint Bi-level Image Expert Group, ISO / IEC 11544), which is an international standard of a two-dimensional compression method for compressing binary images at a high compression rate, is well known. JBIG uses a QM_coder, which is an arithmetic encoder, as an entropy code. However, the QM_coder needs to be equipped with a context memory, a line memory for generating a context, and the like, and has a problem that the hardware cost is high and a high-speed process is difficult.

また、多値画像を可逆符号化するJPEG(Joint Photgraphic Expert Group, ISO/IEC 11172)の可逆符号化モード等がある。JPEGの可逆符号化モードは、予測符号化にハフマン符号や算術符号を組み合わせた方式である。より詳細には、この方式は、7つの予測式で予測誤差の統計を作成し、最も良い予測式を1つ選択し、予測符号化方式で圧縮する。しかしながら、高い圧縮率が望めないという課題がある。
ところで、画像データを圧縮する際には、画像データのラスタ順において、同一の画素値が連続する数を求めることにより、画像データを圧縮する方法がある。
In addition, there is a lossless encoding mode of JPEG (Joint Photographic Expert Group, ISO / IEC 11172) that performs lossless encoding of multi-valued images. The JPEG lossless encoding mode is a method in which Huffman code or arithmetic code is combined with predictive encoding. More specifically, this method creates prediction error statistics with seven prediction formulas, selects one of the best prediction formulas, and compresses with the prediction encoding scheme. However, there is a problem that a high compression rate cannot be expected.
Incidentally, when compressing image data, there is a method of compressing image data by obtaining the number of consecutive identical pixel values in the raster order of the image data.

例えば、特開2003−198379号公報(特許文献1)には、Move to Front法(以下、「MTF法」という。)による符号化方法が記載されている。MTF法による符号化では、既出の文字の中で、前回出現した文字が、今回出現する確率が最も高いとみなす。すなわち、ブロックソート法と同様に、同じ文字が繰り返される長い連(以下、「ラン」という。)を生成させる符号化法である。MTF法は、ブロックソート法により得られた「同一バイトデータが近接して局在する」ような冗長性の高いデータにおいて、特に高い効果が望まれる。   For example, Japanese Patent Application Laid-Open No. 2003-198379 (Patent Document 1) describes an encoding method using the Move to Front method (hereinafter referred to as “MTF method”). In the encoding by the MTF method, it is considered that the previously appearing character has the highest probability of appearing this time among the already described characters. That is, like the block sort method, this is an encoding method that generates a long sequence (hereinafter referred to as “run”) in which the same characters are repeated. The MTF method is desired to have a particularly high effect on highly redundant data obtained by the block sort method such that “the same byte data is located close to each other”.

また、例えば、特許第3842914号公報(特許文献2)には、複数の画素単位に、ラン長とラン長の繰り返し数とを符号化する方法が開示されている。また、例えば、特開2005−27081号公報(特許文献3)には、注目画素の連続数及び参照画素の連続数を用いて、予測処理の一部を省略し、符号化処理における処理付加を軽減させる符号化装置等の技術が開示されている。なお、特許文献3における、画素の「連続数」は、「ラン長」に対応する。   Further, for example, Japanese Patent No. 3842914 (Patent Document 2) discloses a method of encoding a run length and the number of repetitions of the run length in a plurality of pixel units. Further, for example, in Japanese Patent Laid-Open No. 2005-27081 (Patent Document 3), by using the continuous number of target pixels and the continuous number of reference pixels, a part of the prediction process is omitted, and a process addition in the encoding process is added. Techniques such as an encoding device to be reduced are disclosed. Note that the “continuous number” of pixels in Patent Document 3 corresponds to “run length”.

特開2003−198379号公報JP 2003-198379 A 特許第3842914号公報Japanese Patent No. 3842914 特開2005−27081号公報JP 2005-27081 A

しかしながら、上記特許文献1及び2に開示の発明は、2値画像の圧縮方法であり、RGB等の多値画像を圧縮することには適さない。また、上記特許文献3に開示の発明は、ライン間の相関が高い文書画像に対しては、ラン長を予測することが容易であるが、ライン間の相関が低い写真画像においては、色コンポーネント毎のラン長を予測することが困難である。写真画像は、また、一般にラン長が短いため、ラン長による圧縮よりも画素値そのものの情報量を減じる圧縮が望ましいが、上記特許文献3に開示の発明は、そのようなことが考慮されていない。   However, the inventions disclosed in Patent Documents 1 and 2 are binary image compression methods and are not suitable for compressing multi-valued images such as RGB. In the invention disclosed in Patent Document 3, it is easy to predict the run length for a document image having a high correlation between lines. However, in a photographic image having a low correlation between lines, the color component It is difficult to predict each run length. In addition, since a photographic image generally has a short run length, it is desirable to compress the information amount of the pixel value itself rather than compression by the run length. However, the invention disclosed in Patent Document 3 considers such a case. Absent.

本発明は、上記の点に鑑みて、これらの問題を解消するために発明されたものであり、画像のラスタ順における同一の画素値が連続する数であるラン長が短い画像データを、高効率に圧縮する画像圧縮装置、画像圧縮方法、画像復号装置、画像復号方法、コンピュータプログラム、及び、情報記録媒体を提供することを目的としている。   The present invention has been invented in order to solve these problems in view of the above points. Image data having a short run length, which is the number of consecutive identical pixel values in the raster order of an image, is reduced. An object of the present invention is to provide an image compression apparatus, an image compression method, an image decoding apparatus, an image decoding method, a computer program, and an information recording medium that are efficiently compressed.

上記目的を達成するために、本発明の画像圧縮装置は次の如き構成を採用した。   In order to achieve the above object, the image compression apparatus of the present invention employs the following configuration.

本発明の画像圧縮装置は、画像を構成する画素毎に、該画素の画素値と、異なる画素値毎に対応づけられる画素インデックスを有する画素値と、の差を取得する差取得手段と、前記画像を構成する画素毎に、前記差に基づいて、一の画素値に対応する画素インデックスを選択する画素インデックス手段と、前記画像のラスタ順において前記画素インデックスが同一である画素が連続する数であるラン長を取得するラン長取得手段と、選択された前記画素インデックス、前記差、及び、前記ラン長を符号化する符号化手段と、を有する構成とすることができる。
これにより、画像のラスタ順における同一の画素値が連続する数であるラン長が短い画像データを、高効率に圧縮する画像圧縮装置を提供することができる。
The image compression device according to the present invention includes, for each pixel constituting the image, a difference acquisition unit that acquires a difference between a pixel value of the pixel and a pixel value having a pixel index associated with each different pixel value; A pixel index means for selecting a pixel index corresponding to one pixel value based on the difference for each pixel constituting the image, and a number of consecutive pixels having the same pixel index in the raster order of the image. It may be configured to include a run length acquisition unit that acquires a certain run length, and an encoding unit that encodes the selected pixel index, the difference, and the run length.
Accordingly, it is possible to provide an image compression apparatus that compresses image data with a short run length, which is the number of consecutive identical pixel values in the raster order of an image, with high efficiency.

なお、上記課題を解決するため、本発明は、上記画像圧縮装置における画像圧縮方法、及び、その画像圧縮方法をコンピュータに実行させるためのコンピュータプログラム、又は、そのコンピュータプログラムを記録した情報記録媒体としてもよい。   In order to solve the above problems, the present invention provides an image compression method in the image compression apparatus, a computer program for causing a computer to execute the image compression method, or an information recording medium on which the computer program is recorded. Also good.

本発明の画像圧縮装置、画像圧縮方法、画像復号装置、画像復号方法、コンピュータプログラム、及び、情報記録媒体によれば、画像のラスタ順における同一の画素値が連続する数であるラン長が短い画像データを、高効率に圧縮する画像圧縮装置、画像圧縮方法、画像復号装置、画像復号方法、コンピュータプログラム、及び、情報記録媒体を提供することが可能になる。   According to the image compression device, the image compression method, the image decoding device, the image decoding method, the computer program, and the information recording medium of the present invention, the run length that is the number of consecutive identical pixel values in the raster order of the image is short. It is possible to provide an image compression apparatus, an image compression method, an image decoding apparatus, an image decoding method, a computer program, and an information recording medium that compress image data with high efficiency.

以下、本発明の実施の形態を図面に基づき説明する。なお、以下の実施の形態において画像データの「圧縮」を「符号化」ともいい、圧縮又は符号化された画像データの「伸張」を「復号」ともいう。また、以下の実施の形態により処理される画像データは、1枚の画像に対応する「ページ」、ページのうち、所定数の主走査ラインからなる部分である「バンド」を有する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following embodiments, “compression” of image data is also referred to as “encoding”, and “decompression” of compressed or encoded image data is also referred to as “decoding”. Further, the image data processed in the following embodiment has a “page” corresponding to one image, and a “band” that is a portion composed of a predetermined number of main scanning lines in the page.

〔本発明の実施の形態〕
図1は、本発明の実施の形態に係る画像処理装置を実装する画像形成装置の機構部の構成例を示す図である。図1では、画像形成装置としてカラープリンタ1を示す。カラープリンタ1は、4色(Y、M、C、K)の画像をそれぞれ独立の作像系で形成し、この4色の画像を合成する4ドラムタンデムエンジンタイプの画像形成装置である。
Embodiment of the present invention
FIG. 1 is a diagram illustrating a configuration example of a mechanism unit of an image forming apparatus in which an image processing apparatus according to an embodiment of the present invention is mounted. In FIG. 1, a color printer 1 is shown as an image forming apparatus. The color printer 1 is a four-drum tandem engine type image forming apparatus that forms four-color (Y, M, C, K) images by independent image forming systems and synthesizes these four-color images.

(カラープリンタ1における電装・制御部のブロック)
図2は、カラープリンタ1における電装・制御部の装置構成を示すブロック図である。図2の電装・制御部100は、プリンタASIC110、プリンタエンジン120、メインメモリ130、及び、CPU190を有し、ネットワークを介してパーソナルコンピュータ(以下、「PC」という。)900に接続されている。
(Block of electrical / control unit in color printer 1)
FIG. 2 is a block diagram illustrating a device configuration of the electrical / control unit in the color printer 1. 2 includes a printer ASIC 110, a printer engine 120, a main memory 130, and a CPU 190, and is connected to a personal computer (hereinafter referred to as “PC”) 900 via a network.

CPU190は、カラープリンタ1の全体の制御を行う。プリンタエンジン120は、画像を媒体上に形成して出力する。メインメモリ130は、CPU190が出力する描画コマンド、CPU190が実行するプログラム、及び、画像データのうちバンド毎の画像データであるバンドデータ、ページ毎の圧縮データ等の各種データ等を格納する。   The CPU 190 performs overall control of the color printer 1. The printer engine 120 forms an image on a medium and outputs it. The main memory 130 stores a drawing command output by the CPU 190, a program executed by the CPU 190, various data such as band data that is image data for each band of image data, compressed data for each page, and the like.

プリンタASIC110は、入力される画像データに対して所定の処理を行い、プリンタエンジン120に対して出力する。プリンタASIC110は、例えば、CPU インタフェース(以下、「I/F」という。)112、メインメモリアービタ113、メインメモリコントローラ114、符号化部115、復号部116、画像処理部117、エンジンコントローラ118、及び、通信処理部119を有する。   The printer ASIC 110 performs predetermined processing on the input image data and outputs it to the printer engine 120. The printer ASIC 110 includes, for example, a CPU interface (hereinafter referred to as “I / F”) 112, a main memory arbiter 113, a main memory controller 114, an encoding unit 115, a decoding unit 116, an image processing unit 117, an engine controller 118, and And a communication processing unit 119.

CPU I/F112は、メインメモリアービタ113を介してメインメモリコントローラ114に接続され、CPU190とメインメモリコントローラ114との間のインタフェース処理を行う。メインメモリアービタ113は、符号化部115、復号部116、通信処理部119、及び、CPU190からの、メインメモリ130へのアクセス順等を管理する。メインメモリコントローラ114は、メインメモリ130へのデータの書き込み及び読み出しを制御する。   The CPU I / F 112 is connected to the main memory controller 114 via the main memory arbiter 113, and performs interface processing between the CPU 190 and the main memory controller 114. The main memory arbiter 113 manages the access order to the main memory 130 from the encoding unit 115, the decoding unit 116, the communication processing unit 119, and the CPU 190. The main memory controller 114 controls writing and reading of data to the main memory 130.

符号化部115は、メインメモリ130に格納されている画像データのうち、例えば、バンドデータを符号化する。符号化部115は、メインメモリ130が有する符号化されたページが格納されるページメモリ領域に、符号化したバンドデータを格納させる。   The encoding unit 115 encodes, for example, band data among the image data stored in the main memory 130. The encoding unit 115 stores the encoded band data in a page memory area in which the encoded page of the main memory 130 is stored.

復号部116は、符号化部115により符号化された符号データを受信して復号する。復号部116は、復号した画像データを画像処理部117に対して出力する。復号部116は、復号処理を、プリンタエンジン120の処理速度に同期させて行う。   The decoding unit 116 receives and decodes the code data encoded by the encoding unit 115. The decoding unit 116 outputs the decoded image data to the image processing unit 117. The decoding unit 116 performs the decoding process in synchronization with the processing speed of the printer engine 120.

画像処理部117は、復号部116により復号された画像データに対して所定の画像処理を行い、エンジンコントローラ118に対して出力する。エンジンコントローラ118は、プリンタエンジン120を制御する。   The image processing unit 117 performs predetermined image processing on the image data decoded by the decoding unit 116 and outputs the processed image data to the engine controller 118. The engine controller 118 controls the printer engine 120.

通信処理部119は、通信コントローラであり、ネットワークを介して接続されたPC900から画像データを受信する。画像データは、例えば、PDL(page description language)の形式を有する。通信処理部119は、受信した画像データを、メインメモリ130に対して出力する。   The communication processing unit 119 is a communication controller, and receives image data from a PC 900 connected via a network. The image data has, for example, a PDL (page description language) format. The communication processing unit 119 outputs the received image data to the main memory 130.

(カラープリンタ1における処理の概略)
図3は、カラープリンタ1における処理の概略を示す図である。図3では、入力された画像データが解析され、画像処理された後、プリンタエンジン120に対して出力される。図3における処理は、PDL記憶ステップS201、PDL解析ステップS202、RGBA描画処理ステップS203、RGBAバンド画像記憶ステップS204、RGBA符号化ステップS205、RGBA符号化ステップS205、RGBAページ符号記憶ステップS206、RGBA復号ステップS207、及び、画像処理ステップS210を有し、上記の順に各ステップの処理が実行される。
(Outline of processing in the color printer 1)
FIG. 3 is a diagram showing an outline of processing in the color printer 1. In FIG. 3, input image data is analyzed, subjected to image processing, and then output to the printer engine 120. 3 includes PDL storage step S201, PDL analysis step S202, RGBA drawing processing step S203, RGBA band image storage step S204, RGBA encoding step S205, RGBA encoding step S205, RGBA page code storage step S206, RGBA decoding. Step S207 and image processing step S210 are included, and the processing of each step is executed in the order described above.

PDL記憶ステップS201では、通信処理部119から出力されたPDLがメインメモリ130に記憶される。PDL解析ステップS202では、CPU190が、メインメモリ130からPDLを読み込み、PDLを解析して、RGBA描画処理ステップS203に対し、描画コマンドを出力する。   In PDL storage step S <b> 201, the PDL output from the communication processing unit 119 is stored in the main memory 130. In the PDL analysis step S202, the CPU 190 reads the PDL from the main memory 130, analyzes the PDL, and outputs a drawing command to the RGBA drawing processing step S203.

RGBA描画処理ステップS203では、CPU190が、PDL解析ステップS202から入力された描画コマンドにより、バンド画像を描画する。RGBAバンド画像記憶ステップS204では、RGBA描画処理ステップS203において描画されたバンド画像が、メインメモリ130に格納される。   In RGBA drawing processing step S203, the CPU 190 draws a band image by the drawing command input from the PDL analysis step S202. In the RGBA band image storage step S204, the band image drawn in the RGBA drawing processing step S203 is stored in the main memory 130.

RGBA符号化ステップS205では、符号化部115が、メインメモリ130のバンド画像を格納する領域から、RGBAバンド画像記憶ステップS204において格納された画像を読み込み、符号化し、符号データを生成する。RGBAページ符号記憶ステップS206では、RGBA符号化ステップS205において生成された符号データがメインメモリ130に格納される。符号データが格納される領域は、例えば、メインメモリ130が有するページ符号を格納する領域である。   In the RGBA encoding step S205, the encoding unit 115 reads and encodes the image stored in the RGBA band image storage step S204 from the area for storing the band image in the main memory 130, and generates code data. In the RGBA page code storage step S206, the code data generated in the RGBA encoding step S205 is stored in the main memory 130. The area where the code data is stored is, for example, an area where the page code of the main memory 130 is stored.

RGBA復号ステップS207では、復号部116が、RGBAページ符号記憶ステップS206において格納された符号データを、メインメモリ130から読み出し、復号する。RGBA復号ステップS207では、さらに、復号された画像データが、画像処理ステップS210に対して出力される。   In the RGBA decoding step S207, the decoding unit 116 reads the code data stored in the RGBA page code storage step S206 from the main memory 130 and decodes it. In the RGBA decoding step S207, the decoded image data is further output to the image processing step S210.

画像処理ステップS210は、RGB→CMY色変換処理ステップS211、UCR処理ステップS212、及び、階調処理ステップS213を有し、上記の順に各ステップの処理が実行される。画像処理ステップS210の各ステップは、画像処理部117により実行される。   The image processing step S210 includes an RGB → CMY color conversion processing step S211, a UCR processing step S212, and a gradation processing step S213, and the processing of each step is executed in the order described above. Each step of the image processing step S210 is executed by the image processing unit 117.

RGB→CMY色変換処理ステップS211では、RGBA復号ステップS207で復号されたRGB色空間の画像データの色空間が、CMY色空間に変換される。UCR処理ステップS212では、CMY色空間に変換された画像データの各画素の画素値に対し、下色除去の処理が行われる。階調処理ステップS213では、下色除去処理された画像データに対し、階調補正処理が行われる。   In the RGB → CMY color conversion processing step S211, the color space of the image data in the RGB color space decoded in the RGBA decoding step S207 is converted into the CMY color space. In the UCR processing step S212, an under color removal process is performed on the pixel value of each pixel of the image data converted into the CMY color space. In the gradation processing step S213, gradation correction processing is performed on the image data that has undergone the undercolor removal processing.

画像処理ステップS210における各ステップの処理が行われた画像データは、プリンタエンジン120に対して出力され、プリンタエンジン120において媒体上に形成される画像となる。   The image data subjected to the processing in each step in the image processing step S210 is output to the printer engine 120, and becomes an image formed on the medium in the printer engine 120.

(メインメモリ130における記憶領域)
図4は、メインメモリ130における記憶領域を説明する図である。図4のメインメモリ130は、プログラム領域131、PDL格納メモリ領域132、RGBAバンドメモリ格納領域133、ページ符号格納領域134、及び、その他領域135を有する。
(Storage area in main memory 130)
FIG. 4 is a diagram for explaining a storage area in the main memory 130. The main memory 130 of FIG. 4 has a program area 131, a PDL storage memory area 132, an RGBA band memory storage area 133, a page code storage area 134, and another area 135.

プログラム領域131は、CPU190が実行するコンピュータプログラムが展開され格納される。PDL格納メモリ領域132は、PC900から送信されるPDLデータが格納される。   In the program area 131, a computer program executed by the CPU 190 is expanded and stored. The PDL storage memory area 132 stores PDL data transmitted from the PC 900.

RGBAバンドメモリ格納領域133は、RGBAバンドデータを格納する。RGBAバンドデータとは、RGBA色空間により表現される画像データであって、バンド毎のデータである。ページ符号格納領域134は、符号データを、ページ毎に複数ページ格納する。ページ毎の符号データは、バンド単位の符号データからなる。その他領域135は、例えば、描画コマンド等の上記の各領域に格納されない諸データが格納される。   The RGBA band memory storage area 133 stores RGBA band data. The RGBA band data is image data expressed in the RGBA color space, and is data for each band. The page code storage area 134 stores a plurality of pages of code data for each page. The code data for each page consists of code data in band units. The other area 135 stores, for example, various data that are not stored in the respective areas such as a drawing command.

(メインメモリ130における各記憶領域とカラープリンタ1が有する電装・制御ブロックとの関係)
図5は、メインメモリ130における各記憶領域と、カラープリンタ1が有する電装・制御ブロックとの関係を説明する図である。
(Relationship between storage areas in main memory 130 and electrical / control blocks of color printer 1)
FIG. 5 is a diagram for explaining the relationship between each storage area in the main memory 130 and the electrical / control blocks of the color printer 1.

PC900は、PDLを生成し、ネットワークを介してカラープリンタ1に対してPDLを転送させる。通信処理部119は、PC900から受信したPDLデータを、メインメモリ130が有するPDL格納メモリ領域132に格納させる。   The PC 900 generates a PDL and transfers the PDL to the color printer 1 via the network. The communication processing unit 119 stores the PDL data received from the PC 900 in the PDL storage memory area 132 included in the main memory 130.

CPU190は、PDL格納メモリ領域132に格納されたPDLデータを読み出し、描画コマンドを生成する。生成された描画コマンドは、メインメモリ上の図示しない描画コマンド領域に格納される。CPU190は、さらに、描画コマンド領域に格納された描画コマンドにより、バンドデータを生成する。生成されたバンドデータは、RGBAバンドメモリ格納領域133に格納される。   The CPU 190 reads the PDL data stored in the PDL storage memory area 132 and generates a drawing command. The generated drawing command is stored in a drawing command area (not shown) on the main memory. The CPU 190 further generates band data according to the drawing command stored in the drawing command area. The generated band data is stored in the RGBA band memory storage area 133.

符号化部115は、RGBAバンドメモリ格納領域133に格納されたバンドデータ毎に、符号化を行い、符号データを生成する。生成された符号データは、ページ符号格納領域134に格納される。   The encoding unit 115 performs encoding for each band data stored in the RGBA band memory storage area 133 to generate code data. The generated code data is stored in the page code storage area 134.

復号部116は、ページ符号格納領域134に格納された符号データを復号し、復号された画像データを画像処理部117に転送させる。画像処理部117は、復号されたRGBA色空間による画像データに対し、色空間の変換、下色除去、及び、階調処理等の画像処理を行う。画像処理部117は、画像処理された画像データを、エンジンコントローラ118に対して転送させる。
エンジンコントローラ118は、受信した画像データをプリンタエンジン120に転送させる。
The decoding unit 116 decodes the code data stored in the page code storage area 134 and transfers the decoded image data to the image processing unit 117. The image processing unit 117 performs image processing such as color space conversion, undercolor removal, and gradation processing on the decoded image data in the RGBA color space. The image processing unit 117 causes the engine controller 118 to transfer the image data subjected to the image processing.
The engine controller 118 transfers the received image data to the printer engine 120.

(符号化部115の機能構成)
図6は、符号化部115の機能構成を説明するブロック図である。図6の符号化部115は、メインメモリ130が有するRGBAバンドメモリ格納領域133に格納されたバンドデータを読み込み、符号化して、符号データをメインメモリ130が有するページ符号格納領域134に対して出力する。
(Functional configuration of encoding unit 115)
FIG. 6 is a block diagram illustrating a functional configuration of the encoding unit 115. 6 reads and encodes the band data stored in the RGBA band memory storage area 133 of the main memory 130, and outputs the code data to the page code storage area 134 of the main memory 130. To do.

符号化部115は、画像読み込み部501、ランレングス生成処理部502、繰り返し処理部503、辞書変換部504、差分生成処理部505、符号フォーマット生成処理部506、及び、符号書き込み部507を有する。   The encoding unit 115 includes an image reading unit 501, a run length generation processing unit 502, a repetition processing unit 503, a dictionary conversion unit 504, a difference generation processing unit 505, a code format generation processing unit 506, and a code writing unit 507.

画像読み込み部501は、RGBAバンドメモリ格納領域133から、RGBA色空間によるバンドデータを読み込む。バンドデータは、スキャンライン毎に読み込まれる。図7は、スキャンライン毎にバンドデータが読み込まれることを説明する図である。図7において、バンドデータは、バンドの幅(M+1)とバンドの高さ(N+1)とを有する。すなわち、バンドデータは、主走査方向の(M+1)個の画素と、副走査方向に(N+1)個のラインとからなる。画像読み込み部501は、ライン0の画素0から順にMまでの画素を読み込む。ライン毎に(M+1)個の画素を読み込む処理を、ラインNまで繰り返す。   The image reading unit 501 reads band data in the RGBA color space from the RGBA band memory storage area 133. Band data is read for each scan line. FIG. 7 is a diagram for explaining that band data is read for each scan line. In FIG. 7, the band data has a band width (M + 1) and a band height (N + 1). That is, the band data includes (M + 1) pixels in the main scanning direction and (N + 1) lines in the sub-scanning direction. The image reading unit 501 reads pixels from the pixel 0 of the line 0 to M in order. The process of reading (M + 1) pixels for each line is repeated up to line N.

ランレングス処理部502は、画像読み込み部501により読み込まれたRGBA色空間からなるバンドデータに対し、図7の読み込み順におけるRGB値のラン長のデータに変換する。より詳細には、図7の読み込み順において、RGB値が同一の画素が連続する個数であるラン長を取得する。   The run length processing unit 502 converts the band data composed of the RGBA color space read by the image reading unit 501 into data of run lengths of RGB values in the reading order of FIG. More specifically, a run length that is the number of consecutive pixels having the same RGB value in the reading order of FIG. 7 is acquired.

図8は、ランレングス生成処理の詳細を説明する図である。図8では、一のラインにおいて、RGB値が同一の画素が連続する個数をカウントする処理の例が示されている。より詳細には、画素0から画素2までの画素値が同一である場合には、そのラン長を3とし、そのRGB値を対応づけて取得する。同様に、画素3から画素5までの画素値が同一である場合には、そのラン長を3とする。   FIG. 8 is a diagram for explaining the details of the run length generation process. FIG. 8 shows an example of processing for counting the number of consecutive pixels having the same RGB value in one line. More specifically, when the pixel values from pixel 0 to pixel 2 are the same, the run length is set to 3, and the RGB values are acquired in association with each other. Similarly, if the pixel values from pixel 3 to pixel 5 are the same, the run length is set to 3.

図6に戻り、繰り返し処理部503は、ランレングス生成処理部502で生成されたランレングスのデータに対し、繰り返し処理を行う。図9は、繰り返し処理を説明する図である。図9では、一のラインにおいて、同一のランレングスが繰り返される個数をカウントしている。より詳細には、画素0及び画素1が同一の画素値を有し、画素2及び画素3が画素0とは異なる同一の画素値を有する場合には、画素0及び画素1に対応するラン長が2であり、画素2及び画素3に対応するラン長が2である。   Returning to FIG. 6, the iterative processing unit 503 performs iterative processing on the run-length data generated by the run-length generation processing unit 502. FIG. 9 is a diagram illustrating the repetition process. In FIG. 9, the number of repetitions of the same run length in one line is counted. More specifically, when pixel 0 and pixel 1 have the same pixel value, and pixel 2 and pixel 3 have the same pixel value different from pixel 0, the run length corresponding to pixel 0 and pixel 1 Is 2, and the run length corresponding to the pixel 2 and the pixel 3 is 2.

以下の説明を簡単にするため、画素0及び画素1に対応するランレングスデータを(A)とし、画素2及び画素3に対応するランレングスデータを(B)とする。ランレングスデータ(A)は、画素0と同一の画素値とラン長2との情報を有する。ランレングスデータ(B)は、画素2と同一の画素値とラン長2との情報を有する。   In order to simplify the following description, the run-length data corresponding to the pixel 0 and the pixel 1 is (A), and the run-length data corresponding to the pixel 2 and the pixel 3 is (B). The run length data (A) has the same pixel value as that of the pixel 0 and information of the run length 2. The run length data (B) has the same pixel value and run length 2 information as the pixel 2.

次に、画素4、画素5、画素8、画素9、画素12、及び、画素13の画素値が、画素0と同一であり、画素6、画素7、画素10、及び、画素11の画素値が、画素2と同一であることにより、ランレングスデータ(A)とランレングスデータ(B)とが、交互に連続して連なる。すなわち、画素4を先頭として、ランレングスデータ(A)とランレングスデータ(B)とが交互に連なるランレングスデータの連続の個数が5となる。この5を繰り返しの数とする。
繰り返し処理部503は生成された繰り返しの数と対応するランレングスデータとを、辞書変換部504に対して出力する。
Next, the pixel values of the pixel 4, the pixel 5, the pixel 8, the pixel 9, the pixel 12, and the pixel 13 are the same as the pixel 0, and the pixel values of the pixel 6, the pixel 7, the pixel 10, and the pixel 11 are the same. However, the run length data (A) and the run length data (B) are alternately and continuously connected by being the same as the pixel 2. That is, the continuous number of run-length data in which run-length data (A) and run-length data (B) are alternately connected starting from the pixel 4 is 5. This 5 is the number of repetitions.
The repetition processing unit 503 outputs the generated number of repetitions and the corresponding run length data to the dictionary conversion unit 504.

辞書変換部504は、繰り返し処理部503から出力されたランレングスデータに対し、辞書に基づく画素インデックスへの変換を行う。この処理は、FIFO方式により行われるとよい。図10は、辞書変換部504による処理の例を示す図である。図10において、入力された一のRGBA値aと同一の値が、RGBA辞書に格納されている場合には、RGBA辞書において対応づけられているインデックス値3が出力される。   The dictionary conversion unit 504 converts the run-length data output from the repetition processing unit 503 into a pixel index based on a dictionary. This process may be performed by a FIFO method. FIG. 10 is a diagram illustrating an example of processing performed by the dictionary conversion unit 504. In FIG. 10, when the same value as the input one RGBA value a is stored in the RGBA dictionary, the index value 3 associated with the RGBA dictionary is output.

一方、辞書変換部504において、入力された画素値に対応する画素値がRGBA辞書に格納されていない場合には、差分生成処理部505による処理が行われる。図11は、差分生成処理部505による処理の例を示す図であって、入力された画素値に対応する画素値がRGBA辞書に格納されていない場合の例である。図11において、入力された位置のRGBA値bと同一の値が、RGBA辞書に格納されていない場合には、RGBA辞書に格納されている各画素値との差分が計算される。各差分のうち、最小の値を有する画素値に対応するインデックス値を、RGBA値bに対するインデックス値として出力し、さらに、そのインデックスに対応する差分が出力される。   On the other hand, in the dictionary conversion unit 504, when the pixel value corresponding to the input pixel value is not stored in the RGBA dictionary, processing by the difference generation processing unit 505 is performed. FIG. 11 is a diagram illustrating an example of processing by the difference generation processing unit 505, and is an example in the case where pixel values corresponding to input pixel values are not stored in the RGBA dictionary. In FIG. 11, if the same value as the RGBA value b at the input position is not stored in the RGBA dictionary, the difference from each pixel value stored in the RGBA dictionary is calculated. Of each difference, an index value corresponding to the pixel value having the smallest value is output as an index value for the RGBA value b, and further, a difference corresponding to the index is output.

図6に戻り、符号フォーマット生成処理部506が、辞書変換部504から出力されたインデックス値、差分生成処理部505から出力されたインデックス値と差分、及び、繰り返し処理部503から出力されたラン長及び繰り返し数とに基づいて、符号データを生成する。   Returning to FIG. 6, the code format generation processing unit 506 outputs the index value output from the dictionary conversion unit 504, the index value and difference output from the difference generation processing unit 505, and the run length output from the repetition processing unit 503. Code data is generated based on the repetition number.

図12は、符号データのフォーマットを説明する図である。図12の符号フォーマットは、制御コードcと、データの本体である、ランレングスデータd、繰り返しe、カラー値f、インデックスg、及び、差分hと、の各情報に対して、ビット長及び値の範囲等が示されている。   FIG. 12 is a diagram for explaining the format of code data. The code format of FIG. 12 includes a bit length and a value for each information of the control code c, the data body, run-length data d, repetition e, color value f, index g, and difference h. The range is shown.

制御コードcは、画素ヘッダ、画素差分ヘッダ、インデックスヘッダ、インデックス差分ヘッダ、及び、符号終端の各コードを有する。画素ヘッダは、画素ヘッダ、ラン長、及び、カラー値の符号規則に対するヘッダである。インデックスヘッダは、インデックスヘッダ、ラン長、及び、インデックスの符号規則に対するヘッダである。画素差分ヘッダは、画素差分ヘッダ、ラン長、差分値の符号規則に対するヘッダである。インデックス差分ヘッダは、インデックスヘッダ、ラン長、インデックス、及び、差分値の符号規則に対するヘッダである。また、符号終端は,符号の終端を表現している。   The control code c includes each code of a pixel header, a pixel difference header, an index header, an index difference header, and a code end. The pixel header is a header for the code rule of the pixel header, the run length, and the color value. The index header is a header for an index header, a run length, and an index code rule. The pixel difference header is a header for the code rule of the pixel difference header, the run length, and the difference value. The index difference header is a header for the code rule of the index header, the run length, the index, and the difference value. The code end represents the end of the code.

ランレングスデータdは、RGBA画素値が同一の画素が連続する際のラン長に対する符号である。ランレングスデータdは、ラン長と画素値との組で表現される。ランレングスデータdにおいて、短い4BITのL1符号はラン長が1〜8までを表現する。8BITのL2符号はラン長が9〜40までを表現する。L3は段階的に長くなる符号であり、41〜1048576までのラン長を表現する。   The run-length data d is a code for the run length when pixels having the same RGBA pixel value continue. The run length data d is expressed as a set of run length and pixel value. In the run-length data d, a short 4-bit L1 code expresses run lengths from 1 to 8. The 8-bit L2 code expresses run lengths of 9-40. L3 is a code that becomes longer in steps, and expresses run lengths from 41 to 1048576.

繰り返しeは、2つのランレングスデータが交互に連続する際の、繰り返し数の符号である。繰り返しeは、複数のランレングス符号と繰り返しとの組で表現され、短い4BITのN1符号は繰り返し1を、N2符号は繰り返し2を表現する。また、N3は段階的に長くなる符号であり,3〜1048576までの繰り返しを表現することができる。
カラー値fは、ランレングスデータにおけるRGB値のデータである。
The repetition e is a code of the number of repetitions when two run-length data are alternately continued. The repetition e is expressed as a combination of a plurality of run-length codes and repetitions. A short 4-bit N1 code represents repetition 1, and an N2 code represents repetition 2. N3 is a code that becomes longer in steps, and can represent a repetition of 3 to 1048576.
The color value f is RGB value data in the run-length data.

インデックスgは、辞書に保持されているインデックス値であり、短い4BITのI1符号はインデックス値の1〜8までを表現する。また、8BITのI2符号はインデックス値が9〜136までを表現することができる。
差分値hは、図11に示す辞書の内容とランレングスのRGBA値との差分である。差分値hは、また、1つ前のランレングスのRGBAとの差分でもよい。
The index g is an index value held in the dictionary, and a short 4-bit I1 code represents 1 to 8 of the index value. Further, the 8-bit I2 code can express index values of 9 to 136.
The difference value h is a difference between the contents of the dictionary shown in FIG. 11 and the run-length RGBA value. The difference value h may be a difference from the previous run-length RGBA.

図13は、符号データの構成の例を説明する図である。図13(A)は、符号データの全体の構成を示す図である。図13(A)において、符号は内部符号と符号終端とを有する。符号終端は符号の終端を表す符号である。   FIG. 13 is a diagram illustrating an example of the configuration of code data. FIG. 13A is a diagram showing an overall configuration of code data. In FIG. 13A, the code has an internal code and a code end. The code end is a code representing the end of the code.

図13(B)は、内部符号の構成の例を示す図である。図13(B)では、各符号が連結している。図13(B)において、()で括られた数は、符号化の優先順位を示す数である。より詳細には、(1)において、繰り返しがあれば繰り返し値を符号化し、そうでなければ、(2)へ移る。(2)において、辞書にランレングスのRGBAの値があれば、Indexの符号化を行ない、そうでなければ(3)に移る。   FIG. 13B is a diagram illustrating an example of the configuration of the internal code. In FIG. 13B, the respective symbols are connected. In FIG. 13B, the number enclosed in parentheses is a number indicating the priority of encoding. More specifically, in (1), if there is a repetition, the repetition value is encoded, and if not, the process proceeds to (2). In (2), if there is a run-length RGBA value in the dictionary, Index encoding is performed. Otherwise, the process proceeds to (3).

(3)において、1つ前のランレングスのRGBAとの画素差分が差分上限値より小さい場合に画素差分で符号化を行ない、そうでなければ(4)に移る。(4)において、辞書とランレングスのRGBAの差分が差分上限値よりも小さい場合に、Index差分で符号化を行ない、そうでなければ(5)に移る。(5)において、ランレングスのRGBAを符号化する。全ての画像を符号化した後に、(6)において、符号終端を符号化する。   In (3), if the pixel difference from the previous run-length RGBA is smaller than the difference upper limit value, encoding is performed using the pixel difference; otherwise, the process proceeds to (4). In (4), if the difference between the dictionary and the run-length RGBA is smaller than the difference upper limit value, encoding is performed using the Index difference, and if not, the process proceeds to (5). In (5), run-length RGBA is encoded. After all the images are encoded, the code end is encoded in (6).

なお、符号フォーマット生成部506は、所定の条件により、RGBA辞書に含まれない画素値が入力された場合には、その画素値に対応するインデックス値を生成し、辞書に登録することにより、辞書を更新してもよい。図14は、入力されたRGBA画素値jが、RGBA辞書に含まれていない場合に、その画素値jが、RGBA辞書に登録されることを説明する図である。図中、符号kを付した箇所に、画素値jが登録され、RGBA辞書が更新されている。   When a pixel value that is not included in the RGBA dictionary is input under a predetermined condition, the code format generation unit 506 generates an index value corresponding to the pixel value, and registers the index value in the dictionary. May be updated. FIG. 14 is a diagram illustrating that when the input RGBA pixel value j is not included in the RGBA dictionary, the pixel value j is registered in the RGBA dictionary. In the figure, the pixel value j is registered at the location marked with the symbol k, and the RGBA dictionary is updated.

図6に戻り、符号書き込み部507は、符号フォーマット生成部506により生成された符号データを、メインメモリ130のページ符号格納領域134に格納させる。   Returning to FIG. 6, the code writing unit 507 stores the code data generated by the code format generation unit 506 in the page code storage area 134 of the main memory 130.

(符号化部115の機能構成)
図15は、復号部116の機能構成を説明するブロック図である。復号部116は、メインメモリ130が有するページ符号格納領域134に格納された符号データを読み込み、復号して得られる画像データをメインメモリ130に対して出力する。
(Functional configuration of encoding unit 115)
FIG. 15 is a block diagram illustrating a functional configuration of the decoding unit 116. The decoding unit 116 reads code data stored in the page code storage area 134 of the main memory 130 and outputs image data obtained by decoding to the main memory 130.

復号部116は、符号読み込み部601、符号フォーマット解析部602、差分処理部603、辞書変換部604、繰り返し処理部605、ランレングス復号処理部606、及び、画像書き込み部607を有する。   The decoding unit 116 includes a code reading unit 601, a code format analysis unit 602, a difference processing unit 603, a dictionary conversion unit 604, an iterative processing unit 605, a run length decoding processing unit 606, and an image writing unit 607.

符号読み込み部601は、ページ符号格納領域134から符号データを読み込む。符号フォーマット解析部602は、符号読み込み部601により読み込まれた符号データを解析し、ラン長、繰り返し、カラー値、インデックス、及び、差分等の各値を取得し、差分処理部603に対して出力する。   The code reading unit 601 reads code data from the page code storage area 134. The code format analysis unit 602 analyzes the code data read by the code reading unit 601, acquires values such as run length, repetition, color value, index, and difference, and outputs them to the difference processing unit 603. To do.

差分処理部603は、符号フォーマット解析部602により取得された差分の値と、1つ前のランにおけるカラー値とを加算し、そのランにおけるRGB値を求める。差分処理部603は、また、インデックスによりRGB値を求める。   The difference processing unit 603 adds the difference value acquired by the code format analysis unit 602 and the color value in the previous run, and obtains the RGB value in the run. The difference processing unit 603 also obtains an RGB value from the index.

図16は、差分処理部603による復号処理を説明する図であって、インデックスによる復号の例である。図16では、符号フォーマット解析部602により取得されたインデックスに対し、RGBA辞書に保持されているインデックス値に対応するRGBA値が出力される。図16では、さらに、出力されたRGBA値と、符号フォーマット解析部602により取得された差分と、が加算され、そのランに対応するRGBA値が出力される。   FIG. 16 is a diagram for explaining the decoding process by the difference processing unit 603, and is an example of decoding by an index. In FIG. 16, RGBA values corresponding to the index values held in the RGBA dictionary are output for the indexes acquired by the code format analysis unit 602. In FIG. 16, the output RGBA value and the difference acquired by the code format analysis unit 602 are added, and the RGBA value corresponding to the run is output.

辞書変換部604は、辞書変換処理を行う。辞書変換部604は、差分処理部603においてRGBA値が求められた場合には、その値を、RGBA辞書に追加する。辞書変換部604は、また、符号フォーマット解析部602によって得られたランレングスデータの中に、差分が含まれていない場合には、インデックスに対応するRGBA値を求める。図17は、インデックスに対応するRGBA値を求める処理を説明する図である。図17では、符号データから取得されたインデックスである符号インデックスに対し、RGBA辞書により対応づけられているRGBA値が出力される。RGBA値は、繰り返し処理部605に対して出力される。   The dictionary conversion unit 604 performs dictionary conversion processing. When the RGBA value is obtained by the difference processing unit 603, the dictionary conversion unit 604 adds the value to the RGBA dictionary. The dictionary conversion unit 604 also obtains an RGBA value corresponding to the index when the run-length data obtained by the code format analysis unit 602 does not include a difference. FIG. 17 is a diagram for explaining processing for obtaining RGBA values corresponding to indexes. In FIG. 17, RGBA values associated with the code index, which is an index acquired from the code data, by the RGBA dictionary are output. The RGBA value is output to the repetition processing unit 605.

繰り返し処理部605は、符号フォーマット解析部602において取得された繰り返しの値とラン長とから、ランレングスデータを生成し、ランレングス復号処理部606に転送させる。   The iterative processing unit 605 generates run-length data from the repetition value and the run length acquired by the code format analysis unit 602, and transfers the run-length data to the run-length decoding processing unit 606.

図18は、繰り返し処理部605における繰り返しの復号処理を説明する図である。図18は、ラン長2の画素値v1と、ラン長2の画素値v2と、のランレングスデータの後に続いて、繰り返しの値5を有する符号データが示されている。繰り返しの値5の部分の復号により、ラン長2の画素値v1のランとラン長2の画素値v2のランとが、交互に計5個連なる画像データが得られる。   FIG. 18 is a diagram for explaining repetitive decoding processing in the repetitive processing unit 605. FIG. 18 shows code data having a repetition value of 5 following the run length data of the pixel value v1 of the run length 2 and the pixel value v2 of the run length 2. By decoding the portion of the repeated value 5, a total of five image data in which the run of the pixel value v1 having the run length 2 and the run of the pixel value v2 having the run length 2 are alternately obtained.

図15に戻り、ランレングス復号処理部606は、辞書変換部604により得られたRGBA値により、画素毎の画素値を決定し、画像の描画を行う。図19は、ランレングス復号処理部606による復号処理を説明する図である。図19では、ラン長3の画素値v4が2回繰り返され、その後に、ラン長4の画素値v5、ラン長4の画素値v6等が続く。この符号データをランレングス復号処理部606が復号することにより、ラインmの各画素に対する画素値が決定される。復号された画像データは、画像書き込み部607に転送される。
なお、繰り返し処理部605とランレングス復号処理部606とは、一の処理部として構成されてもよい。
Returning to FIG. 15, the run-length decoding processing unit 606 determines a pixel value for each pixel based on the RGBA value obtained by the dictionary conversion unit 604, and draws an image. FIG. 19 is a diagram illustrating a decoding process performed by the run-length decoding processing unit 606. In FIG. 19, the pixel value v4 of run length 3 is repeated twice, followed by the pixel value v5 of run length 4, the pixel value v6 of run length 4, and the like. The run-length decoding processing unit 606 decodes the code data to determine a pixel value for each pixel of the line m. The decoded image data is transferred to the image writing unit 607.
Note that the iterative processing unit 605 and the run-length decoding processing unit 606 may be configured as one processing unit.

画像書き込み部607は、ランレングス復号処理部606により復号された画像データを、メインメモリ130に格納させる。画像データは、例えば、RGBAバンドメモリ格納領域133に格納される。   The image writing unit 607 stores the image data decoded by the run length decoding processing unit 606 in the main memory 130. The image data is stored in the RGBA band memory storage area 133, for example.

(符号化部115の各部におけるデータの入出力)
図20は、符号化部115が有する各部におけるデータの入出力を説明する図である。図20の符号化部115は、画像読み込み部501、ランレングス生成処理部502、繰り返し処理部503、辞書変換部504、差分生成処理部505、符号フォーマット生成処理部506、符号書き込み部507、差分上限記憶部508、メモリアービタインタフェース(以下、「メモリアービタI/F」という。)509、画像アドレス生成部511、及び、符号アドレス生成部517を有する。図20において、図6の符号化部115と同一の機能及び構成を有する各部は、同一の符号を付し、ここでは説明を省略する。
(Data input / output in each unit of the encoding unit 115)
FIG. 20 is a diagram for explaining input / output of data in each unit included in the encoding unit 115. 20 includes an image reading unit 501, a run length generation processing unit 502, a repetition processing unit 503, a dictionary conversion unit 504, a difference generation processing unit 505, a code format generation processing unit 506, a code writing unit 507, and a difference. An upper limit storage unit 508, a memory arbiter interface (hereinafter referred to as “memory arbiter I / F”) 509, an image address generation unit 511, and a code address generation unit 517 are included. 20, each unit having the same function and configuration as the encoding unit 115 in FIG. 6 is assigned the same reference numeral, and the description thereof is omitted here.

メモリアービタI/F509は、メインメモリアービタ113に対するデータの入出力等を行うインタフェースである。メモリアービタI/F509は、メインメモリ130に対し、アドレスを指定してデータの読み出しと書き込みとを行う。メモリアービタI/F509は、メインメモリに対し、読み出し及び書き込みの何れの処理を行わせるかを示すR/W信号を出力する。   The memory arbiter I / F 509 is an interface for inputting / outputting data to / from the main memory arbiter 113. The memory arbiter I / F 509 designates an address with respect to the main memory 130 and reads and writes data. The memory arbiter I / F 509 outputs an R / W signal indicating whether to perform read or write processing on the main memory.

画像アドレス生成部511は、メインメモリ130における画像データのアドレスを生成する。画像アドレス生成部511は、画像読み込み部501がメインメモリ130のRGBAバンドメモリ格納領域133に格納されたバンドデータを読み出す際の、バンドデータのアドレスを生成する。生成されたアドレスは、画像読み込み部501に対して出力される。なお、図20中、メインメモリ上のアドレスを「メモリアドレス」と表記する。   The image address generation unit 511 generates an image data address in the main memory 130. The image address generation unit 511 generates an address of band data when the image reading unit 501 reads out the band data stored in the RGBA band memory storage area 133 of the main memory 130. The generated address is output to the image reading unit 501. In FIG. 20, the address on the main memory is expressed as “memory address”.

画像読み込み部501は、画像アドレス生成部511からアドレスが入力され、そのアドレスをメモリアービタI/F509に対して出力する。画像読み込み部501は、メモリアービタI/F509を介してバンドデータである画像データを取得する。画像読み込み部501は、取得した画像データを、ランレングス生成処理部502に対して出力する。画像データは、RGBA色空間による画像データであり、図中では、RGBAデータと表記されている。   The image reading unit 501 receives an address from the image address generation unit 511 and outputs the address to the memory arbiter I / F 509. The image reading unit 501 acquires image data that is band data via the memory arbiter I / F 509. The image reading unit 501 outputs the acquired image data to the run length generation processing unit 502. The image data is image data in the RGBA color space, and is represented as RGBA data in the drawing.

ランレングス生成処理部502は、画像読み込み部501からRGBAデータが入力され、繰り返し処理部503に対し、ラン長の値とRGBAデータとを出力する。繰り返し処理部503は、ランレングス生成処理部502からラン長の値とRGBAデータとが入力され、辞書変換部504に対し、繰り返しの値、ラン長の値、及び、RGBAデータが出力される。なお、ランレングス生成処理部502と繰り返し処理部503とは、一の処理部として構成されてもよい。   The run length generation processing unit 502 receives RGBA data from the image reading unit 501 and outputs a run length value and RGBA data to the repetition processing unit 503. The repetition processing unit 503 receives the run length value and the RGBA data from the run length generation processing unit 502, and outputs the repetition value, the run length value, and the RGBA data to the dictionary conversion unit 504. The run length generation processing unit 502 and the iterative processing unit 503 may be configured as one processing unit.

辞書変換部504は、繰り返し処理部503から、繰り返しの値、ラン長の値、及び、RGBAデータが入力され、差分処理部505に対し、辞書データ、インデックス、繰り返しの値、ラン長の値、及び、RGBAデータを出力する。   The dictionary conversion unit 504 receives the repetition value, the run length value, and the RGBA data from the repetition processing unit 503, and inputs the dictionary data, the index, the repetition value, the run length value to the difference processing unit 505. And RGBA data is output.

差分処理部505は、辞書変換部504から、辞書データ、インデックス、繰り返しの値、ラン長の値、及び、RGBAデータが入力される。差分処理部505は、符号フォーマット生成部506に対し、差分データ、インデックス、繰り返しの値、ラン長の値、RGBAデータを出力する。   The difference processing unit 505 receives dictionary data, an index, a repetition value, a run length value, and RGBA data from the dictionary conversion unit 504. The difference processing unit 505 outputs difference data, an index, a repetition value, a run length value, and RGBA data to the code format generation unit 506.

差分上限記憶部508は、入力された画素値とRGBA辞書に保持されている画素値との差分の上限の値を保持する。すなわち、入力された画素値とRGBA辞書に保持されている画素値との差分の値が、差分上限記憶部508に保持されている値以上の場合には、入力された画素値が、RGBA辞書に新たに登録される。差分上限記憶部508は、符号フォーマット生成部506に対し、差分の上限の値を出力する。   The difference upper limit storage unit 508 holds the upper limit value of the difference between the input pixel value and the pixel value held in the RGBA dictionary. That is, when the difference value between the input pixel value and the pixel value held in the RGBA dictionary is equal to or larger than the value held in the difference upper limit storage unit 508, the input pixel value is Newly registered. The difference upper limit storage unit 508 outputs the upper limit value of the difference to the code format generation unit 506.

符号フォーマット生成部506は、差分処理部505から、差分データ、インデックス、繰り返しの値、ラン長の値、及び、RGBAデータが入力され、差分上限記憶部508から、差分の上限の値が入力される。符号フォーマット生成部506は、符号書き込み部507に対し、符号データを出力する。   The code format generation unit 506 receives the difference data, the index, the repetition value, the run length value, and the RGBA data from the difference processing unit 505, and receives the upper limit value of the difference from the difference upper limit storage unit 508. The The code format generation unit 506 outputs code data to the code writing unit 507.

符号アドレス生成部517は、メインメモリ130における符号データのアドレスを生成する。符号アドレス生成部517は、符号書き込み部507がメインメモリ130のページ符号格納領域134に符号データを書き込ませる際の、符号データのアドレスを生成する。符号アドレス生成部517は、符号書き込み部507に対し、生成したアドレスを出力する。   The code address generation unit 517 generates an address of code data in the main memory 130. The code address generation unit 517 generates an address of code data when the code writing unit 507 causes the code data to be written in the page code storage area 134 of the main memory 130. The code address generation unit 517 outputs the generated address to the code writing unit 507.

符号書き込み部507は、符号フォーマット生成部506から符号データが入力され、符号アドレス生成部517から、符号データをメインメモリ130に格納させる際のアドレスが入力される。符号書き込み部507は、メモリアービタI/F509を介してメインメモリ130に対し、アドレスと符号データとを出力する。   The code writing unit 507 receives code data from the code format generation unit 506, and receives an address when the code data is stored in the main memory 130 from the code address generation unit 517. The code writing unit 507 outputs an address and code data to the main memory 130 via the memory arbiter I / F 509.

(符号化処理のフロー)
図21から図23は、符号化部115における符号化処理の例を説明するフロー図である。図21は、ランレングス生成処理部502と繰り返し処理部503とにおける処理の例である。ステップS101では、処理の開始を示すラインの初期値フラグが1に初期化される。ステップS101に続いてステップS102に進み、繰り返しの値が0に設定される。
(Encoding process flow)
FIG. 21 to FIG. 23 are flowcharts for explaining an example of the encoding process in the encoding unit 115. FIG. 21 is an example of processing in the run length generation processing unit 502 and the repetition processing unit 503. In step S101, a line initial value flag indicating the start of processing is initialized to 1. Progressing to step S102 following step S101, the repeat value is set to zero.

ステップS102に続いてステップS103に進み、画像読み込み部501がメインメモリ130から読み出したRGBAデータのうち最初のラインの最初の画素の値を取得し、変数RGBADATAの値とする。なお、2回目以降のステップS103では、メインメモリ130から読み出されたRGBAデータのうち、前回のステップS103で値が取得された画素の次の画素の値を、変数RGBADATAの値とする。   Progressing to step S103 following step S102, the image reading unit 501 acquires the value of the first pixel of the first line of the RGBA data read from the main memory 130, and sets it as the value of the variable RGBADATA. Note that in the second and subsequent steps S103, the value of the pixel next to the pixel whose value was acquired in the previous step S103 in the RGBA data read from the main memory 130 is set as the value of the variable RGBADATA.

ステップS103に続いてステップS104に進み、ラインの初期値フラグが1の場合には、ステップS105に進む判断がなされ、ラインの初期値フラグが1ではない場合には、ステップS107に進む判断がなされる。   Following step S103, the process proceeds to step S104. If the line initial value flag is 1, a determination is made to proceed to step S105. If the line initial value flag is not 1, the process proceeds to step S107. The

ステップS104に続くステップS105では、変数ORGの値に、ステップS103で取得されたRGBADATAの値の2倍の値が代入される。変数ORGの値に、RGBADATAの値の2倍の値を用いることにより、ラン長を取得する処理において、隣接する画素との差の値を演算する際に、正の数にレベルシフトされた演算処理を行うことができる。ステップS105に続いてステップS106に進み、ラインの初期値フラグが0に設定される。ステップS106の後、ステップS103に戻って処理を繰り返す。   In step S105 subsequent to step S104, a value twice as large as the value of RGBADATA acquired in step S103 is substituted for the value of variable ORG. An operation that is level-shifted to a positive number when calculating the difference value between adjacent pixels in the process of obtaining the run length by using a value that is twice the RGBADATA value as the value of the variable ORG. Processing can be performed. Progressing to step S106 following step S105, the initial value flag of the line is set to 0. After step S106, the process returns to step S103 to repeat the process.

一方、ステップS104に続くステップS107では、変数ORGの値が、ステップS103で取得されたRGBADATAの値の2倍の値であるか否かの判断がなされる。2倍ではない場合には、ステップS108に進み、2倍である場合には、ステップS109に進む。   On the other hand, in step S107 following step S104, it is determined whether or not the value of the variable ORG is twice the value of RGBADATA acquired in step S103. If it is not double, the process proceeds to step S108, and if it is double, the process proceeds to step S109.

ステップS107に続くステップS108では、ラン長の値を1インクリメントする。一方、ステップS107に続くステップS109では、2つ前のランにおけるラン長の値が、現在のランにおけるラン長の値と等しいか否かの判断がなされ、さらに、2つ前のランにおけるRGBADATAの値と、現在のランにおけるRGBADATAの値とが等しいか否かの判断がなされる。上記2つの判断において、両者とも「等しい」場合には、ステップS110に進み、そうではない場合には、図22の処理に進む。   In step S108 following step S107, the run length value is incremented by one. On the other hand, in step S109 subsequent to step S107, it is determined whether or not the run length value in the previous run is equal to the run length value in the current run, and further, RGBADATA in the second run is determined. A determination is made whether the value and the RGBADATA value in the current run are equal. In the above two determinations, if both are “equal”, the process proceeds to step S110, and if not, the process proceeds to the process of FIG.

ステップS109に続くステップS110では、繰り返しの値が1インクリメントされる。ステップS110に続いてステップS111に進み、変数ORGの値が、現在のランにおけるRGBADATAの値の2倍に設定される。   In step S110 following step S109, the repeat value is incremented by one. Progressing to step S111 following step S110, the value of the variable ORG is set to twice the value of RGBADATA in the current run.

ステップS111に続いてステップS112に進み、2つ前のランにおけるラン長が、1つ前のランにおけるラン長とされ、さらに、2つ前のランにおけるRGBADATAの値が、1つ前のランにおけるRGBADATAの値とされる。ステップS112に続いてステップS113に進み、1つ前のランにおけるラン長が、現在のランのラン長とされ、1つ前のランにおけるRGBADATAの値が、現在のランにおけるRGBADATAの値とされる。ステップS113の処理の後、ステップS103に戻って処理を繰り返す。   Proceeding to step S112 following step S111, the run length in the previous run is set as the run length in the previous run, and the RGBADATA value in the previous run is further changed in the previous run. The value is RGBADATA. Progressing to step S113 following step S112, the run length in the previous run is the run length of the current run, and the RGBADATA value in the previous run is the RGBADATA value in the current run. . After the process of step S113, the process returns to step S103 to repeat the process.

図22は、辞書変換部504、差分処理部505、及び、符号フォーマット生成部506における処理を説明する図である。図22のステップS114は、図21のステップS109の処理において、「両者とも等しい」ではない、の判断がなされた場合に、ステップS109に続いて行われる。   FIG. 22 is a diagram illustrating processing in the dictionary conversion unit 504, the difference processing unit 505, and the code format generation unit 506. Step S114 in FIG. 22 is performed subsequent to step S109 when it is determined that “both are equal” in the process of step S109 in FIG.

ステップS114では、繰り返しの値が0より大きいか否かの判断がなされる。0より大きい場合には、ステップS115に進み、そうではない場合には、ステップS116に進む。ステップS114に続くステップS115では、繰り返しの値が、図12及び図13に示す符号フォーマットに従って符号化される。なお、以下の図22及び図23の説明では、符号フォーマットは、全て、図12及び図13に示すものとする。   In step S114, it is determined whether the repetition value is greater than zero. If it is greater than 0, the process proceeds to step S115, and if not, the process proceeds to step S116. In step S115 following step S114, the repeated value is encoded in accordance with the code format shown in FIGS. In the following description of FIGS. 22 and 23, the code formats are all shown in FIGS.

ステップS114又はステップS115に続くステップS116では、RGBADATAの値が、辞書に含まれているか否かの判断がなされる。辞書に含まれている場合には、ステップS117に進み、辞書に含まれていない場合には、ステップS121に進む。   In step S116 following step S114 or step S115, it is determined whether or not the RGBADATA value is included in the dictionary. If it is included in the dictionary, the process proceeds to step S117. If it is not included in the dictionary, the process proceeds to step S121.

ステップS116に続くステップS117では、辞書に含まれているRGBADATAの値に対応するインデックスの値が取得される。ステップS117に続いてステップS118に進み、符号フォーマットに従い、インデックスヘッダが符号化される。ステップS118に続いてステップS119に進み、符号フォーマットに従い、ラン長が符号化される。ステップS119に続いてステップS120に進み、符号フォーマットに従い、インデックスの値が符号化される。   In step S117 subsequent to step S116, an index value corresponding to the RGBADATA value included in the dictionary is acquired. Progressing to step S118 following step S117, the index header is encoded according to the code format. Progressing to step S119 following step S118, the run length is encoded according to the code format. Progressing to step S120 following step S119, the value of the index is encoded according to the code format.

一方、ステップS116に続くステップS121では、前のランにおけるRGBADATAの値と、現在のランにおけるRGBADATAの値との差分である画素差分値が取得される。ステップS121に続いてステップS122に進み、ステップS121で取得された画素差分値が、所定の値より小さいか否かの判断がなされる。なお、この判断は、所定の値以上であるか否かの判断でもよい。所定の値より小さい場合には、ステップS123に進み、所定の値より小さくない場合には、ステップS126に進む。   On the other hand, in step S121 following step S116, a pixel difference value that is the difference between the RGBADATA value in the previous run and the RGBADATA value in the current run is acquired. Progressing to step S122 following step S121, it is determined whether or not the pixel difference value acquired in step S121 is smaller than a predetermined value. This determination may be a determination as to whether or not the value is equal to or greater than a predetermined value. If it is smaller than the predetermined value, the process proceeds to step S123. If it is not smaller than the predetermined value, the process proceeds to step S126.

ステップS122に続くステップS123では、符号フォーマットに従い、画素差分ヘッダが符号化される。ステップS123に続いてステップS124に進み、符号フォーマットに従い、ラン長が符号化される。ステップS124に続いてステップS125に進み、符号フォーマットに従い、画素差分値が符号化される。   In step S123 following step S122, the pixel difference header is encoded according to the code format. Progressing to step S124 following step S123, the run length is encoded according to the code format. Progressing to step S125 following step S124, the pixel difference value is encoded according to the code format.

一方、ステップS122に続くステップS126では、辞書に保持されている複数の画素値と、RGBADATAの値との差分が最小となる差分の値が取得される。ステップS126に続いてステップS127に進み、ステップS126で取得された最小の差分の値が、所定の上限の値より小さいか否かの判断がなされる。小さい場合には、ステップS128に進み、小さくない場合には、ステップS131に進む。   On the other hand, in step S126 following step S122, a difference value that minimizes the difference between the plurality of pixel values held in the dictionary and the RGBADATA value is acquired. Progressing to step S127 following step S126, it is determined whether or not the minimum difference value acquired in step S126 is smaller than a predetermined upper limit value. If it is smaller, the process proceeds to step S128. If it is not smaller, the process proceeds to step S131.

ステップS127に続くステップS128では、符号フォーマットに従い、辞書差分ヘッダが符号化される。ステップS128に続いてステップS129に進み、符号フォーマットに従い、ラン長が符号化される。ステップS129に続いてステップS130に進み、符号フォーマットに従い、画素差分値が符号化される。   In step S128 following step S127, the dictionary difference header is encoded according to the code format. Progressing to step S129 following step S128, the run length is encoded according to the code format. Progressing to step S130 following step S129, the pixel difference value is encoded according to the code format.

一方、ステップS127に続くステップS131では、符号フォーマットに従い、画素ヘッダが符号化される。ステップS131に続いてステップS132に進み、符号フォーマットに従い、ラン長が符号化される。ステップS132に続いてステップS133に進み、符号フォーマットに従い、画素差分値が符号化される。ステップS133に続いてステップS134に進み、辞書の画素値に現在のRGBADATAの値が追加される。
ステップS120、ステップS125、ステップS130、及び、ステップS134の各処理の後、図23の処理に進む。
On the other hand, in step S131 following step S127, the pixel header is encoded according to the code format. Progressing to step S132 following step S131, the run length is encoded according to the code format. Progressing to step S133 following step S132, the pixel difference value is encoded according to the code format. Progressing to step S134 following step S133, the current RGBADATA value is added to the pixel value of the dictionary.
After the processing of step S120, step S125, step S130, and step S134, the process proceeds to the processing of FIG.

図23では、次のランに進む前に、ラン長の値等が更新する処理が行われる。図23のステップS135の処理は、図22のステップS120、ステップS125、ステップS130、及び、ステップS134に続いて行われる。ステップS135では、2つ前のランのラン長の値が、1つ前のランのラン長の値に更新され、2つ前のランのRGBADATAの値が、1つ前のランのRGBADATAの値に更新される。   In FIG. 23, the process of updating the run length value and the like is performed before proceeding to the next run. The process of step S135 in FIG. 23 is performed subsequent to step S120, step S125, step S130, and step S134 in FIG. In step S135, the run length value of the previous run is updated to the run length value of the previous run, and the RGBADATA value of the previous run is the RGBADATA value of the previous run. Updated to

ステップS135に続いてステップS136に進み、1つ前のランのラン長の値が、現在のランのラン長の値に更新され、1つ前のランのRGBADATAの値が、現在のランのRGBADATAの値に更新される。ステップS136に続いてステップS137に進み、変数ORGの値が、現在のランのRGBADATAの値の2倍に設定される。   Proceeding to step S136 following step S135, the run length value of the previous run is updated to the run length value of the current run, and the RGBADATA value of the previous run is updated to RGBADATA of the current run. Is updated to the value of. Proceeding to step S137 following step S136, the value of variable ORG is set to twice the value of RGBADATA for the current run.

ステップS137に続いてステップS138に進み、全ての画素に対する処理が終了したか否かの判断がなされる。全ての画素に対する処理が終了している場合には、ステップS139に進み、終了していない場合には、図21のステップS103に戻って処理を繰り返す。ステップS138に続くステップS139では、符号フォーマットに従い、符号終端が符号化される。   Progressing to step S138 following step S137, it is determined whether or not the processing for all the pixels has been completed. If the process for all the pixels has been completed, the process proceeds to step S139. If the process has not been completed, the process returns to step S103 in FIG. 21 to repeat the process. In step S139 following step S138, the code end is encoded according to the code format.

(符号化部115における辞書変換部504のハードウェア構成の例)
図24は、符号化部115における辞書変換部504のハードウェア構成の例を説明する図である。図24の辞書変換部504は、レジスタ10aないし10f、比較器11aないし11f、インデックス生成部13、OR演算器14、レジスタ15、レジスタ16、及び、制御部17を有する。
(Example of hardware configuration of dictionary conversion unit 504 in encoding unit 115)
FIG. 24 is a diagram for explaining an example of the hardware configuration of the dictionary conversion unit 504 in the encoding unit 115. The dictionary conversion unit 504 in FIG. 24 includes registers 10a to 10f, comparators 11a to 11f, an index generation unit 13, an OR calculator 14, a register 15, a register 16, and a control unit 17.

レジスタ10aないし10fは、繰り返し処理部503から入力されるランのRGBA値のデータを受け取り辞書データとして記憶する。比較器11aないし11fは、レジスタ10aないし10fに格納された辞書データと、繰り返し処理部503からのランのRGBAデータにおけるRGBA値のデータとを、それぞれ比較する。複数の比較器が設けられていることにより、比較処理を並列に行うことができる。   The registers 10a to 10f receive the RGBA value data of the run input from the repetition processing unit 503 and store it as dictionary data. The comparators 11 a to 11 f compare the dictionary data stored in the registers 10 a to 10 f with the RGBA value data in the run RGBA data from the repetitive processing unit 503, respectively. By providing a plurality of comparators, comparison processing can be performed in parallel.

比較の結果は、OR演算器14により判定され、さらに、インデックス生成部13に転送される。これにより、入力されるRGBA値のデータに対し、インデックスの生成と、既に生成されたインデックスに対応する画素値との一致の判定によるインデックスの対応づけとが行われる。   The result of the comparison is determined by the OR calculator 14 and further transferred to the index generation unit 13. As a result, for the input RGBA value data, an index is generated and an index is associated by determining whether the pixel value corresponding to the already generated index matches.

図25は、インデックス生成部13におけるインデックスを生成する処理を説明する図である。図25では、入力されるRGBA値に対し、辞書に保持されているRGBA値毎に、比較結果の判定が行われる。より詳細には、ステップS11において、最初のインデックスに対応する画素値との一致が判定される。一致する場合には、入力されたRGBA値に対し、インデックスの値0が設定される。一致しない場合には、ステップS12以降に進み、辞書に保持されているインデックス毎に、対応する画素値が一致するか否かの判定の処理と、一致する画素値に対応するインデックスの対応づけの処理とが行われる。   FIG. 25 is a diagram illustrating processing for generating an index in the index generation unit 13. In FIG. 25, the comparison result is determined for each RGBA value held in the dictionary with respect to the input RGBA value. More specifically, in step S11, a match with the pixel value corresponding to the first index is determined. If they match, an index value of 0 is set for the input RGBA value. If they do not match, the process proceeds to step S12 and subsequent steps for determining whether or not the corresponding pixel values match for each index held in the dictionary, and for associating the indexes corresponding to the matching pixel values. Processing.

この処理により、辞書に登録されているインデックスの中で、優先順に基づく対応づけを行うことができる。対応付けの処理により、一致する画素値に対応するインデックスの値が、一致インデックス値として出力される。   By this processing, it is possible to perform association based on the priority order among the indexes registered in the dictionary. By the association process, the index value corresponding to the matching pixel value is output as the matching index value.

図24に戻り、OR演算器14は、比較器11aないし11fからの比較結果に基づいて、入力されたRGBA値と辞書に保持されているRGBA値とが一致するものの有無を判定する。   Returning to FIG. 24, the OR calculator 14 determines whether there is a match between the input RGBA value and the RGBA value held in the dictionary based on the comparison results from the comparators 11a to 11f.

レジスタ15は、繰り返し処理部503から入力される繰り返しの値を一時的に保持する。レジスタ16は、繰り返し処理部503から入力されるラン長の値を一時的に保持する。制御部17は、OR演算器14からの判定結果に基づいて、インデックス生成部13の制御を行う。   The register 15 temporarily holds a repetition value input from the repetition processing unit 503. The register 16 temporarily holds the run length value input from the repetition processing unit 503. The control unit 17 controls the index generation unit 13 based on the determination result from the OR calculator 14.

(差分生成処理部505のハードウェア構成の例)
図26は、差分生成処理部505のハードウェア構成の例を説明する図である。差分生成処理部505は、レジスタ20,減算器21、減算器22aないし22f、最小値選択部23、及び、レジスタ24ないし26を有する。
(Example of hardware configuration of difference generation processing unit 505)
FIG. 26 is a diagram illustrating an example of a hardware configuration of the difference generation processing unit 505. The difference generation processing unit 505 includes a register 20, a subtracter 21, subtracters 22a to 22f, a minimum value selection unit 23, and registers 24 to 26.

レジスタ20は、1つ前のランにおけるRGBA値を格納する。減算器21は、現在のランにおけるRGBA値と1つ前のランにおけるRGBA値との差分を求める。減算器22aないし22fは、辞書に格納されているRGBA値と現在のランのRGBA値との差分を求める。複数の減算器を有することにより、減算処理を並列に行うことができる。減算された結果である各差分は、最小値選択部23に対して出力される。   The register 20 stores the RGBA value in the previous run. The subtracter 21 obtains a difference between the RGBA value in the current run and the RGBA value in the previous run. The subtractors 22a to 22f obtain the difference between the RGBA value stored in the dictionary and the RGBA value of the current run. By having a plurality of subtractors, subtraction processing can be performed in parallel. Each difference as a result of the subtraction is output to the minimum value selection unit 23.

最小値選択部23は、減算器22aないし22fからの出力を比較し、最小の差分値を選択し、その差分値が基づく画素値に対応するインデックスを、辞書から取得する。   The minimum value selection unit 23 compares the outputs from the subtractors 22a to 22f, selects the minimum difference value, and acquires an index corresponding to the pixel value based on the difference value from the dictionary.

レジスタ24ないし26は、辞書変換部504から出力される値のうち、所定の変数の値を一時的に保持する。レジスタ24は、RGBA値に一致するインデックス値を一時的に保持する。レジスタ25は、繰り返しの値を一時的に保持する。レジスタ26は、ラン長の値を一時的に保持する。   The registers 24 to 26 temporarily hold the value of a predetermined variable among the values output from the dictionary conversion unit 504. The register 24 temporarily holds an index value that matches the RGBA value. The register 25 temporarily holds a repeated value. The register 26 temporarily holds the run length value.

図27は、差分からインデックスを取得する処理を説明するフロー図である。図27のステップS31では、減算器22aから出力された差分結果0と、減算器22bから出力された差分結果1との比較が行われる。差分結果0が差分結果1より大きい場合には、ステップS32に進み、そうではない場合には、ステップS33に進む。   FIG. 27 is a flowchart illustrating processing for acquiring an index from a difference. In step S31 of FIG. 27, the difference result 0 output from the subtractor 22a is compared with the difference result 1 output from the subtractor 22b. If the difference result 0 is greater than the difference result 1, the process proceeds to step S32. If not, the process proceeds to step S33.

ステップS31に続くステップS32では、変数である辞書差分データ値に、差分結果1を代入し、変数である差分インデックスデータ値に値1を代入する。一方、ステップS31に続くステップS33では、辞書差分データ値に、差分結果0を代入し、差分インデックスデータ値に値0を代入する。   In step S32 following step S31, the difference result 1 is substituted for the dictionary difference data value that is a variable, and the value 1 is substituted for the difference index data value that is a variable. On the other hand, in step S33 following step S31, the difference result 0 is substituted for the dictionary difference data value, and the value 0 is substituted for the difference index data value.

ステップS32又はステップS33に続くステップS34では、辞書差分データ値と減算器22cから出力される差分結果2との比較が行われる。差分結果2がより小さい場合には、ステップS35に進み、そうではない場合には、ステップS36に進む。ステップS35では、辞書差分データ値と差分インデックスデータ値とが、差分結果2に対応する値に、それぞれ更新される。ステップS35に続いてステップS36に進む。   In step S34 following step S32 or step S33, the dictionary difference data value is compared with the difference result 2 output from the subtractor 22c. If the difference result 2 is smaller, the process proceeds to step S35, and if not, the process proceeds to step S36. In step S35, the dictionary difference data value and the difference index data value are respectively updated to values corresponding to the difference result 2. Following step S35, the process proceeds to step S36.

以下のステップでは、各減算器から出力される差分結果と、辞書差分データ値との比較に基づき、辞書差分データ値と差分インデックスデータ値とが更新される。全ての減算器から出力される差分結果に基づく処理が行われた後、辞書差分データ値の値が、最小の差分として出力され、その差分に対応する差分インデックスデータ値が出力される。   In the following steps, the dictionary difference data value and the difference index data value are updated based on the comparison between the difference result output from each subtracter and the dictionary difference data value. After the processing based on the difference results output from all the subtracters is performed, the value of the dictionary difference data value is output as the minimum difference, and the difference index data value corresponding to the difference is output.

図26に戻り、レジスタ24は、辞書変換部504から出力されるインデックス値を一時的に保持する。レジスタ25は、辞書変換部504から出力される繰り返しの値を一時的に保持する。レジスタ26は、辞書変換部504から出力されるラン長の値を一時的に保持する。   Returning to FIG. 26, the register 24 temporarily holds the index value output from the dictionary conversion unit 504. The register 25 temporarily holds a repeated value output from the dictionary conversion unit 504. The register 26 temporarily holds the run length value output from the dictionary conversion unit 504.

(復号部116の各部におけるデータの入出力)
図28は、復号部116の各部におけるデータの入出力を説明する図である。図28の復号部116は、符号読み込み部601、符号フォーマット解析部602、差分処理部603、辞書変換部604、繰り返し処理部605、ランレングス復号処理部606、画像処理部I/F609、及び、符号アドレス生成部611を有する。図28において、図15の復号部116と同一の機能及び構成を有する各部は、同一の符号を付し、ここでは説明を省略する。
(Data input / output in each unit of the decoding unit 116)
FIG. 28 is a diagram for explaining input / output of data in each unit of the decoding unit 116. 28 includes a code reading unit 601, a code format analysis unit 602, a difference processing unit 603, a dictionary conversion unit 604, an iterative processing unit 605, a run length decoding processing unit 606, an image processing unit I / F 609, and A code address generation unit 611 is included. In FIG. 28, each unit having the same function and configuration as the decoding unit 116 in FIG. 15 is assigned the same reference numeral, and description thereof is omitted here.

符号アドレス生成部611は、符号読み込み部601がメインメモリ130から符号データを読み込む際の、アドレスを生成する。符号アドレス生成部611が生成したアドレスは、符号読み込み部601に対して出力される。   The code address generation unit 611 generates an address when the code reading unit 601 reads code data from the main memory 130. The address generated by the code address generation unit 611 is output to the code reading unit 601.

符号読み込み部601は、符号アドレス生成部611からメインメモリ130に対するアドレスが入力さる。符号読み込み部601は、メインメモリアービタ113に対して、入力されたアドレスと、メインメモリ130に対する読み出し及び書き込みの何れかの処理を指定するR/W信号とを出力する。符号読み込み部601は、メインメモリアービタ113を介して、メインメモリ130が有するページ符号格納領域134から、符号データを取得する。符号読み込み部601は、さらに、取得した符号データを、符号フォーマット解析部602に対して出力する。   The code reading unit 601 receives an address for the main memory 130 from the code address generation unit 611. The code reading unit 601 outputs to the main memory arbiter 113 an input address and an R / W signal that designates either reading or writing processing for the main memory 130. The code reading unit 601 acquires code data from the page code storage area 134 of the main memory 130 via the main memory arbiter 113. The code reading unit 601 further outputs the acquired code data to the code format analysis unit 602.

符号フォーマット解析部602は、符号読み込み部601から符号データが入力される。符号フォーマット解析部602は、差分処理部603に対し、ラン長の値、RGBAによるカラー値、インデックスの値、繰り返しの値、及び、差分の値を出力する。   The code format analysis unit 602 receives code data from the code reading unit 601. The code format analysis unit 602 outputs the run length value, the RGBA color value, the index value, the repetition value, and the difference value to the difference processing unit 603.

差分処理部603は、符号フォーマット解析部602から、ラン長の値、カラー値、インデックスの値、繰り返しの値、及び、差分の値が入力される。差分処理部603は、さらに、辞書変換部604から、RGBA色空間による差分の値の辞書データが入力される。このデータは、辞書変換部604が、一のランに対する処理を行い辞書が更新される毎に、入力されるとよい。差分処理部603は、辞書変換部604に対し、ラン長の値、RGBA色空間による差分の値の辞書データ、RGBA色空間による差分の値、及び、繰り返しの値を出力する。   The difference processing unit 603 receives the run length value, color value, index value, repetition value, and difference value from the code format analysis unit 602. The difference processing unit 603 further receives dictionary data of difference values in the RGBA color space from the dictionary conversion unit 604. This data may be input every time the dictionary conversion unit 604 performs processing for one run and the dictionary is updated. The difference processing unit 603 outputs the run length value, the dictionary data of the difference value in the RGBA color space, the difference value in the RGBA color space, and the repetition value to the dictionary conversion unit 604.

辞書変換部604は、差分処理部603から、ラン長の値、差分の値の辞書データ、RGBA色空間による差分の値、及び、繰り返しの値が入力される。辞書変換部604は、繰り返し処理部605に対し、ラン長の値、カラー値、及び、繰り返しの値を出力する。辞書変換部604は、さらに、差分処理部603に対し、更新された差分の値の辞書データを出力する。この辞書データは、RGBA色空間による画素値に対応し、例えば、N個の要素を有する。   The dictionary conversion unit 604 receives the run length value, the difference value dictionary data, the difference value in the RGBA color space, and the repetition value from the difference processing unit 603. The dictionary conversion unit 604 outputs a run length value, a color value, and a repetition value to the repetition processing unit 605. The dictionary conversion unit 604 further outputs the updated difference value dictionary data to the difference processing unit 603. This dictionary data corresponds to pixel values in the RGBA color space and has, for example, N elements.

繰り返し処理部605は、辞書変換部604から、ラン長の値、カラー値、及び、繰り返しの値が入力され、ランレングス復号処理部606に対し、ラン長の値、及び、カラー値を出力する。ランレングス復号処理部606は、繰り返し処理部605から、ラン長の値、及び、カラー値が入力される。ランレングス復号処理部606は、画像処理部I/F609に対し、RGBA色空間からなる画像データを出力する。
画像処理部I/F609は、ランレングス復号処理部606から画像データが入力され、画像処理部117に対し、画像データを出力する。
The iterative processing unit 605 receives the run length value, color value, and repetition value from the dictionary conversion unit 604, and outputs the run length value and color value to the run length decoding processing unit 606. . The run length decoding processing unit 606 receives the run length value and the color value from the repetition processing unit 605. The run length decoding processing unit 606 outputs image data composed of the RGBA color space to the image processing unit I / F 609.
The image processing unit I / F 609 receives the image data from the run length decoding processing unit 606 and outputs the image data to the image processing unit 117.

(復号部116の処理の例)
図29から図31は、復号部116における処理の例を示すフロー図である。図29では、入力された符号データに基づいて、ラン長の値等が取得される。図29の処理は、符号読み込み部601、及び、符号フォーマット解析部602により実行される。
(Example of processing of decoding unit 116)
FIG. 29 to FIG. 31 are flowcharts showing examples of processing in the decoding unit 116. In FIG. 29, the run length value and the like are acquired based on the input code data. The processing in FIG. 29 is executed by the code reading unit 601 and the code format analysis unit 602.

図29のステップS301では、符号フォーマット解析部602が、符号データから符号ヘッダを取得する。ステップS301に続いてステップS302に進み、符号フォーマット解析部602が、ステップS301で取得された符号ヘッダの種別を判断する。符号ヘッダが、インデックスヘッダ、辞書差分ヘッダ、画素ヘッダ、又は、画素差分ヘッダの何れかである場合には、ステップS303に進み、そうではない場合には、ステップS309に進む。   In step S301 in FIG. 29, the code format analysis unit 602 acquires a code header from the code data. Progressing to step S302 following step S301, the code format analysis unit 602 determines the type of the code header acquired in step S301. If the code header is one of an index header, a dictionary difference header, a pixel header, or a pixel difference header, the process proceeds to step S303, and if not, the process proceeds to step S309.

ステップS302に続くステップS303では、符号フォーマット解析部602が、符号データのランレングスデータを読み込む。ステップS303に続いてステップS304に進み、2つ前のランのラン長を、1つ前のランのラン長に置き換える。ステップS304に続いてステップS305に進み、1つ前のランのラン長を、現在のランのラン長に置き換える。   In step S303 following step S302, the code format analysis unit 602 reads the run length data of the code data. Proceeding to step S304 following step S303, the run length of the previous run is replaced with the run length of the previous run. Proceeding to step S305 following step S304, the run length of the previous run is replaced with the run length of the current run.

ステップS305に続いてステップS306に進み、2つ前のランのRGBADATAの値を、1つ前のランのRGBADATAの値に置き換える。ステップS306に続いてステップS307に進み、1つ前のランのRGBADATAの値を、現在のランのRGBADATAの値に置き換える。   Proceeding to step S306 following step S305, the RGBADATA value of the previous run is replaced with the RGBADATA value of the previous run. Progressing to step S307 following step S306, the RGBADATA value of the previous run is replaced with the RGBADATA value of the current run.

ステップS307に続いてステップS308に進み、ステップS303で読み込まれたランレングスデータから、ラン長の値、及び、RGBADATAの値を取得する。ステップS308の処理の後、図30の処理に進む。   Progressing to step S308 following step S307, the run length value and RGBADATA value are acquired from the run length data read in step S303. After the process of step S308, the process proceeds to the process of FIG.

一方、ステップS302に続くステップS309では、ステップS301で読み込まれた符号ヘッダに基づいて、符号が繰り返し符号であるか否かを判断する。繰り返し符号の場合にはステップS310に進み、そうではない場合には、処理を終了する。なお、処理を終了する場合には、符号は終端符号である。   On the other hand, in step S309 following step S302, it is determined whether the code is a repetitive code based on the code header read in step S301. If it is a repetitive code, the process proceeds to step S310. If not, the process ends. When the process is terminated, the code is a terminal code.

ステップS309に続くステップS310では、符号フォーマット解析部602が、符号データのランレングスデータを読み込む。ステップS310に続いてステップS311に進み、ランレングスデータから繰り返しの値が取得される。ステップS311の処理の後、図32の処理に進む。   In step S310 following step S309, the code format analysis unit 602 reads the run length data of the code data. Progressing to step S311 following step S310, a repeated value is acquired from the run-length data. After the process of step S311, the process proceeds to the process of FIG.

図30は、符号フォーマット解析部602、差分処理部603、及び、辞書変換部604による処理を説明するフロー図である。図30の処理は、図29のステップS308の処理に続いて行われる。   FIG. 30 is a flowchart illustrating processing performed by the code format analysis unit 602, the difference processing unit 603, and the dictionary conversion unit 604. The process in FIG. 30 is performed following the process in step S308 in FIG.

図30のステップS312では、符号ヘッダが、インデックスヘッダであるか否かの判断がなされる。インデックスヘッダである場合には、ステップS313に進み、そうではない場合には、ステップS315に進む。   In step S312 of FIG. 30, it is determined whether or not the code header is an index header. If it is an index header, the process proceeds to step S313; otherwise, the process proceeds to step S315.

ステップS312に続くステップS313では、符号フォーマット解析部602が、符号データのランレングスデータから、インデックスの値を取得する。ステップS313に続いてステップS314に進み、ステップS313で取得されたインデックスの値に対応するRGB値を辞書から取得し、その値を、変数RGBADATAの値とする。ステップS314の処理に続いて図31の処理に進む。   In step S313 following step S312, the code format analysis unit 602 acquires an index value from the run length data of the code data. Progressing to step S314 following step S313, the RGB value corresponding to the index value acquired in step S313 is acquired from the dictionary, and the value is set as the value of the variable RGBADATA. Subsequent to the process of step S314, the process proceeds to the process of FIG.

一方、ステップS312に続くステップS315では、符号ヘッダが、辞書差分ヘッダであるか否かの判断がなされる。辞書差分ヘッダである場合には、ステップS316に進み、そうではない場合には、ステップS320に進む。   On the other hand, in step S315 following step S312, it is determined whether or not the code header is a dictionary difference header. If it is a dictionary difference header, the process proceeds to step S316; otherwise, the process proceeds to step S320.

ステップS315に続くステップS316では、符号フォーマット解析部602が、符号データのランレングスデータから、インデックスの値を読み込んで取得する。ステップS316に続いてステップS317に進み、ステップS316で取得されたインデックスの値に対応するRGB値を辞書から取得し、その値を、変数DRGBADATAの値とする。   In step S316 following step S315, the code format analysis unit 602 reads and acquires the index value from the run-length data of the code data. Progressing to step S317 following step S316, the RGB value corresponding to the index value acquired in step S316 is acquired from the dictionary, and the value is set as the value of the variable DRGBADATA.

ステップS317に続いてステップS318に進み、符号フォーマット解析部602が、ランレングスデータの中の差分の値を取得する。ステップS318に続いてステップS319に進み、変数RGBADATAの値を、DRGBADATAの値にステップS318で取得された差分の値を加算した値で更新する。ステップS319の処理の後、図31の処理に進む。   Progressing to step S318 following step S317, the code format analysis unit 602 acquires a difference value in the run-length data. Progressing to step S319 following step S318, the value of the variable RGBADATA is updated with a value obtained by adding the value of the difference acquired in step S318 to the value of DRGBADATA. After the process of step S319, the process proceeds to the process of FIG.

また、ステップS315に続くステップS320では、符号ヘッダが画素ヘッダであるか否かの判断がなされる。画素ヘッダである場合には、ステップS321に進み、そうではない場合には、ステップS322に進む。   In step S320 following step S315, it is determined whether the code header is a pixel header. If it is a pixel header, the process proceeds to step S321; otherwise, the process proceeds to step S322.

ステップS320に続くステップS321では、符号フォーマット解析部602が、ランレングスデータの中のカラー値を取得し、その値を、変数RGBADATAに代入する。一方、ステップS320に続くステップS322では、符号フォーマット解析部602が、ランレングスデータから差分の値を取得する。ステップS322に続いてステップS323に進み、変数RGBADATAの値を、1つ前のランにおけるRGBADATAの値に、ステップS322で取得された差分の値を加算した値で更新する。   In step S321 following step S320, the code format analysis unit 602 acquires a color value in the run-length data and substitutes the value into a variable RGBADATA. On the other hand, in step S322 following step S320, the code format analysis unit 602 acquires a difference value from the run-length data. Progressing to step S323 following step S322, the value of the variable RGBADATA is updated with a value obtained by adding the value of the difference acquired in step S322 to the value of RGBADATA in the previous run.

ステップS321又はステップS323に続くステップS324では、新たに取得されたカラー値に基づいて、辞書を更新する。ステップS324の処理の後、図31の処理に進む。   In step S324 following step S321 or step S323, the dictionary is updated based on the newly acquired color value. After the process of step S324, the process proceeds to the process of FIG.

図31は、ランレングス復号処理部606における復号処理の例を説明するフロー図である。図31のステップS325では、変数LOOPの値をラン長の値とする。ステップS325に続いてステップS326に進み、ラインメモリに格納されている画素データのうち、ライン0からRGBADATAの値を読み込み、画像処理部I/F609に対して出力する。   FIG. 31 is a flowchart illustrating an example of decoding processing in the run-length decoding processing unit 606. In step S325 in FIG. 31, the value of the variable LOOP is set as the run length value. Progressing to step S326 following step S325, among the pixel data stored in the line memory, the value of RGBADATA is read from line 0 and output to the image processing unit I / F 609.

ステップS326に続いてステップS327に進み、変数LOOPの値から1を減じる。ステップS327に続いてステップS328に進み、変数LOOPの値が0か否かの判断を行う。変数LOOPの値が0である場合には、図29のステップS301に戻って新たなランレングスデータを取得して処理を繰り返す。一方、変数LOOPの値が0ではない場合には、ステップS326に戻ってRGBA値を出力する処理を繰り返す。   Progressing to step S327 following step S326, 1 is subtracted from the value of the variable LOOP. Progressing to step S328 following step S327, it is determined whether or not the value of the variable LOOP is zero. If the value of the variable LOOP is 0, the process returns to step S301 in FIG. 29 to acquire new run length data and repeat the process. On the other hand, when the value of the variable LOOP is not 0, the process returns to step S326 and the process of outputting the RGBA value is repeated.

図32は、繰り返し処理部605における処理の例を説明するフロー図である。図32のステップS51は、図29のステップS311の処理に続いて行われる。ステップS51では、変数LOOPの値に対し、2つ前のランのラン長の値が設定される。   FIG. 32 is a flowchart illustrating an example of processing in the repetition processing unit 605. Step S51 in FIG. 32 is performed following the processing in step S311 in FIG. In step S51, the value of the run length of the previous run is set with respect to the value of the variable LOOP.

ステップS51に続いてステップS52に進み、2つ前のランにおけるRGBADATAの値を取得する。ステップS52に続いてステップS53に進み、変数LOOPの値から1を減じる。ステップS53に続いてステップS54に進み、変数LOOPの値が0か否かを判断する。0である場合には、ステップS55に進み、0ではない場合には、ステップS52に戻って処理を繰り返す。   Progressing to step S52 following step S51, the value of RGBADATA in the previous run is acquired. Progressing to step S53 following step S52, 1 is subtracted from the value of the variable LOOP. Progressing to step S54 following step S53, it is determined whether or not the value of the variable LOOP is zero. When it is 0, it progresses to step S55, and when it is not 0, it returns to step S52 and repeats a process.

ステップS54に続くステップS55では、ランレングスデータから取得された繰り返しの値を、繰り返しの値から1減じた値で更新する。ステップS55に続いてステップS56に進み、繰り返しの値が0か否かの判断がなされる。繰り返しの値が0の場合には、繰り返し処理部605による処理を終了し、図29のステップS301に戻り、新たなランレングスデータを取得して処理を繰り返す。一方、繰り返しの値が0ではない場合には、ステップS57に進む。   In step S55 following step S54, the repetition value acquired from the run-length data is updated with a value obtained by subtracting 1 from the repetition value. Progressing to step S56 following step S55, it is determined whether or not the repeated value is zero. If the repeat value is 0, the process by the repeat processing unit 605 is terminated, and the process returns to step S301 in FIG. 29 to acquire new run length data and repeat the process. On the other hand, if the repeated value is not 0, the process proceeds to step S57.

ステップS56に続くステップS57では、変数LOOPの値を、1つ前のランのラン長の値とする。ステップS57に続いてステップS58に進み、ラインメモリにおけるライン0に、1つ前のランレングスデータのRGBA値を書き込む。   In step S57 following step S56, the value of the variable LOOP is set to the run length value of the previous run. Progressing to step S58 following step S57, the RGBA value of the previous run-length data is written to line 0 in the line memory.

ステップS58に続いてステップS59に進み、変数LOOPの値を、変数LOOPの値から1減じた値で更新する。ステップS59に続いてステップS60に進み、変数LOOPの値が0であるか否かの判断がなされる。0である場合には、ステップS61に進み、0ではない場合には、ステップS58に戻って処理を繰り返す。   Progressing to step S59 following step S58, the value of the variable LOOP is updated with a value obtained by subtracting 1 from the value of the variable LOOP. Progressing to step S60 following step S59, it is determined whether or not the value of the variable LOOP is zero. When it is 0, it progresses to step S61, and when it is not 0, it returns to step S58 and repeats a process.

ステップS60に続いてステップS61に進み、繰り返しの値を、繰り返しの値から1減じた値で更新する。ステップS61に続いてステップS62に進み、繰り返しの値が0であるか否かの判断がなされる。0である場合には、繰り返し処理部605の処理を終了し、図29のステップS301に戻る。0ではない場合には、ステップS51に戻って繰り返しの復号処理を続ける。   Progressing to step S61 following step S60, the repeated value is updated with a value obtained by subtracting 1 from the repeated value. Progressing to step S62 following step S61, it is determined whether or not the repeated value is zero. If it is 0, the process of the iterative processing unit 605 is terminated, and the process returns to step S301 in FIG. If it is not 0, the process returns to step S51 to continue the repeated decoding process.

(差分処理部603のハードウェア構成の例)
図33は、復号部116が有する差分処理部603のハードウェア構成の例を示す図である。差分処理部603は、レジスタ30,加算器31、加算器32aないし32f、選択部33、及び、レジスタ34ないし36を有する。
(Example of hardware configuration of difference processing unit 603)
FIG. 33 is a diagram illustrating an example of a hardware configuration of the difference processing unit 603 included in the decoding unit 116. The difference processing unit 603 includes a register 30, an adder 31, adders 32a to 32f, a selection unit 33, and registers 34 to 36.

レジスタ30は、1つ前のランにおけるRGBA値を格納する。加算器31は、1つ前のランにおけるRGBA値に対し差分を加算することにより、現在のランにおけるRGBA値を求める。加算器32aないし32fは、入力される差分データと、辞書に格納されているRGBA値と入力される差分値を加算することにより、現在のランのRGBA値を求める。複数の加算器を有することにより、減算処理を並列に行うことができる。減算された結果は、選択部33に対して出力される。
選択部33は、加算器32aないし32fからの出力を比較し、差分インデックス値に対応する加算結果の値を選択する。
The register 30 stores the RGBA value in the previous run. The adder 31 calculates the RGBA value in the current run by adding the difference to the RGBA value in the previous run. The adders 32a to 32f obtain the RGBA value of the current run by adding the input difference data, the RGBA value stored in the dictionary, and the input difference value. By having a plurality of adders, subtraction processing can be performed in parallel. The subtracted result is output to the selector 33.
The selection unit 33 compares the outputs from the adders 32a to 32f and selects the value of the addition result corresponding to the difference index value.

レジスタ34ないし36は、符号フォーマット解析部602から出力される値のうち、所定の変数の値を一時的に保持する。レジスタ34は、RGBA値に一致するインデックス値を一時的に保持する。レジスタ35は、繰り返しの値を一時的に保持する。レジスタ36は、ラン長の値を一時的に保持する。   The registers 34 to 36 temporarily hold a value of a predetermined variable among values output from the code format analysis unit 602. The register 34 temporarily holds an index value that matches the RGBA value. The register 35 temporarily holds a repeated value. The register 36 temporarily holds the run length value.

(復号部116における辞書変換部604のハードウェア構成の例)
図34は、復号部116における辞書変換部604のハードウェア構成の例を説明する図である。図34の辞書変換部604は、レジスタ40aないし40f、マルチプレクサ41及び43、制御部42、レジスタ45、及び、レジスタ46を有する。
(Example of hardware configuration of dictionary conversion unit 604 in decoding unit 116)
FIG. 34 is a diagram for explaining an example of the hardware configuration of the dictionary conversion unit 604 in the decoding unit 116. The dictionary conversion unit 604 in FIG. 34 includes registers 40a to 40f, multiplexers 41 and 43, a control unit 42, a register 45, and a register 46.

レジスタ40aないし40fは、差分処理部603から入力される1以上前のランのRGBA値のデータを受け取り辞書データとして記憶する。マルチプレクサ41は、差分処理部603から入力される現在のランにおけるインデックス値により、レジスタ40aないし40fに格納されている辞書データを選択して出力する。制御部42は、辞書データが選択される処理の制御を行う。   The registers 40a to 40f receive the RGBA value data of one or more previous runs input from the difference processing unit 603 and store it as dictionary data. The multiplexer 41 selects and outputs the dictionary data stored in the registers 40a to 40f according to the index value in the current run input from the difference processing unit 603. The control unit 42 controls processing for selecting dictionary data.

マルチプレクサ43は、マルチプレクサ41から出力される辞書データによるRGBA値と、符号フォーマット解析部602により取得された差分値とを加算して現在のランのRGBA値を出力する。マルチプレクサ43は、また、差分処理部603から出力される差分処理により得られたRGBA値と、符号フォーマット解析部602により取得された差分値とを加算して現在のランのRGBA値を出力する。何れの処理を行うかは、符号ヘッダにより決定される。   The multiplexer 43 adds the RGBA value based on the dictionary data output from the multiplexer 41 and the difference value acquired by the code format analysis unit 602, and outputs the RGBA value of the current run. The multiplexer 43 also adds the RGBA value obtained by the difference processing output from the difference processing unit 603 and the difference value acquired by the code format analysis unit 602 and outputs the RGBA value of the current run. Which process is performed is determined by the code header.

レジスタ45は、差分処理部603から入力される繰り返しの値を一時的に保持する。レジスタ46は、差分処理部603から入力されるラン長の値を一時的に保持する。   The register 45 temporarily holds a repeated value input from the difference processing unit 603. The register 46 temporarily holds the run length value input from the difference processing unit 603.

(コンピュータによる実現)
図35は、本発明の実施の形態に係る画像処理装置を実現するコンピュータの構成を説明する図である。図35のコンピュータは、主処理部400、入力装置410、表示装置420、スキャナ430、プロッタ440、NIC460、ドライブ装置480、ハードディスク装置490、入力I/F419、表示I/F429、スキャナI/F439、プロッタI/F449、ドライブI/F489、及び、HDDI/F499を有する。
(Realization by computer)
FIG. 35 is a diagram illustrating the configuration of a computer that implements the image processing apparatus according to the embodiment of the present invention. 35 includes a main processing unit 400, an input device 410, a display device 420, a scanner 430, a plotter 440, a NIC 460, a drive device 480, a hard disk device 490, an input I / F 419, a display I / F 429, a scanner I / F 439, A plotter I / F 449, a drive I / F 489, and an HDD I / F 499 are included.

主処理部400は、コンピュータプログラムを実行して各機能を実現する。主処理部400は、例えば、CPU401、ROM408、及び、RAM409を有する。CPU401は、コンピュータプログラムを実行することにより、コンピュータが有する各デバイス等の制御を行う。ROM408は、例えば、コンピュータプログラムやパラメータ等が格納され、CPU401にそれらが供せられる。RAM409は、例えば、CPU401がコンピュータプログラムを実行する際のワークメモリとして供せられる。   The main processing unit 400 implements each function by executing a computer program. The main processing unit 400 includes, for example, a CPU 401, a ROM 408, and a RAM 409. The CPU 401 controls each device included in the computer by executing a computer program. The ROM 408 stores, for example, computer programs and parameters, and these are provided to the CPU 401. The RAM 409 is provided as a work memory when the CPU 401 executes a computer program, for example.

入力装置410は、例えば、キーボードやマウス等の入力デバイスとして構成され、コンピュータに対する指示等が入力される。表示装置420は、コンピュータの状態等が表示される。スキャナ430は、画像を光学的に読み取って、画像データを生成する。プロッタ440は、媒体上に画像を形成して出力する。   The input device 410 is configured as an input device such as a keyboard or a mouse, for example, and inputs instructions to the computer. The display device 420 displays the status of the computer. The scanner 430 optically reads an image and generates image data. The plotter 440 forms an image on a medium and outputs it.

NIC460は、コンピュータと外部とをネットワークを介して接続する際のインタフェースの機能を実現し、その制御を行う。ドライブ装置480は、記録媒体が挿入され、その記録媒体に記録された情報を読み出し、またその記録媒体に情報を記録する。HDD490は、大容量のデータを格納する記憶手段である。   The NIC 460 realizes an interface function when connecting a computer and the outside via a network and controls the interface. The drive device 480 inserts a recording medium, reads information recorded on the recording medium, and records information on the recording medium. The HDD 490 is a storage unit that stores a large amount of data.

入力I/F419、表示I/F429、スキャナI/F439、プロッタI/F449、ドライブI/F489、及び、HDD−I/F499は、それぞれ、入力装置410、表示装置420、スキャナ430、プロッタ440、ドライブ装置480、及び、HDD490がバスを介して主処理部400と接続される際のインタフェースである。   The input I / F 419, display I / F 429, scanner I / F 439, plotter I / F 449, drive I / F 489, and HDD-I / F 499 are an input device 410, display device 420, scanner 430, plotter 440, respectively. This is an interface when the drive device 480 and the HDD 490 are connected to the main processing unit 400 via a bus.

(本実施の形態における効果)
本実施形態における画像圧縮装置は、画像のラスタ順における同一の画素値が連続する数であるラン長に基づく画像データの圧縮を行う際に、写真画像のように、ラン長が小さく、画素値そのものによる情報量が大きい場合に、より効率よく圧縮することができる。
(Effect in this Embodiment)
When compressing image data based on a run length, which is the number of consecutive identical pixel values in the raster order of an image, the image compression apparatus in the present embodiment has a small run length and a pixel value as in a photographic image. When the amount of information by itself is large, compression can be performed more efficiently.

より詳細には、例えば、グラフィックス画像と写真画像との差異について、以下、考察する。グラフィック画像は、一般に、予測符号化を行う際に、注目画素とその注目画素に隣接する画素との相関が高い。そのため、注目画素との差分を符号化することにより、高効率に圧縮することができる。一方、写真画像は、注目画素と隣接する画素との間の相関が低いため、差分による予測符号化の効率が低下する。   More specifically, for example, the difference between a graphics image and a photographic image will be considered below. In general, a graphic image has a high correlation between a pixel of interest and a pixel adjacent to the pixel of interest when predictive coding is performed. Therefore, it is possible to perform compression with high efficiency by encoding the difference from the pixel of interest. On the other hand, since the correlation between the target pixel and the adjacent pixel is low in the photographic image, the efficiency of predictive encoding based on the difference is reduced.

本実施の形態では、また、画素値に対応するインデックスを辞書に保持させ、辞書中の画素値との差分を符号化する。また、差分値が所定の値以上の場合には、その画素値に対応するインデックスを生成し、新たに辞書に登録する。これにより、辞書に保持されるインデックスを有する画素値は、複数の画素値が偏ることなく、好適な辞書となる。   In the present embodiment, an index corresponding to the pixel value is held in the dictionary, and a difference from the pixel value in the dictionary is encoded. If the difference value is greater than or equal to a predetermined value, an index corresponding to the pixel value is generated and newly registered in the dictionary. Thereby, the pixel value having the index held in the dictionary becomes a suitable dictionary without a plurality of pixel values being biased.

本実施の形態では、また、辞書に登録されている画素値のうち、処理する画素の画素値との差分が最も小さな画素値を選択し、その差分を符号化することにより、効率的に圧縮することができる。   In the present embodiment, among pixel values registered in the dictionary, the pixel value having the smallest difference from the pixel value of the pixel to be processed is selected, and the difference is encoded, thereby efficiently compressing the pixel value. can do.

本実施の形態は、また、注目画素に対して1ライン上の画素の値を使用しない。したがって、ラインメモリが不要であり、本実施の形態による画像処理装置をASICに内蔵することが容易である。   In this embodiment, the value of the pixel on one line is not used for the target pixel. Therefore, no line memory is required, and it is easy to incorporate the image processing apparatus according to the present embodiment in the ASIC.

(実施の形態のその他の例)
本実施の形態においては、RGBA色空間による画像データについて説明したが、RGB、CMY、CMYK、又は、Lab等の多値データでも、同様に実施することが可能である。また,CMY色空間におけるCコンポーネントのみの場合、又は、RGB色空間におけるRのみの多値の場合等、1つのコンポーネントの多値でも同様に実施することができる。
(Other examples of embodiment)
In the present embodiment, image data in the RGBA color space has been described. However, multi-value data such as RGB, CMY, CMYK, or Lab can be similarly implemented. Further, the same can be applied to multi-values of one component, such as only C components in the CMY color space or multi-values of only R in the RGB color space.

また、本実施の形態においては、FIFO(First_In_First_Out)方式により実現したが、辞書を使用する方式であれば、何れの方式でもよい。   Further, in the present embodiment, it is realized by the FIFO (First_In_First_Out) method, but any method may be used as long as it uses a dictionary.

以上、発明を実施するための最良の形態について説明を行ったが、本発明は、この最良の形態で述べた実施の形態に限定されるものではない。本発明の主旨をそこなわない範囲で変更することが可能である。   Although the best mode for carrying out the invention has been described above, the present invention is not limited to the embodiment described in the best mode. Modifications can be made without departing from the spirit of the present invention.

本発明の実施の形態に係る画像処理装置を実装する画像形成装置の機構部の構成例を示す図である。1 is a diagram illustrating a configuration example of a mechanism unit of an image forming apparatus in which an image processing apparatus according to an embodiment of the present invention is mounted. カラープリンタ1における電装・制御部の装置構成を示すブロック図である。2 is a block diagram illustrating a device configuration of an electrical / control unit in the color printer 1. FIG. カラープリンタ1における処理の概略を示す図である。FIG. 3 is a diagram illustrating an outline of processing in the color printer. メインメモリ130における記憶領域を説明する図である。FIG. 3 is a diagram illustrating a storage area in the main memory 130. メインメモリ130における各記憶領域と、カラープリンタ1が有する電装・制御ブロックとの関係を説明する図である。FIG. 3 is a diagram for explaining the relationship between each storage area in the main memory 130 and electrical / control blocks of the color printer 1. 符号化部115の機能構成を説明するブロック図である。3 is a block diagram illustrating a functional configuration of an encoding unit 115. FIG. スキャンライン毎にバンドデータが読み込まれることを説明する図である。It is a figure explaining reading band data for every scan line. ランレングス生成処理の詳細を説明する図である。It is a figure explaining the detail of a run length production | generation process. 繰り返し処理を説明する図である。It is a figure explaining an iterative process. 辞書変換部504による処理の例を示す図である。It is a figure which shows the example of the process by the dictionary conversion part. 入力された画素値に対応する画素値がRGBA辞書に格納されていない場合の辞書変換部504による処理の例を示す図である。It is a figure which shows the example of the process by the dictionary conversion part 504 when the pixel value corresponding to the input pixel value is not stored in the RGBA dictionary. 符号データのフォーマットを説明する図である。It is a figure explaining the format of code data. 符号データのフォーマットを説明する図である。It is a figure explaining the format of code data. 画素値jがRGBA辞書に登録されることを説明する図である。It is a figure explaining pixel value j being registered into a RGBA dictionary. 復号部116の機能構成を説明するブロック図である。It is a block diagram explaining the function structure of the decoding part. インデックスによる復号処理を説明する図である。It is a figure explaining the decoding process by an index. インデックスに対応するRGBA値を求める処理を説明する図である。It is a figure explaining the process which calculates | requires the RGBA value corresponding to an index. 繰り返し処理部605における繰り返しの復号処理を説明する図である。It is a figure explaining the decoding process of the repetition in the repetition process part 605. FIG. ランレングス復号処理部606による復号処理を説明する図である。It is a figure explaining the decoding process by the run length decoding process part. 符号化部115が有する各部におけるデータの入出力を説明する図である。It is a figure explaining the input / output of the data in each part which the encoding part 115 has. ランレングス生成処理部502と繰り返し処理部503とにおける処理の例を説明する図である。It is a figure explaining the example of the process in the run length production | generation process part 502 and the repetition process part 503. FIG. 辞書変換部504、差分処理部505、及び、符号フォーマット生成部506における処理を説明する図である。It is a figure explaining the process in the dictionary conversion part 504, the difference process part 505, and the code | symbol format generation part 506. ラン長の値等が更新する処理を説明する図である。It is a figure explaining the process which the value of a run length etc. updates. 辞書変換部504のハードウェア構成の例を説明する図である。It is a figure explaining the example of the hardware constitutions of the dictionary conversion part. インデックス生成部13におけるインデックスを生成する処理を説明する図である。It is a figure explaining the process which produces | generates the index in the index production | generation part. 差分生成処理部505のハードウェア構成の例を説明する図である。It is a figure explaining the example of the hardware constitutions of the difference production | generation process part 505. 差分からインデックスを取得する処理を説明するフロー図である。It is a flowchart explaining the process which acquires an index from a difference. 復号部116の各部におけるデータの入出力を説明する図である。It is a figure explaining the input / output of the data in each part of the decoding part. 復号部116におけるラン長の値等を取得する処理の例を示すフロー図である。It is a flowchart which shows the example of the process which acquires the value of the run length, etc. in the decoding part. 符号フォーマット解析部602、差分処理部603、及び、辞書変換部604による処理を説明するフロー図である。FIG. 10 is a flowchart illustrating processing performed by a code format analysis unit 602, a difference processing unit 603, and a dictionary conversion unit 604. ランレングス復号処理部606における復号処理の例を説明するフロー図である。It is a flowchart explaining the example of the decoding process in the run length decoding process part. 繰り返し処理部605における処理の例を説明するフロー図である。FIG. 10 is a flowchart for explaining an example of processing in an iterative processing unit 605. 復号部116が有する差分処理部603のハードウェア構成の例を示す図である。It is a figure which shows the example of the hardware constitutions of the difference process part 603 which the decoding part 116 has. 復号部116における辞書変換部604のハードウェア構成の例を説明する図である。It is a figure explaining the example of the hardware constitutions of the dictionary conversion part 604 in the decoding part 116. FIG. コンピュータの構成を説明する図である。And FIG. 14 is a diagram illustrating a configuration of a computer.

符号の説明Explanation of symbols

1 カラープリンタ
10a レジスタ
11a 比較器
13 インデックス生成部
14 演算器
15 レジスタ
16 レジスタ
17 制御部
20 レジスタ
21 減算器
22a、22b、22c 減算器
23 最小値選択部
24 レジスタ
25 レジスタ
26 レジスタ
30 レジスタ
31 加算器
32a 加算器
33 選択部
34 レジスタ
35 レジスタ
36 レジスタ
40a レジスタ
41 マルチプレクサ
42 制御部
43 マルチプレクサ
45 レジスタ
46 レジスタ
100 電装・制御部
110 プリンタASIC
113 メインメモリアービタ
114 メインメモリコントローラ
115 符号化部
116 復号部
117 画像処理部
118 エンジンコントローラ
119 通信処理部
120 プリンタエンジン
130 メインメモリ
131 プログラム領域
132 PDL格納メモリ領域
133 RGBAバンドメモリ格納領域
134 ページ符号格納領域
135 その他領域
400 主処理部
410 入力装置
419 入力I/F
420 表示装置
429 表示I/F
430 スキャナ
439 スキャナI/F
440 プロッタ
449 プロッタI/F
480 ドライブ装置
489 ドライブI/F
490 ハードディスク装置
501 画像読み込み部
502 ランレングス生成処理部
503 繰り返し処理部
504 辞書変換部
505 差分処理部
506 符号フォーマット生成部
507 符号書き込み部
508 差分上限記憶部
509 メモリアービタI/F
511 画像アドレス生成部
517 符号アドレス生成部
601 符号読み込み部
602 符号フォーマット解析部
603 差分処理部
604 辞書変換部
605 繰り返し処理部
606 ランレングス復号処理部
607 画像書き込み部
609 画像処理部I/F
611 符号アドレス生成部
DESCRIPTION OF SYMBOLS 1 Color printer 10a Register 11a Comparator 13 Index generation part 14 Calculator 15 Register 16 Register 17 Control part 20 Register 21 Subtractor 22a, 22b, 22c Subtractor 23 Minimum value selection part 24 Register 25 Register 26 Register 30 Register 31 Adder 32a Adder 33 Selector 34 Register 35 Register 36 Register 40a Register 41 Multiplexer 42 Control Unit 43 Multiplexer 45 Register 46 Register 100 Electrical / Control Unit 110 Printer ASIC
113 Main memory arbiter 114 Main memory controller 115 Encoding unit 116 Decoding unit 117 Image processing unit 118 Engine controller 119 Communication processing unit 120 Printer engine 130 Main memory 131 Program area 132 PDL storage memory area 133 RGBA band memory storage area 134 Page code storage Area 135 Other area 400 Main processing unit 410 Input device 419 Input I / F
420 Display 429 Display I / F
430 Scanner 439 Scanner I / F
440 Plotter 449 Plotter I / F
480 Drive device 489 Drive I / F
490 Hard disk device 501 Image reading unit 502 Run length generation processing unit 503 Repeat processing unit 504 Dictionary conversion unit 505 Difference processing unit 506 Code format generation unit 507 Code writing unit 508 Difference upper limit storage unit 509 Memory arbiter I / F
511 Image address generation unit 517 Code address generation unit 601 Code reading unit 602 Code format analysis unit 603 Difference processing unit 604 Dictionary conversion unit 605 Repeat processing unit 606 Run length decoding processing unit 607 Image writing unit 609 Image processing unit I / F
611 Code address generator

Claims (15)

画像を構成する画素毎に、該画素の画素値と、異なる画素値毎に対応づけられる画素インデックスを有する画素値と、の差を取得する差取得手段と、
前記画像を構成する画素毎に、前記差に基づいて、一の画素値に対応する画素インデックスを選択する画素インデックス手段と、
前記画像のラスタ順において前記画素インデックスが同一である画素が連続する数であるラン長を取得するラン長取得手段と、
選択された前記画素インデックス、前記差、及び、前記ラン長を符号化する符号化手段と、
を有する画像圧縮装置。
Difference obtaining means for obtaining a difference between a pixel value of the pixel and a pixel value having a pixel index associated with each different pixel value for each pixel constituting the image;
Pixel index means for selecting a pixel index corresponding to one pixel value based on the difference for each pixel constituting the image;
A run length acquisition means for acquiring a run length that is a number of consecutive pixels having the same pixel index in the raster order of the image;
Encoding means for encoding the selected pixel index, the difference, and the run length;
An image compression apparatus.
前記画素インデックス手段は、前記差取得手段により差が取得された画素値のうち、前記差が最小となる画素値の画素インデックスを選択する請求項1記載の画像圧縮装置。   The image compression apparatus according to claim 1, wherein the pixel index unit selects a pixel index of a pixel value that minimizes the difference among pixel values for which the difference is acquired by the difference acquisition unit. 前記画素インデックスと画素値とが対応づけられた辞書を保持する辞書記憶手段を有し、
前記画素の画素値と対応づけられる画素インデックスが前記辞書記憶手段に保持されない場合に、
前記画素の画素値に対応する画素インデックスを生成する画素インデックス生成手段と、
生成された前記画素インデックスと前記画素の画素値とを対応づけて前記辞書記憶手段に保持させることにより前記辞書を更新する辞書更新手段と、
を有する請求項1又は2記載の画像圧縮装置。
Dictionary storage means for holding a dictionary in which the pixel index and the pixel value are associated with each other;
When the pixel index associated with the pixel value of the pixel is not held in the dictionary storage means,
Pixel index generation means for generating a pixel index corresponding to the pixel value of the pixel;
A dictionary update unit that updates the dictionary by causing the dictionary storage unit to store the generated pixel index and the pixel value of the pixel in association with each other;
The image compression apparatus according to claim 1 or 2, further comprising:
前記画素インデックスと画素値とが対応づけられた辞書を保持する辞書記憶手段を有し、
前記画素の画素値と対応づけられる画素インデックスが前記辞書記憶手段に保持されない場合、かつ、前記画素の画素値と前記差が最小となる画素値との差が所定の上限値以上の場合に、
前記符号化手段は、前記画素の画素値を符号化する請求項1又は2記載の画像圧縮装置。
Dictionary storage means for holding a dictionary in which the pixel index and the pixel value are associated with each other;
When the pixel index associated with the pixel value of the pixel is not held in the dictionary storage unit, and when the difference between the pixel value of the pixel and the pixel value at which the difference is minimum is equal to or greater than a predetermined upper limit value,
The image compression apparatus according to claim 1, wherein the encoding unit encodes a pixel value of the pixel.
前記所定の上限値を保持する上限値保持手段を有する請求項4記載の画像圧縮装置。   The image compression apparatus according to claim 4, further comprising upper limit value holding means for holding the predetermined upper limit value. 第一の画素インデックスを有する所定のラン長を有する第一のランと、第二の画素インデックスを有する前記所定のラン長を有する第二のランと、が交互に連続する場合に、前記第一のランの数と前記第二のランの数とに基づく繰り返しの値を取得する繰り返し値取得手段を有し、
前記符号化手段は、さらに、前記繰り返しの値を符号化する請求項1ないし5何れか一項に記載の画像圧縮装置。
The first run having a predetermined run length having a first pixel index and the second run having the predetermined run length having a second pixel index are alternately continuous. Repetitive value acquisition means for acquiring a repetitive value based on the number of runs and the second number of runs,
6. The image compression apparatus according to claim 1, wherein the encoding unit further encodes the repeated value.
画像データがランレングス符号化方法により圧縮された符号データを解析し、所定の画素値に対応する画素インデックス、前記所定の画素値との差、及び、前記画像データのラスタ順において前記画素値が連続する数であるラン長を取得する符号データ解析手段と、
前記画素インデックスに対応する画素値を、前記画素インデックスと画素値とが対応づけられた辞書から取得する辞書処理手段と、
前記画素値と前記差との和による復号画素の画素値を取得する差分処理手段と、
前記ラン長と前記復号画素の画素値とによりランレングス復号を行うランレングス復号手段と、
を有する画像復号装置。
Analyzing code data obtained by compressing image data by a run-length encoding method, the pixel index corresponding to a predetermined pixel value, a difference from the predetermined pixel value, and the pixel value in the raster order of the image data Code data analysis means for obtaining a run length that is a continuous number;
Dictionary processing means for obtaining a pixel value corresponding to the pixel index from a dictionary in which the pixel index and the pixel value are associated;
Difference processing means for obtaining a pixel value of a decoded pixel by a sum of the pixel value and the difference;
Run-length decoding means for performing run-length decoding based on the run length and the pixel value of the decoded pixel;
An image decoding apparatus.
前記辞書を保持する辞書保持手段を有する請求項7記載の画像復号装置。   The image decoding apparatus according to claim 7, further comprising a dictionary holding unit that holds the dictionary. 前記符号データが、画素値と該画素値に対応するラン長とを含む場合に、
前記ランレングス復号手段は、前記ラン長と前記画素値とによりランレングス復号を行う請求項7又は8記載の画像復号装置。
When the code data includes a pixel value and a run length corresponding to the pixel value,
The image decoding device according to claim 7 or 8, wherein the run-length decoding means performs run-length decoding based on the run length and the pixel value.
前記符号データが、第一の画素インデックスを有する所定のラン長を有する第一のランと、第二の画素インデックスを有する前記所定のラン長を有する第二のランと、が交互に連続する際の、前記第一のランの数と前記第二のランの数とに基づく繰り返しの値を含む場合に、
前記符号データ解析手段は、前記繰り返しの値を取得し、
前記ランレングス復号手段は、前記繰り返しの値に基づいてランレングス復号を行う請求項7ないし9何れか一項に記載の画像復号装置。
When the code data includes a first run having a predetermined run length having a first pixel index and a second run having the predetermined run length having a second pixel index alternately. Including a repeat value based on the number of the first run and the number of the second run,
The code data analysis means acquires the repetition value,
The image decoding apparatus according to claim 7, wherein the run-length decoding unit performs run-length decoding based on the repetition value.
画像を構成する画素毎に、該画素の画素値と、異なる画素値毎に対応づけられる画素インデックスを有する画素値と、の差を取得する差取得ステップと、
前記画像を構成する画素毎に、前記差に基づいて、一の画素値に対応する画素インデックスを選択する画素インデックスステップと、
前記画像のラスタ順において前記画素インデックスが同一である画素が連続する数であるラン長を取得するラン長取得ステップと、
選択された前記画素インデックス、前記差、及び、前記ラン長を符号化する符号化ステップと、
を有する画像圧縮方法。
A difference acquisition step of acquiring a difference between a pixel value of the pixel and a pixel value having a pixel index associated with each different pixel value for each pixel constituting the image;
A pixel index step for selecting a pixel index corresponding to one pixel value based on the difference for each pixel constituting the image;
A run length acquisition step of acquiring a run length, which is the number of consecutive pixels having the same pixel index in the raster order of the image;
An encoding step for encoding the selected pixel index, the difference, and the run length;
An image compression method.
前記画素インデックスステップにおいて、前記差取得ステップにおいて差が取得された画素値のうち、前記差が最小となる画素値の画素インデックスが選択される請求項11記載の画像圧縮方法。   The image compression method according to claim 11, wherein in the pixel index step, a pixel index having a pixel value that minimizes the difference is selected from the pixel values from which the difference has been acquired in the difference acquisition step. 画像データがランレングス符号化方法により圧縮された符号データを解析し、所定の画素値に対応する画素インデックス、前記所定の画素値との差、及び、前記画像データのラスタ順において前記画素値が連続する数であるラン長を取得する符号データ解析ステップと、
前記画素インデックスに対応する画素値を、前記画素インデックスと画素値とが対応づけられた辞書から取得する辞書処理ステップと、
前記画素値と前記差との和による復号画素の画素値を取得する差分処理ステップと、
前記ラン長と前記復号画素の画素値とによりランレングス復号を行うランレングス復号ステップと、
を有する画像復号方法。
Analyzing code data obtained by compressing image data by a run-length encoding method, the pixel index corresponding to a predetermined pixel value, a difference from the predetermined pixel value, and the pixel value in the raster order of the image data A code data analysis step for obtaining a run length which is a continuous number;
A dictionary processing step of obtaining a pixel value corresponding to the pixel index from a dictionary in which the pixel index and the pixel value are associated;
A difference processing step of obtaining a pixel value of a decoded pixel by a sum of the pixel value and the difference;
A run-length decoding step for performing run-length decoding based on the run length and the pixel value of the decoded pixel;
An image decoding method comprising:
請求項11又は12記載の画像圧縮方法をコンピュータに実行させるためのコンピュータプログラム。   A computer program for causing a computer to execute the image compression method according to claim 11. 請求項13記載の画像復号方法をコンピュータに実行させるためのコンピュータプログラム。   A computer program for causing a computer to execute the image decoding method according to claim 13.
JP2008238712A 2008-09-17 2008-09-17 Image compression apparatus and method, image decoding apparatus and method, and computer program Pending JP2010074444A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008238712A JP2010074444A (en) 2008-09-17 2008-09-17 Image compression apparatus and method, image decoding apparatus and method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008238712A JP2010074444A (en) 2008-09-17 2008-09-17 Image compression apparatus and method, image decoding apparatus and method, and computer program

Publications (1)

Publication Number Publication Date
JP2010074444A true JP2010074444A (en) 2010-04-02

Family

ID=42205831

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008238712A Pending JP2010074444A (en) 2008-09-17 2008-09-17 Image compression apparatus and method, image decoding apparatus and method, and computer program

Country Status (1)

Country Link
JP (1) JP2010074444A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013026661A (en) * 2011-07-15 2013-02-04 Axell Corp Image data encoding method
CN115955569A (en) * 2023-03-14 2023-04-11 海伦市动物防疫检疫中心 Monitoring video data transmission method for animal quarantine center

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013026661A (en) * 2011-07-15 2013-02-04 Axell Corp Image data encoding method
CN115955569A (en) * 2023-03-14 2023-04-11 海伦市动物防疫检疫中心 Monitoring video data transmission method for animal quarantine center

Similar Documents

Publication Publication Date Title
AU2012332327B2 (en) Method and apparatus for image compression storing encoding parameters in 2D matrices
US7899262B2 (en) Data compression apparatus and data compressing program storage medium
US20060262982A1 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
JP2010103681A (en) Image processing device and method
JP4801778B2 (en) Video compression / encoding device, video restoration device, video compression program, and video restoration program
JP2010074444A (en) Image compression apparatus and method, image decoding apparatus and method, and computer program
US20080025620A1 (en) Data compression apparatus and data compressing program storage medium
JP4093200B2 (en) Data compression method and program, and data restoration method and apparatus
JP3675429B2 (en) Adaptive predictive encoding and decoding method and apparatus thereof, and recording medium recording adaptive predictive encoding and decoding program
JP4093193B2 (en) Data compression method and program, and data restoration method and apparatus
JP2007295130A (en) Image data encoder, program, computer-readable recording medium, and image data encoding method
JP4743884B2 (en) Image coding apparatus and control method thereof
JP2005277932A (en) Device and program for compressing data
JP4343863B2 (en) Image encoding device, image decoding device, and control method thereof
JP4699307B2 (en) Data compression apparatus and data compression program
JP4629512B2 (en) Data compression apparatus and data compression program
JP4131969B2 (en) Data compression apparatus and data compression program
JP2010220131A (en) Apparatus and method for encoding image
JP2011019096A (en) Image processor and image processing method
JP2006060490A (en) Image compressor and image compression program
JP4743883B2 (en) Image coding apparatus and control method thereof
JP4377352B2 (en) Data compression apparatus and data compression program
JP6142552B2 (en) Image processing apparatus, image processing method, and image processing program
JP4529681B2 (en) Image data compression method and apparatus
JP2002077627A (en) Image coding method and apparatus, image decoding method and apparatus, image forming apparatus and recording medium