JP2004032300A - Video compression encoding device - Google Patents
Video compression encoding device Download PDFInfo
- Publication number
- JP2004032300A JP2004032300A JP2002184801A JP2002184801A JP2004032300A JP 2004032300 A JP2004032300 A JP 2004032300A JP 2002184801 A JP2002184801 A JP 2002184801A JP 2002184801 A JP2002184801 A JP 2002184801A JP 2004032300 A JP2004032300 A JP 2004032300A
- Authority
- JP
- Japan
- Prior art keywords
- encoding
- block
- coding
- frame
- unit
- 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
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
【課題】従来、構成を複雑化することなく符号化ストリームを一定の転送レートに制御することのできる動画圧縮符号化装置の提供は困難であった。
【解決手段】映像データの各フレームをブロック単位に分割し該ブロック毎に現フレームと前フレームとの予測される動き差分を検出する手段202と、該予測される動き差分の結果または元の画像データに対して規定された直交変換および量子化を実施して可変長符号化を行う手段203, 204と、該可変長符号化されたデータに対して規定された逆量子化、逆直交変換および動き補償処理を実施して復号画像を生成する手段209, 210, 211と、前記可変長符号化の処理時に、各ブロックの符号化を途中で打ち切る符号化打ち切り手段2071と、該符号化打ち切りが通知されることにより、次フレーム画像の符号化において動き予測を用いない符号化を実施するように制御するフレーム管理手段213と、を備えるように構成する。
【選択図】 図3Conventionally, it has been difficult to provide a moving picture compression encoding apparatus capable of controlling an encoded stream at a constant transfer rate without complicating the configuration.
A means for dividing each frame of video data into blocks and detecting a predicted motion difference between a current frame and a previous frame for each block, a result of the predicted motion difference or an original image Means 203 and 204 for performing variable-length coding by performing orthogonal transform and quantization specified for the data, and performing inverse quantization, inverse orthogonal transform, and inverse quantization specified for the variable-length coded data. Means 209, 210, 211 for performing a motion compensation process to generate a decoded image; coding terminating means 2071 for terminating the encoding of each block during the variable length encoding process; In response to the notification, there is provided a frame management unit 213 that controls so as to perform encoding without using motion prediction in encoding of the next frame image. To.
[Selection diagram] FIG.
Description
【0001】
【発明の属する技術分野】
本発明は、動画圧縮符号化装置に関し、特に、映像信号に対してディジタル圧縮符号化を行うエンコード装置における発生符号量の制御技術に関する。
【0002】
近年、動画像、静止画像、音声およびテキスト等の各種データを統合的に取り扱うマルチメディアシステムの研究開発が各方面で活発に行われている。ところで、映像信号は、重要な情報源の1つではあるが、その莫大なデータ量を効率良く圧縮することが必要とされ、また、国際標準化が進んでいる。映像信号の圧縮符号化国際標準として、ISO−IEC 14496−2 にビジュアル符号化ストリームのシンタックスおよびその復号化方式が示されており、通称MPEG−4(ISO(International Standardization Organization)で審議が行われているMPEG(Moving Picture Experts Group)のうち、特に、マルチメディア対応の標準化技術を目指しているPhase 4)と呼ばれている。
【0003】
通常、低ビットレートで画面サイズの小さい映像を扱うアプリケーションでは、MPEG−4のシンプルプロファイルと呼ばれる規格が採用される。シンプルプロファイルでは、動画の構成要素である各フレーム画像に対して、I−VOP(フレーム内符号化VOP(Intra Video Object Plane))と呼ばれる現フレーム画像の情報のみから圧縮符号化を行う画像符号化タイプと、P−VOP(フレーム間順方向予測符号化VOP(Predicted Video Object Plane))と呼ばれる前フレーム画像を予測値として現フレーム画像との動き差分を圧縮符号化する画像符号化タイプの2種類のフレーム符号化タイプが定義されている。
【0004】
一般的に、動画像の符号化では映像の動きをベースに符号化効率を向上させるため、1フレーム画像のI−VOP符号化に対して複数フレーム画像のP−VOP符号化が連続して実施される。また、このような符号化を行うエンコード装置(動画圧縮符号化装置)では、符号化された映像ストリームを伝送する通信路の帯域が限られているため、符号化ストリームを一定の転送レートになるように制御する必要がある。そこで、構成を複雑化することなく符号化ストリームを一定の転送レートに制御することのできる動画圧縮符号化装置の提供が要望されている。
【0005】
【従来の技術】
図1は従来の動画圧縮符号化装置の一例を示すブロック図であり、MPEG−4の圧縮技術に用いられるエンコード装置の構成を示すものである。図1において、参照符号101は現画像メモリ、102は動き差分検出部、103はDCT部、104は量子化部、105はDC・AC予測部、106はレート制御部、そして、107は可変長符号化部を示している。また、参照符号108は発生符号バッファ、109は逆量子化部、110はIDCT部、111は動き差分補償部、そして、112は復号画像メモリを示している。
【0006】
現画像メモリ101は、映像信号の1フレームをディジタル化した画像データを記憶するメモリである。ここで、MPEG−4において、1フレームの画像は、16×16画素のマクロブロックと呼ばれる処理単位に分割して扱われ、さらに、1マクロブロックは、8×8画素の輝度信号ブロック4個と8×8画素の色差信号ブロック2個、つまり6個のブロックに分割して処理される。なお、色差信号は、輝度信号に比べて、水平方向および垂直方向ともに1/2の解像度で処理される。
【0007】
動き差分検出部102は、P−VOPタイプで符号化される現画像の各ブロック画素データを現画像メモリ101から入力し、該ブロックに対して、復号画像メモリ112に記憶されている前フレームの復号画像との動き差分値が最小となるような動きベクトルを検出し、その動き差分値をDCT部103に出力する。ここで、動きベクトルとは、現フレーム画像と直前のフレーム画像(前フレーム画像)との水平方向および垂直方向における位置の変位を示す2次元ベクトルであり、また、動き差分値とは、現画像ブロックの各画素データから、動きベクトル分だけ変位した前フレーム画像の8×8ブロックの相対する画素データを差し引いたものである。一般的に、動き差分値が最小とは、各画素の差分絶対値の総和が最小であることを意味する。
【0008】
I−VOPタイプのフレーム画像については、動き差分検出部102における動き差分検出処理は行われず、現画像メモリ101から読み出されたブロック画素データがそのままDCT部103に出力される。また、MPEG−4の仕様では、P−VOP内のマクロブロックに対して動き差分検出を行わない指定が可能である。これは、フレーム画像間で動きが激しく、動き予測ブロックと現画像ブロックの動き差分が大きいブロックに対して有効である。なお、動き予測を行わないマクロブロックをイントラマクロブロックと呼び、また、動き予測を行うマクロブロックをインターマクロブロックと呼ぶ。
【0009】
図2は動き差分検出部における処理を説明するための図であり、図2(a)はビデオシーケンスを示し、また、図2(b)はブロックマッチング処理を示している。
【0010】
図2(a)に示されるように、動画圧縮符号化装置には、時間に伴って複数のフレームの画像データが入力され、前述したように、例えば、16×16画素のマクロブロックMBにより処理される。図2(a)において、参照符号CFは現フレーム(カレントフレーム)を示し、RFは直前のフレーム(参照フレーム)を示し、そして、SWは直前のフレームRFにおけるサーチウィンドウ(探索領域)を示している。
【0011】
図2(b)に示されるように、現フレームCFのマクロブロックMBは、直前のフレームRFにおけるサーチウィンドウSWにおいて、動き差分値が最小となるような動きベクトルの検出が行われる(P−VOPタイプの符号化処理)。
【0012】
DCT部103は、8×8画素のブロック画素データに対して、離散コサイン変換(Discrete Cosine Translation)と呼ばれる周波数変換を施すものであり、この離散コサイン変換された結果は8×8、つまり、64個のDCT係数データとなる。このうち、第1の係数をDC(直流)成分と呼び、それ以外の63個の係数をAC(交流)成分と呼ぶ。
【0013】
量子化部104は、入力される各DCT係数データを量子化スケールと呼ばれる値で除算することにより、DCT係数の精度を粗くし、量子化DCT係数を生成する。生成された量子化DCT係数は、DC・AC予測部105および逆量子化部109の入力となる。この量子化部104における処理において、算術的に量子化スケールを大きくすれば量子化DCT係数の値は小さくなり、結果として発生符号量を抑えることができるが、復号化する時に、元のDCT係数の再生精度が低下するため、復号画像の画質は劣化することになる。
【0014】
DC・AC予測部105は、イントラマクロブロック内の各ブロックにおいて、その周辺ブロックとのDC・AC係数予測差分を計算して出力する。予測値として使用されるブロックは、現ブロックの空間的に左または上のブロックが候補となり、現ブロックとDC係数の差分が小さいブロックが選択される。AC予測は、選択された予測ブロックと現ブロックの一部のAC係数について差分計算を行う処理である。ここで、DC予測はMPEG−4仕様で必須処理であるが、AC予測は選択的処理である。
【0015】
AC予測処理を行うか否かは、マクロブロック内の6個のブロックについてAC差分計算を行い、その結果の絶対値総和がAC予測を行わない場合に比べて小さければ、AC予測結果を使用するという判定手法が推奨されている。また、DC・AC予測部105から出力されるブロック内係数データの並びは、
(1)AC予測処理を行わない。
【0016】
(2)AC予測処理を行い、左側のブロックを予測データとして使用する。
【0017】
(3)AC予測処理を行い、上側のブロックを予測データとして使用する。
【0018】
という3つの場合によって異なる。
【0019】
このように、DC・AC予測部105では、マクロブロック入力データの統計量に依存して出力データの特性が決定されるため、量子化部104からのマクロブロック入力データを内部にバファリングする必要がある。
【0020】
可変長符号化部107は、DC・AC予測部105から入力される量子化DCT係数をランレングス符号化し、各0ラン列(『0』が連続する列)に可変長符号を割り当てて、符号化ストリームを出力する。発生符号バッファ108は、可変長符号化部107の符号化結果を一時的に蓄積するバッファで、符号化ストリームの生成性能と外部への出力性能の性能差を吸収する。
【0021】
レート制御部106は、可変長符号化部107によって発生した符号量に基づき、発生符号量が目標とする符号量より大きくなっている場合は、量子化部104に対してより大きな量子化スケール値で量子化するように指示し、逆に、発生符号量が目標符号量より小さくなっている場合は、量子化部104に対してより小さな量子化スケール値で量子化するように指示する。
【0022】
逆量子化部109、IDCT部110および動き差分補償部111は、次フレームの動き差分検出処理用の復号画像を生成して復号画像メモリ112に蓄積するために、一連の処理の逆変換を行う処理系である。
【0023】
逆量子化部109は、量子化部104から出力される量子化DCT係数に量子化スケール値を乗じて、誤差を含んだDCT係数を復元する。IDCT部110は、DCT係数に逆離散コサイン変換(Inverse Discrete Cosine Translation)を施して、8×8画素の動き差分画素データを復元する。動き差分予測部111は、動きベクトルに基づいて、復号画像メモリ112から前フレームの8×8画素データを読み出し、入力される動き差分画素データを足し込み、現フレームの復号画像を再生し、そして、復号画像メモリ112に記憶する。復号画像メモリ112は、再生された復号画像を記憶するメモリであり、前フレームと現フレームの2フレーム分の復号画像データをフレーム単位で切り替えながら記憶する。
【0024】
【発明が解決しようとする課題】
上述した図1の構成を有する従来の動画圧縮符号化装置において、レート制御部106は、発生した符号量の結果に基づくフィードバック制御を行うため、画像によってはフィードバックの効果が現れる前に多大な符号量を生成し、発生符号バッファ108がオーバーフローしてしまうという問題がある。
【0025】
このような問題を解決するものとして、従来、例えば、特開平9−261642号公報が知られている。この特開平9−261642号公報においては、発生符号量が所定値を超えた時点で、そのブロックのDCT部の出力を停止する機能を持つエンコード装置(動画圧縮符号化装置)が提案されている。
【0026】
しかしながら、MPEG−4の仕様においては、上述したように、可変長符号化の前にDC・AC予測部105において量子化DCT係数を一度バッファリングする必要がある。つまり、1マクロブロックに対する可変長符号化処理は、そのマクロブロック内のDCT処理が完全に終了するのを待たなければならず、可変長符号化部の発生符号量によってDCT係数の処理を途中で打ち切ることは不可能である。さらに、発生符号量による打ち切り処理をDC・AC予測部105の出力に対して行ったとしても、エンコーダ装置内部で復号画像を生成するためには、DC・AC予測処理後に打ち切り処理を行った量子化DCT係数データを元の順序に戻して、逆量子化部109に入力しなければならない。これは、量子化部104から逆量子化部109に直接量子化DCT係数データを出力する場合に比べて、時間遅延を著しく大きくするだけでなく、内部回路を複雑化させることにもなる。
【0027】
本発明は、上述した従来の動画圧縮符号化装置が有する課題に鑑み、構成を複雑化することなく符号化ストリームを一定の転送レートに制御することのできる動画圧縮符号化装置の提供を目的とする。
【0028】
【課題を解決するための手段】
本発明の第1の形態によれば、映像データの各フレームをブロック単位に分割し、該ブロック毎に現フレームと前フレームとの予測される動き差分を検出する動き差分検出手段と、該予測される動き差分の結果または元の画像データに対して、規定された直交変換および量子化を実施して可変長符号化を行う可変長符号化手段と、該直交変換および量子化が実施されたデータに対して、規定された逆量子化、逆直交変換および動き補償処理を実施して復号画像を生成する復号画像生成手段と、前記可変長符号化の処理時に、各ブロックの符号化を途中で打ち切る符号化打ち切り手段と、該符号化打ち切り手段からの符号化打ち切りが通知されることにより、次フレーム画像の符号化において、動き予測を用いない符号化を実施するように制御するフレーム管理手段と、を備えることを特徴とする動画像圧縮符号化装置が提供される。
【0029】
本発明の第1の形態に係る動画圧縮符号化装置によれば、符号化打ち切り手段は、可変長符号化の処理時に、各ブロックの符号化を途中で打ち切り、そして、フレーム管理手段は、符号化打ち切り手段からの符号化打ち切りが通知されることにより、次フレーム画像の符号化において、動き予測を用いない符号化を実施するように制御する。
【0030】
本発明の第2の形態によれば、映像データの各フレームをブロック単位に分割し、該ブロック毎に現フレームと前フレームとの予測される動き差分を検出する動き差分検出手段と、該予測される動き差分の結果または元の画像データに対して、規定された直交変換および量子化を実施して可変長符号化を行う可変長符号化手段と、該直交変換および量子化が実施されたデータに対して、規定された逆量子化、逆直交変換および動き補償処理を実施して復号画像を生成する復号画像生成手段と、前記可変長符号化の処理時に、各ブロックの符号化を途中で打ち切る符号化打ち切り手段と、該符号化打ち切り手段により符号化打ち切りが発生したブロックの位置を記憶するブロック位置記憶手段と、を備え、前記符号化打ち切りが発生した次フレーム画像のブロックの動き予測において、該符号化打ち切りが発生したブロックを動き予測ブロックの候補としないことを特徴とする動画像圧縮符号化装置が提供される。
【0031】
本発明の第2の形態に係る動画圧縮符号化装置によれば、符号化打ち切り手段は、可変長符号化の処理時に、各ブロックの符号化を途中で打ち切り、また、ブロック位置記憶手段は、符号化打ち切り手段により符号化打ち切りが発生したブロックの位置を記憶し、そして、符号化打ち切りが発生した次フレーム画像のブロックの動き予測において、該符号化打ち切りが発生したブロックを動き予測ブロックの候補としないようになっている。
【0032】
これにより、構成を複雑化することなく符号化ストリームを一定の転送レートに制御することのできる動画圧縮符号化装置を提供することができる。なお、本発明に係る動画圧縮符号化装置は、MPEG−4の適用に限定されるものではなく、MPEG−1およびMPEG−2、さらには、他の方式の動画圧縮符号化装置としても適用することができる。
【0033】
【発明の実施の形態】
以下、本発明に係る動画圧縮符号化装置の実施例を、添付図面を参照して詳述する。
【0034】
図3は本発明に係る動画圧縮符号化装置の第1実施例を示すブロック図であり、MPEG−4の圧縮技術に用いられるエンコード装置の構成を示すものである。図3において、参照符号201は現画像メモリ、202は動き差分検出部、203はDCT部、204は量子化部、205はDC・AC予測部、206はレート制御部、207は可変長符号化部、そして、2071は符号化打ち切り手段を示している。また、参照符号208は発生符号バッファ、209は逆量子化部、210はIDCT部、211は動き差分補償部、212は復号画像メモリ、そして、213はフレーム管理部を示している。
【0035】
図3と前述した図1との比較から明らかなように、本第1実施例の動画圧縮符号化装置(エンコード装置)では、可変長符号化部207内に符号化打ち切り手段2071が設けられている。符号化打ち切り手段2071は、ブロック内の量子化係数データを可変長符号化する時、発生符号量がある値を超えた場合はブロック内の残りの量子化DCT係数を無視し、符号化形式を遵守し、そして、最小の発生符号量となる形式で残りのブロックデータを充填して出力する。さらに、可変長符号化部207は、ブロック内で符号化を打ち切りが発生したというイベントをフレーム管理部213に通知する。フレーム管理部213は、符号化打ち切りのイベントを受けると次フレームの符号化において、動き予測を行わない画像タイプ、つまりMPEG−4の場合はI−VOP、として圧縮符号化するようにエンコード処理を制御する。
【0036】
符号化打ち切り手段2071は、ブロックの発生符号量がある値を超えたとき、ブロック内の残りの量子化DCT係数をすべてゼロとみなして符号化する。これは、ブロック内の非ゼロである量子化DCT係数を符号化する毎に発生符合量が閾値を超えるか否かをチェックし、閾値を超えた場合は、その非ゼロ係数に対して、ブロックの最後であることを示すフラグを付加して符号化出力すればよい。ここで、符号化打ち切り手段2071は、符号化打ち切りによる強制ゼロ係数発生を実施した場合、そのイベントをフレーム管理部213およびレート制御部206に通知する。
【0037】
フレーム管理部213では、現在の(カレントな)処理フレームにおいて、1ブロックでも強制ゼロ係数が発生した場合、次のフレームをI−VOPとして扱うようにエンコード処理を制御する。また、レート制御部206では、VOPタイプによって割り当て符号量の目標値を調整する必要があるので、符号化打ち切りによるゼロ係数発生を受けて、次フレームに対してI−VOPに応じた目標符号量を割り当てる。
【0038】
図4は図3の動画圧縮符号化装置におけるレート制御部の処理を説明するための図であり、図4(a)は通常の(符号化打ち切りが発生していない)処理を行っている様子を示し、図4(b)は符号化打ち切りが発生してそのままの処理を継続している様子を示し、そして、図4(c)は符号化打ち切りが発生して本第1実施例の処理を行っている様子を示している。
【0039】
まず、符号化打ち切りが発生していない通常の場合、図4(a)に示されるように、レート制御部206は、1つのI−VOPと次のI−VOPまでの複数のP−VOPとを1つのグループ単位(レート制御グループ)として扱い、各グループがほぼ一定の符号量になるように各VOPの発生符合量を制御する。ただし、1グループ内では、P−VOPに比べてI−VOPに多めの符号量を割り当てるのが一般的である。また、計算を単純化するため、2つのI−VOP間のP−VOP数はエンコード前に予め一定の枚数に決定しておく。図4においては、1グループがI−VOP1枚とP−VOP5枚で構成される。
【0040】
ところで、図4(b)に示されるように、ブロックの発生符号量がある値を超えて符号化打ち切りが発生してそのままの処理を継続した場合、グループの途中で強制的にI−VOPを生成し、1グループ内に比較的符号量が多いI−VOPが2枚以上存在することになる。これは、もともとグループ内のP−VOP数が多い場合は問題ないが、グループ内のP−VOP数が少ない場合は、強制的に発生したI−VOPにより、残りのP−VOPに割り当てる符号量が少なくなって画質が劣化する可能性がある。(図4(b)のIP参照)
そこで、本第1実施例のレート制御部206は、図4(c)に示されるように、符号化打ち切りブロックを含むフレームの次のフレームが、レート制御グループの先頭のI−VOPになるようにグループビット量を割り当て直す。これにより、強制的なI−VOPの挿入によって発生したビット量の増加をグループ単位の中で緩やかに吸収することが可能になり、画質の劣化を防ぐことができる。
【0041】
具体的な計算法を図4(c)を参照して説明する。
【0042】
まず、目標とする転送レートによって与えられた1フレームあたりの平均目標ビット量をRpvとし、予め定義されているグループ内のフレーム数をNgrpとすると、グループに割り当てられる目標符号量は、 Rpv×Ngrp となる。
【0043】
グループ内で符号化打ち切りが発生した場合、グループの先頭から符号化打ち切り発生フレームまでの発生符号量をBa、生成したフレーム数をNa(図4(c)の場合は3)とすると、Na枚までに平均的に割り当てられるべき符号量は、 Rpv×Naなので、Baとの差分Da(すなわち、Da=Ba−Rpv×Na)は、転送レートに対して余分に発生した符合量を意味する。そこで、次のレート制御のグループに割り与える目標符号量から余分に発生した符合量を減じる。つまり、 Rpv×Ngrp−Da を新たな目標符号量として次のレートグループ単位に割り当てる。これにより、例えば、図4(b)の参照符号IPで示されるような割り当てる符号量が少なくないP−VOPの発生をなくして画質の劣化を避けることが可能になる。
【0044】
図5は本発明に係る動画圧縮符号化装置の第2実施例を示すブロック図である。図5において、参照符号301は現画像メモリ、302は動き差分検出部、303はDCT部、304は量子化部、305はDC・AC予測部、306はレート制御部、307は可変長符号化部、そして、3071は符号化打ち切り手段を示している。また、参照符号308は発生符号バッファ、309は逆量子化部、310はIDCT部、311は動き差分補償部、312は復号画像メモリ、そして、314はブロック位置記憶部を示している。
【0045】
図5と図3との比較から明らかなように、本第2実施例の動画圧縮符号化装置は、図3に示す第1実施例におけるフレーム管理部213の代わりにブロック位置記憶部314を設けるようになっている。
【0046】
ブロック位置記憶部314は、符号化打ち切りを発生したブロックの位置を記憶するもので、記憶すべき情報量は、各ブロック位置に対して打ち切りが発生したか否かの1ビットの情報でよく、小規模な回路で実現することができる。すなわち、符号化打ち切りを発生したフレームの次フレームがP−VOPの場合、強制的にI−VOP化する(図4(b)参照)ことなく、動き予測検出処理において、動き予測検出部302がブロック位置記憶部314のブロック打ち切り情報を参照して、後述する図6に示ような、動き予測ブロック候補の一部に符号化打ち切りブロックを含む場合は、その動き予測ブロック候補を動き予測候補から外すように制御する。
【0047】
図6は図5に示す動画圧縮符号化装置の特徴的な動作を説明するための図である。図6では、任意の8×8画素の動き予測ブロック候補に対して、3×4画素(黒丸で示す画素)が前フレームにおいて符号化打ち切りされたことを意味する。
【0048】
図6に示されるように、符号化打ち切りを発生したブロックの位置は、ブロック位置記憶部314に記憶され、その記憶された位置情報に従って、動き予測検出部302は、動き予測ブロック候補の一部に符号化打ち切りブロックを含む場合は、その動き予測ブロック候補を動き予測候補から外すように制御する。
【0049】
図7は本発明に係る第3実施例としての動画圧縮符号化装置の特徴的な動作を説明するための図である。図7では、本来の探索領域BL0は横方向が4ブロックで縦方向が3ブロックであるが、その矩形領域BL0を、横方向が3ブロックで縦方向が1ブロックの第1の矩形領域BL1、横方向が4ブロックで縦方向が1ブロックの第2の矩形領域BL2および横方向が3ブロックで縦方向が1ブロックの第3の矩形領域BL3の3つの矩形領域に分割したことを示している。
【0050】
動き予測ブロックを検出する場合、探索する予測ブロックの範囲は予め限定され、例えば、カレントなブロック位置を囲む矩形領域内で探索が行われる。ここで、動き予測検出処理は、2つの矩形領域を含むような(例えば、第1の矩形領域BL1と第2の矩形領域BL2に跨がるようなもの(R0)に対しても行われる。
【0051】
本第3実施例では、図7に示されるように、動き予測検出処理において、動き予測検出部302が動き予測を検出する前にブロック位置記憶部304を参照して、本来の探索すべき矩形領域を符号化打ち切りブロックを含まない複数の矩形領域に分割する。これにより、動き検出処理は、各矩形領域に対して探索処理を行う必要があるが、動き予測ブロック候補単位に符号化打ち切り発生ブロックが含まれるか否かを検出する必要がなく、動き予測検出処理を単純化することが可能になる。
【0052】
このように、本発明の各実施例に係る動画圧縮符号化装置によれば、符号化打ち切りが発生した画像の次のフレームにおいて、符号化打ち切りが発生した画像を動き予測差分検出のため予測画像として使う必要がない。従って、符号化打ち切り発生ブロックを含むフレームにおいて、エンコーダ内部で復号化する画像と、受信装置において符号化ストリームを復号化する画像が異なっても、次フレームはI−VOPとしてともに同一の画像が再生される。その結果、量子化部205(305)から逆量子化部209(309)へのデータの流れを遮ることなく、発生符号量のオーバーフローを制御することができる。
【0053】
【発明の効果】
以上、詳述したように、本発明によれば、構成を複雑化することなく符号化ストリームを一定の転送レートに制御することのできる動画圧縮符号化装置を提供することができる。
【図面の簡単な説明】
【図1】従来の動画圧縮符号化装置の一例を示すブロック図である。
【図2】動き差分検出部における処理を説明するための図である。
【図3】本発明に係る動画圧縮符号化装置の第1実施例を示すブロック図である。
【図4】図3の動画圧縮符号化装置におけるレート制御部の処理を説明するための図である。
【図5】本発明に係る動画圧縮符号化装置の第2実施例を示すブロック図である。
【図6】図5に示す動画圧縮符号化装置の特徴的な動作を説明するための図である。
【図7】本発明に係る第3実施例としての動画圧縮符号化装置の特徴的な動作を説明するための図である。
【符号の説明】
101,201,301…現画像メモリ
102,202,302…動き差分検出部
103,203,303…DCT部
104,204,304…量子化部
105,205,305…DC・AC予測部
106,206,306…レート制御部
107,207,307…可変長符号化部
108,208,308…発生符号バッファ
109,209,309…逆量子化部
110,210,310…IDCT部
111,211,311…動き差分補償部
112,212,312…復号画像メモリを示している。
213…フレーム管理部
314…ブロック位置記憶部
2071,3071…符号化打ち切り手段[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a moving image compression encoding apparatus, and more particularly, to a technique for controlling a generated code amount in an encoding apparatus that performs digital compression encoding on a video signal.
[0002]
2. Description of the Related Art In recent years, research and development of multimedia systems that integrally handle various types of data such as moving images, still images, sounds, and texts have been actively conducted in various fields. By the way, a video signal is one of important information sources, but it is necessary to efficiently compress a huge amount of data, and international standardization is progressing. ISO-IEC 14496-2 describes the syntax of a visual coded stream and its decoding method as an international standard for compression coding of video signals, and is deliberated by MPEG-4 (International Standardization Organization (ISO)). Of the MPEG (Moving Picture Experts Group), it is called Phase 4), which aims at a standardization technology for multimedia.
[0003]
Usually, in an application that handles a video having a small screen size at a low bit rate, a standard called a simple profile of MPEG-4 is adopted. In the simple profile, image coding in which each frame image that is a component of a moving image is compression-coded only from information of a current frame image called an I-VOP (Intra-Video Object Plane). And a picture coding type for compressing and coding a motion difference from the current frame picture using a previous frame picture called a P-VOP (inter-frame forward predictive coding VOP (Predicted Video Object Plane)) as a prediction value. Are defined.
[0004]
Generally, in moving picture coding, P-VOP coding of a plurality of frame images is continuously performed with respect to I-VOP coding of one frame image in order to improve coding efficiency based on video motion. Is done. Further, in an encoding device (moving image compression encoding device) that performs such encoding, the bandwidth of a communication path for transmitting an encoded video stream is limited, and thus the encoded stream has a constant transfer rate. Need to be controlled. Therefore, there is a demand for a moving image compression encoding apparatus capable of controlling an encoded stream at a constant transfer rate without complicating the configuration.
[0005]
[Prior art]
FIG. 1 is a block diagram showing an example of a conventional moving image compression encoding apparatus, and shows a configuration of an encoding apparatus used for MPEG-4 compression technology. In FIG. 1, reference numeral 101 denotes a current image memory, 102 denotes a motion difference detection unit, 103 denotes a DCT unit, 104 denotes a quantization unit, 105 denotes a DC / AC prediction unit, 106 denotes a rate control unit, and 107 denotes a variable length. 2 shows an encoding unit.
[0006]
The current image memory 101 is a memory for storing image data obtained by digitizing one frame of a video signal. Here, in MPEG-4, one frame image is handled by being divided into processing units called macroblocks of 16 × 16 pixels, and one macroblock is composed of four luminance signal blocks of 8 × 8 pixels. The color difference signal block of 8 × 8 pixels is divided into two blocks, that is, six blocks, and processed. Note that the color difference signal is processed at half the resolution in the horizontal and vertical directions as compared to the luminance signal.
[0007]
The motion
[0008]
For the I-VOP type frame image, the motion difference detection processing in the motion
[0009]
FIG. 2 is a diagram for explaining processing in the motion difference detection unit. FIG. 2A shows a video sequence, and FIG. 2B shows block matching processing.
[0010]
As shown in FIG. 2A, image data of a plurality of frames is input to the moving image compression encoding apparatus with time, and is processed by a macroblock MB of 16 × 16 pixels as described above, for example. Is done. In FIG. 2A, reference numeral CF indicates a current frame (current frame), RF indicates an immediately preceding frame (reference frame), and SW indicates a search window (search area) in the immediately preceding frame RF. I have.
[0011]
As shown in FIG. 2B, in the macroblock MB of the current frame CF, in the search window SW in the immediately preceding frame RF, a motion vector is detected such that the motion difference value becomes minimum (P-VOP). Type encoding process).
[0012]
The
[0013]
The
[0014]
The DC /
[0015]
Whether or not to perform the AC prediction processing is determined by performing the AC difference calculation on the six blocks in the macroblock and using the AC prediction result if the sum of the absolute values of the results is smaller than the case where the AC prediction is not performed. Is recommended. The arrangement of the coefficient data in the block output from the DC /
(1) No AC prediction processing is performed.
[0016]
(2) Perform AC prediction processing and use the left block as prediction data.
[0017]
(3) Perform AC prediction processing and use the upper block as prediction data.
[0018]
It depends on the three cases.
[0019]
As described above, in the DC /
[0020]
The variable-
[0021]
If the generated code amount is larger than the target code amount based on the code amount generated by the variable
[0022]
The
[0023]
The
[0024]
[Problems to be solved by the invention]
In the conventional moving image compression encoding apparatus having the configuration shown in FIG. 1, the
[0025]
As a solution to such a problem, for example, Japanese Patent Application Laid-Open No. 9-261624 is known. Japanese Patent Application Laid-Open No. 9-261652 proposes an encoding device (moving image compression encoding device) having a function of stopping the output of the DCT section of a block when the generated code amount exceeds a predetermined value. .
[0026]
However, in the MPEG-4 specification, as described above, it is necessary to buffer the quantized DCT coefficients once in the DC /
[0027]
SUMMARY OF THE INVENTION The present invention has been made in view of the above-described problems of the conventional moving image compression encoding apparatus, and has as its object to provide a moving image compression encoding apparatus capable of controlling an encoded stream to a constant transfer rate without complicating the configuration. I do.
[0028]
[Means for Solving the Problems]
According to the first aspect of the present invention, a motion difference detecting means for dividing each frame of video data into blocks and detecting a predicted motion difference between a current frame and a previous frame for each block; A variable-length encoding unit that performs a specified orthogonal transformation and quantization on the result of the motion difference or the original image data to perform variable-length encoding, and the orthogonal transformation and quantization are performed. Decoding image generating means for performing a specified inverse quantization, inverse orthogonal transform, and motion compensation processing on the data to generate a decoded image, and performing encoding of each block during the variable length encoding processing. Control to perform coding without using motion prediction in coding of the next frame image by being notified of coding cut-off means to be cut off by the coding stop means. Moving picture compression encoding apparatus is provided, characterized in that it comprises a frame management unit that, the.
[0029]
According to the moving image compression encoding apparatus according to the first embodiment of the present invention, the encoding discontinuation unit discontinues encoding of each block in the middle of the variable length encoding process, and the frame management unit In response to the notification of the coding cut-off from the coding cut-off means, control is performed so as to perform coding without using motion prediction in coding the next frame image.
[0030]
According to the second aspect of the present invention, a motion difference detecting means for dividing each frame of video data into blocks and detecting a predicted motion difference between a current frame and a previous frame for each block; A variable-length encoding unit that performs a specified orthogonal transformation and quantization on the result of the motion difference or the original image data to perform variable-length encoding, and the orthogonal transformation and quantization are performed. Decoding image generating means for performing a specified inverse quantization, inverse orthogonal transform, and motion compensation processing on the data to generate a decoded image, and performing encoding of each block during the variable length encoding processing. And a block position storing means for storing a position of a block in which encoding has been aborted by the encoding aborting means. In the motion prediction block in beam image, moving picture compression encoding apparatus, characterized in that no blocks the encoded truncation occurs as candidates for the motion prediction block is provided.
[0031]
According to the moving image compression encoding apparatus according to the second embodiment of the present invention, the encoding discontinuation unit discontinues the encoding of each block in the middle of the variable length encoding process, and the block position storage unit The position of the block in which the coding abortion has occurred is stored by the coding aborting means, and in the motion prediction of the block of the next frame image in which the coding abortion has occurred, the block in which the coding abortion has occurred is a candidate for a motion prediction block. And not to.
[0032]
Accordingly, it is possible to provide a moving image compression encoding device capable of controlling an encoded stream to a constant transfer rate without complicating the configuration. It should be noted that the moving picture compression / encoding device according to the present invention is not limited to the application of MPEG-4, but is also applicable to MPEG-1 and MPEG-2, and also to other types of moving picture compression / encoding device. be able to.
[0033]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the moving image compression encoding apparatus according to the present invention will be described in detail with reference to the accompanying drawings.
[0034]
FIG. 3 is a block diagram showing a first embodiment of the moving picture compression encoding apparatus according to the present invention, and shows the configuration of an encoding apparatus used for MPEG-4 compression technology. 3,
[0035]
As is clear from the comparison between FIG. 3 and FIG. 1 described above, in the moving image compression encoding apparatus (encoding apparatus) of the first embodiment, the encoding cutoff means 2071 is provided in the variable
[0036]
When the generated code amount of the block exceeds a certain value, the
[0037]
The
[0038]
FIG. 4 is a diagram for explaining the processing of the rate control unit in the moving picture compression encoding apparatus of FIG. 3, and FIG. 4 (a) shows a state in which normal processing (no encoding termination occurs) is performed. FIG. 4B shows a state in which the coding is discontinued and the processing is continued as it is, and FIG. 4C shows a state in which the coding is discontinued and the processing of the first embodiment is performed. Is shown.
[0039]
First, in a normal case in which coding termination does not occur, as shown in FIG. 4A, the
[0040]
By the way, as shown in FIG. 4 (b), when the code generation of the block exceeds a certain value and the coding is discontinued and the processing is continued as it is, the I-VOP is forcibly stopped in the middle of the group. Thus, one or more I-VOPs having a relatively large code amount exist in one group. This is not a problem if the number of P-VOPs in the group is large, but if the number of P-VOPs in the group is small, the code amount to be allocated to the remaining P-VOPs due to the forcibly generated I-VOPs And the image quality may be degraded. (See IP in FIG. 4B)
Therefore, as shown in FIG. 4C, the
[0041]
A specific calculation method will be described with reference to FIG.
[0042]
First, assuming that the average target bit amount per frame given by the target transfer rate is Rpv, and the number of frames in a group defined in advance is Ngrp, the target code amount allocated to the group is Rpv × Ngrp It becomes.
[0043]
When the coding is discontinued in the group, if the generated code amount from the head of the group to the coding-discontinued frame is Ba, and the number of generated frames is Na (3 in FIG. 4C), Na sheets are generated. Since the code amount to be allocated on average is Rpv × Na, the difference Da from Ba (that is, Da = Ba−Rpv × Na) means the code amount generated extra for the transfer rate. Therefore, the extra code amount is subtracted from the target code amount assigned to the next rate control group. That is, Rpv × Ngrp-Da is assigned to the next rate group unit as a new target code amount. Accordingly, for example, it is possible to avoid the occurrence of a P-VOP in which the code amount to be allocated is small as shown by the reference code IP in FIG.
[0044]
FIG. 5 is a block diagram showing a second embodiment of the moving picture compression encoding apparatus according to the present invention. 5,
[0045]
As is clear from the comparison between FIG. 5 and FIG. 3, the moving image compression encoding apparatus of the second embodiment includes a block
[0046]
The block
[0047]
FIG. 6 is a diagram for explaining the characteristic operation of the moving picture compression encoding apparatus shown in FIG. In FIG. 6, it means that 3 × 4 pixels (pixels indicated by black circles) for an arbitrary 8 × 8 pixel motion prediction block candidate have been coded and terminated in the previous frame.
[0048]
As shown in FIG. 6, the position of the block in which the coding is discontinued is stored in the block
[0049]
FIG. 7 is a diagram for explaining the characteristic operation of the moving picture compression encoding apparatus as the third embodiment according to the present invention. In FIG. 7, the original search area BL0 has four blocks in the horizontal direction and three blocks in the vertical direction. The rectangular area BL0 is defined as a first rectangular area BL1 having three blocks in the horizontal direction and one block in the vertical direction. It shows that the rectangular area is divided into three rectangular areas, that is, a second rectangular area BL2 having four blocks in the horizontal direction and one block in the vertical direction, and a third rectangular area BL3 having three blocks in the horizontal direction and one block in the vertical direction. .
[0050]
When detecting a motion prediction block, the range of the prediction block to be searched is limited in advance. For example, a search is performed in a rectangular area surrounding the current block position. Here, the motion prediction detection process is also performed on a region including two rectangular regions (for example, a region (R0) extending over the first rectangular region BL1 and the second rectangular region BL2).
[0051]
In the third embodiment, as shown in FIG. 7, in the motion prediction detection process, before the motion
[0052]
As described above, according to the moving image compression encoding apparatus according to each embodiment of the present invention, in a frame next to an image in which encoding has been discontinued, an image in which encoding has been discontinued is subjected to a prediction image for motion prediction difference detection. No need to use as Therefore, in the frame including the coding discontinuation occurrence block, even if the image decoded inside the encoder and the image decoded from the encoded stream in the receiving device are different, the same image is reproduced as the I-VOP in the next frame. Is done. As a result, the overflow of the generated code amount can be controlled without interrupting the flow of data from the quantization unit 205 (305) to the inverse quantization unit 209 (309).
[0053]
【The invention's effect】
As described above in detail, according to the present invention, it is possible to provide a moving image compression encoding apparatus capable of controlling an encoded stream at a constant transfer rate without complicating the configuration.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating an example of a conventional moving image compression encoding device.
FIG. 2 is a diagram for explaining processing in a motion difference detection unit.
FIG. 3 is a block diagram showing a first embodiment of the moving picture compression encoding apparatus according to the present invention.
FIG. 4 is a diagram for explaining processing of a rate control unit in the moving picture compression encoding apparatus of FIG. 3;
FIG. 5 is a block diagram showing a second embodiment of the moving picture compression encoding apparatus according to the present invention.
6 is a diagram for explaining a characteristic operation of the moving picture compression encoding device shown in FIG. 5;
FIG. 7 is a diagram for explaining a characteristic operation of a moving image compression encoding apparatus as a third embodiment according to the present invention.
[Explanation of symbols]
101, 201, 301 ... current image memory
102, 202, 302... Motion difference detection unit
103, 203, 303 ... DCT unit
104, 204, 304 ... quantization unit
105, 205, 305 DC / AC prediction unit
106, 206, 306 ... rate control unit
107, 207, 307 ... variable length coding unit
108, 208, 308... Generated code buffer
109, 209, 309: inverse quantization unit
110, 210, 310 ... IDCT unit
111, 211, 311... Motion difference compensator
112, 212, 312... Show decoded image memories.
213: Frame management unit
314: Block position storage unit
2071, 3071 ... coding termination means
Claims (5)
該予測される動き差分の結果または元の画像データに対して、規定された直交変換および量子化を実施して可変長符号化を行う可変長符号化手段と、
該直交変換および量子化が実施されたデータに対して、規定された逆量子化、逆直交変換および動き補償処理を実施して復号画像を生成する復号画像生成手段と、
前記可変長符号化の処理時に、各ブロックの符号化を途中で打ち切る符号化打ち切り手段と、
該符号化打ち切り手段からの符号化打ち切りが通知されることにより、次フレーム画像の符号化において、動き予測を用いない符号化を実施するように制御するフレーム管理手段と、を備えることを特徴とする動画像圧縮符号化装置。A motion difference detection unit that divides each frame of the video data into blocks and detects a predicted motion difference between the current frame and the previous frame for each block;
Variable-length encoding means for performing variable-length encoding by performing a prescribed orthogonal transformation and quantization on the result of the predicted motion difference or the original image data,
Decoded image generating means for generating a decoded image by performing a prescribed inverse quantization, inverse orthogonal transform, and motion compensation processing on the data on which the orthogonal transform and quantization have been performed;
At the time of the variable-length encoding process, encoding discontinuing means for discontinuing the encoding of each block in the middle,
A frame management unit configured to control to perform encoding without using motion prediction in encoding the next frame image by being notified of the encoding termination from the encoding termination unit. Moving image compression encoding apparatus.
該レート制御手段は、前記符号化打ち切り手段からの符号化打ち切りが通知されることにより、次フレームをレート制御単位グループの先頭フレームとして扱って目標符号量を割り当て直すことを特徴とする動画像圧縮符号化装置。2. The moving image compression encoding apparatus according to claim 1, further comprising a rate control unit configured to control a generated encoding amount of a group including a plurality of frames to be equal to a target encoded amount,
The moving picture compression method, wherein the rate control means re-assigns a target code amount by treating the next frame as the first frame of the rate control unit group by being notified of the coding cut-off from the coding cut-off means. Encoding device.
該予測される動き差分の結果または元の画像データに対して、規定された直交変換および量子化を実施して可変長符号化を行う可変長符号化手段と、
該直交変換および量子化が実施されたデータに対して、規定された逆量子化、逆直交変換および動き補償処理を実施して復号画像を生成する復号画像生成手段と、
前記可変長符号化の処理時に、各ブロックの符号化を途中で打ち切る符号化打ち切り手段と、
該符号化打ち切り手段により符号化打ち切りが発生したブロックの位置を記憶するブロック位置記憶手段と、を備え、前記符号化打ち切りが発生した次フレーム画像のブロックの動き予測において、該符号化打ち切りが発生したブロックを動き予測ブロックの候補としないことを特徴とする動画像圧縮符号化装置。A motion difference detection unit that divides each frame of the video data into blocks and detects a predicted motion difference between the current frame and the previous frame for each block;
Variable-length encoding means for performing variable-length encoding by performing a prescribed orthogonal transformation and quantization on the result of the predicted motion difference or the original image data,
Decoded image generating means for generating a decoded image by performing a prescribed inverse quantization, inverse orthogonal transform, and motion compensation processing on the data on which the orthogonal transform and quantization have been performed;
At the time of the variable-length encoding process, encoding discontinuing means for discontinuing the encoding of each block in the middle,
Block position storing means for storing a position of a block in which the coding abort has occurred by the coding abort means, wherein the coding abort occurs in a motion prediction of a block of a next frame image in which the coding abort occurs. A moving image compression encoding apparatus characterized in that the selected block is not used as a motion prediction block candidate.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002184801A JP2004032300A (en) | 2002-06-25 | 2002-06-25 | Video compression encoding device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002184801A JP2004032300A (en) | 2002-06-25 | 2002-06-25 | Video compression encoding device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2004032300A true JP2004032300A (en) | 2004-01-29 |
Family
ID=31180631
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2002184801A Pending JP2004032300A (en) | 2002-06-25 | 2002-06-25 | Video compression encoding device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2004032300A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009033725A (en) * | 2007-07-03 | 2009-02-12 | Canon Inc | Video encoding apparatus and control method thereof |
-
2002
- 2002-06-25 JP JP2002184801A patent/JP2004032300A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009033725A (en) * | 2007-07-03 | 2009-02-12 | Canon Inc | Video encoding apparatus and control method thereof |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100312603B1 (en) | A method for computational graceful degradation in an audiovisual compression system | |
| US5708473A (en) | Two stage video film compression method and system | |
| US6993078B2 (en) | Macroblock coding technique with biasing towards skip macroblock coding | |
| USRE36507E (en) | Apparatus and method for processing groups of fields in a video data compression system to encode a single frame as an I-field and a P-field | |
| JP3662171B2 (en) | Encoding apparatus and encoding method | |
| JP4393875B2 (en) | System and method for providing a single layer video encoded bitstream suitable for reduced complexity decoding | |
| EP1449384A2 (en) | Reduced-complexity video decoding using larger pixel-grid motion compensation | |
| JP2006521771A (en) | Digital stream transcoder with hybrid rate controller | |
| JP2005510983A (en) | Global motion compensation for video images | |
| KR20050032113A (en) | System and method for rate-distortion optimized data partitioning for video coding using backward adaptation | |
| CN1984340A (en) | Method and apparatus for encoding and decoding of video | |
| US20010026587A1 (en) | Image encoding apparatus and method of same, video camera, image recording apparatus, and image transmission apparatus | |
| US6961377B2 (en) | Transcoder system for compressed digital video bitstreams | |
| US20030016745A1 (en) | Multi-channel image encoding apparatus and encoding method thereof | |
| US20050089098A1 (en) | Data processing apparatus and method and encoding device of same | |
| US6823015B2 (en) | Macroblock coding using luminance date in analyzing temporal redundancy of picture, biased by chrominance data | |
| JP3599942B2 (en) | Moving picture coding method and moving picture coding apparatus | |
| KR100364748B1 (en) | Apparatus for transcoding video | |
| JP3818819B2 (en) | Image coding method conversion apparatus, image coding method conversion method, and recording medium | |
| US8326060B2 (en) | Video decoding method and video decoder based on motion-vector data and transform coefficients data | |
| JP2004032300A (en) | Video compression encoding device | |
| CA2390904C (en) | Methods and apparatus for dynamically adjusting f-codes for a digital picture header | |
| KR100239867B1 (en) | A method of compressing stereoscopic video for suppression of image deterioration when motion prediction and time difference prediction are applied | |
| KR20060016947A (en) | MPP video encoding system and encoding method | |
| JP4264790B2 (en) | Statistical multiplexing control apparatus, image encoding apparatus, statistical multiplexing system, statistical multiplexing control method, and encoding method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20041214 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070703 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070828 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20081014 |