JP2015211269A - Moving image encoding device, moving image encoding method and computer program for moving image encoding - Google Patents
Moving image encoding device, moving image encoding method and computer program for moving image encoding Download PDFInfo
- Publication number
- JP2015211269A JP2015211269A JP2014090381A JP2014090381A JP2015211269A JP 2015211269 A JP2015211269 A JP 2015211269A JP 2014090381 A JP2014090381 A JP 2014090381A JP 2014090381 A JP2014090381 A JP 2014090381A JP 2015211269 A JP2015211269 A JP 2015211269A
- Authority
- JP
- Japan
- Prior art keywords
- orthogonal transform
- block
- encoding
- evaluation value
- encoding target
- 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
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本発明は、例えば、動画像データに含まれるピクチャを複数のブロックに分割し、ブロックごとに符号化する動画像符号化装置、動画像符号化方法、及び動画像符号化用コンピュータプログラムに関する。 The present invention relates to, for example, a moving picture coding apparatus, a moving picture coding method, and a moving picture coding computer program for dividing a picture included in moving picture data into a plurality of blocks and coding each block.
動画像データは、一般に非常に大きなデータ量を有する。そのため、動画像データを扱う装置は、動画像データを他の装置へ送信しようとする場合、あるいは、動画像データを記憶装置に記憶しようとする場合、動画像データを符号化することにより圧縮する。 The moving image data generally has a very large amount of data. Therefore, a device that handles moving image data compresses the moving image data by encoding it when transmitting the moving image data to another device or when storing the moving image data in the storage device. .
その際、符号化対象のピクチャは、複数のブロックに分割され、ブロックごとに符号化される。動画像データを符号化する動画像符号化装置は、符号化対象ブロックに対して、そのブロックが含まれるピクチャよりも前に符号化されたピクチャ、あるいは、そのブロックが含まれるピクチャ内の既に符号化されたブロックから予測ブロックを生成する。動画像符号化装置は、符号化対象ブロックと予測ブロック間の空間的な相関が高いことを利用して冗長性を低減するために、符号化対象ブロックと予測ブロック間の誤差を表す予測誤差画像を算出し、ブロック内の画素の空間的な相関が高いことを利用して冗長性を低減する直交変換により、直交変換係数を求める。そして動画像符号化装置は、その直交変換係数を量子化した後に可変長符号化する。 At that time, the picture to be encoded is divided into a plurality of blocks and encoded for each block. A moving image encoding apparatus that encodes moving image data encodes, with respect to an encoding target block, a picture encoded before a picture including the block, or an already encoded image within the picture including the block. A prediction block is generated from the converted block. In order to reduce redundancy by using a high spatial correlation between the encoding target block and the prediction block, the moving image encoding apparatus represents a prediction error image representing an error between the encoding target block and the prediction block. And the orthogonal transform coefficient is obtained by orthogonal transform that reduces redundancy by using the high spatial correlation of the pixels in the block. Then, the moving picture coding apparatus quantizes the orthogonal transform coefficient and then performs variable length coding.
さらに、動画像符号化方式の一つである、H.264 MPEG-4 Advanced Video Coding(H.264 MPEG-4 AVC)あるいはH.265(High Efficiency Video Coding(HEVC)と呼ばれることもある)では、動画像符号化装置は、ピクチャに応じて、予測単位あるいは直交変換単位となるブロックのサイズを選択可能である。そこで、動画像符号化装置は、符号化対象ブロックについて、予め用意された複数の分割モード、予測モード及び変換サイズモードの組み合わせごとに、符号化情報量の評価値を計算する。そして動画像符号化装置は、評価値が最小となる組み合わせでそのブロックを符号化する(例えば、特許文献1を参照)。 Furthermore, H.264 MPEG-4 Advanced Video Coding (H.264 MPEG-4 AVC) or H.265 (sometimes called High Efficiency Video Coding (HEVC)), which is one of the video coding systems. The video encoding apparatus can select the size of a block that is a prediction unit or an orthogonal transform unit according to a picture. Therefore, the video encoding apparatus calculates an evaluation value of the encoded information amount for each combination of a plurality of division modes, prediction modes, and transform size modes prepared in advance for the encoding target block. Then, the moving image encoding device encodes the block with a combination that minimizes the evaluation value (see, for example, Patent Document 1).
ピクチャに写っているシーンが、グラウンドに投げられたボールが転がるシーンのように、比較的平坦な背景の中を小さな物体が高速で移動するシーンであることがある。このような場合、ピクチャ内に特徴的なところが少なく、かつ、物体の移動量が大きいため、そのピクチャを他のピクチャを参照して符号化するインター予測符号化モードにより符号化する場合、動き予測が適切でないことがある。すなわち、予測ブロックを生成するための動き探索処理の結果、背景だけが写っている領域が選択されてしまい、予測ブロックに移動する物体が含まれないことがある。またこのようなシーンでは、ピクチャ内の既に符号化された領域の情報を利用して符号化対象ブロックを符号化するイントラ予測符号化モードで符号化対象ブロックを符号化する場合でも、予測ブロックは背景だけが写っている領域から作成される。そのため、予測誤差画像では、その移動する物体が存在する領域に含まれる画素は0以外の値を持つものの、その他の領域に含まれる画素はほぼ0となる。このような場合、ブロックサイズが大きいほど、符号化量の評価値は小さくなるので、直交変換のブロックのサイズとして、相対的に大きなブロックが選択されることになる。直交変換のブロックのサイズが大きくなるほど、小さな移動物体が含まれる領域がそのブロックに占める割合が小さくなるので、その領域に起因する直交変換係数は、絶対値が比較的小さい高周波成分となる。その結果、量子化処理によってその移動物体が含まれる領域に起因する、量子化された直交変換係数が0となって、その移動物体に関する情報が失われてしまい、復号されたピクチャ上では、その移動物体が存在しなくなってしまう。このように、直交変換の単位となるブロックについて適切なサイズが選択されないと、復号されたピクチャの画質が劣化してしまう。 The scene shown in the picture may be a scene in which a small object moves at high speed in a relatively flat background, such as a scene in which a ball thrown to the ground rolls. In such a case, since there are few characteristic parts in the picture and the amount of movement of the object is large, when the picture is coded by the inter prediction coding mode in which the picture is coded with reference to other pictures, motion prediction is performed. May not be appropriate. That is, as a result of the motion search process for generating the prediction block, an area in which only the background is shown is selected, and the moving object may not be included in the prediction block. In such a scene, even when the encoding target block is encoded in the intra prediction encoding mode in which the encoding target block is encoded using the information of the already encoded area in the picture, the prediction block is It is created from the area where only the background is shown. Therefore, in the prediction error image, the pixels included in the region where the moving object exists have a value other than 0, but the pixels included in the other regions are almost zero. In such a case, the larger the block size, the smaller the evaluation value of the coding amount. Therefore, a relatively large block is selected as the orthogonal transform block size. As the size of the orthogonal transform block increases, the ratio of the area including the small moving object to the block decreases. Therefore, the orthogonal transform coefficient resulting from the area is a high-frequency component having a relatively small absolute value. As a result, the quantized orthogonal transform coefficient resulting from the region including the moving object by the quantization process becomes 0, and information about the moving object is lost. There is no moving object. Thus, if an appropriate size is not selected for a block that is a unit of orthogonal transform, the image quality of the decoded picture is degraded.
そこで、本明細書は、復号されたピクチャの画質劣化を抑制できる直交変換サイズを選択可能な動画像符号化装置を提供することを目的とする。 Accordingly, an object of the present specification is to provide a moving picture coding apparatus capable of selecting an orthogonal transform size that can suppress degradation in image quality of a decoded picture.
一つの実施形態によれば、動画像データに含まれるピクチャを符号化する動画像符号化装置が提供される。この動画像符号化装置は、ピクチャを複数のブロックに分割する分割部と、複数のブロックのうちの符号化対象ブロックに写っているシーンの複雑さを表す複雑度を算出する複雑度算出部と、符号化対象ブロックを含む符号化対象ピクチャ、または、符号化対象ピクチャよりも前に符号化されたピクチャから符号化対象ブロックの予測ブロックを生成する予測ブロック生成部と、互いに異なる複数の直交変換サイズのそれぞれについて、符号化対象ブロックをその直交変換サイズを持つサブブロック単位で直交変換したときの符号量を表す評価値を、複雑度が低いほど、小さい直交変換サイズほど評価値が小さくなるように重み付けして算出し、評価値が最小となる直交変換サイズを選択するサイズ選択部と、符号化対象ブロックと予測ブロック間の予測誤差画像を選択された直交変換サイズを持つサブブロック単位で直交変換して得られる直交変換係数を符号化する符号化部とを有する。 According to one embodiment, a moving image encoding apparatus that encodes a picture included in moving image data is provided. The moving image encoding apparatus includes: a dividing unit that divides a picture into a plurality of blocks; a complexity calculating unit that calculates complexity representing the complexity of a scene shown in an encoding target block among the plurality of blocks; A prediction block generation unit that generates a prediction block of a coding target block from a coding target picture including a coding target block or a picture encoded before the coding target picture, and a plurality of orthogonal transforms different from each other For each of the sizes, the evaluation value indicating the code amount when the encoding target block is orthogonally transformed in units of sub-blocks having the orthogonal transformation size is such that the lower the complexity, the smaller the evaluation value becomes. The size selection unit that selects the orthogonal transform size that minimizes the evaluation value, the encoding target block, and the prediction block And an encoding unit for encoding the orthogonal transform coefficients obtained by orthogonal transformation in units of sub-blocks having the selected orthogonal transformation size prediction error image between click.
本発明の目的及び利点は、請求項において特に指摘されたエレメント及び組み合わせにより実現され、かつ達成される。
上記の一般的な記述及び下記の詳細な記述の何れも、例示的かつ説明的なものであり、請求項のように、本発明を限定するものではないことを理解されたい。
The objects and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the appended claims.
It should be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention as claimed.
本明細書に開示された動画像符号化装置は、復号されたピクチャの画質劣化を抑制できる直交変換サイズを選択できる。 The moving image encoding apparatus disclosed in this specification can select an orthogonal transform size that can suppress degradation in image quality of a decoded picture.
以下、図を参照しつつ、動画像符号化装置について説明する。最初に、符号化対象ブロック内の直交変換を適用するブロックのサイズの影響について説明する。 Hereinafter, the moving picture coding apparatus will be described with reference to the drawings. First, the influence of the block size to which the orthogonal transform in the encoding target block is applied will be described.
図1は、直交変換を適用するブロックのサイズによる、復号されたピクチャの画質への影響を説明する図である。16×16画素のサイズを持つ予測誤差画像100には、移動物体を表す領域101が含まれる。この領域101は小さく、例えば、4×4画素未満のサイズであるとする。予測誤差画像100が、直交変換の適用単位である、4×4画素のサイズを持つサブブロックごとに分割され、そのうちの一つのサブブロック110に領域101が含まれるとする。この場合、各サブブロックが直交変換されると、サブブロック110のサイズが小さいために、サブブロック110では、領域101の影響で、直交変換係数は比較的大きな値となる。なお、サブブロック110以外のサブブロックでは、予測誤差画像100が平坦なため、直交変換係数は直流成分を除いてほぼ0となる。直交変換係数が比較的大きな値となるため、サブブロック110の直交変換係数が量子化されたサブブロック120に示されるように、サブブロック120においては、直流成分以外の量子化された直交変換係数の少なくとも一部は0以外の値を持つ。その結果、復号されたピクチャ130でも、領域101が再現される。
FIG. 1 is a diagram for explaining the influence on the image quality of a decoded picture due to the size of a block to which orthogonal transform is applied. A
一方、予測誤差画像100全体が一つのブロック140として直交変換される場合、ブロック140に対して領域101は相対的に小さいため、直交変換係数の絶対値も小さくなる。その結果、直交変換係数が量子化されたブロック150に示されるように、量子化処理により、直流以外の成分について、量子化された直交変換係数は0となってしまい、領域101の情報が消失する。その結果、復号されたピクチャ160において、領域101が消失する。
On the other hand, when the entire
このような、小さな領域の消失による、復号されたピクチャの画質劣化は、ピクチャに写っているシーンが比較的複雑な場合には視聴者に気付かれ難いものの、背景が比較的平坦な場合には目立ってしまう。 Such degradation of the picture quality of a decoded picture due to the disappearance of a small area is difficult for the viewer to notice when the scene shown in the picture is relatively complex, but when the background is relatively flat. It will stand out.
そこで、本実施形態では、動画像符号化装置は、符号化対象ブロックについて、そのブロックに写っているシーンの複雑さの度合いを表す複雑度を算出する。そして動画像符号化装置は、直交変換の適用単位となるブロックのサイズを決定する際に、複雑度が低いほど小さくなる重み係数で、直交変換サイズが小さいほど符号量が増加する項の符号量を重み付けして、符号化対象ブロックの符号量の評価値を算出する。これにより、この動画像符号化装置は、平坦なシーンが写っているブロックについては、直交変換が適用されるブロックのサイズとして比較的小さなサイズを選択し易くする。 Therefore, in the present embodiment, the moving image encoding apparatus calculates a complexity representing the degree of complexity of a scene shown in the block to be encoded. Then, when determining the size of a block that is an application unit of orthogonal transform, the video encoding apparatus uses a weighting factor that decreases as complexity decreases, and a code amount of a term that increases as the orthogonal transform size decreases. , And an evaluation value of the code amount of the encoding target block is calculated. As a result, the moving picture coding apparatus makes it easy to select a relatively small size as a block size to which the orthogonal transformation is applied for a block in which a flat scene is captured.
なお、ピクチャは、フレームまたはフィールドの何れであってもよい。フレームは、動画像データ中の一つの静止画像であり、一方、フィールドは、フレームから奇数行のデータあるいは偶数行のデータのみを取り出すことにより得られる静止画像である。 Note that the picture may be either a frame or a field. The frame is one still image in the moving image data, while the field is a still image obtained by extracting only odd-numbered data or even-numbered data from the frame.
図2は、一つの実施形態による動画像符号化装置の概略構成図である。動画像符号化装置1は、分割部10と、複雑度算出部11と、予測ブロック生成部12と、サイズモード選択部13と、符号化部14とを有する。また符号化部14は、予測誤差算出部15と、直交変換部16と、量子化部17と、復号部18と、記憶部19と、可変長符号化部20とを有する。
動画像符号化装置1が有するこれらの各部は、それぞれ別個の回路として形成される。あるいは動画像符号化装置1が有するこれらの各部は、その各部に対応する回路が集積された一つの集積回路として動画像符号化装置1に実装されてもよい。さらに、動画像符号化装置1が有するこれらの各部は、動画像符号化装置1が有するプロセッサ上で実行されるコンピュータプログラムにより実現される、機能モジュールであってもよい。
FIG. 2 is a schematic configuration diagram of a moving image encoding apparatus according to an embodiment. The moving
Each of these units included in the moving
動画像符号化装置1全体を制御する制御部(図示せず)により、例えば、Group Of Pictures(GOP)により指定された符号化順序に従って、動画像データに含まれるピクチャが、順次、分割部10に入力される。なお、GOPは、連続する複数のピクチャを含み、各ピクチャに対する符号化方法が規定された構造を表す。
分割部10は、符号化対象となるピクチャを所定数の画素を持つ複数のブロックに分割する。各ブロックは、直交変換の適用サイズのうちの最大サイズ、例えば、横16画素×縦16画素のサイズを持つ。そして分割部10は、例えば、ラスタスキャン順に各ブロックを出力する。
A control unit (not shown) that controls the entire moving
The dividing
複雑度算出部11は、分割部10から出力されたブロックのうち、符号化対象ブロックに写っているシーンの複雑さの度合いを表す複雑度を計算する。この複雑度は、直交変換するブロックのサイズ及び予測モードの決定の際の符号化量の評価値を算出する際の重み係数の決定に利用される。なお、予測モードは、予測ブロックの生成方法を規定し、インター予測符号化モードかイントラ予測符号化モードかを表す。さらに、予測モードは、イントラ予測符号化モードが選択される場合には予測ブロックの生成方法を規定するイントラ予測モードを表し、インター予測符号化モードが選択される場合には、一方向の予測モードか双方向の予測モードかを表す。
The
本実施形態では、複雑度算出部11は、ブロック内の全画素の平均画素値と各画素の差分絶対値の総和(アクティビティと呼ばれる)を算出する。アクティビティは、次式で算出される。
なお、複雑度算出部11は、ブロックのアクティビティの代わりに、次式に従って、1画素あたりのアクティビティPixActを、複雑度として算出してもよい。
複雑度算出部11は、複雑度をサイズモード選択部13へ出力する。
The
予測ブロック生成部12は、符号化対象ブロックについて適用可能な予測モードごとに予測ブロックを生成する。
The prediction
例えば、符号化対象ピクチャがIピクチャであれば、予測ブロック生成部12は、予測ブロックの生成方法を規定するイントラ予測モードごとに、符号化対象ブロックの左側または上側に隣接する符号化済みのブロックから予測ブロックを生成する。なお、符号化対象ピクチャは、符号化対象ブロックを含むピクチャである。またIピクチャは、イントラ予測符号化の対象となり、インター予測符号化されないピクチャである。
For example, if the encoding target picture is an I picture, the prediction
また、符号化対象ピクチャがPピクチャであれば、予測ブロック生成部12は、例えば、符号化済みのピクチャを復号して得られた参照ピクチャと符号化対象ブロック間の動き探索を行う。そして予測ブロック生成部12は、符号化対象ブロックと最も一致する参照ピクチャ上の領域を示す動きベクトルを算出し、その動きベクトルで示された領域を予測ブロックとする。また、符号化対象ピクチャがBピクチャであれば、予測ブロック生成部12は、2方向、例えば、再生時間順で符号化対象ピクチャよりも前のピクチャと後のピクチャの両方で動き探索して、二つのピクチャ上で符号化対象ブロックと最も一致する領域を求める。そして予測ブロック生成部12は、それら二つの領域内の対応する位置にある画素の値の平均値を求めて、予測ブロックとする。さらに、予測ブロック生成部12は、PピクチャまたはBピクチャについては、符号化対象ピクチャがIピクチャの場合と同様に、イントラ予測モードごとの予測ブロックを生成してもよい。さらに、予測ブロック生成部12は、Bピクチャについては、Pピクチャと同様に、一方向の動き予測により予測ブロックを生成してもよい。なお、Pピクチャは、既に符号化されている1枚のピクチャの情報を用いてインター予測符号化されることが可能なピクチャである。また、Bピクチャは、既に符号化されている2枚のピクチャの情報を用いて双方向のインター予測符号化されることが可能なピクチャである。Pピクチャ内の各ブロックは、イントラ予測符号化されてもよい。また、Bピクチャ内の各ブロックも、イントラ予測符号化されてもよく、あるいは、一方向についてインター予測符号化されてもよい。
Also, if the picture to be encoded is a P picture, the prediction
予測ブロック生成部12は、さらに、予測モードの適用対象となるブロックのサイズ、または、動き探索の対象となるブロックのサイズを変更できる場合には、符号化対象ブロックを分割した複数のサブブロックごとに、予測ブロックを生成してもよい。
When the prediction
予測ブロック生成部12は、符号化対象ブロックについて生成された予測ブロックと、その予測ブロックに対応する予測モード、動きベクトルなどをサイズモード選択部13へ出力する。
The prediction
サイズモード選択部13は、サイズ選択部の一例であり、符号化対象ブロックに対して適用される直交変換の単位となるブロックのサイズ、及び、予測モードを決定する。例えば、直交変換のブロックのサイズは、16×16画素、8×8画素、及び、4×4画素のなかから選択される。そのために、サイズモード選択部13は、直交変換単位となるブロックのサイズごと、かつ、予測ブロック生成部12により生成された予測ブロックごとに、符号化対象ブロックの符号量の推定値である評価値Eを算出する。その際、サイズモード選択部13は、評価値を、複雑度が低いほど、小さい直交変換サイズほど評価値が小さくなるように重み付けして算出する。
サイズモード選択部13は、直交変換の適用サイズごとの予測誤差画像評価値Dを求めるために、予測誤差画像を直交変換の適用サイズに応じてN個のサブブロックに分割し、個々のサブブロックをアダマール変換する。例えば、直交変換の適用サイズが8×8画素であれば、N=4であり、直交変換の適用サイズが4×4画素であれば、N=16である。サイズモード選択部13は、アダマール変換により得られた係数Cji(i=1,2,...,M、ただし、Mはサブブロックに含まれる画素数)の絶対値の総和SATDj(j=1,2,...,N)をサブブロックごとに算出する。そして、サイズモード選択部13は、各サブブロックのアダマール変換係数の絶対値の総和SATDjの合計を予測誤差画像評価値Dとする。 The size mode selection unit 13 divides the prediction error image into N subblocks according to the application size of the orthogonal transform in order to obtain the prediction error image evaluation value D for each application size of the orthogonal transform. To Hadamard transform. For example, if the application size of orthogonal transformation is 8 × 8 pixels, N = 4, and if the application size of orthogonal transformation is 4 × 4 pixels, N = 16. The size mode selection unit 13 sums the absolute values of the coefficients C ji (i = 1, 2,..., M, where M is the number of pixels included in the sub-block) obtained by Hadamard transform SATD j (j = 1,2, ..., N) is calculated for each sub-block. Then, the size mode selection unit 13 sets the sum of the absolute sum SATD j of the Hadamard transform coefficients of each sub-block as the prediction error image evaluation value D.
また、サイズモード選択部13は、符号化項目情報量Rとして、直交変換サイズ分割フラグ、符号化対象ブロックに適用される量子化値、及び、係数有無フラグなどの符号量を算出する。なお、直交変換サイズ分割フラグは、直交変換の適用サイズを表す。また、係数有無フラグは、画素値が輝度の場合と色差の場合のそれぞれについて求められる、絶対値が0でない直交変換係数の有無を表し、直交変換されるサブブロックごとに求められる。したがって、直交変換のブロックサイズが小さくなるほど、係数有無フラグの数が増えるので、直交変換のブロックサイズが小さくなるほど、符号化項目情報量Rも増加する。 Further, the size mode selection unit 13 calculates, as the encoding item information amount R, code amounts such as an orthogonal transform size division flag, a quantization value applied to the encoding target block, and a coefficient presence / absence flag. Note that the orthogonal transform size division flag represents an application size of orthogonal transform. The coefficient presence / absence flag represents the presence / absence of an orthogonal transformation coefficient whose absolute value is not 0, which is obtained for each of the case where the pixel value is luminance and the color difference, and is obtained for each sub-block subjected to orthogonal transformation. Therefore, since the number of coefficient presence / absence flags increases as the block size for orthogonal transform decreases, the encoded item information amount R increases as the block size for orthogonal transform decreases.
重み係数αは、符号化対象ブロックの複雑度が低いほど、小さくなるように設定される。そして重み係数αは、(3)式に示されるように、評価値Eの算出の際に、直交変換のブロックサイズが小さくなるほど増加する符号化項目情報量Rを重み付けするために用いられる。 The weighting factor α is set to be smaller as the complexity of the encoding target block is lower. The weighting coefficient α is used to weight the encoded item information amount R that increases as the block size of the orthogonal transform becomes smaller when the evaluation value E is calculated, as shown in the equation (3).
図3は、符号化対象ブロックの複雑度と重み係数の関係を示す図である。図3において、横軸は複雑度(この例では、1画素あたりのアクティビティ)を表し、縦軸は、重み係数αの値を表す。そしてグラフ300は、複雑度と重み係数αの関係を表す。この例では、複雑度が0、すなわち、符号化対象ブロックに含まれる全ての画素が同一の値を持つ場合に重み係数αは、最小の0.2となる。そして複雑度が増加するほど、重み係数αも線形に増加し、複雑度が10以上では、重み係数αも1で一定となる。
FIG. 3 is a diagram illustrating the relationship between the complexity of the block to be encoded and the weighting factor. In FIG. 3, the horizontal axis represents complexity (in this example, activity per pixel), and the vertical axis represents the value of the weighting factor α. The
このように重み係数αが設定されることで、符号化対象ブロックに写っているシーンが平坦なほど、符号化項目情報量Rを含む項の値が小さくなる。そのため、符号化対象ブロックに写っているシーンが平坦なほど、直交変換の適用サイズとして小さなサイズが選択され易くなる。 By setting the weighting factor α in this way, the value of the term including the encoded item information amount R becomes smaller as the scene shown in the encoding target block becomes flatter. For this reason, the flatter the scene shown in the encoding target block, the easier it is to select a smaller size as the application size of the orthogonal transform.
サイズモード選択部13は、評価値の最小値に対応する直交変換サイズと予測モードとを、符号化対象ブロックの符号化に利用するとして選択する。そこでサイズモード選択部13は、選択された予測モードに従って生成された予測ブロックと、直交変換サイズとを、符号化部14へ出力する。
さらに、サイズモード選択部13は、選択された予測モードを表すパラメータ、及び、選択された予測モードで予測ブロックを生成するために利用される情報、例えば、動きベクトルも符号化部14へ出力する。
The size mode selection unit 13 selects the orthogonal transform size and the prediction mode corresponding to the minimum evaluation value as being used for encoding the block to be encoded. Therefore, the size mode selection unit 13 outputs the prediction block generated according to the selected prediction mode and the orthogonal transform size to the
Further, the size mode selection unit 13 also outputs a parameter representing the selected prediction mode and information used to generate a prediction block in the selected prediction mode, for example, a motion vector, to the
符号化部14は、サイズモード選択部13により選択された予測モードに従って生成された予測ブロックと、直交変換サイズとに従って、符号化対象ブロックを符号化する。すなわち、符号化部14は、符号化対象ブロックと予測ブロック間の予測誤差画像を選択された直交変換サイズを持つサブブロック単位で直交変換して得られる直交変換係数を符号化する。
The
そこで、符号化部14の予測誤差算出部15は、符号化対象ブロックと予測ブロックとの差分演算を実行する。そして予測誤差算出部15は、その差分演算により得られたブロック内の各画素に対応する差分値を、予測誤差画像とする。予測誤差算出部15は、予測誤差画像と、直交変換サイズとを符号化部14の直交変換部16へ出力する。
Therefore, the prediction
直交変換部16は、符号化対象ブロックの予測誤差画像を、選択された直交変換サイズのサブブロックに分割し、サブブロック単位で直交変換することにより、各サブブロックの直交変換係数を求める。例えば、直交変換部16は、直交変換処理として、離散コサイン変換(Discrete Cosine Transform、DCT)を各サブブロックに対して実行することにより、直交変換係数として、サブブロックごとのDCT係数の組を得る。ただし、選択された直交変換サイズと符号化対象ブロックのサイズが同一である場合は、直交変換部16は、符号化対象ブロック自体に対して直交変換処理を実行すればよい。
The
直交変換部16は、符号化対象ブロックの各サブブロックの直交変換係数を符号化部14の量子化部17へ出力する。
The
量子化部17は、符号化対象ブロックの各直交変換係数を量子化することにより、その直交変換係数の量子化係数を算出する。この量子化処理は、一定区間に含まれる信号値を一つの信号値で表す処理である。そしてその一定区間は、量子化幅と呼ばれる。例えば、量子化部17は、直交変換係数から、量子化幅に相当する所定数の下位ビットを切り捨てることにより、その直交変換係数を量子化する。量子化幅は、量子化パラメータによって決定される。例えば、量子化部17は、量子化パラメータの値に対する量子化幅の値を表す関数にしたがって、使用される量子化幅を決定する。またその関数は、量子化パラメータの値に対する単調増加関数とすることができ、予め設定される。また量子化パラメータは、符号化対象ブロックを含む符号化対象ピクチャに割り当てられる符号量などに基づいて、例えば、制御部(図示せず)により決定され、量子化部17に通知される。
The
量子化部17は、符号化対象ブロックの量子化係数を、復号部18及び可変長符号化部20へ出力する。
The
復号部18は、符号化対象ブロックの量子化係数から、そのブロックよりも後のブロックを符号化するための参照ブロック及び参照ピクチャを生成する。そのために、復号部18は、量子化係数に、量子化パラメータにより決定された量子化幅に相当する所定数を乗算することにより、量子化係数を逆量子化する。この逆量子化により、符号化対象ブロックの直交変換係数、例えば、DCT係数の組が復元される。その後、復号部18は、直交変換係数を、適用された直交変換のサイズを持つサブブロックごとに逆直交変換処理する。例えば、直交変換部16がDCTを用いて直交変換係数を算出している場合、復号部18は、復元された直交変換係数に対して逆DCT処理を実行する。逆量子化処理及び逆直交変換処理を量子化信号に対して実行することにより、符号化前の予測誤差画像と同程度の情報を有する予測誤差画像が再生される。
The
復号部18は、予測ブロックの各画素値に、その画素に対応する再生された予測誤差信号を加算する。これらの処理を各ブロックについて実行することにより、復号部18は、その後に符号化されるブロックに対する予測ブロックを生成するために利用される参照ブロックを生成する。また復号部18は、参照ブロックのブロックノイズを軽減するために、参照ブロックに対してデブロッキングフィルタ処理を実行してもよい。
復号部18は、参照ブロックを生成する度に、その参照ブロックを記憶部19に記憶させる。
The
Each time the
記憶部19は、復号部18から受け取った参照ブロックを一時的に記憶する。なお、参照ピクチャは、各ブロックの符号化順序にしたがって、1枚のピクチャ分の参照ブロックを結合することで得られる。記憶部19は、予測ブロック生成部12及びサイズモード選択部13に、参照ピクチャまたは参照ブロックを供給する。なお、記憶部19は、符号化対象ピクチャが参照する可能性がある、予め定められた所定枚数分の参照ピクチャを記憶し、参照ピクチャの枚数がその所定枚数を超えると、符号化順序が古い参照ピクチャから順に破棄する。
The
可変長符号化部20は、量子化部17から受け取った量子化係数を、生起確率が高い信号値ほど短くなるように可変長符号化する。また可変長符号化部20は、動きベクトルなどの予測ブロックの生成に利用される情報も可変長符号化する。可変長符号化部20は、例えば、可変長符号化処理として、CAVLCといったハフマン符号化処理あるいはCABACといった算術符号化処理を用いることができる。
The variable
可変長符号化部20により生成された符号化信号に対して、動画像符号化装置1は、ブロックごとの予測モードなどを含む所定の情報をヘッダ情報として付加することにより、符号化された動画像データを含むデータストリームを生成する。動画像符号化装置1は、そのデータストリームを磁気記憶媒体、光記憶媒体あるいは半導体メモリなどを有する記憶部(図示せず)に記憶するか、あるいはそのデータストリームを他の機器へ出力する。
The moving
図4は、動画像符号化装置1により実行される、動画像符号化処理の動作フローチャートである。動画像符号化装置1は、符号化対象ブロックごとに図4に示される動画像符号化処理を実行する。
FIG. 4 is an operation flowchart of the moving image encoding process executed by the moving
複雑度算出部11は、符号化対象ブロックの複雑度を算出する(ステップ101)。そして複雑度算出部11は、複雑度をサイズモード選択部13へ出力する。また予測ブロック生成部12は、符号化対象ブロックについて適用可能な予測モードごとに予測ブロックを生成する(ステップS102)。予測ブロック生成部12は、予測ブロックをサイズモード選択部13へ出力する。
The
サイズモード選択部13は、複雑度が低いほど、符号化項目情報量Rに対する重み係数αが小さくなるように重み係数αを決定する(ステップS103)。そしてサイズモード選択部13は、符号化対象ブロックについて適用可能な予測モード及び適用可能な直交変換のブロックサイズごとに、その重み係数αで符号化項目情報量Rを重み付けして評価値Eを算出する(ステップS104)。サイズモード選択部13は、評価値Eが最小となる予測モード及び直交変換のブロックサイズを、符号化対象ブロックに対して適用する予測モード及び直交変換のブロックサイズとする(ステップS105)。そしてサイズモード選択部13は、適用する予測モードで生成された予測ブロック及び直交変換のブロックサイズを符号化部14へ出力する。
The size mode selection unit 13 determines the weighting factor α so that the weighting factor α with respect to the encoded item information amount R decreases as the complexity decreases (step S103). Then, the size mode selection unit 13 calculates the evaluation value E by weighting the encoding item information amount R by the weighting coefficient α for each prediction mode applicable to the encoding target block and applicable block size of orthogonal transform. (Step S104). The size mode selection unit 13 sets the prediction mode and orthogonal transform block size that minimize the evaluation value E as the prediction mode and orthogonal transform block size to be applied to the encoding target block (step S105). Then, the size mode selection unit 13 outputs the prediction block generated in the prediction mode to be applied and the block size of the orthogonal transform to the
符号化部14の予測誤差算出部15は、符号化対象ブロックと予測ブロック間で差分演算を行って、予測誤差画像を算出する(ステップS106)。そして符号化部14の直交変換部16は、予測誤差画像を、適用される直交変換サイズを持つサブブロック単位で分割し、サブブロックごとに直交変換して直交変換係数を算出する(ステップS107)。
The prediction
符号化部14の量子化部17は、直交変換係数を量子化して量子化係数を求める(ステップS108)。そして量子化部17は、量子化係数を符号化部14の復号部18及び可変長符号化部20へ出力する。
The quantizing
復号部18は、量子化係数を逆量子化して直交変換係数を再生し、その直交変換係数に対して、直交変換の際に適用されたブロックサイズのサブブロックごとに逆直交変換を適用して、予測誤差画像を再生する。そして復号部18は、予測誤差画像の各画素の値を、予測ブロックの対応する画素の値に加算して、参照ブロックを求め、その参照ブロックを記憶部19に記憶する(ステップS109)。
The
一方、可変長符号化部20は、符号化対象ブロックに含まれる各量子化係数を可変長符号化する(ステップS110)。そして動画像符号化装置1は、符号化対象ブロックに対する動画像符号化処理を終了する。
On the other hand, the variable
なお、動画像符号化装置1は、ステップS101の処理と、S102の処理の順序を入れ換えてもよく、あるいは、ステップS101の処理と、S102の処理を並列に実行してもよい。
Note that the moving
以上に説明してきたように、この動画像符号化装置は、符号化対象ブロックの複雑度が低いほど、すなわち、符号化対象ブロックに写っているシーンが平坦であるほど、符号化項目情報量に対する重み係数を小さくする。そのため、符号化対象ブロックの複雑度が低いほど、直交変換の適用サイズとして小さなサイズが選ばれ易くなる。これにより、この動画像符号化装置は、平坦な背景とともに小さな移動物体が写っているようなシーンでも、復号画像においてその小さな移動物体が消失するような画質劣化を抑制できる、適切な直交変換サイズを選択できる。 As described above, this moving image encoding apparatus is adapted to the encoding item information amount as the complexity of the encoding target block is lower, that is, as the scene shown in the encoding target block is flatter. Reduce the weighting factor. Therefore, the smaller the complexity of the block to be encoded, the easier it is to select a smaller size as the application size for orthogonal transform. As a result, this moving image encoding apparatus can suppress an image quality deterioration in which a small moving object disappears in a decoded image even in a scene where a small moving object is reflected with a flat background. Can be selected.
変形例によれば、複雑度算出部11は、符号化対象ブロックについて生成された予測ブロックから複雑度を算出してもよい。この場合において、予測ブロック生成部12により複数の予測ブロックが生成されている場合、複雑度算出部11は、各予測ブロックについて複雑度を算出し、その平均値を符号化対象ブロックについての複雑度としてもよい。
According to the modification, the
あるいは、複雑度算出部11は、各予測ブロックのうち、符号化対象ブロックと予測ブロック間の予測誤差画像の各画素の値の絶対値の総和が最小となる予測ブロックが、符号化対象ブロックに最も類似していると推定される。そこで複雑度算出部11は、予測誤差画像の各画素の値の絶対値の総和が最小となる予測ブロックから複雑度を算出してもよい。
Alternatively, the
また他の変形例によれば、複雑度算出部11は、符号化対象ブロックを直交変換の単位となるサブブロックに分割し、サブブロックごとに複雑度を算出してもよい。
この場合には、サイズモード選択部13は、(3)式の代わりに、次式に従って評価値Eを算出することが好ましい。
In this case, it is preferable that the size mode selection unit 13 calculates the evaluation value E according to the following equation instead of the equation (3).
この変形例では、重み係数βjは、複雑度が低いほど大きくなるように設定される。
図5は、この変形例による、サブブロックの複雑度と重み係数の関係を示す図である。図5において、横軸は複雑度(この例では、1画素あたりのアクティビティ)を表し、縦軸は、重み係数βjの値を表す。そしてグラフ500は、複雑度と重み係数βjの関係を表す。この例では、複雑度が0、すなわち、符号化対象ブロックに含まれる全ての画素が同一の値を持つ場合に重み係数βjは最大の1となる。そして複雑度が増加するほど、重み係数βjは線形に減少し、複雑度が10以上では、重み係数βjは0.2で一定となる。
In this modification, the weighting factor β j is set to increase as the complexity decreases.
FIG. 5 is a diagram showing the relationship between the complexity of sub-blocks and the weighting factor according to this modification. In FIG. 5, the horizontal axis represents complexity (in this example, activity per pixel), and the vertical axis represents the value of the weighting factor β j . The
サブブロックのサイズが小さいほど、サブブロック内の少しの画素値のばらつきで複雑度が高くなる。特に、符号化対象ブロックに写っているシーンが平坦な背景のなかを小さな物体が移動しているようなシーンである場合、その移動物体を表す領域を含むサブブロックが大きいほど、そのサブブロックの複雑度は低下する。したがって、上記のように重み係数βjが設定されることで、移動物体を表す領域を含むサブブロックについての予測誤差評価値に対する重み係数が、そのサブブロックのサイズが小さくなるほど小さくなる。その結果として、上記のようなシーンが写っている符号化対象ブロックでは、直交変換の適用サイズとして小さなサイズが選択され易くなる。 The smaller the size of the sub-block, the higher the complexity with a slight variation in pixel values within the sub-block. In particular, when the scene shown in the encoding target block is a scene in which a small object is moving in a flat background, the larger the subblock including the area representing the moving object, the larger the subblock. Complexity decreases. Therefore, by setting the weighting factor β j as described above, the weighting factor for the prediction error evaluation value for the subblock including the region representing the moving object becomes smaller as the size of the subblock becomes smaller. As a result, a small size is easily selected as an application size of the orthogonal transformation in the encoding target block in which the scene as described above is reflected.
さらに他の変形例によれば、サイズモード選択部13は、HEVCに準拠するように、予測モード及び直交変換の適用サイズを決定してもよい。 According to another modification, the size mode selection unit 13 may determine the application size of the prediction mode and the orthogonal transform so as to comply with HEVC.
図6は、HEVCによる、ピクチャの分割の一例を示す図である。図6に示されるように、ピクチャ600は、符号化ブロックCoding Tree Unit(CTU)単位で分割され、各CTU601は、ラスタスキャン順に符号化される。CTU601のサイズは、64x64〜16x16画素の中から選択できる。
FIG. 6 is a diagram illustrating an example of picture division by HEVC. As shown in FIG. 6, a
CTU601は、さらに、四分木構造で複数のCoding Unit(CU)602に分割される。一つのCTU601内の各CU602は、Zスキャン順に符号化される。CU602のサイズは可変であり、そのサイズは、CU分割モード8x8〜64x64画素の中から選択される。CU602は、符号化モードであるイントラ予測符号化モードとインター予測符号化モードを選択する単位となる。CU602は、Prediction Unit(PU)603単位またはTransform Unit(TU)604単位で個別に処理される。PU603は、符号化モードに応じた予測が行われる単位となる。例えば、PU603は、イントラ予測符号化モードでは、イントラ予測モードが適用される単位となり、インター予測符号化モードでは、動き補償を行う単位となる。PU603のサイズは、例えば、インター予測符号化では、PU分割モードPartMode =2Nx2N, NxN, 2NxN, Nx2N, 2NxU, 2NxnD, nRx2N, nLx2Nの中から選択できる。一方、TU604は、直交変換の単位であり、TU604のサイズは、4x4画素〜32x32画素の中から選択される。TU604は、四分木構造で分割され、Zスキャン順に処理される。
The
この場合、複雑度算出部11は、例えば、CUを符号化対象ブロックとして、複雑度を算出する。そして複雑度算出部11は、CUについて算出した複雑度をサイズモード選択部13へ出力する。
In this case, the
サイズモード選択部13は、符号化対象ブロックと、符号化対象ブロックをサブブロックに4分割したときのそれぞれについて評価値Eを算出する。例えば、符号化対象ブロックであるCUのサイズが32×32画素であるとする。この場合、サイズモード選択部13は、CU自体を直交変換の適用単位とする場合と、CUを4個に等分割した16×16画素のサブブロックごとに直交変換する場合とで、それぞれ評価値Eを算出する。なお、適用可能な予測モードが複数存在する場合、サイズモード選択部13は、各予測モードについても評価値Eを算出する。サイズモード選択部13は、符号化対象ブロック自体を直交変換の適用単位とするときの評価値の方が、符号化対象ブロックを4分割したサブブロックを直交変換の適用単位とするときの評価値よりも小さい場合、符号化対象ブロック自体を直交変換の適用単位とする。一方、符号化対象ブロック自体を直交変換の適用単位とするときよりも、符号化対象ブロックを4分割したサブブロックを直交変換の適用単位とするときの評価値の方が小さい場合、サイズモード選択部13は、個々のサブブロックを符号化対象ブロックとする。そしてサイズモード選択部13は、個々の符号化対象ブロックについて、評価値の算出及び適用する直交変換サイズの選択を行う。その際、複雑度算出部11も、新たに設定された符号化対象ブロックについて複雑度を算出する。
The size mode selection unit 13 calculates an evaluation value E for each of the encoding target block and the encoding target block when the encoding target block is divided into four sub blocks. For example, it is assumed that the size of the CU that is the encoding target block is 32 × 32 pixels. In this case, the size mode selection unit 13 evaluates each of the evaluation values in a case where the CU itself is an application unit of orthogonal transformation and a case where orthogonal transformation is performed for each 16 × 16 pixel sub-block obtained by equally dividing the CU into four. E is calculated. When there are a plurality of applicable prediction modes, the size mode selection unit 13 calculates an evaluation value E for each prediction mode. The size mode selection unit 13 uses the evaluation value when the encoding target block itself is the application unit of orthogonal transform, and the evaluation value when the sub-block obtained by dividing the encoding target block into four is the application unit of orthogonal transformation. Is smaller than the encoding target block itself as an application unit of orthogonal transform. On the other hand, when the evaluation value when the sub-block obtained by dividing the block to be encoded into four sub-blocks is set as the application unit of the orthogonal transform is smaller than the case where the encoding target block itself is set as the application unit of the orthogonal transform, The unit 13 sets each sub block as an encoding target block. Then, the size mode selection unit 13 calculates an evaluation value and selects an orthogonal transform size to be applied to each encoding target block. At that time, the
サイズモード選択部13は、符号化対象ブロック自体が直交変換の適用単位となるか、サブブロックのサイズがTUサイズの最小設定値である4×4画素となるまで、上記の処理を繰り返す。 The size mode selection unit 13 repeats the above processing until the encoding target block itself becomes an application unit of orthogonal transformation or the size of the sub-block becomes 4 × 4 pixels which is the minimum setting value of the TU size.
図7は、HEVCに準拠して直交変換の適用サイズを決定する際の処理の一例を示す図である。なお、この例では、サイズモード選択部13は、(3)式に従って評価値Eを算出する。しかし、複雑度算出部11が、4分割するか否かの判断の対象となるブロックまたはサブブロックを4分割したサブブロックのそれぞれについて複雑度を算出することで、サイズモード選択部13は、(4)式に従って評価値Eを算出してもよい。
FIG. 7 is a diagram illustrating an example of processing when determining the application size of orthogonal transform based on HEVC. In this example, the size mode selection unit 13 calculates the evaluation value E according to equation (3). However, the complexity
最初に、複雑度算出部11及びサイズモード選択部13は、CU700を符号化対象ブロックとして、CU700自体をTUとする場合と、CU700を4分割した16×16画素のサブブロックをTUとする場合とで、それぞれ評価値Eを算出する。そしてCU700自体をTUとするときの評価値の方が、CU700を4分割した16×16画素のサブブロックをTUとする場合の評価値よりも小さい場合、TU710は、CU700と同サイズとなる。
First, the
一方、CU700自体をTUとするときの評価値よりもCU700を4分割した16×16画素のサブブロックをTUとする場合の評価値の方が小さい場合、複雑度算出部11は、16×16画素のサブブロック701ごとに、複雑度を算出する。さらに、サイズモード選択部13は、各サブブロック701をTUとするときの評価値と、各サブブロックをそれぞれ4分割した8×8画素のサブブロックをTUとするときの評価値を算出する。
On the other hand, when the evaluation value when the TU is a sub-block of 16 × 16 pixels obtained by dividing the
各サブブロック701をTUとするときの評価値の方が、各サブブロック701をそれぞれ4分割した8×8画素のサブブロックをTUとするときの評価値よりも小さい場合、サイズモード選択部13は、各サブブロック701をTU711とする。
一方、何れかのサブブロック701、例えば、右上のサブブロック701aについて、そのサブブロック701aをTUとするときの評価値よりも、そのサブブロック701aを4分割したサブブロックをTUとするときの評価値の方が小さいとする。この場合、複雑度算出部11は、サブブロック701aを4分割した8×8画素のサブブロック702ごとに、複雑度を算出する。さらに、サイズモード選択部13は、各サブブロック702をTUとするときの評価値と、各サブブロック702をそれぞれ4分割した4×4画素のサブブロックをTUとするときの評価値を算出する。
When the evaluation value when each sub-block 701 is set to TU is smaller than the evaluation value when the sub-block of 8 × 8 pixels obtained by dividing each sub-block 701 into four is set as TU, the size mode selection unit 13 , Each sub-block 701 is designated as
On the other hand, for any of the sub-blocks 701, for example, the upper-
各サブブロック702をTUとするときの評価値が、各サブブロック702をそれぞれ4分割した4×4画素のサブブロックをTUとするときの評価値よりも小さい場合、サイズモード選択部13は、サブブロック701a内の各サブブロック702をTU712とする。また、サブブロック701a以外のサブブロック701については、そのサブブロック701をTU711とする。
一方、何れかのサブブロック702、例えば、左下のサブブロック702aについて、そのサブブロック702aをTUとするときの評価値よりも、そのサブブロック702aを4分割したサブブロックをTUとするときの評価値の方が小さいとする。この場合、サイズモード選択部13は、サブブロック702a内の各サブブロックをTU713とする。また、サブブロック702a以外のサブブロック702については、そのサブブロック702をTU712とする。
When the evaluation value when each sub-block 702 is TU is smaller than the evaluation value when the sub-block of 4 × 4 pixels obtained by dividing each sub-block 702 into four is set as TU, the size mode selection unit 13 Each sub-block 702 in the sub-block 701a is set as TU712. Further, for
On the other hand, for any of the
この変形例によれば、動画像符号化装置は、上記の実施形態と同様に、画質劣化を抑制できる、適切な直交変換サイズを選択できるとともに、HEVCに準拠して、直交変換サイズを選択できる。 According to this modification, the moving image coding apparatus can select an appropriate orthogonal transform size that can suppress image quality degradation and can also select an orthogonal transform size based on HEVC, as in the above-described embodiment. .
図8は、上記の実施形態またはその変形例による動画像符号化装置の各部の機能を実現するコンピュータプログラムが動作することにより、動画像符号化装置として動作するコンピュータの構成図である。 FIG. 8 is a configuration diagram of a computer that operates as a moving image encoding apparatus when a computer program that realizes the functions of the respective units of the moving image encoding apparatus according to the above-described embodiment or its modification is operated.
コンピュータ100は、ユーザインターフェース部101と、通信インターフェース部102と、記憶部103と、記憶媒体アクセス装置104と、プロセッサ105とを有する。プロセッサ105は、ユーザインターフェース部101、通信インターフェース部102、記憶部103及び記憶媒体アクセス装置104と、例えば、バスを介して接続される。
The
ユーザインターフェース部101は、例えば、キーボードとマウスなどの入力装置と、液晶ディスプレイといった表示装置とを有する。または、ユーザインターフェース部101は、タッチパネルディスプレイといった、入力装置と表示装置とが一体化された装置を有してもよい。そしてユーザインターフェース部101は、例えば、ユーザの操作に応じて、符号化する動画像データを選択する操作信号をプロセッサ105へ出力する。
The
通信インターフェース部102は、コンピュータ100を、動画像データを生成する装置、例えば、ビデオカメラと接続するための通信インターフェース及びその制御回路を有してもよい。そのような通信インターフェースは、例えば、Universal Serial Bus(ユニバーサル・シリアル・バス、USB)とすることができる。
The
さらに、通信インターフェース部102は、イーサネット(登録商標)などの通信規格に従った通信ネットワークに接続するための通信インターフェース及びその制御回路を有してもよい。
Furthermore, the
この場合には、通信インターフェース部102は、通信ネットワークに接続された他の機器から、符号化する動画像データを取得し、それらのデータをプロセッサ105へ渡す。また通信インターフェース部102は、プロセッサ105から受け取った、符号化動画像データを通信ネットワークを介して他の機器へ出力してもよい。
In this case, the
記憶部103は、例えば、読み書き可能な半導体メモリと読み出し専用の半導体メモリとを有する。そして記憶部103は、プロセッサ105上で実行される、動画像符号化処理を実行するためのコンピュータプログラム、及びこれらの処理の途中または結果として生成されるデータを記憶する。
The
記憶媒体アクセス装置104は、例えば、磁気ディスク、半導体メモリカード及び光記憶媒体といった記憶媒体106にアクセスする装置である。記憶媒体アクセス装置104は、例えば、記憶媒体106に記憶されたプロセッサ105上で実行される、動画像符号化処理用のコンピュータプログラムを読み込み、プロセッサ105に渡す。
The storage
プロセッサ105は、上記の実施形態または変形例による動画像符号化処理用コンピュータプログラムを実行することにより、符号化動画像データを生成する。そしてプロセッサ105は、生成された符号化動画像データを記憶部103に保存し、または通信インターフェース部102を介して他の機器へ出力する。
The
なお、動画像符号化装置1の各部の機能をプロセッサ上で実行可能なコンピュータプログラムは、コンピュータによって読み取り可能な媒体に記録された形で提供されてもよい。ただし、そのような記憶媒体には、搬送波は含まれない。
Note that the computer program capable of executing the functions of the respective units of the moving
ここに挙げられた全ての例及び特定の用語は、読者が、本発明及び当該技術の促進に対する本発明者により寄与された概念を理解することを助ける、教示的な目的において意図されたものであり、本発明の優位性及び劣等性を示すことに関する、本明細書の如何なる例の構成、そのような特定の挙げられた例及び条件に限定しないように解釈されるべきものである。本発明の実施形態は詳細に説明されているが、本発明の精神及び範囲から外れることなく、様々な変更、置換及び修正をこれに加えることが可能であることを理解されたい。 All examples and specific terms listed herein are intended for instructional purposes to help the reader understand the concepts contributed by the inventor to the present invention and the promotion of the technology. It should be construed that it is not limited to the construction of any example herein, such specific examples and conditions, with respect to showing the superiority and inferiority of the present invention. Although embodiments of the present invention have been described in detail, it should be understood that various changes, substitutions and modifications can be made thereto without departing from the spirit and scope of the present invention.
1 動画像符号化装置
10 分割部
11 複雑度算出部
12 予測ブロック生成部
13 サイズモード選択部
14 符号化部
15 予測誤差算出部
16 直交変換部
17 量子化部
18 復号部
19 記憶部
20 可変長符号化部
100 コンピュータ
101 ユーザインターフェース部
102 通信インターフェース部
103 記憶部
104 記憶媒体アクセス装置
105 プロセッサ
106 記憶媒体
DESCRIPTION OF
Claims (8)
前記ピクチャを複数のブロックに分割する分割部と、
前記複数のブロックのうちの符号化対象ブロックに写っているシーンの複雑さを表す複雑度を算出する複雑度算出部と、
前記符号化対象ブロックを含む符号化対象ピクチャ、または、前記符号化対象ピクチャよりも前に符号化されたピクチャから前記符号化対象ブロックの予測ブロックを生成する予測ブロック生成部と、
互いに異なる複数の直交変換サイズのそれぞれについて、前記符号化対象ブロックを当該直交変換サイズを持つサブブロック単位で直交変換したときの符号量を表す評価値を、前記複雑度が低いほど、小さい前記直交変換サイズほど該評価値が小さくなるように重み付けして算出し、当該評価値が最小となる直交変換サイズを選択するサイズ選択部と、
前記符号化対象ブロックと前記予測ブロック間の予測誤差画像を前記選択された直交変換サイズを持つサブブロック単位で直交変換して得られる直交変換係数を符号化する符号化部と、
を有する動画像符号化装置。 A moving image encoding apparatus for encoding a picture included in moving image data,
A dividing unit for dividing the picture into a plurality of blocks;
A complexity calculator that calculates the complexity representing the complexity of the scene shown in the encoding target block of the plurality of blocks;
A prediction block generation unit that generates a prediction block of the encoding target block from an encoding target picture including the encoding target block, or a picture encoded before the encoding target picture;
For each of a plurality of different orthogonal transform sizes, the evaluation value indicating the code amount when the encoding target block is orthogonally transformed in units of sub-blocks having the orthogonal transform size is reduced as the complexity decreases. A size selection unit that calculates weighted so that the evaluation value becomes smaller as the transform size, and selects an orthogonal transform size that minimizes the evaluation value;
An encoding unit that encodes an orthogonal transform coefficient obtained by orthogonal transform of a prediction error image between the encoding target block and the prediction block in units of sub-blocks having the selected orthogonal transform size;
A moving picture encoding apparatus having:
前記サイズ選択部は、前記複雑度が低いほど小さくなる重み係数で、前記第1の項に重み付けして前記評価値を算出する、請求項1に記載の動画像符号化装置。 The evaluation value includes a first term that increases as the orthogonal transform size decreases.
The moving image encoding apparatus according to claim 1, wherein the size selection unit calculates the evaluation value by weighting the first term with a weighting factor that decreases as the complexity decreases.
前記複雑度算出部は、前記符号化対象ブロックを前記直交変換サイズを持つサブブロックで分割したときの当該サブブロックごとに前記複雑度を算出し、
前記サイズ選択部は、前記サブブロックごとに、当該サブブロックについて算出された複雑度が低いほど大きくなる重み係数で前記第2の項に重み付けして前記評価値を算出する、請求項1に記載の動画像符号化装置。 The evaluation value includes a second term representing a code amount for each subblock when the encoding target block is divided into subblocks having the orthogonal transform size,
The complexity calculation unit calculates the complexity for each sub-block when the encoding target block is divided into sub-blocks having the orthogonal transform size;
The size selection unit calculates the evaluation value by weighting the second term with a weighting factor that increases as the complexity calculated for the subblock decreases for each subblock. Video encoding device.
一方、前記第1の評価値よりも、前記第2の評価値の方が小さい場合、前記複雑度算出部に前記4個の前記第1のサブブロックを前記符号化対象ブロックとして前記複雑度を算出させ、かつ、前記4個の前記第1のサブブロックのそれぞれを前記符号化対象ブロックとして、前記第1の評価値及び前記第2の評価値を算出し、当該第1の評価値と当該第2の評価値の比較結果に応じて前記直交変換サイズを選択する、請求項1〜5の何れか一項に記載の動画像符号化装置。 The size selection unit includes a first evaluation value that is the evaluation value when the size of the encoding target block is the orthogonal transform size, the encoding target block into four first sub-blocks, etc. The second evaluation value, which is the evaluation value when the size of the first sub-block when divided is the orthogonal transform size, is calculated, and the first evaluation value is the second evaluation value. When smaller than the evaluation value, the size of the encoding target block is selected as the orthogonal transform size,
On the other hand, when the second evaluation value is smaller than the first evaluation value, the complexity calculation unit sets the four first sub-blocks as the encoding target blocks to the complexity calculation unit. And calculating each of the four first sub-blocks as the coding target block, calculating the first evaluation value and the second evaluation value, and calculating the first evaluation value and the second evaluation value. The moving image encoding apparatus according to claim 1, wherein the orthogonal transform size is selected according to a comparison result of second evaluation values.
前記ピクチャを複数のブロックに分割し、
前記複数のブロックのうちの符号化対象ブロックに写っているシーンの複雑さを表す複雑度を算出し、
前記符号化対象ブロックを含む符号化対象ピクチャ、または、前記符号化対象ピクチャよりも前に符号化されたピクチャから前記符号化対象ブロックの予測ブロックを生成し、
互いに異なる複数の直交変換サイズのそれぞれについて、前記符号化対象ブロックを当該直交変換サイズを持つサブブロック単位で直交変換したときの符号量を表す評価値を、前記複雑度が低いほど、小さい前記直交変換サイズほど該評価値が小さくなるように重み付けして算出し、当該評価値が最小となる直交変換サイズを選択し、
前記符号化対象ブロックと前記予測ブロック間の予測誤差画像を前記選択された直交変換サイズを持つサブブロック単位で直交変換して得られる直交変換係数を符号化する、
ことを含む動画像符号化方法。 A moving image encoding apparatus for encoding a picture included in moving image data,
Dividing the picture into a plurality of blocks;
Calculating the complexity representing the complexity of the scene shown in the encoding target block of the plurality of blocks;
Generating a prediction block of the encoding target block from an encoding target picture including the encoding target block or a picture encoded before the encoding target picture;
For each of a plurality of different orthogonal transform sizes, the evaluation value indicating the code amount when the encoding target block is orthogonally transformed in units of sub-blocks having the orthogonal transform size is reduced as the complexity decreases. Calculate by weighting so that the evaluation value becomes smaller as the transform size, select the orthogonal transform size that minimizes the evaluation value,
Encoding an orthogonal transform coefficient obtained by orthogonally transforming a prediction error image between the encoding target block and the prediction block in units of subblocks having the selected orthogonal transform size;
A moving picture encoding method including the above.
前記ピクチャを複数のブロックに分割し、
前記複数のブロックのうちの符号化対象ブロックに写っているシーンの複雑さを表す複雑度を算出し、
前記符号化対象ブロックを含む符号化対象ピクチャ、または、前記符号化対象ピクチャよりも前に符号化されたピクチャから前記符号化対象ブロックの予測ブロックを生成し、
互いに異なる複数の直交変換サイズのそれぞれについて、前記符号化対象ブロックを当該直交変換サイズを持つサブブロック単位で直交変換したときの符号量を表す評価値を、前記複雑度が低いほど、小さい前記直交変換サイズほど該評価値が小さくなるように重み付けして算出し、当該評価値が最小となる直交変換サイズを選択し、
前記符号化対象ブロックと前記予測ブロック間の予測誤差画像を前記選択された直交変換サイズを持つサブブロック単位で直交変換して得られる直交変換係数を符号化する、
ことをコンピュータに実行させるためのコンピュータプログラム。 A moving image encoding computer program for encoding a picture included in moving image data,
Dividing the picture into a plurality of blocks;
Calculating the complexity representing the complexity of the scene shown in the encoding target block of the plurality of blocks;
Generating a prediction block of the encoding target block from an encoding target picture including the encoding target block or a picture encoded before the encoding target picture;
For each of a plurality of different orthogonal transform sizes, the evaluation value indicating the code amount when the encoding target block is orthogonally transformed in units of sub-blocks having the orthogonal transform size is reduced as the complexity decreases. Calculate by weighting so that the evaluation value becomes smaller as the transform size, select the orthogonal transform size that minimizes the evaluation value,
Encoding an orthogonal transform coefficient obtained by orthogonally transforming a prediction error image between the encoding target block and the prediction block in units of subblocks having the selected orthogonal transform size;
A computer program that causes a computer to execute the operation.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014090381A JP6248783B2 (en) | 2014-04-24 | 2014-04-24 | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014090381A JP6248783B2 (en) | 2014-04-24 | 2014-04-24 | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2015211269A true JP2015211269A (en) | 2015-11-24 |
| JP6248783B2 JP6248783B2 (en) | 2017-12-20 |
Family
ID=54613188
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2014090381A Expired - Fee Related JP6248783B2 (en) | 2014-04-24 | 2014-04-24 | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6248783B2 (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2016213615A (en) * | 2015-05-01 | 2016-12-15 | 富士通株式会社 | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program |
| JP2018186456A (en) * | 2017-04-27 | 2018-11-22 | キヤノン株式会社 | Image coding apparatus, image coding method, and program |
| CN112245893A (en) * | 2020-11-05 | 2021-01-22 | 上海理工大学 | Method and device for measuring rotation speed of table tennis |
| CN116320416A (en) * | 2016-11-21 | 2023-06-23 | 松下电器(美国)知识产权公司 | Image encoding method, image decoding method, and computer-readable medium |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2010150486A1 (en) * | 2009-06-22 | 2010-12-29 | パナソニック株式会社 | Video coding method and video coding device |
| WO2011033853A1 (en) * | 2009-09-16 | 2011-03-24 | 株式会社日立製作所 | Moving image decoding method and moving image encoding method |
| WO2011102074A1 (en) * | 2010-02-19 | 2011-08-25 | パナソニック株式会社 | Image encoding method, image encoding device and imaging system |
| JP2012147290A (en) * | 2011-01-13 | 2012-08-02 | Canon Inc | Image coding apparatus, image coding method, program, image decoding apparatus, image decoding method, and program |
-
2014
- 2014-04-24 JP JP2014090381A patent/JP6248783B2/en not_active Expired - Fee Related
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2010150486A1 (en) * | 2009-06-22 | 2010-12-29 | パナソニック株式会社 | Video coding method and video coding device |
| WO2011033853A1 (en) * | 2009-09-16 | 2011-03-24 | 株式会社日立製作所 | Moving image decoding method and moving image encoding method |
| WO2011102074A1 (en) * | 2010-02-19 | 2011-08-25 | パナソニック株式会社 | Image encoding method, image encoding device and imaging system |
| JP2012147290A (en) * | 2011-01-13 | 2012-08-02 | Canon Inc | Image coding apparatus, image coding method, program, image decoding apparatus, image decoding method, and program |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2016213615A (en) * | 2015-05-01 | 2016-12-15 | 富士通株式会社 | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program |
| CN116320416A (en) * | 2016-11-21 | 2023-06-23 | 松下电器(美国)知识产权公司 | Image encoding method, image decoding method, and computer-readable medium |
| JP2018186456A (en) * | 2017-04-27 | 2018-11-22 | キヤノン株式会社 | Image coding apparatus, image coding method, and program |
| JP7027044B2 (en) | 2017-04-27 | 2022-03-01 | キヤノン株式会社 | Image coding device, image coding method and program |
| CN112245893A (en) * | 2020-11-05 | 2021-01-22 | 上海理工大学 | Method and device for measuring rotation speed of table tennis |
Also Published As
| Publication number | Publication date |
|---|---|
| JP6248783B2 (en) | 2017-12-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR102678522B1 (en) | Method for intra prediction and apparatus thereof | |
| KR101611437B1 (en) | Method and apparatus for encoding/decoding image by referencing to a plurality of frames | |
| JP6244864B2 (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program | |
| US20150350674A1 (en) | Method and apparatus for block encoding in video coding and decoding | |
| KR102669273B1 (en) | Methods and apparatus for video transform encoding/decoding | |
| CN107071458A (en) | Equipment for encoding motion pictures | |
| US10638155B2 (en) | Apparatus for video encoding, apparatus for video decoding, and non-transitory computer-readable storage medium | |
| JP2017069866A (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program | |
| JP6459761B2 (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program | |
| JP6248783B2 (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program | |
| JP6528635B2 (en) | Moving picture coding apparatus, moving picture coding method, and computer program for moving picture coding | |
| JP2019022120A (en) | Moving picture coding apparatus, moving picture coding method, moving picture coding computer program, moving picture decoding apparatus, moving picture decoding method, and moving picture decoding computer program | |
| US10015484B2 (en) | Adaptive scan device and method for scanning thereof | |
| US20150237345A1 (en) | Video coding device, video coding method, and video coding program | |
| JP2015211386A (en) | Dynamic image encoding device, dynamic image encoding method, and computer program for dynamic image encoding | |
| KR20220115971A (en) | Image encoding/decoding method, apparatus, and method of transmitting a bitstream for performing prediction based on the reset prediction mode type of a leaf node | |
| JP2017073602A (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program | |
| JP6435822B2 (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program | |
| JP7560995B2 (en) | Encoding device and program | |
| JP5622613B2 (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding program | |
| JP6323185B2 (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program | |
| HK1201395A1 (en) | Method for encoding and decoding images, encoding and decoding device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170110 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20171017 |
|
| 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: 20171024 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20171106 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6248783 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |