JP6267929B2 - Image encoding apparatus and image encoding program - Google Patents
Image encoding apparatus and image encoding program Download PDFInfo
- Publication number
- JP6267929B2 JP6267929B2 JP2013226443A JP2013226443A JP6267929B2 JP 6267929 B2 JP6267929 B2 JP 6267929B2 JP 2013226443 A JP2013226443 A JP 2013226443A JP 2013226443 A JP2013226443 A JP 2013226443A JP 6267929 B2 JP6267929 B2 JP 6267929B2
- Authority
- JP
- Japan
- Prior art keywords
- prediction
- unit
- image block
- image
- frame
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
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
しかしながら、フレームの種別による符号量の割り当てについては符号化の標準規格では定められておらず、符号化装置の実装に委ねられる。仮に、符号量の割り当てが固定されていると、処理対象となる画像の特徴によらず、常にその割り当てられた符号量で符号化処理が行われる。そのため、割り当てられた符号量が不足して画質が劣化することや、あるいは割り当てられた符号量が過剰で符号化効率が低下するおそれがあった。 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.
本発明は上記の課題を解決するためになされたものであり、本発明の一態様は、入力画像の一部である入力画像ブロックから予測画像ブロックを減算して得られる差分画像ブロックの直交変換係数を量子化する量子化部と、前記直交変換係数の量子化変換係数を逆量子化して得られる復元変換係数を逆直交変換して生成される復元差分画像ブロックと、前記予測画像ブロックとを加算して得られる参照画像ブロックからなる参照画像をフレーム毎に記憶する記憶部と、前記記憶部に記憶された参照画像を用いてフレーム内予測、順方向予測又は双方向予測を行って、前記入力画像ブロックに対応する前記予測画像ブロックを生成する予測部と、前記予測部が第1階層の双方向予測を行って生成した予測画像ブロックに基づく参照画像を用いて第2階層の双方向予測を行う場合、予測される予測画像ブロックに係る前記量子化変換係数の符号量を定める符号量制御部と、を備え、前記符号量制御部は、前記第1階層の双方向予測での動き補償に係るデータとして、前記第1階層の双方向予測で取得される動きベクトルが大きいほど、より小さくなるように前記第2階層の双方向予測で生成される予測画像ブロックに係る前記量子化変換係数の量子化パラメータを定めることを特徴とする画像符号化装置である。 The present invention has been made to solve the above problems, and one aspect of the present invention is an orthogonal transform of a difference image block obtained by subtracting a prediction image block from an input image block that is a part of the input image. A quantization unit for quantizing the coefficients, a restored difference image block generated by inverse orthogonal transformation of a restored transformation coefficient obtained by inverse quantization of the quantization transformation coefficient of the orthogonal transformation coefficient, and the predicted image block A storage unit that stores a reference image composed of reference image blocks obtained by addition for each frame, and performs intra-frame prediction, forward prediction, or bidirectional prediction using the reference image stored in the storage unit, using a prediction unit which generates the predicted image block corresponding to the input image block, a reference image the prediction unit is based on the predicted image block generated by performing a bidirectional prediction in the first layer When performing bidirectional prediction of two layers, and a code amount control unit for determining a code amount of the quantized transform coefficients according to the prediction image block to be predicted, the code amount control unit, both of the first hierarchy as data related to motion compensation in the direction prediction, the higher the motion vector acquired in bidirectional prediction of a first hierarchy is large, the predicted image block generated by the second layer of the bidirectional prediction to a more smaller Kunar so An image coding apparatus characterized by determining a quantization parameter of the quantization transform coefficient according to the above .
本発明のその他の態様は、前記符号量制御部は、前記動き補償に係るデータとして、前記第1階層の双方向予測で用いられる予測モードに対応するように前記量子化パラメータを定め、イントラモード、ブロック分割ありの動き補償予測モード、ブロック分割なしの動き補償予測モード及びスキップモードの順に前記量子化パラメータを大きくすることを特徴とする画像符号化装置である。 In another aspect of the present invention, the code amount control unit determines the quantization parameter as data related to the motion compensation so as to correspond to a prediction mode used in bidirectional prediction of the first layer , and an intra mode. The image coding apparatus is characterized in that the quantization parameter is increased in the order of a motion compensation prediction mode with block division, a motion compensation prediction mode without block division, and a skip mode.
本発明のその他の態様は、コンピュータを、入力画像の一部である入力画像ブロックから予測画像ブロックを減算して得られる差分画像ブロックの直交変換係数を量子化する量子化手段と、前記直交変換係数を量子化した量子化変換係数を逆量子化して得られる復元変換係数について逆直交変換して生成される復元差分画像ブロックと前記予測画像ブロックを加算して得られる参照画像ブロックからなる参照画像をフレーム毎に記憶する記憶部に記憶された参照画像を用いてフレーム内予測、順方向予測又は双方向予測を行って、前記入力画像ブロックに対応する前記予測画像ブロックを生成する予測手段と、前記予測手段で第1階層の双方向予測を行って生成した予測画像ブロックに基づく参照画像を用いて第2階層の双方向予測を行う場合、予測される予測画像ブロックに係る前記量子化変換係数の符号量を定める符号量制御手段と、を具備し、前記符号量制御手段は、前記第1階層の双方向予測での動き補償に係るデータとして、前記第1階層の双方向予測で取得される動きベクトルが大きいほど、より小さくなるように前記第2階層の双方向予測で生成される予測画像ブロックに係る前記量子化変換係数の量子化パラメータを定めることを特徴とする画像符号化装置として機能させるためのプログラムである。 According to another aspect of the present invention, there is provided a quantization unit that quantizes orthogonal transform coefficients of a difference image block obtained by subtracting a predicted image block from an input image block that is a part of an input image, and the orthogonal transform A reference image consisting of a reference image block obtained by adding a restored differential image block generated by inverse orthogonal transform to a restored transform coefficient obtained by inverse quantization of a quantized transform coefficient obtained by quantizing a coefficient and the predicted image block Prediction means for generating the predicted image block corresponding to the input image block by performing intra-frame prediction, forward prediction or bi-directional prediction using the reference image stored in the storage unit for storing each frame; forum for the second layer of a bidirectional prediction using a reference image based on the predicted image block generated by performing a bidirectional prediction in the first layer in said predicting means , Comprising a code amount control means for determining a code amount of the quantized transform coefficients according to the prediction image block to be predicted, and the code amount control unit, according to the motion compensation in the bi-directional prediction of the first hierarchy as the data, the higher the motion vector acquired in bidirectional prediction of a first hierarchy is larger, the quantized transform coefficients according to the prediction image block generated by the second layer of the bidirectional prediction to a more smaller Kunar so A program for functioning as an image encoding device characterized by defining a quantization parameter.
本発明によれば、双方向予測による符号化効率が向上する。 According to the present invention, the encoding efficiency by bidirectional prediction is improved.
以下、図面を参照しながら本発明の実施形態について説明する。
まず、本実施形態に係る画像符号化装置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
FIG. 1 is a schematic block diagram illustrating a configuration of an
The
フレームバッファ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
減算部102は、フレームバッファ101から入力された入力画像ブロック信号からイントラ予測部112又はインター予測部113から入力された予測画像ブロック信号を減算して差分画像ブロック信号を生成する。減算部102は、生成した差分画像ブロック信号を直交変換部103に出力する。現フレームがイントラフレームである場合には、減算部102には、予測画像ブロック信号がイントラ予測部112から入力される。現フレームがインターフレームである場合には、減算部102には予測画像ブロック信号がインター予測部113から入力される。減算部102は、入力画像ブロック信号を形成する画素毎の信号値から参照画像ブロック信号を形成する信号値のうち対応する画素の信号値を減算する。
The
直交変換部103は、減算部102から入力された差分画像ブロック信号が示す信号値について直交変換を行って変換係数を示す変換係数データを生成する。直交変換部103は、直交変換として、例えば、離散コサイン変換(DCT:Discrete Cosine Transform)、カルーネン・レーベ変換(KLT:Karhunen Loeve Transform)等を行う。
The
量子化部104は、直交変換部103から入力された変換係数データが示す変換係数を量子化する。量子化部104は、変換係数を符号量制御部115で定めた量子化パラメータにより定められる値での除算により量子化を行う。量子化幅は、予め定めた固定値であってもよい。量子化部104は、量子化した変換係数(量子化変換係数)を示す量子化変換係数データを可逆符号化部105及び逆量子化部107に出力する。
The
可逆符号化部105には、量子化部104から量子化変換係数データが入力される。可逆符号化部105には、モード判定部114からモードデータが入力される。モードデータは、参照画像ブロック信号を用いて予測画像ブロック信号を予測する際の予測モードを示すデータである。入力されたモードデータが示す予測モードによって、符号化の対象となるデータの種類やその有無が異なる。
The
例えば、モードデータがデータ分割なしの動き補償モードを示す場合、可逆符号化部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
モードデータがインターフレームでのイントラ予測モードを示す場合、可逆符号化部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
The
なお、可逆符号化部105は、符号量制御部115がブロック毎に定めた量子化パラメータを他の入力データ(例えば、量子化変換係数データ)等と統合して統合データを生成してもよい。また、可逆符号化部105は、現ブロックに係る量子化パラメータと、隣接ブロックに係る量子化パラメータとの差分である差分量子化パラメータを、量子化パラメータの代わりに統合して統合データを生成してもよい。ブロック間で量子化パラメータがほぼ一定である場合には、差分量子化パラメータはブロック間で0が連続する。そのため、可逆符号化によって符号量をより少なくすることができる。
The
なお、可逆符号化部105は、既に符号化された入力画像ブロックに係る動きベクトルを記憶する符号化データ記憶部を備え、入力された動きベクトルとの距離が最も小さい動きベクトルを予測ベクトルとして選択(ベクトル予測)してもよい。その場合、可逆符号化部105は、入力された動きベクトルから選択された予測ベクトルの差分ベクトルを算出する。可逆符号化部105は、算出した差分ベクトルと選択された予測ベクトルを示すベクトルインデックスを入力された動きベクトルデータの代わりに統合して統合データを生成してもよい。
Note that the
蓄積バッファ106は、可逆符号化部105から入力された符号化データを記憶する。蓄積バッファ106は、記憶した符号化データを画像符号化装置1の外部、例えば、画像復号装置2に出力する。
The
逆量子化部107は、量子化部104から入力された量子化変換係数データが示す量子化変換係数を逆量子化して、符号量制御部115で定めた量子化パラメータに対応する範囲内のいずれかの値をとる復元変換係数を示す復元変換係数データを生成する。逆量子化部107は、復元変換係数データを逆直交変換部108に出力する。
逆直交変換部108は、逆量子化部107から入力された復元変換係数データが示す復元変換係数について逆直交変換を行って復元差分画像ブロック信号を生成する。逆直交変換部108が用いる逆直交変換は、直交変換部103が行う直交変換の逆演算であることが多い。逆直交変換部108は、生成した復元差分画像ブロック信号を加算部109に出力する。
The
The inverse
加算部109は、逆直交変換部108から入力された復元差分画像ブロック信号と、イントラ予測部112又はインター予測部113から入力された予測画像ブロック信号を加算して復元画像ブロック信号を生成する。ここで、加算部109は、復元差分画像ブロック信号を形成する画素毎の信号値と予測画像ブロック信号を形成する信号値のうち対応する画素の信号値とを加算する。加算部109は、生成した復元画像ブロック信号をデブロッキングフィルタ110に出力する。
The
デブロッキングフィルタ110は、加算部109から入力された復元画像ブロック信号にフィルタリング処理を行ってブロック歪の成分を除去する。デブロッキングフィルタ110は、ブロック歪の成分が除去された復元画像ブロック信号を参照画像ブロック信号として参照メモリ111に記憶させる。
参照メモリ111は、デブロッキングフィルタ110から入力された参照画像ブロック信号をフレーム毎に、その参照画像ブロックに応じた記憶領域に記憶する。これにより、参照画像を示す参照画像信号がフレーム毎に記憶される。
The
The
イントラ予測部112は、現フレームがイントラフレーム(Iピクチャ)である場合には、参照メモリ111に既に記憶された参照画像信号のうち、現フレームに係る画像信号を用いてイントラ予測を行って現ブロックに係る予測画像ブロック信号を生成する。イントラ予測部112は、予め定めた複数の予測モードのそれぞれでイントラ予測を行う。この複数の予測モード間では、互いに予測方向などが異なる。イントラ予測部112は、後述するコスト値を算出し、これによって定められたモードデータを対応付けてモード判定部114に出力する。イントラ予測部112は、生成した予測画像ブロック信号を減算部102及び加算部109に出力する。
When the current frame is an intra frame (I picture), the
インター予測部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
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
ここで、インター予測部113は、予め定めた複数の予測モードのいずれかで予測処理を行う。予測モードには、例えば、動き補償予測モード、スキップモードがある。動き補償予測モードとは、上述したインター予測を行う予測モードである。即ち、動き補償予測モードは、参照画像を用いて注目ブロックにおけるフレーム間の画像の動きを検出して予測画像ブロックを予測する予測モードである。動き補償予測モードには、符号化の単位として入力画像ブロックをそのまま一括した一括ブロックについて予測処理を行う分割なしの場合と、より細分化したサブブロック毎に予測処理を行う分割ありの場合とがある。一括ブロックの場合は、その入力画像ブロック、つまり、CUと同じ大きさのブロックのPU、細分化したサブブロックの場合は分割したPUとなる。PUの大きさは、例えば、水平方向16画素×垂直方向16画素、水平方向8画素×垂直方向16画素、水平方向16画素×垂直方向8画素、水平方向8画素×垂直方向8画素などである。スキップモードとは、現ブロックについて動きベクトルもしくは動きベクトルについての差分ベクトルや量子化変換係数等の符号化データを生成、送信せずに隣接する符号化済みブロックの情報をコピーするモードである。
Here, the
分割なしの動き補償予測モードでは、インター予測部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
インター予測部113は、例えば、選択した予測画像ブロックを示す予測画像ブロック信号、その予測画像ブロック信号を生成する際に参照した参照画像信号のフレームを示す参照フレーム番号、選択した予測画像ブロックに係る動きベクトルを示す動きベクトルデータ、算出したコスト値及び分割なしの動き補償予測モードを示すモードデータを対応付けてモード判定部114に出力する。
The
分割ありの動き補償予測モードでは、インター予測部113は分割したPU毎に予測画像ブロック信号を生成する。インター予測部113は、PU毎に予測画像ブロック信号が示す予測画像ブロックと、それぞれのPUに対応する入力画像ブロックの部分との差分を基本としたコスト値を算出することで、例えばRD最適化により、PU毎に最も近似する予測画像ブロック信号を選択することができる。インター予測部113は、PU毎に選択した予測画像ブロック信号について算出したコスト値をそのPUが属する現ブロック内で合算する。
インター予測部113は、PU毎に選択した予測画像ブロック信号、参照した参照画像信号のフレームを示す参照フレーム番号、選択した動きベクトルを示す動きベクトルデータ、算出したコスト値及び分割ありの動き補償予測モードを示すモードデータを対応付けてモード判定部114に出力する。
In the motion compensated prediction mode with division, the
The
イントラ予測モードでは、インター予測部113は現ブロックについてイントラ予測を行って予測画像ブロック信号を生成する。インター予測部113は、予測画像ブロック信号と入力画像ブロック信号との近似の度合いを示すコスト値を算出する。インター予測部113は、現ブロックについて生成した予測画像ブロック信号、算出したコスト値及びイントラ予測モードを示すモードデータを対応付けてモード判定部114に出力する。
In the intra prediction mode, the
スキップモードでは、インター予測部113は、現ブロックに隣接するブロックであって処理済みのブロックに係る動きベクトルの代表値、例えば、中央値ベクトルを算出する(メディアン予測)。処理がラスタスキャンの順序で行われる場合、処理済みのブロックとは、例えば、現ブロックの左上、真上、右上、左にそれぞれ隣接する4つのブロックである。インター予測部113は、現フレームに対応するフレームの参照画像のうち現ブロックから、算出した中央値ベクトルが示すずれ量で補償した位置に格納された参照画像ブロック信号を予測画像ブロック信号として参照メモリ111から読み出す。インター予測部113は、予測画像ブロック信号と入力画像ブロック信号との近似の度合いを示すコスト値を算出する。インター予測部113は、算出したコスト値及びスキップモードを示すモードデータを対応付けてモード判定部114に出力する。
In the skip mode, the
モード判定部114は、インター予測部113から少なくともコスト値とモードデータが対応付けて入力される。例えば、モードデータが分割なしの動き補償モードを示す場合、CUと同じサイズのPU毎の予測画像ブロック信号、参照画像データ、動きベクトルデータも対応付けて入力される。モードデータが分割ありの動き補償モードを示す場合、分割したPU毎の予測画像ブロック信号、参照画像データ、動きベクトルデータも対応付けて入力される。モードデータがイントラ予測モードを示す場合、予測画像ブロック信号も対応付けて入力される。
The
モード判定部114は、複数の予測モードのうち入力されたコスト値が最小となるコスト値に対応する予測モードを示すモードデータを選択する。モード判定部114は、選択したモードデータを可逆符号化部105に出力する。例えば、選択されたモードがデータ分割なしの動き補償モードを示す場合、モード判定部114は、CUと同じサイズのPU毎の予測画像ブロック信号を減算部102及び加算部109に出力し、CUと同じサイズのPU毎の動きベクトルデータを可逆符号化部105に出力する。選択されたモードデータが分割ありの動き補償モードを示す場合、モード判定部114は、分割したPU毎の予測画像ブロック信号をCU内で統合して減算部102及び加算部109に出力し、分割したPU毎の動きベクトルデータを可逆符号化部105に出力する。選択されたモードデータがイントラ予測モードを示す場合、モード判定部114は、予測画像ブロック信号を減算部102及び加算部109に出力する。
The
符号量制御部115は、量子化部104で生成される量子化変換係数データの符号量を入力画像のフレームの種別に応じてブロック毎に制御する。上述したように、この量子化変換係数データが示す変換係数は、入力画像ブロック信号からイントラ予測部112もしくはインター予測部113が生成した予測画像ブロック信号を減算した差分画像ブロック信号を、直交変換部103で直交変換して得られる。
The code
ところで、現フレームがBピクチャであるとき、インター予測部113は、既に双方向予測を行って生成したBピクチャを参照画像信号として用い、予測画像ブロック信号を生成する場合がある。その場合、符号量制御部115は、その既に行った双方向予測において行われた動き補償に係るデータに基づいて現ブロックに係る量子化変換係数データの符号量を定めてもよい。符号量制御部115には、フレームの種別(例えば、Iピクチャ、Pピクチャ)によっては、予め定められた固定の符号量が設定されていてもよい。符号量の設定例及び制御例については後述する。
By the way, when the current frame is a B picture, the
次に、参照画像及び予測画像の例について説明する。
図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
図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は、符号量の指標として、例えば、量子化パラメータQpを用いる。Qpは、例えば、1から31まで(MPEG−2の例)、1から51まで(AVCの例)、1から57まで(HEVCの例)などの範囲内の整数値である。Qpは、例えばAVCでは、6大きくなる毎に符号量が1/2に減少することを示す指標である。つまり、Qpは、量子化部104に入力される変換係数データが示す変換係数が量子化後にとり得る値の範囲を示す。
符号量制御部115は、イントラフレームであるIピクチャに他の種別のフレームよりも小さいQp(符号量が大きい)を予め定めておいてもよい。Iピクチャは、他のフレームを予測する際に参照されるので、Iピクチャに係る画質を高くすることで符号化した映像全体の画質を向上することができる。
Next, the code amount controlled by the code
The code
The code
符号量制御部115は、インターフレームであるPピクチャには、Iピクチャよりも大きいQp(符号量が小さい)を予め定めておいてもよい。例えば、Pピクチャに与えるQpをIピクチャに与えるQpよりも1又は2大きくする。Pピクチャは、Iピクチャを用いて動き予測補償を行って生成されるため、符号化により発生する情報量がIピクチャよりも少なくなる傾向がある。そのため、符号量を少なくしても画質への影響が限られる。
符号量制御部115は、上位階層において双方向予測が行われるBピクチャには、Pピクチャよりも大きいQp(符号量が小さい)を予め定めておいてもよい。例えば、Bピクチャに与えるQpをPピクチャに与えるQpよりも2又は3大きくする。Bピクチャの予測残差がPピクチャよりも少なくなる傾向があるためである。
The code
The code
符号量制御部115は、下位階層において双方向予測が行われるbピクチャには、Bピクチャよりも大きいQp(符号量が小さい)を予め定めておいてもよい。例えば、bピクチャに与えるQpをBピクチャに与えるQpよりも2又は3大きくする。上述したようにbピクチャが十分な画質を有するフレームの画像に挟まれるように配置される場合には、bピクチャも十分な画質を確保できるためである。これは、bピクチャの画質が劣化する場合でも、品質が十分な前後のフレーム画像を視認すれば動画像全体として画質の劣化が検知されにくいためである。なお、bピクチャが非参照ピクチャである場合には、その他のフレームで生成される予測画像の画質に影響を及ぼさない。
The code
従って、符号量制御部115に予め設定しておく量子化パラメータQpには、フレーム種別間で、式(4)に示す大小関係が与えられてもよい。
Qp(I)<Qp(P)<Qp(B)<Qp(b) … (4)
式(4)において、Qp(I)等は、Iピクチャに係る量子化パラメータQp等を示す。Qp(P)は、例えば、Qp(I)よりも2〜4大きい値である。Qp(B)は、例えば、Qp(P)よりも2〜4大きい値である。Qp(b)は、例えば、Qp(B)よりも2〜4大きい値である。
これにより、符号量制御部115は、現フレームの種別に応じて量子化パラメータQpを切り替え、切り替えた量子化パラメータQpを量子化部104に出力する。
これらの量子化パラメータQp(I)等は、蓄積バッファ106から出力されるGOP毎の符号化データの符号量が、予め定めた伝送容量を超えないように定めておく。
Accordingly, the quantization parameter Q p set in advance in the code
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
Thereby, the code
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
現フレームの種別がbピクチャである場合には、上述したように下位階層では、上位階層で双方向予測が行われたBピクチャである参照画像信号を用いて予測画像ブロックが生成される。その場合、符号量制御部115は、現ブロックに係る量子化パラメータQpを、そのBピクチャの予測画像ブロック信号を上位階層で双方向予測して生成する際に用いた動き補償に係るデータに基づいて定めてもよい。動き補償に係るデータには、例えば、(I)動きベクトルを示す動きベクトルデータや(II)予測モードを示すモードデータがある。その双方向予測で用いられる参照画像信号に係るフレームの種別は、例えば、Pピクチャである。そこで、可逆符号化部105又は符号量制御部115は、動き補償に係るデータをブロック毎に記憶する記憶部を備えてもよい。符号量制御部115は、その参照画像信号に係るフレームについて、現ブロックでの動き補償に係るデータを当該記憶部から読み出し、読み出したデータに基づいて量子化パラメータQpを定める。但し、符号量制御部115は、上述の予め定めたQp(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
(I)動きベクトルデータを用いる場合
符号量制御部115は、動きベクトルデータが示す動きベクトルが大きいほど、より小さい量子化パラメータQpを定める。上位階層で取得された動きベクトルの大きさが大きいことは、フレーム間において参照ブロックに表された画像の動きが大きいことを示す。その場合には、下位階層での符号量をより多くする。他方、上位階層で取得された動きベクトルの大きさが小さいことは、フレーム間において参照ブロックに表された画像の動きが小さいことを示す。その場合には、下位階層での符号量をより少なくする。
(I) When using motion vector data The code
ここで、符号量制御部115は、例えば、式(5)を用いてQpを定めてもよい。
Qp=Qp0−INT(α・|mv|) … (5)
式(5)において、INT(…)は、実数値…の小数点以下の値を切り捨てた整数を与える実数化関数を示す。αは、予め定めた正の実数である。|mv|は、動きベクトルの大きさを示す0又は0より大きい実数である。αは、INT(α・|mv|)の値が0〜10程度となり、かつQpが上述した範囲内、例えば、1〜31の範囲(MPEG−2の例)をとるように予め実験やシミュレーションを行って定めておいてもよい。
Here, the code
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は、取得された複数の動きベクトルの大きさの代表値、例えば、中央値、平均値、最小値のいずれかを、量子化パラメータQpを定める際に用いてもよい。
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
(II)モードデータを用いる場合
符号量制御部115は、上位階層で取得したモードデータが示す予測モードに対応した量子化パラメータQpを定める。符号量制御部115には、例えば、上位階層の予測モードと量子化パラメータとの対応関係を示す量子化対応データを予め記憶しておき、記憶した量子化対応データから取得したモードデータに対応する量子化パラメータを読み出す。
(II) When Mode Data is Used The code
図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)に示す大小関係を与えておく。
Qp1<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
また、符号量制御部115は、量子化パラメータQpを上位階層の双方向予測で用いた参照画像信号についての動き補償に係るデータに基づいて定めることで、表示される画像の動きの特徴に応じて符号量が制御される。つまり、符号量を定める際に動き補償に係るデータが活用されるので、処理量が過大にならずに処理の高速化を図ることができる。また、動き補償に係るデータと対応付けておくことで符号量を予め定めた範囲に収まるように、符号量が定量的に定められる。
In addition, the code
このような制御による効果は、RD最適化によるブロック分割を行うか否かの判定とも整合する。RD最適化では、量子化パラメータQpが大きい(符号量が少ない)場合、ブロック分割をできるだけ行わないように分割を示すフラグ情報の符号化が省略され、符号化データの符号量(符号化レート)の減少が優先される。量子化パラメータQpが小さい(符号量が多い)場合、ブロック分割を行って分割を示すフラグ情報の符号化を行うことで歪み量の減少が優先される。 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
FIG. 7 is a flowchart illustrating processing in which the code
(Step S101) The code
(ステップS102)符号量制御部115は、上位階層での双方向予測に用いた参照画像信号のフレームを特定する。現フレームが、図5に示すフレームb1である場合を例にとると、下位階層での双方向予測に用いた参照画像信号のフレームはフレームB1である。上位階層でフレームB1に係る予測画像信号を生成する際、双方向予測に用いた参照画像信号のフレームはフレームI0、フレームP2である。そのうち、動き補償が行われるのは、インターフレームであるフレームP2である。従って、この例ではフレームP2が特定される。その後、ステップS103に進む。
(Step S102) The code
(ステップS103)符号量制御部115は、特定したフレームでの当該現ブロックについての動き補償に係るデータを、自部又は可逆符号化部105が備える記憶部から読み出す。読み出されるデータは、例えば、動きベクトルデータ、モードデータである。その後、ステップS104に進む。
(ステップS104)符号量制御部115は、(I)、(II)で述べたように、読み出したデータに基づいて量子化パラメータQpを定める。その後、ステップS105に進む
(ステップS105)符号量制御部115は、現フレームにおいて未処理のブロックの有無を判定する。未処理のブロックがある場合には(ステップS105 YES)、現ブロックが次のブロックに切り替えられ、ステップS102に進む。未処理のブロックがない場合には(ステップS105 NO)、図7に示す処理を終了する。
(Step S <b> 103) The code
(Step S104), the code
(ステップS106)符号量制御部115は、量子化パラメータQpを現フレームの種別に応じた値に定める。符号量制御部115は、例えば、現フレームがIピクチャである場合には、QpをQp(I)と定め、現フレームがPピクチャである場合には、QpをQp(P)と定め、現フレームがBピクチャである場合には、QpをQp(B)と定める。その後、図7に示す処理を終了する。
(Step S106) The code
次に、本実施形態に係る画像復号装置2の構成について説明する。
図8は、本実施形態に係る画像復号装置2の構成を示す概略ブロック図を示す。
画像復号装置2は、蓄積バッファ201、可逆復号部202、逆量子化部203、逆直交変換部204、加算部205、デブロッキングフィルタ206、フレームバッファ207、参照メモリ208、イントラ補償部209及びインター補償部210を含んで構成される。
Next, the configuration of the
FIG. 8 is a schematic block diagram showing the configuration of the
The
蓄積バッファ201には、画像復号装置2の外部、例えば、画像符号化装置1から符号化データが入力され、入力された符号化データが一時的に記憶される。
可逆復号部202は、蓄積バッファ201から符号化データを読み出し、読み出した符号化データについて可逆復号を行って統合データを生成する。可逆復号部202が用いる可逆復号方式は、可逆符号化部105が用いた可逆符号化方式に対応する方式である。
The
The
生成された統合データには、モードデータ、量子化変換係数データが含まれている場合には、可逆復号部202は、統合データからモードデータ、量子化変換係数データを抽出する。
When the generated integrated data includes mode data and quantized transform coefficient data, the
例えば、モードデータがデータ分割なしの動き補償モードを示す場合、可逆復号部202は、統合データから量子化変換係数データ、PU毎の参照フレーム番号、動きベクトルデータを抽出する。モードデータがデータ分割ありの動き補償モードを示す場合、可逆復号部202は、統合データから量子化変換係数データ、PU毎の参照フレーム番号、動きベクトルデータを抽出する。モードデータがイントラ予測モードを示す場合、可逆復号部202は、統合データから量子化変換係数データ、イントラ予測モードを抽出する。モードデータがスキップモードを示す場合には、統合データに量子化変換係数データ、参照フレーム番号、動きベクトルデータは含まれないため、モードデータ以外のデータの抽出を行わない。
For example, when the mode data indicates a motion compensation mode without data division, the
可逆復号部202は、抽出した量子化変換係数データを逆量子化部203に出力する。可逆復号部202は、抽出したモードデータをイントラ補償部209又はインター補償部210に出力する。可逆復号部202は、抽出した参照フレーム番号、動きベクトルデータをインター補償部210に出力する。
なお、可逆復号部202は、復元された統合データから量子化パラメータを抽出し、抽出した量子化パラメータを逆量子化部203に出力する。また、統合データに差分量子化パラメータが含まれる場合には、隣接ブロックについて既に算出した量子化パラメータと現ブロックに係る差分量子化パラメータとを加算して現ブロックに係る量子化パラメータを算出してもよい。その場合には、可逆復号部202は、算出した現ブロックに係る量子化パラメータを逆量子化部203に出力する。
The
Note that the
なお、抽出した動きベクトルデータが差分ベクトルを示す場合には、可逆復号部202は、統合データからベクトルインデックスをさらに抽出する。その場合、可逆復号部202は、既に復号したブロック毎の動きベクトルを記憶する復号データ記憶部を備え、抽出したベクトルインデックスが示す動きベクトルを復号データ記憶部から予測ベクトルとして読み出す。可逆復号部202は、読み出した予測ベクトルと差分ベクトルを加算して動きベクトルを示す動きベクトルデータを、インター補償部210に出力する。
When the extracted motion vector data indicates a difference vector, the
逆量子化部203は、可逆復号部202から入力された量子化変換係数データが示す量子化変換係数を逆量子化して復元変換係数を示す復元変換係数データを生成する。ここで、逆量子化部203は、可逆復号部202から入力された量子化パラメータにより定められる値を量子化変換係数に乗算して復元変換係数を算出し、算出した復元変換係数を示す復元変換係数データを生成する。逆量子化部203は、生成した復元変換係数データを逆直交変換部204に出力する。
The
逆直交変換部204は、逆量子化部203から入力された復元変換係数データが示す復元変換係数について逆直交変換を行って復元差分画像ブロック信号を生成する。逆直交変換部204が用いる逆直交変換は、例えば、画像符号化装置(図1)の直交変換部103が行う直交変換の逆演算である。逆直交変換部204は、生成した復元差分画像ブロック信号を加算部205に出力する。
The inverse
加算部205は、逆直交変換部204から入力された復元差分画像ブロック信号と、イントラ補償部209又はインター補償部210から入力された補償画像ブロック信号を加算して復元画像ブロック信号を生成する。加算部205は、生成した復元画像ブロック信号をデブロッキングフィルタ206に出力する。加算部205は、復元差分画像ブロック信号における画素毎の信号値から予測画像ブロック信号における対応する画素の信号値を加算する。
The adding
デブロッキングフィルタ206は、加算部205から入力された復元画像ブロック信号にフィルタリング処理を行ってブロック歪の成分を除去する。デブロッキングフィルタ206は、ブロック歪の成分が除去された復元画像ブロック信号をフレームバッファ207に記憶させ、その復元画像ブロック信号を参照画像ブロック信号として参照メモリ208に記憶させる。
The
フレームバッファ207には、デブロッキングフィルタ206から入力された復元画像ブロック信号をフレーム毎に、その復元画像ブロックに応じた表示領域に応じた記憶領域に記憶する。これにより、フレーム毎の復元画像信号が記憶される。フレームバッファ207は、記憶している復元画像信号を予め定めたGOP構造に係るフレームの順序に復元画像信号を並び替えてもよい。フレームバッファ207は、フレーム毎に復元画像信号を画像復号装置2の外部、例えば、画像表示装置(ディスプレイ)に出力してもよい。
参照メモリ208は、デブロッキングフィルタ206から入力された参照画像ブロック信号をフレーム毎に、その参照画像ブロックに応じた表示領域に応じた記憶領域に記憶する。これにより、参照画像を示す参照画像信号がフレーム毎に記憶される。
The
The
イントラ補償部209は、現フレームがイントラフレーム(Iピクチャ)である場合、可逆復号部202から入力されたモードデータが示すイントラ予測モードに対応した補償モードで補償処理を行って、現ブロックに係る予測画像ブロック信号を生成する。ここで、イントラ補償部209は、参照メモリ208に記憶された参照画像信号のうち、現フレームに係る参照画像信号を用いてイントラ補償を行い、現ブロックに係る補償画像ブロック信号を生成する。イントラ補償部209は、生成した補償画像ブロック信号を加算部205に出力する。
When the current frame is an intra frame (I picture), the
インター補償部210は、現フレームがインターフレーム(Pピクチャ、Bピクチャ)である場合、可逆復号部202から入力されたモードデータが示す予測モードに対応した補償モードで補償処理を行って現ブロックに係る補償画像ブロック信号を生成する。ここで、インター補償部210は、参照メモリ208に記憶された参照画像信号を用いる。インター補償部210は、生成した補償画像ブロック信号を生成する。
When the current frame is an inter frame (P picture, B picture), the
例えば、モードデータがイントラ予測モードを示す場合、インター補償部210は、イントラ補償を行って補償画像ブロック信号を生成する。
モードデータが分割なしの動き補償予測モードを示す場合、インター補償部210は、現ブロック全体を一括した一括ブロックであるPUについて参照フレーム番号、動きベクトルデータが入力される。インター補償部210は、入力された参照フレーム番号で指定される参照画像信号から動きベクトルデータが示す動きベクトルで指定される領域の参照画像ブロック信号を参照メモリ208から読み出す。インター補償部210は、読み出した参照画像ブロック信号を用いて補償画像ブロック信号を生成する。
For example, when the mode data indicates the intra prediction mode, the
When the mode data indicates a motion-compensated prediction mode without division, the
モードデータが分割ありの動き補償予測モードを示す場合、インター補償部210は、現ブロック内を細分化したPU毎の参照フレーム番号、動きベクトルデータが入力される。インター補償部210は、入力された参照フレーム番号が示す参照画像信号から動きベクトルデータが示す動きベクトルで指定される領域の参照画像ブロック信号を参照メモリ208から読み出す。インター補償部210は、読み出した参照画像ブロック信号を用いてPU毎の補償画像ブロック信号を生成し、生成した補償画像ブロック信号をPU(この例では、サブブロック)間で統合して現ブロック(一括ブロック)に係る補償画像ブロックを生成する。
モードデータがスキップモードを示す場合、インター補償部210は、現ブロックに隣接するブロックであって処理済みのブロックに係る動きベクトルの代表値(例えば、中央値)を算出する。インター補償部210は、現フレームに対応するフレームの参照画像のうち現ブロックから、算出した代表値が示すずれ量で補償した位置に格納された参照画像ブロック信号を予測画像ブロック信号として参照メモリ208から読み出す。
When the mode data indicates a motion compensated prediction mode with division, the
When the mode data indicates the skip mode, the
このように、本実施形態では、符号化した入力画像の符号化データを復号した参照画像をフレーム毎に記憶する記憶部(例えば、参照メモリ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は、現ブロックに係る量子化パラメータQpを、その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
なお、上述した実施形態は、画像符号化装置1と画像復号装置2を備えた画像処理システムとして実施してもよい。当該画像処理システムは、画像符号化装置1が出力した符号化データを記憶する記憶媒体を備え、画像復号装置2には当該記憶媒体から読み出された符号化データが入力されてもよい。また、当該画像処理システムは、画像符号化装置1が出力した符号化データを伝送するネットワークを備え、画像復号装置2には当該ネットワークが伝送した符号化データが入力されるようにしてもよい。当該ネットワークは、有線でも無線であってもよいし、複数の送信先に一斉にデータを送信する放送伝送路の一部又は全部であってもよい。
Note that the above-described embodiment may be implemented as an image processing system including the
なお、上述した実施形態における画像符号化装置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
Moreover, you may implement | achieve part or all of the
以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。 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
111 ... Reference memory, 112 ... Intra prediction unit, 113 ... Inter prediction unit,
114... Mode determination unit, 115.
DESCRIPTION OF
207 ... Frame buffer, 208 ... Reference memory, 209 ... Intra compensation unit,
210: Inter compensation unit
Claims (3)
前記直交変換係数の量子化変換係数を逆量子化して得られる復元変換係数を逆直交変換して生成される復元差分画像ブロックと、前記予測画像ブロックとを加算して得られる参照画像ブロックからなる参照画像をフレーム毎に記憶する記憶部と、
前記記憶部に記憶された参照画像を用いてフレーム内予測、順方向予測又は双方向予測を行って、前記入力画像ブロックに対応する前記予測画像ブロックを生成する予測部と、
前記予測部が第1階層の双方向予測を行って生成した予測画像ブロックに基づく参照画像を用いて第2階層の双方向予測を行う場合、予測される予測画像ブロックに係る前記量子化変換係数の符号量を定める符号量制御部と、を備え、
前記符号量制御部は、前記第1階層の双方向予測での動き補償に係るデータとして、前記第1階層の双方向予測で取得される動きベクトルが大きいほど、より小さくなるように前記第2階層の双方向予測で生成される予測画像ブロックに係る前記量子化変換係数の量子化パラメータを定める
ことを特徴とする画像符号化装置。 A quantization unit that quantizes orthogonal transform coefficients of a difference image block obtained by subtracting a prediction image block from an input image block that is a part of the input image;
It consists of a reference image block obtained by adding a restored differential image block generated by inverse orthogonal transformation of a restored transform coefficient obtained by dequantizing the quantized transform coefficient of the orthogonal transform coefficient and the predicted image block A storage unit for storing a reference image for each frame;
A prediction unit that performs intra-frame prediction, forward prediction, or bidirectional prediction using the reference image stored in the storage unit, and generates the predicted image block corresponding to the input image block;
When performing the prediction unit second layer of a bidirectional prediction using a reference image based on the predicted image block generated by performing a bidirectional prediction in the first layer, wherein the quantized transform coefficients according to the prediction image block to be predicted A code amount control unit for determining the code amount of
The code amount control unit as data relating to motion compensation in the bi-directional prediction of the first hierarchy, the more motion vectors acquired by the bidirectional prediction of said first layer is large, the more smaller Kunar so the An image coding apparatus characterized by determining a quantization parameter of the quantized transform coefficient related to a predicted image block generated by two-layer bi-directional prediction .
イントラモード、ブロック分割ありの動き補償予測モード、ブロック分割なしの動き補償予測モード及びスキップモードの順に前記量子化パラメータを大きくする
ことを特徴とする請求項1に記載の画像符号化装置。 The code amount control unit determines the quantization parameter as data related to the motion compensation so as to correspond to a prediction mode used in bidirectional prediction of the first layer ,
The image coding apparatus according to claim 1, wherein the quantization parameter is increased in the order of intra mode, motion compensation prediction mode with block division, motion compensation prediction mode without block division, and skip mode.
入力画像の一部である入力画像ブロックから予測画像ブロックを減算して得られる差分画像ブロックの直交変換係数を量子化する量子化手段と、
前記直交変換係数を量子化した量子化変換係数を逆量子化して得られる復元変換係数について逆直交変換して生成される復元差分画像ブロックと前記予測画像ブロックを加算して得られる参照画像ブロックからなる参照画像をフレーム毎に記憶する記憶部に記憶された参照画像を用いてフレーム内予測、順方向予測又は双方向予測を行って、前記入力画像ブロックに対応する前記予測画像ブロックを生成する予測手段と、
前記予測手段で第1階層の双方向予測を行って生成した予測画像ブロックに基づく参照画像を用いて第2階層の双方向予測を行う場合、予測される予測画像ブロックに係る前記量子化変換係数の符号量を定める符号量制御手段と、を具備し、
前記符号量制御手段は、前記第1階層の双方向予測での動き補償に係るデータとして、前記第1階層の双方向予測で取得される動きベクトルが大きいほど、より小さくなるように前記第2階層の双方向予測で生成される予測画像ブロックに係る前記量子化変換係数の量子化パラメータを定める
ことを特徴とする画像符号化装置として機能させるためのプログラム。 Computer
Quantization means for quantizing the orthogonal transform coefficient of the difference image block obtained by subtracting the prediction image block from the input image block that is a part of the input image;
From a reference image block obtained by adding a restored difference image block generated by inverse orthogonal transform to a restored transform coefficient obtained by inverse quantization of a quantized transform coefficient obtained by quantizing the orthogonal transform coefficient and the predicted image block Prediction for generating the predicted image block corresponding to the input image block by performing intra-frame prediction, forward prediction or bi-directional prediction using the reference image stored in the storage unit that stores the reference image for each frame Means,
When performing the second layer bi-directional prediction using the reference image based on the predicted image block generated by performing the first layer bi-directional prediction by the prediction unit, the quantized transform coefficient related to the predicted image block to be predicted Code amount control means for determining the code amount of
The code amount control means, as the data relating to motion compensation in the bi-directional prediction of the first hierarchy, the more motion vectors acquired by the bidirectional prediction of said first layer is large, the more smaller Kunar so the A program for functioning as an image encoding device, characterized in that a quantization parameter of the quantization transform coefficient relating to a prediction image block generated by bi-level bidirectional prediction is defined.
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 JP2015088954A (en) | 2015-05-07 |
JP6267929B2 true 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) |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1079948A (en) * | 1996-09-03 | 1998-03-24 | Mitsubishi Electric Corp | Image encoding device |
US20110255594A1 (en) * | 2010-04-15 | 2011-10-20 | Soyeb Nagori | Rate Control in Video Coding |
-
2013
- 2013-10-31 JP JP2013226443A patent/JP6267929B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2015088954A (en) | 2015-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116723315B (en) | Video decoding method and device, video encoding method and device, and storage medium | |
JP7364669B2 (en) | Intra prediction method and device | |
CN110944202B (en) | Video encoding and decoding method, device, computer equipment and storage medium | |
CN113678441B (en) | Video encoding and decoding method and device | |
TWI759389B (en) | Low-complexity sign prediction for video coding | |
CN112291571B (en) | Video decoding method and device, computer equipment and storage medium | |
CN115941954B (en) | Video coding method and device | |
JP6074082B2 (en) | Video decoding method in intra prediction mode | |
KR101658694B1 (en) | Motion vector prediction in video coding | |
CN112055968B (en) | Video decoding method and device, storage medium and electronic equipment | |
KR101394209B1 (en) | Method for predictive intra coding for image data | |
CN117998085A (en) | Video coding method, device and storage medium | |
CN113259661A (en) | Method and device for video decoding | |
AU2009205202A1 (en) | Image coding method and image decoding method | |
JP6430394B2 (en) | Apparatus and method for scalable coding of video information based on high efficiency video coding | |
KR101614828B1 (en) | Method, device, and program for coding and decoding of images | |
JP2016508011A (en) | Apparatus and method for scalable coding of video information | |
CN113497940B (en) | Video decoding method, device, computer equipment and storage medium | |
KR20130001303A (en) | Power efficient motion estimation techniques for video encoding | |
CN116686287B (en) | Video processing method, video processing device, apparatus, and storage medium | |
CN113366847A (en) | Method and apparatus for video encoding | |
CN118301346A (en) | Image encoding/decoding method and apparatus, and recording medium storing bit stream | |
CN115088260A (en) | Video coding and decoding method and device | |
JPWO2008136164A1 (en) | Decoding circuit, decoding method, and image reproducing apparatus | |
CN113545039B (en) | Video encoding and decoding method and device |
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 |