JP3934772B2 - Variable transfer rate encoding method and apparatus - Google Patents
Variable transfer rate encoding method and apparatus Download PDFInfo
- Publication number
- JP3934772B2 JP3934772B2 JP03637698A JP3637698A JP3934772B2 JP 3934772 B2 JP3934772 B2 JP 3934772B2 JP 03637698 A JP03637698 A JP 03637698A JP 3637698 A JP3637698 A JP 3637698A JP 3934772 B2 JP3934772 B2 JP 3934772B2
- Authority
- JP
- Japan
- Prior art keywords
- encoding
- information
- transfer rate
- encoded
- code amount
- 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
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、動画像信号(ビデオ信号)を符号化するビデオ信号符号化方法及びそれに対応するビデオ信号符号化装置、特に直交変換と量子化を使用した符号化を行うビデオ信号符号化方法および装置に適用可能なものであって、特に符号化した符号化データを固定転送レートで一時記録した後に可変レート符号化データへ変換(再符号化)することを特徴とする可変転送レート符号化方法および装置に関する。
【0002】
【従来の技術】
従来の可変転送レート符号化技術の一例として特開平7−284097号公報に記載の技術によると、ビデオ信号を第1のパスと第2のパスに分けてそれぞれ符号化し、第1のパスでは第2のパスの符号化に必要な情報を生成して出力するようにしている。なお、このときの符号化方式にはいわゆるMPEGなどの方式が使われる。
【0003】
MPEGについては、ISO−IEC11172−2、ITU−T H.262/ISO−IEC13818−2に詳細な説明がなされているので、ここでは概略のみ説明する。
【0004】
MPEGは1988年、ISO/IEC JTC1/SC2(国際標準化機構/国際電気標準化会合同技術委員会1/専門部会2,現在のSC29)に設立された動画像符号化標準を検討する組織の名称(Moving Pictures Expert Group)の略称である。MPEG1(MPEGフェーズ1)は1.5Mbps程度の蓄積メディアを対象とした標準で、静止画符号化を目的としたJPEG(Joint Photographic Coding Experts Group)と、ISDN(Integrated Services Digital Network:統合サービスディジタル通信網)のテレビ会議やテレビ電話の低転送レート用の動画像圧縮を目的としたH.261(CCITT SGXV、現在のITU−T SG15で標準化)の基本的な技術を受け継ぎ、蓄積メディア用に新しい技術を導入したものである。これらは1993年8月、ISO/IEC 11172として成立している。
【0005】
MPEG1は、幾つかの技術を組み合わせて作成されている。
【0006】
入力画像信号からは、動き補償器で復号化した画像信号と当該入力画像信号との差分を取ることで時間冗長部分が削減される。
【0007】
予測の方法は、基本的なモードとして、過去の画像からの予測を行うモードと、未来の画像からの予測を行うモードと、過去と未来の両方の画像からの予測を行うモードとの3モードが存在する。またこれらのモードは、16画素×16画素のマクロブロック(MB:Macro Block)毎に切り替えて使用できる。予測方法は、入力画像に与えられたピクチャタイプ(Picture_Type)によって決定される。過去の画像から予測を行って符号化するモードと予測をしないでそのマクロブロックを独立に符号化するモードとの2つのモードが存在するのが、片方向ピクチャ間予測符号化画像(Pピクチャ:P-picture)である。また、未来の画像からの予測を行うモードと、過去の画像からの予測を行うモードと、
過去と未来の両方の画像からの予測を行うモードと、予測をしないで独立に符号化するモードの4つのモードが存在するのが、双方向ピクチャ間予測符号化画像(Bピクチャ:B-Picture)である。そして、全てのマクロブロックを独立に符号化するのが、ピクチャ内独立符号化画像(Iピクチャ:I-picture)である。なお、ピクチャ内独立符号化画像はイントラピクチャと呼ばれ、このため、片方向ピクチャ間予測符号化画像と双方向ピクチャ間予測符号化画像は非イントラピクチャということができる。
【0008】
動き補償では、動き領域をマクロブロック毎にパターンマッチングを行ってハーフペル精度で動きペクトルを検出し、その検出した動きベクトルの動き分だけシフトしてから予測する。動きペクトルは、水平方向と垂直方向の動きベクトルが存在し、何処からの予測かを示すMC(Motion Compensation)モードとともにマクロブロックの付加情報として伝送される。
【0009】
図8には、MPEG1が適用されるビデオ信号符号化装置の基本的な構成を示している。
【0010】
この図8において、入力端子101には入力画像信号が供給され、この入力画像信号は演算器102と後述する動き補償予測器111に送られる。
【0011】
演算器102では、動き補償予測器111にて復号化した画像信号と入力画像信号との差分が求められ、その差分画像信号がDCT器103に送られる。
【0012】
DCT器103では、供給された差分画像信号を直交変換する。ここでDCT(Discrete Cosine Transform)とは、余弦関数を積分核とした積分変換を有限空間への離散変換とする直交変換である。MPEGではマクロブロックを4分割した8×8のDCTブロックに対して、2次元DCTを行う。なお、一般に、ビデオ信号は低域成分が多く、高域成分が少ないため、DCTを行うと係数が低域に集中する。
【0013】
DCT器103でのDCTによって得られたデータ(DCT係数)は、量子化器104で量子化が行われる。この量子化器104における量子化では、量子化マトリックスという8×8の2次元周波数を視覚特性で重み付けした値と、その全体をスカラー倍する量子化スケールという値で乗算した値とを量子化値として、DCT係数をその量子化値で除算する。
【0014】
なお、当該ビデオ信号符号化装置にて符号化された後の符号化データを、後に図示しないビデオ信号復号装置(デコーダ)で復号して逆量子化するときは、そのビデオ信号符号化装置にて使用した量子化値で乗算を行うことにより、元のDCT係数に近似している値を得ることができる。
【0015】
量子化器104にて量子化されたデータは、VLC器105で可変長符号化される。このVLC器105では、量子化された値のうち、直流(DC)成分に対しては、予測符号化のひとつであるDPCM(Differencial Pulse Code Modulation)を使用して符号化する。また、交流(AC)成分に対しては、低域から高域に向けていわゆるジグザグスキャン(zigzag scan)を行い、ゼロのラン長および有効係数値を1つの事象とし、出現確率の高いものから符号長の短い符号を割り当てていく、いわゆるハフマン符号化を行う。
【0016】
VLC器105にて可変長符号化されたデータは、一時、バッファメモリ106に蓄えられた後、このバッファメモリ106から所定の転送レートで読み出され、符号化データ(符号化ビットストリーム)として出力端子107から出力される。
【0017】
また、その出力される符号化データにおけるマクロブロック毎の発生符号量は、後述するバッファ管理器114を介して符号量制御器113に送信される。この符号量制御器113は、マクロブロック毎の発生符号量と目標符号量との差分を求め、当該差分に応じた符号量制御信号を生成して量子化器104にフィードバックすることにより、発生符号量制御を行う。当該符号量制御のために量子化器104にフィードバックされる符号量制御信号は、量子化器104における量子化スケールを制御するための信号である。具体的な符号量制御の方法については後述の通りである。
【0018】
一方、量子化された画像データは、逆量子化器108に送られ、ここで逆量子化される。
【0019】
さらに、この逆量子化により得られたDCT係数データは、逆DCT器109に送られて逆DCTされた後、演算器112にて動き補償予測器111からの予測差分画像が加算されて画像信号が復元される。
【0020】
この復元された画像信号は、一時、画像メモリ110に蓄えられた後、動き補償予測器111に送られる。画像メモリ110から動き補償予測器111に送られた画像信号は、
演算器102にて差分画像を計算するためのリファレンスの復号化画像を生成するために使用される。
【0021】
また、出力端子107から出力される符号化データである符号化ビットストリームは、
ビデオ信号の場合、1ピクチャ毎に可変長の符号量をもっている。これは、MPEGがDCT、量子化、ハフマン符号化という情報変換を用いている理由と同時に、画質向上のためにピクチャごとに配分する符号量を適応的に変更しているあるためである。すなわち、
MPEGでは、動き補償予測を行っているので、あるときは入力画像信号そのままを符号化し、あるときは予測画像と入力画像信号との差分である差分画像信号を符号化するなど、符号化画像自体のエントロピィが大きく変化するためである。この場合、多くはその画像エントロピィ比率に配分しつつ、バッファメモリの容量制限を守りながら、符号量制御がなされる。
【0022】
したがってバッファ管理器114は、符号化により発生した符号量と、使用可能な符号化レートとの関係を監視し、バッファメモリ106において所定のバッファ容量内に収まるように目標符号量を設定する。
【0023】
この目標符号量に対する実際の発生符号量の差に対応する情報は可変長符号化器105にフィードバックされ、符号量制御器113に入る。符号量制御器113では、量子化器106にセットする量子化スケールの値を大きくして発生符号量を抑えたり、逆に量子化スケールの値を小さくして発生符号量を小さくしたりするための符号量制御信号を生成する。
【0024】
上述のように、可変長データを固定の転送レートのデータ(固定転送レート符号化データ)として転送する場合、そのデータの受信側となるビデオ信号復号装置側の最大バッファ量が、その送信側のビデオ信号符号化装置における発生符号量の上限値となる。すなわち、一定速度で符号化データが入力されて、所定の値だけ蓄積されたところから、所定の時刻(テレビジョン標準放送方式の一つであるNTSC方式のビデオ信号なら1/29.97sec単位)で復号化を一瞬で行う仮想的な復号器のモデルを使用し、そのモデルの仮想バッファメモリ(いわゆるVBVバッファ)にオーバーフローもアンダーフローも発生しないように、符号化装置側で符号化することがMPEGで規定されている。この規定を守っていればVBVバッファ内でのレートは局部的に変化しているものの、観測時間を長く取れば固定の転送レートとなり、MPEGではこのことを固定レートであると定義している。
【0025】
ここで、上述したように定義された固定転送レートの場合において、符号化装置側で発生符号量が少ないときには、復号装置側ではバッファ占有量が上限値に張り付いた状態になる。この場合、例えば無効ビットを追加してバッファ(VBVバッファ)がオーバーフローしないように、符号化装置側において符号量を増やさなければならない。
【0026】
一方、可変転送レートの場合には、この固定転送レートの定義を拡張して、バッファ占有率が上限値になったときに、復号装置における読み出しを中止することにより、原理的にオーバーフローが起きないように定義されている。したがって、可変転送レートの場合において、仮に非常に発生符号量が少なくても、復号装置の読み出しが中止されるので、固定転送レートの時のように無効ビットを入れる必要はない。このため、可変転送レートの場合にはアンダーフローだけが発生しないように符号化する。
【0027】
このような技術を背景にし、従来の可変転送レート符号化においてビデオ信号を第1のパスと第2のパスに分けて符号化し、第1のパスでは第2のパスの符号化に必要な情報を出力するような技術の説明を行う。
【0028】
図9には、従来例の第1のパスの符号化を行うための構成を示す。なお、この図9において、図8に示した基本構成の各構成要素と同様に動作する部分にはそれぞれ同じ指示符号を付加してそれらの説明は省略する。
【0029】
この図9に示す第1のパスの構成では、入力端子101にビデオ信号が再生入力される。その際、符号化情報には、全ビデオシーケンスに対して短区間ごとに発生する発生符号量情報などが付加される。
【0030】
この発生符号量は、VLC器105でのVLC後に、符号量カウンタ121にて計算され、記憶回路122に送られて記憶される。
【0031】
記憶回路122は、例えばハードディスクや光ディスクなど、高速のストレージメディアなど何でもよい。
【0032】
なお、当該第1のパスは、正確な圧縮が行われたか否かをモニタする程度に用いられるので、この図9には図示しているが、バッファメモリ106とその後の符号化データの出力は、符号量をカウントできれば必ずしも必要ない。
【0033】
ところで、MPEGに代表されるような符号化方式では、可変長符号化を行っているので量子化幅を固定にして第1のパスの符号化を行うと、符号化画像の複雑さや、動き補償の差分(残差成分)量に応じて発生符号量が多くなる。
【0034】
したがって、この性質を利用して、発生符号量の配分を行うようにすれば、画質をほぼ均一にすることが可能となる。なお、後述する第2のパスの符号化では、その符号量配分比率を保つと同時に、発生符号量を全体の目標符号量に制御しなければならない。
【0035】
発生符号量は、第1のパスの符号化で発生した短区間単位で検出し、その情報を記憶回路122に記憶する。短区間の例としては、ピクチャ内独立符号化ごとに区切ることができ、約15ピクチャ程度の1GOP(グループオブピクチャ)が考えられる。この場合、
各GOP単位にどの位の発生符号量であったかが記憶回路122に記憶される。
【0036】
第1のパスの符号化では、一般的に量子化幅を小さめで且つ固定にして、第2パスで出力される最終的な符号量より多くの符号量を発生させるのが普通である。このように、第1のパスの符号化において量子化幅を小さくするのは、画像の高周波成分まで細かく情報を分解し、その画像の特性を検出する必要があるからである。
【0037】
ここで、第1のパスにおいてi番目の短区間内に発生した符号量をPS1B(i)とする。この各短区間内で発生した符号量PS1B(i)の比率を、第2のパスでもほぼ同じなるようにし、最終目標総符号量を第2のパスにおける各短区間内の目標符号量とする。
【0038】
例えば、短区間を1GOPとすると、以下の様な方法で画質をある程度保ちながら符号を制御することができる。
【0039】
次に、図10には、従来例の第2のパスの符号化を行うための構成を示す。なお、この図10において、図8に示した基本構成の各構成要素と同様に動作する部分にはそれぞれ同じ指示符号を付加してそれらの説明は省略する。
【0040】
この図10に示す第2のパスの構成において、発生符号量を増加させるには、量子化スケールを小さくし、一方、発生符号量を減少させるには量子化スケールを大きくする。
【0041】
この原理を用いて、例えばバッファメモリ106の占有率をもとに、量子化幅を制御する方法が考えられる。ここで注意すべき点は、片方向ピクチャ間予測符号化される画像(Pピクチャ)は一つ前のピクチ内独立符号化画像(Iピクチャ)もしくはPピクチャから予測され、また、双方向ピクチャ間予測符号化画像(Bピクチャ)は、時間的に両側のIピクチャやPピクチャから予測されている関係上、例えばIピクチャが劣化すると、連動して他のピクチャも劣化する。
【0042】
以下の方式例では、これらのピクチャに対する符号量配分を考慮しながら全体の符号量制御を実現している。
【0043】
先ず、目標符号量決定回路124では、記憶回路122からの第1のパスで得られた発生符号量PS1B(i)を使用して、以下の式のように各GOPの目標符号量PS2B(i)を求める。
PS2B(i)=最終目標総符号量×PS1B(i)/ΣPS1B(i)
【0044】
ここで、一つのGOPに与える目標符号量PS2B(i)をRとすると、具体的な符号量制御は、以下の第1、第2のステップのようなアルゴリズムにより、符号量制御器113が行う。
【0045】
(A)第1のステップ
第1のステップでは、以下の式のように、GOPの各ピクチャに対する割り当て符号量を、GOP内で未だ符号化していないピクチャに対してある重みを付けて配分する。
Xi=Si×Qi
Xp=Sp×Qp
Xb=Sb×Qb
【0046】
ここで、Xはグローバルコンプレクシティメジャー(global complexity measure)と呼ばれ、一つ前の同ピクチャタイプの符号化結果の発生符号量Sと平均量子化スケールQとの積で定義するものであり、iはIピクチャを、pはPピクチャを、bはBピクチャを表している。また、理想的な画質を達成する量子化スケールは、Iピクチャを基準とした場合のPピクチャとの比率がKp=1.0で、同じくIピクチャを基準とした場合のBピクチャとの比率がKb=1.4であると仮定する。
【0047】
このとき、当該第1のステップで割り当てられる各ピクチャの符号量Ti,Tp,Tbは、以下の各式にて求められる。
Ti=MAX{R/(1+(NpXp/XiKp)+NbXb/XiKb)),br/(8*pr)}
Tp=MAX{R/(Np+(NpKpXb/KbXp)),br/(8*pr)}
Tb=MAX{R/(Nb+(NpKbXp/KbXp)),br/(8*pr)}
【0048】
なお、各式において、TiはIピクチャの符号量を表し、TpはPピクチャの符号量を、TbはBピクチャの符号量を、MAXは最大を、RはそのGOPに与えられた初期値の符号量を、NpはGOP内のPピクチャの未符号化ピクチャ枚数、NbはGOP内のBピクチャの未符号化ピクチャ枚数、prはピクチャレート、brはビットレートを表している。
【0049】
ここで、初期値の符号量Rは、GOP内で符号化が進むごとに次のように更新する。
R=R−Si,p,b
【0050】
(B)第2のステップ
第2のステップでは第1のステップで割り当てられた各ピクチャの符号量(Ti,Tp,Tb)と実際の発生符号量を一致させるため、以下の各式に示すように、マクロブロック毎に発生符号量を加算しつつ、目標符号量から途中での予測目標符号量との差を、量子化スケールにマクロブロック単位でフィードバックする。
dji = dOi+Bj-1−(Ti(j-1)/MB_cnt)
djp = dOp+Bj-1−(Tp(j-1)/MB_cnt)
djb = dOp+Bj-1−(Tb(j-1)/MB_cnt)
【0051】
なお、各式中において、dOiはIピクチャにおける仮想バッファ(VBVバッファ)の初期占有量を、dOpはPピクチャにおける仮想バッファ(VBVバッファ)の初期占有量を、dObはBピクチャにおける仮想バッファ(VBVバッファ)の初期占有量を、jは符号量カウンタ121にてカウントされた各ピクチャの先頭から何番目かを示す番号を、Bjは符号量カウンタ121でカウントされた各ピクチャの先頭からj番目のマクロブロックまでの発生符号量を、MB_cntは1ピクチャ内のマクロブロック数を、djiはIピクチャにおけるフィードバック量を、djpはPピクチャにおけるフィードバック量を、djbはBピクチャにおけるフィードバック量を示している。
【0052】
さらに、平均量子化スケールQは、以下の式にて求められる。
Q=dj×31/r
R= 2×br/pr
なお、式中のQは量子化スケールを、rはフィードバックの応答速度を決定するパラメータである。
【0053】
従来の構成では、上述のような各演算を行うことにより符号量制御を行うことが可能となる。
【0054】
なお、MPEGについては、ISO−IEC11172−2、ITU−T H.262/ISO−IEC13818−2に詳細な説明がなされているため、ここではこれ以上の説明は省略する。
【0055】
【発明が解決しようとする課題】
このように、従来の構成では可変転送レート符号化を実現するために、上述したような2回のパスの符号化を通さなければならない。
【0056】
すなわち、図9,図10に示したように、ビデオ信号符号化装置に対して、符号化する動画像信号を2度入力させなければならなかった。このため、例えば放送や通信などによってリアルタイムで送信されてくる動画像信号などのように、1度しか送信されてこない画像信号に関しては、可変転送レート符号化を行うことができなかった。
【0057】
また、例えば符号化されたデータの編集をするような場合には、再度符号化し直さなければならなかったり、符号化データをMPEGに準拠させるために、実際に編集を行いたい部分の他に数フレームを部分的に修正しなければならなくなったりするなど、非常に手間を要する問題があった。
【0058】
本発明は、上述の課題に鑑みてなされたものであり、例えば放送や通信などによってリアルタイムで送信されてくる動画像信号に対しても可変転送レートでの符号化を行うことが可能であるとともに、編集も容易な、可変転送レート符号化方法および装置の提供を目的とする。
【0059】
【課題を解決するための手段】
上記課題を解決するために本発明は、下記の方法及び装置を提供するものである。
(1) ビデオ信号を直交変換と量子化を使用して符号化して、可変転送レートにて出力する可変転送レート符号化方法であって、
入来するビデオ信号を直交変換と量子化を使用して符号化するステップと、
前記入来するビデオ信号の符号化と同時に、その符号化された符号化データの1画像単位毎の発生符号量と1画像単位毎の平均量子化幅とを検出し、検出した1画像単位毎の発生符号量と1画像単位毎の平均量子化幅との情報を有する符号化情報を生成するステップと、
前記符号化された符号化データを固定転送レートで記録すると共に、前記符号化情報を記録するステップと、
前記記録された符号化データを復号するステップと、
前記記録された符号化情報と前記符号化データの再生時間と目標とする平均可変転送レートとをもとに、もしくは前記符号化情報と目標符号量とをもとに、1画像単位毎の新たな目標符号量を設定し、1画像単位毎の発生符号量がその新たな目標符号量となるように、前記符号化データを復号したデータを可変長符号化する可変転送レート符号化ステップと、
を有することを特徴とする可変転送レート符号化方法。
(2) 前記記録するステップにおいて、前記符号化するステップでの符号化時の動き補償に関するパラメータを記録するようにし、
前記可変転送レート符号化ステップにおいて、前記記録された符号化データを復号したデータを可変長符号化する際に、動き補償に関するパラメータとして、前記記録された動き補償に関するパラメータを使用することを特徴とする上記(1)記載の可変転送レート符号化方法。
(3) 編集情報を入力するステップを設け、
前記符号化情報を生成するステップでは、編集情報に基づく必要な区間のみの符号化情報を生成し、
前記復号するステップでは、編集情報に基づく必要な区間のみのデータを復号し、
前記可変転送レート符号化ステップでは、前記符号化情報として編集情報に基づく必要な区間のみの符号化情報を使用すると共に、符号化するデータとして前記編集情報に基づき必要な区間のみ復号されたデータを使用することを特徴とする上記(1)または(2)に記載の可変転送レート符号化方法。
(4) ビデオ信号を直交変換と量子化を使用して符号化して、可変転送レートにて出力する可変転送レート符号化装置であって、
入来するビデオ信号を直交変換と量子化を使用して符号化する入来ビデオ信号符号化手段と、
前記入来するビデオ信号の符号化と同時に、その符号化された符号化データの1画像単位毎の発生符号量と1画像単位毎の平均量子化幅とを検出し、検出した1画像単位毎の発生符号量と1画像単位毎の平均量子化幅との情報を有する符号化情報を生成する符号化情報検出手段と、
前記符号化された符号化データを固定転送レートで記録すると共に、前記符号化情報を記録する記録手段と、
前記記録された符号化データを復号する復号手段と、
前記記録された符号化情報と前記符号化データの再生時間と目標とする平均可変転送レートとをもとに、もしくは前記符号化情報と目標符号量とをもとに、1画像単位毎の新たな目標符号量を設定し、1画像単位毎の発生符号量がその新たな目標符号量となるように、前記符号化データを復号したデータを可変長符号化する可変転送レート符号化手段と、
を有することを特徴とする可変転送レート符号化装置。
(5) 前記入来ビデオ信号符号化手段は、符号化時の動き補償に関するパラメータを出力するものであり、
前記記録手段はその動き補償に関するパラメータを記録するものであり、
前記可変転送レート符号化手段は、前記記録された符号化データを復号したデータを可変長符号化する際に、動き補償に関するパラメータとして、前記記録された動き補償に関するパラメータを使用するものであることを特徴とする上記(4)記載の可変転送レート符号化装置。
(6) 編集情報を入力する編集情報入力手段と、
その編集情報に基づいて前記符号化情報検出手段を制御する検出制御手段と、
前記編集情報に基づいて前記復号手段を制御する復号化制御手段とを設け、
前記符号化情報検出手段では、前記検出制御手段の制御により、前記編集情報に基づく必要な区間のみの符号化情報を生成し、
前記復号手段では、前記復号化制御手段の制御により、前記編集情報に基づく必要な区間のみ符号化データを復号し、
前記可変転送レート符号化手段では、前記符号化情報として前記編集情報に基づく必要な区間のみの符号化情報を使用すると共に、符号化するデータとして前記編集情報に基づき必要な区間のみ復号されたデータを使用することを特徴とする上記(4)または(5)に記載の可変転送レート符号化装置。
【0060】
【発明の実施の形態】
以下、本発明に係る可変転送レート符号化方法および装置の好ましい実施の形態について図面を参照しながら詳細に説明する。
【0061】
図1には、本発明に係る可変転送レート符号化方法及び装置の参考例としてのビデオ信号符号化装置の基本構成を示す。なお、本参考例では、動画像信号の符号化手法として例えばMPEG1符号化を用いた例を挙げて説明する。
【0062】
この図1において、ビデオ信号符号化装置の入力端子1に入力される入力画像信号は、輝度信号と色差信号で構成されたビデオ信号であり、ディジタル化された後にピクチャタイプにあわせて画像の並べ替えが行われているものである。当該入力画像信号が符号化データとして記憶回路22に記録され、さらにこの記憶回路22に記録された符号化データを可変転送レート符号化データに変換(再符号化)するまでの概略構成例を、この図1を用いて説明する。
【0063】
入力端子1に供給された入力画像信号は、演算器2と動き補償予測器11に送られる。
【0064】
動き補償予測器11では、入力画像信号をその符号化順に動き補償予測し、演算器2では、入力画像信号と動き補償予測器11からの予測画像との差分が計算される。
【0065】
当該演算器2での演算により得られた差分画像データは、DCT器3においてDCTが行われる。
【0066】
このDCT器3からのDCT係数は、量子化器4で量子化される。その量子化データは、動き補償予測器11からの動きベクトルや符号化モードと共にVLC器5に送られ、当該VLC器5で可変長符号化(VLC)される。
【0067】
このVLC器5での可変長符号化によって得られた符号化データは、バッファメモリ6に一時蓄積され、その後、MPEGのビデオストリームとして当該バッファメモリ6から出力される。
【0068】
また、レート制御器23は、バッファメモリ6の充足度を監視しており、基本的には、
バッファメモリ6の充足度が多くなると量子化を粗く、少なくなると量子化を細かくするような符号化制御信号を、量子化器4にフィードバックする。
すなわち、当該量子化器4にフィードバックされる符号化制御信号は、量子化幅を制御するための制御信号である。
【0069】
ここで、図1に示す装置においても、前述したように、入力画像信号はMPEGで定義される固定転送レートで符号化される。この符号化レートは、記録メディアの容量と、記録する入力画像信号の再生時間に依存するものであるが、その条件内で当該符号化レートは極力高いほうが望ましい。すなわち画質がよいほうが望ましい。なぜならば、当該符号化レートが後述する可変転送レート符号化データ変換において符号化される条件の最大転送レートに等しくなるからである。
【0070】
このため、図1に示す装置では、バッファメモリ6から出力される符号化データを、記憶回路22に記録するようにしている。なお、図1に示す装置にて用いる記憶回路22は、記録再生可能なハードディスクや光ディスク、高速のストレージメディアなど何でもよい。
【0071】
一方、Iピクチャ、Pピクチャは、後に動き補償予測の参照画像として用いる必要があるため、量子化器4から出力される当該IピクチャやPピクチャの量子化データは、逆量子化器8以降にも送られる。
【0072】
すなわち、この逆量子化器8での逆量子化により得られたDCT係数データは、逆DCT器9に送られて逆DCTされた後、演算器12にて動き補償予測器11からの予測差分画像が加算されて画像信号が復元される。
【0073】
この復元された画像信号は、一時、画像メモリ10に蓄えられる。当該復元されて画像メモリ10に蓄えられた画像信号は、後のビデオ信号復号装置において再生されるものと同じ画像信号である。
【0074】
当該画像メモリ10に蓄えられた画像信号は、動き補償予測器11に送られ、次の動き補償予測の参照画像となされる。つまり、画像メモリ10から動き補償予測器11に送られた画像信号は、演算器2にて差分画像を計算するためのリファレンスの復号化画像を生成するために使用される。
【0075】
次に、図1に示すビデオ信号符号化装置では、記憶回路22に記録された符号化データを、符号化情報検出器24に送る。この符号化情報検出器24では、符号化データから各ピクチャの発生符号量や量子化幅を検出し、その発生符号量や量子化幅を再び記憶回路22に送って記録させる。当該記憶回路22に記録される具体的な符号化情報としては、図2に示すようなフォーマットのピクチャ情報を挙げることができる。このピクチャ情報の部分がピクチャの枚数分だけ、符号化の順番で記憶回路22に記録される。
【0076】
ここで、MPEG符号化による圧縮データは、ピクチャの先頭に4バイトのピクチャスタートコードをつけるように決められている。このピクチャスタートコードは、「0×00000100」といった他のデータと区別できるようバイトアラインされたユニークコードなので、符号化情報検出器24では、先ずこのピクチャスタートコードを検出し、次に当該ピクチャスタートコードが検出されるまでの間の符号量をカウントすることにより、そのピクチャの発生符号量を計算するようにしている。
【0077】
また、発生符号量は、符号化レートにも依存するが、15Mbps相当で、最大1.75Mビット程度であり、さらに精度も1000ビット程度あれば良い。
したがって、記憶回路22には、11〜12ビット/ピクチャ程度の情報でバイトアラインを考えて、2バイト程度の情報を符号化されたピクチャ順番に記録するようにしている。
【0078】
さらに、量子化幅情報としては、マクロブロックという16画素×16画素のブロック毎に決められる量子化幅の和、もしくは平均値を求めるのが理想的であるが、いわゆるNTSC放送方式の720×480画素のピクチャの場合には1350個のマクロブロックの平均をとらなければならない。この場合、MPEGレイヤのうち、本来ならばマクロブロック層という比較的深い部分まで圧縮データをVLC(可変調復号化)しなければならないが、高速化のために、マクロブロック1列分のスライス層の先頭にあるスライス量子化幅を量子化幅情報として用いることも可能である。このスライス量子化幅は、NTSC放送方式の720×480画素のピクチャの場合には30個(480/16)存在していて、ピクチャスタートコードと同様にユニークコードであるスライススタートコード「0×00000101〜0×0000011E」の間で検出することが可能である。なお、
スライス量子化幅はそのスライススタートコードの直後の5ビットにて示されている。
【0079】
符号化情報検出器24では、上述した発生符号量や量子化幅の値を30個検出して、それらの和もしくは平均をとるようにしている。なお、量子化幅は、マクロブロック層でもスライス層でも1〜31の5ビットで示されるので、当該量子化幅情報は2バイトあれば表現できる値である。このため、記憶回路22においては、当該量子化幅情報を発生符号量情報の後に付加して記録するようにしている。
【0080】
図1の構成では、符号化した後の符号化データから発生符号量や量子化幅情報を検出する例を挙げたが、VLC器5での符号化と同時に、発生符号量や量子化幅情報を検出するようにしてもよい。
【0081】
当該VLC器5での符号化と同時に発生符号量や量子化幅情報を符号化情報検出器24にて検出する場合の基本構成を、図3に示す。なお、この図3において、図1に示した構成の各構成要素と同様に動作する部分にはそれぞれ同じ指示符号を付加してそれらの説明は省略する。
【0082】
この図3に示す構成の符号化情報検出器24では、例えば、VLC器5で可変長符号化を行っているときの符号化データを用いて、例えばピクチャスタートコード間の符号をカウントすることにより、符号化時のマクロブロック毎の量子化幅の和もしくは平均値を検 出するようにしている。もちろん、符号化情報検出器24では、ピクチャスタートコード間で量子化幅を求める代わりに、前述したように、スライススタートコード間でスライス量子化幅を求めることも可能である。当該符号化情報検出器24にて検出された発生符号量や量子化幅情報は、記憶回路22に記録される。
【0083】
上述した図1及び図3の構成においては、記憶回路22に記録された発生符号量情報と量子化幅情報、符号化データ等を用いて、後述するように、当該符号化データを可変転送レート符号化データに変換(再符号化)するようにしている。
【0084】
すなわち、図1及び図3の基本構成には、上述した構成に加えて、記憶回路22に記録された符号化データを復号画像データに変換する復号器40と、同じく記憶回路22に記録された発生符号量情報と量子化幅情報、及び、後述する目標とする平均可変転送レートもしくは目標符号量に関する情報に基づいて、その復号画像データを可変転送レート符号化データに変換して出力端子7から出力するための可変転送レート符号化器50とを備えている。この出力端子7から出力された可変転送レート符号化データは、図示しない記録媒体に記録されることになる。
【0085】
図4には、記憶回路22に記録された発生符号量情報と量子化幅情報、符号化データ等を用いて、当該符号化データを可変転送レート符号化データに変換(再符号化)するための第1の具体例の構成、すなわち、図1及び図3の復号器40と可変転送レート符号化器50、及びその周辺回路(図1,図3では図示を省略)の、より具体的な構成を示す。なお、この図4には、説明の都合上、記憶回路22も同時に示している。
【0086】
この図4において、記憶回路22から読み出された符号化データは、復号器40にて復号され、復号画像データとして可変転送レート符号化器50に送られる。
【0087】
この可変転送レート符号化器50に供給された復号画像データは、演算器52と動き補償予測器61に送られる。
【0088】
動き補償予測器61では、復号画像データを符号化順に動き補償予測し、演算器52では、復号画像データと動き補償予測器61からの予測画像との差分が計算される。
【0089】
当該演算器52での演算により得られた差分画像データは、DCT器53においてDCTが行われる。
【0090】
このDCT器53からのDCT係数は、量子化器54で量子化される。その量子化データは、動き補償予測器61からの動きベクトルや符号化モードと共にVLC器55に送られ、当該VLC器55で可変長符号化(VLC)される。
【0091】
このVLC器55での可変長符号化によって得られた符号化データは、バッファメモリ56に一時蓄積され、その後、可変転送レート符号化データとして出力端子57から出力され、図1または図3の出力端子7に送られる。この出力された可変転送レート符号化データは図示しない記録媒体に記録されることになる。
【0092】
一方、Iピクチャ、Pピクチャは、後に動き補償予測の参照画像として用いる必要があるため、量子化器54から出力される当該IピクチャやPピクチャの量子化データは、逆量子化器58以降にも送られる。
【0093】
すなわち、この逆量子化器58での逆量子化により得られたIピクチャやPピクチャのDCT係数データは、逆DCT器59に送られて逆DCTされた後、演算器62にて動き補償予測器61からの予測差分画像が加算されて画像信号が復元される。
【0094】
この復元された画像信号は、一時、画像メモリ60に蓄えられる。当該復元されて画像メモリ60に蓄えられた画像信号は、後のビデオ信号復号装置において再生されるものと同じ画像信号である。
【0095】
当該画像メモリ60に蓄えられた画像信号は、動き補償予測器61に送られ、次の動き補償予測の参照画像となされる。つまり、画像メモリ60から動き補償予測器61に送られた画像信号は、演算器52にて差分画像を計算するためのリファレンスの復号化画像を生成するために使用される。
【0096】
また、符号量カウンタ62は、VLC器55でのVLC後に、発生符号量を計算し、この発生符号量を示すピクチャ符号量情報を符号量制御回路63に供給する。
【0097】
符号量制御回路63では、当該符号量カウンタ62からのピクチャ符号量情報と後述するピクチャ目標符号量情報とに基づいて、量子化器54における量子化ステップを制御する。
【0098】
一方、記憶回路22から読み出された発生符号量情報および量子化幅情報等を含む符号化情報は、図1及び図3では図示を省略した目標符号量決定回路26に入力される。
【0099】
また、当該目標符号量決定回路26には、例えばCPU(中央処理ユニット)25から、可変転送レート符号化データの目標符号量が設定される。なお、CPU25は、外部に設けられるものであるが、内部に設けることも可能である。CPU25にて設定される目標符号量は、これから可変転送レート符号化データに変換しようとする符号化データの再生時間がわかれば、平均可変転送レートを入力するのと等価となる。
【0100】
ここで、この目標符号量決定回路26における符号化量決定のアルゴリズム例を以下に説明する。
【0101】
例えば、前述したように符号化情報検出器24が検出したピクチャ毎の発生符号量をBIT(i)、そのときのピクチャ全体の平均量子化幅をQ(i)、符号化データを可変転送レート符号化データに変換(再符号化)した後の全体の目標符号量をTBとする。なお、(i)はピクチャの番号を示す。これらを用いて、可変化転送レート符号化データの各ピクチャに与える目標符号量TG(i)は、以下の式により求めることができる。
EN(i)=BIT(i)0.8×Q(i)
TG(i)=TB×EN(i)/ΣEN(i)
【0102】
この式により求めた、可変化転送レート符号化データの各ピクチャに与える目標符号量(ピクチャ目標符号量情報)TG(i)は、可変転送レート符号化器50の符号量制御回路63に送られる。なお、式中のENは、その検出したピクチャ複雑さや、動き補償時の誤差量にほぼ比例しており、符号化の難しさを表すものである。このENの値が高いときには符号量を増やし、小さいときには符号量を減らすことで、画質を一定にした符号量割り当てが可能となる。可変転送レート符号化データの各ピクチャに与える目標符号量TG(i)は、この比率で、当該可変転送レート符号化データに変換した後の全体の目標符号量TBを分配していることに他ならない。また、前述した従来例と同様に、発生符号量比率に単純に分配するようにしてもよく、ピクチャ内の符号量制御は前述した第2のステップ以降の方法で実現することが可能である。
【0103】
符号量制御回路27では、上述のようにして求めたピクチャ目標符号量TG(i)と、
符号量カウンタ62でカウントされたピクチャ符号量情報とに基づいて、量子化器54における量子化スケールを制御することで、符号量の制御を行う。
【0104】
本実施の形態のビデオ信号符号化装置によれば、上述のような処理によって符号化データを可変転送レート符号化データに変換す(再符号化)ることを可能にしている。
【0105】
また、図1及び図3の構成においては、図4の構成に代えて、図5に示すような構成により、符号化データを可変転送レート符号化データに変換(再符号化)することも可能である。
【0106】
すなわち、図5には、記憶回路22に記録された発生符号量情報と量子化幅情報、符号化データ等を用いて、当該符号化データを可変転送レート符号化データに変換(再符号化)するための第2の具体例の構成を示している。なお、この図5において、図4に示した各構成要素と同様に動作する部分にはそれぞれ同じ指示符号を付加してそれらの説明は省略する。
【0107】
この図5の構成では、図1の例のように記憶回路22に記録された符号化データに基づいて符号化情報検出器24で各ピクチャの発生符号量や量子化幅を検出する構成、もしくは、図3の例のように符号化しながら発生符号量や量子化幅情報を符号化情報検出器24で検出する構成における符号化にて使用し、その符号化データに記述されたマクロブロック毎の動き補償に関するパラメータを、記憶回路22に記録しておくようにしており、可変転送レート符号化器50にて復号画像データを可変転送レート符号化するときに、当該記憶回路22に記録された動き補償に関するパラメータを使用するようにしている。
【0108】
この図5の構成と図4の構成との違いは、記憶回路22から読み出された動き補償に関するパラメータが、動き補償関連情報として可変転送レート符号化器50の符号化情報入力器64に入力され、当該可変転送レート符号化器50の動き補償予測器61ではこの動き補償関係情報を用いて動き補償予測を行うようにしていることである。
【0109】
ここで、記憶回路22に記録される動き補償に関するパラメータとしては、具体的にはマクロブロック毎の動きベクトルと動き補償のタイプ等を挙げることができる。すなわち、この図5に示す構成例の記憶回路22に記憶される具体的な符号化情報としては、前述の図2に示したようなフォーマットのピクチャ情報に加えて、図6に示すようなマクロブロック情報の部分がマクロブロックの個数分だけ、ピクチャの左上から右下方向へのラスタ順番に記録される。
【0110】
こうすることで、記憶回路22に記録されている符号化データが例えばある程度の符号化劣化を伴っているような場合であっても、その符号化データを復号器40にて復号した復号画像を用いて動き補償予測器61が動きベクトルを求める際に、符号化劣化ノイズに乱されることがなくなる。また、動きベクトルを求める処理量も削減できる。これ以外にも、例えばいわゆるMPEG2に拡張する場合に、フレームとフィールドで適応的に切り換える類の情報を記録することは、十分効果的である。
【0111】
さらに、図1及び図3の構成においては、図4や図5の構成に代えて、図7に示すような構成により、符号化データを可変転送レート符号化データに変換(再符号化)することも可能である。
【0112】
すなわち、図7には、記憶回路22に記録された発生符号量情報と量子化幅情報、符号化データ等を用いて、当該符号化データを可変転送レート符号化データに変換(再符号化)するための第3の具体例の構成を示している。なお、この図7において、図4や図5に示した各構成要素と同様に動作する部分にはそれぞれ同じ指示符号を付加してそれらの説明は省略する。
【0113】
すなわち、この図7の構成では、図1や図3の符号化により得られた符号化データに対して、例えば編集処理を施すような場合に、可変転送レート符号化器50における可変転送レート符号化の際に、その編集処理に使用した編集情報に従った符号化を行うようにする。なお、具体的な編集情報としては、例えば編集を有効にしたい画像の時間情報を示す、時間:分:秒:フレームからなるフォーマットの情報を挙げることができる。
【0114】
より具体的に説明すると、この図7では、編集開始点と編集終了点を組み合わせて生成される編集情報が編集情報入力器41から入力され、その編集情報が復号制御器42に送られる。
【0115】
当該復号制御器42は、その編集情報に記述されている、編集を有効にしたい画像の時間部分だけを復号再生するように、復号器40を制御する。したがって、このときの復号器40では、記憶回路22から供給される符号化データのうち、編集情報にて記述されている編集を有効にしたい画像の時間部分だけを復号再生することになる。
【0116】
また、この図7の構成の場合、編集情報入力器41からの編集情報は、検出制御器43にも入力される。この検出制御器43は、編集を有効にしたい画像の時間部分だけの、各ピクチャの発生符号量や量子化幅を検出するように、符号化情報検出器24を制御する。
このため、このときの記憶回路22には、編集を有効にしたい画像の時間部分だけの、各ピクチャの発生符号量情報や量子化幅情報が符号化情報として記録されることになる。
【0117】
さらに、この図7の構成の場合の目標符号量決定回路26では、記憶回路22に記憶された、編集を有効にしたい画像の時間部分だけの各ピクチャの発生符号量情報や量子化幅情報からなる符号化情報と、CPU25からの目標符号量もしくは平均可変転送レートとに基づいて、編集を有効にしたい画像の時間部分だけのピクチャ目標符号量が計算されることになる。
【0118】
このようなことから、可変転送レート符号化器50では、編集を有効にしたい画像の時間部分だけの可変転送レート符号化が可能となる。
【0119】
なお、このような編集処理において、例えば編集点がPピクチャの画像部分になった場合、その画像はIピクチャとして符号化する必要がある。また、編集点がBピクチャの画像部分になった場合は、その前後の動き補償関係の情報が無効となる必要がある。したがって、このような場合には、関連するピクチャをIピクチャとして符号化するなどの処理が必要である。
【0120】
本発明の可変転送レート符号化方法及び装置が適用される本実施の形態のビデオ信号符号化装置によれば、上述のような構成を用いることによって符号化データを可変転送レート符号化データに変換(再符号化)することを可能にしている。
【0121】
また、本実施の形態のビデオ信号符号化装置によって上述したようにして生成された可変転送レート符号化データを不図示の記録媒体に記録することで、記録媒体の容量は有効に活用されることになり、その可変転送レート符号化データを後に復号した場合にも良好な復号データが得られることになる。
【0122】
本発明は、上述した実施の形態に限定されることはなく、本発明に係る技術的思想を逸脱しない範囲であれば、設計等に応じて種々の変更が可能であることは勿論であり、符号化の手法も前述したMPEG1に限らない。
【0123】
【発明の効果】
上述したように、本発明に係る可変転送レート符号化方法および装置によれば、従来の可変転送レート符号化装置のように、同じ画像を2回符号化装置に入力する必要がなくなる。すなわち、符号化する動画像信号として、放送や通信などからリアルタイムで送信されてくる動画像信号など1度しか送信されない画像信号に関しても、高レートで符号化を行ってそのデータを、書き込み可能なディスクやテープメディアなどに一時的に記録し、
しかる後にそのデータを用いて、高画質な可変転送レート符号化を行い、最終的に必要な可変転送レート符号化データを生成して例えば記録することが可能となる。
また、一時的に記録した符号化データの動き補償に関するパラメータを使用して、可変転送レート符号化を行うようにした場合には、動きベクトルを求める際に、符号化劣化ノイズに乱されることがなくなる。
さらに、一時的に記録した符号化データのうち、編集でカットしたい部分などの編集情報を用いて、可変転送レート符号化を行うようにした場合には、編集情報を反映した可変転送レート符号化を行うことができる。
【図面の簡単な説明】
【図1】 本発明の可変転送レート符号化方法および装置の参考例としてのビデオ信号符号化装置において、符号化データを符号化情報検出器で検出して可変転送レート符号化データに変換(再符号化)する場合の概略構成を示すブロック図である。
【図2】 本実施の形態のビデオ信号符号化装置の記憶回路に記録される符号化情報(ピクチャ情報)のフォーマットを示す図である。
【図3】 本実施の形態のビデオ信号符号化装置において、符号化しながら発生符号化量や量子化幅情報を符号化情報検出器で検出して符号化データを可変長符号化データに変換(再符号化)する場合の概略構成例を示すブロック図である。
【図4】 本実施の形態のビデオ信号符号化装置において、記憶回路に記録された発生符号量情報と量子化幅情報、符号化データ等を用いて、当該符号化データを可変転送レート符号化データに変換(再符号化)するための第1の具体例の構成を示すブロック図である。
【図5】 本実施の形態のビデオ信号符号化装置において、記憶回路に記録された発生符号量情報と量子化幅情報、符号化データ等を用いて、当該符号化データを可変転送レート符号化データに変換(再符号化)するための第2の具体例の構成を示すブロック図である。
【図6】 本実施の形態のビデオ信号符号化装置の記憶回路に記録される符号化情報(マクロブロック情報)のフォーマットを示す図である。
【図7】 本実施の形態のビデオ信号符号化装置において、記憶回路に記録された発生符号量情報と量子化幅情報、符号化データ等を用いて、当該符号化データを可変転送レート符号化データに変換(再符号化)するための第3の具体例の構成を示すブロック図である。
【図8】 従来例のビデオ信号符号化装置の基本構成を示すブロック図である。
【図9】 従来例のビデオ信号符号化装置において第1のパスの符号化を行う場合の構成を示すブロック図である。
【図10】 従来例のビデオ信号符号化装置において第2のパスの符号化を行う場合の構成を示すブロック図である。
【符号の説明】
1…入力端子、2,52…演算器、3,53…DCT器、4,54…量子化器、
5,55…VLC器、6,56…バッファメモリ、7,57…出力端子、
8,58…逆量子化器、9,59…逆DCT器、10,60…画像メモリ、
11,61…動き補償予測器、12,62…演算器、62…符号量カウンタ、
63…符号量制御回路、22…記憶回路、24…符号化情報検出器、25…CPU、
26…目標符号量決定回路、40…復号器、41…編集情報入力器、
42…復号化制御器、43…検出制御器、50…可変転送レート符号化器。 [0001]
BACKGROUND OF THE INVENTION
The present invention relates to a video signal encoding method for encoding a moving image signal (video signal) and a corresponding video signal encoding device, and more particularly to a video signal encoding method and device for performing encoding using orthogonal transform and quantization. Applicable toEncode encoded data at a fixed transfer rateConvert to variable rate encoded data after temporary recording(Re-encoding)Variable transfer rate encoding method and deviceIn placeRelated.
[0002]
[Prior art]
According to the technique described in Japanese Patent Laid-Open No. 7-284097 as an example of a conventional variable transfer rate encoding technique, a video signal is divided into a first pass and a second pass, and the first pass is encoded. Information necessary for encoding the second pass is generated and output. A so-called MPEG system is used as the encoding system at this time.
[0003]
As for MPEG, ISO-IEC11172-2, ITU-T H.264, etc. Since the detailed description is made in H.262 / ISO-IEC13818-2, only the outline will be described here.
[0004]
MPEG is the name of the organization that examines the video coding standard established in 1988 by ISO / IEC JTC1 / SC2 (International Organization for Standardization / International Electrotechnical Standards Meeting Technical Committee 1 /
[0005]
MPEG1 is created by combining several technologies.
[0006]
From the input image signal, the time redundant portion is reduced by taking the difference between the image signal decoded by the motion compensator and the input image signal.
[0007]
The prediction method has three basic modes: a mode for performing prediction from a past image, a mode for performing prediction from a future image, and a mode for performing prediction from both past and future images. Exists. In addition, these modes are a 16 pixel × 16 pixel macroblock (MB: Macro).Bcan be switched for each lock). The prediction method is determined by the picture type (Picture_Type) given to the input image. There are two modes: a mode in which prediction is performed from a past image and a mode in which the macroblock is independently encoded without prediction, and a unidirectional inter-picture prediction encoded image (P picture: P-picture). In addition, a mode for predicting from future images, a mode for predicting from past images,
There are four modes: a mode that performs prediction from both past and future images, and a mode that independently encodes without prediction. Bidirectional inter-picture predictive encoded images (B-picture: B-Picture) ). In addition, it is an intra-picture independent encoded image (I-picture) that encodes all macroblocks independently. Note that the intra-picture independent coded image is called an intra picture, and therefore, the unidirectional inter-picture predictive coded image and the bidirectional inter-picture predictive coded image can be called non-intra pictures.
[0008]
In motion compensation, the motion region is subjected to pattern matching for each macroblock, a motion vector is detected with half-pel accuracy, and the motion vector is predicted by shifting by the detected motion vector. The motion vector has a motion vector in the horizontal direction and the vertical direction, and is transmitted as additional information of the macroblock together with an MC (Motion Compensation) mode indicating where the motion vector is predicted.
[0009]
FIG. 8 shows a basic configuration of a video signal encoding apparatus to which MPEG1 is applied.
[0010]
In FIG. 8, an input image signal is supplied to an
[0011]
The
[0012]
The
[0013]
Data (DCT coefficient) obtained by DCT in the
[0014]
When the encoded data after being encoded by the video signal encoding device is decoded and dequantized later by a video signal decoding device (decoder) (not shown), the video signal encoding device By multiplying by the used quantized value, a value approximating the original DCT coefficient can be obtained.
[0015]
The data quantized by the
[0016]
Data variable-length encoded by the
[0017]
The generated code amount for each macroblock in the output encoded data is the
[0018]
On the other hand, the quantized image data is sent to the
[0019]
Further, the DCT coefficient data obtained by the inverse quantization is sent to the
[0020]
The restored image signal is temporarily stored in the
It is used for generating a reference decoded image for calculating a difference image in the
[0021]
An encoded bit stream that is encoded data output from the
In the case of a video signal, each picture has a variable length code amount. This is because MPEG uses information conversion such as DCT, quantization, and Huffman coding, as well as adaptively changing the code amount allocated to each picture in order to improve image quality. That is,
In MPEG, since motion compensation prediction is performed, the encoded image itself is encoded such that the input image signal is encoded as it is in some cases and the difference image signal that is the difference between the predicted image and the input image signal is encoded in some cases. This is because the entropy of a large change. In this case, in many cases, the code amount control is performed while allocating to the image entropy ratio and keeping the buffer memory capacity limit.
[0022]
Therefore, the buffer manager 114Monitors the relationship between the code amount generated by encoding and the usable encoding rate, and sets the target code amount in the
[0023]
Information corresponding to the difference of the actual generated code amount with respect to the target code amount is fed back to the
[0024]
As described above, when variable length data is transferred as fixed transfer rate data (fixed transfer rate encoded data), the maximum buffer amount on the video signal decoding device side that receives the data is This is the upper limit value of the generated code amount in the video signal encoding device. That is, the encoded data is input at a constant speed and stored at a predetermined value, and then a predetermined time (in the case of an NTSC video signal, which is one of the television standard broadcasting systems, 1 / 29.97 sec unit). In this case, a virtual decoder model that performs decoding in an instant is used, and encoding is performed on the encoding device side so that neither overflow nor underflow occurs in the virtual buffer memory (so-called VBV buffer) of the model. It is defined by MPEG. If this rule is observed, the rate in the VBV buffer changes locally, but if the observation time is long, it becomes a fixed transfer rate, and MPEG defines this as a fixed rate.
[0025]
Here, in the case of the fixed transfer rate defined as described above, when the generated code amount is small on the encoding device side, the buffer occupancy amount sticks to the upper limit value on the decoding device side. In this case, for example, the amount of code must be increased on the encoding device side so that an invalid bit is added and the buffer (VBV buffer) does not overflow.
[0026]
On the other hand, in the case of the variable transfer rate, the definition of this fixed transfer rate is expanded, and when the buffer occupancy reaches the upper limit value, reading in the decoding device is stopped, so that overflow does not occur in principle. Is defined as Therefore, in the case of the variable transfer rate, even if the amount of generated code is very small, reading of the decoding device is stopped, so there is no need to insert invalid bits as in the case of the fixed transfer rate. For this reason, in the case of a variable transfer rate, encoding is performed so that only underflow does not occur.
[0027]
Against the background of such a technique, in a conventional variable transfer rate encoding, a video signal is encoded by being divided into a first pass and a second pass, and information necessary for encoding the second pass in the first pass. Will be described.
[0028]
FIG. 9 shows a configuration for encoding the first pass of the conventional example. In FIG. 9, parts that operate in the same manner as the components of the basic configuration shown in FIG.
[0029]
In the first path configuration shown in FIG. 9, a video signal is reproduced and input to the
[0030]
This generated code amount is calculated by the
[0031]
The
[0032]
Since the first pass is used to monitor whether or not accurate compression has been performed, the
[0033]
By the way, in the encoding method represented by MPEG, since variable length encoding is performed, if the first pass encoding is performed with a fixed quantization width, the complexity of the encoded image and motion compensation are reduced. The generated code amount increases in accordance with the difference (residual component) amount.
[0034]
Therefore, if the generated code amount is distributed using this property, the image quality can be made substantially uniform. In the second pass encoding described later, the generated code amount must be controlled to the entire target code amount while maintaining the code amount distribution ratio.
[0035]
The generated code amount is detected in units of short sections generated in the first pass encoding, and the information is stored in the
The amount of generated code for each GOP unit is stored in the
[0036]
In the first pass encoding, it is common to generate a larger amount of code than the final code amount output in the second pass, generally with a small and fixed quantization width. Thus, the reason why the quantization width is reduced in the first pass encoding is that it is necessary to finely decompose the information up to the high frequency component of the image and detect the characteristics of the image.
[0037]
Here, it is assumed that the code amount generated in the i-th short interval in the first pass is PS1B (i). The ratio of the code amount PS1B (i) generated in each short section is substantially the same in the second pass, and the final target total code amount is set as the target code amount in each short section in the second pass. .
[0038]
For example, if the short interval is 1 GOP, the code can be controlled while maintaining a certain level of image quality by the following method.
[0039]
Next, FIG. 10 shows a configuration for performing the second pass encoding of the conventional example. In FIG. 10, parts that operate in the same manner as the components of the basic configuration shown in FIG. 8 are given the same reference numerals, and descriptions thereof are omitted.
[0040]
In the configuration of the second pass shown in FIG. 10, the quantization scale is decreased to increase the generated code amount, while the quantization scale is increased to decrease the generated code amount.
[0041]
A method for controlling the quantization width based on the occupation ratio of the
[0042]
In the following method example, the entire code amount control is realized while considering the code amount distribution for these pictures.
[0043]
First, the target code
PS2B (i) = final target total code amount × PS1B (i) / ΣPS1B (i)
[0044]
Here, when the target code amount PS2B (i) to be given to one GOP is R, the specific code amount control is performed by the
[0045]
(A) First step
In the first step, as shown in the following equation, the allocated code amount for each picture of the GOP is distributed with a certain weight assigned to the pictures that have not yet been encoded in the GOP.
Xi = Si × Qi
Xp = Sp × Qp
Xb = Sb × Qb
[0046]
Here, X is called a global complexity measure, which is defined by the product of the generated code amount S of the previous encoding result of the same picture type and the average quantization scale Q, i represents an I picture, p represents a P picture, and b represents a B picture. In addition, the quantization scale that achieves ideal image quality has a ratio of Kp = 1.0 with respect to the P picture when the I picture is the reference, and a ratio with the B picture when the I picture is also used as the reference. Assume that Kb = 1.4.
[0047]
At this time, the code amounts Ti, Tp, and Tb of each picture assigned in the first step are obtained by the following equations.
Ti = MAX {R / (1+ (NpXp / XiKp) + NbXb / XiKb)), br / (8 * pr)}
Tp = MAX {R / (Np + (NpKpXb / KbXp)), br / (8 * pr)}
Tb = MAX {R / (Nb + (NpKbXp / KbXp)), br / (8 * pr)}
[0048]
In each equation, Ti represents the code amount of the I picture, Tp represents the code amount of the P picture, Tb represents the code amount of the B picture, MAX is the maximum, and R is the initial value given to the GOP. Np represents the number of uncoded pictures of P pictures in the GOP, Nb represents the number of uncoded pictures of B pictures in the GOP, pr represents the picture rate, and br represents the bit rate.
[0049]
Here, the initial code amount R is updated as follows each time encoding progresses in the GOP.
R = R-Si, p, b
[0050]
(B) Second step
In the second step, the code amount (Ti, Tp, Tb) of each picture assigned in the first step is matched with the actual generated code amount, so that it is generated for each macroblock as shown in the following equations. While adding the code amount, the difference between the target code amount and the predicted target code amount halfway is fed back to the quantization scale in units of macroblocks.
dji = dOi + Bj-1− (Ti (j-1) / MB_cnt)
djp = dOp + Bj-1− (Tp (j-1) / MB_cnt)
djb = dOp + Bj-1− (Tb (j-1) / MB_cnt)
[0051]
In each equation, dOi is the initial occupation amount of the virtual buffer (VBV buffer) in the I picture, dOp is the initial occupation amount of the virtual buffer (VBV buffer) in the P picture, and dOb is the virtual buffer (VBV) in the B picture. Buffer), j is a number indicating the number of each picture counted from the top of each picture counted by the
[0052]
Further, the average quantization scale Q is obtained by the following equation.
Q = dj × 31 / r
R = 2 × br / pr
In the equation, Q is a quantization scale, and r is a parameter that determines the response speed of feedback.
[0053]
In the conventional configuration, it is possible to perform code amount control by performing each calculation as described above.
[0054]
As for MPEG, ISO-IEC 11172-2, ITU-T H.264, etc. Since detailed description is made in H.262 / ISO-IEC13818-2, further description is omitted here.
[0055]
[Problems to be solved by the invention]
Thus, in the conventional configuration, in order to realize variable transfer rate encoding, the above-described two-pass encoding must be passed.
[0056]
That is, as shown in FIGS. 9 and 10, the video signal to be encoded has to be input twice to the video signal encoding device. For this reason, variable transfer rate encoding cannot be performed on an image signal that is transmitted only once, such as a moving image signal transmitted in real time by broadcasting or communication.
[0057]
Also, for example, when editing encoded data, it must be re-encoded, or in order to make the encoded data compliant with MPEG, in addition to the part that is actually edited, There were problems that required a lot of work, such as having to partially correct the frame.
[0058]
The present invention has been made in view of the above-described problems. For example, it is possible to perform encoding at a variable transfer rate even for a moving image signal transmitted in real time by broadcasting or communication. Variable transfer rate encoding method and device that are easy to editSetFor the purpose of provision.
[0059]
[Means for Solving the Problems]
In order to solve the above problems, the present invention provides the following method and apparatus.
(1) A variable transfer rate encoding method for encoding a video signal using orthogonal transform and quantization and outputting the video signal at a variable transfer rate,
Encoding an incoming video signal using orthogonal transform and quantization;
Simultaneously with the encoding of the incoming video signal, the encoded encoded dataFor each image unitGenerated code amount andAverage per image unitQuantization width and detectedFor each image unitGenerated code amount andAverage per image unitGenerating encoded information having information on quantization width;
Recording the encoded encoded data at a fixed transfer rate and recording the encoded information;
Decoding the recorded encoded data;
Based on the recorded encoded information and the reproduction time of the encoded data and the target average variable transfer rate, or based on the encoded information and the target code amount,For each image unitSet a new target code amount,For each image unitA variable transfer rate encoding step for variable-length encoding the data obtained by decoding the encoded data so that the generated code amount becomes the new target code amount;
A variable transfer rate encoding method comprising:
(2) In the recording step, parameters related to motion compensation at the time of encoding in the encoding step are recorded,
In the variable transfer rate encoding step, when the data obtained by decoding the recorded encoded data is variable-length encoded, the recorded parameter for motion compensation is used as a parameter for motion compensation. The variable transfer rate encoding method according to (1) above.
(3) Provide a step for entering editing information,
In the step of generating the encoding information, the encoding information of only a necessary section based on the editing information is generated,
In the decoding step, the data of only the necessary section based on the editing information is decoded,
In the variable transfer rate encoding step, the encoding information of only the necessary section based on the editing information is used as the encoding information, and the data decoded only in the necessary section based on the editing information is encoded. The variable transfer rate encoding method according to (1) or (2) above, wherein the variable transfer rate encoding method is used.
(4) A variable transfer rate encoding device that encodes a video signal using orthogonal transform and quantization and outputs the video signal at a variable transfer rate,
An incoming video signal encoding means for encoding the incoming video signal using orthogonal transform and quantization;
Simultaneously with the encoding of the incoming video signal, the encoded encoded dataFor each image unitGenerated code amount andAverage per image unitQuantization width and detectedFor each image unitGenerated code amount andAverage per image unitEncoded information detecting means for generating encoded information having information on the quantization width;
Recording means for recording the encoded data at a fixed transfer rate and recording the encoded information;
Decoding means for decoding the recorded encoded data;
Based on the recorded encoded information and the reproduction time of the encoded data and the target average variable transfer rate, or based on the encoded information and the target code amount,For each image unitSet a new target code amount,For each image unitVariable transfer rate encoding means for variable-length encoding data obtained by decoding the encoded data so that the generated code amount becomes the new target code amount;
A variable transfer rate encoding device comprising:
(5) The incoming video signal encoding means outputs a parameter relating to motion compensation during encoding,
The recording means records parameters relating to the motion compensation;
The variable transfer rate encoding means uses the recorded parameter for motion compensation as a parameter for motion compensation when variable length encoding is performed on data obtained by decoding the recorded encoded data. The variable transfer rate encoding apparatus according to (4), characterized in that:
(6) Editing information input means for inputting editing information;
Detection control means for controlling the encoded information detection means based on the editing information;
A decoding control means for controlling the decoding means based on the editing information;
In the encoded information detection means, under the control of the detection control means, generate encoded information for only the necessary section based on the edit information,
In the decoding means, under the control of the decoding control means, the encoded data is decoded only in a necessary section based on the editing information,
In the variable transfer rate encoding means, encoded information of only a necessary section based on the editing information is used as the encoding information, and only a necessary section is decoded based on the editing information as data to be encoded. The variable transfer rate encoding device according to (4) or (5), wherein
[0060]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, a variable transfer rate encoding method and apparatus according to the present invention will be described.SetPreferred embodiments will be described in detail with reference to the drawings.
[0061]
FIG. 1 shows a variable transfer rate encoding method and apparatus according to the present invention.Reference exampleShows a basic configuration of a video signal encoding apparatus. In addition,Reference exampleNow, an example using MPEG1 encoding will be described as an example of a moving image signal encoding method.
[0062]
This smellAnd biThe input image signal input to the input terminal 1 of the video signal encoding device is a video signal composed of a luminance signal and a color difference signal, and after being digitized, the images are rearranged according to the picture type. It is what. The input image signal is recorded in the
[0063]
The input image signal supplied to the input terminal 1 is sent to the
[0064]
The motion compensated
[0065]
The
[0066]
The DCT coefficient from the
[0067]
The encoded data obtained by the variable length encoding in the
[0068]
In addition, the
An encoding control signal that coarsens the quantization when the degree of fullness of the
That is, the encoding control signal fed back to the quantizer 4 is a control signal for controlling the quantization width.
[0069]
here,In the apparatus shown in FIG.However, as described above, the input image signal is encoded at a fixed transfer rate defined by MPEG. The encoding rate depends on the capacity of the recording medium and the reproduction time of the input image signal to be recorded. However, it is desirable that the encoding rate be as high as possible within the conditions. In other words, better image quality is desirable. This is because the encoding rate becomes equal to the maximum transfer rate under the condition that is encoded in the variable transfer rate encoded data conversion described later.
[0070]
For this reason,Device shown in FIG.Then, the encoded data output from the
[0071]
On the other hand, since the I picture and P picture need to be used later as reference images for motion compensation prediction, the quantized data of the I picture and P picture output from the quantizer 4 is transmitted to the inverse quantizer 8 and the subsequent ones. Is also sent.
[0072]
That is, the DCT coefficient data obtained by the inverse quantization in the inverse quantizer 8 is sent to the
[0073]
The restored image signal is temporarily stored in the
[0074]
The image signal stored in the
[0075]
next,As shown in FIG.In the video signal encoding apparatus, the encoded data recorded in the
[0076]
Here, compressed data by MPEG encoding is determined so that a 4-byte picture start code is attached to the head of a picture. This picture start code is a byte-aligned unique code that can be distinguished from other data such as “0 × 00000100”.
[0077]
Further, although the generated code amount depends on the encoding rate, it corresponds to 15 Mbps, has a maximum of about 1.75 Mbits, and needs only about 1000 bits of accuracy.
Accordingly, the
[0078]
Further, as the quantization width information, it is ideal to obtain the sum or average value of quantization widths determined for each block of 16 pixels × 16 pixels called a macroblock, but the so-called NTSC broadcast system 720 × 480 is used. In the case of a picture of pixels, the average of 1350 macroblocks must be taken. In this case, the compressed data is transferred to the relatively deep part of the MPEG layer, which is originally a macroblock layer.CAlthough it is necessary to perform (modulation decoding), the slice quantization width at the head of the slice layer for one column of the macroblock can be used as the quantization width information in order to increase the speed. There are 30 slice quantization widths (480/16) in the case of a picture of 720 × 480 pixels in the NTSC broadcasting system, and the slice start code “0 × 00000101” which is a unique code as with the picture start code. It is possible to detect between “0 × 0000011E”. In addition,
The slice quantization width is indicated by 5 bits immediately after the slice start code.
[0079]
Encoding informationdetectionIn the
[0080]
In the configuration of FIG. 1, after encodingMarksGenerated code amount and quantization width information from encoded datadetectionAs an example, the generated code amount and quantization width information are simultaneously obtained with the encoding in the VLC unit 5.detectionYou may make it do.
[0081]
Simultaneously with the encoding by the
[0082]
Encoding information having the configuration shown in FIG.detectionIn the
[0083]
In the configuration of FIG. 1 and FIG. 3 described above, generated code amount information and quantization width information recorded in the
[0084]
That is, the basic configuration of FIGS. 1 and 3 is recorded in the
[0085]
FIG. 4 shows the generated code amount information and quantization width information recorded in the storage circuit 22., MarksUsing encoded data, etc.The markConvert encoded data to variable transfer rate encoded data(Re-encoding)More specifically, the configuration of the first specific example to be performed, that is, the
[0086]
In FIG. 4, it is read from the memory circuit 22TickThe encoded data is decoded by the decoder 40., RecoveryIt is sent to the variable
[0087]
This variable
[0088]
In the motion compensated
[0089]
The
[0090]
The DCT coefficient from the
[0091]
The encoded data obtained by the variable length encoding in the
[0092]
On the other hand, since the I picture and P picture need to be used later as a reference image for motion compensation prediction, the quantized data of the I picture and P picture output from the
[0093]
That is, the DCT coefficient data of the I picture and P picture obtained by the inverse quantization by the
[0094]
The restored image signal is temporarily stored in the
[0095]
The image signal stored in the
[0096]
The
[0097]
The code
[0098]
On the other hand, the encoded information including the generated code amount information and quantization width information read from the
[0099]
The target code
[0100]
Here, an example of the algorithm for determining the coding amount in the target code
[0101]
For example, as described above, encoded
EN (i) = BIT (i)0.8× Q (i)
TG (i) = TB × EN (i) / ΣEN (i)
[0102]
Given to each picture of variable transfer rate encoded data obtained by this formulaEyesThe target code amount (picture target code amount information) TG (i) is sent to the code
[0103]
In the code amount control circuit 27, the picture target code amount TG (i) obtained as described above,
The code amount is controlled by controlling the quantization scale in the
[0104]
According to the video signal encoding apparatus of the present embodiment, the above processing is performed.TickConvert encoded data to variable transfer rate encoded data(Re-encoding)Making it possible.
[0105]
1 and 3, the configuration shown in FIG. 5 is used instead of the configuration shown in FIG., MarksConvert encoded data to variable transfer rate encoded data(Re-encoding)It is also possible to do.
[0106]
Ie,FIG. 5 shows generated code amount information and quantization width information recorded in the storage circuit 22., MarksUsing encoded data, etc.The markConvert encoded data to variable transfer rate encoded data(Re-encoding)The structure of the 2nd specific example for doing is shown. In FIG. 5, parts that operate in the same manner as the components shown in FIG. 4 are given the same reference numerals, and descriptions thereof are omitted.
[0107]
In the configuration of FIG. 5, it is recorded in the
[0108]
The difference between the configuration of FIG. 5 and the configuration of FIG. 4 is that the parameters related to motion compensation read from the
[0109]
Here, specific examples of the parameters relating to motion compensation recorded in the
[0110]
By doing so, it is recorded in the memory circuit 22.MarkEven if the encoded data has some degree of encoding degradation, for example,MarksWhen the motion compensated
[0111]
Further, in the configuration shown in FIGS. 1 and 3, the configuration shown in FIG. 7 is used instead of the configuration shown in FIGS., MarksConvert encoded data to variable transfer rate encoded data(Re-encoding)It is also possible to do.
[0112]
Ie,FIG. 7 shows the generated code amount information and quantization width information recorded in the storage circuit 22., MarksUsing encoded data, etc.The markConvert encoded data to variable transfer rate encoded data(Re-encoding)The structure of the 3rd specific example for doing is shown. In FIG. 7, parts that operate in the same manner as the components shown in FIG. 4 and FIG.
[0113]
That is, in the configuration of FIG. 7, FIG.MarksObtained by encodingTickFor example, when the encoded data is subjected to an editing process, the variable
[0114]
More specifically, in FIG. 7, edit information generated by combining the edit start point and the edit end point is input from the edit
[0115]
The
[0116]
In the case of the configuration of FIG. 7, the editing information from the editing
Therefore, the generated code amount information and quantization width information of each picture for only the time portion of the image for which editing is to be enabled are recorded as encoded information in the
[0117]
Further, in the target code
[0118]
For this reason, the variable
[0119]
In such an editing process, for example, when the editing point is an image portion of a P picture, the image needs to be encoded as an I picture. In addition, when the edit point is an image portion of a B picture, the motion compensation information before and after the edit point needs to be invalidated. Therefore, in such a case, processing such as encoding the related picture as an I picture is necessary.
[0120]
According to the video signal encoding apparatus of the present embodiment to which the variable transfer rate encoding method and apparatus of the present invention is applied, the configuration as described above is used.TickConvert encoded data to variable transfer rate encoded data(Re-encoding)It is possible to do.
[0121]
Also,BookThe variable transfer rate encoded data generated as described above by the video signal encoding apparatus of the embodimentOn a recording medium (not shown)RecordDoAs a result, the capacity of the recording medium is effectively utilized, and even when the variable transfer rate encoded data is decoded later, good decoded data can be obtained.
[0122]
The present invention is not limited to the above-described embodiment, and various modifications can be made according to the design and the like as long as the technical idea of the present invention is not deviated from. The encoding method is not limited to MPEG1 described above.
[0123]
【The invention's effect】
As described above, according to the variable transfer rate encoding method and apparatus of the present invention, it is not necessary to input the same image to the encoding apparatus twice as in the conventional variable transfer rate encoding apparatus. That is, as a moving image signal to be encoded, an image signal that is transmitted only once, such as a moving image signal transmitted in real time from broadcasting or communication, can be used at a high rate.With a markAnd then temporarily record the data on a writable disc or tape media.
Thereafter, the data is used to perform variable transfer rate encoding with high image quality, and finally necessary variable transfer rate encoded data can be generated and recorded, for example.
Also, record temporarilyTickPerforms variable transfer rate encoding using parameters for motion compensation of encoded dataIf you doWhen obtaining a motion vector, it is not disturbed by encoding degradation noise.
In addition, record temporarilyTickPerforms variable transfer rate encoding using the editing information of the encoded data such as the part to be cut.If you doThus, variable transfer rate encoding reflecting the editing information can be performed.
[Brief description of the drawings]
FIG. 1 shows a variable transfer rate encoding method and apparatus according to the present invention.As a reference exampleFIG. 3 is a block diagram illustrating a schematic configuration when encoded data is detected by an encoding information detector and converted into variable transfer rate encoded data (re-encoding) in the video signal encoding apparatus.
FIG. 2 is a diagram illustrating a format of encoded information (picture information) recorded in a storage circuit of the video signal encoding apparatus according to the present embodiment.
FIG. 3 is a video signal encoding device according to the present embodiment.detectionIn a vesseldetectionShiTickConvert encoded data to variable-length encoded data(Re-encoding)It is a block diagram which shows the example of schematic structure in the case of doing.
FIG. 4 shows generated code amount information and quantization width information recorded in a storage circuit in the video signal encoding apparatus of the present embodiment., MarksUsing encoded data, etc.The markConvert encoded data to variable transfer rate encoded data(Re-encoding)It is a block diagram which shows the structure of the 1st specific example for doing.
FIG. 5 shows generated code amount information and quantization width information recorded in a storage circuit in the video signal encoding apparatus of the present embodiment., MarksUsing encoded data, etc.The markConvert encoded data to variable transfer rate encoded data(Re-encoding)It is a block diagram which shows the structure of the 2nd specific example for doing.
FIG. 6 is a diagram illustrating a format of encoded information (macroblock information) recorded in a storage circuit of the video signal encoding apparatus according to the present embodiment.
FIG. 7 shows generated code amount information and quantization width information recorded in a storage circuit in the video signal encoding apparatus according to the present embodiment., MarksUsing encoded data, etc.The markConvert encoded data to variable transfer rate encoded data(Re-encoding)It is a block diagram which shows the structure of the 3rd specific example for doing.
FIG. 8 is a block diagram showing a basic configuration of a conventional video signal encoding device.
[Fig. 9] Fig. 9 is a block diagram illustrating a configuration in the case where the first pass encoding is performed in the conventional video signal encoding device.
FIG. 10 is a block diagram showing a configuration when performing a second pass encoding in a video signal encoding device of a conventional example.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Input terminal, 2,52 ... Operation unit, 3,53 ... DCT device, 4,54 ... Quantizer,
5, 55 ... VLC unit, 6, 56 ... Buffer memory, 7, 57 ... Output terminal,
8, 58 ... inverse quantizer, 9, 59 ... inverse DCT, 10, 60 ... image memory,
11, 61 ... motion compensation predictor, 12, 62 ... arithmetic unit, 62 ... code amount counter,
63 ... Code amount control circuit, 22 ... Memory circuit, 24 ... Encoding informationdetectionDevice, 25 ... CPU,
26 ... target code amount determination circuit, 40 ... decoder, 41 ... editing information input device,
42 ... Decoding controller, 43 ...detectionController, 50... Variable transfer rate encoder.
Claims (6)
入来するビデオ信号を直交変換と量子化を使用して符号化するステップと、
前記入来するビデオ信号の符号化と同時に、その符号化された符号化データの1画像単位毎の発生符号量と1画像単位毎の平均量子化幅とを検出し、検出した1画像単位毎の発生符号量と1画像単位毎の平均量子化幅との情報を有する符号化情報を生成するステップと、
前記符号化された符号化データを固定転送レートで記録すると共に、前記符号化情報を記録するステップと、
前記記録された符号化データを復号するステップと、
前記記録された符号化情報と前記符号化データの再生時間と目標とする平均可変転送レートとをもとに、もしくは前記符号化情報と目標符号量とをもとに、1画像単位毎の新たな目標符号量を設定し、1画像単位毎の発生符号量がその新たな目標符号量となるように、前記符号化データを復号したデータを可変長符号化する可変転送レート符号化ステップと、
を有することを特徴とする可変転送レート符号化方法。A variable transfer rate encoding method that encodes a video signal using orthogonal transform and quantization and outputs the video signal at a variable transfer rate,
Encoding an incoming video signal using orthogonal transform and quantization;
Simultaneously with the encoding of the incoming video signal, a generated code amount for each image unit and an average quantization width for each image unit of the encoded data are detected, and each detected image unit is detected. the method comprising the generated code amount and generate encoded information having information and the average quantization scale of each image unit,
Recording the encoded encoded data at a fixed transfer rate and recording the encoded information;
Decoding the recorded encoded data;
Based on the recorded encoded information, the reproduction time of the encoded data, and the target average variable transfer rate, or based on the encoded information and the target code amount, a new one for each image unit A variable transfer rate encoding step for variable-length encoding the data obtained by decoding the encoded data so that the generated code amount for each image unit becomes the new target code amount;
A variable transfer rate encoding method comprising:
前記可変転送レート符号化ステップにおいて、前記記録された符号化データを復号したデータを可変長符号化する際に、動き補償に関するパラメータとして、前記記録された動き補償に関するパラメータを使用することを特徴とする請求項1記載の可変転送レート符号化方法。In the recording step, parameters relating to motion compensation at the time of encoding in the encoding step are recorded,
In the variable transfer rate encoding step, when the data obtained by decoding the recorded encoded data is variable-length encoded, the recorded parameter for motion compensation is used as a parameter for motion compensation. The variable transfer rate encoding method according to claim 1.
前記符号化情報を生成するステップでは、編集情報に基づく必要な区間のみの符号化情報を生成し、
前記復号するステップでは、編集情報に基づく必要な区間のみのデータを復号し、
前記可変転送レート符号化ステップでは、前記符号化情報として編集情報に基づく必要な区間のみの符号化情報を使用すると共に、符号化するデータとして前記編集情報に基づき必要な区間のみ復号されたデータを使用することを特徴とする請求項1または請求項2に記載の可変転送レート符号化方法。Provide a step for entering editing information,
In the step of generating the encoding information, the encoding information of only a necessary section based on the editing information is generated,
In the decoding step, the data of only the necessary section based on the editing information is decoded,
In the variable transfer rate encoding step, encoding information of only a necessary section based on editing information is used as the encoding information, and data decoded only in a necessary section based on the editing information is encoded. 3. The variable transfer rate encoding method according to claim 1, wherein the variable transfer rate encoding method is used.
入来するビデオ信号を直交変換と量子化を使用して符号化する入来ビデオ信号符号化手段と、
前記入来するビデオ信号の符号化と同時に、その符号化された符号化データの1画像単位毎の発生符号量と1画像単位毎の平均量子化幅とを検出し、検出した1画像単位毎の発生符号量と1画像単位毎の平均量子化幅との情報を有する符号化情報を生成する符号化情報検出手段と、
前記符号化された符号化データを固定転送レートで記録すると共に、前記符号化情報を記録する記録手段と、
前記記録された符号化データを復号する復号手段と、
前記記録された符号化情報と前記符号化データの再生時間と目標とする平均可変転送レートとをもとに、もしくは前記符号化情報と目標符号量とをもとに、1画像単位毎の新たな目標符号量を設定し、1画像単位毎の発生符号量がその新たな目標符号量となるように、前記符号化データを復号したデータを可変長符号化する可変転送レート符号化手段と、
を有することを特徴とする可変転送レート符号化装置。A variable transfer rate encoding device that encodes a video signal using orthogonal transform and quantization and outputs the video signal at a variable transfer rate,
An incoming video signal encoding means for encoding the incoming video signal using orthogonal transform and quantization;
Simultaneously with the encoding of the incoming video signal, a generated code amount for each image unit and an average quantization width for each image unit of the encoded data are detected, and each detected image unit is detected. Encoding information detecting means for generating encoded information having information on the generated code amount and the average quantization width for each image unit ;
Recording means for recording the encoded data at a fixed transfer rate and recording the encoded information;
Decoding means for decoding the recorded encoded data;
Based on the recorded encoded information, the reproduction time of the encoded data, and the target average variable transfer rate, or based on the encoded information and the target code amount, a new one for each image unit Variable transfer rate encoding means for variable-length encoding the data obtained by decoding the encoded data so that the generated code amount for each image unit becomes the new target code amount.
A variable transfer rate encoding device comprising:
前記記録手段はその動き補償に関するパラメータを記録するものであり、
前記可変転送レート符号化手段は、前記記録された符号化データを復号したデータを可変長符号化する際に、動き補償に関するパラメータとして、前記記録された動き補償に関するパラメータを使用するものであることを特徴とする請求項4記載の可変転送レート符号化装置。The incoming video signal encoding means outputs a parameter relating to motion compensation during encoding,
The recording means records parameters relating to the motion compensation;
The variable transfer rate encoding means uses the recorded parameter for motion compensation as a parameter for motion compensation when variable length encoding is performed on data obtained by decoding the recorded encoded data. The variable transfer rate encoding apparatus according to claim 4.
その編集情報に基づいて前記符号化情報検出手段を制御する検出制御手段と、
前記編集情報に基づいて前記復号手段を制御する復号化制御手段とを設け、
前記符号化情報検出手段では、前記検出制御手段の制御により、前記編集情報に基づく必要な区間のみの符号化情報を生成し、
前記復号手段では、前記復号化制御手段の制御により、前記編集情報に基づく必要な区間のみ符号化データを復号し、
前記可変転送レート符号化手段では、前記符号化情報として前記編集情報に基づく必要な区間のみの符号化情報を使用すると共に、符号化するデータとして前記編集情報に基づき必要な区間のみ復号されたデータを使用することを特徴とする請求項4または請求項5に記載の可変転送レート符号化装置。Editing information input means for inputting editing information;
Detection control means for controlling the encoded information detection means based on the editing information;
A decoding control means for controlling the decoding means based on the editing information;
In the encoded information detection means, under the control of the detection control means, generate encoded information for only the necessary section based on the edit information,
In the decoding means, under the control of the decoding control means, the encoded data is decoded only in a necessary section based on the editing information,
In the variable transfer rate encoding means, encoded information of only a necessary section based on the editing information is used as the encoding information, and only a necessary section is decoded based on the editing information as data to be encoded. 6. The variable transfer rate encoding device according to claim 4 or 5, wherein:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP03637698A JP3934772B2 (en) | 1998-02-18 | 1998-02-18 | Variable transfer rate encoding method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP03637698A JP3934772B2 (en) | 1998-02-18 | 1998-02-18 | Variable transfer rate encoding method and apparatus |
Related Child Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003399157A Division JP2004140854A (en) | 2003-11-28 | 2003-11-28 | Variable transfer rate encoding method and apparatus |
JP2003399158A Division JP3922581B2 (en) | 2003-11-28 | 2003-11-28 | Variable transfer rate encoding method and apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH11234676A JPH11234676A (en) | 1999-08-27 |
JP3934772B2 true JP3934772B2 (en) | 2007-06-20 |
Family
ID=12468139
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP03637698A Expired - Lifetime JP3934772B2 (en) | 1998-02-18 | 1998-02-18 | Variable transfer rate encoding method and apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3934772B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5267542B2 (en) * | 2010-11-12 | 2013-08-21 | 株式会社日立製作所 | Encoded video signal conversion method and apparatus |
JP5412588B2 (en) * | 2013-01-30 | 2014-02-12 | 株式会社メガチップス | Transcoder |
-
1998
- 1998-02-18 JP JP03637698A patent/JP3934772B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JPH11234676A (en) | 1999-08-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5963673A (en) | Method and apparatus for adaptively selecting a coding mode for video encoding | |
US7822118B2 (en) | Method and apparatus for control of rate-distortion tradeoff by mode selection in video encoders | |
US7095784B2 (en) | Method and apparatus for moving picture compression rate control using bit allocation with initial quantization step size estimation at picture level | |
JP2000278692A (en) | Compressed data processing method, processor and recording and reproducing system | |
US7373004B2 (en) | Apparatus for constant quality rate control in video compression and target bit allocator thereof | |
JPH09322176A (en) | Encoding mode selecting method, moving image encoding device, encoding method, recording method and transmitting method | |
JPH0998427A (en) | Dynamic image encoding device | |
US20030174771A1 (en) | Method, apparatus, and program for variable bit rate encoding | |
JP4081727B2 (en) | Image encoding apparatus, image encoding method, recording apparatus, and recording method | |
US7133448B2 (en) | Method and apparatus for rate control in moving picture video compression | |
JP2000312362A (en) | Image encoding system conversion device and its method and recording medium | |
JP3934772B2 (en) | Variable transfer rate encoding method and apparatus | |
JPH05183872A (en) | Device and method for moving picture encoding | |
JP3922581B2 (en) | Variable transfer rate encoding method and apparatus | |
JP3800965B2 (en) | Data rate converter | |
JPH10108197A (en) | Image coder, image coding control method, and medium storing image coding control program | |
JP2001148852A (en) | Image information converter and image information conversion method | |
JP2900927B2 (en) | Encoding method and encoding device | |
JPH0951538A (en) | Encoding method for image signal | |
JP3307367B2 (en) | Variable transfer rate coding device | |
WO2005036886A1 (en) | Two-pass video encoding | |
JP4359273B2 (en) | Coding mode selection method | |
JP3765129B2 (en) | Encoding apparatus and encoding method | |
JP2002218470A (en) | Method for converting image encoded data rate and device for converting image encoding rate | |
JP2004140854A (en) | Variable transfer rate encoding method and apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20010328 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20031007 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20031128 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20040106 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20051014 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060605 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070316 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110330 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120330 Year of fee payment: 5 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120330 Year of fee payment: 5 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120330 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130330 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140330 Year of fee payment: 7 |
|
EXPY | Cancellation because of completion of term |