JP3879134B2 - Encoding apparatus and method thereof - Google Patents
Encoding apparatus and method thereof Download PDFInfo
- Publication number
- JP3879134B2 JP3879134B2 JP06332796A JP6332796A JP3879134B2 JP 3879134 B2 JP3879134 B2 JP 3879134B2 JP 06332796 A JP06332796 A JP 06332796A JP 6332796 A JP6332796 A JP 6332796A JP 3879134 B2 JP3879134 B2 JP 3879134B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- difficulty
- encoding
- video data
- picture
- 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
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Television Signal Processing For Recording (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、非圧縮映像データを圧縮符号化する符号化装置およびその方法に関する。
【0002】
【従来の技術および発明が解決しようとする課題】
非圧縮のディジタル映像データをMPEG(moving picture experts group)等の方法により圧縮符号化して光磁気ディスク(MOディスク;magneto-oprical disc)等の記録媒体に記録する際には、圧縮符号化後の圧縮映像データのデータ量(ビット量)を、伸長復号後の映像の品質を可能な限り高くしつつ、記録媒体の記録容量以下にする必要がある。
この必要を満たすために、まず、非圧縮映像データを予備的に圧縮符号化して圧縮符号化後のデータ量を見積もり(1パス目)、次に、見積もったデータ量に基づいて圧縮率を調節し、圧縮符号化後のデータ量が記録媒体の記録容量以下になるように圧縮符号化する(2パス目)方法が採られる(以下、このような圧縮符号化方法を「2パスエンコード」とも記す)。
【0003】
しかしながら、2パスエンコードにより圧縮符号化を行うと、同じ非圧縮映像データに対して同様な圧縮符号化処理を2回施す必要があり、時間がかかってしまう。また、1回の圧縮符号化処理で最終的な圧縮映像データを生成することができないために、撮影した映像データをそのまま実時間的(リアルタイム)に圧縮符号化し、記録することができない。
【0004】
本発明は上述した従来技術の問題点に鑑みてなされたものであり、2パスエンコードによらずに所定のデータ量以下に圧縮符号化した圧縮映像データを伸長復号した場合に、高品質な映像を得ることができる映像データ圧縮装置およびその方法を提供することを目的とする。
【0005】
また、本発明は、2パスエンコードによらずに、圧縮符号化後の圧縮映像データのデータ量を見積もり、見積もった圧縮映像データのデータ量に基づいて圧縮率を調節して非圧縮映像データを圧縮符号化することができる符号化装置およびその方法を提供することを目的とする。
また、本発明は、2パスエンコードによらずに、高精度に圧縮符号化後の圧縮映像データのデータ量を見積もりながら、非圧縮映像データを圧縮符号化することができる符号化装置およびその方法を提供することを目的とする。
【0006】
【課題を解決するための手段】
上記目的を達成するために、本発明の符号化装置は、映像データの絵柄の難度を示す難度データを用いて前記映像データを符号化処理する符号化装置であって、前記映像データを符号化処理する符号化手段と、前記映像データに対して、前記映像データの第1の符号化区間を符号化処理し、符号化処理後のデータ量を実難度データとして算出する実難度データ算出手段と、前記実難度データ算出手段により算出された前記実難度データから、前記映像データの第2の符号化区間の実難度データを近似した近似難度データを、予測難度データとして算出する予測難度データ算出手段と、前記実難度データ算出手段により算出された前記実難度データ及び前記予測難度データ算出手段により算出された前記予測難度データに基づいて、前記映像データの符号化対象ピクチャに対する目標符号量を算出する目標符号量算出手段と、前記目標符号量算出手段により算出された前記目標符号量となるように、前記符号化対象ピクチャを符号化処理するように、前記符号化手段の符号化処理を制御する符号化制御手段とを有する。
【0007】
好適には、前記実難度データ算出手段は、ピクチャ単位で前記実難度データを算出し、前記予測難度データ算出手段は、ピクチャ単位で前記予測難度データを算出し、前記目標符号量算出手段は、ピクチャ単位で前記目標符号量を算出する。
【0009】
好適には、前記符号化装置は、前記映像データをLピクチャ分(Lは正の整数)遅延させる遅延手段を更に有し、前記実難度データ算出手段は、A,B,jを正の整数、符号化対象ピクチャを前記映像データの第(j)番目のピクチャとした場合に、前記映像データの第(j−A)番目のピクチャ〜第(j+L−1)番目のピクチャを前記第1の符号化区間として前記実難度データを算出し、前記予測難度算出手段は、前記映像データの第(j+L)番目のピクチャ〜第(j+L+B)番目のピクチャを前記第2の符号化区間として前記予測難度データを算出する。
【0010】
好適には、前記予測難度データ算出手段は、前記実難度データ及び所定の関数を用いて近似することにより、前記予測難度データを算出する。
【0011】
好適には、前記所定の関数は、直線で表される1次関数であり、前記予測難度データ算出手段は、前記1次関数を用いた直線予測を行うことにより前記予測難度データを算出する。
【0012】
好適には、前記予測難度データ算出手段は、前記第1の符号化区間における前記実難度データの平均値である平均実難度データを算出し、前記直線と前記実難度データとの2乗誤差に基づいて、算出された前記平均実難度データに対する前記実難度データの誤差を示す誤差関数を算出し、算出された前記誤差関数を最小にする前記一次関数を用いて前記予測難度データを算出する。
【0013】
好適には、前記予測難度データ算出手段は、前記第1の符号化区間における前記実難度データの平均値である平均実難度データを算出し、前記直線と前記実難度データとの差の絶対値に基づいて、算出された前記平均実難度データに対する前記実難度データの誤差を示す誤差関数を算出し、算出された前記誤差関数を最小にする前記一次関数を用いて前記予測難度データを算出する。
【0014】
前記予測難度データ算出手段は、前記符号化対象ピクチャに近いピクチャの前記実難度データほど前記誤差関数に大きな影響を与える重み付け係数を算出し、算出した前記重み付け係数を用いて重み付け直線予測を行うことにより前記予測難度データを算出する。
【0015】
好適には、前記予測難度データ算出手段は、符号化処理順序で隣接する前記実難度データの差分値を算出し、算出した前記差分値を用いて前記1次関数を積分した 2 次関数上の値として前記予測難度データを近似する差分予測を行うことにより、前記予測難度データを算出する。
【0016】
前記予測難度データ算出手段は、前記映像データのGOPに含まれるピクチャのピクチャタイプ毎の実難度データの値の比率を算出し、算出した前記比率で前記実難度データを正規化して予測することにより、前記映像データのGOPに含まれる各ピクチャの仮の予測難度データを算出し、算出した前記仮の予測難度に前記比率を乗算することにより、前記予測難度データを算出する。
【0017】
本発明の符号化方法は、映像データの絵柄の難度を示す難度データを用いて前記映像データを符号化処理する符号化方法であって、前記映像データに対して、前記映像データの第1の符号化区間を符号化処理し、符号化処理後のデータ量を実難度データとして算出する実難度データ算出工程と、前記実難度データ算出工程により算出された前記実難度データから、前記映像データの第2の符号化区間の実難度データを近似した近似難度データを、予測難度データとして算出する予測難度データ算出工程と、前記実難度データ算出工程により算出された前記実難度データ及び前記予測難度データ算出工程により算出された前記予測難度データに基づいて、前記映像データの符号化対象ピクチャに対する目標符号量を算出する目標符号量算出工程と、前記目標符号量算出工程により算出された前記目標符号量となるように、前記符号化対象ピクチャを符号化処理する符号化工程とを有する。
【0020】
【発明の実施の形態】
第1実施形態
以下、本発明の第1の実施形態を説明する。
MPEG方式といった映像データの圧縮符号化方式により、高い周波数成分が多い絵柄、あるいは、動きが多い絵柄といった難度(difficulty)が高い映像データを圧縮符号化すると、一般的に圧縮に伴う歪みが生じやすくなる。このため、難度が高い映像データは低い圧縮率で圧縮符号化する必要があり、難度が高いデータを圧縮符号化して得られる圧縮映像データに対しては、難度が低い絵柄の映像データの圧縮映像データに比べて、多くの目標データ量を配分する必要がある。
【0021】
このように、映像データの難度に対して適応的に目標データ量を配分するためには、従来技術として示した2パスエンコード方式が有効である。しかしながら、2パスエンコード方式は、実時間的な圧縮符号化に不向きである。
第1の実施形態として示す簡易2パスエンコード方式は、かかる2パスエンコード方式の問題点を解決するためになされたものであり、非圧縮映像データを予備的に圧縮符号化して得られる圧縮映像データの難度データから非圧縮映像データの難度を算出し、予備的な圧縮符号化により算出した難度に基づいて、FIFOメモリ等により所定の時間だけ遅延した非圧縮映像データの圧縮率を適応的に制御することができる。
【0022】
図1は、本発明に係る映像データ圧縮装置1の構成を示す図である。
図1に示すように、映像データ圧縮装置1は、圧縮符号化部10およびホストコンピュータ20から構成され、圧縮符号化部10は、エンコーダ制御部12、動き検出器(motion estimator)14、簡易2パス処理部16、第2のエンコーダ(encoder) 18から構成され、簡易2パス処理部16は、FIFOメモリ160および第1のエンコーダ162から構成される。
映像データ圧縮装置1は、これらの構成部分により、編集装置およびビデオテープレコーダ装置等の外部機器(図示せず)から入力される非圧縮映像データVINに対して、上述した簡易2パスエンコードを実現する。
【0023】
映像データ圧縮装置1において、ホストコンピュータ20は、映像データ圧縮装置1の各構成部分の動作を制御する。また、ホストコンピュータ20は、簡易2パス処理部16のエンコーダ162が非圧縮映像データVINを予備的に圧縮符号化して生成した圧縮映像データのデータ量、DCT処理後の映像データの直流成分(DC成分)の値および直流成分(AC成分)の電力値を制御信号C16を介して受け、受けたこれらの値に基づいて圧縮映像データの絵柄の難度を算出する。さらに、ホストコンピュータ20は、算出した難度に基づいて、エンコーダ18が生成する圧縮映像データの目標データ量Tj を制御信号C18を介してピクチャーごとに割り当て、エンコーダ18の量子化回路166(図3)に設定し、エンコーダ18の圧縮率をピクチャー単位に適応的に制御する。
【0024】
エンコーダ制御部12は、非圧縮映像データVINのピクチャーの有無をホストコンピュータ20に通知し、さらに、非圧縮映像データVINのピクチャーごとに圧縮符号化のための前処理を行う。つまり、エンコーダ制御部12は、入力された非圧縮映像データを符号化順に並べ替え、ピクチャー・フィールド変換を行い、非圧縮映像データVINが映画の映像データである場合に3:2プルダウン処理(映画の24フレーム/秒の映像データを、30フレーム/秒の映像データに変換し、冗長性を圧縮符号化前に取り除く処理)等を行い、映像データS12として簡易2パス処理部16のFIFOメモリ160およびエンコーダ162に対して出力する。
動き検出器14は、非圧縮映像データの動きベクトルの検出を行し、エンコーダ制御部12およびエンコーダ162,18に対して出力する。
【0025】
簡易2パス処理部16において、FIFOメモリ160は、エンコーダ制御部12から入力された映像データS12を、例えば、非圧縮映像データVINが、L(Lは整数)ピクチャー入力される時間だけ遅延し、遅延映像データS16としてエンコーダ18に対して出力する。
【0026】
図2は、図1に示した簡易2パス処理部16のエンコーダ162の構成を示す図である。
エンコーダ162は、例えば、図2に示すように、加算回路164、DCT回路166、量子化回路(Q)168、可変長符号化回路(VLC)170、逆量子化回路(IQ)172、逆DCT(IDCT)回路174、加算回路176および動き補償回路178から構成される一般的な映像データ用圧縮符号化器であって、入力される映像データS12をMPEG方式等により圧縮符号化し、圧縮映像データのピクチャーごとのデータ量等を映像エンコーダ20に対して出力する。
【0027】
加算回路164は、加算回路176の出力データを映像データS12から減算し、DCT回路166に対して出力する。
DCT回路166は、加算回路164から入力される映像データを、例えば、16画素×16画素のマクロブロック単位に離散コサイン変換(DCT)処理し、時間領域のデータから周波数領域のデータに変換して量子化回路168に対して出力する。また、DCT回路166は、DCT後の映像データのDC成分の値およびAC成分の電力値を映像エンコーダ20に対して出力する。
【0028】
量子化回路168は、DCT回路166から入力された周波数領域のデータを、固定の量子化値Qで量子化し、量子化データとして可変長符号化回路170および逆量子化回路172に対して出力する。
可変長符号化回路170は、量子化回路168から入力された量子化データを可変長符号化し、可変長符号化の結果として得られた圧縮映像データのデータ量を、制御信号C16を介してホストコンピュータ20に対して出力する。
逆量子化回路172は、可変長符号化回路168から入力された量子化データを逆量子化し、逆量子化データとして逆DCT回路174に対して出力する。
【0029】
逆DCT回路174は、逆量子化回路172から入力される逆量子化データに対して逆DCT処理を行い、加算回路176に対して出力する。
加算回路176は、動き補償回路178の出力データおよび逆DCT回路174の出力データを加算し、加算回路164および動き補償回路178に対して出力する。
動き補償回路178は、加算回路176の出力データに対して、動き検出器14から入力される動きベクトルに基づいて動き補償処理を行い、加算回路176に対して出力する。
【0030】
図3は、図1に示したエンコーダ18の構成を示す図である。
図3に示すように、エンコーダ18は、図2に示したエンコーダ162に、量子化制御回路180を加えた構成になっている。エンコーダ18は、これらの構成部分により、映像エンコーダ20から設定される目標データ量Tj に基づいて、FIFOメモリ160によりLピクチャー分遅延された遅延映像データS16に対して動き補償処理、DCT処理、量子化処理および可変長符号化処理を施して、MPEG方式等の圧縮映像データVOUTを生成し、外部機器(図示せず)に出力する。
【0031】
エンコーダ18において、量子化制御回路180は、可変長量子化回路170が出力する圧縮映像データVOUTのデータ量を順次、監視し、遅延映像データS16の第j番目のピクチャーから最終的に生成される圧縮映像データのデータ量が、映像エンコーダ20から設定された目標データ量Tj に近づくように、順次、量子化回路168に設定する量子化値Qj を調節する。
また、可変長量子化回路170は、圧縮映像データVOUTを外部に出力する他に、遅延映像データS16を圧縮符号化して得られた圧縮映像データVOUTの実際のデータ量Sj を制御信号C18を介してホストコンピュータ20に対して出力する。
【0032】
以下、第1の実施形態における映像データ圧縮装置1の簡易2パスエンコード動作を説明する。
図4(A)〜(C)は、第1の実施形態における映像データ圧縮装置1の簡易2パスエンコードの動作を示す図である。
エンコーダ制御部12は、映像データ圧縮装置1に入力された非圧縮映像データVINに対して、エンコーダ制御部12により符号化順にピクチャーを並べ替える等の前処理を行い、図4(A)に示すように映像データS12としてFIFOメモリ160およびエンコーダ162に対して出力する。
なお、エンコーダ制御部12によるピクチャーの順番並べ替えにより、図4等に示すピクチャーの符号化の順番と伸長復号後の表示の順番とは異なる。
【0033】
FIFOメモリ160は、入力された映像データS12の各ピクチャーをLピクチャー分だけ遅延し、エンコーダ18に対して出力する。
エンコーダ162は、入力された映像データS12のピクチャーを予備的に順次、圧縮符号化し、第j(jは整数)番目のピクチャーを圧縮符号化して得られた圧縮符号化データのデータ量、DCT処理後の映像データのDC成分の値、および、AC成分の電力値をホストコンピュータ20に対して出力する。
【0034】
例えば、エンコーダ18に入力される遅延映像データS16は、FIFOメモリ160によりLピクチャーだけ遅延されているので、図4(B)に示すように、エンコーダ18が、遅延映像データS16の第j(jは整数)番目のピクチャー(図4(B)のピクチャーa)を圧縮符号化している際には、エンコーダ162は、映像データS12の第j番目のピクチャーからLピクチャー分先の第(j+L)番目のピクチャー(図4(B)のピクチャーb)を圧縮符号化していることになる。従って、エンコーダ18が遅延映像データS16の第j番目のピクチャーの圧縮符号化を開始する際には、エンコーダ162は映像データS12の第j番目〜第(j+L−1)番目のピクチャー(図4(B)の範囲c)の圧縮符号化を完了しており、これらのピクチャーの圧縮符号化後の実難度データDj ,Dj+1 ,Dj+2 ,…,Dj+L-1 は、ホストコンピュータ20により既に算出されている。
【0035】
ホストコンピュータ20は、下に示す式1により、エンコーダ18が遅延映像データS16の第j番目のピクチャーを圧縮符号化して得られる圧縮映像データに割り当てる目標データ量Tj を算出し、算出した目標データ量Tj を量子化制御回路180に設定する。
【0036】
【数1】
【0037】
但し、式1において、Dj は映像データS12の第j番目のピクチャーの実難度データであり、R’j は、映像データS12,S16の第j番目〜第(j+L−1)番目のピクチャーに割り当てることができる目標データ量の平均であり、R’j の初期値(R’1 )は、圧縮映像データの各ピクチャーに平均して割り当て可能な目標データ量であり、下に示す式2で表され、エンコーダ18が圧縮映像データを1ピクチャー分生成する度に、式3に示すように更新される。
【0038】
【数2】
【0039】
【数3】
【0040】
なお、式3中の数値ビットレート(Bit rate)は、通信回線の伝送容量や、記録媒体の記録容量に基づいて決められる1秒当たりのデータ量(ビット量)を示し、ピクチャーレート(Picture rate)は、映像データに含まれる1秒当たりのピクチャーの数(30枚/秒(NTSC),25枚/秒(PAL))を示し、数値Fj+L は、ピクチャータイプに応じて定められるピクチャー当たりの平均データ量を示す。
エンコーダ18のDCT回路166は、入力される遅延映像データS16の第j番目のピクチャーをDCT処理し、量子化回路168に対して出力する。
量子化回路168は、DCT回路166から入力された第j番目のピクチャーの周波数領域のデータを、量子化制御回路180が目標データ量Tj に基づいて調節する量子化値Qj により量子化し、量子化データとして可変長符号化回路170に対して出力する。
可変長符号化回路170は、量子化回路168から入力された第j番目のピクチャーの量子化データを可変長符号化して、ほぼ、目標データ量Tj に近いデータ量の圧縮映像データVOUTを生成して出力する。
【0041】
同様に、図4(B)に示すように、エンコーダ18が、遅延映像データS16の第(j+1)番目のピクチャー(図4(C)のピクチャーa’)を圧縮符号化している際には、エンコーダ162は、映像データS12の第(j+1)番目〜第(j+L)番目のピクチャー(図4(C)の範囲c’)の圧縮符号化を完了し、これらのピクチャーの実難度データDj+1 ,Dj+2 ,Dj+3 ,・・・,Dj+L は、ホストコンピュータ20により既に算出されている。
【0042】
ホストコンピュータ20は、式1により、エンコーダ18が遅延映像データS16の第(j+1)番目のピクチャーを圧縮符号化して得られる圧縮映像データに割り当てる目標データ量Tj+1 を算出し、エンコーダ18の量子化制御回路180に設定する。
【0043】
エンコーダ18は、ホストコンピュータ20から量子化制御回路180に設定された目量データ量Tj に基づいて第(j+1)番目のピクチャーを圧縮符号化し、目標データ量Tj+1 に近いデータ量の圧縮映像データVOUTを生成して出力する。
さらに以下、同様に、映像データ圧縮装置1は、遅延映像データS16の第k番目のピクチャーを、量子化値Qk (k=j+2,j+3,…)をピクチャーごとに変更して順次、圧縮符号化し、圧縮映像データVOUTとして出力する。
【0044】
以上説明したように、第1の実施形態に示した映像データ圧縮装置1によれば、短時間で非圧縮映像データVINの絵柄の難度を算出し、算出した難度に応じた圧縮率で適応的に非圧縮映像データVINを圧縮符号化することができる。つまり、第1の実施形態に示した映像データ圧縮装置1によれば、2パスエンコード方式と異なり、ほぼ実時間的に、非圧縮映像データVINの絵柄の難度に基づいて適応的に非圧縮映像データVINを圧縮符号化をすることができ、実況放送といった実時間性を要求される用途に応用可能である。
なお、第1の実施形態に示した他、本発明に係るデータ多重化装置1は、エンコーダ162が圧縮符号化した圧縮映像データのデータ量を、そのまま難度データとして用い、ホストコンピュータ20の処理の簡略化を図る等、種々の構成を採ることができる。
【0045】
第2実施形態
第1の実施形態に示した簡易2パスエンコード方式によれば、実時間かつ、絵柄の難度に応じた適応的な非圧縮映像データに対する圧縮符号化処理が可能である。しかしながら、第1の実施形態に示した簡易2パスエンコード方式を用いた場合、実時間性が厳しく要求される場合には、FIFOメモリ160の遅延時間を大きくすることができず、真に適切な目標データ量Tj の算出が難しく、圧縮映像データVOUTを伸長復号して得られる映像の品質が低下してしまう可能性がある。
【0046】
第2の実施形態においては、第1の実施形態に示した映像データ圧縮装置1(図1)を用い、ホストコンピュータ20の処理内容を変更して、FIFOメモリ160の遅延時間を長くしなくても適切な目標データ量Tj の値を得ることができるように、非圧縮映像データをLピクチャー分、予備的に圧縮符号化して得られた圧縮映像データの第j番目のピクチャー〜第(j+L−1)番目のピクチャーの実難度データDj 〜Dj+L-1 から、圧縮映像データの第(j+L)番目のピクチャー〜第(j+L+B)番目のピクチャー(Bは整数)の難度データ(予測難度データ)Dj+L 〜Dj+L+B を算出し、実際に得られた難度データDj 〜Dj+L-1 (実難度データ)および予測によって得られた難度データD’j+L 〜D’j+L+B に基づいて、第1の実施形態に示した簡易2パスエンコード方式よりも適切な目標データ量Tj の値を得ることができる圧縮符号化方式(予測簡易2パスエンコード方式)を説明する。
【0047】
まず、第2の実施形態で説明する予測簡易2パスエンコード方式を概念的に説明する。
予測簡易2パスエンコード方式は、徐々に絵柄が難しくなってゆく、つまり、徐々に圧縮符号化時のDCT処理後の高い周波数成分が多くなり、動きが速くなってゆく非圧縮映像データの絵柄は、さらに難しくなってゆき、逆に、徐々に絵柄が難しくなくなって(簡単になって)ゆく非圧縮映像データの絵柄は、さらに簡単になってゆくであろうと予測可能であることを前提する。
【0048】
つまり、予測簡易2パスエンコード方式は、ホストコンピュータ20が、この前提に基づいて、さらに絵柄が難しくなってゆくと予測される場合には、さらに絵柄が難しいピクチャーに備えて、その時点で圧縮符号化しているピクチャーに割り当てる目標データ量を節約し、逆に、さらに絵柄が簡単になってゆくと予測される場合には、その時点で圧縮符号化しているピクチャーに割り当てる目標データ量を増やすようにエンコーダ18に対する圧縮率の制御を行う。
【0049】
さらに、予測簡易2パスエンコード方式の概念的な説明を続ける。
映像データは、一般的に、時間方向および空間方向について相関性が高く、映像データの圧縮符号化は、これらの相関性に着目し、冗長性を除くことにより行われる。
時間方向について相関性が高いということは、現時点の非圧縮映像データのピクチャーの難度とそれ以降の非圧縮映像データのピクチャーの難度とが近いということを意味する。また、難度の増減の傾向も、現時点までの難度の増減の傾向がそれ以降も続くことが多い。
【0050】
具体例を挙げると、カメラが静止状態からゆっくりとカメラを水平方向に回し初め、最後に一定の回転速度で回転しながら、静止している物体を撮影する場合の非圧縮映像データの絵柄を考える。最初はカメラが停止状態であるため、静止映像が撮影され、絵柄の難度は低くなる。次に、カメラを回し始めて1〜2秒後に一定の回転速度になると仮定すると、カメラを回し始めて1〜2秒間は絵柄の難度は高くなる傾向を示す。この状態を、映像データ圧縮装置1側から見ると、数GOP分の圧縮映像データを生成する間、入力される非圧縮映像データの絵柄の難度が高くなる傾向が続くことになる。
【0051】
従って、この具体例に示したような場合には、非圧縮映像データの絵柄の難度が増大傾向を示した場合に、それ以降の絵柄の難度が増大傾向を示すと予測するのは妥当である。以下に説明する予測簡易2パスエンコード方式は、このような難度および難度の増減傾向の時間的相関性を積極的に利用して、圧縮映像データの各ピクチャーに対して、第1の実施形態に示した簡易2パスエンコード方式においてよりも適切な目標データ量の割り当てを行おうとするものである。
【0052】
以下、第2の実施形態における映像データ圧縮装置1の予測簡易2パスエンコードの動作を説明する。
図5(A)〜(C)は、第2の実施形態における映像データ圧縮装置1の予測簡易2パスエンコードの動作を示す図である。
エンコーダ制御部12は、第1の実施形態においてと同様に、映像データ圧縮装置1に入力された非圧縮映像データVINに対して、エンコーダ制御部12により符号化順にピクチャーを並べ替える等の前処理を行い、図5(A)に示すように映像データS12としてFIFOメモリ160およびエンコーダ162に対して出力する。
【0053】
FIFOメモリ160は、第1の実施形態においてと同様に、入力された映像データS12の各ピクチャーをLピクチャー分だけ遅延し、エンコーダ18に対して出力する。
エンコーダ162は、第1の実施形態においてと同様に、入力された映像データS12のピクチャーを予備的に順次、圧縮符号化し、第j(jは整数)番目のピクチャーを圧縮符号化して得られた圧縮符号化データのデータ量、DCT処理後の映像データのDC成分の値およびAC成分の電力値をホストコンピュータ20に対して出力する。ホストコンピュータ20は、エンコーダ162から入力されたこれらの値に基づいて、実難度データDj を順次、算出する。
【0054】
例えば、エンコーダ18に入力される遅延映像データS16は、FIFOメモリ160によりLピクチャーだけ遅延されているので、図5(B)に示すように、エンコーダ18が、遅延映像データS16の第j番目のピクチャー(図5(B)のピクチャーa)を圧縮符号化している際には、エンコーダ162は、第1の実施形態においてと同様に、映像データS12の第j番目のピクチャーからLピクチャー分先の第(j+L)番目のピクチャー(図5(B)のピクチャーb)を圧縮符号化していることになる。
【0055】
従って、エンコーダ18が遅延映像データS16の第j番目のピクチャーの圧縮符号化を開始する際には、エンコーダ162は映像データS12の第(j−A)番目〜第(j+L−1)番目のピクチャー(図5(B)の範囲c、但し、図5はA=0の場合を示す)の圧縮符号化を完了し、これらのピクチャーの圧縮符号化後のデータ量、および、DCT処理後の映像データのDC成分の値およびAC成分の電力値をホストコンピュータ20に対して出力している。ホストコンピュータ20は、エンコーダ162から入力されたこれらの値に基づいて、難度データ(実難度データ、図5(B)の範囲d)Dj-A ,Dj-A+1 ,…,Dj ,Dj+1 ,Dj+2 ,…,Dj+L-1 の算出を既に終了している。なお、Aは整数であり、正負を問わない。
【0056】
ホストコンピュータ20は、実難度データDj-A ,Dj-a+1 ,…,Dj ,Dj+1 ,Dj+2 ,…,Dj+L-1 に基づいて、映像データS12の第(j+L)番目〜第(j+L+B)番目のピクチャーの圧縮符号化後の難度データ(予測難度データ、図5(B)の範囲e)D’j+L ,D’j+L+1 ,D’j+L+2 ,…,D’j+L+B を予測し、下に示す式4により、遅延映像データS16の第j番目のピクチャーの圧縮符号化後の目標データ量Tj を算出する。従って、遅延映像データS16の第j番目のピクチャーの圧縮符号化後の目標データ量Tj を算出するために、実難度データと予測難度データとを含めて、図5(B)の範囲cの(A+L+B+1)ピクチャー分の難度データを用いることになる。なお、実難度データに基づいて予測難度データを算出する方法は、第5の実施形態以降に詳述する。
【0057】
【数4】
【0058】
なお、式4の各記号は、式1の各記号に同じである。
エンコーダ18は、第1の実施形態と同様に、ホストコンピュータ20により量子化制御回路180に設定された目標データ量Tj に基づいて、目標データ量Tj に近いデータ量の圧縮映像データVOUTを生成して出力する。
さらに、ホストコンピュータ20は、図5(B)に示した動作と同様に、遅延映像データS16の第(j+1)番目のピクチャー(図5(C)のピクチャーa’)に対しても、映像データS12の第(j+L+1)番目のピクチャー(図5(C)のピクチャーb’)以前の図5(C)の範囲d’の実難度データDj-A+1 ,Dj-A+2 ,…,Dj ,Dj+1 ,Dj+2 ,…,Dj+L 、および、図5(C)の範囲e’に示す予測難度データ、D’j+L+1 ,D’j+L+2 ,D’j+L+3 ,…,D’j+L+B+1 、つまり、図5(C)の範囲c’に示す実難度データと予測難度データとに基づいて、遅延映像データS16の第(j+1)番目のピクチャーの圧縮符号化後の目標データ量Tj+1 を算出する。エンコーダ18は、ホストコンピュータ20が算出した目量データ量Tj+1 に基づいて、遅延映像データS16の第(j+1)番目のピクチャーを圧縮符号化し、目標データ量Tj+1 に近いデータ量の圧縮符号化データVOUTを生成する。
なお、以上の映像データ圧縮装置1の予測簡易2パスエンコード動作は、遅延映像データS16の第(j+1)番目のピクチャーに対しても同様である。
【0059】
以下、図6を参照して、第2の実施形態における映像データ圧縮装置1の動作を整理して説明する。
図6は、第2の実施形態における映像データ圧縮装置1(図1)の動作を示すフローチャートである。
図6に示すように、ステップ102(S102)において、ホストコンピュータ20は、式1等に用いられる数値j,R’1 を、j=−(L−1),R’1 =(Bit rate ×(L+B))/Picture rate として初期化する。
【0060】
ステップ104(S104)において、ホストコンピュータ20は、数値jが0より大きいか否かを判断する。数値jが0より大きい場合にはS106の処理に進み、小さい場合にはS110の処理に進む。
ステップ106(S106)において、エンコーダ162は、映像データS12の第(j+L)番目のピクチャーを圧縮符号化し、実難度データDj+L を生成する。
【0061】
ステップ108(S108)において、ホストコンピュータ20は数値jをインクリメントする(j=j+1)。
ステップ110(S110)において、ホストコンピュータ20は、遅延映像データS16に第j番目のピクチャーが存在するか否かを判断する。第j番目のピクチャーが存在する場合にはS112の処理に進み、存在しない場合には圧縮符号化処理を終了する。
【0062】
ステップ112(S112)において、ホストコンピュータ20は、数値jが数値Aよりも大きいか否かを判断する。数値jが数値Aよりも大きい場合にはS114の処理に進み、小さい場合にはS116の処理に進む。
ステップ114(S114)において、ホストコンピュータ20は、実難度データDj-A 〜Dj+L-1 に基づいて、予測難度データD’j+L 〜D’j+L+B を算出する。
ステップ116(S116)において、ホストコンピュータ20は実難度データD1 〜Dj+L-1 から、予測難度データD’j+L 〜D’j+L+B を算出する。
【0063】
ステップ118(S118)において、ホストコンピュータ20は、式4を用いて目標データ量Tj を算出し、エンコーダ18の量子化制御回路180に設定する。さらに、エンコーダ18は、量子化制御回路180に設定された目標データ量Tj に基づいて遅延映像データS16の第j番目のピクチャーを圧縮符号化し、第j番目のピクチャーから実際に得られた圧縮映像データのデータ量Sj をホストコンピュータ20に対して出力する。
ステップ120(S120)において、ホストコンピュータ20は、エンコーダ18からのデータ量Sj を記憶し、さらに、映像データS12の第(j+L)番目のピクチャーの実難度データDj+L を出力する。
【0064】
ステップ122(S122)において、エンコーダ18は、遅延映像データS16の第j番目を圧縮符号化して得られた圧縮映像データVOUTを外部に出力する。
ステップ124(S124)において、ホストコンピュータ20は、ピクチャータイプに応じて、式3中に用いられる数値Fj+L を算出する。
ステップ126(S126)において、ホストコンピュータ20は、式3に示した演算(R’j+1 =R’j −Sj +Fj+L )を行う。
【0065】
以上説明したように、第2の実施形態に示した映像データ圧縮装置1による予測簡易2パスエンコードによれば、短時間で非圧縮映像データVINの絵柄の難度を算出し、算出した難度に基づいて予測した難度をさらに用いて適応的に非圧縮映像データVINを圧縮符号化することができ、簡易2パスエンコード方式に比べて、より適切な目標データ量を圧縮映像データの各ピクチャーに割り当てることが可能である。従って、予測簡易2パスエンコード方式による圧縮映像データを伸長復号した場合、簡易2パスエンコード方式による圧縮映像データを伸長復号した場合に比べて、より高品質な映像を得ることができる。
【0066】
第3実施形態
以下、本発明の第3の実施形態を説明する。
エンコーダ162およびエンコーダ18(図1)は、MPEG方式等により、非圧縮映像データを、複数のIピクチャー(intra coded picture) 、Bピクチャー(bi-directionaly coded picture) およびPピクチャー(predictive coded picture)またはこれらの組み合わせから構成されるGOP(group of pictures) 単位に圧縮符号化する。このため、第1の実施形態に示した簡易2パスエンコード方式も、GOPの枠内に区切って行うのが便利である。第3の実施形態においては、映像データ圧縮装置1(図1)を用い、GOPの枠内で行う簡易2パスエンコード方式を説明する。
【0067】
図7(A)〜(C)は、第3の実施形態において、本発明に係る映像データ圧縮装置1がGOPの枠内で行う簡易2パスエンコード方式を示す図である。なお、図7においては、最初のGOPの最初のピクチャーを1番目のピクチャーとして示している。
【0068】
図7(A)に示すように、エンコーダ制御部12は、第1の実施形態と同様に、入力される非圧縮映像データVINに含まれるピクチャーの順番を並び替え、FIFOメモリ160およびエンコーダ162に対して出力する。
FIFOメモリ160は、入力された映像データS12の各ピクチャーをNピクチャー分(L=N、Nは整数)つまり、1GOP分だけ遅延し、エンコーダ18に対して出力する。
エンコーダ162は、入力された映像データS12のピクチャーを予備的に順次、圧縮符号化し、第j(jは整数)番目のピクチャーを圧縮符号化して得られた圧縮符号化データのデータ量、DCT後の映像データのDC成分の値およびAC成分の電力値を順次、ホストコンピュータ20に対して出力する。
【0069】
例えば、エンコーダ18に入力される遅延映像データS16は、FIFOメモリ160によりNピクチャーだけ遅延されているので、図7(B)に示すように、エンコーダ18が、遅延映像データS16の第j番目のピクチャー(図7(B)のピクチャーa)を圧縮符号化している際には、エンコーダ162は、映像データS12の第j番目のピクチャーからNピクチャー分先の第(j+N)番目のピクチャー(図7(B)のピクチャーb)を圧縮符号化していることになる。
【0070】
しかし、第3の実施形態においては、映像データ圧縮装置1はGOPの枠内で簡易2パスエンコードを行うので、ホストコンピュータ20は、エンコーダ18が遅延映像データS16の第j番目のピクチャーの圧縮符号化を開始する際に、エンコーダ162が圧縮符号化を完了している映像データS12の第j番目のピクチャー〜第(j+N−1)番目のピクチャーの内、第j番目〜第N番目のピクチャー(図7(B)の範囲c)の圧縮符号化後の実難度データ(図7(B)の範囲d)Dj ,Dj+1 ,…,DN を用いて目標データ量Tj を、下に示す式5により算出し、エンコーダ18の量子化制御回路180に設定する。
【0071】
【数5】
【0072】
ただし、式5中のR”j は、GOPに割り当てられた目標データ量から、遅延映像データS16の同一GOP内の第1番目のピクチャー〜第(j−1)番目のピクチャーに対する圧縮符号化で既に実際に使用されたデータ量を減算した値、つまり、同一GOPの残りのピクチャーの圧縮映像データに割り当てられるべき目標データ量である。従って、R”j は、下に示す式6により求められる。
【0073】
【数6】
【0074】
従って、GOPの最初のピクチャーを圧縮符号化する場合のR”1 (j=1)は、下に示す式7により、求められる。
【0075】
【数7】
【0076】
ただし、式7において、Gは1つのGOPに割り当てられる固定データ量(G=(Bit rate ×N)/Picture rate )であり、RN (j=N)の初期値は0である。
【0077】
エンコーダ18は、第1の実施形態と同様に、量子化制御回路180にホストコンピュータ20から設定された目標データ量Tj に基づいて、データ量が目量データ量Tj に近い圧縮映像データVOUTを生成して出力する。
さらに、ホストコンピュータ20は、図7(B)に示した動作と同様に、遅延映像データS16の第(j+1)番目のピクチャー(図7(C)のピクチャーa’)に対しても、映像データS12の第N番目のピクチャー以前の図7(C)の範囲d’の実難度データDj+1 ,Dj+2 ,…,DN 、つまり、図7(C)の範囲c’に示す難度データに基づいて、遅延映像データS16の第(j+1)番目のピクチャーの圧縮符号化後の目標データ量Tj+1 を算出する。エンコーダ18は、ホストコンピュータ20が算出した目標データ量Tj+1 に基づいて、遅延映像データS16の第(j+1)番目のピクチャーを圧縮符号化し、目標データ量Tj+1 の圧縮符号化データVOUTを生成する。
なお、以上の映像データ圧縮装置1の簡易2パスエンコード動作は、遅延映像データS16の第(j+1)番目のピクチャーに対しても同様である。
【0078】
以上説明したように、第3の実施形態に示した映像データ圧縮装置1による簡易2パスエンコードによれば、GOPの枠内で簡易2パスエンコードを行うことができるので、処理内容が簡単で、処理時間が短くてすむ。従って、実時間性を要求される実況中継の非圧縮映像データを圧縮符号化するために適しており、しかも、映像データ圧縮装置1の構成を簡単かつ安価に構成することができる。
【0079】
第4実施形態
以下、本発明の第4の実施形態を説明する。
第4の実施形態においては、映像データ圧縮装置1(図1)によるGOPの枠内に区切って行う予測簡易2パスエンコード、つまり、同じエンコーダ18が遅延映像データS16の第j番目のピクチャーの圧縮符号化を行う際に、同一のGOPの各ピクチャーの実難易データ、および、次のGOPについて予測した予測難易データを用いて目標データ量Tj を算出し、エンコーダ18の量子化制御回路180に設定して圧縮符号化を行う方法を説明する。
【0080】
図8(A)〜(C)は、第4の実施形態において、本発明に係る映像データ圧縮装置1がGOPの枠内で行う予測簡易2パスエンコード方式を示す図である。なお、図8においては、GOPの最初のピクチャーを1番目のピクチャーとして示している。
【0081】
図8(A)に示すように、エンコーダ制御部12は、第1の実施形態と同様に、入力される非圧縮映像データVINに含まれるピクチャーの順番を並び替え、FIFOメモリ160およびエンコーダ162に対して出力する。
FIFOメモリ160は、入力された映像データS12の各ピクチャーをNピクチャー分つまり、1GOP分だけ遅延し、エンコーダ18に対して出力する。
エンコーダ162は、入力された映像データS12のピクチャーを予備的に順次、圧縮符号化し、第j(jは整数)番目のピクチャーを圧縮符号化して得られた圧縮符号化データのデータ量、DCT後の映像データのDC成分の値およびAC成分の電力値を順次、ホストコンピュータ20に対して出力する。ホストコンピュータ20は、これらの値から実難度データDj を算出する。
【0082】
例えば、エンコーダ18に入力される遅延映像データS16は、FIFOメモリ160によりNピクチャーだけ遅延されているので、図8(B)に示すように、エンコーダ18が、遅延映像データS16の第j番目のピクチャー(図8(B)のピクチャーa)を圧縮符号化している際には、エンコーダ162は、映像データS12の第j番目のピクチャーからNピクチャー分先の第(j+N)番目のピクチャー(図8(B)のピクチャーb)を圧縮符号化していることになる。
【0083】
しかし、第4の実施形態においては、映像データ圧縮装置1はGOPの枠内で簡易2パスエンコードを行うので、ホストコンピュータ20は、エンコーダ18が遅延映像データS16の第j番目のピクチャーの圧縮符号化を開始する際に、エンコーダ162が圧縮符号化を完了している映像データS12の第j番目のピクチャー〜第(j+N−1)番目のピクチャーの内、第j番目〜第(j+N−1)番目のピクチャー(図8(B)の範囲c)の圧縮符号化後の難度データ(図8(B)の範囲d)を実難度データDj ,Dj+1 ,…,Dj+N-1 として用い、さらに、同じGOPの第(j+1)番目のピクチャー〜次のGOPの最後のピクチャー(第2N番目のピクチャー)までの予測難度データD’j+N ,D’j+N+1 ,…,D’2Nを算出し、実難度データおよび予測難度データに基づいて目標データ量Tj を、下に示す式8により算出し、エンコーダ18の量子化制御回路180に設定する。
【0084】
【数8】
【0085】
ただし、式8中において、j=1,2,…,Nであり、R" j は、2個のGOPに割り当てられた目標データ量から、2個のGOP内の遅延映像データS16の第1番目のピクチャー〜第(j−1)番目のピクチャーに対する圧縮符号化で既に実際に使用されたデータ量を減算した値、つまり、2個のGOPの残りのピクチャーの圧縮映像データに割り当てられるべき目標データ量である。従って、R”j は、下に示す式9により求められる。
【0086】
【数9】
【0087】
従って、図8の最初のGOPの最初のピクチャーを圧縮符号化する場合のR”1 (j=1)は、下に示す式10により、求められる。
【0088】
【数10】
【0089】
ただし、式10のR”N の初期値はGである。
【0090】
エンコーダ18は、第2の実施形態と同様に、量子化制御回路180にホストコンピュータ20から設定された目標データ量Tj に基づいて、データ量が目標データ量Tj に近い圧縮映像データVOUTを生成して出力する。
さらに、ホストコンピュータ20は、図8(B)に示した動作と同様に、遅延映像データS16の第(j+1)番目のピクチャー(図8(C)のピクチャーa’)に対しても、映像データS12の第(j+N)番目のピクチャー以前の図8(C)の範囲d’の実難度データDj+2 ,Dj+3 ,…,DN+1 つまり、図8(C)の範囲c’に示す実難度データ、および、映像データS12の第(j+N+1)番目のピクチャー〜第2N番目のピクチャーの予測難度データに基づいて、遅延映像データS16の第(j+1)番目のピクチャーの圧縮符号化後の目標データ量Tj+1 を算出する。
【0091】
エンコーダ18は、ホストコンピュータ20が算出した目量データ量Tj+1 に基づいて、遅延映像データS16の第(j+1)番目のピクチャーを圧縮符号化し、目標データ量Tj+1 の圧縮符号化データVOUTを生成する。
なお、以上の映像データ圧縮装置1の簡易2パスエンコード動作は、遅延映像データS16の第(j+1)番目のピクチャーに対しても同様である。
【0092】
以下、図9を参照して、第4の実施形態における映像データ圧縮装置1の動作を説明する。
図9は、第4の実施形態における映像データ圧縮装置1の動作を示すフローチャートである。
【0093】
図9に示すように、ステップ202(S202)において、ホストコンピュータ20は、数値GOPcount ,RN を0クリアする(GOPcount ,RN =0)。
ステップ204(S204)において、ホストコンピュータ20は、数値GOPcount が0であるか否かを判断する。数値GOPcount が0である場合には、ホストコンピュータ20はS206の処理に進み、0でない場合にはS210の処理に進む。
【0094】
ステップ206(S206)において、映像データS12の第(j+N)番目のピクチャーを圧縮符号化し、結果として得られた圧縮映像データのデータ量、DCT処理後の映像データのDC成分の値およびAC成分の電力値をホストコンピュータ20に対して出力する。
ステップ208(S208)において、ホストコンピュータ20は、数値jがNであって、j=1である場合に、数値GOPcount をインクリメントし、数値R”1 をG+R”N (R”1 =G+R”N ;式7)とし、これ以外の場合には数値jをインクリメントし、数値R”j をR”j-1 −Sj (R”j =R”j-1 −Sj ;式6)とする。
【0095】
ステップ210(S210)において、ホストコンピュータ20は、遅延映像データS16に第j番目のピクチャーが存在するか否かを判断する。第j番目のピクチャーが存在する場合にはS212の処理に進み、存在しない場合には圧縮符号化処理を終了する。
ステップ212(S212)において、ホストコンピュータ20は、実難度データDj 〜Dj+N-1 から予測難度データD’j+N 〜D’2Nを算出する。
ステップ214(S124)において、ホストコンピュータ20は、実難度データDj 〜Dj+N-1 および予測難度データD’j+N 〜D’2Nを用いて目標データ量Tj を算出し、エンコーダ18の量子化制御回路180に設定する。エンコーダ18は、設定された目標データ量Tj を用いて遅延映像データS16の第j番目のピクチャーを圧縮符号化する。
【0096】
ステップ216(S216)において、エンコーダ18は、遅延映像データS16の第j番目のピクチャーを圧縮符号化して得られた圧縮映像データのデータ量Sj をホストコンピュータ20に対して出力し、ホストコンピュータ20はデータ量Sj を記憶する。エンコーダ162は、映像データS12の第(j+N)番目のピクチャーを圧縮符号化し、結果として得られた映像データのデータ量、DCT処理後の映像データのDC成分の値およびAC成分の電力値をホストコンピュータ20に対して出力する。ホストコンピュータ20は、これらの値に基づいて、実難度データDj+N を算出する。
ステップ218(S218)において、エンコーダ18は、遅延映像データS16の第j番目の圧縮映像データVOUTを外部に出力する。
【0097】
以上説明したように、第4の実施形態に示した映像データ圧縮装置1によるGOPの枠内での予測簡易2パスエンコードは、第3の実施形態に示したGOPの枠内での簡易2パスエンコードに比べ、より適切な目標データ量Tj を算出することができるので、圧縮符号化の結果として得られる圧縮映像データVOUTを伸長復号した映像の品質を高めることができる。しかも、第2の実施形態に示したGOPの枠に納まらない予測簡易2パスエンコードに比べて処理内容が簡単で、処理時間が短くてすみ、実時間性を要求される実況中継の非圧縮映像データを圧縮符号化するために適しており、しかも、映像データ圧縮装置1の構成を簡単かつ安価に構成することができる。
【0098】
第5実施形態
以下、本発明の第5の実施形態として、実難度データに基づいて予測難度データを、単純な直線予測により算出する方法を説明する。なお、同一GOPに複数の種類のピクチャータイプが混在していると、難度データの予測が複雑化する。従って、説明の便宜上、第5の実施形態においては、GOPに含まれるピクチャーが全てIピクチャーであり、実難度データと予測難度データがそれぞれ15(L+A,B=15)である場合を例に説明する。
【0099】
図10は、第5の実施形態において、直線予測により実難度データから予測難度データを算出する方法を例示する図である。なお、図10には、上述のように、実難度データと、実難度データから算出される予測難度データがそれぞれ15(L+A,B=15)である場合を示してある。
【0100】
エンコーダ制御部12は、第1の実施形態と同様に、入力される非圧縮映像データVINに含まれるピクチャーの順番を並び替え、FIFOメモリ160およびエンコーダ162に対して出力する。
FIFOメモリ160は、入力された映像データS12の各ピクチャーを15ピクチャー分(L+A=15)つまり、1GOP分だけ遅延し、エンコーダ18に対して出力する。
エンコーダ162は、まず、図10中に○印を付して示すように、入力された映像データS12のピクチャーを予備的に順次、圧縮符号化し、第1番目のピクチャー〜第15番目のピクチャーを圧縮符号化して得られた圧縮符号化データのデータ量、DCT処理後の映像データのDC成分の値およびAC成分の電力値をホストコンピュータ20に対して順次、出力する。ホストコンピュータ20は、これらの値に基づいて、実難度データD1 〜D15を順次、算出する。
【0101】
ホストコンピュータ20は、算出した実難度データD1 〜D15の平均値D”を、下に示す式11により算出する。
【0102】
【数11】
【0103】
つぎに、ホストコンピュータ20は、下に示す式12により、15個の実難度データD1 〜D15の中心のデータ、つまり、実難度データD8 が平均値D”で、傾きがaの、下に示す式13により仮の予測難度データD1 ’〜D’15を算出し、式13により誤差関数E(a)を求める。
【0104】
【数12】
【0105】
【数13】
【0106】
さらに、ホストコンピュータ20は、式13に示した誤差関数E(a)を最小にする傾きaを求める。ホストコンピュータ20は、このように求めた傾きaを式12に代入し、図10中に×印で示す予測難度データD’16〜D’30を算出する。
以上のようにホストコンピュータ20は、予測難度データD’16〜D’30を算出し、第2の実施形態および第3の実施形態に示したように、算出した予測難度データD16’〜D30’を用いて目標データ量T1 を算出する。
【0107】
さらに、ホストコンピュータ20は、エンコーダ18が第1のピクチャーから生成する圧縮映像データのデータ量を目標データ量T1 とするための量子化値Q1 を算出し、エンコーダ18の量子化回路166に設定する。エンコーダ18は、ホストコンピュータ20から設定された量子化値Q1 を用いて遅延映像データS16の第1のピクチャーを圧縮符号化し、圧縮映像データVOUTとして出力する。
以上のように、ホストコンピュータ20は、各ピクチャーに対する目標データ量を算出し、各ピクチャーを順次、圧縮符号化する。
【0108】
なお、式13には、ホストコンピュータ20が、式12に示した直線と実難度データD1 〜D15との2乗誤差に基づいて誤差関数E(a)を算出する場合を示したが、ホストコンピュータ20の計算量を少なくするためには、式13の代わりに、下に示す式14により、式12に示した直線と実難度データD1 〜D15との絶対値に基づいて誤差関数E(a)を算出してもよい。
【0109】
【数14】
【0110】
なお、本実施形態の直線予測は、実難度データ数および予測難度数が15以外の場合にも適用できるのはいうまでもない。
【0111】
第6実施形態
以下、本発明の第6の実施形態として、実難度データに基づいて予測難度データを、実難度データに重み付けをして算出する方法(重み付け直線予測)を説明する。なお、同一GOPに複数の種類のピクチャータイプが混在していると、難度データの予測が複雑化する。従って、説明の便宜上、第6の実施形態においても、第5の実施形態と同様に、GOPに含まれるピクチャーが全てIピクチャーであり、実難度データと予測難度データがそれぞれ15(L+A,B=15)である場合を例に説明する。
【0112】
映像データのピクチャー間の時間的な相関性は、時間間隔が長くなるほど薄れてゆくと考えられる。従って、圧縮符号化中のピクチャーの目標データ量を算出するためには、時間的に近いピクチャーの難度ほど、圧縮符号化中のピクチャーの難度と大きな相関性があると考えられる。しかしながら、第5の実施形態に示した単純な直線予測により予測難度データを算出した場合、このような、時間経過に伴う難度の相関性は考慮されない。第6の実施形態で説明する重み付け直線予測による予測難度データの算出は、圧縮符号化中のピクチャーと近いピクチャーの難度ほど誤差関数に大きな影響を与えるようにして、予測難度データの制度を向上させることも目的にしている。
【0113】
図11は、第6の実施形態において、重み付け直線予測により実難度データから予測難度データを算出する方法を例示する図である。なお、図11には、上述のように、実難度データと、実難度データから算出される予測難度データがそれぞれ15(L+A,B=15)である場合を示してある。
【0114】
エンコーダ制御部12は、第1の実施形態と同様に、入力される非圧縮映像データVINに含まれるピクチャーの順番を並び替え、FIFOメモリ160およびエンコーダ162に対して出力する。
FIFOメモリ160は、入力された映像データS12の各ピクチャーを15ピクチャー分(L+A=15)つまり、1GOP分だけ遅延し、エンコーダ18に対して出力する。
エンコーダ162は、まず、図11中に○印を付して示すように、入力された映像データS12のピクチャーを予備的に順次、圧縮符号化し、圧縮映像データのデータ量、DCT処理後の映像データのDC成分の値およびAC成分の電力値をホストコンピュータ20に対して出力する。ホストコンピュータ20は、これらの値に基づいて、第1番目のピクチャー〜第15番目のピクチャーの圧縮符号化データの実難度データD1 〜D15を順次、算出する。
【0115】
ホストコンピュータ20は、算出した実難度データD1 〜D15の平均値D”を、下に示す式15により、係数kの重み付け平均値k”を算出し、また、式16により、実難度データD1 〜D15それぞれに重み付け係数ω(1>ω>0)の巾乗を乗算して重み付けし、実難度データD1 〜D15の重み付け平均値D”を算出する。
【0116】
【数15】
【0117】
【数16】
【0118】
つぎに、ホストコンピュータ20は、算出した係数kの重み付け平均値k”および実難度データD1 〜D15の重み付け平均値D”を用い、下に示す式17で表される直線を定める。
【0119】
【数17】
【0120】
さらに、式17から仮の予測難度データD1 ’〜D’15を算出し、式18により誤差関数E(a)を求める。
【0121】
【数18】
【0122】
さらに、ホストコンピュータ20は、式13に示した誤差関数E(a)を最小にする傾きaを求める。ホストコンピュータ20は、このように求めた傾きaを式12に代入し、図11中に×印で示す予測難度データD’16〜D’30を算出する。
以上のようにホストコンピュータ20は、予測難度データD’16〜D’30を算出し、第2の実施形態および第3の実施形態に示したように、算出した予測難度データD’16〜D’30を用いて目標データ量T1 を算出する。
【0123】
さらに、ホストコンピュータ20は、エンコーダ18が第1のピクチャーから生成する圧縮映像データのデータ量を目標データ量T1 とするための量子化値Q1 を算出し、エンコーダ18の量子化回路166に設定する。エンコーダ18は、ホストコンピュータ20から設定された量子化値Q1 を用いて遅延映像データS16の第1のピクチャーを圧縮符号化し、圧縮映像データVOUTとして出力する。
以上のように、ホストコンピュータ20は、各ピクチャーに対する目標データ量を算出し、各ピクチャーを順次、圧縮符号化する。
【0124】
なお、式18には、ホストコンピュータ20が、式16に示した直線と実難度データD1 〜D15との2乗誤差に基づいて誤差関数E(a)を算出する場合を示したが、ホストコンピュータ20の計算量を少なくするためには、式18の代わりに、下に示す式19により、式16に示した直線と実難度データD1 〜D15との絶対値に基づいて誤差関数E(a)を算出してもよい。
【0125】
【数19】
【0126】
なお、本実施形態の直線予測は、実難度データ数および予測難度数が15以外の場合にも適用できるのはいうまでもない。
【0127】
第7実施形態
以下、本発明の第7の実施形態として、実難度データに基づいて予測難度データを、隣接する実難度データ間の差分の変化を考慮して算出する方法(差分予測)を説明する。なお、同一GOPに複数の種類のピクチャータイプが混在していると、難度データの予測が複雑化する。従って、説明の便宜上、第7の実施形態においても、これまで説明した第5の実施形態および第6の実施形態と同様に、GOPに含まれるピクチャーが全てIピクチャーであり、実難度データと予測難度データがそれぞれ15(L+A,B=15)である場合を例に説明する。
【0128】
図12は、第7の実施形態において、差分予測により実難度データから予測難度データを算出する方法を例示する図である。なお、図12には、上述のように、実難度データと、実難度データから算出される予測難度データがそれぞれ15(L+A,B=15)である場合を示してある。
【0129】
例えば、図12中に、○印で示すように、徐々に実難度データの値の増加が鈍っている絵柄の映像データにおいては、その後(第16番目のピクチャー以降)も、映像データの難度の増加が鈍くなり、さらに、難度が減少してゆくことが予想される。このような場合、隣接する実難度データ間の値の差分を予測難度データに反映させることにより、予測難度データの精度をさらに向上させることができると考えられる。第7の実施形態に示す差分予測は、かかる観点から、予測難度データの精度を向上させようとするものである。なお、隣接する実難度データ間の値の差分を予測難度データに反映させる方法は、何種類も考えられ、いくらでも複雑化できるが、第7の実施形態においては、最も単純な、差分の値を直線近似する場合について説明する。
【0130】
エンコーダ制御部12は、第1の実施形態と同様に、入力される非圧縮映像データVINに含まれるピクチャーの順番を並び替え、FIFOメモリ160およびエンコーダ162に対して出力する。
FIFOメモリ160は、入力された映像データS12の各ピクチャーを15ピクチャー分(L+A=15)つまり、1GOP分だけ遅延し、エンコーダ18に対して出力する。
エンコーダ162は、まず、図12中に○印を付して示すように、入力された映像データS12のピクチャーを予備的に順次、圧縮符号化し、第1番目のピクチャー〜第15番目のピクチャーを圧縮符号化して得られた圧縮符号化データのデータ量、DCT処理後の映像データのDC成分の値およびAC成分の電力値をホストコンピュータ20に対して出力する。ホストコンピュータ20は、これらの値から実難度データD1 〜D15を順次、算出する。
【0131】
ホストコンピュータ20は、エンコーダ162から入力された圧縮映像データのデータ量、DCT処理後の映像データのDC成分の値およびAC成分の電力値から実難度データD1 〜D15を算出し、さらに、隣接する実難度データ間の差分値Δk (Δk =Dk −Dk-1 ;k=0,2,…,14)を算出する。
さらに、ホストコンピュータ20は、第5の実施形態に示した式10〜式13または第6の実施形態に示した式14〜式18を用いて直線近似を行い、予測差分値Δ16〜Δ30を算出する。
【0132】
さらに、ホストコンピュータ20は、算出した予測差分値Δ16〜Δ30について、第5の実施形態に示した式11または第6の実施形態に示した式16を適用し、予測難度データD’16を算出し、下に示す式20を用いて、予測難度データD’17〜D’30を算出する。
【0133】
【数20】
【0134】
ホストコンピュータ20は、実難度データD1 〜D15、および、以上説明したように算出した予測難度データD’16〜D’30を用いて目標データ量T1 を算出する。
なお、第7の実施形態においては、ホストコンピュータ20が隣接するピクチャー間の差分値Δk を直線(1次関数)で近似する。従って、ホストコンピュータ20が算出する予測難度データD’16〜D’30は、図12に×印を付して示すように1次関数を積分した放物線(2次関数)上の値に近似される。
【0135】
さらに、ホストコンピュータ20は、エンコーダ18が第1のピクチャーから生成する圧縮映像データのデータ量を目標データ量T1 とするための量子化値Q1 を算出し、エンコーダ18の量子化回路166に設定する。エンコーダ18は、ホストコンピュータ20から設定された量子化値Q1 を用いて遅延映像データS16の第1のピクチャーを圧縮符号化し、圧縮映像データVOUTとして出力する。
以上のように、ホストコンピュータ20は、各ピクチャーに対する目標データ量を算出し、各ピクチャーを順次、圧縮符号化する。
なお、本実施形態の直線予測は、実難度データ数および予測難度数が15以外の場合にも適用できるのはいうまでもない。
【0136】
第8実施形態
以下、本発明の第8の実施形態として、GOPが複数の種類のピクチャーから構成されている場合に予測難度データを算出する方法を説明する。なお、第8の実施形態においは、1GOPがI,B,B,P,B,B,P,B,B,P,B,B,P,B,Bの順に15のピクチャーから構成され、実難度データと予測難度データがそれぞれ15(L+A,B=15)である場合を例示する。
【0137】
第5の実施形態〜第7の実施形態においては、便宜上、GOPがIピクチャーのみから構成されている場合を例に本発明の説明を行った。しかしながら、実際には、GOPはIピクチャー、PピクチャーおよびBピクチャーから構成され、ピクチャータイプに対応した方法で予測難度データを算出する必要がある。第8の実施形態における予測難度データの算出方法は、かかる実情を考慮したものである。
【0138】
ピクチャータイプ別の予測
まず、第1にピクチャータイプ別に予測難度データを算出し、予測簡易2パスエンコードを行う方法が考えられる。
つまり、エンコーダ162(図1)がGOPの各ピクチャーを圧縮符号化して得たデータ量、DCT処理後の映像データのDC成分の値およびAC成分の値をホストコンピュータ20に対して出力し、ホストコンピュータ20がこれらの値から算出した実難度データを、ホストコンピュータ20が第4の実施形態〜第7の実施形態に示した単純な直線予測、重み付け直線予測または差分予測によりピクチャータイプ別に独立して処理し、Iピクチャー、PピクチャーおよびBピクチャーそれぞれの予測難度データを算出し、目標データ量Tj を算出する。
エンコーダ18は、第2の実施形態および第4の実施形態〜第7の実施形態に示したように、ピクチャータイプ別にホストコンピュータ20が算出した目標データ量Tj に基づいて遅延映像データS16を圧縮符号化し、圧縮映像データVOUTとして出力する。
【0139】
正規化予測
次に、GOPに含まれる各ピクチャーの実難度データの値に応じて実難度データを正規化し、正規化した実難度データから予測難度データを算出し、予測簡易2パスエンコードを行う方法が考えられる。
【0140】
正規化予測を行う場合、まず、ホストコンピュータ20は、エンコーダ162がGOPの各ピクチャーから生成したIピクチャー、BピクチャーおよびPピクチャーそれぞれのデータ量、DCT処理後のDC成分の値およびAC成分の電力値から実難度データを算出し、さらに、Iピクチャー、BピクチャーおよびPピクチャーそれぞれの実難度データの値の比率(I:P:B)を算出する。
【0141】
次に、ホストコンピュータ20は、算出した実難度データの値の比率でIピクチャー、BピクチャーおよびPピクチャーの実難度データを正規化し、正規化した実難度データを用いて仮の予測難度データを算出する。さらに、ホストコンピュータ20は、仮の予測難度データにIピクチャー、BピクチャーおよびPピクチャーそれぞれの比率を乗算して予測難度データを算出する。
【0142】
以下、図13を参照して正規化予測方法をさらに具体的に説明する。
図13は、第8の実施形態において、GOPが複数のタイプのピクチャーから構成される場合に、実難度データから予測難度データを算出する方法を示す図である。なお、図13には、上述のように、実難度データと、実難度データから算出される予測難度データがそれぞれ15(L+A,B=15)である場合を示してある。
【0143】
エンコーダ162は、映像データS12のGOPにI,B,B,P,B,B,P,B,B,P,B,B,P,B,Bの順に含まれるピクチャーのデータ量、DCT処理後のDC成分の値およびAC成分の電力値をホストコンピュータ20に対して出力する。ホストコンピュータ20は、これらの値から、それぞれ図13中に○印で示す実難度データD1 〜D15を算出する。
さらに、ホストコンピュータ20は、生成した実難度データD1 〜D15を正規化する。つまり、例えば、実難度データD1 〜D15の内、Iピクチャーの難度データD1 の値、Pピクチャーの難度データD4 ,D7 ,D10,D13それぞれの値、および、Bピクチャーの難度データD2 ,D3 ,D5 ,D6 ,D8 ,D9 ,D11,D12,D14,D15それぞれの値の比率、つまり、1つのIピクチャーのデータ量、1つのPピクチャーのデータ量および1つのBピクチャーのデータ量の比率が、例えばほぼ4:2:1である場合に、ホストコンピュータ20は、Iピクチャーの実難度データD1 を4で除算し、Pピクチャーの実難度データD4 ,D7 ,D10,D13それぞれの値を2で除算し、さらに、Bピクチャーの実難度データD2 ,D3 ,D5 ,D6 ,D8 ,D9 ,D11,D12,D14,D15それぞれの値を1で除算して正規化を行い、図13中に●印で示す正規化した実難度データを生成する。
【0144】
次に、ホストコンピュータ20は、例えば、第5の実施形態に示した単純な直線予測により、図13中に×印で示す仮の予測難度データを生成する。
さらに、図13中に×印で示す仮難度データの内、Iピクチャーの仮難度データには4を乗算し、Pピクチャーの仮難度データには2を乗算し、Bピクチャーの仮難度データには1を乗算して、図13中に□印で示す予測難度データD’16〜D’30を生成する。
【0145】
第5の実施形態においてと同様に、ホストコンピュータ20は、実難度データD1 〜D15および予測難度データD’16〜D’30を用いて目標データ量Tj を生成する。
エンコーダ18は、ホストコンピュータ20が生成した目標データ量Tj に基づいて、遅延映像データS16を圧縮符号化し、圧縮映像データVOUTとして出力する。
【0146】
【発明の効果】
以上説明したように、本発明に係る符号化装置およびその方法によれば、2パスエンコードによらずに非圧縮映像データを所定のデータ量以下に圧縮符号化できる。
また、本発明に係る映像データ圧縮装置およびその方法によれば2パスエンコードによらずに所定のデータ量以下に圧縮符号化した圧縮映像データを伸長復号した場合に、高品質な映像を得ることができる。
【0147】
また、本発明に係る符号化装置およびその方法によれば、2パスエンコードによらずに、圧縮符号化後の圧縮映像データのデータ量を見積もり、見積もった圧縮映像データのデータ量に基づいて圧縮率を調節して非圧縮映像データを圧縮符号化することができる。
また、本発明に係る映像データ圧縮装置およびその方法によれば、2パスエンコードによらずに、高精度に圧縮符号化後の圧縮映像データのデータ量を見積もりながら、非圧縮映像データを圧縮符号化することができる。
【図面の簡単な説明】
【図1】本発明に係る映像データ圧縮装置の構成を示す図である。
【図2】図1に示した簡易2パス処理部のエンコーダの構成を示す図である。
【図3】図1に示したエンコーダの構成を示す図である。
【図4】(A)〜(C)は、第1の実施形態における映像データ圧縮装置の簡易2パスエンコードの動作を示す図である。
【図5】(A)〜(C)は、第2の実施形態における映像データ圧縮装置の予測簡易2パスエンコードの動作を示す図である。
【図6】第2の実施形態における映像データ圧縮装置(図1)の動作を示すフローチャートである。
【図7】(A)〜(C)は、第3の実施形態において、本発明に係る映像データ圧縮装置1がGOPの枠内で行う簡易2パスエンコード方式を示す図である。
【図8】(A)〜(C)は、第4の実施形態において、本発明に係る映像データ圧縮装置がGOPの枠内で行う予測簡易2パスエンコード方式を示す図である。
【図9】第4の実施形態における映像データ圧縮装置の動作を示すフローチャートである。
【図10】第5の実施形態において、直線予測により実難度データから予測難度データを算出する方法を例示する図である。
【図11】第6の実施形態において、重み付け直線予測により実難度データから予測難度データを算出する方法を例示する図である。
【図12】第7の実施形態において、差分予測により実難度データから予測難度データを算出する方法を例示する図である。
【図13】第8の実施形態において、GOPが複数のタイプのピクチャーから構成される場合に、実難度データから予測難度データを算出する方法を示す図である。
【符号の説明】
1…映像データ圧縮装置、10…圧縮符号化部、12…エンコーダ制御部、14…モーションエスティメータ、16…簡易2パス処理部、160…FIFOメモリ、162,18…エンコーダ、20…ホストコンピュータ[0001]
BACKGROUND OF THE INVENTION
The present invention compresses and encodes uncompressed video data.EncoderAnd its method.
[0002]
[Background Art and Problems to be Solved by the Invention]
When uncompressed digital video data is compressed and encoded by a method such as MPEG (moving picture experts group) and recorded on a recording medium such as a magneto-optical disc (MO disc), The data amount (bit amount) of the compressed video data needs to be less than the recording capacity of the recording medium while making the quality of the video after decompression decoding as high as possible.
To meet this need, first, pre-compress the non-compressed video data, estimate the amount of data after compression encoding (first pass), and then adjust the compression rate based on the estimated amount of data Then, a compression encoding (second pass) method is employed so that the data amount after compression encoding is equal to or less than the recording capacity of the recording medium (hereinafter, such a compression encoding method is also referred to as “two-pass encoding”). Write down).
[0003]
However, if compression encoding is performed by two-pass encoding, it is necessary to perform similar compression encoding processing twice on the same uncompressed video data, which takes time. Further, since the final compressed video data cannot be generated by a single compression encoding process, the captured video data cannot be compressed and recorded in real time (real time) as it is.
[0004]
The present invention has been made in view of the above-described problems of the prior art, and a high-quality video is obtained when compressed video data compression-encoded to a predetermined data amount or less is decompressed and decoded without using two-pass encoding. It is an object of the present invention to provide a video data compression apparatus and method capable of obtaining the above.
[0005]
Further, the present invention estimates the amount of compressed video data after compression encoding without using two-pass encoding, and adjusts the compression rate based on the estimated amount of compressed video data to convert uncompressed video data. Can be compression encodedEncoderAnd an object thereof.
Further, the present invention can compress and encode uncompressed video data while estimating the data amount of compressed video data after compression encoding with high accuracy, without using two-pass encoding.EncoderAnd an object thereof.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, an encoding apparatus according to the present invention is an encoding apparatus that encodes the video data using difficulty level data that indicates a difficulty level of a picture of the video data, and encodes the video data. Encoding means for processing, and for the video data, the video dataThe first coding interval ofEncoding processAnd the amount of data after encodingActual difficulty dataAsActual difficulty level data calculating means for calculating, and the actual difficulty level data calculated by the actual difficulty level data calculating meansFrom the approximation difficulty data that approximates the actual difficulty data of the second encoding section of the video data,Predictive difficulty dataAsThe video data based on the prediction difficulty data calculation means to calculate, the actual difficulty data calculated by the actual difficulty data calculation means, and the prediction difficulty data calculated by the prediction difficulty data calculation meansPicture to be encodedTarget code amount calculating means for calculating a target code amount for the target code amount, and the target code amount calculated by the target code amount calculating meansSo that the picture to be encoded isAnd encoding control means for controlling the encoding process of the encoding means so as to perform the encoding process.
[0007]
Preferably,The actual difficulty level data calculating unit calculates the actual difficulty level data in units of pictures, the prediction difficulty level data calculating unit calculates the prediction difficulty level data in units of pictures, and the target code amount calculating unit is configured to calculate the target code amount in units of pictures. A target code amount is calculated.
[0009]
Preferably,The encoding device further includes delay means for delaying the video data by L pictures (L is a positive integer),The actual difficulty level data calculating means calculates A, B, j.Positiveinteger, The encoding target picture is the (j) th picture of the video dataIn this case, the (j-A) th picture to the (j + L-1) th picture of the video dataAs the first coding intervalActual difficulty dataAnd the predictive difficulty calculating means(J + L) th picture to (j + L + B) th picture of the video dataAs the second coding intervalThe prediction difficulty level data is calculated.
[0010]
Preferably, saidThe prediction difficulty level data calculating means calculates the prediction difficulty level data by approximating the actual difficulty level data and a predetermined function.
[0011]
Preferably, saidThe predetermined function is a linear function represented by a straight line, and the prediction difficulty level data calculation means calculates the prediction difficulty level data by performing linear prediction using the linear function.
[0012]
Preferably, the prediction difficulty data calculation means includes:In the first coding intervalAn average actual difficulty level data that is an average value of the actual difficulty level data is calculated, and an error of the actual difficulty level data with respect to the calculated average actual difficulty level data is indicated based on a square error between the straight line and the actual difficulty level data. An error function is calculated, and the calculated error function isMinimize the linear functionAnd calculating the prediction difficulty data.
[0013]
Preferably, the prediction difficulty data calculation means includes:In the first coding intervalAn average actual difficulty level data that is an average value of the actual difficulty level data is calculated, and the straight line and the actual difficulty level data are calculated.DifferenceBased on the absolute value, an error function indicating an error of the actual difficulty data with respect to the calculated average actual difficulty data is calculated, and the calculated error function isMinimize the linear functionAnd calculating the prediction difficulty data.
[0014]
The prediction difficulty level data calculating means includes:The encoding targetBy calculating a weighting coefficient that has a greater influence on the error function as the actual difficulty data of a picture closer to a picture, and performing weighted linear prediction using the calculated weighting coefficient,predictionCalculate difficulty data.
[0015]
Preferably, the prediction difficulty data calculation means calculates a difference value between the actual difficulty data adjacent in the encoding processing order, and integrates the linear function using the calculated difference value. 2 The prediction difficulty level data is calculated by performing difference prediction that approximates the prediction difficulty level data as a value on a next function.
[0016]
The predictive difficulty data calculating means is for the picture included in the GOP of the video data.For each picture typeBy calculating a ratio of values of actual difficulty data and normalizing and predicting the actual difficulty data with the calculated ratio, temporary prediction difficulty data of each picture included in the GOP of the video data is calculated and calculated. The prediction difficulty data is calculated by multiplying the provisional prediction difficulty by the ratio.
[0017]
The encoding method of the present invention is an encoding method for encoding the video data using difficulty level data indicating a difficulty level of a picture of the video data, wherein the video data is encoded with respect to the video data.The first coding interval ofEncoding processAnd the amount of data after encodingActual difficulty dataAsActual difficulty level data calculating step to calculate, and the actual difficulty level data calculated by the actual difficulty level data calculating stepFrom the approximation difficulty data that approximates the actual difficulty data of the second encoding section of the video data,Predictive difficulty dataAsBased on the prediction difficulty level data calculation step to be calculated, the actual difficulty level data calculated by the actual difficulty level data calculation step, and the prediction difficulty level data calculated by the prediction difficulty level data calculation step, the video dataPicture to be encodedTarget code amount calculation step for calculating a target code amount for the target code amount, and the target code amount calculated by the target code amount calculation stepSo that the picture to be encoded isAn encoding process for performing an encoding process.
[0020]
DETAILED DESCRIPTION OF THE INVENTION
First embodiment
Hereinafter, a first embodiment of the present invention will be described.
When compression coding of video data such as MPEG, images with many high frequency components or graphics with high difficulty, such as graphics with a lot of movement, are generally susceptible to distortion caused by compression. Become. For this reason, video data with a high degree of difficulty must be compression-encoded at a low compression rate. For compressed video data obtained by compression-encoding data with a high degree of difficulty, compressed video of video data with a low degree of difficulty is used. It is necessary to allocate a larger amount of target data than data.
[0021]
Thus, in order to adaptively allocate the target data amount to the difficulty level of the video data, the two-pass encoding method shown as the prior art is effective. However, the two-pass encoding method is not suitable for real-time compression encoding.
The simple two-pass encoding method shown as the first embodiment is made to solve the problems of the two-pass encoding method, and is compressed video data obtained by preliminarily compressing and encoding uncompressed video data. The difficulty level of the uncompressed video data is calculated from the difficulty level data, and the compression rate of the uncompressed video data delayed by a predetermined time by the FIFO memory is adaptively controlled based on the difficulty level calculated by the preliminary compression encoding. can do.
[0022]
FIG. 1 is a diagram showing a configuration of a video
As shown in FIG. 1, the video
With these components, the video
[0023]
In the video
[0024]
The
The
[0025]
In the simple 2-
[0026]
FIG. 2 is a diagram illustrating a configuration of the
For example, as shown in FIG. 2, the
[0027]
The
The
[0028]
The
The variable-
The
[0029]
The
The
The
[0030]
FIG. 3 is a diagram showing a configuration of the
As shown in FIG. 3, the
[0031]
In the
In addition to outputting the compressed video data VOUT to the outside, the variable
[0032]
Hereinafter, a simple two-pass encoding operation of the video
4A to 4C are diagrams illustrating a simple two-pass encoding operation of the video
The
It should be noted that the picture order rearrangement by the
[0033]
The
The
[0034]
For example, since the delayed video data S16 input to the
[0035]
The
[0036]
[Expression 1]
[0037]
However, in
[0038]
[Expression 2]
[0039]
[Equation 3]
[0040]
The numerical bit rate in Equation 3 indicates the data amount (bit amount) per second determined based on the transmission capacity of the communication line and the recording capacity of the recording medium. ) Indicates the number of pictures per second (30 pictures / second (NTSC), 25 pictures / second (PAL)) included in the video data.j + LIndicates an average data amount per picture determined according to the picture type.
The
The
The variable
[0041]
Similarly, as shown in FIG. 4B, when the
[0042]
The
[0043]
The
In the following, similarly, the video
[0044]
As described above, according to the video
In addition to the one shown in the first embodiment, the
[0045]
Second embodiment
According to the simple two-pass encoding method shown in the first embodiment, it is possible to perform compression encoding processing on uncompressed video data that is adaptive in real time and in accordance with the difficulty of a picture. However, when the simple two-pass encoding method shown in the first embodiment is used, the delay time of the
[0046]
In the second embodiment, the video data compression apparatus 1 (FIG. 1) shown in the first embodiment is used, the processing contents of the
[0047]
First, the predictive simple two-pass encoding method described in the second embodiment will be conceptually described.
In the predictive simple 2-pass encoding method, the pattern gradually becomes difficult, that is, the pattern of uncompressed video data that gradually increases in high frequency components after DCT processing at the time of compression encoding and the movement becomes faster is On the contrary, it is assumed that the pattern of uncompressed video data, which becomes more difficult and, on the other hand, gradually becomes less difficult (becomes simple), can be predicted that it will become even easier.
[0048]
In other words, in the predictive simple two-pass encoding method, if the
[0049]
Further, the conceptual description of the predictive simple two-pass encoding method will be continued.
Video data generally has high correlation in the time direction and the spatial direction, and compression encoding of video data is performed by paying attention to these correlations and removing redundancy.
A high correlation in the time direction means that the difficulty level of the current uncompressed video data picture is close to the difficulty level of the subsequent uncompressed video data picture. In addition, the tendency of increase / decrease in difficulty often continues to increase / decrease until now.
[0050]
As a specific example, consider a picture of uncompressed video data when shooting a stationary object while slowly turning the camera horizontally from the stationary state and finally rotating at a constant rotation speed. . At first, since the camera is in a stopped state, a still image is taken and the difficulty of the pattern is reduced. Next, assuming that the rotation speed is constant after 1 to 2 seconds from the start of turning the camera, the degree of difficulty of the pattern tends to increase for 1 to 2 seconds after starting to turn the camera. When this state is viewed from the video
[0051]
Therefore, in the case shown in this specific example, it is reasonable to predict that the difficulty level of the subsequent pattern shows an increasing tendency when the difficulty level of the pattern of the uncompressed video data shows an increasing tendency. . The predictive simple two-pass encoding method described below uses the temporal correlation between the difficulty level and the increase / decrease tendency of the difficulty level, and applies the first embodiment to each picture of the compressed video data. The target data amount is more appropriately assigned than in the simple two-pass encoding method shown.
[0052]
Hereinafter, the operation of the predictive simple two-pass encoding of the video
FIGS. 5A to 5C are diagrams illustrating the operation of the predictive simple two-pass encoding of the video
As in the first embodiment, the
[0053]
As in the first embodiment, the
As in the first embodiment, the
[0054]
For example, since the delayed video data S16 input to the
[0055]
Accordingly, when the encoder 18 starts compression encoding of the jth picture of the delayed video data S16, the
[0056]
The
[0057]
[Expression 4]
[0058]
In addition, each symbol of Formula 4 is the same as each symbol of
As in the first embodiment, the
Further, the
Note that the predictive simple two-pass encoding operation of the video
[0059]
Hereinafter, the operation of the video
FIG. 6 is a flowchart showing the operation of the video data compression apparatus 1 (FIG. 1) in the second embodiment.
As shown in FIG. 6, in step 102 (S102), the
[0060]
In step 104 (S104), the
In step 106 (S106), the
[0061]
In step 108 (S108), the
In step 110 (S110), the
[0062]
In step 112 (S112), the
In step 114 (S114), the
In step 116 (S116), the
[0063]
In step 118 (S118), the
In step 120 (S120), the
[0064]
In step 122 (S122), the
In step 124 (S124), the
In step 126 (S126), the
[0065]
As described above, according to the predictive simple two-pass encoding by the video
[0066]
Third embodiment
Hereinafter, a third embodiment of the present invention will be described.
The
[0067]
FIGS. 7A to 7C are diagrams showing a simple two-pass encoding method performed within the GOP frame by the video
[0068]
As shown in FIG. 7A, the
The
The
[0069]
For example, since the delayed video data S16 input to the
[0070]
However, in the third embodiment, since the video
[0071]
[Equation 5]
[0072]
However, R "in Formula 5jIndicates the data amount actually used in the compression encoding for the first picture to the (j−1) th picture in the same GOP of the delayed video data S16 from the target data quantity allocated to the GOP. The value obtained by subtraction, that is, the target data amount to be allocated to the compressed video data of the remaining pictures of the same GOP. Therefore, R "jIs obtained by Equation 6 shown below.
[0073]
[Formula 6]
[0074]
Therefore, R "when compression encoding the first picture of the GOP.1(J = 1) is obtained by Expression 7 shown below.
[0075]
[Expression 7]
[0076]
However, in Expression 7, G is a fixed data amount (G = (Bit rate × N) / Picture rate) assigned to one GOP, and RNThe initial value of (j = N) is 0.
[0077]
As in the first embodiment, the
Further, the
Note that the simple two-pass encoding operation of the video
[0078]
As described above, according to the simple two-pass encoding by the video
[0079]
Fourth embodiment
The fourth embodiment of the present invention will be described below.
In the fourth embodiment, predictive simple two-pass encoding performed by the video data compression apparatus 1 (FIG. 1) within the GOP frame, that is, the
[0080]
FIGS. 8A to 8C are diagrams showing a simple predictive two-pass encoding method performed within the GOP frame by the video
[0081]
As shown in FIG. 8A, the
The
The
[0082]
For example, since the delayed video data S16 input to the
[0083]
However, in the fourth embodiment, since the video
[0084]
[Equation 8]
[0085]
In
[0086]
[Equation 9]
[0087]
Therefore, R ″ when the first picture of the first GOP in FIG. 8 is compression encoded.1(J = 1) is obtained by
[0088]
[Expression 10]
[0089]
Where R ″ in
[0090]
As in the second embodiment, the
Further, the
[0091]
The
Note that the simple two-pass encoding operation of the video
[0092]
The operation of the video
FIG. 9 is a flowchart showing the operation of the video
[0093]
As shown in FIG. 9, in step 202 (S202), the
In step 204 (S204), the
[0094]
In step 206 (S206), the (j + N) -th picture of the video data S12 is compression-encoded, and the data amount of the resulting compressed video data, the DC component value of the video data after DCT processing, and the AC component The power value is output to the
In step 208 (S208), the
[0095]
In step 210 (S210), the
In step 212 (S212), the
In step 214 (S124), the
[0096]
In step 216 (S216), the
In step 218 (S218), the
[0097]
As described above, the predictive simple two-pass encoding within the GOP frame by the video
[0098]
Fifth embodiment
Hereinafter, as a fifth embodiment of the present invention, a method for calculating prediction difficulty data based on actual difficulty data by simple linear prediction will be described. Note that when a plurality of types of picture types are mixed in the same GOP, prediction of difficulty level data becomes complicated. Therefore, for convenience of explanation, in the fifth embodiment, the case where all the pictures included in the GOP are I pictures and the actual difficulty level data and the prediction difficulty level data are 15 (L + A, B = 15) respectively is described as an example. To do.
[0099]
FIG. 10 is a diagram illustrating a method for calculating prediction difficulty data from actual difficulty data by linear prediction in the fifth embodiment. FIG. 10 shows a case where the actual difficulty data and the prediction difficulty data calculated from the actual difficulty data are 15 (L + A, B = 15), respectively, as described above.
[0100]
As in the first embodiment, the
The
First, the
[0101]
The
[0102]
## EQU11 ##
[0103]
Next, the
[0104]
[Expression 12]
[0105]
[Formula 13]
[0106]
Further, the
As described above, the
[0107]
Further, the
As described above, the
[0108]
In
[0109]
[Expression 14]
[0110]
In addition, it cannot be overemphasized that the linear prediction of this embodiment is applicable also when the actual difficulty level data number and the prediction difficulty number are other than 15.
[0111]
Sixth embodiment
Hereinafter, as a sixth embodiment of the present invention, a method (weighted linear prediction) of calculating prediction difficulty data by weighting the actual difficulty data based on the actual difficulty data will be described. Note that when a plurality of types of picture types are mixed in the same GOP, prediction of difficulty level data becomes complicated. Therefore, for convenience of explanation, in the sixth embodiment, as in the fifth embodiment, all the pictures included in the GOP are I pictures, and the actual difficulty level data and the prediction difficulty level data are 15 (L + A, B = The case of 15) will be described as an example.
[0112]
It is considered that the temporal correlation between pictures of video data becomes thinner as the time interval becomes longer. Therefore, in order to calculate the target data amount of a picture being compressed and encoded, it is considered that the difficulty level of a picture that is closer in time has a greater correlation with the difficulty level of a picture that is being compressed and encoded. However, when the prediction difficulty level data is calculated by the simple linear prediction shown in the fifth embodiment, the correlation of the difficulty level with the passage of time is not considered. The calculation of prediction difficulty data by weighted linear prediction described in the sixth embodiment improves the prediction difficulty data system so that the difficulty of a picture closer to the picture being compression-encoded has a greater influence on the error function. It also has a purpose.
[0113]
FIG. 11 is a diagram illustrating a method of calculating prediction difficulty data from actual difficulty data by weighted linear prediction in the sixth embodiment. FIG. 11 shows the case where the actual difficulty data and the prediction difficulty data calculated from the actual difficulty data are 15 (L + A, B = 15), respectively, as described above.
[0114]
As in the first embodiment, the
The
First, the
[0115]
The
[0116]
[Expression 15]
[0117]
[Expression 16]
[0118]
Next, the
[0119]
[Expression 17]
[0120]
Further, the provisional prediction difficulty data D from Expression 171‘~ D’15And an error function E (a) is obtained by
[0121]
[Expression 18]
[0122]
Further, the
As described above, the
[0123]
Further, the
As described above, the
[0124]
In
[0125]
[Equation 19]
[0126]
In addition, it cannot be overemphasized that the linear prediction of this embodiment is applicable also when the actual difficulty level data number and the prediction difficulty number are other than 15.
[0127]
Seventh embodiment
Hereinafter, as a seventh embodiment of the present invention, a method (difference prediction) for calculating prediction difficulty data based on actual difficulty data in consideration of a change in difference between adjacent actual difficulty data will be described. Note that when a plurality of types of picture types are mixed in the same GOP, prediction of difficulty level data becomes complicated. Therefore, for convenience of explanation, also in the seventh embodiment, as in the fifth and sixth embodiments described so far, all the pictures included in the GOP are I pictures, and the actual difficulty level data and the prediction A case where the difficulty data is 15 (L + A, B = 15) will be described as an example.
[0128]
FIG. 12 is a diagram illustrating a method for calculating prediction difficulty data from actual difficulty data by difference prediction in the seventh embodiment. FIG. 12 shows a case where the actual difficulty level data and the prediction difficulty level data calculated from the actual difficulty level data are 15 (L + A, B = 15), respectively, as described above.
[0129]
For example, as shown by a circle in FIG. 12, in the video data of the pattern in which the increase in the value of the actual difficulty data is gradually slowing, the difficulty of the video data is thereafter (after the 16th picture). It is expected that the increase will slow and the difficulty will decrease. In such a case, it is considered that the accuracy of the prediction difficulty data can be further improved by reflecting the difference in values between adjacent actual difficulty data in the prediction difficulty data. The difference prediction shown in the seventh embodiment is intended to improve the accuracy of the prediction difficulty level data from this viewpoint. It should be noted that there are various methods for reflecting the difference in value between adjacent actual difficulty data in the prediction difficulty data, which can be complicated as much as possible, but in the seventh embodiment, the simplest difference value is used. A case of linear approximation will be described.
[0130]
As in the first embodiment, the
The
First, the
[0131]
The
Further, the
[0132]
Further, the
[0133]
[Expression 20]
[0134]
The
In the seventh embodiment, the difference value Δ between pictures adjacent to the
[0135]
Further, the
As described above, the
In addition, it cannot be overemphasized that the linear prediction of this embodiment is applicable also when the actual difficulty level data number and the prediction difficulty number are other than 15.
[0136]
Eighth embodiment
Hereinafter, as an eighth embodiment of the present invention, a method of calculating prediction difficulty level data when a GOP is composed of a plurality of types of pictures will be described. In the eighth embodiment, 1 GOP is composed of 15 pictures in the order of I, B, B, P, B, B, P, B, B, P, B, B, P, B, B, The case where the actual difficulty level data and the prediction difficulty level data are 15 (L + A, B = 15), respectively, will be exemplified.
[0137]
In the fifth to seventh embodiments, for the sake of convenience, the present invention has been described by taking as an example the case where the GOP is composed of only I pictures. However, in practice, the GOP is composed of an I picture, a P picture, and a B picture, and it is necessary to calculate the prediction difficulty level data by a method corresponding to the picture type. The calculation method of the prediction difficulty level data in the eighth embodiment takes this situation into consideration.
[0138]
Forecasting by picture type
First, a method of calculating prediction difficulty data for each picture type and performing prediction simple two-pass encoding is conceivable.
That is, the encoder 162 (FIG. 1) outputs the data amount obtained by compressing and coding each picture of the GOP, the DC component value and the AC component value of the video data after DCT processing to the
As shown in the second embodiment and the fourth to seventh embodiments, the
[0139]
Normalized prediction
Next, there is a method of normalizing the actual difficulty data according to the value of the actual difficulty data of each picture included in the GOP, calculating the prediction difficulty data from the normalized actual difficulty data, and performing the prediction simple two-pass encoding. .
[0140]
When performing normalization prediction, first, the
[0141]
Next, the
[0142]
Hereinafter, the normalized prediction method will be described more specifically with reference to FIG.
FIG. 13 is a diagram illustrating a method of calculating prediction difficulty level data from actual difficulty level data when a GOP is composed of a plurality of types of pictures in the eighth embodiment. FIG. 13 shows a case where the actual difficulty level data and the prediction difficulty level data calculated from the actual difficulty level data are 15 (L + A, B = 15), respectively, as described above.
[0143]
The
Further, the
[0144]
Next, the
Further, among the temporary difficulty data indicated by the crosses in FIG. 13, the temporary difficulty data of I picture is multiplied by 4, the temporary difficulty data of P picture is multiplied by 2, and the temporary difficulty data of B picture is Prediction difficulty data D ′ indicated by □ in FIG.16~ D '30Is generated.
[0145]
As in the fifth embodiment, the
The
[0146]
【The invention's effect】
As described above, according to the present inventionEncoderAccording to the method, uncompressed video data can be compressed and encoded to a predetermined data amount or less without using two-pass encoding.
In addition, according to the video data compression apparatus and method of the present invention, high-quality video can be obtained when compressed video data compression-encoded to a predetermined data amount or less is decompressed and decoded without using two-pass encoding. Can do.
[0147]
Further, according to the present inventionEncoderAccording to the method, the amount of compressed video data after compression encoding is estimated without using two-pass encoding, and the compression rate is adjusted based on the estimated amount of compressed video data to obtain uncompressed video data. Can be compression-encoded.
According to the video data compression apparatus and method of the present invention, the non-compressed video data is compressed and encoded while estimating the data amount of the compressed video data after the compression encoding with high accuracy without using the two-pass encoding. Can be
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration of a video data compression apparatus according to the present invention.
FIG. 2 is a diagram illustrating a configuration of an encoder of a simple two-pass processing unit illustrated in FIG.
FIG. 3 is a diagram showing a configuration of the encoder shown in FIG. 1;
FIGS. 4A to 4C are diagrams illustrating a simple two-pass encoding operation of the video data compression apparatus according to the first embodiment. FIGS.
FIGS. 5A to 5C are diagrams illustrating a simple predictive two-pass encoding operation of the video data compression apparatus according to the second embodiment.
FIG. 6 is a flowchart showing the operation of the video data compression apparatus (FIG. 1) in the second embodiment.
FIGS. 7A to 7C are diagrams illustrating a simple two-pass encoding method performed within the GOP frame by the video
FIGS. 8A to 8C are diagrams showing a simple predictive two-pass encoding method performed within the GOP frame by the video data compression apparatus according to the present invention in the fourth embodiment.
FIG. 9 is a flowchart showing the operation of the video data compression apparatus in the fourth embodiment.
FIG. 10 is a diagram illustrating a method of calculating prediction difficulty data from actual difficulty data by linear prediction in the fifth embodiment.
FIG. 11 is a diagram illustrating a method of calculating prediction difficulty data from actual difficulty data by weighted linear prediction in the sixth embodiment.
FIG. 12 is a diagram illustrating a method of calculating prediction difficulty data from actual difficulty data by difference prediction in the seventh embodiment.
FIG. 13 is a diagram illustrating a method for calculating prediction difficulty level data from actual difficulty level data when a GOP is composed of a plurality of types of pictures in the eighth embodiment.
[Explanation of symbols]
DESCRIPTION OF
Claims (13)
前記映像データを符号化処理する符号化手段と、
前記映像データに対して、前記映像データの第1の符号化区間を符号化処理し、符号化処理後のデータ量を実難度データとして算出する実難度データ算出手段と、
前記実難度データ算出手段により算出された前記実難度データから、前記映像データの第2の符号化区間の実難度データを近似した近似難度データを、予測難度データとして算出する予測難度データ算出手段と、
前記実難度データ算出手段により算出された前記実難度データ及び前記予測難度データ算出手段により算出された前記予測難度データに基づいて、前記映像データの符号化対象ピクチャに対する目標符号量を算出する目標符号量算出手段と、
前記目標符号量算出手段により算出された前記目標符号量となるように、前記符号化対象ピクチャを符号化処理するように、前記符号化手段の符号化処理を制御する符号化制御手段と、
を有する符号化装置。In the encoding device that encodes the video data using the difficulty data indicating the difficulty of the pattern of the video data,
Encoding means for encoding the video data;
An actual difficulty level data calculating means for encoding the first encoding section of the video data with respect to the video data, and calculating the amount of data after the encoding process as actual difficulty level data;
Prediction difficulty data calculation means for calculating approximate difficulty data that approximates the actual difficulty data of the second encoding section of the video data from the actual difficulty data calculated by the actual difficulty data calculation means as prediction difficulty data; ,
A target code for calculating a target code amount for the picture to be encoded of the video data based on the actual difficulty data calculated by the actual difficulty data calculation means and the prediction difficulty data calculated by the prediction difficulty data calculation means A quantity calculating means;
Encoding control means for controlling the encoding process of the encoding means so that the encoding target picture is encoded so as to be the target code quantity calculated by the target code quantity calculating means;
An encoding device.
前記予測難度データ算出手段は、ピクチャ単位で前記予測難度データを算出し、
前記目標符号量算出手段は、ピクチャ単位で前記目標符号量を算出する
請求項1に記載の符号化装置。The actual difficulty level data calculating means calculates the actual difficulty level data in units of pictures,
The prediction difficulty data calculating means calculates the prediction difficulty data in units of pictures,
The encoding apparatus according to claim 1, wherein the target code amount calculation means calculates the target code amount in units of pictures.
前記実難度データ算出手段は、A,B,jを正の整数、符号化対象ピクチャを前記映像データの第(j)番目のピクチャとした場合に、前記映像データの第(j−A)番目のピクチャ〜第(j+L−1)番目のピクチャを前記第1の符号化区間として前記実難度データを算出し、
前記予測難度算出手段は、前記映像データの第(j+L)番目のピクチャ〜第(j+L+B)番目のピクチャを前記第2の符号化区間として前記予測難度データを算出する
請求項2に記載の符号化装置。 The encoding device further includes delay means for delaying the video data by L pictures (L is a positive integer),
The actual difficulty level data calculation means, when A, B, j are positive integers and the encoding target picture is the (j) th picture of the video data, the (j−A) th of the video data. The actual difficulty level data is calculated using the (j + L-1) th picture of the first picture to the first coding section ,
The encoding according to claim 2, wherein the prediction difficulty level calculation means calculates the prediction difficulty level data from the (j + L) th picture to the (j + L + B) th picture of the video data as the second encoding section . apparatus.
請求項1に記載の符号化装置。The encoding apparatus according to claim 1, wherein the prediction difficulty data calculation means calculates the prediction difficulty data by approximating the actual difficulty data and a predetermined function.
前記予測難度データ算出手段は、前記1次関数を用いた直線予測を行うことにより前記予測難度データを算出する
請求項4に記載の符号化装置。The predetermined function is a linear function represented by a straight line,
The encoding apparatus according to claim 4 , wherein the prediction difficulty level data calculation unit calculates the prediction difficulty level data by performing linear prediction using the linear function.
請求項5に記載の符号化装置。The prediction difficulty level data calculating means calculates average actual difficulty level data that is an average value of the actual difficulty level data in the first encoding section , and calculates based on a square error between the straight line and the actual difficulty level data. has been calculated the average error function indicating an error of the real difficulty data for the real difficulty data, wherein said error function calculated in claim 5 for calculating the predictive difficulty data using the linear function that minimizes Encoding device.
請求項5に記載の符号化装置。The prediction difficulty data calculation means calculates average actual difficulty data that is an average value of the actual difficulty data in the first encoding section , and based on an absolute value of a difference between the straight line and the actual difficulty data, the relative calculated the average real difficulty data calculating an error function that indicates an error of the real difficulty data, said error function calculated in claim 5 for calculating the predictive difficulty data using the linear function that minimizes The encoding device described.
請求項7に記載の符号化装置。The prediction difficulty level data calculating means calculates a weighting coefficient that has a greater influence on the error function as the actual difficulty level data of a picture closer to the encoding target picture, and performs weighted linear prediction using the calculated weighting coefficient. The encoding apparatus according to claim 7 , wherein the prediction difficulty level data is calculated by:
請求項5に記載の符号化装置。The prediction difficulty data calculation means calculates a difference value between the actual difficulty data adjacent in the encoding processing order, and uses the calculated difference value as a value on a quadratic function obtained by integrating the linear function. The encoding apparatus according to claim 5 , wherein the prediction difficulty data is calculated by performing difference prediction that approximates the difficulty data.
請求項2に記載の符号化装置。The predictive difficulty data calculating means calculates a ratio of values of actual difficulty data for each picture type of a picture included in the GOP of the video data, normalizes the actual difficulty data with the calculated ratio, and predicts The prediction difficulty data is calculated by calculating provisional prediction difficulty data of each picture included in the GOP of the video data, and multiplying the calculated provisional prediction difficulty by the ratio. Encoding device.
前記映像データに対して、前記映像データの第1の符号化区間を符号化処理し、符号化処理後のデータ量を実難度データとして算出する実難度データ算出工程と、
前記実難度データ算出工程において算出された前記実難度データから、前記映像データの第2の符号化区間の実難度データを近似した近似難度データを、予測難度データとして算出する予測難度データ算出工程と、
前記実難度データ算出工程において算出された前記実難度データ及び前記予測難度データ算出工程において算出された前記予測難度データに基づいて、前記映像データの符号化対象ピクチャに対する目標符号量を算出する目標符号量算出工程と、
前記目標符号量算出工程において算出された前記目標符号量となるように、前記符号化対象ピクチャを符号化処理する符号化工程と、
を有する符号化方法。In the encoding method for encoding the video data using the difficulty data indicating the difficulty of the pattern of the video data,
An actual difficulty level data calculating step of encoding the first encoding section of the video data with respect to the video data, and calculating the amount of data after the encoding process as actual difficulty level data;
Wherein the real difficulty data calculated in real difficulty data calculating step, an approximate difficulty data that approximates the real difficulty data of the second encoding section of the video data, and the predictive difficulty data calculating step of calculating a prediction difficulty data ,
Wherein based on said predictive difficulty data calculated in the real difficulty data and the predictive difficulty data calculating step calculated in real difficulty data calculating step, the target code for calculating a target code amount for the encoding target picture of the video data A quantity calculation step;
An encoding step of encoding the encoding target picture so as to be the target code amount calculated in the target code amount calculation step;
An encoding method comprising:
前記映像データに対して、前記映像データの第1の符号化区間を符号化処理し、符号化処理後のデータ量を実難度データとして算出する実難度データ算出手段と、
前記実難度データ算出手段により算出された前記実難度データから、前記映像データの第2の符号化区間の実難度データを近似した近似難度データを、予測難度データとして算出する予測難度データ算出手段と、
前記実難度データ算出手段により算出された前記実難度データ及び前記予測難度データ算出手段により算出された前記予測難度データに基づいて、前記映像データの符号化対象ピクチャに対する目標符号量を算出する目標符号量算出手段と、
前記目標符号量算出手段により算出された前記目標符号量となるように、前記符号化対象ピクチャを符号化する符号化処理を制御する符号化制御手段と、
を有する符号化制御装置。In an encoding control apparatus for controlling an encoding process for encoding the video data using difficulty data indicating the difficulty of a picture of the video data,
An actual difficulty level data calculating means for encoding the first encoding section of the video data with respect to the video data, and calculating the amount of data after the encoding process as actual difficulty level data;
Prediction difficulty data calculation means for calculating approximate difficulty data that approximates the actual difficulty data of the second encoding section of the video data from the actual difficulty data calculated by the actual difficulty data calculation means as prediction difficulty data; ,
A target code for calculating a target code amount for the picture to be encoded of the video data based on the actual difficulty data calculated by the actual difficulty data calculation means and the prediction difficulty data calculated by the prediction difficulty data calculation means A quantity calculating means;
Encoding control means for controlling an encoding process for encoding the encoding target picture so as to be the target code quantity calculated by the target code quantity calculating means;
An encoding control apparatus having
前記映像データに対して、前記映像データの第1の符号化区間を符号化処理し、符号化処理後のデータ量を実難度データとして算出する実難度データ算出工程と、
前記実難度データ算出工程において算出された前記実難度データから、前記映像データの第2の符号化区間の実難度データを近似した近似難度データを、予測難度データとして算出する予測難度データ算出工程と、
前記実難度データ算出工程において算出された前記実難度データ及び前記予測難度データ算出工程において算出された前記予測難度データに基づいて、前記映像データの符号化対象ピクチャに対する目標符号量を算出する目標符号量算出工程と、
前記目標符号量算出工程において算出された前記目標符号量となるように、前記符号化対象ピクチャを符号化する符号化処理を制御する符号化制御工程と、
を有する符号化制御方法。In an encoding control method for controlling an encoding process for encoding the video data using difficulty data indicating the difficulty of a picture of the video data,
An actual difficulty level data calculating step of encoding the first encoding section of the video data with respect to the video data, and calculating the amount of data after the encoding process as actual difficulty level data;
Wherein the real difficulty data calculated in real difficulty data calculating step, an approximate difficulty data that approximates the real difficulty data of the second encoding section of the video data, and the predictive difficulty data calculating step of calculating a prediction difficulty data ,
Wherein based on said predictive difficulty data calculated in the real difficulty data and the predictive difficulty data calculating step calculated in real difficulty data calculating step, the target code for calculating a target code amount for the encoding target picture of the video data A quantity calculation step;
Such that the target code amount calculated in the target code amount calculation step, the coding control step of controlling an encoding process of encoding the encoding target picture,
An encoding control method comprising:
Priority Applications (6)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP06332796A JP3879134B2 (en) | 1996-03-19 | 1996-03-19 | Encoding apparatus and method thereof |
US08/820,007 US6100931A (en) | 1996-03-19 | 1997-03-18 | Method and apparatus for controlling a target amount of code and for compressing video data |
EP97301871A EP0797359B1 (en) | 1996-03-19 | 1997-03-19 | Encoding and/or compressing video data |
DE69740013T DE69740013D1 (en) | 1996-03-19 | 1997-03-19 | Encoding and / or compression of video data |
US09/201,518 US6324214B2 (en) | 1996-03-19 | 1998-11-30 | Method and apparatus for controlling a target amount of code and for compressing video data |
US09/201,517 US6198769B1 (en) | 1996-03-19 | 1998-11-30 | Method and apparatus for controlling a target amount of code and for compressing video data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP06332796A JP3879134B2 (en) | 1996-03-19 | 1996-03-19 | Encoding apparatus and method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH09261633A JPH09261633A (en) | 1997-10-03 |
JP3879134B2 true JP3879134B2 (en) | 2007-02-07 |
Family
ID=13226058
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP06332796A Expired - Fee Related JP3879134B2 (en) | 1996-03-19 | 1996-03-19 | Encoding apparatus and method thereof |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3879134B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000156023A (en) * | 1998-11-18 | 2000-06-06 | Alpine Electronics Inc | Disk reproducing device |
JP4203707B2 (en) * | 2001-01-31 | 2009-01-07 | 日本電気株式会社 | A moving picture coding apparatus, a moving picture coding method, and a program using the prior analysis. |
JP4254867B2 (en) | 2007-01-31 | 2009-04-15 | ソニー株式会社 | Information processing apparatus and method, program, and recording medium |
JP4488027B2 (en) | 2007-05-17 | 2010-06-23 | ソニー株式会社 | Information processing apparatus and method, and information processing system |
-
1996
- 1996-03-19 JP JP06332796A patent/JP3879134B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH09261633A (en) | 1997-10-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7881373B2 (en) | Video data compression apparatus and method of same | |
JP3864461B2 (en) | Video data compression apparatus and method | |
JP3072035B2 (en) | Two-stage video film compression method and system | |
JP2963416B2 (en) | Video encoding method and apparatus for controlling bit generation amount using quantization activity | |
JPH11346362A (en) | Real time single path variable bit rate control method, and encoder | |
JP2003274415A (en) | Method for adaptively encoding motion image based on temporal and spatial complexity and apparatus therefor | |
JP2004527960A (en) | Dynamic complexity prediction and adjustment of MPEG2 decoding process in media processor | |
JP2003533103A (en) | Video compression method | |
JP3879134B2 (en) | Encoding apparatus and method thereof | |
JP3089941B2 (en) | Inter prediction coding device | |
JP3173257B2 (en) | Encoding method and encoding device | |
JP3069144B2 (en) | Video encoding device | |
JP3858520B2 (en) | Video encoding apparatus and method | |
JP3765129B2 (en) | Encoding apparatus and encoding method | |
JPH10108197A (en) | Image coder, image coding control method, and medium storing image coding control program | |
JPH1066092A (en) | Video data compressor and its method | |
JP3765130B2 (en) | Encoding apparatus and encoding method | |
JP3937248B2 (en) | Video signal encoding method and video signal encoding apparatus | |
JP3918208B2 (en) | Video data compression apparatus and method | |
JP3800965B2 (en) | Data rate converter | |
JPH1066082A (en) | Video data compressor and its method | |
JPH10126794A (en) | Compressor for image signal between motion prediction frames | |
JPH09284772A (en) | Device and method for compressing video data | |
JP4000581B2 (en) | Image coding apparatus and method | |
JP2006136010A (en) | Video data compressing apparatus and method therefor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050614 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050812 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060207 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060405 |
|
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: 20061017 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20061030 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091117 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101117 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111117 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121117 Year of fee payment: 6 |
|
LAPS | Cancellation because of no payment of annual fees |