JP5748225B2 - Moving picture coding method, moving picture coding apparatus, and moving picture coding program - Google Patents
Moving picture coding method, moving picture coding apparatus, and moving picture coding program Download PDFInfo
- Publication number
- JP5748225B2 JP5748225B2 JP2012014357A JP2012014357A JP5748225B2 JP 5748225 B2 JP5748225 B2 JP 5748225B2 JP 2012014357 A JP2012014357 A JP 2012014357A JP 2012014357 A JP2012014357 A JP 2012014357A JP 5748225 B2 JP5748225 B2 JP 5748225B2
- Authority
- JP
- Japan
- Prior art keywords
- error
- encoding
- skip mode
- macroblock
- target macroblock
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
本発明は,映像符号化において,特にスキップマクロブロックの選択精度を向上させる動画像符号化方法,動画像符号化装置および動画像符号化プログラムに関するものである。 The present invention relates to a moving picture coding method, a moving picture coding apparatus, and a moving picture coding program for improving the selection accuracy of skip macroblocks in video coding.
従来,符号化する必要がある情報を有していないスキップ領域に属する小ブロックを精度よく検出することができるようにすることを目的として,特許文献1に記載されている技術がある。この従来技術では,複数の画素から構成される小ブロックごとに,前フレームとの予測誤差の総計を求め,第1の閾値と比較するとともに,小ブロック内の分散を求めて第2の閾値と比較し,前フレームとの予測誤差の総計が第1の閾値以下で,かつ分散が第2の閾値以下であるときに,小ブロックは背景領域に属すると判定する。このようにして判定した動きのない背景領域にスキップモード(発生符号量が最小で,かつ画面間予測モードの中で演算量が最小)を適用し,符号量の削減および演算の高速化を図っている。
Conventionally, there is a technique described in
図12に,従来のスキップ領域を検出する装置のブロック図を示す。予測誤差評価部30は,符号化対象のマクロブロックごとに,符号化済み画像メモリ34に格納された前フレームの符号化済みブロックとの予測誤差の総計を求め,第1の閾値と比較するとともに,マクロブロック内の分散を求めて第2の閾値と比較し,前記予測誤差の総計が第1の閾値以下で,かつ分散が第2の閾値以下であるときに,マクロブロックは背景領域に属すると判定する。そうでない場合には,マクロブロックはスキップ領域ではないと判定し,スキップモードOFF情報を符号化部32に通知する。
FIG. 12 shows a block diagram of a conventional apparatus for detecting a skip area. The prediction
マクロブロックが背景領域に属すると判定された場合,予測ベクトル評価部31は,動きベクトルメモリ33に格納された予測動きベクトル(または符号化対象マクロブロックの動きベクトル)が0かどうかを判定し,0でないならばスキップモードOFF情報を符号化部32に通知する。予測動きベクトルが0の場合,符号化対象マクロブロックをスキップ領域と判定し,スキップモードON情報を符号化部32に通知する。なお,予測動きベクトルとしては,例えば符号化対象マクロブロックの周辺の動きベクトルのメディアンを用いることが多い。
When it is determined that the macroblock belongs to the background area, the prediction
符号化部32は,スキップモードON情報が付加されたマクロブロックをスキップモードで符号化し,スキップモードOFF情報が付加されたマクロブロックについては,スキップモード以外の通常の画面間予測を用いた符号化を行う。符号化結果の動きベクトルは,以降の予測符号化で参照するために,動きベクトルメモリ33に格納され,符号化済みブロックの復号画像信号は,符号化済み画像メモリ34に格納される。
The
特許文献1に示されている従来技術では,
・手順1:符号化対象マクロブロックと真裏のブロックに対応する符号化済みブロックとの予測誤差を算出,
・手順2:予測誤差が閾値よりも小さければ背景領域とみなし,スキップモードを適用,することを行っている。
In the prior art disclosed in
・ Procedure 1: Calculate the prediction error between the encoding target macroblock and the encoded block corresponding to the true block,
Procedure 2: If the prediction error is smaller than the threshold value, it is regarded as a background area, and the skip mode is applied.
この従来技術では,符号化対象フレームと符号化済み参照フレームの予測誤差を評価に用いているため,予測誤差が閾値よりも小さければ,静止している可能性が高く,主観画質を損なわずにスキップモードが適用できると判断できる。しかし,実際には符号化済みのブロックは量子化を受けて歪んでいるため,低ビットレートの(量子化幅が大きい)場合には,
・主観的に静止しているが符号化歪によって予測誤差が大きくなっている,
・動きが発生して予測誤差が大きくなっている,
のどちらかを閾値で識別することが難しくなり,その結果,誤ったスキップモードの適用によって著しく主観画質が損なわれてしまう問題や,スキップモードが適用できる領域を取りこぼしてしまうことが起こるという問題がある。すなわち,以下のような問題がある。
In this conventional technique, the prediction error of the encoding target frame and the encoded reference frame is used for the evaluation. Therefore, if the prediction error is smaller than the threshold value, it is highly possible that the frame is stationary and the subjective image quality is not impaired. It can be determined that the skip mode can be applied. However, since the encoded block is actually distorted by quantization, in the case of a low bit rate (quantization width is large),
-Although it is subjectively stationary, the prediction error increases due to coding distortion.
・ Prediction error has increased due to movement,
As a result, it is difficult to identify either of them by the threshold value, and as a result, there is a problem that the subjective image quality is significantly impaired by applying the wrong skip mode, or that the area where the skip mode can be applied is missed. is there. That is, there are the following problems.
(1)閾値の設定によって,主観画質の損失やスキップ領域の取りこぼしが発生
動き領域を背景領域と誤検出し,スキップモードを選択してしまうと,主観画質に歪が生じ,主観画質を大幅に損ねてしまう。これを回避するためには,上記手順2の閾値を低く設定すれば解決できる。しかし一方で,背景領域に関しても符号化ノイズの影響を受けて誤差が大きくなる傾向があるので,閾値よりも誤差が高くなることでスキップマクロブロック適用外と判定され,その結果,最適なスキップ適用領域を取りこぼしてしまう。
(1) Loss of subjective image quality and skipped area skipping due to threshold setting If the motion area is mistakenly detected as the background area and the skip mode is selected, the subjective image quality will be distorted and the subjective image quality will be greatly increased. It will be damaged. In order to avoid this, the problem can be solved by setting the threshold value in the
(2)分散の高い背景ブロック,分散の低い背景ブロック,の双方に適切にスキップ領域を適用することができない。 (2) The skip area cannot be appropriately applied to both the background block with high variance and the background block with low variance.
一般的に背景領域であっても予測誤差の大きさはテクスチャによって様々で,分散の低い背景ブロックでは予測誤差が低く,分散の高いブロックでは予測誤差が高くなる傾向がある。よって,閾値一つでは分散の高い背景ブロックも低い背景ブロックも同時に適切に検出することはできない。すなわち,閾値を低く設定すれば分散の高い背景ブロックを取りこぼす。閾値を高く設定すれば分散の高い背景ブロックまでカバーできるが,動き領域までスキップ適用領域と誤検出してしまう可能性がある。 In general, even in the background region, the size of the prediction error varies depending on the texture. The background error with low variance tends to have a low prediction error, and the block with high variance tends to have a high prediction error. Therefore, with a single threshold, neither a highly dispersed background block nor a low background block can be detected properly at the same time. That is, if the threshold is set low, a highly dispersed background block is missed. If the threshold value is set high, it is possible to cover even highly dispersed background blocks, but there is a possibility that the motion area is erroneously detected as a skip application area.
したがって,以上の問題点を解決するような,一般の映像に対して,分散の高低によらず,視覚的に背景と考えられるブロックは漏らさずスキップモードを適用し,動きのある領域は通常の動き探索を行うアルゴリズムが必要とされる。 Therefore, skip mode is applied to general video that solves the above problems, regardless of the level of dispersion, and blocks that are visually considered to be background are not leaked. An algorithm that performs motion search is needed.
さらに,スキップモードは符号量の削減に加え,コーデックの高速化にも用いられるため,スキップモード適用領域の抽出アルゴリズム自体の演算負荷も低くなければならない。 Furthermore, since the skip mode is used for speeding up the codec in addition to reducing the code amount, the computation load of the skip mode application area extraction algorithm itself must be low.
本発明は,以上の課題を解決し,従来技術よりもスキップマクロブロックの選択精度を向上させ,同じ発生符号量の条件下では主観画質を向上させるとともに,演算量を削減させることを目的としている。 An object of the present invention is to solve the above-described problems, improve the accuracy of skip macroblock selection over the prior art, improve subjective image quality under the same generated code amount conditions, and reduce the amount of computation. .
本発明は,上記課題を解決するため,次のような方法によりスキップマクロブロックを選択して符号化する。 In order to solve the above problems, the present invention selects and encodes skip macroblocks by the following method.
[方法1]
(1)まず,符号化対象マクロブロックが双予測画像の場合に,該符号化対象マクロブロックのブロック画素値の総計と,テンポラル/空間ダイレクトモードにおける第1の符号化済み参照フレームに対応する原画フレームにおける前記符号化対象マクロブロックと同位置(真裏)のマクロブロックのブロック画素値の総計との差分絶対値ΔDCまたは第2の符号化済み参照フレームに対応する原画フレームにおける前記符号化対象マクロブロックと同位置のマクロブロックのブロック画素値の総計との差分絶対値ΔDCのうち,大きいほうの差分絶対値ΔDCを算出する。なお,各ブロックの画素値平均の差分絶対値をΔDCとしてもよい。
[Method 1]
(1) First, when the encoding target macroblock is a bi-predictive image, the total of the block pixel values of the encoding target macroblock and the original image corresponding to the first encoded reference frame in the temporal / spatial direct mode The difference macro value ΔDC with respect to the sum of the block pixel values of the macroblock at the same position (true back) as the encoding target macroblock in the frame or the encoding target macroblock in the original frame corresponding to the second encoded reference frame The larger difference absolute value ΔDC is calculated from the difference absolute value ΔDC with respect to the total of the block pixel values of the macroblocks at the same position . The difference absolute value of the average pixel value of each block may be ΔDC.
(2)差分絶対値ΔDCが所定の閾値Th1より大きい場合,スキップモードは選択しない。差分絶対値ΔDCが閾値Th1以下の場合,符号化対象マクロブロックと,テンポラル/空間ダイレクトモードにおける第1の符号化済み参照フレームにおける参照ブロックとの予測誤差(SAD:Sum of Absolute Difference)または第2の符号化済み参照フレームにおける参照ブロックとの予測誤差のうち,大きいほうの予測誤差を算出する。他の予測誤差,例えばSSD(Sum of Square Difference)などでもよい。 (2) When the difference absolute value ΔDC is larger than the predetermined threshold Th1, the skip mode is not selected. When the difference absolute value ΔDC is equal to or smaller than the threshold value Th1 , a prediction error (SAD: Sum of Absolute Difference) or second between the macro block to be encoded and the reference block in the first encoded reference frame in the temporal / spatial direct mode Among the prediction errors with the reference block in the encoded reference frame, the larger prediction error is calculated. Other prediction errors such as SSD (Sum of Square Difference) may be used.
(3)求めた予測誤差が所定の閾値Th2よりも小さく,かつ符号化対象マクロブロックの予測動きベクトル(PMV)または動きベクトルがゼロであれば,スキップモードを選択し,そうでない場合には,スキップモードを用いないで予測符号化を行う。なお,予測動きベクトルまたは動きベクトルは完全にゼロでなくてもよく,所定値以下であればゼロとみなすようにしてもよい。 (3) If the obtained prediction error is smaller than the predetermined threshold Th2 and the prediction motion vector (PMV) or the motion vector of the encoding target macroblock is zero, the skip mode is selected. Otherwise, Predictive coding is performed without using the skip mode. Note that the predicted motion vector or the motion vector may not be completely zero, and may be regarded as zero if it is equal to or less than a predetermined value.
[作用1]
上記方法1の作用は,以下のとおりである。
[Operation 1]
The operation of
方法1の発明では,新たに符号化対象フレームと符号化済み参照フレームに対応する原画フレームの誤差を導入し,予測誤差と組み合わせることで,スキップ適用領域を判別している。原画フレームは量子化歪を受けていないため,カメラからのノイズの影響を除けば,主観的に静止しているブロックは予測誤差が小さくなり,動き領域との識別が容易になる。さらに本技術では,ブロックの画素値平均の誤差に相当するΔDCを用いて原画の誤差を評価しているので,ノイズ成分の高い静止領域も抽出することが可能となる。
ただし,
・ΔDCだけでは動きと判定できない微小な動き領域,
・ΔDCが小さかったとしても符号化歪の影響で予測誤差の大きな領域,
が存在するので,それらの領域は予測誤差のSADを評価することで除外することが可能となる。両評価法を組み合わせることによって,従来技術よりも,スキップモード領域の誤検出が低減されるため,主観画質を向上させることができ,また,スキップモードの取りこぼしが防げることから,(原画誤差・予測誤差の演算量を含めても)コーデック全体の演算量を抑えることが可能となる。また,ΔDCで先に評価することによって,不要なSAD計算を回避することができるので,スキップモード選択アルゴリズム自体の低演算化も実現できる。
In the invention of the
However,
・ A small movement area that cannot be determined as movement only with ΔDC,
-Even if ΔDC is small, the region where the prediction error is large due to the effect of coding distortion,
Therefore, these regions can be excluded by evaluating the SAD of the prediction error. By combining both evaluation methods, the false detection of the skip mode area is reduced compared to the conventional technique, so that the subjective image quality can be improved and the skip mode can be prevented from being missed. It is possible to suppress the calculation amount of the entire codec (even if the error calculation amount is included). In addition, since the unnecessary SAD calculation can be avoided by performing the first evaluation using ΔDC, it is possible to reduce the calculation of the skip mode selection algorithm itself.
[方法2]
本発明は,さらに次のような方法により効果的に上記課題を解決することもできる。
[Method 2]
The present invention can also effectively solve the above problems by the following method.
(1)まず,符号化対象マクロブロックが双予測画像の場合に,該符号化対象マクロブロックのブロック画素値の総計と,テンポラル/空間ダイレクトモードにおける第1の符号化済み参照フレームに対応する原画フレームにおける前記符号化対象マクロブロックと同位置(真裏)のマクロブロックのブロック画素値の総計との差分絶対値ΔDCまたは第2の符号化済み参照フレームに対応する原画フレームにおける前記符号化対象マクロブロックと同位置のマクロブロックのブロック画素値の総計との差分絶対値ΔDCのうち,大きいほうの差分絶対値ΔDCを算出する。なお,各ブロックの画素値平均の差分絶対値をΔDCとしてもよい。 (1) First, when the encoding target macroblock is a bi-predictive image, the total of the block pixel values of the encoding target macroblock and the original image corresponding to the first encoded reference frame in the temporal / spatial direct mode The difference macro value ΔDC with respect to the sum of the block pixel values of the macroblock at the same position (true back) as the encoding target macroblock in the frame or the encoding target macroblock in the original frame corresponding to the second encoded reference frame The larger difference absolute value ΔDC is calculated from the difference absolute value ΔDC with respect to the total of the block pixel values of the macroblocks at the same position . The difference absolute value of the average pixel value of each block may be ΔDC.
(2)差分絶対値ΔDCが所定の閾値Th1より大きい場合,スキップモードは選択しない。差分絶対値ΔDCが閾値Th1以下の場合,符号化対象マクロブロックと,テンポラル/空間ダイレクトモードにおける第1の符号化済み参照フレームにおける参照ブロックとの予測誤差(SAD:Sum of Absolute Difference)または第2の符号化済み参照フレームにおける参照ブロックとの予測誤差のうち,大きいほうの予測誤差を算出する。他の予測誤差,例えばSSD(Sum of Square Difference)などでもよい。
(2) When the difference absolute value ΔDC is larger than the predetermined threshold Th1, the skip mode is not selected. When the difference absolute value ΔDC is equal to or smaller than the threshold value Th1 , a prediction error (SAD: Sum of Absolute Difference) or second between the macro block to be encoded and the reference block in the first encoded reference frame in the temporal / spatial direct mode Among the prediction errors with the reference block in the encoded reference frame, the larger prediction error is calculated. Other prediction errors such as SSD (Sum of Square Difference) may be used.
(3)符号化対象マクロブロックの画素値の分散を算出し,複数の閾値の中から,分散が大きければ大きな値を閾値Th2として選択し,分散が小さければ小さい値を閾値Th2として選択して設定する。ここで,分散は狭義の分散に限らず,いわゆるアクティビティのような広義の分散でもよい。アクティビティは,例えばブロックを4分割したときの個々の小ブロックの分散を求めた4つの値の最大値である。 (3) Calculate the variance of the pixel values of the encoding target macroblock, and select a large value as the threshold Th2 if the variance is large, and select a small value as the threshold Th2 if the variance is small. Set. Here, the distribution is not limited to the distribution in a narrow sense, but may be a distribution in a broad sense such as a so-called activity. The activity is, for example, the maximum value of four values obtained by determining the distribution of individual small blocks when the block is divided into four.
(4)上記(2)で求めた予測誤差が所定の閾値Th2よりも小さく,かつ符号化対象マクロブロックの予測動きベクトル(PMV)または動きベクトルがゼロであれば,スキップモードを選択し,そうでない場合には,スキップモードを用いないで予測符号化を行う。なお,予測動きベクトルまたは動きベクトルは完全にゼロでなくてもよく,所定値以下であればゼロとみなすようにしてもよい。 (4) If the prediction error obtained in (2) is smaller than the predetermined threshold Th2 and the predicted motion vector (PMV) or motion vector of the encoding target macroblock is zero, the skip mode is selected, and so on. Otherwise, predictive coding is performed without using the skip mode. Note that the predicted motion vector or the motion vector may not be completely zero, and may be regarded as zero if it is equal to or less than a predetermined value.
[作用2]
上記方法2の作用は,以下のとおりである。
[Action 2]
The operation of
符号化対象フレームと符号化済み参照フレームの誤差(予測誤差)を実際に計算していくと,主観的に静止している領域であっても分散の高いブロックでは予測誤差が大きく,分散の低いブロックでは予測誤差が小さくなる。 When the error (prediction error) between the encoding target frame and the encoded reference frame is actually calculated, the prediction error is large and the variance is low in a block with high variance even in a subjectively stationary region The prediction error is smaller in the block.
この現象を考慮するため,方法2の技術では,あらかじめ符号化対象フレームの分散を計算しておき,分散が大きいブロックでは高い閾値を,分散が小さいブロックでは低い閾値を設定する。分散が小さいブロックに対して低い閾値を設定することによって,動きが発生しているにも関わらず予測誤差の小さなブロックをスキップモードの対象から除外することが可能となる(誤検出の回避)。
In order to take this phenomenon into account, in the technique of
また,分散の高いブロックに対して,高い閾値を設定することによって,主観的に静止しているにも関わらず予測誤差の大きくなっているブロックをスキップモードの対象として抽出することができる(取りこぼしの低減)。よって,方法1の発明よりもさらにスキップモード対象領域の誤検出や取りこぼしが防げることから,さらなる主観画質の向上・コーデック全体の演算量の低減が実現できる。
In addition, by setting a high threshold for blocks with high variance, blocks with a large prediction error even though they are subjectively stationary can be extracted as skip mode targets. Reduction). Therefore, since the erroneous detection and missing of the skip mode target area can be prevented more than the
さらに本発明は,双予測ピクチャ(Bi-predictive Picture )に対しても同様に適用することができ,インタレース画像に対しても同様に適用することができる。 Furthermore, the present invention can be similarly applied to bi-predictive pictures, and can be similarly applied to interlaced images.
本発明は,従来技術として比較して,スキップマクロブロック選択精度向上に伴う,同発生符号量条件下での主観画質の向上,エンコーダ/デコーダの演算量の削減が可能になる。また,スキップマクロブロック選択領域抽出にかかる演算量の低減が可能になる。 Compared with the prior art, the present invention makes it possible to improve the subjective image quality under the same code amount condition and to reduce the calculation amount of the encoder / decoder with the improvement of skip macroblock selection accuracy. In addition, it is possible to reduce the amount of calculation required for skip macroblock selection area extraction.
以下,図面を用いながら,本発明の一実施形態について説明する。 Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
図1は,本発明が適用される動画像符号化装置の一構成例を示している。動画像符号化装置100において,本実施形態は,特にインター予測処理部102におけるスキップモード制御部1021の部分が従来技術と異なる部分であり,他の部分は,H.264/AVCなどのエンコーダとして用いられている従来の一般的な動画像符号化装置の構成と同様である。
FIG. 1 shows an example of the configuration of a moving picture encoding apparatus to which the present invention is applied. In the moving
動画像符号化装置100は,符号化対象の映像信号を入力し,入力映像信号のフレームをブロックに分割してブロックごとに符号化し,そのビットストリームを符号化ストリームとして出力する。この符号化のため,予測残差信号生成部103は,入力映像信号とイントラ予測処理部101あるいはインター予測処理部102の出力である予測信号との差分を求め,それを予測残差信号として出力する。変換処理部104は,予測残差信号に対して離散コサイン変換(DCT)等の直交変換を行い,変換係数を出力する。量子化処理部105は,変換係数を量子化し,その量子化された変換係数を出力する。エントロピー符号化処理部111は,量子化された変換係数をエントロピー符号化し,符号化ストリームとして出力する。
The
一方,量子化された変換係数は,逆量子化処理部106にも入力され,ここで逆量子化される。逆変換処理部107は,逆量子化処理部106の出力である変換係数を逆直交変換し,予測残差復号信号を出力する。
On the other hand, the quantized transform coefficient is also input to the inverse
復号信号生成部108では,この予測残差復号信号とイントラ予測処理部101あるいはインター予測処理部102の出力である予測信号とを加算し,符号化した符号化対象ブロックの復号信号を生成する。この復号信号は,イントラ予測処理部101あるいはインター予測処理部102において参照画像として用いるために,フレームメモリ109に格納される。なお,インター予測処理部102において参照する場合には,インループフィルタ処理部110において,フレームメモリ109に格納した画像を入力して,符号化歪を低減するフィルタリング処理を行い,このフィルタリング処理後の画像を参照画像として用いる。
The decoded
イントラ予測処理部101において設定された予測モード等の情報は,エントロピー符号化処理部111においてエントロピー符号化され,符号化ストリームとして出力される。
Information such as the prediction mode set in the intra
インター予測処理部102において設定された動きベクトル等の情報も,エントロピー符号化処理部111においてエントロピー符号化され,符号化ストリームとして出力される。
Information such as a motion vector set in the inter
スキップモード制御部1021は,符号化対象ブロックが符号化する必要がある情報を有しているかどうかを判定し,符号化する必要がないと判定されたブロックについて,発生符号量が最小で,かつ画面間予測モードの中で演算量が最小のスキップモードを適用する制御を行う。
The skip
以下,本実施形態におけるスキップモード制御部1021の実現手法について,詳細に説明する。
Hereinafter, a method for realizing the skip
[実施例1]
図2は,スキップモード制御部1021の部分の実施例1の構成例を示している。図2において,主にマクロブロック誤差計算部10から予測ベクトル評価部13までの部分が図1のスキップモード制御部1021に相当し,符号化部14がスキップモード制御部1021以外のインター予測処理部102やエントロピー符号化処理部111等の部分に相当する。符号化済み画像メモリ15,動きベクトルメモリ16は,フレームメモリ109等に相当する。
[Example 1]
FIG. 2 shows a configuration example of the first embodiment of the skip
マクロブロック誤差計算部10は,符号化対象マクロブロックと,符号化済み参照フレームに対応する原画フレームにおける符号化対象マクロブロックと同位置(真裏)のマクロブロックとのブロック画素値の総計の差分絶対値ΔDCを算出する。
マクロブロック誤差評価部11は,差分絶対値ΔDCが所定の閾値Th1より大きいかどうかを比較し,差分絶対値ΔDCが所定の閾値Th1より大きい場合,スキップモードOFF情報を符号化部14に通知する。差分絶対値ΔDCが閾値Th1以下の場合,その旨の評価結果を予測誤差評価部12に通知する。
The macroblock
予測誤差評価部12は,符号化対象マクロブロックと符号化済み画像メモリ15に格納されている符号化済み参照フレームの参照符号化済みブロックとの予測誤差(SAD)を算出して所定の閾値Th2と比較する。予測誤差が閾値Th2より大きい場合,スキップモードOFF情報を符号化部14に通知する。予測誤差が閾値Th2以下の場合,その旨の評価結果を,予測ベクトル評価部13に通知する。
The prediction
予測ベクトル評価部13は,動きベクトルメモリ16に格納された予測動きベクトル(PMV)が0かどうかを判定し,0でないならばスキップモードOFF情報を符号化部14に通知する。予測動きベクトルが0の場合,符号化対象マクロブロックをスキップ領域と判定し,スキップモードON情報を符号化部14に通知する。
The predicted
符号化部14は,スキップモードON情報が付加されたマクロブロックをスキップモードで符号化し,スキップモードOFF情報が付加されたマクロブロックについては,スキップモード以外の通常の画面間予測を用いた符号化を行う。符号化結果の動きベクトルは,以降の予測符号化で参照するために,動きベクトルメモリ16に格納され,符号化済みブロックの復号画像信号は,符号化済み画像メモリ15に格納される。
The
図3は,実施例1のフローチャートである。 FIG. 3 is a flowchart of the first embodiment.
まず,ステップS101では,符号化対象原画フレームの符号化対象マクロブロックと,直前原画フレームのブロックの誤差ΔDCを計算し,所定の閾値Th1と比較する。誤差ΔDCとしては,例えば次のようなブロック輝度値の総計の差分絶対値を算出する。 First, in step S101, an error ΔDC between the encoding target macroblock of the encoding target original image frame and the block of the immediately preceding original image frame is calculated and compared with a predetermined threshold Th1. As the error ΔDC, for example, the following absolute difference value of the sum of block luminance values is calculated.
ΔDC=|Σj Σi Fm,n (N) (i,j)−Σj Σi Fm,n (N-1) (i,j)|
ここで,Fm,n (N) (i,j)は,符号化対象原画フレームである第Nフレームの(m,n)の位置のブロックにおける(i,j)番目の画素値,Fm,n (N-1) (i,j)は,その直前原画フレームにおける(m,n)の位置のブロックにおける(i,j)番目の画素の輝度値である。また,ブロックサイズが16×16画素である場合に,Σj は,j=0からj=15までの総和,Σi は,i=0からi=15までの総和を表している。なお,誤差ΔDCとして,ブロックの画素値の平均の誤差を用いても実質的に同等である。
ΔDC = | Σ j Σ i F m, n (N) (i, j) −Σ j Σ i F m, n (N−1) (i, j) |
Here, F m, n (N) (i, j) is the (i, j) -th pixel value in the block at the (m, n) position of the Nth frame which is the original picture frame to be encoded, F m , n (N−1) (i, j) is the luminance value of the (i, j) -th pixel in the block at the position (m, n) in the immediately preceding original image frame. Further, when the block size is 16 × 16 pixels, Σ j represents the sum from j = 0 to j = 15, and Σ i represents the sum from i = 0 to i = 15. Note that the error ΔDC is substantially equivalent even if an average error of the pixel values of the block is used.
次に,ステップS102では,ステップS101で算出した誤差ΔDCが所定の閾値Th1よりも大きいかどうかを判定し,大きい場合にはステップS106へ進む。小さければステップS103へ進む。 Next, in step S102, it is determined whether or not the error ΔDC calculated in step S101 is larger than a predetermined threshold value Th1, and if larger, the process proceeds to step S106. If it is smaller, the process proceeds to step S103.
ステップS103では,符号化対象マクロブロックと直前の符号化済み参照フレームの真裏のブロックとの予測誤差(SAD)を計算し,予測誤差が所定の閾値Th2よりも大きいかどうかを判定する。大きい場合にはステップS106へ進み,小さければステップS104へ進む。 In step S103, a prediction error (SAD) between the encoding target macroblock and the block directly behind the previous encoded reference frame is calculated, and it is determined whether the prediction error is larger than a predetermined threshold Th2. If larger, the process proceeds to step S106, and if smaller, the process proceeds to step S104.
ステップS104では,予測動きベクトル(PMV)を,符号化対象マクロブロックの周辺の符号化済みブロックの動きベクトルから求め,予測動きベクトルがゼロかどうかを判定する。ゼロでない場合にはステップS106へ進み,ゼロであればステップS105へ進む。 In step S104, a predicted motion vector (PMV) is obtained from motion vectors of encoded blocks around the encoding target macroblock, and it is determined whether or not the predicted motion vector is zero. If it is not zero, the process proceeds to step S106, and if it is zero, the process proceeds to step S105.
ステップS105では,符号化対象マクロブロックをスキップマクロブロックとし,スキップモードを選択して符号化する。一方,ステップS106では,符号化対象マクロブロックについてスキップマクロブロックを選択しないで,動き探索を用いた予測符号化を行う。 In step S105, the encoding target macroblock is set as a skip macroblock, and the skip mode is selected for encoding. On the other hand, in step S106, prediction encoding using motion search is performed without selecting a skip macroblock for the encoding target macroblock.
[実施例2]
実施例2は,実施例1の方法をさらに改良した方法である。図4は,実施例1と実施例2の違いを説明する図である。
[Example 2]
The second embodiment is a method obtained by further improving the method of the first embodiment. FIG. 4 is a diagram for explaining the difference between the first embodiment and the second embodiment.
符号化対象フレームと符号化済み参照フレームの予測誤差を実際に計算していくと,主観的に静止している領域であっても分散の高いブロックでは予測誤差が大きく,分散の低いブロックでは予測誤差が小さくなる。 When the prediction error between the encoding target frame and the encoded reference frame is actually calculated, the prediction error is large in the block with high variance even in the subjectively stationary region, and the prediction error is in the block with low variance. The error is reduced.
実施例1(方法1)は,図4(A)に示すように,予測誤差と比較する閾値Th2として,分散の大きさによらずに一定の値を用いる。予測誤差の評価では,予測誤差がこの閾値Th2より小さいブロックを静止領域,大きいブロックを動領域と判定するが,この場合,分散の低い部分で動領域を静止領域と判定してしまう誤検出や,分散の高い部分で静止領域を動領域と判定しまう取りこぼしが生じることがある。 In the first embodiment (method 1), as shown in FIG. 4A, a constant value is used as the threshold Th2 to be compared with the prediction error regardless of the magnitude of the variance. In the evaluation of the prediction error, a block having a prediction error smaller than the threshold Th2 is determined as a static region, and a block having a large error is determined as a moving region. , There may be a case where the stationary region is determined as a moving region in a highly dispersed portion.
これに対し,実施例2(方法2)では,図4(B)に示すように,分散が大きい場合には大きい閾値Th2を用い,分散が小さい場合には小さい閾値Th2を用いるというように,分散の大きさによって閾値Th2を切り替える。これにより,動領域と静止領域の切り分けの精度を向上させ,スキップモード対象領域の誤検出および取りこぼしを,より低減させることができる。 On the other hand, in the second embodiment (method 2), as shown in FIG. 4B, a large threshold Th2 is used when the variance is large, and a small threshold Th2 is used when the variance is small. The threshold value Th2 is switched depending on the size of the variance. As a result, it is possible to improve the accuracy of separation between the moving area and the stationary area, and to further reduce erroneous detection and missing of the skip mode target area.
図5は,スキップモード制御部1021の部分の実施例2の構成例を示している。図5において,マクロブロック誤差計算部20,マクロブロック誤差評価部21,予測誤差評価部22,予測ベクトル評価部23,符号化部24,動きベクトルメモリ25,符号化済み画像メモリ26の構成は,図2で説明したものとほぼ同様である。
FIG. 5 shows a configuration example of the second embodiment of the skip
実施例2の場合,さらにマクロブロック分散計算部27と,マクロブロック分散評価部28とが設けられている。マクロブロック分散計算部27は,符号化対象マクロブロックの画素値の分散(アクティビティでもよい)を計算し,その値をマクロブロック分散評価部28に通知する。マクロブロック分散評価部28は,大きさの異なる複数の閾値の中から分散の大きさに応じて,分散が大きい場合には大きい値を閾値Th2として選択し,分散が小さい場合には小さい値を閾値Th2として選択する。この閾値Th2を予測誤差評価部22に伝える。予測誤差評価部22では,マクロブロック分散評価部28によって設定された閾値Th2を用いて,予測誤差を評価する。
In the case of the second embodiment, a macroblock
図6は,実施例2のフローチャートである。 FIG. 6 is a flowchart of the second embodiment.
まず,ステップS201では,符号化対象原画フレームの符号化対象マクロブロックと,直前原画フレームのブロックの誤差ΔDCを計算し,所定の閾値Th1と比較する。 First, in step S201, an error ΔDC between the encoding target macroblock of the encoding target original image frame and the block of the immediately preceding original image frame is calculated and compared with a predetermined threshold Th1.
次に,ステップS202では,ステップS201で算出した誤差ΔDCが所定の閾値Th1よりも大きいかどうかを判定し,大きい場合にはステップS210へ進む。小さければステップS203へ進む。 Next, in step S202, it is determined whether or not the error ΔDC calculated in step S201 is larger than a predetermined threshold Th1, and if it is larger, the process proceeds to step S210. If it is smaller, the process proceeds to step S203.
ステップS203では,符号化対象マクロブロックの輝度値の分散Varを計算し,ステップS204では,算出した分散Varが所定の閾値Th5より小さいかどうかを判定する。 In step S203, a variance Var of luminance values of the encoding target macroblock is calculated. In step S204, it is determined whether or not the calculated variance Var is smaller than a predetermined threshold Th5.
分散Varのほうが小さい場合,ステップS205において閾値Th2を小さい所定値Th3に設定する。大きい場合,ステップS206において閾値Th2を大きい所定値Th4に設定する。なお,Th3<Th4である。ここでは,閾値Th2を,大きさの異なる2種類の値Th3,Th4の中から選択する例を説明したが,分散Varの大きさに応じて3種類以上の値から選択するようにしてもよい。 If the variance Var is smaller, the threshold value Th2 is set to a smaller predetermined value Th3 in step S205. If larger, the threshold Th2 is set to a larger predetermined value Th4 in step S206. Note that Th3 <Th4. Here, an example in which the threshold Th2 is selected from two types of values Th3 and Th4 having different sizes has been described. However, the threshold Th2 may be selected from three or more types according to the size of the variance Var. .
ステップS207では,符号化対象マクロブロックと直前の符号化済み参照フレームの真裏のブロックとの予測誤差(SAD)を計算し,予測誤差が所定の閾値Th2よりも大きいかどうかを判定する。大きい場合にはステップS210へ進み,小さければステップS208へ進む。 In step S207, a prediction error (SAD) between the encoding target macroblock and the block immediately behind the previous encoded reference frame is calculated, and it is determined whether or not the prediction error is larger than a predetermined threshold Th2. If larger, the process proceeds to step S210, and if smaller, the process proceeds to step S208.
ステップS208では,予測動きベクトル(PMV)を,符号化対象マクロブロックの周辺の符号化済みブロックの動きベクトルから求め,予測動きベクトルがゼロかどうかを判定する。ゼロでない場合にはステップS209へ進み,ゼロであればステップS210へ進む。 In step S208, a predicted motion vector (PMV) is obtained from the motion vectors of the encoded blocks around the encoding target macroblock, and it is determined whether the predicted motion vector is zero. If it is not zero, the process proceeds to step S209, and if it is zero, the process proceeds to step S210.
ステップS209では,符号化対象マクロブロックをスキップマクロブロックとし,スキップモードを選択して符号化する。一方,ステップS210では,符号化対象マクロブロックについてスキップマクロブロックを選択しないで,動き探索を用いた予測符号化を行う。 In step S209, the encoding target macroblock is set as a skip macroblock, and the skip mode is selected and encoded. On the other hand, in step S210, predictive encoding using motion search is performed without selecting a skip macroblock for the encoding target macroblock.
[実施例3]
実施例3は,符号化対象フレームがBピクチャの場合の例である。基本的な構成は,図2に示した構成例と同様である。図7は,実施例3を説明するための図,図8は,実施例3のフローチャートである。
[Example 3]
The third embodiment is an example in which the encoding target frame is a B picture. The basic configuration is the same as the configuration example shown in FIG. FIG. 7 is a diagram for explaining the third embodiment, and FIG. 8 is a flowchart of the third embodiment.
符号化対象フレームがBピクチャ(Bi-predictive Picture )の場合,参照フレームは,図7のようにL0参照インデックスで指し示される符号化済みフレームと,L1参照インデックスで指し示される符号化済みフレームの複数となる。したがって,参照フレームに対応する原画フレームも,L0参照インデックスに対応する原画フレームと,L1参照インデックスに対応する原画フレームというように複数存在することになる。 When the encoding target frame is a B-picture (Bi-predictive picture), the reference frame includes an encoded frame indicated by the L0 reference index and an encoded frame indicated by the L1 reference index as shown in FIG. Multiple. Accordingly, there are a plurality of original picture frames corresponding to the reference frame, such as an original picture frame corresponding to the L0 reference index and an original picture frame corresponding to the L1 reference index.
したがって,符号化済み参照フレームに対応する原画フレームにおける符号化対象マクロブロックと同位置(真裏)のマクロブロックとのブロック画素値の総計の差分絶対値ΔDCも,L0参照インデックスに対応する原画フレームに対するΔDC1と,L1参照インデックスに対応する原画フレームに対するΔDC2の複数があることになる。実施例3では,閾値Th1と比較する誤差として,例えばΔDC1とΔDC2のうち大きいほうを用いるものとする。なお,平均値を用いるようにしてもよい。 Therefore, the total difference absolute value ΔDC of the block pixel values of the macroblock at the same position (true back) in the original picture frame corresponding to the encoded reference frame is also the same as that of the original picture frame corresponding to the L0 reference index. There are a plurality of ΔDC1 and ΔDC2 for the original image frame corresponding to the L1 reference index. In the third embodiment, for example, the larger one of ΔDC1 and ΔDC2 is used as the error compared with the threshold Th1. An average value may be used.
図8に示すフローチャートに従って,処理の流れを説明する。 The flow of processing will be described according to the flowchart shown in FIG.
まず,ステップS301では,テンポラル/空間ダイレクトモードにおけるL0参照インデックス,L1参照インデックスを求め,符号化対象原画フレームの符号化対象マクロブロックと,L0参照インデックスに対応する原画フレームの真裏ブロックとの誤差ΔDC1(ブロック輝度値の総計の差分絶対値)を算出し,また,符号化対象原画フレームの符号化対象マクロブロックと,L1参照インデックスに対応する原画フレームの真裏ブロックとの誤差ΔDC2を算出する。 First, in step S301, the L0 reference index and the L1 reference index in the temporal / spatial direct mode are obtained, and the error ΔDC1 between the encoding target macroblock of the encoding target original image frame and the original block of the original image frame corresponding to the L0 reference index. (A difference absolute value of the sum of the block luminance values) is calculated, and an error ΔDC2 between the encoding target macroblock of the encoding target original image frame and the true back block of the original image frame corresponding to the L1 reference index is calculated.
次に,ステップS302では,ステップS301で算出した誤差ΔDC1とΔDC2のうち大きいほうの誤差が所定の閾値Th1よりも大きいかどうかを判定し,大きい場合にはステップS306へ進む。小さければステップS303へ進む。 Next, in step S302, it is determined whether the larger error of the errors ΔDC1 and ΔDC2 calculated in step S301 is larger than a predetermined threshold value Th1, and if larger, the process proceeds to step S306. If it is smaller, the process proceeds to step S303.
ステップS303では,符号化対象マクロブロックと,L0参照インデックスの符号化済み参照フレームの真裏ブロックとの予測誤差SAD1を計算するとともに,L1参照インデックスの符号化済み参照フレームの真裏ブロックとの予測誤差SAD2を計算する。この予測誤差SAD1とSAD2の大きいほうと,所定の閾値Th2とを比較し,予測誤差のほうが大きい場合にはステップS306へ進み,小さければステップS304へ進む。 In step S303, the prediction error SAD1 between the encoding target macroblock and the true back block of the encoded reference frame of the L0 reference index is calculated, and the prediction error SAD2 of the true reference block of the encoded reference frame of the L1 reference index is calculated. Calculate The larger one of the prediction errors SAD1 and SAD2 is compared with a predetermined threshold Th2. If the prediction error is larger, the process proceeds to step S306, and if smaller, the process proceeds to step S304.
ステップS304では,ダイレクトベクトルがゼロかどうかを判定する。ゼロでない場合にはステップS306へ進み,ゼロであればステップS305へ進む。 In step S304, it is determined whether the direct vector is zero. If it is not zero, the process proceeds to step S306, and if it is zero, the process proceeds to step S305.
ステップS305では,符号化対象マクロブロックをスキップマクロブロックとし,スキップモードを選択して符号化する。一方,ステップS306では,符号化対象マクロブロックについてスキップマクロブロックを選択しないで,動き探索を用いた予測符号化を行う。 In step S305, the encoding target macroblock is set as a skip macroblock, and the skip mode is selected for encoding. On the other hand, in step S306, prediction encoding using motion search is performed without selecting a skip macroblock for the encoding target macroblock.
[実施例4]
実施例4は,実施例3と同様なBピクチャ(Bi-predictive Picture )の場合の符号化において,ステップS303の判定で用いる閾値Th2として,実施例2と同様に,符号化対象ブロックの画素値の分散が大きい場合には大きい値を,小さい場合には小さい値を設定する例である。
[Example 4]
In the fourth embodiment, in the encoding in the case of a B picture (Bi-predictive Picture) similar to the third embodiment, the threshold value Th2 used in the determination in step S303 is set as the pixel value of the encoding target block, as in the second embodiment. In this example, a large value is set when the variance is large, and a small value is set when the variance is small.
実施例4のフローチャートを,図9に示す。図9において,ステップS401〜S402およびステップS407〜S410の処理は,図8で説明したステップS301〜S302およびステップS303〜S306の処理と同様である。また,図9におけるステップS403〜S406の処理は,図6で説明したステップS203〜S206の処理と同様である。 The flowchart of Example 4 is shown in FIG. In FIG. 9, the processes of steps S401 to S402 and steps S407 to S410 are the same as the processes of steps S301 to S302 and steps S303 to S306 described in FIG. Further, the processing in steps S403 to S406 in FIG. 9 is the same as the processing in steps S203 to S206 described in FIG.
[実施例5]
実施例5は,符号化対象の画像がインターレース画像で,フィールド符号化(Pピクチャ)の場合の例である。図10は,実施例5を説明するための図である。画像は,トップフィールド(Top field )とボトムフィールド(Bottom field)からなり,それぞれのフィールドに対して符号化が行われる。スキップモードの選択で評価対象とする誤差ΔDCおよび予測誤差SADについては,図10に示すように,符号化対象マクロブロックの同一パリティのフィールドの同一位置のマクロブロックとの誤差ΔDCおよび予測誤差SADが用いられる。
[Example 5]
The fifth embodiment is an example in which the image to be encoded is an interlaced image and is field encoded (P picture). FIG. 10 is a diagram for explaining the fifth embodiment. An image consists of a top field (Top field) and a bottom field (Bottom field), and each field is encoded. As shown in FIG. 10, the error ΔDC and the prediction error SAD with respect to the macroblock at the same position in the field of the same parity of the encoding target macroblock are as follows. Used.
まず,手順1では,符号化対象原画フィールドの符号化対象マクロブロックと,同一パリティの直前原画フィールドの同一位置のブロックとの誤差ΔDC(例えばブロック輝度の総計の差分絶対値)を計算し,所定の閾値Th1と比較する。
First, in
手順2では,手順1で算出した誤差ΔDCが閾値Th1よりも大きければ,スキップモードを選択しないで動き探索を行う。閾値Th1よりも小さければ,符号化対象マクロブロックと,同一パリティの直前の符号化済み参照フィールドの真裏ブロックとの予測誤差SADを計算する。予測誤差SADが閾値Th2よりも小さく,かつ予測動きベクトル(PMV)がゼロであれば,スキップモードを選択し,閾値Th2よりも大きいか,または予測動きベクトル(PMV)がゼロでなければ,スキップモードを選択しないで動き探索を行う。
In the
なお,実施例5についても,実施例2,4と同様に,閾値Th2を符号化対象マクロブロックの画素値の分散に応じて切り替えてもよい。 In the fifth embodiment, the threshold Th2 may be switched according to the distribution of the pixel values of the encoding target macroblock, as in the second and fourth embodiments.
以上の動画像符号化処理は,コンピュータとソフトウェアプログラムとによっても実現することができ,そのプログラムをコンピュータ読み取り可能な記録媒体に記録することも,ネットワークを通して提供することも可能である。 The moving image encoding process described above can be realized by a computer and a software program, and the program can be recorded on a computer-readable recording medium or provided through a network.
図11に,動画像符号化装置をコンピュータとソフトウェアプログラムとによって構成する場合のハードウェア構成例を示す。本システムは,プログラムを実行するCPU50と,CPU50がアクセスするプログラムやデータが格納されるRAM等のメモリ51と,カメラ等からの符号化対象の映像信号を入力する映像信号入力部52(ディスク装置等による映像信号を記憶する記憶部でもよい)と,本発明の実施形態で説明した符号化処理をCPU50に実行させるソフトウェアプログラムである動画像符号化プログラム531が格納されたプログラム記憶装置53と,CPU50がメモリ51にロードされた動画像符号化プログラム531を実行することにより生成された符号化ストリームを,例えばネットワークを介して出力する符号化ストリーム出力部54(ディスク装置等による符号化ストリームを記憶する記憶部でもよい)とが,バスで接続された構成になっている。
FIG. 11 shows an example of a hardware configuration when the moving image encoding apparatus is configured by a computer and a software program. This system includes a
以上,図面を参照して本発明の実施形態を説明してきたが,上記実施形態は本発明の例示に過ぎず,本発明が上記実施形態に限定されるものではないことは明らかである。したがって,本発明の精神および技術的範囲を逸脱しない範囲での構成要素の追加,省略,置換,その他の変更を行ってもよい。 As mentioned above, although embodiment of this invention was described with reference to drawings, the said embodiment is only the illustration of this invention, and it is clear that this invention is not limited to the said embodiment. Accordingly, additions, omissions, substitutions, and other modifications of the components may be made without departing from the spirit and technical scope of the present invention.
1021 スキップモード制御部
10 マクロブロック誤差計算部
11 マクロブロック誤差評価部
12 予測誤差評価部
13 予測ベクトル評価部
14 符号化部
15 符号化済み画像メモリ
16 動きベクトルメモリ
1021 Skip
Claims (7)
符号化対象マクロブロックが双予測画像の場合に,該符号化対象マクロブロックのブロック画素値の総計と,テンポラル/空間ダイレクトモードにおける第1の符号化済み参照フレームに対応する原画フレームにおける前記符号化対象マクロブロックと同位置のマクロブロックのブロック画素値の総計との誤差または第2の符号化済み参照フレームに対応する原画フレームにおける前記符号化対象マクロブロックと同位置のマクロブロックのブロック画素値の総計との誤差のうち,大きいほうの誤差を第一誤差として算出する過程と,
所定の第一閾値と前記第一誤差とを比較し,前記第一誤差のほうが大きい場合に,スキップモードをオフに設定する過程と,
前記第一誤差が前記第一閾値以下の場合に,前記符号化対象マクロブロックと,テンポラル/空間ダイレクトモードにおける第1の符号化済み参照フレームにおける参照ブロックとの誤差または第2の符号化済み参照フレームにおける参照ブロックとの誤差のうち,大きいほうの誤差を第二誤差として算出する過程と,
所定の第二閾値と前記第二誤差とを比較し,前記第二誤差のほうが大きい場合に,スキップモードをオフに設定する過程と,
前記第一誤差が前記第一閾値以下でかつ前記第二誤差が前記第二閾値以下である場合に,前記符号化対象マクロブロックの動きベクトルまたは予測動きベクトルが零または所定値以下であるか否かを判定し,零または所定値以下であればスキップモードをオンに設定し,そうでなければスキップモードをオフに設定する過程と,
スキップモードがオンのときに,スキップモードによる符号化を行い,スキップモードがオフのときに,スキップモード以外の予測モードによる符号化を行う過程とを有する
ことを特徴とする動画像符号化方法。 In a video encoding method having a skip mode as a prediction mode in predictive encoding,
When the encoding target macroblock is a bi-predictive image, the total of the block pixel values of the encoding target macroblock and the encoding in the original picture frame corresponding to the first encoded reference frame in the temporal / spatial direct mode The error of the block pixel value of the macroblock at the same position as the target macroblock or the block pixel value of the macroblock at the same position as the target macroblock in the original picture frame corresponding to the second encoded reference frame The process of calculating the larger error as the first error among the errors with the total ,
Comparing a predetermined first threshold value with the first error, and setting the skip mode off if the first error is greater;
When the first error is less than or equal to the first threshold, the error between the encoding target macroblock and the reference block in the first encoded reference frame in the temporal / spatial direct mode or the second encoded reference A process of calculating a larger error as a second error among errors from the reference block in the frame ;
Comparing a predetermined second threshold value with the second error, and setting the skip mode off if the second error is greater;
Whether the motion vector or predicted motion vector of the encoding target macroblock is zero or less than a predetermined value when the first error is less than the first threshold and the second error is less than the second threshold A process of setting the skip mode on if it is zero or less than the predetermined value, and setting the skip mode off if not,
A moving picture encoding method comprising: encoding with a skip mode when the skip mode is on, and encoding with a prediction mode other than the skip mode when the skip mode is off.
符号化対象マクロブロックが双予測画像の場合に,該符号化対象マクロブロックのブロック画素値の総計と,テンポラル/空間ダイレクトモードにおける第1の符号化済み参照フレームに対応する原画フレームにおける前記符号化対象マクロブロックと同位置のマクロブロックのブロック画素値の総計との誤差または第2の符号化済み参照フレームに対応する原画フレームにおける前記符号化対象マクロブロックと同位置のマクロブロックのブロック画素値の総計との誤差のうち,大きいほうの誤差を第一誤差として算出する過程と,
所定の第一閾値と前記第一誤差とを比較し,前記第一誤差のほうが大きい場合に,スキップモードをオフに設定する過程と,
前記第一誤差が前記第一閾値以下の場合に,前記符号化対象マクロブロックと,テンポラル/空間ダイレクトモードにおける第1の符号化済み参照フレームにおける参照ブロックとの誤差または第2の符号化済み参照フレームにおける参照ブロックとの誤差のうち,大きいほうの誤差を第二誤差として算出する過程と,
符号化対象マクロブロックの画素値の分散を算出する過程と,
大きさの異なる複数の閾値の中から前記分散の値に応じて第二閾値を選択して設定する過程と,
前記第二閾値と前記第二誤差とを比較し,前記第二誤差のほうが大きい場合に,スキップモードをオフに設定する過程と,
前記第一誤差が前記第一閾値以下でかつ前記第二誤差が前記第二閾値以下である場合に,前記符号化対象マクロブロックの動きベクトルまたは予測動きベクトルが零または所定値以下であるか否かを判定し,零または所定値以下であればスキップモードをオンに設定し,そうでなければスキップモードをオフに設定する過程と,
スキップモードがオンのときに,スキップモードによる符号化を行い,スキップモードがオフのときに,スキップモード以外の予測モードによる符号化を行う過程とを有する
ことを特徴とする動画像符号化方法。 In a video encoding method having a skip mode as a prediction mode in predictive encoding,
When the encoding target macroblock is a bi-predictive image, the total of the block pixel values of the encoding target macroblock and the encoding in the original picture frame corresponding to the first encoded reference frame in the temporal / spatial direct mode The error of the block pixel value of the macroblock at the same position as the target macroblock or the block pixel value of the macroblock at the same position as the target macroblock in the original picture frame corresponding to the second encoded reference frame The process of calculating the larger error as the first error among the errors with the total ,
Comparing a predetermined first threshold value with the first error, and setting the skip mode off if the first error is greater;
When the first error is less than or equal to the first threshold, the error between the encoding target macroblock and the reference block in the first encoded reference frame in the temporal / spatial direct mode or the second encoded reference A process of calculating a larger error as a second error among errors from the reference block in the frame ;
A process of calculating a variance of pixel values of a macroblock to be encoded;
Selecting and setting a second threshold value according to the variance value from a plurality of threshold values of different sizes;
Comparing the second threshold with the second error, and setting the skip mode off if the second error is greater;
Whether the motion vector or predicted motion vector of the encoding target macroblock is zero or less than a predetermined value when the first error is less than the first threshold and the second error is less than the second threshold A process of setting the skip mode on if it is zero or less than the predetermined value, and setting the skip mode off if not ,
A moving picture encoding method comprising: encoding with a skip mode when the skip mode is on, and encoding with a prediction mode other than the skip mode when the skip mode is off.
フィールド符号化の場合に,
前記第一誤差として算出する過程では,前記第一誤差を算出する処理に代えて,前記符号化対象マクロブロックのブロック画素値の総計と,テンポラル/空間ダイレクトモードにおける前記符号化対象マクロブロックと同一パリティの第1の符号化済み参照フィールドに対応する原画フィールドにおける前記符号化対象マクロブロックと同位置のマクロブロックのブロック画素値の総計との誤差または第2の符号化済み参照フィールドに対応する原画フィールドにおける前記符号化対象マクロブロックと同位置のマクロブロックのブロック画素値の総計との誤差を算出し,
前記第二誤差として算出する過程では,前記第二誤差を算出する処理に代えて,前記符号化対象マクロブロックと,テンポラル/空間ダイレクトモードにおける第1の符号化済み参照フィールドにおける参照ブロックとの誤差または第2の符号化済み参照フィールドにおける参照ブロックとの誤差を算出する
ことを特徴とする動画像符号化方法。 In the moving image encoding method according to claim 1 or 2 ,
For field encoding,
In the process of calculating as the first error , instead of the process of calculating the first error, the total block pixel value of the encoding target macroblock and the encoding target macroblock in the temporal / spatial direct mode are the same. An error in the original picture field corresponding to the first encoded reference field of parity with the sum of the block pixel values of the macroblock located at the same position as the encoding target macroblock or the original picture corresponding to the second encoded reference field Calculating an error from the sum of the block pixel values of the macroblock at the same position as the encoding target macroblock in the field ;
In the process of calculating the second error, instead of the process of calculating the second error, the error between the encoding target macroblock and the reference block in the first encoded reference field in the temporal / spatial direct mode. Alternatively, the moving picture coding method characterized by calculating an error from the reference block in the second coded reference field .
符号化対象マクロブロックが双予測画像の場合に,該符号化対象マクロブロックのブロック画素値の総計と,テンポラル/空間ダイレクトモードにおける第1の符号化済み参照フレームに対応する原画フレームにおける前記符号化対象マクロブロックと同位置のマクロブロックのブロック画素値の総計との誤差または第2の符号化済み参照フレームに対応する原画フレームにおける前記符号化対象マクロブロックと同位置のマクロブロックのブロック画素値の総計との誤差のうち,大きいほうの誤差を第一誤差として算出する第一誤差計算手段と,
所定の第一閾値と前記第一誤差とを比較し,前記第一誤差のほうが大きい場合に,スキップモードをオフに設定する第一評価手段と,
前記第一誤差が前記第一閾値以下の場合に,前記符号化対象マクロブロックと,テンポラル/空間ダイレクトモードにおける第1の符号化済み参照フレームにおける参照ブロックとの誤差または第2の符号化済み参照フレームにおける参照ブロックとの誤差のうち,大きいほうの誤差を第二誤差として算出する第二誤差計算手段と,
所定の第二閾値と前記第二誤差とを比較し,前記第二誤差のほうが大きい場合に,スキップモードをオフに設定する第二評価手段と,
前記第一誤差が前記第一閾値以下でかつ前記第二誤差が前記第二閾値以下である場合に,前記符号化対象マクロブロックの動きベクトルまたは予測動きベクトルが零または所定値以下であるか否かを判定し,零または所定値以下であればスキップモードをオンに設定し,そうでなければスキップモードをオフに設定する第三評価手段と,
スキップモードがオンのときに,スキップモードによる符号化を行い,スキップモードがオフのときに,スキップモード以外の予測モードによる符号化を行う符号化手段とを備える
ことを特徴とする動画像符号化装置。 In a video encoding apparatus having a skip mode as a prediction mode in predictive encoding,
When the encoding target macroblock is a bi-predictive image, the total of the block pixel values of the encoding target macroblock and the encoding in the original picture frame corresponding to the first encoded reference frame in the temporal / spatial direct mode The error of the block pixel value of the macroblock at the same position as the target macroblock or the block pixel value of the macroblock at the same position as the target macroblock in the original picture frame corresponding to the second encoded reference frame A first error calculating means for calculating a larger error as a first error among errors from the total ,
A first evaluation means for comparing a predetermined first threshold value with the first error, and setting the skip mode off when the first error is larger;
When the first error is less than or equal to the first threshold, the error between the encoding target macroblock and the reference block in the first encoded reference frame in the temporal / spatial direct mode or the second encoded reference A second error calculating means for calculating a larger error as a second error among errors from the reference block in the frame ;
A second evaluation means for comparing a predetermined second threshold value with the second error and setting the skip mode to off when the second error is larger;
Whether the motion vector or predicted motion vector of the encoding target macroblock is zero or less than a predetermined value when the first error is less than the first threshold and the second error is less than the second threshold A third evaluation means for setting the skip mode on if it is zero or less than the predetermined value, and setting the skip mode off if not;
Coding means for performing coding in skip mode when skip mode is on, and coding in prediction modes other than skip mode when skip mode is off apparatus.
符号化対象マクロブロックが双予測画像の場合に,該符号化対象マクロブロックのブロック画素値の総計と,テンポラル/空間ダイレクトモードにおける第1の符号化済み参照フレームに対応する原画フレームにおける前記符号化対象マクロブロックと同位置のマクロブロックのブロック画素値の総計との誤差または第2の符号化済み参照フレームに対応する原画フレームにおける前記符号化対象マクロブロックと同位置のマクロブロックのブロック画素値の総計との誤差のうち,大きいほうの誤差を第一誤差として算出する第一誤差計算手段と,
所定の第一閾値と前記第一誤差とを比較し,前記第一誤差のほうが大きい場合に,スキップモードをオフに設定する第一評価手段と,
前記第一誤差が前記第一閾値以下の場合に,前記符号化対象マクロブロックと,テンポラル/空間ダイレクトモードにおける第1の符号化済み参照フレームにおける参照ブロックとの誤差または第2の符号化済み参照フレームにおける参照ブロックとの誤差のうち,大きいほうの誤差を第二誤差として算出する第二誤差計算手段と,
符号化対象マクロブロックの画素値の分散を算出する分散計算手段と,
大きさの異なる複数の閾値の中から前記分散の値に応じて第二閾値を選択して設定する分散評価手段と,
前記第二閾値と前記第二誤差とを比較し,前記第二誤差のほうが大きい場合に,スキップモードをオフに設定する第二評価手段と,
前記第一誤差が前記第一閾値以下でかつ前記第二誤差が前記第二閾値以下である場合に,前記符号化対象マクロブロックの動きベクトルまたは予測動きベクトルが零または所定値以下であるか否かを判定し,零または所定値以下であればスキップモードをオンに設定し,そうでなければスキップモードをオフに設定する第三評価手段と,
スキップモードがオンのときに,スキップモードによる符号化を行い,スキップモードがオフのときに,スキップモード以外の予測モードによる符号化を行う符号化手段とを備える
ことを特徴とする動画像符号化装置。 In a video encoding apparatus having a skip mode as a prediction mode in predictive encoding,
When the encoding target macroblock is a bi-predictive image, the total of the block pixel values of the encoding target macroblock and the encoding in the original picture frame corresponding to the first encoded reference frame in the temporal / spatial direct mode The error of the block pixel value of the macroblock at the same position as the target macroblock or the block pixel value of the macroblock at the same position as the target macroblock in the original picture frame corresponding to the second encoded reference frame A first error calculating means for calculating a larger error as a first error among errors from the total ,
A first evaluation means for comparing a predetermined first threshold value with the first error, and setting the skip mode off when the first error is larger;
When the first error is less than or equal to the first threshold, the error between the encoding target macroblock and the reference block in the first encoded reference frame in the temporal / spatial direct mode or the second encoded reference A second error calculating means for calculating a larger error as a second error among errors from the reference block in the frame ;
A variance calculation means for calculating the variance of pixel values of the encoding target macroblock;
A variance evaluation means for selecting and setting a second threshold value according to the variance value from a plurality of threshold values of different sizes;
A second evaluation means for comparing the second threshold value with the second error and setting the skip mode to off when the second error is larger;
Whether the motion vector or predicted motion vector of the encoding target macroblock is zero or less than a predetermined value when the first error is less than the first threshold and the second error is less than the second threshold A third evaluation means for setting the skip mode on if it is zero or less than the predetermined value, and setting the skip mode off if not;
Coding means for performing coding in skip mode when skip mode is on, and coding in prediction modes other than skip mode when skip mode is off apparatus.
フィールド符号化の場合に,
前記第一誤差計算手段は,前記第一誤差を算出する処理に代えて,前記符号化対象マクロブロックのブロック画素値の総計と,テンポラル/空間ダイレクトモードにおける前記符号化対象マクロブロックと同一パリティの第1の符号化済み参照フィールドに対応する原画フィールドにおける前記符号化対象マクロブロックと同位置のマクロブロックのブロック画素値の総計との誤差または第2の符号化済み参照フィールドに対応する原画フィールドにおける前記符号化対象マクロブロックと同位置のマクロブロックのブロック画素値の総計との誤差を算出し,
前記第二誤差計算手段は,前記第二誤差を算出する処理に代えて,前記符号化対象マクロブロックと,テンポラル/空間ダイレクトモードにおける第1の符号化済み参照フィールドにおける参照ブロックとの誤差または第2の符号化済み参照フィールドにおける参照ブロックとの誤差を算出する
ことを特徴とする動画像符号化装置。 In the moving image encoding device according to claim 4 or 5 ,
For field encoding,
The first error calculation means replaces the process of calculating the first error with the sum of block pixel values of the encoding target macroblock and the same parity as the encoding target macroblock in the temporal / spatial direct mode. In the original image field corresponding to the second encoded reference field, or an error from the sum of the block pixel values of the macroblock located at the same position as the encoding target macroblock in the original image field corresponding to the first encoded reference field Calculating an error from the sum of block pixel values of a macroblock at the same position as the macroblock to be encoded ;
The second error calculation means replaces the process of calculating the second error with an error or first error between the encoding target macroblock and the reference block in the first encoded reference field in the temporal / spatial direct mode. An apparatus for encoding a moving picture, comprising: calculating an error from a reference block in two encoded reference fields .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012014357A JP5748225B2 (en) | 2012-01-26 | 2012-01-26 | Moving picture coding method, moving picture coding apparatus, and moving picture coding program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012014357A JP5748225B2 (en) | 2012-01-26 | 2012-01-26 | Moving picture coding method, moving picture coding apparatus, and moving picture coding program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013157662A JP2013157662A (en) | 2013-08-15 |
JP5748225B2 true JP5748225B2 (en) | 2015-07-15 |
Family
ID=49052507
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012014357A Active JP5748225B2 (en) | 2012-01-26 | 2012-01-26 | Moving picture coding method, moving picture coding apparatus, and moving picture coding program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5748225B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5702820B2 (en) * | 2013-04-02 | 2015-04-15 | 日本電信電話株式会社 | Prediction mode determination method, video encoding apparatus, and prediction mode determination program |
KR102365685B1 (en) | 2015-01-05 | 2022-02-21 | 삼성전자주식회사 | Method for operating of encoder, and devices having the encoder |
JP6075898B1 (en) | 2015-08-31 | 2017-02-08 | 日本電信電話株式会社 | Video encoding apparatus, video encoding method, and program |
JP6769231B2 (en) * | 2016-10-17 | 2020-10-14 | 富士通株式会社 | Moving image coding device, moving image coding method, moving image decoding device, moving image decoding method, and moving image coding computer program and moving image decoding computer program |
CN111127342B (en) * | 2019-12-05 | 2023-08-08 | Oppo广东移动通信有限公司 | Image processing method, device, storage medium and terminal equipment |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1994022269A1 (en) * | 1993-03-24 | 1994-09-29 | Sony Corporation | Method and apparatus for coding/decoding motion vector, and method and apparatus for coding/decoding image signal |
JP3354691B2 (en) * | 1994-03-15 | 2002-12-09 | 富士通株式会社 | Moving image block judgment circuit |
JP2001251627A (en) * | 2000-03-03 | 2001-09-14 | Matsushita Electric Ind Co Ltd | Coder, coding method and recording medium recorded with program |
JP3812808B2 (en) * | 2001-03-19 | 2006-08-23 | Kddi株式会社 | Skip region detection type moving image encoding apparatus and recording medium |
BRPI0720420A2 (en) * | 2006-12-28 | 2014-01-14 | Nippon Telegraph & Telephone | VIDEO PROCESSING METHOD AND APPARATUS, VIDEO PROCESSING PROGRAM AND STORAGE STORAGE PROGRAM |
JP4823150B2 (en) * | 2007-05-31 | 2011-11-24 | キヤノン株式会社 | Encoding apparatus and encoding method |
-
2012
- 2012-01-26 JP JP2012014357A patent/JP5748225B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2013157662A (en) | 2013-08-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8000393B2 (en) | Video encoding apparatus and video encoding method | |
US11849142B2 (en) | Method and apparatus for encoding or decoding video data with sub-pixel motion vector refinement | |
JP2013504256A (en) | Scene switching detection | |
JP2007067469A (en) | In-frame prediction coding control method, in-frame prediction coding control apparatus, in-frame prediction coding control program, and recording medium recorded with the program | |
TWI511531B (en) | Video coding apparatus, video coding method, and video coding program | |
JP5748225B2 (en) | Moving picture coding method, moving picture coding apparatus, and moving picture coding program | |
KR20130130695A (en) | Method and system for encoding video frames using a plurality of processors | |
US20140233645A1 (en) | Moving image encoding apparatus, method of controlling the same, and program | |
US9008358B2 (en) | Encoding a specific area with higher quality than a non-specific area | |
JP5178616B2 (en) | Scene change detection device and video recording device | |
JP2007228519A (en) | Image encoding device and image encoding method | |
Antony et al. | Highly efficient near lossless video compression using selective intra prediction for HEVC lossless mode | |
KR20120072205A (en) | Motion estimation apparatus and method using prediction algorithm between macroblocks | |
US20130322533A1 (en) | Encoding device | |
JP6239838B2 (en) | Moving picture encoding apparatus, control method thereof, and imaging apparatus | |
TW201338554A (en) | Moving picture coding method, moving picture coding apparatus, and moving picture coding program | |
JP4829951B2 (en) | Intraframe predictive coding control method, intraframe predictive coding control apparatus, intraframe predictive coding control program, and computer-readable recording medium storing the program | |
JP6489227B2 (en) | Video encoding apparatus and video encoding method | |
JP2015019319A (en) | Encoding apparatus, encoding method, and program | |
JP2012054759A (en) | Encoding apparatus, encoding method, and program | |
JP2010252259A (en) | Image processor, image processing method, and recording medium | |
GB2588563A (en) | Method and apparatus for encoding or decoding video data with sub-pixel motion vector refinement | |
JP2005260883A (en) | Moving image encoding apparatus and method, and program, and computer readable storage medium | |
JP2014112952A (en) | Image encoding device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20131209 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20141007 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20141014 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20141208 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150310 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150414 |
|
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: 20150507 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150507 |
|
R150 | Certificate of patent (=grant) or registration of utility model |
Ref document number: 5748225 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |