[go: up one dir, main page]

JP2008301449A - Image coding apparatus and control method thereof - Google Patents

Image coding apparatus and control method thereof Download PDF

Info

Publication number
JP2008301449A
JP2008301449A JP2007148619A JP2007148619A JP2008301449A JP 2008301449 A JP2008301449 A JP 2008301449A JP 2007148619 A JP2007148619 A JP 2007148619A JP 2007148619 A JP2007148619 A JP 2007148619A JP 2008301449 A JP2008301449 A JP 2008301449A
Authority
JP
Japan
Prior art keywords
line
encoding
block
unit
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2007148619A
Other languages
Japanese (ja)
Inventor
Yuuki Matsumoto
友希 松本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2007148619A priority Critical patent/JP2008301449A/en
Publication of JP2008301449A publication Critical patent/JP2008301449A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

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

Abstract

【課題】 ブロック単位に符号化する際、そのブロック中に重複して存在するラインを除外した上で符号化することにより、符号化効率を高めることが可能になる。
【解決手段】 ライン比較部103は、着目ブロックから順にラインデータを入力し、着目ラインと直前に入力したラインとを比較し、一致、不一致を示すフラグを識別情報としてバッファメモリ108に格納し、統合部104に出力する。統合部104は、不一致である識別情報を有するラインを、自身の内部メモリに格納していく。この結果、連続して一致するラインが除外した新たなブロックが統合部104の内部メモリに構築される。符号化部106は、統合部104に構築されたブロックを符号化する。符号列形成部107は、バッファメモリ108に格納された識別情報と、符号化部106より得られた符号化データとを、着目ブロックの符号化データとして出力する。
【選択図】 図1
PROBLEM TO BE SOLVED: To improve encoding efficiency by encoding after excluding lines existing redundantly in a block when encoding in block units.
A line comparison unit (103) inputs line data in order from the target block, compares the target line with the line input immediately before, stores a flag indicating coincidence / non-coincidence in the buffer memory (108) as identification information, The data is output to the integration unit 104. The integration unit 104 stores lines having identification information that does not match in its own internal memory. As a result, a new block from which consecutively matching lines are excluded is constructed in the internal memory of the integration unit 104. The encoding unit 106 encodes the block constructed in the integration unit 104. The code string forming unit 107 outputs the identification information stored in the buffer memory 108 and the encoded data obtained from the encoding unit 106 as the encoded data of the block of interest.
[Selection] Figure 1

Description

本発明は、画像の符号化技術に関するものである。   The present invention relates to an image encoding technique.

従来、文字、線画、CG画像など、同一画素値、または同一画素配置の連続が多く見られる画像データを効率的に符号化することを目的として、幾つもの提案がなされている。   Conventionally, several proposals have been made for the purpose of efficiently encoding image data, such as characters, line drawings, and CG images, in which the same pixel value or the same pixel arrangement is frequently observed.

その中には、符号化対象ラインの画素データと、1つ前(直上)のラインの画素データが完全に一致するか否か、並びに、1つ前のラインを1又は複数画素ずらした場合に着目ラインと完全一致するか否かを判定し、その判定結果に基づいて画素データを符号化する提案がある(特許文献1)。   Among them, whether the pixel data of the encoding target line and the pixel data of the immediately preceding (immediately above) line completely match, and when the preceding line is shifted by one or more pixels There is a proposal for determining whether or not the line of interest matches completely, and encoding pixel data based on the determination result (Patent Document 1).

また、符号化の繰り返し、複写、生データの置換のいずれに該当するかを判定し、それによってデータ長を算出するような提案もある(特許文献2)。
特開平08−272978号公報 特開2001-053620号公報
In addition, there is a proposal that determines whether it corresponds to repetition of encoding, copying, or replacement of raw data, and thereby calculating the data length (Patent Document 2).
Japanese Patent Laid-Open No. 08-272978 JP 2001-053620 A

画像を並列符号化する装置の場合、画像を任意のサイズのブロック単位に分割をし、処理を行う。このような符号化装置ではブロックごとに符号化をスタートさせるので、画像の先頭ラインなどにおいて、符号化効率の悪い場合がある。   In the case of a device that encodes images in parallel, the image is divided into blocks of an arbitrary size and processed. In such an encoding apparatus, encoding is started for each block, so that encoding efficiency may be poor in the first line of an image or the like.

本発明は係る問題点に鑑みなされたものであり、ブロック単位の符号化効率を更に高め、圧縮率を更に高くする技術を提供しようとするものである。   The present invention has been made in view of such a problem, and an object of the present invention is to provide a technique for further increasing the coding efficiency of each block and further increasing the compression rate.

この課題を解決するため、例えば本発明の画像符号化装置は以下の構成を備える。すなわち、
複数の画素で構成されるブロック単位に、画像データを符号化する画像符号化装置であって、
着目ブロックの画像データから、ライン単位に画像データを入力する入力手段と、
前記入力手段で入力した着目ラインと一致するラインが、既に入力したライン中に存在するか否か、及び、存在する場合には一致するラインを特定するための識別情報を生成する判定手段と、
前記判定手段が生成した前記識別情報に基づいて、一致するラインが存在しないと判定された各ラインを統合することで、新たなブロックを生成する統合手段と、
前記統合手段で統合した前記新たなブロックの画像データを符号化する符号化手段と、
前記判定手段で生成された前記着目ブロックの各ラインの識別情報と、前記符号化手段で生成された符号化データを、前記着目ブロックの符号化データとして出力する出力手段とを備える。
In order to solve this problem, for example, an image encoding device of the present invention has the following configuration. That is,
An image encoding device that encodes image data in units of a block composed of a plurality of pixels,
Input means for inputting image data in units of lines from the image data of the block of interest;
Whether a line that matches the line of interest input by the input unit exists in the already input line, and a determination unit that generates identification information for identifying the matching line if present,
An integration unit that generates a new block by integrating each line determined to have no matching line based on the identification information generated by the determination unit;
Encoding means for encoding the image data of the new block integrated by the integrating means;
And output means for outputting the identification information of each line of the block of interest generated by the determination unit and the encoded data generated by the encoding unit as encoded data of the block of interest.

本発明によれば、ブロック単位に符号化する際、そのブロック中に重複して存在するラインを除外した上で符号化することにより、符号化効率を高めることが可能になる。   According to the present invention, when encoding is performed in units of blocks, it is possible to increase the encoding efficiency by performing encoding after excluding lines that overlap in the block.

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

[第1の実施形態]
図1は、本実施形態に係る画像データを可逆符号化する画像符号化装置のブロック構成図である。本実施形態の画像符号化装置は、装置全体の制御を司る制御部100、ストライプバッファ101、ブロック切り出し部102、ライン比較部103、統合部104、スライス分割部105、符号化部106、符号列形成部107、バッファメモリ108を備える。同図において、109、110は信号線である。
[First Embodiment]
FIG. 1 is a block diagram of an image encoding apparatus that performs lossless encoding of image data according to the present embodiment. The image encoding apparatus of this embodiment includes a control unit 100 that controls the entire apparatus, a stripe buffer 101, a block cutout unit 102, a line comparison unit 103, an integration unit 104, a slice division unit 105, an encoding unit 106, and a code string. A forming unit 107 and a buffer memory 108 are provided. In the figure, reference numerals 109 and 110 denote signal lines.

本実施形態に係る画像符号化装置の符号化対象とする画像データは、R,G,Bの色成分で構成されるカラー画像データである。また、各画素の成分は8ビット(256階調)で表わされるものとする。符号化対象の画像データの並びは点順次、即ち、ラスタースキャン順に各画素を並べらているものとする。また、各画素はR,G,B順に成分データが並べられて構成されるものとする。また、符号化対象の画像のサイズは水平方向にW画素、垂直方向にH画素であるものとする。   Image data to be encoded by the image encoding apparatus according to the present embodiment is color image data composed of R, G, and B color components. The component of each pixel is represented by 8 bits (256 gradations). It is assumed that the image data to be encoded is arranged in dot order, that is, in a raster scan order. Each pixel is configured by arranging component data in the order of R, G, and B. The size of the image to be encoded is assumed to be W pixels in the horizontal direction and H pixels in the vertical direction.

本装置は、符号化対象の画像データを水平方向Bw画素、垂直方向Bh画素で構成されるブロックを単位に符号化する。   This apparatus encodes image data to be encoded in units of blocks each composed of horizontal Bw pixels and vertical Bh pixels.

また、説明を簡易にするため、画像の水平方向画素数WはBwの整数倍であり、垂直方向画素数HはBhの整数倍の大きさであるものとし、ブロックに分割した場合に不完全なブロックは発生しないものとして説明する。そして、ブロックのサイズBw、Bhは様々な値とすることができるが、以下の説明ではBw=Bh=32として説明する。   For the sake of simplicity, the horizontal pixel count W of the image is an integral multiple of Bw, and the vertical pixel count H is an integral multiple of Bh, which is incomplete when divided into blocks. An explanation will be given on the assumption that no block is generated. The block sizes Bw and Bh can be set to various values. In the following description, Bw = Bh = 32.

なお、上記は一例であって、符号化対象の画像データの色空間はRGBに限らず、CMYKやモノクロ画像でもよいし、各成分のビット数も8ビットに限定されるものではない。また、実施形態では、符号化対象の画像データの発生源は、記憶媒体に格納された無圧縮の画像データのファイルとするが、イメージスキャナや、印刷データに基づいてレンダリングするレンダリング処理部でも良く、その種類は問わない。   Note that the above is an example, and the color space of the image data to be encoded is not limited to RGB, but may be a CMYK or monochrome image, and the number of bits of each component is not limited to 8 bits. In the embodiment, the source of the image data to be encoded is an uncompressed image data file stored in a storage medium, but may be an image scanner or a rendering processing unit that renders based on print data. The type is irrelevant.

以下、図1を参照して、本実施形態に係る画像符号化装置の符号化処理内容を説明する。
まず、信号線109から符号化対象となる画像データが順に入力される。画素データの入力順序は先に説明したようにラスタースキャン順とし、各画素でR,G,Bの順番で成分データが入力されるものとする。R,G,Bをそれぞれ成分番号0,1,2で定義し、画像の左上隅を座標(0,0)として水平(右)方向の画素位置x、垂直(下)方向画素位置yにある画素の成分番号Cの値をP(x,y,C)と表すこととする。例えば、位置(x、y)=(3,4)である画素が(R,G,B)=(255,128,0)という値を持つ場合、P(3,4,0)=255、P(3,4,1)=128、P(3,4,2)=0と表現する。
Hereinafter, with reference to FIG. 1, the content of the encoding process of the image encoding device according to the present embodiment will be described.
First, image data to be encoded is sequentially input from the signal line 109. The input order of the pixel data is the raster scan order as described above, and the component data is input in the order of R, G, B at each pixel. R, G, and B are defined by component numbers 0, 1, and 2, respectively, and the pixel position x in the horizontal (right) direction and the pixel position y in the vertical (down) direction with the upper left corner of the image as coordinates (0, 0) The value of the component number C of the pixel is represented as P (x, y, C). For example, if the pixel at the position (x, y) = (3,4) has a value of (R, G, B) = (255, 128, 0), P (3,4, 0) = 255, P (3,4,1) = 128 and P (3,4,2) = 0.

ストライプバッファ101は画像入力部101から入力される画像データのBhライン、すなわち、32ライン分を格納する。ストライプバッファ101のメモリ容量は、少なくとも32×W×3バイトとなる。以降、このストライプバッファ101に格納されるBhラインの画像データをストライプデータと呼ぶ。   The stripe buffer 101 stores Bh lines of image data input from the image input unit 101, that is, 32 lines. The memory capacity of the stripe buffer 101 is at least 32 × W × 3 bytes. Hereinafter, the Bh line image data stored in the stripe buffer 101 is referred to as stripe data.

ブロック切り出し部102は、後述する符号化処理に同期し、ストライプバッファ101に格納されるストライプデータを、左から右に向かう順番に、符号化処理単位の32×32画素のサイズのブロックを切り出し、内部の記憶領域に格納する。   The block cutout unit 102 cuts out the 32 × 32 pixel size block of the encoding processing unit in order from the left to the right in the stripe data stored in the stripe buffer 101 in synchronization with the encoding processing described later. Store in the internal storage area.

ライン比較部103は、ブロック切り出し部102に記憶されたブロック内の着目ラインと1つ前に入力したライン(以下、直前ライン)を比較し、着目ラインが直前ラインと一致しているか否かを識別するための識別情報(以下、フラグFI)を生成する。なお、着目ラインと比較する対象は、その直前ラインであるので、この識別情報が一致することを示している場合、着目ラインが直前のラインと一致していることを示すことをも意味する。   The line comparison unit 103 compares the target line in the block stored in the block cutout unit 102 with the line input immediately before (hereinafter, the previous line), and determines whether the target line matches the previous line. Identification information (hereinafter referred to as flag FI) for identification is generated. Since the target to be compared with the target line is the immediately preceding line, when this identification information indicates that it matches, it also means that the target line matches with the immediately preceding line.

ここで、2つのラインが一致するというのは、変数i=0、1、…、30、31について
条件:P(x+i、y、C)=P(x+i,y−1,C)
の関係が成立する場合である。また、不一致とは、上記条件が1つでも満たしていない場合である。実施形態では、一致する場合にはフラグFI=“1”、不一致の場合、フラグFI=“0”を生成する。フラグFIは{0、1}のいずれかであるので1ビットで表わさせる。実施形態では、1ブロックの高さWhが“32”であるので、ライン比較部103が生成するのフラグFIは32個、すなわち、32ビットとなる。なお、ブロック内の先頭ラインに対する直前ラインは存在しないので、先頭ラインについてはフラグFI=0とする。また、以下の説明において、バッファメモリ108に格納される32個(32ビット)のフラグFIを総称してフラグ情報と呼ぶ。
Here, the two lines coincide with each other when the variables i = 0, 1,..., 30, 31 are: P (x + i, y, C) = P (x + i, y-1, C)
This is the case when the relationship is established. Inconsistency is when one of the above conditions is not satisfied. In the embodiment, the flag FI = "1" is generated when they match, and the flag FI = "0" is generated when they do not match. Since the flag FI is one of {0, 1}, it is represented by 1 bit. In the embodiment, since the height Wh of one block is “32”, the line FI generated by the line comparison unit 103 is 32, that is, 32 bits. Since there is no immediately preceding line for the first line in the block, the flag FI = 0 is set for the first line. In the following description, 32 (32-bit) flags FI stored in the buffer memory 108 are collectively referred to as flag information.

バッファメモリ108は、上記のようにしてライン比較部103から出力された32ビットのフラグ情報を一時的に記憶保持する。図3は、バッファメモリ108に記憶されたフラグ情報の一例を示している。   The buffer memory 108 temporarily stores and holds the 32-bit flag information output from the line comparison unit 103 as described above. FIG. 3 shows an example of flag information stored in the buffer memory 108.

統合部104は、ライン比較部103からのフラグFIを入力すると共に、ブロック切り出し部102から先頭から順番に各ラインの画像データを入力する。そして、統合部104は、フラグFI=1に対応するラインの画像データは破棄し、フラグFI=0で示されるラインの画像データを、内部のメモリに格納する。   The integration unit 104 inputs the flag FI from the line comparison unit 103 and also inputs the image data of each line from the block cutout unit 102 in order from the top. Then, the integration unit 104 discards the image data of the line corresponding to the flag FI = 1, and stores the image data of the line indicated by the flag FI = 0 in the internal memory.

図2は、統合部104の処理内容を示している。図示の如く、前のラインと同じ画素を有するラインは破棄されるので、図示の場合、統合部104の内部メモリに格納されるのは4ラインとなる。つまり、図2の上部に示す8×8画素のブロックから、新たなブロック4行、8列のブロックを構成することに成功する。なお、図2は8×8画素の画像データの例を示しているが、実施形態では32×32画素のブロックについてこの処理を行なうので、生成される統合後のブロックの水平方向のサイズは32となる。   FIG. 2 shows the processing contents of the integration unit 104. As shown in the figure, since the line having the same pixel as the previous line is discarded, in the case shown in the figure, four lines are stored in the internal memory of the integration unit 104. That is, a new block of 4 rows and 8 columns is successfully constructed from the 8 × 8 pixel block shown in the upper part of FIG. FIG. 2 shows an example of 8 × 8 pixel image data. In the embodiment, since this processing is performed on a 32 × 32 pixel block, the size of the generated integrated block in the horizontal direction is 32. It becomes.

実施形態における符号化部106はn個の符号化データを並列して符号化する機能を有するものとする。説明を簡単にするため、n=2であるものとする。   The encoding unit 106 in the embodiment is assumed to have a function of encoding n pieces of encoded data in parallel. For simplicity of explanation, it is assumed that n = 2.

スライス分割部105では、統合部104の内部メモリに格納された画像データを、符号化部106の並列符号化可能な数“2”個のスライスに分割する。この結果、スライス分割部105は、統合部104の内部のメモリに格納された統合済みの画像データを図2の示すように2つのスライスに分割し、それぞれを符号化部106に出力し、並列符号化を行なわせる。   The slice division unit 105 divides the image data stored in the internal memory of the integration unit 104 into “2” slices that can be encoded in parallel by the encoding unit 106. As a result, the slice division unit 105 divides the integrated image data stored in the internal memory of the integration unit 104 into two slices as shown in FIG. 2, and outputs each of the slices to the encoding unit 106. Encoding is performed.

符号化部106では、入力された各スライス画像を並列して符号化を行う。なお、符号化部106の符号化としては、公知の多値の可逆符号化方式、例えば、JPEG−LS、PNG、JPEG2000を用いて符号化処理を行うものである。例えば、JPEG−LS符号化で符号化を行う場合、ランレングス符号化モードとレギュラーモードを着目画素の周囲4画素の状態に応じて切り替え符号化を行う。   The encoding unit 106 encodes each input slice image in parallel. Note that the encoding unit 106 performs encoding processing using a known multilevel lossless encoding method, for example, JPEG-LS, PNG, or JPEG2000. For example, when encoding is performed using JPEG-LS encoding, the run-length encoding mode and the regular mode are switched according to the state of four pixels around the pixel of interest.

スライス単位に並列処理を行う画像処理装置の場合、画像によって動的に符号化のためのパラメータを変化させていき、最適な符号語を割り当てるような方式である。しかし、この場合、小さい単位で分割することで、主にスライスの先頭ラインで符号化効率の低下が見られる。この負荷を最小限に抑制するため、符号化前にラインの統合を行っておく。   In the case of an image processing apparatus that performs parallel processing in units of slices, an encoding code is dynamically changed according to an image and an optimal codeword is assigned. However, in this case, the division efficiency is reduced mainly in the first line of the slice by dividing the data into smaller units. In order to minimize this load, line integration is performed before encoding.

符号列形成部107は、画像の符号化に先立ち、画像の水平方向・垂直方向の画素数、画素を構成する成分の数、各成分の精度、ブロックサイズなど、復号処理に必要な付加情報をヘッダとして出力する。そして、符号列形成部107は、バッファメモリ108に格納された32ビットのフラグ情報と、符号化部106からのライン毎の符号化データと着目ブロックの符号化データとして出力する。なお、出力先が記憶装置である場合、ファイルとして出力することになる。   Prior to image coding, the code string forming unit 107 adds additional information necessary for decoding processing such as the number of pixels in the horizontal and vertical directions of the image, the number of components constituting the pixels, the accuracy of each component, and the block size. Output as header. The code string forming unit 107 outputs the 32-bit flag information stored in the buffer memory 108, the encoded data for each line from the encoding unit 106, and the encoded data of the block of interest. When the output destination is a storage device, it is output as a file.

図4は符号列形成部107によって生成される符号化データの構造を示している。図のように、画像符号化データの先頭には、ヘッダ(ファイルヘッダ)が存在し、それに後続して1つのブロックのフラグ情報(32ビット)を格納し、更にそれに後続してフラグFI=0の個数分のライン符号化データが続く。   FIG. 4 shows the structure of encoded data generated by the code string forming unit 107. As shown in the figure, there is a header (file header) at the head of the encoded image data, followed by storing flag information (32 bits) of one block, and subsequently, flag FI = 0. The number of line-coded data continues.

図5は、本実施形態に係る画像符号化装置の制御部100の処理手順を示すフローチャートである。以下、同図に従って符号化処理の流れを説明する。   FIG. 5 is a flowchart illustrating a processing procedure of the control unit 100 of the image encoding device according to the present embodiment. Hereinafter, the flow of the encoding process will be described with reference to FIG.

まず、ステップS501にて、制御部100は、信号線109から符号化対象画像データから32ライン分の画像データをストライプバッファ101に格納する。次いで、制御部100は、ステップS502にて、ブロック切り出し部102を制御する。ブロック切り出し部102は、この結果、ストライプバッファ101に格納されるストライプデータの左から右へ、順番に32×32画素のブロックの一つを取り出してブロック切り出し部102の内部メモリに格納する。   First, in step S <b> 501, the control unit 100 stores image data for 32 lines from the image data to be encoded from the signal line 109 in the stripe buffer 101. Next, the control unit 100 controls the block cutout unit 102 in step S502. As a result, the block cutout unit 102 takes out one of the 32 × 32 pixel blocks in order from the left to the right of the stripe data stored in the stripe buffer 101 and stores it in the internal memory of the block cutout unit 102.

続いて、ステップS503にて、制御部100はライン比較部103と統合部104に、ブロック切り出し部102の内部メモリのブロックデータについての処理を開始させる。ライン比較部103は、ブロック切り出し部102の内部メモリに格納された1ブロック中のラインデータ(実施形態では32画素)を単位に読込み、今回読込んだラインと、前回読込んだラインとを比較し、その比較結果のフラグFIを生成する。そして、ライン比較部103は、そのフラグFIをバッファメモリ108に格納する共に、統合部104に出力する。統合部104は、ライン比較部103から出力されるフラグFIが“0”である場合に、ブロック切り出し部102の内部メモリに格納された1ブロック中のラインデータを入力し、統合部104の内部メモリにそのラインデータを順次格納する。   Subsequently, in step S503, the control unit 100 causes the line comparison unit 103 and the integration unit 104 to start processing on the block data in the internal memory of the block cutout unit 102. The line comparison unit 103 reads line data in one block (32 pixels in the embodiment) stored in the internal memory of the block cutout unit 102 as a unit, and compares the line read this time with the line read last time. Then, the flag FI of the comparison result is generated. The line comparison unit 103 stores the flag FI in the buffer memory 108 and outputs it to the integration unit 104. The integration unit 104 inputs line data in one block stored in the internal memory of the block cutout unit 102 when the flag FI output from the line comparison unit 103 is “0”. The line data is sequentially stored in the memory.

実施形態では、1ブロックが32ラインで構成されるので、上記処理を32回行なうことになる。なお、ライン比較部103は、ブロックの先頭ラインについては、フラグFIは“0”にする。   In the embodiment, since one block is composed of 32 lines, the above process is performed 32 times. The line comparison unit 103 sets the flag FI to “0” for the first line of the block.

上記のようにして、1ブロック分のフラグFIの生成、統合処理を終えると、処理はステップS504に進む。このステップS504において、制御部100は、スライス分割部105、及び、符号化部106、符号列形成部107を制御し、符号化処理を行なわせる。実施形態における符号化部106は、2つの符号化処理を並列処理する機能を持つものとしているので、スライス分割部105は、統合部104の内部メモリに格納された統合画像データを2つのスライスに分割し、それぞれを符号化部106に出力する。符号化部106は、各スライスを符号化し、各ラインの符号化データを、符号列形成部107に出力することになる。符号列形成部107は、先ず、バッファメモリ108から32ビットのフラグ情報を信号線110を介して出力し、それに後続して、フラグFIが“0”となっているラインの符号化データを順番に出力する。   As described above, when the generation and integration processing of the flag FI for one block is completed, the processing proceeds to step S504. In step S504, the control unit 100 controls the slice dividing unit 105, the encoding unit 106, and the code string forming unit 107 to perform encoding processing. Since the encoding unit 106 in the embodiment has a function of processing two encoding processes in parallel, the slice dividing unit 105 converts the integrated image data stored in the internal memory of the integration unit 104 into two slices. The data are divided and output to the encoding unit 106. The encoding unit 106 encodes each slice and outputs encoded data of each line to the code string forming unit 107. First, the code string forming unit 107 outputs 32-bit flag information from the buffer memory 108 via the signal line 110, and then sequentially encodes the encoded data of the lines whose flag FI is “0”. Output to.

以上のようにして、1ブロック(32×32画素)の画像データの符号化データの出力が完了する。   As described above, output of encoded data of image data of one block (32 × 32 pixels) is completed.

1ブロック分の画像データの符号化及び出力が完了すると、制御部100は、処理はステップS505に進み、符号化したブロックがストライプデータの最後のブロック(右端のブロック)であったか否かを判断する。否の場合、ステップS502以降の処理を行なう。   When the encoding and output of the image data for one block is completed, the control unit 100 proceeds to step S505, and determines whether or not the encoded block is the last block (rightmost block) of the stripe data. . If not, the processing after step S502 is performed.

一方、ストライプデータの最後のブロックの符号化を終えたと判断した場合には、ステップS506に進み、着目ストライプデータが、符号化対象の画像データの最後のストライプであったか否かを判断する。否の場合にはステップS501に戻り、次のストライプデータについての符号化処理を行なう。   On the other hand, if it is determined that the last block of the stripe data has been encoded, the process advances to step S506 to determine whether or not the target stripe data is the last stripe of the image data to be encoded. If NO, the process returns to step S501 and the next stripe data is encoded.

そして、ステップS506にて、最終ストライプの符号化が完了したと判断した場合には、符号化対象の画像データの全ブロックの符号化が完了したことになるので、本処理を終了する。   If it is determined in step S506 that encoding of the final stripe has been completed, encoding of all blocks of the image data to be encoded has been completed, and thus this processing ends.

以上説明したように本実施形態によれば、1つのブロックを符号化するに先立って、隣接するラインの一致/不一致を判定し、その判定結果に基づいてラインの統合処理を行い、スライスの数を減らした状態で符号化する。この結果、スライスの先頭ラインでの負荷が軽減されることで、文字、線画、CG画像など、同じ画素配置のパターンが多く出現する画像に対し、高い圧縮性能の可逆符号化を実現できる。なお、本実施形態の画像処理装置ではブロック単位に独立の符号化が行われているため、部分的な復号や、並列符号化/復号が可能であるという特徴がある。   As described above, according to the present embodiment, prior to encoding one block, matching / mismatching between adjacent lines is determined, line integration processing is performed based on the determination result, and the number of slices is determined. Encoding is performed in a reduced state. As a result, by reducing the load on the first line of the slice, lossless encoding with high compression performance can be realized for images such as characters, line drawings, and CG images in which many patterns with the same pixel arrangement appear. Note that the image processing apparatus of the present embodiment is characterized by being capable of partial decoding and parallel encoding / decoding because independent encoding is performed in units of blocks.

なお、復号装置においては、各ブロックの先頭のフラグ情報(32ビット)を先ず判別し、その32ビット中の“0”の個数をカウントする。このカウントした個数のラインの符号化データが、そのフラグ情報に後続しているものとして復号する。そして、フラグFIが“0”のラインでは、復号結果を出力する。また、フラグFIが“1”では、直前ラインの復号結果を着目ラインの復号結果として出力すればよい。   In the decoding apparatus, the flag information (32 bits) at the head of each block is first determined, and the number of “0” s in the 32 bits is counted. The encoded data of the counted number of lines is decoded as following the flag information. Then, in the line where the flag FI is “0”, the decoding result is output. When the flag FI is “1”, the decoding result of the immediately preceding line may be output as the decoding result of the target line.

[第1の実施形態の変形例]
上記実施形態はパーソナルコンピュータ等の情報処理装置によるコンピュータプログラムによっても実現できる。以下は、その変形例である。
[Modification of First Embodiment]
The above embodiment can also be realized by a computer program by an information processing apparatus such as a personal computer. The following is a variation thereof.

図11は、本変形例における情報処理装置(例えばパーソナルコンピュータ)のブロック構成図である。   FIG. 11 is a block configuration diagram of an information processing apparatus (for example, a personal computer) in the present modification.

図中、1401はCPUで、RAM1402やROM1403に記憶されているプログラムやデータを用いて本装置全体の制御を行うと共に、後述する画像符号化処理、復号処理のアプリケーションプログラムを実行する。1402はRAMで、外部記憶装置1407や記憶媒体ドライブ1408、若しくはI/F1409を介して外部装置からダウンロードされたプログラムやデータを記憶する為のエリアを備える。また、RAM1402は、CPU1401が各種の処理を実行する際に使用するワークエリアも備える。1403はROMで、ブートプログラムや本装置の設定プログラムやデータを格納する。1404、1405は夫々キーボード、マウスで、CPU1401に対して各種の指示を入力することができる。   In the figure, reference numeral 1401 denotes a CPU which controls the entire apparatus using programs and data stored in a RAM 1402 and a ROM 1403 and executes application programs for image encoding processing and decoding processing described later. A RAM 1402 includes an area for storing programs and data downloaded from the external device via the external storage device 1407, the storage medium drive 1408, or the I / F 1409. The RAM 1402 also includes a work area used when the CPU 1401 executes various processes. Reference numeral 1403 denotes a ROM which stores a boot program, a setting program for the apparatus, and data. Reference numerals 1404 and 1405 denote a keyboard and a mouse, respectively. Various instructions can be input to the CPU 1401.

1406は表示装置で、CRTや液晶画面などにより構成されており、画像や文字などの情報を表示することができる。1407はハードディスクドライブ装置等の大容量の外部記憶装置である。この外部記憶装置1407には、OS(オペレーティングシステム)や後述する画像符号化、復号処理の為のプログラム、符号化対象の画像データ、復号対象画像の符号化データなどがファイルとして保存されている。また、CPU1401は、これらのプログラムやデータをRAM1402上の所定のエリアにロードし、実行することになる。   A display device 1406 includes a CRT, a liquid crystal screen, and the like, and can display information such as images and characters. Reference numeral 1407 denotes a large-capacity external storage device such as a hard disk drive device. The external storage device 1407 stores an OS (operating system), a program for image encoding and decoding processing described later, image data to be encoded, encoded data of an image to be decoded, and the like as files. The CPU 1401 loads these programs and data into a predetermined area on the RAM 1402 and executes them.

1408は記憶媒体ドライブで、CD−ROMやDVD−ROMなどの記憶媒体に記録されたプログラムやデータを読み出してRAM1402や外部記憶装置1407に出力するものである。なお、この記憶媒体に後述する画像符号化、復号処理の為のプログラム、符号化対象の画像データ、復号対象の画像の符号化データなどを記録しておいても良い。この場合、記憶媒体ドライブ1408は、CPU1401による制御によって、これらのプログラムやデータをRAM1402上の所定のエリアにロードする。   A storage medium drive 1408 reads programs and data recorded on a storage medium such as a CD-ROM or DVD-ROM and outputs them to the RAM 1402 or the external storage device 1407. In addition, a program for image encoding and decoding processing described later, image data to be encoded, encoded data of an image to be decoded, and the like may be recorded on the storage medium. In this case, the storage medium drive 1408 loads these programs and data into a predetermined area on the RAM 1402 under the control of the CPU 1401.

1409はI/Fで、このI/F1409によって外部装置を本装置に接続し、本装置と外部装置との間でデータ通信を可能にするものである。例えは符号化対象の画像データや、復号対象の画像の符号化データなどを本装置のRAM1402や外部記憶装置1407、あるいは記憶媒体ドライブ1408に入力することもできる。1410は上述の各部を繋ぐバスである。   Reference numeral 1409 denotes an I / F, which connects an external device to the present apparatus through the I / F 1409 and enables data communication between the present apparatus and the external apparatus. For example, image data to be encoded, encoded data of an image to be decoded, and the like can be input to the RAM 1402, the external storage device 1407, or the storage medium drive 1408 of this apparatus. A bus 1410 connects the above-described units.

上記構成において、本装置の電源がONになると、CPU1401はROM1403のブートプログラムに従って、外部記憶装置1407からOSをRAM1402にロードする。この結果、キーボード1404、マウス1405の入力が可能となり、表示装置1406にGUIを表示することが可能になる。ユーザが、キーボード1404やマウス1405を操作し、外部記憶装置1407に格納された画像符号化用アプリケーションプログラムの起動の指示を行なうと、CPU1401はそのプログラムをRAM1402にロードし、実行する。これにより、本装置が画像符号化装置として機能することになる。   In the above configuration, when the power of this apparatus is turned on, the CPU 1401 loads the OS from the external storage device 1407 to the RAM 1402 in accordance with the boot program stored in the ROM 1403. As a result, the keyboard 1404 and the mouse 1405 can be input, and the GUI can be displayed on the display device 1406. When the user operates the keyboard 1404 or the mouse 1405 to instruct the activation of the image encoding application program stored in the external storage device 1407, the CPU 1401 loads the program into the RAM 1402 and executes it. As a result, the present apparatus functions as an image encoding apparatus.

この画像符号化用アプリケーションの処理は、第1の実施形態で示した図5と実質的に等価の処理を行なえば良い。すなわち、図1における各処理部に相当する機能を、CPU1401が実行する関数(サブルーチン)により実現する。また、ストライプバッファ101、バッファメモリ108を始め、各処理部における内部メモリは、RAM1402に確保することで実現できる。   The image encoding application process may be a process substantially equivalent to that shown in FIG. 5 in the first embodiment. That is, the function corresponding to each processing unit in FIG. 1 is realized by a function (subroutine) executed by the CPU 1401. Further, internal memory in each processing unit including the stripe buffer 101 and the buffer memory 108 can be realized by securing the RAM 1402.

以上説明したように、第1の実施形態にかかる装置と同等の機能が、コンピュータが実行するコンピュータプログラムによっても実現できることは明らかである。   As described above, it is obvious that functions equivalent to those of the apparatus according to the first embodiment can be realized by a computer program executed by a computer.

[第2の実施形態]
本第2の実施形態では、第1の実施形態と同様に符号化前にラインの一致/不一致の判定を行い、ラインの統合を行う。ただし、本第2の実施形態では、着目ラインと直前ラインのみの比較ではなく、着目ラインよりも前に入力した任意のラインと比較する点が異なる。そして、一致するラインがあるか否か、及び、一致するラインがあればどのラインと一致するのかを識別するための識別情報を生成する。本第2の実施形態における、この識別情報は、後述する配列番号もしくは配列番号情報としている。
[Second Embodiment]
In the second embodiment, line matching / non-coincidence determination is performed before encoding and line integration is performed as in the first embodiment. However, the second embodiment is different in that it is not a comparison of only the target line and the previous line, but is compared with an arbitrary line input before the target line. Then, identification information for identifying whether there is a matching line and which line matches if there is a matching line is generated. The identification information in the second embodiment is an array number or array number information described later.

装置構成は、図1と同じである。第1の実施形態と大きく異なる点は、ライン比較部103の処理内容と、統合部104である。そこで、以下では本第2の実施形態におけるライン比較部103の処理内容を図7のフローチャートに従って説明する。   The apparatus configuration is the same as in FIG. The main difference from the first embodiment is the processing content of the line comparison unit 103 and the integration unit 104. Therefore, the processing contents of the line comparison unit 103 in the second embodiment will be described below with reference to the flowchart of FIG.

なお、この処理を開始するに当たり、既に1ブロック分の画像データ(32×32画素データ)がブロック切り出し部102の内部メモリに格納されているものとする。   In starting this process, it is assumed that image data (32 × 32 pixel data) for one block has already been stored in the internal memory of the block cutout unit 102.

まず、ブロック切り出し部102は、ステップS701にて、ブロック切り出し部102の内部メモリから、画像データの先頭ラインのラインデータ(32画素)を入力し、そのラインデータと、配列番号“1”を示す情報を内部のメモリに保持する。   First, in step S701, the block cutout unit 102 inputs line data (32 pixels) of the first line of image data from the internal memory of the block cutout unit 102, and indicates the line data and the array number “1”. Keep information in internal memory.

次いで、ブロック切り出し部102は、ステップS702にて、次のラインデータ(着目ラインデータ)を読込み、既に登録されたラインデータ(複数の場合も有り得る)のいずれかと一致するか否かを判定する。   Next, in step S702, the block cutout unit 102 reads the next line data (target line data), and determines whether the line data matches any of the already registered line data (possibly a plurality of line data).

登録されたラインデータの中に着目ラインデータと一致するラインデータが見つかった場合には、ステップS703に進み、一致すると判定されたラインを特定するため、その配列番号を、着目ラインの配列番号として登録する。この後、ステップS706に処理を進める。従って、着目ラインデータが、ブロックの2番目のラインデータであり、先頭ラインと等しい場合、着目ラインの配列番号は“1”となる。   If line data that matches the target line data is found in the registered line data, the process proceeds to step S703, and in order to identify the line determined to match, the array number is used as the array number of the target line. sign up. Thereafter, the process proceeds to step S706. Therefore, when the target line data is the second line data of the block and is equal to the first line, the array number of the target line is “1”.

一方、既に登録されたラインデータの中に着目ラインデータと一致するラインデータが見つからなかった場合には、ステップS704に進む。ステップS704に進むのは、着目ラインが新たなパターンであることによる。それ故、配列番号を“1”だけ増加し、その配列番号を内部メモリに格納する。そして、ステップS705にて、着目ラインデータも内部メモリに登録する。従って、着目ラインデータが、ブロックの2番目のラインデータであり、先頭ラインと不一致の場合、着目ラインの配列番号は“2”となり、着目ラインデータは内部メモリに保持されることになる。   On the other hand, if no line data matching the target line data is found in the already registered line data, the process proceeds to step S704. The process proceeds to step S704 because the line of interest is a new pattern. Therefore, the array element number is incremented by “1” and the array element number is stored in the internal memory. In step S705, the target line data is also registered in the internal memory. Therefore, when the target line data is the second line data of the block and does not match the first line, the array number of the target line is “2”, and the target line data is held in the internal memory.

ステップS706では、着目ラインがブロックの最終ラインであるか否かを判定する。否の場合には、ステップS702以降の処理を繰り替えす。   In step S706, it is determined whether the line of interest is the last line of the block. If not, the processes after step S702 are repeated.

着目ブロックの全ラインについての処理を終えると、処理はステップS707に進み、内部に格納された32個の配列番号を、ライン順に、バッファメモリ108及び統合部104に出力する。   When the process for all the lines of the block of interest is completed, the process proceeds to step S707, and the 32 array numbers stored therein are output to the buffer memory 108 and the integration unit 104 in line order.

上記処理をより分かりやすく示すと次の通りである。説明を簡単なものとするため、1ブロックが8×8画素であり、図6に示すように、2種類の画素で構成されているものとする。先頭ラインの配列番号が“1”である。2番目のラインは、先頭ラインと一致するので、その配列番号は“1”になる。3番目のラインは、それ以前のラインのいずれとも一致しないので、配列番号は“2”となる。以下、これを繰り返すと、結局のところ、図6に示す画像の場合、配列番号は“1”、“2”の2種類のみとなる。すなわち、図6の場合、ライン比較部103が出力する配列番号情報は、図8に示すようになる。   The above processing is shown in a more understandable manner as follows. In order to simplify the description, it is assumed that one block is 8 × 8 pixels and is composed of two types of pixels as shown in FIG. The array number of the first line is “1”. Since the second line coincides with the first line, the array element number is “1”. Since the third line does not match any of the previous lines, the sequence number is “2”. Hereinafter, when this is repeated, after all, in the case of the image shown in FIG. 6, there are only two types of array numbers “1” and “2”. That is, in the case of FIG. 6, the array number information output by the line comparison unit 103 is as shown in FIG.

本第2の実施形態における統合部104は、ブロック切り出し部102の内部メモリに格納された32ライン分の画像データを統合する際、32個の配列番号の先頭から順にチェックする。そして、新たな配列番号が見つかった場合にのみ、そのラインデータをブロック切り出し部102から読込み、統合部104内の内部メモリに格納する。なお、統合結果は、統合部104内の内部メモリに限らず、別途、記憶手段としてバッファメモリを用意し、そこに記憶してもかまわない。   When integrating the image data for 32 lines stored in the internal memory of the block cutout unit 102, the integration unit 104 in the second embodiment checks in order from the top of the 32 array numbers. Only when a new sequence number is found, the line data is read from the block cutout unit 102 and stored in the internal memory in the integration unit 104. The integration result is not limited to the internal memory in the integration unit 104, and a buffer memory may be separately prepared as a storage unit and stored therein.

図10は、本第2の実施形態における統合部104の処理内容を示すフローチャートである。   FIG. 10 is a flowchart showing the processing contents of the integration unit 104 in the second embodiment.

以下、同図従って統合部104の処理を説明する。なお、以下の説明において、変数iはブロック中の着目ラインの位置を変数である。また、FI(i)は、バッファメモリ108に格納された32個の配列番号中の、第iライン目の配列番号を示している。そして、Fmaxは配列番号の最大値を保持する変数である。   Hereinafter, the processing of the integration unit 104 will be described with reference to FIG. In the following description, the variable i is the variable of the position of the target line in the block. FI (i) represents the array element number of the i-th line among the 32 array element numbers stored in the buffer memory 108. Fmax is a variable that holds the maximum value of the array element number.

先ず、ステップS1001にて、変数i,Fmaxをそれぞれ“0”で初期化する。次いで、ステップS1002に進み、第i番目のラインの配列番号FI(i)とFmaxとを比較する。   First, in step S1001, variables i and Fmax are initialized to “0”. Next, the process proceeds to step S1002, and the array element number FI (i) of the i-th line is compared with Fmax.

FI(i)>Fmaxである場合、着目ラインデータ(第iラインの画素データ)は、それ以前のいずれのラインとも一致していないことを示している。それゆえ、ステップS1003にて、着目ラインデータを、ブロック切り出し部102から読込み、統合部104内の内部メモリに格納する。そして、Fmaxの値を、FI(i)で更新し(ステップS1004)、ステップS1005に処理を進める。   When FI (i)> Fmax, it indicates that the line data of interest (pixel data of the i-th line) does not match any previous line. Therefore, the line-of-interest data is read from the block cutout unit 102 and stored in the internal memory in the integration unit 104 in step S1003. Then, the value of Fmax is updated with FI (i) (step S1004), and the process proceeds to step S1005.

一方、ステップS1002にて、FI(i)≦Fmaxであると判定するのは、着目している第iラインが、既に処理したラインのいずれかと一致したことを示している。それ故、ステップS1003、1004の処理は行なわず、ステップS1005に処理を進める。   On the other hand, determining that FI (i) ≦ Fmax in step S1002 indicates that the focused i-th line matches any of the already processed lines. Therefore, the process of steps S1003 and 1004 is not performed, and the process proceeds to step S1005.

ステップS1005では、変数iを“1”だけ増加させ、更新する。この後、ステップS1006では、変数iとブロックのライン数である“32”とを比較する。i<32である場合、未処理のラインが存在することになるので、ステップS1002以降の処理を繰り返す。   In step S1005, the variable i is incremented by “1” and updated. Thereafter, in step S1006, the variable i is compared with “32” which is the number of lines of the block. If i <32, there is an unprocessed line, and therefore the processing from step S1002 is repeated.

以上の処理の結果、図6の上部の画像が符号化対象である場合、統合部104の内部メモリに格納される画像データは図6の下部に示すように2ライン分の画像データとすることができる。第1の実施形態と比較すると、格納するラインの数が半分にできることになる。   As a result of the above processing, when the upper image in FIG. 6 is an encoding target, the image data stored in the internal memory of the integration unit 104 is image data for two lines as shown in the lower portion of FIG. Can do. Compared to the first embodiment, the number of lines to be stored can be halved.

この後の統合後の画像データを、第1の実施形態と同じようにスライス分割部105、符号化部106が符号化処理することになる。   The image data after the integration is encoded by the slice dividing unit 105 and the encoding unit 106 in the same manner as in the first embodiment.

符号列形成部107は、各ブロックの先頭には、バッファメモリ108に格納された32個の配列番号情報を出力し、それに後続して符号化データをライン単に出力すればよい。図9は、本第2の実施形態の符号化装置で生成される符号化データの構造を示している。第1の実施形態と異なる点は、各ブロックの先頭には、配列番号情報が格納される点である。また、配列番号情報に後続するラインの符号化データの個数は、配列番号の値に等しい。   The code string forming unit 107 simply outputs the 32 array number information stored in the buffer memory 108 at the head of each block, and then simply outputs the encoded data on a line. FIG. 9 shows a structure of encoded data generated by the encoding apparatus according to the second embodiment. The difference from the first embodiment is that array number information is stored at the head of each block. Further, the number of encoded data of the line following the array number information is equal to the array number value.

また、1つの配列番号の最大値は、理論上、“32”である。すなわち、1つの配列番号の取り得る範囲は32通りのいずれかの値になりえる。32通りは、5ビットあれば表現できるので、本第2の実施形態の場合、32個の配列番号はトータルで32×5=160ビット必要になる。これは第1の実施形態におけるフラグデータの32ビットよりも大きな値である。しかしながら、本第2の実施形態の場合、統合した画像のライン数は、第1の実施形態よりも十分に小さな値になる可能性が高い。仮に、第2の実施形態の処理により、第1の実施形態の処理よりも1ライン少ない統合画像を生成できたとする。1ラインデータは、32画素で構成され、各画素はR、G、Bの3成分であり、各成分は8ビットである。従って、1ラインデータを省略できるとうのは、32×3×8=768ビット分の画像データを符号化対象から除外できたことを示すわけであるから、符号化データ中に配列番号を格納したとしても、十分な効果が期待できるのは明らかである。   The maximum value of one sequence number is theoretically “32”. That is, the possible range of one sequence number can be any of 32 values. Since 32 patterns can be expressed with 5 bits, in the case of the second embodiment, 32 array numbers require 32 × 5 = 160 bits in total. This is a value larger than 32 bits of flag data in the first embodiment. However, in the case of the second embodiment, there is a high possibility that the number of lines of the integrated image is sufficiently smaller than that of the first embodiment. Assume that the integrated image can be generated by one line fewer than the process of the first embodiment by the process of the second embodiment. One line data is composed of 32 pixels, and each pixel has three components of R, G, and B, and each component is 8 bits. Therefore, the fact that one line data can be omitted means that image data of 32 × 3 × 8 = 768 bits can be excluded from the encoding target, so that an array number is stored in the encoded data. However, it is clear that a sufficient effect can be expected.

尚、本第2の実施形態で生成された符号化データを復号する装置の処理は上記と逆の処理を行なえばよい。すなわち、1つのブロックを復号する場合、そのブロックの先頭の配列番号情報(160ビット)を読込み解析する。この結果、32ライン中、どのラインがどのラインと同じであるか、また、配列番号情報に後続して、幾つのラインの符号化データが存在するかがわかる。そこで、ラインの符号化データを先ず復号し、先頭ラインから配列番号“1”、“2”…を割り当てる。この後は、配列番号に従って、復号したラインデータを順に出力すればよい。   In addition, the process of the apparatus which decodes the encoding data produced | generated by the 2nd Embodiment should just perform a process contrary to the above. That is, when one block is decoded, the first array element number information (160 bits) is read and analyzed. As a result, it can be seen which of the 32 lines is the same as which line, and how many lines of encoded data exist after the array element number information. Therefore, the encoded data of the line is first decoded, and array element numbers “1”, “2”... Are assigned from the first line. Thereafter, the decoded line data may be output in order according to the array element number.

また、本第2の実施形態に係る処理を、先の説明した第1の実施形態の変形例と同様、コンピュータに実行させるコンピュータプログラムでもって実現することも可能なのは明らかであろう。   It will be apparent that the processing according to the second embodiment can also be realized by a computer program that is executed by a computer, as in the modification of the first embodiment described above.

[第3の実施形態]
第1の実施形態、第2の実施形態では、統合処理の対象となる条件は、着目ラインが既に処理済みのラインと完全一致していることが必要であった。本第3の実施形態では、異なる画素数が予め設定された許容値以下であれば統合する例を説明する。
[Third Embodiment]
In the first embodiment and the second embodiment, the condition to be subjected to the integration process requires that the line of interest completely matches the already processed line. In the third embodiment, an example in which integration is performed when the number of different pixels is equal to or smaller than a preset allowable value will be described.

説明を簡単にするため、ブロックのサイズを8×8画素とする。いま、着目ブロックが図12の上部に示す画像であるものとする。図示の画像において、各ラインの右端の2画素を除く領域には、2種類の画素のみが存在するものとする。また、右端の画素X1乃至X16は、互いに異なる色の画素であるものとする。   In order to simplify the description, the block size is 8 × 8 pixels. Assume that the block of interest is the image shown in the upper part of FIG. In the illustrated image, it is assumed that only two types of pixels exist in the region excluding the two pixels at the right end of each line. The rightmost pixels X1 to X16 are pixels of different colors.

いま、許容値として“2”が設定されているものとする。そして、着目ラインの画素のうち、それ以前のラインとの異なる画素数が最も少ないラインを探し、その数が2画素以下である場合、着目ラインを統合対象として決定する。ただし、ブロックの先頭ラインは、無条件に非統合ラインとする。また、許容値以下の条件を満たす、着目ラインと一致するラインが見つからなかった場合、着目ラインを統合対象のラインとして登録する。   It is assumed that “2” is set as an allowable value. Then, a line having the smallest number of pixels different from the previous lines is searched for among the pixels of the target line, and when the number is two pixels or less, the target line is determined as an integration target. However, the first line of the block is unconditionally a non-integrated line. Further, when a line that matches the target line that satisfies the condition of the allowable value or less is not found, the target line is registered as a line to be integrated.

図示の場合、各ラインの右端の2画素を除くと、8ラインは2種類で構成されることになる。それ故、図12の下部に示す2種類のラインが統合画像の一部として登録される。なお、図12の下部の符号“D”は、ランを稼ぐためのダミーデータである。このダミーデータは、該当する画素に隣接する画素のデータで置き換えることで生成する。   In the case shown in the figure, if the two pixels at the right end of each line are excluded, the eight lines are composed of two types. Therefore, the two types of lines shown in the lower part of FIG. 12 are registered as part of the integrated image. In addition, the code | symbol "D" of the lower part of FIG. 12 is dummy data for earning a run. This dummy data is generated by replacing with data of a pixel adjacent to the corresponding pixel.

そして、各ライン毎に、統合ラインに対して異なると判定された画素X1乃至X16をまとめて、ラインを再構成し、追加する。このとき、追加したラインには、各ラインの異なると判定された画素で構成されることを示す情報が必要になる。ただし、異なると判定された画素数は8の整数倍となるとは限らない。8の整数倍となならない場合には、ダミーデータを付加して8の倍数にする。   Then, the pixels X1 to X16 determined to be different from the integrated line are collected for each line, and the line is reconfigured and added. At this time, the added line needs information indicating that each line is composed of pixels determined to be different. However, the number of pixels determined to be different is not necessarily an integer multiple of 8. If it is not an integer multiple of 8, dummy data is added to make a multiple of 8.

図示の場合、たまたま各ラインの右端の2画素が異なる例を示しているが、実際は、ライン単位に、異なる画素の位置が各ライン毎に同じになるとは限らない。そこで、符号化データには、どの統合ラインに一致するかを示す配列番号情報、各ラインの符号化データ以外に、各ライン毎に統合ラインに対して異なる画素数、及び、その位置情報で構成される符号化データを新に設ける必要がある。   In the case shown in the figure, an example is shown in which the two pixels at the right end of each line are different from each other. However, in practice, the positions of different pixels are not necessarily the same for each line. Therefore, the encoded data is composed of array number information indicating which integrated line matches, the encoded data of each line, the number of pixels different for each integrated line for each line, and position information thereof. It is necessary to newly provide encoded data.

以上実施形態を説明したが、先に説明したように本実施形態は、コンピュータに読込ませ実行させることでも、上記機能を実現できる。通常、コンピュータプログラムは、CD−ROM等のコンピュータ可読記憶媒体に格納されていて、それを読取り装置(CD−ROMドライブ等)にセットして、システムにコピーもしくはインストールすることで実行可能になる。従って、かかるコンピュータ可読記憶媒体も本発明の範疇に入ることも明らかである。   Although the embodiment has been described above, as described above, the present embodiment can also realize the above-described function by being read and executed by a computer. Usually, a computer program is stored in a computer-readable storage medium such as a CD-ROM, and can be executed by setting it in a reader (CD-ROM drive or the like) and copying or installing it in the system. Therefore, it is obvious that such a computer readable storage medium falls within the scope of the present invention.

実施形態における画像符号化装置のブロック構成図である。It is a block block diagram of the image coding apparatus in embodiment. 第1の実施形態における画像データの統合処理の例を示す図である。It is a figure which shows the example of the integration process of the image data in 1st Embodiment. 第1の実施形態におけるバッファメモリに格納されるフラグデータFIの例を示す図である。It is a figure which shows the example of the flag data FI stored in the buffer memory in 1st Embodiment. 第1の実施形態で生成される符号化データのデータ構造を示す図である。It is a figure which shows the data structure of the coding data produced | generated in 1st Embodiment. 第1の実施形態における符号化処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the encoding process in 1st Embodiment. 第2の実施形態における画像データの統合処理の例を示す図である。It is a figure which shows the example of the integration process of the image data in 2nd Embodiment. 第2の実施形態におけるライン比較部の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the line comparison part in 2nd Embodiment. 第2の実施形態におけるバッファメモリに格納される配列番号情報の例を示す図である。It is a figure which shows the example of the arrangement | sequence number information stored in the buffer memory in 2nd Embodiment. 第2の実施形態で生成される符号化データのデータ構造を示す図である。It is a figure which shows the data structure of the coding data produced | generated in 2nd Embodiment. 第2の実施形態における統合部の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the integration part in 2nd Embodiment. 第1の実施形態の変形例における情報処理装置のブロック構成図である。It is a block block diagram of the information processing apparatus in the modification of 1st Embodiment. 第3の実施形態における統合処理の例を示す図である。It is a figure which shows the example of the integration process in 3rd Embodiment.

Claims (7)

複数の画素で構成されるブロック単位に、画像データを符号化する画像符号化装置であって、
着目ブロックの画像データから、ライン単位に画像データを入力する入力手段と、
前記入力手段で入力した着目ラインと一致するラインが、既に入力したライン中に存在するか否か、及び、存在する場合には一致するラインを特定するための識別情報を生成する判定手段と、
前記判定手段が生成した前記識別情報に基づいて、一致するラインが存在しないと判定された各ラインを統合することで、新たなブロックを生成する統合手段と、
前記統合手段で統合した前記新たなブロックの画像データを符号化する符号化手段と、
前記判定手段で生成された前記着目ブロックの各ラインの識別情報と、前記符号化手段で生成された符号化データを、前記着目ブロックの符号化データとして出力する出力手段と
を備えることを特徴とする画像符号化装置。
An image encoding device that encodes image data in units of a block composed of a plurality of pixels,
Input means for inputting image data in units of lines from the image data of the block of interest;
Whether a line that matches the line of interest input by the input unit exists in the already input line, and a determination unit that generates identification information for identifying the matching line if present,
An integration unit that generates a new block by integrating each line determined to have no matching line based on the identification information generated by the determination unit;
Encoding means for encoding the image data of the new block integrated by the integrating means;
Characterized by comprising: identification information for each line of the block of interest generated by the determining means; and output means for outputting the encoded data generated by the encoding means as encoded data of the block of interest. An image encoding device.
前記符号化手段がn個のデータを並列に符号化する場合、前記統合手段で統合された前記新たなブロックをn個のスライスに分割する分割手段とを備え、
前記符号化手段は前記分割手段で分割した各スライスを並列符号化することを特徴とする請求項1に記載の画像符号化装置。
A division unit that divides the new block integrated by the integration unit into n slices when the encoding unit encodes n pieces of data in parallel;
The image encoding apparatus according to claim 1, wherein the encoding unit performs parallel encoding on each slice divided by the dividing unit.
前記判定手段は、前記着目ラインと直前に入力したラインとが一致するか否かを判定することを特徴とする請求項1又は2に記載の画像符号化装置。   The image coding apparatus according to claim 1, wherein the determination unit determines whether or not the line of interest matches a line input immediately before. 前記判定手段は、前記着目ラインと比較する対象のラインを記憶するための記憶手段を備え、
前記着目ラインと前記記憶手段に記憶されたラインとを比較し、一致するラインが存在した場合、一致したラインが存在すると共に、その一致したラインを特定する情報を前記識別情報として生成し、
前記着目ラインと前記記憶手段に記憶されたラインとを比較し、一致するラインが存在しなかった場合、着目ラインを前記記憶手段に新に登録すると共に、登録した着目ラインを特定する情報を前記識別情報として生成する
ことを特徴とする請求項1又は2に記載の画像符号化装置。
The determination unit includes a storage unit for storing a line to be compared with the target line,
When the line of interest is compared with the line stored in the storage means, and there is a matching line, the matching line exists, and information that identifies the matching line is generated as the identification information,
When the line of interest is compared with the line stored in the storage means, and there is no matching line, the line of interest is newly registered in the storage means, and information for specifying the registered line of interest is The image encoding device according to claim 1, wherein the image encoding device is generated as identification information.
複数の画素で構成されるブロック単位に、画像データを符号化する画像符号化装置の制御方法であって、
着目ブロックの画像データから、ライン単位に画像データを入力する入力工程と、
前記入力工程で入力した着目ラインと一致するラインが、既に入力したライン中に存在するか否か、及び、存在する場合には一致するラインを特定するための識別情報を生成する判定工程と、
前記判定工程が生成した前記識別情報に基づいて、一致するラインが存在しないと判定された各ラインを統合することで、新たなブロックを生成する統合工程と、
前記統合工程で統合した前記新たなブロックの画像データを符号化する符号化工程と、
前記判定工程で生成された前記着目ブロックの各ラインの識別情報と、前記符号化工程で生成された符号化データを、前記着目ブロックの符号化データとして出力する出力工程と
を備えることを特徴とする画像符号化装置の制御方法。
A control method for an image encoding device that encodes image data in units of blocks each composed of a plurality of pixels,
An input process for inputting image data in units of lines from the image data of the block of interest;
A determination step of generating identification information for specifying whether or not a line that matches the line of interest input in the input step already exists in the input line, and if there is a match,
Based on the identification information generated by the determination step, an integration step of generating a new block by integrating each line determined to have no matching line;
An encoding step of encoding the image data of the new block integrated in the integration step;
And an output step of outputting the identification information of each line of the target block generated in the determination step and the encoded data generated in the encoding step as encoded data of the target block. Control method for an image encoding device.
コンピュータに読込ませ実行させることで、前記コンピュータを請求項1乃至4のいずれか1項に記載の画像符号化装置として機能させることを特徴とするコンピュータプログラム。   A computer program that causes a computer to function as the image encoding device according to claim 1 by being read and executed by a computer. 請求項6に記載のコンピュータプログラムを格納したことを特徴とするコンピュータ可読記憶媒体。   A computer-readable storage medium storing the computer program according to claim 6.
JP2007148619A 2007-06-04 2007-06-04 Image coding apparatus and control method thereof Withdrawn JP2008301449A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007148619A JP2008301449A (en) 2007-06-04 2007-06-04 Image coding apparatus and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007148619A JP2008301449A (en) 2007-06-04 2007-06-04 Image coding apparatus and control method thereof

Publications (1)

Publication Number Publication Date
JP2008301449A true JP2008301449A (en) 2008-12-11

Family

ID=40174481

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007148619A Withdrawn JP2008301449A (en) 2007-06-04 2007-06-04 Image coding apparatus and control method thereof

Country Status (1)

Country Link
JP (1) JP2008301449A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014036281A (en) * 2012-08-08 2014-02-24 Hitachi Kokusai Electric Inc Low delay image coding apparatus and predictive image control method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014036281A (en) * 2012-08-08 2014-02-24 Hitachi Kokusai Electric Inc Low delay image coding apparatus and predictive image control method thereof

Similar Documents

Publication Publication Date Title
US8331705B2 (en) Image encoding apparatus and method of controlling the same
US8553301B2 (en) Image processing apparatus, method, and program product to perform color-reduction processing for a block
US7826670B2 (en) Data compression apparatus and data compression program storage medium
KR20120065394A (en) Image processing apparatus and processing method therefor
JP4847398B2 (en) Image processing apparatus and method
JPWO2004068844A1 (en) Image compression method, image restoration method, program, and apparatus
JP2008017115A (en) Data compression apparatus and data compression program
JP2008042687A (en) Image processing apparatus, control method therefor, computer program, and computer-readable storage medium
JP4829836B2 (en) Image encoding apparatus, control method for image encoding apparatus, computer program, decoding apparatus, and computer-readable storage medium
US8175401B2 (en) Image processing apparatus and computer readable medium storing program therefor
JP2008311792A (en) Image coding apparatus and control method thereof
US8750607B2 (en) Image processing apparatus capable of efficiently compressing an original image
JP2006121645A (en) Image compression apparatus and image compression program
US7734103B2 (en) Image processing apparatus and image processing method
JP2008301449A (en) Image coding apparatus and control method thereof
JP2008301373A (en) Image encoding apparatus, image decoding apparatus, and control method thereof
JP5141527B2 (en) Image processing method, image processing apparatus, and image processing program
JP4377351B2 (en) Data compression apparatus and data compression program
JP2006246374A (en) Image compression apparatus, image compression method, and image compression program
JPH08223428A (en) Image data compressor and image data expander
JP5523177B2 (en) Image coding apparatus and control method thereof
US7973975B2 (en) Image processing apparatus and image processing method
JP4423812B2 (en) Drawing processing apparatus and drawing processing method
JP4629512B2 (en) Data compression apparatus and data compression program
JP4633577B2 (en) Data compression apparatus and data compression program

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20100907