[go: up one dir, main page]

JP2009111821A - Image encoding device, image decoding device, image data processing device, image encoding method, and image decoding method - Google Patents

Image encoding device, image decoding device, image data processing device, image encoding method, and image decoding method Download PDF

Info

Publication number
JP2009111821A
JP2009111821A JP2007283107A JP2007283107A JP2009111821A JP 2009111821 A JP2009111821 A JP 2009111821A JP 2007283107 A JP2007283107 A JP 2007283107A JP 2007283107 A JP2007283107 A JP 2007283107A JP 2009111821 A JP2009111821 A JP 2009111821A
Authority
JP
Japan
Prior art keywords
data
value
image
unit
average value
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
JP2007283107A
Other languages
Japanese (ja)
Inventor
Kazuki Terada
一樹 寺田
Toyoji Horikawa
豊史 堀川
Masakazu Saegusa
正和 三枝
Kiyohisa Matsui
清尚 松井
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2007283107A priority Critical patent/JP2009111821A/en
Publication of JP2009111821A publication Critical patent/JP2009111821A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)

Abstract

【課題】 画像データをBTC符号化方式によりデータ圧縮する際に生成される符号化圧縮データのデータ量を更に削減可能な画像符号化装置を提供する。
【解決手段】 画像データを複数画素からなる単位ブロックに分割する画像データ分割手段11、単位ブロック内の各要素値の平均値を算出する平均値算出手段12、各要素値の分布のバラツキ度の大小を判定してフラグビットを生成するバラツキ度判定手段13、各要素値と平均値の各大小比較結果を示す比較結果データを生成する比較結果データ生成手段14、各要素値と平均値の各差分値に基づく偏差値を算出する偏差値算出手段15、及び、フラグビットの値に応じて符号化データを、バラツキ度が小さい場合は平均値とフラグビットを合成して生成し、バラツキ度が大きい場合は平均値とフラグビットと比較結果データと偏差値を合成して生成する符号化データ生成手段16を備える。
【選択図】 図1
PROBLEM TO BE SOLVED: To provide an image encoding device capable of further reducing the amount of encoded compressed data generated when image data is compressed by BTC encoding.
An image data dividing unit that divides image data into unit blocks composed of a plurality of pixels, an average value calculating unit that calculates an average value of each element value in the unit block, and a degree of variation in distribution of each element value. A variation degree determining means 13 for determining the magnitude and generating a flag bit, a comparison result data generating means 14 for generating comparison result data indicating each size comparison result of each element value and the average value, each element value and each average value Deviation value calculation means 15 for calculating a deviation value based on the difference value and encoded data according to the value of the flag bit are generated by combining the average value and the flag bit when the variation degree is small. In the case of a larger value, there is provided encoded data generation means 16 for generating an average value, a flag bit, comparison result data, and a deviation value.
[Selection] Figure 1

Description

本発明は、画像データを圧縮する画像符号化装置及び方法、並びに、圧縮された画像データを伸張する画像復号化装置及び方法に関し、更に、当該画像符号化装置と画像復号化装置を使用した画像データ処理装置に関する。   The present invention relates to an image encoding apparatus and method for compressing image data, and an image decoding apparatus and method for decompressing compressed image data. Further, the present invention relates to an image using the image encoding apparatus and the image decoding apparatus. The present invention relates to a data processing apparatus.

入力された画像データを小さな画素ブロックに分割し、符号化圧縮する手法として、BTC(Block Truncation Coding)符号化方式が考案され、画像表示装置に応用されている(例えば、特許文献1及び特許文献2参照)。   As a technique for dividing input image data into small pixel blocks and coding and compressing them, a BTC (Block Truncation Coding) coding method has been devised and applied to image display devices (for example, Patent Document 1 and Patent Document). 2).

従来のBTC符号化方式による符号化処理及び復号化処理の手順と原理を図15、図17及び図18に示す。従来のBTC符号化方式では、複数画素からなる画像データをN×N(通常N=2または4)の小さな画素ブロックに分割し、この画素ブロック単位で処理が実施される。以下の説明では、N=2として説明を行う。   The procedure and principle of encoding processing and decoding processing according to the conventional BTC encoding method are shown in FIGS. In the conventional BTC encoding method, image data composed of a plurality of pixels is divided into small pixel blocks of N × N (normally N = 2 or 4), and processing is performed in units of the pixel blocks. In the following description, it is assumed that N = 2.

図15(A)に示すように、先ず、画像データを2×2画素の画素ブロックに分割する(ステップ#1)。ここで、図15(B)に示すように、各画素値をPij(i=0,1、j=0,1)で表すこととする。各画素ブロックの4つの画素値(各画素がRGB成分の各階調データ或いは輝度データ等で構成される場合は、画素値はRGB各成分或いは輝度の階調値を示す)の平均値AVGを、以下の数1の算出式に基づいて算出する(ステップ#2)。   As shown in FIG. 15A, first, the image data is divided into 2 × 2 pixel blocks (step # 1). Here, as shown in FIG. 15B, each pixel value is represented by Pij (i = 0, 1, j = 0, 1). An average value AVG of four pixel values of each pixel block (in the case where each pixel is composed of RGB component gradation data or luminance data, the pixel value indicates each RGB component or luminance gradation value), It calculates based on the following formula 1 (step # 2).

Figure 2009111821
Figure 2009111821

引き続き、各画素ブロックの4つの画素値Pijと平均値AVGの大小比較を行い、画素値Pijが平均値AVGより大きい場合“0”、小さい場合“1”と符号化し、“0”と“1”で構成される2行2列の比較結果データCij(i=0,1、j=0,1)を作成する(ステップ#3)。次に、各画素ブロックの4つの画素値Pijの平均値AVGからの偏差を示す偏差値SDを、以下の数2の算出式に基づいて算出する(ステップ#4)。   Subsequently, the four pixel values Pij of each pixel block are compared with the average value AVG. When the pixel value Pij is larger than the average value AVG, it is encoded as “0”, and when it is smaller, it is encoded as “1”. 2 "and 2 columns of comparison result data Cij (i = 0, 1, j = 0, 1) are created (step # 3). Next, a deviation value SD indicating a deviation from the average value AVG of the four pixel values Pij of each pixel block is calculated based on the following equation (2) (step # 4).

Figure 2009111821
Figure 2009111821

そして、図16に示すように、ステップ#2で算出した平均値AVGと、ステップ#3で作成した比較結果データCijと、ステップ#4で算出した偏差値SDを合成して、各画素ブロックの符号化データを生成し(ステップ#5)、画像メモリ内に格納する(ステップ#6)。   Then, as shown in FIG. 16, the average value AVG calculated in step # 2, the comparison result data Cij created in step # 3, and the deviation value SD calculated in step # 4 are synthesized, and each pixel block Encoded data is generated (step # 5) and stored in the image memory (step # 6).

上記のステップ#1〜ステップ#6までの処理を全ての画素ブロックについて繰り返し実行する。   The processes from step # 1 to step # 6 are repeated for all pixel blocks.

次に、上記要領で生成され、画像メモリ内に格納された符号化データを元の画像データのデータ形式に復号化して画像表示する処理手順について、図17(A)を参照して説明する。   Next, a processing procedure for decoding the encoded data generated in the above manner and stored in the image memory into the data format of the original image data and displaying the image will be described with reference to FIG.

先ず、画像メモリに格納された各画素ブロックの符号化データから、平均値AVGと比較結果データCijと偏差値SDを夫々読み出す(ステップ#7)。次に、各画素ブロックの復号化後の画素値を、図17(B)に示すように、P’ij(i=0,1、j=0,1)で表し、各画素値P’ijを、平均値AVGと比較結果データCijと偏差値SDを用いて、以下の要領で作成する(ステップ#8)。比較結果データCijが“0”の場合、P’ij=AVG+SD、比較結果データCijが“1”の場合、P’ij=AVG−SDとする。復号化後の画素値P’ijは、符号化前の画像データの画素ブロックの画素値Pijと同じデータ形式及びデータ長(8ビットデータ)である。上記のステップ#7及び#8の処理を全ての画素ブロックについて繰り返し実行し、復号化された各画素ブロックの画像データを、画像表示装置に出力して画像表示する(ステップ#9)。   First, the average value AVG, the comparison result data Cij, and the deviation value SD are read out from the encoded data of each pixel block stored in the image memory (step # 7). Next, as shown in FIG. 17B, the decoded pixel value of each pixel block is represented by P′ij (i = 0, 1, j = 0, 1), and each pixel value P′ij Is generated in the following manner using the average value AVG, the comparison result data Cij, and the deviation value SD (step # 8). When the comparison result data Cij is “0”, P′ij = AVG + SD, and when the comparison result data Cij is “1”, P′ij = AVG−SD. The decoded pixel value P′ij has the same data format and data length (8-bit data) as the pixel value Pij of the pixel block of the image data before encoding. The processes in steps # 7 and # 8 are repeated for all the pixel blocks, and the decoded image data of each pixel block is output to the image display device and displayed (step # 9).

図18は、1つの画素ブロックの各画素値Pijの具体的数値に対する、図15(A)に示す符号化処理で生成される符号化データと、図17(A)に示す復号化処理で生成される1つの画素ブロックの各画素値P’ijの一例を示す。図18では、8ビットデータ(256階調)を想定した2×2画素の画素ブロックの各画素値Pijは、P00=120、P01=131、P10=154、P11=101である。   FIG. 18 shows the encoded data generated by the encoding process shown in FIG. 15A and the decoding process shown in FIG. 17A for specific numerical values of the pixel values Pij of one pixel block. An example of each pixel value P′ij of one pixel block to be performed is shown. In FIG. 18, the pixel values Pij of the pixel block of 2 × 2 pixels assuming 8-bit data (256 gradations) are P00 = 120, P01 = 131, P10 = 154, and P11 = 101.

先ず、図15(A)のステップ#2で、数1の算出式に基づいて平均値AVGを算出すると、127(=(120+131+154+101)/4)となる。尚、数1の演算では小数点以下は四捨五入する。ステップ#3では、比較結果データCijは、P00とP11は平均値AVG(=127)より小さいので、C00=C11=1となり、P01とP10は平均値AVG(=127)より大きいので、C01=C10=0と算出される。更に、ステップ#4で、数2の算出式に基づいて偏差値SDを算出すると、16(=(|120−127|+|131−127|+|154−127|+|101−127|)/4)となる。尚、数2の演算では小数点以下は四捨五入する。符号化データは、8ビットの平均値AVGと、4ビットの比較結果データCijと、8ビットの偏差値SDで構成され、合計20ビットのデータとなる。符号化前の1つの2×2画素の画素ブロックは合計32ビットのデータであったので、データ量の圧縮率は62.5%(=20/32×100)である。   First, in step # 2 in FIG. 15A, the average value AVG is calculated based on the calculation formula of Formula 1 to be 127 (= (120 + 131 + 154 + 101) / 4). In the calculation of Equation 1, the decimal part is rounded off. In step # 3, the comparison result data Cij is C00 = C11 = 1 because P00 and P11 are smaller than the average value AVG (= 127), and P01 and P10 are larger than the average value AVG (= 127). C10 = 0 is calculated. Further, when the deviation value SD is calculated based on the calculation formula of Formula 2 in step # 4, 16 (= (| 120-127 | + | 131-127 | + | 154-127 | + | 101-127 |) / 4). In the calculation of Equation 2, the decimal part is rounded off. The encoded data includes an 8-bit average value AVG, 4-bit comparison result data Cij, and an 8-bit deviation value SD, and is a total of 20-bit data. Since one pixel block of 2 × 2 pixels before encoding is 32-bit data in total, the compression rate of the data amount is 62.5% (= 20/32 × 100).

次に、ステップ#7で、各画素ブロックの20ビットの符号化データを読み出して、ステップ#8で、読み出した平均値AVG(=127)と比較結果データCijと偏差値SD(=16)より、各画素ブロックの8ビットの画素値P’ijを復号化すると、P’00=P’11=127−16=111、P’01=P’10=127+16=143となる。   Next, in step # 7, 20-bit encoded data of each pixel block is read out, and in step # 8, from the read average value AVG (= 127), comparison result data Cij, and deviation value SD (= 16). When the 8-bit pixel value P′ij of each pixel block is decoded, P′00 = P′11 = 127−16 = 111 and P′01 = P′10 = 127 + 16 = 143 are obtained.

特開2001−8206号公報JP 2001-8206 A 特許第3694004号明細書Japanese Patent No. 3696404 特許第2616652号明細書Japanese Patent No. 2616652 特許第3770380号明細書Japanese Patent No. 3770380

従来のBTC符号化処理方法は、上述の如く、また、上記特許文献1にも開示されているように、画像データを複数の画素ブロックに分割し、画素ブロック内の各画素値の平均値AVG、各画素値の偏差値SDと、“0”と“1”で構成される比較結果データCijによる2値化処理を行い、符号化するものである。   As described above and as disclosed in Patent Document 1, the conventional BTC encoding processing method divides image data into a plurality of pixel blocks, and an average value AVG of each pixel value in the pixel block. The binarization process is performed by using the deviation value SD of each pixel value and the comparison result data Cij composed of “0” and “1”, and encoding is performed.

しかしながら、従来のBTC符号化処理方法では、図19(A)に示すように画素ブロックの各画素値Pijが全て同じである場合、平均値AVGは画素ブロックの各画素値Pijと同じ値となり、偏差値SDが0となる。比較結果データCijも全て0となり、当該符号化データに基づいて復号化した各画素値P’ijは、元の画素ブロック内のPij、つまり、平均値AVGと同じなる。この場合、符号化データを復号化する処理において、平均値AVG以外のデータは有効に利用されておらず、符号化データ中の比較結果データCijと偏差値SDは、不必要に符号化データのメモリ容量を費やしていることになる。   However, in the conventional BTC encoding processing method, when the pixel values Pij of the pixel block are all the same as shown in FIG. 19A, the average value AVG becomes the same value as the pixel values Pij of the pixel block, The deviation value SD becomes zero. The comparison result data Cij are all 0, and each pixel value P′ij decoded based on the encoded data is the same as Pij in the original pixel block, that is, the average value AVG. In this case, in the process of decoding the encoded data, data other than the average value AVG is not effectively used, and the comparison result data Cij and the deviation value SD in the encoded data are unnecessarily stored in the encoded data. You are consuming memory capacity.

また、図19(B)に示すように画素ブロックの画素値Pijの1つが、他の画素値と値が1だけ違う場合、例えば、P00=P10=P11=114、P01=113の場合では、平均値AVGは画素値114と等しく、偏差値SDが0となり、比較結果データCijは、C00=C10=C11=0、P01=1となる。当該符号化データに基づいて復号化した各画素値P’ijは、各画素値Pijが全て同じである場合と同様に、全て平均値AVGと同じなる。画素ブロックの画素値Pijの1つが、他の画素値と値が1だけ違う場合においても、各画素値Pijが全て同じである場合と同様に、平均値AVG以外のデータは有効に利用されておらず、符号化データ中の比較結果データCijと偏差値SDは、不必要に符号化データのメモリ容量を費やしていることになる。   As shown in FIG. 19B, when one of the pixel values Pij of the pixel block is different from the other pixel values by 1, for example, P00 = P10 = P11 = 114, P01 = 113, The average value AVG is equal to the pixel value 114, the deviation value SD is 0, and the comparison result data Cij is C00 = C10 = C11 = 0 and P01 = 1. The pixel values P′ij decoded based on the encoded data are all the same as the average value AVG as in the case where the pixel values Pij are all the same. Even when one of the pixel values Pij of the pixel block is different from the other pixel values by 1, the data other than the average value AVG is effectively used as in the case where each pixel value Pij is the same. In other words, the comparison result data Cij and the deviation value SD in the encoded data unnecessarily consume the memory capacity of the encoded data.

つまり、従来のBTC符号化処理方法では、画素ブロックの各画素値Pijが全て同じか、或いは、相互に近似して画素値間の差が顕著でない場合には、符号化データ中の比較結果データCijと偏差値SDは、不必要に符号化データのメモリ容量を費やしていることになる。従って、元の画像データを画素ブロックに分割したときの各画素ブロックに、画素値間の差が顕著でない画素ブロックが、全画素ブロックに対して相当程度含まれる場合は、符号化データを格納する画像メモリのメモリ容量が不必要に多く使用され、有効に利用されていない結果となっている。   In other words, in the conventional BTC encoding processing method, when all the pixel values Pij of the pixel block are the same or when the difference between the pixel values is not remarkable due to approximation to each other, the comparison result data in the encoded data Cij and deviation value SD unnecessarily consume the memory capacity of the encoded data. Therefore, if each pixel block obtained when the original image data is divided into pixel blocks includes a considerable amount of pixel blocks where the difference between the pixel values is not significant with respect to all the pixel blocks, the encoded data is stored. As a result, the memory capacity of the image memory is unnecessarily large and not used effectively.

一方、画像データ処理装置に関しては、液晶表示装置において、1フレーム分の画像データ(階調データ)を格納する画像メモリを用意し、表示するフレームの階調データと1フレーム前の階調データを比較して、当該比較結果に基づいて階調データを補正し、所望の階調データ表示を所望の応答速度で到達するよう処理するオーバードライブ手法が提案されている(例えば、上記特許文献3及び特許文献4参照)。   On the other hand, with regard to the image data processing device, an image memory for storing image data (gradation data) for one frame is prepared in the liquid crystal display device, and the gradation data of the frame to be displayed and the gradation data of the previous frame are stored. In comparison, an overdrive method has been proposed in which gradation data is corrected based on the comparison result, and processing is performed so as to reach a desired gradation data display at a desired response speed (for example, Patent Document 3 and Japanese Patent Application Laid-Open No. H10-228707). (See Patent Document 4).

上述のオーバードライブ手法では、必ず1フレーム分の画像データが必要であり、解像度の増大に伴い、画像データを保持する画像メモリの容量も必然と増大する欠点を持っている。この画像メモリに記憶する画像データを圧縮し、画像メモリの記憶容量を削減する方法として、上記特許文献2に示す従来のBTC符号化処理方法に代表されるような既存の圧縮手法により、画像メモリの記憶容量を削減する方法が考案されている。しかし、上述の如く、従来のBTC符号化処理方法では、符号化データを格納する画像メモリのメモリ容量が不必要に多く使用され、有効に利用されていないため、画像メモリの記憶容量を有効に利用できないという欠点がある。   In the above-described overdrive method, image data for one frame is always required, and as the resolution increases, the capacity of the image memory that holds the image data inevitably increases. As a method for compressing the image data stored in the image memory and reducing the storage capacity of the image memory, the image memory is obtained by an existing compression method represented by the conventional BTC encoding processing method shown in Patent Document 2 above. A method has been devised to reduce the storage capacity of the disk. However, as described above, in the conventional BTC encoding processing method, the memory capacity of the image memory for storing the encoded data is unnecessarily used and not effectively used. There is a disadvantage that it cannot be used.

本発明は、上記問題点に鑑みてなされたものであり、その目的は、所定の画素数をデータ保持単位とする画素データからなる画像データをBTC符号化方式によりデータ圧縮する際に生成される符号化圧縮データのデータ量を更に削減可能な画像符号化装置及び方法、並びに、当該符号化圧縮データを伸張する画像復号化装置及び方法を提供し、第2に、当該画像符号化装置と画像復号化装置を使用した画像データ処理装置を提供する点にある。   The present invention has been made in view of the above problems, and an object of the present invention is to be generated when image data composed of pixel data having a predetermined number of pixels as a data holding unit is compressed by the BTC encoding method. Provided are an image encoding apparatus and method capable of further reducing the amount of encoded compressed data, and an image decoding apparatus and method for expanding the encoded compressed data. Second, the image encoding apparatus and image An object of the present invention is to provide an image data processing device using a decoding device.

上記目的を達成するための本発明に係る画像符号化装置は、所定の画素数をデータ保持単位とする画素データからなる画像データを相互に隣接する複数の前記データ保持単位からなる単位ブロックに分割する画像データ分割手段と、前記単位ブロック毎に、前記画像データ分割手段により生成された前記単位ブロック内の前記各データ保持単位の要素値の平均値を算出する平均値算出手段と、前記単位ブロック毎に、前記単位ブロック内の前記各データ保持単位の要素値の分布のバラツキ度の大小を予め設定された判定基準に基づいて判定して当該判定結果を示すフラグビットを生成するバラツキ度判定手段と、前記単位ブロック毎に、前記単位ブロック内の前記各データ保持単位の要素値と前記平均値算出手段で算出された前記平均値の各大小比較結果を示す比較結果データを生成する比較結果データ生成手段と、前記単位ブロック毎に、前記単位ブロック内の前記各データ保持単位の要素値と前記平均値算出手段で算出された前記平均値の各差分値に基づく前記単位ブロック内の前記各データ保持単位の要素値の前記平均値からの平均的な偏差度を示す偏差値を算出する偏差値算出手段と、前記単位ブロック毎に、前記バラツキ度判定手段により生成された前記フラグビットの値に応じて、前記バラツキ度が小さい場合は、前記平均値と前記フラグビットを合成して符号化データを生成し、前記バラツキ度が大きい場合は、前記平均値と前記フラグビットと前記比較結果データと前記偏差値を合成して符号化データを生成する符号化データ生成手段と、備えてなることを第1の特徴とする。   To achieve the above object, an image encoding apparatus according to the present invention divides image data composed of pixel data having a predetermined number of pixels as a data retention unit into unit blocks composed of a plurality of adjacent data retention units. Image data dividing means, an average value calculating means for calculating an average value of element values of each data holding unit in the unit block generated by the image data dividing means for each unit block, and the unit block A variation degree determination unit that determines the degree of variation in the distribution of element values of each data holding unit in the unit block based on a predetermined determination criterion and generates a flag bit indicating the determination result for each time And, for each unit block, each of the element value of each data holding unit in the unit block and the average value calculated by the average value calculation means Comparison result data generating means for generating comparison result data indicating a small comparison result, and the element value of each data holding unit in the unit block and the average value calculated by the average value calculating means for each unit block Deviation value calculating means for calculating an average deviation degree from the average value of the element value of each data holding unit in the unit block based on each difference value of the unit block; According to the value of the flag bit generated by the variation degree determination means, when the variation degree is small, the average value and the flag bit are combined to generate encoded data, and when the variation degree is large Encoded data generation means for generating encoded data by combining the average value, the flag bit, the comparison result data, and the deviation value. And butterflies.

上記第1の特徴の画像符号化装置によれば、BTC符号化処理による画像データの圧縮が行えるとともに、単位ブロック(従来のBTC符号化処理方法における画素ブロックに相当)の各要素値(従来の画素値に相当)が全て同じか或いは相互に近似して要素値間の差が顕著でない場合には、符号化データが比較結果データと偏差値を含まないデータ構成であるため、当該場合において、符号化処理後の画像データ全体のデータ量を更に圧縮することができるため、不必要に符号化データのメモリ容量を費やすことが回避できる。   According to the image encoding device having the first feature, image data can be compressed by BTC encoding processing, and each element value (corresponding to a pixel block in a conventional BTC encoding processing method) (Corresponding to pixel values) are all the same or approximate to each other and the difference between the element values is not significant, the encoded data is a data structure that does not include the comparison result data and the deviation value. Since the data amount of the entire image data after the encoding process can be further compressed, it is possible to avoid unnecessarily consuming the memory capacity of the encoded data.

ここで、本発明に係る画像符号化装置による単位ブロック毎の符号化データは、従来のBTC符号化処理方法における画素ブロックの符号化データには無い、フラグビットを含むため、その分のデータ量が増加するが、通常の画像データでは、各要素値が全て同じか或いは相互に近似して要素値間の差が顕著でない単位ブロックが相当数存在するので、比較結果データと偏差値を含まない単位ブロックにおけるデータ削減量の方が、フラグビットによるデータ増加量を大きく上回るため、画像データ全体としてデータ量の圧縮が実現できる。   Here, since the encoded data for each unit block by the image encoding device according to the present invention includes flag bits that are not included in the encoded data of the pixel block in the conventional BTC encoding processing method, the amount of data corresponding to that includes However, in normal image data, there are a considerable number of unit blocks in which the element values are all the same or close to each other and the difference between the element values is not significant, so the comparison result data and the deviation value are not included. Since the data reduction amount in the unit block greatly exceeds the data increase amount by the flag bit, the data amount can be compressed as the entire image data.

本発明に係る画像符号化装置は、上記第1の特徴に加えて、更に、前記バラツキ度判定手段は、前記単位ブロック内の全ての前記データ保持単位において、前記データ保持単位の要素値と前記平均値算出手段で算出された前記平均値の差分値の絶対値が所定の判定閾値より小さい場合に、前記バラツキ度が小さいと判定し、それ以外の場合に、前記バラツキ度が大きいと判定することを第2の特徴とする。   In addition to the first feature, the image coding apparatus according to the present invention further includes: the variation degree determination unit includes: an element value of the data holding unit and the data value in all the data holding units in the unit block. When the absolute value of the difference value of the average value calculated by the average value calculation means is smaller than a predetermined determination threshold, it is determined that the variation degree is small, and otherwise, it is determined that the variation degree is large. This is the second feature.

本発明に係る画像符号化装置は、上記第1の特徴に加えて、更に、前記バラツキ度判定手段は、前記偏差値が所定の判定閾値より小さい場合に、前記バラツキ度が小さいと判定し、前記偏差値が前記所定の判定閾値以上の場合に、前記バラツキ度が大きいと判定することを第3の特徴とする。   In addition to the first feature, the image coding apparatus according to the present invention further determines that the variation degree is small when the deviation value is smaller than a predetermined determination threshold, A third feature is that when the deviation value is equal to or greater than the predetermined determination threshold, it is determined that the degree of variation is large.

上記第2または第3の特徴の画像符号化装置によれば、前記バラツキ度判定手段が、前記単位ブロック内の前記各データ保持単位の要素値の分布のバラツキ度の大小を、夫々の判定基準で判定することができる。つまり、第2の特徴における差分値は個々の要素値のバラツキ度を示しており、第3の特徴の偏差値は各要素値の平均的なバラツキ度を示しているため、何れの場合にも、バラツキ度の大小を判定することができる。   According to the image encoding device of the second or third feature, the variation degree determination means determines whether or not the distribution degree of the element value distribution of each data holding unit in the unit block is large. Can be determined. That is, the difference value in the second feature indicates the variation degree of each element value, and the deviation value of the third feature indicates the average variation degree of each element value. The degree of variation can be determined.

本発明に係る画像符号化装置は、上記第1乃至第3の何れかの特徴に加えて、更に、前記符号化データ生成手段は、前記フラグビットの値に関係なく全ての前記単位ブロックに対して、前記平均値と前記フラグビットからなる第1符号化データを生成し、前記フラグビットの値に応じて前記バラツキ度の大きい前記単位ブロックであるか否かを識別して、前記バラツキ度の大きい前記単位ブロックに対してのみ、前記比較結果データと前記偏差値からなる第2符号化データを生成することを第4の特徴とする。   In addition to any one of the first to third features, the image encoding device according to the present invention further includes the encoded data generation means for all the unit blocks regardless of the value of the flag bit. Generating the first encoded data composed of the average value and the flag bit, and identifying whether the unit block has the large variation degree according to the value of the flag bit, A fourth feature is that second encoded data including the comparison result data and the deviation value is generated only for the large unit block.

上記第4の特徴の画像符号化装置によれば、符号化データ全体を第1符号化データと第2符号化データに分離して画像メモリ等に格納することができる。従って、単位ブロック毎に符号長の異なる符号化データの集合として扱う必要がなくなり、符号化データを格納する画像メモリ等の構成を簡単化できる。また、単位ブロック毎の符号化データを合成する場合には、第1符号化データを読み出し、バラツキ度の大きい単位ブロックについてのみ、追加で第2符号化データを読み出して第1符号化データと合成することで、符号化データを得ることが可能となる。   According to the image encoding device having the fourth feature, the entire encoded data can be separated into first encoded data and second encoded data and stored in an image memory or the like. Therefore, it is not necessary to handle as a set of encoded data having different code lengths for each unit block, and the configuration of an image memory or the like for storing the encoded data can be simplified. In addition, when the encoded data for each unit block is synthesized, the first encoded data is read, and only the second encoded data is additionally read and synthesized with the first encoded data only for the unit block having a large variation degree. As a result, encoded data can be obtained.

本発明に係る画像符号化装置は、上記第4の特徴に加えて、更に、前記符号化データを格納する画像メモリを備え、前記画像メモリのメモリ空間が、前記第1符号化データを格納する第1領域と、前記第2符号化データを格納する第2領域に区分されて構成されていることを第5の特徴とする。   In addition to the fourth feature, the image encoding device according to the present invention further includes an image memory for storing the encoded data, and a memory space of the image memory stores the first encoded data. A fifth feature is that the first area is divided into a second area for storing the second encoded data.

上記第5の特徴の画像符号化装置によれば、上記第4の特徴の画像符号化装置の作用効果を具体的に実現することができる。   According to the image coding apparatus having the fifth feature, the operational effects of the image coding apparatus having the fourth feature can be specifically realized.

本発明に係る画像符号化装置は、上記何れかの特徴に加えて、更に、前記符号化データ生成手段は、前記単位ブロック毎に順次前記符号化データを生成している過程で、前記符号化データの累積データ量が所定の上限値を超える場合には、当該符号化データ、及び、それ以降に生成する前記符号化データを、前記比較結果データと前記偏差値を合成せずに生成し、前記バラツキ度判定手段が使用する前記判定基準を、前記バラツキ度が小さく判定され易いように変更することを第6の特徴とする。   In addition to any of the above features, the image encoding device according to the present invention further includes the encoding data generation unit in a process in which the encoded data generation unit sequentially generates the encoded data for each unit block. When the accumulated data amount of data exceeds a predetermined upper limit value, the encoded data and the encoded data generated thereafter are generated without synthesizing the comparison result data and the deviation value, A sixth feature is that the determination criterion used by the variation degree determination unit is changed so that the variation degree is easily determined to be small.

上記第6の特徴の画像符号化装置によれば、符号化データ全体のデータ量を所定範囲内に抑えることができるため、全ての単位ブロックの符号化データを記憶容量の固定された画像メモリ等に記憶することができ、後工程で符号化データを復号化する場合に、データが欠落するのを未然に防止できる。更に、次回以降に符号化処理する画像データに対して、符号化データ全体のデータ量が制限された条件下で、全ての単位ブロックに対してより適切にバラツキ度の大小判定を行うことができ、相対的にバラツキ度の大きい単位ブロックに対して、バラツキ度を反映した復号化に必要な比較結果データと偏差値を付加した符号化データを作成することが可能となる。   According to the image encoding device of the sixth feature, the data amount of the entire encoded data can be suppressed within a predetermined range, so that the encoded data of all the unit blocks is stored in an image memory having a fixed storage capacity, etc. In the case where encoded data is decoded in a later process, it is possible to prevent data from being lost. Furthermore, it is possible to more appropriately determine the degree of variation for all unit blocks under the condition that the data amount of the entire encoded data is limited for image data to be encoded next time. Therefore, it is possible to create encoded data in which comparison result data and a deviation value necessary for decoding reflecting the variation degree are added to a unit block having a relatively large variation degree.

本発明に係る画像符号化装置は、上記何れかの特徴に加えて、更に、前記画素データが1画素中の複数の異なる色成分の各階調データで構成されている場合、1画素中の1つの色成分を前記データ保持単位として扱い、前記画像データ分割手段、前記平均値算出手段、前記バラツキ度判定手段、前記比較結果データ生成手段、前記偏差値算出手段、及び、前記符号化データ生成手段は、夫々の処理を色成分別に処理することを第7の特徴とする。   In addition to any of the above features, the image encoding device according to the present invention further includes 1 in one pixel when the pixel data is composed of gradation data of a plurality of different color components in one pixel. One color component is handled as the data holding unit, the image data dividing means, the average value calculating means, the variation degree determining means, the comparison result data generating means, the deviation value calculating means, and the encoded data generating means The seventh feature is that each processing is performed for each color component.

上記第7の特徴の画像符号化装置によれば、RGBフォーマット等の画素データが1画素中の複数の異なる色成分の各階調データで構成されている場合の画像データに対して、従来のBTC符号化処理方法より圧縮後のデータ量を低減できるデータ圧縮が可能となる。   According to the image coding apparatus of the seventh feature, the conventional BTC is compared with the image data in the case where the pixel data in the RGB format or the like is composed of each gradation data of a plurality of different color components in one pixel. Data compression that can reduce the amount of data after compression by the encoding processing method becomes possible.

本発明に係る画像符号化装置は、上記第1乃至第6の何れかの特徴に加えて、更に、前記画素データが、画素単位の輝度データと、画素単位または相互に隣接する2画素または4画素単位の2種類の色差データで構成されている場合、前記輝度データについては、1画素を前記データ保持単位として扱い、前記2種類の色差データについては、1、2または4画素を前記データ保持単位として扱い、前記画像データ分割手段、前記平均値算出手段、前記バラツキ度判定手段、前記比較結果データ生成手段、前記偏差値算出手段、及び、前記符号化データ生成手段は、夫々の処理を前記輝度データと前記2種類の色差データのデータ別に処理することを第8の特徴とする。   In the image encoding device according to the present invention, in addition to any one of the first to sixth features, the pixel data further includes luminance data in pixel units, pixel units or two adjacent pixels or four pixels. In the case of two types of color difference data in pixel units, for the luminance data, one pixel is handled as the data holding unit, and for the two types of color difference data, 1, 2 or 4 pixels are held in the data Treated as a unit, the image data dividing unit, the average value calculating unit, the variation degree determining unit, the comparison result data generating unit, the deviation value calculating unit, and the encoded data generating unit perform the respective processes. The eighth feature is that processing is performed separately for the luminance data and the two types of color difference data.

上記第8の特徴の画像符号化装置によれば、YUVフォーマット、YUV422フォーマット、YUV411フォーマット等の画素データが、画素単位の輝度データと、画素単位または相互に隣接する2画素または4画素単位の2種類の色差データで構成されている場合の画像データに対して、従来のBTC符号化処理方法より圧縮後のデータ量を低減できるデータ圧縮が可能となる。   According to the image coding apparatus of the eighth feature, pixel data in the YUV format, YUV422 format, YUV411 format, etc. is converted into luminance data in units of pixels and 2 in units of pixels or in units of two or four pixels adjacent to each other. Data compression that can reduce the amount of data after compression is possible for image data in the case of being composed of different types of color difference data, compared to the conventional BTC encoding processing method.

本発明に係る画像符号化装置は、上記第8の特徴に加えて、更に、前記画素データが画素単位の色成分別の階調データで構成されている原画像データを、前記画素データが画素単位の輝度データと、画素単位または相互に隣接する2画素または4画素単位の2種類の色差データで構成される画像データに変換する画像フォーマット変換手段を備えることを第9の特徴とする。   In addition to the eighth feature, the image encoding device according to the present invention further includes original image data in which the pixel data is composed of gradation data for each color component in pixel units, and the pixel data is a pixel. According to a ninth feature of the present invention, there is provided image format conversion means for converting the luminance data in units and image data composed of two types of color difference data in units of pixels or in units of two or four pixels adjacent to each other.

上記第9の特徴の画像符号化装置によれば、RGBフォーマット等の画素データが1画素中の複数の異なる色成分の各階調データで構成されている場合の原画像データを、画像フォーマット変換手段によって、YUV422フォーマットやYUV411フォーマット等の画素データが、画素単位の輝度データと、相互に隣接する2画素または4画素単位の2種類の色差データで構成されている場合の画像データに変換してから、上記第8の特徴の符号化処理を行うため、色差データのデータ量を低減してから符号化処理を行うので、更に圧縮後のデータ量を低減できるデータ圧縮が可能となる。   According to the image coding apparatus of the ninth feature, the original image data in the case where the pixel data in the RGB format or the like is composed of each gradation data of a plurality of different color components in one pixel is converted into image format conversion means. After the pixel data in the YUV422 format, YUV411 format, etc. is converted into image data when it is composed of luminance data in pixel units and two types of color difference data in units of two or four pixels adjacent to each other. Since the encoding process of the eighth feature is performed, the encoding process is performed after reducing the data amount of the color difference data, so that data compression that can further reduce the data amount after compression is possible.

本発明に係る画像復号化装置は、上記第1乃至第6の何れかの特徴の画像符号化装置で符号化された前記符号化データを前記データ保持単位の画素データからなる画像データに復号化する画像復号化装置であって、前記単位ブロック毎に、前記符号化データを構成する前記平均値と前記フラグビット、または、前記平均値と前記フラグビットと前記比較結果データと前記偏差値を、個別に読み出すデータ読み出し手段と、前記データ読み出し手段が読み出した前記フラグビットの値に基づいて、前記単位ブロック内の前記各データ保持単位の要素値の分布のバラツキ度の大小を識別するバラツキ度識別手段と、前記バラツキ度識別手段により前記バラツキ度が大きいと識別された前記単位ブロックに対して、前記データ読み出し手段が読み出した前記平均値と前記比較結果データと前記偏差値に基づいて復号化データを生成する第1復号化手段と、前記バラツキ度識別手段により前記バラツキ度が小さいと識別された前記単位ブロックに対して、前記データ読み出し手段が読み出した前記平均値に基づいて復号化データを生成する第2復号化手段と、を備えてなることを第1の特徴とする。   An image decoding apparatus according to the present invention decodes the encoded data encoded by the image encoding apparatus having any one of the first to sixth features into image data composed of pixel data of the data holding unit. An image decoding device that performs, for each unit block, the average value and the flag bit constituting the encoded data, or the average value, the flag bit, the comparison result data, and the deviation value, Data read means for individually reading, and a variation degree identification for identifying the degree of variation in the distribution of element values of each data holding unit in the unit block based on the value of the flag bit read by the data read means And the data reading means reads out the unit block identified as having a large degree of variation by the means and the degree of variation identifying means. A first decoding unit that generates decoding data based on the average value, the comparison result data, and the deviation value; and the unit block that is identified as having a small variation degree by the variation degree identifying unit. And a second decoding unit that generates decoded data based on the average value read by the data reading unit.

上記第1の特徴の画像復号化装置によれば、本発明に係る画像符号化装置で符号化された符号化データは、バラツキ度が大きい単位ブロックについては、平均値と比較結果データと偏差値を具備するため、第1復号化手段によって各要素値のバラツキを反映して、元の画素データと同じデータ長に伸張された各要素値の復号化データを生成することができ、また、バラツキ度が小さい単位ブロックについては、符号化データが比較結果データと偏差値を具備しないため、第2復号化手段によって各要素値のバラツキが小さいので、そのバラツキを無視して平均値に基づいて、元の画素データと同じデータ長に伸張された各要素値の復号化データを生成することができ、上記第1乃至第6の何れかの特徴の画像符号化装置で符号化された符号化データの復号化(データ伸張)に適した画像復号化装置が提供される。   According to the image decoding device of the first feature, the encoded data encoded by the image encoding device according to the present invention is an average value, comparison result data, and deviation value for a unit block having a large variation degree. Therefore, it is possible to generate the decoded data of each element value expanded to the same data length as the original pixel data by reflecting the variation of each element value by the first decoding means. For a unit block with a small degree, since the encoded data does not have the comparison result data and the deviation value, the variation of each element value by the second decoding means is small, so that the variation is ignored and based on the average value, Decoding data of each element value expanded to the same data length as the original pixel data can be generated and encoded by the image encoding device having any one of the first to sixth features Over the decoding of the data image decoding apparatus which is suitable for (data decompression) is provided.

本発明に係る画像復号化装置は、上記第1の特徴に加えて、更に、前記第1復号化手段は、前記単位ブロック内の復号化後の前記各データ保持単位の要素値を、前記各データ保持単位に対応する前記比較結果データに基づいて、前記平均値に対して前記偏差値を加算或いは減算することにより算出し、前記第2復号化手段は、前記単位ブロック内の復号化後の前記各データ保持単位の要素値を全て前記平均値とすることを第2の特徴とする。   In addition to the first feature, the image decoding apparatus according to the present invention further includes: the first decoding unit calculates an element value of each data holding unit after decoding in the unit block; Based on the comparison result data corresponding to the data holding unit, it is calculated by adding or subtracting the deviation value with respect to the average value, and the second decoding unit is configured to perform decoding after the decoding in the unit block. A second feature is that all the element values of each data holding unit are set to the average value.

上記第2の特徴の画像復号化装置によれば、上記第1の特徴の画像復号化装置の作用効果を奏する第1復号化手段と第2復号化手段を、具体的且つ簡易的に実現することができる。   According to the image decoding device of the second feature, the first decoding unit and the second decoding unit that achieve the operational effects of the image decoding device of the first feature are realized concretely and simply. be able to.

本発明に係る画像復号化装置は、上記第1または第2の特徴に加えて、更に、前記データ読み出し手段は、前記符号化データから前記平均値と前記フラグビットを読み出す第1データ読み出し手段と、前記バラツキ度識別手段により前記バラツキ度が大きいと識別された場合に、前記符号化データから更に前記比較結果データと前記偏差値を読み出す第2データ読み出し手段を備えてなることを第3の特徴とする。   In addition to the first or second feature, the image decoding device according to the present invention further includes a first data reading unit that reads the average value and the flag bit from the encoded data. A third feature is that the apparatus further comprises second data reading means for reading the comparison result data and the deviation value from the encoded data when the degree of variation is identified by the variation degree identifying means. And

上記第3の特徴の画像復号化装置によれば、データ読み出し手段が第1データ読み出し手段と第2データ読み出し手段に分けて構成されているので、第1データ読み出し手段は、読み出し対象の単位ブロックのバラツキ度の大小に関係なく、符号化データの平均値とフラグビットを読み出すことでき、第2データ読み出し手段は、バラツキ度が大きい単位ブロックに対してのみ、符号化データの比較結果データと偏差値を読み出すことができるため、画像符号化装置側で全ての単位ブロックの平均値とフラグビットを1塊の記憶領域に記憶し、バラツキ度が大きい単位ブロックの比較結果データと偏差値を別の1塊の記憶領域に記憶しておく場合に、各記憶領域から個別に平均値とフラグビット、及び、比較結果データと偏差値を分離して効率的に読み出すデータ読み出し手段が実現できる。また、第1データ読み出し手段が読み出す符号化データのデータ幅、第2データ読み出し手段が読み出す符号化データのデータ幅は、夫々固定であるので、第1データ読み出し手段及び第2データ読み出し手段のハードウェア構成を簡単化できる。   According to the image decoding apparatus of the third feature, since the data reading unit is divided into the first data reading unit and the second data reading unit, the first data reading unit is a unit block to be read. The average value and flag bits of the encoded data can be read regardless of the degree of variation of the data, and the second data reading means can detect the deviation from the comparison result data of the encoded data only for the unit block having a large degree of variation. Since the value can be read out, the image encoding device stores the average value and flag bits of all unit blocks in a single storage area, and the comparison result data and deviation value of the unit block having a large degree of variation are stored separately. When storing in one storage area, the average value and flag bit, and the comparison result data and deviation value are separately separated from each storage area. Data reading means for reading a manner can be realized. Further, since the data width of the encoded data read by the first data reading unit and the data width of the encoded data read by the second data reading unit are fixed, the hardware of the first data reading unit and the second data reading unit is fixed. The hardware configuration can be simplified.

本発明に係る画像データ処理装置は、上記第1乃至第4の何れかの特徴の画像符号化装置と、前記画像符号化装置が符号化した符号化データを格納する画像メモリと、前記画像メモリが格納する符号化データを復号化する上記第1乃至第3の何れかの特徴の画像復号化装置と、を備えてなることを特徴とする。   An image data processing device according to the present invention includes an image encoding device having any one of the first to fourth features, an image memory for storing encoded data encoded by the image encoding device, and the image memory And the image decoding device having any one of the first to third features for decoding the encoded data stored in the device.

上記特徴の画像データ処理装置によれば、画像表示に係る画像データとして、従来のBTC符号化処理方法より更にデータ量を圧縮して保存されたデータを扱うことが可能となり、画像データの一時保存に必要なメモリ容量の削減が可能となる。   According to the image data processing apparatus having the above characteristics, it is possible to handle data stored by compressing the data amount as compared with the conventional BTC encoding processing method as image data related to image display, and temporarily storing the image data It is possible to reduce the memory capacity required for the operation.

本発明に係る画像符号化方法は、所定の画素数をデータ保持単位とする画素データからなる画像データを相互に隣接する複数の前記データ保持単位からなる単位ブロックに分割する画像データ分割工程と、前記単位ブロック毎に、前記画像データ分割工程で生成された前記単位ブロック内の前記各データ保持単位の要素値の平均値を算出する平均値算出工程と、前記単位ブロック毎に、前記単位ブロック内の前記各データ保持単位の要素値の分布のバラツキ度の大小を予め設定された判定基準に基づいて判定して当該判定結果を示すフラグビットを生成するバラツキ度判定工程と、前記単位ブロック毎に、前記単位ブロック内の前記各データ保持単位の要素値と前記平均値算出工程で算出された前記平均値の各大小比較結果を示す比較結果データを生成する比較結果データ生成工程と、前記単位ブロック毎に、前記単位ブロック内の前記各データ保持単位の要素値と前記平均値算出工程で算出された前記平均値の各差分値に基づく前記単位ブロック内の前記各データ保持単位の要素値の前記平均値からの平均的な偏差度を示す偏差値を算出する偏差値算出工程と、前記単位ブロック毎に、前記バラツキ度判定工程で生成された前記フラグビットの値に応じて、前記バラツキ度が小さい場合は、前記平均値と前記フラグビットを合成して符号化データを生成し、前記バラツキ度が大きい場合は、前記平均値と前記フラグビットと前記比較結果データと前記偏差値を合成して符号化データを生成する符号化データ生成工程と、備えてなることを特徴とする。   An image encoding method according to the present invention includes an image data dividing step of dividing image data composed of pixel data having a predetermined number of pixels as a data retention unit into unit blocks composed of a plurality of adjacent data retention units; For each unit block, an average value calculating step for calculating an average value of element values of each data holding unit in the unit block generated in the image data dividing step; and for each unit block, in the unit block A variation degree determination step for determining a degree of variation in the distribution of element values of each data holding unit based on a predetermined determination criterion and generating a flag bit indicating the determination result; and for each unit block A comparison result data indicating the result of comparing the magnitude of the element value of each data holding unit in the unit block and the average value calculated in the average value calculating step. A comparison result data generation step for generating data, and for each unit block, the element value of each data holding unit in the unit block and the difference value between the average values calculated in the average value calculation step A deviation value calculating step for calculating a deviation value indicating an average deviation degree from the average value of the element values of the respective data holding units in the unit block, and the variation degree determining step for each unit block. Depending on the value of the flag bit, when the degree of variation is small, the average value and the flag bit are combined to generate encoded data, and when the degree of variation is large, the average value and the flag And an encoded data generation step of generating encoded data by combining the bit, the comparison result data, and the deviation value.

上記特徴の画像符号化方法によれば、BTC符号化処理による画像データの圧縮が行えるとともに、単位ブロックの各要素値が全て同じか或いは相互に近似して要素値間の差が顕著でない場合には、符号化データが比較結果データと偏差値を含まないデータ構成であるため、当該場合において、符号化処理後の画像データ全体のデータ量を更に圧縮することができるため、不必要に符号化データのメモリ容量を費やすことが回避できる。   According to the image encoding method of the above feature, when image data can be compressed by BTC encoding processing, and when the element values of the unit blocks are all the same or close to each other and the difference between the element values is not remarkable Since the encoded data has a data structure that does not include the comparison result data and the deviation value, in this case, the data amount of the entire image data after the encoding process can be further compressed. It is possible to avoid consuming data memory capacity.

ここで、本発明に係る画像符号化方法による単位ブロック毎の符号化データは、従来のBTC符号化処理方法における画素ブロックの符号化データには無い、フラグビットを含むため、その分のデータ量が増加するが、通常の画像データでは、各要素値が全て同じか或いは相互に近似して要素値間の差が顕著でない単位ブロックが相当数存在するので、比較結果データと偏差値を含まない単位ブロックにおけるデータ削減量の方が、フラグビットによるデータ増加量を大きく上回るため、画像データ全体としてデータ量の圧縮が実現できる。   Here, since the encoded data for each unit block according to the image encoding method according to the present invention includes flag bits that are not included in the encoded data of the pixel block in the conventional BTC encoding processing method, the amount of data corresponding to that includes However, in normal image data, there are a considerable number of unit blocks in which the element values are all the same or close to each other and the difference between the element values is not significant, so the comparison result data and the deviation value are not included. Since the data reduction amount in the unit block greatly exceeds the data increase amount by the flag bit, the data amount can be compressed as the entire image data.

本発明に係る画像復号化方法は、上記特徴の画像符号化方法で符号化された前記符号化データを符号化前のデータ形式に復号化する画像復号化方法であって、前記単位ブロック毎に、前記符号化データを構成する前記平均値と前記フラグビットを、個別に読み出す第1データ読み出し工程と、前記データ読み出し工程で読み出した前記フラグビットの値に基づいて、前記単位ブロック内の前記各データ保持単位の要素値の分布のバラツキ度の大小を識別するバラツキ度識別工程と、前記バラツキ度識別工程において前記バラツキ度が大きいと識別された場合に、前記符号化データを構成する前記比較結果データと前記偏差値を、個別に読み出すデータ第2読み出し工程と、前記バラツキ度識別工程において前記バラツキ度が大きいと識別された場合に、前記第1データ読み出し工程で読み出した前記平均値と、前記第2データ読み出し工程で読み出した前記比較結果データと前記偏差値に基づいて復号化データを生成する第1復号化工程と、前記バラツキ度識別工程において前記バラツキ度が小さいと識別された場合に、前記第1データ読み出し工程で読み出した前記平均値に基づいて復号化データを生成する第2復号化工程と、を備えてなることを特徴とする。   An image decoding method according to the present invention is an image decoding method for decoding the encoded data encoded by the image encoding method having the above characteristics into a data format before encoding, for each unit block. The average value and the flag bits constituting the encoded data are individually read out from the first data reading step, and the flag bits read out in the data reading step are used to determine the respective values in the unit block. A variation degree identifying step for identifying the degree of variation in the distribution of element values of the data holding unit, and the comparison result constituting the encoded data when the variation degree is identified as being large in the variation degree identifying step In the data second reading step for reading out the data and the deviation value individually and in the variation degree identifying step, it is identified that the variation degree is large. A first decoding step for generating decoded data based on the average value read in the first data reading step, the comparison result data read in the second data reading step, and the deviation value; And a second decoding step for generating decoded data based on the average value read in the first data reading step when the variation degree is identified as being small in the variation degree identifying step. It is characterized by that.

上記特徴の画像復号化方法によれば、本発明に係る画像符号方法で符号化された符号化データは、バラツキ度が大きい単位ブロックについては、平均値と比較結果データと偏差値を具備するため、第1及び第2データ読み出し工程で平均値と比較結果データと偏差値を読み出し、第1復号化工程において各要素値のバラツキを反映して、元の画素データと同じデータ長に伸張された各要素値の復号化データを生成することができ、また、バラツキ度が小さい単位ブロックについては、符号化データが比較結果データと偏差値を具備しないため、第2復号化工程において各要素値のバラツキが小さいので、そのバラツキを無視して第1データ読み出し工程で読み出した平均値に基づいて、元の画素データと同じデータ長に伸張された各要素値の復号化データを生成することができ、本発明に係る画像符号化方法で符号化された符号化データの復号化(データ伸張)に適した画像復号化方法が提供される。   According to the image decoding method of the above feature, the encoded data encoded by the image encoding method according to the present invention includes an average value, comparison result data, and a deviation value for a unit block having a large variation degree. The average value, the comparison result data, and the deviation value are read in the first and second data reading steps, and the first decoding step is expanded to the same data length as the original pixel data, reflecting the variation of each element value. Decoded data of each element value can be generated, and for a unit block with a small variation degree, the encoded data does not include the comparison result data and the deviation value. Therefore, in the second decoding step, each element value Since the variation is small, each element value expanded to the same data length as the original pixel data based on the average value read in the first data reading step ignoring the variation. It can generate-coding data, an image decoding method which are suitable for coded decoding of coded data in the image coding method according to the present invention (data decompression) is provided.

次に、本発明に係る画像符号化装置及び方法(以下、適宜「本発明符号化装置」及び「本発明符号化方法」と称す)、本発明に係る画像復号化装置及び方法(以下、適宜「本発明復号化装置」及び「本発明復号化方法」と称す)、及び、本発明符号化装置及び本発明復号化装置を備えた画像データ処理装置について、図面を参照して説明する。   Next, the image coding apparatus and method according to the present invention (hereinafter referred to as “the present invention coding apparatus” and “the present invention coding method” as appropriate), and the image decoding apparatus and method according to the present invention (hereinafter referred to as appropriate). The image data processing apparatus including the “encoding apparatus of the present invention” and the “decoding method of the present invention”, and the encoding apparatus and the decoding apparatus of the present invention will be described with reference to the drawings.

〈第1実施形態〉
先ず、本発明符号化装置と本発明復号化装置の概略のシステム構成について説明する。図1に示すように、本発明符号化装置10は、画像データ分割手段11、平均値算出手段12、バラツキ度判定手段13、比較結果データ生成手段14、偏差値算出手段15、符号化データ生成手段16、及び、画像メモリ17を備えて構成され、本発明復号化装置20は、データ読み出し手段21、バラツキ度識別手段22、第1復号化手段23、及び、第2復号化手段24を備えて構成される。
<First Embodiment>
First, a schematic system configuration of the encoding apparatus and decoding apparatus of the present invention will be described. As shown in FIG. 1, the encoding apparatus 10 of the present invention includes an image data dividing unit 11, an average value calculating unit 12, a variation degree determining unit 13, a comparison result data generating unit 14, a deviation value calculating unit 15, and an encoded data generating unit. The decoding device 20 of the present invention includes a data reading unit 21, a variation degree identifying unit 22, a first decoding unit 23, and a second decoding unit 24. Configured.

画像データ分割手段11は、所定の画素数(例えば、1、2または4画素)をデータ保持単位とする画素データからなる画像データを相互に隣接する複数のデータ保持単位からなる単位ブロックに分割する。本第1実施形態では、符号化処理対象の画像データとして、図2に示すように、解像度がVGA(X方向:640画素、Y方向:480画素)、色表示形式がRGBフォーマット(色の3原色、R:赤、G:緑、B:青の各階調データで色表示を行う)、階調がRGB各8ビットの1677万色データであって、1画素のRGB各成分をデータ保持単位とする画素データからなる画像データを想定する。以下、説明の便宜上、符号化処理対象の画像データを、符号化処理後の画像データと区別するために、適宜、「1次画像データ」と称す場合がある。   The image data dividing unit 11 divides image data composed of pixel data having a predetermined number of pixels (for example, 1, 2 or 4 pixels) as a data retention unit into unit blocks composed of a plurality of adjacent data retention units. . In the first embodiment, as the image data to be encoded, as shown in FIG. 2, the resolution is VGA (X direction: 640 pixels, Y direction: 480 pixels), and the color display format is RGB format (color 3). Primary color, R: red, G: green, B: blue, each color data is displayed), and the gradation is 8-bit RGB data of 16.77 million colors, and each pixel's RGB components are data holding units. Assume that the image data is composed of pixel data. Hereinafter, for convenience of description, image data to be encoded may be referred to as “primary image data” as appropriate in order to distinguish it from image data after encoding.

また、単位ブロックは、従来のBTC符号化方式のN×N画素ブロック(通常N=2または4)に該当するもので、本第1実施形態では、図3に示すように、RGB各色成分当たり2×2画素で構成される画素ブロックを使用する。従って、1次画像データのRGB各成分は、画像データ分割手段11によって、X方向に320ブロック、Y方向に240ブロックの単位ブロックに分割される。尚、RGB各成分の単位ブロックを構成する4つの画素の要素値(RGB階調値0〜255の8ビットデータ)は、適宜、図3に示すように、Pij(i=0,1、j=0,1)で表す。   In addition, the unit block corresponds to an N × N pixel block (usually N = 2 or 4) of the conventional BTC encoding method. In the first embodiment, as shown in FIG. A pixel block composed of 2 × 2 pixels is used. Therefore, the RGB components of the primary image data are divided by the image data dividing unit 11 into unit blocks of 320 blocks in the X direction and 240 blocks in the Y direction. It should be noted that the element values (8-bit data of RGB gradation values 0 to 255) constituting the unit block of each RGB component are appropriately set to Pij (i = 0, 1, j) as shown in FIG. = 0, 1).

平均値算出手段12は、各単位ブロックの4つの要素値Pijの平均値AVGを、従来のBTC符号化方式と同様に、以下の数3の算出式に基づいて算出して、後の処理のために一時的に記憶する。本第1実施形態では、各要素値Pijが8ビットデータであるので、平均値AVGも同じく8ビットデータである。   The average value calculation means 12 calculates the average value AVG of the four element values Pij of each unit block based on the following equation 3 as in the conventional BTC encoding method, For temporary storage. In the first embodiment, since each element value Pij is 8-bit data, the average value AVG is also 8-bit data.

Figure 2009111821
Figure 2009111821

バラツキ度判定手段13は、各単位ブロックの4つの要素値Pijの分布のバラツキ度の大小を予め設定された判定基準に基づいて判定して当該判定結果を示す1ビットのフラグビットFLGを生成する。本第1実施形態では、単位ブロック毎に、各要素値Pijと平均値AVGの差分の絶対値(|Pij−AVG|)が予め定められた閾値Dth以上か未満であるかの大小比較判定を行い、単位ブロック内の4つの画素の内の少なくとも1つの要素値において、当該絶対値(|Pij−AVG|)が閾値Dth以上の場合には、バラツキ度が大きいと判定して、フラグビットFLGを“1”に設定する。また、単位ブロック内の4つの画素の全ての要素値において、当該絶対値(|Pij−AVG|)が閾値Dth未満の場合には、バラツキ度が小さいと判定して、フラグビットFLGを“0”に設定する。   The variation degree determination means 13 determines the degree of variation of the distribution of the four element values Pij of each unit block based on a predetermined criterion, and generates a 1-bit flag bit FLG indicating the determination result. . In the first embodiment, for each unit block, a magnitude comparison determination is made as to whether the absolute value (| Pij−AVG |) of the difference between each element value Pij and the average value AVG is greater than or less than a predetermined threshold Dth. When the absolute value (| Pij−AVG |) is equal to or greater than the threshold value Dth in at least one element value of the four pixels in the unit block, it is determined that the degree of variation is large, and the flag bit FLG Is set to “1”. If the absolute value (| Pij−AVG |) is less than the threshold value Dth among all the element values of the four pixels in the unit block, it is determined that the degree of variation is small, and the flag bit FLG is set to “0”. Set to "".

比較結果データ生成手段14は、単位ブロック毎に、単位ブロック内の4つの要素値Pijと平均値AVGの各大小比較結果を示す4ビットの比較結果データを生成する。各単位ブロックの大小比較結果は、各要素値Pijに1対1で対応するもので、Cij(i=0,1、j=0,1)で表す。ここで、Pij>AVGの場合にCij=0、Pij≦AVGの場合にCij=1となる。   The comparison result data generating means 14 generates 4-bit comparison result data indicating the respective magnitude comparison results of the four element values Pij and the average value AVG in the unit block for each unit block. The size comparison result of each unit block corresponds to each element value Pij on a one-to-one basis and is represented by Cij (i = 0, 1, j = 0, 1). Here, Cij = 0 when Pij> AVG, and Cij = 1 when Pij ≦ AVG.

偏差値算出手段15は、単位ブロック毎に、単位ブロック内の4つの要素値Pijと平均値AVGの各差分値に基づく各要素値Pijの平均値AVGからの平均的な偏差度を示す偏差値SDを、従来のBTC符号化方式と同様に、以下の数4の算出式に基づいて算出して、後の処理のために一時的に記憶する。本第1実施形態では、各要素値Pijが8ビットデータであるので、偏差値SDも同じく8ビットデータとする。   The deviation value calculation means 15 is, for each unit block, a deviation value indicating an average degree of deviation from the average value AVG of each element value Pij based on each difference value between the four element values Pij in the unit block and the average value AVG. The SD is calculated based on the following equation 4 and stored temporarily for later processing, as in the conventional BTC encoding method. In the first embodiment, since each element value Pij is 8-bit data, the deviation value SD is also 8-bit data.

Figure 2009111821
Figure 2009111821

符号化データ生成手段16は、単位ブロック毎に、フラグビットFLGの値に応じて、バラツキ度が小さい場合(FLG=0)は、平均値AVGとフラグビットFLGを合成して9ビットの符号化データECD9(第1符号化データに相当)を生成し、バラツキ度が大きい場合(FLG=1)は、平均値AVGとフラグビットFLGと比較結果データCijと偏差値SDを合成して21ビットの符号化データECD21を生成し、夫々画像メモリ17に格納する。尚、符号化データECD21は、比較結果データCijと偏差値SDを12ビットの部分符号化データECD12(第2符号化データに相当)と捉えれば、9ビットの符号化データECD9と12ビットの部分符号化データECD12を合成したものとなる。図4に、符号化データECD9及び符号化データECD21のデータ構成を模式的に示す。   The encoded data generation means 16 synthesizes the average value AVG and the flag bit FLG and encodes 9 bits when the degree of variation is small (FLG = 0) according to the value of the flag bit FLG for each unit block. When the data ECD9 (corresponding to the first encoded data) is generated and the degree of variation is large (FLG = 1), the average value AVG, the flag bit FLG, the comparison result data Cij, and the deviation value SD are combined to generate 21 bits. Encoded data ECD21 is generated and stored in the image memory 17, respectively. If the comparison result data Cij and the deviation value SD are regarded as 12-bit partial encoded data ECD12 (corresponding to the second encoded data), the encoded data ECD21 has 9-bit encoded data ECD9 and a 12-bit partial. The encoded data ECD12 is synthesized. FIG. 4 schematically shows the data structure of the encoded data ECD9 and the encoded data ECD21.

画像メモリ17は、符号化データECD9及びECD21を格納するための記憶装置または記憶手段であり、符号化データ記憶用の専用メモリとして構成されるか、或いは、他のデータ等の記憶にも使用される汎用メモリの一部記憶領域を符号化データ記憶用に占用する形態で構成されている。尚、本第1実施形態では、画像メモリ17は、本発明符号化装置10に付属する構成であるが、本発明復号化装置20に付属する構成、或いは、本発明符号化装置10及び本発明復号化装置20とは独立して設ける構成であっても構わない。   The image memory 17 is a storage device or storage means for storing the encoded data ECD9 and ECD21, and is configured as a dedicated memory for storing the encoded data, or used for storing other data. The general-purpose memory has a partial storage area for storing encoded data. In the first embodiment, the image memory 17 is a configuration attached to the encoding device 10 of the present invention. However, a configuration attached to the decoding device 20 of the present invention, or the encoding device 10 of the present invention and the present invention. The configuration may be provided independently of the decoding device 20.

符号化データECD9またはECD21の画像メモリ17への格納方法は、画像メモリ17の構成に依存して、2通りの方法が考えられる。尚、X方向に320、Y方向に240の合計76800(=320×240)の単位ブロックを逐次選択する手順は、例えば、左上隅に位置する単位ブロックから順に開始し、+X方向(右方向)に320ブロック走査し、1段ずつ−Y方向(下方向)に移動して、右方向の走査を240回繰り返し、最終的に右下隅の単位ブロックを選択して終了する。   Depending on the configuration of the image memory 17, there are two possible methods for storing the encoded data ECD 9 or ECD 21 in the image memory 17. Note that the procedure for sequentially selecting a total of 76800 (= 320 × 240) unit blocks of 320 in the X direction and 240 in the Y direction starts, for example, in order from the unit block located in the upper left corner, and + X direction (right direction) Scan 320 blocks, move one step at a time in the -Y direction (downward), repeat the scan in the right direction 240 times, finally select the unit block in the lower right corner, and finish.

符号化データの画像メモリ17への第1の格納方法は、画像メモリ17が、図5に示すように、9ビットの符号化データECD9を格納するための9ビットのデータ幅の第1領域と、12ビットの部分符号化データECD12を格納するための12ビットのデータ幅の第2領域に区分して構成されている場合に特化された格納方法である。この場合、符号化データ生成手段16は、逐次選択された単位ブロック毎に、フラグビットFLGの値に関係なく、符号化データECD9を生成して、画像メモリ17の9ビット幅の第1領域に並列的に格納する。画像メモリ17の第1領域に格納した後、フラグビットFLGの値が“1”の場合にのみ、部分符号化データECD12を生成して、画像メモリ17の12ビット幅の第2領域に並列的に、しかも、1つ前のフラグビットFLGの値が“1”の単位ブロックの部分符号化データECD12を格納したアドレスに連続して格納する。ここで、画像メモリ17の第1領域のアドレス深さは、全ての単位ブロック分(76800)が用意されているのに対して、第2領域のアドレス深さは、例えば、第1領域のアドレス深さの半分(38400)が用意されている。つまり、全単位ブロックの内、各要素値Pijのバラツキ度の大きい単位ブロック(FLG=1)は、閾値Dthを適切に設定することで、半分以下に抑えることができるとの経験則に基づいている。従って、第2領域のアドレス深さは、閾値Dthの設定値に応じて変化する。   As shown in FIG. 5, the first storage method of the encoded data in the image memory 17 includes a first area having a 9-bit data width for storing the 9-bit encoded data ECD9. This is a storage method specialized in the case of being divided into a second area having a 12-bit data width for storing the 12-bit partially encoded data ECD12. In this case, the encoded data generation means 16 generates encoded data ECD9 for each unit block that is sequentially selected, regardless of the value of the flag bit FLG, and stores the encoded data ECD9 in the first area of 9-bit width in the image memory 17. Store in parallel. After being stored in the first area of the image memory 17, the partial encoded data ECD 12 is generated only when the value of the flag bit FLG is “1”, and the partial encoded data ECD 12 is generated in parallel with the second area of the image memory 17. In addition, the partial encoded data ECD12 of the unit block whose value of the previous flag bit FLG is “1” is stored successively. Here, the address depth of the first area of the image memory 17 is prepared for all unit blocks (76800), whereas the address depth of the second area is, for example, the address of the first area. Half the depth (38400) is provided. That is, based on an empirical rule that unit blocks (FLG = 1) having a large variation degree of each element value Pij among all unit blocks can be suppressed to half or less by appropriately setting the threshold value Dth. Yes. Accordingly, the address depth of the second area changes according to the set value of the threshold value Dth.

符号化データの画像メモリ17への第2の格納方法は、画像メモリ17が、1ビット幅のFIFO(First In First Out)メモリで構成されている場合に特化された格納方法である。この場合、符号化データ生成手段16は、逐次選択された単位ブロック毎に、フラグビットFLGの値に関係なく、符号化データECD9を生成して、画像メモリ17に、平均値AVG、フラグビットFLGの順に1ビットずつ記憶し、フラグビットFLGの値が“1”の場合にのみ、引き続き部分符号化データECD12を生成して符号化データECD9の後に1ビットずつ記憶する。或いは、符号化データ生成手段16は、フラグビットFLGの値が“0”の場合、符号化データECD9を生成して、画像メモリ17に、平均値AVG、フラグビットFLGの順に1ビットずつ記憶し、フラグビットFLGの値が“1”の場合、符号化データECD21を生成して、前半の符号化データECD9の部分を平均値AVG、フラグビットFLGの順に1ビットずつ記憶し、引き続き、後半の部分符号化データECD12を1ビットずつ記憶する。ここで、画像メモリ17の記憶容量は、全ての単位ブロック分(76800)の9ビットの符号化データECD9の格納用の76800×9ビットと、全体の半分の単位ブロック(38400)の12ビットの部分符号化データECD12の格納用の38400×12ビットを合計したビット数(1152000)がRGB各成分に用意されている。つまり、全単位ブロックの内、各要素値Pijのバラツキ度の大きい単位ブロック(FLG=1)は、後述するように、閾値Dthを適切に設定することで、半数以下に抑えることができるとの経験則に基づいている。従って、画像メモリ17の記憶容量は、閾値Dthの設定値に応じて変化する。   The second storage method of the encoded data in the image memory 17 is a storage method specialized when the image memory 17 is composed of a 1-bit wide FIFO (First In First Out) memory. In this case, the encoded data generation means 16 generates encoded data ECD9 for each unit block selected sequentially, regardless of the value of the flag bit FLG, and stores the average value AVG and the flag bit FLG in the image memory 17. Only when the value of the flag bit FLG is “1”, the partial encoded data ECD12 is continuously generated and stored bit by bit after the encoded data ECD9. Alternatively, when the value of the flag bit FLG is “0”, the encoded data generation unit 16 generates the encoded data ECD9 and stores the encoded data ECD9 in the image memory 17 bit by bit in the order of the average value AVG and the flag bit FLG. When the value of the flag bit FLG is “1”, the encoded data ECD21 is generated, and the portion of the first half of the encoded data ECD9 is stored one bit at a time in the order of the average value AVG and the flag bit FLG. Partially encoded data ECD12 is stored bit by bit. Here, the storage capacity of the image memory 17 is 76800 × 9 bits for storing 9-bit encoded data ECD9 of all unit blocks (76800), and 12 bits of half of the entire unit block (38400). The total number of bits (1152000) of 38400 × 12 bits for storing the partially encoded data ECD12 is prepared for each RGB component. That is, among all the unit blocks, the unit block (FLG = 1) having a large variation degree of each element value Pij can be suppressed to less than half by appropriately setting the threshold value Dth, as will be described later. Based on rules of thumb. Accordingly, the storage capacity of the image memory 17 changes according to the set value of the threshold value Dth.

データ読み出し手段21は、単位ブロック毎に、画像メモリ17に格納された符号化データECD9またはECD21を各別に読み出すように構成されている。具体的には、データ読み出し手段21は、符号化データECD9を読み出す第1データ読み出し手段21aと部分符号化データECD12を読み出す第2データ読み出し手段21bで構成されている。   The data reading means 21 is configured to read the encoded data ECD9 or ECD21 stored in the image memory 17 for each unit block. Specifically, the data reading unit 21 includes a first data reading unit 21a that reads the encoded data ECD9 and a second data reading unit 21b that reads the partially encoded data ECD12.

バラツキ度識別手段22は、第1データ読み出し手段21aが読み出した符号化データECD9のフラグビットFLGの値に基づいて、単位ブロック内の各要素値Pijの分布のバラツキ度の大小を識別する。   The variation degree identifying unit 22 identifies the degree of variation in the distribution of the element values Pij in the unit block based on the value of the flag bit FLG of the encoded data ECD9 read by the first data reading unit 21a.

データ読み出し手段21が、画像メモリ17から符号化データECD9またはECD21を読み出す方法は、符号化データECD9またはECD21の画像メモリ17への格納方法と同様に、画像メモリ17の構成に依存して、2通りの方法が考えられる。   The method by which the data reading means 21 reads the encoded data ECD9 or ECD21 from the image memory 17 depends on the configuration of the image memory 17 as well as the method for storing the encoded data ECD9 or ECD21 in the image memory 17. A street method is conceivable.

符号化データの画像メモリ17からの第1の読み出し方法は、上述した符号化データの画像メモリ17への第1の格納方法に対応するものであり、画像メモリ17が、9ビットの符号化データECD9を格納するための9ビットのデータ幅の第1領域と、12ビットの部分符号化データECD12を格納するための12ビットのデータ幅の第2領域に区分して構成されている場合に特化された読み出し方法である。この場合、第1データ読み出し手段21aが、逐次選択された単位ブロック毎に、フラグビットFLGの値に関係なく、画像メモリ17の9ビット幅の第1領域から9ビットの符号化データECD9を各ビット並列的に読み出す。そして、読み出した符号化データECD9の内のフラグビットFLGの値が“1”の場合にのみ、第2データ読み出し手段21bが、画像メモリ17の12ビット幅の第2領域から12ビットの部分符号化データECD12を各ビット並列的に読み出す。   The first method for reading the encoded data from the image memory 17 corresponds to the first method for storing the encoded data in the image memory 17 described above, and the image memory 17 stores the encoded data of 9 bits. Specially, it is divided into a first area having a 9-bit data width for storing ECD9 and a second area having a 12-bit data width for storing 12-bit partially encoded data ECD12. This is a generalized reading method. In this case, the first data reading means 21a converts the 9-bit encoded data ECD9 from the 9-bit wide first area of the image memory 17 to each unit block sequentially selected regardless of the value of the flag bit FLG. Read in bit parallel. Then, only when the value of the flag bit FLG in the read encoded data ECD9 is “1”, the second data reading means 21b performs the 12-bit partial code from the 12-bit wide second area of the image memory 17. The data ECD12 is read out in parallel with each bit.

ここで、画像メモリ17の第1領域には、全ての単位ブロックの符号化データECD9が、単位ブロックの走査順に格納されているので、同じく単位ブロックの走査順に読み出すことで、対応する単位ブロックの符号化データECD9が正しく読み出される。また、画像メモリ17の第2領域には、フラグビットFLGの値が“1”のバラツキ度の大きい単位ブロックの部分符号化データECD12だけが、単位ブロックの走査順に連続的に格納されているので、つまり、フラグビットFLGの値が“0”のバラツキ度の小さい単位ブロックの記憶領域を空けずに詰めて格納されているので、対応する単位ブロックの部分符号化データECD12が単位ブロック毎に順番に正しく読み出される。   Here, since the encoded data ECD9 of all the unit blocks is stored in the first area of the image memory 17 in the scanning order of the unit blocks, reading the corresponding unit block in the same order in the scanning order of the unit blocks. The encoded data ECD9 is read correctly. In the second area of the image memory 17, only the partial encoded data ECD12 of the unit block having a large variation degree with the value of the flag bit FLG being “1” is continuously stored in the unit block scanning order. That is, since the storage area of the unit block having a small variation degree with the flag bit FLG value of “0” is stored without being vacated, the partial encoded data ECD12 of the corresponding unit block is sequentially assigned to each unit block. Will be read correctly.

符号化データの画像メモリ17からの第2の読み出し方法は、上述した符号化データの画像メモリ17への第2の格納方法に対応するものであり、画像メモリ17が、1ビット幅のFIFOメモリで構成されている場合に特化された読み出し方法である。この場合、第1データ読み出し手段21aが、逐次選択された単位ブロック毎に、フラグビットFLGの値に関係なく、画像メモリ17から9ビットの符号化データECD9を1ビットずつシリアルに読み出す。そして、読み出した符号化データECD9の内のフラグビットFLGの値が“1”の場合にのみ、第2データ読み出し手段21bが、引き続き画像メモリ17から12ビットの部分符号化データECD12を1ビットずつシリアルに読み出す。   The second method for reading the encoded data from the image memory 17 corresponds to the second method for storing the encoded data in the image memory 17 described above, and the image memory 17 is a FIFO memory having a 1-bit width. This is a reading method specialized for the case where In this case, the first data reading means 21a serially reads the 9-bit encoded data ECD9 from the image memory 17 bit by bit for each unit block selected sequentially, regardless of the value of the flag bit FLG. Then, only when the value of the flag bit FLG in the read encoded data ECD9 is “1”, the second data reading means 21b continues to output the 12-bit partial encoded data ECD12 from the image memory 17 bit by bit. Read serially.

ここで、画像メモリ17には、全ての単位ブロックの符号化データECD9またはECD21が、単位ブロックの走査順に格納されているので、同じく単位ブロックの走査順に全ての単位ブロックの符号化データECD9またはECD21に共通してその先頭部分に位置する符号化データECD9を読み出すことで、対応する単位ブロックの符号化データECD9が正しく読み出される。また、フラグビットFLGの値が“1”のバラツキ度の大きい単位ブロックの符号化データECD21は、符号化データECD9の後に部分符号化データECD12が追加されているので、フラグビットFLGの値が“1”の場合は、当該単位ブロックの符号化データECD21を読み出すことができる。また、フラグビットFLGの値が“0”の場合は、次の操作順の単位ブロックの符号化データECD9またはECD21を読み出すことができる。つまり、フラグビットFLGの値を確認することで、最初に読み出した符号化データECD9で当該単位ブロックの符号化データが完結しているのか、まだその後に部分符号化データECD12が読み出されずに残っているのかが分かるのである。   Here, since the encoded data ECD9 or ECD21 of all the unit blocks is stored in the image memory 17 in the scanning order of the unit blocks, the encoded data ECD9 or ECD21 of all the unit blocks is similarly stored in the scanning order of the unit blocks. By reading the encoded data ECD9 located in the head part in common, the encoded data ECD9 of the corresponding unit block is read correctly. Further, since the encoded data ECD21 of the unit block having a large variation degree with the flag bit FLG value “1” has the partial encoded data ECD12 added after the encoded data ECD9, the value of the flag bit FLG is “ In the case of 1 ″, the encoded data ECD21 of the unit block can be read. When the value of the flag bit FLG is “0”, the encoded data ECD9 or ECD21 of the unit block in the next operation order can be read. In other words, by checking the value of the flag bit FLG, whether the encoded data of the unit block is completed with the encoded data ECD9 read out first, or the partial encoded data ECD12 remains unread after that. You can see if there is.

第1復号化手段23は、バラツキ度識別手段22によりバラツキ度が大きいと識別された単位ブロックに対して、データ読み出し手段21が読み出した符号化データECD21の平均値AVGと比較結果データCijと偏差値SDに基づいて復号化データP’ij(i=0,1、j=0,1)を生成する。復号化データP’ijは、当該単位ブロックの復号化後の要素値を表しており、符号化前の要素値Pijに夫々対応する。具体的には、従来のBTC符号化方式と同様に、比較結果データCijが“0”の場合、P’ij=AVG+SD、比較結果データCijが“1”の場合、P’ij=AVG−SDとする。   The first decoding unit 23 differs from the average value AVG of the encoded data ECD21 read by the data reading unit 21 and the comparison result data Cij with respect to the unit block identified as having a large variation by the variation degree identifying unit 22. Based on the value SD, decrypted data P′ij (i = 0, 1, j = 0, 1) is generated. The decoded data P′ij represents the element value after decoding of the unit block, and corresponds to the element value Pij before encoding. Specifically, as in the conventional BTC encoding method, when comparison result data Cij is “0”, P′ij = AVG + SD, and when comparison result data Cij is “1”, P′ij = AVG−SD. And

第2復号化手段24は、バラツキ度識別手段22によりバラツキ度が小さいと識別された単位ブロックに対して、データ読み出し手段21が読み出した符号化データECD9の平均値AVGに基づいて復号化データP’ij(i=0,1、j=0,1)を生成する。具体的には、従来のBTC符号化方式とは異なり、符号化データECD9には比較結果データCij及び偏差値SDは含まれていないので、これらのデータは用いずに、各復号化データP’ijを一律に平均値AVGとする。   The second decoding unit 24 decodes the decoded data P based on the average value AVG of the encoded data ECD9 read by the data reading unit 21 for the unit block identified by the variation degree identifying unit 22 as having a small variation degree. 'ij (i = 0, 1, j = 0, 1) is generated. Specifically, unlike the conventional BTC encoding method, since the encoded data ECD9 does not include the comparison result data Cij and the deviation value SD, these decoded data P ′ are not used without using these data. Let ij be the average value AVG uniformly.

第1復号化手段23または第2復号化手段24で復号化された復号化データP’ijは、符号化前の単位ブロックの要素値Pijと同じデータ形式及びデータ長(8ビットのRGBデータ)である。   The decoded data P′ij decoded by the first decoding unit 23 or the second decoding unit 24 has the same data format and data length (8-bit RGB data) as the element value Pij of the unit block before encoding. It is.

以上、本発明符号化装置10を構成する各手段11〜16、及び、本発明復号化装置20を構成する各手段21〜24について詳細に説明したが、これらの各手段は、マイクロプロセッサやマイクロコンピュータ上において夫々の機能をコンピュータプログラムの実行により実現するソフトウェア手段による構成、或いは、夫々の機能をハードウェアで実現するハードウェア手段による構成、更には、ソフトウェア手段とハードウェア手段を折衷した構成の何れの構成であっても良い。   As described above, each of the means 11 to 16 constituting the encoding apparatus 10 of the present invention and each of the means 21 to 24 constituting the decoding apparatus 20 of the present invention have been described in detail. Configuration by software means for realizing each function by execution of a computer program on a computer, configuration by hardware means for realizing each function by hardware, and configuration by combining software means and hardware means Any configuration may be used.

次に、本発明符号化装置10が本発明符号化方法によるBTC符号化処理(データ圧縮処理)を実行する手順について、図6を参照して説明する。尚、図6は、本発明符号化方法の概略の処理手順を示すフローチャートである。   Next, the procedure in which the encoding apparatus 10 of the present invention executes the BTC encoding process (data compression process) according to the encoding method of the present invention will be described with reference to FIG. FIG. 6 is a flowchart showing a schematic processing procedure of the encoding method of the present invention.

先ず、本発明符号化装置10が1次画像データ(例えば、VGA、RGBフォーマットデータ)を受け取ると、画像データ分割手段11が、1次画像データを相互に隣接する複数のデータ保持単位からなる単位ブロックに分割する(画像データ分割工程:ステップ#11)。単位ブロックは、一例として図3に示す2×2画素で構成される画素ブロックを使用する。   First, when the encoding apparatus 10 of the present invention receives primary image data (for example, VGA, RGB format data), the image data dividing means 11 is a unit composed of a plurality of data holding units adjacent to each other. Divide into blocks (image data dividing step: step # 11). As a unit block, for example, a pixel block composed of 2 × 2 pixels shown in FIG. 3 is used.

次に、平均値算出手段12が、順番に選択された1つの単位ブロックの4つの要素値Pijの平均値AVGを上記数3の算出式により算出する(平均値算出工程:ステップ#12)。尚、数3の演算では小数点以下は四捨五入する。   Next, the average value calculation means 12 calculates the average value AVG of the four element values Pij of one unit block selected in order by the above equation 3 (average value calculation step: step # 12). In the calculation of Equation 3, the decimal part is rounded off.

引き続き、バラツキ度判定手段13が、当該選択されている単位ブロック内の4つの要素値Pijの分布のバラツキ度の大小を上述の要領で判定して、その判定結果に基づいてフラグビットFLGに“0”または“1”を設定する(バラツキ度判定工程:ステップ#13)。   Subsequently, the variation degree determination means 13 determines the degree of variation of the distribution of the four element values Pij in the selected unit block in the above-described manner, and sets the flag bit FLG based on the determination result. “0” or “1” is set (variation degree determination step: step # 13).

上記ステップ#13においてフラグビットFLGに“1”が設定された場合、比較結果データ生成手段14が、当該選択されている単位ブロック内の4つの要素値Pijと平均値AVGの各大小比較結果を示す4ビットの比較結果データCijを上述の要領で生成する(比較結果データ生成工程:ステップ#14)。   When “1” is set in the flag bit FLG in the above step # 13, the comparison result data generating means 14 displays the respective size comparison results of the four element values Pij and the average value AVG in the selected unit block. The 4-bit comparison result data Cij shown is generated as described above (comparison result data generation step: step # 14).

ステップ#14に引き続き、偏差値算出手段15が、単位ブロック内の4つの要素値Pijと平均値AVGの各差分値に基づく各要素値Pijの平均値AVGからの平均的な偏差度を示す偏差値SDを、上記数4の算出式に基づいて算出する(偏差値算出工程:ステップ#15)。尚、数4の演算では小数点以下は四捨五入する。   Subsequent to step # 14, the deviation value calculation means 15 causes the deviation indicating the average degree of deviation from the average value AVG of each element value Pij based on the difference values between the four element values Pij and the average value AVG in the unit block. The value SD is calculated based on the equation (4) (deviation value calculating step: step # 15). In the calculation of Equation 4, the decimal part is rounded off.

ステップ#15に引き続き、符号化データ生成手段16が、ステップ#12〜#15で算出した平均値AVGとフラグビットFLGと比較結果データCijと偏差値SDを合成して21ビットの符号化データECD21を生成し、画像メモリ17に格納する(符号化データ生成工程1:ステップ#16)。   Subsequent to step # 15, the encoded data generating means 16 combines the average value AVG, the flag bit FLG, the comparison result data Cij, and the deviation value SD calculated in steps # 12 to # 15 to generate 21-bit encoded data ECD21. Is generated and stored in the image memory 17 (encoded data generation step 1: step # 16).

上記ステップ#13においてフラグビットFLGに“0”が設定された場合、比較結果データ生成手段14による比較結果データCijの算出、及び、偏差値算出手段15による偏差値SDの算出を実行せずに、符号化データ生成手段16が、ステップ#12及び#13で算出した平均値AVGとフラグビットFLGを合成して9ビットの符号化データECD9を生成し、画像メモリ17に格納する(符号化データ生成工程2:ステップ#17)。   When “0” is set to the flag bit FLG in step # 13, the comparison result data Cij is not calculated by the comparison result data generating unit 14 and the deviation value SD is not calculated by the deviation value calculating unit 15. The encoded data generating means 16 generates the 9-bit encoded data ECD9 by combining the average value AVG calculated in steps # 12 and # 13 and the flag bit FLG, and stores it in the image memory 17 (encoded data). Generation process 2: Step # 17).

上記符号化データ生成工程1及び2では、符号化データECD21及びECD9の画像メモリ17に格納は、上述の第1または第2の格納方法の何れかによって行なわれるので、重複する説明は割愛する。   In the encoded data generation steps 1 and 2, the encoded data ECD21 and ECD9 are stored in the image memory 17 by any one of the above-described first and second storage methods, and therefore redundant description is omitted.

1つの単位ブロックに対してステップ#16または#17の符号化データ生成工程が終了すると、終了した単位ブロックが最後の単位ブロックか否かを判定し(ステップ#18)、最後の単位ブロックでない場合は、次の単位ブロックを選択して(ステップ#19)、ステップ#12〜#18までの処理を、最後の単位ブロックと判定されるまで繰り返す。尚、同じ単位ブロックのRGB各成分について、ステップ#12〜#17の各処理は3回実行される。   When the encoded data generation process of step # 16 or # 17 is completed for one unit block, it is determined whether the completed unit block is the last unit block (step # 18). Selects the next unit block (step # 19), and repeats the processing from steps # 12 to # 18 until it is determined as the last unit block. In addition, each process of step # 12- # 17 is performed 3 times about each RGB component of the same unit block.

次に、本発明復号化装置20が本発明復号化方法によるBTC復号化処理(データ伸張処理)を実行する手順について、図7を参照して説明する。尚、図7は、本発明復号化方法の概略の処理手順を示すフローチャートである。   Next, the procedure for the decoding apparatus 20 of the present invention to execute the BTC decoding process (data expansion process) according to the decoding method of the present invention will be described with reference to FIG. FIG. 7 is a flowchart showing a schematic processing procedure of the decoding method of the present invention.

先ず、第1データ読み出し手段21aが、順番に選択された1つの単位ブロックの符号化データECD9またはECD21の内の符号化データECD9を構成する8ビットの平均値AVGと1ビットのフラグビットFLGを、画像メモリ17から読み出す(第1データ読み出し工程:ステップ#21)。符号化データECD9の読み出し方法は、画像メモリ17の構成に応じた上記第1または第2の読み出し方法によって行う。   First, the first data reading means 21a obtains the 8-bit average value AVG and the 1-bit flag bit FLG constituting the encoded data ECD9 of the encoded data ECD9 or ECD21 of one unit block selected in order. Then, it reads out from the image memory 17 (first data reading step: step # 21). The method of reading the encoded data ECD9 is performed by the first or second reading method according to the configuration of the image memory 17.

引き続き、バラツキ度識別手段22が、ステップ#21で読み出したフラグビットFLGの値に基づいて、フラグビットFLGの値が“1”の場合は、当該単位ブロック内の各要素値Pijの分布のバラツキ度が大きいと識別し、逆に、フラグビットFLGの値が“0”の場合は、バラツキ度が小さいと識別する(バラツキ度識別工程:ステップ#22)。   Subsequently, when the value of the flag bit FLG is “1” based on the value of the flag bit FLG read by the step # 21, the variation degree identifying unit 22 varies the distribution of the element values Pij in the unit block. On the contrary, when the value of the flag bit FLG is “0”, it is identified that the variation degree is small (variation degree identification step: step # 22).

ステップ#22でバラツキ度が大きいと識別された場合(FLG=1)、第2データ読み出し手段21bが、符号化データECD21の部分符号化データECD12を構成する4ビットの比較結果データCij(i=0,1、j=0,1)と8ビットの偏差値SDを、個別に読み出す(第2データ読み出し工程:ステップ#23)。部分符号化データECD12の読み出し方法は、画像メモリ17の構成に応じた上記第1または第2の読み出し方法によって行う。   If it is determined in step # 22 that the degree of variation is large (FLG = 1), the second data reading unit 21b performs 4-bit comparison result data Cij (i = i) constituting the partial encoded data ECD12 of the encoded data ECD21. 0, 1, j = 0, 1) and the 8-bit deviation value SD are individually read out (second data reading step: step # 23). The method of reading the partially encoded data ECD 12 is performed by the first or second reading method according to the configuration of the image memory 17.

ステップ#23に引き続いて、第1復号化手段23が、ステップ#21で読み出した平均値AVGと、ステップ#23で読み出した比較結果データCijと偏差値SDに基づいて、当該単位ブロック内の各要素値の復号化データP’ijを生成して、復号化データP’ijを表示出力する画像表示装置に出力する(第1復号化工程:ステップ#24)。具体的には、従来のBTC符号化方式と同様に、比較結果データCijが“0”の場合、P’ij=AVG+SD、比較結果データCijが“1”の場合、P’ij=AVG−SDとする。   Subsequent to step # 23, the first decoding unit 23 determines each value in the unit block based on the average value AVG read in step # 21, the comparison result data Cij read in step # 23, and the deviation value SD. Decoded element data P′ij is generated and output to the image display device that displays and outputs the decoded data P′ij (first decoding step: step # 24). Specifically, as in the conventional BTC encoding method, when comparison result data Cij is “0”, P′ij = AVG + SD, and when comparison result data Cij is “1”, P′ij = AVG−SD. And

ステップ#22でバラツキ度が小さいと識別された場合(FLG=0)、第2データ読み出し手段21bによる比較結果データCijと偏差値SDの読み出しは行わずに、第2復号化手段24が、当該単位ブロック内の4つの要素値の復号化データP’ijを、一律にステップ#21で読み出した平均値AVGとして生成して、その復号化データP’ijを画像表示装置に出力する(第2復号化工程:ステップ#25)。   If it is determined in step # 22 that the degree of variation is small (FLG = 0), the second data reading means 21b does not read the comparison result data Cij and the deviation value SD, and the second decoding means 24 The decoded data P′ij of the four element values in the unit block is uniformly generated as the average value AVG read in step # 21, and the decoded data P′ij is output to the image display device (second). Decryption step: Step # 25).

1つの単位ブロックに対して第1または第2復号化工程(ステップ#24または#25)が終了すると、終了した単位ブロックが最後の単位ブロックか否かを判定し(ステップ#26)、最後の単位ブロックでない場合は、次の単位ブロックを選択して(ステップ#27)、ステップ#21〜#26までの処理を、最後の単位ブロックと判定されるまで繰り返す。尚、同じ単位ブロックのRGB各成分について、ステップ#21〜#25の各処理は3回実行される。   When the first or second decoding step (step # 24 or # 25) is completed for one unit block, it is determined whether the completed unit block is the last unit block (step # 26). If it is not a unit block, the next unit block is selected (step # 27), and the processing from steps # 21 to # 26 is repeated until it is determined as the last unit block. In addition, each process of step # 21- # 25 is performed 3 times about RGB component of the same unit block.

図8に、1つの単位ブロックにおける本発明符号化方法及び本発明復号化方法の処理結果の具体例を示す。   FIG. 8 shows a specific example of processing results of the encoding method and decoding method of the present invention in one unit block.

単位ブロックの256階調の要素値Pijが、P00=120、P10=131、P01=154、P11=101の場合で、閾値Dthが13に設定されている場合(A)と29に設定されている場合(B)について説明する。平均値AVGは、閾値Dthに関係なく、127と算出される。バラツキ度の大小を判定するために、要素値Pijと平均値AVGの差分の絶対値|Pij−AVG|を算出すると、(7,5,28,26)となる。閾値Dthが13に設定されている場合(A)は、2つの要素値で閾値Dth以上となり、バラツキ度が大きいと判定され、フラグビットFLGは“1”に設定される。一方、閾値Dthが29に設定されている場合(B)では、全ての要素値で閾値Dth未満となり、バラツキ度が小さいと判定され、フラグビットFLGは“0”に設定される。何れのケースにおいても、比較結果データCijは、(1,0,0,1)であり、偏差値SDは16である。しかし、閾値Dthが13に設定されている場合(A)は、フラグビットFLGが“1”であるので、21ビットの符号化データECD21が生成され、画像メモリに格納される。また、復号化処理では、復号化データP’ijが、比較結果データCijが“0”の場合、P’ij=AVG+SD、比較結果データCijが“1”の場合、P’ij=AVG−SDと計算されるので、P’00=111、P’10=143、P’01=143、P’11=111と復号化される。一方、閾値Dthが29に設定されている場合(B)では、フラグビットFLGが“0”であるので、9ビットの符号化データECD9が生成される。また、復号化処理では、復号化データP’ijが一律に平均値AVG(=127)に復号化される。   When the element value Pij for 256 gradations of the unit block is P00 = 120, P10 = 131, P01 = 154, P11 = 101, and the threshold Dth is set to 13, (A) and 29 are set. The case (B) will be described. The average value AVG is calculated as 127 regardless of the threshold value Dth. If the absolute value | Pij−AVG | of the difference between the element value Pij and the average value AVG is calculated in order to determine the degree of variation, (7, 5, 28, 26) is obtained. When the threshold value Dth is set to 13, (A) is equal to or greater than the threshold value Dth with two element values, it is determined that the degree of variation is large, and the flag bit FLG is set to “1”. On the other hand, when the threshold value Dth is set to 29 (B), it is determined that all the element values are less than the threshold value Dth, the degree of variation is small, and the flag bit FLG is set to “0”. In any case, the comparison result data Cij is (1, 0, 0, 1), and the deviation value SD is 16. However, when the threshold value Dth is set to 13, since the flag bit FLG is “1”, 21-bit encoded data ECD21 is generated and stored in the image memory. In the decoding process, when the decoded data P′ij is “0”, the comparison result data Cij is P′ij = AVG + SD, and when the comparison result data Cij is “1”, P′ij = AVG−SD. Therefore, P′00 = 111, P′10 = 143, P′01 = 143, and P′11 = 111 are decoded. On the other hand, when the threshold value Dth is set to 29 (B), since the flag bit FLG is “0”, 9-bit encoded data ECD9 is generated. In the decoding process, the decoded data P′ij is uniformly decoded into the average value AVG (= 127).

次に、本発明符号化装置10によって符号化された画像データの1次画像データからのデータ圧縮率について検討する。   Next, the data compression rate from the primary image data of the image data encoded by the encoding device 10 of the present invention will be examined.

上述の説明と同様、1次画像データとして、上述したRGB各8ビットの1677万色のVGAデータを想定すると、1次画像データのデータ量は、(640×480)画素×24ビット=7372800ビットである。同じデータ量の1次画像データに対して、従来のBTC符号化方式による符号化処理を施した場合、RGBの1成分当たりの単位ブロック(2×2画素、32ビット)が、8ビットの平均値AVGと4ビットの比較結果データCijと8ビットの偏差値SDの合計20ビットの符号化データに変換されるため、データ圧縮率は62.5%(=20/32×100)、全体のデータ量は4608000ビットとなる。   As in the above description, assuming that the above-described VGA data of 16.77 million colors of 8 bits for each of RGB is assumed as the primary image data, the data amount of the primary image data is (640 × 480) pixels × 24 bits = 7372800 bits. It is. When primary image data having the same data amount is encoded by the conventional BTC encoding method, the unit block (2 × 2 pixels, 32 bits) per RGB component is an 8-bit average. Since the value AVG and the 4-bit comparison result data Cij and the 8-bit deviation value SD are converted into encoded data of 20 bits in total, the data compression rate is 62.5% (= 20/32 × 100). The amount of data is 4608000 bits.

これに対して、本発明符号化装置10によって符号化された画像データは、単位ブロック(2×2画素、32ビット)の各要素値Pijのバラツキ度の大小に応じて、9ビットまたは21ビットの符号化データECD9またはECD21に変換されるため、符号長が一定でない。全ての単位ブロックのバラツキ度が大きい場合は、データ圧縮率は65.625%(=21/32×100)、全体のデータ量は4838400ビットとなり、従来のBTC符号化方式による符号化処理より圧縮率が上昇して悪化するが、逆に、全ての単位ブロックのバラツキ度が小さい場合は、データ圧縮率は28.125%(=9/32×100)、全体のデータ量は2073600ビットとなり、従来のBTC符号化方式による符号化処理より大幅に圧縮率が減少して圧縮後のデータ量を低減できる。従って、全ての単位ブロックの約8.34%(19200ブロック)を超える単位ブロックにおいてバラツキ度が小さいと、圧縮率が従来のBTC符号化方式によるデータ圧縮率(62.5%)より低下する。   On the other hand, the image data encoded by the encoding apparatus 10 of the present invention is 9 bits or 21 bits depending on the degree of variation of each element value Pij of the unit block (2 × 2 pixels, 32 bits). The encoded data is converted into the encoded data ECD9 or ECD21. Therefore, the code length is not constant. When the degree of variation of all the unit blocks is large, the data compression rate is 65.625% (= 21/32 × 100) and the total data amount is 4838400 bits, which is compressed by the encoding process using the conventional BTC encoding method. On the contrary, when the degree of variation of all unit blocks is small, the data compression rate is 28.125% (= 9/32 × 100), and the total data amount is 2073600 bits. Compared with the conventional BTC encoding method, the compression rate is significantly reduced, and the amount of data after compression can be reduced. Therefore, if the degree of variation is small in unit blocks exceeding about 8.34% (19200 blocks) of all unit blocks, the compression rate is lower than the data compression rate (62.5%) by the conventional BTC encoding method.

1次画像データが、写真画像や動画像の自然画像のデータである場合は、単位ブロックサイズが小さければ、単位ブロック内の全ての要素において、各要素値Pijとその平均値AVGとの差分の絶対値(|Pij−AVG|)は小さく抑制される可能性が大きくなると考えられる。即ち、単位ブロックサイズが2×2画素の場合では、単位ブロック内の4つの要素値Pijが殆ど同じ値となり、当該差分の絶対値が所定の閾値Dth未満となる単位ブロックの存在比率が高くなることが期待される。   When the primary image data is data of a natural image such as a photographic image or a moving image, if the unit block size is small, the difference between each element value Pij and its average value AVG is obtained for all elements in the unit block. It is considered that the absolute value (| Pij−AVG |) is likely to be suppressed to a small value. That is, when the unit block size is 2 × 2 pixels, the four element values Pij in the unit block are almost the same value, and the existence ratio of the unit block whose absolute value of the difference is less than the predetermined threshold Dth is increased. It is expected.

幾枚かの写真画像を用いて検証した結果、閾値Dthを13と設定した場合(要素値Pijは0〜255)、全ての単位ブロックの約70%の単位ブロックが、当該差分の絶対値が閾値Dth(=13)未満、つまり、バラツキ度が小さいと判定され、画像データ全体でのデータ圧縮率は略40%になるという結果が得られた。従来のBTC符号化方式では、データ圧縮率は62.5%であったので、20%以上の圧縮率低減が図れることが分かる。   As a result of verification using several photographic images, when the threshold value Dth is set to 13 (element value Pij is 0 to 255), about 70% of all unit blocks have an absolute value of the difference. It was determined that the threshold value was less than the threshold value Dth (= 13), that is, the degree of variation was small, and the data compression rate of the entire image data was approximately 40%. In the conventional BTC encoding method, the data compression rate was 62.5%, so it can be seen that the compression rate can be reduced by 20% or more.

上記検証結果を更に詳細に見ると、上記の幾枚かの写真画像例では、9ビットの符号化データECD9と21ビットの符号化データECD21の生成比率が概ね7:3であるので、更に余裕を見て、符号化データECD21の生成比率を全単位ブロックに対して50%以下と想定して画像メモリの記憶容量をRGB各成分に対して1152000ビット確保すれば、全ての単位ブロックに対して、2つの符号化データECD9及びECD21を確実に格納することが可能となる。   Looking at the verification results in more detail, in some of the above photographic image examples, the generation ratio of 9-bit encoded data ECD9 and 21-bit encoded data ECD21 is approximately 7: 3. Assuming that the generation ratio of the encoded data ECD21 is 50% or less with respect to all the unit blocks, and if the storage capacity of the image memory is 1152000 bits for each RGB component, all the unit blocks The two encoded data ECD9 and ECD21 can be reliably stored.

〈第2実施形態〉
次に、本発明符号化装置及び方法、本発明復号化装置及び方法の第2実施形態について図9〜図12を参照して説明する。
Second Embodiment
Next, a second embodiment of the encoding apparatus and method of the present invention and the decoding apparatus and method of the present invention will be described with reference to FIGS.

上記第1実施形態では、1次画像データとして、色表示形式がRGBフォーマットのデータを想定したが、色表示形式としては、RGBフォーマット以外に、YUVフォーマット(Y:輝度、U、V:色差の各階調データで色表示を行う)であっても、同様に各成分の要素値Pijに対して本発明符号化方法による符号化処理及び本発明復号化方法による復号化処理を行うことが可能である。   In the first embodiment, the data of the RGB format is assumed as the primary image data, but the YUV format (Y: luminance, U, V: color difference) is used as the color display format in addition to the RGB format. Similarly, it is possible to perform the encoding process by the encoding method of the present invention and the decoding process by the decoding method of the present invention on the element value Pij of each component. is there.

更に、人間の視覚特性は、輝度に敏感であるが、色差には鈍感であるため、1画素毎に、輝度データ(Y)及び2種類の色差データ(U、V)を夫々備える非圧縮型(RGBデータを基準とする)のYUVフォーマット(YUV444)に対して、2種類の色差データ(U、V)を、水平方向に隣接する2画素毎或いは水平垂直方向に隣接する2画素(2×2画素)毎に1つずつ設けることで、画像データを圧縮することが可能である。この場合、2画素または4画素中の1画素または3画素を間引くか、平均を取ることで1つの要素値を作成する。   Furthermore, human visual characteristics are sensitive to luminance, but are insensitive to color differences, so that each pixel has luminance data (Y) and two types of color difference data (U, V). For the YUV format (YUV 444) (based on RGB data), two types of color difference data (U, V) are converted into two pixels adjacent in the horizontal direction or two pixels (2 × Image data can be compressed by providing one for every two pixels. In this case, one element value is created by thinning out or averaging one or three pixels out of two or four pixels.

斯かる圧縮型のYUVフォーマットとして、YUV422フォーマット、YUV411フォーマット等がある。図9に、4×4画素分のRGBデータに対応する、YUV422フォーマットとYUV411フォーマットのデータ構成を模式的に示す図であり、各YUVフォーマットにおける各成分のデータ量及びRGBフォーマットからのデータ圧縮率を示している。   As such a compression type YUV format, there are a YUV422 format, a YUV411 format, and the like. FIG. 9 is a diagram schematically showing the data configuration of the YUV422 format and YUV411 format corresponding to RGB data for 4 × 4 pixels, and the data amount of each component in each YUV format and the data compression rate from the RGB format. Is shown.

以下の数5及び数6に、RGBフォーマットと非圧縮型YUVフォーマット(YUV444)の間の各成分間の変換式を示す。   Equations 5 and 6 below show conversion equations between components between the RGB format and the uncompressed YUV format (YUV444).

Figure 2009111821
Figure 2009111821

Figure 2009111821
Figure 2009111821

本第2実施形態では、図2に示すようなRGBデータを入力画像データとして受け付けた後に、YUVフォーマットに変換して1次画像データを生成した後に、当該YUVフォーマットの1次画像データに対して、上記第1実施形態と同様の処理手順で本発明符号化方法による符号化処理を施して、単位ブロック毎に符号化データECD9またはECD21を生成して画像メモリに格納する。   In the second embodiment, after receiving RGB data as shown in FIG. 2 as input image data, after converting to YUV format to generate primary image data, the primary image data in the YUV format is generated. Then, the encoding process according to the encoding method of the present invention is performed in the same processing procedure as in the first embodiment, and the encoded data ECD9 or ECD21 is generated for each unit block and stored in the image memory.

また、本第2実施形態では、画像メモリに格納された単位ブロック毎の符号化データECD9またはECD21を、上記第1実施形態と同様の処理手順で本発明復号化方法による復号化処理を施して、符号化前の単位ブロックの各要素値Pijに対応するYUVフォーマットの復号化データP’ijを生成し、当該YUVフォーマットの復号化データP’ijをRGBフォーマットに逆変換して、画像表示装置に出力する。   In the second embodiment, the encoded data ECD9 or ECD21 for each unit block stored in the image memory is subjected to a decoding process by the decoding method of the present invention in the same processing procedure as in the first embodiment. Then, YUV-format decoded data P′ij corresponding to each element value Pij of the unit block before encoding is generated, and the YUV-format decoded data P′ij is inversely converted into the RGB format, and the image display device Output to.

従って、第2実施形態に係る本発明符号化装置30は、図10に示すように、画像データ分割手段11、平均値算出手段12、バラツキ度判定手段13、比較結果データ生成手段14、偏差値算出手段15、符号化データ生成手段16、及び、画像メモリ17に加えて、前処理手段としての色表示形式をRGBフォーマットからYUVフォーマットに変換するフォーマット変換手段31を備えて構成される。更に、第2実施形態に係る本発明復号化装置40は、図10に示すように、データ読み出し手段21、バラツキ度識別手段22、第1復号化手段23、及び、第2復号化手段24に加えて、後処理手段としての色表示形式をYUVフォーマットからRGBフォーマットに逆変換するフォーマット逆変換手段41を備えて構成される。本発明符号化装置30については、フォーマット変換手段31以外は、第1実施形態と同じであるので、重複する説明は割愛する。また、本発明復号化装置40については、フォーマット逆変換手段41以外は、第1実施形態と同じであるので、同様に重複する説明は割愛する。   Therefore, the encoding apparatus 30 according to the second embodiment includes an image data dividing unit 11, an average value calculating unit 12, a variation degree determining unit 13, a comparison result data generating unit 14, a deviation value, as shown in FIG. In addition to the calculation unit 15, the encoded data generation unit 16, and the image memory 17, a format conversion unit 31 that converts the color display format as the preprocessing unit from the RGB format to the YUV format is provided. Furthermore, the decoding apparatus 40 according to the second embodiment includes a data reading unit 21, a variation degree identifying unit 22, a first decoding unit 23, and a second decoding unit 24 as shown in FIG. In addition, it comprises a format reverse conversion means 41 that reversely converts the color display format as post-processing means from the YUV format to the RGB format. Since the encoding device 30 of the present invention is the same as that of the first embodiment except for the format conversion means 31, the overlapping description is omitted. Since the decoding apparatus 40 of the present invention is the same as that of the first embodiment except for the format reverse conversion means 41, the duplicate description is omitted in the same manner.

尚、以下の説明において、本第2実施形態では、YUVフォーマットとして圧縮型のYUV411フォーマットを用いる場合について説明する。   In the following description, the second embodiment will describe a case where a compression type YUV411 format is used as the YUV format.

フォーマット変換手段31は、各画素のRGB成分値を上記数5の変換式に基づいてYUV成分値を算出した後に、2×2画素分の色差データU、Vについて、夫々平均値を算出して各要素値とする。尚、色差データU、V夫々の平均値を算出する代わりに、2×2画素分の色差データU、Vの何れか1画素の色差データU、Vを代表値として抽出しても構わない。以上、フォーマット変換手段31により生成されたYUVフォーマットの1次画像データは、輝度データ(Y)は640×480×8ビット、2種類の色差データ(U、V)は夫々、320×240×8ビットのデータ量となっている。色差データ(U、V)については、2×2画素が1データ保持単位となっている。   The format conversion means 31 calculates the average value of the color difference data U and V for 2 × 2 pixels after calculating the YUV component values of the RGB component values of each pixel based on the conversion formula of the above formula 5. Each element value. Instead of calculating the average value of the color difference data U and V, the color difference data U and V of any one pixel of 2 × 2 pixels may be extracted as a representative value. As described above, the primary image data in the YUV format generated by the format conversion means 31 is 640 × 480 × 8 bits for luminance data (Y), and 320 × 240 × 8 for two types of color difference data (U, V). The amount of data is in bits. For the color difference data (U, V), 2 × 2 pixels are one data holding unit.

フォーマット逆変換手段41は、復号化された色差データ(U、V)の各要素値P’ij(2×2画素分)を各画素の色差データ(U、V)として、復号化された輝度データ(Y)の各要素値P’ij(1画素分)と共に、上記数6の変換式に基づいてRGB成分値を算出する。尚、上記第1実施形態では、第1復号化手段23と第2復号化手段24が、復号化データP’ijをそのまま画像表示装置に出力する構成であったが、本第2実施形態では、RGBフォーマットへのフォーマット逆変換処理を伴うので、第1復号化手段23と第2復号化手段24は、復号化データP’ijを画像表示装置に出力せずに、フォーマット逆変換手段41に出力し、フォーマット逆変換手段41がフォーマット逆変換処理後のRGBフォーマットの復号化データを画像表示装置に出力する。   The format reverse conversion means 41 uses the element values P′ij (2 × 2 pixels) of the decoded color difference data (U, V) as the color difference data (U, V) of each pixel to decode the luminance Together with each element value P′ij (for one pixel) of data (Y), an RGB component value is calculated based on the conversion formula of Equation 6 above. In the first embodiment, the first decoding unit 23 and the second decoding unit 24 output the decoded data P′ij as it is to the image display device. However, in the second embodiment, Since the format reverse conversion process to the RGB format is involved, the first decoding means 23 and the second decoding means 24 do not output the decoded data P′ij to the image display device, but to the format reverse conversion means 41. The format reverse conversion means 41 outputs the RGB format decoded data after the format reverse conversion processing to the image display device.

本第2実施形態で追加となったフォーマット変換手段31及びフォーマット逆変換手段41は、マイクロプロセッサやマイクロコンピュータ上において夫々の機能をコンピュータプログラムの実行により実現するソフトウェア手段による構成、或いは、夫々の機能をハードウェアで実現するハードウェア手段による構成、更には、ソフトウェア手段とハードウェア手段を折衷した構成の何れの構成であっても良い。   The format conversion means 31 and the format reverse conversion means 41 added in the second embodiment are configured by software means for realizing each function by executing a computer program on a microprocessor or a microcomputer, or each function. It is possible to adopt any configuration such as a configuration using hardware means for realizing the above in hardware, or a combination of software means and hardware means.

次に、本発明符号化装置30が本発明符号化方法によるBTC符号化処理(データ圧縮処理)を実行する手順について、図11を参照して説明する。尚、図11は、第2実施形態に係る本発明符号化方法の概略の処理手順を示すフローチャートである。   Next, the procedure in which the encoding apparatus 30 of the present invention executes the BTC encoding process (data compression process) according to the encoding method of the present invention will be described with reference to FIG. FIG. 11 is a flowchart showing a schematic processing procedure of the encoding method of the present invention according to the second embodiment.

先ず、本発明符号化装置30が入力画像データ(VGA、RGBフォーマットデータ)を受け取ると、フォーマット変換手段31が、YUV411フォーマットの1次画像データに変換する(フォーマット変換工程:ステップ#10)。   First, when the encoding apparatus 30 of the present invention receives input image data (VGA, RGB format data), the format conversion means 31 converts it into primary image data in the YUV411 format (format conversion step: step # 10).

引き続き、画像データ分割手段11が、1次画像データを相互に隣接する複数のデータ保持単位からなる単位ブロックに分割する(画像データ分割工程:ステップ#11)。単位ブロックは、輝度データ(Y)については、2×2画素で構成される画素ブロックを使用し、色差データ(U、V)については、2×2データ保持単位(4×4画素)で構成される画素ブロックを使用する。従って、単位ブロックの総数は、輝度データ(Y)については、320×240ブロックであり、色差データ(U、V)については、夫々160×120ブロックである。   Subsequently, the image data dividing unit 11 divides the primary image data into unit blocks composed of a plurality of data holding units adjacent to each other (image data dividing step: step # 11). The unit block uses a pixel block composed of 2 × 2 pixels for luminance data (Y), and is composed of a 2 × 2 data holding unit (4 × 4 pixels) for color difference data (U, V). Pixel block to be used. Therefore, the total number of unit blocks is 320 × 240 blocks for the luminance data (Y) and 160 × 120 blocks for the color difference data (U, V).

以下、輝度データ(Y)及び色差データ(U、V)の成分毎に、図6に示す第1実施形態の処理手順と同様に、ステップ#12〜#18までの処理を、輝度データ(Y)及び2つの色差データ(U、V)の全ての単位ブロックについて繰り返し実行する。バラツキ度判定工程(ステップ#13)で使用する閾値Dthは、例えば第1実施形態と同様の「13」を使用する。尚、閾値Dthは、輝度データ(Y)及び色差データ(U、V)の夫々に対してシミュレーション等で個々に検証した値を別途使用するようにするのも好ましい。   Hereinafter, for each component of the luminance data (Y) and the color difference data (U, V), the processing from steps # 12 to # 18 is performed for the luminance data (Y, as in the processing procedure of the first embodiment shown in FIG. ) And all unit blocks of the two color difference data (U, V). As the threshold value Dth used in the variation degree determination step (step # 13), for example, “13” similar to that in the first embodiment is used. As the threshold value Dth, it is preferable to separately use values individually verified by simulation or the like for each of the luminance data (Y) and the color difference data (U, V).

次に、本発明復号化装置40が本発明復号化方法によるBTC復号化処理(データ伸張処理)を実行する手順について、図12を参照して説明する。尚、図12は、本発明復号化方法の概略の処理手順を示すフローチャートである。   Next, the procedure for the decoding apparatus 40 of the present invention to execute the BTC decoding process (data expansion process) by the decoding method of the present invention will be described with reference to FIG. FIG. 12 is a flowchart showing a schematic processing procedure of the decoding method of the present invention.

図7に示す第1実施形態の処理手順と同様に、ステップ#21〜#25までの処理を、YUV411データの各成分の選択された単位ブロックについて実行する。但し、第1または第2復号化工程(ステップ#24または#25)では、復号化データP’ijの画像表示装置への出力は行わない。   Similar to the processing procedure of the first embodiment shown in FIG. 7, the processing from step # 21 to # 25 is executed for the selected unit block of each component of the YUV411 data. However, in the first or second decoding step (step # 24 or # 25), the decoded data P'ij is not output to the image display device.

同じ2×2画素に対応する輝度データ(Y)と2つの色差データ(U、V)復号化データP’ijが生成されると、フォーマット逆変換手段41が、復号化された色差データ(U、V)の各要素値P’ij(2×2画素分)を各画素の色差データ(U、V)として、復号化された輝度データ(Y)の各要素値P’ij(1画素分)と共に、上記数6の変換式に基づいてRGB成分値を算出し、フォーマット逆変換処理後のRGBフォーマットの復号化データを画像表示装置に出力する(フォーマット逆変換工程:ステップ#28)。尚、2つの色差データ(U、V)の各1単位ブロックは、輝度データ(Y)の4単位ブロックに対応し、2つの色差データ(U、V)の復号化された夫々4つの要素値P’ij(1つの要素値は2×2画素分に対応する)は、輝度データ(Y)の4単位ブロックの1ずつに対応する。図9のYUV411フォーマットの図を参照すれば、輝度データ(Y)の1つの単位ブロックの4つの要素値(Y00,Y01,Y10,Y11)は、輝度データ(U)の1つの要素値(U00−11)に対応する。つまり、色差データ(U、V)の各1つの単位ブロックの復号化データは4つに分割され、輝度データ(Y)の4つの単位ブロックの復号化データに対して各別に使用される。従って、ステップ#21〜#25までの処理は、色差データ(U、V)ついては、輝度データ(Y)の4回に1回の頻度で処理される。   When the luminance data (Y) and the two color difference data (U, V) decoded data P′ij corresponding to the same 2 × 2 pixels are generated, the format inverse conversion means 41 performs the decoded color difference data (U , V) each element value P′ij (2 × 2 pixels) as color difference data (U, V) of each pixel, and each element value P′ij (for one pixel) of decoded luminance data (Y) ) And RGB component values are calculated based on the above equation 6 and the RGB format decoded data after format reverse conversion processing is output to the image display device (format reverse conversion step: step # 28). Each unit block of the two color difference data (U, V) corresponds to four unit blocks of the luminance data (Y), and each of the four element values obtained by decoding the two color difference data (U, V). P′ij (one element value corresponds to 2 × 2 pixels) corresponds to one of four unit blocks of luminance data (Y). Referring to the YUV411 format diagram of FIG. 9, four element values (Y00, Y01, Y10, Y11) of one unit block of luminance data (Y) are one element value (U00) of luminance data (U). -11). That is, the decoded data of each unit block of the color difference data (U, V) is divided into four, and is used separately for the decoded data of the four unit blocks of the luminance data (Y). Accordingly, the processes from Step # 21 to Step # 25 are processed at a frequency of once every four times for the luminance data (Y) for the color difference data (U, V).

ステップ#27のフォーマット逆変換工程が終了すると、終了した単位ブロックが最後の単位ブロックか否かを判定し(ステップ#26)、最後の単位ブロックでない場合は、次の単位ブロックを選択して(ステップ#27)、ステップ#21からステップ#26までの処理を、最後の単位ブロックと判定されるまで繰り返す。   When the format reverse conversion process in step # 27 is completed, it is determined whether the completed unit block is the last unit block (step # 26). If it is not the last unit block, the next unit block is selected ( Step # 27) and the processing from step # 21 to step # 26 are repeated until it is determined as the last unit block.

次に、本発明符号化装置30によって符号化された画像データの入力画像データからのデータ圧縮率について検討する。   Next, the data compression rate from the input image data of the image data encoded by the encoding device 30 of the present invention will be examined.

フォーマット変換手段31により、入力画像データから1次画像データへのフォーマット変換によりデータ量は50%に減少している。YUV411フォーマットについても、第1実施形態と同様の条件(閾値Dth=13)で符号化処理した場合、1次画像データに対するデータ圧縮率が約40%となるため、RGBフォーマットの入力画像データからのデータ圧縮率は20%まで下げることが可能となる。   Due to the format conversion from the input image data to the primary image data by the format conversion means 31, the data amount is reduced to 50%. For the YUV411 format, when the encoding process is performed under the same conditions (threshold Dth = 13) as in the first embodiment, the data compression rate for the primary image data is about 40%. The data compression rate can be reduced to 20%.

〈第3実施形態〉
次に、本発明符号化装置及び方法の第3実施形態について、図13を参照して説明する。第3実施形態に係る本発明符号化装置及び方法は、上記第1実施形態及び第2実施形態におけるバラツキ度判定手段13及びバラツキ度判定工程(ステップ#13)を変更した実施形態となっている。
<Third Embodiment>
Next, a third embodiment of the encoding apparatus and method of the present invention will be described with reference to FIG. The encoding apparatus and method of the present invention according to the third embodiment is an embodiment in which the variation degree determination means 13 and the variation degree determination step (step # 13) in the first embodiment and the second embodiment are changed. .

上記第1実施形態及び第2実施形態では、所定の閾値Dth(例えば13)の条件下において、2×2画素内での要素値のバラツキ度の小さい単位ブロックが全体の半分以上存在する標準的な写真画像や動画像の自然画像を1次画像データとして想定し、画像メモリの記憶容量を設定したが、設定した閾値Dthに対して、単位ブロック内の要素値のバラツキ度が大きい単位ブロックが当初の予想より多い場合は、単位ブロックを順次選択して、図6に示すステップ#12〜#18までの処理を、最後の単位ブロックと判定されるまで繰り返すと、最後の単位ブロックに至る前に、画像メモリの記憶容量を使い果たして、最後の方の何ブロックかの単位ブロックについては、バラツキ度の大小に関係なく符号化データECD9またはECD21を画像メモリに格納できなくなる可能性が生じる。   In the first embodiment and the second embodiment, a standard in which unit blocks having a small degree of variation in element values within 2 × 2 pixels exist in a condition of a predetermined threshold value Dth (for example, 13) is more than half of the whole. Assuming a natural image of a photographic image or a moving image as the primary image data, the storage capacity of the image memory is set. If there are more than the initial predictions, unit blocks are sequentially selected, and the processing from steps # 12 to # 18 shown in FIG. 6 is repeated until it is determined to be the last unit block. In addition, when the storage capacity of the image memory is exhausted, the last several unit blocks are encoded data ECD9 or ECD2 regardless of the degree of variation. It may not be able to store in the image memory is generated.

従って、本第3実施形態では、斯かる画像メモリの記憶容量不足を未然に防止するために、バラツキ度判定手段13が、図6に示すバラツキ度判定工程(ステップ#13)に代えて図13に示すバラツキ度判定工程(ステップ#130)を実行する。先ず、バラツキ度が大きいと判定した単位ブロックの累積カウント数Mが、RGBまたはYUV各成分の単位ブロックの総数の半分(RGBデータでは3456000)以下か否かを判定する(ステップ#131)。ステップ#131の判定で累積カウント数Mが単位ブロックの全数の半分以下の場合は、画像メモリ内に符号化データECD21の内の12ビットの部分符号化データECD12を作成する十分な記憶容量が残されているので、第1実施形態と同じバラツキ度判定工程(ステップ#13)によりバラツキ度の判定を行い、フラグビットFLGを設定する(ステップ#132)。次に、フラグビットFLGを“1”に設定した場合は、累積カウント数Mを1カウントアップして(M=M+1、ステップ#133)、ステップ#14に移行する。また、ステップ#132において、フラグビットFLGを“0”に設定した場合は、累積カウント数Mをカウントアップせずに、ステップ#17に移行する。尚、累積カウント数Mの初期値は0である。一方、ステップ#131の判定で累積カウント数Mが単位ブロックの全数の半分より大きい場合は、画像メモリ内に9ビットの符号化データECD9用の記憶容量を確保した後の余剰部分に、符号化データECD21の内の12ビットの部分符号化データECD12を作成する十分な記憶容量が残されていないので、各要素値Pijと平均値AVGの差分の絶対値(|Pij−AVG|)に基づくバラツキ度の大小判定は行わずに、強制的にバラツキ度が小さいとして、フラグビットFLGを“0”に設定して(ステップ#134)、フラグビットFLGに“0”が設定された場合のステップ#17に強制的に移行する。   Therefore, in the third embodiment, in order to prevent such a storage capacity shortage of the image memory, the variation degree determination means 13 replaces the variation degree determination step (step # 13) shown in FIG. The variation degree determination step (step # 130) shown in FIG. First, it is determined whether or not the cumulative count number M of unit blocks determined to have a large degree of variation is equal to or less than half the total number of unit blocks of RGB or YUV components (3456000 for RGB data) (step # 131). If the cumulative count number M is less than half of the total number of unit blocks in the determination of step # 131, sufficient storage capacity for creating the 12-bit partial encoded data ECD12 of the encoded data ECD21 remains in the image memory. Therefore, the variation degree is determined by the same variation degree determination step (step # 13) as in the first embodiment, and the flag bit FLG is set (step # 132). Next, when the flag bit FLG is set to “1”, the cumulative count number M is incremented by 1 (M = M + 1, step # 133), and the process proceeds to step # 14. If the flag bit FLG is set to “0” in step # 132, the process proceeds to step # 17 without incrementing the cumulative count number M. Note that the initial value of the cumulative count number M is zero. On the other hand, if the cumulative count number M is larger than half of the total number of unit blocks in the determination of step # 131, encoding is performed on the surplus portion after the storage capacity for 9-bit encoded data ECD9 is secured in the image memory. Since sufficient storage capacity for creating the 12-bit partial encoded data ECD12 in the data ECD21 is not left, variation based on the absolute value (| Pij−AVG |) of the difference between each element value Pij and the average value AVG Step # in the case where the flag bit FLG is set to “0” (step # 134) and the flag bit FLG is set to “0” on the assumption that the degree of variation is forcibly small without performing the magnitude judgment. 17 is forcibly transferred.

バラツキ度判定工程が異なる以外は、上記第1実施形態及び第2実施形態と同じであるので、重複する説明は割愛する。   Since it is the same as the said 1st Embodiment and 2nd Embodiment except the variation degree determination process, the overlapping description is omitted.

更に、全てのブロック単位に対して符号化データ生成工程1または2が終了した後に、累積カウント数Mが単位ブロックの全数の半分を超過している場合は、その超過分に応じて、次の1次画像データの符号化処理に対応すべく閾値Dthの値を高く設定し直す閾値再設定工程を設ける。ここで、超過分に関係なく、閾値Dthの値を1だけ高くするようにしても良い。   Furthermore, after the encoded data generation step 1 or 2 is completed for all block units, if the cumulative count number M exceeds half of the total number of unit blocks, the following is performed according to the excess amount. A threshold resetting step is provided for resetting the threshold Dth to a higher value to cope with the primary image data encoding process. Here, the threshold value Dth may be increased by 1 regardless of the excess.

逆に、閾値再設定工程において、累積カウント数Mが単位ブロックの全数の半分以下で、その余剰数が所定の規定値以上の場合には、次の1次画像データの符号化処理に対応すべく閾値Dthの値を高く設定し直す処理を追加しても構わない。ここで、余剰数に関係なく、閾値Dthの値を1だけ低くするようにしても良い。   On the contrary, in the threshold resetting step, when the cumulative count number M is less than half of the total number of unit blocks and the surplus number is greater than or equal to a predetermined specified value, it corresponds to the encoding process of the next primary image data. Processing for resetting the threshold value Dth as high as possible may be added. Here, the threshold value Dth may be lowered by 1 regardless of the surplus number.

〈別実施形態〉
〈1〉上記各実施形態において、本発明符号化装置10、30の偏差値算出手段15は、偏差値SDを上記数4の算出式に基づいて算出したが、数4の算出式に代えて標準偏差を算出する下記数7の算出式に基づいて算出しても良い。
<Another embodiment>
<1> In each of the embodiments described above, the deviation value calculation means 15 of the encoding devices 10 and 30 of the present invention calculates the deviation value SD based on the equation (4). You may calculate based on the following formula 7 which calculates a standard deviation.

Figure 2009111821
Figure 2009111821

〈2〉上記各実施形態において、本発明符号化装置10、30のバラツキ度判定手段13は、各単位ブロックの4つの要素値Pijの分布のバラツキ度を、単位ブロック内の4つの画素の内の少なくとも1つの要素値において、当該絶対値(|Pij−AVG|)が閾値Dth以上の場合には大きいと判定し、単位ブロック内の4つの画素の全ての要素値において、当該絶対値(|Pij−AVG|)が閾値Dth未満の場合には小さいと判定したが、絶対値(|Pij−AVG|)と閾値Dthの大小比較に基づく判定基準に代えて、偏差値算出手段15が算出した偏差値SDが、所定の閾値以上の場合にバラツキ度が大きいと判定し、所定の閾値未満の場合にバラツキ度が小さいと判定する判定基準を用いても構わない。   <2> In each of the above embodiments, the variation degree determination means 13 of the coding apparatuses 10 and 30 of the present invention determines the variation degree of the distribution of the four element values Pij of each unit block, among the four pixels in the unit block. Is determined to be large if the absolute value (| Pij−AVG |) is greater than or equal to the threshold value Dth, and the absolute value (| When Pij−AVG |) is less than the threshold value Dth, it is determined to be small. However, instead of the determination criterion based on the magnitude comparison between the absolute value (| Pij−AVG |) and the threshold value Dth, the deviation value calculation unit 15 calculates. A criterion for determining that the degree of variation is large when the deviation value SD is greater than or equal to a predetermined threshold and that the degree of variation is small when the deviation value SD is less than the predetermined threshold may be used.

但し、この場合は、バラツキ度判定手段13がバラツキ度の大小判定を行う前に、単位ブロックのバラツキ度に関係なく、偏差値算出手段15が偏差値SDを予め算出しておく必要があるため、図6及び図11に示す本発明符号化方法の処理手順において、ステップ#15の偏差値算出工程を、ステップ#12の平均値算出工程とステップ#13のバラツキ度判定工程の間に処理するように、工程順を変更する。   However, in this case, the deviation value calculating unit 15 needs to calculate the deviation value SD in advance before the variation degree determining unit 13 determines the degree of variation, regardless of the unit block variation degree. 6 and 11, the deviation value calculation step of step # 15 is processed between the average value calculation step of step # 12 and the variation degree determination step of step # 13. Thus, the process order is changed.

〈3〉上記各実施形態では、偏差値SDのビット数を、単位ブロックの要素値Pijのビット数と同数としたが、1ビット減らしても良い。つまり、各要素値Pijが8ビットの階調データの場合では、偏差値SDも8ビットとしたが、1ビット減らして7ビットとしても良い。具体的に説明すると、要素値Pijが256階調(階調値0〜255)では、数3により算出した平均値AVGも階調値0〜255を取り得るが、数4により算出した偏差値SDは、各要素値Pij(i=0,1、j=0,1)が、0,0,255,255の場合にバラツキ度が最大となって、「128」となる。この偏差値SDの最大値「128」は、「127.5」を四捨五入した結果であるので、これを「127」とすれば、偏差値SDは7ビットで表すことができる。従って、21ビットの符号化データECD21は1ビット少ない20ビットの符号化データとすることができる。これにより、画像メモリ17の記憶容量を更に節減できる。   <3> In each of the above embodiments, the number of bits of the deviation value SD is the same as the number of bits of the element value Pij of the unit block, but it may be reduced by 1 bit. That is, in the case where each element value Pij is 8-bit gradation data, the deviation value SD is also 8 bits, but may be reduced by 1 bit to 7 bits. More specifically, when the element value Pij is 256 gradations (gradation values 0 to 255), the average value AVG calculated by Equation 3 can also take gradation values 0 to 255, but the deviation value calculated by Equation 4 is used. SD becomes “128” when the element values Pij (i = 0, 1, j = 0, 1) are 0, 0, 255, and 255, and the degree of variation is maximum. Since the maximum value “128” of the deviation value SD is a result of rounding off “127.5”, if this is set to “127”, the deviation value SD can be represented by 7 bits. Therefore, the 21-bit encoded data ECD21 can be 20-bit encoded data that is one bit fewer. Thereby, the storage capacity of the image memory 17 can be further reduced.

この場合、偏差値SDで減った1ビットは、フラッグビットFLGとして使用することで、バラツキ度の大きい単位ブロックの符号化データが、従来のBTC符号化方式による符号化データと同ビット数となるので、バラツキ度の小さい単位ブロックが少なくとも1つ存在すれば、本発明符号化装置及び方法によって、従来のBTC符号化方式と比較してデータ圧縮率が確実に低下して圧縮後のデータ量が低減することになる。   In this case, 1 bit reduced by the deviation value SD is used as the flag bit FLG, so that the encoded data of the unit block having a large variation degree has the same number of bits as the encoded data by the conventional BTC encoding method. Therefore, if there is at least one unit block with a small degree of variation, the encoding apparatus and method according to the present invention reliably reduces the data compression rate compared to the conventional BTC encoding method, and the amount of data after compression is reduced. Will be reduced.

〈4〉上記各実施形態では、単位ブロックのサイズは、2×2画素或いは2×2データ保持単位としたが、当該サイズを縦横2倍の4×4画素或いは4×4データ保持単位としても構わない。但し、単位ブロックサイズを単純に大きくしただけでは、復号化後の画像データの各要素値P’ijの1次画像データの要素値Pijからの乖離が大きくなり画像品質の劣化度が大きくなるので、平均値AVGを所定の基準で算出される要素値Pij(i=0〜3、j=0〜3)の代表値に置き換え、偏差値SDを量子化刻みに置き換え、比較結果データCij(i=0〜3、j=0〜3)の夫々を要素値Pijと代表値の差分を量子化刻みで量子化した2ビット以上の階調値で表すように変更しても構わない。このように単位ブロックサイズを拡大した場合でも、単位ブロック内の要素値Pij間のバラツキ度が小さい場合において、上記各実施形態と同様に、比較結果データCij(または階調値データ)及び偏差値SD(または量子化刻みデータ)を省略することで、データ圧縮率を低下させて圧縮後のデータ量を低減できる。   <4> In each of the above embodiments, the size of the unit block is 2 × 2 pixels or 2 × 2 data holding units. However, the size may be set to 4 × 4 pixels or 4 × 4 data holding units that are twice the height and width. I do not care. However, if the unit block size is simply increased, the difference between the element values P′ij of the decoded image data from the element values Pij of the primary image data increases, and the degree of degradation of the image quality increases. The average value AVG is replaced with a representative value of element values Pij (i = 0 to 3, j = 0 to 3) calculated based on a predetermined reference, the deviation value SD is replaced with a quantization step, and the comparison result data Cij (i = 0-3, j = 0-3) may be changed so as to be expressed by a gradation value of 2 bits or more obtained by quantizing the difference between the element value Pij and the representative value by the quantization step. Even when the unit block size is increased in this way, when the degree of variation between the element values Pij in the unit block is small, the comparison result data Cij (or gradation value data) and the deviation value are the same as in the above embodiments. By omitting SD (or quantized data), the data compression rate can be reduced and the amount of data after compression can be reduced.

〈5〉上記各実施形態では、本発明復号化装置20の第1復号化手段23及び第2復号化手段24は、復号化データP’ijを画像表示装置に出力し、本発明復号化装置40のフォーマット逆変換手段41は、YUVフォーマットの復号化データP’ijをRGBフォーマットに逆変換処理した後の復号化データを画像表示装置に出力する適用例を説明したが、夫々の復号化データを画像表示装置に直接出力する場合に適用するのではなく、図14に示すように、1フレーム前の画像データとして当該復号化データを使用し、本発明符号化装置10、30及び本発明復号化装置20、40を介さずに画像表示装置(例えば、液晶表示装置50)に直接出力する現行フレームの画像データ(階調データ)と、画像メモリに格納された1フレーム前の画像データ(階調データ)とを比較して、現行フレームの画像データの階調を補正する適用例も考えられる。図14に示す適用例では、本発明復号化装置20、40の出力画像データ(1フレーム前の階調データ)と、本発明符号化装置10、30の入力画像データ(現行フレームの階調データ)は、階調値を比較して判定するルックアップテーブル51に入力され、ルックアップテーブル51の出力によって現行フレームの階調データが補正される構成となっている。当該適用例においても、従来のBTC符号化処理方法でデータ圧縮する場合より、1フレーム前の画像データを格納する画像メモリの記憶容量を低減できる。尚、図14では、液晶表示装置50内部の詳細な回路構成は、例えば、上記特許文献2〜4において公知であるので、記載を省略している。   <5> In the above embodiments, the first decoding unit 23 and the second decoding unit 24 of the decoding device 20 of the present invention output the decoded data P′ij to the image display device, and the decoding device of the present invention. The 40 format reverse conversion means 41 has explained the application example in which the decoded data after YUV format decoded data P′ij is converted back to the RGB format is output to the image display device. Is not applied directly to the image display device, but as shown in FIG. 14, the decoded data is used as the image data of the previous frame, and the encoding devices 10 and 30 of the present invention and the decoding of the present invention are used. Current frame image data (gradation data) output directly to the image display device (for example, the liquid crystal display device 50) without passing through the conversion devices 20 and 40, and one frame stored in the image memory By comparing the image data of the (gradation data), applications for correcting the gradation of the image data of the current frame is also conceivable. In the application example shown in FIG. 14, the output image data (gradation data one frame before) of the decoding apparatuses 20 and 40 of the present invention and the input image data (gradation data of the current frame) of the coding apparatuses 10 and 30 of the present invention. ) Is input to a lookup table 51 that is determined by comparing gradation values, and the gradation data of the current frame is corrected by the output of the lookup table 51. Also in this application example, it is possible to reduce the storage capacity of the image memory for storing the image data of the previous frame compared to the case where data compression is performed by the conventional BTC encoding processing method. In FIG. 14, the detailed circuit configuration inside the liquid crystal display device 50 is well-known in, for example, the above-mentioned Patent Documents 2 to 4, and thus the description is omitted.

〈6〉上記各実施形態では、1次画像データとして、RGBフォーマットまたはYUVフォーマットの各成分が8ビット(256階調)の640×480画素のデータを想定したが、色表示形式、各成分の階調数、解像度は、上記各実施形態の画像データに限定されるものではない。色表示形式、各成分の階調数、解像度は適宜変更可能である。また、画像データはカラー画像に限定されるものではなく、モノクローム画像でも良い。   <6> In the above embodiments, the primary image data is assumed to be data of 640 × 480 pixels in which each component in the RGB format or YUV format is 8 bits (256 gradations). The number of gradations and the resolution are not limited to the image data of the above embodiments. The color display format, the number of gradations of each component, and the resolution can be changed as appropriate. Further, the image data is not limited to a color image, and may be a monochrome image.

〈7〉上記各実施形態では、1、2または4画素のデータ保持単位としたが、これ以外の画素数のデータ保持単位とすることも可能である。例えば、縦×横が4×4画素の16画素のデータ保持単位とすることもできる。しかし、データ保持単位の画素数、即ち単位ブロックを構成する画素数が多いほど、圧縮後のデータ量をより少なくする圧縮が可能になるが、画質がより劣化することになり、画質劣化の観点からは1、2または4画素のデータ保持単位とすることが好ましい。   <7> In each of the above embodiments, the data holding unit is 1, 2, or 4 pixels. However, it is also possible to use a data holding unit having a different number of pixels. For example, a data holding unit of 16 pixels in which 4 × 4 pixels in length × width can be used. However, as the number of pixels in the data holding unit, that is, the number of pixels constituting the unit block is larger, the compression can be performed to reduce the amount of data after compression, but the image quality is further deteriorated. Is preferably a data holding unit of 1, 2, or 4 pixels.

〈8〉上記各実施形態では、バラツキ度に関する判定結果を示すフラグビットを1ビットとしたが、これよりも大きいビット数のフラグビットを用いることも可能である。しかし、フラグビットを1ビットした方が、それよりも大きいビット数のフラグビットを用いるよりも、データ量を抑えることができるので好ましい。   <8> In each of the above embodiments, the flag bit indicating the determination result regarding the degree of variation is set to 1 bit. However, a flag bit having a larger number of bits may be used. However, it is preferable to use one flag bit because the amount of data can be suppressed rather than using a flag bit having a larger number of bits.

本発明は、画像データを圧縮する画像符号化装置及び方法、並びに、圧縮された画像データを伸張する画像復号化装置及び方法に利用可能であり、例えば、液晶表示装置を駆動する階調データを補正するオーバードライブ手法におけるフレーム画像データを一時的に保存する画像メモリの記憶容量の削減に応用できる。   INDUSTRIAL APPLICABILITY The present invention can be used for an image encoding apparatus and method for compressing image data, and an image decoding apparatus and method for expanding compressed image data. For example, gradation data for driving a liquid crystal display device is used. The present invention can be applied to the reduction of the storage capacity of an image memory that temporarily stores frame image data in the overdrive method for correction.

本発明に係る画像符号化装置と画像復号化装置の第1実施形態におけるシステム構成例を示すブロック図1 is a block diagram illustrating an example of a system configuration in an image encoding device and an image decoding device according to a first embodiment of the present invention. 符号化処理対象のRGBフォーマット画像データの構成例を示す図The figure which shows the structural example of the RGB format image data of an encoding process target 本発明に係る画像符号化方法及び画像復号化方法で用いる単位ブロックの構成例を示す図The figure which shows the structural example of the unit block used with the image coding method and image decoding method which concern on this invention 本発明に係る画像符号化装置で生成される2種類の符号化データのデータ構成を模式的に示す図The figure which shows typically the data structure of two types of encoding data produced | generated with the image coding apparatus which concerns on this invention. 本発明に係る画像符号化装置で使用する画像メモリの構成例を示す図The figure which shows the structural example of the image memory used with the image coding apparatus which concerns on this invention. 本発明に係る画像符号化方法の第1実施形態における概略の処理手順の一例を示す工程図Process drawing which shows an example of the rough process sequence in 1st Embodiment of the image coding method which concerns on this invention 本発明に係る画像復号化方法の第1実施形態における概略の処理手順の一例を示す工程図Process drawing which shows an example of the schematic process sequence in 1st Embodiment of the image decoding method which concerns on this invention 本発明に係る画像符号化方法及び画像復号化方法の第1実施形態における処理結果の一具体例を示す図The figure which shows a specific example of the process result in 1st Embodiment of the image coding method and image decoding method which concern on this invention. 4×4画素分のRGBデータに対応する、YUV422フォーマットとYUV411フォーマットのデータ構成を模式的に示す図The figure which shows typically the data structure of YUV422 format and YUV411 format corresponding to RGB data for 4x4 pixels 本発明に係る画像符号化装置と画像復号化装置の第2実施形態におけるシステム構成例を示すブロック図The block diagram which shows the system configuration example in 2nd Embodiment of the image coding apparatus and image decoding apparatus which concern on this invention 本発明に係る画像符号化方法の第2実施形態における概略の処理手順の一例を示す工程図Process drawing which shows an example of the schematic process sequence in 2nd Embodiment of the image coding method which concerns on this invention 本発明に係る画像符号化方法の第2実施形態における概略の処理手順の一例を示す工程図Process drawing which shows an example of the schematic process sequence in 2nd Embodiment of the image coding method which concerns on this invention 本発明に係る画像符号化方法の第3実施形態におけるバラツキ度判定工程の処理手順を示す工程図Process drawing which shows the process sequence of the variation degree determination process in 3rd Embodiment of the image coding method which concerns on this invention. 本発明に係る画像符号化装置と画像復号化装置の一適用例を示すブロック図1 is a block diagram showing an application example of an image encoding device and an image decoding device according to the present invention. 従来のBTC符号化方式による符号化処理の処理手順の一例を示す工程図と2×2画素の画素ブロックの構成例を示す図Process diagram showing an example of a processing procedure of encoding processing by a conventional BTC encoding method and a diagram showing a configuration example of a pixel block of 2 × 2 pixels 従来のBTC符号化方式による符号化データの構成例を示す図The figure which shows the structural example of the encoding data by the conventional BTC encoding system. 従来のBTC符号化方式による復号化処理の処理手順の一例を示す工程図と復号化データの構成例を示す図Process diagram showing an example of processing procedure of decoding process by conventional BTC encoding method and figure showing configuration example of decoded data 従来のBTC符号化方式による符号化方式と復号化処理の具体例を示す図The figure which shows the specific example of the encoding system by the conventional BTC encoding system, and a decoding process 従来のBTC符号化方式による符号化方式と復号化処理の画素ブロックの画素値間の差が顕著でない場合の具体例を示す図The figure which shows the specific example in case the difference between the encoding method by the conventional BTC encoding method and the pixel value of the pixel block of a decoding process is not remarkable.

符号の説明Explanation of symbols

10、30: 本発明に係る画像符号化装置
11: 画像データ分割手段
12: 平均値算出手段
13: バラツキ度判定手段
14: 比較結果データ生成手段
15: 偏差値算出手段
16: 符号化データ生成手段
17: 画像メモリ
20、40: 本発明に係る画像復号化装置
21: データ読み出し手段
21a: 第1データ読み出し手段
21b: 第2データ読み出し手段
22: バラツキ度識別手段
23: 第1復号化手段
24: 第2復号化手段
31: フォーマット変換手段
41: フォーマット逆変換手段
50: 液晶表示装置
51: ルックアップテーブル
DESCRIPTION OF SYMBOLS 10, 30: Image coding apparatus which concerns on this invention 11: Image data division | segmentation means 12: Average value calculation means 13: Dispersion degree determination means 14: Comparison result data generation means 15: Deviation value calculation means 16: Encoding data generation means 17: Image memory 20, 40: Image decoding device according to the present invention 21: Data reading means 21a: First data reading means 21b: Second data reading means 22: Dispersion degree identifying means 23: First decoding means 24: Second decoding means 31: Format conversion means 41: Format reverse conversion means 50: Liquid crystal display device 51: Look-up table

Claims (15)

所定の画素数をデータ保持単位とする画素データからなる画像データを相互に隣接する複数の前記データ保持単位からなる単位ブロックに分割する画像データ分割手段と、
前記単位ブロック毎に、前記画像データ分割手段により生成された前記単位ブロック内の前記各データ保持単位の要素値の平均値を算出する平均値算出手段と、
前記単位ブロック毎に、前記単位ブロック内の前記各データ保持単位の要素値の分布のバラツキ度の大小を予め設定された判定基準に基づいて判定して当該判定結果を示すフラグビットを生成するバラツキ度判定手段と、
前記単位ブロック毎に、前記単位ブロック内の前記各データ保持単位の要素値と前記平均値算出手段で算出された前記平均値の各大小比較結果を示す比較結果データを生成する比較結果データ生成手段と、
前記単位ブロック毎に、前記単位ブロック内の前記各データ保持単位の要素値と前記平均値算出手段で算出された前記平均値の各差分値に基づく前記単位ブロック内の前記各データ保持単位の要素値の前記平均値からの平均的な偏差度を示す偏差値を算出する偏差値算出手段と、
前記単位ブロック毎に、前記バラツキ度判定手段により生成された前記フラグビットの値に応じて、前記バラツキ度が小さい場合は、前記平均値と前記フラグビットを合成して符号化データを生成し、前記バラツキ度が大きい場合は、前記平均値と前記フラグビットと前記比較結果データと前記偏差値を合成して符号化データを生成する符号化データ生成手段と、備えてなることを特徴とする画像符号化装置。
Image data dividing means for dividing image data composed of pixel data having a predetermined number of pixels as a data retention unit into unit blocks composed of a plurality of adjacent data retention units;
Average value calculating means for calculating an average value of element values of each data holding unit in the unit block generated by the image data dividing means for each unit block;
For each unit block, a variation for generating a flag bit indicating the determination result by determining the degree of variation in the distribution of element values of each data holding unit in the unit block based on a predetermined criterion. Degree determination means;
Comparison result data generation means for generating, for each unit block, comparison result data indicating each magnitude comparison result of the element value of each data holding unit in the unit block and the average value calculated by the average value calculation means When,
For each unit block, the element of each data holding unit in the unit block based on the difference value between the element value of each data holding unit in the unit block and the average value calculated by the average value calculation means Deviation value calculating means for calculating a deviation value indicating an average deviation degree of the value from the average value;
For each unit block, according to the value of the flag bit generated by the variation degree determination unit, if the variation degree is small, the average value and the flag bit are combined to generate encoded data, And an encoded data generation unit configured to generate encoded data by combining the average value, the flag bit, the comparison result data, and the deviation value when the degree of variation is large. Encoding device.
前記バラツキ度判定手段は、前記単位ブロック内の全ての前記データ保持単位において、前記データ保持単位の要素値と前記平均値算出手段で算出された前記平均値の差分値の絶対値が所定の判定閾値より小さい場合に、前記バラツキ度が小さいと判定し、それ以外の場合に、前記バラツキ度が大きいと判定することを特徴とする請求項1に記載の画像符号化装置。   The variation degree determination means determines whether the absolute value of the difference value between the element value of the data holding unit and the average value calculated by the average value calculating means is predetermined for all the data holding units in the unit block. The image coding apparatus according to claim 1, wherein when it is smaller than a threshold value, it is determined that the variation degree is small, and in other cases, it is determined that the variation degree is large. 前記バラツキ度判定手段は、前記偏差値が所定の判定閾値より小さい場合に、前記バラツキ度が小さいと判定し、前記偏差値が前記所定の判定閾値以上の場合に、前記バラツキ度が大きいと判定することを特徴とする請求項1に記載の画像符号化装置。   The variation degree determination means determines that the variation degree is small when the deviation value is smaller than a predetermined determination threshold value, and determines that the variation degree is large when the deviation value is equal to or larger than the predetermined determination threshold value. The image coding apparatus according to claim 1, wherein: 前記符号化データ生成手段は、前記フラグビットの値に関係なく全ての前記単位ブロックに対して、前記平均値と前記フラグビットからなる第1符号化データを生成し、前記フラグビットの値に応じて前記バラツキ度の大きい前記単位ブロックであるか否かを識別して、前記バラツキ度の大きい前記単位ブロックに対してのみ、前記比較結果データと前記偏差値からなる第2符号化データを生成することを特徴とする請求項1〜3の何れか1項に記載の画像符号化装置。   The encoded data generation means generates first encoded data composed of the average value and the flag bit for all the unit blocks regardless of the value of the flag bit, and depends on the value of the flag bit. Whether the unit block has a large degree of variation is identified, and second encoded data composed of the comparison result data and the deviation value is generated only for the unit block having a large degree of variation. The image coding apparatus according to any one of claims 1 to 3, wherein 前記符号化データを格納する画像メモリを備え、前記画像メモリのメモリ空間が、前記第1符号化データを格納する第1領域と、前記第2符号化データを格納する第2領域に区分されて構成されていることを特徴とする請求項4に記載の画像符号化装置。   An image memory for storing the encoded data is provided, and a memory space of the image memory is divided into a first area for storing the first encoded data and a second area for storing the second encoded data. The image coding apparatus according to claim 4, wherein the image coding apparatus is configured. 前記符号化データ生成手段は、前記単位ブロック毎に順次前記符号化データを生成している過程で、前記符号化データの累積データ量が所定の上限値を超える場合には、当該符号化データ、及び、それ以降に生成する前記符号化データを、前記比較結果データと前記偏差値を合成せずに生成し、
前記バラツキ度判定手段が使用する前記判定基準を、前記バラツキ度が小さく判定され易いように変更することを特徴とする請求項1〜5の何れか1項に記載の画像符号化装置。
In the process in which the encoded data generation unit sequentially generates the encoded data for each unit block, and the accumulated data amount of the encoded data exceeds a predetermined upper limit value, the encoded data, And the encoded data to be generated thereafter is generated without combining the comparison result data and the deviation value,
The image coding apparatus according to claim 1, wherein the determination criterion used by the variation degree determination unit is changed so that the variation degree is easily determined to be small.
前記画素データが1画素中の複数の異なる色成分の各階調データで構成されている場合、1画素中の1つの色成分を前記データ保持単位として扱い、前記画像データ分割手段、前記平均値算出手段、前記バラツキ度判定手段、前記比較結果データ生成手段、前記偏差値算出手段、及び、前記符号化データ生成手段は、夫々の処理を色成分別に処理することを特徴とする請求項1〜6の何れか1項に記載の画像符号化装置。   When the pixel data is composed of gradation data of a plurality of different color components in one pixel, one color component in one pixel is treated as the data holding unit, the image data dividing means, the average value calculation The means, the variation degree determination means, the comparison result data generation means, the deviation value calculation means, and the encoded data generation means each process differently for each color component. The image encoding device according to any one of the above. 前記画素データが、画素単位の輝度データと、画素単位または相互に隣接する2画素または4画素単位の2種類の色差データで構成されている場合、前記輝度データについては、1画素を前記データ保持単位として扱い、前記2種類の色差データについては、1、2または4画素を前記データ保持単位として扱い、前記画像データ分割手段、前記平均値算出手段、前記バラツキ度判定手段、前記比較結果データ生成手段、前記偏差値算出手段、及び、前記符号化データ生成手段は、夫々の処理を前記輝度データと前記2種類の色差データのデータ別に処理することを特徴とする請求項1〜6の何れか1項に記載の画像符号化装置。   When the pixel data is composed of luminance data in units of pixels and two types of color difference data in units of pixels or two or four pixels adjacent to each other, for the luminance data, one pixel is stored as the data For the two types of color difference data, 1, 2 or 4 pixels are treated as the data holding unit, the image data dividing means, the average value calculating means, the variation degree determining means, and the comparison result data generating The means, the deviation value calculation means, and the encoded data generation means each process the data separately for the luminance data and the two types of color difference data. The image encoding device according to item 1. 前記画素データが画素単位の色成分別の階調データで構成されている原画像データを、前記画素データが画素単位の輝度データと、画素単位または相互に隣接する2画素または4画素単位の2種類の色差データで構成される画像データに変換する画像フォーマット変換手段を備えることを特徴とする請求項8に記載の画像符号化装置。   Original image data in which the pixel data is composed of gradation data for each color component in pixel units, luminance data in pixel units, and pixel units or two adjacent pixels or two in four pixel units. 9. The image coding apparatus according to claim 8, further comprising image format conversion means for converting into image data composed of different types of color difference data. 請求項1〜6の何れか1項に記載の画像符号化装置で符号化された前記符号化データを前記データ保持単位の画素データからなる画像データに復号化する画像復号化装置であって、
前記単位ブロック毎に、前記符号化データを構成する前記平均値と前記フラグビット、または、前記平均値と前記フラグビットと前記比較結果データと前記偏差値を、個別に読み出すデータ読み出し手段と、
前記データ読み出し手段が読み出した前記フラグビットの値に基づいて、前記単位ブロック内の前記各データ保持単位の要素値の分布のバラツキ度の大小を識別するバラツキ度識別手段と、
前記バラツキ度識別手段により前記バラツキ度が大きいと識別された前記単位ブロックに対して、前記データ読み出し手段が読み出した前記平均値と前記比較結果データと前記偏差値に基づいて復号化データを生成する第1復号化手段と、
前記バラツキ度識別手段により前記バラツキ度が小さいと識別された前記単位ブロックに対して、前記データ読み出し手段が読み出した前記平均値に基づいて復号化データを生成する第2復号化手段と、を備えてなることを特徴とする画像復号化装置。
An image decoding device that decodes the encoded data encoded by the image encoding device according to any one of claims 1 to 6 into image data including pixel data of the data holding unit,
Data reading means for individually reading out the average value and the flag bit constituting the encoded data or the average value, the flag bit, the comparison result data, and the deviation value for each unit block;
Based on the value of the flag bit read by the data reading means, a variation degree identifying means for identifying the degree of variation in the distribution of element values of each data holding unit in the unit block;
For the unit block identified as having a large variation degree by the variation degree identifying unit, decoded data is generated based on the average value, the comparison result data, and the deviation value read by the data reading unit. First decoding means;
Second decoding means for generating decoded data based on the average value read by the data reading means for the unit block identified as having a small degree of variation by the variation degree identifying means. An image decoding apparatus characterized by comprising:
前記第1復号化手段は、前記単位ブロック内の復号化後の前記各データ保持単位の要素値を、前記各データ保持単位に対応する前記比較結果データに基づいて、前記平均値に対して前記偏差値を加算或いは減算することにより算出し、
前記第2復号化手段は、前記単位ブロック内の復号化後の前記各データ保持単位の要素値を全て前記平均値とすることを特徴とする請求項10に記載の画像復号化装置。
The first decoding means calculates the element value of each data holding unit after decoding in the unit block based on the comparison result data corresponding to each data holding unit with respect to the average value. Calculate by adding or subtracting the deviation value,
The image decoding apparatus according to claim 10, wherein the second decoding unit sets all the element values of the data holding units after decoding in the unit block as the average value.
前記データ読み出し手段は、前記符号化データから前記平均値と前記フラグビットを読み出す第1データ読み出し手段と、前記バラツキ度識別手段により前記バラツキ度が大きいと識別された場合に、前記符号化データから更に前記比較結果データと前記偏差値を読み出す第2データ読み出し手段を備えてなることを特徴とする請求項10または11に記載の画像復号化装置。   The data reading means is configured to read from the encoded data when the variation degree is identified by the first data reading means for reading the average value and the flag bit from the encoded data and the variation degree identifying means. The image decoding apparatus according to claim 10 or 11, further comprising second data reading means for reading the comparison result data and the deviation value. 請求項1〜4の何れか1項に記載の画像符号化装置と、
前記画像符号化装置が符号化した符号化データを格納する画像メモリと、
前記画像メモリが格納する符号化データを復号化する請求項10〜12の何れか1項に記載の画像復号化装置と、を備えてなることを特徴とする画像データ処理装置。
The image encoding device according to any one of claims 1 to 4,
An image memory for storing encoded data encoded by the image encoding device;
An image data processing apparatus comprising: the image decoding apparatus according to any one of claims 10 to 12 that decodes encoded data stored in the image memory.
所定の画素数をデータ保持単位とする画素データからなる画像データを相互に隣接する複数の前記データ保持単位からなる単位ブロックに分割する画像データ分割工程と、
前記単位ブロック毎に、前記画像データ分割工程で生成された前記単位ブロック内の前記各データ保持単位の要素値の平均値を算出する平均値算出工程と、
前記単位ブロック毎に、前記単位ブロック内の前記各データ保持単位の要素値の分布のバラツキ度の大小を予め設定された判定基準に基づいて判定して当該判定結果を示すフラグビットを生成するバラツキ度判定工程と、
前記単位ブロック毎に、前記単位ブロック内の前記各データ保持単位の要素値と前記平均値算出工程で算出された前記平均値の各大小比較結果を示す比較結果データを生成する比較結果データ生成工程と、
前記単位ブロック毎に、前記単位ブロック内の前記各データ保持単位の要素値と前記平均値算出工程で算出された前記平均値の各差分値に基づく前記単位ブロック内の前記各データ保持単位の要素値の前記平均値からの平均的な偏差度を示す偏差値を算出する偏差値算出工程と、
前記単位ブロック毎に、前記バラツキ度判定工程で生成された前記フラグビットの値に応じて、前記バラツキ度が小さい場合は、前記平均値と前記フラグビットを合成して符号化データを生成し、前記バラツキ度が大きい場合は、前記平均値と前記フラグビットと前記比較結果データと前記偏差値を合成して符号化データを生成する符号化データ生成工程と、備えてなることを特徴とする画像符号化方法。
An image data dividing step of dividing image data consisting of pixel data having a predetermined number of pixels as a data holding unit into unit blocks consisting of a plurality of adjacent data holding units;
For each unit block, an average value calculating step for calculating an average value of element values of each data holding unit in the unit block generated in the image data dividing step;
For each unit block, a variation for generating a flag bit indicating the determination result by determining the degree of variation in the distribution of element values of each data holding unit in the unit block based on a predetermined criterion. Degree determination step,
A comparison result data generating step for generating, for each unit block, comparison result data indicating each size comparison result of the element value of each data holding unit in the unit block and the average value calculated in the average value calculating step. When,
For each unit block, the element of each data holding unit in the unit block based on the difference value between the element value of each data holding unit in the unit block and the average value calculated in the average value calculating step A deviation value calculating step of calculating a deviation value indicating an average deviation degree of the value from the average value;
For each unit block, according to the value of the flag bit generated in the variation degree determination step, if the variation degree is small, the average value and the flag bit are combined to generate encoded data, An encoded data generating step of generating encoded data by combining the average value, the flag bit, the comparison result data, and the deviation value when the degree of variation is large; Encoding method.
請求項14に記載の画像符号化方法で符号化された前記符号化データを符号化前のデータ形式に復号化する画像復号化方法であって、
前記単位ブロック毎に、前記符号化データを構成する前記平均値と前記フラグビットを、個別に読み出す第1データ読み出し工程と、
前記データ読み出し工程で読み出した前記フラグビットの値に基づいて、前記単位ブロック内の前記各データ保持単位の要素値の分布のバラツキ度の大小を識別するバラツキ度識別工程と、
前記バラツキ度識別工程において前記バラツキ度が大きいと識別された場合に、前記符号化データを構成する前記比較結果データと前記偏差値を、個別に読み出すデータ第2読み出し工程と、
前記バラツキ度識別工程において前記バラツキ度が大きいと識別された場合に、前記第1データ読み出し工程で読み出した前記平均値と、前記第2データ読み出し工程で読み出した前記比較結果データと前記偏差値に基づいて復号化データを生成する第1復号化工程と、
前記バラツキ度識別工程において前記バラツキ度が小さいと識別された場合に、前記第1データ読み出し工程で読み出した前記平均値に基づいて復号化データを生成する第2復号化工程と、を備えてなることを特徴とする画像復号化方法。
An image decoding method for decoding the encoded data encoded by the image encoding method according to claim 14 into a data format before encoding,
A first data reading step for individually reading out the average value and the flag bit constituting the encoded data for each unit block;
Based on the value of the flag bit read in the data reading step, a variation degree identifying step for identifying the degree of variation in the distribution of element values of each data holding unit in the unit block;
A data second reading step for individually reading out the comparison result data and the deviation value constituting the encoded data when the variation degree is identified as being large in the variation degree identifying step;
When it is identified that the degree of variation is large in the variation degree identifying step, the average value read in the first data reading step, the comparison result data read in the second data reading step, and the deviation value A first decryption step for generating decrypted data based on;
And a second decoding step for generating decoded data based on the average value read in the first data reading step when the variation degree is identified as being small in the variation degree identifying step. An image decoding method characterized by the above.
JP2007283107A 2007-10-31 2007-10-31 Image encoding device, image decoding device, image data processing device, image encoding method, and image decoding method Withdrawn JP2009111821A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007283107A JP2009111821A (en) 2007-10-31 2007-10-31 Image encoding device, image decoding device, image data processing device, image encoding method, and image decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007283107A JP2009111821A (en) 2007-10-31 2007-10-31 Image encoding device, image decoding device, image data processing device, image encoding method, and image decoding method

Publications (1)

Publication Number Publication Date
JP2009111821A true JP2009111821A (en) 2009-05-21

Family

ID=40779812

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007283107A Withdrawn JP2009111821A (en) 2007-10-31 2007-10-31 Image encoding device, image decoding device, image data processing device, image encoding method, and image decoding method

Country Status (1)

Country Link
JP (1) JP2009111821A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101656889B (en) * 2009-06-22 2011-12-21 南京大学 High definition video real time compressing as well as coding and decoding method
CN113223467A (en) * 2020-02-03 2021-08-06 三星显示有限公司 Display device and method of driving the same
CN117155401A (en) * 2023-10-31 2023-12-01 杭州巨奥能源科技有限公司 A smart park energy consumption optimization management method and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101656889B (en) * 2009-06-22 2011-12-21 南京大学 High definition video real time compressing as well as coding and decoding method
CN113223467A (en) * 2020-02-03 2021-08-06 三星显示有限公司 Display device and method of driving the same
CN117155401A (en) * 2023-10-31 2023-12-01 杭州巨奥能源科技有限公司 A smart park energy consumption optimization management method and system
CN117155401B (en) * 2023-10-31 2024-01-26 杭州巨奥能源科技有限公司 A smart park energy consumption optimization management method and system

Similar Documents

Publication Publication Date Title
EP2143280B1 (en) Frame buffer compression and decompression method for graphics rendering
US7657105B2 (en) Alpha image processing
JP5203513B2 (en) Image processing
US10672148B2 (en) Compressing and uncompressing method for high bit-depth medical gray scale images
US7873212B2 (en) Compression of images for computer graphics
US20070076971A1 (en) Compression of images for computer graphics
US20080267495A1 (en) Image compressing method and image compressing apparatus
JP4641784B2 (en) Gradation conversion processing device, gradation conversion processing method, image display device, television, portable information terminal, camera, integrated circuit, and image processing program
US8396308B2 (en) Image coding based on interpolation information
KR20140046985A (en) Compressor, driving device, display device, and compression method
EP2169958A2 (en) Lossless compression-encoding device and decoding device for image data
JP5375372B2 (en) Compression encoding apparatus and decoding apparatus
JP4829836B2 (en) Image encoding apparatus, control method for image encoding apparatus, computer program, decoding apparatus, and computer-readable storage medium
US7554557B2 (en) Device and method for image compression and decompression
JP2009111821A (en) Image encoding device, image decoding device, image data processing device, image encoding method, and image decoding method
JP2006197074A (en) Image processor, image processing method, and its program
US20090073178A1 (en) Compressing scheme using qualifier watermarking and apparatus using the compression scheme for temporarily storing image data in a frame memory
EP4373102A1 (en) Encoding aware overlay format
JP2003134532A (en) Image compression apparatus, image compression method, image expanding apparatus, and program
JP3781012B2 (en) Image data compression method, image data expansion method, and image data expansion circuit
US20250349034A1 (en) Lossy frame buffer compression
WO2010018494A1 (en) Image compression
JP3711104B2 (en) Image compression apparatus and image compression method
US10002586B1 (en) Compression of display data stored locally on a GPU
JP2008219848A (en) Circuit and method for decoding and viewing of image file

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