JP5093171B2 - Data compression device, data decompression device, and display device equipped with the same - Google Patents

Data compression device, data decompression device, and display device equipped with the same Download PDF

Info

Publication number
JP5093171B2
JP5093171B2 JP2009074830A JP2009074830A JP5093171B2 JP 5093171 B2 JP5093171 B2 JP 5093171B2 JP 2009074830 A JP2009074830 A JP 2009074830A JP 2009074830 A JP2009074830 A JP 2009074830A JP 5093171 B2 JP5093171 B2 JP 5093171B2
Authority
JP
Japan
Prior art keywords
bit
unit
data
digital value
bits
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.)
Active
Application number
JP2009074830A
Other languages
Japanese (ja)
Other versions
JP2010232712A (en
Inventor
勝義 西谷
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.)
JVCKenwood Corp
Original Assignee
JVCKenwood 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 JVCKenwood Corp filed Critical JVCKenwood Corp
Priority to JP2009074830A priority Critical patent/JP5093171B2/en
Publication of JP2010232712A publication Critical patent/JP2010232712A/en
Application granted granted Critical
Publication of JP5093171B2 publication Critical patent/JP5093171B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、デジタルデータを圧縮または伸張するデータ圧縮装置、データ伸張装置、およびそれらを搭載した表示装置に関する。   The present invention relates to a data compression apparatus that compresses or expands digital data, a data expansion apparatus, and a display device equipped with them.

現在、テレビ放送ではアナログ放送からデジタル放送への移行が促進され、記録メディアではDVDからBD(Blu-ray Disc)への移行が促進されている。これらの移行とともに、SD(Standard Definition)画像からHD(High Definition)画像への移行も加速している。   Currently, the transition from analog broadcasting to digital broadcasting is promoted in television broadcasting, and the transition from DVD to BD (Blu-ray Disc) is promoted in recording media. Along with these transitions, the transition from SD (Standard Definition) images to HD (High Definition) images is also accelerating.

HD画像はSD画像に比べてデータ量や処理負荷が増加し、機器(たとえば、表示装置や記録装置)内のメモリ容量の増加や、バスの伝送量増加を招く。画像データの高効率な圧縮技術として、MPEGやJPEGなどの圧縮方式があるが、処理負荷が高く、高速に処理するには専用のハードウェアを機器内に搭載する必要があり、コストが高くなる。そこで、圧縮率がMPEGやJPEGなどの圧縮方式には及ばないものの、比較的簡素な処理でメモリ容量や伝送量を削減することができる手法が提案されている(たとえば、特許文献1、2参照)。   An HD image has an increased data amount and processing load as compared to an SD image, and causes an increase in memory capacity in a device (for example, a display device or a recording device) and an increase in bus transmission amount. High-efficiency compression techniques for image data include compression methods such as MPEG and JPEG, but the processing load is high, and dedicated hardware must be installed in the equipment for high-speed processing, which increases costs . In view of this, there has been proposed a method capable of reducing the memory capacity and the transmission amount by a relatively simple process, although the compression rate does not reach that of a compression method such as MPEG or JPEG (for example, see Patent Documents 1 and 2). ).

特開平7−15347号公報Japanese Patent Laid-Open No. 7-15347 特開平3−145887号公報Japanese Patent Laid-Open No. 3-14587

画像データ等のデジタルデータを圧縮するための最も簡素な手法は、そのデジタルデータの下位ビットを破棄する手法である。下位ビットは画像の高周波成分に対応し、その成分が破棄されても、上位ビットが破棄される場合より、画質等への影響度は小さいものの、たとえ下位ビットであっても破棄すれば、画質等が低下することは確かである。   The simplest method for compressing digital data such as image data is a method of discarding the lower bits of the digital data. The lower bit corresponds to the high-frequency component of the image, and even if the component is discarded, the effect on the image quality is less than when the upper bit is discarded. It is certain that etc. will decline.

本発明はこうした状況に鑑みなされたものであり、その目的は、品質の低下を抑制しながら、簡素な処理でデジタルデータを圧縮または伸張することができる技術を提供することにある。   The present invention has been made in view of such circumstances, and an object of the present invention is to provide a technique capable of compressing or decompressing digital data by a simple process while suppressing deterioration in quality.

本発明のある態様のデータ圧縮装置は、デジタルデータを構成する複数のデジタル値を、最上位ビットからビット単位で比較していくことにより、複数のデジタル値間でビット値が共通する、最上位ビットからのビット数を共通ビット数として検出する共通ビット数検出部と、デジタル値の最上位ビットから、共通ビット数検出部により検出された共通ビット数分のビットデータを破棄し、かつデジタル値の最下位ビットから、予め設定された全体破棄ビット数から共通ビット数を減算した下位側破棄ビット数分のビットデータを破棄することによりデジタル値を圧縮する圧縮部と、を備える。   A data compression device according to an aspect of the present invention is the most significant bit having a common bit value among a plurality of digital values by comparing the plurality of digital values constituting the digital data bit by bit from the most significant bit. A common bit number detection unit that detects the number of bits from a bit as a common bit number, and discards bit data corresponding to the common bit number detected by the common bit number detection unit from the most significant bit of the digital value, and the digital value A compression unit that compresses the digital value by discarding bit data corresponding to the lower-order discard bit number obtained by subtracting the common bit number from the preset total discard bit number from the least significant bit.

なお、以上の構成要素の任意の組み合わせ、本発明の表現を方法、装置、システム、記録媒体、コンピュータプログラムなどの間で変換したものもまた、本発明の態様として有効である。   It should be noted that any combination of the above-described constituent elements and a conversion of the expression of the present invention between a method, an apparatus, a system, a recording medium, a computer program, and the like are also effective as an aspect of the present invention.

品質の低下を抑制しながら、簡素な処理でデジタルデータを圧縮または伸張することができる。   Digital data can be compressed or expanded by a simple process while suppressing deterioration in quality.

本発明の実施の形態1に係る、データ圧縮装置およびデータ伸張装置を搭載した表示装置の構成を示すブロック図である。It is a block diagram which shows the structure of the display apparatus which mounts the data compression apparatus and data expansion apparatus based on Embodiment 1 of this invention. 本発明の実施の形態1に係るデータ圧縮装置の構成を示す図である。It is a figure which shows the structure of the data compression apparatus which concerns on Embodiment 1 of this invention. 共通ビット数検出部の構成例を示す図である。It is a figure which shows the structural example of a common bit number detection part. 6個のデジタル値の共通ビット数を検出するための共通ビット数検出部の構成例を示す図である。It is a figure which shows the structural example of the common bit number detection part for detecting the common bit number of six digital values. 圧縮部の構成例を示す図である。It is a figure which shows the structural example of a compression part. ビットストリームのデータ構造例を示す図である。It is a figure which shows the data structure example of a bit stream. 本発明の実施の形態1に係るデータ伸張装置の構成を示す図である。It is a figure which shows the structure of the data expansion | extension apparatus which concerns on Embodiment 1 of this invention. 伸張部の構成例を示す図である。It is a figure which shows the structural example of an expansion | extension part. 本発明の実施の形態2に係るデータ圧縮装置の構成を示す図である。It is a figure which shows the structure of the data compression apparatus which concerns on Embodiment 2 of this invention. 差分圧縮方式で生成されたビットストリームのデータ構造例を示す図である。It is a figure which shows the example of a data structure of the bit stream produced | generated by the differential compression system.

本発明の実施の形態に係る、データ圧縮装置およびデータ伸張装置の詳細を説明する前に、当該データ圧縮装置およびデータ伸張装置の適用例について説明する。   Before describing details of the data compression apparatus and the data expansion apparatus according to the embodiment of the present invention, application examples of the data compression apparatus and the data expansion apparatus will be described.

実施の形態1.
図1は、本発明の実施の形態1に係る、データ圧縮装置およびデータ伸張装置を搭載した表示装置500の構成を示すブロック図である。表示装置500は、液晶テレビやプラズムテレビなどの薄型テレビであってもよいし、ビデオカメラの表示系であってもよい。
Embodiment 1.
FIG. 1 is a block diagram showing a configuration of a display device 500 equipped with a data compression device and a data decompression device according to Embodiment 1 of the present invention. The display device 500 may be a thin television such as a liquid crystal television or a plasma television, or may be a video camera display system.

当該表示装置500は、復号部510、第1圧縮部100a、フレームメモリ520、第2伸張部200b、中間フレーム生成部530、第2圧縮部100b、第1伸張部200a、および表示部540を備える。第1圧縮部100aおよび第2圧縮部100bには、後述するデータ圧縮装置を採用することができる。第1伸張部200aおよび第2伸張部200bには、後述するデータ伸張装置を採用することができる。   The display device 500 includes a decoding unit 510, a first compression unit 100a, a frame memory 520, a second expansion unit 200b, an intermediate frame generation unit 530, a second compression unit 100b, a first expansion unit 200a, and a display unit 540. . As the first compression unit 100a and the second compression unit 100b, a data compression device described later can be employed. As the first decompression unit 200a and the second decompression unit 200b, a data decompression device described later can be employed.

復号部510は、入力される符号化画像データを復号する。当該符号化画像データは、MPEG−2、MPEG−4、H.264/AVCなどの方式により圧縮符号化されたデータであり、放送波や記録メディアを介して復号部510に入力される。   The decoding unit 510 decodes input encoded image data. The encoded image data includes MPEG-2, MPEG-4, H.264. The data is compression-encoded by a method such as H.264 / AVC and is input to the decoding unit 510 via a broadcast wave or a recording medium.

中間フレーム生成部530は、フレームレートを高くする機能を実現するために搭載される。一般的な動画像ファイルは、1秒間に60フレームで組成されていることが多い。中間フレーム生成部530は、この1秒間に60フレームの動画像ファイルに含まれる、各隣接フレーム画像間の中間フレーム画像(すなわち、補間画像)をそれぞれ生成することにより、1秒間に120フレームの動画像データを生成することができる。このフレームレートを2倍にする技術は、映像ぶれを緩和する技術として用いられる。特に、液晶テレビの映像ぶれ対策として有効である。なお、中間フレーム画像の生成方法は、既存の一般的な技術を採用することができる。   The intermediate frame generation unit 530 is mounted to realize a function of increasing the frame rate. A typical moving image file is often composed of 60 frames per second. The intermediate frame generation unit 530 generates a moving image of 120 frames per second by generating intermediate frame images (that is, interpolation images) between adjacent frame images included in the moving image file of 60 frames per second. Image data can be generated. This technique of doubling the frame rate is used as a technique for reducing image blur. In particular, it is effective as a measure against image blurring of a liquid crystal television. Note that an existing general technique can be adopted as a method for generating the intermediate frame image.

しかしながら、フレームレートを高くすると、フレームメモリ520に保持されるべき画像データ量が増大し、内部バス550のトラフィック量が増大する。すなわち、装置内の負荷や、コストが増大することになる。これに対して、表示装置500内で画像データを圧縮して保持したり、伝送したりすることにより、上記画像データ量やトラフィック量を削減させる手法が考えられる。それを実現するため、当該表示装置500では、第1圧縮部100a、第2伸張部200b、第2圧縮部100bおよび第1伸張部200が搭載される。   However, when the frame rate is increased, the amount of image data to be held in the frame memory 520 increases, and the amount of traffic on the internal bus 550 increases. That is, the load in the apparatus and the cost increase. On the other hand, a method of reducing the image data amount and the traffic amount by compressing and holding or transmitting the image data in the display device 500 is conceivable. In order to realize this, the display device 500 includes the first compression unit 100a, the second expansion unit 200b, the second compression unit 100b, and the first expansion unit 200.

第1圧縮部100aは、復号部510により復号された画像データを圧縮する。画像データは複数ビットのデジタル値で記述される。第1圧縮部100aは当該複数ビットのデジタルデータから、所定のビット数のビットデータを破棄することにより、当該デジタルデータを圧縮する。たとえば、10ビットのデジタルデータから5ビットのビットデータを破棄すれば、データ量を半分に圧縮することができる。この場合、中間フレーム生成部530によりフレームレートを2倍にしても、元のデータ量がほぼ維持されることになる。   The first compression unit 100a compresses the image data decoded by the decoding unit 510. Image data is described by a digital value of a plurality of bits. The first compression unit 100a compresses the digital data by discarding the bit data of a predetermined number of bits from the digital data of the plurality of bits. For example, if 5 bits of bit data are discarded from 10 bits of digital data, the amount of data can be compressed in half. In this case, even if the frame rate is doubled by the intermediate frame generation unit 530, the original data amount is substantially maintained.

第1圧縮部100aにより圧縮された画像データは、内部バス550を介してフレームメモリ520に一時保持される。第2伸張部200bは、フレームメモリ520に保持されるフレーム単位の画像データを伸張して中間フレーム生成部530に出力する。中間フレーム生成部530は、第2伸張部200bにより伸張されたフレーム単位の画像データから、補間画像データを生成し、第2圧縮部100bに出力する。第2圧縮部100bは、生成された補間画像データを圧縮する。第2圧縮部100bにより圧縮された画像データは、内部バス550を介してフレームメモリ520に一時保持される。   The image data compressed by the first compression unit 100a is temporarily stored in the frame memory 520 via the internal bus 550. The second decompressing unit 200 b decompresses the image data in units of frames held in the frame memory 520 and outputs the decompressed image data to the intermediate frame generating unit 530. The intermediate frame generation unit 530 generates interpolated image data from the frame-unit image data expanded by the second expansion unit 200b and outputs the interpolated image data to the second compression unit 100b. The second compression unit 100b compresses the generated interpolated image data. The image data compressed by the second compression unit 100b is temporarily stored in the frame memory 520 via the internal bus 550.

第1伸張部200aは、フレームメモリ520に保持される、圧縮された画像データ(圧縮された補間画像データを含む。)を伸張して表示部540に出力する。表示部540は、第1伸張部200aにより伸張された画像データを表示する。   The first decompressing unit 200a decompresses the compressed image data (including the compressed interpolated image data) held in the frame memory 520 and outputs the decompressed image data to the display unit 540. The display unit 540 displays the image data expanded by the first expansion unit 200a.

なお、本発明の実施の形態1に係る、データ圧縮装置およびデータ伸張装置は、中間フレーム生成部530、第2圧縮部100bおよび第2伸張部200bを搭載しない構成の表示装置500にも適用可能である。この表示装置500は、第1圧縮部100aおよび第1伸張部200aを搭載することにより、それらを搭載しない場合と比較して、フレームメモリ520に保持されるべき画像データ量、および内部バス550のトラフィック量を削減することができる。   Note that the data compression device and the data decompression device according to Embodiment 1 of the present invention can also be applied to the display device 500 configured not to include the intermediate frame generation unit 530, the second compression unit 100b, and the second decompression unit 200b. It is. The display device 500 includes the first compression unit 100a and the first decompression unit 200a, so that the amount of image data to be held in the frame memory 520 and the internal bus 550 can be reduced. The amount of traffic can be reduced.

また、本発明の実施の形態1に係る、データ圧縮装置およびデータ伸張装置の適用例は図1に示した表示装置500に限るものではない。たとえば、画像記録再生装置に適用してもよい。また、当該データ圧縮装置と、当該データ伸張装置とが別々の装置に搭載されてもよい。たとえば、前者が送信装置、後者が受信装置に搭載されてもよい。   Further, the application example of the data compression device and the data decompression device according to the first embodiment of the present invention is not limited to the display device 500 shown in FIG. For example, you may apply to an image recording / reproducing apparatus. Further, the data compression device and the data decompression device may be mounted on different devices. For example, the former may be mounted on a transmission device and the latter may be mounted on a reception device.

以下、本発明の実施の形態1に係る、データ圧縮装置およびデータ伸張装置の詳細を説明する。なお、当該データ圧縮装置およびデータ伸張装置にて処理される画像のサイズ(より具体的には縦横の画素数)は、両者の間で既知であるとする。また、データ圧縮装置は、デジタルデータを、後述するフォーマットでビットストリーム化する。データ伸張装置はそのビットストリームの構造を既知であるとする。また、当該データ伸張装置は当該フォーマットに準拠したビットストリームのみを伸張可能なこととする。   Details of the data compression device and the data decompression device according to Embodiment 1 of the present invention will be described below. It is assumed that the size of the image processed by the data compression device and the data expansion device (more specifically, the number of vertical and horizontal pixels) is known between the two. Further, the data compression apparatus converts the digital data into a bit stream in a format to be described later. It is assumed that the data decompressor already knows the structure of the bit stream. Further, it is assumed that the data decompression apparatus can decompress only a bit stream conforming to the format.

図2は、本発明の実施の形態1に係るデータ圧縮装置100の構成を示す図である。当該データ圧縮装置100は、R(Rは2以上の整数)ビットのデジタルデータから、所定の全体破棄ビット数のビットデータを破棄することにより、r(1≦r<R)ビットのデジタルデータに圧縮変換する。以下の説明では、8ビットのデジタルデータから4ビット分のビットデータを破棄することにより、4ビットのデジタルデータに圧縮変換する例を説明する。この場合、上記全体破棄ビット数は4ビットである。   FIG. 2 is a diagram showing a configuration of the data compression apparatus 100 according to Embodiment 1 of the present invention. The data compression apparatus 100 discards bit data having a predetermined total number of discarded bits from R (R is an integer of 2 or more) bits of digital data, thereby converting the digital data to r (1 ≦ r <R) bits. Compress and convert. In the following description, an example in which compression conversion is performed on 4-bit digital data by discarding 4-bit bit data from 8-bit digital data will be described. In this case, the total discard bit number is 4 bits.

当該データ圧縮装置100は、保持部110、共通ビット数検出部120、圧縮部130および組立部140を備える。保持部110はN(Nは自然数)個のデジタル値を保持することができる。ここでは、保持部110に、それぞれが単位画素を表現するデジタル値が連続的に入力される例を説明する。このデジタル値は、画像の左上から右下にかけてラスタスキャンした順で入力されてもよいし、主走査方向を水平方向、副走査方向を垂直方向とする走査順で入力されてもよいし、主走査方向を垂直方向、副走査方向を水平方向とする走査順で入力されてもよい。   The data compression apparatus 100 includes a holding unit 110, a common bit number detection unit 120, a compression unit 130, and an assembly unit 140. The holding unit 110 can hold N (N is a natural number) digital values. Here, an example in which digital values each representing a unit pixel are continuously input to the holding unit 110 will be described. These digital values may be input in the order of raster scanning from the upper left to the lower right of the image, or may be input in the scanning order with the main scanning direction as the horizontal direction and the sub-scanning direction as the vertical direction. They may be input in the scanning order in which the scanning direction is the vertical direction and the sub-scanning direction is the horizontal direction.

以下、保持部110に、N=6、すなわち6画素分のデジタル値が格納され、6画素分のデジタル値を一単位として圧縮する例を説明する。なお、一枚の画像の画素数が6で割り切れない場合、保持部110に入力される、最後の画素データ数は6に満たないことになるが、その場合、6に満たない分の空白のデータ領域にはゼロを格納し、6画素分のデジタル値が満たされている場合と同様に処理する。   Hereinafter, an example will be described in which N = 6, that is, digital values for 6 pixels are stored in the holding unit 110 and the digital values for 6 pixels are compressed as one unit. If the number of pixels of one image is not divisible by 6, the last number of pixel data input to the holding unit 110 is less than 6, but in that case, there are blank spaces for less than 6. Zero is stored in the data area, and processing is performed in the same manner as when the digital values for six pixels are satisfied.

保持部110に格納された6画素分のデジタル値は、共通ビット数検出部120に入力される。ここで、その6画素分のデジタル値を入力順に、x0、x1、x2、x3、x4、x5と表現する。以下に、その6画素分のデジタル値xi(i=0,...,5)の一例を挙げる。   The digital values for six pixels stored in the holding unit 110 are input to the common bit number detection unit 120. Here, the digital values for the six pixels are expressed as x0, x1, x2, x3, x4, and x5 in the order of input. An example of the digital value xi (i = 0,..., 5) for the six pixels is given below.

x0:10111101
x1:10101111
x2:10100011
x3:10011000
x4:10011011
x5:10001110
x0: 10111101
x1: 10101111
x2: 10100011
x3: 1001000
x4: 10011011
x5: 1000110

共通ビット数検出部120は、保持部110から連続的に入力される複数のデジタル値を、最上位ビットからビット単位で比較していくことにより、それら複数のデジタル値間でビット値が共通する、最上位ビットからのビット数を共通ビット数p(pは整数(負を除く))として検出する。   The common bit number detection unit 120 compares a plurality of digital values continuously input from the holding unit 110 in bit units from the most significant bit, so that the bit values are common among the plurality of digital values. The number of bits from the most significant bit is detected as a common bit number p (p is an integer (excluding negative)).

上述した例では、共通ビット数検出部120は、保持部110から入力される6画素分のデジタル値の、最上位ビットからの共通ビット数pを検出する。より具体的には、6画素分のデジタル値を、その最上位ビットからビットごとに比較し、最初に異なるビット値が出現するまでの、最上位ビットからのビット数を求める。たとえば、最上位ビット値が同じ値で、次のビット値が違う値の場合、上記共通ビット数pは1となる。上述した例のデジタル値xi(i=0,...,5)では、上位の7ビット目と6ビット目が“10”で共通するため、上記共通ビット数pは2となる。   In the example described above, the common bit number detection unit 120 detects the common bit number p from the most significant bit of the digital value for six pixels input from the holding unit 110. More specifically, the digital values for six pixels are compared bit by bit from the most significant bit, and the number of bits from the most significant bit until a different bit value first appears is obtained. For example, when the most significant bit value is the same value and the next bit value is different, the common bit number p is 1. In the digital value xi (i = 0,..., 5) in the above-described example, the upper 7th bit and the 6th bit are “10” and the common bit number p is 2.

図3は、共通ビット数検出部120の構成例を示す図である。当該共通ビット数検出部120は、上位ビット抽出器121、スイッチ122、信号レジスタ123、判定レジスタ124、論理和回路(以下、OR回路と表記する)125、排他的論理和回路(以下、XOR回路と表記する)126、OR回路127、スイッチ128およびカウンタ129を含む。   FIG. 3 is a diagram illustrating a configuration example of the common bit number detection unit 120. The common bit number detection unit 120 includes an upper bit extractor 121, a switch 122, a signal register 123, a determination register 124, an OR circuit (hereinafter referred to as an OR circuit) 125, an exclusive OR circuit (hereinafter referred to as an XOR circuit). 126), an OR circuit 127, a switch 128, and a counter 129.

上位ビット抽出器121には、保持部110に格納されたデジタル値が順次、入力される。上位ビット抽出器121は入力されたデジタル値の、上位(R−r)ビットを抽出する。上述した例では、上位(8−4)ビット、すなわち上位4ビットを抽出する。抽出された上位ビットは、スイッチ122に入力される。   The digital values stored in the holding unit 110 are sequentially input to the upper bit extractor 121. The upper bit extractor 121 extracts the upper (R−r) bits of the input digital value. In the above-described example, upper (8-4) bits, that is, upper 4 bits are extracted. The extracted upper bits are input to the switch 122.

スイッチ122は、上位ビット抽出器121から入力される上位ビットが、N個のデジタル値のうちの先頭デジタル値のものである場合、その上位ビットを信号レジスタ123に出力するとともに、所定のリセット信号を判定レジスタ124に送る。信号レジスタ123は、当該上位ビットを一時保持する。   When the upper bit input from the upper bit extractor 121 is the first digital value of the N digital values, the switch 122 outputs the upper bit to the signal register 123 and outputs a predetermined reset signal. Is sent to the decision register 124. The signal register 123 temporarily holds the upper bit.

判定レジスタ124は、(R−r)ビット(ここでは4ビット)のデジタル値を扱うことができ、あるデジタル値の上位ビットと、別のデジタル値の上位ビットとが同一であるか否かを判定する。同一であれば、“0”を、異なれば“1”を出力する。判定レジスタ124は上記リセット信号が入力されると、初期値にリセットする。すなわち、全てのビット値を“0”にリセットする。ここでは、4ビットのデジタル値を扱うため、“0000”となる。   The determination register 124 can handle a digital value of (R−r) bits (here, 4 bits), and whether or not the upper bits of one digital value and the upper bits of another digital value are the same. judge. If they are the same, “0” is output, and if they are different, “1” is output. The determination register 124 is reset to an initial value when the reset signal is input. That is, all bit values are reset to “0”. In this case, since a 4-bit digital value is handled, “0000” is set.

スイッチ122は、入力される上位ビットが、N個のデジタル値のうちの先頭以外のデジタル値のものである場合、出力先を切り換え、当該上位ビットをOR回路125およびXOR回路126にそれぞれ出力する。   The switch 122 switches the output destination and outputs the upper bits to the OR circuit 125 and the XOR circuit 126 when the input upper bits are those of digital values other than the head of the N digital values. .

OR回路125は、信号レジスタ123に一時的に格納されている上位ビットと、スイッチ122から入力される上位ビットとの論理和をとり、その論理和結果を信号レジスタ123に格納する。XOR回路126は、信号レジスタ123に一時的に格納されている上位ビットと、スイッチ122から入力される上位ビットとの排他論理和をとり、その排他論理和結果をOR回路127に出力する。当該排他論理和結果は、上位ビット同士のビット単位の合致を示すものである。合致しているビットは“0”となり、合致していないビットは“1”となる。   The OR circuit 125 takes a logical sum of the upper bits temporarily stored in the signal register 123 and the upper bits input from the switch 122 and stores the logical sum result in the signal register 123. The XOR circuit 126 performs an exclusive OR of the upper bits temporarily stored in the signal register 123 and the upper bits input from the switch 122 and outputs the exclusive OR result to the OR circuit 127. The exclusive OR result indicates a bit unit match between the upper bits. The matching bit is “0”, and the non-matching bit is “1”.

OR回路127は、判定レジスタ124に格納されている値と、XOR回路126から入力される値との論理和をとり、その論理和結果をスイッチ128を介して判定レジスタ124に格納する。以上の処理がN回、繰り返されると、スイッチ128の出力先が切り換わり、OR回路127からの出力されるデジタル値は、スイッチ128を介してカウンタ129に入力される。カウンタ129は、OR回路127から入力されるデジタル値の、最上位ビットから連続する“0”の数をカウントする。そのカウント値が上記共通ビット数pとして、圧縮部130および組立部140にそれぞれ出力される。   The OR circuit 127 calculates the logical sum of the value stored in the determination register 124 and the value input from the XOR circuit 126 and stores the logical sum result in the determination register 124 via the switch 128. When the above processing is repeated N times, the output destination of the switch 128 is switched, and the digital value output from the OR circuit 127 is input to the counter 129 via the switch 128. The counter 129 counts the number of “0” s consecutive from the most significant bit of the digital value input from the OR circuit 127. The count value is output to the compression unit 130 and the assembly unit 140 as the common bit number p.

図4は、6個のデジタル値の共通ビット数を検出するための共通ビット数検出部120の構成例を示す図である。図4に示すOR回路1251〜OR回路1255は、図3に示すOR回路125および信号レジスタ123の機能に対応する。図4に示すXOR回路1261〜XOR回路1265は、図3に示すXOR回路126の機能に対応する。図4に示すOR回路1271〜OR回路1275は、図3に示すOR回路127および判定レジスタ124の機能に対応する。   FIG. 4 is a diagram illustrating a configuration example of the common bit number detection unit 120 for detecting the common bit number of six digital values. 4 corresponds to the functions of the OR circuit 125 and the signal register 123 shown in FIG. The XOR circuit 1261 to XOR circuit 1265 shown in FIG. 4 corresponds to the function of the XOR circuit 126 shown in FIG. 4 corresponds to the functions of the OR circuit 127 and the determination register 124 shown in FIG.

ここで、上位ビット抽出器121に、上述した例のデジタル値xi(i=0,...,5)が入力される例を考える。上位ビット抽出器121は、それぞれのデジタル値xi(i=0,...,5)の上位4ビット(“1011”、“1010”、“1010”、“1001”、“1001”、“1000”)を抽出し、OR回路1251〜OR回路1255に出力する。これらの上位4ビットがOR回路1251〜OR回路1255に入力されると、OR回路1275から出力されるデジタル値は“0011”となる。カウンタ129は、“0011”の、最上位ビットから連続する“0”の数をカウントする。ここでは2である。すなわち、共通ビット数pは2となる。   Here, consider an example in which the digital value xi (i = 0,..., 5) of the above-described example is input to the upper bit extractor 121. The upper bit extractor 121 is provided with the upper 4 bits (“1011”, “1010”, “1010”, “1001”, “1001”, “1000” of each digital value xi (i = 0,..., 5). ”) Is extracted and output to the OR circuit 1251 to the OR circuit 1255. When these upper 4 bits are input to the OR circuit 1251 to the OR circuit 1255, the digital value output from the OR circuit 1275 is “0011”. The counter 129 counts the number of “0” s consecutive from the most significant bit of “0011”. Here it is 2. That is, the common bit number p is 2.

図2に戻り、圧縮部130は、保持部110に格納されているデジタル値の最上位ビットから、共通ビット数検出部120により検出された共通ビット数p分のビットデータを破棄し、かつ当該デジタル値の最下位ビットから、上記全体破棄ビット数から共通ビット数pを減算した下位側破棄ビット数分のビットデータを破棄する。以下の例では、圧縮部130は、保持部110に格納されている複数のデジタル値のうち一つを除き、全てのデジタル値の最上位ビットから、当該共通ビット数p分のビットデータを破棄し、かつ当該全てのデジタル値の最下位ビットから、当該下位側破棄ビット数分のビットデータを破棄する。すなわち、複数のデジタル値のうち一つのデジタル値(たとえば、先頭のデジタル値)について圧縮処理をスキップする。   Returning to FIG. 2, the compression unit 130 discards bit data for the common bit number p detected by the common bit number detection unit 120 from the most significant bit of the digital value stored in the holding unit 110, and Bit data corresponding to the number of lower-order discard bits obtained by subtracting the common bit number p from the total discard bit number is discarded from the least significant bit of the digital value. In the following example, the compression unit 130 discards bit data corresponding to the common bit number p from the most significant bit of all digital values except for one of a plurality of digital values stored in the holding unit 110. In addition, the bit data corresponding to the number of lower-order discard bits is discarded from the least significant bit of all the digital values. That is, the compression process is skipped for one digital value (for example, the first digital value) among the plurality of digital values.

図5は、圧縮部130の構成例を示す図である。圧縮部130は、スイッチ131および破棄部132を含む。スイッチ131は、保持部110から入力されるデジタル値が、N個のデジタル値のうちの先頭デジタル値の場合、そのデジタル値をそのまま組立部140に出力する。スイッチ131は、保持部110から入力されるデジタル値が、N個のデジタル値のうちの先頭以外のデジタル値の場合、そのデジタル値を破棄部132に出力する。   FIG. 5 is a diagram illustrating a configuration example of the compression unit 130. The compression unit 130 includes a switch 131 and a discard unit 132. When the digital value input from the holding unit 110 is the first digital value among the N digital values, the switch 131 outputs the digital value to the assembling unit 140 as it is. When the digital value input from the holding unit 110 is a digital value other than the head of the N digital values, the switch 131 outputs the digital value to the discard unit 132.

破棄部132は、上記共通ビット数pを参照して、Rビットのデジタル値をrビットのデジタル値に変換する。ここでは、8ビットのデジタル値を4ビットのデジタル値に変換する。たとえば、破棄部132は次の処理により変換する。まず、Rビットのデジタル値をシフトさせるべきビットシフト量sを算出する。このビットシフト量sは、(R−r−p)で算出される。ここでは、ビットシフト量sは(8−4−2)=2となる。   The discard unit 132 refers to the common bit number p and converts the R-bit digital value into an r-bit digital value. Here, an 8-bit digital value is converted into a 4-bit digital value. For example, the discarding unit 132 performs conversion by the following process. First, a bit shift amount s for shifting the digital value of R bits is calculated. This bit shift amount s is calculated by (R−rp). Here, the bit shift amount s is (8-4-2) = 2.

次に、破棄部132はRビットのデジタル値を、算出したビットシフト量s分、右ビットシフトする。これにより、sビット分の下位ビットデータが破棄される。次に、右ビットシフト後のデジタル値から下位rビットのビットデータを抽出するため、破棄部132は、当該右ビットシフト後のデジタル値に対してマスキング処理を施す。たとえば、右ビットシフト後のデジタル値と、“00001111”との論理和をとる。これにより、4ビットのデジタル値を抽出することができる。以上の処理を繰り返すことにより、上述した例のデジタル値xi(i=0,...,5)に対応する、圧縮後のデジタル値yi(i=0,...,5)は、次の値となる。   Next, the discarding unit 132 right-bit shifts the digital value of R bits by the calculated bit shift amount s. As a result, lower-order bit data for s bits is discarded. Next, in order to extract bit data of lower r bits from the digital value after the right bit shift, the discarding unit 132 performs a masking process on the digital value after the right bit shift. For example, a logical sum of the digital value after the right bit shift and “00001111” is calculated. Thereby, a 4-bit digital value can be extracted. By repeating the above processing, the compressed digital values yi (i = 0,..., 5) corresponding to the digital values xi (i = 0,. It becomes the value of.

y0:10111101
y1:1011
y2:1000
y3:0110
y4:0110
y5:0011
y0: 10111101
y1: 1011
y2: 1000
y3: 0110
y4: 0110
y5: 0011

図2に戻り、組立部140は、圧縮部130により圧縮されたデータを組み立てる。より具体的には、組立部140は、上記共通ビット数p、圧縮部130により圧縮されなかった一つの非圧縮デジタル値、および圧縮部130により圧縮された全ての圧縮デジタル値を一単位のビットストリームとして組み立てる。組立部140は、デジタル機器の内部バスなどで容易に扱うことができるよう、当該ビットストリームをバイト単位で処理可能にフォーマット化することが好ましい。つまり、当該ビットストリームのビット数が所定値の倍数、例えば8の倍数にならない場合、8の倍数になるよう、当該ビットストリーム内に調整ビットを挿入する。なお、所定値は、8以外でも勿論よい。   Returning to FIG. 2, the assembling unit 140 assembles the data compressed by the compressing unit 130. More specifically, the assembling unit 140 uses the common bit number p, one uncompressed digital value not compressed by the compressing unit 130, and all the compressed digital values compressed by the compressing unit 130 as one unit bit. Assemble as a stream. The assembly unit 140 preferably formats the bit stream so that it can be processed in units of bytes so that it can be easily handled by an internal bus of a digital device. That is, when the number of bits of the bit stream is not a multiple of a predetermined value, for example, a multiple of 8, adjustment bits are inserted into the bit stream so as to be a multiple of 8. Of course, the predetermined value may be other than 8.

以下、より具体的に説明する。まず、共通ビット数pを示すビットデータを配置し、次に、圧縮後のデジタル値yi(i=0,...,5)を順に配置する。ここで、共通ビット数pを表現するデジタル値のビット数qは、(R−r<2)の関係式を満たす必要がある。上述した例では、R=8、r=4であるため、4<2を満たす最小のqは3となる。 More specific description will be given below. First, bit data indicating the common bit number p is arranged, and then the compressed digital values yi (i = 0,..., 5) are arranged in order. Here, the bit number q of the digital value representing the common bit number p needs to satisfy the relational expression (R−r <2 q ). In the example described above, since R = 8 and r = 4, the minimum q that satisfies 4 <2q is 3.

上記ビットストリームの総ビット数Bは、下記式1により定義される。
B=R+r×(N−1)+q …(式1)
The total bit number B of the bit stream is defined by the following equation 1.
B = R + r × (N−1) + q (Formula 1)

上述した例では、N=6であるため、総ビット数Bは31となる。総ビット数Bをバイト単位である8の倍数にするには、調整ビットを1ビット挿入する必要がある。ここでは、共通ビット数pを表現するビットデータに1ビット追加する。すなわち、共通ビット数pを表現するデジタル値のビット数qを4とし、当該デジタル値の下位3ビットに上記共通ビット数pを割り当て、上記1ビットに調整ビットとして“0”を挿入する。これにより、バイト単位のフォーマット化が可能となる。   In the example described above, since N = 6, the total number of bits B is 31. In order to make the total bit number B a multiple of 8 which is a byte unit, it is necessary to insert one adjustment bit. Here, one bit is added to the bit data expressing the common bit number p. That is, the bit number q of the digital value expressing the common bit number p is set to 4, the common bit number p is assigned to the lower 3 bits of the digital value, and “0” is inserted as the adjustment bit into the 1 bit. Thereby, it is possible to format in units of bytes.

図6は、ビットストリームのデータ構造例を示す図である。当該データ構造は、上述した例の、6画素分の8ビットのデジタル値を、1画素分の8ビットのデジタル値および5画素分の4ビットのデジタル値に変換してフォーマット化したものである。なお、共通ビット数pの代わりに上記ビットシフト量sが付加されてもよい。組立部140は、一つのビットストリームを生成すると、その次の6画素分のデジタル値に対応したビットストリームを生成する。この処理を繰り返すことにより、一枚の画像全体を圧縮することができる。   FIG. 6 is a diagram illustrating a data structure example of a bit stream. The data structure is obtained by converting the 8-bit digital value for 6 pixels into the 8-bit digital value for 1 pixel and the 4-bit digital value for 5 pixels in the above example and formatting. . The bit shift amount s may be added instead of the common bit number p. When generating one bit stream, the assembling unit 140 generates a bit stream corresponding to digital values for the next six pixels. By repeating this process, one entire image can be compressed.

図7は、本発明の実施の形態1に係るデータ伸張装置200の構成を示す図である。当該データ伸張装置200は、上述したデータ圧縮装置100により圧縮されたデータを伸張する装置である。データ伸張装置200は、保持部210、分解部220および伸張部230を備える。保持部210には、データ圧縮装置100により生成されたビットストリームが入力され、保持部210はそのビットストリームを一時保持する。   FIG. 7 is a diagram showing a configuration of the data decompression apparatus 200 according to Embodiment 1 of the present invention. The data decompression device 200 is a device that decompresses the data compressed by the data compression device 100 described above. The data decompression apparatus 200 includes a holding unit 210, a decomposition unit 220, and a decompression unit 230. The bit stream generated by the data compression apparatus 100 is input to the holding unit 210, and the holding unit 210 temporarily holds the bit stream.

分解部220は、保持部210から入力されるビットストリームを、上記共通ビット数pと、上記非圧縮デジタル値と、上記圧縮デジタル値とに分解し、伸張部230に出力する。図6に示したビットストリームの場合、まず先頭の共通ビット数pが取り出され、次に先頭の8ビットのデジタル値y0が取り出されて、以降、4ビットのデジタル値yi(i=1,...,5)が順次、取り出される。   The decomposition unit 220 decomposes the bitstream input from the holding unit 210 into the common bit number p, the uncompressed digital value, and the compressed digital value, and outputs the result to the decompression unit 230. In the case of the bit stream shown in FIG. 6, the leading common bit number p is first extracted, then the leading 8-bit digital value y0 is extracted, and then the 4-bit digital value yi (i = 1,. .., 5) are taken out sequentially.

伸張部230は、上記圧縮デジタル値の上位ビット側に、上記非圧縮デジタル値と共通する上位ビットデータを付加し、かつ上記圧縮デジタル値の下位ビット側に、上記共通ビット数pから求められる上記下位側破棄ビット数分のビットデータを付加する。当該ビットデータを付加する際、当該下位側破棄ビット数で表現可能な数値範囲の中間値を、補正項として付加してもよい。   The decompressing unit 230 adds upper bit data common to the uncompressed digital value to the upper bit side of the compressed digital value, and the lower bit side of the compressed digital value is obtained from the common bit number p. Add bit data for the number of lower bits discarded. When adding the bit data, an intermediate value in a numerical range that can be expressed by the lower-order discard bit number may be added as a correction term.

図8は、伸張部230の構成例を示す図である。伸張部230は、中間値算出器231、スイッチ232、上位ビット抽出器233、シフタ234、OR回路235およびOR回路236を含む。   FIG. 8 is a diagram illustrating a configuration example of the decompression unit 230. The decompression unit 230 includes an intermediate value calculator 231, a switch 232, an upper bit extractor 233, a shifter 234, an OR circuit 235, and an OR circuit 236.

スイッチ232には、デジタル値yi(i=0,...,5)が順次、入力される。スイッチ232は、先頭デジタル値y0が入力された場合、そのまま外部に出力するとともに、上位ビット抽出器233に出力する。スイッチ232は、先頭以外のデジタル値yi(i=0,...,5)が入力された場合、そのデジタル値yi(i=0,...,5)をシフタ234に出力する。   Digital values yi (i = 0,..., 5) are sequentially input to the switch 232. When the head digital value y0 is input, the switch 232 outputs the same as it is to the outside and also outputs it to the upper bit extractor 233. When a digital value yi (i = 0,..., 5) other than the head is input, the switch 232 outputs the digital value yi (i = 0,..., 5) to the shifter 234.

先頭デジタル値y0が伸張部230に入力されると同期して、上記共通ビット数qも伸張部230に入力される。当該共通ビット数qは、中間値算出器231、上位ビット抽出器233およびシフタ234にそれぞれ入力される。   When the leading digital value y0 is input to the decompression unit 230, the common bit number q is also input to the decompression unit 230. The common bit number q is input to the intermediate value calculator 231, the upper bit extractor 233, and the shifter 234, respectively.

上位ビット抽出器233は、上記先頭デジタル値y0から、下記式2で定義される共通マスク値mを生成する。
m=(y0>>(R−p))<<(R−p) …(式2)
ここで、演算子“>>”は右ビットシフト、演算子“<<”は左ビットシフトを表す。
The upper bit extractor 233 generates a common mask value m defined by the following equation 2 from the head digital value y0.
m = (y0 >> (Rp)) << (Rp) (Formula 2)
Here, the operator “>>” represents a right bit shift, and the operator “<<” represents a left bit shift.

上位ビット抽出器233は、上記先頭デジタル値y0のビット数(=8)から、上記共通ビット数q(=2)を減算して得られるビット数分、上記先頭デジタル値y0を右ビットシフトし、その後、同じビット数分、左ビットシフトする。これにより、上記先頭デジタル値y0の下位6ビットをマスクすることができる。上述した例では、上記先頭デジタル値y0は“10111101”であるため、その共通マスク値mは“10000000”となる。この共通マスク値mは、次のビットストリームの共通ビット数qが入力されるまで、上位ビット抽出器233にて保持される。   The upper bit extractor 233 right-bit shifts the head digital value y0 by the number of bits obtained by subtracting the common bit number q (= 2) from the number of bits (= 8) of the head digital value y0. Then, the left bit is shifted by the same number of bits. Thereby, the lower 6 bits of the head digital value y0 can be masked. In the example described above, since the top digital value y0 is “10111101”, the common mask value m is “10000000”. The common mask value m is held in the upper bit extractor 233 until the common bit number q of the next bit stream is input.

シフタ234は、上記先頭以外のデジタル値yi(i=0,...,5)を、下記式3で定義されるビットシフト量t分、左ビットシフトする。左ビットシフトされた後のデジタル値yi(i=0,...,5)は、OR回路235に出力される。
t=R−r−p …(式3)
The shifter 234 shifts the digital values yi (i = 0,..., 5) other than the above by a bit shift amount t defined by the following equation 3 to the left. The digital value yi (i = 0,..., 5) after the left bit shift is output to the OR circuit 235.
t = R−r−p (Formula 3)

ここでは、ビットシフト量tは、8−4−2=2となる。上述した例では、デジタル値y1は“1011”であるため、左ビットシフトされた後のデジタル値y1’は“101100”となる。   Here, the bit shift amount t is 8-4-2 = 2. In the example described above, since the digital value y1 is “1011”, the digital value y1 ′ after the left bit shift is “101100”.

OR回路236は、シフタ234により左ビットシフトされた後のデジタル値yi’(i=1,...,5)と、上位ビット抽出器233に格納されている共通マスク値mとの論理和をとる。上述した例では、左ビットシフトされた後のデジタル値y1’が“101100”であるため、論理和後のデジタル値y1’’は“10101100”となる。   The OR circuit 236 performs a logical OR between the digital value yi ′ (i = 1,..., 5) after the left bit shift by the shifter 234 and the common mask value m stored in the upper bit extractor 233. Take. In the example described above, the digital value y1 ′ after the left bit shift is “101100”, and thus the digital value y1 ″ after the logical sum is “10101100”.

中間値算出器231は、圧縮、伸張の過程を経て発生する、元のデジタル値と復元されるデジタル値との誤差を抑えるための補正項を算出する。より具体的には、圧縮時にR(=8)ビットのデジタル値から、r(=4)ビットのデジタル値に変換するため、元のデジタル値は、上記ビットシフト量s(=R−r−p=8−4−2=2)分、右ビットシフトされた。したがって、元のデジタル値に対して下位sビット、すなわち最大2−1の誤差が発生し得る。 The intermediate value calculator 231 calculates a correction term for suppressing an error between the original digital value and the restored digital value that occurs through the compression and expansion processes. More specifically, since an R (= 8) bit digital value is converted into an r (= 4) bit digital value during compression, the original digital value is converted into the bit shift amount s (= R−r−). The bit was shifted to the right by p = 8-4-2 = 2). Thus, an error of the lower s bits, ie a maximum of 2 s −1, can occur with respect to the original digital value.

この誤差を抑えるため、中間値算出器231は、入力される共通ビット数qを用いて上記ビットシフト量sを求め、2s−1を補正項として算出する。なお、s=0の場合、当該補正項は0となる。上述した例では、s=2となり、当該補正項は2となる。 In order to suppress this error, the intermediate value calculator 231 obtains the bit shift amount s using the input common bit number q, and calculates 2 s−1 as a correction term. When s = 0, the correction term is 0. In the example described above, s = 2 and the correction term is 2.

OR回路236は、OR回路235から入力される論理和後のデジタル値yi’’(i=1,...,5)と、中間値算出器231から入力される補正項との論理和をとり、復元デジタル値xi’(i=1,...,5)を出力する。上述した例では、論理和後のデジタル値y1’’は“10101100”であるため、復元デジタル値x1’は“10101110”となる。元のデジタル値x1は“10101111”であり、その誤差を1に抑えることができる。   The OR circuit 236 calculates the logical sum of the digital value yi ″ (i = 1,..., 5) after the logical sum input from the OR circuit 235 and the correction term input from the intermediate value calculator 231. The restored digital value xi ′ (i = 1,..., 5) is output. In the above-described example, the digital value y1 ″ after the logical sum is “10101100”, and thus the restored digital value x1 ′ is “10101110”. The original digital value x1 is “10101111”, and the error can be suppressed to 1.

以上説明したよう実施の形態1によれば、できるだけ下位ビット側の破棄ビット数を抑えることができるため、品質の低下を抑制しながら、簡素な処理でデジタルデータを圧縮または伸張することができる。また、圧縮および伸張を基本的な論理演算のみで実現することがき、ハードウェア化が容易である。ハードウェア化した場合、圧縮および伸張を、より高速化および安定化することができる。また、圧縮および伸張する際に変換テーブルを参照しないため、それによるメモリ容量の増大も発生しない。また、圧縮、伸張を経ることより発生する元のデータと復元データとの誤差も軽微なものにとどめることができる。   As described above, according to the first embodiment, the number of discarded bits on the lower bit side can be suppressed as much as possible, so that digital data can be compressed or expanded by a simple process while suppressing a decrease in quality. In addition, compression and decompression can be realized only by basic logical operations, and hardware implementation is easy. When implemented in hardware, compression and decompression can be made faster and more stable. Further, since the conversion table is not referred to when compressing and expanding, the memory capacity does not increase. Further, the error between the original data and the restored data generated by the compression and expansion can be kept to a slight level.

また、実施の形態1に係る圧縮伸張技術を、連続する画素データに適用した場合、複数のデジタル値の上記共通ビット数が多くなる傾向がある。隣接する画素データは近似する可能性が高いためである。とくに、空などの背景部分でその傾向が強くなる。この場合、より下位ビット側の破棄ビット数を抑えることができ、品質維持と高圧縮率を両立することができる。   Further, when the compression / decompression technique according to Embodiment 1 is applied to continuous pixel data, the number of common bits of a plurality of digital values tends to increase. This is because the adjacent pixel data is highly likely to be approximated. In particular, the tendency becomes strong in background parts such as the sky. In this case, the number of discarded bits on the lower bit side can be suppressed, and both quality maintenance and a high compression rate can be achieved.

実施の形態2.
実施の形態2では、上述した実施の形態1に係る圧縮方式と、差分圧縮方式とを適宜、使い分けるようにした圧縮装置および方法について説明する。
Embodiment 2. FIG.
In the second embodiment, a compression apparatus and method that appropriately use the compression method according to the first embodiment and the differential compression method will be described.

図9は、本発明の実施の形態2に係るデータ圧縮装置100mの構成を示す図である。このデータ圧縮装置100mの構成は、図2に示したデータ圧縮装置100の、保持部110と共通ビット数検出部120との間に、差分生成部150および判定部160を追加した構成である。   FIG. 9 is a diagram showing a configuration of a data compression device 100m according to Embodiment 2 of the present invention. The configuration of the data compression device 100m is a configuration in which a difference generation unit 150 and a determination unit 160 are added between the holding unit 110 and the common bit number detection unit 120 of the data compression device 100 illustrated in FIG.

差分生成部150は、保持部110から連続的に入力される複数のデジタル値の、連続するデジタル値間の差分値をそれぞれ求める。上述した例では、{デジタル値Xi−デジタル値X(i+1)}(i=0,...,5)を算出する。ここでは、デジタル値が6個であるため、5個の差分値が算出される。なお、差分値の正負は破棄されず、維持される。   The difference generation unit 150 obtains difference values between successive digital values of a plurality of digital values continuously input from the holding unit 110. In the example described above, {digital value Xi−digital value X (i + 1)} (i = 0,..., 5) is calculated. Here, since there are six digital values, five difference values are calculated. The sign of the difference value is not discarded and is maintained.

判定部160は、差分生成部150により求められた全ての差分値が、上記全体破棄ビット数で表現可能な範囲内の値であるか否かを判定する。上述した例では、全体破棄ビット数が4であるため、その全体破棄ビット数で表現可能な範囲内の値は、−7〜+7である。全体破棄ビット数の最上位ビットは符号ビットに当てられる。判定部160は、当該全ての差分値が上記全体破棄ビット数で表現可能な範囲内の値である場合、後述する差分圧縮方式で上記ビットストリームを生成するよう、組立部140および差分生成部150に指示する。当該全ての差分値のうちの一つでも、上記全体破棄ビット数で表現可能な範囲外の値がある場合、実施の形態1に係る圧縮方式で上記ビットストリームを生成するよう、共通ビット数検出部120および組立部140に指示する。   The determination unit 160 determines whether all the difference values obtained by the difference generation unit 150 are values within a range that can be expressed by the total number of discarded bits. In the example described above, since the total number of discarded bits is 4, the value within the range that can be expressed by the total number of discarded bits is −7 to +7. The most significant bit of the total discard bit number is assigned to the sign bit. When all the difference values are values within a range that can be expressed by the total number of discarded bits, the determination unit 160 generates the bit stream using a differential compression method, which will be described later, and the assembly unit 140 and the difference generation unit 150. To instruct. If even one of all the difference values is out of the range that can be represented by the total number of discarded bits, the common bit number detection is performed so that the bit stream is generated by the compression method according to the first embodiment. The unit 120 and the assembly unit 140 are instructed.

組立部140は、判定部160により当該全ての差分値が上記全体破棄ビット数で表現可能な範囲内の値である場合、圧縮方式が差分方式であることを示す識別情報、上記複数のデジタル値の先頭または最後尾のデジタル値、および上記全ての差分値を一単位のビットストリームとして組み立てる。例えば、圧縮方式が差分方式であることを示す識別情報としては、実施の形態2の上述の説明における8ビットを4ビットに変換する方式で共通ビット数が0〜4の範囲の値をとることになるので、共通ビット数の値以外の値、例えば7を割り当てるようにし、共通ビット数と識別することが可能となる。   The assembling unit 140, when all the difference values by the determination unit 160 are values within the range that can be expressed by the total number of discarded bits, identification information indicating that the compression method is the difference method, the plurality of digital values The first or last digital value and all the difference values are assembled as a unit bit stream. For example, the identification information indicating that the compression method is a differential method takes a value in the range of 0 to 4 common bits in the method of converting 8 bits into 4 bits in the above description of the second embodiment. Therefore, a value other than the value of the common bit number, for example, 7 can be assigned to distinguish it from the common bit number.

図10は、差分圧縮方式で生成されたビットストリームのデータ構造例を示す図である。当該ビットストリームでは、図6に示したビットストリームの共通ビット数の代わりに、圧縮方式が差分方式であることを示す識別情報が挿入される。その識別情報に続いて、先頭デジタル値X0、先頭デジタル値X0と2番目デジタル値X1との差分Δ1、2番目デジタル値X1と3番目デジタル値X2との差分Δ2、...、5番目デジタル値X4と6番目デジタル値X5との差分Δ5等、1つ前の隣接画素との差分が記述される。   FIG. 10 is a diagram illustrating a data structure example of a bitstream generated by the differential compression method. In the bitstream, identification information indicating that the compression method is a differential method is inserted instead of the common bit number of the bitstream shown in FIG. Following the identification information, the leading digital value X0, the difference Δ1 between the leading digital value X0 and the second digital value X1, the differences Δ2,... Between the second digital value X1 and the third digital value X2,. . . A difference from the previous adjacent pixel such as a difference Δ5 between the fifth digital value X4 and the sixth digital value X5 is described.

そのため、実施の形態2に対応するデータ伸張装置では、ビットストリーム中の先頭数ビットの識別情報を参照して、圧縮方式が実施の形態1の圧縮方式であれば、実施の形態1の伸張方式と同様に伸張する一方、圧縮方式が差分方式であることを示す識別情報であれば、実施の形態2の圧縮差分方式とは逆に伸張処理、すなわち先頭デジタル値X0から順に差分Δ1、差分Δ2、...、差分Δ5の各差分値を加算または減算することにより、2番目デジタル値X1〜6番目デジタル値X5を復元することになる。   Therefore, in the data decompression apparatus corresponding to the second embodiment, referring to the identification information of the first few bits in the bitstream, if the compression method is the compression method of the first embodiment, the decompression method of the first embodiment On the other hand, if the identification information indicates that the compression method is the differential method, the decompression process, that is, the difference Δ1 and the difference Δ2 are sequentially performed from the leading digital value X0, in contrast to the compression difference method of the second embodiment. ,. . . The second digital value X1 to the sixth digital value X5 are restored by adding or subtracting the difference values of the difference Δ5.

以上説明したように実施の形態2によれば、元のデジタル値と復元デジタル値との誤差の発生をさらに抑制することができる。差分圧縮方式では基本的に誤差が発生しないが、差分値の大きさがバラバラになる可能性があるため、圧縮率にバラツキが発生しやすいという性質がある。そのため、ハードウェア化に不向きである。しかしながら、全ての差分値を所定のビット数で表現できる場合、実施の形態1に係る圧縮方式より高品質に圧縮することができる。したがって、全ての差分値を所定のビット数で表現できる場合、差分圧縮方式を採用し、できない場合、実施の形態1に係る圧縮方式を採用することにより、圧縮率を一定に保ちながら、より高品質に圧縮することができる。   As described above, according to the second embodiment, it is possible to further suppress the occurrence of an error between the original digital value and the restored digital value. Although the difference compression method basically does not cause an error, there is a possibility that the difference value is likely to vary, so that the compression rate is likely to vary. Therefore, it is not suitable for hardware. However, when all the difference values can be expressed by a predetermined number of bits, it can be compressed with higher quality than the compression method according to the first embodiment. Therefore, when all the difference values can be expressed by a predetermined number of bits, the differential compression method is adopted. When the difference value cannot be adopted, the compression method according to the first embodiment is adopted, so that the compression rate is kept constant and higher. Can be compressed to quality.

つまり、例えば、グラデーション等のように微小に徐々に画素値が変化していく場合、実施の形態1の圧縮方式では、所定ビット数の下位ビットを破棄しているので、隣接画素間の差分や廃棄する下位ビットのビット数によっては、ビットがMSBの近くになった場合、復号した際に、元の信号値より隣接信号間の差が大きくなることにより、階段状の諧調が現れ、画質低下につながる恐れがある。しかし、実施の形態2の差分圧縮方式によれば、所定画素範囲内の全ての隣接画素間の差分が所定値内の場合は、グラデーション画像とみなせるので、実施の形態1の圧縮方式から実施の形態2の差分圧縮方式に切り替えれることにより、グラデーションのような微小な画像変化でも、高品質に圧縮することができる。   In other words, for example, when the pixel value gradually changes as in gradation or the like, the lower-order bits of the predetermined number of bits are discarded in the compression method of the first embodiment. Depending on the number of low-order bits to be discarded, when the bit is close to the MSB, a difference between adjacent signals becomes larger than the original signal value when decoding, resulting in a step-like gradation, resulting in a reduction in image quality May lead to However, according to the differential compression method of the second embodiment, if the difference between all adjacent pixels within the predetermined pixel range is within the predetermined value, it can be regarded as a gradation image. By switching to the differential compression method of mode 2, even a minute image change such as gradation can be compressed with high quality.

以上、本発明をいくつかの実施の形態をもとに説明した。これらの実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。   The present invention has been described based on some embodiments. It is understood by those skilled in the art that these embodiments are exemplifications, and that various modifications can be made to combinations of the respective constituent elements and processing processes, and such modifications are also within the scope of the present invention. By the way.

例えば、上述したパラメータ(たとえば、N、r)を固定ではなく、画像内容に応じて適応的に可変制御してもよい。たとえば、データ圧縮装置100は、表示装置500内の別の構成要素から、圧縮すべき画像内の輝度分布を取得する。取得された輝度分布が所定の基準パターンより平準化しているエリアの画素データを圧縮する場合、データ圧縮装置100内の図示しない制御部は、Nの値を現在値より大きくするよう制御する。また、rの値を現在値より小さくするよう制御する。取得された輝度分布が所定の基準パターンよりばらついている場合、その逆に制御する。   For example, the above-described parameters (for example, N, r) may be adaptively variably controlled according to the image content, instead of being fixed. For example, the data compression device 100 acquires the luminance distribution in the image to be compressed from another component in the display device 500. When compressing pixel data in an area where the acquired luminance distribution is leveled from a predetermined reference pattern, a control unit (not shown) in the data compression apparatus 100 controls the value of N to be larger than the current value. Also, the value of r is controlled to be smaller than the current value. When the acquired luminance distribution varies from a predetermined reference pattern, control is performed in reverse.

また、上述した実施の形態では、データ圧縮装置100とデータ伸張装置200との間で、処理されるべき画像のサイズが既知であるとしたが、既知でない場合、上記ビットストリームの共通ビット数を記述する領域内にそのサイズを記述してもよい。もちろん、上記ビットストリームの他の領域に記述してもよい。   In the above-described embodiment, the size of the image to be processed is known between the data compression apparatus 100 and the data expansion apparatus 200. If the size is not known, the common bit number of the bit stream is set. The size may be described in the area to be described. Of course, you may describe in the other area | region of the said bit stream.

また、共通ビット数を記述する領域として4ビット分、確保し、共通ビット数を3ビットで記述し、残りの1ビットで、当該ビットストリームに含まれる画素データの画面上の位置情報を記述してもよい。主走査方向を横方向、副走査方向を縦方向とする走査方式を前提とし、画面の横ラインの先頭画素データを含むビットストリームでは、上記残りの1ビットに“1”を記述し、先頭画素データを含まないビットストリームでは、上記残りの1ビットに“0”を記述する。この情報により、ライン数のカウントや、同期をとることも容易となる。   In addition, 4 bits are reserved as an area for describing the number of common bits, the number of common bits is described by 3 bits, and the remaining 1 bit describes the position information on the screen of the pixel data included in the bit stream. May be. On the premise of a scanning method in which the main scanning direction is the horizontal direction and the sub-scanning direction is the vertical direction, in the bit stream including the top pixel data of the horizontal line of the screen, “1” is described in the remaining 1 bit, and the top pixel In a bit stream not including data, “0” is described in the remaining 1 bit. This information makes it easy to count the number of lines and synchronize.

また、上述した実施の形態では、圧縮すべきデジタルデータの一例として、画像データを説明したが、音声データでもよい。共通ビット数検出部120は、保持部110から連続的に入力される音声データを同様に処理することができる。   In the above-described embodiment, image data has been described as an example of digital data to be compressed. However, audio data may be used. The common bit number detection unit 120 can similarly process the audio data continuously input from the holding unit 110.

100 データ圧縮装置、 100a 第1圧縮部、 100b 第2圧縮部、 110 保持部、 120 共通ビット数検出部、 130 圧縮部、 140 組立部、 150 差分生成部、 160 判定部、 200a 第1伸張部、 200b 第2伸張部、 200 データ伸張装置、 210 保持部、 220 分解部、 230 伸張部、 500 表示装置、 510 復号部、 520 フレームメモリ、 530 中間フレーム生成部、 540 表示部、 550 内部バス。   100 data compression device, 100a first compression unit, 100b second compression unit, 110 holding unit, 120 common bit number detection unit, 130 compression unit, 140 assembly unit, 150 difference generation unit, 160 determination unit, 200a first decompression unit 200b second decompression unit, 200 data decompression device, 210 holding unit, 220 decomposing unit, 230 decompression unit, 500 display device, 510 decoding unit, 520 frame memory, 530 intermediate frame generation unit, 540 display unit, 550 internal bus.

Claims (7)

デジタルデータを構成する複数のデジタル値を、最上位ビットからビット単位で比較していくことにより、前記複数のデジタル値間でビット値が共通する、最上位ビットからのビット数を共通ビット数として検出する共通ビット数検出部と、
前記デジタル値の最上位ビットから、前記共通ビット数検出部により検出された共通ビット数分のビットデータを破棄し、かつ前記デジタル値の最下位ビットから、予め設定された全体破棄ビット数から前記共通ビット数を減算した下位側破棄ビット数分のビットデータを破棄することにより前記デジタル値を圧縮する圧縮部と、
を備えることを特徴とするデータ圧縮装置。
By comparing multiple digital values that make up digital data bit by bit from the most significant bit, the bit number from the most significant bit, where the bit value is common among the multiple digital values, is the common bit number A common bit number detection unit to detect;
From the most significant bit of the digital value, the bit data corresponding to the number of common bits detected by the common bit number detection unit is discarded, and from the least significant bit of the digital value, from the preset total number of discarded bits A compression unit that compresses the digital value by discarding bit data corresponding to the number of lower-order discard bits obtained by subtracting the common bit number;
A data compression apparatus comprising:
前記圧縮部により圧縮されたデータを組み立てる組立部をさらに備え、
前記圧縮部は、前記複数のデジタル値のうち一つのデジタル値について圧縮処理をスキップし、
前記組立部は、前記共通ビット数、前記圧縮部により圧縮されなかった一つの非圧縮デジタル値、および前記圧縮部により圧縮された圧縮デジタル値を一単位のビットストリームとして組み立てることを特徴とする請求項1に記載のデータ圧縮装置。
An assembly unit for assembling the data compressed by the compression unit;
The compression unit skips compression processing for one digital value of the plurality of digital values;
The assembly unit assembles the number of common bits, one uncompressed digital value not compressed by the compression unit, and a compressed digital value compressed by the compression unit as a unit bit stream. Item 2. The data compression device according to Item 1.
前記組立部は、前記ビットストリームのビット数が所定値の倍数になるよう、調整ビットを挿入することを特徴とする請求項2に記載のデータ圧縮装置。   The data compression apparatus according to claim 2, wherein the assembling unit inserts adjustment bits so that the number of bits of the bit stream is a multiple of a predetermined value. 連続的に入力される複数のデジタル値の、連続するデジタル値間の差分値をそれぞれ求める差分生成部と、
前記差分生成部により求められた全ての差分値が、前記全体破棄ビット数で表現可能な範囲内の値であるか否かを判定する判定部と、をさらに備え、
前記組立部は、前記判定部により前記全ての差分値が前記全体破棄ビット数で表現可能な範囲内の値である場合、圧縮方式が差分方式であることを示す識別情報、前記複数のデジタル値の先頭または最後尾のデジタル値、および前記全ての差分値を一単位のビットストリームとして組み立てることを特徴とする請求項2または3に記載のデータ圧縮装置。
A difference generation unit that obtains a difference value between successive digital values of a plurality of digital values that are continuously input; and
A determination unit that determines whether or not all the difference values obtained by the difference generation unit are values within a range that can be expressed by the total number of discarded bits,
The assembly unit, when all the difference values are values that can be expressed by the total number of discarded bits by the determination unit, identification information indicating that the compression method is a difference method, the plurality of digital values 4. The data compression apparatus according to claim 2, wherein the first or last digital value and all the difference values are assembled as a unit bit stream.
請求項2または3に記載のデータ圧縮装置により圧縮されたデータを伸張するデータ伸張装置であって、
前記ビットストリームを、前記共通ビット数と、前記非圧縮デジタル値と、前記圧縮デジタル値とに分解する分解部と、
前記圧縮デジタル値の上位ビット側に、前記非圧縮デジタル値と共通する上位ビットデータを付加し、かつ前記圧縮デジタル値の下位ビット側に、前記共通ビット数から求められる前記下位側破棄ビット数分のビットデータを付加する伸張部と、
を備えることを特徴とするデータ伸張装置。
A data decompression device for decompressing data compressed by the data compression device according to claim 2 or 3,
A decomposing unit that decomposes the bitstream into the common bit number, the uncompressed digital value, and the compressed digital value;
The upper bit side common to the uncompressed digital value is added to the upper bit side of the compressed digital value, and the lower-order discard bit number obtained from the common bit number is added to the lower bit side of the compressed digital value. A decompression unit for adding bit data of
A data decompression apparatus comprising:
前記伸張部は、前記圧縮デジタル値の下位ビット側に、前記下位側破棄ビット数で表現可能な数値範囲の中間値を付加することを特徴とする請求項5に記載のデータ伸張装置。   6. The data decompression apparatus according to claim 5, wherein the decompression unit adds an intermediate value in a numerical range that can be expressed by the number of lower-order discard bits to the lower-order bits of the compressed digital value. 符号化された画像データを復号する復号部と、
前記復号部により復号された画像データを圧縮する請求項2または3に記載のデータ圧縮装置と、
前記データ圧縮装置により圧縮された画像データを伸張する請求項5または6に記載のデータ伸張装置と、
前記データ伸張装置により伸張された画像データを表示する表示部と、
を備えることを特徴とする表示装置。
A decoding unit for decoding the encoded image data;
The data compression device according to claim 2 or 3, wherein the image data decoded by the decoding unit is compressed.
The data expansion device according to claim 5 or 6, wherein the image data compressed by the data compression device is expanded.
A display unit for displaying the image data expanded by the data expansion device;
A display device comprising:
JP2009074830A 2009-03-25 2009-03-25 Data compression device, data decompression device, and display device equipped with the same Active JP5093171B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009074830A JP5093171B2 (en) 2009-03-25 2009-03-25 Data compression device, data decompression device, and display device equipped with the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009074830A JP5093171B2 (en) 2009-03-25 2009-03-25 Data compression device, data decompression device, and display device equipped with the same

Publications (2)

Publication Number Publication Date
JP2010232712A JP2010232712A (en) 2010-10-14
JP5093171B2 true JP5093171B2 (en) 2012-12-05

Family

ID=43048165

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009074830A Active JP5093171B2 (en) 2009-03-25 2009-03-25 Data compression device, data decompression device, and display device equipped with the same

Country Status (1)

Country Link
JP (1) JP5093171B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5598342B2 (en) * 2011-01-14 2014-10-01 株式会社デンソー Vehicle data recording device
JP5841268B2 (en) * 2011-12-21 2016-01-13 インテル・コーポレーション Perceptual lossless compression of image data transmitted over uncompressed video interconnects

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1132328A (en) * 1997-07-10 1999-02-02 Pfu Ltd Method and device for compressing multilevel picture data and recording medium
JPH11205613A (en) * 1998-01-14 1999-07-30 Ricoh Co Ltd Image processor
JP3999442B2 (en) * 1999-05-10 2007-10-31 株式会社リコー Encoding device, decoding device, encoding method, decoding method, and computer-readable recording medium for executing the method
JP2005204247A (en) * 2004-01-19 2005-07-28 Auto Network Gijutsu Kenkyusho:Kk Motion picture compression apparatus and method, and motion picture transmission system
JP4107314B2 (en) * 2005-03-30 2008-06-25 日本電気株式会社 Image processing, compression, expansion, transmission, transmission, reception apparatus and method, program thereof, and display apparatus

Also Published As

Publication number Publication date
JP2010232712A (en) 2010-10-14

Similar Documents

Publication Publication Date Title
US8073269B2 (en) Image decoding apparatus and image decoding method
US6301304B1 (en) Architecture and method for inverse quantization of discrete cosine transform coefficients in MPEG decoders
JP2007266970A (en) Moving image decoding method and device
JP5221430B2 (en) Image compression apparatus and image expansion apparatus
JP5093171B2 (en) Data compression device, data decompression device, and display device equipped with the same
US8537890B2 (en) Video decoder with adaptive outputs
US20130028528A1 (en) Image processing method, encoding device, decoding device, and image processing apparatus
US20080181314A1 (en) Image coding apparatus and image coding method
JP2007531450A (en) Digital video signal processing method and digital video signal processing system
JP2010135885A (en) Image coding apparatus and method
US8139632B2 (en) Video decoder with adaptive outputs
JP2009010612A (en) Image compressing device and method
KR100798386B1 (en) Method of compressing and decompressing image and equipment thereof
JP2007208796A (en) Video signal encoding transmission and decoding method
US20020118757A1 (en) Motion image decoding apparatus and method reducing error accumulation and hence image degradation
US8363725B2 (en) Method and apparatus for VLC encoding in a video encoding system
JP2000165873A (en) Compression method for moving picture information and its system
JP2009171134A (en) Video format converter
US20220201340A1 (en) Image processing device and method for operating image processing device
JP2008160466A (en) Video signal processor
JP2011135330A (en) Encoding device, decoding device, encoding method, and decoding method
WO2013018249A1 (en) Image transmission device, image transmission method, image receiving device, and image receiving method
JP2012004898A (en) Storage device, encoding device, encoding method, and program
US20220201060A1 (en) Image processing device and method for operating image processing device
JP3781012B2 (en) Image data compression method, image data expansion method, and image data expansion circuit

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20111012

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111226

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120808

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120821

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120903

R150 Certificate of patent or registration of utility model

Ref document number: 5093171

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150928

Year of fee payment: 3