JP3830722B2 - Encoding apparatus and method - Google Patents

Encoding apparatus and method Download PDF

Info

Publication number
JP3830722B2
JP3830722B2 JP2000108028A JP2000108028A JP3830722B2 JP 3830722 B2 JP3830722 B2 JP 3830722B2 JP 2000108028 A JP2000108028 A JP 2000108028A JP 2000108028 A JP2000108028 A JP 2000108028A JP 3830722 B2 JP3830722 B2 JP 3830722B2
Authority
JP
Japan
Prior art keywords
data
encoding
processing
image data
quantization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2000108028A
Other languages
Japanese (ja)
Other versions
JP2000316151A (en
Inventor
勝己 田原
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.)
Sony Corp
Original Assignee
Sony 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
Priority claimed from JP2000065766A external-priority patent/JP3461151B2/en
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2000108028A priority Critical patent/JP3830722B2/en
Publication of JP2000316151A publication Critical patent/JP2000316151A/en
Application granted granted Critical
Publication of JP3830722B2 publication Critical patent/JP3830722B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は符号化装置及び方法、並びに復号化装置及び方法に関し、特に映像信号を高能率符号化して画像データに変換処理する場合に適用して好適なものである。
【0002】
【従来の技術】
従来、テレビ電話システム、会議電話システムにおいて、動画映像でなる映像信号をフレーム内符号化データ及びフレーム間符号化データに高能率符号化することにより、伝送容量に比較的厳しい制限がある伝送路を通じて動画映像信号を伝送する映像信号伝送システムが提案されている(特開昭63-1183 号公報)。
【0003】
すなわち、例えば第10図(A)に示すように、時点t=t1 、t2 、t3 ……において動画を構成する各画像PC1、PC2、PC3……を伝送しようとする場合、映像信号には時間の経過に従って自己相関が大きい特徴がある点を利用して伝送処理すべき画像データを圧縮処理することにより伝送効率を高めるような処理をするもので、フレーム内符号化処理は画像PC1、PC2、PC3……を例えば画素データを所定の基準値と比較して差分を求めるような圧縮処理を実行し、かくして各画像PC1、PC2、PC3……について同一フレーム内における画素データ間の自己相関を利用して圧縮されたデータ量の画像データを伝送する。
【0004】
またフレーム間符号化処理は、第10図(B)に示すように、順次隣合う画像PC1及びPC2、PC2及びPC3……間の画素データの差分でなる画像データPC12、PC23……を求め、これを時点t=t1 における初期画像PC1についてフレーム内符号化処理された画像データと共に伝送する。
【0005】
かくして画像PC1、PC2、PC3……をそのすべての画像データを伝送する場合と比較して格段的にデータ量が少ないディジタルデータに高能率符号化して伝送路に送出することができる。
【0006】
かかる映像信号の符号化処理は、第11図に示す構成の画像データ発生装置1において実行される。
【0007】
画像データ発生装置1は入力映像信号VDを前処理回路2において処理することにより片フィールド落し処理及び片フィールドライン間引き処理等の処理をした後、輝度信号及びクロマ信号を16画素(水平方向に)×16画素(垂直方向に)分のデータでなる伝送単位ブロック(これをマクロブロックと呼ぶ)データS11に変換して画像データ符号化回路3に供給する。
【0008】
画像データ符号化回路3は予測符号化回路4において形成される予測現フレームデータS12を受けてマクロブロックデータS11との差分を求めることによってフレーム間符号化データを発生し(これをフレーム間符号化モードと呼ぶ)、又はマクロブロックデータS11と基準値データとの差分を求めることによりフレーム内符号化データを形成してこれを差分データS13として変換符号化回路5に供給する。
【0009】
変換符号化回路5はディスクリートコサイン変換回路で構成され、差分データS13を直交変換する(すなわちディスクリートコサイン変換する)ことによって高能率符号化してなる変換符号化データS14を量子化回路6に与えることにより量子化画像データS15を送出させる。
【0010】
かくして量子化回路6から得られる量子化画像データS15は可変長符号化回路を含んでなる再変換符号化回路7において再度高能率符号化処理された後、伝送画像データS16として伝送バッファメモリ8に供給される。
【0011】
これに加えて量子化画像データS15は予測符号化回路4において逆量子化、逆変換符号化処理されることより差分データに復号化された後予測前フレームデータを差分データによって修正演算することにより新たな予測前フレームデータを保存すると共に、マクロブロックデータS11に基づいて形成される動き検出データによって予測符号化回路4に保存されている予測前フレームデータを動き補償することにより予測現フレームデータを形成して画像データ符号化回路3に供給できるようになされ、これにより現在伝送しようとするフレーム(すなわち現フレーム)のマクロブロックデータS11と予測現フレームデータS12との差分を差分データS13として得るようになされている。
【0012】
第11図の構成において、第10図について上述した動画像を伝送する場合、先ず第10図(A)の時点t1 において画像PC1の画像データがマクロブロックデータS11として与えられたとき、画像データ符号化回路3はフレーム内符号化モードになってこれをフレーム内符号化処理された差分データS13として変換符号化回路5に供給し、これにより量子化回路6、再変換符号化回路7を介して伝送バッファメモリ8に伝送画像データS16を供給する。
【0013】
これと共に、量子化回路6の出力端に得られる量子化画像データS15が予測符号化回路4において予測符号化処理されることにより、伝送バッファメモリ8に送出された伝送画像データS16を表す予測前フレームデータが前フレームメモリに保持され、続いて時点t2 において画像PC2を表すマクロブロックデータS11が画像データ符号化回路3に供給されたとき、予測現フレームデータS12に動き補償されて画像データ符号化回路3に供給される。
【0014】
かくして時点t=t2 において画像データ符号化回路3はフレーム間符号化処理された差分データS13を変換符号化回路5に供給し、これにより当該フレーム間の画像の変化を表す差分データが伝送画像データS16として伝送バッファメモリ8に供給されると共に、その量子化画像データS15が予測符号化回路4に供給されることにより予測符号化回路4において予測前フレームデータが形成、保存される。
【0015】
以下同様の動作が繰り返されることにより、画像データ符号化回路3がフレーム間符号化処理を実行している間、前フレームと現フレームとの間の画像の変化を表す差分データだけが伝送バッファメモリ8に順次送出されることになる。
【0016】
伝送バッファメモリ8はこのようにして送出されて来る伝送画像データS16を溜めておき、伝送路9の伝送容量によって決まる所定のデータ伝送速度で、溜めた伝送画像データS16を順次伝送データDTRANS として引き出して伝送路9に伝送して行く。
【0017】
これと同時に伝送バッファメモリ8は残留しているデータ量を検出して当該残留データ量に応じて変化する残量データS17を量子化回路6にフィードバックして残量データS17に応じて量子化ステップサイズを制御することにより、伝送画像データS16として発生されるデータ量を調整することにより伝送バッファメモリ8内に適正な残量(オーバーフロー又はアンダーフローを生じさせないようなデータ量)のデータを維持できるようになされている。
【0018】
因に伝送バッファメモリ8のデータ残量が許容上限にまで増量して来たとき、残量データS17によって量子化回路6の量子化ステップSTPS(第12図)のステップサイズを大きくすることにより、量子化回路6において粗い量子化を実行させることにより伝送画像データS16のデータ量を低下させる。
【0019】
これとは逆に伝送バッファメモリ8のデータ残量が許容下限値まで減量して来たとき、残量データS17は量子化回路6の量子化ステップSTPSのステップサイズを小さい値になるように制御し、これにより量子化回路6において細かい量子化を実行させるようにすることにより伝送画像データS16のデータ発生量を増大させる。
【0020】
【発明が解決しようとする課題】
このように従来の画像データ発生装置1は、伝送データDTRANS のデータ伝送速度が伝送路9の伝送容量に基づいて制限されている伝送条件に整合させながら有意画像情報を伝送する手段として、発生した画像データを伝送バッファメモリ8に溜め込むようにすることにより常時伝送路9の伝送容量に相当するデータ量の画像データを常時伝送路9の伝送容量の分だけ引き出すことができるように構成されているが、実際上伝送しようとする画像データによって表される信号値が大きい場合にはこれをそのまま量子化すれば信号値が大きい分伝送バッファメモリ8に溜るデータ量が過大になるおそれがあり、実用上適正なデータ量に圧縮できるようにすることが望ましい。
【0021】
本発明は以上の点を考慮してなされたもので、簡易かつ適正に符号化画像データを符号化、復号化できるようにしようとするものである。
【0022】
【課題を解決するための手段】
かかる課題を解決するため本発明においては、画像データを符号化することによって符号化画像データを生成する符号化装置において、画像データの画素データに対して、マクロブロック単位で順次符号化処理をして行く複数の符号化処理回路を有する画素データ処理系と、画素データ処理系の複数の符号化処理回路に対応する複数の制御ユニットを有し、画素データ処理系の各符号化処理回路においてマクロブロック単位の画素データが符号化処理されるタイミングに合わせて当該各符号化処理回路が符号化処理するごとに、当該符号化処理回路に対応する制御ユニットにおいて符号化処理の結果を表す処理情報データであってマクロブロックのアドレスデータを含む処理情報データを順次転送して行くヘッダデータ処理系と、画素データ処理系において符号化処理されて得られる画像データ及びヘッダデータ処理系において転送されて得られるマクロブロックアドレスデータを含む処理情報データを可変長符号化する可変長符号化手段と、可変長符号化された画像データに、マクロブロック単位で、可変長符号化されたマクロブロックアドレスデータを含む処理情報データを付加してなる符号化画像データを生成する手段とを設けるようにする。
【0024】
【発明の実施の形態】
以下図面について、本発明をテレビ電話に適用した場合の実施の形態を詳述する。
【0025】
(G1)画像情報伝送システムの全体構成
第1図及び第2図において画像情報伝送システム21はエンコーダ21A及びデコーダ21Bによって構成され、エンコーダ21Aは、入力映像信号VDINを入力回路部22において前処理した後、アナログ/ディジタル変換回路23において16×16画素分の画素データでなる伝送単位ブロックデータ、すなわちマクロブロックMBの画素データでなる入力画像データS21を画素データ処理系SYM1に送り込むと共に、当該画素データ処理系SYM1の各処理段においてマクロブロックMBを単位として画素データが処理されるタイミングにおいて当該処理されるデータに対応してする処理情報データがヘッダデータ処理系SYM2を介して順次転送されて行くようになされ、かくして画素データ及びヘッダデータがそれぞれ画素データ処理系SYM1及びヘッダデータ処理系SYM2においてパイプライン方式によって処理されて行く。
【0026】
この実施例の場合、入力画像データS21として順次送出されて来るマクロブロックデータは、第3図に示すような手法でフレーム画像データFRMから抽出される。
【0027】
先ず1枚のフレーム画像データFRMは第3図(A)に示すように2個(水平方向に)×6個(垂直方向に)のブロックグループGOBに分割され、各ブロックグループGOBが第3図(B)に示すように11個(水平方向に)×3個(垂直方向に)のマクロブロックMBを含むようになされ、各マクロブロックMBは第3図(C)に示すように16×16画素分の輝度信号データY00〜Y11(それぞれ8×8画素分の輝度信号データでなる)及び輝度信号データY00〜Y11の全画素データに対応する色信号データでなる色信号データCb 及びCr を含んでなる。
【0028】
かくしてマクロブロックMBごとに送出される入力画像データS21は動き補償回路25に与えられ、動き補償回路25はヘッダデータ処理系SYM2に対して設けられている動き補償制御ユニット26から与えられる動き検出制御信号S22に応動して予測前フレームメモリ27の予測前フレームデータS23と入力画像データS21とを比較して動きベクトルデータMVD(x)及びMVD(y)を検出して動き補償制御ユニット26に第1のヘッダデータHD1(第4図)のデータとして供給すると共に、動き補償回路本体25Aにおいて予測前フレームデータS23に対して動きベクトルデータMVD(x)及びMVD(y)分の動き補償をすることにより予測現フレームデータS24を形成して現在処理しようとしている入力画像データS21でなる現フレームデータS25と共に画像データ符号化回路28に供給する。
【0029】
ここで動き補償制御ユニット26は、第4図に示すように、第1のヘッダデータHD1として現在処理しているマクロブロックごとに、フレーム画像データFRMの伝送順序を表す伝送フレーム番号データTR Counterと、そのブロックグループGOB(第3図(A))を表すブロックグループ番号データGOB address と、そのうちのマクロブロックMBを表すマクロブロック番号データMB addressとを付加することによって順次画素データ処理系SYM1の各処理段に伝送されて行くマクロブロックMBを表示するようになされていると共に、当該処理対象マクロブロックMBの処理ないし処理形式を表すフラグデータFLAGS と、当該マクロブロックMBの動きベクトルデータMVD(x)及びMVD(y)と、その評価値を表す差分データΣ|A−B|と形成する。
【0030】
フラグデータFLAGS は第5図に示すように、最大限1ワード(16ビット)分のフラグをもち得るようになされ、第0ビットには、当該処理対象マクロブロックMBについて動き補償モードで処理すべきか否かを表す動き補償制御フラグMC on/off がセットされる。
【0031】
またフラグデータFLAGS の第1ビットには、当該処理対象マクロブロックMBをフレーム間符号化モードで処理すべきであるか又はフレーム内符号化モードで処理すべきであるかを表すフレーム間/フレーム内フラグInter/Intra がセットされる。
【0032】
またフラグデータFLAGS の第2ビットには、動き補償回路25のループフィルタ25Bを使用するか否かを表すフィルタフラグFilter on/off が設定される。
【0033】
またフラグデータFLAGS の第3ビットには、当該処理対象マクロブロックに含まれるブロックデータY00〜Cr (第3図(C))を伝送すべきであるか否かを表す送信フラグCoded/Not-coded を設定できるようになされている。
【0034】
またフラグデータFLAGS の第4ビットには、当該処理対象マクロブロックMBを駒落しするか否かを表す駒落しフラグDrop frame flag を設定し得るようになされている。
【0035】
またフラグデータFLAGS の第5ビットには、当該処理対象マクロブロックMBを強制リフレッシュするか否かを表す強制リフレッシュフラグRefresh on/offを設定できるようになされている。
【0036】
またフラグデータFLAGS の第6ビットには、マクロブロックパワー評価フラグMBP appreciateを設定できるようになされている。
【0037】
また差分データΣ|A−B|は、現フレームデータS25の現在処理しようとするマクロブロックデータAと、予測前フレームデータS23の検出用動きベクトルによって補償されたマクロブロックデータBとの差分のうちの最小値を表し、これにより検出された動きベクトルの評価をなし得るようになされている。
【0038】
画像データ符号化回路28はフレーム内符号化モードのとき動き補償回路25から与えられる現フレームデータS25をそのまま差分データS26として変換符号化回路29に供給し、これに対してフレーム間符号化モードのとき現フレームデータS25の画素データと予測現フレームデータS24の画素データとの差分でなる差分データS26を変換符号化回路29に供給する。
【0039】
ヘッダデータ処理系SYM2には画像データ符号化回路28に対応するようにフレーム間/フレーム内符号化制御ユニット30が設けられ、動き補償制御ユニット26から供給されるヘッダデータHD1及び画像データ符号化回路28から供給される演算データS31に基づいて、画像データ符号化回路28の符号化モードを指定するためのフレーム間/フレーム内フラグInter/Intra (第5図)及び動き補償回路25のループフィルタ25Bの動作を制御するためのフィルタフラグFilter on/off (第5図)とを得るのに必要なデータを演算して第2のヘッダデータHD2としてフィルタ制御ユニット31に送出する。
【0040】
第2のヘッダデータHD2は、第4図に示すように、ヘッダデータHD1を構成する伝送フレーム番号データTR Counter〜差分データΣ|A−B|をそのまま引き継ぐと共に、フィルタ制御ユニット31においてフレーム間/フレーム内符号化モード切換信号S33及びフィルタオン/オフ信号S34を形成するために必要なパワーデータΣ (A)2 (L)及びΣ(A)2(H)、Σ(A−B)2(L)及びΣ(A−B)2(H)、Σ(A−FB)2(L)及びΣ(A−FB)2(H)、Σ(A)をフレーム間/フレーム内符号化制御ユニット30において付加されるようになされている。
【0041】
ここで、パワーデータΣ(A)2(L)及びΣ(A)2(H)は現フレームデータS25のマクロブロック画素データAの2乗和の下位ビット及び上位ビットを表し、パワーデータΣ(A−B)2(L)及びΣ(A−B)2(H)は現フレームデータS25のマクロブロック画素データAとループフィルタ25Bを介さずに形成された予測現フレームデータS24のマクロブロック画素データBとの差分A−Bの2乗和の下位ビット及び上位ビットを表し、パワーデータΣ(A−FB)2(L)及びΣ(A−FB)2(H)は現フレームデータS25のマクロブロック画素データAとループフィルタ25Bを介して形成された予測現フレームデータS24のマクロブロック画素データFBとの差分A−FBの2乗和の下位ビット及び上位ビットを表し、パワーデータΣ(A)は現フレームデータS25のマクロブロック画素データAの和を表し、それぞれ処理するデータの大きさを評価するためにデータ量をパワー値として表現したもの(2乗和は符号に無関係な値として求めた)である。
【0042】
フィルタ制御ユニット31は、フレーム間/フレーム内符号化制御ユニット30から渡された第2のヘッダデータHD2と、伝送バッファメモリ32から供給される残量データS32とに基づいて、画像データ符号化回路28に対してフレーム間/フレーム内符号化モード切換信号S33を送出すると共に、ループフィルタ25Bに対してフィルタオン/オフ信号S34を送出し、さらに当該フィルタオン/オフ信号S34の内容を表すフィルタフラグFilter on/off を第2のヘッダデータHD2に付加して第3のヘッダデータHD3としてスレショルド制御ユニット35に渡す。
【0043】
ここでフィルタ制御ユニット31は第1に、フレーム間符号化処理をした場合の伝送データ量の方がフレーム内符号化処理をした場合の伝送データ量より大きくなったとき画像データ符号化回路28をフレーム内符号化モードに制御する。
【0044】
またフィルタ制御ユニット31は第2に、フレーム間符号化モードで処理をしている状態においてループフィルタ25Bにおける処理を受けた予測現フレームデータS24より当該処理を受けない予測現フレームデータS24の方が差分値が小さい場合には、フィルタオン/オフ信号S34によってフィルタリング動作をさせないようにループフィルタ25Bを制御する。
【0045】
またフィルタ制御ユニット31は第3に、強制リフレッシュモードになったとき、フレーム間/フレーム内符号化モード切換信号S33によって画像データ符号化回路28をフレーム内符号化モードに切り換える。
【0046】
さらにフィルタ制御ユニット31は第4に、伝送バッファメモリ32から供給される残量データS32に基づいて伝送バッファメモリ32がオーバーフローするおそれがある状態になったとき、これを検出して駒落し処理をすべきことを命令するフラグを含んでなる第3のヘッダデータHD3をスレショルド制御ユニット35に送出する。
【0047】
かくして画像データ符号化回路28は現フレームデータS25と予測現フレームデータS24との差分が最も小さくなるようなモードで符号化してなる差分データS26を変換符号化回路29に供給する。
【0048】
第3のヘッダデータHD3は、第4図に示すように、ヘッダデータHD2から伝送フレーム番号データTR Counter〜動きベクトルデータMVD(x)及びMVD(y)を引き継ぐと共に、フィルタ制御ユニット31においてブロックデータY00〜Cr に対応する6ビット分のフィルタフラグFilter on/off を付加される。
【0049】
変換符号化回路29はディスクリートコサイン変換回路でなり、 ディスクリートコサイン変換後のディスクリートコサイン変換係数値を6個のブロックY00、Y01、Y10、Y11、Cb 、Cr ごとにジグザグスキヤンしてなる変換符号化データS35として伝送ブロック設定回路34に送出する。
【0050】
伝送ブロック設定回路34は変換符号化データS35として送出されて来る6個のブロックデータY00〜Cr (第3図(C))について、それぞれ先頭の係数データからn個までの2乗和を演算して当該演算結果をパワー検出データS36としてスレショルド制御ユニット35に渡す。
【0051】
このときスレショルド制御ユニット35は各ブロックデータY00〜Cr ごとにパワー検出データS36を所定のスレショルドと比較し、パワー検出データS36が当該スレショルドより小さいとき当該ブロックデータの伝送を許容せず、これに対して大きいとき許容することを表す6ビット分の送信可否フラグデータCBPNを形成してこれをフィルタ制御ユニット31から渡された第3のヘッダデータHD3に付加して第4のヘッダデータHD4として量子化制御ユニット36に渡すと共に、伝送ブロック設定回路34から対応するブロックデータY00〜Cr を量子化回路37に送信ブロックパターン化データS37として送出させる。
【0052】
ここで第4のヘッダデータHD4は第4図に示すように、ヘッダデータHD3の伝送フレーム番号データTR Counter〜フィルタフラグFilter on/off をそのまま引き継ぐと共に、スレショルド制御ユニット35においてブロックY00〜Cr に対応して発生する6ビット分の送信可否フラグCBPNが付加される。
【0053】
量子化制御ユニット36はスレショルド制御ユニット35から渡された第4のヘッダデータHD4と、伝送バッファメモリ32から送出される残量データS32とに基づいて第6図に示す量子化ステップサイズ決定処理ルーチンRT0を実行することにより量子化ステップサイズ制御信号S38を量子化回路37に与え、これにより量子化回路37をマクロブロックMBに含まれるデータに適応した量子化ステップサイズで量子化処理させ、その結果量子化回路37の出力端に得られる量子化画像データS39を可変長符号化回路38に供給させる。
【0054】
これと共に量子化制御ユニット36は、第4図に示すように、 第5のヘッダデータHD5として、ヘッダデータHD4に基づいてブロックデータY00〜Cr (第3図(C))にそれぞれ対応するフラグデータFLAGS 及び動きベクトルデータMVD(x)及びMVD(y)に分離してこれを直列に配列させたデータを形成して可変長符号化回路38及び逆量子化回路40に渡す。
【0055】
ここで、ヘッダデータHD5は、第4図に示すように、ヘッダデータHD4のうち伝送フレーム番号データTR Counter〜マクロブロック番号データMB addressをそのまま引き継ぐと共に、量子化制御ユニット36において量子化サイズデータQNT と、ブロックデータY00〜Cr に対するフラグデータFLAGS 、動きベクトルデータMVD(x)及びMVD(y)を付加する。
【0056】
可変長符号化回路38はヘッダデータHD5及び量子化画像データS39を可変長符号化処理して伝送画像データS40を形成し、これを伝送バッファメモリ32に供給する。
【0057】
可変長符号化回路38はブロックデータY00〜Cr を可変長符号化する際に、対応するフラグデータFLAGS に基づいて「駒落し」、又は「送信不可」が指定されているとき、当該ブロックデータを伝送画像データS40として送出させずに捨てるような処理をする。
【0058】
伝送バッファメモリ32は伝送画像データS40を溜め込んで行くと共に、これを所定の伝送速度で読み出してマルチプレクサ41において音声データ発生装置42から送出される伝送音声データS41と合成して伝送路43に送出する。
【0059】
逆量子化回路40は量子化回路37から送出される量子化画像データS39をヘッダデータHD5に基づいて逆量子化した後、当該逆量子化データS42を逆変換符号化回路43に供給することにより逆変換符号化データS43に変換させた後デコーダ回路44に供給させ、かくして伝送画像データS40として送出された画像情報を表す符号化差分データS44を予測前フレームメモリ27に供給させる。
【0060】
このとき予測前フレームメモリ27は、符号化差分データS44を用いてそれまで保存していた予測前フレームデータを修正演算して新たな予測前フレームデータとして保存する。
【0061】
かくして第1図の構成のエンコーダ21Aによれば、ヘッダデータ処理系SYM2から供給されるヘッダ情報に基づいて画素データ処理系SYM1において画素データがマクロブロック単位でパイプライン処理されて行くのに対して、これと同期するようにヘッダデータ処理系SYM2においてヘッダデータを受け渡して行くようにすることにより、ヘッダデータ処理系SYM2の各処理段において必要に応じてヘッダデータを付加又は削除することにより画素データを必要に応じて適応処理できる。
【0062】
デコーダ21Bは第2図に示すように、伝送路43を介してエンコーダ21Aから伝送されて来る伝送データをデマルチプレクサ51を介して伝送バッファメモリ52に受けると共に、伝送音声データS51を音声データ受信装置53に受ける。
【0063】
伝送バッファメモリ52に受けた画像データは可変長逆変換回路54において受信画像データS52及びヘッダデータHD11に分離され、逆量子化回路55において逆量子化データS53に逆量子化された後逆変換符号化回路56においてデイスクリート逆変換処理されて逆変換符号化データS54に逆変換される。
【0064】
この逆変換符号化データS54は逆量子化回路55において形成されたヘッダデータHD12と共にデコーダ回路57に与えられ、符号化差分データS55としてフレームメモリ58に蓄積される。
【0065】
かくしてフレームメモリ58には符号化差分データS55に基づいて伝送されて来た画像データが復号化され、当該復号化画像データS56がディジタル/アナログ変換回路59においてアナログ信号に変換された後出力回路部60を介して出力映像信号VDOUT として送出される。
【0066】
(G2)量子化ステップサイズ決定処理
量子化制御ユニット36は第6図に示す量子化ステップサイズ決定処理ルーチンRT0をマクロブロックMBごとに実行することによって現在処理しようとしているマクロブロックMBがもつ画像データの形式(これをマクロブロックタイプと呼ぶ)に適応するような量子化ステップサイズQNT を選定して量子化ステップサイズ制御信号S38として量子化回路37に供給することにより、マクロブロックタイプによっては生ずるおそれがある画質の乱れを生じさせないように量子化回路37を制御する。
【0067】
この実施例の場合量子化回路37は第7図に示すように、量子化ステップサイズQNT として上限値QNT =31から下限値QNT =1までの段階を可変できるようになされ、量子化制御ユニット36は伝送バッファメモリ32のデータ残量Bufferが量子化ステップサイズQNT の可変制御範囲に相当する値、すなわち量子化サイズ可制御範囲QCR の範囲に入るような適正の値になるように量子化ステップサイズQNT の値をマクロブロックタイプMacro Block Typeに応じて適応制御する。
【0068】
(G2-1)データ残量が過大の場合の処理
すなわち量子化制御ユニット36は第6図の量子化ステップサイズ決定処理ルーチンRT0に入ると、ステップSP1において伝送バッファメモリ32の残量データBufferがマージンMargine と量子化サイズ可制御範囲QCR との和より大きいか否かの判断をする。
【0069】
ここで肯定結果が得られると、このことは伝送バッファメモリ32のデータ残量Bufferが上限値を超えていることを意味し、このとき量子可制御ユニット36はステップSP2に移って量子化ステップサイズQNT を最大値、すなわちQNT =31に設定するような量子化ステップサイズ制御信号S38を量子化回路37に供給した後、ステップSP3に移って現在設定した量子化ステップサイズQNT を前フレーム量子化ステップサイズPQNTとして保存する。
【0070】
かくして量子化制御ユニット36は当該量子化ステップサイズ決定処理ルーチンRT0をステップSP4において終了し、これにより量子化回路37において最も粗い量子化ステップサイズで変換符号化データS35の量子化を実行する。
【0071】
この結果量子化回路37から発生される量子化画像データS39のデータ量は最も小さい値に制御されることにより、伝送バッファメモリ32のデータ残量Bufferは低下して行く。
【0072】
この動作はステップSP1において肯定結果が得られる間繰り返し実行され、その結果やがて伝送バッファメモリ32の残量データがマージンMargine 及び量子化サイズ可制御範囲QCR の和QCR +Margine より小さい値になる。
【0073】
(G2-2)フレーム内符号化モードにおける処理
このような状態になると、量子化制御ユニット36はステップSP1において否定結果が得られることによりステップSP5に移り、マクロブロックタイプMacro Block Typeがフレーム内符号化ブロックであり、かつ強制リフレッシュブロックではないブロックnot refresh block であるか否かの判断をする。
【0074】
ここでマクロブロックタイプMacro Block Typeは、第8図に示すように、スレショルド制御ユニット35から量子化制御ユニット36に渡されるヘッダデータHD4に含まれるフラグデータFLAGS の第2ビット、第1ビット、第0ビットによって表されており、これらのビットが「010」のときマクロブロックタイプはフレーム内符号化型Intra であり、「000」のときフレーム間符号化型Inter であり、「001」のときフィルタ不使用動き補償型MC-not filtered であり、「101」のときフィルタ使用動き補償型MC-filtered になる。
【0075】
そこでステップSP5において肯定結果が得られたとき、このことはフラグデータFLAGS の第2、第1、第0ビットが「000」であり、かつ第4ビットの強制リフレッシュフラグrefresh が論理「0」の状態にあることを表している。
【0076】
ところでこのような状態は、マクロブロックタイプがフィルタ内符号化を必要とする程前フレームに対する現フレームの変化が激しいことを意味しており、しかも現在は強制リフレッシュモードが指定されていないような条件下にあることを意味している。
【0077】
このような条件下にあるとき量子化回路37において細かい量子化ステップサイズで量子化をすれば量子化回路37から発生される量子化画像データS39のデータ量が極く大きい値になり、結局バッファメモリ32にオーバーフローが生ずるおそれが近づいていると言って良い。
【0078】
このとき量子化制御ユニット36はステップSP6に移って量子化ステップサイズQNT を上限値QNT =31に設定し、これにより量子化回路37から発生する量子化データS39のデータ量を抑制するような処理を実行し、その結果伝送バッファメモリ32がオーバーフローする状態の発生を未然に回避させる。
【0079】
これに対してステップSP5において否定結果が得られたとき、このことは処理対象マクロブロックのタイプがフレーム内符号化型Intra ではないこと、又はフレーム内符号化型Intra であっても強制リフレッシュの結果生じたものであることを表しており、このとき量子化制御ユニット36はステップSP6の処理をせずにこれをジャンプする。
【0080】
(G2-3)強制リフレッシュモードにおける処理
次に量子化制御ユニット36はステップSP7において処理対象マクロブロックのタイプが強制リフレッシュ型refresh block であるか否かの判断をする。
【0081】
ここで肯定結果が得られると、このことは強制リフレッシュをすべきことが指定されたことを表しており、このとき量子化制御ユニット36はステップSP8に移って量子化ステップサイズQNT として前フレームの量子化処理の際に用いられた前フレーム量子化ステップサイズPQNTを設定し、これにより強制リフレッシュ処理を実行すべきことが指定されたときには前フレームと同じ量子化ステップサイズで量子化を実行するようにする。
【0082】
このようにすれば、強制リフレッシュ処理を実行する際に、当該強制リフレッシュ処理をした際にこれが実用上目障りにならないように画質を変化させないようにすることができる。
【0083】
因に強制リフレッシュは所定の周期でしかも画像の内容とは無関係に実行されるので、画像の内容には変化がないにもかかわらず前フレームと比較して量子化ステップサイズの値が変化すると当該変化が目障りになる場合が多い。
【0084】
これに対して強制リフレッシュが指定されたとき量子化ステップサイズの値を変更しないようにすれば、当該リフレッシュの際に目障りな画像の変化を生じさせないようにできる。
【0085】
なお量子化ステップサイズの値として同じ値を選定することに代えて少し小さい値を選定するようにしても上述の場合と同様の効果を得ることができる。
【0086】
因に画像の変化がない状態において強制リフレッシュが指定されたとき、量子化ステップサイズを大きくすれば、このことは復元画像の画質を劣化させることになるのに対して、量子化ステップサイズを少し小さくすれば、復元画像の画質を少し改善できることにより実用上人の目には画像の変化として感じさせないようにし得る。
【0087】
これに対してステップSP7において否定結果が得られると、このことは現在強制リフレッシュの指定がされていないことを表しており、このとき量子化制御ユニット36はステップSP8おける処理をせずにこれをジャンプする。
【0088】
(G2-4)差分データのパワーが大きい場合の処理
次に量子化制御ユニット36はステップSP9においてマクロブロックタイプがフレーム間符号化型Inter でありかつマクロブロックパワーMBP が所定のスレショルド値Threshold より大きいか否かの判断をする。
【0089】
ここで、マクロブロックパワーMBP は、
【0090】
【数1】

Figure 0003830722
【0091】
によって定義され、かくしてステップSP9において肯定結果が得られると、このことは当該マクロブロックMBの画像データ、すなわち差分データのマクロブロックパワーMBP が大きいために、ある程度粗い量子化ステップサイズで量子化して伝送しても復元画像の画質が極端に劣化するような影響は生じない状態にあることを意味する。
【0092】
そこで量子化制御ユニット36はこのような条件を満足するマクロブロックが変換符号化回路29においてディスクリートコサイン変換されたときには、これをステップSP9において確認してステップSP10に移って量子化ステップサイズQNT を最も粗い値、すなわち上限値31に設定する。
【0093】
これに対してマクロブロックパワーMBP がそれ程大きくないマクロブロックの変換符号化データS35が送出された場合には、量子化制御ユニット36はステップSP10の処理をしないようにこれをジャンプする。
【0094】
ところで、(1)式によって表されるマクロブロックパワーMBP は、変換符号化回路29におけるディスクリートコサイン変換処理の結果得られるディスクリートコサイン変換係数Coeff(i)に基づいて各マクロブロックの重みを演算しようとするもので、当該ディスクリートコサイン変換係数の重みはディスクリートコサイン変換することによって得られた伝送信号の強さを表しており、従ってマクロブロックパワーMBP が大きいことは信号伝送手段としての伝送信号の強さが大きいから、これを若干圧縮して伝送しても受信側において外来雑音に影響されることなく伝送情報を正しく再現できることを表している。
【0095】
そこでこのような場合量子化制御ユニット36は量子化ステップサイズQNT を大きい値に変更することにより量子化回路37において発生される量子化データS39のデータ量を圧縮することにより伝送路43への負担を軽減するようにする。
【0096】
因に変換符号化回路29を構成するディスクリートコサイン変換回路は次式、
【0097】
【数2】
Figure 0003830722
【0098】
によってディスクリートコサイン変換を実行すると共に、逆変換符号化回路56を形成するディスクリートコサイン逆変換回路は次式、
【0099】
【数3】
Figure 0003830722
【0100】
によってディスクリートコサイン逆変換を実行する。ここでx、yはマクロブロックにおける画素の座標(左上隅の座標(0、0)とする)、u、vはディスクリートコサイン変換時の係数の座標を表す。
【0101】
またu、v=0のとき、
【0102】
【数4】
Figure 0003830722
【0103】
になり、その他の場合には、
【0104】
【数5】
Figure 0003830722
【0105】
のようになる。
【0106】
(2)式及び(3)式の変換は実際上、Xをマクロブロック内の画像データ行列、Cをディスクリートコサイン変換時の変換行列とした場合、変換符号化回路29においては先ず、画像データ行列Xを水平変換することにより変換画像データ行列XC-1を得た後、次に再度垂直変換処理をすることにより変換画像データ行列C(X)C-1を得る。
【0107】
かくして得られる変換画像データ行列C(X)C-1は、第9図に示すように、係数Coeff(1)、Coeff(2)、Coeff(3)……Coeff(64)が8×8行列でなる変換係数行列として表すことができ、当該変換係数行列の各係数Coeff(i)(i=1〜64)を時間の経過に従って変換行列の中からi=1、2、3……64の順序でスキャンをしながら読み出して行く。
【0108】
かくして1マクロブロック分の画像データは変換行列を構成する変換係数Coe ff(i)(i=1〜64)に変換され、これが時間直列的に配列された伝送データとして量子化回路37に供給されることになる。
【0109】
かくして量子化回路37に供給される変換係数データ列Coeff(1)、Coeff(2)……Coeff(64)は、伝送しようとする情報を表していると共に、伝送しようとする信号の強さをも表しており、従って(1)式によって表されているように、変換係数データ列Coeff(i)(i=1、2……64)に含まれるi=1〜nまでの変換係数データの2乗は、伝送しようとする信号の強さを水平方向及び垂直方向の影響が等しくなるように累積加算した値となり、結局(1)式はこれをマクロブロックパワーMBP として定義していることになる。
【0110】
実際上画像データをディスクリートコサイン変換することにより第9図に示すような変換係数行列を得た場合、左上隅部の変換係数Coeff(i)、すなわち低次の変換係数にパワーが集中し、これに対して右下隅部の変換係数、すなわち高次の変換係数には有意情報が生じない傾向があり、かくしてディスクリートコサイン変換によって伝送データの圧縮を実現できる。
【0111】
従って第6図のステップSP9においてマクロブロックタイプMacro Block Typeがフレーム間符号化型Inter であることを確認したとき、(1)式に基づいて得られるマクロブロックパワーMBP が所定のスレショルド値Threshold より大きいことを確認できれば、このことは当該マクロブロックMBにおける差分データの値が十分に大きく、従って粗い量子化をしても良いことを確認し得たことになる。そこでかかる判断に従ってステップSP10において量子化ステップサイズQNT を上限値に選定すれば、当該差分データを比較的少ないデータ量によって伝送できることになる。
【0112】
(G2-5)フレーム間符号化モードにおける処理
量子化制御ユニット36は第6図のステップSP11において、マクロブロックタイプMacro Block Typeがフレーム間符号化型Inter でありかつマクロブロックパワーMBP が所定のスレショルド値Threshold より小さいことを確認したときステップSP12に移って量子化ステップサイズQNT を前フレームにおいて使用された前フレーム量子化ステップサイズPQNTの 1/2の値に設定し、その後ステップSP13において当該設定した量子化ステップサイズQNT の値が下限値1より小さいか否かを判断し、小さいときステップSP14において量子化ステップサイズQNT を下限値1に再設定し直すと共に、1より小さくない時には再設定することなくそのままの値を量子化ステップサイズQNT として設定するような処理をする。
【0113】
ここでマクロブロックパワーMBP は(1)式について上述したように当該マクロブロックの画像データの差分データ信号の強さを表しているので、ステップSP11において肯定結果が得られたときには当該差分が小さいこと、従って画像の内容が前フレームの画像と比較して変化が小さいことを表している。
【0114】
このような画像データが得られた場合には、現在伝送しようとする画像は、前フレームの画像を大幅に変更することなく部分的に手直しする程度の変化しか生じていない状態にあることを表している。
【0115】
そこで量子化制御ユニット36がステップSP12において前フレームの量子化処理結果に基づいてその量子化ステップサイズPQNTを 1/2に細かくして現フレームの量子化ステップサイズQNT として設定するようにすれば、前フレームと比較して動きが少なくなった現フレームに対して当該変化が少なくなった分量子化ステップサイズを細かくできることにより、一段と最適な量子化ステップサイズに設定できることになる。
【0116】
このような量子化ステップサイズの縮小化処理はその後動きが少ない画像が続く限り量子化制御ユニット36がステップSP11及びSP12において繰り返し実行するので、結局動きが少ない画像を伝送し続ける場合にはこれに適応するような値に量子化ステップサイズを収束させることができることになる。
【0117】
かくするにつき、ステップSP13及びSP14において量子化ステップサイズQNT を下限値1より小さくさせないようにしたことにより、結局量子化制御ユニット36は動きが少ない画像を伝送する場合には量子化ステップサイズQNT を下限値に収束させた状態で安定に量子化処理をできることになる。
【0118】
これに対してステップSP11において否定結果が得られたとき、量子化制御ユニット36は現在伝送しようとする画像の変化が大きいと判断してステップSP12、SP13、SP14の処理をせずにこれをジャンプする。
【0119】
(G2-6)量子化制御ユニット36の動作
第6図において、第1に、伝送バッファメモリ32の残量データBufferが上限値(QCF +Margin)を超えると、量子化制御ユニット36はこれをステップSP1において検出してステップSP2において量子化回路37の量子化ステップサイズQNT を上限値31に設定し、これにより伝送バッファメモリ32のデータ残量データBufferを低減させることにより上限値以下の状態に維持させるように制御する。
【0120】
この状態において第2に、マクロブロックタイプMacro Block Typeがフレーム内符号化型でかつ強制リフレッシュブロックではないブロックデータが量子化回路37に与えられたとき量子化制御ユニット36はこれをステップSP5において確認してステップSP6において量子化回路37の量子化ステップサイズQNT を上限値31に設定することにより伝送バッファメモリ32がオーバーフローしないように制御する。
【0121】
このような動作モードのとき量子化制御ユニット36はステップSP7、SP9、SP11においてそれぞれ否定結果が得られることにより、ステップSP6において設定した量子化ステップサイズをステップSP3において前フレーム量子化ステップサイズPQNTとして設定した後当該処理手順を終了する。
【0122】
第3に、量子化回路37に強制リフレッシュブロック型のマクロブロックタイプをもつデータが与えられたとき、量子化制御ユニット36は量子化ステップサイズ決定処理ルーチンRT0においてステップSP1−SP5−SP7のループによってこれを判断し、ステップSP8において量子化回路37の量子化ステップサイズQNT として前フレーム量子化ステップサイズPQNTを設定し、これにより強制リフレッシュモードに入ったときに伝送する画像の画質を前フレームの画像から変化させないようにすることにより、強制リフレッシュ時に目障りな画質の変化を生じさせないようにする。
【0123】
このとき量子化制御ユニット36はステップSP9、SP11においてそれぞれ否定結果が得られることによりステップSP8において設定した量子化ステップサイズQNT をステップSP3において前フレーム量子化ステップサイズPQNTとして設定して当該処理を終了する。
【0124】
第4に、量子化回路37にマクロブロックパワーMBP が大きなマクロブロックの画像データが供給されたとき、量子化制御ユニット36は量子化ステップサイズ決定処理ルーチンRT0においてステップSP1−SP5−SP7−SP9のループによってこれを確認し、ステップSP10において量子化回路37の量子化ステップサイズQNT を上限値31に設定し、これにより、量子化回路37において発生するデータ量を小さい値に抑制し、その結果一段と効率良く画像データの伝送をさせるようにできる。
【0125】
このとき量子化制御ユニット36はかかる処理が終了した後、ステップSP11において否定結果が得られることによりステップSP3においてステップSP10で設定された量子化ステップサイズQNT を前フレーム量子化ステップサイズPQNTとして設定し直した後、当該処理ルーチンを終了する。
【0126】
第5に、量子化回路37にフレーム間符号化型でマクロブロックパワーMBP が小さいマクロブロックデータが供給されたとき量子化制御ユニット36はこれを量子化ステップサイズ決定処理ルーチンRT0のステップSP1−SP5−SP7−SP9−SP11のループによって確認し、ステップSP12において前フレーム量子化ステップサイズPQNTの 1/2の値を量子化ステップサイズQNT として設定することにより、量子化ステップサイズを下限値1に収束させて行く。
【0127】
かくしてマクロブロックパワーMBP に適用して最適な量子化ステップサイズを設定することができる。
【0128】
(G3)他の実施例
(1) 第6図のステップSP6及びSP10において量子化ステップサイズQNT を上限値31に設定した場合について述べたが、設定する量子化ステップサイズQNT としては上限値に限らず、その他の値を選定しても良く、要は、粗い量子化を実行し得る大きさの粗量子化値を選定するようにすれば良い。
【0129】
(2) 第6図のステップSP9及びSP11においてマクロブロックパワーMBP の大きさを判断するにつき、同じスレショルド値Threshold を選定するようにした場合について述べたが、これに代え、異なる値を選定するようにしても上述の場合と同様の効果を得ることができる。
【0130】
(3) 第6図のステップSP12において量子化ステップサイズQNT を前フレーム量子化ステップサイズPQNTから求めるにつき、その 1/2の値を設定するようにした場合について述べたが、その比率は 1/2に限らず必要に応じて他の値に変更しても良く、要は前フレーム量子化ステップサイズに対して所定の比率で縮小した大きさの量子化ステップサイズに選定すれば良い。
【0131】
(4) 第6図のステップSP13及びSP14において量子化ステップサイズQNT を下限値1に収束させるようにした場合について述べたが、収束させる値は下限値に限らず必要に応じてその他の値を選定するようにしても良い。
【0132】
【発明の効果】
上述のように本発明によれば、画素データ処理系の複数の符号化処理回路の符号化処理のタイミングに合わせて、ヘッダデータ処理系において当該符号化処理回路に対応する複数の制御ユニットによってマクロブロックアドレスデータを含む処理情報データを転送して行くと共に、画像データの伝送の直前に、画像データに対してマクロブロックアドレスデータを含む情報処理データを付加して可変長符号化してなる符号化画像データを生成して伝送するようにしたことにより、常に簡易かつ適正に符号化画像データを発生して伝送した後、簡易かつ適正に復号化することができる。
【図面の簡単な説明】
【図1】本発明による映像信号符号化方法を適用した画像情報伝送システムを構成するエンコーダを示すブロック図である。
【図2】本発明による映像信号符号化方法を適用した画像情報伝送システムを構成するデコーダを示すブロック図である。
【図3】フレーム画像データの構成を示す略線図である。
【図4】図1のヘッダデータ処理系を示すブロック図である。
【図5】図4のフラグデータの構成を示す略線図である。
【図6】図1の量子化制御ユニット36の量子化ステップサイズ決定処理ルーチンを示すフローチャートである。
【図7】図1の伝送バッファメモリ32の残量データの変化を示す曲線図である。
【図8】マクロブロックタイプの類型を示す図表である。
【図9】変換係数行列を示す図表である。
【図10】フレーム内/フレーム間符号化処理の説明に供する略線図である。
【図11】従来の画像データ発生装置を示すブロック図である。
【図12】その量子化ステップを示す曲線図である。
【符号の説明】
21……画像情報伝送システム、21A……エンコーダ、21B……デコーダ、25……動き補償回路、26……動き補償制御ユニット、27……予測前フレームメモリ、28……画像データ符号化回路、29……変換符号化回路、30……フレーム間/フレーム内符号化制御ユニット、31……フィルタ制御ユニット、32……伝送バッファメモリ、34……伝送ブロック設定回路、35……スレショルド制御ユニット、36……量子化制御ユニット、37……量子化回路、38……可変長符号化回路。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an encoding apparatus and method, and a decoding apparatus and method, and is particularly suitable for application to a case where a video signal is highly efficient encoded and converted into image data.
[0002]
[Prior art]
Conventionally, in a videophone system and a conference phone system, a video signal composed of a moving image is efficiently encoded into intra-frame encoded data and inter-frame encoded data, so that the transmission capacity is relatively limited. A video signal transmission system for transmitting moving image signals has been proposed (Japanese Patent Laid-Open No. 63-1183).
[0003]
That is, as shown in FIG. 10 (A), when t = t 1, t 2, t 3 each image PC1 constituting the video at ......, PC2, if PC3 the ...... to be transmitted, the video signal In this method, the image data to be transmitted is compressed by using the feature that has a large autocorrelation with time, and the transmission efficiency is improved by compressing the image data. , PC2, PC3,... Is compressed, for example, by comparing the pixel data with a predetermined reference value to obtain a difference, and for each image PC1, PC2, PC3,. Image data having a compressed data amount is transmitted using the correlation.
[0004]
In addition, as shown in FIG. 10 (B), the inter-frame encoding process obtains image data PC12, PC23... Which are pixel data differences between adjacent images PC1 and PC2, PC2 and PC3. This is transmitted together with the image data subjected to the intra-frame coding process for the initial image PC1 at time t = t 1 .
[0005]
Thus, the images PC1, PC2, PC3,... Can be encoded with high efficiency into digital data with a much smaller amount of data compared to the case of transmitting all the image data, and sent to the transmission line.
[0006]
Such video signal encoding processing is executed in the image data generating apparatus 1 having the configuration shown in FIG.
[0007]
The image data generator 1 processes the input video signal VD in the pre-processing circuit 2 to perform processing such as one-field dropping processing and one-field line thinning processing, and then processing the luminance signal and chroma signal to 16 pixels (in the horizontal direction). The transmission unit block (referred to as a macroblock) data S11 composed of data for × 16 pixels (in the vertical direction) is converted and supplied to the image data encoding circuit 3.
[0008]
The image data encoding circuit 3 receives the predicted current frame data S12 formed in the predictive encoding circuit 4 and obtains a difference from the macroblock data S11 to generate interframe encoded data (this is converted into interframe encoding). (Referred to as a mode), or by calculating the difference between the macroblock data S11 and the reference value data, the intra-frame encoded data is formed and supplied to the transform encoding circuit 5 as difference data S13.
[0009]
The transform coding circuit 5 is composed of a discrete cosine transform circuit, and provides the quantized circuit 6 with transform coded data S14 obtained by performing high-efficiency coding by orthogonally transforming the difference data S13 (that is, performing discrete cosine transform). The quantized image data S15 is transmitted.
[0010]
Thus, the quantized image data S15 obtained from the quantizing circuit 6 is subjected to high-efficiency encoding processing again in the reconversion encoding circuit 7 including the variable length encoding circuit, and then transmitted to the transmission buffer memory 8 as transmission image data S16. Supplied.
[0011]
In addition to this, the quantized image data S15 is subjected to inverse quantization and inverse transform coding processing in the predictive coding circuit 4, and after decoding into differential data, the pre-prediction frame data is corrected by the differential data. The new pre-prediction frame data is stored, and the pre-prediction frame data stored in the prediction encoding circuit 4 is motion-compensated by the motion detection data formed based on the macroblock data S11. So that the difference between the macroblock data S11 of the frame to be transmitted (that is, the current frame) and the predicted current frame data S12 can be obtained as the difference data S13. Has been made.
[0012]
11 in the configuration of Figure, when transmitting the moving image as described above for FIG. 10, when the first image data of the image PC1 at the time t 1 of FIG. 10 (A) is given as a macro block data S11, the image data The encoding circuit 3 enters the intra-frame encoding mode and supplies it to the transform encoding circuit 5 as the difference data S13 subjected to the intra-frame encoding process, and thereby passes through the quantization circuit 6 and the re-transform encoding circuit 7. Then, the transmission image data S16 is supplied to the transmission buffer memory 8.
[0013]
At the same time, the quantized image data S15 obtained at the output terminal of the quantizing circuit 6 is subjected to predictive coding processing in the predictive coding circuit 4, thereby pre-predicting the transmission image data S16 sent to the transmission buffer memory 8. frame data is held before the frame memory, followed when the macro block data S11 representing an image PC2 at time t 2 is supplied to the image data coding circuit 3, the motion compensated prediction current frame data S12 by the image data encoding Is supplied to the circuit 3.
[0014]
Thus, at the time t = t 2 , the image data encoding circuit 3 supplies the difference data S13 subjected to the interframe encoding process to the transform encoding circuit 5, whereby the difference data representing the change in the image between the frames is transmitted image. The data is supplied to the transmission buffer memory 8 as data S16, and the quantized image data S15 is supplied to the predictive encoding circuit 4, whereby pre-prediction frame data is formed and stored in the predictive encoding circuit 4.
[0015]
Thereafter, by repeating the same operation, while the image data encoding circuit 3 executes the inter-frame encoding process, only the difference data representing the change in the image between the previous frame and the current frame is stored in the transmission buffer memory. 8 are sequentially sent out.
[0016]
The transmission buffer memory 8 stores the transmission image data S16 sent out in this way, and sequentially stores the stored transmission image data S16 as transmission data D TRANS at a predetermined data transmission rate determined by the transmission capacity of the transmission path 9. Pull out and transmit to the transmission line 9.
[0017]
At the same time, the transmission buffer memory 8 detects the remaining amount of data, feeds back the remaining amount data S17 that changes according to the remaining amount of data to the quantization circuit 6, and performs a quantization step according to the remaining amount data S17. By controlling the size, by adjusting the amount of data generated as the transmission image data S16, it is possible to maintain an appropriate remaining amount of data (data amount that does not cause overflow or underflow) in the transmission buffer memory 8. It is made like that.
[0018]
Incidentally, when the remaining amount of data in the transmission buffer memory 8 has increased to the allowable upper limit, by increasing the step size of the quantization step STPS (FIG. 12) of the quantization circuit 6 by the remaining amount data S17, By performing coarse quantization in the quantization circuit 6, the data amount of the transmission image data S16 is reduced.
[0019]
On the contrary, when the remaining data amount of the transmission buffer memory 8 is reduced to the allowable lower limit value, the remaining amount data S17 is controlled so that the step size of the quantization step STPS of the quantization circuit 6 becomes a small value. Thus, by causing the quantization circuit 6 to perform fine quantization, the data generation amount of the transmission image data S16 is increased.
[0020]
[Problems to be solved by the invention]
As described above, the conventional image data generating device 1 is generated as a means for transmitting significant image information while matching the transmission condition in which the data transmission speed of the transmission data D TRANS is limited based on the transmission capacity of the transmission line 9. By storing the processed image data in the transmission buffer memory 8, the image data having a data amount corresponding to the transmission capacity of the constant transmission path 9 can be always extracted by the transmission capacity of the transmission path 9. However, if the signal value represented by the image data to be actually transmitted is large, if this is quantized as it is, the amount of data stored in the transmission buffer memory 8 may be excessive due to the large signal value. It is desirable to be able to compress data to a practically appropriate amount of data.
[0021]
The present invention has been made in view of the above points, and is intended to enable easy and proper encoding and decoding of encoded image data.
[0022]
[Means for Solving the Problems]
In order to solve such a problem, in the present invention, in an encoding device that generates encoded image data by encoding image data, the pixel data of the image data is sequentially encoded in units of macroblocks. A pixel data processing system having a plurality of encoding processing circuits and a plurality of control units corresponding to the plurality of encoding processing circuits of the pixel data processing system, and a macro in each encoding processing circuit of the pixel data processing system Processing information data representing the result of encoding processing in the control unit corresponding to the encoding processing circuit each time the encoding processing circuit performs encoding processing in accordance with the timing at which pixel data in block units is encoded. A header data processing system that sequentially transfers processing information data including macroblock address data, and pixel data Variable-length encoding means for variable-length encoding processing data including image data obtained by encoding processing in the science system and macroblock address data obtained by transfer in the header data processing system, and variable-length encoding Means is provided for generating encoded image data in which processing information data including macroblock address data subjected to variable length encoding is added to image data in units of macroblocks.
[0024]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention applied to a videophone will be described in detail with reference to the drawings.
[0025]
(G1) Overall Configuration of Image Information Transmission System In FIGS. 1 and 2, the image information transmission system 21 is composed of an encoder 21A and a decoder 21B. The encoder 21A preprocesses the input video signal VD IN in the input circuit unit 22. After that, in the analog / digital conversion circuit 23, transmission unit block data composed of pixel data of 16 × 16 pixels, that is, input image data S21 composed of pixel data of the macroblock MB is sent to the pixel data processing system SYM1, and the pixel At each processing stage of the data processing system SYM1, processing information data corresponding to the data to be processed is sequentially transferred via the header data processing system SYM2 at the timing when the pixel data is processed in units of the macroblock MB. And thus the pixel data And the header data are processed by the pipeline method in the pixel data processing system SYM1 and the header data processing system SYM2, respectively.
[0026]
In the case of this embodiment, the macroblock data sequentially transmitted as the input image data S21 is extracted from the frame image data FRM by the method shown in FIG.
[0027]
First, one frame image data FRM is divided into 2 (horizontal direction) × 6 (vertical direction) block group GOB as shown in FIG. 3 (A). Each block group GOB is divided into FIG. As shown in FIG. 3B, 11 (horizontal) × 3 (vertical) macroblocks MB are included, and each macroblock MB is 16 × 16 as shown in FIG. Color signal data C consisting of color signal data corresponding to all pixel data of luminance signal data Y 00 to Y 11 (each consisting of luminance signal data for 8 × 8 pixels) and luminance signal data Y 00 to Y 11. b and Cr .
[0028]
Thus, the input image data S21 sent out for each macroblock MB is given to the motion compensation circuit 25. The motion compensation circuit 25 is motion detection control given from the motion compensation control unit 26 provided for the header data processing system SYM2. In response to the signal S22, the pre-prediction frame data S23 of the pre-prediction frame memory 27 is compared with the input image data S21 to detect the motion vector data MVD (x) and MVD (y) and to the motion compensation control unit 26. 1 as header data HD1 (FIG. 4), and motion compensation for motion vector data MVD (x) and MVD (y) is performed on the pre-prediction frame data S23 in the motion compensation circuit body 25A. The current frame data composed of the input image data S21 to be processed by forming the predicted current frame data S24 by S25 supplied to the picture data coding circuit 28 together.
[0029]
Here, as shown in FIG. 4, the motion compensation control unit 26 transmits transmission frame number data TR Counter indicating the transmission order of the frame image data FRM for each macroblock currently processed as the first header data HD1. The block group number data GOB address representing the block group GOB (FIG. 3 (A)) and the macro block number data MB address representing the macro block MB are sequentially added to each of the pixel data processing systems SYM1. The macro block MB transmitted to the processing stage is displayed, and flag data FLAGS representing the processing or processing format of the processing target macro block MB and motion vector data MVD (x) of the macro block MB are displayed. And MVD (y) and difference data Σ | A−B | representing the evaluation value.
[0030]
As shown in FIG. 5, the flag data FLAGS can have a flag for one word (16 bits) at the maximum. The 0th bit indicates whether the processing target macroblock MB should be processed in the motion compensation mode. A motion compensation control flag MC on / off indicating whether or not is set.
[0031]
The first bit of the flag data FLAGS includes an interframe / intraframe indicating whether the processing target macroblock MB should be processed in the interframe encoding mode or in the intraframe encoding mode. The flag Inter / Intra is set.
[0032]
A filter flag Filter on / off indicating whether or not to use the loop filter 25B of the motion compensation circuit 25 is set in the second bit of the flag data FLAGS.
[0033]
In the third bit of the flag data FLAGS, a transmission flag Coded / Not indicating whether or not the block data Y 00 to C r (FIG. 3C) included in the processing target macroblock should be transmitted. -coded can be set.
[0034]
In addition, in the fourth bit of the flag data FLAGS, a drop frame flag Drop frame flag indicating whether or not to drop the processing target macroblock MB can be set.
[0035]
In the fifth bit of the flag data FLAGS, a forced refresh flag Refresh on / off indicating whether or not the processing target macroblock MB is forcibly refreshed can be set.
[0036]
In addition, a macro block power evaluation flag MBP appreciate can be set in the sixth bit of the flag data FLAGS.
[0037]
The difference data Σ | A−B | is the difference between the macro block data A to be processed in the current frame data S25 and the macro block data B compensated by the motion vector for detection in the pre-prediction frame data S23. In this way, the detected motion vector can be evaluated.
[0038]
The image data encoding circuit 28 supplies the current frame data S25 supplied from the motion compensation circuit 25 to the transform encoding circuit 29 as it is as the difference data S26 in the intraframe encoding mode, and in contrast to the interframe encoding mode. At this time, difference data S26, which is the difference between the pixel data of the current frame data S25 and the pixel data of the predicted current frame data S24, is supplied to the transform coding circuit 29.
[0039]
The header data processing system SYM2 is provided with an interframe / intraframe encoding control unit 30 corresponding to the image data encoding circuit 28. The header data HD1 and image data encoding circuit supplied from the motion compensation control unit 26 are provided. 28, an interframe / intraframe flag Inter / Intra (FIG. 5) for designating an encoding mode of the image data encoding circuit 28 and a loop filter 25B of the motion compensation circuit 25. Data necessary for obtaining a filter flag Filter on / off (FIG. 5) for controlling the operation of the above is calculated and sent to the filter control unit 31 as second header data HD2.
[0040]
As shown in FIG. 4, the second header data HD2 takes over the transmission frame number data TR Counter to the difference data Σ | A−B | constituting the header data HD1 as it is, and the filter control unit 31 performs interframe / Power data Σ (A) 2 (L) and Σ (A) 2 (H), Σ (A−B) 2 () necessary for forming the intra-frame coding mode switching signal S33 and the filter on / off signal S34 L) and Σ (AB) 2 (H), Σ (A-FB) 2 (L), Σ (A-FB) 2 (H), and Σ (A) are inter-frame / intra-frame coding control units. 30 is added.
[0041]
Here, the power data Σ (A) 2 (L) and Σ (A) 2 (H) represent the lower and upper bits of the square sum of the macroblock pixel data A of the current frame data S25, and the power data Σ ( A−B) 2 (L) and Σ (A−B) 2 (H) are macroblock pixels of the predicted current frame data S24 formed without passing through the macroblock pixel data A of the current frame data S25 and the loop filter 25B. The lower and upper bits of the sum of squares of the difference AB with the data B are represented, and the power data Σ (A−FB) 2 (L) and Σ (A−FB) 2 (H) are the current frame data S25. This represents the lower and upper bits of the square sum of the difference A−FB between the macroblock pixel data A and the macroblock pixel data FB of the predicted current frame data S24 formed through the loop filter 25B. -Data Σ (A) represents the sum of the macroblock pixel data A of the current frame data S25, and represents the amount of data as a power value in order to evaluate the size of the data to be processed (the sum of squares is independent of the sign) Obtained as a correct value).
[0042]
Based on the second header data HD2 passed from the inter-frame / intra-frame coding control unit 30 and the remaining amount data S32 supplied from the transmission buffer memory 32, the filter control unit 31 performs an image data coding circuit. 28 sends an inter-frame / intra-frame coding mode switching signal S33 to the loop filter 25B, sends a filter on / off signal S34 to the loop filter 25B, and further indicates a filter flag indicating the contents of the filter on / off signal S34. Filter on / off is added to the second header data HD2 and passed to the threshold control unit 35 as third header data HD3.
[0043]
Here, the filter control unit 31 first sets the image data encoding circuit 28 when the transmission data amount when the inter-frame encoding processing is larger than the transmission data amount when the intra-frame encoding processing is performed. Control to intra-frame coding mode.
[0044]
Secondly, the prediction current frame data S24 that is not subjected to the processing is more than the prediction current frame data S24 that is subjected to the processing in the loop filter 25B in the state in which the filter control unit 31 is processing in the interframe coding mode. When the difference value is small, the loop filter 25B is controlled so as not to perform the filtering operation by the filter on / off signal S34.
[0045]
Thirdly, the filter control unit 31 switches the image data coding circuit 28 to the intra-frame coding mode by the inter-frame / intra-frame coding mode switching signal S33 when the forced refresh mode is set.
[0046]
Further, fourthly, the filter control unit 31 detects a frame drop process when there is a possibility that the transmission buffer memory 32 overflows based on the remaining amount data S32 supplied from the transmission buffer memory 32. The third header data HD3 including a flag instructing what to do is sent to the threshold control unit 35.
[0047]
Thus, the image data encoding circuit 28 supplies to the transform encoding circuit 29 difference data S26 encoded in a mode in which the difference between the current frame data S25 and the predicted current frame data S24 is minimized.
[0048]
As shown in FIG. 4, the third header data HD3 takes over the transmission frame number data TR Counter to the motion vector data MVD (x) and MVD (y) from the header data HD2, and the block data in the filter control unit 31. It is added to Y 00 -C 6 bits corresponding to r filter flag filter on / off.
[0049]
The transform coding circuit 29 is a discrete cosine transform circuit. The discrete cosine transform coefficient value after the discrete cosine transform is zigzag scanned for every six blocks Y 00 , Y 01 , Y 10 , Y 11 , C b , and C r. Is sent to the transmission block setting circuit 34 as converted encoded data S35.
[0050]
The transmission block setting circuit 34 calculates the sum of squares from the first coefficient data to n for each of the six block data Y 00 to C r (FIG. 3 (C)) sent as transform encoded data S35. The calculation result is passed to the threshold control unit 35 as power detection data S36.
[0051]
The time threshold control unit 35 compares the power detection data S36 with a predetermined threshold for each block data Y 00 -C r, do not allow the transmission of the block data when the power detection data S36 is smaller than the threshold, this 6 bits of transmission permission / inhibition flag data CBPN representing that it is permitted when the value is larger than the value is added to the third header data HD3 passed from the filter control unit 31 to form fourth header data HD4. together passed to a quantization control unit 36, thereby sending the block data Y 00 -C r corresponding from the transmission block setting circuit 34 as a transmission block patterning data S37 to the quantizer 37.
[0052]
Wherein the fourth header data HD4, as shown in FIG. 4, the transmission frame number data TR Counter~ filter flag Filter on / off of the header data HD3 with take over as the block Y 00 -C r in the threshold control unit 35 A 6-bit transmission enable / disable flag CBPN is generated corresponding to
[0053]
The quantization control unit 36 performs the quantization step size determination processing routine shown in FIG. 6 based on the fourth header data HD4 passed from the threshold control unit 35 and the remaining amount data S32 sent from the transmission buffer memory 32. By executing RT0, the quantization step size control signal S38 is given to the quantization circuit 37, whereby the quantization circuit 37 is quantized with a quantization step size adapted to the data included in the macroblock MB, and the result The quantized image data S39 obtained at the output terminal of the quantizing circuit 37 is supplied to the variable length coding circuit 38.
[0054]
At the same time, as shown in FIG. 4, the quantization control unit 36 corresponds to the block data Y 00 to C r (FIG. 3C) as the fifth header data HD5 based on the header data HD4. The flag data FLAGS and the motion vector data MVD (x) and MVD (y) are separated to form data arranged in series, and are passed to the variable length coding circuit 38 and the inverse quantization circuit 40.
[0055]
Here, as shown in FIG. 4, the header data HD5 takes over the transmission frame number data TR Counter to the macroblock number data MB address as they are in the header data HD4, and the quantization size data QNT in the quantization control unit 36. When adds flag data fLAGS for the block data Y 00 -C r, the motion vector data MVD (x) and MVD (y).
[0056]
The variable length coding circuit 38 performs variable length coding processing on the header data HD5 and the quantized image data S39 to form transmission image data S40, and supplies this to the transmission buffer memory 32.
[0057]
Variable-length coding circuit 38 during the variable-length coding the block data Y 00 -C r, the corresponding flag data "frame dropping" on the basis of the FLAGS, or when the "not sent" is specified, the block Processing is performed in which the data is discarded without being transmitted as transmission image data S40.
[0058]
The transmission buffer memory 32 accumulates transmission image data S40, reads it out at a predetermined transmission speed, combines it with transmission audio data S41 sent from the audio data generator 42 in the multiplexer 41, and sends it to the transmission line 43. .
[0059]
The inverse quantization circuit 40 inversely quantizes the quantized image data S39 sent from the quantization circuit 37 based on the header data HD5, and then supplies the inversely quantized data S42 to the inverse transform coding circuit 43. After being converted into the inverse transform encoded data S43, it is supplied to the decoder circuit 44, and thus the encoded difference data S44 representing the image information sent as the transmission image data S40 is supplied to the pre-prediction frame memory 27.
[0060]
At this time, the pre-prediction frame memory 27 corrects the pre-prediction frame data that has been stored up to now using the encoded difference data S44 and stores it as new pre-prediction frame data.
[0061]
Thus, according to the encoder 21A configured as shown in FIG. 1, the pixel data is pipelined in units of macroblocks in the pixel data processing system SYM1 based on the header information supplied from the header data processing system SYM2. The header data processing system SYM2 delivers the header data so as to synchronize with this, and by adding or deleting the header data as necessary in each processing stage of the header data processing system SYM2, the pixel data Can be adaptively processed as necessary.
[0062]
As shown in FIG. 2, the decoder 21B receives transmission data transmitted from the encoder 21A via the transmission path 43 in the transmission buffer memory 52 via the demultiplexer 51, and transmits the transmission voice data S51 to the voice data receiving device. 53.
[0063]
The image data received in the transmission buffer memory 52 is separated into the received image data S52 and the header data HD11 in the variable length inverse transform circuit 54, and is inversely quantized to the inverse quantized data S53 in the inverse quantization circuit 55, and then the inverse transform code. In the conversion circuit 56, the inverse inverse process of the discrete is performed, and the inverse converted encoded data S54 is inversely converted.
[0064]
The inverse transform encoded data S54 is given to the decoder circuit 57 together with the header data HD12 formed in the inverse quantization circuit 55, and is stored in the frame memory 58 as encoded difference data S55.
[0065]
Thus, the image data transmitted based on the encoded differential data S55 is decoded in the frame memory 58, and the decoded image data S56 is converted into an analog signal by the digital / analog conversion circuit 59, and then the output circuit unit. 60 is sent out as an output video signal VD OUT .
[0066]
(G2) Quantization step size determination processing The quantization control unit 36 executes the quantization step size determination processing routine RT0 shown in FIG. 6 for each macroblock MB, thereby holding the image data of the macroblock MB that is currently processed. May be generated depending on the macroblock type by selecting a quantization step size QNT that adapts to the form of the above (referred to as a macroblock type) and supplying it to the quantization circuit 37 as the quantization step size control signal S38. The quantization circuit 37 is controlled so as not to cause a certain image quality disturbance.
[0067]
In the case of this embodiment, as shown in FIG. 7, the quantization circuit 37 can vary the steps from the upper limit value QNT = 31 to the lower limit value QNT = 1 as the quantization step size QNT. Is the quantization step size so that the remaining data buffer of the transmission buffer memory 32 is a value corresponding to the variable control range of the quantization step size QNT, that is, an appropriate value that falls within the quantization size controllable range QCR. The QNT value is adaptively controlled according to the macro block type.
[0068]
(G2-1) Processing when the data remaining amount is excessive, that is, when the quantization control unit 36 enters the quantization step size determination processing routine RT0 in FIG. 6, the remaining amount data buffer in the transmission buffer memory 32 is stored in step SP1. It is determined whether or not it is larger than the sum of the margin Margine and the quantization size controllable range QCR.
[0069]
If an affirmative result is obtained here, this means that the data remaining amount buffer in the transmission buffer memory 32 exceeds the upper limit value, and at this time, the quantum controllable unit 36 proceeds to step SP2 and performs the quantization step size. After the quantization step size control signal S38 for setting QNT to the maximum value, that is, QNT = 31, is supplied to the quantization circuit 37, the process proceeds to step SP3 to change the currently set quantization step size QNT to the previous frame quantization step. Save as size PQNT.
[0070]
Thus, the quantization control unit 36 ends the quantization step size determination processing routine RT0 in step SP4, whereby the quantization circuit 37 quantizes the transform encoded data S35 with the coarsest quantization step size.
[0071]
As a result, the data amount of the quantized image data S39 generated from the quantization circuit 37 is controlled to the smallest value, so that the data remaining amount buffer in the transmission buffer memory 32 decreases.
[0072]
This operation is repeatedly executed while an affirmative result is obtained in step SP1, and as a result, the remaining amount data in the transmission buffer memory 32 becomes a value smaller than the sum QCR + Margine of the margin Margine and the quantization size controllable range QCR.
[0073]
(G2-2) Processing in Intraframe Coding Mode In this state, the quantization control unit 36 moves to step SP5 when a negative result is obtained in step SP1, and the macroblock type Macro Block Type is set to the intraframe code. It is determined whether or not the block is a refresh block that is not a forced refresh block.
[0074]
Here, as shown in FIG. 8, the macro block type is the second bit, the first bit, and the second bit of the flag data FLAGS included in the header data HD4 passed from the threshold control unit 35 to the quantization control unit 36. When these bits are “010”, the macroblock type is an intra-frame coding type Intra, when “000”, the inter-frame coding type Inter, and when “001”, the filter is a filter Unused motion compensation type MC-not filtered. When “101”, the filter is motion compensation type MC-filtered.
[0075]
Therefore, when an affirmative result is obtained in step SP5, this means that the second, first and zeroth bits of the flag data FLAGS are “000” and the forced refresh flag refresh of the fourth bit is logic “0”. It shows that it is in a state.
[0076]
By the way, such a state means that the change of the current frame with respect to the previous frame is so severe that the macroblock type requires intra-filter coding, and the forced refresh mode is not currently specified. It means below.
[0077]
Under such conditions, if the quantization circuit 37 performs quantization with a fine quantization step size, the data amount of the quantized image data S39 generated from the quantization circuit 37 becomes a very large value, and eventually the buffer It can be said that the memory 32 is approaching the possibility of overflow.
[0078]
At this time, the quantization control unit 36 proceeds to step SP6 and sets the quantization step size QNT to the upper limit value QNT = 31, thereby suppressing the data amount of the quantized data S39 generated from the quantization circuit 37. As a result, the transmission buffer memory 32 is prevented from overflowing.
[0079]
On the other hand, when a negative result is obtained in step SP5, this means that the result of the forced refresh is that the processing target macroblock type is not the intra-frame encoded type Intra or the intra-frame encoded type Intra. At this time, the quantization control unit 36 jumps to this without performing the processing of step SP6.
[0080]
(G2-3) Processing in Forced Refresh Mode Next, in step SP7, the quantization control unit 36 determines whether or not the type of the processing target macroblock is a forced refresh type refresh block.
[0081]
Here, if a positive result is obtained, this means that it is specified that forced refresh should be performed. At this time, the quantization control unit 36 moves to step SP8 and sets the quantization step size QNT as that of the previous frame. Set the previous frame quantization step size PQNT used in the quantization process, and when it is specified that the forced refresh process should be executed, perform the quantization with the same quantization step size as the previous frame. To.
[0082]
In this way, when the forced refresh process is executed, the image quality can be prevented from changing so that the forced refresh process does not become a practical problem.
[0083]
The forced refresh is executed at a predetermined cycle and irrespective of the content of the image. Therefore, when the value of the quantization step size changes compared to the previous frame even though there is no change in the content of the image, Changes are often annoying.
[0084]
On the other hand, if the value of the quantization step size is not changed when the forced refresh is designated, it is possible to prevent an unintentional change in the image from occurring during the refresh.
[0085]
Note that the same effect as described above can be obtained by selecting a slightly smaller value instead of selecting the same value as the quantization step size.
[0086]
When forced refresh is specified when there is no change in the image, if the quantization step size is increased, this will degrade the image quality of the restored image, whereas the quantization step size will be slightly reduced. If it is made smaller, the image quality of the restored image can be slightly improved, so that it can be prevented from being perceived as a change in the image by human eyes.
[0087]
On the other hand, if a negative result is obtained in step SP7, this indicates that the forced refresh is not currently designated. At this time, the quantization control unit 36 does not perform the process in step SP8. Jump.
[0088]
(G2-4) Processing when power of differential data is high Next, in step SP9, the quantization control unit 36 has the macroblock type Inter-frame coding type Inter and the macroblock power MBP is larger than a predetermined threshold value Threshold. Judge whether or not.
[0089]
Here, the macro block power MBP is
[0090]
[Expression 1]
Figure 0003830722
[0091]
Thus, if a positive result is obtained in step SP9, this means that the image data of the macroblock MB, that is, the macroblock power MBP of the difference data is large, so that it is quantized with a somewhat coarse quantization step size and transmitted. Even in this case, it means that there is no influence that the image quality of the restored image is extremely deteriorated.
[0092]
Therefore, when a macro block satisfying such a condition is subjected to discrete cosine transform in the transform coding circuit 29, the quantization control unit 36 confirms this in step SP9 and proceeds to step SP10 to set the quantization step size QNT to the maximum. A rough value, that is, an upper limit value 31 is set.
[0093]
On the other hand, when the macroblock transform encoded data S35 having a macroblock power MBP not so high is sent, the quantization control unit 36 jumps to prevent the processing of step SP10 from being performed.
[0094]
By the way, the macroblock power MBP represented by the equation (1) is to calculate the weight of each macroblock based on the discrete cosine transform coefficient Coeff (i) obtained as a result of the discrete cosine transform processing in the transform coding circuit 29. Therefore, the weight of the discrete cosine transform coefficient represents the strength of the transmission signal obtained by the discrete cosine transform. Therefore, a large macroblock power MBP indicates that the transmission signal as a signal transmission means is strong. Therefore, even if this is slightly compressed, transmission information can be correctly reproduced without being affected by external noise on the receiving side.
[0095]
Therefore, in such a case, the quantization control unit 36 changes the quantization step size QNT to a large value, thereby compressing the data amount of the quantized data S39 generated in the quantization circuit 37, thereby burdening the transmission line 43. To reduce.
[0096]
The discrete cosine transform circuit constituting the transform coding circuit 29 is given by the following equation:
[0097]
[Expression 2]
Figure 0003830722
[0098]
The discrete cosine transform circuit that performs the discrete cosine transform according to FIG.
[0099]
[Equation 3]
Figure 0003830722
[0100]
To perform the discrete cosine inverse transform. Here, x and y are the coordinates of the pixel in the macroblock (the coordinates (0, 0) of the upper left corner), and u and v are the coordinates of the coefficient at the time of discrete cosine transformation.
[0101]
When u and v = 0,
[0102]
[Expression 4]
Figure 0003830722
[0103]
In other cases,
[0104]
[Equation 5]
Figure 0003830722
[0105]
become that way.
[0106]
In the conversion of the equations (2) and (3), when X is an image data matrix in a macroblock and C is a conversion matrix at the time of discrete cosine conversion, the conversion coding circuit 29 firstly converts the image data matrix. After obtaining the converted image data matrix XC −1 by horizontally converting X, the converted image data matrix C (X) C −1 is obtained by performing vertical conversion processing again.
[0107]
As shown in FIG. 9, the converted image data matrix C (X) C −1 thus obtained has coefficients Coeff (1), Cooff (2), Cooff (3)... Coeff (64). It can be expressed as a transform coefficient matrix composed of an 8 × 8 matrix, and each coefficient Coeff (i) (i = 1 to 64) of the transform coefficient matrix is expressed as i = 1, 2, 3. Read while scanning in the order of 64.
[0108]
Thus, the image data for one macroblock is converted into the conversion coefficient C oe ff (i) (i = 1 to 64) constituting the conversion matrix, and this is supplied to the quantization circuit 37 as transmission data arranged in time series. Will be.
[0109]
Thus, the transform coefficient data strings Coeff (1), Coeff (2)... Coeff (64) supplied to the quantizing circuit 37 represent information to be transmitted and the signal to be transmitted. Therefore, as expressed by the equation (1), i = 1 to n included in the conversion coefficient data sequence Coeff (i) (i = 1, 2... 64). The square of the conversion coefficient data is a value obtained by cumulatively adding the strength of the signal to be transmitted so that the influence in the horizontal direction and the vertical direction are equal. Equation (1) defines this as the macroblock power MBP. Will be.
[0110]
When the transform coefficient matrix as shown in FIG. 9 is obtained by actually performing discrete cosine transform on the image data, the power concentrates on the transform coefficient Coeff (i) in the upper left corner, that is, the low-order transform coefficient, On the other hand, there is a tendency that no significant information is generated in the transform coefficient in the lower right corner, that is, the higher-order transform coefficient. Thus, transmission data can be compressed by discrete cosine transform.
[0111]
Accordingly, when it is confirmed in step SP9 in FIG. 6 that the macro block type Macro Block Type is the inter-frame coding type Inter, the macro block power MBP obtained based on the equation (1) is larger than the predetermined threshold value Threshold. If this can be confirmed, this means that the value of the difference data in the macroblock MB is sufficiently large, and thus it can be confirmed that coarse quantization may be performed. Therefore, if the quantization step size QNT is selected as the upper limit value in step SP10 in accordance with such determination, the difference data can be transmitted with a relatively small amount of data.
[0112]
(G2-5) Processing quantization control unit 36 in inter-frame coding mode In step SP11 of FIG. 6, the macro block type Macro Block Type is inter-frame coding type Inter and the macro block power MBP is a predetermined threshold. When it is confirmed that the value is smaller than the value Threshold, the process proceeds to step SP12, where the quantization step size QNT is set to a value half of the previous frame quantization step size PQNT used in the previous frame, and then the setting is made in step SP13. It is determined whether or not the value of the quantization step size QNT is smaller than the lower limit value 1. If the value is smaller, the quantization step size QNT is reset to the lower limit value 1 in step SP14. If the value is set as the quantization step size QNT .
[0113]
Here, since the macro block power MBP represents the strength of the difference data signal of the image data of the macro block as described above with respect to the expression (1), the difference is small when an affirmative result is obtained in step SP11. Therefore, the content of the image is smaller than that of the previous frame.
[0114]
When such image data is obtained, it means that the image to be transmitted at present is in a state where only a change that can be partially corrected without significantly changing the image of the previous frame has occurred. ing.
[0115]
Therefore, if the quantization control unit 36 sets the quantization step size PQNT to 1/2 based on the quantization processing result of the previous frame in step SP12 and sets it as the quantization step size QNT of the current frame, Since the quantization step size can be made finer for the current frame whose motion has decreased compared to the previous frame, the quantization step size can be set to be more optimal.
[0116]
Since the quantization control unit 36 repeatedly executes the quantization step size reduction process in steps SP11 and SP12 as long as an image with less motion continues thereafter, this is necessary when an image with less motion is to be transmitted. The quantization step size can be converged to a value that can be adapted.
[0117]
Accordingly, the quantization step size QNT is not made smaller than the lower limit value 1 in steps SP13 and SP14, so that the quantization control unit 36 eventually sets the quantization step size QNT when transmitting an image with little motion. Thus, the quantization process can be stably performed in the state of convergence to the lower limit value.
[0118]
On the other hand, when a negative result is obtained in step SP11, the quantization control unit 36 determines that the change in the image to be transmitted is large, and jumps to this without performing the processing in steps SP12, SP13, and SP14. To do.
[0119]
(G2-6) Operation of Quantization Control Unit 36 In FIG. 6, first, when the remaining amount data buffer of the transmission buffer memory 32 exceeds the upper limit value (QCF + Margin), the quantization control unit 36 performs this step. Detected in SP1 and in step SP2, the quantization step size QNT of the quantization circuit 37 is set to the upper limit value 31, thereby reducing the remaining data buffer Data in the transmission buffer memory 32, thereby maintaining the state below the upper limit value. To control.
[0120]
Second, in this state, when the block data Macro block Type is an intra-frame coding type and block data that is not a forced refresh block is supplied to the quantization circuit 37, the quantization control unit 36 confirms this in step SP5. In step SP6, the quantization step size QNT of the quantization circuit 37 is set to the upper limit value 31 to control the transmission buffer memory 32 so as not to overflow.
[0121]
In such an operation mode, the quantization control unit 36 obtains a negative result in each of steps SP7, SP9, and SP11, so that the quantization step size set in step SP6 is set as the previous frame quantization step size PQNT in step SP3. After the setting, the processing procedure ends.
[0122]
Third, when data having a forced refresh block type macroblock type is given to the quantization circuit 37, the quantization control unit 36 performs a loop of steps SP1-SP5-SP7 in the quantization step size determination processing routine RT0. In step SP8, the previous frame quantization step size PQNT is set as the quantization step size QNT of the quantization circuit 37 in step SP8, whereby the image quality of the image to be transmitted when entering the forced refresh mode is set to the image of the previous frame. Therefore, the image quality is not disturbed at the time of forced refresh.
[0123]
At this time, the quantization control unit 36 sets the quantization step size QNT set in step SP8 as the previous frame quantization step size PQNT in step SP3 by obtaining a negative result in steps SP9 and SP11, and ends the processing. To do.
[0124]
Fourth, when image data of a macroblock having a large macroblock power MBP is supplied to the quantization circuit 37, the quantization control unit 36 performs steps SP1-SP5-SP7-SP9 in the quantization step size determination processing routine RT0. This is confirmed by the loop, and in step SP10, the quantization step size QNT of the quantization circuit 37 is set to the upper limit value 31, thereby suppressing the amount of data generated in the quantization circuit 37 to a small value, and as a result. It is possible to efficiently transmit image data.
[0125]
At this time, the quantization control unit 36 sets the quantization step size QNT set at step SP10 at step SP3 as the previous frame quantization step size PQNT when a negative result is obtained at step SP11 after the processing is completed. After the correction, the processing routine ends.
[0126]
Fifth, when the macroblock data of the interframe coding type and the macroblock power MBP is small is supplied to the quantization circuit 37, the quantization control unit 36 converts this into steps SP1-SP5 of the quantization step size determination processing routine RT0. -Confirmed by the loop of SP7-SP9-SP11, and in step SP12, by setting the value of 1/2 of the previous frame quantization step size PQNT as the quantization step size QNT, the quantization step size converges to the lower limit value 1. Let me go.
[0127]
Thus, the optimum quantization step size can be set by applying to the macroblock power MBP.
[0128]
(G3) Other examples
(1) The case where the quantization step size QNT is set to the upper limit value 31 in steps SP6 and SP10 in FIG. 6 has been described. However, the quantization step size QNT to be set is not limited to the upper limit value, and other values are selected. In short, it suffices to select a coarse quantized value having a size capable of executing coarse quantization.
[0129]
(2) In step SP9 and SP11 in FIG. 6, the case where the same threshold value Threshold is selected for determining the magnitude of the macroblock power MBP has been described. Instead, a different value should be selected. However, the same effects as those described above can be obtained.
[0130]
(3) In the case of obtaining the quantization step size QNT from the previous frame quantization step size PQNT in step SP12 in FIG. 6, a case where a value of 1/2 of the quantization step size is set is described. The quantization step size is not limited to 2, and may be changed to another value as necessary. In short, a quantization step size reduced by a predetermined ratio with respect to the previous frame quantization step size may be selected.
[0131]
(4) Although the case where the quantization step size QNT is converged to the lower limit value 1 in steps SP13 and SP14 of FIG. 6 is described, the value to be converged is not limited to the lower limit value, and other values may be set as necessary. You may make it choose.
[0132]
【The invention's effect】
As described above, according to the present invention, the macro is executed by the plurality of control units corresponding to the encoding processing circuit in the header data processing system in accordance with the encoding processing timing of the plurality of encoding processing circuits of the pixel data processing system. Encoded image in which processing information data including block address data is transferred and variable length encoding is performed by adding information processing data including macro block address data to the image data immediately before transmission of the image data By generating and transmitting data, it is possible to simply and properly decode after always generating and transmitting encoded image data in a simple and appropriate manner.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an encoder constituting an image information transmission system to which a video signal encoding method according to the present invention is applied.
FIG. 2 is a block diagram showing a decoder constituting an image information transmission system to which a video signal encoding method according to the present invention is applied.
FIG. 3 is a schematic diagram illustrating a configuration of frame image data.
4 is a block diagram showing a header data processing system of FIG. 1. FIG.
FIG. 5 is a schematic diagram illustrating a configuration of flag data in FIG. 4;
6 is a flowchart showing a quantization step size determination processing routine of the quantization control unit 36 of FIG.
7 is a curve diagram showing changes in remaining amount data in the transmission buffer memory 32 of FIG. 1; FIG.
FIG. 8 is a chart showing types of macroblock types.
FIG. 9 is a chart showing a transform coefficient matrix.
FIG. 10 is a schematic diagram for explaining intra-frame / inter-frame encoding processing;
FIG. 11 is a block diagram showing a conventional image data generating apparatus.
FIG. 12 is a curve diagram showing the quantization step.
[Explanation of symbols]
21 ... Image information transmission system, 21A ... Encoder, 21B ... Decoder, 25 ... Motion compensation circuit, 26 ... Motion compensation control unit, 27 ... Pre-prediction frame memory, 28 ... Image data encoding circuit, 29... Transform coding circuit, 30... Interframe / intraframe coding control unit, 31... Filter control unit, 32... Transmission buffer memory, 34... Transmission block setting circuit, 35. 36... Quantization control unit, 37... Quantization circuit, 38.

Claims (2)

画像データを符号化することによって符号化画像データを生成する符号化装置において、
上記画像データの画素データに対して、マクロブロック単位で順次符号化処理をして行く複数の符号化処理回路を有する画素データ処理系と、
上記画素データ処理系の上記複数の符号化処理回路に対応する複数の制御ユニットを有し、上記画素データ処理系の上記各符号化処理回路において上記マクロブロック単位の画素データが符号化処理されるタイミングに合わせて当該各符号化処理回路が符号化処理するごとに、当該符号化処理回路に対応する上記制御ユニットにおいて符号化処理の結果を表す処理情報データであって上記マクロブロックのアドレスデータを含む処理情報データを順次転送して行くヘッダデータ処理系と、
上記画素データ処理系において符号化処理されて得られる画像データ及び上記ヘッダデータ処理系において転送されて得られる上記マクロブロックアドレスデータを含む処理情報データを可変長符号化する可変長符号化手段と、
上記可変長符号化された画像データに、上記マクロブロック単位で、上記可変長符号化されたマクロブロックアドレスデータを含む処理情報データを付加してなる上記符号化画像データを生成する手段と
を具えることを特徴とする符号化装置。
In an encoding device that generates encoded image data by encoding image data,
The pixel data of the image data, the pixel data processing system having a plurality of encoding circuits to continue to forward Tsugifu No. process in macroblock units,
A plurality of control units corresponding to the plurality of encoding processing circuits of the pixel data processing system, and the pixel data of the macroblock unit is encoded in each of the encoding processing circuits of the pixel data processing system; Each time each of the encoding processing circuits performs encoding processing in accordance with the timing, the control unit corresponding to the encoding processing circuit is processing information data representing the result of encoding processing, and the macroblock address data is Header data processing system that sequentially transfers processing information data including,
Variable length coding means for variable length coding processing information data including the macro block address data obtained are transferred in the image data and the header data processing system obtained is processed sign-of Te the pixel data processing system odor When,
Means for generating the encoded image data obtained by adding processing information data including the variable length encoded macroblock address data in units of the macroblocks to the variable length encoded image data. An encoding device characterized by that.
画像データを符号化することによって符号化画像データを生成する符号化方法において、
画素データ処理系の複数の符号化処理回路において上記画像データの画素データに対して、マクロブロック単位で順次符号化処理をして行き、
ヘッダデータ処理系において、上記画素データ処理系の上記複数の符号化処理回路に対応する複数の制御ユニットによって、上記画素データ処理系の上記各符号化処理回路において上記マクロブロック単位の画素データが符号化処理されるタイミングに合わせて当該各符号化処理回路が符号化処理するごとに、当該符号化処理回路に対応する上記制御ユニットにおいて符号化処理の結果を表す処理情報データであって上記マクロブロックのアドレスデータを含む処理情報データを順次転送して行き、
上記画素データ処理系において符号化処理されて得られる画像データ及び上記ヘッダデータ処理系において転送されて得られる上記マクロブロックアドレスデータを含む処理情報データを可変長符号化し、
上記可変長符号化された画像データに、上記マクロブロック単位で、上記可変長符号化されたマクロブロックアドレスデータを含む処理情報データを付加してなる上記符号化画像データを生成する
ことを特徴とする符号化方法。
In an encoding method for generating encoded image data by encoding image data,
The pixel data of the image data in a plurality of encoding circuits of the pixel data processing system, continue to forward Tsugifu No. process in macroblock units,
In the header data processing system, the plurality of control units corresponding to the plurality of encoding processing circuits of the pixel data processing system encode the pixel data in units of macroblocks in the encoding processing circuits of the pixel data processing system. Each time each encoding processing circuit performs encoding processing in accordance with the timing at which encoding processing is performed, processing information data representing the result of encoding processing in the control unit corresponding to the encoding processing circuit, and the macroblock The processing information data including the address data is sequentially transferred,
Processing information data including the macro block address data obtained are transferred in the image data and the header data processing system obtained is processed sign-of Te the pixel data processing system odor and variable length coding,
Generating the encoded image data obtained by adding processing information data including the variable length encoded macroblock address data to the variable length encoded image data in units of the macroblocks. Encoding method.
JP2000108028A 1990-02-26 2000-04-05 Encoding apparatus and method Expired - Lifetime JP3830722B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000108028A JP3830722B2 (en) 1990-02-26 2000-04-05 Encoding apparatus and method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2000065766A JP3461151B2 (en) 1990-02-26 2000-03-06 Encoding device and method
JP2000108028A JP3830722B2 (en) 1990-02-26 2000-04-05 Encoding apparatus and method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2000065766A Division JP3461151B2 (en) 1990-02-26 2000-03-06 Encoding device and method

Publications (2)

Publication Number Publication Date
JP2000316151A JP2000316151A (en) 2000-11-14
JP3830722B2 true JP3830722B2 (en) 2006-10-11

Family

ID=18620944

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000108028A Expired - Lifetime JP3830722B2 (en) 1990-02-26 2000-04-05 Encoding apparatus and method

Country Status (1)

Country Link
JP (1) JP3830722B2 (en)

Also Published As

Publication number Publication date
JP2000316151A (en) 2000-11-14

Similar Documents

Publication Publication Date Title
EP0444839B1 (en) Video signal transmission system and method for coding a video signal
KR100221889B1 (en) Method for recording moving picture coding data
JP4223571B2 (en) Image coding method and apparatus
JP3043599B2 (en) Quantization step size controller using neural network
US5521643A (en) Adaptively coding method and apparatus utilizing variation in quantization step size
JP3739388B2 (en) Double reference image encoding method, encoding apparatus, and decoder
JP4747494B2 (en) Data processing apparatus and method and encoding apparatus
JP3038759B2 (en) Image data encoding device
JP3830722B2 (en) Encoding apparatus and method
JP4407249B2 (en) Data processing apparatus, method and encoding apparatus, method and program
JP3674761B2 (en) Encoding apparatus and method
JP3786340B2 (en) Encoding apparatus and method
JP3154254B2 (en) Image data encoding device
JP3287836B2 (en) Image data encoding device
JP3461151B2 (en) Encoding device and method
JP2000333178A (en) Encoding device and method
JP3122108B2 (en) Video signal encoding method and apparatus therefor
JP2000324500A (en) Device and method for encoding
JP2000341692A (en) Device and method for encoding
JP2000316159A (en) Device and method for encoding
JPH03247191A (en) Video signal coding method
JP2000316161A (en) Device and method for encoding
JP2000316155A (en) Device and method for encoding
JP2877225B2 (en) Video signal encoding method
JPH0918873A (en) Image encoding method and device and image recording medium

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040806

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041005

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050304

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050506

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050620

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20050624

A912 Removal of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20060303

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060606

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060712

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100721

Year of fee payment: 4

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100721

Year of fee payment: 4