JP3810830B2 - Decoding processing method of encoded video signal and decoding apparatus using the same - Google Patents

Decoding processing method of encoded video signal and decoding apparatus using the same Download PDF

Info

Publication number
JP3810830B2
JP3810830B2 JP18444595A JP18444595A JP3810830B2 JP 3810830 B2 JP3810830 B2 JP 3810830B2 JP 18444595 A JP18444595 A JP 18444595A JP 18444595 A JP18444595 A JP 18444595A JP 3810830 B2 JP3810830 B2 JP 3810830B2
Authority
JP
Japan
Prior art keywords
error
decoding
video signal
code
encoded video
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 - Fee Related
Application number
JP18444595A
Other languages
Japanese (ja)
Other versions
JPH0937249A (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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP18444595A priority Critical patent/JP3810830B2/en
Publication of JPH0937249A publication Critical patent/JPH0937249A/en
Application granted granted Critical
Publication of JP3810830B2 publication Critical patent/JP3810830B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【産業上の利用分野】
本発明は、データ量削減のためなどで符号化された映像信号の復号化処理方法及びそれを用いた復号化装置に関する。
【0002】
【従来の技術】
ディジタル化された映像信号は、特に、それが動画像の映像信号である場合、膨大な情報量を有している。そのため、かかる映像信号を磁気ディスクなどの記録媒体に長時間にわたってそのまま記録しようとすると、非常に大きい記憶容量が必要になり、コストがかさむことになる。また、有線や無線によってリアルタイムで伝送しようとすると、映像データのビットレートが高いことから、非常に広帯域な伝送路が必要であり、その実現は容易でない。そこで、従来、信号処理により映像データを効率良く符号化してデータ量を削減するための符号化方式がいくつか提案されている。
【0003】
そのような符号化方式として、MPEG1(「OPTRONICS」;1992 No.5 pp.86〜98参照)及びMPEG2(「テレビジョン学会誌」;Vol.48 No.1 pp.44〜49参照)がある(以下、単にMPEGと表現した場合には、両者を指すものとする)。MPEGでは、映像データのデータ量を削減するために、主に、以下の複数の方法が適宜組み合わせて用いられる。
【0004】
第1の方法は、符号化する画像とその前後の画像(以下、これを参照画像という)との間で差分を取って振幅の小さい情報信号に変換することにより、符号化に要するビット数を少なくする方法である。
【0005】
MPEGでは、符号化を行なう画像の単位をピクチャという。MPEG1の場合、1ピクチャが原画像の1フレームで構成されている。また、MPEG2の場合には、1ピクチャが原画像の1フレーム単位または1フィールド単位で構成されており、どちらの単位を用いるかは符号化時に選択可能となっている。
【0006】
画像の参照方法により、I,P,Bピクチャの3種類のピクチャが存在する。これを図13に示す。
【0007】
同図において、矢印の始点となる画像が参照画像、終点となる画像が復号中のピクチャを表わしている。Iピクチャは画像の参照を行なわない。これは、復号化のために必要な情報が全てそのピクチャ内に符号化されているからである。Pピクチャは直前に復号化したIピクチャまたはPピクチャを参照画像とする。Bピクチャはその直前と直後に存在するIまたはPピクチャを参照画像とする。
【0008】
1ピクチャは、マクロブロックという一定の大きさを持つ区画で区切られている。さらに、マクロブロックは8画素×8画素の単位画像(以下、ブロックという)から構成されている。例えば、カラー映像信号がY:Cb:Cr=4:1:1の形式である場合、図14(a)に示すように、輝度信号がY0〜Y3の4つのブロック、色差信号Cb,Crの各1つずつのブロック、計6つのブロックによってマクロブロックが構成されている。
【0009】
これらマクロブロックには、図14(b)に示すように、画像の左上隅から順にマクロブロックアドレスと呼ばれる通し番号が付けられている。ここで、例えば、1ピクチャが720×480画素のフレーム画像から構成されている場合には、そこに、(720×480画素)÷(8×8×4)=1350個のマクロブロックが存在する。従って、順次のマクロブロックに0〜1349のマクロブロックアドレスが設定される。
【0010】
マクロブロックは、参照画像との差分を取る最小単位である。画像の参照の方法はマクロブロック単位で変えられるようになっている。そのため、それを示す情報及び参照画像中で実際に参照に用いた部分を示す情報(これを動きベクトル情報という)を各マクロブロックの符号化データ中にエンコードする。
【0011】
データ量削減のための第2の方法は、映像データにDCT処理(離散コサイン変換処理)を施すことにより、空間周波数領域に変換する方法である。映像信号の場合には、一般に、空間周波数の低域成分にエネルギーが集中している割合が高く、高域成分は振幅が小さい。従って、このことから、符号化に割り当てるビット数を低域成分ほど多くし、高域成分ほど少なくすることにより、ビット数の割当てを最適化することができ、この結果、全体のビット数を削減することが可能である。MPEG1,2では、上記のブロック単位でDCTを行ない、データの削減を図っている。
【0012】
データ量削減のための第3の方法は、同じ値のデータが複数個連続している場合、かかる同じ値のデータを繰り返し送る代わりに、その値とそのデータの個数とを表わすデータを送ることにより、データ量を削減する方法である。MPEGでは、DCT係数の符号化に際してこの方法を用いている。
【0013】
データ量削減のための第4の方法は、夫々の値の出現確率に応じて異なる長さの符号を割り当てる可変長符号化である。出現頻度の高い値ほど短い符号を割り当てておくことにより、全体のビット数を削減することが可能である。MPEGでは、DCT係数のほかに、マクロブロックアドレスや動きベクトルなどのパラメータの符号化に可変長符号化を用いている。これらは夫々、可変長符号と復号すべき値の対応表が予め規格の中に定められている。
【0014】
次に、符号の階層構造について説明する。
【0015】
MPEGの符号化データはレイヤと呼ばれる階層構造を有しており、図15に示すように、シーケンスレイヤからブロックレイヤまでの6つの階層がある。
【0016】
最上位層のシーケンスレイヤはシーケンスヘッダから始まり、1つ以上のグループ・オブ・ピクチャレイヤを含み、シーケンスエンドコードで終了する符号の単位である。シーケンスヘッダには、ピクチャサイズやフレームレートなど一連のシーケンスレイヤに共通なパラメータが符号化されている。なお、チャネル切替えなどのように、シーケンスレイヤの途中から復号を開始する場合に備えて、シーケンスレイヤのヘッダは符号化側でシーケンス中に適宜繰り返し挿入可能となっている。
【0017】
上記グループ・オブ・ピクチャレイヤはグループ・オブ・ピクチャヘッダから始まり、複数のピクチャレイヤを含んでいる。
【0018】
このピクチャレイヤは1つのピクチャを含むものであり、ピクチャヘッダから始まって複数のスライスレイヤを含んでいる。先に説明したように、1つのピクチャは1枚のフレーム画像または1つのフィールド画像に対応する。ピクチャヘッダには、そのピクチャがI,P,Bピクチャのいずれであるかを区別するパラメータなどが符号化されている。
【0019】
上記スライスレイヤはスライスヘッダから始まり、複数のマクロブロック毎のマクロブロックレイヤを含んでいる。このスライスヘッダには、スライスの画面上の垂直位置を表わす情報が符号化されており、また、スライスヘッダ直後のマクロブロックレイヤには、このスライスの画面上の水平位置を表わす情報が符号化されている。そして、これら2つの情報を合わせると、マクロブロックアドレスの絶対アドレスを求めることができる。
【0020】
上記マクロブロックレイヤはマクロブロックを構成するブロックを含むものであって、マクロブロックヘッダと、図14(a)に示したマクロブロックを構成する6つのブロック毎のレイヤ、即ち、ブロックレイヤとを含んでいる。マクロブロックヘッダには、先の動きベクトル情報やマクロブロックアドレスを示す情報などが符号化されている。
【0021】
最下位層の上記ブロックレイヤは、ブロック中の各画素に対するDCT係数を符号化して含んでいる。
【0022】
以上の各レイヤのうち、シーケンスレイヤからスライスレイヤまでのスライスレイヤ以上の層のヘッダは、スタートコードと呼ばれる符号から開始する。スタートコードは3バイト(=24ビット)の長さを有する符号であって、スタートコード以外にそれと同じパターンが符号化データ中に現れることが禁止されている。また、符号化データを先頭から1バイト単位で区切ったとき、スタートコードの先頭は丁度その区切りから開始するように配置されている(バイトアラインメント)。このことから、万一エラーなどによって符号化データの連続性を見失ったような場合でも、スタートコードの発見は容易であり、それを手がかりにして、少なくともスライスレイヤ以上の層のヘッダで正常な復号処理へ復帰させることが可能である。
【0023】
ところで、MPEGにおいては、符号化データ中に誤りが含まれていることを示すシーケンスエラーコードが用意されている。これは、例えば、符号化データの伝送途中で発生した誤りを訂正しきれなかった場合、伝送媒体によって挿入されるものである。しかし、MPEGの規格では、シーケンスエラーコード以外にエラーの発生を示す手段については規定されていない。また、様々な種類が考えられるエラーに対して、それらを区別したり、エラーの重大性の度合を評価したりすることについても規定されていない。さらに、実際にエラーが発生した場合の対処の仕方や復帰方法についても触れられていない。
【0024】
【発明が解決しようとする課題】
伝送途中での誤りの発生や符号化の際のミスなどの何らかの原因により、符号化映像信号の復号中に、エラーが発生することがあり得る。かかるエラーを検出した場合、先に説明したスタートコードを検索し、それを手がかりにして正常な復号処理への復帰を図るようにすることは可能である。しかし、発生したエラーの重大さ(エラーレベル)を評価せず、常に同一の過程を経て正常な復号処理へ復帰を図るようにしていると、以下のような問題が生ずる。
【0025】
即ち、例えば、エラー発生後、常にスライスレイヤ以上の層のスタートコードの検出で復帰を図るようなシステムにおいて、重大なエラーが発生した場合を考える。ここでいう重大なエラーとは、例えば、チャネル切替えで全く別の符号化データに瞬間的に切り替わった場合のように、符号化データの連続性が失われている場合である。
【0026】
もしも、ピクチャサイズのように、チャンネル切替えの前後で復号に不可欠な重要なパラメータが異なっていると、実際上それ以上復号を継続するのは困難である。それにもかかわらず、このシステムは、エラーレベルを評価する手段を持たないので、スタートコードを有する最下位層であるスライスレイヤのスライスヘッダのスタートコードを検出する度に正常な復号処理へ復帰してしまう。そして、その後復号処理に破綻を来たし、再びエラー処理に入るという繰返しが行なわれる。そして、その結果、著しい画像の劣化を引き起こすことになる。
【0027】
また、例えば、エラー発生後、常にシーケンスヘッダのスタートコードの検出で復帰を図るようなシステムを考える。このようなシステムでは、前述のような重大なエラーが発生した場合でも、次のシーケンスヘッダを検出するまで復号処理に復帰しないので、それまでの間、例えば、直前の参照画像を表示し続けるようにしておけば、画像の乱れは最小限に留めることができる。
【0028】
ところが、このようなシステムにおいては、比較的軽微なエラーが発生した場合に問題が生じる。ここでいう軽微なエラーとは、例えば、DCT係数の数ビットが誤っている場合である。
【0029】
このような場合、エラーの影響を受けるのはせいぜいその誤りを含むスライスのみであるので、次のスライスですぐに復帰すれば、以後は正常に復号処理を続けていくことが可能である。それにもかかわらず、このシステムは、エラーレベルを評価する手段を持たないので、次のシーケンスヘッダでのスタートコードを検出するまでは復帰しない。そのため、次のスライスで復帰する場合に比べて正常な復号処理への復帰が遅れ、正常な画像を表示することが長時間できなくなってしまう。
【0030】
以上のように、エラーレベルを評価せず、エラー検出から正常な復号処理への復帰を常に同じ方法で行なうようにしていると、エラーレベルに応じた適切なレイヤへ必要最低限の時間で復帰することができず、その結果、正常でない画像を長時間表示してしまう可能性がある。
【0031】
本発明の目的は、エラーレベルに応じた適切なレイヤで速やかに復号動作を復帰させ、エラーによる正常でない画像を表示する時間を必要最低限の時間に抑えることを可能とした符号化映像信号の復号化処理方法及びそれを用いた復号化装置を提供することにある。
【0032】
【課題を解決するための手段】
上記目的を達成するために、本発明は、復号化時にエラーを検出すると、この検出したエラーの程度を複数のレベルに評価し、その評価に基づいてエラーからの復帰過程を切り替えるようにする。
【0033】
【作用】
符号化映像信号の復号中に符号のエラーがあった場合、このエラーが検出されると、この検出エラーがその重要度を表わすレベルのいずれに該当するか評価される。この評価の結果に応じて、正常な復号処理への復帰の段階を異ならせる。即ち、検出エラーの評価レベルが低いときには、符号化映像信号の下位の階層から復帰するようにし、検出エラーの評価レベルが高いときには、上位の階層から復帰するようにする。
【0034】
このようにして、検出エラーの評価レベルに応じて正常な復号処理への復帰の段階を異ならせることにより、エラーの評価レベルに応じた適切なレイヤで速やかに復帰を図ることができる。
【0035】
【実施例】
以下に本発明の実施例を図面を用いて説明する。
なお、以下に説明する実施例では、入力信号として先に説明したMPEGに準ずる映像信号の符号化データを想定する。
【0036】
図1は本発明による符号化映像信号の復号化処理方法及びそれを用いた復号化装置の一実施例を示すブロック図であって、1は復号化装置、2は外部メモリ、3は入力端子、4は出力端子、5は入力バッファメモリ、6は復号用バッファメモリ、7は可変長復号ユニット、8はIDCT(逆離散コサイン変換)ユニット、9は動き補償ユニット、10は表示ユニット、11はメモリコントローラ、12はタイミングユニット、13はデータバスである。
【0037】
同図において、MPEGに準ずる映像信号の符号化データが入力端子3から入力され、入力バッファメモリ5に一時格納される。メモリコントローラ11からデータリクエスト信号があると、入力バッファメモリ5から符号化データが読み出され、データバス13を介してメモリコントローラ11に送られる。メモリコントローラ11はこの符号化データをアドレス及び制御信号とともに外部メモリ2に送り、この符号化データを外部メモリ2の所定の領域に記憶させる。
【0038】
また、メモリコントローラ11は、復号用バッファメモリ6からデータリクエスト信号があると、アドレス及び制御信号により、外部メモリ2から符号化データを読み出し、復号用バッファメモリ6に転送する。この復号用バッファメモリ6に一時格納された符号化データは可変長復号ユニット7,IDCTユニット8及び動き補償ユニット9によって復号される。
【0039】
この復号化されたフレームまたはフィールド単位の画像(復号化画像)は、データバス13を介してメモリコントローラ11に供給され、これにより外部メモリ2の所定の領域に記憶される。外部メモリ2に記憶された復号化画像は、一方では、表示画像として読み出され、データバス13を介して表示ユニット10に供給され、所定の表示処理がなされて出力端子4から出力される。また、他方では、PピクチャやBピクチャのように復号化処理に参照画像が必要な場合、メモリコントローラ11は、上記のように、外部メモリ2から復号化処理すべきPまたはBピクチャの符号化データを読み出して復号用バッファメモリ6に転送するとともに、外部メモリ2から復号化画像を読み出し、参照画像としてデータバス13を介し動き補償ユニット9に転送する。
【0040】
また、MPEGの規格に従う符号化映像信号の場合、先に説明したスタートコードのパターンの特有性から、符号化データ中にゼロが連続して5バイト分以上存在した場合には、そのうち少なくとも1バイト分はダミーで挿入されたゼロデータであることが分かっている。ゼロが連続して5バイト見つかった場合には、このことを利用して、入力バッファメモリ5では、機械的にそのうちの1バイト分を除去するようにして符号化データの出力を行ない、後段の復号化処理部における処理負担の低減化を図っている。
【0041】
復号用バッファメモリ6は、その内部に空きが生じると、メモリコントローラ11にデータリクエスト信号を出力し、このメモリコントローラ11の制御によって外部メモリ2から転送される符号化データを受け取って蓄積する。そして、可変長復号ユニット7からデータリクエスト信号を受けると、それに応じて内部に蓄積したデータを出力する。但し、外部メモリ2内に符号化データが残っていない場合には、データエンプティ信号を出力して復号用バッファメモリ6が空であることを可変長復号ユニット7に知らせる。
【0042】
可変長復号ユニット7は、後に詳細に説明するが、復号用バッファメモリ6から符号化データを受けてそれを解析し、符号化データ中の上記のようなパラメータ及びDCT係数を復号化する。このパラメータは、復号化処理に必要な情報として復号化装置1内の各復号化処理ブロック8〜10,12へ送られる。また、DCT係数はIDCTユニット8へ送られる。
【0043】
IDCTユニット8は、可変長復号ユニット7から受けたDCT係数データを逆DCT処理し、それによって得られるIDCT係数を動き補償ユニット9に送る。
【0044】
動き補償ユニット9は、まず、可変長復号ユニット7で復号化したパラメータから動きベクトルを再生し、それをメモリコントローラ11に与えて外部メモリ2に記憶されている復号化画像のうちから所定の復号化画像を参照画像として読み出させる。そして、この参照画像とIDCTユニット8の出力とを加算し、復号化画像を再生する。再生された復号化画像は、表示用画像や次の画像の復号化処理のための参照画像として、メモリコントローラ11を介して外部メモリ2内に記憶される。
【0045】
表示ユニット10は、外部メモリ2からメモリコントローラ11を介して表示タイミングに合わせて復号化画像を読み出し、最終的な画像データに変換した後、出力端子4から出力する。
【0046】
タイミングユニット12には、表示用画素クロック(pelCLK)と、これに同期した水平同期信号(Hsync)及び垂直同期信号(Vsync)とが供給される。これら水平同期信号(Hsync)及び垂直同期信号(Vsync)が供給されない場合には、内部でこれらを表示用画素クロック(pelCLK)から生成する。そして、これらの信号に基づいてタイミング・制御信号とを生成して各処理ブロック5〜11に送り、これら処理ブロックが互いに協調して復号化処理を行なうように制御する。
【0047】
図2は図1における外部メモリ2の内部構成の一具体例を示す模式図である。
【0048】
同図において、外部メモリ2は3つのフレームメモリ領域14〜16と符号化データ用バッファ領域17とを有し、これらフレームメモリ領域14,15,16には夫々復号化画像を1つずつ記憶するようにし、符号化データ用バッファ領域17には、入力バッファメモリ5(図1)からの符号化データを一時記憶するようにする。これら領域14〜17での書込/読出制御がメモリコントローラ11によって行なわれる。
【0049】
図3はかかるメモリコントローラ11の一具体例を示すブロック図であって、11aは符号化データ用バッファ制御部、11bは参照画像読出制御部、11cは復号化画像書込制御部、11dは復号化画像読出制御部、11eはバス幅変換部である。
【0050】
同図において、符号化データ用バッファ制御部11aは、外部メモリ2内の符号化データ用バッファ領域17(図2)に空きがあると、入力バッファメモリ5(図1)にデータリクエスト信号を送り、それに応じて送られてきた符号化データをバス変換部11eで処理した後、この符号化データ用バッファ領域17に格納するように、外部メモリ2へアドレス及び制御信号を出力する。また、この符号化データ用バッファ制御部11aは、復号用バッファメモリ6(図1)からデータリクエスト信号を受けると、それに応じて符号化データ用バッファ領域17(図2)から符号化データを読み出し、バス変換部11eで処理した後、復号用バッファメモリ6に転送する。
【0051】
参照画像読出制御部11bは、動き補償ユニット9(図1)から動きベクトル信号を受け、それに基づいて外部メモリ2にアドレス及び制御信号を出力し、そのフレームメモリ領域14〜16(図2)から所定の参照画像を読み出す。
【0052】
復号化画像書込制御部11cは、動き補償ユニット9(図1)からの復号化画像を外部メモリ2でのフレームメモリ領域14〜16(図2)のいずれかに格納するように、外部メモリ2へアドレス及び制御信号を出力する。また、復号化画像読出制御部11dは、表示のタイミングに合わせて、これらフレームメモリ領域14〜16のいずれからか所望とする復号化画像を読み出すためのアドレス及び制御信号を出力する。
【0053】
図4は復号化処理タイミングと外部メモリ2内のフレームメモリ領域14〜16での復号化画像の書込み/読出し及び表示タイミングとの関係を示すタイミングチャートであって、Vsyncは表示系の垂直同期信号を示す。また、ここでは、図13で示した符号化映像信号を復号するものとし、符号化データはピクチャがI1,P5,B2,B3,B4,P9,B6,B7,B8の順となっている。ここで、勿論、I1はIピクチャ、P5,P9はPピクチャ、B2〜B4,B6〜B8はBピクチャであり、それらの数字は表示の順序を示している。
【0054】
図2において、外部メモリ2では、フレームメモリ領域14,15が参照画像としてのIピクチャまたはPピクチャの書込みに割り当てられ、フレームメモリ領域16がBピクチャの書込みに割り当てられる。ここでは、各ピクチャが1フレーム分の画像から構成されているものとする。
【0055】
最初の1フレーム期間でI1ピクチャの復号化処理が行なわれ、その復号化画像I1(以下、復号前のピクチャと同じ符号を用いる)はフレームメモリ領域14に書き込まれる。次の1フレーム期間では、復号化画像I1をフレームメモリ領域14から読み出し、これを参照画像としてP5ピクチャの復号化処理を行ない、この結果得られた復号化画像P5をフレームメモリ領域15に書き込む。そして、さらに次の1フレーム期間では、これら復号化画像I1,P5を読み出して参照画像とし、B2ピクチャの復号化処理を行なう。これによって得られる復号化画像B2はフレームメモリ領域16に書き込まれる。以下同様にして、各ピクチャの復号化処理が行なわれる。
【0056】
次に、表示のための外部メモリ2からの読出しについて説明する。
【0057】
あるピクチャの復号化画像のフレームメモリ領域14,15または16への書込みが行なわれると、次に、この同じフレームメモリ領域に新たな復号化画像が書き込まれる前にこの読出しが行なわれなければならない。例えば、図4でB2ピクチャに着目すると、このB2ピクチャが復号化処理されてフレームメモリ領域16に書き込まれた後、引き続き次の1フレーム期間では、B3ピクチャが復号化処理されてフレームメモリ領域16に書き込まれることになる。
【0058】
ここで、もし、復号化画像B2の表示のための読出し開始をB2ピクチャの復号化処理が完全に終了するまで待たせたとすると、この読出しが次のB3ピクチャの復号化及びその復号化画像B3のフレームメモリ領域16への書込みと重なってしまうので、フレームメモリ領域がもう1つ余分に用意し、復号化画像B2,B3を夫々別々のフレームメモリ領域に格納するようにしなければならない。
【0059】
しかし、実際には、B2ピクチャの復号化処理(書込み)が完全に終了するまでその表示(読出し)を待つ必要はなく、復号化処理が済んだ部分から後追いで順次読み出していけばよい。このようにすることにより、Bピクチャ用のフレームメモリ領域として1フレーム分あるだけで、Bピクチャの復号化処理と表示が問題なく行なえることになる。
【0060】
但し、符号化映像信号では、1ピクチャ内に符号量の偏りがあるので、復号化処理の進み具合は局所的にムラが存在する。そこで、この実施例においては、図4に示したように、B2ピクチャの復号化処理(書込み)開始から1フィールド遅れて復号化画像B2の表示(読出し)を開始するようにして、マージンを取っている。
【0061】
以上のように、外部メモリ2の容量を最小限にして効率的に利用しながら復号化処理を行なうためには、表示系の垂直同期信号Vsyncに同期して復号化処理を制御することが不可欠であり、表示系の垂直同期信号Vsyncのタイミングを無視した復号化処理は現実的でない。
【0062】
図1におけるタイミングユニット12は、以上のように、復号化処理を制御するものであって、このためのタイミング・制御信号を生成して出力する。かかるタイミング・制御信号を図5により説明する。但し、ここでは、復号化画像による映像信号がNTSC方式のテレビジョン信号に準拠した映像信号であるものとし、図中のVsync,Hsyncは夫々復号化画像を表示するための垂直,水平同期信号である。
【0063】
かかるタイミング・制御信号は、図15で示したピクチャレイヤ以上の階層の復号化処理を開始することを示す制御信号(PictStart)と、スライスレイヤを含む1マクロブロックの復号化を開始することを示す制御信号(MbStart)とからなっている。
【0064】
復号化しようとするピクチャが1フレームに相当する場合、図5(1)に示すように、1フレーム毎に制御信号(PictStart)を1個、制御信号(MbStart)を1フレーム分のマクロブロック数を復号化するのに充分な個数だけ夫々出力する。同様に、復号化しようとするピクチャが1フィールドに相当する場合には、図5(2)に示すように、1フィールド毎に制御信号(PictStart)を1個、制御信号(MbStart)を1フィールド分のマクロブロック数を復号化するのに充分な個数だけ出力する。図5(1),(2)は、復号化しようとするピクチャがフレーム画像であるか、フィールド画像であるかに応じて適応的に変える。
【0065】
図6は図1における可変長復号ユニット7の一具体例を示すブロック図であって、7aはバレルシフタ、7bは復号化テーブル、7cはバッファメモリ、7dはバッファメモリ制御器、7eはスタートコード検出器、7fはタイミング制御器、7gは復号制御器である。
【0066】
同図において、復号用バッファメモリ6(図1)からの符号化データは、バレルシフタ7aに供給される。このバレルシフタ7aは、取り込んだ符号化データの一部を復号化テーブル7bに供給する。復号化しようとする符号は、一般に、可変長符号であるので、この復号化テーブル7bからその符号長を受けとって次の符号データの頭出しを行なう。バレルシフタ7a内の符号化データを使い切ると、復号用バッファメモリ6(図1)に対してデータリクエスト信号を送り、次の符号化データを要求する。
【0067】
復号化テーブル7bは、符号化データに含まれるパラメータとDCT係数とを復号化するものであって、図7に示すように、n個のテーブルからなり、テーブル1はDCT係数を、テーブル2〜nはパラメータや符号長などのDCT係数以外の特定の符号を夫々復号化するためのものである。後述する復号制御信号により、それらのうちのどれを選択するか決定される。
【0068】
なお、供給された符号化データに該当する符号が選択されたテーブル中に存在しない場合には、エラーが発生したと判断してエラー検出信号を出力する。
【0069】
図6において、復号化テーブル7bから得られる夫々の符号の符号長データはバレルシフタ7aに供給される。また、復号化テーブル7bから出力されたデータのうちのDCT係数は一旦バッファメモリ7cに格納され、1ブロック分である64個のDCT係数が揃うと、IDCTユニット8(図1)に出力する。
【0070】
バッファメモリ制御器7dは内部にカウンタを備え、復号化テーブル7bから出力されるDCT係数の個数をカウントしてバッファメモリ制御信号を出力し、上記のように、バッファメモリ7cを制御する。万一DCT係数が64個より多く送られた場合には、エラーが発生したと判断してエラー検出信号を出力する。
【0071】
スタートコード検出器7eは、符号化データが供給され、その中からスタートコード(図15を参照)に特有なパターンを検出すると、スタートコード検出信号を出力する。
【0072】
以上のような可変長復号ユニット7の動作を制御するのが、タイミング制御器7fと復号制御器7gである。
【0073】
図8はこのタイミング制御器7fの一具体例を示すブロック図であって、7f1は復号タイミング制御部、7f2はMBアドレスカウント部、7f3はMBアドレス抽出部、7f4はMBアドレス比較制御部である。
【0074】
同図において、復号タイミング制御部7f1は、タイミングユニット12(図1)からタイミング・制御信号が供給され、復号制御器7g(図6)を始めとする可変長復号ユニット7内の処理ブロックに適切なタイミングで動作開始及び停止の指示を与える復号タイミング制御信号を生成出力する。即ち、タイミング・制御信号の制御信号(PictStart)によってピクチャレイヤの開始が指示され、また、制御信号(MbStart)によってマクロブロックの開始が指示されて、この復号タイミング制御信号が生成される。
【0075】
MBアドレスカウント部7f2は、上記タイミング・制御信号のうちの制御信号(PictStart)によってクリアされ、制御信号(MbStart)をカウントすることにより、復号化タイミング上のマクロブロックアドレスを生成する。一方、MBアドレス抽出部7f3は、復号化テーブル7b(図6)で符号化データを解析した結果得られるパラメータを基に、符号化データ上のマクロブロックアドレスを抽出して再生する。復号化処理はタイミング・制御信号をタイミング基準として行なわれ、正常の復号化処理では、タイミング・制御信号の制御信号(MbStart)が制御信号(PictStart)から何個目であるのものであるかで決まるマクロブロックアドレスのマクロブロックが処理される。このため、復号化処理が正常に行なわれている場合には、これら2つのマクロブロックアドレスは一致するはずである。そこで、MBアドレス比較制御部7f4で両者が比較され、もし後者(即ち、符号化データから抽出されたマクロブロックアドレス)が遅れている場合には、エラーが発生したと判断してエラー検出信号を出力する。もし後者が進みすぎていた場合には、一致するまでの間このマクロブロックの復号化処理を一時停止させる復号タイミング制御信号を出力する。
【0076】
図9は図6における復号制御器7gの一具体例を示すブロック図であって、7g1は復号状態カウンタ、7g2は分岐先計算部、7g3はエラー検出器、7g4はエラーレベルカウンタである。
【0077】
符号化データでは、符号化方式の規格で予め定義された符号が決められた順番で配列されている。但し、この順番は、ただ単純に符号が並んでいるだけではなく、条件に応じて特定の符号の配列順や存在が変化する。そして、その条件自体を表わすデータも符号化データ中に符号化されている。
【0078】
このような性質を有する符号化データを適切に復号化処理するために、この実施例では、図9に示すように、復号制御器7g内に復号状態カウンタ7g1を設け、それによって上記符号の順番を含めた復号化処理の状態を管理,制御するようにしている。復号状態カウンタ7g1で保持される値は現在の復号状態を示しており、それは、同時に、復号制御信号として可変長復号ユニット7内の各処理ブロック(図6)の制御に用いられる。
【0079】
分岐先計算部7g2は、上記復号制御信号が示す現在の復号状態とその時点までに復号化されたパラメータの値に基づいて次の復号状態を決定し、これを復号状態カウンタ7g1に指示する。このようにして、符号化データ中に含まれている条件データに基づいて、適切な順番で符号を解析することが可能となる。
【0080】
なお、復号化テーブル7b(図7),バッファメモリ7d,タイミング制御器7f(図6,図8)、または、後述のエラー検出器7g3からエラー検出信号を受けると、エラー処理を行なうルーチンに分岐するように復号状態カウンタ7g1に指示する。さらに、符号化データの規格上決められた位置以外でスタートコードを検出した場合も、エラーと判断してエラー処理ルーチンに分岐させる。
【0081】
エラー検出器7g3は、復号化テーブル7b(図6)で復号化されたパラメータの値を調べ、それが予め決められた範囲内に収まっているかどうかをチェックする。もし収まっていない場合には、エラーが発生したと判断してエラー検出信号を出力する。また、符号化データ中にシーケンスエラーコードを検出した場合でも、やはりエラーが発生したと判断してエラー検出信号を出力する。
【0082】
エラーレベルカウンタ7g4は、エラー検出によって復号制御器7gがエラー処理ルーチンに分岐した場合、復号状態カウンタ7g1からの復号制御信号によってそのエラーレベルを判断する。この判断結果を表わすエラーレベル信号は復号化装置1内の各処理ブロックに分配される。
【0083】
次に、この復号制御器7gでのエラー発生時の処理についてさらに詳しく説明する。
【0084】
上記のように、エラー検出方法のいずれかによってエラーが検出されると、分岐先計算部7g2の指示でエラー処理ルーチンに分岐する。このエラー処理ルーチンの一具体例を図10によって説明する。
【0085】
まず、エラーを検出する(ステップ101)と、エラーレベルを1に設定する(ステップ102)。具体的には、エラーレベルカウンタ7g4(図9)が復号状態を復号状態カウンタ7g1(図6)からの復号制御信号から検知して、エラーレベルを1に設定する(以下、エラーレベルの設定は同様の仕組みで行なわれる)。
【0086】
次に、この時点で上記制御信号(PictStart)(これは、復号の垂直同期パルスとみられるものである)を検出したかどうかを調べ(ステップ103)、検出していたときには、エラーレベルを2に変更し(ステップ106)、検出していなければ、正常な復号化処理へ復帰するきっかけとなるスタートコードを検出したかどうかを調べる(ステップ104)。スタートコードを検出した場合、即ち、復号の垂直同期信号(PictStart)が検出する前にスタートコードを検出した場合、このエラーは格別大きな影響力がなく、重大性が低いものとして、正常に復号化処理への復帰処理を行なう(ステップ113)。
【0087】
復号の垂直同期信号(PictStart)もスタートコードも検出されないときには、ステップ103に戻り、復号の垂直同期信号(PictStart),スタートコードのいずれかを検出するまで、ステップ103,104の動作が繰り返される。
【0088】
上記復帰処理のルーチン(ステップ113)は、スライスレイヤ以上の階層で復帰を図るルーチンである。このように、エラーレベルが1の場合には、符号化データの階層構造のうちのスタートコードを有するレイヤとしては最下層であるスライスで復帰を図ることができる。
【0089】
スタートコードを検出するより前に復号の垂直同期信号(PictStart)を検出した場合には、エラー中に他のピクチャが移ってしまったなどの事態が生じ、エラーレベル1のエラーよりも重大なものとなる。このため、かかるエラーに対しては、エラーレベルを2に設定し(ステップ106)、先のステップ103,104と同様に、復号の垂直同期信号(PictStart),スタートコードのいずれかを検出する処理を繰り返す(ステップ107,108)。
【0090】
この場合、復号の垂直同期信号(PictStart)よりも先にスタートコードを検出した場合には、さらに、それがピクチャヘッダ以上であるかどうかを調べ(ステップ109)、そうであるならば、復帰処理を行ない(ステップ114)、ピクチャヘッダより下位のレイヤ、即ち、スライスヘッダである場合には、再度ステップ107に戻るようにしている。
【0091】
このようにして、エラーレベルが2の場合には、ピクチャレイヤ以上の階層の開始から復帰を図るようにすることが可能である。
【0092】
さらに、スタートコードよりも先に復号の垂直同期信号(PictStart)を検出した場合には(ステップ107)、ピクチャの開始さえ検出されないような重大性が最も高いエラーが生じたことになり、このようなエラーに対しては、エラーレベルを3に設定する(ステップ110)。そして、スタートコードを検出するまで待ち(ステップ111)、スタートコードを検出すると、それがシーケンスヘッダ以上であるかどうかを調べ(ステップ112)、そうであるならば、復帰処理を行ない(ステップ115)、シーケンスレイヤより下位のレイヤのヘッダである場合には、再度ステップ111に戻るようにしている。
【0093】
このようにして、エラーレベルが3の場合には、シーケンスレイヤ以上のみで復帰を図るようにすることが可能である。
【0094】
以上のようにして得られるエラーレベル信号は、復号化装置1内の図1に示す各ブロックに分配されている。
【0095】
次に、エラー発生時のエラー隠し処理について説明する。
【0096】
図1において、エラーレベルが1の場合には、動き補償ユニット9で、通常の処理によってマクロブロックの画像を復号する代わりに、現在処理中のマクロブロックと同じ位置の直前の参照画像のデータを用いてこのマクロブロックのエラーを隠す。そのためには、メモリコントローラ11にゼロの動きベクトルを与えて参照画像を読み出させる。このようにして、最も軽微なエラーであるレベル1の場合、エラー隠しはマクロブロック単位で行なわれるので、その後正常な復号化処理に復帰した場合でも、エラーが画面上に与える影響は最小限で済むことになる。
【0097】
エラーレベルが2の場合には、表示ユニット10で、現在復号中のピクチャを表示する代わりに、既に復号済みの直前のピクチャ(参照画像)を表示するようにしてエラーを隠す。そのためには、メモリコントローラ11に送る表示画像を指定する信号を、エラー時には、直前の参照画像を指定するように切り替える。このようにして、エラーレベル2の場合には、ピクチャ単位でエラー隠しを行なうようにすることができる。
【0098】
また、エラーレベルが3の場合には、最も重大なエラーであって、それ以上そのまま復号を継続することが困難であると判断し、一旦入力バッファメモリ5や復号用バッファメモリ6,メモリ2の符号化データ用バッファ領域17(図2)をクリアする。この符号化データ用バッファ領域17のクリアは、メモリコントローラ11内の符号化データ用バッファ制御部11a(図3)にエラーレベルが3のエラーレベル信号を送ることによって行なわれる。その後、新たに入力端子3から入力された符号化データに対して復号化を試みる。また、可変長復号ユニット7がシーケンスヘッダを発見して正常な復号化処理に復帰するまでの間、表示ユニット10は既に復号済みの直前のピクチャ(参照画像)を表示し続けるようにする。
【0099】
このようにして、この実施例では、エラーから復帰するまでの時間でエラーレベルを複数の段階に評価をするものであって、これにより、夫々のエラーレベルに応じて復帰させる過程を異ならせることが可能である。また、夫々のエラーレベルに応じた適切なエラー隠しを行なうことができるので、エラーの影響で画像が乱れる時間を必要最低限に抑えることが可能である。
【0100】
図11は図6での復号制御器7gの他の具体例を示すブロック図であって、7g5はエラー回数カウンタであり、図9に対応する部分には同一符号を付けて重複する説明を省略する。
【0101】
同図において、この具体例は、図9に示した構成にエラー回数カウンタ7g5が追加されたものであり、このエラー回数カウンタ7g5は、タイミング制御器7f(図6)からエラー検出信号を受けると、そのカウンタ値を1だけ増加させてエラー回数を計数し、その計数値を分岐先計算部7g2に与える。
【0102】
次に、図12により、図11に示す復号制御器7gでのエラー処理ルーチンの一具体例について説明する。
【0103】
このエラー処理ルーチンが図10に示したものと異なる点は、エラーレベルの評価を復号の復号の垂直同期信号(PictStart)という時間に基づいた信号で行なうのではなく、過去にエラーの発生した回数で行なうようにした点にある。
【0104】
まず、エラー検出方法のいずれかによりエラーが検出されると、エラー回数カウンタ7g5のカウント値が1だけ増加するとともに、エラー処理ルーチンに分岐する(ステップ201)。ここで、過去にエラーが発生した回数を調べ、それが1回(即ち、今回が初めて)であるならば、エラーレベルを1に設定し(ステップ203)、スタートコードを検出するまで待機する(ステップ204)。そして、スタートコードを検出すると、復帰処理ルーチン(ステップ213)に映る。
【0105】
この復帰処理ルーチン(ステップ213)は、スライスレイヤ以上で復帰を図るルーチンであり、エラーレベルが1の場合には、符号化データの階層構造のうちのスタートコードを有するレイヤとしては最下層であるスライスで復帰を図ることができる。
【0106】
一方、エラー発生回数が1回より多く(ステップ202)、かつ、過去のエラー発生回数が2回(即ち、今回が2回目)であるときには(ステップ206)、エラーレベルを2に設定し(ステップ207)、スタートコードを検出するまで待機する(ステップ208)。そして、スタートコードを検出すると、それがピクチャヘッダ以上であるかどうかを調べ(ステップ209)、そうであれば、復帰処理に移行し(ステップ214)、ピクチャヘッダより下位のレイヤ、即ち、スライスヘッダである場合には、再度ステップ208に戻るようにしている。この点がエラーレベルが1のときと異なる。
【0107】
このようにして、エラーレベルが2の場合には、ピクチャレイヤ以上のみで復帰を図るようにすることが可能である。
【0108】
また、エラー発生回数が2回より多い場合には(ステップ202)、エラーレベルを3に設定し(ステップ210)、スタートコードを検出するまで待機する(ステップ211)。スタートコードを検出した場合には、さらに、それがシーケンスヘッダ以上であるかどうかを調べ(ステップ212)、そうであれば、復帰処理に移行し(ステップ215)、シーケンスレイヤより下位のレイヤのヘッダであった場合には、再度ステップ211に戻るようにしている。
【0109】
このようにして、エラーレベルが3の場合には、シーケンスレイヤ以上のみで復帰を図るようにすることが可能である。
【0110】
なお、エラーレベルに応じたエラー隠し処理については、先に説明したものと同様である。
【0111】
以上のように、この具体例では、エラーが発生した回数でエラーレベルを複数の段階に評価するものであり、夫々のエラーレベルに応じて復帰させる過程を異ならせることが可能である。また、夫々のエラーレベルに応じた適切なエラー隠しを行なうことができるので、エラーの影響で画像が乱れる時間を必要最低限に抑えることが可能である。
【0112】
以上、本発明の実施例について説明したが、本発明はかかる実施例のみに限定されるものではない。
【0113】
即ち、上記実施例では、入力符号化データをMPEGに準じたものとしたが、これに限らず、同様の性質を備えた別の符号化方法で符号化されたデータであってもよい。
【0114】
また、図4において、上記実施例における復号化処理とメモリ2内に設けられたフレームメモリ領域14〜16の利用及び表示のタイミングの関係を、各ピクチャが1フレーム分の画像から構成されている場合を例として説明したが、これに限定されるものではなく、各ピクチャが1フィールド分の画像から構成されている場合についても同様である。
【0115】
さらに、図5において、タイミングユニット12(図1)からの制御信号をNTSC方式のテレビジョン信号を例として説明したが、これに限定されるものではなく、他の方式のテレビジョン信号でも同様である。
【0116】
さらにまた、上記実施例においては、エラーレベルを3段階に評価するものとしたが、これに限定されるものではなく、さらに細かくあるいは逆に2段階にしてもよく、必要に応じて変えてよい。
【0117】
さらにまた、図10に示したエラー処理ルーチンでは、エラーレベルを評価するための信号として復号の垂直同期信号(PictStart)を用いたが、これに限定されるものではなく、表示系の垂直同期パルス(Vsync)そのものあるいは他のこれに密接に関係する信号を用いるようにしてもよい。
【0118】
さらにまた、上記実施例においては、エラーレベルが2以上の場合、既に復号済みのピクチャ(参照画像)を表示するようにしたが、これに限定されるものではなく、例えば無地の画像や他の任意の画像を表示するようにしてもよい。
【0119】
【発明の効果】
以上説明したように、本発明によれば、エラーから復帰するまでの時間によりあるいはエラーが発生した回数により、エラーレベルを複数の段階に評価し、夫々のエラーレベルに応じて復帰させる過程を異ならせることが可能であって、夫々のエラーレベルに応じた適切なエラー隠しを行なうことができるので、エラーの影響で画像が乱れる時間を必要最低限に抑えることができる。
【図面の簡単な説明】
【図1】本発明による符号化映像信号の復号化処理方法及びそれを用いた復号化装置の一実施例を示すブロック図である。
【図2】図1におけるメモリの内部構成の一具体例を示す模式図である。
【図3】図1におけるメモリコントローラの一具体例を示すブロック図である。
【図4】図1に示した実施例での復号化処理タイミングとメモリ内のフレームメモリ領域での復号画像の書込み/読出し及び表示タイミングとの関係を示すタイミングチャートである。
【図5】図1におけるタイミングユニットから出力される制御信号の一具体例を示す図である。
【図6】図1における可変長復号ユニットの一具体例を示すブロック図である。
【図7】図6における復号化テーブルの一具体例を示すブロック図である。
【図8】図6におけるタイミング制御器の一具体例を示すブロック図である。
【図9】図6における復号制御器の一具体例を示すブロック図である。
【図10】図9に示した復号制御器で指示されるエラー処理ルーチンの一具体例を示すフローチャートである。
【図11】図6における復号制御器の他の具体例を示すブロック図である。
【図12】図11に示した復号制御器で指示されるエラー処理ルーチンの一具体例を示すフローチャートである。
【図13】MPEGに準ずる符号化コードの一例を示す図である。
【図14】図13で示した符号化データでのマクロブロックの構成を示す図である。
【図15】MPEGの符号データでのレイヤの階層構造を示す図である。
【符号の説明】
1 復号化装置
2 メモリ
3 入力端子
4 出力端子
5 入力バッファメモリ
6 復号用バッファメモリ
7 可変長復号ユニット
8 IDCTユニット
9 動き補償ユニット
10 表示ユニット
11 メモリコントローラ
12 タイミングユニット
[0001]
[Industrial application fields]
The present invention relates to a decoding processing method for a video signal encoded for reducing the amount of data and a decoding apparatus using the decoding method.
[0002]
[Prior art]
The digitized video signal has a huge amount of information, particularly when it is a video signal of a moving image. For this reason, if such a video signal is recorded as it is on a recording medium such as a magnetic disk for a long time, a very large storage capacity is required and the cost is increased. Also, when trying to transmit in real time by wire or wireless, the bit rate of video data is high, so a very broadband transmission path is required, and its realization is not easy. In view of this, several encoding methods have been proposed in the past for efficiently encoding video data by signal processing to reduce the amount of data.
[0003]
As such an encoding method, there are MPEG1 ("OPTRONICS"; see 1992 No.5 pp.86-98) and MPEG2 ("Journal of the Television Society"; Vol.48 No.1 pp.44-49). (Hereinafter, when expressed simply as MPEG, both are indicated). In MPEG, in order to reduce the amount of video data, the following methods are mainly used in combination as appropriate.
[0004]
The first method is to calculate the number of bits required for encoding by taking a difference between an image to be encoded and images before and after that (hereinafter referred to as a reference image) and converting the difference into an information signal having a small amplitude. It is a way to reduce.
[0005]
In MPEG, an image unit to be encoded is called a picture. In the case of MPEG1, one picture is composed of one frame of the original image. In the case of MPEG2, one picture is composed of one frame unit or one field unit of the original image, and which unit is used can be selected at the time of encoding.
[0006]
There are three types of pictures, I, P, and B pictures, depending on the image reference method. This is shown in FIG.
[0007]
In the figure, the image that is the start point of the arrow represents the reference image, and the image that is the end point represents the picture being decoded. The I picture does not refer to an image. This is because all the information necessary for decoding is encoded in the picture. The P picture uses the I picture or P picture decoded immediately before as a reference picture. A B picture uses an I or P picture existing immediately before and after it as a reference picture.
[0008]
One picture is divided by a section having a certain size called a macroblock. Furthermore, the macro block is composed of a unit image (hereinafter referred to as a block) of 8 pixels × 8 pixels. For example, when the color video signal has a format of Y: Cb: Cr = 4: 1: 1, as shown in FIG. 14A, four blocks of luminance signals Y0 to Y3, color difference signals Cb and Cr, A macro block is composed of six blocks, one for each block.
[0009]
As shown in FIG. 14B, these macroblocks are given serial numbers called macroblock addresses in order from the upper left corner of the image. Here, for example, when one picture is composed of a frame image of 720 × 480 pixels, there are (720 × 480 pixels) ÷ (8 × 8 × 4) = 1350 macroblocks. . Accordingly, macroblock addresses 0 to 1349 are set in sequential macroblocks.
[0010]
The macro block is a minimum unit for taking a difference from the reference image. The image reference method can be changed in units of macroblocks. For this reason, information indicating this and information indicating a part actually used for reference in the reference image (this is referred to as motion vector information) are encoded in the encoded data of each macroblock.
[0011]
A second method for reducing the amount of data is a method of converting the video data into the spatial frequency domain by performing DCT processing (discrete cosine transform processing) on the video data. In the case of a video signal, generally, the ratio of energy concentration to the low frequency component of the spatial frequency is high, and the high frequency component has a small amplitude. Therefore, it is possible to optimize the allocation of the number of bits by increasing the number of bits allocated to the encoding as the low frequency component and decreasing the high frequency component, thereby reducing the total number of bits. Is possible. In MPEG1 and 2, DCT is performed on a block basis as described above to reduce data.
[0012]
A third method for reducing the amount of data is to send data representing the value and the number of the data instead of repeatedly sending the data of the same value when a plurality of data of the same value are consecutive. This is a method for reducing the amount of data. In MPEG, this method is used for encoding DCT coefficients.
[0013]
A fourth method for reducing the amount of data is variable-length coding in which codes having different lengths are assigned according to the appearance probabilities of the respective values. By assigning a shorter code to a value having a higher appearance frequency, it is possible to reduce the total number of bits. In MPEG, variable length coding is used for coding parameters such as macroblock addresses and motion vectors in addition to DCT coefficients. In each of these, a correspondence table between variable length codes and values to be decoded is determined in advance in the standard.
[0014]
Next, the hierarchical structure of the code will be described.
[0015]
MPEG encoded data has a hierarchical structure called a layer, and as shown in FIG. 15, there are six layers from a sequence layer to a block layer.
[0016]
The sequence layer of the highest layer is a code unit that starts with a sequence header, includes one or more group of picture layers, and ends with a sequence end code. In the sequence header, parameters common to a series of sequence layers such as a picture size and a frame rate are encoded. Note that the header of the sequence layer can be repeatedly inserted into the sequence as needed on the encoding side in preparation for the case where decoding is started in the middle of the sequence layer, such as channel switching.
[0017]
The group of picture layer starts with a group of picture header and includes a plurality of picture layers.
[0018]
This picture layer includes one picture, and includes a plurality of slice layers starting from a picture header. As described above, one picture corresponds to one frame image or one field image. In the picture header, a parameter for distinguishing whether the picture is an I, P, or B picture is encoded.
[0019]
The slice layer starts with a slice header and includes a macroblock layer for each of a plurality of macroblocks. Information indicating the vertical position of the slice on the screen is encoded in the slice header, and information indicating the horizontal position of the slice on the screen is encoded in the macroblock layer immediately after the slice header. ing. When these two pieces of information are combined, the absolute address of the macroblock address can be obtained.
[0020]
The macroblock layer includes blocks constituting the macroblock, and includes a macroblock header and a layer for every six blocks constituting the macroblock shown in FIG. 14A, that is, a block layer. It is out. The macro block header is encoded with the motion vector information and information indicating the macro block address.
[0021]
The block layer of the lowest layer includes a DCT coefficient encoded for each pixel in the block.
[0022]
Among the above layers, the headers of layers higher than the slice layer from the sequence layer to the slice layer start from a code called a start code. The start code is a code having a length of 3 bytes (= 24 bits), and it is prohibited that the same pattern other than the start code appears in the encoded data. Further, when the encoded data is divided from the top in units of 1 byte, the start code is arranged so that the start of the start code starts just from the start (byte alignment). Therefore, even if the continuity of the encoded data is lost due to an error etc., it is easy to find the start code, and use this as a clue to perform normal decoding with at least the header of the slice layer or higher. It is possible to return to processing.
[0023]
By the way, in MPEG, a sequence error code indicating that an error is included in encoded data is prepared. This is, for example, inserted by a transmission medium when an error occurring during transmission of encoded data cannot be corrected. However, the MPEG standard does not define any means for indicating the occurrence of an error other than the sequence error code. Also, there is no provision for distinguishing between various types of errors that can be considered and for evaluating the severity of errors. Furthermore, there is no mention of how to deal with and how to recover when an error actually occurs.
[0024]
[Problems to be solved by the invention]
An error may occur during decoding of the encoded video signal due to some cause such as an error during transmission or a mistake during encoding. When such an error is detected, it is possible to search for the start code described above and use it as a clue to return to normal decoding processing. However, if the severity (error level) of the error that has occurred is not evaluated, and the process always returns to the normal decoding process through the same process, the following problems occur.
[0025]
That is, for example, let us consider a case where a serious error occurs in a system in which recovery is always performed by detecting a start code in a layer above the slice layer after an error occurs. A serious error here is a case where the continuity of encoded data is lost, for example, when the channel is switched to completely different encoded data by channel switching.
[0026]
If important parameters essential for decoding differ before and after channel switching, such as picture size, it is practically difficult to continue decoding further. Nevertheless, since this system has no means for evaluating the error level, it returns to the normal decoding process every time it detects the start code of the slice header of the slice layer that is the lowest layer having the start code. End up. Then, after that, the decoding process is broken and the error process is started again. As a result, significant image deterioration is caused.
[0027]
Further, for example, consider a system that always recovers by detecting a start code in a sequence header after an error occurs. In such a system, even if a serious error as described above occurs, the process does not return to the decoding process until the next sequence header is detected, so that, for example, the previous reference image is continuously displayed until then. If this is done, image distortion can be kept to a minimum.
[0028]
However, in such a system, a problem occurs when a relatively minor error occurs. The minor error here is, for example, a case where several bits of the DCT coefficient are incorrect.
[0029]
In such a case, only the slice containing the error is affected at most by the error. Therefore, if the next slice is restored immediately, the decoding process can be continued normally thereafter. Nevertheless, since this system has no means for evaluating the error level, it does not return until the start code in the next sequence header is detected. Therefore, the return to the normal decoding process is delayed as compared with the case of returning at the next slice, and it becomes impossible to display a normal image for a long time.
[0030]
As described above, if the error level is not evaluated and error detection is returned to normal decoding processing using the same method, the return to the appropriate layer according to the error level is achieved in the minimum necessary time. As a result, an abnormal image may be displayed for a long time.
[0031]
An object of the present invention is to quickly return the decoding operation at an appropriate layer according to the error level, and to reduce the time for displaying an abnormal image due to an error to the minimum necessary time. A decoding processing method and a decoding apparatus using the decoding processing method are provided.
[0032]
[Means for Solving the Problems]
In order to achieve the above object, according to the present invention, when an error is detected at the time of decoding, the degree of the detected error is evaluated to a plurality of levels, and a recovery process from the error is switched based on the evaluation.
[0033]
[Action]
If there is a code error during the decoding of the encoded video signal, when this error is detected, it is evaluated whether the detected error corresponds to a level representing the importance. Depending on the result of this evaluation, the stage of return to normal decoding processing is varied. In other words, when the evaluation level of the detection error is low, the process returns from the lower layer of the encoded video signal, and when the evaluation level of the detection error is high, the process returns from the upper layer.
[0034]
In this way, by changing the return stage to the normal decoding process according to the evaluation level of the detected error, it is possible to promptly return at the appropriate layer according to the error evaluation level.
[0035]
【Example】
Embodiments of the present invention will be described below with reference to the drawings.
In the embodiment described below, encoded data of a video signal conforming to the MPEG described above is assumed as an input signal.
[0036]
FIG. 1 is a block diagram showing an embodiment of a decoding processing method of an encoded video signal and a decoding device using the same according to the present invention, wherein 1 is a decoding device, 2 is an external memory, and 3 is an input terminal. 4 is an output terminal, 5 is an input buffer memory, 6 is a buffer memory for decoding, 7 is a variable length decoding unit, 8 is an IDCT (Inverse Discrete Cosine Transform) unit, 9 is a motion compensation unit, 10 is a display unit, 11 is A memory controller, 12 is a timing unit, and 13 is a data bus.
[0037]
In the figure, encoded data of a video signal conforming to MPEG is input from an input terminal 3 and temporarily stored in an input buffer memory 5. When there is a data request signal from the memory controller 11, the encoded data is read from the input buffer memory 5 and sent to the memory controller 11 via the data bus 13. The memory controller 11 sends the encoded data together with the address and control signal to the external memory 2 and stores the encoded data in a predetermined area of the external memory 2.
[0038]
Further, when there is a data request signal from the decoding buffer memory 6, the memory controller 11 reads the encoded data from the external memory 2 by the address and control signal, and transfers it to the decoding buffer memory 6. The encoded data temporarily stored in the decoding buffer memory 6 is decoded by the variable length decoding unit 7, the IDCT unit 8, and the motion compensation unit 9.
[0039]
The decoded frame or field unit image (decoded image) is supplied to the memory controller 11 via the data bus 13 and is thereby stored in a predetermined area of the external memory 2. On the one hand, the decoded image stored in the external memory 2 is read as a display image, supplied to the display unit 10 via the data bus 13, subjected to predetermined display processing, and output from the output terminal 4. On the other hand, when a reference image is necessary for the decoding process such as a P picture or a B picture, the memory controller 11 encodes the P or B picture to be decoded from the external memory 2 as described above. Data is read out and transferred to the decoding buffer memory 6, and a decoded image is read out from the external memory 2 and transferred as a reference image to the motion compensation unit 9 via the data bus 13.
[0040]
Also, in the case of an encoded video signal conforming to the MPEG standard, due to the peculiarity of the start code pattern described above, if there are more than 5 consecutive bytes of zero in the encoded data, at least one byte is included. The minute is known to be zero data inserted as a dummy. When 5 bytes are found in succession, the input buffer memory 5 uses this fact to output encoded data so as to mechanically remove one byte, and the subsequent stage is output. The processing load in the decryption processing unit is reduced.
[0041]
The decoding buffer memory 6 outputs a data request signal to the memory controller 11 when an empty space is generated therein, and receives and accumulates encoded data transferred from the external memory 2 under the control of the memory controller 11. When a data request signal is received from the variable length decoding unit 7, the data stored therein is output accordingly. However, if no encoded data remains in the external memory 2, a data empty signal is output to notify the variable length decoding unit 7 that the decoding buffer memory 6 is empty.
[0042]
As will be described in detail later, the variable length decoding unit 7 receives the encoded data from the decoding buffer memory 6 and analyzes it, and decodes the above parameters and DCT coefficients in the encoded data. This parameter is sent to each of the decoding processing blocks 8 to 10 and 12 in the decoding device 1 as information necessary for the decoding processing. The DCT coefficient is sent to the IDCT unit 8.
[0043]
The IDCT unit 8 performs inverse DCT processing on the DCT coefficient data received from the variable length decoding unit 7 and sends the IDCT coefficient obtained thereby to the motion compensation unit 9.
[0044]
The motion compensation unit 9 first reproduces a motion vector from the parameters decoded by the variable length decoding unit 7, gives it to the memory controller 11, and performs predetermined decoding from among the decoded images stored in the external memory 2. The converted image is read as a reference image. Then, the reference image and the output of the IDCT unit 8 are added to reproduce the decoded image. The reproduced decoded image is stored in the external memory 2 via the memory controller 11 as a display image or a reference image for decoding the next image.
[0045]
The display unit 10 reads the decoded image from the external memory 2 via the memory controller 11 in accordance with the display timing, converts the decoded image into final image data, and outputs the final image data from the output terminal 4.
[0046]
The timing unit 12 is supplied with a display pixel clock (pelCLK) and a horizontal synchronization signal (Hsync) and a vertical synchronization signal (Vsync) synchronized with the display pixel clock (pelCLK). When these horizontal synchronizing signal (Hsync) and vertical synchronizing signal (Vsync) are not supplied, they are generated internally from the display pixel clock (pelCLK). Then, based on these signals, a timing / control signal is generated and sent to each of the processing blocks 5 to 11, and the processing blocks are controlled to perform decoding processing in cooperation with each other.
[0047]
FIG. 2 is a schematic diagram showing a specific example of the internal configuration of the external memory 2 in FIG.
[0048]
In the figure, the external memory 2 has three frame memory areas 14 to 16 and an encoded data buffer area 17, and each of the frame memory areas 14, 15 and 16 stores a decoded image one by one. Thus, the encoded data from the input buffer memory 5 (FIG. 1) is temporarily stored in the encoded data buffer area 17. Write / read control in these regions 14 to 17 is performed by the memory controller 11.
[0049]
FIG. 3 is a block diagram showing a specific example of such a memory controller 11, wherein 11a is a coded data buffer control unit, 11b is a reference image read control unit, 11c is a decoded image write control unit, and 11d is a decoding unit. The converted image read control unit 11e is a bus width conversion unit.
[0050]
In this figure, the encoded data buffer control unit 11a sends a data request signal to the input buffer memory 5 (FIG. 1) when there is an empty space in the encoded data buffer area 17 (FIG. 2) in the external memory 2. Then, after the encoded data sent in response thereto is processed by the bus conversion unit 11e, an address and a control signal are output to the external memory 2 so as to be stored in the encoded data buffer area 17. When the encoded data buffer control unit 11a receives a data request signal from the decoding buffer memory 6 (FIG. 1), it reads the encoded data from the encoded data buffer area 17 (FIG. 2) accordingly. Then, the data is transferred to the decoding buffer memory 6 after being processed by the bus converter 11e.
[0051]
The reference image reading control unit 11b receives the motion vector signal from the motion compensation unit 9 (FIG. 1), and outputs an address and a control signal to the external memory 2 based on the motion vector signal, and from the frame memory areas 14 to 16 (FIG. 2). A predetermined reference image is read out.
[0052]
The decoded image writing control unit 11c stores the decoded image from the motion compensation unit 9 (FIG. 1) in any of the frame memory areas 14 to 16 (FIG. 2) in the external memory 2. 2 outputs an address and a control signal. Also, the decoded image reading control unit 11d outputs an address and a control signal for reading a desired decoded image from any one of the frame memory areas 14 to 16 in accordance with the display timing.
[0053]
FIG. 4 is a timing chart showing the relationship between the decoding processing timing and the decoded image writing / reading and display timing in the frame memory areas 14 to 16 in the external memory 2, where Vsync is the vertical synchronization signal of the display system. Indicates. Also, here, the encoded video signal shown in FIG. 13 is decoded, and the encoded data has pictures in the order of I1, P5, B2, B3, B4, P9, B6, B7, and B8. Here, of course, I1 is an I picture, P5 and P9 are P pictures, B2 to B4 and B6 to B8 are B pictures, and these numbers indicate the display order.
[0054]
In FIG. 2, in the external memory 2, the frame memory areas 14 and 15 are assigned for writing an I picture or a P picture as a reference image, and the frame memory area 16 is assigned for writing a B picture. Here, it is assumed that each picture is composed of an image for one frame.
[0055]
Decoding processing of the I1 picture is performed in the first one frame period, and the decoded image I1 (hereinafter, the same code as the picture before decoding) is written in the frame memory area. In the next one frame period, the decoded image I1 is read from the frame memory area 14, the P5 picture is decoded using this as a reference image, and the resulting decoded image P5 is written in the frame memory area 15. In the next one frame period, these decoded images I1 and P5 are read out as reference images, and the B2 picture is decoded. The decoded image B2 obtained by this is written in the frame memory area 16. In the same manner, each picture is decoded.
[0056]
Next, reading from the external memory 2 for display will be described.
[0057]
When a decoded picture of a picture is written to the frame memory area 14, 15 or 16, this reading must be performed before a new decoded picture is written to the same frame memory area. . For example, when attention is paid to the B2 picture in FIG. 4, after the B2 picture is decoded and written in the frame memory area 16, the B3 picture is subsequently decoded in the frame memory area 16 in the next one frame period. Will be written to.
[0058]
Here, if the start of reading for display of the decoded image B2 is made to wait until the decoding processing of the B2 picture is completely completed, this reading will decode the next B3 picture and its decoded image B3. Therefore, it is necessary to prepare another frame memory area and store the decoded images B2 and B3 in separate frame memory areas.
[0059]
However, in practice, it is not necessary to wait for the display (reading) until the decoding process (writing) of the B2 picture is completely completed, and it is sufficient to sequentially read the part after the decoding process. In this way, the B picture decoding process and display can be performed without any problem if there is only one frame memory area for the B picture.
[0060]
However, in the encoded video signal, since there is a bias in the amount of code within one picture, there is local unevenness in the progress of the decoding process. Therefore, in this embodiment, as shown in FIG. 4, a margin is taken by starting display (reading) of the decoded image B2 with a delay of one field from the start of decoding processing (writing) of the B2 picture. ing.
[0061]
As described above, in order to perform decoding while minimizing the capacity of the external memory 2 and efficiently using it, it is essential to control the decoding in synchronization with the vertical synchronization signal Vsync of the display system. Therefore, the decoding process ignoring the timing of the vertical synchronization signal Vsync of the display system is not realistic.
[0062]
The timing unit 12 in FIG. 1 controls the decoding process as described above, and generates and outputs a timing / control signal for this purpose. Such timing / control signals will be described with reference to FIG. However, here, it is assumed that the video signal based on the decoded image is a video signal compliant with the NTSC television signal, and Vsync and Hsync in the figure are vertical and horizontal synchronization signals for displaying the decoded image, respectively. is there.
[0063]
The timing / control signal indicates that a control signal (PictStart) indicating the start of decoding processing of a layer higher than the picture layer shown in FIG. 15 and decoding of one macroblock including a slice layer are started. It consists of a control signal (MbStart).
[0064]
When the picture to be decoded corresponds to one frame, as shown in FIG. 5 (1), one control signal (PictStart) and one control signal (MbStart) are the number of macroblocks for each frame as shown in FIG. Are output in a sufficient number for decoding. Similarly, when the picture to be decoded corresponds to one field, as shown in FIG. 5 (2), one control signal (PictStart) and one control signal (MbStart) are provided for each field as shown in FIG. A sufficient number of macroblocks are output to be decoded. 5 (1) and 5 (2) adaptively change depending on whether the picture to be decoded is a frame image or a field image.
[0065]
FIG. 6 is a block diagram showing a specific example of the variable length decoding unit 7 in FIG. 1, in which 7a is a barrel shifter, 7b is a decoding table, 7c is a buffer memory, 7d is a buffer memory controller, and 7e is a start code detection. 7f is a timing controller, and 7g is a decoding controller.
[0066]
In the figure, encoded data from the decoding buffer memory 6 (FIG. 1) is supplied to a barrel shifter 7a. The barrel shifter 7a supplies a part of the fetched encoded data to the decoding table 7b. Since the code to be decoded is generally a variable-length code, the next code data is cued by receiving the code length from the decoding table 7b. When the encoded data in the barrel shifter 7a is used up, a data request signal is sent to the decoding buffer memory 6 (FIG. 1) to request the next encoded data.
[0067]
The decoding table 7b decodes the parameters and DCT coefficients included in the encoded data. As shown in FIG. 7, the decoding table 7b is composed of n tables. Table 1 shows the DCT coefficients. n is for decoding specific codes other than DCT coefficients such as parameters and code lengths. Which one of them is selected is determined by a decoding control signal to be described later.
[0068]
If the code corresponding to the supplied encoded data does not exist in the selected table, it is determined that an error has occurred and an error detection signal is output.
[0069]
In FIG. 6, the code length data of each code obtained from the decoding table 7b is supplied to the barrel shifter 7a. The DCT coefficients of the data output from the decoding table 7b are once stored in the buffer memory 7c. When 64 DCT coefficients corresponding to one block are prepared, the DCT coefficients are output to the IDCT unit 8 (FIG. 1).
[0070]
The buffer memory controller 7d includes a counter therein, counts the number of DCT coefficients output from the decoding table 7b, outputs a buffer memory control signal, and controls the buffer memory 7c as described above. If more than 64 DCT coefficients are sent, it is determined that an error has occurred and an error detection signal is output.
[0071]
The start code detector 7e is supplied with encoded data, and outputs a start code detection signal when a pattern specific to the start code (see FIG. 15) is detected.
[0072]
The timing controller 7f and the decoding controller 7g control the operation of the variable length decoding unit 7 as described above.
[0073]
FIG. 8 is a block diagram showing a specific example of the timing controller 7f, where 7f1 is a decoding timing control unit, 7f2 is an MB address count unit, 7f3 is an MB address extraction unit, and 7f4 is an MB address comparison control unit. .
[0074]
In the figure, the decoding timing control unit 7f1 is supplied with a timing / control signal from the timing unit 12 (FIG. 1) and is suitable for processing blocks in the variable length decoding unit 7 including the decoding controller 7g (FIG. 6). A decoding timing control signal that gives an instruction to start and stop the operation is generated and output at an appropriate timing. That is, the start of the picture layer is instructed by the control signal (PictStart) of the timing / control signal, and the start of the macroblock is instructed by the control signal (MbStart), and this decoding timing control signal is generated.
[0075]
The MB address counting unit 7f2 is cleared by the control signal (PictStart) of the timing / control signals, and counts the control signal (MbStart), thereby generating a macroblock address at the decoding timing. On the other hand, the MB address extracting unit 7f3 extracts and reproduces the macroblock address on the encoded data based on the parameters obtained as a result of analyzing the encoded data in the decoding table 7b (FIG. 6). The decoding process is performed using the timing / control signal as a timing reference. In a normal decoding process, what is the control signal (MbStart) of the timing / control signal from the control signal (PicStart)? The macroblock with the determined macroblock address is processed. For this reason, when the decoding process is normally performed, these two macroblock addresses should match. Therefore, the MB address comparison control unit 7f4 compares the both, and if the latter (ie, the macroblock address extracted from the encoded data) is delayed, it is determined that an error has occurred and an error detection signal is sent. Output. If the latter has progressed too much, a decoding timing control signal for temporarily suspending the decoding process of this macroblock is output until it matches.
[0076]
FIG. 9 is a block diagram showing a specific example of the decoding controller 7g in FIG. 6, in which 7g1 is a decoding state counter, 7g2 is a branch destination calculation unit, 7g3 is an error detector, and 7g4 is an error level counter.
[0077]
In the encoded data, codes defined in advance in the encoding standard are arranged in an order determined. However, in this order, not only the codes are simply arranged, but the arrangement order and presence of specific codes change depending on conditions. Data representing the condition itself is also encoded in the encoded data.
[0078]
In order to appropriately decode the encoded data having such properties, in this embodiment, a decoding state counter 7g1 is provided in the decoding controller 7g as shown in FIG. It manages and controls the state of the decryption process including The value held in the decoding state counter 7g1 indicates the current decoding state, and it is simultaneously used for controlling each processing block (FIG. 6) in the variable length decoding unit 7 as a decoding control signal.
[0079]
The branch destination calculation unit 7g2 determines the next decoding state based on the current decoding state indicated by the decoding control signal and the parameter value decoded up to that point, and instructs this to the decoding state counter 7g1. In this way, the codes can be analyzed in an appropriate order based on the condition data included in the encoded data.
[0080]
When an error detection signal is received from the decoding table 7b (FIG. 7), the buffer memory 7d, the timing controller 7f (FIGS. 6 and 8), or an error detector 7g3 described later, the process branches to a routine for error processing. The decoding state counter 7g1 is instructed to do so. Further, when a start code is detected at a position other than the position determined in the encoded data standard, it is determined as an error and the process is branched to an error processing routine.
[0081]
The error detector 7g3 checks the value of the parameter decoded in the decoding table 7b (FIG. 6), and checks whether it is within a predetermined range. If not, it is determined that an error has occurred and an error detection signal is output. Even when a sequence error code is detected in the encoded data, it is determined that an error has occurred and an error detection signal is output.
[0082]
When the decoding controller 7g branches to an error processing routine due to error detection, the error level counter 7g4 determines the error level based on the decoding control signal from the decoding state counter 7g1. An error level signal representing the determination result is distributed to each processing block in the decoding apparatus 1.
[0083]
Next, processing when an error occurs in the decoding controller 7g will be described in more detail.
[0084]
As described above, when an error is detected by any of the error detection methods, the process branches to an error processing routine in accordance with an instruction from the branch destination calculation unit 7g2. A specific example of this error processing routine will be described with reference to FIG.
[0085]
First, when an error is detected (step 101), the error level is set to 1 (step 102). Specifically, the error level counter 7g4 (FIG. 9) detects the decoding state from the decoding control signal from the decoding state counter 7g1 (FIG. 6), and sets the error level to 1 (hereinafter, the error level is set). The same mechanism is used).
[0086]
Next, it is checked whether or not the control signal (PictStart) (this is regarded as a vertical synchronizing pulse for decoding) is detected at this time (step 103), and if it is detected, the error level is set to 2 It is changed (step 106), and if not detected, it is checked whether or not a start code that causes a return to normal decoding processing has been detected (step 104). If a start code is detected, that is, if a start code is detected before the decoding vertical sync signal (PictStart) is detected, this error has no significant influence and is normally decoded as having low significance. Return processing is performed (step 113).
[0087]
When neither the decoding vertical synchronization signal (PictStart) nor the start code is detected, the process returns to step 103, and the operations of steps 103 and 104 are repeated until either the decoding vertical synchronization signal (PictStart) or the start code is detected.
[0088]
The return processing routine (step 113) is a routine for returning at a level higher than the slice layer. As described above, when the error level is 1, the layer having the start code in the hierarchical structure of the encoded data can be restored with the slice that is the lowest layer.
[0089]
If the decoding vertical synchronization signal (PictStart) is detected before the start code is detected, a situation such as the movement of another picture during the error occurs, which is more serious than an error level 1 error. It becomes. For this reason, for such an error, the error level is set to 2 (step 106), and the decoding vertical synchronization signal (PictStart) or the start code is detected as in the previous steps 103 and 104. Is repeated (steps 107 and 108).
[0090]
In this case, if a start code is detected prior to the decoding vertical synchronization signal (PictStart), it is further checked whether it is greater than or equal to the picture header (step 109). (Step 114), and if it is a layer lower than the picture header, that is, a slice header, the process returns to step 107 again.
[0091]
In this way, when the error level is 2, it is possible to return from the start of the hierarchy higher than the picture layer.
[0092]
Further, when the decoding vertical synchronization signal (PictStart) is detected prior to the start code (step 107), the most serious error that does not even detect the start of the picture has occurred. For an error, the error level is set to 3 (step 110). Then, it waits until a start code is detected (step 111). When a start code is detected, it is checked whether it is greater than or equal to the sequence header (step 112). If so, a return process is performed (step 115). If the header is a layer lower than the sequence layer, the process returns to step 111 again.
[0093]
In this way, when the error level is 3, it is possible to recover only at the sequence layer or higher.
[0094]
The error level signal obtained as described above is distributed to each block shown in FIG.
[0095]
Next, error concealment processing when an error occurs will be described.
[0096]
In FIG. 1, when the error level is 1, the motion compensation unit 9 uses the reference image data immediately before the same position as the currently processed macroblock, instead of decoding the macroblock image by normal processing. Use to hide this macroblock error. For this purpose, a zero motion vector is given to the memory controller 11 to read the reference image. In this way, in the case of level 1, which is the smallest error, error concealment is performed in units of macroblocks, so that even when the normal decoding process is resumed, the effect of the error on the screen is minimal. It will be over.
[0097]
When the error level is 2, the display unit 10 hides the error by displaying the immediately preceding decoded picture (reference image) instead of displaying the picture currently being decoded. For this purpose, the signal specifying the display image to be sent to the memory controller 11 is switched so as to specify the immediately preceding reference image when an error occurs. In this way, in the case of error level 2, error concealment can be performed in units of pictures.
[0098]
If the error level is 3, it is determined that it is the most serious error and it is difficult to continue decoding further, and once the input buffer memory 5, the decoding buffer memory 6, and the memory 2 The encoded data buffer area 17 (FIG. 2) is cleared. The encoded data buffer area 17 is cleared by sending an error level signal having an error level of 3 to the encoded data buffer controller 11a (FIG. 3) in the memory controller 11. Thereafter, decoding is newly performed on the encoded data newly input from the input terminal 3. In addition, the display unit 10 continues to display the previous picture (reference image) that has already been decoded until the variable length decoding unit 7 finds the sequence header and returns to normal decoding processing.
[0099]
In this way, in this embodiment, the error level is evaluated in a plurality of stages according to the time from the error to return, and thereby the process of returning according to each error level is made different. Is possible. In addition, since appropriate error concealment according to each error level can be performed, it is possible to minimize the time during which an image is disturbed due to an error.
[0100]
FIG. 11 is a block diagram showing another specific example of the decoding controller 7g in FIG. 6. 7g5 is an error counter, and the same reference numerals are given to the portions corresponding to those in FIG. To do.
[0101]
In this figure, this specific example is obtained by adding an error count counter 7g5 to the configuration shown in FIG. 9, and this error count counter 7g5 receives an error detection signal from the timing controller 7f (FIG. 6). The counter value is incremented by 1, the number of errors is counted, and the counted value is given to the branch destination calculation unit 7g2.
[0102]
Next, a specific example of the error processing routine in the decoding controller 7g shown in FIG. 11 will be described with reference to FIG.
[0103]
This error processing routine differs from that shown in FIG. 10 in that the error level is not evaluated by a signal based on the time of the decoding vertical synchronization signal (PictStart), but the number of times errors have occurred in the past. It is in the point made to do in.
[0104]
First, when an error is detected by any of the error detection methods, the count value of the error number counter 7g5 is increased by 1, and the process branches to an error processing routine (step 201). Here, the number of times an error has occurred in the past is checked, and if it is once (that is, this time for the first time), the error level is set to 1 (step 203), and the process waits until a start code is detected (step 203) Step 204). When the start code is detected, it is reflected in the return processing routine (step 213).
[0105]
This return processing routine (step 213) is a routine for returning at the slice layer or higher, and when the error level is 1, the layer having the start code in the hierarchical structure of the encoded data is the lowest layer. Recovery can be achieved by slicing.
[0106]
On the other hand, when the number of error occurrences is greater than 1 (step 202) and the number of past error occurrences is 2 (ie, this time is the second) (step 206), the error level is set to 2 (step 207), and waits until a start code is detected (step 208). When the start code is detected, it is checked whether or not it is greater than or equal to the picture header (step 209). If so, the process proceeds to return processing (step 214), and a layer lower than the picture header, that is, a slice header. If so, the process returns to step 208 again. This is different from when the error level is 1.
[0107]
In this way, when the error level is 2, it is possible to recover only at the picture layer or higher.
[0108]
If the number of error occurrences is greater than 2 (step 202), the error level is set to 3 (step 210) and the process waits until a start code is detected (step 211). If a start code is detected, it is further checked whether it is greater than or equal to the sequence header (step 212). If so, the process proceeds to return processing (step 215), and the header of the layer lower than the sequence layer If so, the process returns to step 211 again.
[0109]
In this way, when the error level is 3, it is possible to recover only at the sequence layer or higher.
[0110]
Note that the error concealment process corresponding to the error level is the same as that described above.
[0111]
As described above, in this specific example, the error level is evaluated in a plurality of stages based on the number of times an error has occurred, and the process of returning can be made different according to each error level. In addition, since appropriate error concealment according to each error level can be performed, it is possible to minimize the time during which an image is disturbed due to an error.
[0112]
As mentioned above, although the Example of this invention was described, this invention is not limited only to this Example.
[0113]
That is, in the above embodiment, the input encoded data conforms to the MPEG, but is not limited thereto, and may be data encoded by another encoding method having the same properties.
[0114]
In FIG. 4, the relationship between the decoding processing in the above embodiment and the use and display timing of the frame memory areas 14 to 16 provided in the memory 2 is composed of one picture for each picture. Although the case has been described as an example, the present invention is not limited to this, and the same applies to the case where each picture is composed of an image for one field.
[0115]
Further, in FIG. 5, the control signal from the timing unit 12 (FIG. 1) has been described by taking the NTSC television signal as an example. However, the present invention is not limited to this, and the same applies to television signals of other systems. is there.
[0116]
Furthermore, in the above embodiment, the error level is evaluated in three stages. However, the error level is not limited to this, and may be further finely or conversely divided in two stages, and may be changed as necessary. .
[0117]
Furthermore, in the error processing routine shown in FIG. 10, the decoding vertical synchronization signal (PictStart) is used as a signal for evaluating the error level. However, the present invention is not limited to this. (Vsync) itself or other signals closely related to this may be used.
[0118]
Furthermore, in the above embodiment, when the error level is 2 or more, the already decoded picture (reference image) is displayed. However, the present invention is not limited to this. For example, a plain image or other image is displayed. An arbitrary image may be displayed.
[0119]
【The invention's effect】
As described above, according to the present invention, the error level is evaluated in a plurality of stages according to the time until the error is recovered or the number of times the error has occurred, and the process of returning according to each error level is different. Since it is possible to perform appropriate error concealment according to each error level, it is possible to minimize the time during which an image is disturbed by the influence of an error.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an embodiment of a decoding processing method of an encoded video signal and a decoding apparatus using the same according to the present invention.
2 is a schematic diagram showing a specific example of an internal configuration of a memory in FIG. 1. FIG.
FIG. 3 is a block diagram showing a specific example of the memory controller in FIG. 1;
4 is a timing chart showing the relationship between the decoding processing timing in the embodiment shown in FIG. 1 and the writing / reading and display timing of a decoded image in a frame memory area in the memory. FIG.
FIG. 5 is a diagram showing a specific example of a control signal output from the timing unit in FIG. 1;
6 is a block diagram showing a specific example of the variable-length decoding unit in FIG. 1. FIG.
7 is a block diagram showing a specific example of a decoding table in FIG. 6. FIG.
8 is a block diagram showing a specific example of the timing controller in FIG. 6. FIG.
9 is a block diagram showing a specific example of a decoding controller in FIG. 6. FIG.
FIG. 10 is a flowchart showing a specific example of an error processing routine instructed by the decoding controller shown in FIG. 9;
11 is a block diagram showing another specific example of the decoding controller in FIG. 6. FIG.
12 is a flowchart showing a specific example of an error processing routine instructed by the decoding controller shown in FIG.
FIG. 13 is a diagram illustrating an example of an encoded code according to MPEG.
14 is a diagram showing a configuration of a macroblock in the encoded data shown in FIG.
FIG. 15 is a diagram illustrating a hierarchical structure of layers in MPEG code data.
[Explanation of symbols]
1 Decryption device
2 memory
3 Input terminal
4 output terminals
5 Input buffer memory
6 Decoding buffer memory
7 Variable length decoding unit
8 IDCT unit
9 Motion compensation unit
10 Display unit
11 Memory controller
12 Timing unit

Claims (14)

各階層毎に異なるスタートコードで開始する階層構造を有する符号化方式により符号化された映像信号の復号化処理方法において、
特定のスタートコードを検索することにより、所定の階層からの復号開始または再開を可能にするスタートコード検索ステップと、
符号化映像信号を復号化する復号化ステップと、
正常な復号化処理が行なわれないために発生したエラーを検出するエラー検出ステップと、
検出された該エラーの程度を、該エラーの検出からの経過時間または該エラーの検出後にさらに検出されたエラーの回数に応じて複数のレベルに評価するエラー評価ステップと、
該評価したエラー評価レベルに応じて、該エラー評価レベルが低い程、符号化映像信号のより下位の階層から復号化処理を復帰し、該エラー評価レベルが高い程、符号化映像信号のより上位の階層から復号化処理を復帰するように、該スタートコード検索ステップにより異なる階層から復号化処理を再開し、これにより、正常な復号化処理へ復帰させる復帰ステップと
を備えたことを特徴とする符号化映像信号の復号化処理方法。
In a decoding processing method of a video signal encoded by an encoding method having a hierarchical structure starting with a different start code for each layer,
A start code search step that enables starting or restarting decoding from a predetermined hierarchy by searching for a specific start code;
A decoding step of decoding the encoded video signal;
An error detection step for detecting an error that occurs because normal decryption processing is not performed;
An error evaluation step for evaluating the degree of the detected error to a plurality of levels according to the elapsed time from the detection of the error or the number of errors further detected after the detection of the error;
Depending on the error evaluation levels the evaluation, the more the error evaluation level is low, return a more decoding from a lower layer encoded signal, the more the error evaluation level is higher, a higher encoded signal A decoding step is resumed from a different layer by the start code search step so that the decoding process is restored from the layer of the original layer, thereby returning to a normal decoding process. A method of decoding an encoded video signal.
請求項1において、
前記エラー検出ステップは、前記符号化映像信号の符号化列中に挿入された特定の符号パターンを検知することにより、前記エラーの発生を検出することを特徴とする符号化映像信号の復号化処理方法。
In claim 1,
The error detection step detects the occurrence of the error by detecting a specific code pattern inserted in the encoded sequence of the encoded video signal. Method.
請求項1において、
前記エラー検出ステップは、前記符号化映像信号の符号化列の中から正規の符号として予め定義された符号以外の符号を検知することにより、前記エラーの発生を検出することを特徴とする符号化映像信号の復号化処理方法。
In claim 1,
The error detecting step detects the occurrence of the error by detecting a code other than a code predefined as a normal code from a coded sequence of the coded video signal. Video signal decoding processing method.
請求項1において、
前記エラー検出ステップは、前記符号化映像信号中に存在する特定の符号の個数が予め定められた範囲以外であることを検知することにより、前記エラーの発生を検出することを特徴とする符号化映像信号の復号化処理方法。
In claim 1,
The error detection step detects the occurrence of the error by detecting that the number of specific codes existing in the encoded video signal is outside a predetermined range. Video signal decoding processing method.
請求項1において、
前記復号化ステップは、前記符号化映像信号中に存在する特定の符号を、符号の種類毎に夫々、異なるテーブルを用いて復号化するものであり、
前記エラー検出ステップは、該テーブルの少なくとも1つにおいて、その中に定義されていない符号が入力されたことを検知することにより、前記エラーの発生を検出することを特徴とする符号化映像信号の復号化処理方法。
In claim 1,
The decoding step is to decode a specific code present in the encoded video signal using a different table for each type of code,
The error detection step detects the occurrence of the error by detecting that a code not defined in the table is input in at least one of the tables. Decryption processing method.
請求項1において、
前記エラー検出ステップは、前記符号化映像信号を復号化することによって得られた特定のパラメータの値が、予め定義された範囲以外であることを検知することにより、前記エラーの発生を検出することを特徴とする符号化映像信号の復号化処理方法。
In claim 1,
The error detection step detects the occurrence of the error by detecting that a value of a specific parameter obtained by decoding the encoded video signal is outside a predefined range. A method of decoding an encoded video signal characterized by
請求項1において、
前記復号化ステップは、前記符号化映像信号の復号化処理を表示タイミングに同期した所定の周期のパルス信号によって制御されるものであって、
前記エラー評価ステップの設定する複数のエラー評価レベルをn(n=1,2,3,……)と表わしたとき、
前記エラー検出ステップによってエラーが検出され、該エラーのエラー評価レベルをnと設定した状態において、前記復帰ステップにより正常な復号化処理へ復帰する前に該パルス信号が検出された場合、該エラー評価レベルをn+1に再設定することを特徴とする符号化映像信号の復号化処理方法。
In claim 1,
The decoding step is controlled by a pulse signal having a predetermined period synchronized with a display timing of a decoding process of the encoded video signal,
When a plurality of error evaluation levels set by the error evaluation step are expressed as n (n = 1, 2, 3,...),
If an error is detected by the error detection step and the pulse signal is detected before returning to normal decoding processing by the return step in a state where the error evaluation level of the error is set to n, the error evaluation is performed. A method of decoding an encoded video signal, wherein the level is reset to n + 1.
各階層毎に異なるスタートコードで開始する階層構造を有する符号化方式により符号化された映像信号の復号化装置において、
特定のスタートコードを検索することにより、所定の階層からの復号開始または再開を可能にするスタートコード検索手段と、
符号化映像信号を復号化する復号化手段と、
正常な復号化処理が行なわれていないために発生したエラーを検出するエラー検出手段と、
検出された該エラーの程度を、該エラーの検出からの経過時間または該エラーの検出後にさらに検出されたエラーの回数に応じて複数のレベルに評価するエラー評価手段と、
該評価したエラー評価レベルに応じて、該エラー評価レベルが低い程、符号化映像信号のより下位の階層から復号化処理を復帰し、該エラー評価レベルが高い程、符号化映像信号のより上位の階層から復号化処理を復帰するように、該スタートコード検索手段により異なる階層から復号化処理を再開し、これにより、正常な復号化処理へ復帰させる復帰手段と
を備えたことを特徴とする符号化映像信号の復号化装置。
In a decoding device for a video signal encoded by an encoding method having a hierarchical structure starting with a different start code for each layer,
Start code search means for enabling decoding start or restart from a predetermined hierarchy by searching for a specific start code;
Decoding means for decoding the encoded video signal;
Error detection means for detecting an error that has occurred because normal decryption processing is not performed;
Error evaluation means for evaluating the degree of the detected error to a plurality of levels according to the elapsed time from the detection of the error or the number of errors further detected after the detection of the error;
Depending on the error evaluation levels the evaluation, the more the error evaluation level is low, return a more decoding from a lower layer encoded signal, the more the error evaluation level is higher, a higher encoded signal And a return means for restarting the decryption process from a different layer by the start code search means so as to return the decryption process to the normal decryption process. An apparatus for decoding an encoded video signal.
請求項において、
前記エラー検出手段は、前記符号化映像信号の符号列中に挿入された特定の符号パターンを検知することにより、前記エラーの発生を検出することを特徴とする符号化映像信号の復号化装置。
In claim 8 ,
The decoding apparatus for an encoded video signal, wherein the error detection unit detects the occurrence of the error by detecting a specific code pattern inserted in a code string of the encoded video signal.
請求項において、
前記エラー検出手段は、前記符号化映像信号の符号化列の中から正規の符号として予め定義された符号以外の符号を検知することにより、前記エラーの発生を検出することを特徴とする符号化映像信号の復号化装置。
In claim 8 ,
The error detecting means detects the occurrence of the error by detecting a code other than a code predefined as a normal code from a coded sequence of the coded video signal. Video signal decoding device.
請求項において、
前記エラー検出手段は、前記符号化映像信号中に存在する特定の符号の個数が予め定められた範囲以外であることを検知することにより、前記エラーの発生を検出することを特徴とする符号化映像信号の復号化装置。
In claim 8 ,
The error detection means detects the occurrence of the error by detecting that the number of specific codes existing in the encoded video signal is outside a predetermined range. Video signal decoding device.
請求項において、
前記復号化手段は、前記符号化映像信号中に存在する特定の符号を、符号の種類毎に夫々異なるテーブルを用いて復号化するものであり、
前記エラー検出手段は、該テーブルの少なくとも1つにおいて、その中に定義されていない符号が入力されたことを検知することにより、前記エラーの発生を検出することを特徴とする符号化映像信号の復号化装置。
In claim 8 ,
The decoding means is for decoding a specific code present in the encoded video signal using a different table for each type of code,
The error detection means detects the occurrence of the error by detecting that a code not defined therein is input in at least one of the tables. Decryption device.
請求項において、
前記エラー検出手段は、前記符号化映像信号を復号化することによって得られた特定のパラメータの値が、予め定義された範囲以外であることを検知することにより、前記エラーの発生を検出することを特徴とする符号化映像信号の復号化装置。
In claim 8 ,
The error detection means detects the occurrence of the error by detecting that a value of a specific parameter obtained by decoding the encoded video signal is outside a predefined range. An apparatus for decoding an encoded video signal characterized by the above.
請求項8において、
前記復号化手段は、前記符号化映像信号の復号化処理を表示タイミングに同期した所定の周期のパルス信号によって制御されるものであって、
前記エラー評価手段の設定する複数のエラー評価レベルをn(n=1,2,3,……)と表わしたとき、
前記エラー検出手段によってエラーが検出され、該エラーのエラー評価レベルをnに設定した状態において、前記復帰手段により正常な復号化処理へ復帰する前に該パルス信号が検出された場合、該エラー評価レベルをn+1に再設定することを特徴とする符号化映像信号の復号化装置。
In claim 8,
The decoding means is controlled by a pulse signal having a predetermined period synchronized with the display timing of the decoding process of the encoded video signal,
When a plurality of error evaluation levels set by the error evaluation means are expressed as n (n = 1, 2, 3,...),
If an error is detected by the error detection means and the pulse signal is detected before returning to normal decoding processing by the return means in a state where the error evaluation level of the error is set to n, the error evaluation An apparatus for decoding an encoded video signal , wherein the level is reset to n + 1.
JP18444595A 1995-07-20 1995-07-20 Decoding processing method of encoded video signal and decoding apparatus using the same Expired - Fee Related JP3810830B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18444595A JP3810830B2 (en) 1995-07-20 1995-07-20 Decoding processing method of encoded video signal and decoding apparatus using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18444595A JP3810830B2 (en) 1995-07-20 1995-07-20 Decoding processing method of encoded video signal and decoding apparatus using the same

Publications (2)

Publication Number Publication Date
JPH0937249A JPH0937249A (en) 1997-02-07
JP3810830B2 true JP3810830B2 (en) 2006-08-16

Family

ID=16153279

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18444595A Expired - Fee Related JP3810830B2 (en) 1995-07-20 1995-07-20 Decoding processing method of encoded video signal and decoding apparatus using the same

Country Status (1)

Country Link
JP (1) JP3810830B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1156171C (en) 1997-04-07 2004-06-30 松下电器产业株式会社 Device for raising processing efficiency of image and sound
CN1435057A (en) * 2000-12-20 2003-08-06 三菱电机株式会社 Method and apparatus for decoding motion video image
JP4806888B2 (en) 2002-07-19 2011-11-02 ソニー株式会社 Decoding device and decoding method
CN100534193C (en) * 2004-08-04 2009-08-26 松下电器产业株式会社 Image decoding device

Also Published As

Publication number Publication date
JPH0937249A (en) 1997-02-07

Similar Documents

Publication Publication Date Title
KR0151234B1 (en) Picture reproduction apparatus and picture decoding apparatus
JP3302939B2 (en) Video signal decompressor for independently compressed even and odd field data
EP1161097B1 (en) MPEG decoder
US5739862A (en) Reverse playback of MPEG video
KR20000075760A (en) Error concealment for video image
TW241350B (en)
KR20000028928A (en) Programmable filter for removing selected user data from an MPEG-2 bit-stream
KR0185932B1 (en) Video data decoding method and apparatus
US5852706A (en) Apparatus for recording and reproducing intra-frame and inter-frame encoded video data arranged into recording frames
JP3810830B2 (en) Decoding processing method of encoded video signal and decoding apparatus using the same
JP2002027483A (en) Picture coding system, picture decoding system, and storage media
KR0154890B1 (en) Method and device for decoding picture signal
US6438318B2 (en) Method for regenerating the original data of a digitally coded video film, and apparatus for carrying out the method
EP0470772B1 (en) Digital video signal reproducing apparatus
JP4906197B2 (en) Decoding device and method, and recording medium
JPH1023424A (en) Device for decoding compression data of moving image
US6459736B1 (en) Moving picture decoding apparatus and method
KR100469258B1 (en) Apparatus and method for generating thumbnail image
JP3214160B2 (en) Image reproducing device and image decoding device
JP2002374537A (en) Decoder and its method
JP3045696B2 (en) Decoding method and apparatus
KR0128878B1 (en) Apparatus and method for jump of mpeg
JPH07170485A (en) Image reproducing device and image decoding device
JP2003179929A (en) Image decoding apparatus
JP3456726B2 (en) Compression signal processor

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040907

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041108

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050614

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050811

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060228

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060404

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060516

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060525

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090602

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100602

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110602

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120602

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120602

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130602

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees