JP2016106483A - Image processing device and method, program, and recording medium - Google Patents

Image processing device and method, program, and recording medium Download PDF

Info

Publication number
JP2016106483A
JP2016106483A JP2016018626A JP2016018626A JP2016106483A JP 2016106483 A JP2016106483 A JP 2016106483A JP 2016018626 A JP2016018626 A JP 2016018626A JP 2016018626 A JP2016018626 A JP 2016018626A JP 2016106483 A JP2016106483 A JP 2016106483A
Authority
JP
Japan
Prior art keywords
unit
slice
image
block
macroblock
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2016018626A
Other languages
Japanese (ja)
Inventor
雅朗 佐々木
Masaaki Sasaki
雅朗 佐々木
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2016018626A priority Critical patent/JP2016106483A/en
Publication of JP2016106483A publication Critical patent/JP2016106483A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To suppress decrease in coding efficiency due to high speed of image coding.SOLUTION: A slice 1 processing section 153 encodes each macro block line of slice 1 from the bottom to the top. The slice 1 processing section 153 encodes each macro block depending on the state of a macro block just left of the processed macro block, and a macro block just below the processed macro block. A slice 2 processing section 154 encodes each macro block line of slice 2 from top to bottom. The slice 2 processing section 154 encodes each macro block depending on the state of a macro block just left of the processed macro block, and a macro block just above the processed macro block. The invention is applicable to an image processing device, for example.SELECTED DRAWING: Figure 3

Description

本発明は、画像処理装置および方法、プログラム、並びに、記録媒体に関し、特に、画像符号化の高速化による符号化効率の低減を抑制させることができるようにした画像処理装置および方法、プログラム、並びに、記録媒体に関する。   The present invention relates to an image processing apparatus and method, a program, and a recording medium, and in particular, an image processing apparatus and method, a program, and a program capable of suppressing reduction in encoding efficiency due to high-speed image encoding, and The invention relates to a recording medium.

従来、AVC(Advanced Video Coding)画像符号化方式では、エントロピ符号化としてCABAC(Context-based Adaptive Binary Arithmetic Coding)や、CAVLC(Context-based Adaptive Variable Length Coding)が定義されている。このうちCABACは周囲の状況(コンテキスト(Context))に応じて適応的に符号化を行う2値の算術符号方式である。   Conventionally, in an AVC (Advanced Video Coding) image coding method, CABAC (Context-based Adaptive Binary Arithmetic Coding) and CAVLC (Context-based Adaptive Variable Length Coding) are defined as entropy coding. Among them, CABAC is a binary arithmetic coding system that performs coding adaptively according to the surrounding situation (context).

算術符号化では1シンボルごとに発生確率に応じて数値区間を分割する処理を繰り返すことで符号列を得る。すなわち、全シンボルを順次処理する必要があり、処理の並列化が困難であるので、処理の高速化が困難であった。   In arithmetic coding, a code string is obtained by repeating the process of dividing a numerical interval according to the occurrence probability for each symbol. That is, since it is necessary to process all symbols sequentially, it is difficult to parallelize the processing, and thus it is difficult to increase the processing speed.

そこで、AVCではマルチスライス(multi slice)という手法を用いて高スループットを実現することができるようになされた。マルチスライスにおいては、図1Aに示されるように、画像が複数の領域に分割され、それぞれに対して独立してCABAC符号化処理が行われる。つまり、図1Aの点線矢印に示されるように、画像内上側のマクロブロックラインから画像内下側のマクロブロックラインに向かう順に、マクロブロック毎に算術符号化が行われる。このようにすることにより各領域のCABAC符号化を並列に行うことができるようになり、処理の高速化が実現された。この分割された領域をスライス(slice)と称する。   Therefore, AVC has made it possible to achieve high throughput using a technique called multi slice. In multi-slice, as shown in FIG. 1A, an image is divided into a plurality of regions, and CABAC encoding processing is performed independently on each of the regions. That is, as indicated by the dotted arrow in FIG. 1A, arithmetic coding is performed for each macroblock in the order from the upper macroblock line in the image to the lower macroblock line in the image. In this way, CABAC encoding of each region can be performed in parallel, and the processing speed is increased. This divided area is referred to as a slice.

各マクロブロックは、図1Bや図1Cに示されるように、隣接する他のマクロブロックを参照しながら符号化される。   Each macroblock is encoded with reference to other adjacent macroblocks as shown in FIGS. 1B and 1C.

しかしながら、領域を分割することは符号化効率を落とす要因になる。第1に、各スライスが独立に符号化されるので、図1Bや図1Cに示されるように、各領域(スライス)の符号化において相互参照をすることができない。したがって、境界部分で画面内予測(intra-prediction)が使用できなくなり、符号化効率が低減する恐れがあった。   However, dividing the area becomes a factor of reducing the coding efficiency. First, since each slice is encoded independently, as shown in FIG. 1B and FIG. 1C, it is not possible to cross-reference in encoding each region (slice). Therefore, intra-prediction cannot be used at the boundary portion, which may reduce the coding efficiency.

第2に、CABACではシンボル発生確率テーブルを選択するために、図1Cに示されるように周辺マクロブロックの状態が参照されるが、境界部分では隣接マクロブロックの参照が不可能になるため、適切な発生確率テーブルの選択が困難になる恐れがあった。   Second, in CABAC, in order to select the symbol occurrence probability table, the state of neighboring macroblocks is referred to as shown in FIG. 1C. It may be difficult to select an appropriate occurrence probability table.

第3に、CABACで用いられるシンボル発生確率テーブルは、符号化が進むにつれて実際の発生確率に収束して符号化効率が高まっていくが、マルチスライス(multi slice)の場合、領域(スライス)毎にそのシンボル発生確率テーブルが初期化されるので、スライス(slice)開始時点での符号化効率が低減する恐れがあった。   Third, the symbol occurrence probability table used in CABAC converges to the actual occurrence probability as encoding progresses, and the encoding efficiency increases. However, in the case of multi slice, for each region (slice) Since the symbol occurrence probability table is initialized, the coding efficiency at the start of the slice may be reduced.

CABACを並列化しつつ符号化効率を改善する手法としてエントロピスライス(entropy slice)方式が提案された(例えば、非特許文献1参照)。この方式によればCABAC処理部分のみが、エントロピスライス(entropy slice)と称される領域に分割されて並列に実行されるので、画面内予測についてはエントロピスライス(entropy slice)境界でも使用可能であった。しかしながら、CABAC処理における周辺マクロブロック参照は、エントロピスライス(entropy slice)境界において使用不可であった。   An entropy slice method has been proposed as a method for improving coding efficiency while parallelizing CABAC (see, for example, Non-Patent Document 1). According to this method, only the CABAC processing part is divided into regions called entropy slices and executed in parallel, so that intra-screen prediction can be used even at entropy slice boundaries. It was. However, surrounding macroblock references in CABAC processing cannot be used at entropy slice boundaries.

さらなる改善手法としてオーダードエントロピスライス(ordered entropy slices)方式が提案された(例えば、特許文献2参照)。この方式により、CABAC処理でも境界部分で隣接マクロブロックの参照が可能となった。   As a further improvement method, an ordered entropy slices method has been proposed (for example, see Patent Document 2). This method makes it possible to refer to adjacent macroblocks at the boundary even in CABAC processing.

A. Segall, J.Zhao, ”Entropy slices for parallel entropy decoding”, VCEG input document COM16-C405, Geneva, CH, April 2008A. Segall, J. Zhao, “Entropy slices for parallel entropy decoding”, VCEG input document COM16-C405, Geneva, CH, April 2008 Xun Guo,Yu-Wen Huang,Shawmin Lei"Ordered Entropy Slices for Parallel CABAC", VCEG input document VCEG-AK25, Yokohama, Japan, April 2009Xun Guo, Yu-Wen Huang, Shawmin Lei "Ordered Entropy Slices for Parallel CABAC", VCEG input document VCEG-AK25, Yokohama, Japan, April 2009

しかしながら、第2のエントロピスライス(entropy slice)を符号化するときに上側に隣接する第1のエントロピスライス(entropy slice)のマクロブロックが処理を終えていなければならないためにスライス(slice)間の依存が生じてしまい並列化のメリットが失われた。すなわち、本来の目的であるCABAC処理並列化による高速化の達成が困難であった。   However, when coding the second entropy slice, the macroblock of the first entropy slice adjacent on the upper side must finish the processing, so the dependency between the slices. The benefits of parallelization were lost. In other words, it has been difficult to achieve high speed by CABAC processing parallelization, which is the original purpose.

本発明は、このような状況に鑑みてなされたものであり、画像符号化の高速化による符号化効率の低減を抑制させることを目的とする。   The present invention has been made in view of such a situation, and an object thereof is to suppress a reduction in encoding efficiency due to high-speed image encoding.

本技術の一側面は、コンテキストを用いて、画像データのブロックを符号化する符号化部と、符号化対象となる対象ブロックラインの上部に隣接するブロックラインである上ブロックラインにおいて前記対象ブロックラインの先頭に位置する対象先頭ブロックの上部に隣接する上先頭ブロックと異なる場所に位置するブロックである上ブロックを符号化した際に更新されたコンテキストを用いて、前記対象先頭ブロックを符号化する際に用いるコンテキストを初期化するように、前記符号化部を制御する制御部とを備える画像処理装置である。   One aspect of the present technology is that an encoding unit that encodes a block of image data using a context and the target block line in an upper block line that is a block line adjacent to an upper part of the target block line to be encoded When encoding the target head block using the context updated when the upper block, which is a block located at a different location from the upper head block adjacent to the top of the target head block located at the top of the target block, is encoded. The image processing apparatus includes a control unit that controls the encoding unit so as to initialize a context to be used.

前記制御部は、前記上ブロックラインに対して前記上先頭ブロックよりも符号化順で後の場所に位置する前記上ブロックを符号化した際に更新されたコンテキストを初期値として、前記対象先頭ブロックを符号化するように、前記符号化部を制御することができる。   The control unit sets, as an initial value, a context updated when the upper block located at a position later in the encoding order than the upper head block is encoded with respect to the upper block line, the target head block The encoding unit can be controlled to encode.

前記制御部は、前記上ブロックを符号化した際に更新された確率テーブルを初期値として、前記対象先頭ブロックを符号化するように、前記符号化部を制御することができる。   The control unit may control the encoding unit so as to encode the target head block using an initial value as a probability table updated when the upper block is encoded.

前記符号化部は、前記対象ブロックラインを、コンテキストを用いて算術符号化することができる。   The encoding unit may arithmetically encode the target block line using a context.

本技術の一側面は、また、コンテキストを用いて、画像データのブロックを符号化し、符号化対象となる対象ブロックラインの上部に隣接するブロックラインである上ブロックラインにおいて前記対象ブロックラインの先頭に位置する対象先頭ブロックの上部に隣接する上先頭ブロックと異なる場所に位置するブロックである上ブロックを符号化した際に更新されたコンテキストを用いて、前記対象先頭ブロックを符号化する際に用いるコンテキストを初期化するように制御する画像処理方法である。   According to another aspect of the present technology, a block of image data is encoded using a context, and an upper block line that is a block line adjacent to an upper portion of the target block line to be encoded is placed at the head of the target block line. Context used when encoding the target head block using the context updated when the upper block, which is a block located at a different location from the upper head block adjacent to the upper part of the target head block located, is encoded Is an image processing method for controlling to initialize the image.

前記上ブロックラインに対して前記上先頭ブロックよりも符号化順で後の場所に位置する前記上ブロックを符号化した際に更新されたコンテキストを初期値として、前記対象先頭ブロックを符号化するように制御することができる。   The target head block is encoded with the context updated when the upper block located in the encoding order after the upper head block is encoded with respect to the upper block line as an initial value. Can be controlled.

前記上ブロックを符号化した際に更新された確率テーブルを初期値として、前記対象先頭ブロックを符号化するように制御することができる。   It is possible to control to encode the target head block by using, as an initial value, the probability table updated when the upper block is encoded.

前記対象ブロックラインを、コンテキストを用いて算術符号化することができる。   The target block line may be arithmetically encoded using a context.

本技術の一側面は、さらに、コンピュータに、コンテキストを用いて、画像データのブロックを符号化する符号化部と、符号化対象となる対象ブロックラインの上部に隣接するブロックラインである上ブロックラインにおいて前記対象ブロックラインの先頭に位置する対象先頭ブロックの上部に隣接する上先頭ブロックと異なる場所に位置するブロックである上ブロックを符号化した際に更新されたコンテキストを用いて、前記対象先頭ブロックを符号化する際に用いるコンテキストを初期化するように、前記符号化部を制御する制御部として機能させるためのプログラムである。   One aspect of the present technology further includes an encoding unit that encodes a block of image data using a context, and an upper block line that is a block line adjacent to an upper part of a target block line to be encoded. The target head block using the context updated when the upper block, which is a block located at a different location from the upper head block adjacent to the top of the target head block located at the head of the target block line, is encoded. Is a program for functioning as a control unit for controlling the encoding unit so as to initialize a context used when encoding the.

本技術の一側面は、また、コンピュータに、コンテキストを用いて、画像データのブロックを符号化する符号化部と、符号化対象となる対象ブロックラインの上部に隣接するブロックラインである上ブロックラインにおいて前記対象ブロックラインの先頭に位置する対象先頭ブロックの上部に隣接する上先頭ブロックと異なる場所に位置するブロックである上ブロックを符号化した際に更新されたコンテキストを用いて、前記対象先頭ブロックを符号化する際に用いるコンテキストを初期化するように、前記符号化部を制御する制御部として機能させるためのプログラムを記録したコンピュータが読み取り可能な記録媒体である。   One aspect of the present technology is also that an encoding unit that encodes a block of image data using a context in a computer, and an upper block line that is a block line adjacent to an upper part of a target block line to be encoded The target head block using the context updated when the upper block, which is a block located at a different location from the upper head block adjacent to the top of the target head block located at the head of the target block line, is encoded. This is a computer-readable recording medium that records a program for functioning as a control unit for controlling the encoding unit so as to initialize a context used when encoding the video.

本技術の一側面においては、コンテキストを用いて、画像データのブロックが符号化され、符号化対象となる対象ブロックラインの上部に隣接するブロックラインである上ブロックラインにおいて対象ブロックラインの先頭に位置する対象先頭ブロックの上部に隣接する上先頭ブロックと異なる場所に位置するブロックである上ブロックを符号化した際に更新されたコンテキストを用いて、対象先頭ブロックを符号化する際に用いるコンテキストを初期化するように制御される。   In one aspect of the present technology, a block of image data is encoded using a context, and the upper block line, which is a block line adjacent to the upper part of the target block line to be encoded, is positioned at the head of the target block line. The context used when encoding the target head block is initialized using the context updated when the upper block, which is a block located at a different location from the upper head block adjacent to the upper part of the target head block to be encoded, is used. It is controlled to become.

本発明によれば、画像データを符号化することができる。特に、画像符号化の高速化による符号化効率の低減を抑制させることができる。   According to the present invention, image data can be encoded. In particular, it is possible to suppress a reduction in encoding efficiency due to high-speed image encoding.

従来の処理進行方向および参照方向の例を説明する図である。It is a figure explaining the example of the conventional process advancing direction and a reference direction. 本発明を適用した画像符号化装置の主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of the image coding apparatus to which this invention is applied. 可逆符号化部の主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of a lossless encoding part. 本発明の処理進行方向および参照方向の例を説明する図である。It is a figure explaining the example of the process advancing direction and reference direction of this invention. 符号化処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of an encoding process. 可逆符号化処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of a lossless encoding process. スライス1符号化処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of a slice 1 encoding process. スライス2符号化処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of a slice 2 encoding process. 本発明を適用した画像復号装置の主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of the image decoding apparatus to which this invention is applied. 可逆復号部の主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of a lossless decoding part. 復号処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of a decoding process. 可逆復号処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of a lossless decoding process. スライス1復号処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of a slice 1 decoding process. スライス2復号処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of a slice 2 decoding process. 可逆符号化部の他の構成例を示すブロック図である。It is a block diagram which shows the other structural example of a lossless encoding part. 可逆符号化処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of a lossless encoding process. スライス1符号化処理の流れの他の例を説明するフローチャートである。It is a flowchart explaining the other example of the flow of a slice 1 encoding process. スライス2符号化処理の流れの他の例を説明するフローチャートである。It is a flowchart explaining the other example of the flow of a slice 2 encoding process. 確率テーブルの利用の様子の例を説明する図である。It is a figure explaining the example of the mode of utilization of a probability table. スライス1符号化処理の流れの他の例を説明するフローチャートである。It is a flowchart explaining the other example of the flow of a slice 1 encoding process. スライス2符号化処理の流れの他の例を説明するフローチャートである。It is a flowchart explaining the other example of the flow of a slice 2 encoding process. 4分割の例を説明するフローチャートである。It is a flowchart explaining the example of 4 division. 可逆符号化部の他の構成例を示すブロック図である。It is a block diagram which shows the other structural example of a lossless encoding part. 可逆復号部の他の構成例を示すブロック図である。It is a block diagram which shows the other structural example of a lossless decoding part. マクロブロックの他の例を示す図である。It is a figure which shows the other example of a macroblock. 本発明を適用したパーソナルコンピュータの主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of the personal computer to which this invention is applied. 本発明を適用したテレビジョン受像機の主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of the television receiver to which this invention is applied. 本発明を適用した携帯電話機の主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of the mobile telephone to which this invention is applied. 本発明を適用したハードディスクレコーダの主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of the hard disk recorder to which this invention is applied. 本発明を適用したカメラの主な構成例を示すブロック図である。It is a block diagram which shows the main structural examples of the camera to which this invention is applied.

以下、発明を実施するための形態(以下実施の形態とする)について説明する。なお、説明は以下の順序で行う。
1.第1の実施の形態(画像符号化装置)
2.第2の実施の形態(画像復号装置)
3.第3の実施の形態(画像符号化装置・画像復号装置)
4.第4の実施の形態(パーソナルコンピュータ)
5.第5の実施の形態(テレビジョン受像機)
6.第6の実施の形態(携帯電話機)
7.第7の実施の形態(ハードディスクレコーダ)
8.第8の実施の形態(カメラ)
Hereinafter, modes for carrying out the invention (hereinafter referred to as embodiments) will be described. The description will be given in the following order.
1. First Embodiment (Image Encoding Device)
2. Second embodiment (image decoding apparatus)
3. Third Embodiment (Image Encoding Device / Image Decoding Device)
4). Fourth embodiment (personal computer)
5. Fifth embodiment (television receiver)
6). Sixth embodiment (mobile phone)
7). Seventh embodiment (hard disk recorder)
8). Eighth embodiment (camera)

<1.第1の実施の形態>
[画像符号化装置]
図2は、本発明を適用した画像処理装置としての画像符号化装置の一実施の形態の構成を表している。
<1. First Embodiment>
[Image encoding device]
FIG. 2 shows a configuration of an embodiment of an image encoding apparatus as an image processing apparatus to which the present invention is applied.

図2に示される画像符号化装置100は、例えば、H.264及びMPEG(Moving Picture Experts Group)4 Part10(AVC(Advanced Video Coding))(以下H.264/AVCと称する)方式で画像を圧縮符号化する符号化装置である。ただし、画像符号化装置100は、可逆符号化方式としてCABACをマルチスライス方式で行う。   The image encoding device 100 shown in FIG. This is an encoding device that compresses and encodes an image using H.264 and MPEG (Moving Picture Experts Group) 4 Part 10 (AVC (Advanced Video Coding)) (hereinafter referred to as H.264 / AVC). However, the image encoding apparatus 100 performs CABAC by a multi-slice method as a lossless encoding method.

図2の例において、画像符号化装置100は、A/D(Analog / Digital)変換部101、画面並べ替えバッファ102、演算部103、直交変換部104、量子化部105、可逆符号化部106、および蓄積バッファ107を有する。また、画像符号化装置100は、逆量子化部108、逆直交変換部109、および演算部110を有する。さらに、画像符号化装置100は、デブロックフィルタ111、およびフレームメモリ112を有する。また、画像符号化装置100は、選択部113、イントラ予測部114、動き予測補償部115、および選択部116を有する。さらに、画像符号化装置100は、レート制御部117を有する。   In the example of FIG. 2, the image encoding device 100 includes an A / D (Analog / Digital) conversion unit 101, a screen rearrangement buffer 102, a calculation unit 103, an orthogonal conversion unit 104, a quantization unit 105, and a lossless encoding unit 106. And a storage buffer 107. In addition, the image coding apparatus 100 includes an inverse quantization unit 108, an inverse orthogonal transform unit 109, and a calculation unit 110. Further, the image encoding device 100 includes a deblock filter 111 and a frame memory 112. In addition, the image encoding device 100 includes a selection unit 113, an intra prediction unit 114, a motion prediction compensation unit 115, and a selection unit 116. Furthermore, the image encoding device 100 includes a rate control unit 117.

A/D変換部101は、入力された画像データをA/D変換し、画面並べ替えバッファ102に出力し、記憶させる。画面並べ替えバッファ102は、記憶した表示の順番のフレームの画像を、GOP(Group of Picture)構造に応じて、符号化のためのフレームの順番に並べ替える。画面並べ替えバッファ102は、フレームの順番を並び替えた画像を、演算部103、イントラ予測部114、および動き予測補償部115に供給する。   The A / D conversion unit 101 performs A / D conversion on the input image data, and outputs to the screen rearrangement buffer 102 for storage. The screen rearrangement buffer 102 rearranges the stored frame images in the display order in the order of frames for encoding in accordance with the GOP (Group of Picture) structure. The screen rearrangement buffer 102 supplies the image with the rearranged frame order to the arithmetic unit 103, the intra prediction unit 114, and the motion prediction compensation unit 115.

演算部103は、画面並べ替えバッファ102から読み出された画像から、選択部116から供給される予測画像を減算し、その差分情報を直交変換部104に出力する。例えば、イントラ符号化が行われる画像の場合、演算部103は、画面並べ替えバッファ102から読み出された画像にイントラ予測部114から供給される予測画像を加算する。また、例えば、インター符号化が行われる画像の場合、演算部103は、画面並べ替えバッファ102から読み出された画像に動き予測補償部115から供給される予測画像を加算する。   The calculation unit 103 subtracts the predicted image supplied from the selection unit 116 from the image read from the screen rearrangement buffer 102 and outputs the difference information to the orthogonal transform unit 104. For example, in the case of an image on which intra coding is performed, the calculation unit 103 adds the predicted image supplied from the intra prediction unit 114 to the image read from the screen rearrangement buffer 102. For example, in the case of an image on which inter coding is performed, the calculation unit 103 adds the predicted image supplied from the motion prediction / compensation unit 115 to the image read from the screen rearrangement buffer 102.

直交変換部104は、演算部103からの差分情報に対して、離散コサイン変換、カルーネン・レーベ変換等の直交変換を施し、その変換係数を量子化部105に供給する。量子化部105は、直交変換部104が出力する変換係数を量子化する。量子化部105は、量子化された変換係数を可逆符号化部106に供給する。   The orthogonal transform unit 104 performs orthogonal transform such as discrete cosine transform and Karhunen-Loeve transform on the difference information from the operation unit 103 and supplies the transform coefficient to the quantization unit 105. The quantization unit 105 quantizes the transform coefficient output from the orthogonal transform unit 104. The quantization unit 105 supplies the quantized transform coefficient to the lossless encoding unit 106.

可逆符号化部106は、その量子化された変換係数に対して、CABACをマルチスライス方式で行う。つまり、可逆符号化部106は、量子化された変換係数の画像領域を上下2つのエントロピスライス(スライス1とスライス2)に分割し、各スライスについてのCABACを互いに並行して行う。   The lossless encoding unit 106 performs CABAC on the quantized transform coefficient by the multi-slice method. That is, the lossless encoding unit 106 divides the quantized image region of the transform coefficient into two upper and lower entropy slices (slice 1 and slice 2), and performs CABAC for each slice in parallel with each other.

このとき可逆符号化部106は、上側のエントロピスライス(スライス1)に対するCABACを、下のマクロブロックから上のマクロブロックに向かう順に進める。また、可逆符号化部106は、下側のエントロピスライス(スライス2)に対するCABACを、上のマクロブロックから下のマクロブロックに向かう順に進める。   At this time, the lossless encoding unit 106 advances CABAC for the upper entropy slice (slice 1) in order from the lower macroblock to the upper macroblock. Further, the lossless encoding unit 106 advances CABAC for the lower entropy slice (slice 2) in order from the upper macroblock to the lower macroblock.

このように、可逆符号化部106は、上下2つのエントロピスライスに対して、互いの境界から遠ざかる方向に各マクロブロックを順次処理する。   In this way, the lossless encoding unit 106 sequentially processes each macroblock in the direction away from each other's boundary with respect to the upper and lower two entropy slices.

可逆符号化部106は、イントラ予測を示す情報などをイントラ予測部114から取得し、インター予測モードを示す情報などを動き予測補償部115から取得する。なお、イントラ予測を示す情報は、以下、イントラ予測モード情報とも称する。また、インター予測を示す情報モードを示す情報は、以下、インター予測モード情報とも称する。   The lossless encoding unit 106 acquires information indicating intra prediction from the intra prediction unit 114 and acquires information indicating inter prediction mode from the motion prediction compensation unit 115. Note that information indicating intra prediction is hereinafter also referred to as intra prediction mode information. In addition, information indicating an information mode indicating inter prediction is hereinafter also referred to as inter prediction mode information.

可逆符号化部106は、量子化された変換係数を符号化するとともに、フィルタ係数、イントラ予測モード情報、インター予測モード情報、および量子化パラメータなどを、符号化データのヘッダ情報の一部とする(多重化する)。可逆符号化部106は、符号化して得られた符号化データを蓄積バッファ107に供給して蓄積させる。   The lossless encoding unit 106 encodes the quantized transform coefficient, and uses a filter coefficient, intra prediction mode information, inter prediction mode information, a quantization parameter, and the like as part of the header information of the encoded data. (Multiplex). The lossless encoding unit 106 supplies the encoded data obtained by encoding to the accumulation buffer 107 for accumulation.

蓄積バッファ107は、可逆符号化部106から供給された符号化データを、一時的に保持し、所定のタイミングにおいて、H.264/AVC方式で符号化された符号化画像として、例えば、後段の図示せぬ記録装置や伝送路などに出力する。   The accumulation buffer 107 temporarily holds the encoded data supplied from the lossless encoding unit 106, and at a predetermined timing, the H.264 buffer stores the encoded data. As an encoded image encoded by the H.264 / AVC format, for example, it is output to a recording device or a transmission path (not shown) in the subsequent stage.

また、量子化部105において量子化された変換係数は、逆量子化部108にも供給される。逆量子化部108は、その量子化された変換係数を、量子化部105による量子化に対応する方法で逆量子化し、得られた変換係数を、逆直交変換部109に供給する。   The transform coefficient quantized by the quantization unit 105 is also supplied to the inverse quantization unit 108. The inverse quantization unit 108 inversely quantizes the quantized transform coefficient by a method corresponding to the quantization by the quantization unit 105, and supplies the obtained transform coefficient to the inverse orthogonal transform unit 109.

逆直交変換部109は、供給された変換係数を、直交変換部104による直交変換処理に対応する方法で逆直交変換する。逆直交変換された出力は、演算部110に供給される。   The inverse orthogonal transform unit 109 performs inverse orthogonal transform on the supplied transform coefficient by a method corresponding to the orthogonal transform process by the orthogonal transform unit 104. The output subjected to inverse orthogonal transform is supplied to the calculation unit 110.

演算部110は、逆直交変換部109より供給された逆直交変換結果、すなわち、復元された差分情報に、選択部116から供給される予測画像を加算し、局部的に復号された画像(復号画像)を得る。例えば、差分情報が、イントラ符号化が行われる画像に対応する場合、演算部110は、その差分情報にイントラ予測部114から供給される予測画像を加算する。また、たとえば、差分情報が、インター符号化が行われる画像に対応する場合、演算部110は、その差分情報に動き予測補償部115から供給される予測画像を加算する。   The calculation unit 110 adds the prediction image supplied from the selection unit 116 to the inverse orthogonal transformation result supplied from the inverse orthogonal transformation unit 109, that is, the restored difference information, and generates a locally decoded image (decoding Image). For example, when the difference information corresponds to an image on which intra coding is performed, the calculation unit 110 adds the predicted image supplied from the intra prediction unit 114 to the difference information. For example, when the difference information corresponds to an image on which inter coding is performed, the arithmetic unit 110 adds the predicted image supplied from the motion prediction / compensation unit 115 to the difference information.

その加算結果は、デブロックフィルタ111またはフレームメモリ112に供給される。   The addition result is supplied to the deblock filter 111 or the frame memory 112.

デブロックフィルタ111は、適宜デブロックフィルタ処理を行うことにより復号画像のブロック歪を除去するとともに、例えばウィナーフィルタ(Wiener Filter)を用いて適宜ループフィルタ処理を行うことにより画質改善を行う。デブロックフィルタ111は、各画素をクラス分類し、クラスごとに適切なフィルタ処理を施す。デブロックフィルタ111は、そのフィルタ処理結果をフレームメモリ112に供給する。   The deblocking filter 111 removes block distortion of the decoded image by appropriately performing the deblocking filter process, and improves the image quality by appropriately performing the loop filter process using, for example, a Wiener filter. The deblocking filter 111 classifies each pixel and performs an appropriate filter process for each class. The deblocking filter 111 supplies the filter processing result to the frame memory 112.

フレームメモリ112は、所定のタイミングにおいて、蓄積されている参照画像を、選択部113を介してイントラ予測部114または動き予測補償部115に出力する。   The frame memory 112 outputs the accumulated reference image to the intra prediction unit 114 or the motion prediction compensation unit 115 via the selection unit 113 at a predetermined timing.

例えば、イントラ符号化が行われる画像の場合、フレームメモリ112は、参照画像を、選択部113を介してイントラ予測部114に供給する。また、例えば、インター符号化が行われる画像の場合、フレームメモリ112は、参照画像を、選択部113を介して動き予測補償部115に供給する。   For example, in the case of an image on which intra coding is performed, the frame memory 112 supplies the reference image to the intra prediction unit 114 via the selection unit 113. For example, in the case of an image on which inter coding is performed, the frame memory 112 supplies the reference image to the motion prediction / compensation unit 115 via the selection unit 113.

画像符号化装置100においては、例えば、画面並べ替えバッファ102からのIピクチャ、Bピクチャ、およびPピクチャが、イントラ予測(イントラ処理とも称する)する画像として、イントラ予測部114に供給される。また、画面並べ替えバッファ102から読み出されたBピクチャおよびPピクチャが、インター予測(インター処理とも称する)する画像として、動き予測補償部115に供給される。   In the image encoding device 100, for example, an I picture, a B picture, and a P picture from the screen rearrangement buffer 102 are supplied to the intra prediction unit 114 as images for intra prediction (also referred to as intra processing). In addition, the B picture and the P picture read from the screen rearrangement buffer 102 are supplied to the motion prediction / compensation unit 115 as an image to be inter predicted (also referred to as inter processing).

選択部113は、フレームメモリ112から供給される参照画像を、イントラ符号化を行う画像の場合、イントラ予測部114に供給し、インター符号化を行う画像の場合、動き予測補償部115に供給する。   The selection unit 113 supplies the reference image supplied from the frame memory 112 to the intra prediction unit 114 in the case of an image to be subjected to intra coding, and to the motion prediction compensation unit 115 in the case of an image to be subjected to inter coding. .

イントラ予測部114は、画面内の画素値を用いて予測画像を生成するイントラ予測(画面内予測)を行う。イントラ予測部114は、複数のモード(イントラ予測モード)によりイントラ予測を行う。このイントラ予測モードには、選択部113を介してフレームメモリ112から供給された参照画像に基づいて予測画像を生成するモードがある。   The intra prediction unit 114 performs intra prediction (intra-screen prediction) that generates a predicted image using pixel values in the screen. The intra prediction unit 114 performs intra prediction in a plurality of modes (intra prediction modes). The intra prediction mode includes a mode for generating a prediction image based on a reference image supplied from the frame memory 112 via the selection unit 113.

イントラ予測部114は、全てのイントラ予測モードで予測画像を生成し、各予測画像を評価し、最適なモードを選択する。イントラ予測部114は、最適なイントラ予測モードを選択すると、その最適なモードで生成された予測画像を、選択部116を介して演算部103に供給する。また、上述したように、イントラ予測部114は、採用したイントラ予測モードを示すイントラ予測モード情報等の情報を、適宜可逆符号化部106に供給する。   The intra prediction unit 114 generates prediction images in all intra prediction modes, evaluates each prediction image, and selects an optimal mode. When the optimal intra prediction mode is selected, the intra prediction unit 114 supplies the prediction image generated in the optimal mode to the calculation unit 103 via the selection unit 116. Further, as described above, the intra prediction unit 114 supplies information such as intra prediction mode information indicating the adopted intra prediction mode to the lossless encoding unit 106 as appropriate.

動き予測補償部115は、インター符号化が行われる画像について、画面並べ替えバッファ102から供給される入力画像と、選択部113を介してフレームメモリ112から供給される参照フレームとなる復号画像とを用いて、動きベクトルを算出する。動き予測補償部115は、算出した動きベクトルに応じて動き補償処理を行い、予測画像(インター予測画像情報)を生成する。   The motion prediction / compensation unit 115 obtains an input image supplied from the screen rearrangement buffer 102 and a decoded image serving as a reference frame supplied from the frame memory 112 via the selection unit 113 for an image to be inter-coded. To calculate a motion vector. The motion prediction / compensation unit 115 performs motion compensation processing according to the calculated motion vector, and generates a prediction image (inter prediction image information).

動き予測補償部115は、候補となる全てのインター予測モードのインター予測処理を行い、予測画像を生成する。動き予測補償部115は、生成された予測画像を、選択部116を介して演算部103に供給する。   The motion prediction / compensation unit 115 performs inter prediction processing in all candidate inter prediction modes, and generates a prediction image. The motion prediction / compensation unit 115 supplies the generated prediction image to the calculation unit 103 via the selection unit 116.

動き予測補償部115は、採用されたインター予測モードを示すインター予測モード情報や、算出した動きベクトルを示す動きベクトル情報を可逆符号化部106に供給する。   The motion prediction / compensation unit 115 supplies the inter prediction mode information indicating the adopted inter prediction mode and the motion vector information indicating the calculated motion vector to the lossless encoding unit 106.

選択部116は、イントラ符号化を行う画像の場合、イントラ予測部114の出力を演算部103に供給し、インター符号化を行う画像の場合、動き予測補償部115の出力を演算部103に供給する。   The selection unit 116 supplies the output of the intra prediction unit 114 to the calculation unit 103 in the case of an image to be subjected to intra coding, and supplies the output of the motion prediction compensation unit 115 to the calculation unit 103 in the case of an image to be subjected to inter coding. To do.

レート制御部117は、蓄積バッファ107に蓄積された圧縮画像に基づいて、オーバーフローあるいはアンダーフローが発生しないように、量子化部105の量子化動作のレートを制御する。   The rate control unit 117 controls the quantization operation rate of the quantization unit 105 based on the compressed image stored in the storage buffer 107 so that overflow or underflow does not occur.

[可逆符号化部の構成]
図3は可逆符号化部106の主な構成例を示すブロック図である。図3に示されるように、可逆符号化部106は、制御部151、記憶部152、スライス1処理部153、およびスライス2処理部154を有する。
[Configuration of lossless encoding unit]
FIG. 3 is a block diagram illustrating a main configuration example of the lossless encoding unit 106. As shown in FIG. 3, the lossless encoding unit 106 includes a control unit 151, a storage unit 152, a slice 1 processing unit 153, and a slice 2 processing unit 154.

制御部151は、記憶部152のデータ入出力を制御する。制御部151は、マクロブロック検出部161およびスライス検出部162を有する。   The control unit 151 controls data input / output of the storage unit 152. The control unit 151 includes a macroblock detection unit 161 and a slice detection unit 162.

係数データは、量子化部105から、マクロブロック毎に供給される。例えば図1Aの実線矢印に示されるように、係数データは、マクロブロックの水平方向の並び(以下、マクロブロックラインと称する)において、左端のマクロブロックから右端のマクロブロックに向かう順に1マクロブロック分ずつ供給される。また、例えば図1Aの点線矢印に示されるように、画像内の上のマクロブロックライン程優先的に供給される。   The coefficient data is supplied from the quantization unit 105 for each macroblock. For example, as indicated by the solid line arrow in FIG. 1A, the coefficient data is one macroblock in order from the leftmost macroblock to the rightmost macroblock in the horizontal arrangement of macroblocks (hereinafter referred to as macroblock line). Supplied one by one. For example, as indicated by a dotted arrow in FIG. 1A, the upper macroblock line in the image is preferentially supplied.

つまり、1画像(1ピクチャ若しくは1フィールド)の係数データは、画像内の左上端のマクロブロックから供給され、最後に右下端のマクロブロックが供給される。   That is, the coefficient data of one image (one picture or one field) is supplied from the upper left macroblock in the image, and finally the lower right macroblock is supplied.

マクロブロック検出部161は、このような順で量子化部105から供給される係数データの各マクロブロックを検出し、各マクロブロックラインの先頭アドレスを係数データとともに記憶部152に記憶させる。また、マクロブロック検出部161は、検出したマクロブロックラインの先頭アドレスをスライス検出部162に通知する。   The macroblock detection unit 161 detects each macroblock of the coefficient data supplied from the quantization unit 105 in this order, and stores the start address of each macroblock line in the storage unit 152 together with the coefficient data. Further, the macroblock detection unit 161 notifies the slice detection unit 162 of the start address of the detected macroblock line.

スライス検出部162は、マクロブロックラインの先頭アドレスから、エントロピスライスの境界(スライス1とスライス2との境界)を検出し、その検出結果に応じて、スライス1処理部153およびスライス154を動作させる。   The slice detection unit 162 detects the boundary of the entropy slice (the boundary between slice 1 and slice 2) from the start address of the macroblock line, and operates the slice 1 processing unit 153 and the slice 154 according to the detection result. .

例えば、図1Aに示されるように、画像(1ピクチャ若しくは1フィールド)がスライス1とスライス2に2分割される場合、スライス検出部162は、マクロブロックラインの先頭アドレスから、画像の上半分の係数データが記憶部152に記憶されたことを検出し、エントロピスライスの境界を検出する。   For example, as shown in FIG. 1A, when an image (one picture or one field) is divided into two parts, slice 1 and slice 2, the slice detector 162 determines the upper half of the image from the start address of the macroblock line. It is detected that the coefficient data is stored in the storage unit 152, and the boundary of the entropy slice is detected.

スライス検出部162は、スライス1の一番下のマクロブロックラインの係数データの書き込みが開始されたと判定すると、スライス1処理部153を動作させ、記憶部152からのスライス1の係数データの読み出しを開始させる。   When the slice detection unit 162 determines that the writing of coefficient data of the bottom macroblock line of slice 1 has started, the slice detection unit 162 operates the slice 1 processing unit 153 to read the coefficient data of slice 1 from the storage unit 152. Let it begin.

また、その1つ下のマクロブロックラインの係数データの書き込みが開始されたと判定すると、スライス検出部162は、スライス2処理部154も動作させ、記憶部152からのスライス2の係数データの読み出しも開始させる。   If it is determined that the writing of the coefficient data of the next lower macroblock line is started, the slice detection unit 162 also operates the slice 2 processing unit 154 to read the coefficient data of slice 2 from the storage unit 152. Let it begin.

記憶部152は、例えばRAM(Random Access Memory)やフラッシュメモリ等の半導体メモリやハードディスク等、任意の記録媒体を有し、係数データやマクロブロックラインの先頭アドレス等の情報を記憶する。基本的に、スライス1処理部153およびスライス2処理部154が行う算術符号化処理(CABAC)は、負荷が大きく、処理時間が長い。また処理速度が変化する。したがって、記憶部152が供給される係数データをバッファリングすることで、オーバフローやアンダーフローの発生を抑制することができる。   The storage unit 152 includes an arbitrary recording medium such as a semiconductor memory such as a RAM (Random Access Memory) and a flash memory, and a hard disk, and stores information such as coefficient data and the head address of the macroblock line. Basically, the arithmetic coding process (CABAC) performed by the slice 1 processing unit 153 and the slice 2 processing unit 154 has a heavy load and a long processing time. In addition, the processing speed changes. Therefore, by buffering the coefficient data supplied to the storage unit 152, occurrence of overflow or underflow can be suppressed.

スライス1処理部153は、記憶部152からスライス1の係数データを読み出し、CABACを行う。スライス1処理部153は、読み出し制御部171、マクロブロックラインメモリ172、コンテキスト算出部173、2値化部174、および算術符号化部175を有する。   The slice 1 processing unit 153 reads the coefficient data of slice 1 from the storage unit 152 and performs CABAC. The slice 1 processing unit 153 includes a read control unit 171, a macro block line memory 172, a context calculation unit 173, a binarization unit 174, and an arithmetic coding unit 175.

読み出し制御部171は、記憶部152の係数データが記憶されている領域とは別の領域に書き込まれたマクロブロックラインの先頭アドレスを参照し、記憶部152からスライス1の係数データをマクロブロック毎に読み出す。読み出し制御部171は、係数データを、スライス1の1番下のマクロブロックラインから優先的に読み出す。読み出し制御部171は、読み出した係数データをマクロブロックラインメモリ172に記憶させるとともに、2値化部174に供給する。   The read control unit 171 refers to the start address of the macroblock line written in an area different from the area where the coefficient data of the storage unit 152 is stored, and reads the coefficient data of slice 1 from the storage unit 152 for each macroblock. Read to. The read control unit 171 reads the coefficient data preferentially from the bottom macroblock line of slice 1. The read control unit 171 stores the read coefficient data in the macroblock line memory 172 and supplies it to the binarization unit 174.

マクロブロックラインメモリ172は、例えばRAM(Random Access Memory)やフラッシュメモリ等の半導体メモリやハードディスク等、任意の記録媒体を有し、係数データを最大1マクロブロックライン以上記憶する。   The macro block line memory 172 includes an arbitrary recording medium such as a semiconductor memory such as a RAM (Random Access Memory) and a flash memory, and a hard disk, and stores coefficient data of at least one macro block line.

コンテキスト算出部173は、マクロブロックラインメモリ172に記憶されている係数データを用いて、処理対象マクロブロックに隣接する周辺マクロブロックの状態を求め、その周囲の状態に基づいて、発生確率テーブルと発生確率の高いシンボルを示すコンテキスト(Context)を算出し、それを算術符号化部175に供給する。   The context calculation unit 173 uses the coefficient data stored in the macroblock line memory 172 to obtain the state of the neighboring macroblock adjacent to the processing target macroblock, and based on the surrounding state, the occurrence probability table and the occurrence A context (Context) indicating a symbol with a high probability is calculated and supplied to the arithmetic encoding unit 175.

2値化部174は、読み出し制御部171から供給される係数データ(多値データ)を2値化し、その2値化されたデータ(2値データ)を算術符号化部175に供給する。   The binarization unit 174 binarizes the coefficient data (multi-value data) supplied from the read control unit 171 and supplies the binarized data (binary data) to the arithmetic encoding unit 175.

算術符号化部175は、2値化部174から供給される2値データを、コンテキスト算出部173から供給されるコンテキストに従って2値算術符号化する。算術符号化部175は、得られた符号化データを蓄積バッファ107に供給し、蓄積させる。   The arithmetic encoding unit 175 performs binary arithmetic encoding on the binary data supplied from the binarizing unit 174 according to the context supplied from the context calculating unit 173. The arithmetic encoding unit 175 supplies the obtained encoded data to the accumulation buffer 107 and accumulates it.

スライス2処理部154は、記憶部152から主にスライス2の係数データを読み出し、CABACを行う。スライス2処理部154は、基本的にスライス1処理部153と同様の構成を有する。すなわち、スライス2処理部154は、読み出し制御部181、マクロブロックラインメモリ182、コンテキスト算出部183、2値化部184、および算術符号化部185を有する。   The slice 2 processing unit 154 mainly reads the coefficient data of slice 2 from the storage unit 152 and performs CABAC. The slice 2 processing unit 154 basically has the same configuration as the slice 1 processing unit 153. That is, the slice 2 processing unit 154 includes a read control unit 181, a macroblock line memory 182, a context calculation unit 183, a binarization unit 184, and an arithmetic coding unit 185.

読み出し制御部181は、読み出し制御部171と同様の構成を有し、同様の処理を行う。マクロブロックラインメモリ182は、マクロブロックラインメモリ172と同様の構成を有し、同様の処理を行う。コンテキスト算出部183は、コンテキスト算出部173と同様の構成を有し、同様の処理を行う。2値化部184は、2値化部174と同様の構成を有し、同様の処理を行う。算術符号化部185は、算術符号化部175と同様の構成を有し、同様の処理を行う。   The read control unit 181 has the same configuration as the read control unit 171 and performs the same processing. The macro block line memory 182 has the same configuration as the macro block line memory 172 and performs the same processing. The context calculation unit 183 has the same configuration as the context calculation unit 173 and performs the same processing. The binarization unit 184 has the same configuration as the binarization unit 174 and performs the same processing. The arithmetic encoding unit 185 has the same configuration as the arithmetic encoding unit 175 and performs the same processing.

ただし、スライス2の場合、マクロブロックの処理順や参照方向がスライス1の場合と異なる。   However, in the case of slice 2, the processing order and reference direction of macroblocks are different from the case of slice 1.

[符号化手順]
図4は、本発明の処理進行方向および参照方向の例を説明する図である。
[Encoding procedure]
FIG. 4 is a diagram for explaining an example of the processing progress direction and the reference direction of the present invention.

1画像(1ピクチャ若しくは1フィールド)分のCABACは、図4Aに示される矢印のような順序で行われる。つまり、画像は上下方向に並ぶ複数のエントロピスライス(大領域)に分割され、各エントロピスライスを行列方向に分割するマクロブロック(小領域)毎にCABAC(符号化)が行われる。   CABAC for one image (one picture or one field) is performed in the order shown by the arrows in FIG. 4A. That is, the image is divided into a plurality of entropy slices (large areas) arranged in the vertical direction, and CABAC (encoding) is performed for each macroblock (small area) that divides each entropy slice in the matrix direction.

スライス1では、係数データは、図4Aの点線矢印に示されるように、一番下のマクロブロックライン(小領域行)が最初に符号化され、次に1つ上のマクロブロックラインが符号化される。このように処理対象が1行ずつ上のマクロブロックラインに移動し、最後に一番上のマクロブロックラインが符号化される。   In slice 1, the coefficient data is encoded with the bottom macroblock line (small area row) first, and then the next higher macroblock line, as shown by the dotted arrows in FIG. 4A. Is done. In this way, the processing target moves to the upper macroblock line line by line, and finally the uppermost macroblock line is encoded.

各マクロブロックライン内においては、図4Aの実線矢印に示されるように、従来の場合と同様に、左端のマクロブロックが最初に符号化され、次に1つ右のマクロブロックが符号化される。このように処理対象が1つずつ右のマクロブロックに移動し、最後に右端のマクロブロックが符号化される。   Within each macroblock line, as shown by the solid line arrow in FIG. 4A, the leftmost macroblock is encoded first, and then the right macroblock is encoded, as in the conventional case. . In this way, the processing target moves to the right macroblock one by one, and finally the rightmost macroblock is encoded.

係数データは、図1Aの矢印に示されるように、画像の上のマクロブロックラインから下のマクロブロックラインに向かう順に、マクロブロック毎に記憶部152に記憶される。つまり、スライス1の一番下のマクロブロックラインの一番左のマクロブロックの係数データが記憶部152に書き込まれると、スライス1のCABACが開始される。   The coefficient data is stored in the storage unit 152 for each macroblock in order from the upper macroblock line to the lower macroblock line in the image, as indicated by the arrow in FIG. 1A. That is, when the coefficient data of the leftmost macroblock of the bottommost macroblock line of slice 1 is written into the storage unit 152, CABAC of slice 1 is started.

従来のCABACの場合、図1Cに示されるように、処理対象マクロブロック(curr)の1つ左のマクロブロック(mbA)と、1つ上のマクロブロック(mbB)が周辺マクロブロックとして参照される。しかしながら、このスライス1の場合、図4Bに示されるように、処理対象マクロブロック(curr)の1つ左のマクロブロック(mbA)と、1つ下のマクロブロック(mbB’)が周辺マクロブロックとして参照される。   In the case of the conventional CABAC, as shown in FIG. 1C, the macroblock (mbA) one left of the processing target macroblock (curr) and the macroblock (mbB) one level above are referred to as peripheral macroblocks. . However, in the case of this slice 1, as shown in FIG. 4B, the macroblock (mbA) that is one left of the processing target macroblock (curr) and the macroblock (mbB ′) that is one lower are used as the peripheral macroblocks. Referenced.

ただし、最初に符号化される一番下のマクロブロックラインの1つ下のマクロブロックラインは、スライス2のマクロブロックラインであるので、図4Cに示されるように、参照不可能である。この場合、参照方向は異なるが、従来のCABACの一番上のマクロブロックラインの場合と同様に処理される。   However, since the macroblock line immediately below the lowest macroblock line encoded first is the macroblock line of slice 2, as shown in FIG. 4C, reference is impossible. In this case, although the reference direction is different, processing is performed in the same manner as in the case of the top macroblock line of the conventional CABAC.

また、図4Cに示されるように、処理対象が画面左端のマクロブロックの場合、その1つ左のマクロブロック(mbA)は、参照不可能である。この場合、従来のCABACの場合と同様に処理される。   Also, as shown in FIG. 4C, when the processing target is the macroblock at the left end of the screen, the macroblock (mbA) on the left side cannot be referred to. In this case, the processing is the same as in the case of the conventional CABAC.

これに対してスライス2では、図4Aの矢印に示されるように、従来の場合と同様に符号化が進められる。つまり、係数データは、図4Aの点線矢印に示されるように、一番上のマクロブロックラインが最初に符号化され、次に1つ下のマクロブロックラインが符号化される。このように処理対象が1つずつ下のマクロブロックラインに移動し、最後に一番下のマクロブロックラインが符号化される。   On the other hand, in the slice 2, as shown by the arrow in FIG. 4A, the encoding proceeds as in the conventional case. That is, in the coefficient data, as indicated by a dotted arrow in FIG. 4A, the uppermost macroblock line is encoded first, and then the next lower macroblock line is encoded. In this way, the processing target moves to the lower macroblock line one by one, and finally the lowermost macroblock line is encoded.

各マクロブロックライン内においては、図4Aの実線矢印に示されるように、左端のマクロブロックが最初に符号化され、次に1つ右のマクロブロックが符号化される。このように処理対象が1つずつ右のマクロブロックに移動し、最後に右端のマクロブロックが符号化される。   Within each macroblock line, as shown by the solid arrows in FIG. 4A, the leftmost macroblock is first encoded, and then the rightmost macroblock is encoded. In this way, the processing target moves to the right macroblock one by one, and finally the rightmost macroblock is encoded.

このスライス2の場合、周辺マクロブロックの参照方向は、図4Dに示されるように、従来の場合と同様であり、処理対象マクロブロック(curr)の1つ左のマクロブロック(mbA)と、1つ上のマクロブロック(mbB)が周辺マクロブロックとして参照される。   In the case of this slice 2, as shown in FIG. 4D, the reference direction of the neighboring macroblocks is the same as in the conventional case, and the macroblock (mbA) one left of the processing target macroblock (curr) and 1 The upper macroblock (mbB) is referred to as the peripheral macroblock.

したがって、スライス2のCABACは、スライス2の一番上のマクロブロックラインの一番左のマクロブロックの係数データが記憶部152に書き込まれた時点で開始することができる。つまり、スライス2のCABACは、スライス1のCABACの終了を待たずに開始することができる。例えば、スライス1のCABACと並行してスライス2のCABACを実行することができる。   Therefore, the CABAC of slice 2 can be started when the coefficient data of the leftmost macroblock of the topmost macroblock line of slice 2 is written in the storage unit 152. That is, the CABAC of slice 2 can be started without waiting for the completion of CABAC of slice 1. For example, CABAC of slice 2 can be executed in parallel with CABAC of slice 1.

スライス1のCABACは、スライス2の係数データを参照しない。また、後述するように、スライス2の一番上のマクロブロックラインについては、スライス1の一番下のマクロブロックラインが参照されるが、このスライス1の係数データは、スライス2のCABACが開始された時点で記憶部152に存在する。したがって、スライス1のCABACと、スライス2のCABACとは互いに処理の待ち合わせ等を必要とせずに、互いに独立して処理を進めることができる。   The CABAC of slice 1 does not refer to the coefficient data of slice 2. As will be described later, for the top macroblock line of slice 2, the bottom macroblock line of slice 1 is referred to, but the coefficient data of slice 1 starts CABAC of slice 2 Is present in the storage unit 152. Accordingly, the CABAC of slice 1 and the CABAC of slice 2 can proceed independently of each other without requiring processing waiting or the like.

これにより、可逆符号化部106は、符号化処理のスループットを向上させることができる。換言すれば、可逆符号化部106は、より高速に符号化を行うことができる。   Thereby, the lossless encoding part 106 can improve the throughput of an encoding process. In other words, the lossless encoding unit 106 can perform encoding at higher speed.

また、上述したように、スライス2の一番上のマクロブロックラインのCABAC時に参照される、その1つ上のマクロブロックラインは、スライス1の一番下のマクロブロックラインであり、既に記憶部152に記憶されている。したがって、図4Dに示されるように、スライス2のCABACの場合、最初のマクロブロックライン、つまり、一番上のマクロブロックラインの符号化において、1つ上のマクロブロック(mbB)を参照することができる。   In addition, as described above, the macroblock line on the top that is referred to at the time of CABAC of the top macroblock line in slice 2 is the bottom macroblock line in slice 1 and has already been stored in the storage unit. 152 is stored. Therefore, as shown in FIG. 4D, in the case of slice 2 CABAC, refer to the upper macroblock (mbB) in the encoding of the first macroblock line, ie, the topmost macroblock line. Can do.

より具体的には、スライス2処理部154の読み出し制御部181は、スライス2の一番上のマクロブロックラインの係数データを処理対象として読み出す前に、スライス1の一番下のマクロブロックラインを読み出し、マクロブロックラインメモリ182に保持させる。   More specifically, the read control unit 181 of the slice 2 processing unit 154 reads the lowermost macroblock line of the slice 1 before reading the coefficient data of the uppermost macroblock line of the slice 2 as a processing target. Read and hold in the macroblock line memory 182.

コンテキスト算出部183は、算術符号化部185が行う、スライス2の一番上のマクロブロックラインの係数データに対する算術符号化処理に対して、マクロブロックラインメモリ182に記憶されているスライス1の一番下のマクロブロックラインの係数データ等を用いて周辺マクロブロックのコンテキストを算出し、提供する。   The context calculation unit 183 performs one of the slices 1 stored in the macroblock line memory 182 for the arithmetic coding process performed on the coefficient data of the top macroblock line of the slice 2 performed by the arithmetic coding unit 185. The peripheral macroblock context is calculated and provided using coefficient data of the bottom macroblock line.

算術符号化部185は、そのコンテキストを用いて、スライス2の一番上のマクロブロックラインの係数データに対する算術符号化処理を行う。   The arithmetic encoding unit 185 performs arithmetic encoding processing on the coefficient data of the top macroblock line of slice 2 using the context.

このように、エントロピスライス境界においても周辺マクロブロックを参照することができるので、可逆符号化部106は、画像分割(マルチスライス化)による符号化効率の低減を抑制させることができる。   As described above, since the neighboring macroblocks can be referenced even at the entropy slice boundary, the lossless encoding unit 106 can suppress a reduction in encoding efficiency due to image division (multi-slicing).

[符号化処理]
次に、以上のような画像符号化装置100により実行される各処理の流れについて説明する。最初に、図5のフローチャートを参照して、符号化処理の流れの例を説明する。
[Encoding process]
Next, the flow of each process executed by the image encoding device 100 as described above will be described. First, an example of the flow of the encoding process will be described with reference to the flowchart of FIG.

ステップS101において、A/D変換部101は入力された画像をA/D変換する。ステップS102において、画面並べ替えバッファ102は、A/D変換部101から供給された画像を記憶し、各ピクチャの表示する順番から符号化する順番への並べ替えを行う。   In step S101, the A / D conversion unit 101 performs A / D conversion on the input image. In step S102, the screen rearrangement buffer 102 stores the image supplied from the A / D conversion unit 101, and rearranges the picture from the display order to the encoding order.

ステップS103において、イントラ予測部114および動き予測補償部115は、それぞれ画像の予測処理を行う。すなわち、ステップS103において、イントラ予測部114は、イントラ予測モードのイントラ予測処理を行う。動き予測補償部115は、インター予測モードの動き予測補償処理を行う。   In step S103, the intra prediction unit 114 and the motion prediction / compensation unit 115 each perform image prediction processing. That is, in step S103, the intra prediction unit 114 performs an intra prediction process in the intra prediction mode. The motion prediction / compensation unit 115 performs motion prediction / compensation processing in the inter prediction mode.

ステップS104において、選択部116は、イントラ予測部114および動き予測補償部115から出力された各コスト関数値に基づいて、最適予測モードを決定する。つまり、選択部116は、イントラ予測部114により生成された予測画像と、動き予測補償部115により生成された予測画像のいずれか一方を選択する。   In step S104, the selection unit 116 determines the optimal prediction mode based on the cost function values output from the intra prediction unit 114 and the motion prediction compensation unit 115. That is, the selection unit 116 selects either the prediction image generated by the intra prediction unit 114 or the prediction image generated by the motion prediction / compensation unit 115.

また、この予測画像の選択情報は、イントラ予測部114または動き予測補償部115に供給される。最適イントラ予測モードの予測画像が選択された場合、イントラ予測部114は、最適イントラ予測モードを示す情報(すなわち、イントラ予測モード情報)を、可逆符号化部106に供給する。   The prediction image selection information is supplied to the intra prediction unit 114 or the motion prediction / compensation unit 115. When the prediction image of the optimal intra prediction mode is selected, the intra prediction unit 114 supplies information indicating the optimal intra prediction mode (that is, intra prediction mode information) to the lossless encoding unit 106.

最適インター予測モードの予測画像が選択された場合、動き予測補償部115は、最適インター予測モードを示す情報と、必要に応じて、最適インター予測モードに応じた情報を可逆符号化部106に出力する。最適インター予測モードに応じた情報としては、動きベクトル情報やフラグ情報、参照フレーム情報などがあげられる。   When the prediction image of the optimal inter prediction mode is selected, the motion prediction / compensation unit 115 outputs information indicating the optimal inter prediction mode and, if necessary, information corresponding to the optimal inter prediction mode to the lossless encoding unit 106. To do. Information according to the optimal inter prediction mode includes motion vector information, flag information, reference frame information, and the like.

ステップS105において、演算部103は、ステップS102で並び替えられた画像と、ステップS103の予測処理により得られた予測画像との差分を演算する。予測画像は、インター予測する場合は動き予測補償部115から、イントラ予測する場合はイントラ予測部114から、それぞれ選択部116を介して演算部103に供給される。   In step S105, the calculation unit 103 calculates a difference between the image rearranged in step S102 and the predicted image obtained by the prediction process in step S103. The predicted image is supplied from the motion prediction / compensation unit 115 in the case of inter prediction and from the intra prediction unit 114 in the case of intra prediction to the calculation unit 103 via the selection unit 116.

差分データは元の画像データに較べてデータ量が低減される。したがって、画像をそのまま符号化する場合に較べて、データ量を圧縮することができる。   The data amount of the difference data is reduced compared to the original image data. Therefore, the data amount can be compressed as compared with the case where the image is encoded as it is.

ステップS106において、直交変換部104は演算部103から供給された差分情報を直交変換する。具体的には、離散コサイン変換、カルーネン・レーベ変換等の直交変換が行われ、変換係数が出力される。ステップS107において、量子化部105は変換係数を量子化する。   In step S <b> 106, the orthogonal transform unit 104 performs orthogonal transform on the difference information supplied from the calculation unit 103. Specifically, orthogonal transformation such as discrete cosine transformation and Karhunen-Loeve transformation is performed, and transformation coefficients are output. In step S107, the quantization unit 105 quantizes the transform coefficient.

ステップS108において、可逆符号化部106は量子化部105から出力された量子化された変換係数を符号化する。すなわち、差分画像(インターの場合、2次差分画像)に対して、算術符号化等の可逆符号化が行われる。符号化処理の詳細については後述する。   In step S108, the lossless encoding unit 106 encodes the quantized transform coefficient output from the quantization unit 105. That is, lossless encoding such as arithmetic encoding is performed on the difference image (secondary difference image in the case of Inter). Details of the encoding process will be described later.

なお、可逆符号化部106は、ステップS104の処理により選択された予測画像の予測モードに関する情報を符号化し、差分画像を符号化して得られる符号化データのヘッダ情報に付加する。   The lossless encoding unit 106 encodes information related to the prediction mode of the prediction image selected by the process of step S104, and adds the information to the header information of the encoded data obtained by encoding the difference image.

つまり、可逆符号化部106は、イントラ予測部114から供給されるイントラ予測モード情報、または、動き予測補償部115から供給される最適インター予測モードに応じた情報なども符号化し、ヘッダ情報に付加する。   That is, the lossless encoding unit 106 encodes the intra prediction mode information supplied from the intra prediction unit 114 or the information corresponding to the optimal inter prediction mode supplied from the motion prediction compensation unit 115, and adds the information to the header information. To do.

ステップS109において蓄積バッファ107は、可逆符号化部106から出力される符号化データを蓄積する。蓄積バッファ107に蓄積された符号化データは、適宜読み出され、伝送路を介して復号側に伝送される。   In step S109, the accumulation buffer 107 accumulates encoded data output from the lossless encoding unit 106. The encoded data stored in the storage buffer 107 is appropriately read out and transmitted to the decoding side via the transmission path.

ステップS110においてレート制御部117は、蓄積バッファ107に蓄積された圧縮画像に基づいて、オーバーフローあるいはアンダーフローが発生しないように、量子化部105の量子化動作のレートを制御する。   In step S <b> 110, the rate control unit 117 controls the quantization operation rate of the quantization unit 105 based on the compressed image stored in the storage buffer 107 so that overflow or underflow does not occur.

また、ステップS107の処理により量子化された差分情報は、次のようにして局部的に復号される。すなわち、ステップS111において、逆量子化部108は量子化部105により量子化された変換係数を量子化部105の特性に対応する特性で逆量子化する。ステップS112において、逆直交変換部109は、逆量子化部108により逆量子化された変換係数を直交変換部104の特性に対応する特性で逆直交変換する。   Further, the difference information quantized by the process of step S107 is locally decoded as follows. That is, in step S <b> 111, the inverse quantization unit 108 inversely quantizes the transform coefficient quantized by the quantization unit 105 with characteristics corresponding to the characteristics of the quantization unit 105. In step S <b> 112, the inverse orthogonal transform unit 109 performs inverse orthogonal transform on the transform coefficient inversely quantized by the inverse quantization unit 108 with characteristics corresponding to the characteristics of the orthogonal transform unit 104.

ステップS113において、演算部110は、選択部116を介して入力される予測画像を局部的に復号された差分情報に加算し、局部的に復号された画像(演算部103への入力に対応する画像)を生成する。ステップS114においてデブロックフィルタ111は、演算部110から出力された画像をフィルタリングする。これによりブロック歪みが除去される。ステップS115においてフレームメモリ112は、フィルタリングされた画像を記憶する。なお、フレームメモリ112にはデブロックフィルタ111によりフィルタ処理されていない画像も演算部110から供給され、記憶される。   In step S113, the calculation unit 110 adds the predicted image input via the selection unit 116 to the locally decoded difference information, and corresponds to the locally decoded image (corresponding to the input to the calculation unit 103). Image). In step S <b> 114, the deblocking filter 111 filters the image output from the calculation unit 110. Thereby, block distortion is removed. In step S115, the frame memory 112 stores the filtered image. It should be noted that an image that has not been filtered by the deblocking filter 111 is also supplied from the computing unit 110 and stored in the frame memory 112.

[可逆符号化処理]
次に、図6のフローチャートを参照して、図5のステップS108において実行される可逆符号化処理の流れの例を説明する。
[Lossless encoding process]
Next, an example of the flow of lossless encoding processing executed in step S108 of FIG. 5 will be described with reference to the flowchart of FIG.

可逆符号化処理が開始されると、ステップS131において、記憶部152は、マクロブロック検出部161を介して供給されるマクロブロック毎の係数データを記憶する。ステップS132において、記憶部152は、マクロブロック検出部161により検出されたマクロブロックラインの先頭アドレスを、係数データとは異なる領域に記憶する。   When the lossless encoding process is started, in step S131, the storage unit 152 stores the coefficient data for each macroblock supplied via the macroblock detection unit 161. In step S132, the storage unit 152 stores the head address of the macroblock line detected by the macroblock detection unit 161 in a region different from the coefficient data.

ステップS133において、スライス検出部162は、記憶部152に記憶されたマクロブロックがエントロピスライスの境界のマクロブロックであるか否かを判定し、エントロピスライスの境界であると判定された場合、処理をステップS134に進める。   In step S133, the slice detection unit 162 determines whether or not the macroblock stored in the storage unit 152 is a macroblock at the boundary of the entropy slice. If it is determined that the macroblock is at the boundary of the entropy slice, the process is performed. Proceed to step S134.

ステップS134において、スライス検出部162は、スライス1の一番下のマクロブロックラインの一番左のマクロブロックが記憶部152に書き込まれた時点で、スライス1処理部153を制御し、スライス1の下方から上方に向かう符号化(後述するスライス1符号化処理)を開始させる。つまり、スライス検出部162は、スライス1処理部153に、図4を参照して説明したようにスライス1の下から上に向かう順序でCABACを別タスクとして実行させる。   In step S134, the slice detection unit 162 controls the slice 1 processing unit 153 at the time when the leftmost macroblock of the bottom macroblock line of slice 1 is written in the storage unit 152. Encoding from below to above (slice 1 encoding processing described later) is started. That is, the slice detection unit 162 causes the slice 1 processing unit 153 to execute CABAC as another task in the order from the bottom to the top of the slice 1 as described with reference to FIG.

ステップS135において、スライス検出部162は、スライス2の一番上のマクロブロックラインの一番左のマクロブロックが記憶部152に書き込まれた時点で、スライス2処理部154を制御し、スライス2の上方から下方に向かう符号化(後述するスライス2符号化処理)を開始させる。つまり、スライス検出部162は、スライス2処理部154に、図4を参照して説明したようにスライス2の上から下に向かう順序でCABACを別タスクとして実行させる。   In step S <b> 135, the slice detection unit 162 controls the slice 2 processing unit 154 when the leftmost macroblock of the topmost macroblock line of slice 2 is written in the storage unit 152. Encoding from above to below (slice 2 encoding processing described later) is started. That is, the slice detection unit 162 causes the slice 2 processing unit 154 to execute CABAC as another task in the order from the top to the bottom of the slice 2 as described with reference to FIG.

スライス1に対するCABACおよびスライス2に対するCABACを開始させると、スライス検出部162は、処理をステップS136に進める。また、ステップS133において、スライスの境界でないと判定された場合、スライス検出部162は、処理をステップS136に進める。   When CABAC for slice 1 and CABAC for slice 2 are started, the slice detector 162 advances the process to step S136. When it is determined in step S133 that the boundary is not a slice boundary, the slice detection unit 162 advances the process to step S136.

ステップS136において、マクロブロック検出部161は、画像(ピクチャ若しくはフィールド)内の全てのマクロブロックを処理したか否かを判定し、未処理のマクロブロックが存在すると判定された場合、処理をステップS131に戻し、次に供給されるマクロブロックに対して、それ以降の処理を繰り返す。   In step S136, the macroblock detection unit 161 determines whether all the macroblocks in the image (picture or field) have been processed. If it is determined that there is an unprocessed macroblock, the process is performed in step S131. And the subsequent processing is repeated for the next supplied macroblock.

また、ステップS136において、全てのマクロブロックを処理したと判定された場合、マクロブロック検出部161は、可逆符号化処理を終了し、図5のステップS108に処理を戻し、ステップS109に処理を進める。   If it is determined in step S136 that all macroblocks have been processed, the macroblock detection unit 161 ends the lossless encoding process, returns the process to step S108 in FIG. 5, and advances the process to step S109. .

[スライス1符号化処理]
次に、図7のフローチャートを参照して、スライス1処理部153により実行されるスライス1符号化処理の流れの例を説明する。
[Slice 1 encoding process]
Next, an example of the flow of slice 1 encoding processing executed by the slice 1 processing unit 153 will be described with reference to the flowchart of FIG.

図6のステップS134の処理が実行され、スライス1符号化処理が開始されると、スライス1処理部153の読み出し制御部171は、ステップS151において、スライス1の最後のマクロブロックラインの係数データを読み出す。ステップS152において、マクロブロックラインメモリ172は、ステップS151において読み出されたマクロブロックラインの係数データを記憶する。   When the process of step S134 of FIG. 6 is executed and the slice 1 encoding process is started, the read control unit 171 of the slice 1 processing unit 153 obtains the coefficient data of the last macroblock line of the slice 1 in step S151. read out. In step S152, the macro block line memory 172 stores the coefficient data of the macro block line read in step S151.

ステップS153において、2値化部174は、ステップS151において読み出されたマクロブロックラインの係数データを2値化する。ステップS154において、算術符号化部175は、下側のマクロブロックラインを参照せずに算術符号化を行う。   In step S153, the binarizing unit 174 binarizes the coefficient data of the macroblock line read in step S151. In step S154, the arithmetic encoding unit 175 performs arithmetic encoding without referring to the lower macroblock line.

以上のようにして、スライス1の一番下のマクロブロックラインの係数データを全て符号化すると、スライス1処理部153は、処理をステップS155に進める。ステップS155において、スライス1処理部153の読み出し制御部171は、前回読み出したマクロブロックラインの1つ上のマクロブロックラインの係数データを読み出す。ステップS156において、マクロブロックラインメモリ172は、ステップS155において読み出されたマクロブロックラインの係数データを記憶する。   When all the coefficient data of the bottom macroblock line of slice 1 is encoded as described above, slice 1 processing section 153 advances the processing to step S155. In step S155, the read control unit 171 of the slice 1 processing unit 153 reads the coefficient data of the macroblock line that is one layer above the macroblock line read last time. In step S156, the macro block line memory 172 stores the coefficient data of the macro block line read in step S155.

ステップS157において、2値化部174は、ステップS155において読み出されたマクロブロックラインの係数データを2値化する。ステップS158において、コンテキスト算出部173は、1つ下側のマクロブロックラインを参照して処理対象マクロブロックのコンテキストを算出する。ステップS159において、算術符号化部175は、ステップS158において算出されたコンテキストを用いて算術符号化を行う。   In step S157, the binarization unit 174 binarizes the coefficient data of the macroblock line read in step S155. In step S158, the context calculation unit 173 calculates the context of the processing target macroblock with reference to the next lower macroblock line. In step S159, the arithmetic encoding unit 175 performs arithmetic encoding using the context calculated in step S158.

ステップS160において、読み出し制御部171は、画像(ピクチャ若しくはフィールド)内の全てのマクロブロックラインを処理したか否かを判定し、未処理のマクロブロックラインが存在する場合、処理をステップS155に戻し、それ以降の処理を繰り返す。   In step S160, the read control unit 171 determines whether or not all macroblock lines in the image (picture or field) have been processed. If there is an unprocessed macroblock line, the process returns to step S155. Repeat the subsequent processing.

ステップS155乃至ステップS160の処理が繰り返し実行され、ステップS160において、画像内の全てのマクロブロックラインを処理したと判定された場合、読み出し制御部171は、スライス1符号化処理を終了する。   When the processes in steps S155 to S160 are repeatedly executed and it is determined in step S160 that all macroblock lines in the image have been processed, the read control unit 171 ends the slice 1 encoding process.

[スライス2符号化処理]
次に、図8のフローチャートを参照して、スライス2処理部154により実行されるスライス2符号化処理の流れの例を説明する。
[Slice 2 encoding process]
Next, an example of the flow of slice 2 encoding processing executed by the slice 2 processing unit 154 will be described with reference to the flowchart of FIG.

図6のステップS135の処理が実行され、スライス2符号化処理が開始されると、スライス2処理部154の読み出し制御部181は、ステップS181において、スライス1の最後のマクロブロックラインの係数データと、スライス2の最初のマクロブロックラインの係数データを読み出す。ステップS182において、マクロブロックラインメモリ182は、ステップS181において読み出されたマクロブロックラインの係数データを記憶する。   When the process of step S135 in FIG. 6 is executed and the slice 2 encoding process is started, the read control unit 181 of the slice 2 processing unit 154 reads the coefficient data of the last macroblock line of slice 1 in step S181. The coefficient data of the first macroblock line of slice 2 is read out. In step S182, the macro block line memory 182 stores the coefficient data of the macro block line read in step S181.

ステップS183において、2値化部184は、ステップS181において読み出されたスライス2の最初のマクロブロックラインの係数データを2値化する。ステップS184において、コンテキスト算出部183は、ステップS182において記憶されたスライス1の最後のマクロブロックラインを参照して、処理対象マクロブロックのコンテキストを算出する。ステップS185において、算術符号化部185は、ステップS184において算出されたコンテキストを用いて算術符号化を行う。   In step S183, the binarizing unit 184 binarizes the coefficient data of the first macroblock line of slice 2 read in step S181. In step S184, the context calculation unit 183 refers to the last macroblock line of slice 1 stored in step S182, and calculates the context of the processing target macroblock. In step S185, the arithmetic encoding unit 185 performs arithmetic encoding using the context calculated in step S184.

以上のようにして、スライス2の一番上のマクロブロックラインの係数データを全て符号化すると、スライス2処理部154は、処理をステップS186に進める。ステップS186において、スライス2処理部154の読み出し制御部181は、前回読み出したマクロブロックラインの1つ下のマクロブロックラインの係数データを読み出す。ステップS187において、マクロブロックラインメモリ172は、ステップS186において読み出されたマクロブロックラインの係数データを記憶する。   As described above, when all the coefficient data of the top macroblock line of slice 2 are encoded, slice 2 processing section 154 advances the processing to step S186. In step S186, the read control unit 181 of the slice 2 processing unit 154 reads the coefficient data of the macroblock line immediately below the macroblock line read last time. In step S187, the macroblock line memory 172 stores the coefficient data of the macroblock line read in step S186.

ステップS188において、2値化部184は、ステップS186において読み出されたマクロブロックラインの係数データを2値化する。ステップS189において、コンテキスト算出部183は、1つ上側のマクロブロックラインを参照して処理対象マクロブロックのコンテキストを算出する。ステップS190において、算術符号化部185は、ステップS189において算出されたコンテキストを用いて算術符号化を行う。   In step S188, the binarizing unit 184 binarizes the coefficient data of the macroblock line read in step S186. In step S189, the context calculation unit 183 calculates the context of the processing target macroblock with reference to the upper macroblock line. In step S190, the arithmetic encoding unit 185 performs arithmetic encoding using the context calculated in step S189.

ステップS191において、読み出し制御部181は、画像(ピクチャ若しくはフィールド)内の全てのマクロブロックラインを処理したか否かを判定し、未処理のマクロブロックラインが存在する場合、処理をステップS186に戻し、それ以降の処理を繰り返す。   In step S191, the read control unit 181 determines whether all the macroblock lines in the image (picture or field) have been processed. If there is an unprocessed macroblock line, the process returns to step S186. Repeat the subsequent processing.

ステップS186乃至ステップS191の処理が繰り返し実行され、ステップS191において、画像内の全てのマクロブロックラインを処理したと判定された場合、読み出し制御部181は、スライス2符号化処理を終了する。   When the processes in steps S186 to S191 are repeatedly executed and it is determined in step S191 that all macroblock lines in the image have been processed, the read control unit 181 ends the slice 2 encoding process.

以上のように可逆符号化部106は、符号化効率の低減を抑制させながら、画像符号化の高速化を実現することができる。   As described above, the lossless encoding unit 106 can realize high-speed image encoding while suppressing reduction in encoding efficiency.

<2.第2の実施の形態>
[画像復号装置]
第1の実施の形態において説明した画像符号化装置100により符号化された符号化データは、所定の伝送路を介して、画像符号化装置100に対応する画像復号装置に伝送され、復号される。
<2. Second Embodiment>
[Image decoding device]
The encoded data encoded by the image encoding device 100 described in the first embodiment is transmitted to an image decoding device corresponding to the image encoding device 100 via a predetermined transmission path and decoded. .

以下に、その画像復号装置について説明する。図9は、本発明を適用した画像復号装置の主な構成例を示すブロック図である。   Hereinafter, the image decoding apparatus will be described. FIG. 9 is a block diagram illustrating a main configuration example of an image decoding device to which the present invention has been applied.

図9に示されるように、画像復号装置200は、蓄積バッファ201、可逆復号部202、逆量子化部203、逆直交変換部204、演算部205、デブロックフィルタ206、画面並べ替えバッファ207、D/A変換部208、フレームメモリ209、選択部210、イントラ予測部211、動き予測補償部212、および選択部213を有する。   As shown in FIG. 9, the image decoding apparatus 200 includes a storage buffer 201, a lossless decoding unit 202, an inverse quantization unit 203, an inverse orthogonal transform unit 204, a calculation unit 205, a deblock filter 206, a screen rearrangement buffer 207, A D / A conversion unit 208, a frame memory 209, a selection unit 210, an intra prediction unit 211, a motion prediction compensation unit 212, and a selection unit 213 are included.

蓄積バッファ201は、伝送されてきた符号化データを蓄積する。この符号化データは、画像符号化装置100により符号化されたものである。可逆復号部202は、蓄積バッファ201から所定のタイミングで読み出された符号化データを、図2の可逆符号化部106の符号化方式に対応する方式で復号する。   The accumulation buffer 201 accumulates the transmitted encoded data. This encoded data is encoded by the image encoding device 100. The lossless decoding unit 202 decodes the encoded data read from the accumulation buffer 201 at a predetermined timing by a method corresponding to the encoding method of the lossless encoding unit 106 in FIG.

逆量子化部203は、可逆復号部202により復号されて得られた係数データを、図2の量子化部105の量子化方式に対応する方式で逆量子化する。逆量子化部203は、逆量子化された係数データを、逆直交変換部204に供給する。逆直交変換部204は、図2の直交変換部104の直交変換方式に対応する方式で、その係数データを逆直交変換し、画像符号化装置100において直交変換される前の残差データに対応する復号残差データを得る。   The inverse quantization unit 203 inversely quantizes the coefficient data obtained by decoding by the lossless decoding unit 202 by a method corresponding to the quantization method of the quantization unit 105 in FIG. The inverse quantization unit 203 supplies the inversely quantized coefficient data to the inverse orthogonal transform unit 204. The inverse orthogonal transform unit 204 is a method corresponding to the orthogonal transform method of the orthogonal transform unit 104 in FIG. 2, performs inverse orthogonal transform on the coefficient data, and corresponds to the residual data before being orthogonally transformed in the image encoding device 100. Decoding residual data to be obtained is obtained.

逆直交変換されて得られた復号残差データは、演算部205に供給される。また、演算部205には、選択部213を介して、イントラ予測部211若しくは動き予測補償部212から予測画像が供給される。   Decoded residual data obtained by the inverse orthogonal transform is supplied to the calculation unit 205. Further, a prediction image is supplied from the intra prediction unit 211 or the motion prediction compensation unit 212 to the calculation unit 205 via the selection unit 213.

演算部205は、その復号残差データと予測画像とを加算し、画像符号化装置100の演算部103により予測画像が減算される前の画像データに対応する復号画像データを得る。演算部205は、その復号画像データをデブロックフィルタ206に供給する。   The computing unit 205 adds the decoded residual data and the predicted image, and obtains decoded image data corresponding to the image data before the predicted image is subtracted by the computing unit 103 of the image encoding device 100. The arithmetic unit 205 supplies the decoded image data to the deblock filter 206.

デブロックフィルタ206は、復号された画像のブロック歪を除去した後、フレームメモリ209に供給し、蓄積させるとともに、画面並べ替えバッファ207にも供給する。   The deblocking filter 206 removes the block distortion of the decoded image, and then supplies it to the frame memory 209 for storage, and also supplies it to the screen rearrangement buffer 207.

画面並べ替えバッファ207は、画像の並べ替えを行う。すなわち、図2の画面並べ替えバッファ102により符号化の順番のために並べ替えられたフレームの順番が、元の表示の順番に並べ替えられる。D/A変換部208は、画面並べ替えバッファ207から供給された画像をD/A変換し、図示せぬディスプレイに出力し、表示させる。   The screen rearrangement buffer 207 rearranges images. That is, the order of frames rearranged for the encoding order by the screen rearrangement buffer 102 in FIG. 2 is rearranged in the original display order. The D / A conversion unit 208 D / A converts the image supplied from the screen rearrangement buffer 207, outputs it to a display (not shown), and displays it.

選択部210は、インター処理される画像と参照される画像をフレームメモリ209から読み出し、動き予測補償部212に供給する。また、選択部210は、イントラ予測に用いられる画像をフレームメモリ209から読み出し、イントラ予測部211に供給する。   The selection unit 210 reads out the inter-processed image and the referenced image from the frame memory 209 and supplies them to the motion prediction / compensation unit 212. Further, the selection unit 210 reads an image used for intra prediction from the frame memory 209 and supplies the image to the intra prediction unit 211.

イントラ予測部211には、ヘッダ情報を復号して得られたイントラ予測モードを示す情報等が可逆復号部202から適宜供給される。イントラ予測部211は、この情報に基づいて、予測画像を生成し、生成した予測画像を選択部213に供給する。   Information indicating the intra prediction mode obtained by decoding the header information is appropriately supplied from the lossless decoding unit 202 to the intra prediction unit 211. The intra prediction unit 211 generates a predicted image based on this information, and supplies the generated predicted image to the selection unit 213.

動き予測補償部212は、ヘッダ情報を復号して得られた情報(予測モード情報、動きベクトル情報、参照フレーム情報)を可逆復号部202から取得る。インター予測モードを示す情報が供給された場合、動き予測補償部212は、可逆復号部202からのインター動きベクトル情報に基づいて、予測画像を生成し、生成した予測画像を選択部213に供給する。   The motion prediction / compensation unit 212 acquires information (prediction mode information, motion vector information, reference frame information) obtained by decoding the header information from the lossless decoding unit 202. When the information indicating the inter prediction mode is supplied, the motion prediction / compensation unit 212 generates a prediction image based on the inter motion vector information from the lossless decoding unit 202, and supplies the generated prediction image to the selection unit 213. .

選択部213は、動き予測補償部212またはイントラ予測部211により生成された予測画像を選択し、演算部205に供給する。   The selection unit 213 selects the prediction image generated by the motion prediction / compensation unit 212 or the intra prediction unit 211 and supplies the selected prediction image to the calculation unit 205.

[可逆復号部]
図10は、図9の可逆復号部202の主な構成例を示すブロック図である。
[Reversible decoding unit]
FIG. 10 is a block diagram illustrating a main configuration example of the lossless decoding unit 202 of FIG.

図10に示されるように可逆復号部202は、デマルチプレクサ251、スライス1処理部252、スライス2処理部253、記憶部254、および読み出し制御部255を有する。   As shown in FIG. 10, the lossless decoding unit 202 includes a demultiplexer 251, a slice 1 processing unit 252, a slice 2 processing unit 253, a storage unit 254, and a read control unit 255.

デマルチプレクサ251は、蓄積バッファ201から供給された符号化データが属するエントロピスライス(スライス1かスライス2か)を識別し、そのエントロピスライスによって符号化データの供給先を制御する。   The demultiplexer 251 identifies the entropy slice (slice 1 or slice 2) to which the encoded data supplied from the accumulation buffer 201 belongs, and controls the supply destination of the encoded data by the entropy slice.

図2の画像符号化装置100により生成されたビットストリームは、エントロピスライス毎に独立したストリームとして多重化されている。蓄積バッファ201からは、その多重化されたストリームが供給される。   The bit stream generated by the image encoding device 100 in FIG. 2 is multiplexed as an independent stream for each entropy slice. The multiplexed stream is supplied from the accumulation buffer 201.

例えば、デマルチプレクサ251は、スライス1に属する符号化データの場合、スライス1処理部252に供給する。また、例えば、デマルチプレクサ251は、スライス2に属する符号化データの場合、スライス2処理部253に供給する。   For example, the demultiplexer 251 supplies the encoded data belonging to the slice 1 to the slice 1 processing unit 252. For example, in the case of encoded data belonging to slice 2, the demultiplexer 251 supplies the slice 2 processing unit 253 with it.

スライス1処理部252は、スライス1に属する符号化データを算術復号する。画像符号化装置100において、スライス1の各マクロブロックは、画像の左から右、下から上の順に符号化されている。また、参照する周辺ブロックは、処理対象マクロブロックの1つ左のマクロブロックと1つ下のマクロブロックである。復号処理もこれと同様の処理順および参照方向で行われる。   The slice 1 processing unit 252 performs arithmetic decoding on the encoded data belonging to the slice 1. In the image encoding device 100, each macroblock of slice 1 is encoded in the order from left to right and from bottom to top of the image. The peripheral blocks to be referred to are a macroblock one left of the processing target macroblock and a macroblock one below. Decoding processing is also performed in the same processing order and reference direction.

スライス2処理部253は、スライス2に属する符号化データを算術復号する。画像符号化装置100において、スライス2の各マクロブロックは、画像の左から右、上から下の順に符号化されている。また、参照する周辺ブロックは、処理対象マクロブロックの1つ左のマクロブロックと1つ上のマクロブロックである。復号処理もこれと同様の処理順および参照方向で行われる。   The slice 2 processing unit 253 performs arithmetic decoding on the encoded data belonging to the slice 2. In the image encoding device 100, each macroblock of slice 2 is encoded in the order from left to right and from top to bottom of the image. In addition, the peripheral blocks to be referred to are a macroblock one left of the processing target macroblock and a macroblock one above. Decoding processing is also performed in the same processing order and reference direction.

記憶部254は、スライス1処理部252において生成された復号係数データ(多値データ)、および、スライス2処理部253において生成された復号係数データ(多値データ)を取得し、記憶する。読み出し制御部255は、記憶部254に記憶されている復号係数データを所定のタイミングに所定の順に読み出し、逆量子化部203に供給する。   The storage unit 254 acquires and stores the decoding coefficient data (multilevel data) generated by the slice 1 processing unit 252 and the decoding coefficient data (multilevel data) generated by the slice 2 processing unit 253. The read control unit 255 reads the decoded coefficient data stored in the storage unit 254 in a predetermined order at a predetermined timing, and supplies the decoded coefficient data to the inverse quantization unit 203.

なお、実際には、可逆復号部202は、供給されたビットストリームから符号化パラメータや予測モード情報等のメタデータを抽出し、それらをイントラ予測部211や動き予測補償部212に供給する。   Actually, the lossless decoding unit 202 extracts metadata such as encoding parameters and prediction mode information from the supplied bitstream, and supplies them to the intra prediction unit 211 and the motion prediction compensation unit 212.

スライス1処理部252は、算術復号部261、多値化部262、マクロブロックラインメモリ263、およびコンテキスト算出部264を有する。   The slice 1 processing unit 252 includes an arithmetic decoding unit 261, a multi-value conversion unit 262, a macroblock line memory 263, and a context calculation unit 264.

算術復号部261は、コンテキスト算出部264が算出したコンテキストを用いて符号化データを算術復号し、2値データを生成する。多値化部262は、算術復号部261から出力される2値データを多値化する。多値化部262は、生成した多値データを、復号係数データとして記憶部254に供給するとともに、マクロブロックラインメモリ263に供給する。   The arithmetic decoding unit 261 performs arithmetic decoding on the encoded data using the context calculated by the context calculation unit 264, and generates binary data. The multi-value conversion unit 262 multi-values the binary data output from the arithmetic decoding unit 261. The multi-value conversion unit 262 supplies the generated multi-value data to the storage unit 254 as decoding coefficient data and also supplies it to the macroblock line memory 263.

マクロブロックラインメモリ263は、多値化部262より供給される復号係数データを記憶する。マクロブロックラインメモリ263は、復号係数データを1マクロラインブロック分以上記憶することができる。   The macro block line memory 263 stores the decoding coefficient data supplied from the multi-value quantization unit 262. The macro block line memory 263 can store one or more macro line blocks of decoding coefficient data.

コンテキスト算出部264は、マクロブロックラインメモリ263に記憶されている復号係数データを用いて、算術復号部261による復号処理の処理対象マクロブロックに隣接する周辺マクロブロックのコンテキストを算出し、それを算術復号部261に供給する。   The context calculation unit 264 uses the decoding coefficient data stored in the macroblock line memory 263 to calculate the context of a neighboring macroblock adjacent to the processing target macroblock of the decoding process by the arithmetic decoding unit 261, and calculates the arithmetic The data is supplied to the decoding unit 261.

例えば、コンテキスト算出部264は、処理対象マクロブロックの1つ左のマクロブロックのコンテキストと、処理対象マクロブロックの1つ下のマクロブロックのコンテキストを生成する。   For example, the context calculation unit 264 generates the context of the macroblock one left of the processing target macroblock and the context of the macroblock one level lower than the processing target macroblock.

スライス2処理部253は、算術復号部271、多値化部272、マクロブロックラインメモリ273、およびコンテキスト算出部274を有する。   The slice 2 processing unit 253 includes an arithmetic decoding unit 271, a multi-value conversion unit 272, a macroblock line memory 273, and a context calculation unit 274.

算術復号部271は、コンテキスト算出部274が算出したコンテキストを用いて符号化データを算術復号し、2値データを生成する。多値化部272は、算術復号部271から出力される2値データを多値化する。多値化部272は、生成した多値データを、復号係数データとして記憶部254に供給するとともに、マクロブロックラインメモリ273に供給する。   The arithmetic decoding unit 271 arithmetically decodes the encoded data using the context calculated by the context calculation unit 274 to generate binary data. The multi-value conversion unit 272 multi-values the binary data output from the arithmetic decoding unit 271. The multi-value conversion unit 272 supplies the generated multi-value data to the storage unit 254 as decoding coefficient data and also supplies it to the macroblock line memory 273.

マクロブロックラインメモリ273は、多値化部272より供給される復号係数データを記憶する。マクロブロックラインメモリ273は、復号係数データを1マクロラインブロック分以上記憶することができる。   The macro block line memory 273 stores the decoding coefficient data supplied from the multi-value quantization unit 272. The macroblock line memory 273 can store the decoding coefficient data for one macroline block or more.

コンテキスト算出部274は、マクロブロックラインメモリ273に記憶されている復号係数データを用いて、算術復号部271による復号処理の処理対象マクロブロックに隣接する周辺マクロブロックのコンテキストを算出し、それを算術復号部271に供給する。   The context calculation unit 274 uses the decoding coefficient data stored in the macroblock line memory 273 to calculate the context of the neighboring macroblock adjacent to the processing target macroblock of the decoding process by the arithmetic decoding unit 271, and performs arithmetic The data is supplied to the decoding unit 271.

例えば、コンテキスト算出部274は、処理対象マクロブロックの1つ左のマクロブロックのコンテキストと、処理対象マクロブロックの1つ上のマクロブロックのコンテキストを生成する。   For example, the context calculation unit 274 generates the context of the macroblock one left of the processing target macroblock and the context of the macroblock immediately above the processing target macroblock.

なお、コンテキスト算出部274は、復号処理対象がスライス2の一番上のマクロブロックラインである場合、スライス1処理部252のマクロブロックラインメモリ263に記憶されているスライス1の一番下のマクロブロックラインの復号係数データを用いて、処理対象マクロブロックの1つ上のマクロブロックのコンテキストを生成する。   When the decoding target is the top macroblock line of slice 2, the context calculation unit 274 stores the bottommost macro of slice 1 stored in the macroblock line memory 263 of the slice 1 processing unit 252. Using the decoding coefficient data of the block line, a context of the macro block one level above the processing target macro block is generated.

以上のように復号処理を行うことにより、可逆復号部202は、可逆符号化部106の場合と同様の順序で処理を進め、同様の方向に周辺参照を行うので、符号化データを正しく復号することができる。   By performing the decoding process as described above, the lossless decoding unit 202 proceeds in the same order as in the case of the lossless encoding unit 106 and performs peripheral reference in the same direction, so that the encoded data is correctly decoded. be able to.

[復号処理]
次に、以上のような画像復号装置200により実行される各処理の流れについて説明する。最初に、図11のフローチャートを参照して、復号処理の流れの例を説明する。
[Decryption process]
Next, the flow of each process executed by the image decoding apparatus 200 as described above will be described. First, an example of the flow of decoding processing will be described with reference to the flowchart of FIG.

復号処理が開始されると、ステップS201において、蓄積バッファ201は伝送されてきた符号化データを蓄積する。ステップS202において、可逆復号部202は、蓄積バッファ201から供給される符号化データを復号する。すなわち、図2の可逆符号化部106により符号化されたIピクチャ、Pピクチャ、並びにBピクチャが復号される。   When the decoding process is started, in step S201, the accumulation buffer 201 accumulates the transmitted encoded data. In step S202, the lossless decoding unit 202 decodes the encoded data supplied from the accumulation buffer 201. That is, the I picture, P picture, and B picture encoded by the lossless encoding unit 106 in FIG. 2 are decoded.

このとき、動きベクトル情報、参照フレーム情報、予測モード情報(イントラ予測モード、またはインター予測モード)、およびフラグ情報等も復号される。   At this time, motion vector information, reference frame information, prediction mode information (intra prediction mode or inter prediction mode), flag information, and the like are also decoded.

すなわち、予測モード情報がイントラ予測モード情報である場合、予測モード情報は、イントラ予測部211に供給される。予測モード情報がインター予測モード情報である場合、予測モード情報と対応する動きベクトル情報は、動き予測補償部212に供給される。   That is, when the prediction mode information is intra prediction mode information, the prediction mode information is supplied to the intra prediction unit 211. When the prediction mode information is inter prediction mode information, motion vector information corresponding to the prediction mode information is supplied to the motion prediction / compensation unit 212.

ステップS203において、逆量子化部203は可逆復号部202により復号された変換係数を、図2の量子化部105の特性に対応する特性で逆量子化する。ステップS204において逆直交変換部204は逆量子化部203により逆量子化された変換係数を、図2の直交変換部104の特性に対応する特性で逆直交変換する。これにより図2の直交変換部104の入力(演算部103の出力)に対応する差分情報が復号されたことになる。   In step S203, the inverse quantization unit 203 inversely quantizes the transform coefficient decoded by the lossless decoding unit 202 with characteristics corresponding to the characteristics of the quantization unit 105 in FIG. In step S204, the inverse orthogonal transform unit 204 performs inverse orthogonal transform on the transform coefficient inversely quantized by the inverse quantization unit 203 with characteristics corresponding to the characteristics of the orthogonal transform unit 104 in FIG. As a result, the difference information corresponding to the input of the orthogonal transform unit 104 (output of the calculation unit 103) in FIG. 2 is decoded.

ステップS205において、イントラ予測部211、または動き予測補償部212は、可逆復号部202から供給される予測モード情報に対応して、それぞれ画像の予測処理を行う。   In step S <b> 205, the intra prediction unit 211 or motion prediction / compensation unit 212 performs image prediction processing corresponding to the prediction mode information supplied from the lossless decoding unit 202.

すなわち、可逆復号部202からイントラ予測モード情報が供給された場合、イントラ予測部211は、イントラ予測モードのイントラ予測処理を行う。また、可逆復号部202からインター予測モード情報が供給された場合、動き予測補償部212は、インター予測モードの動き予測処理を行う。   That is, when intra prediction mode information is supplied from the lossless decoding unit 202, the intra prediction unit 211 performs intra prediction processing in the intra prediction mode. When inter prediction mode information is supplied from the lossless decoding unit 202, the motion prediction / compensation unit 212 performs motion prediction processing in the inter prediction mode.

ステップS206において、選択部213は予測画像を選択する。すなわち、選択部213には、イントラ予測部211により生成された予測画像、若しくは、動き予測補償部212により生成された予測画像が供給される。選択部213は、そのいずれか一方を選択する。選択された予測画像は、演算部205に供給される。   In step S206, the selection unit 213 selects a predicted image. That is, the prediction image generated by the intra prediction unit 211 or the prediction image generated by the motion prediction compensation unit 212 is supplied to the selection unit 213. The selection unit 213 selects one of them. The selected prediction image is supplied to the calculation unit 205.

ステップS207において、演算部205は、ステップS204の処理により得られた差分情報に、ステップS206の処理により選択された予測画像を加算する。これにより元の画像データが復号される。   In step S207, the calculation unit 205 adds the predicted image selected by the process of step S206 to the difference information obtained by the process of step S204. As a result, the original image data is decoded.

ステップS208において、デブロックフィルタ206は、演算部205から供給された復号画像データをフィルタリングする。これによりブロック歪みが除去される。   In step S208, the deblocking filter 206 filters the decoded image data supplied from the calculation unit 205. Thereby, block distortion is removed.

ステップS209において、フレームメモリ209は、フィルタリングされた復号画像データを記憶する。   In step S209, the frame memory 209 stores the filtered decoded image data.

ステップS210において、画面並べ替えバッファ207は、復号画像データのフレームの並べ替えを行う。すなわち、復号画像データの、画像符号化装置100の画面並べ替えバッファ102(図2)により符号化のために並べ替えられたフレームの順序が、元の表示の順序に並べ替えられる。   In step S210, the screen rearrangement buffer 207 rearranges the frames of the decoded image data. That is, the order of frames of the decoded image data rearranged for encoding by the screen rearrangement buffer 102 (FIG. 2) of the image encoding device 100 is rearranged to the original display order.

ステップS211において、D/A変換部208は、画面並べ替えバッファ207においてフレームが並べ替えられた復号画像データをD/A変換する。この復号画像データが図示せぬディスプレイに出力され、その画像が表示される。   In step S211, the D / A conversion unit 208 performs D / A conversion on the decoded image data in which the frames are rearranged in the screen rearrangement buffer 207. The decoded image data is output to a display (not shown), and the image is displayed.

[可逆復号処理]
次に図12のフローチャートを参照して、図11のステップS202において実行される可逆復号処理の流れの例を説明する。
[Reversible decoding process]
Next, an example of the flow of lossless decoding processing executed in step S202 of FIG. 11 will be described with reference to the flowchart of FIG.

可逆復号処理が開始されると、デマルチプレクサ251は、ステップS231において、係数データをスライス毎に分割する。ステップS232において、デマルチプレクサ251は、スライス1の符号化データをスライス1処理部252に供給し、スライス1の下方から上方に向かう復号(スライス1復号処理)を別タスクとして開始させる。   When the lossless decoding process is started, the demultiplexer 251 divides the coefficient data for each slice in step S231. In step S232, the demultiplexer 251 supplies the encoded data of slice 1 to the slice 1 processing unit 252, and starts decoding from the lower side of slice 1 to the upper side (slice 1 decoding process) as another task.

ステップS233においてデマルチプレクサ251は、ステップS232において開始されたスライス1復号処理により、スライス1の最後の(一番下の)マクロブロックラインの復号が終了したか否かを判定し、終了したと判定されるまで待機する。スライス1の最後の(一番下の)マクロブロックラインの復号が終了したと判定された場合、デマルチプレクサ251は、処理をステップS234に進める。   In step S233, the demultiplexer 251 determines whether or not the last (bottom) macroblock line of slice 1 has been decoded by the slice 1 decoding process started in step S232, and determines that the decoding has ended. Wait until If it is determined that decoding of the last (bottom) macroblock line of slice 1 has been completed, the demultiplexer 251 advances the process to step S234.

ステップS234において、デマルチプレクサ251は、スライス2の符号化データをスライス2処理部253に供給し、スライス2の上方から下方に向かう復号(スライス2復号処理)を別タスクとして開始させる。   In step S234, the demultiplexer 251 supplies the encoded data of slice 2 to the slice 2 processing unit 253, and starts decoding from the upper side to the lower side of slice 2 (slice 2 decoding process) as another task.

ステップS235においてデマルチプレクサ251は、ステップS234において開始されたスライス2復号処理により、スライス2の全てのマクロブロックの復号が終了したか否かを判定し、終了したと判定されるまで待機する。スライス2の復号が終了したと判定された場合、デマルチプレクサ251は、可逆復号処理を終了し、処理を図11のステップS202に戻し、ステップS203に処理を進める。   In step S235, the demultiplexer 251 determines whether or not decoding of all macroblocks in the slice 2 has been completed by the slice 2 decoding process started in step S234, and waits until it is determined that the processing has been completed. If it is determined that the decoding of slice 2 has ended, the demultiplexer 251 ends the lossless decoding process, returns the process to step S202 of FIG. 11, and advances the process to step S203.

[スライス1復号処理]
次に、図12のステップS232の処理により開始されるスライス1復号処理の流れの例を図13のフローチャートを参照して説明する。
[Slice 1 decoding process]
Next, an example of the flow of the slice 1 decoding process started by the process of step S232 of FIG. 12 will be described with reference to the flowchart of FIG.

スライス1復号処理が開始されると、算術復号部261は、ステップS251において、スライス1の最後の(一番下の)マクロブロックラインの各マクロブロックについて、下側のマクロブロックラインのマクロブロックを参照せずに算術復号を行う。   When the slice 1 decoding process is started, the arithmetic decoding unit 261 calculates a macroblock of the lower macroblock line for each macroblock of the last (bottom) macroblock line of slice 1 in step S251. Performs arithmetic decoding without reference.

ステップS252において、多値化部262は、ステップS252において復号されて得られた2値の係数データを多値化し、多値データの係数データに変換する。   In step S252, the multi-value conversion unit 262 multi-values the binary coefficient data obtained by decoding in step S252, and converts the multi-value data into coefficient data.

ステップS253において、マクロブロックラインメモリ263は、以上のように生成される処理対象マクロブロックラインの係数データ(多値データ)を記憶する。スライス1の一番下のマクロブロックラインの係数データを記憶すると、マクロブロックラインメモリ263は、処理をステップS254に進める。   In step S253, the macro block line memory 263 stores the coefficient data (multi-value data) of the processing target macro block line generated as described above. When the coefficient data of the bottom macroblock line of slice 1 is stored, the macroblock line memory 263 advances the process to step S254.

ステップS254に処理が進むと、復号処理対象のマクロブロックラインが1つ上に移動する。ステップS254において、コンテキスト算出部264は、復号処理対象のマクロブロックラインだけでなく、復号処理対象のマクロブロックラインの1つ下のマクロブロックラインも参照し、コンテキストを算出する。   When the process proceeds to step S254, the decoding target macroblock line moves up by one. In step S254, the context calculation unit 264 refers to not only the macro block line to be decoded but also the macro block line immediately below the macro block line to be decoded, and calculates the context.

ステップS255において、算術復号部261は、ステップS254において生成されたコンテキストを用いて算術復号を行う。ステップS256において、多値化部262は、ステップS255において復号されて得られた2値の係数データを多値化し、多値データを生成する。   In step S255, the arithmetic decoding unit 261 performs arithmetic decoding using the context generated in step S254. In step S256, the multi-value conversion unit 262 multi-values the binary coefficient data obtained by decoding in step S255, and generates multi-value data.

ステップS257において、マクロブロックラインメモリ263は、以上のように生成される処理対象マクロブロックラインの係数データ(多値データ)を記憶する。処理対象のマクロブロックラインの係数データを記憶すると、マクロブロックラインメモリ263は、処理をステップS258に進める。   In step S257, the macro block line memory 263 stores the coefficient data (multi-value data) of the processing target macro block line generated as described above. After storing the coefficient data of the macro block line to be processed, the macro block line memory 263 advances the process to step S258.

ステップS258において、スライス1処理部252は、スライス1の全てのマクロブロックラインを処理したか否かを判定する。未処理のマクロブロックラインが存在すると判定された場合、スライス1処理部252は、処理をステップS254に戻し、前回処理対象とされたマクロブロックラインの1つ上のマクロブロックラインを処理対象とし、処理を繰り返す。   In step S258, the slice 1 processing unit 252 determines whether all the macroblock lines in the slice 1 have been processed. When it is determined that there is an unprocessed macroblock line, the slice 1 processing unit 252 returns the process to step S254, sets the macroblock line one above the macroblock line that was the previous processing target as the processing target, Repeat the process.

ステップS254乃至ステップS258の処理が繰り返し行われ、ステップS258において、全てのマクロブロックラインが処理されたと判定された場合、スライス1復号処理が終了される。   The processes in steps S254 to S258 are repeated, and if it is determined in step S258 that all macroblock lines have been processed, the slice 1 decoding process is terminated.

[スライス2復号処理]
次に、図12のステップS234の処理により開始されるスライス2復号処理の流れの例を図14のフローチャートを参照して説明する。
[Slice 2 decoding process]
Next, an example of the flow of the slice 2 decoding process started by the process of step S234 of FIG. 12 will be described with reference to the flowchart of FIG.

スライス2復号処理が開始されると、コンテキスト算出部274は、ステップS271において、処理対象であるスライス2の最初の(一番上の)マクロブロックラインの各マクロブロックについて、その処理対象のマクロブロックラインだけでなく、マクロブロックラインメモリ263に記憶されているスライス1の最後(一番下の)マクロブロックラインも参照してコンテキストを算出する。   When the slice 2 decoding process is started, in step S271, the context calculation unit 274, for each macroblock of the first (top) macroblock line of the slice 2 that is the processing target, The context is calculated by referring not only to the line but also to the last (bottom) macroblock line of slice 1 stored in the macroblock line memory 263.

ステップS272において、算術復号部271は、ステップS271において算出されたコンテキストを用いて算術復号を行う。ステップS273において、多値化部272は、ステップS272において復号されて得られた2値の係数データを多値化し、多値データの係数データに変換する。   In step S272, the arithmetic decoding unit 271 performs arithmetic decoding using the context calculated in step S271. In step S273, the multi-value conversion unit 272 multi-values the binary coefficient data obtained by decoding in step S272, and converts the multi-value data into coefficient data.

ステップS274において、マクロブロックラインメモリ273は、以上のように生成される処理対象マクロブロックラインの係数データ(多値データ)を記憶する。スライス2の一番上のマクロブロックラインの係数データを記憶すると、マクロブロックラインメモリ273は、処理をステップS275に進める。   In step S274, the macro block line memory 273 stores the coefficient data (multi-value data) of the processing target macro block line generated as described above. When the coefficient data of the top macroblock line of slice 2 is stored, the macroblock line memory 273 advances the process to step S275.

ステップS275に処理が進むと、復号処理対象のマクロブロックラインが1つ下に移動する。ステップS275において、コンテキスト算出部274は、復号処理対象のマクロブロックラインだけでなく、復号処理対象のマクロブロックラインの1つ上のマクロブロックラインも参照し、コンテキストを算出する。   When the process proceeds to step S275, the macroblock line to be decoded is moved down by one. In step S275, the context calculation unit 274 refers to not only the decoding target macroblock line but also the macroblock line immediately above the decoding target macroblock line, and calculates the context.

ステップS276において、算術復号部271は、ステップS275において生成されたコンテキストを用いて算術復号を行う。ステップS277において、多値化部272は、ステップS276において復号されて得られた2値の係数データを多値化し、多値データを生成する。   In step S276, the arithmetic decoding unit 271 performs arithmetic decoding using the context generated in step S275. In step S277, the multi-value conversion unit 272 multi-values the binary coefficient data obtained by decoding in step S276 to generate multi-value data.

ステップS278において、マクロブロックラインメモリ273は、以上のように生成される処理対象マクロブロックラインの係数データ(多値データ)を記憶する。処理対象のマクロブロックラインの係数データを記憶すると、マクロブロックラインメモリ273は、処理をステップS279に進める。   In step S278, the macro block line memory 273 stores the coefficient data (multi-value data) of the processing target macro block line generated as described above. When the coefficient data of the macro block line to be processed is stored, the macro block line memory 273 advances the process to step S279.

ステップS279において、スライス2処理部253は、スライス2の全てのマクロブロックラインを処理したか否かを判定する。未処理のマクロブロックラインが存在すると判定された場合、スライス2処理部253は、処理をステップS275に戻し、前回処理対象とされたマクロブロックラインの1つ下のマクロブロックラインを処理対象とし、処理を繰り返す。   In step S279, the slice 2 processing unit 253 determines whether all the macroblock lines in the slice 2 have been processed. When it is determined that there is an unprocessed macroblock line, the slice 2 processing unit 253 returns the process to step S275, sets the macroblock line immediately below the macroblock line that was the previous processing target as the processing target, Repeat the process.

ステップS275乃至ステップS279の処理が繰り返し行われ、ステップS279において、全てのマクロブロックラインが処理されたと判定された場合、スライス2復号処理が終了される。   The processes from step S275 to step S279 are repeated, and if it is determined in step S279 that all macroblock lines have been processed, the slice 2 decoding process is terminated.

以上のように画像復号装置200は、画像符号化装置100により符号化されて得られた符号化データを、正しく復号することができる。これにより、可逆復号部202は、符号化効率の低減を抑制させながら、画像符号化の高速化を実現することができる。   As described above, the image decoding apparatus 200 can correctly decode the encoded data obtained by the encoding by the image encoding apparatus 100. Thereby, the lossless decoding unit 202 can realize high-speed image encoding while suppressing reduction in encoding efficiency.

<3.第3の実施の形態>
[可逆符号化部の構成]
なお、以上においては、コンテキストの生成をスライス1処理部153とスライス2処理部154において行うように説明したが、これに限らず、記憶部152に記憶する前にコンテキストを生成するようにしてもよい。
<3. Third Embodiment>
[Configuration of lossless encoding unit]
In the above description, the context is generated by the slice 1 processing unit 153 and the slice 2 processing unit 154. However, the present invention is not limited to this, and the context may be generated before storing in the storage unit 152. Good.

図15は、図1の可逆符号化部106の他の構成例を示すブロック図である。   FIG. 15 is a block diagram illustrating another configuration example of the lossless encoding unit 106 of FIG.

図15に示されるように、この場合、可逆符号化部106は、図3の場合の構成に加え、コンテキスト処理部301を有する。また、可逆符号化部106は、図3の場合のスライス1処理部153の代わりにスライス1処理部303を有し、さらに、スライス2処理部154の代わりにスライス2処理部304を有する。   As shown in FIG. 15, in this case, the lossless encoding unit 106 includes a context processing unit 301 in addition to the configuration in the case of FIG. Further, the lossless encoding unit 106 includes a slice 1 processing unit 303 instead of the slice 1 processing unit 153 in the case of FIG. 3, and further includes a slice 2 processing unit 304 instead of the slice 2 processing unit 154.

コンテキスト処理部301は、量子化部105から供給される係数データからコンテキストを算出する。スライス1処理部303は、基本的にスライス1処理部153と同様の構成を有するが、コンテキスト処理部301がスライス1処理部303の外部に存在するので、マクロブロックラインメモリ172およびコンテキスト算出部173が省略される。スライス2処理部304は、基本的にスライス2処理部154と同様の構成を有するが、コンテキスト処理部301がスライス2処理部304の外部に存在するので、マクロブロックラインメモリ182およびコンテキスト算出部183が省略される。   The context processing unit 301 calculates a context from the coefficient data supplied from the quantization unit 105. The slice 1 processing unit 303 basically has the same configuration as that of the slice 1 processing unit 153, but since the context processing unit 301 exists outside the slice 1 processing unit 303, the macroblock line memory 172 and the context calculation unit 173 Is omitted. The slice 2 processing unit 304 basically has the same configuration as the slice 2 processing unit 154, but the context processing unit 301 exists outside the slice 2 processing unit 304, so that the macroblock line memory 182 and the context calculation unit 183 are included. Is omitted.

コンテキスト処理部301は、マクロブロックラインメモリ311とコンテキスト算出部312を有する。マクロブロックラインメモリ311は、マクロブロックラインメモリ172やマクロブロックラインメモリ182と基本的に同様であり、量子化部105から供給される係数データを記憶する。なお、スライス1の参照方向は従来と逆向きであり、処理対象マクロブロックの1つ下のマクロブロックラインが参照されるので、マクロブロックラインメモリ311は、少なくとも1マクロブロックラインの係数データを全て記憶することができるようにする必要がある。   The context processing unit 301 includes a macro block line memory 311 and a context calculation unit 312. The macro block line memory 311 is basically the same as the macro block line memory 172 and the macro block line memory 182, and stores coefficient data supplied from the quantization unit 105. Note that the reference direction of the slice 1 is opposite to the conventional one, and the macro block line immediately below the macro block to be processed is referred to. Therefore, the macro block line memory 311 stores all the coefficient data of at least one macro block line. You need to be able to remember.

コンテキスト算出部312は、コンテキスト算出部173やコンテキスト算出部183と基本的に同様であり、マクロブロックラインメモリ311に記憶されているマクロブロックラインを参照し、コンテキストを算出する。   The context calculation unit 312 is basically the same as the context calculation unit 173 and the context calculation unit 183, and calculates a context by referring to a macroblock line stored in the macroblock line memory 311.

コンテキスト算出部312は、スライス2においてコンテキストを算出する場合、処理対象の1つ上のマクロブロックラインを参照するが、スライス1においてコンテキストを算出する場合、処理対象の1つ下のマクロブロックラインを参照する。   When calculating the context in slice 2, the context calculation unit 312 refers to the macro block line that is one step above the processing target. However, when calculating the context in slice 1, the context calculation unit 312 selects the macro block line that is one step below the processing target. refer.

つまり、コンテキスト算出部312は、スライス2においてコンテキストを算出する場合、従来と同様に、処理対象マクロブロック(curr)に対して1つ左のマクロブロック(mb-A)と1つ上のマクロブロック(mb-B)を参照してコンテキスト(context index)を算出する。   In other words, when calculating the context in slice 2, the context calculation unit 312 and the macroblock one mb-A left one and the macroblock one higher than the processing target macroblock (curr), as in the past. Context (context index) is calculated with reference to (mb-B).

これに対して、コンテキスト算出部312は、スライス1においてコンテキストを算出する場合、処理対象マクロブロック(curr)に対して1つ左のマクロブロック(mb-A)と1つ下のマクロブロック(mb-B’)を参照してコンテキスト(context index)を算出する。つまり、コンテキスト算出部312は、1つ下のマクロブロック(mb-B’)が供給された時点で、マクロブロックラインメモリ311に記憶されている処理対象マクロブロック(curr)と1つ左のマクロブロック(mb-A)とを読み出し、コンテキスト(context index)を算出する。   On the other hand, when the context calculation unit 312 calculates the context in slice 1, the macro block (mb-A) that is one left and the macro block (mb that is one lower than the processing target macro block (curr)) (mb) -B ') is referred to and a context (context index) is calculated. In other words, the context calculation unit 312 receives the macro block to be processed (curr) stored in the macro block line memory 311 and the one macro to the left when the next lower macro block (mb-B ′) is supplied. The block (mb-A) is read and the context (context index) is calculated.

なお、コンテキスト算出部312は、スライス1の下から2番目のマクロブロックラインを処理対象(curr)としてコンテキストを生成する際に、スライス1の一番下のマクロブロックラインのコンテキストも生成する。   Note that the context calculation unit 312 also generates the context of the bottom macroblock line of the slice 1 when generating the context with the second macroblock line from the bottom of the slice 1 as a processing target (curr).

コンテキスト算出部312は、算出したコンテキストを、記憶部152の係数データやマクロブロックアドレスの先頭アドレスとは別の領域に、係数データやマクロブロックアドレスの先頭アドレスとの対応関係を示すタグを付けて記憶させる。   The context calculation unit 312 attaches a tag indicating the correspondence between the calculated context to the coefficient data and the start address of the macroblock address in an area different from the coefficient data and the start address of the macroblock address in the storage unit 152. Remember.

スライス1処理部303の読み出し制御部171は、係数データやマクロブロックアドレスの先頭アドレスとともに、必要なコンテキストも記憶部152から読み出す。読み出し制御部171は、読み出したコンテキストを算術符号化部175に供給する。   The read control unit 171 of the slice 1 processing unit 303 reads the necessary context from the storage unit 152 together with the coefficient data and the head address of the macroblock address. The read control unit 171 supplies the read context to the arithmetic coding unit 175.

スライス2処理部304の読み出し制御部181は、係数データやマクロブロックアドレスの先頭アドレスとともに、必要なコンテキストも記憶部152から読み出す。読み出し制御部181は、読み出したコンテキストを算術符号化部185に供給する。   The read control unit 181 of the slice 2 processing unit 304 reads the necessary context from the storage unit 152 together with the coefficient data and the head address of the macroblock address. The read control unit 181 supplies the read context to the arithmetic coding unit 185.

[可逆符号化処理]
この場合の、可逆符号化処理の流れの例を図16のフローチャートを参照して説明する。このフローチャートは、図6のフローチャートに対応する。
[Lossless encoding process]
An example of the flow of lossless encoding processing in this case will be described with reference to the flowchart of FIG. This flowchart corresponds to the flowchart of FIG.

この場合、ステップS301およびステップS302の各処理は、図6のステップS131およびステップS132の各処理と同様に実行される。   In this case, each process of step S301 and step S302 is performed similarly to each process of step S131 and step S132 of FIG.

ステップS303において、コンテキスト処理部301は、処理対象マクロブロックラインがスライス1であるか否かを判定し、スライス1であると判定された場合、処理をステップS304に進める。   In step S303, the context processing unit 301 determines whether or not the processing target macroblock line is slice 1. If it is determined that it is slice 1, the process proceeds to step S304.

ステップS304において、コンテキスト処理部301は、1つ下のマクロブロックラインを参照してコンテキストを算出する。なお、スライス1の一番上のマクロブロックラインと一番下のマクロブロックラインのコンテキストについては、上述した通り生成する。コンテキストを生成すると、コンテキスト処理部301は、処理をステップS306に進める。   In step S304, the context processing unit 301 calculates a context with reference to the next lower macroblock line. Note that the contexts of the top macroblock line and the bottom macroblock line of slice 1 are generated as described above. When the context is generated, the context processing unit 301 advances the process to step S306.

また、ステップS303において、処理対象マクロブロックラインがスライス2であると判定された場合、コンテキスト処理部301は、処理をステップS305に進める。   If it is determined in step S303 that the processing target macroblock line is slice 2, the context processing unit 301 advances the process to step S305.

ステップS305において、コンテキスト処理部301は、1つ上のマクロブロックラインを参照してコンテキストを算出する。なお、スライス2の一番上のマクロブロックラインのコンテキストは、スライス1の一番下のマクロブロックラインを参照して生成する。コンテキストを生成すると、コンテキスト処理部301は、処理をステップS306に進める。   In step S305, the context processing unit 301 calculates a context with reference to the next macroblock line. Note that the context of the top macroblock line in slice 2 is generated with reference to the bottom macroblock line in slice 1. When the context is generated, the context processing unit 301 advances the process to step S306.

ステップS306において、記憶部152は、ステップS304若しくはステップS305において算出されたコンテキストを記憶する。   In step S306, the storage unit 152 stores the context calculated in step S304 or step S305.

ステップS307乃至ステップS310の各処理は、図6のステップS133乃至ステップS136の各処理と同様に行われる。   Each process of step S307 thru | or step S310 is performed similarly to each process of step S133 thru | or step S136 of FIG.

[スライス1符号化処理]
次に、図16のステップS308の処理により開始されるスライス1符号化処理の流れの例を図17のフローチャートを参照して説明する。なお、このフローチャートは、図7のフローチャートに対応する。
[Slice 1 encoding process]
Next, an example of the flow of the slice 1 encoding process started by the process of step S308 of FIG. 16 will be described with reference to the flowchart of FIG. This flowchart corresponds to the flowchart of FIG.

この場合も、基本的に図7の場合と同様に行われるが、コンテキストは既に生成されているので、図7のステップS152、ステップS156、およびステップS158の各処理は省略され、ステップS151に対応するステップS331、ステップS153に対応するステップS332、ステップS155に対応するステップS333、ステップS155に対応するステップS334、ステップS157に対応するステップS335、ステップS159に対応するステップS336、並びに、ステップS160に対応するステップS337の各処理が実行される。   In this case, the process is basically performed in the same manner as in FIG. 7, but since the context has already been generated, the processes in steps S152, S156, and S158 in FIG. 7 are omitted and correspond to step S151. Step S331, Step S332 corresponding to Step S153, Step S333 corresponding to Step S155, Step S334 corresponding to Step S155, Step S335 corresponding to Step S157, Step S336 corresponding to Step S159, and Step S160 Each process of step S337 is executed.

ただし、ステップS334において、読み出し制御部171は、スライス1の1つ上のマクロブロックラインとともに対応するコンテキストも記憶部152から読み出す。ステップS336において、算術符号化部175は、このステップS334において読み出されたコンテキストを用いて算術符号化を行う。   However, in step S334, the read control unit 171 also reads the corresponding context from the storage unit 152 together with the macroblock line one slice above the slice 1. In step S336, the arithmetic encoding unit 175 performs arithmetic encoding using the context read in step S334.

[スライス2符号化処理]
次に、図16のステップS309の処理により開始されるスライス2符号化処理の流れの例を図18のフローチャートを参照して説明する。なお、このフローチャートは、図8のフローチャートに対応する。
[Slice 2 encoding process]
Next, an example of the flow of the slice 2 encoding process started by the process of step S309 in FIG. 16 will be described with reference to the flowchart in FIG. This flowchart corresponds to the flowchart of FIG.

この場合も、基本的に図8の場合と同様に行われるが、コンテキストは既に生成されているので、図8のステップS182、ステップS184、ステップS187、およびステップS189の各処理は省略され、ステップS181に対応するステップS351、ステップS183に対応するステップS352、ステップS185に対応するステップS353、ステップS186に対応するステップS354、ステップS188に対応するステップS355、ステップS190に対応するステップS356、並びに、ステップS191に対応するステップS357の各処理が実行される。   In this case as well, the process is basically performed in the same manner as in FIG. 8, but since the context has already been generated, the processes in step S182, step S184, step S187, and step S189 in FIG. Step S351 corresponding to S181, Step S352 corresponding to Step S183, Step S353 corresponding to Step S185, Step S354 corresponding to Step S186, Step S355 corresponding to Step S188, Step S356 corresponding to Step S190, and Step Each process of step S357 corresponding to S191 is performed.

ただし、ステップS351において、読み出し制御部181は、スライス2の最初(一番上)のマクロブロックラインととともに、対応するコンテキストも記憶部152から読み出す。つまり、スライス1の最後(一番下)のマクロブロックラインのコンテキストも読みだされる。ステップS353において、算術符号化部185は、このステップS351において読み出されたコンテキストを用いて算術符号化を行う。   However, in step S351, the read control unit 181 reads the corresponding context from the storage unit 152 together with the first (top) macroblock line of the slice 2. That is, the context of the last (bottom) macroblock line of slice 1 is also read. In step S353, the arithmetic encoding unit 185 performs arithmetic encoding using the context read in step S351.

同様に、ステップS354において、読み出し制御部181は、スライス2の1つ下のマクロブロックラインととともに、対応するコンテキストも記憶部152から読み出す。ステップS356において、算術符号化部185は、このステップS354において読み出されたコンテキストを用いて算術符号化を行う。   Similarly, in step S <b> 354, the read control unit 181 reads the corresponding context from the storage unit 152 together with the macroblock line immediately below slice 2. In step S356, the arithmetic encoding unit 185 performs arithmetic encoding using the context read in step S354.

以上のように、コンテキストの算出を、係数データを記憶部152に記憶する前に行うことにより、読み出し後の算術符号化処理(スライス1処理部303およびスライス2処理部304)の負荷を軽減させることができる。一般的に算術符号化処理の負荷は、前後の他の処理と比較して大きいので、上述したように、係数データを記憶部152に記憶させる前にコンテキストを予め算出するようにすることにより、負荷を分散させることができ、コストの低減や符号化処理のさらなる高速化等を実現することができる。   As described above, the context is calculated before the coefficient data is stored in the storage unit 152, thereby reducing the load on the arithmetic coding processing (the slice 1 processing unit 303 and the slice 2 processing unit 304) after reading. be able to. In general, the load of the arithmetic coding process is large compared to the other processes before and after, and as described above, by calculating the context in advance before storing the coefficient data in the storage unit 152, The load can be distributed, and the cost can be reduced and the encoding process can be further speeded up.

[確率テーブルの複製]
さらに、算術符号化の初期状態を改善することができる。
[Replication of probability table]
Furthermore, the initial state of arithmetic coding can be improved.

AVC規格ではcabac_init_idcというパラメータとslice_type, SliceQPyというパラメータを用いてCABACの確率テーブルを初期化する。   In the AVC standard, the CABAC probability table is initialized using parameters cabac_init_idc and parameters slice_type and SliceQPy.

これに対して、図19に示されるように、スライス1の一番下のマクロブロックラインの処理を終わった時、スライス1処理部153が持っている確率テーブルの内容をスライス2処理部154が持つ確率テーブルにコピーする。スライス2処理部154は、スライス1処理部153が使っていた値を初期値としてCABACを開始する。   On the other hand, as shown in FIG. 19, when the processing of the bottom macroblock line of slice 1 is finished, the contents of the probability table possessed by slice 1 processing unit 153 are stored in slice 2 processing unit 154. Copy to the probability table you have. The slice 2 processing unit 154 starts CABAC using the value used by the slice 1 processing unit 153 as an initial value.

このようにすることにより、可逆符号化部106は、規格による初期値よりも画像に適した確率値で符号化を開始することができ、符号化効率を向上させることができる。   By doing in this way, the lossless encoding part 106 can start encoding with the probability value suitable for an image rather than the initial value by a specification, and can improve encoding efficiency.

[スライス1符号化処理]
この場合のスライス1符号化処理の流れの例を図20のフローチャートを参照して説明する。図20に示されるフローチャートは、図7のフローチャートに対応する。
[Slice 1 encoding process]
An example of the flow of the slice 1 encoding process in this case will be described with reference to the flowchart of FIG. The flowchart shown in FIG. 20 corresponds to the flowchart of FIG.

ステップS401において、算術符号化部175は、確率テーブルを初期化する。ステップS402乃至ステップS405の各処理は、図7のステップS151乃至ステップS154の各処理と同様に行われる。   In step S401, the arithmetic encoding unit 175 initializes the probability table. Each process of step S402 thru | or step S405 is performed similarly to each process of step S151 thru | or step S154 of FIG.

ステップS406において、算術符号化部175は、一番下のマクロブロックラインの最後(一番右)のマクロブロックの確率テーブルをコピーし、算術符号化部185に供給する。   In step S <b> 406, the arithmetic encoding unit 175 copies the probability table of the last (rightmost) macroblock of the bottom macroblock line and supplies it to the arithmetic encoding unit 185.

ステップS407乃至ステップS412の各処理は、図7のステップS155乃至ステップS160の各処理と同様に行われる。   Steps S407 through S412 are performed in the same manner as steps S155 through S160 in FIG.

[スライス2符号化処理]
この場合のスライス2符号化処理の流れの例を図21のフローチャートを参照して説明する。図21に示されるフローチャートは、図8のフローチャートに対応する。
[Slice 2 encoding process]
An example of the flow of the slice 2 encoding process in this case will be described with reference to the flowchart of FIG. The flowchart shown in FIG. 21 corresponds to the flowchart of FIG.

ステップS431およびステップS432の各処理は、図8のステップS181およびステップS182の各処理と同様に実行される。   Each process of step S431 and step S432 is performed similarly to each process of step S181 and step S182 of FIG.

ステップS433において、算術符号化部185は、スライス1の確率テーブルのコピーを取得する。ステップS434およびステップS435の各処理は、図7のステップS183およびステップS184の各処理と同様に行われる。   In step S433, the arithmetic encoding unit 185 obtains a copy of the probability table for slice 1. Each process of step S434 and step S435 is performed similarly to each process of step S183 and step S184 of FIG.

ステップS436において、算術符号化部185は、スライス1の確率テーブルのコピーを初期値として、コンテキストを用いて算術符号化を行う。   In step S436, the arithmetic encoding unit 185 performs arithmetic encoding using the context with the copy of the probability table of slice 1 as an initial value.

ステップS437乃至ステップS442の各処理は、図8のステップS186乃至ステップS191の各処理と同様に行われる。   The processes in steps S437 through S442 are performed in the same manner as the processes in steps S186 through S191 in FIG.

なお、画像復号装置200においても同様に、確率テーブルのコピーを初期値として利用して復号を行う。そのために、画像符号化装置100は、確率テーブルを初期化したか若しくはコピーを利用したかを示す情報を、例えば符号化データに付加する等して、画像復号装置200に提供する。確率テーブルのコピーを初期値として利用する旨の情報を得ると画像復号装置200の可逆復号部202は、スライス1処理部252の算術復号部261がスライス1の一番下のマクロブロックラインの処理を終えた時にCABAC確率テーブルの内容をコピーし、スライス2処理部253の算術復号部271がそのコピーを用いて算術復号処理を開始するようにする。このようにすることにより、可逆復号部202は、上述した符号化の場合と同じ確率テーブルを使うことができ、符号化データを正しく復号することができる。   Similarly, the image decoding apparatus 200 performs decoding using a copy of the probability table as an initial value. For this purpose, the image encoding device 100 provides the image decoding device 200 with information indicating whether the probability table is initialized or a copy is used, for example, by adding it to the encoded data. When information indicating that the copy of the probability table is used as an initial value is obtained, the lossless decoding unit 202 of the image decoding device 200 causes the arithmetic decoding unit 261 of the slice 1 processing unit 252 to process the bottom macroblock line of slice 1. Is completed, the contents of the CABAC probability table are copied, and the arithmetic decoding unit 271 of the slice 2 processing unit 253 starts the arithmetic decoding process using the copy. By doing in this way, the lossless decoding part 202 can use the same probability table as the case of the encoding mentioned above, and can decode encoded data correctly.

[多分割]
以上においては画像を2分割するように説明したが、分割数は2以外であってもよい。例えば、図22に示されるように、画像が、スライス1乃至スライス4の4つのエントロピスライスに分割されるようにしてもよい。
[Multi-segment]
In the above description, the image is divided into two, but the number of divisions may be other than two. For example, as shown in FIG. 22, an image may be divided into four entropy slices of slice 1 to slice 4.

この図22の例のように画像を4分割する場合、スライス1とスライス2は、上述した2分割の場合と同様に符号化が行われるようにする。また、スライス3はスライス1と同様に、スライス4はスライス2と同様に符号化が行われるようにする。   When the image is divided into four as in the example of FIG. 22, the slice 1 and the slice 2 are encoded in the same manner as in the case of the above-described two division. The slice 3 is encoded in the same manner as the slice 1, and the slice 4 is encoded in the same manner as the slice 2.

つまり、スライス1とスライス3の符号化処理は、下のマクロブロックラインから上のマクロブロックラインに向かう順に進められるようにする。また、スライス1とスライス3の符号化処理においては、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ下のマクロブロックが参照されるようにする。   That is, the encoding processing of slice 1 and slice 3 is advanced in the order from the lower macroblock line toward the upper macroblock line. Also, in the encoding process of slice 1 and slice 3, the macroblock one left of the processing target macroblock and the macroblock one level below are referred to as the peripheral macroblock.

これに対して、スライス2とスライス4の符号化処理は、従来と同様に、上のマクロブロックラインから下のマクロブロックラインに向かう順に進められるようにする。また、スライス2とスライス4の符号化処理においては、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ上のマクロブロックが参照されるようにする。   On the other hand, the encoding processing of slice 2 and slice 4 is advanced in the order from the upper macroblock line to the lower macroblock line, as in the prior art. Further, in the encoding process of slice 2 and slice 4, the macroblock one left of the processing target macroblock and the macroblock one above are referred to as the peripheral macroblock.

そして、スライス1の一番下のマクロブロックラインの係数データが記憶部152に記憶されたときにスライス2の符号化処理が開始されるのと同様に、スライス3の一番下のマクロブロックラインの係数データが記憶部152に記憶されたときにスライス4の符号化処理が開始される。   Then, when the coefficient data of the lowermost macroblock line of slice 1 is stored in the storage unit 152, the lowermost macroblock line of slice 3 is started in the same manner as the encoding process of slice 2 is started. When the coefficient data is stored in the storage unit 152, the encoding process of slice 4 is started.

さらに、スライス2の一番上のマクロブロックラインの符号化処理においてスライス1の一番下のマクロブロックラインが参照されるのと同様に、スライス4の一番上のマクロブロックラインの符号化処理では、処理対象マクロブロックの1つ上のマクロブロックとして、スライス3の一番下のマクロブロックラインのマクロブロックが参照されるようにする。   Further, the encoding process of the top macroblock line of slice 4 is performed in the same manner as the bottom macroblock line of slice 1 is referred to in the encoding process of the top macroblock line of slice 2. Then, the macroblock on the bottom macroblock line of slice 3 is referred to as the macroblock one level above the processing target macroblock.

[可逆符号化部の構成]
このように画像を4分割する場合、可逆符号化部106は、例えば、図23に示されるように、図3のスライス1処理部153と同様のスライス3処理部503と、スライス2処理部154と同様のスライス4処理部504をさらに有する。
[Configuration of lossless encoding unit]
In this way, when the image is divided into four, the lossless encoding unit 106, for example, as shown in FIG. 23, the slice 3 processing unit 503 and the slice 2 processing unit 154 similar to the slice 1 processing unit 153 of FIG. And a slice 4 processing unit 504 similar to the above.

また、可逆符号化部106は、画像を2つのスライスに分割する制御部151の代わりに、画像を4つのスライスに分割する制御部501を有する。   Further, the lossless encoding unit 106 includes a control unit 501 that divides an image into four slices instead of the control unit 151 that divides the image into two slices.

制御部501は、マクロブロック検出部161とスライス検出部512を有する。スライス検出部512は、スライス1処理部153、スライス2処理部154、スライス3処理部503、およびスライス4処理部504を制御し、画像を4つのスライスに分割し、互いに並行して符号化処理を行わせる。   The control unit 501 includes a macroblock detection unit 161 and a slice detection unit 512. The slice detection unit 512 controls the slice 1 processing unit 153, the slice 2 processing unit 154, the slice 3 processing unit 503, and the slice 4 processing unit 504, divides the image into four slices, and performs encoding processing in parallel with each other. To do.

画像が4分割される以外は、各処理は2分割の場合と同様に実行される。つまり、スライス3はスライス1と同様に符号化され、スライス4はスライス2と同様に符号化される。   Except for the image being divided into four, each process is executed in the same manner as in the case of dividing into two. That is, slice 3 is encoded in the same manner as slice 1, and slice 4 is encoded in the same manner as slice 2.

このように分割数を増やすことにより、並列数が増大するので、スループットが向上し、可逆符号化部106は、より高速に可逆符号化処理を行うことができる。その際、2分割の場合と同様に符号化処理が行われるので、可逆符号化部106は、符号化効率の低減を抑制させながら、画像符号化の高速化を実現することができる。   By increasing the number of divisions in this way, the number of parallels increases, so that the throughput is improved and the lossless encoding unit 106 can perform lossless encoding processing at higher speed. At that time, since the encoding process is performed in the same manner as in the case of the two-division, the lossless encoding unit 106 can realize high-speed image encoding while suppressing reduction in encoding efficiency.

つまり、画像符号化装置100の可逆符号化部106は、符号化対象の画像を、上下に並ぶ複数の領域に分割する。そして、可逆符号化部106は、上から偶数番目の領域については、従来どおり、上のマクロブロックラインから下に向かう順に符号化を行い、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ上のマクロブロックを参照する。   That is, the lossless encoding unit 106 of the image encoding device 100 divides the encoding target image into a plurality of regions arranged vertically. Then, the lossless encoding unit 106 performs encoding for the even-numbered regions from the top in the order from the top macroblock line to the bottom, as before, and the macroblock one left of the processing target macroblock as the peripheral macroblock. Refers to the block and the macroblock one level above.

これに対して、上から奇数番目の領域については、可逆符号化部106は、従来とは逆に、下のマクロブロックラインから上に向かう順に符号化を行い、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ下のマクロブロックを参照する。   On the other hand, for the odd-numbered area from the top, the lossless encoding unit 106 performs encoding in the order from the bottom macroblock line to the top, contrary to the conventional case, and the processing target macroblock is set as the peripheral macroblock. Referring to the left macroblock and the next lower macroblock.

さらに、可逆符号化部106は、上から奇数番目の領域の一番下のマクロブロックラインの符号化が終了した時点で、その1つ下の(上から偶数番目の)領域についての符号化処理を開始する。   Furthermore, the lossless encoding unit 106 performs encoding processing on the next lower (even number from the top) region when encoding of the bottommost macroblock line in the odd numbered region from the top is completed. To start.

また、このとき、可逆符号化部106は、上から奇数番目の領域の一番下のマクロブロックラインを参照して、その1つ下の(上から偶数番目の)領域の一番上のマクロブロックラインについての符号化処理を行う。   At this time, the lossless encoding unit 106 refers to the bottom macroblock line in the odd-numbered area from the top, and the top macro in the area that is one lower (even number from the top). Encoding processing for block lines is performed.

[可逆復号部の構成]
画像を4分割する場合の画像復号装置200の可逆復号部202の構成例を図24に示す。
[Configuration of lossless decoding unit]
FIG. 24 shows a configuration example of the lossless decoding unit 202 of the image decoding device 200 when the image is divided into four.

図24に示されるように、この場合の可逆復号部202は、図10の場合に比べて、デマルチプレクサ251の代わりに、符号化データをスライス毎に4つに分割するデマルチプレクサ551を有し、さらに、スライス3処理部552およびスライス4処理部553を有する。   As shown in FIG. 24, the lossless decoding unit 202 in this case has a demultiplexer 551 that divides the encoded data into four for each slice, instead of the demultiplexer 251 compared to the case of FIG. Furthermore, a slice 3 processing unit 552 and a slice 4 processing unit 553 are included.

スライス3処理部552は、スライス3の符号化データを復号する処理部であり、スライス1処理部252と同様の構成を有し、同様の処理を行う。スライス3においては、スライス1と同様の方法で符号化されているので、スライス3処理部552は、スライス1処理部252と同様の方法で復号することにより、スライス3の符号化データを正しく復号することができる。   The slice 3 processing unit 552 is a processing unit that decodes the encoded data of the slice 3 and has the same configuration as the slice 1 processing unit 252 and performs the same processing. Since the slice 3 is encoded by the same method as the slice 1, the slice 3 processing unit 552 decodes the encoded data of the slice 3 correctly by decoding the slice 3 by the same method as the slice 1 processing unit 252. can do.

スライス4処理部553は、スライス4の符号化データを復号する処理部であり、スライス2処理部253と同様の構成を有し、同様の処理を行う。スライス4においては、スライス2と同様の方法で符号化されているので、スライス4処理部553は、スライス2処理部253と同様の方法で復号することにより、スライス4の符号化データを正しく復号することができる。   The slice 4 processing unit 553 is a processing unit that decodes the encoded data of the slice 4, has the same configuration as the slice 2 processing unit 253, and performs the same processing. Since the slice 4 is encoded by the same method as the slice 2, the slice 4 processing unit 553 decodes the encoded data of the slice 4 correctly by decoding the slice 4 by the same method as the slice 2 processing unit 253. can do.

まず、スライス1処理部252によるスライス1の符号化データの復号処理と、スライス3処理部552によるスライス3の符号化データの復号処理が開始される。スライス2処理部253によるスライス2の一番上のマクロブロックラインの復号処理は、スライス1の一番下のマクロブロックラインの復号処理結果を待って開始される(周辺マクロブロックとして参照される)。   First, the decoding process of the encoded data of slice 1 by the slice 1 processing unit 252 and the decoding process of the encoded data of slice 3 by the slice 3 processing unit 552 are started. The decoding processing of the top macroblock line of slice 2 by the slice 2 processing unit 253 is started after waiting for the decoding processing result of the bottom macroblock line of slice 1 (referred to as a neighboring macroblock). .

同様に、スライス4処理部553によるスライス4の一番上のマクロブロックラインの復号処理は、スライス3の一番下のマクロブロックラインの復号処理結果を待って開始される(周辺マクロブロックとして参照される)。   Similarly, the decoding processing of the top macroblock line of slice 4 by the slice 4 processing unit 553 is started after waiting for the decoding processing result of the bottom macroblock line of slice 3 (referred to as a peripheral macroblock). )

つまり、画像復号装置200の可逆復号部202は、復号対象の符号化データに対応する符号化前の画像を、上下に並ぶ複数の領域に分割する。そして、可逆復号部202は、上から偶数番目の領域に対応する符号化データについては、従来どおり、上のマクロブロックラインから下に向かう順に復号し、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ上のマクロブロックを参照する。   That is, the lossless decoding unit 202 of the image decoding device 200 divides an image before encoding corresponding to encoded data to be decoded into a plurality of regions arranged vertically. Then, the lossless decoding unit 202 decodes the encoded data corresponding to the even-numbered regions from the top in the order from the top macroblock line to the bottom, as before, and sets one of the processing target macroblocks as a peripheral macroblock. Refer to the left macroblock and the macroblock one level above.

これに対して、上から奇数番目の領域に対応する符号化データについては、可逆復号部202は、従来とは逆に、下のマクロブロックラインから上に向かう順に復号し、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ下のマクロブロックを参照する。   On the other hand, with respect to the encoded data corresponding to the odd-numbered area from the top, the lossless decoding unit 202 decodes in order from the bottom macroblock line to the top, and processes it as a peripheral macroblock, contrary to the conventional case. Reference is made to the macroblock one to the left of the target macroblock and the macroblock one level below.

さらに、可逆復号部202は、上から奇数番目の領域の一番下のマクロブロックラインに対応する符号化データの復号が終了した時点で、その1つ下の(上から偶数番目の)領域の符号化データについての復号処理を開始する。   Further, when the decoding of the encoded data corresponding to the bottommost macroblock line in the odd-numbered area from the top is completed, the lossless decoding unit 202 performs the processing of the area below that (even-numbered from the top). The decoding process for the encoded data is started.

また、このとき、可逆復号部202は、上から奇数番目の領域の一番下のマクロブロックラインを参照して、その1つ下の(上から偶数番目の)領域の一番上のマクロブロックラインに対応する符号化データについての復号処理を行う。   At this time, the lossless decoding unit 202 refers to the bottom macroblock line in the odd-numbered area from the top, and the top macroblock in the area one lower (even from the top). A decoding process is performed on the encoded data corresponding to the line.

なお、画像符号化装置100および画像復号装置200が、それぞれ多数のスライス処理部を予め有し、その中のエントロピスライス数と同数のスライス処理部を動作させるようにしてもよい。つまり、エントロピスライス数は、画像単位、シーケンス単位、コンテンツ単位等で変更することができるようにしてもよい。その場合、画像符号化装置100は、画像復号装置200に対して、符号化処理に採用したエントロピスライス数を通知する。画像復号装置200は、その情報に基づいて復号処理を行うことにより、画像符号化装置100が生成した符号化データを正しく復号することができる。   Note that each of the image encoding device 100 and the image decoding device 200 may have a large number of slice processing units in advance and operate the same number of slice processing units as the number of entropy slices therein. That is, the number of entropy slices may be changed in image units, sequence units, content units, or the like. In that case, the image encoding device 100 notifies the image decoding device 200 of the number of entropy slices employed for the encoding process. The image decoding apparatus 200 can correctly decode the encoded data generated by the image encoding apparatus 100 by performing a decoding process based on the information.

[マクロブロック]
マクロブロックのサイズは、16×16以下であってもよいが、16×16より大きくてもよい。
[Macro block]
The size of the macroblock may be 16 × 16 or less, but may be larger than 16 × 16.

本発明は、例えば図25に示されるようなあらゆる大きさのマクロブロックに対して適用することができる。例えば、本発明は、通常の16×16画素のようなマクロブロックだけでなく、32×32画素のような拡張されたマクロブロック(拡張マクロブロック)にも適用することができる。   The present invention can be applied to macroblocks of any size as shown in FIG. For example, the present invention can be applied not only to a normal macroblock such as 16 × 16 pixels but also to an extended macroblock (extended macroblock) such as 32 × 32 pixels.

図25において、上段には、左から、32×32画素、32×16画素、16×32画素、および16×16画素のブロック(パーティション)に分割された32×32画素で構成されるマクロブロックが順に示されている。また、中段には、左から、16×16画素、16×8画素、8×16画素、および8×8画素のブロックに分割された16×16画素で構成されるブロックが順に示されている。さらに、下段には、左から、8×8画素、8×4画素、4×8画素、および4×4画素のブロックに分割された8×8画素のブロックが順に示されている。   In FIG. 25, in the upper part, from the left, a macro block composed of 32 × 32 pixels divided into blocks (partitions) of 32 × 32 pixels, 32 × 16 pixels, 16 × 32 pixels, and 16 × 16 pixels. Are shown in order. Further, in the middle stage, blocks from 16 × 16 pixels divided into blocks of 16 × 16 pixels, 16 × 8 pixels, 8 × 16 pixels, and 8 × 8 pixels are sequentially shown from the left. . Further, in the lower part, from the left, an 8 × 8 pixel block divided into 8 × 8 pixel, 8 × 4 pixel, 4 × 8 pixel, and 4 × 4 pixel blocks is sequentially shown.

すなわち、32×32画素のマクロブロックは、上段に示される32×32画素、32×16画素、16×32画素、および16×16画素のブロックでの処理が可能である。   That is, the 32 × 32 pixel macroblock can be processed in the 32 × 32 pixel, 32 × 16 pixel, 16 × 32 pixel, and 16 × 16 pixel blocks shown in the upper part.

上段の右側に示される16×16画素のブロックは、H.264/AVC方式と同様に、中段に示される16×16画素、16×8画素、8×16画素、および8×8画素のブロックでの処理が可能である。   The block of 16 × 16 pixels shown on the right side of the upper row is H.264. Similar to the H.264 / AVC format, processing in blocks of 16 × 16 pixels, 16 × 8 pixels, 8 × 16 pixels, and 8 × 8 pixels shown in the middle stage is possible.

中段の右側に示される8×8画素のブロックは、H.264/AVC方式と同様に、下段に示される8×8画素、8×4画素、4×8画素、および4×4画素のブロックでの処理が可能である。   The 8 × 8 pixel block shown on the right side of the middle row is H.264. Similar to the H.264 / AVC format, processing in blocks of 8 × 8 pixels, 8 × 4 pixels, 4 × 8 pixels, and 4 × 4 pixels shown in the lower stage is possible.

これらのブロックは、以下の3階層に分類することができる。すなわち、図25の上段に示される32×32画素、32×16画素、および16×32画素のブロックを第1階層と称する。上段の右側に示される16×16画素のブロック、並びに、中段に示される16×16画素、16×8画素、および8×16画素のブロックを、第2階層と称する。中段の右側に示される8×8画素のブロック、並びに、下段に示される8×8画素、8×4画素、4×8画素、および4×4画素のブロックを、第3階層と称する。   These blocks can be classified into the following three layers. That is, a block of 32 × 32 pixels, 32 × 16 pixels, and 16 × 32 pixels shown in the upper part of FIG. 25 is referred to as a first layer. The 16 × 16 pixel block shown on the right side of the upper stage and the 16 × 16 pixel, 16 × 8 pixel, and 8 × 16 pixel blocks shown in the middle stage are referred to as a second hierarchy. The 8 × 8 pixel block shown on the right side of the middle row and the 8 × 8 pixel, 8 × 4 pixel, 4 × 8 pixel, and 4 × 4 pixel blocks shown on the lower row are referred to as a third hierarchy.

このような階層構造を採用することにより、16×16画素のブロック以下に関しては、H.264/AVC方式と互換性を保ちながら、そのスーパーセットとして、より大きなブロックを定義することができる。   By adopting such a hierarchical structure, H. Larger blocks can be defined as a superset while maintaining compatibility with the H.264 / AVC format.

<4.第4の実施の形態>
[パーソナルコンピュータ]
上述した一連の処理は、ハードウエアにより実行させることもできるし、ソフトウエアにより実行させることもできる。この場合、例えば、図26に示されるようなパーソナルコンピュータとして構成されるようにしてもよい。
<4. Fourth Embodiment>
[Personal computer]
The series of processes described above can be executed by hardware or can be executed by software. In this case, for example, a personal computer as shown in FIG. 26 may be configured.

図26において、パーソナルコンピュータ600のCPU(Central Processing Unit)601は、ROM(Read Only Memory)602に記憶されているプログラム、または記憶部613からRAM(Random Access Memory)603にロードされたプログラムに従って各種の処理を実行する。RAM603にはまた、CPU601が各種の処理を実行する上において必要なデータなども適宜記憶される。   In FIG. 26, a CPU (Central Processing Unit) 601 of the personal computer 600 performs various processes according to a program stored in a ROM (Read Only Memory) 602 or a program loaded from a storage unit 613 into a RAM (Random Access Memory) 603. Execute the process. The RAM 603 also appropriately stores data necessary for the CPU 601 to execute various processes.

CPU601、ROM602、およびRAM603は、バス604を介して相互に接続されている。このバス604にはまた、入出力インタフェース610も接続されている。   The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input / output interface 610 is also connected to the bus 604.

入出力インタフェース610には、キーボード、マウスなどよりなる入力部611、CRT(Cathode Ray Tube)やLCD(Liquid Crystal Display)などよりなるディスプレイ、並びにスピーカなどよりなる出力部612、ハードディスクなどより構成される記憶部613、モデムなどより構成される通信部614が接続されている。通信部614は、インターネットを含むネットワークを介しての通信処理を行う。   The input / output interface 610 includes an input unit 611 including a keyboard and a mouse, a display including a CRT (Cathode Ray Tube) and an LCD (Liquid Crystal Display), an output unit 612 including a speaker, a hard disk, and the like. A communication unit 614 including a storage unit 613 and a modem is connected. The communication unit 614 performs communication processing via a network including the Internet.

入出力インタフェース610にはまた、必要に応じてドライブ615が接続され、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリなどのリムーバブルメディア621が適宜装着され、それらから読み出されたコンピュータプログラムが、必要に応じて記憶部613にインストールされる。   A drive 615 is connected to the input / output interface 610 as necessary, and a removable medium 621 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory is appropriately mounted, and a computer program read from them is loaded. It is installed in the storage unit 613 as necessary.

上述した一連の処理をソフトウエアにより実行させる場合には、そのソフトウエアを構成するプログラムが、ネットワークや記録媒体からインストールされる。   When the above-described series of processing is executed by software, a program constituting the software is installed from a network or a recording medium.

この記録媒体は、例えば、図26に示されるように、装置本体とは別に、ユーザにプログラムを配信するために配布される、プログラムが記録されている磁気ディスク(フレキシブルディスクを含む)、光ディスク(CD-ROM(Compact Disc - Read Only Memory),DVD(Digital Versatile Disc)を含む)、光磁気ディスク(MD(Mini Disc)を含む)、もしくは半導体メモリなどよりなるリムーバブルメディア621により構成されるだけでなく、装置本体に予め組み込まれた状態でユーザに配信される、プログラムが記録されているROM602や、記憶部613に含まれるハードディスクなどで構成される。   For example, as shown in FIG. 26, the recording medium is distributed to distribute the program to the user separately from the apparatus main body, and includes a magnetic disk (including a flexible disk) on which the program is recorded, an optical disk ( It only consists of removable media 621 consisting of CD-ROM (compact disc-read only memory), DVD (including digital versatile disc), magneto-optical disc (including MD (mini disc)), or semiconductor memory. Rather, it is composed of a ROM 602 storing a program and a hard disk included in the storage unit 613, which is distributed to the user in a state of being incorporated in the apparatus main body in advance.

なお、コンピュータが実行するプログラムは、本明細書で説明する順序に沿って時系列に処理が行われるプログラムであっても良いし、並列に、あるいは呼び出しが行われたとき等の必要なタイミングで処理が行われるプログラムであっても良い。   The program executed by the computer may be a program that is processed in time series in the order described in this specification, or in parallel or at a necessary timing such as when a call is made. It may be a program for processing.

また、本明細書において、記録媒体に記録されるプログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。   Further, in the present specification, the step of describing the program recorded on the recording medium is not limited to the processing performed in chronological order according to the described order, but may be performed in parallel or It also includes processes that are executed individually.

また、本明細書において、システムとは、複数のデバイス(装置)により構成される装置全体を表すものである。   Further, in this specification, the system represents the entire apparatus composed of a plurality of devices (apparatuses).

また、以上において、1つの装置(または処理部)として説明した構成を分割し、複数の装置(または処理部)として構成するようにしてもよい。逆に、以上において複数の装置(または処理部)として説明した構成をまとめて1つの装置(または処理部)として構成されるようにしてもよい。また、各装置(または各処理部)の構成に上述した以外の構成を付加するようにしてももちろんよい。さらに、システム全体としての構成や動作が実質的に同じであれば、ある装置(または処理部)の構成の一部を他の装置(または他の処理部)の構成に含めるようにしてもよい。つまり、本発明の実施の形態は、上述した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能である。   In addition, in the above description, the configuration described as one device (or processing unit) may be divided and configured as a plurality of devices (or processing units). Conversely, the configurations described above as a plurality of devices (or processing units) may be combined into a single device (or processing unit). Of course, a configuration other than that described above may be added to the configuration of each device (or each processing unit). Furthermore, if the configuration and operation of the entire system are substantially the same, a part of the configuration of a certain device (or processing unit) may be included in the configuration of another device (or other processing unit). . That is, the embodiment of the present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the gist of the present invention.

例えば、上述した画像符号化装置100や画像復号装置200は、任意の電子機器に適用することができる。以下にその例について説明する。   For example, the image encoding device 100 and the image decoding device 200 described above can be applied to any electronic device. Examples thereof will be described below.

<5.第5の実施の形態>
[テレビジョン受像機]
図27は、本発明を適用した画像復号装置200を用いるテレビジョン受像機の主な構成例を示すブロック図である。
<5. Fifth embodiment>
[Television receiver]
FIG. 27 is a block diagram illustrating a main configuration example of a television receiver using the image decoding device 200 to which the present invention has been applied.

図27に示されるテレビジョン受像機1000は、地上波チューナ1013、ビデオデコーダ1015、映像信号処理回路1018、グラフィック生成回路1019、パネル駆動回路1020、および表示パネル1021を有する。   A television receiver 1000 shown in FIG. 27 includes a terrestrial tuner 1013, a video decoder 1015, a video signal processing circuit 1018, a graphic generation circuit 1019, a panel drive circuit 1020, and a display panel 1021.

地上波チューナ1013は、地上アナログ放送の放送波信号を、アンテナを介して受信し、復調し、映像信号を取得し、それをビデオデコーダ1015に供給する。ビデオデコーダ1015は、地上波チューナ1013から供給された映像信号に対してデコード処理を施し、得られたデジタルのコンポーネント信号を映像信号処理回路1018に供給する。   The terrestrial tuner 1013 receives a broadcast wave signal of analog terrestrial broadcasting via an antenna, demodulates it, acquires a video signal, and supplies it to the video decoder 1015. The video decoder 1015 performs a decoding process on the video signal supplied from the terrestrial tuner 1013 and supplies the obtained digital component signal to the video signal processing circuit 1018.

映像信号処理回路1018は、ビデオデコーダ1015から供給された映像データに対してノイズ除去などの所定の処理を施し、得られた映像データをグラフィック生成回路1019に供給する。   The video signal processing circuit 1018 performs predetermined processing such as noise removal on the video data supplied from the video decoder 1015 and supplies the obtained video data to the graphic generation circuit 1019.

グラフィック生成回路1019は、表示パネル1021に表示させる番組の映像データや、ネットワークを介して供給されるアプリケーションに基づく処理による画像データなどを生成し、生成した映像データや画像データをパネル駆動回路1020に供給する。また、グラフィック生成回路1019は、項目の選択などにユーザにより利用される画面を表示するための映像データ(グラフィック)を生成し、それを番組の映像データに重畳したりすることによって得られた映像データをパネル駆動回路1020に供給するといった処理も適宜行う。   The graphic generation circuit 1019 generates video data of a program to be displayed on the display panel 1021, image data by processing based on an application supplied via a network, and the generated video data and image data to the panel drive circuit 1020. Supply. The graphic generation circuit 1019 generates video data (graphics) for displaying a screen used by the user for selecting an item and superimposing it on the video data of the program. A process of supplying data to the panel drive circuit 1020 is also appropriately performed.

パネル駆動回路1020は、グラフィック生成回路1019から供給されたデータに基づいて表示パネル1021を駆動し、番組の映像や上述した各種の画面を表示パネル1021に表示させる。   The panel drive circuit 1020 drives the display panel 1021 based on the data supplied from the graphic generation circuit 1019 and causes the display panel 1021 to display a program video and the various screens described above.

表示パネル1021はLCD(Liquid Crystal Display)などよりなり、パネル駆動回路1020による制御に従って番組の映像などを表示させる。   The display panel 1021 includes an LCD (Liquid Crystal Display) or the like, and displays a program video or the like according to control by the panel drive circuit 1020.

また、テレビジョン受像機1000は、音声A/D(Analog/Digital)変換回路1014、音声信号処理回路1022、エコーキャンセル/音声合成回路1023、音声増幅回路1024、およびスピーカ1025も有する。   The television receiver 1000 also includes an audio A / D (Analog / Digital) conversion circuit 1014, an audio signal processing circuit 1022, an echo cancellation / audio synthesis circuit 1023, an audio amplification circuit 1024, and a speaker 1025.

地上波チューナ1013は、受信した放送波信号を復調することにより、映像信号だけでなく音声信号も取得する。地上波チューナ1013は、取得した音声信号を音声A/D変換回路1014に供給する。   The terrestrial tuner 1013 acquires not only the video signal but also the audio signal by demodulating the received broadcast wave signal. The terrestrial tuner 1013 supplies the acquired audio signal to the audio A / D conversion circuit 1014.

音声A/D変換回路1014は、地上波チューナ1013から供給された音声信号に対してA/D変換処理を施し、得られたデジタルの音声信号を音声信号処理回路1022に供給する。   The audio A / D conversion circuit 1014 performs A / D conversion processing on the audio signal supplied from the terrestrial tuner 1013 and supplies the obtained digital audio signal to the audio signal processing circuit 1022.

音声信号処理回路1022は、音声A/D変換回路1014から供給された音声データに対してノイズ除去などの所定の処理を施し、得られた音声データをエコーキャンセル/音声合成回路1023に供給する。   The audio signal processing circuit 1022 performs predetermined processing such as noise removal on the audio data supplied from the audio A / D conversion circuit 1014, and supplies the obtained audio data to the echo cancellation / audio synthesis circuit 1023.

エコーキャンセル/音声合成回路1023は、音声信号処理回路1022から供給された音声データを音声増幅回路1024に供給する。   The echo cancellation / voice synthesis circuit 1023 supplies the voice data supplied from the voice signal processing circuit 1022 to the voice amplification circuit 1024.

音声増幅回路1024は、エコーキャンセル/音声合成回路1023から供給された音声データに対してD/A変換処理、増幅処理を施し、所定の音量に調整した後、音声をスピーカ1025から出力させる。   The audio amplifying circuit 1024 performs D / A conversion processing and amplification processing on the audio data supplied from the echo cancellation / audio synthesizing circuit 1023, adjusts to a predetermined volume, and then outputs the audio from the speaker 1025.

さらに、テレビジョン受像機1000は、デジタルチューナ1016およびMPEGデコーダ1017も有する。   Furthermore, the television receiver 1000 also includes a digital tuner 1016 and an MPEG decoder 1017.

デジタルチューナ1016は、デジタル放送(地上デジタル放送、BS(Broadcasting Satellite)/CS(Communications Satellite)デジタル放送)の放送波信号を、アンテナを介して受信し、復調し、MPEG-TS(Moving Picture Experts Group-Transport Stream)を取得し、それをMPEGデコーダ1017に供給する。   The digital tuner 1016 receives a broadcast wave signal of a digital broadcast (terrestrial digital broadcast, BS (Broadcasting Satellite) / CS (Communications Satellite) digital broadcast) via an antenna, demodulates, and MPEG-TS (Moving Picture Experts Group). -Transport Stream) and supply it to the MPEG decoder 1017.

MPEGデコーダ1017は、デジタルチューナ1016から供給されたMPEG-TSに施されているスクランブルを解除し、再生対象(視聴対象)になっている番組のデータを含むストリームを抽出する。MPEGデコーダ1017は、抽出したストリームを構成する音声パケットをデコードし、得られた音声データを音声信号処理回路1022に供給するとともに、ストリームを構成する映像パケットをデコードし、得られた映像データを映像信号処理回路1018に供給する。また、MPEGデコーダ1017は、MPEG-TSから抽出したEPG(Electronic Program Guide)データを図示せぬ経路を介してCPU1032に供給する。   The MPEG decoder 1017 cancels the scramble applied to the MPEG-TS supplied from the digital tuner 1016, and extracts a stream including program data to be played back (viewing target). The MPEG decoder 1017 decodes the audio packet constituting the extracted stream, supplies the obtained audio data to the audio signal processing circuit 1022, decodes the video packet constituting the stream, and converts the obtained video data into the video This is supplied to the signal processing circuit 1018. Also, the MPEG decoder 1017 supplies EPG (Electronic Program Guide) data extracted from the MPEG-TS to the CPU 1032 via a path (not shown).

テレビジョン受像機1000は、このように映像パケットをデコードするMPEGデコーダ1017として、上述した画像復号装置200を用いる。なお、放送局等より送信されるMPEG-TSは、画像符号化装置100によって符号化されている。   The television receiver 1000 uses the above-described image decoding device 200 as the MPEG decoder 1017 for decoding video packets in this way. Note that MPEG-TS transmitted from a broadcasting station or the like is encoded by the image encoding device 100.

MPEGデコーダ1017は、画像復号装置200の場合と同様に、画像符号化装置100より供給される符号化データをエントロピスライス毎に並行して復号し、復号画像データを生成する。そのとき、MPEGデコーダ1017は、画像復号装置200の場合と同様に、復号対象の符号化データに対応する符号化前の画像を、上下に並ぶ複数(偶数個)の領域に分割する。そして、MPEGデコーダ1017は、上から偶数番目の領域に対応する符号化データについては、従来どおり、上のマクロブロックラインから下に向かう順に復号し、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ上のマクロブロックを参照する。   As in the case of the image decoding device 200, the MPEG decoder 1017 decodes the encoded data supplied from the image encoding device 100 in parallel for each entropy slice, and generates decoded image data. At that time, as in the case of the image decoding apparatus 200, the MPEG decoder 1017 divides the pre-encoding image corresponding to the encoded data to be decoded into a plurality (even number) of regions arranged vertically. Then, the MPEG decoder 1017 decodes the encoded data corresponding to the even-numbered regions from the top in the order from the top macroblock line to the bottom, as in the past, and left one macroblock to be processed as a peripheral macroblock. The macroblock and the macroblock one level above are referenced.

これに対して、上から奇数番目の領域に対応する符号化データについては、MPEGデコーダ1017は、従来とは逆に、下のマクロブロックラインから上に向かう順に復号し、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ下のマクロブロックを参照する。   On the other hand, for the encoded data corresponding to the odd-numbered area from the top, the MPEG decoder 1017 decodes in order from the bottom macroblock line to the top, contrary to the conventional case, and processes it as a peripheral macroblock. Reference is made to the macro block one left of the macro block and the macro block one level below.

さらに、MPEGデコーダ1017は、上から奇数番目の領域の一番下のマクロブロックラインに対応する符号化データの復号が終了した時点で、その1つ下の(上から偶数番目の)領域の符号化データについての復号処理を開始する。   Further, when the decoding of the encoded data corresponding to the bottommost macroblock line in the odd-numbered area from the top is completed, the MPEG decoder 1017 encodes the code in the area one lower (even from the top). The decoding process for the digitized data is started.

また、このとき、MPEGデコーダ1017は、上から奇数番目の領域の一番下のマクロブロックラインを参照して、その1つ下の(上から偶数番目の)領域の一番上のマクロブロックラインに対応する符号化データについての復号処理を行う。   At this time, the MPEG decoder 1017 refers to the bottom macroblock line in the odd-numbered area from the top, and the top macroblock line in the area one lower (even from the top). The decoding process is performed on the encoded data corresponding to.

したがって、MPEGデコーダ1017は、符号化効率の低減を抑制させながら、画像符号化の高速化を実現することができる。   Therefore, the MPEG decoder 1017 can realize high-speed image encoding while suppressing reduction in encoding efficiency.

MPEGデコーダ1017から供給された映像データは、ビデオデコーダ1015から供給された映像データの場合と同様に、映像信号処理回路1018において所定の処理が施され、グラフィック生成回路1019において、生成された映像データ等が適宜重畳され、パネル駆動回路1020を介して表示パネル1021に供給され、その画像が表示される。   The video data supplied from the MPEG decoder 1017 is subjected to predetermined processing in the video signal processing circuit 1018 as in the case of the video data supplied from the video decoder 1015, and the generated video data in the graphic generation circuit 1019. Are appropriately superimposed and supplied to the display panel 1021 via the panel drive circuit 1020, and the image is displayed.

MPEGデコーダ1017から供給された音声データは、音声A/D変換回路1014から供給された音声データの場合と同様に、音声信号処理回路1022において所定の処理が施され、エコーキャンセル/音声合成回路1023を介して音声増幅回路1024に供給され、D/A変換処理や増幅処理が施される。その結果、所定の音量に調整された音声がスピーカ1025から出力される。   The audio data supplied from the MPEG decoder 1017 is subjected to predetermined processing in the audio signal processing circuit 1022 as in the case of the audio data supplied from the audio A / D conversion circuit 1014, and an echo cancellation / audio synthesis circuit 1023. Are supplied to the audio amplifier circuit 1024 through which D / A conversion processing and amplification processing are performed. As a result, sound adjusted to a predetermined volume is output from the speaker 1025.

また、テレビジョン受像機1000は、マイクロホン1026、およびA/D変換回路1027も有する。   The television receiver 1000 also includes a microphone 1026 and an A / D conversion circuit 1027.

A/D変換回路1027は、音声会話用のものとしてテレビジョン受像機1000に設けられるマイクロホン1026により取り込まれたユーザの音声の信号を受信し、受信した音声信号に対してA/D変換処理を施し、得られたデジタルの音声データをエコーキャンセル/音声合成回路1023に供給する。   The A / D conversion circuit 1027 receives a user's voice signal captured by a microphone 1026 provided in the television receiver 1000 for voice conversation, and performs A / D conversion processing on the received voice signal. The obtained digital audio data is supplied to the echo cancellation / audio synthesis circuit 1023.

エコーキャンセル/音声合成回路1023は、テレビジョン受像機1000のユーザ(ユーザA)の音声のデータがA/D変換回路1027から供給されている場合、ユーザAの音声データを対象としてエコーキャンセルを行い、他の音声データと合成するなどして得られた音声のデータを、音声増幅回路1024を介してスピーカ1025より出力させる。   When the audio data of the user (user A) of the television receiver 1000 is supplied from the A / D conversion circuit 1027, the echo cancellation / audio synthesis circuit 1023 performs echo cancellation on the audio data of the user A. The voice data obtained by combining with other voice data is output from the speaker 1025 via the voice amplifier circuit 1024.

さらに、テレビジョン受像機1000は、音声コーデック1028、内部バス1029、SDRAM(Synchronous Dynamic Random Access Memory)1030、フラッシュメモリ1031、CPU1032、USB(Universal Serial Bus) I/F1033、およびネットワークI/F1034も有する。   The television receiver 1000 further includes an audio codec 1028, an internal bus 1029, an SDRAM (Synchronous Dynamic Random Access Memory) 1030, a flash memory 1031, a CPU 1032, a USB (Universal Serial Bus) I / F 1033, and a network I / F 1034. .

A/D変換回路1027は、音声会話用のものとしてテレビジョン受像機1000に設けられるマイクロホン1026により取り込まれたユーザの音声の信号を受信し、受信した音声信号に対してA/D変換処理を施し、得られたデジタルの音声データを音声コーデック1028に供給する。   The A / D conversion circuit 1027 receives a user's voice signal captured by a microphone 1026 provided in the television receiver 1000 for voice conversation, and performs A / D conversion processing on the received voice signal. The obtained digital audio data is supplied to the audio codec 1028.

音声コーデック1028は、A/D変換回路1027から供給された音声データを、ネットワーク経由で送信するための所定のフォーマットのデータに変換し、内部バス1029を介してネットワークI/F1034に供給する。   The audio codec 1028 converts the audio data supplied from the A / D conversion circuit 1027 into data of a predetermined format for transmission via the network, and supplies the data to the network I / F 1034 via the internal bus 1029.

ネットワークI/F1034は、ネットワーク端子1035に装着されたケーブルを介してネットワークに接続される。ネットワークI/F1034は、例えば、そのネットワークに接続される他の装置に対して、音声コーデック1028から供給された音声データを送信する。また、ネットワークI/F1034は、例えば、ネットワークを介して接続される他の装置から送信される音声データを、ネットワーク端子1035を介して受信し、それを、内部バス1029を介して音声コーデック1028に供給する。   The network I / F 1034 is connected to the network via a cable attached to the network terminal 1035. For example, the network I / F 1034 transmits the audio data supplied from the audio codec 1028 to another device connected to the network. In addition, the network I / F 1034 receives, for example, audio data transmitted from another device connected via the network via the network terminal 1035, and receives the audio data via the internal bus 1029 to the audio codec 1028. Supply.

音声コーデック1028は、ネットワークI/F1034から供給された音声データを所定のフォーマットのデータに変換し、それをエコーキャンセル/音声合成回路1023に供給する。   The audio codec 1028 converts the audio data supplied from the network I / F 1034 into data of a predetermined format, and supplies it to the echo cancellation / audio synthesis circuit 1023.

エコーキャンセル/音声合成回路1023は、音声コーデック1028から供給される音声データを対象としてエコーキャンセルを行い、他の音声データと合成するなどして得られた音声のデータを、音声増幅回路1024を介してスピーカ1025より出力させる。   The echo cancellation / speech synthesis circuit 1023 performs echo cancellation on the speech data supplied from the speech codec 1028, and synthesizes speech data obtained by combining with other speech data via the speech amplification circuit 1024. And output from the speaker 1025.

SDRAM1030は、CPU1032が処理を行う上で必要な各種のデータを記憶する。   The SDRAM 1030 stores various data necessary for the CPU 1032 to perform processing.

フラッシュメモリ1031は、CPU1032により実行されるプログラムを記憶する。フラッシュメモリ1031に記憶されているプログラムは、テレビジョン受像機1000の起動時などの所定のタイミングでCPU1032により読み出される。フラッシュメモリ1031には、デジタル放送を介して取得されたEPGデータ、ネットワークを介して所定のサーバから取得されたデータなども記憶される。   The flash memory 1031 stores a program executed by the CPU 1032. The program stored in the flash memory 1031 is read by the CPU 1032 at a predetermined timing such as when the television receiver 1000 is activated. The flash memory 1031 also stores EPG data acquired via digital broadcasting, data acquired from a predetermined server via a network, and the like.

例えば、フラッシュメモリ1031には、CPU1032の制御によりネットワークを介して所定のサーバから取得されたコンテンツデータを含むMPEG-TSが記憶される。フラッシュメモリ1031は、例えばCPU1032の制御により、そのMPEG-TSを、内部バス1029を介してMPEGデコーダ1017に供給する。   For example, the flash memory 1031 stores MPEG-TS including content data acquired from a predetermined server via a network under the control of the CPU 1032. The flash memory 1031 supplies the MPEG-TS to the MPEG decoder 1017 via the internal bus 1029, for example, under the control of the CPU 1032.

MPEGデコーダ1017は、デジタルチューナ1016から供給されたMPEG-TSの場合と同様に、そのMPEG-TSを処理する。このようにテレビジョン受像機1000は、映像や音声等よりなるコンテンツデータを、ネットワークを介して受信し、MPEGデコーダ1017を用いてデコードし、その映像を表示させたり、音声を出力させたりすることができる。   The MPEG decoder 1017 processes the MPEG-TS as in the case of the MPEG-TS supplied from the digital tuner 1016. In this way, the television receiver 1000 receives content data including video and audio via the network, decodes it using the MPEG decoder 1017, displays the video, and outputs audio. Can do.

また、テレビジョン受像機1000は、リモートコントローラ1051から送信される赤外線信号を受光する受光部1037も有する。   The television receiver 1000 also includes a light receiving unit 1037 that receives an infrared signal transmitted from the remote controller 1051.

受光部1037は、リモートコントローラ1051からの赤外線を受光し、復調して得られたユーザ操作の内容を表す制御コードをCPU1032に出力する。   The light receiving unit 1037 receives infrared light from the remote controller 1051 and outputs a control code representing the content of the user operation obtained by demodulation to the CPU 1032.

CPU1032は、フラッシュメモリ1031に記憶されているプログラムを実行し、受光部1037から供給される制御コードなどに応じてテレビジョン受像機1000の全体の動作を制御する。CPU1032とテレビジョン受像機1000の各部は、図示せぬ経路を介して接続されている。   The CPU 1032 executes a program stored in the flash memory 1031 and controls the overall operation of the television receiver 1000 according to a control code supplied from the light receiving unit 1037. The CPU 1032 and each part of the television receiver 1000 are connected via a path (not shown).

USB I/F1033は、USB端子1036に装着されたUSBケーブルを介して接続される、テレビジョン受像機1000の外部の機器との間でデータの送受信を行う。ネットワークI/F1034は、ネットワーク端子1035に装着されたケーブルを介してネットワークに接続し、ネットワークに接続される各種の装置と音声データ以外のデータの送受信も行う。   The USB I / F 1033 transmits and receives data to and from a device external to the television receiver 1000 connected via a USB cable attached to the USB terminal 1036. The network I / F 1034 is connected to the network via a cable attached to the network terminal 1035, and transmits / receives data other than audio data to / from various devices connected to the network.

テレビジョン受像機1000は、MPEGデコーダ1017として画像復号装置200を用いることにより、符号化効率の低減を抑制させながら高速に符号化された符号化データを正しく復号することができる。その結果として、テレビジョン受像機1000は、アンテナを介して受信する放送波信号や、ネットワークを介して取得するコンテンツデータの復号を高速に行うことができ、リアルタイム処理をより低いコストで実現することができる。   By using the image decoding apparatus 200 as the MPEG decoder 1017, the television receiver 1000 can correctly decode encoded data encoded at high speed while suppressing a decrease in encoding efficiency. As a result, the television receiver 1000 can perform high-speed decoding of broadcast wave signals received via an antenna and content data obtained via a network, and realize real-time processing at a lower cost. Can do.

<6.第6の実施の形態>
[携帯電話機]
図28は、本発明を適用した画像符号化装置100および画像復号装置200を用いる携帯電話機の主な構成例を示すブロック図である。
<6. Sixth Embodiment>
[Mobile phone]
FIG. 28 is a block diagram illustrating a main configuration example of a mobile phone using the image encoding device 100 and the image decoding device 200 to which the present invention is applied.

図28に示される携帯電話機1100は、各部を統括的に制御するようになされた主制御部1150、電源回路部1151、操作入力制御部1152、画像エンコーダ1153、カメラI/F部1154、LCD制御部1155、画像デコーダ1156、多重分離部1157、記録再生部1162、変復調回路部1158、および音声コーデック1159を有する。これらは、バス1160を介して互いに接続されている。   A mobile phone 1100 shown in FIG. 28 has a main control unit 1150, a power supply circuit unit 1151, an operation input control unit 1152, an image encoder 1153, a camera I / F unit 1154, an LCD control, which are configured to control each unit in an integrated manner. Section 1155, image decoder 1156, demultiplexing section 1157, recording / reproducing section 1162, modulation / demodulation circuit section 1158, and audio codec 1159. These are connected to each other via a bus 1160.

また、携帯電話機1100は、操作キー1119、CCD(Charge Coupled Devices)カメラ1116、液晶ディスプレイ1118、記憶部1123、送受信回路部1163、アンテナ1114、マイクロホン(マイク)1121、およびスピーカ1117を有する。   The mobile phone 1100 includes an operation key 1119, a CCD (Charge Coupled Devices) camera 1116, a liquid crystal display 1118, a storage unit 1123, a transmission / reception circuit unit 1163, an antenna 1114, a microphone (microphone) 1121, and a speaker 1117.

電源回路部1151は、ユーザの操作により終話および電源キーがオン状態にされると、バッテリパックから各部に対して電力を供給することにより携帯電話機1100を動作可能な状態に起動する。   When the end call and the power key are turned on by the user's operation, the power supply circuit unit 1151 starts up the mobile phone 1100 in an operable state by supplying power from the battery pack to each unit.

携帯電話機1100は、CPU、ROMおよびRAM等でなる主制御部1150の制御に基づいて、音声通話モードやデータ通信モード等の各種モードで、音声信号の送受信、電子メールや画像データの送受信、画像撮影、またはデータ記録等の各種動作を行う。   The mobile phone 1100 transmits and receives voice signals, e-mails and image data, and images in various modes such as a voice call mode and a data communication mode based on the control of the main control unit 1150 including a CPU, a ROM, a RAM, and the like. Various operations such as shooting or data recording are performed.

例えば、音声通話モードにおいて、携帯電話機1100は、マイクロホン(マイク)1121で集音した音声信号を、音声コーデック1159によってデジタル音声データに変換し、これを変復調回路部1158でスペクトラム拡散処理し、送受信回路部1163でデジタルアナログ変換処理および周波数変換処理する。携帯電話機1100は、その変換処理により得られた送信用信号を、アンテナ1114を介して図示しない基地局へ送信する。基地局へ伝送された送信用信号(音声信号)は、公衆電話回線網を介して通話相手の携帯電話機に供給される。   For example, in the voice call mode, the mobile phone 1100 converts the voice signal collected by the microphone (microphone) 1121 into digital voice data by the voice codec 1159, performs spectrum spread processing by the modulation / demodulation circuit unit 1158, and transmits and receives The unit 1163 performs digital / analog conversion processing and frequency conversion processing. The cellular phone 1100 transmits the transmission signal obtained by the conversion process to a base station (not shown) via the antenna 1114. The transmission signal (voice signal) transmitted to the base station is supplied to the mobile phone of the other party via the public telephone line network.

また、例えば、音声通話モードにおいて、携帯電話機1100は、アンテナ1114で受信した受信信号を送受信回路部1163で増幅し、さらに周波数変換処理およびアナログデジタル変換処理し、変復調回路部1158でスペクトラム逆拡散処理し、音声コーデック1159によってアナログ音声信号に変換する。携帯電話機1100は、その変換して得られたアナログ音声信号をスピーカ1117から出力する。   Further, for example, in the voice call mode, the cellular phone 1100 amplifies the received signal received by the antenna 1114 by the transmission / reception circuit unit 1163, further performs frequency conversion processing and analog-digital conversion processing, and performs spectrum despreading processing by the modulation / demodulation circuit unit 1158. Then, the audio codec 1159 converts it into an analog audio signal. The cellular phone 1100 outputs an analog audio signal obtained by the conversion from the speaker 1117.

更に、例えば、データ通信モードにおいて電子メールを送信する場合、携帯電話機1100は、操作キー1119の操作によって入力された電子メールのテキストデータを、操作入力制御部1152において受け付ける。携帯電話機1100は、そのテキストデータを主制御部1150において処理し、LCD制御部1155を介して、画像として液晶ディスプレイ1118に表示させる。   Further, for example, when transmitting an e-mail in the data communication mode, the mobile phone 1100 receives e-mail text data input by operating the operation key 1119 in the operation input control unit 1152. The cellular phone 1100 processes the text data in the main control unit 1150 and displays it on the liquid crystal display 1118 as an image via the LCD control unit 1155.

また、携帯電話機1100は、主制御部1150において、操作入力制御部1152が受け付けたテキストデータやユーザ指示等に基づいて電子メールデータを生成する。携帯電話機1100は、その電子メールデータを、変復調回路部1158でスペクトラム拡散処理し、送受信回路部1163でデジタルアナログ変換処理および周波数変換処理する。携帯電話機1100は、その変換処理により得られた送信用信号を、アンテナ1114を介して図示しない基地局へ送信する。基地局へ伝送された送信用信号(電子メール)は、ネットワークおよびメールサーバ等を介して、所定のあて先に供給される。   In addition, the mobile phone 1100 generates e-mail data in the main control unit 1150 based on text data received by the operation input control unit 1152, user instructions, and the like. The cellular phone 1100 performs spread spectrum processing on the e-mail data by the modulation / demodulation circuit unit 1158 and digital / analog conversion processing and frequency conversion processing by the transmission / reception circuit unit 1163. The cellular phone 1100 transmits the transmission signal obtained by the conversion process to a base station (not shown) via the antenna 1114. The transmission signal (e-mail) transmitted to the base station is supplied to a predetermined destination via a network and a mail server.

また、例えば、データ通信モードにおいて電子メールを受信する場合、携帯電話機1100は、基地局から送信された信号を、アンテナ1114を介して送受信回路部1163で受信し、増幅し、さらに周波数変換処理およびアナログデジタル変換処理する。携帯電話機1100は、その受信信号を変復調回路部1158でスペクトラム逆拡散処理して元の電子メールデータを復元する。携帯電話機1100は、復元された電子メールデータを、LCD制御部1155を介して液晶ディスプレイ1118に表示する。   Further, for example, when receiving an e-mail in the data communication mode, the mobile phone 1100 receives and amplifies the signal transmitted from the base station by the transmission / reception circuit unit 1163 via the antenna 1114, and further performs frequency conversion processing and Analog-digital conversion processing. The cellular phone 1100 performs spectrum despreading processing on the received signal by the modulation / demodulation circuit unit 1158 to restore the original e-mail data. The cellular phone 1100 displays the restored e-mail data on the liquid crystal display 1118 via the LCD control unit 1155.

なお、携帯電話機1100は、受信した電子メールデータを、記録再生部1162を介して、記憶部1123に記録する(記憶させる)ことも可能である。   Note that the mobile phone 1100 can also record (store) the received e-mail data in the storage unit 1123 via the recording / playback unit 1162.

この記憶部1123は、書き換え可能な任意の記憶媒体である。記憶部1123は、例えば、RAMや内蔵型フラッシュメモリ等の半導体メモリであってもよいし、ハードディスクであってもよいし、磁気ディスク、光磁気ディスク、光ディスク、USBメモリ、またはメモリカード等のリムーバブルメディアであってもよい。もちろん、これら以外のものであってもよい。   The storage unit 1123 is an arbitrary rewritable storage medium. The storage unit 1123 may be, for example, a semiconductor memory such as a RAM or a built-in flash memory, a hard disk, or a removable disk such as a magnetic disk, a magneto-optical disk, an optical disk, a USB memory, or a memory card. It may be media. Of course, other than these may be used.

さらに、例えば、データ通信モードにおいて画像データを送信する場合、携帯電話機1100は、撮像によりCCDカメラ1116で画像データを生成する。CCDカメラ1116は、レンズや絞り等の光学デバイスと光電変換素子としてのCCDを有し、被写体を撮像し、受光した光の強度を電気信号に変換し、被写体の画像の画像データを生成する。CCDカメラ1116は、その画像データを、カメラI/F部1154を介して、画像エンコーダ1153で符号化し、符号化画像データに変換する。   Furthermore, for example, when transmitting image data in the data communication mode, the mobile phone 1100 generates image data with the CCD camera 1116 by imaging. The CCD camera 1116 has an optical device such as a lens and a diaphragm and a CCD as a photoelectric conversion element, images a subject, converts the intensity of received light into an electrical signal, and generates image data of the subject image. The CCD camera 1116 encodes the image data by the image encoder 1153 via the camera I / F unit 1154 and converts the encoded image data into encoded image data.

携帯電話機1100は、このような処理を行う画像エンコーダ1153として、上述した画像符号化装置100を用いる。画像エンコーダ1153は、画像符号化装置100の場合と同様に、符号化対象の画像を、上下に並ぶ複数(偶数個)の領域に分割する。そして、画像エンコーダ1153は、上から偶数番目の領域については、従来どおり、上のマクロブロックラインから下に向かう順に符号化を行い、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ上のマクロブロックを参照する。   The cellular phone 1100 uses the above-described image encoding device 100 as the image encoder 1153 that performs such processing. The image encoder 1153 divides the image to be encoded into a plurality of (even number) regions arranged in the vertical direction as in the case of the image encoding device 100. Then, the image encoder 1153 encodes the even-numbered regions from the top in the order from the top macroblock line to the bottom in the conventional manner, and sets the macroblock one left of the processing target macroblock as the peripheral macroblock. Refers to the next higher macroblock.

これに対して、上から奇数番目の領域については、画像エンコーダ1153は、従来とは逆に、下のマクロブロックラインから上に向かう順に符号化を行い、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ下のマクロブロックを参照する。   On the other hand, in the odd-numbered area from the top, the image encoder 1153 performs coding in the order from the bottom macroblock line to the top, contrary to the conventional case, and sets 1 of the processing target macroblock as a peripheral macroblock. Refers to the left macroblock and the next lower macroblock.

さらに、画像エンコーダ1153は、上から奇数番目の領域の一番下のマクロブロックラインの符号化が終了した時点で、その1つ下の(上から偶数番目の)領域についての符号化処理を開始する。   Further, the image encoder 1153 starts encoding processing for the next lower (even number from the top) area when encoding of the bottommost macroblock line in the odd numbered area from the top is completed. To do.

また、このとき、画像エンコーダ1153は、上から奇数番目の領域の一番下のマクロブロックラインを参照して、その1つ下の(上から偶数番目の)領域の一番上のマクロブロックラインについての符号化処理を行う。   At this time, the image encoder 1153 refers to the bottom macroblock line in the odd-numbered area from the top, and the top macroblock line in the area one level lower (even from the top). The encoding process for is performed.

このような符号化を行うことにより、画像エンコーダ1153は、符号化効率の低減を抑制させながら、画像符号化の高速化を実現することができる。   By performing such encoding, the image encoder 1153 can realize high-speed image encoding while suppressing reduction in encoding efficiency.

なお、携帯電話機1100は、このとき同時に、CCDカメラ1116で撮像中にマイクロホン(マイク)1121で集音した音声を、音声コーデック1159においてアナログデジタル変換し、さらに符号化する。   At the same time, the cellular phone 1100 converts the sound collected by the microphone (microphone) 1121 during imaging by the CCD camera 1116 from analog to digital at the audio codec 1159 and further encodes it.

携帯電話機1100は、多重分離部1157において、画像エンコーダ1153から供給された符号化画像データと、音声コーデック1159から供給されたデジタル音声データとを、所定の方式で多重化する。携帯電話機1100は、その結果得られる多重化データを、変復調回路部1158でスペクトラム拡散処理し、送受信回路部1163でデジタルアナログ変換処理および周波数変換処理する。携帯電話機1100は、その変換処理により得られた送信用信号を、アンテナ1114を介して図示しない基地局へ送信する。基地局へ伝送された送信用信号(画像データ)は、ネットワーク等を介して、通信相手に供給される。   The cellular phone 1100 multiplexes the encoded image data supplied from the image encoder 1153 and the digital audio data supplied from the audio codec 1159 in a demultiplexing unit 1157 using a predetermined method. The cellular phone 1100 performs spread spectrum processing on the multiplexed data obtained as a result by the modulation / demodulation circuit unit 1158 and digital / analog conversion processing and frequency conversion processing by the transmission / reception circuit unit 1163. The cellular phone 1100 transmits the transmission signal obtained by the conversion process to a base station (not shown) via the antenna 1114. A transmission signal (image data) transmitted to the base station is supplied to a communication partner via a network or the like.

なお、画像データを送信しない場合、携帯電話機1100は、CCDカメラ1116で生成した画像データを、画像エンコーダ1153を介さずに、LCD制御部1155を介して液晶ディスプレイ1118に表示させることもできる。   When image data is not transmitted, the mobile phone 1100 can also display the image data generated by the CCD camera 1116 on the liquid crystal display 1118 via the LCD control unit 1155 without using the image encoder 1153.

また、例えば、データ通信モードにおいて、簡易ホームページ等にリンクされた動画像ファイルのデータを受信する場合、携帯電話機1100は、基地局から送信された信号を、アンテナ1114を介して送受信回路部1163で受信し、増幅し、さらに周波数変換処理およびアナログデジタル変換処理する。携帯電話機1100は、その受信信号を変復調回路部1158でスペクトラム逆拡散処理して元の多重化データを復元する。携帯電話機1100は、多重分離部1157において、その多重化データを分離して、符号化画像データと音声データとに分ける。   Further, for example, when receiving data of a moving image file linked to a simple homepage or the like in the data communication mode, the mobile phone 1100 transmits a signal transmitted from the base station to the transmission / reception circuit unit 1163 via the antenna 1114. Receive, amplify, and further perform frequency conversion processing and analog-digital conversion processing. The cellular phone 1100 restores the original multiplexed data by subjecting the received signal to spectrum despreading processing by the modulation / demodulation circuit unit 1158. In the cellular phone 1100, the demultiplexing unit 1157 separates the multiplexed data and divides it into encoded image data and audio data.

携帯電話機1100は、画像デコーダ1156において符号化画像データをデコードすることにより、再生動画像データを生成し、これを、LCD制御部1155を介して液晶ディスプレイ1118に表示させる。これにより、例えば、簡易ホームページにリンクされた動画像ファイルに含まれる動画データが液晶ディスプレイ1118に表示される。   The cellular phone 1100 generates reproduced moving image data by decoding the encoded image data in the image decoder 1156, and displays it on the liquid crystal display 1118 via the LCD control unit 1155. Thereby, for example, the moving image data included in the moving image file linked to the simple homepage is displayed on the liquid crystal display 1118.

携帯電話機1100は、このような処理を行う画像デコーダ1156として、上述した画像復号装置200を用いる。つまり、画像デコーダ1156は、画像復号装置200の場合と同様に、画像符号化装置100より供給される符号化データをエントロピスライス毎に並行して復号し、復号画像データを生成する。そのとき、画像デコーダ1156は、画像復号装置200の場合と同様に、復号対象の符号化データに対応する符号化前の画像を、上下に並ぶ複数(偶数個)の領域に分割する。そして、画像デコーダ1156は、上から偶数番目の領域に対応する符号化データについては、従来どおり、上のマクロブロックラインから下に向かう順に復号し、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ上のマクロブロックを参照する。   The cellular phone 1100 uses the above-described image decoding device 200 as the image decoder 1156 that performs such processing. That is, as in the case of the image decoding device 200, the image decoder 1156 decodes the encoded data supplied from the image encoding device 100 in parallel for each entropy slice, and generates decoded image data. At that time, as in the case of the image decoding apparatus 200, the image decoder 1156 divides the pre-encoding image corresponding to the encoded data to be decoded into a plurality of (even number) regions arranged vertically. Then, the image decoder 1156 decodes the encoded data corresponding to the even-numbered regions from the top in the order from the top macroblock line to the bottom as in the past, and left one macroblock to be processed as a peripheral macroblock. The macroblock and the macroblock one level above are referenced.

これに対して、上から奇数番目の領域に対応する符号化データについては、画像デコーダ1156は、従来とは逆に、下のマクロブロックラインから上に向かう順に復号し、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ下のマクロブロックを参照する。   On the other hand, for the encoded data corresponding to the odd-numbered region from the top, the image decoder 1156 decodes in order from the bottom macroblock line to the top, contrary to the conventional case, and is processed as a peripheral macroblock. Reference is made to the macro block one left of the macro block and the macro block one level below.

さらに、画像デコーダ1156は、上から奇数番目の領域の一番下のマクロブロックラインに対応する符号化データの復号が終了した時点で、その1つ下の(上から偶数番目の)領域の符号化データについての復号処理を開始する。   Furthermore, when the decoding of the encoded data corresponding to the lowermost macroblock line in the odd-numbered area from the top is completed, the image decoder 1156 encodes the code of the area below it (even-numbered from the top). The decoding process for the digitized data is started.

また、このとき、画像デコーダ1156は、上から奇数番目の領域の一番下のマクロブロックラインを参照して、その1つ下の(上から偶数番目の)領域の一番上のマクロブロックラインに対応する符号化データについての復号処理を行う。   At this time, the image decoder 1156 refers to the bottom macroblock line in the odd-numbered area from the top, and the top macroblock line in the area one lower (even from the top). The decoding process is performed on the encoded data corresponding to.

したがって、画像デコーダ1156は、符号化効率の低減を抑制させながら、画像符号化の高速化を実現することができる。   Therefore, the image decoder 1156 can realize high-speed image encoding while suppressing a decrease in encoding efficiency.

このとき、携帯電話機1100は、同時に、音声コーデック1159において、デジタルの音声データをアナログ音声信号に変換し、これをスピーカ1117より出力させる。これにより、例えば、簡易ホームページにリンクされた動画像ファイルに含まれる音声データが再生される。   At this time, the cellular phone 1100 simultaneously converts digital audio data into an analog audio signal in the audio codec 1159 and outputs the analog audio signal from the speaker 1117. Thereby, for example, audio data included in the moving image file linked to the simple homepage is reproduced.

なお、電子メールの場合と同様に、携帯電話機1100は、受信した簡易ホームページ等にリンクされたデータを、記録再生部1162を介して、記憶部1123に記録する(記憶させる)ことも可能である。   As in the case of e-mail, the mobile phone 1100 can record (store) the data linked to the received simplified home page in the storage unit 1123 via the recording / playback unit 1162. .

また、携帯電話機1100は、主制御部1150において、撮像されてCCDカメラ1116で得られた2次元コードを解析し、2次元コードに記録された情報を取得することができる。   Further, the mobile phone 1100 can analyze the two-dimensional code captured by the CCD camera 1116 and acquire information recorded in the two-dimensional code in the main control unit 1150.

さらに、携帯電話機1100は、赤外線通信部1181で赤外線により外部の機器と通信することができる。   Further, the cellular phone 1100 can communicate with an external device by infrared rays at the infrared communication unit 1181.

携帯電話機1100は、画像エンコーダ1153として画像符号化装置100を用いることにより、例えばCCDカメラ1116において生成された画像データを符号化して伝送する際の、画像符号化の高速化による符号化効率の低減を抑制させることができる。その結果として、携帯電話機1100は、リアルタイム処理をより低いコストで実現することができる。   The cellular phone 1100 uses the image encoding device 100 as the image encoder 1153, thereby reducing the encoding efficiency by speeding up the image encoding when the image data generated by the CCD camera 1116 is encoded and transmitted, for example. Can be suppressed. As a result, the mobile phone 1100 can realize real-time processing at a lower cost.

また、携帯電話機1100は、画像デコーダ1156として画像復号装置200を用いることにより、例えば、簡易ホームページ等にリンクされた動画像ファイルのデータ(符号化効率の低減を抑制させながら高速に符号化された符号化データ)を正しく復号させることができ、リアルタイム処理をより低いコストで実現することができる。   In addition, the mobile phone 1100 uses the image decoding apparatus 200 as the image decoder 1156, for example, data of a moving image file linked to a simple homepage or the like (encoded at high speed while suppressing reduction in encoding efficiency). Encoded data) can be correctly decoded, and real-time processing can be realized at a lower cost.

なお、以上において、携帯電話機1100が、CCDカメラ1116を用いるように説明したが、このCCDカメラ1116の代わりに、CMOS(Complementary Metal Oxide Semiconductor)を用いたイメージセンサ(CMOSイメージセンサ)を用いるようにしてもよい。この場合も、携帯電話機1100は、CCDカメラ1116を用いる場合と同様に、被写体を撮像し、被写体の画像の画像データを生成することができる。   In the above description, the mobile phone 1100 is described as using the CCD camera 1116. However, instead of the CCD camera 1116, an image sensor (CMOS image sensor) using a CMOS (Complementary Metal Oxide Semiconductor) is used. May be. Also in this case, the mobile phone 1100 can capture an image of a subject and generate image data of the image of the subject, as in the case where the CCD camera 1116 is used.

また、以上においては携帯電話機1100として説明したが、例えば、PDA(Personal Digital Assistants)、スマートフォン、UMPC(Ultra Mobile Personal Computer)、ネットブック、ノート型パーソナルコンピュータ等、この携帯電話機1100と同様の撮像機能や通信機能を有する装置であれば、どのような装置であっても携帯電話機1100の場合と同様に、画像符号化装置100および画像復号装置200を適用することができる。   In the above description, the mobile phone 1100 has been described. For example, PDA (Personal Digital Assistants), a smartphone, an UMPC (Ultra Mobile Personal Computer), a netbook, a notebook personal computer, and the like. As long as it is a device having a communication function, the image encoding device 100 and the image decoding device 200 can be applied to any device as in the case of the mobile phone 1100.

<7.第7の実施の形態>
[ハードディスクレコーダ]
図29は、本発明を適用した画像符号化装置100および画像復号装置200を用いるハードディスクレコーダの主な構成例を示すブロック図である。
<7. Seventh Embodiment>
[Hard Disk Recorder]
FIG. 29 is a block diagram illustrating a main configuration example of a hard disk recorder using the image encoding device 100 and the image decoding device 200 to which the present invention is applied.

図29に示されるハードディスクレコーダ(HDDレコーダ)1200は、チューナにより受信された、衛星や地上のアンテナ等より送信される放送波信号(テレビジョン信号)に含まれる放送番組のオーディオデータとビデオデータを、内蔵するハードディスクに保存し、その保存したデータをユーザの指示に応じたタイミングでユーザに提供する装置である。   A hard disk recorder (HDD recorder) 1200 shown in FIG. 29 receives audio data and video data of a broadcast program included in a broadcast wave signal (television signal) transmitted from a satellite or a ground antenna received by a tuner. This is an apparatus for storing in a built-in hard disk and providing the stored data to the user at a timing according to the user's instruction.

ハードディスクレコーダ1200は、例えば、放送波信号よりオーディオデータとビデオデータを抽出し、それらを適宜復号し、内蔵するハードディスクに記憶させることができる。また、ハードディスクレコーダ1200は、例えば、ネットワークを介して他の装置からオーディオデータやビデオデータを取得し、それらを適宜復号し、内蔵するハードディスクに記憶させることもできる。   The hard disk recorder 1200 can extract, for example, audio data and video data from broadcast wave signals, appropriately decode them, and store them in a built-in hard disk. The hard disk recorder 1200 can also acquire audio data and video data from other devices via a network, for example, decode them as appropriate, and store them in a built-in hard disk.

さらに、ハードディスクレコーダ1200は、例えば、内蔵するハードディスクに記録されているオーディオデータやビデオデータを復号してモニタ1260に供給し、モニタ1260の画面にその画像を表示させ、モニタ1260のスピーカよりその音声を出力させることができる。また、ハードディスクレコーダ1200は、例えば、チューナを介して取得された放送波信号より抽出されたオーディオデータとビデオデータ、または、ネットワークを介して他の装置から取得したオーディオデータやビデオデータを復号してモニタ1260に供給し、モニタ1260の画面にその画像を表示させ、モニタ1260のスピーカよりその音声を出力させることもできる。   Further, the hard disk recorder 1200, for example, decodes audio data and video data recorded on the built-in hard disk, supplies them to the monitor 1260, displays the image on the screen of the monitor 1260, and displays the sound from the speaker of the monitor 1260. Can be output. Further, the hard disk recorder 1200 decodes audio data and video data extracted from a broadcast wave signal acquired via a tuner, or audio data and video data acquired from another device via a network, for example. The image can be supplied to the monitor 1260, the image can be displayed on the screen of the monitor 1260, and the sound can be output from the speaker of the monitor 1260.

もちろん、この他の動作も可能である。   Of course, other operations are possible.

図29に示されるように、ハードディスクレコーダ1200は、受信部1221、復調部1222、デマルチプレクサ1223、オーディオデコーダ1224、ビデオデコーダ1225、およびレコーダ制御部1226を有する。ハードディスクレコーダ1200は、さらに、EPGデータメモリ1227、プログラムメモリ1228、ワークメモリ1229、ディスプレイコンバータ1230、OSD(On Screen Display)制御部1231、ディスプレイ制御部1232、記録再生部1233、D/Aコンバータ1234、および通信部1235を有する。   As illustrated in FIG. 29, the hard disk recorder 1200 includes a receiving unit 1221, a demodulating unit 1222, a demultiplexer 1223, an audio decoder 1224, a video decoder 1225, and a recorder control unit 1226. The hard disk recorder 1200 further includes an EPG data memory 1227, a program memory 1228, a work memory 1229, a display converter 1230, an OSD (On Screen Display) control unit 1231, a display control unit 1232, a recording / playback unit 1233, a D / A converter 1234, And a communication unit 1235.

また、ディスプレイコンバータ1230は、ビデオエンコーダ1241を有する。記録再生部1233は、エンコーダ1251およびデコーダ1252を有する。   In addition, the display converter 1230 includes a video encoder 1241. The recording / playback unit 1233 includes an encoder 1251 and a decoder 1252.

受信部1221は、リモートコントローラ(図示せず)からの赤外線信号を受信し、電気信号に変換してレコーダ制御部1226に出力する。レコーダ制御部1226は、例えば、マイクロプロセッサなどにより構成され、プログラムメモリ1228に記憶されているプログラムに従って、各種の処理を実行する。レコーダ制御部1226は、このとき、ワークメモリ1229を必要に応じて使用する。   The receiving unit 1221 receives an infrared signal from a remote controller (not shown), converts it into an electrical signal, and outputs it to the recorder control unit 1226. The recorder control unit 1226 is constituted by, for example, a microprocessor and executes various processes according to a program stored in the program memory 1228. At this time, the recorder control unit 1226 uses the work memory 1229 as necessary.

通信部1235は、ネットワークに接続され、ネットワークを介して他の装置との通信処理を行う。例えば、通信部1235は、レコーダ制御部1226により制御され、チューナ(図示せず)と通信し、主にチューナに対して選局制御信号を出力する。   The communication unit 1235 is connected to a network and performs communication processing with other devices via the network. For example, the communication unit 1235 is controlled by the recorder control unit 1226, communicates with a tuner (not shown), and mainly outputs a channel selection control signal to the tuner.

復調部1222は、チューナより供給された信号を、復調し、デマルチプレクサ1223に出力する。デマルチプレクサ1223は、復調部1222より供給されたデータを、オーディオデータ、ビデオデータ、およびEPGデータに分離し、それぞれ、オーディオデコーダ1224、ビデオデコーダ1225、またはレコーダ制御部1226に出力する。   The demodulator 1222 demodulates the signal supplied from the tuner and outputs the demodulated signal to the demultiplexer 1223. The demultiplexer 1223 separates the data supplied from the demodulation unit 1222 into audio data, video data, and EPG data, and outputs them to the audio decoder 1224, the video decoder 1225, or the recorder control unit 1226, respectively.

オーディオデコーダ1224は、入力されたオーディオデータをデコードし、記録再生部1233に出力する。ビデオデコーダ1225は、入力されたビデオデータをデコードし、ディスプレイコンバータ1230に出力する。レコーダ制御部1226は、入力されたEPGデータをEPGデータメモリ1227に供給し、記憶させる。   The audio decoder 1224 decodes the input audio data and outputs it to the recording / playback unit 1233. The video decoder 1225 decodes the input video data and outputs it to the display converter 1230. The recorder control unit 1226 supplies the input EPG data to the EPG data memory 1227 for storage.

ディスプレイコンバータ1230は、ビデオデコーダ1225またはレコーダ制御部1226より供給されたビデオデータを、ビデオエンコーダ1241により、例えばNTSC(National Television Standards Committee)方式のビデオデータにエンコードし、記録再生部1233に出力する。また、ディスプレイコンバータ1230は、ビデオデコーダ1225またはレコーダ制御部1226より供給されるビデオデータの画面のサイズを、モニタ1260のサイズに対応するサイズに変換し、ビデオエンコーダ1241によってNTSC方式のビデオデータに変換し、アナログ信号に変換し、ディスプレイ制御部1232に出力する。   The display converter 1230 encodes the video data supplied from the video decoder 1225 or the recorder control unit 1226 into, for example, NTSC (National Television Standards Committee) video data by the video encoder 1241 and outputs the encoded video data to the recording / reproducing unit 1233. The display converter 1230 converts the screen size of the video data supplied from the video decoder 1225 or the recorder control unit 1226 into a size corresponding to the size of the monitor 1260, and converts the video data to NTSC video data by the video encoder 1241. Then, it is converted into an analog signal and output to the display control unit 1232.

ディスプレイ制御部1232は、レコーダ制御部1226の制御のもと、OSD(On Screen Display)制御部1231が出力したOSD信号を、ディスプレイコンバータ1230より入力されたビデオ信号に重畳し、モニタ1260のディスプレイに出力し、表示させる。   The display control unit 1232 superimposes the OSD signal output from the OSD (On Screen Display) control unit 1231 on the video signal input from the display converter 1230 under the control of the recorder control unit 1226, and displays it on the monitor 1260 display. Output and display.

モニタ1260にはまた、オーディオデコーダ1224が出力したオーディオデータが、D/Aコンバータ1234によりアナログ信号に変換されて供給されている。モニタ1260は、このオーディオ信号を内蔵するスピーカから出力する。   The monitor 1260 is also supplied with the audio data output from the audio decoder 1224 after being converted into an analog signal by the D / A converter 1234. The monitor 1260 outputs this audio signal from a built-in speaker.

記録再生部1233は、ビデオデータやオーディオデータ等を記録する記憶媒体としてハードディスクを有する。   The recording / playback unit 1233 includes a hard disk as a storage medium for recording video data, audio data, and the like.

記録再生部1233は、例えば、オーディオデコーダ1224より供給されるオーディオデータを、エンコーダ1251によりエンコードする。また、記録再生部1233は、ディスプレイコンバータ1230のビデオエンコーダ1241より供給されるビデオデータを、エンコーダ1251によりエンコードする。記録再生部1233は、そのオーディオデータの符号化データとビデオデータの符号化データとをマルチプレクサにより合成する。記録再生部1233は、その合成データをチャネルコーディングして増幅し、そのデータを、記録ヘッドを介してハードディスクに書き込む。   For example, the recording / reproducing unit 1233 encodes the audio data supplied from the audio decoder 1224 by the encoder 1251. The recording / playback unit 1233 encodes the video data supplied from the video encoder 1241 of the display converter 1230 by the encoder 1251. The recording / playback unit 1233 combines the encoded data of the audio data and the encoded data of the video data by a multiplexer. The recording / playback unit 1233 amplifies the synthesized data by channel coding, and writes the data to the hard disk via the recording head.

記録再生部1233は、再生ヘッドを介してハードディスクに記録されているデータを再生し、増幅し、デマルチプレクサによりオーディオデータとビデオデータに分離する。記録再生部1233は、デコーダ1252によりオーディオデータおよびビデオデータをデコードする。記録再生部1233は、復号したオーディオデータをD/A変換し、モニタ1260のスピーカに出力する。また、記録再生部1233は、復号したビデオデータをD/A変換し、モニタ1260のディスプレイに出力する。   The recording / playback unit 1233 plays back the data recorded on the hard disk via the playback head, amplifies it, and separates it into audio data and video data by a demultiplexer. The recording / playback unit 1233 uses the decoder 1252 to decode the audio data and the video data. The recording / playback unit 1233 performs D / A conversion on the decoded audio data and outputs it to the speaker of the monitor 1260. In addition, the recording / playback unit 1233 performs D / A conversion on the decoded video data and outputs it to the display of the monitor 1260.

レコーダ制御部1226は、受信部1221を介して受信されるリモートコントローラからの赤外線信号により示されるユーザ指示に基づいて、EPGデータメモリ1227から最新のEPGデータを読み出し、それをOSD制御部1231に供給する。OSD制御部1231は、入力されたEPGデータに対応する画像データを発生し、ディスプレイ制御部1232に出力する。ディスプレイ制御部1232は、OSD制御部1231より入力されたビデオデータをモニタ1260のディスプレイに出力し、表示させる。これにより、モニタ1260のディスプレイには、EPG(電子番組ガイド)が表示される。   The recorder control unit 1226 reads the latest EPG data from the EPG data memory 1227 based on the user instruction indicated by the infrared signal from the remote controller received via the receiving unit 1221, and supplies it to the OSD control unit 1231. To do. The OSD control unit 1231 generates image data corresponding to the input EPG data, and outputs the image data to the display control unit 1232. The display control unit 1232 outputs the video data input from the OSD control unit 1231 to the display of the monitor 1260 for display. As a result, an EPG (electronic program guide) is displayed on the display of the monitor 1260.

また、ハードディスクレコーダ1200は、インターネット等のネットワークを介して他の装置から供給されるビデオデータ、オーディオデータ、またはEPGデータ等の各種データを取得することができる。   Also, the hard disk recorder 1200 can acquire various data such as video data, audio data, or EPG data supplied from another device via a network such as the Internet.

通信部1235は、レコーダ制御部1226に制御され、ネットワークを介して他の装置から送信されるビデオデータ、オーディオデータ、およびEPGデータ等の符号化データを取得し、それをレコーダ制御部1226に供給する。レコーダ制御部1226は、例えば、取得したビデオデータやオーディオデータの符号化データを記録再生部1233に供給し、ハードディスクに記憶させる。このとき、レコーダ制御部1226および記録再生部1233が、必要に応じて再エンコード等の処理を行うようにしてもよい。   The communication unit 1235 is controlled by the recorder control unit 1226, acquires encoded data such as video data, audio data, and EPG data transmitted from another device via the network, and supplies the encoded data to the recorder control unit 1226. To do. For example, the recorder control unit 1226 supplies the encoded data of the acquired video data and audio data to the recording / playback unit 1233 and stores it in the hard disk. At this time, the recorder control unit 1226 and the recording / playback unit 1233 may perform processing such as re-encoding as necessary.

また、レコーダ制御部1226は、取得したビデオデータやオーディオデータの符号化データを復号し、得られるビデオデータをディスプレイコンバータ1230に供給する。ディスプレイコンバータ1230は、ビデオデコーダ1225から供給されるビデオデータと同様に、レコーダ制御部1226から供給されるビデオデータを処理し、ディスプレイ制御部1232を介してモニタ1260に供給し、その画像を表示させる。   Also, the recorder control unit 1226 decodes the acquired encoded data of video data and audio data, and supplies the obtained video data to the display converter 1230. Similar to the video data supplied from the video decoder 1225, the display converter 1230 processes the video data supplied from the recorder control unit 1226, supplies the processed video data to the monitor 1260 via the display control unit 1232, and displays the image. .

また、この画像表示に合わせて、レコーダ制御部1226が、復号したオーディオデータを、D/Aコンバータ1234を介してモニタ1260に供給し、その音声をスピーカから出力させるようにしてもよい。   In accordance with the image display, the recorder control unit 1226 may supply the decoded audio data to the monitor 1260 via the D / A converter 1234 and output the sound from the speaker.

さらに、レコーダ制御部1226は、取得したEPGデータの符号化データを復号し、復号したEPGデータをEPGデータメモリ1227に供給する。   Further, the recorder control unit 1226 decodes the encoded data of the acquired EPG data, and supplies the decoded EPG data to the EPG data memory 1227.

以上のようなハードディスクレコーダ1200は、ビデオデコーダ1225、デコーダ1252、およびレコーダ制御部1226に内蔵されるデコーダとして画像復号装置200を用いる。つまり、ビデオデコーダ1225、デコーダ1252、およびレコーダ制御部1226に内蔵されるデコーダは、画像復号装置200の場合と同様に、画像符号化装置100より供給される符号化データをエントロピスライス毎に並行して復号し、復号画像データを生成する。そのとき、ビデオデコーダ1225、デコーダ1252、およびレコーダ制御部1226に内蔵されるデコーダは、画像復号装置200の場合と同様に、復号対象の符号化データに対応する符号化前の画像を、上下に並ぶ複数(偶数個)の領域に分割する。そして、ビデオデコーダ1225、デコーダ1252、およびレコーダ制御部1226に内蔵されるデコーダは、上から偶数番目の領域に対応する符号化データについては、従来どおり、上のマクロブロックラインから下に向かう順に復号し、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ上のマクロブロックを参照する。   The hard disk recorder 1200 as described above uses the image decoding device 200 as a decoder incorporated in the video decoder 1225, the decoder 1252, and the recorder control unit 1226. That is, the decoder incorporated in the video decoder 1225, the decoder 1252, and the recorder control unit 1226, in the same way as the case of the image decoding device 200, parallelizes the encoded data supplied from the image encoding device 100 for each entropy slice. To generate decoded image data. At that time, as in the case of the image decoding device 200, the video decoder 1225, the decoder 1252, and the decoder built in the recorder control unit 1226 move the image before encoding corresponding to the encoded data to be decoded up and down. Divide into multiple (even) areas. The video decoder 1225, the decoder 1252, and the decoder incorporated in the recorder control unit 1226 decode the encoded data corresponding to the even-numbered regions from the top in the order from the top macroblock line to the bottom as before. Then, the macroblock one left of the processing target macroblock and the macroblock one level higher are referred to as the peripheral macroblock.

これに対して、上から奇数番目の領域に対応する符号化データについては、ビデオデコーダ1225、デコーダ1252、およびレコーダ制御部1226に内蔵されるデコーダは、従来とは逆に、下のマクロブロックラインから上に向かう順に復号し、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ下のマクロブロックを参照する。   On the other hand, for the encoded data corresponding to the odd-numbered area from the top, the decoder built in the video decoder 1225, the decoder 1252, and the recorder control unit 1226, contrary to the conventional case, Decoding is performed in order from the top to the bottom, and the macroblock one left of the processing target macroblock and the macroblock one below are referred to as neighboring macroblocks.

さらに、ビデオデコーダ1225、デコーダ1252、およびレコーダ制御部1226に内蔵されるデコーダは、上から奇数番目の領域の一番下のマクロブロックラインに対応する符号化データの復号が終了した時点で、その1つ下の(上から偶数番目の)領域の符号化データについての復号処理を開始する。   Furthermore, when the decoder incorporated in the video decoder 1225, the decoder 1252, and the recorder control unit 1226 finishes decoding the encoded data corresponding to the bottommost macroblock line in the odd-numbered region from the top, The decoding process for the encoded data in the next lower area (even number from the top) is started.

また、このとき、ビデオデコーダ1225、デコーダ1252、およびレコーダ制御部1226に内蔵されるデコーダは、上から奇数番目の領域の一番下のマクロブロックラインを参照して、その1つ下の(上から偶数番目の)領域の一番上のマクロブロックラインに対応する符号化データについての復号処理を行う。   At this time, the decoder incorporated in the video decoder 1225, the decoder 1252, and the recorder control unit 1226 refers to the lowermost macroblock line in the odd-numbered area from the top (one above) The decoding process is performed on the encoded data corresponding to the top macroblock line in the (even-numbered) area.

したがって、ビデオデコーダ1225、デコーダ1252、およびレコーダ制御部1226に内蔵されるデコーダは、符号化効率の低減を抑制させながら、画像符号化の高速化を実現することができる。   Therefore, the video decoder 1225, the decoder 1252, and the decoder built in the recorder control unit 1226 can realize high-speed image encoding while suppressing reduction in encoding efficiency.

したがって、ハードディスクレコーダ1200は、例えば、チューナや通信部1235が受信するビデオデータ(符号化効率の低減を抑制させながら高速に符号化された符号化データ)や、記録再生部1233が再生するビデオデータ(符号化効率の低減を抑制させながら高速に符号化された符号化データ)を正しく復号させることができ、リアルタイム処理をより低いコストで実現することができる。   Therefore, the hard disk recorder 1200, for example, video data received by the tuner or communication unit 1235 (encoded data encoded at high speed while suppressing reduction in encoding efficiency) or video data reproduced by the recording / reproducing unit 1233. (Encoded data encoded at high speed while suppressing a reduction in encoding efficiency) can be correctly decoded, and real-time processing can be realized at a lower cost.

また、ハードディスクレコーダ1200は、エンコーダ1251として画像符号化装置100を用いる。したがって、エンコーダ1251は、画像符号化装置100の場合と同様に、符号化対象の画像を、上下に並ぶ複数(偶数個)の領域に分割する。そして、エンコーダ1251は、上から偶数番目の領域については、従来どおり、上のマクロブロックラインから下に向かう順に符号化を行い、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ上のマクロブロックを参照する。   The hard disk recorder 1200 uses the image encoding device 100 as the encoder 1251. Therefore, the encoder 1251 divides the image to be encoded into a plurality of (even number) regions arranged in the vertical direction, as in the case of the image encoding device 100. The encoder 1251 then encodes the even-numbered regions from the top in the order from the top macroblock line to the bottom in the conventional manner, and the macroblock one left of the processing target macroblock as the surrounding macroblock and 1 Refers to the next macroblock.

これに対して、上から奇数番目の領域については、エンコーダ1251は、従来とは逆に、下のマクロブロックラインから上に向かう順に符号化を行い、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ下のマクロブロックを参照する。   On the other hand, in the odd-numbered region from the top, the encoder 1251 performs coding in the order from the bottom macroblock line to the top, contrary to the conventional case, and sets one of the processing target macroblocks as a peripheral macroblock. Refer to the left macroblock and the next lower macroblock.

さらに、エンコーダ1251は、上から奇数番目の領域の一番下のマクロブロックラインの符号化が終了した時点で、その1つ下の(上から偶数番目の)領域についての符号化処理を開始する。   Furthermore, the encoder 1251 starts the encoding process for the next lower (even number from the top) area when the encoding of the bottommost macroblock line in the odd numbered area from the top is completed. .

また、このとき、エンコーダ1251は、上から奇数番目の領域の一番下のマクロブロックラインを参照して、その1つ下の(上から偶数番目の)領域の一番上のマクロブロックラインについての符号化処理を行う。   At this time, the encoder 1251 refers to the bottom macroblock line in the odd-numbered area from the top, and relates to the top macroblock line in the area one lower (even from the top). The encoding process is performed.

このような符号化を行うことにより、エンコーダ1251は、符号化効率の低減を抑制させながら、画像符号化の高速化を実現することができる。   By performing such encoding, the encoder 1251 can realize high-speed image encoding while suppressing a decrease in encoding efficiency.

したがって、ハードディスクレコーダ1200は、例えば、ハードディスクに記録する符号化データを生成する際の、画像符号化の高速化による符号化効率の低減を抑制させることができる。その結果として、携帯電話機1100は、リアルタイム処理をより低いコストで実現することができる。   Therefore, for example, the hard disk recorder 1200 can suppress a reduction in encoding efficiency due to high-speed image encoding when generating encoded data to be recorded on the hard disk. As a result, the mobile phone 1100 can realize real-time processing at a lower cost.

なお、以上においては、ビデオデータやオーディオデータをハードディスクに記録するハードディスクレコーダ1200について説明したが、もちろん、記録媒体はどのようなものであってもよい。例えばフラッシュメモリ、光ディスク、またはビデオテープ等、ハードディスク以外の記録媒体を適用するレコーダであっても、上述したハードディスクレコーダ1200の場合と同様に、画像符号化装置100および画像復号装置200を適用することができる。   In the above description, the hard disk recorder 1200 for recording video data and audio data on the hard disk has been described. Of course, any recording medium may be used. For example, even in a recorder to which a recording medium other than a hard disk such as a flash memory, an optical disk, or a video tape is applied, the image encoding device 100 and the image decoding device 200 are applied as in the case of the hard disk recorder 1200 described above. Can do.

<8.第8の実施の形態>
[カメラ]
図30は、本発明を適用した画像符号化装置100および画像復号装置200を用いるカメラの主な構成例を示すブロック図である。
<8. Eighth Embodiment>
[camera]
FIG. 30 is a block diagram illustrating a main configuration example of a camera using the image encoding device 100 and the image decoding device 200 to which the present invention is applied.

図30に示されるカメラ1300は、被写体を撮像し、被写体の画像をLCD1316に表示させたり、それを画像データとして、記録メディア1333に記録したりする。   A camera 1300 shown in FIG. 30 images a subject and displays an image of the subject on the LCD 1316 or records it on the recording medium 1333 as image data.

レンズブロック1311は、光(すなわち、被写体の映像)を、CCD/CMOS1312に入射させる。CCD/CMOS1312は、CCDまたはCMOSを用いたイメージセンサであり、受光した光の強度を電気信号に変換し、カメラ信号処理部1313に供給する。   The lens block 1311 causes light (that is, an image of the subject) to enter the CCD / CMOS 1312. The CCD / CMOS 1312 is an image sensor using CCD or CMOS, converts the intensity of received light into an electric signal, and supplies it to the camera signal processing unit 1313.

カメラ信号処理部1313は、CCD/CMOS1312から供給された電気信号を、Y,Cr,Cbの色差信号に変換し、画像信号処理部1314に供給する。画像信号処理部1314は、コントローラ1321の制御の下、カメラ信号処理部1313から供給された画像信号に対して所定の画像処理を施したり、その画像信号をエンコーダ1341で符号化したりする。画像信号処理部1314は、画像信号を符号化して生成した符号化データを、デコーダ1315に供給する。さらに、画像信号処理部1314は、オンスクリーンディスプレイ(OSD)1320において生成された表示用データを取得し、それをデコーダ1315に供給する。   The camera signal processing unit 1313 converts the electrical signal supplied from the CCD / CMOS 1312 into Y, Cr, and Cb color difference signals, and supplies them to the image signal processing unit 1314. The image signal processing unit 1314 performs predetermined image processing on the image signal supplied from the camera signal processing unit 1313 or encodes the image signal with the encoder 1341 under the control of the controller 1321. The image signal processing unit 1314 supplies encoded data generated by encoding the image signal to the decoder 1315. Further, the image signal processing unit 1314 acquires display data generated in the on-screen display (OSD) 1320 and supplies it to the decoder 1315.

以上の処理において、カメラ信号処理部1313は、バス1317を介して接続されるDRAM(Dynamic Random Access Memory)1318を適宜利用し、必要に応じて画像データや、その画像データが符号化された符号化データ等をそのDRAM1318に保持させる。   In the above processing, the camera signal processing unit 1313 appropriately uses a DRAM (Dynamic Random Access Memory) 1318 connected via the bus 1317, and image data or a code obtained by encoding the image data as necessary. The digitized data or the like is held in the DRAM 1318.

デコーダ1315は、画像信号処理部1314から供給された符号化データを復号し、得られた画像データ(復号画像データ)をLCD1316に供給する。また、デコーダ1315は、画像信号処理部1314から供給された表示用データをLCD1316に供給する。LCD1316は、デコーダ1315から供給された復号画像データの画像と表示用データの画像を適宜合成し、その合成画像を表示する。   The decoder 1315 decodes the encoded data supplied from the image signal processing unit 1314 and supplies the obtained image data (decoded image data) to the LCD 1316. In addition, the decoder 1315 supplies the display data supplied from the image signal processing unit 1314 to the LCD 1316. The LCD 1316 appropriately synthesizes the image of the decoded image data supplied from the decoder 1315 and the image of the display data, and displays the synthesized image.

オンスクリーンディスプレイ1320は、コントローラ1321の制御の下、記号、文字、または図形からなるメニュー画面やアイコンなどの表示用データを、バス1317を介して画像信号処理部1314に出力する。   Under the control of the controller 1321, the on-screen display 1320 outputs display data such as menu screens and icons composed of symbols, characters, or graphics to the image signal processing unit 1314 via the bus 1317.

コントローラ1321は、ユーザが操作部1322を用いて指令した内容を示す信号に基づいて、各種処理を実行するとともに、バス1317を介して、画像信号処理部1314、DRAM1318、外部インタフェース1319、オンスクリーンディスプレイ1320、およびメディアドライブ1323等を制御する。FLASH ROM1324には、コントローラ1321が各種処理を実行する上で必要なプログラムやデータ等が格納される。   The controller 1321 executes various processes based on a signal indicating the content instructed by the user using the operation unit 1322, and also via the bus 1317, an image signal processing unit 1314, a DRAM 1318, an external interface 1319, an on-screen display. 1320, media drive 1323, and the like are controlled. The FLASH ROM 1324 stores programs and data necessary for the controller 1321 to execute various processes.

例えば、コントローラ1321は、画像信号処理部1314やデコーダ1315に代わって、DRAM1318に記憶されている画像データを符号化したり、DRAM1318に記憶されている符号化データを復号したりすることができる。このとき、コントローラ1321は、画像信号処理部1314やデコーダ1315の符号化・復号方式と同様の方式によって符号化・復号処理を行うようにしてもよいし、画像信号処理部1314やデコーダ1315が対応していない方式により符号化・復号処理を行うようにしてもよい。   For example, the controller 1321 can encode the image data stored in the DRAM 1318 or decode the encoded data stored in the DRAM 1318 instead of the image signal processing unit 1314 or the decoder 1315. At this time, the controller 1321 may be configured to perform encoding / decoding processing by a method similar to the encoding / decoding method of the image signal processing unit 1314 or the decoder 1315, or the image signal processing unit 1314 or the decoder 1315 is compatible. The encoding / decoding process may be performed by a method that is not performed.

また、例えば、操作部1322から画像印刷の開始が指示された場合、コントローラ1321は、DRAM1318から画像データを読み出し、それを、バス1317を介して外部インタフェース1319に接続されるプリンタ1334に供給して印刷させる。   For example, when the start of image printing is instructed from the operation unit 1322, the controller 1321 reads out image data from the DRAM 1318 and supplies it to the printer 1334 connected to the external interface 1319 via the bus 1317. Let it print.

さらに、例えば、操作部1322から画像記録が指示された場合、コントローラ1321は、DRAM1318から符号化データを読み出し、それを、バス1317を介してメディアドライブ1323に装着される記録メディア1333に供給して記憶させる。   Further, for example, when image recording is instructed from the operation unit 1322, the controller 1321 reads the encoded data from the DRAM 1318 and supplies it to the recording medium 1333 mounted on the media drive 1323 via the bus 1317. Remember.

記録メディア1333は、例えば、磁気ディスク、光磁気ディスク、光ディスク、または半導体メモリ等の、読み書き可能な任意のリムーバブルメディアである。記録メディア1333は、もちろん、リムーバブルメディアとしての種類も任意であり、テープデバイスであってもよいし、ディスクであってもよいし、メモリカードであってもよい。もちろん、非接触ICカード等であっても良い。   The recording medium 1333 is an arbitrary readable / writable removable medium such as a magnetic disk, a magneto-optical disk, an optical disk, or a semiconductor memory. Of course, the recording medium 1333 may be of any kind as a removable medium, and may be a tape device, a disk, or a memory card. Of course, a non-contact IC card or the like may be used.

また、メディアドライブ1323と記録メディア1333を一体化し、例えば、内蔵型ハードディスクドライブやSSD(Solid State Drive)等のように、非可搬性の記憶媒体により構成されるようにしてもよい。   Further, the media drive 1323 and the recording medium 1333 may be integrated and configured by a non-portable storage medium such as a built-in hard disk drive or SSD (Solid State Drive).

外部インタフェース1319は、例えば、USB入出力端子などで構成され、画像の印刷を行う場合に、プリンタ1334と接続される。また、外部インタフェース1319には、必要に応じてドライブ1331が接続され、磁気ディスク、光ディスク、あるいは光磁気ディスクなどのリムーバブルメディア1332が適宜装着され、それらから読み出されたコンピュータプログラムが、必要に応じて、FLASH ROM1324にインストールされる。   The external interface 1319 is composed of, for example, a USB input / output terminal, and is connected to the printer 1334 when printing an image. In addition, a drive 1331 is connected to the external interface 1319 as necessary, and a removable medium 1332 such as a magnetic disk, an optical disk, or a magneto-optical disk is appropriately mounted, and a computer program read from them is loaded as necessary. Installed in the FLASH ROM 1324.

さらに、外部インタフェース1319は、LANやインターネット等の所定のネットワークに接続されるネットワークインタフェースを有する。コントローラ1321は、例えば、操作部1322からの指示に従って、DRAM1318から符号化データを読み出し、それを外部インタフェース1319から、ネットワークを介して接続される他の装置に供給させることができる。また、コントローラ1321は、ネットワークを介して他の装置から供給される符号化データや画像データを、外部インタフェース1319を介して取得し、それをDRAM1318に保持させたり、画像信号処理部1314に供給したりすることができる。   Furthermore, the external interface 1319 has a network interface connected to a predetermined network such as a LAN or the Internet. For example, the controller 1321 can read the encoded data from the DRAM 1318 in accordance with an instruction from the operation unit 1322 and supply the encoded data to the other device connected via the network from the external interface 1319. In addition, the controller 1321 acquires encoded data and image data supplied from another device via the network via the external interface 1319, holds the data in the DRAM 1318, or supplies it to the image signal processing unit 1314. Can be.

以上のようなカメラ1300は、デコーダ1315として画像復号装置200を用いる。つまり、デコーダ1315は、画像復号装置200の場合と同様に、画像符号化装置100より供給される符号化データをエントロピスライス毎に並行して復号し、復号画像データを生成する。そのとき、デコーダ1315は、画像復号装置200の場合と同様に、復号対象の符号化データに対応する符号化前の画像を、上下に並ぶ複数(偶数個)の領域に分割する。そして、デコーダ1315は、上から偶数番目の領域に対応する符号化データについては、従来どおり、上のマクロブロックラインから下に向かう順に復号し、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ上のマクロブロックを参照する。   The camera 1300 as described above uses the image decoding device 200 as the decoder 1315. That is, as in the case of the image decoding device 200, the decoder 1315 decodes the encoded data supplied from the image encoding device 100 in parallel for each entropy slice, and generates decoded image data. At that time, as in the case of the image decoding device 200, the decoder 1315 divides the pre-encoding image corresponding to the encoded data to be decoded into a plurality (even number) of regions arranged vertically. Then, the decoder 1315 decodes the encoded data corresponding to the even-numbered regions from the top in the order from the top macroblock line to the bottom as in the past, and the left side of the processing target macroblock is left as the surrounding macroblock. Refers to the macroblock and the macroblock one level above.

これに対して、上から奇数番目の領域に対応する符号化データについては、デコーダ1315は、従来とは逆に、下のマクロブロックラインから上に向かう順に復号し、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ下のマクロブロックを参照する。   On the other hand, for the encoded data corresponding to the odd-numbered area from the top, the decoder 1315 decodes in order from the bottom macroblock line to the top, contrary to the conventional case, and performs processing as the surrounding macroblock. Reference is made to the macroblock one block to the left and the macroblock one block below.

さらに、デコーダ1315は、上から奇数番目の領域の一番下のマクロブロックラインに対応する符号化データの復号が終了した時点で、その1つ下の(上から偶数番目の)領域の符号化データについての復号処理を開始する。   Furthermore, when the decoding of the encoded data corresponding to the bottommost macroblock line in the odd-numbered area from the top is completed, the decoder 1315 encodes the area below (even-numbered from the top). The decryption process for data is started.

また、このとき、デコーダ1315は、は、上から奇数番目の領域の一番下のマクロブロックラインを参照して、その1つ下の(上から偶数番目の)領域の一番上のマクロブロックラインに対応する符号化データについての復号処理を行う。   At this time, the decoder 1315 refers to the bottom macroblock line in the odd-numbered area from the top, and refers to the top macroblock in the area one lower (even from the top). A decoding process is performed on the encoded data corresponding to the line.

したがって、デコーダ1315は、符号化効率の低減を抑制させながら、画像符号化の高速化を実現することができる。   Therefore, the decoder 1315 can realize high-speed image encoding while suppressing reduction in encoding efficiency.

したがって、カメラ1300は、例えば、CCD/CMOS1312において生成される画像データや、DRAM1318または記録メディア1333から読み出すビデオデータの符号化データや、ネットワークを介して取得するビデオデータの符号化データの符号化効率をより向上させることができ、リアルタイム処理をより低いコストで実現することができる。   Therefore, the camera 1300, for example, encodes image data generated in the CCD / CMOS 1312, encoded data of video data read from the DRAM 1318 or the recording medium 1333, and encoded efficiency of encoded data of video data acquired via the network. The real-time processing can be realized at a lower cost.

また、カメラ1300は、エンコーダ1341として画像符号化装置100を用いる。エンコーダ1341は、画像符号化装置100の場合と同様に、符号化対象の画像を、上下に並ぶ複数(偶数個)の領域に分割する。そして、エンコーダ1341は、上から偶数番目の領域については、従来どおり、上のマクロブロックラインから下に向かう順に符号化を行い、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ上のマクロブロックを参照する。   The camera 1300 uses the image encoding device 100 as the encoder 1341. The encoder 1341 divides the image to be encoded into a plurality (even number) of regions that are vertically arranged, as in the case of the image encoding device 100. Then, the encoder 1341 encodes the even-numbered regions from the top in the order from the top macroblock line to the bottom in the conventional manner, and the macroblock one left of the processing target macroblock as the surrounding macroblock and 1 Refers to the next macroblock.

これに対して、上から奇数番目の領域については、エンコーダ1341は、従来とは逆に、下のマクロブロックラインから上に向かう順に符号化を行い、周辺マクロブロックとして処理対象マクロブロックの1つ左のマクロブロックと1つ下のマクロブロックを参照する。   On the other hand, for the odd-numbered area from the top, the encoder 1341 performs coding in the order from the bottom macroblock line to the top, contrary to the conventional case, and sets one of the processing target macroblocks as a peripheral macroblock. Refer to the left macroblock and the next lower macroblock.

さらに、エンコーダ1341は、上から奇数番目の領域の一番下のマクロブロックラインの符号化が終了した時点で、その1つ下の(上から偶数番目の)領域についての符号化処理を開始する。   Furthermore, the encoder 1341 starts the encoding process for the next lower (even number from the top) area when the encoding of the bottom macroblock line in the odd numbered area from the top is completed. .

また、このとき、エンコーダ1341は、上から奇数番目の領域の一番下のマクロブロックラインを参照して、その1つ下の(上から偶数番目の)領域の一番上のマクロブロックラインについての符号化処理を行う。   At this time, the encoder 1341 refers to the bottom macroblock line in the odd-numbered area from the top, and relates to the top macroblock line in the area one lower (even from the top). The encoding process is performed.

このような符号化を行うことにより、エンコーダ1341は、符号化効率の低減を抑制させながら、画像符号化の高速化を実現することができる。   By performing such encoding, the encoder 1341 can achieve high-speed image encoding while suppressing a decrease in encoding efficiency.

したがって、カメラ1300は、エンコーダ1341として画像符号化装置100を用いることにより、例えば、DRAM1318や記録メディア1333に記録する符号化データや、他の装置に提供する符号化データの画像符号化の高速化による符号化効率の低減を抑制させることができる。その結果として、カメラ1300は、リアルタイム処理をより低いコストで実現することができる。   Therefore, the camera 1300 uses the image encoding device 100 as the encoder 1341, for example, to speed up image encoding of encoded data to be recorded in the DRAM 1318 or the recording medium 1333 or encoded data to be provided to other devices. It is possible to suppress a reduction in encoding efficiency due to. As a result, the camera 1300 can realize real-time processing at a lower cost.

なお、コントローラ1321が行う復号処理に画像復号装置200の復号方法を適用するようにしてもよい。同様に、コントローラ1321が行う符号化処理に画像符号化装置100の符号化方法を適用するようにしてもよい。   Note that the decoding method of the image decoding device 200 may be applied to the decoding process performed by the controller 1321. Similarly, the encoding method of the image encoding device 100 may be applied to the encoding process performed by the controller 1321.

また、カメラ1300が撮像する画像データは動画像であってもよいし、静止画像であってもよい。   The image data captured by the camera 1300 may be a moving image or a still image.

もちろん、画像符号化装置100および画像復号装置200は、上述した装置以外の装置やシステムにも適用可能である。   Of course, the image encoding device 100 and the image decoding device 200 can also be applied to devices and systems other than the devices described above.

100 画像符号化装置, 106 可逆符号化部, 151 制御部, 152 記憶部, 153 スライス1処理部, 154 スライス2処理部, 200 画像復号装置, 202 可逆復号部, 251 デマルチプレクサ, 252 スライス1処理部, 253 スライス2処理部, 301 コンテキスト処理部, 501 制御部, 503 スライス3処理部, 504 スライス4処理部, 551 デマルチプレクサ, 552 スライス3処理部, 554 スライス4処理部   100 image encoding device, 106 lossless encoding unit, 151 control unit, 152 storage unit, 153 slice 1 processing unit, 154 slice 2 processing unit, 200 image decoding device, 202 lossless decoding unit, 251 demultiplexer, 252 slice 1 processing Section, 253 slice 2 processing section, 301 context processing section, 501 control section, 503 slice 3 processing section, 504 slice 4 processing section, 551 demultiplexer, 552 slice 3 processing section, 554 slice 4 processing section

本技術の一側面は、画像データが符号化された符号化データを復号する際に、復号対象となる対象ブロックラインの上部に隣接するブロックラインである上ブロックラインにおいて前記対象ブロックラインの先頭に位置する対象先頭ブロックの上部に隣接する上先頭ブロックよりも復号順で後の場所に位置するブロックである上ブロックを復号した際に更新されたコンテキストと、前記上ブロックを復号する際に更新された確率テーブルを初期値として利用するかを識別する識別データとを用いて、前記対象先頭ブロックを復号する際に用いるコンテキストを初期化して、前記対象先頭ブロックを算術復号する復号部を備える画像処理装置である。 One aspect of the present technology is that when decoding encoded data in which image data is encoded, an upper block line that is a block line adjacent to an upper portion of a target block line to be decoded is positioned at the head of the target block line. Context updated when decoding the upper block, which is a block located in a decoding order later than the upper head block adjacent to the upper part of the target head block located, and updated when decoding the upper block An image including a decoding unit that initializes a context used when decoding the target head block using identification data that identifies whether the probability table is used as an initial value, and arithmetically decodes the target head block It is a processing device.

前記復号部は、前記上ブロックを復号した際に更新された確率テーブルを初期値として、前記対象先頭ブロックを算術復号することができる。 The decoding unit may arithmetically decode the target head block using a probability table updated when the upper block is decoded as an initial value.

前記識別データは、前記符号化データに含まれており、前記復号部は、前記符号化データから、前記識別データを取得することができる。 The identification data is included in the encoded data, and the decoding unit can acquire the identification data from the encoded data .

本技術の一側面は、また、画像データが符号化された符号化データを復号する際に、復号対象となる対象ブロックラインの上部に隣接するブロックラインである上ブロックラインにおいて前記対象ブロックラインの先頭に位置する対象先頭ブロックの上部に隣接する上先頭ブロックよりも復号順で後の場所に位置するブロックである上ブロックを復号した際に更新されたコンテキストと、前記上ブロックを復号する際に更新された確率テーブルを初期値として利用するかを識別する識別データとを用いて、前記対象先頭ブロックを復号する際に用いるコンテキストを初期化して、前記対象先頭ブロックを算術復号する画像処理方法である。 In one aspect of the present technology, when decoding encoded data in which image data is encoded, an upper block line that is an upper block line adjacent to an upper portion of a target block line to be decoded is an area of the target block line. The context updated when the upper block, which is a block located in the decoding order later than the upper head block adjacent to the top of the target head block located at the top, is decoded, and when the upper block is decoded. An image processing method for initializing a context used when decoding the target head block using identification data for identifying whether to use the updated probability table as an initial value, and arithmetically decoding the target head block It is.

前記上ブロックを復号した際に更新された確率テーブルを初期値として、前記対象先頭ブロックを算術復号することができる。 The target head block can be arithmetically decoded using the probability table updated when the upper block is decoded as an initial value.

前記識別データが含まれる前記符号化データから、前記識別データを取得することができる。 The identification data can be acquired from the encoded data including the identification data .

本技術の一側面は、さらに、コンピュータに、画像データが符号化された符号化データを復号する際に、復号対象となる対象ブロックラインの上部に隣接するブロックラインである上ブロックラインにおいて前記対象ブロックラインの先頭に位置する対象先頭ブロックの上部に隣接する上先頭ブロックよりも復号順で後の場所に位置するブロックである上ブロックを復号した際に更新されたコンテキストと、前記上ブロックを復号する際に更新された確率テーブルを初期値として利用するかを識別する識別データとを用いて、前記対象先頭ブロックを復号する際に用いるコンテキストを初期化して、前記対象先頭ブロックを算術復号する復号部として機能させるためのプログラムである。 In one aspect of the present technology, when the encoded data obtained by encoding the image data is further decoded by the computer, the target is detected in the upper block line which is a block line adjacent to the upper part of the target block line to be decoded. The context updated when decoding the upper block, which is a block located in a decoding order later than the upper head block adjacent to the top of the target head block located at the top of the block line, and the upper block The context data used when decoding the target head block is initialized using the identification data for identifying whether the updated probability table is used as an initial value, and the target head block is arithmetically decoded. It is a program for functioning as a decoding unit .

本技術の一側面は、また、コンピュータに、画像データが符号化された符号化データを復号する際に、復号対象となる対象ブロックラインの上部に隣接するブロックラインである上ブロックラインにおいて前記対象ブロックラインの先頭に位置する対象先頭ブロックの上部に隣接する上先頭ブロックよりも復号順で後の場所に位置するブロックである上ブロックを復号した際に更新されたコンテキストと、前記上ブロックを復号する際に更新された確率テーブルを初期値として利用するかを識別する識別データとを用いて、前記対象先頭ブロックを復号する際に用いるコンテキストを初期化して、前記対象先頭ブロックを算術復号する復号部として機能させるためのプログラムを記録したコンピュータが読み取り可能な記録媒体である。 In one aspect of the present technology, when the encoded data in which the image data is encoded is decoded by the computer, the target block line is an upper block line that is adjacent to the upper part of the target block line to be decoded. The context updated when decoding the upper block, which is a block located in a decoding order later than the upper head block adjacent to the top of the target head block located at the top of the block line, and the upper block The context data used when decoding the target head block is initialized using the identification data for identifying whether the updated probability table is used as an initial value, and the target head block is arithmetically decoded. It is a computer-readable recording medium which records the program for functioning as a decoding part .

本技術の一側面においては、画像データが符号化された符号化データを復号する際に、復号対象となる対象ブロックラインの上部に隣接するブロックラインである上ブロックラインにおいてその対象ブロックラインの先頭に位置する対象先頭ブロックの上部に隣接する上先頭ブロックよりも復号順で後の場所に位置するブロックである上ブロックを復号した際に更新されたコンテキストと、その上ブロックを復号する際に更新された確率テーブルを初期値として利用するかを識別する識別データとが用いられて、対象先頭ブロックを復号する際に用いるコンテキストが初期化されて、対象先頭ブロックが算術復号される。 In one aspect of the present technology, when decoding encoded data in which image data is encoded, the top of the target block line in the upper block line that is adjacent to the upper part of the target block line to be decoded Context updated when decoding the upper block, which is a block located in the decoding order after the upper head block adjacent to the upper part of the target head block located at, and updated when decoding the upper block The identification data for identifying whether the probability table is used as an initial value is used, the context used when decoding the target head block is initialized, and the target head block is arithmetically decoded.

Claims (10)

コンテキストを用いて、画像データのブロックを符号化する符号化部と、
符号化対象となる対象ブロックラインの上部に隣接するブロックラインである上ブロックラインにおいて前記対象ブロックラインの先頭に位置する対象先頭ブロックの上部に隣接する上先頭ブロックと異なる場所に位置するブロックである上ブロックを符号化した際に更新されたコンテキストを用いて、前記対象先頭ブロックを符号化する際に用いるコンテキストを初期化するように、前記符号化部を制御する制御部と
を備える画像処理装置。
An encoding unit that encodes a block of image data using a context;
It is a block located at a different location from the upper head block adjacent to the upper part of the target head block located at the head of the target block line in the upper block line that is a block line adjacent to the top of the target block line to be encoded. An image processing apparatus comprising: a control unit that controls the encoding unit so as to initialize a context used when encoding the target head block using a context updated when the upper block is encoded .
前記制御部は、前記上ブロックラインに対して前記上先頭ブロックよりも符号化順で後の場所に位置する前記上ブロックを符号化した際に更新されたコンテキストを初期値として、前記対象先頭ブロックを符号化するように、前記符号化部を制御する
請求項1に記載の画像処理装置。
The control unit sets, as an initial value, a context updated when the upper block located at a position later in the encoding order than the upper head block is encoded with respect to the upper block line, the target head block The image processing apparatus according to claim 1, wherein the encoding unit is controlled so as to encode the image.
前記制御部は、前記上ブロックを符号化した際に更新された確率テーブルを初期値として、前記対象先頭ブロックを符号化するように、前記符号化部を制御する
請求項2に記載の画像処理装置。
3. The image processing according to claim 2, wherein the control unit controls the encoding unit to encode the target head block using, as an initial value, a probability table updated when the upper block is encoded. apparatus.
前記符号化部は、前記対象ブロックラインを、コンテキストを用いて算術符号化する
請求項3に記載の画像処理装置。
The image processing device according to claim 3, wherein the encoding unit arithmetically encodes the target block line using a context.
コンテキストを用いて、画像データのブロックを符号化し、
符号化対象となる対象ブロックラインの上部に隣接するブロックラインである上ブロックラインにおいて前記対象ブロックラインの先頭に位置する対象先頭ブロックの上部に隣接する上先頭ブロックと異なる場所に位置するブロックである上ブロックを符号化した際に更新されたコンテキストを用いて、前記対象先頭ブロックを符号化する際に用いるコンテキストを初期化するように制御する
画像処理方法。
Encode a block of image data using context,
It is a block located at a different location from the upper head block adjacent to the upper part of the target head block located at the head of the target block line in the upper block line that is a block line adjacent to the top of the target block line to be encoded. An image processing method for controlling to initialize a context used when encoding the target head block using a context updated when an upper block is encoded.
前記上ブロックラインに対して前記上先頭ブロックよりも符号化順で後の場所に位置する前記上ブロックを符号化した際に更新されたコンテキストを初期値として、前記対象先頭ブロックを符号化するように制御する
請求項5に記載の画像処理方法。
The target head block is encoded with the context updated when the upper block located in the encoding order after the upper head block is encoded with respect to the upper block line as an initial value. The image processing method according to claim 5.
前記上ブロックを符号化した際に更新された確率テーブルを初期値として、前記対象先頭ブロックを符号化するように制御する
請求項6に記載の画像処理方法。
The image processing method according to claim 6, wherein control is performed so that the target head block is encoded with a probability table updated when the upper block is encoded as an initial value.
前記対象ブロックラインを、コンテキストを用いて算術符号化する
請求項7に記載の画像処理方法。
The image processing method according to claim 7, wherein the target block line is arithmetically encoded using a context.
コンピュータに、
コンテキストを用いて、画像データのブロックを符号化する符号化部と、
符号化対象となる対象ブロックラインの上部に隣接するブロックラインである上ブロックラインにおいて前記対象ブロックラインの先頭に位置する対象先頭ブロックの上部に隣接する上先頭ブロックと異なる場所に位置するブロックである上ブロックを符号化した際に更新されたコンテキストを用いて、前記対象先頭ブロックを符号化する際に用いるコンテキストを初期化するように、前記符号化部を制御する制御部と
して機能させるためのプログラム。
On the computer,
An encoding unit that encodes a block of image data using a context;
It is a block located at a different location from the upper head block adjacent to the upper part of the target head block located at the head of the target block line in the upper block line that is a block line adjacent to the top of the target block line to be encoded. To function as a control unit that controls the encoding unit so as to initialize the context used when encoding the target head block using the context updated when the upper block is encoded Program.
コンピュータに、
コンテキストを用いて、画像データのブロックを符号化する符号化部と、
符号化対象となる対象ブロックラインの上部に隣接するブロックラインである上ブロックラインにおいて前記対象ブロックラインの先頭に位置する対象先頭ブロックの上部に隣接する上先頭ブロックと異なる場所に位置するブロックである上ブロックを符号化した際に更新されたコンテキストを用いて、前記対象先頭ブロックを符号化する際に用いるコンテキストを初期化するように、前記符号化部を制御する制御部と
して機能させるためのプログラムを記録したコンピュータが読み取り可能な記録媒体。
On the computer,
An encoding unit that encodes a block of image data using a context;
It is a block located at a different location from the upper head block adjacent to the upper part of the target head block located at the head of the target block line in the upper block line that is a block line adjacent to the top of the target block line to be encoded. To function as a control unit that controls the encoding unit so as to initialize the context used when encoding the target head block using the context updated when the upper block is encoded A computer-readable recording medium on which the program is recorded.
JP2016018626A 2016-02-03 2016-02-03 Image processing device and method, program, and recording medium Pending JP2016106483A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016018626A JP2016106483A (en) 2016-02-03 2016-02-03 Image processing device and method, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016018626A JP2016106483A (en) 2016-02-03 2016-02-03 Image processing device and method, program, and recording medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2010090960A Division JP5914962B2 (en) 2010-04-09 2010-04-09 Image processing apparatus and method, program, and recording medium

Publications (1)

Publication Number Publication Date
JP2016106483A true JP2016106483A (en) 2016-06-16

Family

ID=56120361

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016018626A Pending JP2016106483A (en) 2016-02-03 2016-02-03 Image processing device and method, program, and recording medium

Country Status (1)

Country Link
JP (1) JP2016106483A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09275561A (en) * 1996-04-08 1997-10-21 Toshiba Corp Video compressor and video compression method
JP2005347780A (en) * 2002-04-25 2005-12-15 Mitsubishi Electric Corp Digital signal coding apparatus, digital signal decoding apparatus, digital signal arithmetic coding method, and digital signal arithmetic decoding method
WO2009063554A1 (en) * 2007-11-13 2009-05-22 Fujitsu Limited Encoder and decoder
WO2010029850A1 (en) * 2008-09-09 2010-03-18 日本電気株式会社 Image coding device, image decoding device, image coding method, image decoding method, and program
WO2011052142A1 (en) * 2009-10-29 2011-05-05 パナソニック株式会社 Image encoding method and image decoding method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09275561A (en) * 1996-04-08 1997-10-21 Toshiba Corp Video compressor and video compression method
JP2005347780A (en) * 2002-04-25 2005-12-15 Mitsubishi Electric Corp Digital signal coding apparatus, digital signal decoding apparatus, digital signal arithmetic coding method, and digital signal arithmetic decoding method
WO2009063554A1 (en) * 2007-11-13 2009-05-22 Fujitsu Limited Encoder and decoder
WO2010029850A1 (en) * 2008-09-09 2010-03-18 日本電気株式会社 Image coding device, image decoding device, image coding method, image decoding method, and program
WO2011052142A1 (en) * 2009-10-29 2011-05-05 パナソニック株式会社 Image encoding method and image decoding method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
VIVIENNE SZE ET AL.: "Massively Parallel CABAC", ITU - TELECOMMUNICATIONS STANDARDIZATION SECTOR STUDY GROUP 16 QUESTION 6 VIDEO CODING EXPERTS GROUP, vol. VCEG-AL21, JPN6014046021, July 2009 (2009-07-01), ISSN: 0003540166 *
XUN GUO ET AL.: "Ordered Entropy Slices for Parallel CABAC", ITU - TELECOMMUNICATIONS STANDARDIZATION SECTOR STUDY GROUP 16 QUESTION 6 VIDEO CODING EXPERTS GROUP, vol. VCEG-AK25, JPN6014046018, April 2009 (2009-04-01), ISSN: 0003540165 *

Similar Documents

Publication Publication Date Title
JP5914962B2 (en) Image processing apparatus and method, program, and recording medium
JP5544996B2 (en) Image processing apparatus and method
TWI723849B (en) Image decoding device, method and computer readable recording medium
JP5233897B2 (en) Image processing apparatus and method
JP5359657B2 (en) Image encoding apparatus and method, recording medium, and program
WO2011096318A1 (en) Image processing device and method
JP5915679B2 (en) Image processing apparatus and method, program, and recording medium
JP2016106483A (en) Image processing device and method, program, and recording medium
JP6292460B2 (en) Image processing apparatus and method
JP6137072B2 (en) Image decoding apparatus and method, recording medium, and program
JP6032296B2 (en) Image processing apparatus and method, recording medium, and program
JP5573997B2 (en) Image decoding apparatus and method, recording medium, and program
JP5875565B2 (en) Image processing apparatus and method, recording medium, and program
JP5573995B2 (en) Image decoding apparatus and method, recording medium, and program
JP5573996B2 (en) Image encoding apparatus and method, recording medium, and program

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170418

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170516

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20170822