JP2013211810A - Encoding device and encoding method, and decoding device and decoding method - Google Patents

Encoding device and encoding method, and decoding device and decoding method Download PDF

Info

Publication number
JP2013211810A
JP2013211810A JP2012082468A JP2012082468A JP2013211810A JP 2013211810 A JP2013211810 A JP 2013211810A JP 2012082468 A JP2012082468 A JP 2012082468A JP 2012082468 A JP2012082468 A JP 2012082468A JP 2013211810 A JP2013211810 A JP 2013211810A
Authority
JP
Japan
Prior art keywords
data
output
unit
input
decoding
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.)
Granted
Application number
JP2012082468A
Other languages
Japanese (ja)
Other versions
JP5891907B2 (en
Inventor
Eiji Matsumoto
栄治 松本
Hideki Aiba
英樹 相羽
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 JP2012082468A priority Critical patent/JP5891907B2/en
Publication of JP2013211810A publication Critical patent/JP2013211810A/en
Application granted granted Critical
Publication of JP5891907B2 publication Critical patent/JP5891907B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To facilitate recovery from an error during decoding and to obtain an image of higher quality after decoding.SOLUTION: A differential between pixel data inputted from a pixel block including a predetermined number of continuous pixel data items and local decode data from a retarder is quantized. The quantized differential data are inputted to a first input terminal of an output selector. Furthermore, the quantized differential data are inversely quantized, added to the local decode data supplied from the retarder by an adder, and inputted to a local decode data selector. The local decode data selector selects input pixel data at the head of a line and selects output of the adder in other timing. Output of the local decode data selector is stored in the retarder as next local decode data and inputted to a second input terminal of the output selector. The output selector selects the second input terminal in accordance with input of pixel data at the head of the pixel block and selects the first input terminal in accordance with input of other pixel data.

Description

本発明は、画像データを圧縮符号化する際に用いて好適な符号化装置および符号化方法、ならびに、復号装置および復号方法に関する。   The present invention relates to an encoding device and an encoding method, and a decoding device and a decoding method suitable for use in compression encoding image data.

近年、デジタルハイビジョン放送やHD(High Definition)画像に対応する録画装置の普及、デジタルカメラの高解像度化などにより、家庭で使用するテレビジョン受像機などにおいても、大画面化および高解像度化が進んでいる。このため、テレビジョン受像機において画像処理を行うLSI(Large-Scale Integration)についても、HD画像(1920画素×1080ライン)に対応したLSIの需要が高まっている。   In recent years, with the spread of digital high-definition broadcasts and HD (High Definition) image recording devices, and the higher resolution of digital cameras, the size and resolution of television receivers used at home has increased. It is out. For this reason, as for LSI (Large-Scale Integration) that performs image processing in a television receiver, the demand for LSIs that support HD images (1920 pixels × 1080 lines) is increasing.

ところで、画像処理において、エンハンサやフレームレート変換処理などは、1フレーム以上の画像データをDRAM(Dynamic Random Access Memory)といったメモリに格納する必要がある。画像データを格納するためのメモリは、高速なアクセスが要求されるために高価であり、また、上述したHD画像の画像データを複数フレーム格納するためには、大容量のメモリが複数個必要になる場合もあり、製品のコストアップや、部品点数増加の要因となっている。   Incidentally, in image processing, enhancer, frame rate conversion processing, and the like require that image data of one frame or more be stored in a memory such as a DRAM (Dynamic Random Access Memory). A memory for storing image data is expensive because high-speed access is required, and a plurality of large-capacity memories are required to store a plurality of HD image data. In some cases, this increases the cost of the product and increases the number of parts.

そのため、画像データを圧縮符号化してメモリに格納する技術が従来から開発されている。画像データの圧縮符号化方式の一つとして、MPEG(Moving Pictures Experts Group)方式が知られているが、MPEG方式による圧縮符号化は、アルゴリズムが複雑であるため回路をLSI化した場合に大面積を占めることになり、画像の高画質化処理に特化した信号処理用LSIや、安価な画像処理用LSIに適用するには不向きである。   Therefore, a technique for compressing and encoding image data and storing it in a memory has been conventionally developed. The MPEG (Moving Pictures Experts Group) method is known as one of the compression coding methods for image data, but the compression coding by the MPEG method has a large area when the circuit is made into LSI because the algorithm is complicated. Therefore, it is not suitable for application to a signal processing LSI specialized in image quality enhancement processing or an inexpensive image processing LSI.

例えば、特許文献1には画像データを簡便に圧縮符号化するための符号化方式が開示されている。   For example, Patent Literature 1 discloses an encoding method for simply compressing and encoding image data.

特許文献1の記載によれば、符号化ブロック単位毎に、符号化順で1つ前の入力画素信号の局部復号信号との差分値を量子化することで、画像信号の圧縮符号化を行っている。符号化ブロックの先頭には、量子化されてない、すなわち、符号化されていない画素(原画素)が挿入されているため、圧縮符号化された画像信号は、符号化ブロック毎に独立して復号処理を施すことができる。そのため、例えば圧縮符号化された画像信号をメモリから読み出す際に読み出しエラーが発生しても、符号化ブロック単位で復旧することができる。   According to the description in Patent Literature 1, the image signal is compressed and encoded by quantizing the difference value between the local decoded signal of the previous input pixel signal in the coding order for each coding block unit. ing. Since a non-quantized pixel, that is, a non-encoded pixel (original pixel) is inserted at the head of the encoded block, the compression-encoded image signal is independent for each encoded block. Decoding processing can be performed. For this reason, for example, even when a read error occurs when a compression-encoded image signal is read from the memory, it can be restored in units of encoded blocks.

特開2011−124618号公報JP 2011-124618 A

特許文献1では、符号化ブロックの先頭に原画素が挿入されている。したがって、符号化ブロックの先頭毎に量子化誤差が「0」の画素が出現する。そのため、この画像を画面に表示させた場合に、量子化誤差が「0」の画素による符号化ブロック毎の縦縞が現れる現象が発生するという問題点があった。   In Patent Document 1, an original pixel is inserted at the head of an encoded block. Therefore, a pixel having a quantization error of “0” appears for each head of the encoded block. For this reason, when this image is displayed on the screen, there is a problem that a vertical stripe appears for each coding block due to a pixel having a quantization error of “0”.

本発明は、上記に鑑みてなされたものであって、復号時にエラーからの復旧が容易で、且つ、復号後により高品質な画像を得られるようにすることを目的とする。   The present invention has been made in view of the above, and an object of the present invention is to make it easy to recover from an error during decoding and to obtain a higher quality image after decoding.

上述した課題を解決し、目的を達成するために、第1の発明は、局部復号データが記憶される記憶部と、入力データと局部復号データとの差分を出力する差分出力部と、差分出力部により出力された差分を圧縮する圧縮部と、圧縮部で圧縮されたデータを伸長する伸長部と、伸長部で伸長されたデータに局部復号データを加算する加算部とを備え、加算部の出力を符号化順で次の局部復号データとして記憶部に記憶する局部復号部と、圧縮部の出力と、加算部の出力とのうち一方を選択して符号化データとして出力する第1の選択部とを有し、第1の選択部は、加算部の出力を所定数の入力データ毎に選択することを特徴とする。   In order to solve the above-described problems and achieve the object, the first invention includes a storage unit that stores local decoded data, a difference output unit that outputs a difference between input data and local decoded data, and a differential output A compression unit that compresses the difference output by the compression unit, a decompression unit that decompresses the data compressed by the compression unit, and an addition unit that adds the local decoded data to the data decompressed by the decompression unit. A first selection that outputs one of the output of the local decoding unit that stores the output in the storage unit as the next local decoded data in the encoding order in the storage unit, the output of the compression unit, and the output of the addition unit, and outputs the encoded data The first selection unit selects the output of the addition unit for each predetermined number of input data.

また、第2の発明は、入力データと記憶部に記憶される局部復号データとの差分を出力する差分出力ステップと、差分出力ステップにより出力された差分を圧縮する圧縮ステップと、圧縮ステップにより圧縮されたデータを伸長する伸長ステップと、伸長ステップにより伸長されたデータに局部復号データを加算する加算ステップとを備え、加算ステップによる出力を次の局部復号データとして記憶部に記憶する局部復号ステップと、圧縮ステップによる出力と、加算ステップによる出力とのうち一方を選択して符号化データとして出力する選択ステップとを有し、選択ステップは、加算ステップによる出力を所定数の入力データ毎に選択することを特徴とする。   The second invention is a difference output step for outputting a difference between input data and local decoded data stored in the storage unit, a compression step for compressing the difference output by the difference output step, and a compression step. A decompression step for decompressing the generated data, and an addition step for adding the local decoded data to the data decompressed by the decompression step, and a local decoding step for storing the output of the addition step in the storage unit as the next local decoded data; A selection step of selecting one of the output from the compression step and the output from the addition step and outputting the selected data as encoded data. The selection step selects the output from the addition step for each predetermined number of input data. It is characterized by that.

また、第3の発明は、入力データと局部復号データとの差分を圧縮した出力を伸長して局部復号データを加算し、加算した出力を次の局部復号データとして用い、入力データ毎の圧縮した出力を第1の符号化データとして出力する際に、加算した出力を所定数の入力データ毎に選択して第2の符号化データとして出力し、第1の符号化データを入力データと同一のデータ長として先頭に配し、第2の符号化データを第1の符号化データに続けて順次配したパケットに対して復号処理を行う復号装置であって、復号データを記憶する記憶部と、第2の符号化データを伸長する伸長部と、伸長部で伸長された第2の符号化データと、記憶部に記憶される復号データとを加算する加算部と、第1の符号化データおよび加算部の出力とのうち何れか一方を、復号データとして選択して記憶部に記憶させる選択部とを有することを特徴とする。   Further, the third invention expands the output obtained by compressing the difference between the input data and the local decoded data, adds the local decoded data, uses the added output as the next local decoded data, and compresses each input data. When outputting the output as the first encoded data, the added output is selected for each predetermined number of input data and output as the second encoded data, and the first encoded data is the same as the input data. A decoding device that performs a decoding process on a packet that is arranged at the beginning as the data length and sequentially distributes the second encoded data after the first encoded data, and a storage unit that stores the decoded data; An expansion unit that expands the second encoded data; an adder that adds the second encoded data expanded by the expansion unit; and the decoded data stored in the storage unit; the first encoded data; One of the outputs from the adder And characterized by having a selection section to be stored in the selected and the storage unit as a decoded data.

また、第4の発明は、入力データと局部復号データとの差分を圧縮した出力を伸長して局部復号データを加算し、加算した出力を次の局部復号データとして用い、入力データ毎の圧縮した出力を第1の符号化データとして出力する際に、加算した出力を所定数の入力データ毎に選択して第2の符号化データとして出力し、第1の符号化データを入力データと同一のデータ長として先頭に配し、第2の符号化データを第1の符号化データに続けて順次配したパケットに対して復号処理を行う復号方法であって、復号データを記憶部に記憶する記憶ステップと、第2の符号化データを伸長する伸長ステップと、伸長ステップにより伸長された第2の符号化データと、記憶部に記憶される復号データとを加算する加算ステップと、第1の符号化データおよび加算ステップによる出力とのうち何れか一方を、復号データとして選択して記憶部に記憶させる選択ステップとを有することを特徴とする。   In addition, the fourth invention expands the output obtained by compressing the difference between the input data and the local decoded data, adds the local decoded data, uses the added output as the next local decoded data, and compresses each input data. When outputting the output as the first encoded data, the added output is selected for each predetermined number of input data and output as the second encoded data, and the first encoded data is the same as the input data. A decoding method for performing decoding processing on a packet that is arranged at the head as a data length and sequentially distributes second encoded data following the first encoded data, and stores the decoded data in a storage unit An expansion step for expanding the second encoded data, an addition step for adding the second encoded data expanded by the expansion step, and the decoded data stored in the storage unit; and a first code Chemical day And either one of the output by the adding step, and having a selection step of storing the selected and the storage unit as a decoded data.

本発明によれば、復号時にエラーからの復旧が容易で、且つ、復号後により高品質な画像を得ることができるという効果を奏する。   According to the present invention, it is possible to easily recover from an error at the time of decoding and to obtain a higher quality image after decoding.

図1は、各実施形態に適用可能な符号化装置の一例の構成を概略的に示すブロック図である。FIG. 1 is a block diagram schematically showing an exemplary configuration of an encoding apparatus applicable to each embodiment. 図2は、既知の符号化部の一例の構成を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration of an example of a known encoding unit. 図3は、既知の技術によるパケットの一例の構成を示す略線図である。FIG. 3 is a schematic diagram illustrating an exemplary configuration of a packet according to a known technique. 図4は、第1の実施形態による符号化部の一例の構成を示すブロック図である。FIG. 4 is a block diagram illustrating a configuration of an example of an encoding unit according to the first embodiment. 図5は、第1の実施形態によるパケットの一例の構成を示す略線図である。FIG. 5 is a schematic diagram illustrating an exemplary configuration of a packet according to the first embodiment. 図6は、信号line_firstおよび信号first_wordの状態と、出力処理部の出力との関係を説明するための略線図である。FIG. 6 is a schematic diagram for explaining the relationship between the states of the signal line_first and the signal first_word and the output of the output processing unit. 図7は、第1の実施形態に適用可能な復号装置の一例の構成を示すブロック図である。FIG. 7 is a block diagram illustrating a configuration of an example of a decoding device applicable to the first embodiment. 図8は、第2の実施形態による2相出力を可能とする復号装置の一例の構成を示すブロック図である。FIG. 8 is a block diagram showing an example of the configuration of a decoding device that enables two-phase output according to the second embodiment. 図9は、2相出力に対応する符号化データの例を示す略線図である。FIG. 9 is a schematic diagram illustrating an example of encoded data corresponding to a two-phase output. 図10は、第3の実施形態による画像処理装置の一例の構成を示すブロック図である。FIG. 10 is a block diagram illustrating a configuration of an example of an image processing apparatus according to the third embodiment.

以下に添付図面を参照して、符号化装置および符号化方法、ならびに、復号装置および復号方法の実施形態を詳細に説明する。図1は、各実施形態に適用可能な符号化装置1の一例の構成を概略的に示す。符号化装置1は、入力処理部10、符号化部11および出力処理部12を有する。   Exemplary embodiments of an encoding device, an encoding method, and a decoding device and a decoding method will be described below in detail with reference to the accompanying drawings. FIG. 1 schematically shows a configuration of an example of an encoding apparatus 1 applicable to each embodiment. The encoding device 1 includes an input processing unit 10, an encoding unit 11, and an output processing unit 12.

入力処理部10は、所定のデータ単位で入力される入力データを、予め定められたサイズのブロックに分割して出力する。換言すれば、当該ブロックは、1単位の入力データを、所定の数だけ含む。一例として、入力データが画素データの場合、当該ブロックは、予め定められた数の画素データを含む。   The input processing unit 10 divides input data input in a predetermined data unit into blocks of a predetermined size and outputs them. In other words, the block includes a predetermined number of input data of one unit. As an example, when the input data is pixel data, the block includes a predetermined number of pixel data.

入力処理部10から出力されたブロックは、符号化部11に供給され、ブロック単位で所定の符号化方式で符号化される。符号化部11でブロックが符号化された符号化データは、出力処理部12に供給される。出力処理部12は、メモリを有し、供給された符号化データをメモリを利用して所定サイズのパケットに詰め込んで、符号化ブロックとして出力する。   The block output from the input processing unit 10 is supplied to the encoding unit 11 and is encoded by a predetermined encoding method in units of blocks. The encoded data in which the block is encoded by the encoding unit 11 is supplied to the output processing unit 12. The output processing unit 12 has a memory, packs the supplied encoded data into a packet of a predetermined size using the memory, and outputs the packet as an encoded block.

<既知の符号化処理>
ここで、理解を容易とするために、本実施形態に係る符号化部11の前提となる符号化処理について説明する。図2は、この前提となる符号化処理を行う既知の符号化部11’の一例の構成を示す。符号化部11’は、減算器100と、量子化部101と、量子化テーブル102と、出力セレクタ103と、局部復号部104とを有する。また、局部復号部104は、逆量子化部110と、加算器111と、局部復号データセレクタ112と、遅延部113とを有する。
<Known encoding process>
Here, in order to facilitate understanding, an encoding process that is a premise of the encoding unit 11 according to the present embodiment will be described. FIG. 2 shows a configuration of an example of a known encoding unit 11 ′ that performs the encoding process as a premise. The encoding unit 11 ′ includes a subtracter 100, a quantization unit 101, a quantization table 102, an output selector 103, and a local decoding unit 104. The local decoding unit 104 includes an inverse quantization unit 110, an adder 111, a local decoded data selector 112, and a delay unit 113.

符号化部11’の動作について説明する。符号化対象の入力データが、所定のデータ単位で例えばクロックに従い順次、符号化部11’に入力される。この入力データは、減算器100の被減算入力端と、出力セレクタ103の選択入力端103Aと、局部復号データセレクタ112の選択入力端112Aとにそれぞれ入力される。減算器100の減算入力端には、局部復号部104から所定のデータ単位で出力される局部復号データが入力される。減算器100は、入力データから局部復号データを減算して、入力データと局部復号データとの差分の差分データを出力する。減算器100から出力された差分データは、量子化部101に供給される。   The operation of the encoding unit 11 'will be described. The input data to be encoded is sequentially input to the encoding unit 11 'in a predetermined data unit, for example, according to a clock. This input data is input to the subtracted input terminal of the subtracter 100, the selection input terminal 103A of the output selector 103, and the selection input terminal 112A of the local decoded data selector 112, respectively. The local decoding data output in units of predetermined data from the local decoding unit 104 is input to the subtraction input terminal of the subtracter 100. The subtracter 100 subtracts the local decoded data from the input data and outputs difference data of the difference between the input data and the local decoded data. The difference data output from the subtracter 100 is supplied to the quantization unit 101.

量子化部101は、減算部100から供給された差分データを、量子化テーブル102に格納される量子化情報(例えば量子化ステップ)に従い量子化し、データ量を圧縮する。例えば、量子化部101は、供給された差分データのビット数を削減することで、データ量の圧縮を行う。この量子化された差分データは、局部復号部104の逆量子化部110に供給されると共に、出力セレクタ103の選択入力端103Bに入力される。   The quantization unit 101 quantizes the difference data supplied from the subtraction unit 100 according to quantization information (for example, a quantization step) stored in the quantization table 102, and compresses the data amount. For example, the quantization unit 101 compresses the data amount by reducing the number of bits of the supplied difference data. The quantized difference data is supplied to the inverse quantization unit 110 of the local decoding unit 104 and input to the selection input terminal 103B of the output selector 103.

ここで、図1の入力処理部10は、例えば、ブロック化された入力データを出力する際に、ブロックの先頭に対応するデータ単位のデータのタイミングを示す信号first_wordを生成する。信号first_wordは、例えば、ブロックの先頭に位置するデータ単位のデータのタイミングでハイ状態(High)とされ、その他のタイミングではロー(Low)状態とされる信号である。   Here, for example, when outputting the block input data, the input processing unit 10 in FIG. 1 generates a signal first_word indicating the data timing of the data unit corresponding to the head of the block. The signal first_word is, for example, a signal that is set to a high state (High) at the timing of data in a data unit located at the head of the block and is set to a low state at other timings.

出力セレクタ103は、信号first_wordの値に従い、選択入力端103Aおよび103Bのうち一方を選択し、選択された側の入力端に入力されたデータを、符号化データとして符号化部11’から出力する。出力セレクタ103は、例えば信号first_wordがハイ状態であれば選択入力端103Aが選択され、入力データがそのまま符号化データとして出力される。一方、出力セレクタ103は、例えば信号first_wordがロー状態であれば選択入力端103Bが選択され、量子化部101から出力された、量子化された差分データが符号化データとして出力される。   The output selector 103 selects one of the selection input terminals 103A and 103B according to the value of the signal first_word, and outputs the data input to the selected input terminal from the encoding unit 11 ′ as encoded data. . For example, if the signal first_word is in a high state, the output selector 103 selects the selection input terminal 103A and outputs the input data as it is as encoded data. On the other hand, for example, if the signal first_word is in a low state, the output selector 103 selects the selection input terminal 103B, and the quantized difference data output from the quantization unit 101 is output as encoded data.

逆量子化部110は、量子化テーブル102に対応した逆量子化テーブル(図示しない)に従い、量子化部101で量子化された差分データを逆量子化し、量子化前の差分データを復元した復元差分データを出力する。逆量子化部110から出力された復元差分データは、加算器111の一方の入力端に入力される。加算器111は、一方の入力端に入力された復元差分データと、後述する遅延部113から1データ単位分遅延されて出力された局部復号データとを加算する。加算器111の加算出力は、局部復号データセレクタ112の選択入力端112Bに入力される。   The inverse quantization unit 110 performs inverse quantization on the difference data quantized by the quantization unit 101 in accordance with an inverse quantization table (not shown) corresponding to the quantization table 102, and restores the difference data before quantization. Output difference data. The restored difference data output from the inverse quantization unit 110 is input to one input terminal of the adder 111. The adder 111 adds the restored differential data input to one input terminal and the local decoded data output after being delayed by one data unit from the delay unit 113 described later. The addition output of the adder 111 is input to the selection input terminal 112B of the local decoded data selector 112.

局部復号データセレクタ112は、信号first_wordの値に従い、選択入力端112Aおよび112Bのうち一方を選択し、選択された側の入力端に入力されたデータを、次の局部復号データとして出力する。局部復号データセレクタ112は、例えば信号first_wordがハイ状態であれば選択入力端112Aが選択され、入力データを次の局部復号データとして出力する。一方、局部復号データセレクタ112は、信号first_wordがロー状態であれば選択入力端112Bが選択され、加算器111の出力を次の局部復号データとして出力する。   The local decoded data selector 112 selects one of the selected input terminals 112A and 112B according to the value of the signal first_word, and outputs the data input to the selected input terminal as the next local decoded data. For example, if the signal first_word is in a high state, the local decoded data selector 112 selects the selected input terminal 112A and outputs the input data as the next local decoded data. On the other hand, if the signal first_word is in the low state, the local decoded data selector 112 selects the selection input terminal 112B, and outputs the output of the adder 111 as the next local decoded data.

局部復号データセレクタ112から出力された次の局部復号データは、遅延部113に供給される。遅延部113は、例えばバッファメモリであって、供給された次の局部復号データを保持する。遅延部113に保持された次の局部復号データは、1データ単位分遅延されて遅延部113から出力され、減算器100の減算入力端に入力されると共に、加算器111の他方の入力端に入力される。   The next local decoded data output from the local decoded data selector 112 is supplied to the delay unit 113. The delay unit 113 is a buffer memory, for example, and holds the next local decoded data supplied. The next local decoded data held in the delay unit 113 is delayed by one data unit, output from the delay unit 113, input to the subtraction input terminal of the subtractor 100, and input to the other input terminal of the adder 111. Entered.

このように、符号化部11’では、入力データの、当該入力データの符号化順で1データ単位前の入力データに基づく復号データ(局部復号データ)に対する差分を量子化部101で量子化して圧縮し、符号化データとして出力する。   As described above, in the encoding unit 11 ′, the quantization unit 101 quantizes the difference of the input data with respect to the decoded data (local decoded data) based on the input data one data unit before in the encoding order of the input data. Compressed and output as encoded data.

このとき、入力データのブロックの先頭に位置するデータ単位のデータのタイミングで信号first_wordをハイ状態とし、その他のタイミングでは信号first_wordをロー状態とする。これにより、ブロックの先頭のデータ毎に、局部復号データとして入力データがそのまま用いられると共に、入力データが符号化データとして出力される。したがって、符号化データは、ブロック毎に、符号化データとして含まれる入力データを基準として復号することができる。   At this time, the signal first_word is set to the high state at the timing of the data unit positioned at the beginning of the block of the input data, and the signal first_word is set to the low state at other timings. Thus, the input data is used as local decoded data as it is for each head data of the block, and the input data is output as encoded data. Therefore, the encoded data can be decoded on the basis of the input data included as the encoded data for each block.

符号化部11’で符号化された符号化データからなる符号化ブロックは、出力処理部12で予め定められた方法に従いパケットに詰め込まれて符号化装置1から出力される。図3は、既知の技術によるパケットの一例の構成を示す。符号化部11’から信号first_wordのハイ状態に応じて出力された符号化データが、データD0として、符号化ブロックの先頭側から詰め込まれる。データD0は、量子化部101において量子化されていない原入力データであって、Nビットのデータ長を有する。データD0の次から、最上位ビットMSB(Most Significant Bit)側に向けて、それぞれMビットのデータ長を有する符号化データC1、C2、…、C(i−2)、C(i−1)が順次、符号化ブロックに詰め込まれていく。符号化ブロックの最上位ビットMSBに存在するデータ長がLビットの領域Fは、符号化方式を決定するための付加情報などが必要に応じて格納され、符号化ブロックの全体のデータ量がTビットとされる。   The encoded block composed of the encoded data encoded by the encoding unit 11 ′ is packed into a packet according to a predetermined method by the output processing unit 12 and output from the encoding device 1. FIG. 3 shows an exemplary configuration of a packet according to a known technique. The encoded data output from the encoding unit 11 ′ according to the high state of the signal first_word is packed as data D 0 from the beginning of the encoded block. The data D0 is original input data not quantized by the quantization unit 101 and has a data length of N bits. From the data D0 to the most significant bit MSB (Most Significant Bit) side, encoded data C1, C2,..., C (i-2), C (i-1) each having a data length of M bits. Are sequentially packed into the encoded block. An area F having a data length of L bits, which is present in the most significant bit MSB of the encoded block, stores additional information and the like for determining the encoding method as necessary, and the total data amount of the encoded block is T A bit.

なお、符号化装置1で符号化した符号化ブロックは、符号化と逆の手順で復号することができる。より具体的には、符号化部11’の局部復号部104に対応する構成を用いて復号処理を行うことができる。すなわち、先ず、符号化ブロックの先頭のデータD0を抽出して遅延部に格納すると共に、復号データとして出力する。次に、符号化ブロックのデータD0の次の符号化データC1を逆量子化部で逆量子化し、逆量子化したデータと、遅延部から出力されたデータD0とを加算して、次の遅延部に格納する。遅延部に格納されたデータを、順次、復号データとして出力する。以降、符号化ブロックにおいて、符号化データC2、…、C(i−2)、C(i−1)について、順次、同様に復号処理が行われる。   Note that the encoded block encoded by the encoding device 1 can be decoded by a procedure reverse to the encoding. More specifically, the decoding process can be performed using a configuration corresponding to the local decoding unit 104 of the encoding unit 11 ′. That is, first, the leading data D0 of the encoded block is extracted and stored in the delay unit, and is output as decoded data. Next, the encoded data C1 next to the encoded block data D0 is inversely quantized by the inverse quantization unit, and the inversely quantized data and the data D0 output from the delay unit are added to obtain the next delay. Store in the department. The data stored in the delay unit is sequentially output as decoded data. Thereafter, in the encoding block, decoding processing is sequentially performed on the encoded data C2,..., C (i-2), C (i-1) in the same manner.

この既知の技術による符号化では、各符号化ブロックにおいて、先頭に量子化されていない原入力データが格納され、原入力データに続けて各符号化データが順次格納される。復号時には、各符号化ブロックにおいて、先頭の原入力データがそのまま復号データとして出力され、原入力データに続く符号化データが、原入力データを基準として順次、復号される。   In encoding by this known technique, original input data that is not quantized is stored at the head in each encoding block, and each encoded data is sequentially stored following the original input data. At the time of decoding, in each encoding block, the leading original input data is output as decoded data as it is, and the encoded data following the original input data is sequentially decoded on the basis of the original input data.

ここで、符号化対象のデータが画像データであって、所定のデータ単位が画素データである場合について考える。この場合、符号化ブロックの先頭には、量子化されていない原画素データが格納され、復号時には、この原画素データがそのまま出力される。そのため、符号化ブロックの先頭毎に量子化誤差が「0」の画素が出現するため、画面に表示させた場合に、この量子化誤差が「0」の画素による符号化ブロック毎の縦縞が現れることになる。   Here, consider a case where the data to be encoded is image data and the predetermined data unit is pixel data. In this case, unquantized original pixel data is stored at the head of the encoded block, and this original pixel data is output as it is at the time of decoding. For this reason, a pixel with a quantization error of “0” appears for each head of the encoded block. Therefore, when displayed on the screen, vertical stripes for each encoded block with pixels with this quantization error of “0” appear. It will be.

<第1の実施形態>
(第1の実施形態による符号化処理)
次に、第1の実施形態による符号化装置1について説明する。第1の実施形態による符号化装置1は、概略的には、図1に示した符号化装置1と同様の構成を有し、符号化部11が上述した既知の符号化部11’と異なる構成を有する。
<First Embodiment>
(Encoding process according to the first embodiment)
Next, the encoding device 1 according to the first embodiment will be described. The encoding device 1 according to the first embodiment schematically has the same configuration as the encoding device 1 shown in FIG. 1, and the encoding unit 11 is different from the known encoding unit 11 ′ described above. It has a configuration.

以下では、符号化装置1は、画像データが入力データとされ、画像データを、ライン方向に画素単位で符号化するものとする。例えば輝度情報や色差情報による画素データは、隣接データとの相関が高いため、画素間の差分に基づく量子化を行うことで、符号化した際の符号化誤差を小さく抑えることが可能である。   In the following, it is assumed that the encoding apparatus 1 uses image data as input data and encodes the image data in units of pixels in the line direction. For example, pixel data based on luminance information and color difference information has a high correlation with adjacent data. Therefore, by performing quantization based on a difference between pixels, it is possible to suppress a coding error at the time of coding.

符号化装置1に対して、1ラインの画素データが順次、入力される。画素データは、入力処理部10において、予め定められた画素数毎に分割されて、画素ブロックが形成される。入力処理部10は、1ラインの先頭の画素データを示す信号line_firstを出力する。例えば、入力処理部10は、信号line_firstを、1ラインの先頭の画素データの出力タイミングに対応してハイ状態とし、1ラインの他の画素データの出力タイミングではロー状態とする。また、入力処理部10は、画素ブロックの先頭の画素データを示す信号first_wordを出力する。例えば、入力処理部10は、信号first_wordを、各画素ブロックの先頭の画素データの出力タイミングに対応してハイ状態とし、各画素ブロックの他の画素データの出力タイミングに対応してロー状態とする。   One line of pixel data is sequentially input to the encoding device 1. Pixel data is divided for each predetermined number of pixels in the input processing unit 10 to form pixel blocks. The input processing unit 10 outputs a signal line_first indicating the first pixel data of one line. For example, the input processing unit 10 sets the signal line_first to the high state corresponding to the output timing of the first pixel data of one line, and sets the signal line_first to the low state at the output timing of other pixel data of one line. Further, the input processing unit 10 outputs a signal first_word indicating the top pixel data of the pixel block. For example, the input processing unit 10 sets the signal first_word to a high state corresponding to the output timing of the first pixel data of each pixel block, and sets the signal first_word to a low state corresponding to the output timing of the other pixel data of each pixel block. .

入力処理部10から出力された画素ブロックに含まれる画素データが、順次、符号化部11に供給される。また、符号化部11に供給する画素データに対応する状態の信号line_firstおよび信号first_wordが、入力処理部10から符号化部11に供給される。   Pixel data included in the pixel block output from the input processing unit 10 is sequentially supplied to the encoding unit 11. Further, the signal line_first and the signal first_word in a state corresponding to the pixel data supplied to the encoding unit 11 are supplied from the input processing unit 10 to the encoding unit 11.

符号化部11では、1ラインの画素データを、画素ブロックを単位として符号化する。図4は、第1の実施形態による符号化部11の一例の構成を示す。なお、図4において、上述した図2と共通する部分には同一の符号を付し、詳細な説明を省略する。符号化部11は、減算器100と、量子化部101と、量子化テーブル102と、出力セレクタ120と、局部復号部121とを有する。また、局部復号部121は、逆量子化部110と、加算器111と、局部復号データセレクタ122と、遅延部113とを有する。   The encoding unit 11 encodes one line of pixel data in units of pixel blocks. FIG. 4 shows an exemplary configuration of the encoding unit 11 according to the first embodiment. In FIG. 4, the same reference numerals are given to the same parts as those in FIG. 2 described above, and detailed description thereof is omitted. The encoding unit 11 includes a subtracter 100, a quantization unit 101, a quantization table 102, an output selector 120, and a local decoding unit 121. The local decoding unit 121 includes an inverse quantization unit 110, an adder 111, a local decoded data selector 122, and a delay unit 113.

符号化部11の動作について説明する。例えばクロックに従いn番目の画素データ(画素データnとする)が符号化部11に供給される。画素データnは、減算器100の被減算入力端と、局部復号データセレクタ122の選択入力端122Aとにそれぞれ入力される。減算器100の減算入力端には、局部復号部121からの、画素データ(n−1)に対応する局部復号データ(局部復号データ(n−1)とする)が入力される。減算器100において、画素データnから局部復号データ(n−1)が減算され、画素データnと局部復号データ(n−1)との差分による差分データ(差分データnとする)が出力される。例えば、減算部100は、入力データとしての画像データnと、局部復号データ(n−1)との差分を出力する差分出力部として機能する。   The operation of the encoding unit 11 will be described. For example, n-th pixel data (referred to as pixel data n) is supplied to the encoding unit 11 according to the clock. Pixel data n is input to a subtracted input terminal of the subtracter 100 and a selection input terminal 122A of the local decoded data selector 122, respectively. The local decoding data (referred to as local decoding data (n−1)) corresponding to the pixel data (n−1) from the local decoding unit 121 is input to the subtraction input terminal of the subtracter 100. The subtracter 100 subtracts the local decoded data (n−1) from the pixel data n, and outputs difference data (referred to as difference data n) based on the difference between the pixel data n and the local decoded data (n−1). . For example, the subtraction unit 100 functions as a difference output unit that outputs a difference between the image data n as input data and the local decoded data (n−1).

減算器100から出力された差分データnは、量子化部101に供給され、量子化テーブル102に格納される量子化情報に従い量子化され、データ量を圧縮される。量子化部101は、例えば階調情報を圧縮してビット数を削減することで、データ量を圧縮する。例えば、量子化部101は、差分出力部から出力された差分を圧縮する圧縮部として機能する。量子化された差分データnは、局部復号部121の逆量子化部110に供給されると共に、出力セレクタ120の選択入力端120Bに入力される。   The difference data n output from the subtracter 100 is supplied to the quantization unit 101, quantized according to the quantization information stored in the quantization table 102, and the data amount is compressed. The quantization unit 101 compresses the data amount by compressing the gradation information and reducing the number of bits, for example. For example, the quantization unit 101 functions as a compression unit that compresses the difference output from the difference output unit. The quantized difference data n is supplied to the inverse quantization unit 110 of the local decoding unit 121 and input to the selection input terminal 120B of the output selector 120.

出力セレクタ120は、さらに、選択入力端120Aに対して後述する局部復号データセレクタ122の出力が入力される。出力セレクタ120は、選択入力端120Aおよび120Bを、信号first_wordの状態に従い切り替えて、符号化データを符号化部11から出力する。   The output selector 120 further receives the output of the local decoded data selector 122 described later to the selection input terminal 120A. The output selector 120 switches the selection input terminals 120A and 120B according to the state of the signal first_word, and outputs the encoded data from the encoding unit 11.

より具体的には、出力セレクタ120において、信号first_wordがハイ状態で選択入力端120Aが選択され、局部復号データセレクタ122の出力が符号化データとして出力される。一方、出力セレクタ120において、信号first_wordがロー状態で選択入力端120Bが選択され、量子化部101で量子化された差分データnが符号化データとして符号化部11から出力される。   More specifically, in the output selector 120, the selection input terminal 120A is selected when the signal first_word is in the high state, and the output of the local decoded data selector 122 is output as encoded data. On the other hand, in the output selector 120, the selection input terminal 120B is selected when the signal first_word is in the low state, and the difference data n quantized by the quantization unit 101 is output from the encoding unit 11 as encoded data.

逆量子化部110は、量子化テーブル102に対応した図示しない逆量子化テーブルに従い、量子化部101で量子化された差分データnを逆量子化してデータ量を伸長し、量子化前の差分データnを復元した復元差分データnを出力する。例えば、逆量子化部110は、圧縮部(量子化部101)で圧縮されたデータを伸長する伸長部として機能する。復元差分データnは、加算器111の一方の入力端に入力される。   The inverse quantization unit 110 dequantizes the difference data n quantized by the quantization unit 101 according to the inverse quantization table (not shown) corresponding to the quantization table 102 to expand the data amount, and the difference before quantization The restored differential data n obtained by restoring the data n is output. For example, the inverse quantization unit 110 functions as an expansion unit that expands the data compressed by the compression unit (quantization unit 101). The restored difference data n is input to one input terminal of the adder 111.

加算器111は、他方の入力端に入力される、遅延部113から出力された局部復号データ(n−1)と、復元差分データnとを加算する。加算器111の加算出力は、符号化部11に入力された画像データnの局部復号データ(n−1)に対する差分を量子化したデータを復号した、復号データであって、局部復号データ(n−1)に対する次の局部復号データnである。局部復号データnが局部復号データセレクタ122の選択入力端122Bに入力される。   The adder 111 adds the local decoded data (n−1) output from the delay unit 113 and the restored differential data n, which are input to the other input terminal. The addition output of the adder 111 is decoded data obtained by decoding the data obtained by quantizing the difference of the image data n input to the encoding unit 11 with respect to the local decoded data (n−1). The local decoded data (n -1) is the next local decoded data n. The locally decoded data n is input to the selection input terminal 122B of the locally decoded data selector 122.

局部復号データセレクタ122の選択入力端122Aには、上述したように、入力データである画素データnが入力される。局部復号データセレクタ122は、選択入力端122Aおよび122Bを、信号line_firstの状態に従い切り替える。   As described above, the pixel data n, which is input data, is input to the selection input terminal 122A of the local decoded data selector 122. Local decoded data selector 122 switches selection input terminals 122A and 122B in accordance with the state of signal line_first.

より具体的には、局部復号データセレクタ122において、信号line_firstがハイ状態で選択入力端122Aが選択され、入力データとして入力された画素データnが、上述の局部復号データnとして局部復号データセレクタ122から出力される。一方、局部復号データセレクタ122において、信号line_firstがロー状態で選択入力端122Bが選択され、加算器111から出力された次の局部復号データnが局部復号データセレクタ122から出力される。   More specifically, in the local decoded data selector 122, the selection input terminal 122A is selected when the signal line_first is in the high state, and the pixel data n input as input data is the local decoded data selector 122 as the above-described local decoded data n. Is output from. On the other hand, in the local decoded data selector 122, the selection input terminal 122B is selected when the signal line_first is low, and the next local decoded data n output from the adder 111 is output from the local decoded data selector 122.

例えば、局部復号セレクタ122は、入力データとしての画像データnと、加算器111の出力とのうち一方を選択する第2の選択部として機能する。また、例えば、出力セレクタ120は、局部復号データセレクタ122において選択入力端122Bが選択されている場合に、加算器111の出力と、圧縮部(量子化部101)の出力とのうち一方を選択する第1の選択部として機能する。   For example, the local decoding selector 122 functions as a second selection unit that selects one of the image data n as input data and the output of the adder 111. For example, the output selector 120 selects one of the output of the adder 111 and the output of the compression unit (quantization unit 101) when the selection input terminal 122B is selected in the local decoded data selector 122. Functions as a first selection unit.

局部復号データセレクタ122から出力された次の局部復号データnは、遅延部113に供給され保持されると共に、上述したように、出力セレクタ120の選択入力端120Aに入力される。遅延部113に保持される次の局部復号データnは、入力データとして次の画素データ(n+1)が減算器100の被減算入力端に入力されるタイミングと同期して、減算器100の減算入力端と、加算器111の他方の入力端とに入力される。   The next local decoded data n output from the local decoded data selector 122 is supplied to and held in the delay unit 113 and input to the selection input terminal 120A of the output selector 120 as described above. The next local decoded data n held in the delay unit 113 is subtracted by the subtracter 100 in synchronization with the timing at which the next pixel data (n + 1) is input to the subtracted input terminal of the subtracter 100 as input data. And the other input terminal of the adder 111.

符号化部11において、出力セレクタ120から出力された画素データ毎の符号化データは、順次、出力処理部12に供給される。出力処理部12は、供給された符号化データを予め定められたサイズのパケットに詰め込んで、符号化ブロックとして出力する出力部として機能する。   In the encoding unit 11, the encoded data for each pixel data output from the output selector 120 is sequentially supplied to the output processing unit 12. The output processing unit 12 functions as an output unit that packs the supplied encoded data into a packet having a predetermined size and outputs the packet as an encoded block.

図5は、第1の実施形態によるパケットの一例の構成を示す。この例では、パケットは、全体が予め定められたサイズのTビットのデータ長を有し、図の右側が先頭、左側が後端となっている。例えば、出力処理部12が持つフリップフロップ(Flip Flop)といった記憶素子に符号化ブロックが保持され、パケットが構成される。このとき、符号化ブロックの先頭および後端がそれぞれ最下位ビットLSB(Least Significant Bit)および最上位ビットMSB とされる。   FIG. 5 shows an exemplary configuration of a packet according to the first embodiment. In this example, the packet as a whole has a data length of T bits of a predetermined size, with the right side in the figure being the head and the left side being the rear end. For example, a coding block is held in a storage element such as a flip-flop (Flip Flop) included in the output processing unit 12 to form a packet. At this time, the head and rear end of the encoded block are the least significant bit LSB (Least Significant Bit) and the most significant bit MSB, respectively.

Nビットのデータ長を有するデータD0’が、符号化ブロック内の予め定められた位置から詰め込まれる。この例では、データD0’は、符号化ブロックの最下位ビットLSBから詰め込まれるものとする。データD0’としては、上述の信号line_firstおよび信号first_wordの状態に応じて、ラインの先頭の画素データと、画素ブロックの先頭の画素データに対応する局部復号データとのうち何れかが用いられる。   Data D0 'having a data length of N bits is packed from a predetermined position in the encoded block. In this example, data D0 'is packed from the least significant bit LSB of the encoded block. As the data D0 ', either the first pixel data of the line or the local decoded data corresponding to the first pixel data of the pixel block is used according to the state of the signal line_first and the signal first_word.

図6を用いて、信号line_firstおよび信号first_wordの状態と、出力処理部12の出力との関係について説明する。図6(a)は、クロックを示し、例えばクロック毎に1の画素データが符号化部11に入力されるものとする。図6(b)および図6(c)は、それぞれ信号line_firstおよび信号first_wordの状態を示す。図6(d)は、出力処理部12から出力される符号化データを示す。なお、この例では、1のパケット(符号化ブロック)が、時間CLで出力されるものとする。   The relationship between the states of the signal line_first and the signal first_word and the output of the output processing unit 12 will be described with reference to FIG. FIG. 6A shows a clock. For example, one pixel data is input to the encoding unit 11 for each clock. FIG. 6B and FIG. 6C show the states of the signal line_first and the signal first_word, respectively. FIG. 6D shows the encoded data output from the output processing unit 12. In this example, it is assumed that one packet (encoded block) is output at time CL.

信号line_firstがハイ状態、且つ、信号first_wordがハイ状態の場合、図4に示す局部復号データセレクタ122において選択入力端122Aが選択されると共に、出力セレクタ120において選択入力端120Aが選択される。したがって、出力セレクタ120から、符号化データとして、ラインの先頭の符号化されていない原画素データが出力され、この原画素データがデータD0’として用いられる。図6(d)に例示するパケット#1が、先頭のデータD0’にライン先頭の画素データを含む符号化ブロックが格納されるパケットとなる。   When the signal line_first is high and the signal first_word is high, the selection input terminal 122A is selected in the local decoding data selector 122 shown in FIG. 4, and the selection input terminal 120A is selected in the output selector 120. Accordingly, the uncoded original pixel data at the head of the line is output as encoded data from the output selector 120, and this original pixel data is used as the data D0 '. Packet # 1 illustrated in FIG. 6D is a packet in which an encoded block including pixel data at the head of the line is stored in the head data D0 ′.

信号line_firstがロー状態、且つ、信号first_wordがハイ状態の場合、図4に示す局部復号データセレクタ122において選択入力端122Bが選択されると共に、出力セレクタ120において選択入力端120Aが選択される。したがって、出力セレクタ120から、符号化データとして画素ブロックの先頭の画素データに対応する局部復号データが出力され、この局部復号データがデータD0’として用いられる。局部復号データは、原画素データと同様に、データサイズがNビットとされている。図6(d)に例示するパケット#2、パケット#3、…が、先頭のデータD0’に画素ブロック先頭の画素データに対応する局部復号データが格納されるパケットとなる。   When the signal line_first is in the low state and the signal first_word is in the high state, the selection input terminal 122B is selected in the local decoded data selector 122 shown in FIG. 4, and the selection input terminal 120A is selected in the output selector 120. Therefore, local decoded data corresponding to the top pixel data of the pixel block is output from the output selector 120 as encoded data, and this local decoded data is used as data D0 '. Similar to the original pixel data, the local decoded data has a data size of N bits. Packet # 2, packet # 3,... Illustrated in FIG. 6D is a packet in which local decoded data corresponding to the top pixel data of the pixel block is stored in the top data D0 ′.

信号line_firstがロー状態、且つ、信号first_wordがロー状態の場合、図4に示す局部復号データセレクタ122において選択入力端122Bが選択されると共に、出力セレクタ120において選択入力端120Bが選択される。したがって、出力セレクタ120から、符号化データとして量子化部101で量子化された差分データが出力される。この量子化差分データによる符号化データは、図5に、データD0’に続く符号化データC1、C2、…、C(i−2)、C(i−1)として示されるように、MSB側に向けて順次、符号化ブロックに詰め込まれていく。なお、符号化データC1、C2、…、C(i−2)、C(i−1)は、それぞれMビットのデータ長を有する。   When the signal line_first is in the low state and the signal first_word is in the low state, the selection input terminal 122B is selected in the local decoded data selector 122 shown in FIG. 4, and the selection input terminal 120B is selected in the output selector 120. Therefore, difference data quantized by the quantization unit 101 is output from the output selector 120 as encoded data. The encoded data based on the quantized difference data is represented on the MSB side as shown in FIG. 5 as encoded data C1, C2,..., C (i-2), C (i-1) following the data D0 ′. As shown in FIG. The encoded data C1, C2,..., C (i-2), C (i-1) each have a data length of M bits.

符号化ブロックの最上位ビットMSBに存在するデータ長がLビットの領域Fは、符号化方式を決定するための付加情報などが必要に応じて格納され、符号化ブロックの全体のデータ量がTビットとされる。   An area F having a data length of L bits, which is present in the most significant bit MSB of the encoded block, stores additional information and the like for determining the encoding method as necessary, and the total data amount of the encoded block is T A bit.

符号化ブロックのデータ長のTビットは、例えば符号化装置1から出力された符号化ブロックが記憶されるメモリに使用される記憶素子の記憶単位に合わせて決定すると好ましい。例えば、DRAM などの記憶素子は、記憶単位が128ビットや256ビットであることが多いので、例えばTビット=128ビットというように設定する。   The T bit of the data length of the encoded block is preferably determined according to the storage unit of the storage element used for the memory in which the encoded block output from the encoding device 1 is stored, for example. For example, since a storage unit such as a DRAM often has a storage unit of 128 bits or 256 bits, for example, T bit = 128 bits is set.

(第1の実施形態による復号処理)
次に、第1の実施形態に適用可能な復号装置について、図7を用いて説明する。図7において、復号装置2は、上述した符号化部11を有する符号化装置1で符号化された画像データを復号するもので、入力処理部20、復号部21および出力処理部22を有する。入力処理部20に対して、それぞれ図5を用いて説明した構成の符号化ブロック#0、#1、#2、…、#N−1が時系列に沿って順次入力される。なお、符号化ブロック#0は、ライン先頭の画素データを含む符号化ブロックであるものとする。
(Decoding process according to the first embodiment)
Next, a decoding apparatus applicable to the first embodiment will be described with reference to FIG. In FIG. 7, the decoding device 2 decodes the image data encoded by the encoding device 1 including the encoding unit 11 described above, and includes an input processing unit 20, a decoding unit 21, and an output processing unit 22. Encoding blocks # 0, # 1, # 2,..., # N−1 having the configuration described with reference to FIG. 5 are sequentially input to the input processing unit 20 in time series. The encoding block # 0 is assumed to be an encoding block including pixel data at the beginning of the line.

入力処理部20は、入力された符号化ブロックからデータD0’、符号化データC1、C2、…、C(i−2)、C(i−1)を切り出して順次出力する。このとき、入力処理部20は、各符号化ブロック#0、#1、#2、…、#N−1が入力されると、それぞれの先頭データD0’に対応して信号first_wordをハイ状態とする。信号first_wordは、先頭データD0’の出力が終了すると、ロー状態とされる。信号first_wordは、例えば制御信号に含められて復号部21に供給される。   The input processing unit 20 cuts out data D0 ', encoded data C1, C2,..., C (i-2), C (i-1) from the input encoded block and sequentially outputs them. At this time, when each of the encoded blocks # 0, # 1, # 2,..., # N−1 is input, the input processing unit 20 sets the signal first_word to the high state corresponding to each head data D0 ′. To do. The signal first_word is set to the low state when the output of the head data D0 'is completed. The signal first_word is included in, for example, a control signal and supplied to the decoding unit 21.

なお、入力処理部20は、ライン先頭の符号化ブロック#0を、例えば外部から供給される制御信号(図示しない)に基づき知ることができる。これに限らず、上述した図5の符号化ブロックの先頭に、当該符号化ブロックがラインの先頭であるか否かを示す識別情報を付加することもできる。符号化ブロックのデータ長は、Tビットに固定されているので、ライン先頭の符号化ブロック#0を特定することで、ライン先頭以外の各符号化ブロック#1、#2、…、#N−1の先頭を容易に求めることができる。さらに、各符号化ブロックの先頭を示すストローブ信号を外部から供給してもよい。   The input processing unit 20 can know the encoding block # 0 at the head of the line based on, for example, a control signal (not shown) supplied from the outside. The present invention is not limited to this, and identification information indicating whether or not the coding block is the head of the line can be added to the head of the coding block of FIG. 5 described above. Since the data length of the encoded block is fixed to T bits, by specifying the encoded block # 0 at the head of the line, the encoded blocks # 1, # 2,. The head of 1 can be easily obtained. Furthermore, a strobe signal indicating the head of each coding block may be supplied from the outside.

入力処理部20から出力されたデータD0’、符号化データC1、C2、…、C(i−2)、C(i−1)は、クロックに従い、順次、復号部21に供給される。なお、以下では、特に記載のない限り、データD0’、符号化データC1、C2、…、C(i−2)、C(i−1)を、纏めて符号化データと呼ぶ。   Data D0 ', encoded data C1, C2,..., C (i-2), C (i-1) output from the input processing unit 20 are sequentially supplied to the decoding unit 21 according to the clock. In the following, data D0 ', encoded data C1, C2, ..., C (i-2), C (i-1) are collectively referred to as encoded data unless otherwise specified.

復号部21は、出力セレクタ200、逆量子化部201、量子化テーブル202、加算器203および遅延部204を有し、上述した符号化部11と略逆の処理を行うことで、符号化データを復号する。   The decoding unit 21 includes an output selector 200, an inverse quantization unit 201, a quantization table 202, an adder 203, and a delay unit 204. The decoding unit 21 performs processing substantially opposite to that of the encoding unit 11 described above, so that encoded data Is decrypted.

復号部21に入力された符号化データは、出力セレクタ200の選択入力端200Aに入力されると共に、逆量子化部201に供給される。逆量子化部201は、逆量子化テーブル202に格納される例えば逆量子化ステップといった量子化情報に基づき、入力された符号化データを逆量子化し、符号化時に量子化部101で圧縮されたデータ量を伸長する。例えば、逆量子化部201は、逆量子化された符号化データを伸長する伸長部として機能する。データ量を伸長された符号化データは、加算器203の一方の入力端に入力される。加算器203の他方の入力端には、遅延部204の出力が入力される。加算器203は、一方の入力端に入力された逆量子化された符号化データと、他方の入力端に入力された遅延部204の出力とを加算して復号データを得る。   The encoded data input to the decoding unit 21 is input to the selection input terminal 200A of the output selector 200 and also supplied to the inverse quantization unit 201. The inverse quantization unit 201 inversely quantizes the input encoded data based on quantization information such as an inverse quantization step stored in the inverse quantization table 202 and is compressed by the quantization unit 101 during encoding. Decompress data volume. For example, the inverse quantization unit 201 functions as a decompression unit that decompresses the inversely quantized encoded data. The encoded data whose data amount has been expanded is input to one input terminal of the adder 203. The output of the delay unit 204 is input to the other input terminal of the adder 203. The adder 203 adds the dequantized encoded data input to one input terminal and the output of the delay unit 204 input to the other input terminal to obtain decoded data.

加算器203から出力された復号データは、出力セレクタ200の選択入力端200Bに入力される。出力セレクタ200は、信号first_wordの状態に応じて選択入力端200Aおよび200Bのうち一方を選択する。出力セレクタ200は、信号first_wordがロー状態で選択入力端200Bを選択し、加算器203の出力を復号データとして出力する。   The decoded data output from the adder 203 is input to the selection input terminal 200B of the output selector 200. The output selector 200 selects one of the selection input terminals 200A and 200B according to the state of the signal first_word. The output selector 200 selects the selection input terminal 200B when the signal first_word is in the low state, and outputs the output of the adder 203 as decoded data.

一方、出力セレクタ200は、信号first_wordがハイ状態で選択入力端200Aを選択し、入力された符号化データを復号データとして復号部21から出力する。この場合、入力された符号化データがライン先頭の符号化ブロック#0におけるデータD0’であれば、原画素データが復号データとして出力される。また、入力された符号化データがライン先頭以外の符号化ブロック#1、#2、…、#N−1であれば、局部復号データが復号データとして出力される。   On the other hand, the output selector 200 selects the selection input terminal 200A when the signal first_word is in the high state, and outputs the input encoded data from the decoding unit 21 as decoded data. In this case, if the input encoded data is data D0 'in the encoded block # 0 at the head of the line, the original pixel data is output as decoded data. If the input encoded data is an encoded block # 1, # 2,..., # N-1 other than the head of the line, local decoded data is output as decoded data.

また、出力セレクタ200から出力された復号データは、出力処理部22に供給されると共に、遅延部204にも供給される。遅延部204は、供給されたデータを、例えば入力に対して1クロック分遅延させて出力する。例えば、遅延部204は、復号データを記憶する記憶部として機能する。また、出力セレクタ200は、復号部21に入力された符号化データと、加算器203(加算部)から出力された復号データとのうち一方を復号データとして選択して記憶部に記憶させる選択部として機能する。遅延部204から出力された復号データは、上述したように、加算器203の他方の入力端に入力される。   The decoded data output from the output selector 200 is supplied to the output processing unit 22 and also to the delay unit 204. The delay unit 204 outputs the supplied data with a delay of, for example, one clock with respect to the input. For example, the delay unit 204 functions as a storage unit that stores decoded data. The output selector 200 selects one of the encoded data input to the decoding unit 21 and the decoded data output from the adder 203 (adder) as decoded data and stores the selected data in the storage unit. Function as. The decoded data output from the delay unit 204 is input to the other input terminal of the adder 203 as described above.

出力処理部22は、出力セレクタ200から供給された復号データを、所定のフォーマットに整形して、この復号装置2から出力する。   The output processing unit 22 shapes the decoded data supplied from the output selector 200 into a predetermined format and outputs it from the decoding device 2.

このように、第1の実施形態による復号装置2では、先頭に原画素データまたは局部復号データを埋め込まれた符号化ブロックを復号する。その際に、符号化ブロックに含まれる原画素データおよび局部復号データをそのまま出力し、その他の符号化データについては、逆量子化して1クロック前の復号データを加算する復号処理を行って出力している。   As described above, the decoding device 2 according to the first embodiment decodes the encoded block in which the original pixel data or the local decoded data is embedded at the head. At that time, the original pixel data and the local decoded data included in the encoded block are output as they are, and the other encoded data is output after being subjected to a decoding process that is inversely quantized and added with the decoded data one clock before. ing.

このとき、ライン先頭の符号化ブロック以外の符号化ブロックの先頭に含まれる局部復号データは、復号部21における逆量子化と遅延部204の出力の逆量子化結果に対する加算とによる復号処理と同様の処理を経て生成されたデータであって、当該復号処理を行った復号データと同等の量子化誤差を有する。そのため、例えば復号データに基づく画面表示を行った場合の、量子化誤差の違いによる画素ブロック単位の縦縞の発生を抑制することができる。   At this time, the local decoding data included in the head of the coding block other than the coding block at the head of the line is the same as the decoding processing by the inverse quantization in the decoding unit 21 and the addition to the inverse quantization result of the output of the delay unit 204. The data generated through the above process has a quantization error equivalent to that of the decoded data subjected to the decoding process. Therefore, for example, when screen display based on decoded data is performed, it is possible to suppress the occurrence of vertical stripes in units of pixel blocks due to differences in quantization errors.

また、各符号化ブロックに復号の基準となるデータ(原画素データまたは局部復号データ)が含まれるので、エラーからの復元を符号化ブロック単位で行うことができる。   In addition, since each coding block includes data (original pixel data or local decoding data) serving as a decoding reference, it is possible to restore from an error in units of coding blocks.

<第2の実施形態>
次に、第2の実施形態について説明する。上述した第1の実施形態では、復号装置2は、復号データを1系統すなわち単相で出力していた。これに対して、第2の実施形態では、復号装置は、復号データを2系統すなわち2相で出力することを可能としている。例えば、符号化ブロックを、奇数番目の符号化ブロックと、偶数番目の符号化ブロックに分けて、互いに並列的に復号処理を行うことで、復号された画像ブロックの出力を、単相で復号処理を行う場合に対して2倍の速度で実行することが可能となる。
<Second Embodiment>
Next, a second embodiment will be described. In the first embodiment described above, the decoding device 2 outputs decoded data in one system, that is, in a single phase. On the other hand, in the second embodiment, the decoding device can output decoded data in two systems, that is, in two phases. For example, the encoded block is divided into an odd-numbered encoded block and an even-numbered encoded block, and the decoding processing is performed in parallel with each other, so that the output of the decoded image block is decoded in a single phase. It is possible to execute at twice the speed of the case where

図8は、2相出力を可能とする復号装置3の一例の構成を示す。復号装置3は、上述の第1の実施形態による符号化部11を持つ符号化装置1で符号化した画像データを復号する。図8から分かるように、復号装置3は、図7を用いて説明した、上述の第1の実施形態による復号装置2を2つ用いて構成される。すなわち、復号装置3は、入力処理部20Aおよび20Bと、復号部21Aおよび21Bと、出力処理部22’とを有する。なお、図8において、図7と共通する部分には同一の符号を付して、詳細な説明を省略する。   FIG. 8 shows an exemplary configuration of the decoding device 3 that enables two-phase output. The decoding device 3 decodes the image data encoded by the encoding device 1 having the encoding unit 11 according to the first embodiment described above. As can be seen from FIG. 8, the decoding device 3 is configured using two decoding devices 2 according to the first embodiment described above with reference to FIG. That is, the decoding device 3 includes input processing units 20A and 20B, decoding units 21A and 21B, and an output processing unit 22 '. In FIG. 8, the same reference numerals are given to portions common to FIG. 7, and detailed description is omitted.

図5を用いて説明した構成の符号化ブロック#0、#1、#2、…、#N−1が、復号対象の入力データとして復号装置3に入力される。このとき、第1の実施形態による単相で復号データを出力する場合に対して、2倍の速度で入力データが入力される。図9は、2相出力に対応する符号化データの例を示す。図9(a)は、クロックを示す。図9(d)は、復号装置3に入力される符号化データを示す。   Encoding blocks # 0, # 1, # 2,..., # N−1 having the configuration described with reference to FIG. 5 are input to the decoding device 3 as input data to be decoded. At this time, input data is input at a double speed compared to the case of outputting decoded data in a single phase according to the first embodiment. FIG. 9 shows an example of encoded data corresponding to a two-phase output. FIG. 9A shows a clock. FIG. 9D shows the encoded data input to the decoding device 3.

図9(d)に例示されるように、2相出力に対応した符号化データは、各符号化ブロック#0、#1、#2、…が、上述の図6(d)で示した単相出力に対応する符号化データの半分の時間(CL/2)で、復号装置3に入力される。例えば、第1の実施形態による符号化部11を含む符号化装置1から出力された符号化データを図示されないメモリに書き込む。このメモリからの符号化データの読み出しを、書き込み速度の2倍の速度で行う。   As illustrated in FIG. 9D, the encoded data corresponding to the two-phase output includes the encoded blocks # 0, # 1, # 2,. The data is input to the decoding device 3 in half the time (CL / 2) of the encoded data corresponding to the phase output. For example, the encoded data output from the encoding device 1 including the encoding unit 11 according to the first embodiment is written in a memory (not shown). The encoded data is read from the memory at a speed twice as high as the writing speed.

信号line_firstおよび信号first_wordは、図9(b)および図9(c)にそれぞれ示されるように、復号装置3に入力される各符号化ブロック(パケット#1、#2、…)の先頭のタイミングに従い生成または供給される。   As shown in FIGS. 9B and 9C, the signal line_first and the signal first_word are the timings of the beginning of each coding block (packets # 1, # 2,...) Input to the decoding device 3, respectively. Produced or supplied according to

入力処理部20Aは、復号装置3に入力された符号化ブロック#0、#1、#2、…、#N−1のうち、偶数番目の符号化ブロック#0、#2、…、すなわち、ラインの先頭の画素データを含む符号化ブロック#0から一つおきに符号化ブロックを選択する。そして、選択された各符号化ブロックが入力されると、先頭のデータD0’に対応して信号first_wordをそれぞれハイ状態とする。信号first_wordは、先頭データD0’の出力が終了すると、ロー状態とされる。信号first_wordは、例えば制御信号に含められて復号部21Aに供給される。   The input processing unit 20A includes even-numbered encoded blocks # 0, # 2,..., Among the encoded blocks # 0, # 1, # 2,. Every other encoding block is selected from the encoding block # 0 including the pixel data at the head of the line. When each selected coding block is input, the signal first_word is set to the high state corresponding to the head data D0 '. The signal first_word is set to the low state when the output of the head data D0 'is completed. The signal first_word is included in, for example, a control signal and supplied to the decoding unit 21A.

一方、入力処理部20Bは、復号装置3に入力された符号化ブロック#0、#1、#2、…、#N−1のうち奇数番目の符号化ブロック#1、#3、…を選択する。そして、選択された各符号化ブロックが入力されると、先頭のデータD0’に対応して信号first_wordをそれぞれハイ状態とする。信号first_wordは、先頭データD0’の出力が終了すると、ロー状態とされる。信号first_wordは、例えば制御信号に含められて復号部21Bに供給される。   On the other hand, the input processing unit 20B selects odd-numbered encoded blocks # 1, # 3,... Among the encoded blocks # 0, # 1, # 2,. To do. When each selected coding block is input, the signal first_word is set to the high state corresponding to the head data D0 '. The signal first_word is set to the low state when the output of the head data D0 'is completed. The signal first_word is included in, for example, a control signal and supplied to the decoding unit 21B.

なお、第1の実施形態と同様に、入力処理部20A、20Bは、ライン先頭の符号化ブロック#0を、例えば外部から供給される制御信号(図示しない)に基づき知ることができる。これに限らず、上述した図5の符号化ブロックの先頭に、当該符号化ブロックがラインの先頭であるか否かを示す識別情報を付加することもできる。符号化ブロックのデータ長は、Tビットに固定されているので、ライン先頭の符号化ブロック#0を特定することで、ライン先頭以外の各符号化ブロック#1、#2、…、#N−1の先頭を容易に求めることができる。さらに、各符号化ブロックの先頭を示すストローブ信号を外部から供給してもよい。   As in the first embodiment, the input processing units 20A and 20B can know the encoding block # 0 at the head of the line, for example, based on a control signal (not shown) supplied from the outside. The present invention is not limited to this, and identification information indicating whether or not the coding block is the head of the line can be added to the head of the coding block of FIG. 5 described above. Since the data length of the encoded block is fixed to T bits, by specifying the encoded block # 0 at the head of the line, the encoded blocks # 1, # 2,. The head of 1 can be easily obtained. Furthermore, a strobe signal indicating the head of each coding block may be supplied from the outside.

復号部21Aは、入力処理部20Aから供給された偶数番目の符号化ブロック#0、#2、…の復号処理を行う。このとき、各符号化ブロック#0、#2、…の先頭のデータD0’は、入力処理部20Aから供給される信号first_wordに従い判別する。同様に、復号部21Bは、入力処理部20Bから供給された奇数番目の符号化ブロック#1、#3、…の復号処理を、入力処理部20Bからの信号first_wordを用いて行う。   The decoding unit 21A performs a decoding process on the even-numbered encoded blocks # 0, # 2,... Supplied from the input processing unit 20A. At this time, the head data D0 'of each of the encoded blocks # 0, # 2,... Is determined according to the signal first_word supplied from the input processing unit 20A. Similarly, the decoding unit 21B performs decoding processing on the odd-numbered encoded blocks # 1, # 3,... Supplied from the input processing unit 20B using the signal first_word from the input processing unit 20B.

これら復号部21Aおよび21Bにおける復号処理は、図7を用いて説明した復号部21における復号処理と同様にして実行可能である。すなわち、復号部21Aに入力される偶数番目の符号化ブロック#0、#2、…、ならびに、復号部21Bに入力される奇数番目の符号化ブロック#1、#3、…には、それぞれ先頭に局部復号データ(ライン先頭の符号化ブロック#0には原画素データそのもの)が格納されている。   These decoding processes in the decoding units 21A and 21B can be performed in the same manner as the decoding process in the decoding unit 21 described with reference to FIG. That is, the even-numbered encoded blocks # 0, # 2,... Input to the decoding unit 21A and the odd-numbered encoded blocks # 1, # 3,. The local decoded data (original pixel data itself in the encoding block # 0 at the head of the line) is stored.

したがって、第2の実施形態による復号装置3において、復号部21Aおよび21Bは、それぞれ独立して各符号化ブロックを復号処理することができ、復号部21Aによる復号処理と、復号部21Bによる復号処理とを並行して実行可能である。   Accordingly, in the decoding device 3 according to the second embodiment, the decoding units 21A and 21B can independently decode each encoded block, and the decoding process by the decoding unit 21A and the decoding process by the decoding unit 21B Can be executed in parallel.

復号部21Aおよび21Bから出力された復号データは、それぞれ出力処理部22’に供給される。出力処理部22’は、供給された復号データを画素毎に並べ替えて、ライン上の偶数番目の画素の復号データと、奇数番目の画素の復号データとに分ける。そして、偶数番目の画素の復号データと、奇数数番目の画素の復号データとを、別の系統で出力し、画像データの2相出力を得る。   The decoded data output from the decoding units 21A and 21B are respectively supplied to the output processing unit 22 '. The output processing unit 22 'sorts the supplied decoded data for each pixel, and divides the decoded data into decoded data of even-numbered pixels and odd-numbered pixels on the line. Then, the decoded data of the even-numbered pixels and the decoded data of the odd-numbered pixels are output by different systems, and a two-phase output of image data is obtained.

<第3の実施形態>
次に、第3の実施形態について説明する。第3の実施形態は、上述した第1の実施形態による、符号化部11を含む符号化装置1と、復号装置2とを画像処理部を有する画像処理装置に適用した例である。図10は、第3の実施形態による画像処理装置300の一例の構成を示す。ここでは、画像処理装置300の例として、デジタルテレビジョン放送を受信してハイビジョン画像をディスプレイに映出させる、デジタルテレビジョン受像機を適用している。なお、図10において、上述の図1、図4および図7と共通する部分には同一の符号を付して、詳細な説明を省略する。
<Third Embodiment>
Next, a third embodiment will be described. The third embodiment is an example in which the encoding device 1 including the encoding unit 11 and the decoding device 2 according to the first embodiment described above are applied to an image processing device having an image processing unit. FIG. 10 shows an exemplary configuration of an image processing apparatus 300 according to the third embodiment. Here, as an example of the image processing apparatus 300, a digital television receiver that receives a digital television broadcast and displays a high-definition image on a display is applied. In FIG. 10, the same reference numerals are given to the portions common to FIGS. 1, 4, and 7 described above, and detailed description thereof is omitted.

画像処理装置300は、チューナ310、画像処理部311およびディスプレイ312を有する。チューナ310は、デジタルテレビジョン放送を受信して受信信号をデコードし、画像データおよび音声データ、ならびに、付随データを出力する。以下では、第3の実施形態の主旨と直接的な関わりがないので、音声データおよび付随データに関する説明を省略する。   The image processing apparatus 300 includes a tuner 310, an image processing unit 311, and a display 312. The tuner 310 receives the digital television broadcast, decodes the received signal, and outputs image data and audio data, and accompanying data. In the following, since there is no direct relationship with the gist of the third embodiment, the description regarding the audio data and the accompanying data is omitted.

チューナ310から出力された画像データは、画像処理部311に供給される。画像処理部311は、供給された画像データに対して、メモリ321を用いて所定の画像処理を施す。画像処理部311が行う画像処理の種類は、特に限定されないが、エンハンス処理、フレームレート変換処理、色調調整処理、解像度変換処理など、様々に考えられる。   The image data output from the tuner 310 is supplied to the image processing unit 311. The image processing unit 311 performs predetermined image processing on the supplied image data using the memory 321. The type of image processing performed by the image processing unit 311 is not particularly limited. Various types of processing such as enhancement processing, frame rate conversion processing, color tone adjustment processing, and resolution conversion processing are conceivable.

一例として、画像処理部311は、チューナ310から供給された画像データを、メモリインターフェイス(I/F)320を介して一旦メモリ321に格納する。そして、メモリ321から、メモリI/F320を介して画像データを読み出しつつ例えば画素単位で画像データに対して画像処理を施す。画像処理が施された画像データは、画像処理部311からメモリI/F320を介して順次メモリ321に書き込まれる。   As an example, the image processing unit 311 temporarily stores the image data supplied from the tuner 310 in the memory 321 via the memory interface (I / F) 320. Then, image processing is performed on the image data in units of pixels, for example, while reading the image data from the memory 321 via the memory I / F 320. The image data subjected to the image processing is sequentially written from the image processing unit 311 to the memory 321 via the memory I / F 320.

画像処理部311で画像処理された画像データは、ディスプレイ312に供給される。例えば、画像処理部311は、画像処理が終了した画像データを、メモリI/F320を介してメモリ321に書き込む。1フレーム分の画像処理が終了すると、画像処理部311は、メモリ321からメモリI/F320を介して画像データを読み出して、ディスプレイ312に供給する。ディスプレイ312は、供給された画像データに基づく画像を表示する。   The image data processed by the image processing unit 311 is supplied to the display 312. For example, the image processing unit 311 writes the image data for which image processing has been completed to the memory 321 via the memory I / F 320. When the image processing for one frame is completed, the image processing unit 311 reads image data from the memory 321 via the memory I / F 320 and supplies the image data to the display 312. The display 312 displays an image based on the supplied image data.

このような画像処理装置300の構成において、メモリI/F320に対して、第1の実施形態による、符号化部11を含む符号化装置1と、復号装置2とを適用する。より具体的には、図10に例示されるように、メモリI/F320は、符号化装置1を構成する入力処理部10、符号化部11および出力処理部12と、復号装置2を構成する入力処理部20、復号部21および出力処理部22とを有する。   In such a configuration of the image processing apparatus 300, the encoding apparatus 1 including the encoding unit 11 and the decoding apparatus 2 according to the first embodiment are applied to the memory I / F 320. More specifically, as illustrated in FIG. 10, the memory I / F 320 includes the input processing unit 10, the encoding unit 11, the output processing unit 12, and the decoding device 2 that configure the encoding device 1. An input processing unit 20, a decoding unit 21, and an output processing unit 22 are included.

画像処理部311から、例えばライン単位で画素順次に出力された画像データがメモリI/F320に供給され、入力処理部10に入力される。入力処理部10は、入力された画像データを予め定められた画素数毎に分割して画素ブロックを形成する。それと共に、入力処理部10は、信号line_firstおよび信号first_wordを、画素ブロックおよび画素ブロック内の画素データの位置に応じてそれぞれハイ状態またはロー状態にして出力する。このとき、入力処理部10は、ラインの先頭を示す情報を、例えば画像処理部311から取得することができる。   For example, image data output sequentially from the image processing unit 311 in units of lines is supplied to the memory I / F 320 and input to the input processing unit 10. The input processing unit 10 divides input image data for each predetermined number of pixels to form a pixel block. At the same time, the input processing unit 10 outputs the signal line_first and the signal first_word in a high state or a low state, respectively, according to the position of the pixel block and the pixel data in the pixel block. At this time, the input processing unit 10 can acquire information indicating the head of the line from the image processing unit 311, for example.

入力処理部10から出力された画素ブロックと、信号line_firstおよび信号first_wordとが符号化部11に入力される。符号化部11は、図4を用いて説明したようにして、画素ブロックの画素データを符号化して符号化ブロックを生成する。このとき、信号line_firstおよび信号first_wordに基づき、ラインの先頭の画素データを含む画素ブロックを符号化した符号化ブロックの先頭の符号化データとして原画素データそのものを用いる。また、それ以外の各画素ブロックを符号化した符号化ブロックの先頭の符号化データとして局部復号データを用いる。符号化部11から出力された符号化データは、出力処理部12で予め定められたサイズのパケットに詰め込まれてメモリI/F320から出力される。メモリI/F320から出力された符号化ブロックのパケットは、メモリ321に書き込まれる。   The pixel block output from the input processing unit 10 and the signal line_first and signal first_word are input to the encoding unit 11. The encoding unit 11 encodes the pixel data of the pixel block as described with reference to FIG. 4 to generate an encoded block. At this time, based on the signal line_first and the signal first_word, the original pixel data itself is used as the encoded data at the beginning of the encoded block obtained by encoding the pixel block including the pixel data at the beginning of the line. Further, local decoded data is used as encoded data at the head of an encoded block obtained by encoding the other pixel blocks. The encoded data output from the encoding unit 11 is packed into a packet having a predetermined size by the output processing unit 12 and output from the memory I / F 320. The encoded block packet output from the memory I / F 320 is written in the memory 321.

画像処理部311からメモリI/F320に対して、メモリ321に記憶された画像データ(符号化ブロック)の読み出しが指示される。メモリI/F320は、この指示に従い、メモリ321から符号化ブロックを読み出し、入力処理部20に入力する。このとき、入力処理部20は、ラインの先頭や各符号化ブロックの先頭を示す情報を、例えば画像処理部311から取得することができる。   The image processing unit 311 instructs the memory I / F 320 to read the image data (encoded block) stored in the memory 321. In accordance with this instruction, the memory I / F 320 reads the encoded block from the memory 321 and inputs it to the input processing unit 20. At this time, the input processing unit 20 can acquire information indicating the head of the line or the head of each encoded block from the image processing unit 311, for example.

入力処理部20は、入力された符号化ブロックから符号化データを取り出して順次、復号部21に供給すると共に、信号first_wordを所定の状態にして出力する。復号部21は、入力された符号化データを、信号first_wordの状態に応じて選択して、符号化ブロックの先頭に格納される符号化データをそのまま復号データとして出力し、その他の符号化データを逆量子化した後復号順で1つ前の符号化データと加算して復号データを生成する。この復号データは、出力処理部22により所定のフォーマットに整形され、メモリI/F320から画像処理部311に供給される。   The input processing unit 20 extracts encoded data from the input encoded block, sequentially supplies the encoded data to the decoding unit 21, and outputs the signal first_word in a predetermined state. The decoding unit 21 selects the input encoded data according to the state of the signal first_word, outputs the encoded data stored at the head of the encoded block as decoded data, and outputs the other encoded data as it is. After the inverse quantization, decoded data is generated by adding the previous encoded data in the decoding order. The decoded data is shaped into a predetermined format by the output processing unit 22 and supplied from the memory I / F 320 to the image processing unit 311.

このように、第1の実施形態による符号化部11および復号部21を、画像処理部311がアクセスするメモリ321のメモリI/F320に組み込んで用いることで、メモリ321に格納される画像データのサイズを圧縮することができる。また、符号化は、画素単位で行われるので、高速な処理が可能である。さらに、ラインの先頭以外の符号化ブロックの先頭に局部復号データを格納しているので、符号化ブロックを復号した復号データによる画面表示を行っても、一定間隔で量子化誤差が「0」の画素データが出現することが防がれ、より高画質の画像を得ることができる。さらに、各符号化ブロックに復号の基準となるデータ(原画素データまたは局部復号データ)が含まれるので、例えばメモリ321からの読み出しエラーなどに対して、符号化ブロック単位で復元を行うことができる。   As described above, the encoding unit 11 and the decoding unit 21 according to the first embodiment are used by being incorporated in the memory I / F 320 of the memory 321 accessed by the image processing unit 311, so that the image data stored in the memory 321 can be stored. The size can be compressed. In addition, since encoding is performed on a pixel basis, high-speed processing is possible. Furthermore, since the locally decoded data is stored at the head of the coding block other than the head of the line, the quantization error is “0” at regular intervals even if the screen display is performed with the decoded data obtained by decoding the coding block. The appearance of pixel data is prevented, and a higher quality image can be obtained. Furthermore, since each coding block includes data (original pixel data or local decoding data) serving as a decoding reference, for example, a read error from the memory 321 can be restored in units of coding blocks. .

なお、上述では、第3の実施形態に単相出力に対応した復号装置2を適用したが、これはこの例に限定されない。すなわち、第3の実施形態に対して、第2の実施形態による2相出力を行う復号装置3を適用することも可能である。この場合、復号装置3は、2相LVDS(Low voltage differential signaling)に対応した2相出力を得ることができる。   In the above description, the decoding device 2 corresponding to the single-phase output is applied to the third embodiment, but this is not limited to this example. That is, it is also possible to apply the decoding device 3 that performs two-phase output according to the second embodiment to the third embodiment. In this case, the decoding device 3 can obtain a two-phase output corresponding to two-phase LVDS (Low voltage differential signaling).

1 符号化装置
2,3 復号装置
10,20,20A,20B 入力処理部
11,11’ 符号化部
12,22,22’ 出力処理部
21,21A,21B 復号部
100 減算器
101 量子化部
103 出力セレクタ
104 局部復号部
110,201 逆量子化部
111,203 加算器
112,122 局部復号データセレクタ
113,204 遅延部
200 出力セレクタ
DESCRIPTION OF SYMBOLS 1 Encoding apparatus 2, 3 Decoding apparatus 10, 20, 20A, 20B Input processing part 11, 11 'Encoding part 12, 22, 22' Output processing part 21, 21, A, 21B Decoding part 100 Subtractor 101 Quantization part 103 Output selector 104 Local decoding unit 110, 201 Inverse quantization unit 111, 203 Adder 112, 122 Local decoded data selector 113, 204 Delay unit 200 Output selector

Claims (7)

局部復号データが記憶される記憶部と、
入力データと前記局部復号データとの差分を出力する差分出力部と、
前記差分出力部により出力された前記差分を圧縮する圧縮部と、
前記圧縮部で圧縮されたデータを伸長する伸長部と、前記伸長部で伸長されたデータに前記局部復号データを加算する加算部とを備え、前記加算部の出力を符号化順で次の局部復号データとして前記記憶部に記憶させる局部復号部と、
前記圧縮部の出力と、前記加算部の出力とのうち一方を選択して符号化データとして出力する第1の選択部と
を有し、
前記第1の選択部は、
前記加算部の出力を所定数の前記入力データ毎に選択する
ことを特徴とする符号化装置。
A storage unit for storing locally decoded data;
A difference output unit for outputting a difference between input data and the locally decoded data;
A compression unit that compresses the difference output by the difference output unit;
A decompression unit for decompressing the data compressed by the compression unit; and an addition unit for adding the local decoded data to the data decompressed by the decompression unit. A local decoding unit to be stored in the storage unit as decoded data;
A first selection unit that selects one of the output of the compression unit and the output of the addition unit and outputs the selected data as encoded data;
The first selection unit includes:
An encoding apparatus, wherein an output of the adder is selected for each predetermined number of input data.
前記入力データと、前記加算部の出力とが入力され、連続する複数のブロックの先頭で前記入力データを選択する第2の選択部をさらに有し、
前記第2の選択部の出力を、前記次の局部復号データとして前記記憶部に記憶させると共に、前記第1の選択部に前記加算部の出力として供給する
ことを特徴とする請求項1に記載の符号化装置。
The input data and the output of the addition unit are input, and further includes a second selection unit that selects the input data at the head of a plurality of consecutive blocks,
The output of the second selection unit is stored in the storage unit as the next local decoded data, and is supplied to the first selection unit as an output of the addition unit. Encoding device.
前記符号化データをパケットに格納して出力する出力部をさらに有し、
前記出力部は、
前記第1の選択部で選択された前記加算部の出力による第1の符号化データを、前記入力データと同一のデータ長として先頭に配し、前記第1の選択部で選択された前記圧縮部の出力による第2の符号化データを前記第1の符号化データに続けて順次配して前記パケットを生成する
ことを特徴とする請求項1または請求項2に記載の符号化装置。
An output unit for storing the encoded data in a packet and outputting the packet;
The output unit is
The first encoded data output from the adder selected by the first selector is arranged at the head with the same data length as the input data, and the compression selected by the first selector 3. The encoding apparatus according to claim 1, wherein the packet is generated by sequentially arranging the second encoded data output from the output unit following the first encoded data. 4.
入力データと記憶部に記憶される局部復号データとの差分を出力する差分出力ステップと、
前記差分出力ステップにより出力された前記差分を圧縮する圧縮ステップと、
前記圧縮ステップにより圧縮されたデータを伸長する伸長ステップと、前記伸長ステップにより伸長されたデータに前記局部復号データを加算する加算ステップとを備え、前記加算ステップによる出力を次の前記局部復号データとして前記記憶部に記憶させる局部復号ステップと、
前記圧縮ステップによる出力と、前記加算ステップによる出力とのうち一方を選択して符号化データとして出力する選択ステップと
を有し、
前記選択ステップは、
前記加算ステップによる出力を所定数の前記入力データ毎に選択する
ことを特徴とする符号化方法。
A difference output step for outputting a difference between the input data and the locally decoded data stored in the storage unit;
A compression step of compressing the difference output by the difference output step;
A decompression step for decompressing the data compressed by the compression step; and an addition step for adding the local decoded data to the data decompressed by the decompression step. The output from the addition step is used as the next local decoded data. A local decoding step to be stored in the storage unit;
A selection step of selecting one of the output from the compression step and the output from the addition step to output as encoded data;
The selection step includes
An encoding method, wherein an output by the adding step is selected for each predetermined number of input data.
入力データと局部復号データとの差分を圧縮した出力を伸長して前記局部復号データを加算し、加算した出力を次の前記局部復号データとして用い、前記入力データ毎の前記圧縮した出力を第1の符号化データとして出力する際に、前記加算した出力を所定数の前記入力データ毎に選択して第2の符号化データとして出力し、前記第1の符号化データを前記入力データと同一のデータ長として先頭に配し、前記第2の符号化データを前記第1の符号化データに続けて順次配したパケットに対して復号処理を行う復号装置であって、 復号データを記憶する記憶部と、
前記第2の符号化データを伸長する伸長部と、
前記伸長部で伸長された前記第2の符号化データと、前記記憶部に記憶される前記復号データとを加算する加算部と、
前記第1の符号化データおよび前記加算部の出力とのうち何れか一方を、前記復号データとして選択して前記記憶部に記憶させる選択部と
を有する
ことを特徴とする復号装置。
The output obtained by compressing the difference between the input data and the local decoded data is expanded and the local decoded data is added. The added output is used as the next local decoded data, and the compressed output for each input data is used as the first output. When the output data is output as the encoded data, the added output is selected for each predetermined number of the input data and output as the second encoded data, and the first encoded data is the same as the input data. A decoding device that performs a decoding process on a packet that is arranged at the head as a data length and sequentially distributes the second encoded data following the first encoded data, and stores the decoded data When,
A decompression unit for decompressing the second encoded data;
An adder that adds the second encoded data decompressed by the decompressor and the decoded data stored in the storage;
A decoding apparatus comprising: a selection unit that selects one of the first encoded data and the output of the addition unit as the decoded data and stores the selected data in the storage unit.
入力データと局部復号データとの差分を圧縮した出力を伸長して前記局部復号データを加算し、加算した出力を次の前記局部復号データとして用い、前記入力データ毎の前記圧縮した出力を第1の符号化データとして出力する際に、前記加算した出力を所定数の前記入力データ毎に選択して第2の符号化データとして出力し、前記第1の符号化データを前記入力データと同一のデータ長として先頭に配し、前記第2の符号化データを前記第1の符号化データに続けて順次配したパケットに対して復号処理を行う復号方法であって、
復号データを記憶部に記憶する記憶ステップと、
前記第2の符号化データを伸長する伸長ステップと、
前記伸長ステップにより伸長された前記第2の符号化データと、前記記憶部に記憶される前記復号データとを加算する加算ステップと、
前記第1の符号化データおよび前記加算ステップによる出力とのうち何れか一方を、前記復号データとして選択して前記記憶部に記憶させる選択ステップと
を有することを特徴とする復号方法。
The output obtained by compressing the difference between the input data and the local decoded data is expanded and the local decoded data is added. The added output is used as the next local decoded data, and the compressed output for each input data is used as the first output. When the output data is output as the encoded data, the added output is selected for each predetermined number of the input data and output as the second encoded data, and the first encoded data is the same as the input data. A decoding method that performs a decoding process on a packet that is arranged at the beginning as a data length and sequentially distributes the second encoded data following the first encoded data;
A storage step of storing the decoded data in the storage unit;
A decompression step of decompressing the second encoded data;
An addition step of adding the second encoded data expanded by the expansion step and the decoded data stored in the storage unit;
A decoding method comprising: a selection step of selecting any one of the first encoded data and the output of the addition step as the decoded data and storing it in the storage unit.
偶数番目の前記パケットと、奇数番目の前記パケットとを選択して取り出す入力部と、
前記偶数番目の前記パケットに対する復号処理を行う請求項5に記載の第1の復号装置と、
前記奇数番目の前記パケットに対する復号処理を行う請求項5に記載の第2の復号装置と、
前記第1の復号装置の第1の復号データと、前記第2の復号装置の第2の復号データとを、偶数番目の復号データと奇数番目の復号データとに並べ直して、前記偶数番目の復号データと、前記奇数番目の復号データとを2相で出力する出力手段と
を有する
ことを特徴とする復号装置。
An input unit that selects and retrieves even-numbered packets and odd-numbered packets;
The first decoding device according to claim 5, which performs a decoding process on the even-numbered packets;
The second decoding device according to claim 5, which performs a decoding process on the odd-numbered packets;
The first decoding data of the first decoding device and the second decoding data of the second decoding device are rearranged into even-numbered decoding data and odd-numbered decoding data, and the even-numbered decoding data is rearranged. A decoding device comprising: decoded data; and output means for outputting the odd-numbered decoded data in two phases.
JP2012082468A 2012-03-30 2012-03-30 Encoding apparatus and encoding method, and decoding apparatus and decoding method Active JP5891907B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012082468A JP5891907B2 (en) 2012-03-30 2012-03-30 Encoding apparatus and encoding method, and decoding apparatus and decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012082468A JP5891907B2 (en) 2012-03-30 2012-03-30 Encoding apparatus and encoding method, and decoding apparatus and decoding method

Publications (2)

Publication Number Publication Date
JP2013211810A true JP2013211810A (en) 2013-10-10
JP5891907B2 JP5891907B2 (en) 2016-03-23

Family

ID=49529269

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012082468A Active JP5891907B2 (en) 2012-03-30 2012-03-30 Encoding apparatus and encoding method, and decoding apparatus and decoding method

Country Status (1)

Country Link
JP (1) JP5891907B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007047813A (en) * 2002-11-21 2007-02-22 Nippon Telegr & Teleph Corp <Ntt> Digital signal processing method, its program, and recording medium storing the program
JP2011091590A (en) * 2009-10-22 2011-05-06 Victor Co Of Japan Ltd Decoder

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007047813A (en) * 2002-11-21 2007-02-22 Nippon Telegr & Teleph Corp <Ntt> Digital signal processing method, its program, and recording medium storing the program
JP2011091590A (en) * 2009-10-22 2011-05-06 Victor Co Of Japan Ltd Decoder

Also Published As

Publication number Publication date
JP5891907B2 (en) 2016-03-23

Similar Documents

Publication Publication Date Title
JP4734168B2 (en) Image decoding apparatus and image decoding method
CN101072339B (en) Method and system for controlling play frame rate synchronization
US20090086818A1 (en) Frame buffer memory operating method used to decompress compressed moving pictures, and decoding apparatus adapted to frame buffer memory operating method
US8908982B2 (en) Image encoding device and image encoding method
JP5255089B2 (en) Image processing device
WO1997004593A1 (en) Letter box converter
US7860168B2 (en) Method and apparatus for improved increased bit-depth display from a transform decoder by retaining additional inverse transform bits
US6751404B1 (en) Method and apparatus for detecting processor congestion during audio and video decode
US10230982B2 (en) Image encoding apparatus and method, and image decoding apparatus and method
JP2008026347A (en) Image processing device, image processing method, image encoding device, and image encode method
JP5891907B2 (en) Encoding apparatus and encoding method, and decoding apparatus and decoding method
US8085853B2 (en) Video decoding and transcoding method and system
JP4814826B2 (en) Image processing apparatus and image processing method
JP2013219611A (en) Encoder and encoding method, and decoder and decoding method
CN106954073B (en) Video data input and output method, device and system
JP2012004898A (en) Storage device, encoding device, encoding method, and program
CN112866723B (en) Image data processing method and system
JP2001186524A (en) Video signal decoder
US20100328332A1 (en) System and method for reducing memory access bandwidth in video decoding
JP2011091590A (en) Decoder
JP2020195038A (en) Image processing apparatus, image processing method, and program
JPH06217283A (en) Encoding process unit and moving picture data encoding device, and decoding process unit and moving picture data decoding device
JP2011193357A (en) Server device, client terminal, communication system, control method and program
JPH10285552A (en) Reproducing device
JP2006121338A (en) Information processor, data encoder, and data decoder

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140829

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150423

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150602

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150803

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160208

R150 Certificate of patent or registration of utility model

Ref document number: 5891907

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150