[go: up one dir, main page]

JP2005012439A - Encoding apparatus, encoding method, and encoding program - Google Patents

Encoding apparatus, encoding method, and encoding program Download PDF

Info

Publication number
JP2005012439A
JP2005012439A JP2003173583A JP2003173583A JP2005012439A JP 2005012439 A JP2005012439 A JP 2005012439A JP 2003173583 A JP2003173583 A JP 2003173583A JP 2003173583 A JP2003173583 A JP 2003173583A JP 2005012439 A JP2005012439 A JP 2005012439A
Authority
JP
Japan
Prior art keywords
motion vector
block group
block
macroblock
encoding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003173583A
Other languages
Japanese (ja)
Inventor
Shinichi Sakaida
慎一 境田
Masahide Naemura
昌秀 苗村
Kazuhisa Iguchi
和久 井口
Makoto Ikeda
誠 池田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Japan Broadcasting Corp
Original Assignee
Nippon Hoso Kyokai NHK
Japan Broadcasting Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Hoso Kyokai NHK, Japan Broadcasting Corp filed Critical Nippon Hoso Kyokai NHK
Priority to JP2003173583A priority Critical patent/JP2005012439A/en
Publication of JP2005012439A publication Critical patent/JP2005012439A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

【課題】圧縮符号化する際の情報量を増加させることなく、常に最適な符号化効率で動画像を圧縮符号化することができる符号化装置、方法およびプログラムを提供する。
【解決手段】動画像に含まれる各原画像のブロックの単位で動き補償予測を行って、当該動画像を圧縮符号化する符号化装置1であって、小ブロックに分割するマクロブロック分割部3と、ブロック群に統合するブロック群統合部5と、ブロック群の動きベクトルを、参照画像に基づいて探索するブロック群動きベクトル探索部9と、残差情報を出力する小ブロック動き補償部17と、符号化動きベクトルとする動きベクトル符号化部13と、合計情報量が最小となるブロック群を最適ブロック群として選択し、動きベクトルを出力するマクロブロック統合情報量比較部19と、を備えた。
【選択図】 図1
An encoding apparatus, method, and program capable of always compressing and encoding a moving image with optimal encoding efficiency without increasing the amount of information in compression encoding.
An encoding apparatus 1 that performs motion compensation prediction in units of blocks of each original image included in a moving image and compresses and encodes the moving image, and includes a macroblock dividing unit 3 that divides the moving image into small blocks. A block group integration unit 5 that integrates the block group, a block group motion vector search unit 9 that searches for a motion vector of the block group based on a reference image, and a small block motion compensation unit 17 that outputs residual information, , A motion vector encoding unit 13 to be an encoded motion vector, and a macroblock integrated information amount comparison unit 19 that selects a block group having a minimum total information amount as an optimal block group and outputs a motion vector. .
[Selection] Figure 1

Description

【0001】
【発明の属する技術分野】
本発明は、動画像処理に係り、特に、動画像に含まれる原画像をブロックに分割して動き補償予測を利用して圧縮符号化する符号化装置、符号化方法および符号化プログラムに関する。
【0002】
【従来の技術】
従来、動画像の圧縮符号化の方式は、ISO/IEC JTC1/SC29/WG11(MPEG)で規格化されたMPEG−1,2,4(それぞれISO/IEC 11172−2、ISO/IEC 13818−2、ISO/IEC 14496−2に対応している)や、ITU−Tで勧告されたH.261,263や、JVT(Joint Video Team(MPEG−4 part10 AVC[ISO/IEC 14496−10]/ITU−T H.264))といった規格がある。この動画像の圧縮符号化の処理は、動画像に含まれる原画像(画像)をブロックと呼ばれる所定の領域に分割し、この分割したブロックを単位にして動き補償予測やDCT変換処理を施すものである(例えば、非特許文献1および2参照)。
【0003】
動き補償予測の場合、圧縮符号化の処理の単位となるブロックの大きさは、MPEG−1、MPEG−2の方式では、マクロブロックと呼ばれる水平16画素×垂直16ラインである。この1つのマクロブロックに対して、水平方向と垂直方向の2つの成分からなる1つの動きベクトルが割り当てられている。
【0004】
ここで、図4に示すブロックの模式図を参照して、各圧縮符号化の処理について説明する。
図4(a)は、MPEG−1やMPEG−2のようにマクロブロックを単位とする動き補償予測の場合の動きベクトルの割り当て処理を模式的に示しており、この図4(a)に示すように、動き補償予測の場合の動きベクトルの割り当て処理は、マクロブロックを処理の単位とし、このマクロブロック内の画素が全て同一の動きベクトルで代表されるとする。そして、この動きベクトルの方向と移動量とによって当該マクロブロック内の画素も平行移動しているという動きモデルを仮定して、動画像を処理するものである。
【0005】
また、MPEG−4やITU−T H.263方式では、マクロブロック単位で動き補償予測を行う他に、図4(b)に示すように、水平8画素×垂直8ラインの大きさのブロック(小ブロック)単位で動き補償を行うモード(8×8モードとする)が備えられている。この8×8モードを用いた場合、水平16画素×垂直16ラインのマクロブロック内に複数の動きが存在する際に、マクロブロック1つに対して1つの動きベクトルを割り当てるよりも、実際の動きに近似した動きベクトルを得ることが可能である。
【0006】
つまり、この8×8モードの場合、動き補償予測を行うブロック単位をマクロブックにするか、小ブロックにするかを示すフラグを立てる(判別信号を出力する)ことによって、符号化した動画像を復号する復号処理時に判別できるように構成されている。ただし、小ブロックに分割する場合には、1つのマクロブロックに対して4つの小ブロックが存在するので、動きベクトルの数は、小ブロック毎に1つずつ存在し、1つのマクロブロックでは、4つ存在することになる。
【0007】
また、JVT方式では、マクロブロックの水平16画素×垂直16ラインおよび小ブロックの水平8画素×垂直8ラインの大きさの正方形のブロックの他に、図4(c)、(d)に示すように、水平16画素×垂直8ライン、水平8画素×垂直16ラインのような長方形のブロックや、図4(e)(f)に示すように、マクロブロックを水平8画素×垂直8ラインの大きさの4つに分割したブロックや、さらにこの水平8画素×垂直8ラインの大きさのブロックを、図4(g)〜(i)に示すように、水平8画素×垂直4ライン、水平4画素×垂直8ライン、水平4画素×垂直4ラインの大きさに分割したブロックで動き補償予測を行うことも可能な構成となっている。
【0008】
なお、JTV方式の場合、水平16画素×垂直16ラインのマクロブロックをどのような大きさのブロックに分割するのかを示すフラグが多く必要になる。
【0009】
また、例えば、水平16画素×垂直16ラインのマクロブロックを、水平16画素×垂直8ラインの長方形のブロックの2つに分割した場合には、1つのマクロブロックに2つの動きベクトルが存在することになり、動きベクトルの数は、マクロブロックを4つの正方形のブロックに分割した場合よりも少なくなる。
【0010】
ところで、これら圧縮符号化の各方式では、図5に示すように、マクロブロック、或いは、このマクロブロックを分割した小ブロック毎に推定される動きベクトルMV(X)は、1つのブロック内、図5中の処理対象ブロックX内で符号化されるのではなく、隣接するブロックであるA、B、C、Dにおける動きベクトルMV(A)、MV(B)、MV(C)、MV(D)が近似していることを利用して、隣接するブロック間で動きベクトルの差分(dMV(X))をとり、この差分(dMV(X))を用いて符号化される場合が多い。そのため、隣接するブロック間で動きベクトルの方向や大きさが近似しているほど符号化後に発生する情報量(符号化情報量)は小さくなる。
【0011】
なお、この図5において、破線で囲んでいる部分が一つのフレームを示している。また、処理対象ブロックXは、このフレームの任意の位置にあるものであり、この図5では図示を省略したが、通常、この処理対象ブロックXを囲むブロック(隣接するブロック)を全て利用する必要がある。
【0012】
【非特許文献1】
加藤禎篤 他著「ブロック単位境界モデルに基づく動き補償:H.26L予測方式の精緻化」電子情報通信学会大会予稿集、2002年3月29日、pp401−pp402
【非特許文献2】
木村青司 他著「可変サイズ可変形状ブロックに基づいた動き補償方式」電子情報通信学会論文誌、1997年2月 pp434−pp443
【0013】
【発明が解決しようとする課題】
しかしながら、動画像に含まれる各原画像のブロック単位で動き補償予測を行う従来の圧縮符号化の方式では、以下に示す問題がある。
【0014】
マクロブロックを小ブロックに分割して動き補償予測を行う、MPEG−4、ITU−T H.263、JVT方式では、マクロブロック単位でしか動き補償予測を行うことができないMPEG−1,2方式に比べて、実際の動きに合った動きベクトルで動画像を圧縮符号化できる可能性は高いものの、分割した小ブロック毎の動きベクトルと、マクロブロックをどのように分割したかを示す付加的な情報が必要になる。そのため、1つのマクロブロックに対して1つの動きベクトルを割り当てて圧縮符号化の処理を行うMPEG−1,2の方式に比べて、若干情報量が増加してしまい、符号化効率を向上させる上で、常に効率的になるとは限らないという問題がある。
【0015】
そこで、本発明の目的は前記した従来の技術が有する課題を解消し、圧縮符号化する際の情報量を増加させることなく、常に最適な符号化効率で動画像を圧縮符号化することができる符号化装置、符号化方法および符号化プログラムを提供することにある。
【0016】
【課題を解決するための手段】
本発明は、前記した目的を達成するため、以下に示す構成とした。
請求項1記載の符号化装置は、動画像に含まれる各原画像のブロックの単位で動き補償予測を行って、当該動画像を圧縮符号化する符号化装置であって、マクロブロック分割手段と、ブロック群統合手段と、ブロック群動きベクトル探索手段と、小ブロック動き補償手段と、動きベクトル符号化手段と、マクロブロック統合情報量比較手段と、を備える構成とした。
【0017】
かかる構成によれば、符号化装置は、マクロブロック分割手段によって、マクロブロックを小ブロックに分割し、ブロック群統合手段によって、小ブロックを組み合わせたブロック群に統合する。つまり、水平16画素×垂直16ラインに分割されたマクロブロックをこの大きさより小さいブロック、例えば、水平8画素×垂直8ラインの4個の小ブロックに分割し、マクロブロックを4分割する。または、水平8画素×垂直16ラインの1個の小ブロックと、水平8画素×垂直8ラインの2個の小ブロックとにマクロブロックを3分割する。或いは、水平8画素×垂直8ラインの1個の小ブロックとその他の残りのブロックとに分割してマクロブロックを2分割する。
【0018】
続いて、この符号化装置は、ブロック群動きベクトル探索手段によって、ブロック群統合手段にて統合されたブロック群の動きベクトルを、動き補償予測する際に用いられる参照画像に基づいて探索する。この動きベクトルの探索は、参照画像である一つ前(直前)の画像(フレーム)の中で該当するブロック群を指すものである。すなわち、このブロック群動きベクトル探索手段では、小ブロックの様々な組み合わせであるブロック群の動きベクトルは、直前のフレームの該当するブロック群が参照されて、小ブロックの様々な組み合わせの数だけ探索されることになる。
【0019】
そして、この符号化装置は、小ブロック動き補償手段によって、ブロック群動きベクトル探索手段で探索された動きベクトルを用いて、小ブロック毎に動き補償予測を行うと共に、この動き補償予測の結果と原画像との比較により発生した残差情報を出力する。つまり、この動き補償予測(動き補償処理)は、ブロック群動きベクトル探索手段で探索されたブロック群を構成する小ブロック毎に行われる。
【0020】
また、この符号化装置は、動きベクトル符号化手段によって、ブロック群動きベクトル探索手段で探索された動きベクトルを符号化し、マクロブロック統合情報量比較手段によって、小ブロック動き補償手段で出力された残差情報の情報量をマクロブロック単位毎に合計し、動きベクトル符号化手段で符号化された符号化動きベクトルの情報量を加算した合計情報量が、ブロック群の組み合わせの中で最小となるブロック群を最適ブロック群として選択し、この最適ブロック群の動きベクトルを出力する。つまり、複数通りに統合したブロック群の中で、最も符号化効率がよくなる動きベクトルを選択することにより、この動きベクトルに基づいて、動画像の符号化効率を向上させることができる。
【0021】
請求項2記載の符号化方法は、動画像に含まれる各原画像のブロックの単位で動き補償予測を行って、当該動画像を圧縮符号化する符号化方法であって、マクロブロック分割ステップと、ブロック群統合ステップと、ブロック群動きベクトル探索ステップと、小ブロック動き補償ステップと、動きベクトル符号化ステップと、マクロブロック統合情報量比較ステップと、を含む手順とした。
【0022】
かかる手順によれば、符号化方法は、マクロブロック分割ステップにおいて、マクロブロックを小ブロックに分割し、ブロック群統合ステップにおいて、小ブロックを組み合わせたブロック群に統合する。続いて、この符号化方法は、ブロック群動きベクトル探索ステップにおいて、ブロック群統合ステップにて統合されたブロック群の動きベクトルを、動き補償予測する際に用いられる参照画像に基づいて探索する。そして、この符号化方法は、小ブロック動き補償ステップにおいて、ブロック群動きベクトル探索ステップにて探索された動きベクトルを用いて、小ブロック毎に動き補償予測を行うと共に、この動き補償予測の結果と原画像との比較により発生した残差情報を出力する。
【0023】
また、この符号化方法は、動きベクトル符号化ステップにおいて、ブロック群動きベクトル探索ステップにて探索された動きベクトルを符号化し、マクロブロック統合情報量比較ステップにおいて、小ブロック動き補償ステップにて出力された残差情報の情報量をマクロブロック単位毎に合計し、動きベクトル符号化ステップにて符号化された符号化動きベクトルの情報量を加算した合計情報量が、ブロック群の組み合わせの中で最小となるブロック群を最適ブロック群として選択し、この最適ブロック群の動きベクトルを出力する。
【0024】
請求項3記載の符号化プログラムは、動画像に含まれる各原画像のブロックの単位で動き補償予測を行って、当該動画像を圧縮符号化する装置を、マクロブロック分割手段、ブロック群統合手段、ブロック群動きベクトル探索手段、小ブロック動き補償手段、動きベクトル符号化手段、マクロブロック統合情報量比較手段、として機能させる構成とした。
【0025】
かかる構成によれば、符号化プログラムは、マクロブロック分割手段で、マクロブロックを小ブロックに分割し、ブロック群統合手段で、小ブロックを組み合わせたブロック群に統合する。続いて、この符号化プログラムは、ブロック群動きベクトル探索手段で、ブロック群統合手段にて統合されたブロック群の動きベクトルを、動き補償予測する際に用いられる参照画像に基づいて探索する。そして、この符号化プログラムは、小ブロック動き補償手段で、ブロック群動きベクトル探索手段にて探索された動きベクトルを用いて、小ブロック毎に動き補償予測を行うと共に、この動き補償予測の結果と原画像との比較により発生した残差情報を出力する。
【0026】
また、この符号化プログラムは、動きベクトル符号化手段で、ブロック群動きベクトル探索手段にて探索された動きベクトルを符号化し、マクロブロック統合情報量比較手段で、小ブロック動き補償手段で出力された残差情報の情報量をマクロブロック単位毎に合計し、動きベクトル符号化手段にて符号化された符号化動きベクトルの情報量を加算した合計情報量が、ブロック群の組み合わせの中で最小となるブロック群を最適ブロック群として選択し、この最適ブロック群の動きベクトルを出力する。
【0027】
【発明の実施の形態】
以下、本発明の一実施の形態について、図面を参照して詳細に説明する。
(符号化装置の構成)
図1は、符号化装置のブロック図である。この図1に示すように、符号化装置1は、動画像を構成する一つ一つの画像を分割したマクロブロック(マクロブロック信号)を入力として、このマクロブロックの動きベクトルを出力して、動画像を符号化するもので、マクロブロック分割部3と、ブロック群統合部5と、ブロック群蓄積逐次出力部7と、ブロック群動きベクトル探索部9と、参照画像蓄積部11と、動きベクトル符号化部13と、動きベクトル蓄積部15と、小ブロック動き補償部17と、マクロブロック総合情報量比較部19とを備えている。
【0028】
マクロブロック分割部3(マクロブロック分割手段)は、入力されたマクロブロック信号(水平16画素×垂直16ライン)を小ブロック(水平16画素×垂直8ライン、水平8画素×垂直16ライン、水平8画素×垂直8ライン等)に分割した分割ブロック信号をブロック群統合部5に出力するものである。
【0029】
つまり、このマクロブロック分割部3では、MPEG−4やJVT方式に則った形式で、マクロブロックが長方形や正方形の小ブロックに分割される。なお、MPEG−4に則った場合、1つのマクロブロックに1つの動きベクトルが付されて表現されるモードと、マクロブロックを4つに分割した小ブロックのそれぞれに動きベクトルが付されて表現されるモードとがある。
【0030】
また、JVT方式に則った場合、水平16画素×垂直16ラインの分割を行わないマクロブロックと、水平8画素×垂直8ラインの正方形ブロックと、水平16画素×垂直8ラインおよび水平8画素×垂直16ラインの長方形ブロックと、水平8画素×垂直8ラインをさらに分割した水平8画素×垂直4ライン、水平4画素×垂直8ラインおよび水平4画素×垂直4ラインといったブロックのように分割される。
【0031】
ブロック群統合部5(ブロック群統合手段)は、マクロブロック分割部3でマクロブロックが分割された分割ブロック信号(小ブロック)を統合して、様々な組み合わせのブロック群信号(ブロック群)を生成し、ブロック群蓄積逐次出力部7に出力するものである。このブロック群統合部5では、図3に示すように、すべての小ブロックの組み合わせによって、ブロック群が生成される。
【0032】
この図3(1)に示すように、マクロブロックが4つの小ブロックに分割されており、3つの動きベクトルの方向、大きさは近似しているが、少しずつ異なっているため、符号化すると差分信号が発生する。
【0033】
また、図3(2)は、マクロブロックを分割しない場合(非分割)を示している。なお、この図3中に示した符号“a”、“b”、“c”は、分割した領域を示している。図3(3)〜図3(9)は、マクロブロックを2分割した場合のブロック群を示しており、図3(10)〜図3(19)は、マクロブロックを3分割した場合のブロック群を示している。
【0034】
図3(3)では、左上部の水平8画素×垂直8ラインの小ブロックと、このブロック以外との領域に分割されており、逆に、図3(4)では、右上部の水平8画素×垂直8ラインの小ブロックと、このブロック以外との領域に分割されている。また、図3(5)では、左下部の水平8画素×垂直8ラインの小ブロックと、このブロック以外との領域に分割されており、逆に、図3(6)では、右下部の水平8画素×垂直8ラインの小ブロックと、このブロック以外との領域に分割されている。
【0035】
図3(7)では、水平16画素×垂直8ラインの小ブロックに2分割されており、図3(8)では、水平8画素×垂直16ラインの小ブロックに2分割されている。図3(9)では、水平8画素×垂直8ラインの小ブロックに4分割されているが、分割された領域は“a”および“b”領域の2つであるので、結果として2分割されていることになる。
【0036】
図3(10)では、左半分が水平16画素×垂直8ラインの小ブロックに分割され、右半分が水平8画素×垂直8ラインの小ブロックに2分割されている。また、図3(11)では、左半分が水平8画素×垂直8ラインの小ブロックに2分割され、右半分が水平16画素×垂直8ラインの小ブロックに分割されている。
【0037】
図3(12)では、上半分が水平8画素×垂直16ラインの小ブロックに分割され、下半分が水平8画素×垂直8ラインの小ブロックに2分割されている。また、図3(13)では、上半分が水平8画素×垂直8ラインの小ブロックに2分割され、下半分が水平8画素×垂直16ラインの小ブロックに分割されている。
【0038】
図3(14)(16)では、水平8画素×垂直8ラインの小ブロックに4分割されており、右上部と左下部が同一の領域であり、結果として“a”、“b”、“c”の領域に3分割されている。また、図3(15)(17)では、水平8画素×垂直8ラインの小ブロックに4分割されており、左上部と右下部が同一の領域であり、結果として“a”、“b”、“c”の領域に3分割されている。
【0039】
図1に戻って説明を続ける。
ブロック群蓄積逐次出力部7は、ブロック群統合部5で統合されたブロック群信号(ブロック群)を蓄積すると共に、逐次、蓄積したブロック群信号(ブロック群)をブロック群動きベクトル探索部9に出力するものである。例えば、このブロック群蓄積逐次出力部7からブロック群を逐次(順番に)出力するタイミングは、ブロック群動きベクトル探索部9に入力されたブロック群の動きベクトルが探索された直後である。
【0040】
ブロック群動きベクトル探索部9(ブロック群動きベクトル探索手段)は、入力されたブロック群を構成する小ブロック毎の動きベクトルを参照画像蓄積部11に蓄積されている参照画像信号(参照画像、一つ前のフレーム)を探索して、動きベクトル信号として、動きベクトル符号化部13および動きベクトル蓄積部15に出力するものである。この実施の形態では、このブロック群動きベクトル探索部9は、ブロックマッチング法によって、ブロック群の動きベクトルを探索する。
【0041】
参照画像蓄積部11は、当該装置1に入力された動画像に含まれる各画像を分割したマクロブロック信号よりも一つ前(直前)のフレームの画像を参照画像として蓄積するものである。この参照画像蓄積部11は、通常、フレームメモリから構成されている。
【0042】
動きベクトル符号化部13は、ブロック群動きベクトル探索部9から出力された動きベクトル信号(小ブロック毎の動きベクトル)を符号化した符号化動きベクトルをマクロブロック統合情報量比較部19に出力するものである。この動きベクトル符号化部13は、ブロック群動きベクトル探索部9に入力されたブロック群を構成する小ブロックの動きベクトルと、当該マクロブロックに隣接するマクロブロックの動きベクトルとの差分をとり、この差分を符号化するものである。
【0043】
動きベクトル蓄積部15は、ブロック群動きベクトル探索部9で探索されたブロック群の動きベクトルを蓄積するものである。
【0044】
小ブロック動き補償部17は、ブロック群動きベクトル探索部9で探索され動きベクトル蓄積部15に蓄積されているブロック群の動きベクトルと、参照画像蓄積部11から出力(供給)される参照画像信号(参照画像)を用いて、小ブロック毎の動き補償処理(動き補償残差信号[残差情報]の出力)を行うものである。
【0045】
マクロブロック総合情報量比較部19は、小ブロック動き補償部17から出力された動き補償残差信号(残差情報)と、当該装置1に入力されたマクロブロック信号(マクロブロック)と、動きベクトル符号化部13から出力された符号化動きベクトル信号(符号化動きベクトル)とに基づいて、ブロック群統合部5で統合されたブロック群(図3参照)の中で符号化効率が最もよくなるものを探し、このブロック群で得られる動きベクトルを最終動きベクトル信号として出力するものである。
【0046】
すなわち、このマクロブロック統合情報量比較部19では、まず、小ブロック動き補償部17における小ブロック毎の動き補償の結果を用いて、参照画像、つまり、動画像に含まれる直前の原画像との比較によって発生した残差情報(動き補償残差信号)の情報量を、マクロブロックで合計する。次に、この合計した情報量に、動きベクトル符号化部13で符号化した符号化動きベクトル(符号化動きベクトル信号)の情報量を付加した合計情報量を求める。そして、この合計情報量が最小(最小の符号化情報量)となる、小ブロックの組み合わせであるブロック群を選択する。つまり、ブロック群統合部5によって、小ブロックが組み合わされたブロック群の中で、最適な組み合わせが選択され、この組み合わせで得られたブロック群の動きベクトルが最終的な出力(最終動きベクトル信号)となる。
【0047】
この符号化装置1によれば、マクロブロック分割部3によって、マクロブロックが小ブロックに分割され、ブロック群統合部5によって、小ブロックを組み合わせたブロック群に統合される。続いて、ブロック群動きベクトル探索部9によって、ブロック群統合部5にて統合され、ブロック群蓄積逐次出力部7にて蓄積されたブロック群の動きベクトルが、参照画像に基づいて探索される。そして、小ブロック動き補償部17によって、ブロック群動きベクトル探索部9で探索された動きベクトルにより、小ブロック毎に動き補償予測が行われると共に、この動き補償予測の結果と参照画像との比較により発生した残差情報が出力される。
【0048】
また、動きベクトル符号化部13によって、ブロック群動きベクトル探索部9で探索された動きベクトルが符号化され、マクロブロック統合情報量比較部19によって、小ブロック動き補償部17で出力された残差情報の情報量をマクロブロック単位毎に合計し、動きベクトル符号化部13で符号化された符号化動きベクトルの情報量を加算した合計情報量が、ブロック群の組み合わせの中で最小となるブロック群を最適ブロック群として選択し、この最適ブロック群の動きベクトルを出力する。つまり、ブロック群統合部5にて複数通りに統合したブロック群の中で、最も符号化効率がよくなる動きベクトルを選択することにより、この動きベクトルに基づいて、動画像の符号化効率を向上させることができる。すなわち、動画像を符号化(圧縮符号化)する際の情報量を増加させることなく、常に最適な符号化効率で動画像を圧縮符号化することができる。
【0049】
(符号化装置の動作)
次に、図2に示すフローチャートを参照して、符号化装置1の動作を説明する(適宜、図1参照)。
【0050】
まず、マクロブロック分割部3によって、符号化方式(MPEG−4、JVT方式)に準拠して、入力されたマクロブロック信号(マクロブロック)が、水平8画素×垂直8ライン、水平16画素×垂直8ライン、水平8画素×垂直16ライン等の小ブロックに分割される(S1)。続いて、ブロック群統合部5によって、マクロブロック分割部3にて分割された小ブロックが様々に組み合わされたブロック群に統合される(ブロック群が生成される)(S2)。
【0051】
そして、ブロック群動きベクトル探索部9によって、ブロック郡単位で、動きベクトルが探索される(S3)。すると、小ブロック動き補償部17によって、小ブロック毎の動き補償処理(動き補償予測)が行われ、残差情報(補償誤差)がマクロブロック統合情報量比較部19に出力される(S4)。また、動きベクトル符号化部13によって、動きベクトルが符号化された符号化動きベクトルがマクロブロック統合情報量比較部19に出力される。
【0052】
すると、マクロブロック総合情報量比較部19によって、残差情報(補償誤差)の情報量がマクロブロックで合計され、この合計された情報量に符号化動きベクトルの情報量が付加された合計情報量と、参照画像の該当する箇所のブロック群の情報量とが比較され、情報量の小さい方が選択され保持される(S5)。
【0053】
このS5の処理がブロック群統合部5で統合された全てのブロック群(全ての組み合わせ)について行われ、全ての組み合わせについて終了したかどうかが判定され(S6)、全ての組み合わせについて終了したと判定されない場合(S6、No)、S2に戻って処理が実行され、全ての組み合わせについて終了したと判定された場合(S6、Yes)、合計情報量(符号化情報量)が最小となるブロック群の動きベクトルが出力される(S7)。例えば、図3(1)に示したように、4つの動きベクトルが存在するとき、つまり、3の動きベクトルが右上方の方向を向いており、1つの動きベクトルが左方向を向いているときに、最終的な動きベクトルは、右上方に示した動きベクトルの長さを短くしたようなベクトルが得られることになる。
【0054】
以上、一実施形態に基づいて本発明を説明したが、本発明はこれに限定されるものではない。
例えば、符号化装置1の各構成の処理を一つずつの過程ととらえた符号化方法とみなすこともできるし、符号化装置1の各構成の処理を汎用的なコンピュータ言語で記述した符号化プログラムとみなすこともできる。これらの場合、符号化装置1と同様の効果を得ることができる。
【0055】
【発明の効果】
請求項1、2、3記載の発明によれば、マクロブロックを分割した小ブロックを複数通りに統合したブロック群の中で、最も符号化効率がよくなる動きベクトルを選択することにより、この動きベクトルに基づいて、動画像の符号化効率を向上させることができ、動画像を符号化(圧縮符号化)する際の情報量を増加させることなく、常に最適な符号化効率で動画像を圧縮符号化することができる。
【図面の簡単な説明】
【図1】本発明による一実施の形態である符号化装置のブロック図である。
【図2】図1に示した符号化装置の動作を説明したフローチャートである。
【図3】ブロック群統合部で小ブロックを統合したブロック群を説明した図である。
【図4】従来のマクロブロックの分割について説明した図である。
【図5】従来の動きベクトルの符号化について説明した図である。
【符号の説明】
1 符号化装置
3 マクロブロック分割部(マクロブロック分割手段)
5 ブロック群統合部(ブロック群統合手段)
7 ブロック群蓄積逐次出力部
9 ブロック群動きベクトル探索部(ブロック群動きベクトル探索手段)
11 参照画像蓄積部
13 動きベクトル符号化部(動きベクトル符号化手段)
15 動きベクトル蓄積部
17 小ブロック動き補償部(小ブロック動き補償手段)
19 マクロブロック統合情報量比較部(マクロブロック統合情報量比較手段)
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to moving image processing, and more particularly to an encoding device, an encoding method, and an encoding program that divide an original image included in a moving image into blocks and perform compression encoding using motion compensated prediction.
[0002]
[Prior art]
Conventionally, compression encoding methods for moving images are MPEG-1, 2, 4 (ISO / IEC 11172-2 and ISO / IEC 13818-2 respectively) standardized by ISO / IEC JTC1 / SC29 / WG11 (MPEG). , ISO / IEC 14496-2) and H.264 recommended by ITU-T. And JVT (Joint Video Team (MPEG-4 part 10 AVC [ISO / IEC 14496-10] / ITU-T H.264)). This compression coding processing of a moving image involves dividing an original image (image) included in the moving image into predetermined regions called blocks, and performing motion compensation prediction and DCT conversion processing in units of the divided blocks. (For example, see Non-Patent Documents 1 and 2).
[0003]
In the case of motion compensation prediction, the block size as a unit of compression encoding processing is 16 horizontal pixels × vertical 16 lines called macroblocks in the MPEG-1 and MPEG-2 systems. One motion vector composed of two components in the horizontal direction and the vertical direction is assigned to the one macroblock.
[0004]
Here, each compression encoding process will be described with reference to a schematic block diagram shown in FIG.
FIG. 4A schematically shows a motion vector assignment process in the case of motion compensation prediction in units of macroblocks as in MPEG-1 and MPEG-2. As described above, in the motion vector allocation processing in the case of motion compensation prediction, a macroblock is used as a unit of processing, and all the pixels in the macroblock are represented by the same motion vector. Then, a moving image is processed assuming a motion model in which the pixels in the macroblock are also translated in accordance with the direction of the motion vector and the amount of movement.
[0005]
Also, MPEG-4 and ITU-T H.264. In the H.263 system, in addition to performing motion compensation prediction in units of macroblocks, as shown in FIG. 4B, a mode in which motion compensation is performed in units of blocks (small blocks) each having a size of horizontal 8 pixels × vertical 8 lines ( 8 × 8 mode). When this 8 × 8 mode is used, when there are a plurality of motions in a macroblock of 16 horizontal pixels × 16 vertical lines, the actual motion is more than the case where one motion vector is assigned to one macroblock. Can be obtained.
[0006]
In other words, in the case of the 8 × 8 mode, by setting a flag indicating whether the block unit for performing motion compensation prediction is a macro book or a small block (outputs a discrimination signal), It is configured so that it can be determined at the time of decoding processing for decoding. However, when dividing into small blocks, there are four small blocks for one macroblock, so the number of motion vectors is one for each small block. There will be one.
[0007]
In addition, in the JVT method, as shown in FIGS. 4C and 4D, in addition to a square block having a size of 16 macro blocks × 16 vertical lines for a macro block and 8 horizontal pixels × 8 vertical lines for a small block. In addition, a rectangular block such as horizontal 16 pixels × vertical 8 lines and horizontal 8 pixels × vertical 16 lines, or a macroblock having a size of horizontal 8 pixels × vertical 8 lines as shown in FIGS. The blocks divided into four, and the block having the size of horizontal 8 pixels × vertical 8 lines are divided into horizontal 8 pixels × vertical 4 lines, horizontal 4 as shown in FIGS. It is also possible to perform motion compensation prediction with a block divided into a size of pixel × vertical 8 lines and horizontal 4 pixels × vertical 4 lines.
[0008]
In the case of the JTV system, a large number of flags indicating what size block the macroblock of 16 horizontal pixels × 16 vertical lines is to be divided are required.
[0009]
For example, when a macro block of 16 horizontal pixels × vertical 16 lines is divided into two rectangular blocks of horizontal 16 pixels × vertical 8 lines, two motion vectors exist in one macro block. Thus, the number of motion vectors is smaller than when the macroblock is divided into four square blocks.
[0010]
By the way, in each of these compression encoding systems, as shown in FIG. 5, the motion vector MV (X) estimated for each macroblock or each small block obtained by dividing the macroblock is shown in one block. The motion vectors MV (A), MV (B), MV (C), and MV (D (D) in adjacent blocks A, B, C, and D are not encoded within the processing target block X in FIG. ) Is approximated, a motion vector difference (dMV (X)) is taken between adjacent blocks, and encoding is often performed using this difference (dMV (X)). For this reason, the amount of information (encoded information amount) generated after encoding becomes smaller as the direction and size of the motion vector are approximated between adjacent blocks.
[0011]
In FIG. 5, a portion surrounded by a broken line indicates one frame. Further, the processing target block X is located at an arbitrary position in this frame, and although not shown in FIG. 5, it is usually necessary to use all the blocks surrounding the processing target block X (adjacent blocks). There is.
[0012]
[Non-Patent Document 1]
Atsushi Kato et al. “Motion compensation based on block unit boundary model: Refinement of H.26L prediction method” Proceedings of the IEICE Conference, March 29, 2002, pp401-pp402
[Non-Patent Document 2]
Seiji Kimura et al. “Motion Compensation Method Based on Variable Size and Variable Shape Block” IEICE Transactions, February 1997 pp434-pp443
[0013]
[Problems to be solved by the invention]
However, the conventional compression coding method that performs motion compensation prediction in units of blocks of each original image included in a moving image has the following problems.
[0014]
MPEG-4, ITU-TH, which performs motion compensation prediction by dividing a macro block into small blocks. Although the H.263 and JVT systems are more likely to be able to compress and encode a moving image with a motion vector that matches the actual motion than the MPEG-1 and 2 systems, which can perform motion compensation prediction only in units of macroblocks. Therefore, the motion vector for each divided small block and additional information indicating how the macroblock is divided are required. Therefore, the amount of information is slightly increased as compared with the MPEG-1 and 2 systems in which one motion vector is assigned to one macroblock and compression coding is performed, thereby improving coding efficiency. However, there is a problem that it is not always efficient.
[0015]
Therefore, the object of the present invention is to solve the above-mentioned problems of the prior art, and to always compress and encode a moving image with optimum encoding efficiency without increasing the amount of information at the time of compression encoding. An encoding device, an encoding method, and an encoding program are provided.
[0016]
[Means for Solving the Problems]
In order to achieve the above-described object, the present invention has the following configuration.
The encoding apparatus according to claim 1 is an encoding apparatus that performs motion compensation prediction in units of blocks of each original image included in a moving image and compresses and encodes the moving image, and includes a macroblock dividing unit and The block group integration unit, the block group motion vector search unit, the small block motion compensation unit, the motion vector encoding unit, and the macroblock integrated information amount comparison unit are provided.
[0017]
According to such a configuration, the encoding apparatus divides the macro block into small blocks by the macro block dividing unit, and integrates the block into a block group in which the small blocks are combined by the block group integrating unit. That is, a macroblock divided into 16 horizontal pixels × vertical 16 lines is divided into blocks smaller than this size, for example, four small blocks of 8 horizontal pixels × 8 vertical lines, and the macroblock is divided into four. Alternatively, the macroblock is divided into three, one small block of horizontal 8 pixels × vertical 16 lines and two small blocks of horizontal 8 pixels × vertical 8 lines. Alternatively, the macro block is divided into two by dividing into one small block of horizontal 8 pixels × vertical 8 lines and the other remaining blocks.
[0018]
Subsequently, in this encoding device, the block group motion vector search means searches for the motion vector of the block group integrated by the block group integration means based on the reference image used when performing motion compensation prediction. This search for a motion vector indicates a corresponding block group in the previous (immediately preceding) image (frame) that is a reference image. That is, in this block group motion vector search means, the motion vector of the block group which is various combinations of small blocks is searched for the number of various combinations of small blocks by referring to the corresponding block group of the immediately preceding frame. Will be.
[0019]
The encoding apparatus performs motion compensation prediction for each small block by the small block motion compensation unit using the motion vector searched by the block group motion vector search unit, and the motion compensation prediction result and the original result. Outputs residual information generated by comparison with an image. That is, this motion compensation prediction (motion compensation process) is performed for each small block constituting the block group searched by the block group motion vector search means.
[0020]
Further, the encoding apparatus encodes the motion vector searched by the block group motion vector search means by the motion vector encoding means, and outputs the residual output from the small block motion compensation means by the macroblock integrated information amount comparison means. A block in which the total amount of information of difference information is summed for each macroblock unit, and the total amount of information obtained by adding the information amount of encoded motion vectors encoded by the motion vector encoding means is the smallest among the combinations of block groups. A group is selected as the optimum block group, and a motion vector of the optimum block group is output. That is, by selecting a motion vector that provides the best coding efficiency from among a plurality of integrated block groups, it is possible to improve the coding efficiency of moving images based on the motion vector.
[0021]
The encoding method according to claim 2 is an encoding method in which motion compensation prediction is performed in units of blocks of each original image included in a moving image, and the moving image is compressed and encoded. The procedure includes a block group integration step, a block group motion vector search step, a small block motion compensation step, a motion vector encoding step, and a macroblock integration information amount comparison step.
[0022]
According to such a procedure, the encoding method divides a macroblock into small blocks in the macroblock division step, and integrates the block into a block group in which the small blocks are combined in the block group integration step. Subsequently, in the block group motion vector search step, this encoding method searches for the motion vector of the block group integrated in the block group integration step based on the reference image used when performing motion compensation prediction. In the small block motion compensation step, the encoding method performs motion compensation prediction for each small block using the motion vector searched in the block group motion vector search step, and the motion compensation prediction result Residual information generated by comparison with the original image is output.
[0023]
Also, this encoding method encodes the motion vector searched in the block group motion vector search step in the motion vector encoding step, and outputs it in the small block motion compensation step in the macroblock integrated information amount comparison step. The total amount of residual information is summed for each macroblock unit, and the total amount of information obtained by adding the encoded motion vector information amount encoded in the motion vector encoding step is the smallest among the block group combinations. Is selected as the optimum block group, and the motion vector of this optimum block group is output.
[0024]
4. The encoding program according to claim 3, wherein an apparatus for performing motion compensation prediction in units of blocks of each original image included in a moving image and compressing and encoding the moving image includes a macroblock dividing unit and a block group integrating unit. , Block group motion vector search means, small block motion compensation means, motion vector encoding means, and macroblock integrated information amount comparison means.
[0025]
According to such a configuration, the encoding program divides the macro block into small blocks by the macro block dividing unit and integrates the block into a block group in which the small blocks are combined by the block group integrating unit. Subsequently, in the encoding program, the block group motion vector search unit searches for the motion vector of the block group integrated by the block group integration unit based on the reference image used when motion compensation prediction is performed. Then, the encoding program performs motion compensation prediction for each small block using the motion vector searched by the block group motion vector search means in the small block motion compensation means, and the result of the motion compensation prediction Residual information generated by comparison with the original image is output.
[0026]
In addition, this encoding program encodes the motion vector searched by the block group motion vector search means by the motion vector encoding means, and is output by the small block motion compensation means by the macroblock integrated information amount comparison means. The total amount of information of the residual information is summed for each macroblock unit, and the total amount of information obtained by adding the information amount of the encoded motion vector encoded by the motion vector encoding means is the smallest among the combinations of the block groups. Is selected as the optimum block group, and the motion vector of this optimum block group is output.
[0027]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
(Configuration of encoding device)
FIG. 1 is a block diagram of an encoding apparatus. As shown in FIG. 1, the encoding apparatus 1 receives a macroblock (macroblock signal) obtained by dividing each image constituting a moving image, outputs a motion vector of the macroblock, An image is encoded, and includes a macroblock division unit 3, a block group integration unit 5, a block group accumulation sequential output unit 7, a block group motion vector search unit 9, a reference image accumulation unit 11, and a motion vector code. A conversion unit 13, a motion vector storage unit 15, a small block motion compensation unit 17, and a macroblock total information amount comparison unit 19.
[0028]
The macroblock dividing unit 3 (macroblock dividing means) converts the inputted macroblock signal (horizontal 16 pixels × vertical 16 lines) into small blocks (horizontal 16 pixels × vertical 8 lines, horizontal 8 pixels × vertical 16 lines, horizontal 8). A divided block signal divided into pixels × vertical 8 lines) is output to the block group integration unit 5.
[0029]
That is, the macroblock dividing unit 3 divides the macroblock into rectangular or square small blocks in a format according to the MPEG-4 or JVT system. According to MPEG-4, a motion vector is added to each of a mode in which one macro block is expressed with one motion vector and a small block obtained by dividing the macro block into four. Mode.
[0030]
Further, in accordance with the JVT method, a macro block that does not divide horizontal 16 pixels × vertical 16 lines, a square block of horizontal 8 pixels × vertical 8 lines, horizontal 16 pixels × vertical 8 lines, and horizontal 8 pixels × vertical. A 16-line rectangular block is divided into blocks of horizontal 8 pixels × vertical 4 lines obtained by further dividing horizontal 8 pixels × vertical 8 lines, horizontal 4 pixels × vertical 8 lines, and horizontal 4 pixels × vertical 4 lines.
[0031]
The block group integration unit 5 (block group integration means) integrates the divided block signals (small blocks) obtained by dividing the macro block by the macro block division unit 3 to generate various combinations of block group signals (block groups). And output to the block group accumulation sequential output unit 7. In the block group integration unit 5, as shown in FIG. 3, a block group is generated by a combination of all small blocks.
[0032]
As shown in FIG. 3 (1), the macroblock is divided into four small blocks, and the directions and sizes of the three motion vectors are approximate, but are slightly different, so encoding is performed. A differential signal is generated.
[0033]
FIG. 3B shows a case where the macroblock is not divided (non-divided). Note that the symbols “a”, “b”, and “c” shown in FIG. 3 indicate divided areas. FIGS. 3 (3) to 3 (9) show block groups when the macroblock is divided into two, and FIGS. 3 (10) to 3 (19) show blocks when the macroblock is divided into three. Shows the group.
[0034]
In FIG. 3 (3), the upper left horizontal 8 pixels × vertical 8 lines small block is divided into areas other than this block, and conversely, in FIG. 3 (4), the upper right horizontal 8 pixels. X Divided into small 8-line vertical blocks and areas other than these blocks. Further, in FIG. 3 (5), it is divided into a small block of horizontal 8 pixels × vertical 8 lines in the lower left and an area other than this block. Conversely, in FIG. It is divided into a small block of 8 pixels × vertical 8 lines and an area other than this block.
[0035]
In FIG. 3 (7), it is divided into two small blocks of horizontal 16 pixels × vertical 8 lines, and in FIG. 3 (8), it is divided into two small blocks of horizontal 8 pixels × vertical 16 lines. In FIG. 3 (9), it is divided into 4 blocks of 8 blocks horizontal x 8 vertical blocks. However, since the divided areas are “a” and “b” areas, they are divided into two as a result. Will be.
[0036]
In FIG. 3 (10), the left half is divided into small blocks of 16 horizontal pixels × vertical 8 lines, and the right half is divided into 2 small blocks of 8 horizontal pixels × vertical 8 lines. In FIG. 3 (11), the left half is divided into two small blocks of horizontal 8 pixels × vertical 8 lines, and the right half is divided into small blocks of horizontal 16 pixels × vertical 8 lines.
[0037]
In FIG. 3 (12), the upper half is divided into small blocks of 8 horizontal pixels × vertical 16 lines, and the lower half is divided into 2 small blocks of 8 horizontal pixels × vertical 8 lines. In FIG. 3 (13), the upper half is divided into two small blocks of 8 horizontal pixels × vertical 8 lines, and the lower half is divided into small blocks of 8 horizontal pixels × vertical 16 lines.
[0038]
3 (14) and 16 (16), it is divided into four blocks of horizontal 8 pixels × vertical 8 lines, and the upper right part and the lower left part are the same area. As a result, “a”, “b”, “ It is divided into three areas c ″. 3 (15) and 3 (17), the block is divided into four blocks of horizontal 8 pixels × vertical 8 lines, and the upper left and lower right are the same area. As a result, “a”, “b” , “C” area is divided into three.
[0039]
Returning to FIG. 1, the description will be continued.
The block group accumulation sequential output unit 7 accumulates the block group signal (block group) integrated by the block group integration unit 5 and sequentially stores the accumulated block group signal (block group) in the block group motion vector search unit 9. Output. For example, the block group is sequentially (in order) output from the block group accumulation sequential output unit 7 immediately after the block group motion vector input to the block group motion vector search unit 9 is searched.
[0040]
The block group motion vector search unit 9 (block group motion vector search means) receives the motion vector for each small block constituting the input block group as a reference image signal (reference image, one image) stored in the reference image storage unit 11. The previous frame) is searched and output to the motion vector encoding unit 13 and the motion vector storage unit 15 as a motion vector signal. In this embodiment, the block group motion vector search unit 9 searches for a block group motion vector by the block matching method.
[0041]
The reference image accumulating unit 11 accumulates, as a reference image, an image of a frame immediately before (immediately before) a macroblock signal obtained by dividing each image included in the moving image input to the apparatus 1. The reference image storage unit 11 is usually composed of a frame memory.
[0042]
The motion vector encoding unit 13 outputs an encoded motion vector obtained by encoding the motion vector signal (motion vector for each small block) output from the block group motion vector search unit 9 to the macroblock integrated information amount comparison unit 19. Is. The motion vector encoding unit 13 takes a difference between the motion vector of the small block constituting the block group input to the block group motion vector search unit 9 and the motion vector of the macro block adjacent to the macro block, The difference is encoded.
[0043]
The motion vector accumulation unit 15 accumulates the motion vector of the block group searched by the block group motion vector search unit 9.
[0044]
The small block motion compensation unit 17 is a block group motion vector searched by the block group motion vector search unit 9 and stored in the motion vector storage unit 15, and a reference image signal output (supplied) from the reference image storage unit 11. (Reference image) is used to perform motion compensation processing (output of motion compensation residual signal [residual information]) for each small block.
[0045]
The macroblock total information amount comparison unit 19 includes a motion compensation residual signal (residual information) output from the small block motion compensation unit 17, a macroblock signal (macroblock) input to the apparatus 1, and a motion vector. Based on the encoded motion vector signal (encoded motion vector) output from the encoding unit 13, the block group (see FIG. 3) integrated by the block group integration unit 5 has the highest encoding efficiency. And a motion vector obtained in this block group is output as a final motion vector signal.
[0046]
That is, in the macroblock integrated information amount comparison unit 19, first, using the result of motion compensation for each small block in the small block motion compensation unit 17, the reference image, that is, the immediately preceding original image included in the moving image is used. The information amount of the residual information (motion compensation residual signal) generated by the comparison is totaled in the macroblock. Next, a total information amount obtained by adding the information amount of the encoded motion vector (encoded motion vector signal) encoded by the motion vector encoding unit 13 to the total information amount is obtained. Then, a block group is selected that is a combination of small blocks that minimizes the total information amount (minimum encoded information amount). That is, the block group integration unit 5 selects an optimal combination from the block groups in which the small blocks are combined, and the motion vector of the block group obtained by this combination is finally output (final motion vector signal). It becomes.
[0047]
According to this encoding apparatus 1, the macroblock dividing unit 3 divides the macroblock into small blocks, and the block group integrating unit 5 integrates the block into a block group obtained by combining the small blocks. Subsequently, the block group motion vector search unit 9 searches the block group motion vector integrated by the block group integration unit 5 and stored by the block group storage sequential output unit 7 based on the reference image. Then, the motion compensation prediction is performed for each small block by the motion vector searched by the block group motion vector search unit 9 by the small block motion compensation unit 17 and the result of the motion compensation prediction is compared with the reference image. The generated residual information is output.
[0048]
Further, the motion vector searched by the block group motion vector search unit 9 is encoded by the motion vector encoding unit 13, and the residual output from the small block motion compensation unit 17 by the macroblock integrated information amount comparison unit 19 is encoded. A block in which the total amount of information is summed for each macroblock unit, and the total amount of information obtained by adding the information amount of the encoded motion vector encoded by the motion vector encoding unit 13 is the smallest among the combinations of the block groups. A group is selected as the optimum block group, and a motion vector of the optimum block group is output. That is, by selecting a motion vector having the best encoding efficiency from among the block groups integrated in a plurality of ways by the block group integration unit 5, the encoding efficiency of the moving image is improved based on this motion vector. be able to. That is, it is possible to always compress and encode a moving image with optimum encoding efficiency without increasing the amount of information when the moving image is encoded (compression encoded).
[0049]
(Operation of encoding device)
Next, the operation of the encoding apparatus 1 will be described with reference to the flowchart shown in FIG. 2 (see FIG. 1 as appropriate).
[0050]
First, the macroblock signal (macroblock) inputted by the macroblock dividing unit 3 in accordance with the encoding method (MPEG-4, JVT method) is horizontal 8 pixels × vertical 8 lines, horizontal 16 pixels × vertical. Divided into small blocks of 8 lines, horizontal 8 pixels × vertical 16 lines, etc. (S1). Subsequently, the block group integration unit 5 integrates the small blocks divided by the macroblock division unit 3 into various combined block groups (generates a block group) (S2).
[0051]
Then, the block group motion vector search unit 9 searches for a motion vector for each block group (S3). Then, the small block motion compensation unit 17 performs a motion compensation process (motion compensation prediction) for each small block, and outputs residual information (compensation error) to the macroblock integrated information amount comparison unit 19 (S4). Also, the motion vector encoding unit 13 outputs the encoded motion vector obtained by encoding the motion vector to the macroblock integrated information amount comparison unit 19.
[0052]
Then, the macroblock total information amount comparison unit 19 adds the information amount of residual information (compensation error) in the macroblock, and the total information amount obtained by adding the information amount of the encoded motion vector to the total information amount. Are compared with the information amount of the block group at the corresponding portion of the reference image, and the smaller information amount is selected and held (S5).
[0053]
The process of S5 is performed for all block groups (all combinations) integrated by the block group integration unit 5, and it is determined whether or not all combinations have been completed (S6), and it is determined that all combinations have been completed. If not (S6, No), the process returns to S2, and if it is determined that all combinations have been completed (S6, Yes), the block information group whose total information amount (encoded information amount) is minimized A motion vector is output (S7). For example, as shown in FIG. 3A, when there are four motion vectors, that is, when the three motion vectors are directed in the upper right direction and one motion vector is directed in the left direction. In addition, the final motion vector is obtained by shortening the length of the motion vector shown in the upper right.
[0054]
As mentioned above, although this invention was demonstrated based on one Embodiment, this invention is not limited to this.
For example, the processing of each component of the encoding device 1 can be regarded as an encoding method that considers each process as one process, or the encoding of the processing of each component of the encoding device 1 described in a general-purpose computer language It can also be regarded as a program. In these cases, the same effect as that of the encoding device 1 can be obtained.
[0055]
【The invention's effect】
According to the first, second, and third aspects of the present invention, the motion vector having the highest coding efficiency is selected from among a group of blocks obtained by integrating a plurality of small blocks obtained by dividing a macroblock. Therefore, it is possible to improve the coding efficiency of moving images, and always compress and code moving images with optimal coding efficiency without increasing the amount of information when coding (compressing) moving images. Can be
[Brief description of the drawings]
FIG. 1 is a block diagram of an encoding apparatus according to an embodiment of the present invention.
FIG. 2 is a flowchart for explaining the operation of the encoding apparatus shown in FIG. 1;
FIG. 3 is a diagram illustrating a block group in which small blocks are integrated by a block group integration unit.
FIG. 4 is a diagram illustrating division of a conventional macroblock.
FIG. 5 is a diagram illustrating encoding of a conventional motion vector.
[Explanation of symbols]
1 Encoder
3 Macroblock division (macroblock division means)
5 Block group integration unit (block group integration means)
7 Block group accumulation sequential output section
9 Block group motion vector search unit (block group motion vector search means)
11 Reference image storage unit
13 Motion vector encoding unit (motion vector encoding means)
15 Motion vector storage unit
17 Small block motion compensation unit (small block motion compensation means)
19 Macroblock integrated information amount comparison unit (macroblock integrated information amount comparison means)

Claims (3)

動画像に含まれる各原画像のブロックの単位で動き補償予測を行って、当該動画像を圧縮符号化する符号化装置であって、
前記原画像が分割されたマクロブロックを、当該マクロブロックよりも小さいブロックである小ブロックに分割するマクロブロック分割手段と、
このマクロブロック分割手段で分割された小ブロックを組み合わせたブロック群に統合するブロック群統合手段と、
このブロック群統合手段で統合されたブロック群の動きベクトルを、前記動き補償予測する際に用いられる参照画像に基づいて探索するブロック群動きベクトル探索手段と、
このブロック群動きベクトル探索手段で探索された動きベクトルを、前記小ブロック毎に動き補償予測を行うと共に、この動き補償予測の結果と前記原画像との比較により発生した残差情報を出力する小ブロック動き補償手段と、
前記ブロック群動きベクトル探索手段で探索された動きベクトルを符号化した符号化動きベクトルとする動きベクトル符号化手段と、
前記小ブロック動き補償手段で出力された残差情報の情報量を前記マクロブロック毎に合計し、前記動きベクトル符号化手段で符号化された符号化動きベクトルの情報量を加算した合計情報量が、前記ブロック群の組み合わせの中で最小となるブロック群を最適ブロック群として選択し、この最適ブロック群の動きベクトルを出力するマクロブロック統合情報量比較手段と、
を備えることを特徴とする符号化装置。
An encoding device that performs motion compensation prediction in units of blocks of each original image included in a moving image and compresses and encodes the moving image,
Macroblock dividing means for dividing the macroblock obtained by dividing the original image into small blocks that are smaller than the macroblock;
A block group integrating means for integrating the block blocks combined by the macroblock dividing means into a combined block group;
A block group motion vector search means for searching for a motion vector of the block group integrated by the block group integration means based on a reference image used in the motion compensation prediction;
The motion vector searched by the block group motion vector search means performs motion compensation prediction for each small block, and outputs a residual information generated by comparing the result of the motion compensation prediction with the original image. Block motion compensation means;
A motion vector encoding unit that uses the motion vector searched by the block group motion vector search unit as an encoded motion vector;
The total amount of information of the residual information output by the small block motion compensation unit is totaled for each macroblock, and the total amount of information obtained by adding the information amount of the encoded motion vector encoded by the motion vector encoding unit is Selecting a block group that is the smallest among the combinations of the block groups as an optimum block group, and outputting a motion vector of the optimum block group, a macroblock integrated information amount comparison unit;
An encoding device comprising:
動画像に含まれる各原画像のブロックの単位で動き補償予測を行って、当該動画像を圧縮符号化する符号化方法であって、
前記原画像が分割されたマクロブロックを、当該マクロブロックよりも小さいブロックである小ブロックに分割するマクロブロック分割ステップと、
このマクロブロック分割ステップにおいて分割された小ブロックを組み合わせたブロック群に統合するブロック群統合ステップと、
このブロック群統合ステップにおいて統合されたブロック群の動きベクトルを、前記動き補償予測する際に用いられる参照画像に基づいて探索するブロック群動きベクトル探索ステップと、
このブロック群動きベクトル探索ステップにおいて探索された動きベクトルを、前記小ブロック毎に動き補償予測を行うと共に、この動き補償予測の結果と前記原画像との比較により発生した残差情報を出力する小ブロック動き補償ステップと、
前記ブロック群動きベクトル探索ステップにおいて探索された動きベクトルを符号化した符号化動きベクトルとする動きベクトル符号化ステップと、
前記小ブロック動き補償ステップにおいて出力された残差情報の情報量を前記マクロブロック毎に合計し、前記動きベクトル符号化ステップにおいて符号化された符号化動きベクトルの情報量を加算した合計情報量が、前記ブロック群の組み合わせの中で最小となるブロック群を最適ブロック群として選択し、この最適ブロック群の動きベクトルを出力するマクロブロック統合情報量比較ステップと、
を含むことを特徴とする符号化方法。
An encoding method that performs motion compensation prediction in units of blocks of each original image included in a moving image and compresses and encodes the moving image,
A macroblock dividing step of dividing the macroblock obtained by dividing the original image into small blocks that are smaller than the macroblock;
A block group integration step of integrating the small blocks divided in this macroblock division step into a block group that is combined;
A block group motion vector search step for searching for a motion vector of the block group integrated in the block group integration step based on a reference image used in the motion compensation prediction;
The motion vector searched in the block group motion vector search step is subjected to motion compensation prediction for each small block, and the residual information generated by comparing the result of the motion compensation prediction with the original image is output. A block motion compensation step;
A motion vector encoding step in which the motion vector searched in the block group motion vector search step is an encoded motion vector encoded;
The total amount of information of the residual information output in the small block motion compensation step is totaled for each macroblock, and the total amount of information obtained by adding the information amount of the encoded motion vector encoded in the motion vector encoding step is Selecting a block group that is the smallest among the combinations of the block groups as an optimal block group, and outputting a motion vector of the optimal block group, a macroblock integrated information amount comparison step;
The encoding method characterized by including.
動画像に含まれる各原画像のブロックの単位で動き補償予測を行って、当該動画像を圧縮符号化する装置を、
前記原画像が分割されたマクロブロックを、当該マクロブロックよりも小さいブロックである小ブロックに分割するマクロブロック分割手段、
このマクロブロック分割手段で分割された小ブロックを組み合わせたブロック群に統合するブロック群統合手段、
このブロック群統合手段で統合されたブロック群の動きベクトルを、前記動き補償予測する際に用いられる参照画像に基づいて探索するブロック群動きベクトル探索手段、
このブロック群動きベクトル探索手段で探索された動きベクトルを、前記小ブロック毎に動き補償予測を行うと共に、この動き補償予測の結果と前記原画像との比較により発生した残差情報を出力する小ブロック動き補償手段、
前記ブロック群動きベクトル探索手段で探索された動きベクトルを符号化した符号化動きベクトルとする動きベクトル符号化手段、
前記小ブロック動き補償手段で出力された残差情報の情報量を前記マクロブロック毎に合計し、前記動きベクトル符号化手段で符号化された符号化動きベクトルの情報量を加算した合計情報量が、前記ブロック群の組み合わせの中で最小となるブロック群を最適ブロック群として選択し、この最適ブロック群の動きベクトルを出力するマクロブロック統合情報量比較手段、
として機能させることを特徴とする符号化プログラム。
A device that performs motion compensation prediction in units of blocks of each original image included in the moving image and compresses and encodes the moving image,
Macroblock dividing means for dividing the macroblock obtained by dividing the original image into small blocks that are smaller than the macroblock;
A block group integration unit that integrates a small block divided by the macroblock division unit into a combined block group;
A block group motion vector search means for searching for a motion vector of the block group integrated by the block group integration means based on a reference image used in the motion compensation prediction;
The motion vector searched by the block group motion vector search means performs motion compensation prediction for each small block, and outputs a residual information generated by comparing the result of the motion compensation prediction with the original image. Block motion compensation means,
A motion vector encoding means for encoding a motion vector searched by the block group motion vector search means;
The total amount of information of the residual information output by the small block motion compensation unit is totaled for each macroblock, and the total amount of information obtained by adding the information amount of the encoded motion vector encoded by the motion vector encoding unit is Selecting a block group that is the smallest among the combinations of the block groups as an optimum block group, and outputting a motion vector of the optimum block group, a macroblock integrated information amount comparison unit;
An encoding program characterized in that it is made to function as:
JP2003173583A 2003-06-18 2003-06-18 Encoding apparatus, encoding method, and encoding program Pending JP2005012439A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003173583A JP2005012439A (en) 2003-06-18 2003-06-18 Encoding apparatus, encoding method, and encoding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003173583A JP2005012439A (en) 2003-06-18 2003-06-18 Encoding apparatus, encoding method, and encoding program

Publications (1)

Publication Number Publication Date
JP2005012439A true JP2005012439A (en) 2005-01-13

Family

ID=34097361

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003173583A Pending JP2005012439A (en) 2003-06-18 2003-06-18 Encoding apparatus, encoding method, and encoding program

Country Status (1)

Country Link
JP (1) JP2005012439A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008206047A (en) * 2007-02-22 2008-09-04 Nippon Hoso Kyokai <Nhk> Encoding apparatus and program
JP2009509405A (en) * 2005-09-16 2009-03-05 ソニー エレクトロニクス インク Variable shape motion estimation in video sequences
JP2009182792A (en) * 2008-01-31 2009-08-13 Oki Electric Ind Co Ltd Device and method for detecting motion vector, device and method for coding moving image, and device and method for decoding moving image
WO2011125299A1 (en) * 2010-04-07 2011-10-13 株式会社Jvcケンウッド Moving image encoding device, moving image encoding method, moving image encoding program, moving image decoding device, moving image decoding method, and moving image decoding program
JP2011234338A (en) * 2010-04-07 2011-11-17 Jvc Kenwood Corp Dynamic image decoder, dynamic image decoding method and dynamic image decoding program
JP2011234337A (en) * 2010-04-07 2011-11-17 Jvc Kenwood Corp Moving image encoding apparatus, moving image encoding method and moving image encoding program
JP2012257148A (en) * 2011-06-10 2012-12-27 Nippon Hoso Kyokai <Nhk> Motion vector detection apparatus, encoder, decoder and program of them
CN103503461A (en) * 2011-05-05 2014-01-08 三菱电机株式会社 Residual quadtree structure for transform units in non-square prediction units
WO2016031253A1 (en) * 2014-08-28 2016-03-03 日本電気株式会社 Block size determining method and program recording medium
JP2020167732A (en) * 2016-05-10 2020-10-08 サムスン エレクトロニクス カンパニー リミテッド How to encode / decode video and its equipment

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009509405A (en) * 2005-09-16 2009-03-05 ソニー エレクトロニクス インク Variable shape motion estimation in video sequences
JP2008206047A (en) * 2007-02-22 2008-09-04 Nippon Hoso Kyokai <Nhk> Encoding apparatus and program
US8369409B2 (en) 2008-01-31 2013-02-05 Oki Electric Industry Co., Ltd. Motion vector detection apparatus and method, moving picture encoding apparatus and method, and moving picture decoding apparatus and method
JP2009182792A (en) * 2008-01-31 2009-08-13 Oki Electric Ind Co Ltd Device and method for detecting motion vector, device and method for coding moving image, and device and method for decoding moving image
JP2013232967A (en) * 2010-04-07 2013-11-14 Jvc Kenwood Corp Moving image decoding device, moving image decoding method, and moving image decoding program
JP2011234338A (en) * 2010-04-07 2011-11-17 Jvc Kenwood Corp Dynamic image decoder, dynamic image decoding method and dynamic image decoding program
CN102918842A (en) * 2010-04-07 2013-02-06 Jvc建伍株式会社 Moving image encoding device, moving image encoding method, moving image encoding program, moving image decoding device, moving image decoding method, and moving image decoding program
JP2013225927A (en) * 2010-04-07 2013-10-31 Jvc Kenwood Corp Moving image encoding device, moving image encoding method and moving image encoding program
WO2011125299A1 (en) * 2010-04-07 2011-10-13 株式会社Jvcケンウッド Moving image encoding device, moving image encoding method, moving image encoding program, moving image decoding device, moving image decoding method, and moving image decoding program
JP2011234337A (en) * 2010-04-07 2011-11-17 Jvc Kenwood Corp Moving image encoding apparatus, moving image encoding method and moving image encoding program
CN102918842B (en) * 2010-04-07 2016-05-18 Jvc建伍株式会社 Moving image encoding device and method and moving image decoding apparatus and method
CN103503461B (en) * 2011-05-05 2016-11-09 三菱电机株式会社 How to encode and decode images
CN103503461A (en) * 2011-05-05 2014-01-08 三菱电机株式会社 Residual quadtree structure for transform units in non-square prediction units
JP2014511628A (en) * 2011-05-05 2014-05-15 三菱電機株式会社 Method for coding video
JP2012257148A (en) * 2011-06-10 2012-12-27 Nippon Hoso Kyokai <Nhk> Motion vector detection apparatus, encoder, decoder and program of them
WO2016031253A1 (en) * 2014-08-28 2016-03-03 日本電気株式会社 Block size determining method and program recording medium
JPWO2016031253A1 (en) * 2014-08-28 2017-06-15 日本電気株式会社 Block size determination method and program
US10356403B2 (en) 2014-08-28 2019-07-16 Nec Corporation Hierarchial video code block merging using depth-dependent threshold for block merger
JP2020167732A (en) * 2016-05-10 2020-10-08 サムスン エレクトロニクス カンパニー リミテッド How to encode / decode video and its equipment
CN115174936A (en) * 2016-05-10 2022-10-11 三星电子株式会社 Method for encoding/decoding image and apparatus therefor
US11770526B2 (en) 2016-05-10 2023-09-26 Samsung Electronics Co., Ltd. Method for encoding/decoding image and device therefor
US12126801B2 (en) 2016-05-10 2024-10-22 Samsung Electronics Co., Ltd. Method for encoding/decoding image and device therefor
CN115174936B (en) * 2016-05-10 2025-03-28 三星电子株式会社 Method and device for encoding/decoding an image

Similar Documents

Publication Publication Date Title
KR101918012B1 (en) Image prediction encoding device, image prediction decoding device, image prediction encoding method, image prediction decoding method, image prediction encoding program, and image prediction decoding program
JP5289440B2 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
JP6091585B2 (en) Image decoding apparatus, image encoding apparatus, and encoded data
JP6807987B2 (en) Image coding device, moving image decoding device, moving image coding data and recording medium
CN101682777B (en) Image prediction encoding device, image prediction decoding device, image prediction encoding method, image prediction decoding method
KR101336204B1 (en) A method and apparatus for encoding or decoding frames of different views in multiview video using global disparity
WO2010001916A1 (en) Image processing device and method
KR101592535B1 (en) Image encoding method, image decoding method, image encoding device, image decoding device, image encoding program, and image decoding program
JP5795525B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, image encoding program, and image decoding program
CN1984340A (en) Method and apparatus for encoding and decoding of video
JPWO2010137323A1 (en) Video encoding apparatus, video decoding apparatus, video encoding method, and video decoding method
JP2002532029A (en) Efficient macroblock header coding for video compression
KR101552664B1 (en) Method and device for encoding images, method and device for decoding images, and programs therefor
EP2645721A2 (en) Method and device to identify motion vector candidates using a scaled motion search
CN114390289B (en) Reference pixel candidate list construction method, device, equipment and storage medium
US20130064457A1 (en) Dynamic image encoding device, dynamic image decoding device, dynamic image encoding method, dynamic image decoding method, dynamic image encoding program, and dynamic image decoding program
KR100824161B1 (en) Image processing unit
JP2005012439A (en) Encoding apparatus, encoding method, and encoding program
US20120121019A1 (en) Image processing device and method
US20150271502A1 (en) Video encoding device, video decoding device, video encoding method, and video decoding method
JP2013098711A (en) Video encoding device, video decoding device, video encoding method, and video decoding method
MXPA05001204A (en) Method for compressing digital data of a video sequence comprising alternated shots.
CN113056918B (en) Image encoding device, image decoding device and program
JP2004221744A (en) Moving picture encoding apparatus, its method and program, and moving picture decoding apparatus, its method and program
US20150358626A1 (en) Image encoding apparatus, image analyzing apparatus, image encoding method, and image analyzing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060214

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071023

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071031

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080304