JP2015088954A - Image encoder and image encoding program - Google Patents

Image encoder and image encoding program Download PDF

Info

Publication number
JP2015088954A
JP2015088954A JP2013226443A JP2013226443A JP2015088954A JP 2015088954 A JP2015088954 A JP 2015088954A JP 2013226443 A JP2013226443 A JP 2013226443A JP 2013226443 A JP2013226443 A JP 2013226443A JP 2015088954 A JP2015088954 A JP 2015088954A
Authority
JP
Japan
Prior art keywords
image
prediction
unit
frame
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2013226443A
Other languages
Japanese (ja)
Other versions
JP6267929B2 (en
Inventor
境田 慎一
Shinichi Sakaida
慎一 境田
泰子 森田
Yasuko Morita
泰子 森田
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.)
Japan Broadcasting Corp
Original Assignee
Nippon Hoso Kyokai NHK
Japan Broadcasting 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 Nippon Hoso Kyokai NHK, Japan Broadcasting Corp filed Critical Nippon Hoso Kyokai NHK
Priority to JP2013226443A priority Critical patent/JP6267929B2/en
Publication of JP2015088954A publication Critical patent/JP2015088954A/en
Application granted granted Critical
Publication of JP6267929B2 publication Critical patent/JP6267929B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image encoder and an image encoding program, with which encoding efficiency by bidirectional prediction is improved.SOLUTION: A storage section stores a reference image obtained by decoding encoded data of an encoded input image for each frame. A prediction section performs intra-frame prediction, forward prediction or bidirectional prediction by using the reference image stored in the storage section and generates a predicted image block corresponding to an input image block being a part of the input image. When a code amount control section is to perform bidirectional prediction with a decoded image of the predicted image block generated by bidirectional prediction by the prediction section as the reference image, it determines a code amount on the predicted image block to be predicted according to data on motion interpolation of the reference image whose motion interpolation is predicted and decoded in the bidirectional prediction that is previously performed.

Description

本発明は、画像符号化装置及び画像符号化プログラムに関する。   The present invention relates to an image encoding device and an image encoding program.

ディジタル技術の発達により、高いフレームレートの画像信号を処理することができる電子機器の開発が進んでいる。一般に、フレームレートが高い画像信号ほど、データ量が増大する。そのような画像信号を伝送する際、圧縮符号化によってデータ量を低減することが多い。放送や通信に用いられる画像符号化方式では、動き補償予測処理を行うことで時間方向の情報の冗長性を除去してデータ量を圧縮することが多い。これにより、低ビットレートでの高効率な画像符号化を実現する。
符号化されるフレームは、動き補償予測処理を行うか否かによってイントラフレーム(Iピクチャ)かインターフレームに区別される。イントラフレームは、フレーム内予測(イントラ予測)を行って符号化されるフレームである。インターフレームは、フレーム間予測(インター予測)を行って符号化されるフレームである。また、動き補償予測処理を行う際に用いられる参照画像のフレームの種別(枚数)によって、順方向予測フレーム(Pピクチャ)か、双方向予測フレーム(Bピクチャ)かに区別される。Pピクチャは、順方向予測処理を用いて符号化されるフレームである。Bピクチャは、2以上の参照画像を用いて、双方向予測処理を行うことで符号化されるフレームである。Bピクチャについて予測処理を行う際、Iピクチャ、Pピクチャ又はその両方のフレームに係る参照画像が用いられることがある。
With the development of digital technology, development of electronic devices capable of processing high frame rate image signals is progressing. In general, the amount of data increases as the image signal has a higher frame rate. When transmitting such an image signal, the amount of data is often reduced by compression encoding. In image coding systems used for broadcasting and communication, the amount of data is often compressed by removing the redundancy of information in the time direction by performing motion compensation prediction processing. This realizes highly efficient image coding at a low bit rate.
A frame to be encoded is classified into an intra frame (I picture) or an inter frame depending on whether or not motion compensation prediction processing is performed. An intra frame is a frame that is encoded by performing intra-frame prediction (intra prediction). An inter frame is a frame that is encoded by performing inter-frame prediction (inter prediction). Also, depending on the type (number of frames) of the reference image frame used when performing the motion compensation prediction process, the frame is classified into a forward prediction frame (P picture) or a bidirectional prediction frame (B picture). A P picture is a frame that is encoded using forward prediction processing. A B picture is a frame that is encoded by performing bidirectional prediction processing using two or more reference images. When a prediction process is performed on a B picture, a reference image related to a frame of an I picture, a P picture, or both may be used.

他方、非特許文献1、2に記載の画像符号化方式では、予測処理において、すでに動き補償予測が行われ復号されたBピクチャ、つまり、その時点で処理対象となっているフレーム(現フレーム)よりも過去又は未来のBピクチャを参照画像として、他のBピクチャの動きを予測することが許容されている。非特許文献1、2に記載の画像符号化方式は、それぞれMPEG(Moving Picture Experts Group)−4 AVC(Advanced Video Coding)、HEVC(High Efficiency Video Coding)とも呼ばれる。非特許文献1、2に記載の画像符号化において各フレームに割り当てられる符号量は、フレームの種別により異なることがある。例えば、予測に用いられないBピクチャに割り当てられる符号量を他の種別のフレームに割り当てられる符号量よりも少なくすることが考えられる。   On the other hand, in the image coding methods described in Non-Patent Documents 1 and 2, a B picture that has already been subjected to motion compensation prediction and decoded in the prediction process, that is, a frame (current frame) to be processed at that time. In addition, it is allowed to predict the motion of other B pictures using a past or future B picture as a reference image. The image encoding methods described in Non-Patent Documents 1 and 2 are also called MPEG (Moving Picture Experts Group) -4 AVC (Advanced Video Coding) and HEVC (High Efficiency Video Coding), respectively. In the image coding described in Non-Patent Documents 1 and 2, the code amount assigned to each frame may differ depending on the type of frame. For example, it is conceivable that the amount of code assigned to a B picture that is not used for prediction is made smaller than the amount of code assigned to another type of frame.

Recommendation ITU−T H.264,(04/2013),“Advanced video coding for generic audiovisual services”,International Telecommunication Union,April 2013Recommendation ITU-T H.D. 264, (04/2013), “Advanced video coding for generic audiovisual services”, International Telecommunication Union, April 2013. Recommendation ITU−T H.265,(04/2013),“High efficiency video coding”,International Telecommunication Union,April 2013Recommendation ITU-T H.D. 265, (04/2013), “High efficiency video coding”, International Telecommunication Union, April 2013.

しかしながら、フレームの種別による符号量の割り当てについては符号化の標準規格では定められておらず、符号化装置の実装に委ねられる。仮に、符号量の割り当てが固定されていると、処理対象となる画像の特徴によらず、常にその割り当てられた符号量で符号化処理が行われる。そのため、割り当てられた符号量が不足して画質が劣化することや、あるいは割り当てられた符号量が過剰で符号化効率が低下するおそれがあった。   However, the allocation of the code amount depending on the frame type is not defined by the encoding standard, and is left to the implementation of the encoding apparatus. If the code amount assignment is fixed, the encoding process is always performed with the assigned code amount regardless of the characteristics of the image to be processed. For this reason, there is a possibility that the allocated code amount is insufficient and the image quality is deteriorated, or that the allocated code amount is excessive and the encoding efficiency is lowered.

本発明は上記の点に鑑みてなされたものであり、双方向予測による符号化の効率を向上した画像符号化装置及び画像符号化プログラムを提供する。   The present invention has been made in view of the above points, and provides an image encoding device and an image encoding program that improve the encoding efficiency by bidirectional prediction.

本発明は上記の課題を解決するためになされたものであり、本発明の一態様は、符号化した入力画像の符号化データを復号した参照画像をフレーム毎に記憶する記憶部と、前記記憶部に記憶された参照画像を用いてフレーム内予測、順方向予測又は双方向予測を行って、前記入力画像の一部である入力画像ブロックに対応する予測画像ブロックを生成する予測部と、前記予測部が双方向予測を行って生成した予測画像ブロックの復号画像を参照画像としてさらに双方向予測を行う場合、予測される画像ブロックに係る符号量を、すでに行った双方向予測で動き補償予測および復号した参照画像の動き補償に係るデータに基づいて定める符号量制御部と、を備えることを特徴とする画像符号化装置である。   SUMMARY An advantage of some aspects of the invention is that a storage unit that stores, for each frame, a reference image obtained by decoding encoded data of an encoded input image, and the storage A prediction unit that performs intra-frame prediction, forward prediction, or bidirectional prediction using the reference image stored in the unit, and generates a predicted image block corresponding to an input image block that is a part of the input image; When the prediction unit further performs bidirectional prediction using the decoded image of the predicted image block generated by performing bidirectional prediction as a reference image, the code amount related to the predicted image block is motion-compensated prediction by the bidirectional prediction already performed. And a code amount control unit determined based on data relating to motion compensation of the decoded reference image.

本発明のその他の態様は、前記符号量制御部は、前記動き補償に係るデータとして動きベクトルを用いることを特徴とする画像符号化装置である。
本発明のその他の態様は、前記符号量制御部は、前記動き補償に係るデータとして動き予測モードを用いることを特徴とする画像符号化装置である。
Another aspect of the present invention is the image coding apparatus, wherein the code amount control unit uses a motion vector as the data related to the motion compensation.
Another aspect of the present invention is the image coding device, wherein the code amount control unit uses a motion prediction mode as the data related to the motion compensation.

本発明のその他の態様は、コンピュータを、符号化した入力画像の符号化データを復号した参照画像をフレーム毎に記憶する記憶部に記憶された参照画像を用いてフレーム内予測、順方向予測又は双方向予測を行って、前記入力画像の一部である入力画像ブロックに対応する予測画像ブロックを生成する予測手段と、前記予測手段ですでに双方向予測を行って生成した予測画像ブロックの復号画像を参照画像としてさらに双方向予測を行う場合、予測される画像ブロックに係る符号量を、すでに行った双方向予測で動き補償予測および復号した参照画像の動き補償に係るデータに基づいて定める符号量制御手段と、を具備する画像符号化装置として機能させるためのプログラムである。   In another aspect of the present invention, the computer uses a reference image stored in a storage unit that stores, for each frame, a reference image obtained by decoding encoded data of an encoded input image. A prediction unit that performs bidirectional prediction to generate a predicted image block corresponding to an input image block that is a part of the input image, and a decoding of the predicted image block that has already been generated by bidirectional prediction by the prediction unit When bi-directional prediction is performed using an image as a reference image, the code amount for the predicted image block is determined based on the motion compensation prediction performed in the bi-directional prediction already performed and the data related to the motion compensation of the decoded reference image. And a quantity control unit.

本発明によれば、双方向予測による符号化効率が向上する。   According to the present invention, the encoding efficiency by bidirectional prediction is improved.

本発明の実施形態に係る画像符号化装置の構成を示す概略ブロック図である。It is a schematic block diagram which shows the structure of the image coding apparatus which concerns on embodiment of this invention. 参照画像及び予測画像の例を示す図である。It is a figure which shows the example of a reference image and a prediction image. GOP構造の一例を示す概念図である。It is a conceptual diagram which shows an example of a GOP structure. 階層B構造の一例を示す概念図である。It is a conceptual diagram which shows an example of the hierarchy B structure. 階層B構造の他の例を示す概念図である。It is a conceptual diagram which shows the other example of the hierarchy B structure. 本実施形態に係る量子化対応データの一例を示す表である。It is a table | surface which shows an example of the quantization corresponding | compatible data which concern on this embodiment. 本実施形態に係る符号量制御部が符号量を定める処理を示すフローチャートである。It is a flowchart which shows the process which the code amount control part which concerns on this embodiment determines a code amount. 本実施形態に係る画像復号装置の構成を示す概略ブロック図である。It is a schematic block diagram which shows the structure of the image decoding apparatus which concerns on this embodiment.

以下、図面を参照しながら本発明の実施形態について説明する。
まず、本実施形態に係る画像符号化装置1の構成について説明する。
図1は、本実施形態に係る画像符号化装置1の構成を示す概略ブロック図である。
画像符号化装置1は、フレームバッファ101、減算部102、直交変換部103、量子化部104、可逆符号化部105、蓄積バッファ106、逆量子化部107、逆直交変換部108、加算部109、デブロッキングフィルタ110、参照メモリ111、イントラ予測部112、インター予測部113、モード判定部114及び符号量制御部115を含んで構成される。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
First, the configuration of the image encoding device 1 according to the present embodiment will be described.
FIG. 1 is a schematic block diagram illustrating a configuration of an image encoding device 1 according to the present embodiment.
The image encoding apparatus 1 includes a frame buffer 101, a subtracting unit 102, an orthogonal transform unit 103, a quantization unit 104, a lossless encoding unit 105, a storage buffer 106, an inverse quantization unit 107, an inverse orthogonal transform unit 108, and an addition unit 109. , A deblocking filter 110, a reference memory 111, an intra prediction unit 112, an inter prediction unit 113, a mode determination unit 114, and a code amount control unit 115.

フレームバッファ101には、画像符号化装置1の外部から入力画像信号が入力され、入力された入力画像信号をフレーム毎に一時的に記憶する。フレームバッファ101は、予め定めたGOP(Group of Picture)構造に応じて各フレームの順序を並び替えてもよい。GOP構造は、所定のフレーム数からなるIピクチャ、Pピクチャ、Bピクチャの配列であって、復号順にIピクチャで始まる配列である。フレームバッファ101は、記憶した入力画像信号から現在処理を行うフレーム(現フレーム、カレントフレームともいう)の画像信号を特定する。フレームバッファ101は、特定したフレームの画像信号から、その一部として現在処理を行うブロック(現ブロック、カレントブロックともいう)の画像を示す入力画像ブロック信号を読み出す。フレームバッファ101が現ブロックを選択する順序は、例えば、ラスタスキャンの順序と同一であってもよい。フレームバッファ101は、読み出した入力画像ブロック信号を減算部102、イントラ予測部112及びインター予測部113に出力する。   An input image signal is input from the outside of the image encoding device 1 to the frame buffer 101, and the input image signal is temporarily stored for each frame. The frame buffer 101 may rearrange the order of the frames in accordance with a predetermined GOP (Group of Picture) structure. The GOP structure is an arrangement of an I picture, a P picture, and a B picture having a predetermined number of frames, and starts with an I picture in decoding order. The frame buffer 101 specifies an image signal of a frame (also referred to as a current frame or a current frame) that is currently processed from the stored input image signal. The frame buffer 101 reads an input image block signal indicating an image of a block (current block or current block) that is currently processed as a part of the image signal of the specified frame. The order in which the frame buffer 101 selects the current block may be the same as the raster scan order, for example. The frame buffer 101 outputs the read input image block signal to the subtraction unit 102, the intra prediction unit 112, and the inter prediction unit 113.

減算部102は、フレームバッファ101から入力された入力画像ブロック信号からイントラ予測部112又はインター予測部113から入力された予測画像ブロック信号を減算して差分画像ブロック信号を生成する。減算部102は、生成した差分画像ブロック信号を直交変換部103に出力する。現フレームがイントラフレームである場合には、減算部102には、予測画像ブロック信号がイントラ予測部112から入力される。現フレームがインターフレームである場合には、減算部102には予測画像ブロック信号がインター予測部113から入力される。減算部102は、入力画像ブロック信号を形成する画素毎の信号値から参照画像ブロック信号を形成する信号値のうち対応する画素の信号値を減算する。   The subtraction unit 102 subtracts the prediction image block signal input from the intra prediction unit 112 or the inter prediction unit 113 from the input image block signal input from the frame buffer 101 to generate a difference image block signal. The subtraction unit 102 outputs the generated difference image block signal to the orthogonal transformation unit 103. When the current frame is an intra frame, the prediction image block signal is input from the intra prediction unit 112 to the subtraction unit 102. If the current frame is an inter frame, the predicted image block signal is input from the inter prediction unit 113 to the subtraction unit 102. The subtracting unit 102 subtracts the signal value of the corresponding pixel among the signal values forming the reference image block signal from the signal value for each pixel forming the input image block signal.

直交変換部103は、減算部102から入力された差分画像ブロック信号が示す信号値について直交変換を行って変換係数を示す変換係数データを生成する。直交変換部103は、直交変換として、例えば、離散コサイン変換(DCT:Discrete Cosine Transform)、カルーネン・レーベ変換(KLT:Karhunen Loeve Transform)等を行う。   The orthogonal transform unit 103 performs orthogonal transform on the signal value indicated by the difference image block signal input from the subtraction unit 102 to generate transform coefficient data indicating the transform coefficient. The orthogonal transform unit 103 performs, for example, discrete cosine transform (DCT), Karhunen-Loeve transform (KLT), and the like as orthogonal transform.

量子化部104は、直交変換部103から入力された変換係数データが示す変換係数を量子化する。量子化部104は、変換係数を符号量制御部115で定めた量子化パラメータにより定められる値での除算により量子化を行う。量子化幅は、予め定めた固定値であってもよい。量子化部104は、量子化した変換係数(量子化変換係数)を示す量子化変換係数データを可逆符号化部105及び逆量子化部107に出力する。   The quantization unit 104 quantizes the transform coefficient indicated by the transform coefficient data input from the orthogonal transform unit 103. The quantization unit 104 quantizes the transform coefficient by division by a value determined by the quantization parameter determined by the code amount control unit 115. The quantization width may be a predetermined fixed value. The quantization unit 104 outputs quantized transform coefficient data indicating the quantized transform coefficient (quantized transform coefficient) to the lossless encoding unit 105 and the inverse quantization unit 107.

可逆符号化部105には、量子化部104から量子化変換係数データが入力される。可逆符号化部105には、モード判定部114からモードデータが入力される。モードデータは、参照画像ブロック信号を用いて予測画像ブロック信号を予測する際の予測モードを示すデータである。入力されたモードデータが示す予測モードによって、符号化の対象となるデータの種類やその有無が異なる。   The lossless encoding unit 105 receives the quantized transform coefficient data from the quantization unit 104. The mode data is input from the mode determination unit 114 to the lossless encoding unit 105. The mode data is data indicating a prediction mode when predicting a predicted image block signal using a reference image block signal. Depending on the prediction mode indicated by the input mode data, the type of data to be encoded and the presence or absence thereof differ.

例えば、モードデータがデータ分割なしの動き補償モードを示す場合、可逆符号化部105には、モード判定部114から現ブロックの動きベクトルデータが入力される。モードデータが分割ありの動き補償モードを示す場合、可逆符号化部105には、モード判定部114から現ブロックをさらに分割したサブブロック毎の動きベクトルデータが入力される。1つの一括したブロック(一括ブロック)が、符号化が行われる符号化単位(Coding Unit)である場合、一括ブロック、サブブロックともに予測が行われる予測単位(Prediction Unit)となりうる。CUとPUとの関係については、インター予測部113の説明において述べる。   For example, when the mode data indicates a motion compensation mode without data division, the motion vector data of the current block is input from the mode determination unit 114 to the lossless encoding unit 105. When the mode data indicates a motion compensation mode with division, the lossless encoding unit 105 receives motion vector data for each sub-block obtained by further dividing the current block from the mode determination unit 114. When one collective block (collective block) is a coding unit (Coding Unit) in which encoding is performed, both the collective block and the sub-block can be a prediction unit (Prediction Unit) in which prediction is performed. The relationship between CU and PU will be described in the description of the inter prediction unit 113.

モードデータがインターフレームでのイントラ予測モードを示す場合、可逆符号化部105には、量子化部104から量子化変換係数データが入力されるが、参照画像データ、動きベクトルデータは入力されない。モードデータがスキップモードを示す場合、可逆符号化部105には、スキップモードを示すモードデータ以外の、量子化変換係数データ、参照画像データ、動きベクトルデータは、入力されない。
可逆符号化部105は、入力されたデータを統合し、統合したデータ(統合データ)について可逆符号化、例えば、可変長符号化、算術符号化、等を行って符号化データを生成する。可逆符号化部105は、生成した符号化データを蓄積バッファ106に一時的に記憶させる。
When the mode data indicates the intra prediction mode in the inter frame, the quantized transform coefficient data is input to the lossless encoding unit 105 from the quantization unit 104, but the reference image data and motion vector data are not input. When the mode data indicates the skip mode, quantized transform coefficient data, reference image data, and motion vector data other than the mode data indicating the skip mode are not input to the lossless encoding unit 105.
The lossless encoding unit 105 integrates input data, and performs lossless encoding on the integrated data (integrated data), for example, variable length encoding, arithmetic encoding, and the like to generate encoded data. The lossless encoding unit 105 temporarily stores the generated encoded data in the accumulation buffer 106.

なお、可逆符号化部105は、符号量制御部115がブロック毎に定めた量子化パラメータを他の入力データ(例えば、量子化変換係数データ)等と統合して統合データを生成してもよい。また、可逆符号化部105は、現ブロックに係る量子化パラメータと、隣接ブロックに係る量子化パラメータとの差分である差分量子化パラメータを、量子化パラメータの代わりに統合して統合データを生成してもよい。ブロック間で量子化パラメータがほぼ一定である場合には、差分量子化パラメータはブロック間で0が連続する。そのため、可逆符号化によって符号量をより少なくすることができる。   The lossless encoding unit 105 may generate integrated data by integrating the quantization parameter determined for each block by the code amount control unit 115 with other input data (for example, quantized transform coefficient data). . In addition, the lossless encoding unit 105 integrates a differential quantization parameter, which is a difference between the quantization parameter related to the current block and the quantization parameter related to the adjacent block, instead of the quantization parameter to generate integrated data. May be. When the quantization parameter is almost constant between the blocks, the difference quantization parameter is 0 continuously between the blocks. Therefore, the amount of codes can be reduced by lossless encoding.

なお、可逆符号化部105は、既に符号化された入力画像ブロックに係る動きベクトルを記憶する符号化データ記憶部を備え、入力された動きベクトルとの距離が最も小さい動きベクトルを予測ベクトルとして選択(ベクトル予測)してもよい。その場合、可逆符号化部105は、入力された動きベクトルから選択された予測ベクトルの差分ベクトルを算出する。可逆符号化部105は、算出した差分ベクトルと選択された予測ベクトルを示すベクトルインデックスを入力された動きベクトルデータの代わりに統合して統合データを生成してもよい。   Note that the lossless encoding unit 105 includes an encoded data storage unit that stores a motion vector related to an input image block that has already been encoded, and selects a motion vector having the smallest distance from the input motion vector as a prediction vector. (Vector prediction) may be performed. In that case, the lossless encoding unit 105 calculates a difference vector of the prediction vector selected from the input motion vector. The lossless encoding unit 105 may generate integrated data by integrating the calculated difference vector and a vector index indicating the selected prediction vector instead of the input motion vector data.

蓄積バッファ106は、可逆符号化部105から入力された符号化データを記憶する。蓄積バッファ106は、記憶した符号化データを画像符号化装置1の外部、例えば、画像復号装置2に出力する。   The accumulation buffer 106 stores the encoded data input from the lossless encoding unit 105. The accumulation buffer 106 outputs the stored encoded data to the outside of the image encoding device 1, for example, the image decoding device 2.

逆量子化部107は、量子化部104から入力された量子化変換係数データが示す量子化変換係数を逆量子化して、符号量制御部115で定めた量子化パラメータに対応する範囲内のいずれかの値をとる復元変換係数を示す復元変換係数データを生成する。逆量子化部107は、復元変換係数データを逆直交変換部108に出力する。
逆直交変換部108は、逆量子化部107から入力された復元変換係数データが示す復元変換係数について逆直交変換を行って復元差分画像ブロック信号を生成する。逆直交変換部108が用いる逆直交変換は、直交変換部103が行う直交変換の逆演算であることが多い。逆直交変換部108は、生成した復元差分画像ブロック信号を加算部109に出力する。
The inverse quantization unit 107 inversely quantizes the quantized transform coefficient indicated by the quantized transform coefficient data input from the quantizing unit 104, so that any one of the ranges corresponding to the quantization parameter determined by the code amount control unit 115 is obtained. Restored transform coefficient data indicating the restored transform coefficient that takes these values is generated. The inverse quantization unit 107 outputs the restored transform coefficient data to the inverse orthogonal transform unit 108.
The inverse orthogonal transform unit 108 performs inverse orthogonal transform on the restored transform coefficient indicated by the restored transform coefficient data input from the inverse quantization unit 107 to generate a restored difference image block signal. The inverse orthogonal transform used by the inverse orthogonal transform unit 108 is often an inverse operation of the orthogonal transform performed by the orthogonal transform unit 103. The inverse orthogonal transform unit 108 outputs the generated restored difference image block signal to the addition unit 109.

加算部109は、逆直交変換部108から入力された復元差分画像ブロック信号と、イントラ予測部112又はインター予測部113から入力された予測画像ブロック信号を加算して復元画像ブロック信号を生成する。ここで、加算部109は、復元差分画像ブロック信号を形成する画素毎の信号値と予測画像ブロック信号を形成する信号値のうち対応する画素の信号値とを加算する。加算部109は、生成した復元画像ブロック信号をデブロッキングフィルタ110に出力する。   The addition unit 109 adds the restored difference image block signal input from the inverse orthogonal transform unit 108 and the predicted image block signal input from the intra prediction unit 112 or the inter prediction unit 113 to generate a restored image block signal. Here, the adding unit 109 adds the signal value for each pixel forming the restored difference image block signal and the signal value of the corresponding pixel among the signal values forming the predicted image block signal. The adder 109 outputs the generated restored image block signal to the deblocking filter 110.

デブロッキングフィルタ110は、加算部109から入力された復元画像ブロック信号にフィルタリング処理を行ってブロック歪の成分を除去する。デブロッキングフィルタ110は、ブロック歪の成分が除去された復元画像ブロック信号を参照画像ブロック信号として参照メモリ111に記憶させる。
参照メモリ111は、デブロッキングフィルタ110から入力された参照画像ブロック信号をフレーム毎に、その参照画像ブロックに応じた記憶領域に記憶する。これにより、参照画像を示す参照画像信号がフレーム毎に記憶される。
The deblocking filter 110 performs filtering processing on the restored image block signal input from the adder 109 to remove a block distortion component. The deblocking filter 110 stores the restored image block signal from which the block distortion component has been removed in the reference memory 111 as a reference image block signal.
The reference memory 111 stores the reference image block signal input from the deblocking filter 110 in a storage area corresponding to the reference image block for each frame. Thereby, the reference image signal indicating the reference image is stored for each frame.

イントラ予測部112は、現フレームがイントラフレーム(Iピクチャ)である場合には、参照メモリ111に既に記憶された参照画像信号のうち、現フレームに係る画像信号を用いてイントラ予測を行って現ブロックに係る予測画像ブロック信号を生成する。イントラ予測部112は、予め定めた複数の予測モードのそれぞれでイントラ予測を行う。この複数の予測モード間では、互いに予測方向などが異なる。イントラ予測部112は、後述するコスト値を算出し、これによって定められたモードデータを対応付けてモード判定部114に出力する。イントラ予測部112は、生成した予測画像ブロック信号を減算部102及び加算部109に出力する。   When the current frame is an intra frame (I picture), the intra prediction unit 112 performs intra prediction using the image signal related to the current frame among the reference image signals already stored in the reference memory 111 and performs the current prediction. A prediction image block signal related to the block is generated. The intra prediction unit 112 performs intra prediction in each of a plurality of predetermined prediction modes. The prediction directions are different between the plurality of prediction modes. The intra prediction unit 112 calculates a cost value, which will be described later, and associates mode data determined thereby to output to the mode determination unit 114. The intra prediction unit 112 outputs the generated predicted image block signal to the subtraction unit 102 and the addition unit 109.

インター予測部113は、現フレームがインターフレーム(Pピクチャ、Bピクチャ)である場合には、参照メモリ111に既に記憶された参照画像信号を用いて主にインター予測を行って、現ブロックに係る予測画像ブロック信号を生成する。なお、インター予測部113は、インターフレームの画像信号についてイントラ予測を行って予測画像ブロック信号を生成し、モード判定部114はイントラ予測モードを採用するか否か判定するようにしてもよい。
インター予測に用いられる参照画像信号のフレームは、GOP構造に応じたフレーム順序のうち現フレームがどのフレームであるかによって定められる。例えば、現フレームがPピクチャである場合には、インター予測部113は、現フレームよりも前の時刻(過去)の1つのフレーム(例えば、Iピクチャ)の参照画像を用いて順方向予測を行うことが多い。現フレームがBピクチャである場合には、過去の1つのフレーム(例えば、Iピクチャ又はBピクチャ)の参照画像と現フレームよりも後の時刻(未来)の1つのフレーム(例えば、Pピクチャ又はBピクチャ)の参照画像とを用いて双方向予測を行うことが多い。フレーム順序、予測処理に用いられる参照画像信号に係るフレーム、予測処理で生成される予測画像信号に係るフレームの関係は、GOP構造で示される。GOP構造の例については後述する。
When the current frame is an inter frame (P picture, B picture), the inter prediction unit 113 mainly performs inter prediction using the reference image signal already stored in the reference memory 111, and relates to the current block. A prediction image block signal is generated. Note that the inter prediction unit 113 may perform intra prediction on the inter-frame image signal to generate a predicted image block signal, and the mode determination unit 114 may determine whether to adopt the intra prediction mode.
The frame of the reference image signal used for inter prediction is determined by which frame is the current frame in the frame order corresponding to the GOP structure. For example, when the current frame is a P picture, the inter prediction unit 113 performs forward prediction using a reference image of one frame (for example, I picture) at a time (past) before the current frame. There are many cases. When the current frame is a B picture, a reference image of one past frame (for example, I picture or B picture) and one frame (for example, a P picture or B picture) after the current frame (future) Bidirectional prediction is often performed using a reference picture of (picture). The relationship between the frame order, the frame related to the reference image signal used in the prediction process, and the frame related to the predicted image signal generated in the prediction process is indicated by a GOP structure. An example of the GOP structure will be described later.

ここで、インター予測部113は、予め定めた複数の予測モードのいずれかで予測処理を行う。予測モードには、例えば、動き補償予測モード、スキップモードがある。動き補償予測モードとは、上述したインター予測を行う予測モードである。即ち、動き補償予測モードは、参照画像を用いて注目ブロックにおけるフレーム間の画像の動きを検出して予測画像ブロックを予測する予測モードである。動き補償予測モードには、符号化の単位として入力画像ブロックをそのまま一括した一括ブロックについて予測処理を行う分割なしの場合と、より細分化したサブブロック毎に予測処理を行う分割ありの場合とがある。一括ブロックの場合は、その入力画像ブロック、つまり、CUと同じ大きさのブロックのPU、細分化したサブブロックの場合は分割したPUとなる。PUの大きさは、例えば、水平方向16画素×垂直方向16画素、水平方向8画素×垂直方向16画素、水平方向16画素×垂直方向8画素、水平方向8画素×垂直方向8画素などである。スキップモードとは、現ブロックについて動きベクトルもしくは動きベクトルについての差分ベクトルや量子化変換係数等の符号化データを生成、送信せずに隣接する符号化済みブロックの情報をコピーするモードである。   Here, the inter prediction unit 113 performs the prediction process in any of a plurality of predetermined prediction modes. The prediction mode includes, for example, a motion compensation prediction mode and a skip mode. The motion compensation prediction mode is a prediction mode for performing the above-described inter prediction. That is, the motion compensation prediction mode is a prediction mode in which a predicted image block is predicted by detecting a motion of an image between frames in a target block using a reference image. In the motion compensation prediction mode, there are a case where there is no division in which prediction processing is performed on a batch block in which input image blocks are batched as an encoding unit, and a case where there is division in which prediction processing is performed for each more sub-block. is there. In the case of a collective block, the input image block, that is, the PU of a block having the same size as the CU, and in the case of a sub-block that is subdivided, is a divided PU. The size of the PU is, for example, horizontal 16 pixels × vertical 16 pixels, horizontal 8 pixels × vertical 16 pixels, horizontal 16 pixels × vertical 8 pixels, horizontal 8 pixels × vertical 8 pixels, and the like. . The skip mode is a mode in which encoded data such as a motion vector or a difference vector for a motion vector or a quantized transform coefficient is generated for the current block, and information on adjacent encoded blocks is copied without being transmitted.

分割なしの動き補償予測モードでは、インター予測部113はCUと同じ大きさのPU毎に予測画像ブロック信号を生成する。インター予測部113は、生成した予測画像ブロック信号が示す予測画像ブロックのうちフレームバッファ101から入力された入力画像ブロックに最も近似するブロックを選択する。インター予測部113は、選択する近似の度合いを示すコスト値として、例えば、RD(Rate−Distortion)コストを用いる(RD最適化)。RDコストは、入力画像ブロックの予測画像ブロックに対する歪量に、例えば、差分ベクトルを符号化する際の情報量(符号量)を重み付け加算した値である。差分ベクトルは、動きベクトルとその動きベクトルについて予測処理を行って生成した予測ベクトルとの差分である。この差分ベクトルが符号化の対象となる。その他、インター予測部113は、コスト値として絶対差分和(SAD:Sum of Absolute Differences)、平方差分和(SSD:Sum of Squared Differences)等を用いてもよい。   In the motion compensation prediction mode without division, the inter prediction unit 113 generates a predicted image block signal for each PU having the same size as the CU. The inter prediction unit 113 selects a block that most closely approximates the input image block input from the frame buffer 101 among the predicted image blocks indicated by the generated predicted image block signal. The inter prediction unit 113 uses, for example, RD (Rate-Distortion) cost as a cost value indicating the degree of approximation to be selected (RD optimization). The RD cost is a value obtained by weighting and adding, for example, an information amount (code amount) when encoding a difference vector to a distortion amount of an input image block with respect to a predicted image block. The difference vector is a difference between a motion vector and a prediction vector generated by performing prediction processing on the motion vector. This difference vector is an object to be encoded. In addition, the inter prediction unit 113 may use a sum of absolute differences (SAD), a sum of square differences (SSD), or the like as a cost value.

インター予測部113は、例えば、選択した予測画像ブロックを示す予測画像ブロック信号、その予測画像ブロック信号を生成する際に参照した参照画像信号のフレームを示す参照フレーム番号、選択した予測画像ブロックに係る動きベクトルを示す動きベクトルデータ、算出したコスト値及び分割なしの動き補償予測モードを示すモードデータを対応付けてモード判定部114に出力する。   The inter prediction unit 113 relates to, for example, a predicted image block signal indicating the selected predicted image block, a reference frame number indicating a frame of the reference image signal referred to when the predicted image block signal is generated, and the selected predicted image block. The motion vector data indicating the motion vector, the calculated cost value, and the mode data indicating the motion compensation prediction mode without division are associated with each other and output to the mode determination unit 114.

分割ありの動き補償予測モードでは、インター予測部113は分割したPU毎に予測画像ブロック信号を生成する。インター予測部113は、PU毎に予測画像ブロック信号が示す予測画像ブロックと、それぞれのPUに対応する入力画像ブロックの部分との差分を基本としたコスト値を算出することで、例えばRD最適化により、PU毎に最も近似する予測画像ブロック信号を選択することができる。インター予測部113は、PU毎に選択した予測画像ブロック信号について算出したコスト値をそのPUが属する現ブロック内で合算する。
インター予測部113は、PU毎に選択した予測画像ブロック信号、参照した参照画像信号のフレームを示す参照フレーム番号、選択した動きベクトルを示す動きベクトルデータ、算出したコスト値及び分割ありの動き補償予測モードを示すモードデータを対応付けてモード判定部114に出力する。
In the motion compensated prediction mode with division, the inter prediction unit 113 generates a predicted image block signal for each divided PU. The inter prediction unit 113 calculates a cost value based on the difference between the prediction image block indicated by the prediction image block signal for each PU and the portion of the input image block corresponding to each PU, for example, RD optimization Thus, the predicted image block signal that is closest to each PU can be selected. The inter prediction unit 113 adds the cost values calculated for the predicted image block signal selected for each PU within the current block to which the PU belongs.
The inter prediction unit 113 selects a predicted image block signal selected for each PU, a reference frame number indicating a frame of the referenced reference image signal, motion vector data indicating the selected motion vector, a calculated cost value, and motion compensated prediction with division. The mode data indicating the mode is associated and output to the mode determination unit 114.

イントラ予測モードでは、インター予測部113は現ブロックについてイントラ予測を行って予測画像ブロック信号を生成する。インター予測部113は、予測画像ブロック信号と入力画像ブロック信号との近似の度合いを示すコスト値を算出する。インター予測部113は、現ブロックについて生成した予測画像ブロック信号、算出したコスト値及びイントラ予測モードを示すモードデータを対応付けてモード判定部114に出力する。   In the intra prediction mode, the inter prediction unit 113 performs intra prediction on the current block to generate a predicted image block signal. The inter prediction unit 113 calculates a cost value indicating the degree of approximation between the predicted image block signal and the input image block signal. The inter prediction unit 113 associates the predicted image block signal generated for the current block, the calculated cost value, and the mode data indicating the intra prediction mode, and outputs them to the mode determination unit 114.

スキップモードでは、インター予測部113は、現ブロックに隣接するブロックであって処理済みのブロックに係る動きベクトルの代表値、例えば、中央値ベクトルを算出する(メディアン予測)。処理がラスタスキャンの順序で行われる場合、処理済みのブロックとは、例えば、現ブロックの左上、真上、右上、左にそれぞれ隣接する4つのブロックである。インター予測部113は、現フレームに対応するフレームの参照画像のうち現ブロックから、算出した中央値ベクトルが示すずれ量で補償した位置に格納された参照画像ブロック信号を予測画像ブロック信号として参照メモリ111から読み出す。インター予測部113は、予測画像ブロック信号と入力画像ブロック信号との近似の度合いを示すコスト値を算出する。インター予測部113は、算出したコスト値及びスキップモードを示すモードデータを対応付けてモード判定部114に出力する。   In the skip mode, the inter prediction unit 113 calculates a representative value, for example, a median vector of motion vectors related to a processed block that is adjacent to the current block (median prediction). When the processing is performed in the order of raster scanning, the processed blocks are, for example, four blocks adjacent to the upper left, right above, upper right, and left of the current block, respectively. The inter prediction unit 113 uses, as a reference image block signal, a reference image block signal stored at a position compensated with a shift amount indicated by the calculated median vector from the current block in the reference image of the frame corresponding to the current frame. Read from 111. The inter prediction unit 113 calculates a cost value indicating the degree of approximation between the predicted image block signal and the input image block signal. The inter prediction unit 113 associates the calculated cost value with the mode data indicating the skip mode, and outputs them to the mode determination unit 114.

モード判定部114は、インター予測部113から少なくともコスト値とモードデータが対応付けて入力される。例えば、モードデータが分割なしの動き補償モードを示す場合、CUと同じサイズのPU毎の予測画像ブロック信号、参照画像データ、動きベクトルデータも対応付けて入力される。モードデータが分割ありの動き補償モードを示す場合、分割したPU毎の予測画像ブロック信号、参照画像データ、動きベクトルデータも対応付けて入力される。モードデータがイントラ予測モードを示す場合、予測画像ブロック信号も対応付けて入力される。   The mode determination unit 114 receives at least a cost value and mode data in association with each other from the inter prediction unit 113. For example, when the mode data indicates a motion compensation mode without division, a predicted image block signal, reference image data, and motion vector data for each PU having the same size as the CU are also input in association with each other. When the mode data indicates a motion compensation mode with division, a predicted image block signal, reference image data, and motion vector data for each divided PU are also input in association with each other. When the mode data indicates the intra prediction mode, a predicted image block signal is also input in association with it.

モード判定部114は、複数の予測モードのうち入力されたコスト値が最小となるコスト値に対応する予測モードを示すモードデータを選択する。モード判定部114は、選択したモードデータを可逆符号化部105に出力する。例えば、選択されたモードがデータ分割なしの動き補償モードを示す場合、モード判定部114は、CUと同じサイズのPU毎の予測画像ブロック信号を減算部102及び加算部109に出力し、CUと同じサイズのPU毎の動きベクトルデータを可逆符号化部105に出力する。選択されたモードデータが分割ありの動き補償モードを示す場合、モード判定部114は、分割したPU毎の予測画像ブロック信号をCU内で統合して減算部102及び加算部109に出力し、分割したPU毎の動きベクトルデータを可逆符号化部105に出力する。選択されたモードデータがイントラ予測モードを示す場合、モード判定部114は、予測画像ブロック信号を減算部102及び加算部109に出力する。   The mode determination unit 114 selects mode data indicating a prediction mode corresponding to the cost value at which the input cost value is the minimum among the plurality of prediction modes. The mode determination unit 114 outputs the selected mode data to the lossless encoding unit 105. For example, when the selected mode indicates a motion compensation mode without data division, the mode determination unit 114 outputs a prediction image block signal for each PU having the same size as the CU to the subtraction unit 102 and the addition unit 109, and The motion vector data for each PU with the same size is output to the lossless encoding unit 105. When the selected mode data indicates a motion compensation mode with division, the mode determination unit 114 integrates the divided prediction image block signals for each PU in the CU, and outputs them to the subtraction unit 102 and the addition unit 109. The motion vector data for each PU is output to the lossless encoding unit 105. When the selected mode data indicates the intra prediction mode, the mode determination unit 114 outputs the predicted image block signal to the subtraction unit 102 and the addition unit 109.

符号量制御部115は、量子化部104で生成される量子化変換係数データの符号量を入力画像のフレームの種別に応じてブロック毎に制御する。上述したように、この量子化変換係数データが示す変換係数は、入力画像ブロック信号からイントラ予測部112もしくはインター予測部113が生成した予測画像ブロック信号を減算した差分画像ブロック信号を、直交変換部103で直交変換して得られる。   The code amount control unit 115 controls the code amount of the quantized transform coefficient data generated by the quantization unit 104 for each block according to the frame type of the input image. As described above, the transform coefficient indicated by the quantized transform coefficient data is obtained by subtracting the difference image block signal obtained by subtracting the prediction image block signal generated by the intra prediction unit 112 or the inter prediction unit 113 from the input image block signal. It is obtained by orthogonal transformation at 103.

ところで、現フレームがBピクチャであるとき、インター予測部113は、既に双方向予測を行って生成したBピクチャを参照画像信号として用い、予測画像ブロック信号を生成する場合がある。その場合、符号量制御部115は、その既に行った双方向予測において行われた動き補償に係るデータに基づいて現ブロックに係る量子化変換係数データの符号量を定めてもよい。符号量制御部115には、フレームの種別(例えば、Iピクチャ、Pピクチャ)によっては、予め定められた固定の符号量が設定されていてもよい。符号量の設定例及び制御例については後述する。   By the way, when the current frame is a B picture, the inter prediction unit 113 may generate a predicted image block signal by using a B picture that has already been generated by bi-directional prediction as a reference image signal. In this case, the code amount control unit 115 may determine the code amount of the quantized transform coefficient data related to the current block based on the data related to motion compensation performed in the already performed bidirectional prediction. The code amount control unit 115 may be set with a predetermined fixed code amount depending on the type of frame (for example, I picture, P picture). A code amount setting example and a control example will be described later.

次に、参照画像及び予測画像の例について説明する。
図2は、参照画像及び予測画像の例を示す図である。
図2(a−1)、(a−2)、(a−3)は、それぞれ過去のフレームの参照画像、現フレームの画像、未来のフレームの参照画像を示す。これらの画像は、それぞれ障壁bと車両cを含む。図2(a−1)〜(a−3)は、時間経過に伴って車両cが障壁bの背後を左から右へ移動することを示す。
Next, examples of reference images and predicted images will be described.
FIG. 2 is a diagram illustrating an example of a reference image and a predicted image.
FIGS. 2A-1, 2A-2, and 3A-3 illustrate a reference image of a past frame, an image of a current frame, and a reference image of a future frame, respectively. These images include a barrier b and a vehicle c, respectively. FIGS. 2A-1 to 2A-3 show that the vehicle c moves behind the barrier b from the left to the right as time elapses.

図2(p−2)は、図2(a−1)に示す参照画像のみに基づいて順方向予測を行って生成した(a−2)と同時刻の順方向予測画像を示す。図2(p−2)において障壁bの直近の右側に示されている領域は、図2(a−1)の障壁bの背後に隠れていた(オクルージョン(occlusion)部分であって、移動することで現れた部分である(アンカバード・バックグラウンド(uncovered background))。この領域が空白であることは、過去のフレームの参照画像だけでは予測できないことを示す。そのため、この領域に係る予測画像ブロックと入力画像ブロックとの差分画像ブロックの信号値をさらに符号化する必要があるため、符号量を低減することができない。   FIG. 2 (p-2) shows a forward prediction image at the same time as (a-2) generated by performing forward prediction based only on the reference image shown in FIG. 2 (a-1). The region shown on the right side of the barrier b in FIG. 2 (p-2) is the (occlusion) portion hidden behind the barrier b in FIG. 2 (a-1) and moves. (Uncovered background) This blank area indicates that it cannot be predicted only with reference images of past frames, and therefore, a predicted image related to this area. Since it is necessary to further encode the signal value of the difference image block between the block and the input image block, the code amount cannot be reduced.

図2(b−2)は、図2(a−1)に示す参照画像の他、図2(a−3)に示す参照画像を用いて双方向予測を行って生成した双方向予測画像を示す。図2(b−2)では、図(p−2)に生じていた空白の領域が現れず、図2(a−2)に示される現フレームの画像に近似する。つまり、差分画像ブロックの信号値が、入力画像ブロックの信号値よりも十分に減少でき、符号量を低減することができる。但し、双方向予測では未来のフレームの参照画像信号が用いられるため、その処理で用いられる参照画像信号を記憶しておき、そのフレームの順序を入れ替えることが要求される。これにより遅延が発生する。   FIG. 2 (b-2) shows a bi-directional prediction image generated by performing bi-directional prediction using the reference image shown in FIG. 2 (a-3) in addition to the reference image shown in FIG. 2 (a-1). Show. In FIG. 2B-2, the blank area generated in FIG. 2P-2 does not appear, and approximates the current frame image shown in FIG. 2A-2. That is, the signal value of the difference image block can be sufficiently reduced from the signal value of the input image block, and the code amount can be reduced. However, since the reference image signal of a future frame is used in bidirectional prediction, it is required to store the reference image signal used in the processing and to change the order of the frames. This causes a delay.

次に、GOP構造の例について説明する。
図3は、GOP構造の一例を示す概念図である。
図3に示すGOP構造は、MPEG−4 AVC、HEVCといった従来の画像符号化方式でも用いられている。図3において、水平方向は時刻を示し、左側よりも右側の方がより新しい時刻を示す。
縦長の四角形は各フレームの画像を示し、それぞれの四角形のほぼ中心には記号が示されている。その記号のそれぞれは2つの文字からなり、2つの文字のうち左側の「I」等はフレームの種別(Iピクチャ等)を示し、右側の「0」等はGOPにおけるフレームの順序(0番目等)を示す。各四角形間を結ぶ矢印の起点、終点は、それぞれ予測処理に用いる参照画像に係るフレームと予測処理によって生成された予測画像に係るフレームを示す。例えば、フレームP4の予測画像は、フレームI0の参照画像を用いた順方向予測を行って生成される。また、フレームB1、B2、B3の予測画像は、いずれもフレームI0、フレームP4の参照画像を用いた双方向予測を行って生成される。このGOPでは、Bピクチャは参照画像にはならない。
Next, an example of the GOP structure will be described.
FIG. 3 is a conceptual diagram showing an example of the GOP structure.
The GOP structure shown in FIG. 3 is also used in conventional image coding schemes such as MPEG-4 AVC and HEVC. In FIG. 3, the horizontal direction indicates the time, and the right side indicates the newer time than the left side.
A vertically long rectangle indicates an image of each frame, and a symbol is shown at the approximate center of each rectangle. Each of the symbols consists of two characters. Among the two characters, “I” on the left side indicates the type of frame (I picture, etc.), and “0” on the right side indicates the frame order (0th etc.) in the GOP. ). The starting point and the ending point of the arrows connecting the squares indicate the frame related to the reference image used for the prediction process and the frame related to the predicted image generated by the prediction process. For example, the predicted image of the frame P4 is generated by performing forward prediction using the reference image of the frame I0. The predicted images of the frames B1, B2, and B3 are all generated by performing bi-directional prediction using the reference images of the frames I0 and P4. In this GOP, the B picture is not a reference image.

一方、本実施形態に係る画像符号化装置1で用いられるGOP構造は、双方向予測において、あるBピクチャが参照画像として用いられ、他のBピクチャの予測画像を生成する構造である。この構造は、階層B構造と呼ばれ、上位階層と下位階層とを含む。上位階層は、Iピクチャ、Pピクチャ又はその両者を参照画像として双方向予測を行い、Bピクチャを予測画像として生成する階層である。下位階層は、上位階層で生成したBピクチャを参照画像として用いることができ、これにより双方向予測を行って、他のBピクチャを予測する階層である。なお、参照画像として用いられないBピクチャは非参照ピクチャと呼ばれる。以下の説明では、下位階層で生成される非参照のBピクチャを、bピクチャと表記することで、Bピクチャ一般又は上位階層で生成されるBピクチャと区別する。   On the other hand, the GOP structure used in the image coding apparatus 1 according to the present embodiment is a structure in which a certain B picture is used as a reference image and a predicted image of another B picture is generated in bidirectional prediction. This structure is called a hierarchy B structure and includes an upper hierarchy and a lower hierarchy. The upper layer is a layer that performs bidirectional prediction using an I picture, a P picture, or both as reference images, and generates a B picture as a predicted image. The lower layer is a layer in which the B picture generated in the upper layer can be used as a reference image, and bidirectional prediction is thereby performed to predict another B picture. A B picture that is not used as a reference image is called a non-reference picture. In the following description, a non-reference B picture generated in the lower hierarchy is distinguished from a B picture generated in a general B picture or an upper hierarchy by expressing it as a b picture.

図4は、階層B構造の一例を示す概念図である。
図4に示す例では、上位階層においてフレームB2の予測画像は、図3に示す例と同様にフレームI0、フレームP4の参照画像を用いた双方向予測を行って生成される。下位階層において、フレームb1の予測画像は、フレームI0、フレームB2の参照画像を用いた双方向予測を行って生成される。フレームb3の予測画像は、フレームB2、フレームP4の参照画像を用いた双方向予測を行って生成される。フレームb1、b3の予測画像は、それぞれ時間的に隣接フレームに係る参照画像を用いて予測されるため、図3に示す例のように時間的により離れたフレーム(例えば、フレームI0、P4)のみを用いる場合よりも画質が向上する。そのため、残差画像の信号値が小さくなるため符号量を低減することができる。なお、フレームb1、b3は、双方向予測に用いられない非参照ピクチャである。つまり、これらの参照画像を用いて下位の階層の双方向予測は行われない。そのため、フレームb1、b3の画質は、その他のフレームで生成される予測画像の画質に影響を及ぼさない。
FIG. 4 is a conceptual diagram illustrating an example of a hierarchical B structure.
In the example illustrated in FIG. 4, the predicted image of the frame B2 in the upper layer is generated by performing bi-directional prediction using the reference images of the frames I0 and P4 as in the example illustrated in FIG. In the lower hierarchy, the predicted image of the frame b1 is generated by performing bi-directional prediction using the reference images of the frames I0 and B2. The predicted image of the frame b3 is generated by performing bi-directional prediction using the reference images of the frame B2 and the frame P4. Since the predicted images of the frames b1 and b3 are each predicted using the reference image related to the temporally adjacent frame, only the frames that are further apart in time (for example, the frames I0 and P4) as in the example illustrated in FIG. The image quality is improved as compared with the case of using. Therefore, since the signal value of the residual image becomes small, the code amount can be reduced. Note that the frames b1 and b3 are non-reference pictures that are not used for bidirectional prediction. That is, bi-directional prediction of the lower hierarchy is not performed using these reference images. Therefore, the image quality of the frames b1 and b3 does not affect the image quality of the predicted image generated in the other frames.

図4に示す下位階層のように、他のBピクチャを参照画像として用いるのは、比較的新しい画像符号化方式(新方式)では旧方式よりも予測精度が向上しているため、Bピクチャを用いても予測画像の画質の劣化が抑制されるという背景がある。新方式とは、例えば、MPEG−4 AVC、HEVC、等であり、旧方式とは、例えば、MPEG−2、等である。また、新方式では、Iピクチャに係るフレームの予測画像の画質も旧方式よりも向上しているため、この予測画像に基づく参照画像を用いて生成されるPピクチャやBピクチャの予測画像の画質も向上しているという背景もある。   The reason why the other B picture is used as the reference image as in the lower hierarchy shown in FIG. 4 is that the prediction accuracy is improved in the relatively new image coding method (new method) compared to the old method. Even if it is used, there is a background that deterioration of the image quality of the predicted image is suppressed. The new system is, for example, MPEG-4 AVC, HEVC, etc., and the old system is, for example, MPEG-2, etc. Further, in the new method, the image quality of the predicted image of the frame relating to the I picture is also improved compared to the old method, and therefore the image quality of the predicted image of the P picture or B picture generated using the reference image based on this predicted image. There is also a background that has improved.

図5は、階層B構造の他の例を示す概念図である。
図5において横軸は時刻を示し、下段に上位階層、上段に下位階層をそれぞれ示す。
図5に示す例では、上位階層は一定時間間隔でフレームI0、B1、P2、B3、P4を有し、下位階層は一定時間間隔でフレームb1、b2、b3、b4を有する。フレームb1、b2、b3、b4の時刻は、それぞれ、フレームI0、B1の中間、フレームB1、P2の中間、フレームP2、B3、フレームB3、P4の中間である。
FIG. 5 is a conceptual diagram showing another example of the hierarchical B structure.
In FIG. 5, the horizontal axis indicates the time, and the lower level indicates the upper level and the upper level indicates the lower level.
In the example shown in FIG. 5, the upper layer has frames I0, B1, P2, B3, and P4 at regular time intervals, and the lower layer has frames b1, b2, b3, and b4 at regular time intervals. The times of the frames b1, b2, b3, and b4 are the middle of the frames I0 and B1, the middle of the frames B1 and P2, and the middle of the frames P2, B3, B3, and P4, respectively.

この例では、上位階層においてフレームP2、P4の予測画像は、それぞれフレームI0を参照画像として用いた順方向予測を行って生成される。フレームB1の予測画像は、フレームI0、P2を参照画像として用いた双方向予測を行って生成される。フレームB3の予測画像は、フレームP2、P4を参照画像として用いた双方向予測を行って生成される。
下位階層においてフレームb1の予測画像は、フレームI0、B1を参照画像として用いた双方向予測を行って生成される。フレームb2の予測画像は、フレームB1、P2を参照画像として用いた双方向予測を行って生成される。フレームb3の予測画像は、フレームP2、B3を参照画像として用いた双方向予測を行って生成される。フレームb4の予測画像は、フレームB3、P4を参照画像として用いた双方向予測を行って生成される。
In this example, the predicted images of the frames P2 and P4 in the upper layer are generated by performing forward prediction using the frame I0 as a reference image. The predicted image of the frame B1 is generated by performing bi-directional prediction using the frames I0 and P2 as reference images. The predicted image of the frame B3 is generated by performing bi-directional prediction using the frames P2 and P4 as reference images.
In the lower layer, the predicted image of the frame b1 is generated by performing bi-directional prediction using the frames I0 and B1 as reference images. The predicted image of the frame b2 is generated by performing bi-directional prediction using the frames B1 and P2 as reference images. The predicted image of the frame b3 is generated by performing bi-directional prediction using the frames P2 and B3 as reference images. The predicted image of the frame b4 is generated by performing bi-directional prediction using the frames B3 and P4 as reference images.

この例でも、フレームb1、b2、b3、b4の予測画像は、それぞれ時間的に隣接するフレームに係る参照画像を用いて予測されるため、時間的により離れたフレーム(例えば、フレームI0、P2、P4)のみを用いる場合よりも画質が向上する。そのため、符号量を低減することができる。なお、フレームb1、b2、b3、b4は、非参照ピクチャであるため、その他のフレームで生成される予測画像の画質に影響を及ぼさない。   Also in this example, since the predicted images of the frames b1, b2, b3, and b4 are predicted using the reference images related to the temporally adjacent frames, for example, frames that are more distant from each other (for example, the frames I0, P2,. The image quality is improved as compared with the case of using only P4). Therefore, the code amount can be reduced. Note that the frames b1, b2, b3, and b4 are non-reference pictures, and therefore do not affect the image quality of predicted images generated in other frames.

次に、符号量制御部115が制御する符号量について説明する。
符号量制御部115は、符号量の指標として、例えば、量子化パラメータQを用いる。Qは、例えば、1から31まで(MPEG−2の例)、1から51まで(AVCの例)、1から57まで(HEVCの例)などの範囲内の整数値である。Qは、例えばAVCでは、6大きくなる毎に符号量が1/2に減少することを示す指標である。つまり、Qは、量子化部104に入力される変換係数データが示す変換係数が量子化後にとり得る値の範囲を示す。
符号量制御部115は、イントラフレームであるIピクチャに他の種別のフレームよりも小さいQ(符号量が大きい)を予め定めておいてもよい。Iピクチャは、他のフレームを予測する際に参照されるので、Iピクチャに係る画質を高くすることで符号化した映像全体の画質を向上することができる。
Next, the code amount controlled by the code amount control unit 115 will be described.
The code amount control unit 115 uses, for example, a quantization parameter Q p as an index of the code amount. Q p is, for example, 1 to 31 (examples of MPEG-2), (example of AVC) from 1 to 51, an integer value in the range such as from 1 to 57 (examples of HEVC). Q p is the example AVC, the code amount for each 6 increases is an indicator showing that reduced to 1/2. That is, Q p indicates a range of values that the transform coefficient indicated by the transform coefficient data input to the quantization unit 104 can take after quantization.
The code amount control unit 115 may predetermine Q p (the code amount is large) smaller than that of other types of frames in the I picture that is an intra frame. Since the I picture is referred to when predicting other frames, the image quality of the entire encoded video can be improved by increasing the image quality of the I picture.

符号量制御部115は、インターフレームであるPピクチャには、Iピクチャよりも大きいQ(符号量が小さい)を予め定めておいてもよい。例えば、Pピクチャに与えるQをIピクチャに与えるQよりも1又は2大きくする。Pピクチャは、Iピクチャを用いて動き予測補償を行って生成されるため、符号化により発生する情報量がIピクチャよりも少なくなる傾向がある。そのため、符号量を少なくしても画質への影響が限られる。
符号量制御部115は、上位階層において双方向予測が行われるBピクチャには、Pピクチャよりも大きいQ(符号量が小さい)を予め定めておいてもよい。例えば、Bピクチャに与えるQをPピクチャに与えるQよりも2又は3大きくする。Bピクチャの予測残差がPピクチャよりも少なくなる傾向があるためである。
The code amount control unit 115 may predetermine Q p (the code amount is small) larger than that of the I picture for a P picture that is an inter frame. For example, Q p given to the P picture is made 1 or 2 larger than Q p given to the I picture. Since a P picture is generated by performing motion prediction compensation using an I picture, the amount of information generated by encoding tends to be smaller than that of an I picture. Therefore, even if the code amount is reduced, the influence on the image quality is limited.
The code amount control unit 115 may predetermine Q p (the code amount is small) larger than that of the P picture for the B picture for which bi-directional prediction is performed in the upper layer. For example, Q p given to the B picture is made 2 or 3 larger than Q p given to the P picture. This is because the prediction residual of a B picture tends to be smaller than that of a P picture.

符号量制御部115は、下位階層において双方向予測が行われるbピクチャには、Bピクチャよりも大きいQ(符号量が小さい)を予め定めておいてもよい。例えば、bピクチャに与えるQをBピクチャに与えるQよりも2又は3大きくする。上述したようにbピクチャが十分な画質を有するフレームの画像に挟まれるように配置される場合には、bピクチャも十分な画質を確保できるためである。これは、bピクチャの画質が劣化する場合でも、品質が十分な前後のフレーム画像を視認すれば動画像全体として画質の劣化が検知されにくいためである。なお、bピクチャが非参照ピクチャである場合には、その他のフレームで生成される予測画像の画質に影響を及ぼさない。 The code amount control unit 115 may predetermine Q p (the code amount is small) larger than that of the B picture for b pictures for which bi-directional prediction is performed in the lower layer. For example, Q p given to the b picture is made 2 or 3 larger than Q p given to the B picture. This is because when the b picture is arranged so as to be sandwiched between images of frames having sufficient image quality as described above, the b picture can also ensure sufficient image quality. This is because even when the picture quality of the b picture deteriorates, if the frame images before and after the sufficient quality are viewed, it is difficult to detect the deterioration of the image quality of the entire moving image. When the b picture is a non-reference picture, it does not affect the image quality of the predicted image generated in other frames.

従って、符号量制御部115に予め設定しておく量子化パラメータQには、フレーム種別間で、式(4)に示す大小関係が与えられてもよい。
(I)<Q(P)<Q(B)<Q(b) … (4)
式(4)において、Q(I)等は、Iピクチャに係る量子化パラメータQ等を示す。Q(P)は、例えば、Q(I)よりも2〜4大きい値である。Q(B)は、例えば、Q(P)よりも2〜4大きい値である。Q(b)は、例えば、Q(B)よりも2〜4大きい値である。
これにより、符号量制御部115は、現フレームの種別に応じて量子化パラメータQを切り替え、切り替えた量子化パラメータQを量子化部104に出力する。
これらの量子化パラメータQ(I)等は、蓄積バッファ106から出力されるGOP毎の符号化データの符号量が、予め定めた伝送容量を超えないように定めておく。
Accordingly, the quantization parameter Q p set in advance in the code amount control unit 115 may be given the magnitude relationship shown in Expression (4) between the frame types.
Q p (I) <Q p (P) <Q p (B) <Q p (b) (4)
In Expression (4), Q p (I) and the like indicate a quantization parameter Q p and the like related to the I picture. Q p (P) is, for example, 2 to 4 larger than Q p (I). Q p (B) is, for example, a value 2 to 4 larger than Q p (P). Q p (b) is, for example, a value 2 to 4 larger than Q p (B).
Thereby, the code amount control unit 115 switches the quantization parameter Q p according to the type of the current frame, and outputs the switched quantization parameter Q p to the quantization unit 104.
These quantization parameters Q p (I) and the like are determined so that the code amount of encoded data for each GOP output from the accumulation buffer 106 does not exceed a predetermined transmission capacity.

現フレームの種別がbピクチャである場合には、上述したように下位階層では、上位階層で双方向予測が行われたBピクチャである参照画像信号を用いて予測画像ブロックが生成される。その場合、符号量制御部115は、現ブロックに係る量子化パラメータQを、そのBピクチャの予測画像ブロック信号を上位階層で双方向予測して生成する際に用いた動き補償に係るデータに基づいて定めてもよい。動き補償に係るデータには、例えば、(I)動きベクトルを示す動きベクトルデータや(II)予測モードを示すモードデータがある。その双方向予測で用いられる参照画像信号に係るフレームの種別は、例えば、Pピクチャである。そこで、可逆符号化部105又は符号量制御部115は、動き補償に係るデータをブロック毎に記憶する記憶部を備えてもよい。符号量制御部115は、その参照画像信号に係るフレームについて、現ブロックでの動き補償に係るデータを当該記憶部から読み出し、読み出したデータに基づいて量子化パラメータQを定める。但し、符号量制御部115は、上述の予め定めたQ(b)を量子化パラメータの初期値Qp0として用いてもよい。 When the type of the current frame is a b picture, as described above, a predicted image block is generated in the lower layer using a reference image signal that is a B picture subjected to bi-directional prediction in the upper layer. In this case, the code amount control unit 115 uses the motion compensation data used when the quantization parameter Q p related to the current block is generated by bi-predicting the predicted image block signal of the B picture in the upper layer. You may decide based on. The data related to motion compensation includes, for example, (I) motion vector data indicating a motion vector and (II) mode data indicating a prediction mode. The type of frame related to the reference image signal used in the bidirectional prediction is, for example, a P picture. Therefore, the lossless encoding unit 105 or the code amount control unit 115 may include a storage unit that stores data related to motion compensation for each block. The code amount control unit 115, the frame according to the reference image signal, reads the data relating to motion compensation in the current block from the storage unit, determining the quantization parameter Q p, based on the read data. However, the code amount control unit 115 may use the above-described predetermined Q p (b) as the initial value Q p0 of the quantization parameter.

(I)動きベクトルデータを用いる場合
符号量制御部115は、動きベクトルデータが示す動きベクトルが大きいほど、より小さい量子化パラメータQを定める。上位階層で取得された動きベクトルの大きさが大きいことは、フレーム間において参照ブロックに表された画像の動きが大きいことを示す。その場合には、下位階層での符号量をより多くする。他方、上位階層で取得された動きベクトルの大きさが小さいことは、フレーム間において参照ブロックに表された画像の動きが小さいことを示す。その場合には、下位階層での符号量をより少なくする。
(I) When using motion vector data The code amount control unit 115 determines a smaller quantization parameter Q p as the motion vector indicated by the motion vector data is larger. A large size of the motion vector acquired in the upper layer indicates that the motion of the image represented in the reference block is large between frames. In that case, the code amount in the lower layer is increased. On the other hand, a small size of the motion vector acquired in the upper layer indicates that the motion of the image represented in the reference block is small between frames. In that case, the code amount in the lower layer is reduced.

ここで、符号量制御部115は、例えば、式(5)を用いてQを定めてもよい。
=Qp0−INT(α・|mv|) … (5)
式(5)において、INT(…)は、実数値…の小数点以下の値を切り捨てた整数を与える実数化関数を示す。αは、予め定めた正の実数である。|mv|は、動きベクトルの大きさを示す0又は0より大きい実数である。αは、INT(α・|mv|)の値が0〜10程度となり、かつQが上述した範囲内、例えば、1〜31の範囲(MPEG−2の例)をとるように予め実験やシミュレーションを行って定めておいてもよい。
Here, the code amount control unit 115 may determine Q p using, for example, Expression (5).
Q p = Q p0 −INT (α · | mv |) (5)
In the expression (5), INT (...) Represents a realization function that gives an integer obtained by rounding down values after the decimal point of a real value. α is a predetermined positive real number. | Mv | is a real number of 0 or greater than 0 indicating the magnitude of the motion vector. As for α, the value of INT (α · | mv |) is about 0 to 10 and Q p is in the above-mentioned range, for example, the range of 1 to 31 (example of MPEG-2) in advance. It may be determined by performing a simulation.

なお、双方向予測に用いられる2個の参照画像ブロック信号がいずれもPピクチャに係る参照画像信号である場合や(図5、B3参照)、1つの参照画像ブロックに含まれる複数のPUのそれぞれについて動きベクトルデータが定められる場合がある。その場合、符号量制御部115は、取得された複数の動きベクトルの大きさの代表値、例えば、中央値、平均値、最小値のいずれかを、量子化パラメータQを定める際に用いてもよい。 Note that when two reference image block signals used for bidirectional prediction are both reference image signals related to a P picture (see FIG. 5, B3), each of a plurality of PUs included in one reference image block Motion vector data may be defined for. In that case, the code amount control unit 115, the magnitude of the representative value of the plurality of motion vectors obtained, for example, the median value, average value, one of the minimum value, by using in determining the quantization parameter Q p Also good.

(II)モードデータを用いる場合
符号量制御部115は、上位階層で取得したモードデータが示す予測モードに対応した量子化パラメータQを定める。符号量制御部115には、例えば、上位階層の予測モードと量子化パラメータとの対応関係を示す量子化対応データを予め記憶しておき、記憶した量子化対応データから取得したモードデータに対応する量子化パラメータを読み出す。
(II) When Mode Data is Used The code amount control unit 115 determines a quantization parameter Q p corresponding to the prediction mode indicated by the mode data acquired in the upper layer. For example, the code amount control unit 115 stores in advance quantization-corresponding data indicating the correspondence relationship between the prediction mode of the upper layer and the quantization parameter, and corresponds to the mode data acquired from the stored quantization-corresponding data. Read the quantization parameter.

図6は、本実施形態に係る量子化対応データの一例を示す表である。
図6の左列、右列は、それぞれ上位階層の予測モードと下位の量子化パラメータを示す。図6の第2行は、上位階層の予測モードとしてイントラモードと量子化パラメータQp1が対応付けられていることを示す。第3行は、上位階層の予測モードとして分割ありの動き補償予測モードと量子化パラメータQp2が対応付けられていることを示す。第4行は、上位階層の予測モードとして分割なしの動き補償予測モードと量子化パラメータQp3が対応付けられていることを示す。第5行は、上位階層の予測モードとしてスキップモードと量子化パラメータQp4が対応付けられていることを示す。
FIG. 6 is a table showing an example of quantization-compatible data according to the present embodiment.
The left column and the right column in FIG. 6 indicate the upper layer prediction mode and the lower quantization parameter, respectively. The second row in FIG. 6 indicates that the intra mode and the quantization parameter Qp1 are associated as the upper layer prediction modes. The third row indicates that the motion compensated prediction mode with division and the quantization parameter Qp2 are associated as the higher-layer prediction mode. The fourth row indicates that the motion compensation prediction mode without division and the quantization parameter Q p3 are associated as the upper layer prediction mode. The fifth row indicates that the skip mode and the quantization parameter Q p4 are associated as the upper layer prediction mode.

量子化パラメータQp1、Qp2、Qp3、Qp4及び初期値Qp0の間には、例えば、式(6)に示す大小関係を与えておく。
p1<Qp2<Qp0<Qp3<Qp4 … (6)
式(6)において、Qp1は、例えば、初期値Qp0よりも2又は3小さい値である。Qp2は、例えば、初期値Qp0よりも1小さい値である。Qp3は、例えば、初期値Qp0よりも1大きい値である。Qp4は、例えば、初期値Qp0よりも2又は3大きい値である。
Between the quantization parameters Q p1 , Q p2 , Q p3 , Q p4 and the initial value Q p0 , for example, the magnitude relationship shown in the equation (6) is given.
Q p1 <Q p2 <Q p0 <Q p3 <Q p4 ... (6)
In Expression (6), Q p1 is a value that is 2 or 3 smaller than the initial value Q p0 , for example. Q p2 is, for example, a value that is 1 smaller than the initial value Q p0 . Q p3 is, for example, a value that is 1 larger than the initial value Q p0 . Q p4 is, for example, a value that is 2 or 3 larger than the initial value Q p0 .

ここで、イントラモードについて最も小さい量子化パラメータQp1を定めるのは、他の予測モードとは異なり、現フレームの参照画像信号のみを用い他のフレームの画像信号を用いないので、符号化において最も多くの符号量が要求されるからである。
スキップモードについて最も大きい量子化パラメータQp4を定めるのは、現ブロックの動きベクトルとして隣接ブロックの動きベクトルが用いられるからである。このことは、少なくともブロックより大きい領域にわたって画像の動きが均一であるか、画像の動き自体が少ないことを示す。そのため、隣接するフレームの参照ブロック信号を用いて生成される予測画像ブロックが示す予測画像の画質が良好であり、要求される符号量が少なくても済むと期待されるからである。また、双方向予測では、下位階層のフレームの予測画像ブロック信号が、その前後のフレームの参照画像ブロック信号を用いて生成される。そのため、上位階層でスキップモードが用いられる場合には、下位階層でもスキップモードが用いられるために、残差画像ブロック信号が符号化されない可能性が高い。
Here, unlike the other prediction modes, the smallest quantization parameter Q p1 for the intra mode is determined because only the reference image signal of the current frame is used and the image signal of the other frame is not used. This is because a large amount of code is required.
The reason why the largest quantization parameter Q p4 is determined for the skip mode is that the motion vector of the adjacent block is used as the motion vector of the current block. This indicates that the image motion is uniform over at least a region larger than the block, or the image motion itself is small. For this reason, it is expected that the image quality of the prediction image indicated by the prediction image block generated using the reference block signal of the adjacent frame is good, and the required code amount is small. In bidirectional prediction, a predicted image block signal of a lower layer frame is generated using reference image block signals of frames before and after the frame. Therefore, when the skip mode is used in the upper layer, the skip mode is also used in the lower layer, so there is a high possibility that the residual image block signal is not encoded.

分割なしの動き補償予測モードと分割ありの動き補償予測モードとの間では、分割ありの動き補償予測モードに係る量子化パラメータQp2の方が分割なしの動き補償予測モードに係る量子化パラメータQp3よりも小さい。分割なしの動き補償予測モードは、現ブロック内での画像の動きの均一性が高いことを示す。その場合、下位階層でも現ブロック内での画像の動きの均一性が高く、符号量を少なくしても画質の劣化が顕著にならないことが期待されるからである。他方、分割ありの動き補償予測モードは、現ブロック内での画像の動きが不均一であることを示す。その場合、下位階層でも現ブロック内での画像の動きの均一性が低く、符号量を少なくすると画質の劣化が顕著になると予想されるからである。 Between the motion compensated prediction mode without division and the motion compensated prediction mode with division, the quantization parameter Qp2 related to the motion compensated prediction mode with division is the quantization parameter Q related to the motion compensated prediction mode without division. It is smaller than p3 . The motion-compensated prediction mode without division indicates that the image motion uniformity in the current block is high. In this case, the uniformity of image motion within the current block is high even in the lower layer, and it is expected that image quality deterioration will not be noticeable even if the code amount is reduced. On the other hand, the motion-compensated prediction mode with division indicates that the motion of the image in the current block is non-uniform. In this case, the uniformity of the image motion in the current block is low even in the lower layer, and it is expected that the image quality will be significantly deteriorated if the code amount is reduced.

このように、符号量制御部115は、フレームの種別に応じて符号量を制御する。ここで、符号量制御部115は、双方向予測で生成される符号化データの符号量をイントラ予測や順方向のインター予測での符号量よりも小さくなるように定める。また、符号量制御部115は、その双方向予測で生成される符号量をすでに符号化済みの双方向予測での画像の動きに応じて定める。よって、画像の動きが著しい領域や、その動きが不均一な領域等、画質の劣化が生じやすい領域により多くの符号量が割り当てられ、画質の劣化が少ない領域により少ない符号量が割り当てられる。そのため、復号された画像において画質の劣化が低減して符号化の効率が向上する。   Thus, the code amount control unit 115 controls the code amount according to the type of frame. Here, the code amount control unit 115 determines the code amount of the encoded data generated by the bidirectional prediction to be smaller than the code amount in the intra prediction or the forward inter prediction. Also, the code amount control unit 115 determines the code amount generated by the bidirectional prediction according to the motion of the image in the already encoded bidirectional prediction. Therefore, a larger amount of code is assigned to a region where image quality is likely to deteriorate, such as a region where the motion of the image is remarkable or a region where the motion is non-uniform, and a smaller amount of code is assigned to a region where the image quality is less likely to deteriorate. As a result, the degradation of the image quality in the decoded image is reduced and the coding efficiency is improved.

また、符号量制御部115は、量子化パラメータQを上位階層の双方向予測で用いた参照画像信号についての動き補償に係るデータに基づいて定めることで、表示される画像の動きの特徴に応じて符号量が制御される。つまり、符号量を定める際に動き補償に係るデータが活用されるので、処理量が過大にならずに処理の高速化を図ることができる。また、動き補償に係るデータと対応付けておくことで符号量を予め定めた範囲に収まるように、符号量が定量的に定められる。 In addition, the code amount control unit 115 determines the quantization parameter Q p based on the motion compensation data for the reference image signal used in the bi-level prediction of the upper layer, so that the motion characteristics of the displayed image can be obtained. Accordingly, the code amount is controlled. That is, since data relating to motion compensation is used when determining the code amount, the processing amount can be increased without increasing the amount of processing. In addition, the code amount is quantitatively determined so that the code amount falls within a predetermined range by associating the data with motion compensation data.

このような制御による効果は、RD最適化によるブロック分割を行うか否かの判定とも整合する。RD最適化では、量子化パラメータQが大きい(符号量が少ない)場合、ブロック分割をできるだけ行わないように分割を示すフラグ情報の符号化が省略され、符号化データの符号量(符号化レート)の減少が優先される。量子化パラメータQが小さい(符号量が多い)場合、ブロック分割を行って分割を示すフラグ情報の符号化を行うことで歪み量の減少が優先される。 The effect of such control is consistent with the determination of whether or not to perform block division by RD optimization. In the RD optimization, when the quantization parameter Q p is large (the code amount is small), encoding of flag information indicating division is omitted so that block division is not performed as much as possible, and the code amount (encoding rate) of encoded data is omitted. ) Reduction is given priority. When the quantization parameter Q p is small (the code amount is large), priority is given to the reduction of the distortion amount by performing block division and coding the flag information indicating the division.

次に、本実施形態に係る符号量制御部115が符号量を定める処理について説明する。
図7は、本実施形態に係る符号量制御部115が符号量を定める処理を示すフローチャートである。
(ステップS101)符号量制御部115は、注目フレームがbフレームであるか否かを判定する。現フレームがbフレームであると判定された場合には(ステップS101 YES)、ステップS102に進む。現フレームがbフレーム以外の種別のフレームであると判定された場合には(ステップS101 NO)、ステップS106に進む。
Next, processing in which the code amount control unit 115 according to the present embodiment determines the code amount will be described.
FIG. 7 is a flowchart illustrating processing in which the code amount control unit 115 according to the present embodiment determines the code amount.
(Step S101) The code amount control unit 115 determines whether or not the frame of interest is a b frame. If it is determined that the current frame is the b frame (YES in step S101), the process proceeds to step S102. If it is determined that the current frame is a type of frame other than the b frame (NO in step S101), the process proceeds to step S106.

(ステップS102)符号量制御部115は、上位階層での双方向予測に用いた参照画像信号のフレームを特定する。現フレームが、図5に示すフレームb1である場合を例にとると、下位階層での双方向予測に用いた参照画像信号のフレームはフレームB1である。上位階層でフレームB1に係る予測画像信号を生成する際、双方向予測に用いた参照画像信号のフレームはフレームI0、フレームP2である。そのうち、動き補償が行われるのは、インターフレームであるフレームP2である。従って、この例ではフレームP2が特定される。その後、ステップS103に進む。 (Step S102) The code amount control unit 115 identifies the frame of the reference image signal used for bidirectional prediction in the upper layer. Taking the case where the current frame is the frame b1 shown in FIG. 5 as an example, the frame of the reference image signal used for bidirectional prediction in the lower layer is the frame B1. When the predicted image signal related to the frame B1 is generated in the upper layer, the frames of the reference image signal used for bidirectional prediction are the frame I0 and the frame P2. Among them, motion compensation is performed on the frame P2, which is an inter frame. Therefore, in this example, the frame P2 is specified. Thereafter, the process proceeds to step S103.

(ステップS103)符号量制御部115は、特定したフレームでの当該現ブロックについての動き補償に係るデータを、自部又は可逆符号化部105が備える記憶部から読み出す。読み出されるデータは、例えば、動きベクトルデータ、モードデータである。その後、ステップS104に進む。
(ステップS104)符号量制御部115は、(I)、(II)で述べたように、読み出したデータに基づいて量子化パラメータQを定める。その後、ステップS105に進む
(ステップS105)符号量制御部115は、現フレームにおいて未処理のブロックの有無を判定する。未処理のブロックがある場合には(ステップS105 YES)、現ブロックが次のブロックに切り替えられ、ステップS102に進む。未処理のブロックがない場合には(ステップS105 NO)、図7に示す処理を終了する。
(Step S <b> 103) The code amount control unit 115 reads data related to motion compensation for the current block in the identified frame from the storage unit included in the self unit or the lossless encoding unit 105. The read data is, for example, motion vector data and mode data. Thereafter, the process proceeds to step S104.
(Step S104), the code amount control unit 115, as mentioned in (I), (II), defines the quantization parameter Q p, based on the read data. Thereafter, the process proceeds to step S105 (step S105). The code amount control unit 115 determines whether there is an unprocessed block in the current frame. If there is an unprocessed block (YES in step S105), the current block is switched to the next block, and the process proceeds to step S102. If there is no unprocessed block (NO in step S105), the process shown in FIG. 7 is terminated.

(ステップS106)符号量制御部115は、量子化パラメータQを現フレームの種別に応じた値に定める。符号量制御部115は、例えば、現フレームがIピクチャである場合には、QをQ(I)と定め、現フレームがPピクチャである場合には、QをQ(P)と定め、現フレームがBピクチャである場合には、QをQ(B)と定める。その後、図7に示す処理を終了する。 (Step S106) The code amount control unit 115 sets the quantization parameter Q p to a value corresponding to the type of the current frame. For example, when the current frame is an I picture, the code amount control unit 115 determines Q p as Q p (I), and when the current frame is a P picture, Q p is set as Q p (P). If the current frame is a B picture, Q p is defined as Q p (B). Thereafter, the process shown in FIG. 7 ends.

次に、本実施形態に係る画像復号装置2の構成について説明する。
図8は、本実施形態に係る画像復号装置2の構成を示す概略ブロック図を示す。
画像復号装置2は、蓄積バッファ201、可逆復号部202、逆量子化部203、逆直交変換部204、加算部205、デブロッキングフィルタ206、フレームバッファ207、参照メモリ208、イントラ補償部209及びインター補償部210を含んで構成される。
Next, the configuration of the image decoding device 2 according to the present embodiment will be described.
FIG. 8 is a schematic block diagram showing the configuration of the image decoding device 2 according to this embodiment.
The image decoding apparatus 2 includes a storage buffer 201, a lossless decoding unit 202, an inverse quantization unit 203, an inverse orthogonal transform unit 204, an addition unit 205, a deblocking filter 206, a frame buffer 207, a reference memory 208, an intra compensation unit 209, and an inter A compensation unit 210 is included.

蓄積バッファ201には、画像復号装置2の外部、例えば、画像符号化装置1から符号化データが入力され、入力された符号化データが一時的に記憶される。
可逆復号部202は、蓄積バッファ201から符号化データを読み出し、読み出した符号化データについて可逆復号を行って統合データを生成する。可逆復号部202が用いる可逆復号方式は、可逆符号化部105が用いた可逆符号化方式に対応する方式である。
The accumulation buffer 201 receives encoded data from the outside of the image decoding device 2, for example, the image encoding device 1, and temporarily stores the input encoded data.
The lossless decoding unit 202 reads the encoded data from the accumulation buffer 201, performs lossless decoding on the read encoded data, and generates integrated data. The lossless decoding method used by the lossless decoding unit 202 is a method corresponding to the lossless encoding method used by the lossless encoding unit 105.

生成された統合データには、モードデータ、量子化変換係数データが含まれている場合には、可逆復号部202は、統合データからモードデータ、量子化変換係数データを抽出する。   When the generated integrated data includes mode data and quantized transform coefficient data, the lossless decoding unit 202 extracts mode data and quantized transform coefficient data from the integrated data.

例えば、モードデータがデータ分割なしの動き補償モードを示す場合、可逆復号部202は、統合データから量子化変換係数データ、PU毎の参照フレーム番号、動きベクトルデータを抽出する。モードデータがデータ分割ありの動き補償モードを示す場合、可逆復号部202は、統合データから量子化変換係数データ、PU毎の参照フレーム番号、動きベクトルデータを抽出する。モードデータがイントラ予測モードを示す場合、可逆復号部202は、統合データから量子化変換係数データ、イントラ予測モードを抽出する。モードデータがスキップモードを示す場合には、統合データに量子化変換係数データ、参照フレーム番号、動きベクトルデータは含まれないため、モードデータ以外のデータの抽出を行わない。   For example, when the mode data indicates a motion compensation mode without data division, the lossless decoding unit 202 extracts quantized transform coefficient data, a reference frame number for each PU, and motion vector data from the integrated data. When the mode data indicates a motion compensation mode with data division, the lossless decoding unit 202 extracts quantized transform coefficient data, a reference frame number for each PU, and motion vector data from the integrated data. When the mode data indicates the intra prediction mode, the lossless decoding unit 202 extracts the quantized transform coefficient data and the intra prediction mode from the integrated data. When the mode data indicates the skip mode, the integrated data does not include quantized transform coefficient data, reference frame numbers, and motion vector data, so that data other than the mode data is not extracted.

可逆復号部202は、抽出した量子化変換係数データを逆量子化部203に出力する。可逆復号部202は、抽出したモードデータをイントラ補償部209又はインター補償部210に出力する。可逆復号部202は、抽出した参照フレーム番号、動きベクトルデータをインター補償部210に出力する。
なお、可逆復号部202は、復元された統合データから量子化パラメータを抽出し、抽出した量子化パラメータを逆量子化部203に出力する。また、統合データに差分量子化パラメータが含まれる場合には、隣接ブロックについて既に算出した量子化パラメータと現ブロックに係る差分量子化パラメータとを加算して現ブロックに係る量子化パラメータを算出してもよい。その場合には、可逆復号部202は、算出した現ブロックに係る量子化パラメータを逆量子化部203に出力する。
The lossless decoding unit 202 outputs the extracted quantized transform coefficient data to the inverse quantization unit 203. The lossless decoding unit 202 outputs the extracted mode data to the intra compensation unit 209 or the inter compensation unit 210. The lossless decoding unit 202 outputs the extracted reference frame number and motion vector data to the inter compensation unit 210.
Note that the lossless decoding unit 202 extracts a quantization parameter from the restored integrated data, and outputs the extracted quantization parameter to the inverse quantization unit 203. If the integrated data includes a differential quantization parameter, add the quantization parameter already calculated for the neighboring block and the differential quantization parameter for the current block to calculate the quantization parameter for the current block. Also good. In that case, the lossless decoding unit 202 outputs the calculated quantization parameter related to the current block to the inverse quantization unit 203.

なお、抽出した動きベクトルデータが差分ベクトルを示す場合には、可逆復号部202は、統合データからベクトルインデックスをさらに抽出する。その場合、可逆復号部202は、既に復号したブロック毎の動きベクトルを記憶する復号データ記憶部を備え、抽出したベクトルインデックスが示す動きベクトルを復号データ記憶部から予測ベクトルとして読み出す。可逆復号部202は、読み出した予測ベクトルと差分ベクトルを加算して動きベクトルを示す動きベクトルデータを、インター補償部210に出力する。   When the extracted motion vector data indicates a difference vector, the lossless decoding unit 202 further extracts a vector index from the integrated data. In that case, the lossless decoding unit 202 includes a decoded data storage unit that stores a motion vector for each block that has already been decoded, and reads the motion vector indicated by the extracted vector index from the decoded data storage unit as a prediction vector. The lossless decoding unit 202 adds the read prediction vector and the difference vector, and outputs motion vector data indicating the motion vector to the inter compensation unit 210.

逆量子化部203は、可逆復号部202から入力された量子化変換係数データが示す量子化変換係数を逆量子化して復元変換係数を示す復元変換係数データを生成する。ここで、逆量子化部203は、可逆復号部202から入力された量子化パラメータにより定められる値を量子化変換係数に乗算して復元変換係数を算出し、算出した復元変換係数を示す復元変換係数データを生成する。逆量子化部203は、生成した復元変換係数データを逆直交変換部204に出力する。   The inverse quantization unit 203 inversely quantizes the quantized transform coefficient indicated by the quantized transform coefficient data input from the lossless decoding unit 202 to generate restored transform coefficient data indicating the restored transform coefficient. Here, the inverse quantization unit 203 calculates a restored transform coefficient by multiplying the quantized transform coefficient by a value determined by the quantization parameter input from the lossless decoding unit 202, and a restored transform indicating the calculated restored transform coefficient Generate coefficient data. The inverse quantization unit 203 outputs the generated restored transform coefficient data to the inverse orthogonal transform unit 204.

逆直交変換部204は、逆量子化部203から入力された復元変換係数データが示す復元変換係数について逆直交変換を行って復元差分画像ブロック信号を生成する。逆直交変換部204が用いる逆直交変換は、例えば、画像符号化装置(図1)の直交変換部103が行う直交変換の逆演算である。逆直交変換部204は、生成した復元差分画像ブロック信号を加算部205に出力する。   The inverse orthogonal transform unit 204 performs inverse orthogonal transform on the restored transform coefficient indicated by the restored transform coefficient data input from the inverse quantization unit 203 to generate a restored difference image block signal. The inverse orthogonal transform used by the inverse orthogonal transform unit 204 is, for example, an inverse operation of orthogonal transform performed by the orthogonal transform unit 103 of the image encoding device (FIG. 1). The inverse orthogonal transform unit 204 outputs the generated restored difference image block signal to the addition unit 205.

加算部205は、逆直交変換部204から入力された復元差分画像ブロック信号と、イントラ補償部209又はインター補償部210から入力された補償画像ブロック信号を加算して復元画像ブロック信号を生成する。加算部205は、生成した復元画像ブロック信号をデブロッキングフィルタ206に出力する。加算部205は、復元差分画像ブロック信号における画素毎の信号値から予測画像ブロック信号における対応する画素の信号値を加算する。   The adding unit 205 adds the restored difference image block signal input from the inverse orthogonal transform unit 204 and the compensated image block signal input from the intra compensating unit 209 or the inter compensating unit 210 to generate a restored image block signal. The adding unit 205 outputs the generated restored image block signal to the deblocking filter 206. The adding unit 205 adds the signal value of the corresponding pixel in the predicted image block signal from the signal value for each pixel in the restored difference image block signal.

デブロッキングフィルタ206は、加算部205から入力された復元画像ブロック信号にフィルタリング処理を行ってブロック歪の成分を除去する。デブロッキングフィルタ206は、ブロック歪の成分が除去された復元画像ブロック信号をフレームバッファ207に記憶させ、その復元画像ブロック信号を参照画像ブロック信号として参照メモリ208に記憶させる。   The deblocking filter 206 performs filtering processing on the restored image block signal input from the adding unit 205 to remove a block distortion component. The deblocking filter 206 stores the restored image block signal from which the block distortion component is removed in the frame buffer 207, and stores the restored image block signal in the reference memory 208 as a reference image block signal.

フレームバッファ207には、デブロッキングフィルタ206から入力された復元画像ブロック信号をフレーム毎に、その復元画像ブロックに応じた表示領域に応じた記憶領域に記憶する。これにより、フレーム毎の復元画像信号が記憶される。フレームバッファ207は、記憶している復元画像信号を予め定めたGOP構造に係るフレームの順序に復元画像信号を並び替えてもよい。フレームバッファ207は、フレーム毎に復元画像信号を画像復号装置2の外部、例えば、画像表示装置(ディスプレイ)に出力してもよい。
参照メモリ208は、デブロッキングフィルタ206から入力された参照画像ブロック信号をフレーム毎に、その参照画像ブロックに応じた表示領域に応じた記憶領域に記憶する。これにより、参照画像を示す参照画像信号がフレーム毎に記憶される。
The frame buffer 207 stores the restored image block signal input from the deblocking filter 206 in a storage area corresponding to the display area corresponding to the restored image block for each frame. Thereby, the restored image signal for each frame is stored. The frame buffer 207 may rearrange the restored image signals in the order of frames according to a predetermined GOP structure. The frame buffer 207 may output the restored image signal for each frame to the outside of the image decoding device 2, for example, an image display device (display).
The reference memory 208 stores the reference image block signal input from the deblocking filter 206 in a storage area corresponding to the display area corresponding to the reference image block for each frame. Thereby, the reference image signal indicating the reference image is stored for each frame.

イントラ補償部209は、現フレームがイントラフレーム(Iピクチャ)である場合、可逆復号部202から入力されたモードデータが示すイントラ予測モードに対応した補償モードで補償処理を行って、現ブロックに係る予測画像ブロック信号を生成する。ここで、イントラ補償部209は、参照メモリ208に記憶された参照画像信号のうち、現フレームに係る参照画像信号を用いてイントラ補償を行い、現ブロックに係る補償画像ブロック信号を生成する。イントラ補償部209は、生成した補償画像ブロック信号を加算部205に出力する。   When the current frame is an intra frame (I picture), the intra compensation unit 209 performs compensation processing in a compensation mode corresponding to the intra prediction mode indicated by the mode data input from the lossless decoding unit 202, and relates to the current block. A prediction image block signal is generated. Here, the intra compensation unit 209 performs intra compensation using the reference image signal related to the current frame among the reference image signals stored in the reference memory 208, and generates a compensated image block signal related to the current block. The intra compensation unit 209 outputs the generated compensated image block signal to the addition unit 205.

インター補償部210は、現フレームがインターフレーム(Pピクチャ、Bピクチャ)である場合、可逆復号部202から入力されたモードデータが示す予測モードに対応した補償モードで補償処理を行って現ブロックに係る補償画像ブロック信号を生成する。ここで、インター補償部210は、参照メモリ208に記憶された参照画像信号を用いる。インター補償部210は、生成した補償画像ブロック信号を生成する。   When the current frame is an inter frame (P picture, B picture), the inter compensation unit 210 performs a compensation process in a compensation mode corresponding to the prediction mode indicated by the mode data input from the lossless decoding unit 202 to obtain the current block. Such a compensated image block signal is generated. Here, the inter compensation unit 210 uses the reference image signal stored in the reference memory 208. The inter compensation unit 210 generates the generated compensated image block signal.

例えば、モードデータがイントラ予測モードを示す場合、インター補償部210は、イントラ補償を行って補償画像ブロック信号を生成する。
モードデータが分割なしの動き補償予測モードを示す場合、インター補償部210は、現ブロック全体を一括した一括ブロックであるPUについて参照フレーム番号、動きベクトルデータが入力される。インター補償部210は、入力された参照フレーム番号で指定される参照画像信号から動きベクトルデータが示す動きベクトルで指定される領域の参照画像ブロック信号を参照メモリ208から読み出す。インター補償部210は、読み出した参照画像ブロック信号を用いて補償画像ブロック信号を生成する。
For example, when the mode data indicates the intra prediction mode, the inter compensation unit 210 performs intra compensation to generate a compensated image block signal.
When the mode data indicates a motion-compensated prediction mode without division, the inter-compensation unit 210 receives a reference frame number and motion vector data for a PU that is a batch block in which the entire current block is batched. The inter compensation unit 210 reads, from the reference memory 208, the reference image block signal of the area specified by the motion vector indicated by the motion vector data from the reference image signal specified by the input reference frame number. The inter compensation unit 210 generates a compensated image block signal using the read reference image block signal.

モードデータが分割ありの動き補償予測モードを示す場合、インター補償部210は、現ブロック内を細分化したPU毎の参照フレーム番号、動きベクトルデータが入力される。インター補償部210は、入力された参照フレーム番号が示す参照画像信号から動きベクトルデータが示す動きベクトルで指定される領域の参照画像ブロック信号を参照メモリ208から読み出す。インター補償部210は、読み出した参照画像ブロック信号を用いてPU毎の補償画像ブロック信号を生成し、生成した補償画像ブロック信号をPU(この例では、サブブロック)間で統合して現ブロック(一括ブロック)に係る補償画像ブロックを生成する。
モードデータがスキップモードを示す場合、インター補償部210は、現ブロックに隣接するブロックであって処理済みのブロックに係る動きベクトルの代表値(例えば、中央値)を算出する。インター補償部210は、現フレームに対応するフレームの参照画像のうち現ブロックから、算出した代表値が示すずれ量で補償した位置に格納された参照画像ブロック信号を予測画像ブロック信号として参照メモリ208から読み出す。
When the mode data indicates a motion compensated prediction mode with division, the inter compensation unit 210 receives a reference frame number and motion vector data for each PU that is subdivided in the current block. The inter compensation unit 210 reads, from the reference memory 208, the reference image block signal in the region specified by the motion vector indicated by the motion vector data from the reference image signal indicated by the input reference frame number. The inter compensation unit 210 generates a compensation image block signal for each PU using the read reference image block signal, and integrates the generated compensation image block signal between PUs (subblocks in this example) to the current block ( Compensation image block related to (collective block) is generated.
When the mode data indicates the skip mode, the inter compensation unit 210 calculates a representative value (for example, a median value) of a motion vector related to a processed block that is a block adjacent to the current block. The inter compensation unit 210 uses, as a predicted image block signal, a reference image block signal stored in a position compensated with a deviation amount indicated by the calculated representative value from the current block in the reference image of the frame corresponding to the current frame. Read from.

このように、本実施形態では、符号化した入力画像の符号化データを復号した参照画像をフレーム毎に記憶する記憶部(例えば、参照メモリ111)を備える。また、本実施形態では、前記記憶部に記憶された参照画像を用いてフレーム内予測、順方向予測又は双方向予測を行って、前記入力画像の一部である入力画像ブロックに対応する予測画像ブロックを生成する予測部(例えば、インター予測部113)を備える。また、本実施形態では、前記予測部がすでに双方向予測を行って生成した予測画像ブロックの復号画像を参照画像としてさらに双方向予測を行う場合、予測される予測画像ブロックに係る符号量を、すでに行った双方向予測で動き補償予測及び復号した参照画像の動き補償に係るデータに基づいて定める符号量制御部(例えば、符号量制御部115)を備える。   As described above, the present embodiment includes a storage unit (for example, the reference memory 111) that stores a reference image obtained by decoding encoded data of an encoded input image for each frame. Further, in the present embodiment, a predicted image corresponding to an input image block that is a part of the input image by performing intra-frame prediction, forward prediction, or bidirectional prediction using the reference image stored in the storage unit. A prediction unit (for example, an inter prediction unit 113) that generates a block is provided. In the present embodiment, when the prediction unit further performs bi-directional prediction using the decoded image of the predicted image block generated by performing bi-directional prediction as a reference image, the code amount related to the predicted image block to be predicted is A code amount control unit (for example, a code amount control unit 115) is provided that is determined based on data related to motion compensation prediction and motion compensation of a decoded reference image that has already been performed in bidirectional prediction.

これにより、双方向予測で生成される符号量が、過去の双方向予測での画像の動きに応じて定められる。例えば、画質の劣化が生じやすい領域により多くの符号量が割り当てられ、画質の劣化が少ない領域により少ない符号量が割り当てられる。そのため、復号された画像において画質の劣化が低減して符号化の効率が向上する。また、符号量を定める際に動き補償に係るデータが活用されることで処理量が過大にならず処理の高速化を図ることができる。また、動き補償に係るデータと対応付けておくことで予め定めた範囲に収まるように、符号量が定量的に定められる。   Thereby, the code amount generated by the bidirectional prediction is determined according to the motion of the image in the past bidirectional prediction. For example, a larger code amount is assigned to an area where image quality is likely to deteriorate, and a smaller code amount is assigned to an area where image quality is less deteriorated. As a result, the degradation of the image quality in the decoded image is reduced and the coding efficiency is improved. In addition, since the data related to motion compensation is used when determining the code amount, the processing amount does not become excessive, and the processing speed can be increased. In addition, the code amount is quantitatively determined so as to be within a predetermined range by associating with data related to motion compensation.

なお、上述した実施形態では、階層B構造が上位階層と下位階層の2階層のGOP構造である場合を例にとって説明したが、これには限られない。上述した実施形態では、階層B構造は、2階層より多い階層(例えば、3階層)を有していてもよい。その場合において、現フレームの種別がbピクチャである場合には、第2階層よりも下位の階層では、より上位の階層で双方向予測が行われたBピクチャに係るフレームの参照画像信号を用いて予測画像ブロックが生成される。その場合、符号量制御部115は、現ブロックに係る量子化パラメータQを、そのBピクチャに係る予測画像ブロック信号を上位階層で双方向予測して生成する際に当該現ブロックで参照画像信号について行われた動き補償に係るデータに基づいて定めてもよい。そこで、符号量制御部115は、より下位の階層で双方向予測が行われるbピクチャほど、より大きい量子化パラメータ(符号量がより小さい)を初期値として予め定めておいてもよい。また、上述した実施形態では、最下層のbピクチャを非参照ピクチャと予め定めておけば、より上位の階層のbピクチャを非参照ピクチャとして扱わなくてもよい。 In the above-described embodiment, the case where the layer B structure is a GOP structure of two layers of an upper layer and a lower layer has been described as an example. However, the present invention is not limited to this. In the embodiment described above, the layer B structure may have more than two layers (for example, three layers). In that case, when the type of the current frame is a b picture, a reference image signal of a frame related to a B picture that has been bi-directionally predicted in a higher layer is used in a layer lower than the second layer. Thus, a predicted image block is generated. In this case, the code amount control unit 115 generates the reference image signal in the current block when generating the quantization parameter Q p related to the current block by bi-predicting the predicted image block signal related to the B picture in the upper layer. May be determined based on the data related to motion compensation performed for. Therefore, the code amount control unit 115 may predetermine a larger quantization parameter (smaller code amount) as an initial value for a b picture for which bi-directional prediction is performed in a lower layer. In the above-described embodiment, if the lowermost b picture is determined in advance as a non-reference picture, a higher-level b picture may not be treated as a non-reference picture.

なお、上述した実施形態は、画像符号化装置1と画像復号装置2を備えた画像処理システムとして実施してもよい。当該画像処理システムは、画像符号化装置1が出力した符号化データを記憶する記憶媒体を備え、画像復号装置2には当該記憶媒体から読み出された符号化データが入力されてもよい。また、当該画像処理システムは、画像符号化装置1が出力した符号化データを伝送するネットワークを備え、画像復号装置2には当該ネットワークが伝送した符号化データが入力されるようにしてもよい。当該ネットワークは、有線でも無線であってもよいし、複数の送信先に一斉にデータを送信する放送伝送路の一部又は全部であってもよい。   Note that the above-described embodiment may be implemented as an image processing system including the image encoding device 1 and the image decoding device 2. The image processing system may include a storage medium that stores encoded data output from the image encoding apparatus 1, and the encoded data read from the storage medium may be input to the image decoding apparatus 2. In addition, the image processing system may include a network that transmits encoded data output from the image encoding device 1, and the image decoding device 2 may be input with encoded data transmitted by the network. The network may be wired or wireless, or may be part or all of a broadcast transmission path that transmits data to a plurality of transmission destinations all at once.

なお、上述した実施形態における画像符号化装置1又は画像復号装置2の一部、例えば、減算部102、直交変換部103、量子化部104、可逆符号化部105、逆量子化部107、逆直交変換部108、加算部109、デブロッキングフィルタ110、イントラ予測部112、インター予測部113、モード判定部114及び符号量制御部115、可逆復号部202、逆量子化部203、逆直交変換部204、加算部205、デブロッキングフィルタ206、イントラ補償部209及びインター補償部210をコンピュータで実現するようにしてもよい。その場合、この制御機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現してもよい。なお、ここでいう「コンピュータシステム」とは、画像符号化装置1又は画像復号装置2に内蔵されたコンピュータシステムであって、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでもよい。また上記プログラムは、前述した機能の一部を実現するためのものであってもよく、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよい。
また、上述した実施形態における画像符号化装置1及び画像復号装置2の一部、又は全部をLSI(Large Scale Integration)等の集積回路として実現してもよい。画像符号化装置1及び画像復号装置2の各機能ブロックは個別にプロセッサ化してもよいし、一部、又は全部を集積してプロセッサ化してもよい。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現してもよい。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いてもよい。
Note that a part of the image encoding device 1 or the image decoding device 2 in the above-described embodiment, for example, the subtraction unit 102, the orthogonal transformation unit 103, the quantization unit 104, the lossless encoding unit 105, the inverse quantization unit 107, the inverse Orthogonal transformation unit 108, addition unit 109, deblocking filter 110, intra prediction unit 112, inter prediction unit 113, mode determination unit 114 and code amount control unit 115, lossless decoding unit 202, inverse quantization unit 203, inverse orthogonal transformation unit 204, the addition unit 205, the deblocking filter 206, the intra compensation unit 209, and the inter compensation unit 210 may be realized by a computer. In that case, the program for realizing the control function may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read by the computer system and executed. Here, the “computer system” is a computer system built in the image encoding device 1 or the image decoding device 2 and includes an OS and hardware such as peripheral devices. The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. Furthermore, the “computer-readable recording medium” is a medium that dynamically holds a program for a short time, such as a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line, In this case, a volatile memory inside a computer system that serves as a server or a client may be included that holds a program for a certain period of time. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
Moreover, you may implement | achieve part or all of the image coding apparatus 1 and the image decoding apparatus 2 in embodiment mentioned above as integrated circuits, such as LSI (Large Scale Integration). Each functional block of the image encoding device 1 and the image decoding device 2 may be individually made into a processor, or a part or all of them may be integrated into a processor. Further, the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. In addition, when an integrated circuit technology that replaces LSI appears due to the advancement of semiconductor technology, an integrated circuit based on the technology may be used.

以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。   As described above, the embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to the above, and various design changes and the like can be made without departing from the scope of the present invention. It is possible to

1…画像符号化装置、101…フレームバッファ、102…減算部、103…直交変換部、104…量子化部、105…可逆符号化部、106…蓄積バッファ、107…逆量子化部、108…逆直交変換部、109…加算部、110…デブロッキングフィルタ、
111…参照メモリ、112…イントラ予測部、113…インター予測部、
114…モード判定部、115…符号量制御部、
2…画像復号装置、201…蓄積バッファ、202…可逆復号部、203…逆量子化部、204…逆直交変換部、205…加算部、206…デブロッキングフィルタ、
207…フレームバッファ、208…参照メモリ、209…イントラ補償部、
210…インター補償部
DESCRIPTION OF SYMBOLS 1 ... Image coding apparatus, 101 ... Frame buffer, 102 ... Subtraction part, 103 ... Orthogonal transformation part, 104 ... Quantization part, 105 ... Lossless encoding part, 106 ... Accumulation buffer, 107 ... Dequantization part, 108 ... Inverse orthogonal transform unit, 109 ... addition unit, 110 ... deblocking filter,
111 ... Reference memory, 112 ... Intra prediction unit, 113 ... Inter prediction unit,
114... Mode determination unit, 115.
DESCRIPTION OF SYMBOLS 2 ... Image decoding apparatus, 201 ... Accumulation buffer, 202 ... Lossless decoding part, 203 ... Dequantization part, 204 ... Inverse orthogonal transformation part, 205 ... Adder, 206 ... Deblocking filter,
207 ... Frame buffer, 208 ... Reference memory, 209 ... Intra compensation unit,
210: Inter compensation unit

Claims (4)

符号化した入力画像の符号化データを復号した参照画像をフレーム毎に記憶する記憶部と、
前記記憶部に記憶された参照画像を用いてフレーム内予測、順方向予測又は双方向予測を行って、前記入力画像の一部である入力画像ブロックに対応する予測画像ブロックを生成する予測部と、
前記予測部が双方向予測を行って生成した予測画像ブロックの復号画像を参照画像としてさらに双方向予測を行う場合、予測される画像ブロックに係る符号量を、すでに行った双方向予測で動き補償予測および復号した参照画像の動き補償に係るデータに基づいて定める符号量制御部と、
を備えることを特徴とする画像符号化装置。
A storage unit that stores, for each frame, a reference image obtained by decoding encoded data of an encoded input image;
A prediction unit that performs intra-frame prediction, forward prediction, or bidirectional prediction using the reference image stored in the storage unit, and generates a predicted image block corresponding to an input image block that is a part of the input image; ,
When the prediction unit further performs bi-directional prediction using a decoded image of a predicted image block generated by bi-directional prediction as a reference image, the code amount related to the predicted image block is motion compensated by the bi-directional prediction already performed. A code amount control unit determined based on data relating to motion compensation of the predicted and decoded reference image;
An image encoding device comprising:
前記符号量制御部は、前記動き補償に係るデータとして動きベクトルを用いることを特徴とする請求項1に記載の画像符号化装置。   The image coding apparatus according to claim 1, wherein the code amount control unit uses a motion vector as data related to the motion compensation. 前記符号量制御部は、前記動き補償に係るデータとして動き補償の態様を示す動き予測モードを用いることを特徴とする請求項1に記載の画像符号化装置。   The image coding apparatus according to claim 1, wherein the code amount control unit uses a motion prediction mode indicating a mode of motion compensation as data related to the motion compensation. コンピュータを、
符号化した入力画像の符号化データを復号した参照画像をフレーム毎に記憶する記憶部に記憶された参照画像を用いてフレーム内予測、順方向予測又は双方向予測を行って、前記入力画像の一部である入力画像ブロックに対応する予測画像ブロックを生成する予測手段と、
前記予測手段で双方向予測を行って生成した予測画像ブロックの復号画像を参照画像としてさらに双方向予測を行う場合、予測される画像ブロックに係る符号量を、すでに行った双方向予測で動き補償予測および復号した参照画像の動き補償に係るデータに基づいて定める符号量制御手段と、
を具備する画像符号化装置として機能させるためのプログラム。
Computer
Perform intra-frame prediction, forward prediction or bi-directional prediction using a reference image stored in a storage unit that stores, for each frame, a reference image obtained by decoding encoded data of an encoded input image. Prediction means for generating a predicted image block corresponding to an input image block that is a part;
When bi-prediction is further performed using a decoded image of a predicted image block generated by performing bi-prediction in the prediction unit as a reference image, the amount of code related to the predicted image block is motion compensated by bi-prediction already performed. Code amount control means determined based on data related to motion compensation of the predicted and decoded reference image;
A program for causing an image encoding apparatus to function as an image encoding apparatus.
JP2013226443A 2013-10-31 2013-10-31 Image encoding apparatus and image encoding program Expired - Fee Related JP6267929B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013226443A JP6267929B2 (en) 2013-10-31 2013-10-31 Image encoding apparatus and image encoding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013226443A JP6267929B2 (en) 2013-10-31 2013-10-31 Image encoding apparatus and image encoding program

Publications (2)

Publication Number Publication Date
JP2015088954A true JP2015088954A (en) 2015-05-07
JP6267929B2 JP6267929B2 (en) 2018-01-24

Family

ID=53051311

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013226443A Expired - Fee Related JP6267929B2 (en) 2013-10-31 2013-10-31 Image encoding apparatus and image encoding program

Country Status (1)

Country Link
JP (1) JP6267929B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1079948A (en) * 1996-09-03 1998-03-24 Mitsubishi Electric Corp Image encoding device
JP2013524740A (en) * 2010-04-15 2013-06-17 日本テキサス・インスツルメンツ株式会社 Rate control in video coding.

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1079948A (en) * 1996-09-03 1998-03-24 Mitsubishi Electric Corp Image encoding device
JP2013524740A (en) * 2010-04-15 2013-06-17 日本テキサス・インスツルメンツ株式会社 Rate control in video coding.

Also Published As

Publication number Publication date
JP6267929B2 (en) 2018-01-24

Similar Documents

Publication Publication Date Title
CN113287307B (en) Method and apparatus for video decoding, computer device and medium
CN111955007B (en) Video decoding method and device
TWI759389B (en) Low-complexity sign prediction for video coding
CN110944202B (en) Video encoding and decoding method, device, computer equipment and storage medium
CN110719469B (en) Video encoding and decoding method, apparatus and storage medium
KR101658694B1 (en) Motion vector prediction in video coding
CN112291571B (en) Video decoding method and device, computer equipment and storage medium
JP6235040B2 (en) Inter-layer prediction using sample adaptive adjustment for bit-depth scalable video coding
US9584808B2 (en) Device and method for scalable coding of video information
CN112055968B (en) Video decoding method and device, storage medium and electronic equipment
JP2016507966A (en) Device and method for scalable coding of video information based on high efficiency video coding
CN113519159B (en) Video encoding and decoding method and device
JP6430394B2 (en) Apparatus and method for scalable coding of video information based on high efficiency video coding
CN112153390A (en) Video encoding and decoding method and device, computer equipment and storage medium
AU2009205202A1 (en) Image coding method and image decoding method
CN115941954A (en) Method and apparatus for video encoding
TW201408082A (en) Signaling long-term reference pictures for video coding
CN113615187A (en) Method and apparatus for improved implicit transform selection
US20140247879A1 (en) Spatial Motion Vector Scaling for Scalable Video Coding
CN113545039B (en) Video encoding and decoding method and device
CN117178552A (en) Sub-block based bi-prediction constraint for out-of-boundary conditions
JP6267929B2 (en) Image encoding apparatus and image encoding program
CN113748678B (en) Video encoding and decoding method and device and storage medium
CN113497940B (en) Video decoding method, device, computer equipment and storage medium
KR102566569B1 (en) Inter prediction method and apparatus, video encoder and video decoder

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160829

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170418

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170425

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170614

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170926

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171110

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20171128

R150 Certificate of patent or registration of utility model

Ref document number: 6267929

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees