JP4421734B2 - Encoded data conversion method and data recording medium - Google Patents

Encoded data conversion method and data recording medium Download PDF

Info

Publication number
JP4421734B2
JP4421734B2 JP2000112219A JP2000112219A JP4421734B2 JP 4421734 B2 JP4421734 B2 JP 4421734B2 JP 2000112219 A JP2000112219 A JP 2000112219A JP 2000112219 A JP2000112219 A JP 2000112219A JP 4421734 B2 JP4421734 B2 JP 4421734B2
Authority
JP
Japan
Prior art keywords
quantization step
quantization
encoding
error
simulated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2000112219A
Other languages
Japanese (ja)
Other versions
JP2001204028A (en
Inventor
眞也 角野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2000112219A priority Critical patent/JP4421734B2/en
Publication of JP2001204028A publication Critical patent/JP2001204028A/en
Application granted granted Critical
Publication of JP4421734B2 publication Critical patent/JP4421734B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、符号化データ変換方法,及びデータ記録媒体に関し、特に、データベース等に蓄積された、動画像信号に符号化処理を施して得られる符号化データを、該符号化処理とは異なる符号化方式や符号化パラメータによる再符号化処理により、受信者が復号化可能な符号化データに変換する符号化データ変換方法,及び該再符号化処理をソフトウェアにより実施するためのプログラムを格納したデータ記録媒体に関するものである。
【0002】
【従来の技術】
近年、音声,画像,その他の情報を統合的に扱うマルチメディア時代を迎え、従来からの情報メディア,つまり新聞,雑誌,テレビ,ラジオ,電話等の情報を人に伝達する手段がマルチメディアの対象として取り上げられるようになってきた。一般に、マルチメディアとは、文字だけでなく、図形、音声、特に画像等を同時に関連づけて表すことをいうが、上記従来の情報メディアで扱われる情報をマルチメディアの対象とするには、その情報をディジタル形式の情報(ディジタルデータ)とすることが必須条件となる。
【0003】
ところが、上記各情報メディアで扱われる情報量をディジタル形式の情報量として見積もってみると、文字については1文字当たりの情報量は1〜2バイトであるのに対し、音声については1秒当たり64Kbits(電話品質)、さらに動画については1秒当たり100Mbits(現行テレビ放送品質)以上の情報量が必要となる。言いかえると、その情報量が膨大なものとなる動画などのディジタル形式の情報をそのまま、対応する情報メディアにて扱うことは現実的では無い。例えば、テレビ電話は、64Kbps〜1.5Mbpsの伝送速度を持つサービス総合ディジタル網(ISDN:Integrated Services Digital Network)によってすでに実用化されているが、テレビカメラの映像出力に対応するディジタル動画情報をそのままISDNで送ることは不可能である。
【0004】
そこで、必要となってくるのが情報の圧縮技術であり、例えば、テレビ電話に関しては、ITU−T(国際電気通信連合 電気通信標準化部門)で国際標準化されたH.261やH.263規格の動画圧縮技術が用いられている。また、MPEG1規格の情報圧縮技術によると、通常の音楽用CD(コンパクトディスク)に音声情報とともに画像情報を記録することも可能となる。
【0005】
ここで、MPEG(Moving Picture Experts Group)とは、動画データ(動画像の画像信号)の圧縮技術に関する国際規格であり、MPEG1は、動画データを1.5Mbpsまで、つまりテレビ信号の情報を約100分の1にまで圧縮する規格である。また、MPEG1規格を対象とする伝送速度が主として約1.5Mbpsに制限されていることから、さらなる高画質化の要求をみたすべく規格化されたMPEG2では、動画データが2〜15Mbpsに圧縮される。
MPEG2は、世界標準の最も代表的なデジタル画像符号化方式に関する規格であり、現在デジタルTV放送やデジタルビデオディスク等に関連する技術分野において急速に普及しつつある。
【0006】
さらに現状では、MPEG1,MPEG2と標準化を進めてきた作業グループ(ISO/IEC JTC1/SC29/WG11) によって、物体単位で符号化処理や信号操作を可能とし、マルチメディア時代に必要な新しい機能を実現する動画データの圧縮技術がMPEG4として規格化されつつある。このMPEG4では、当初、低ビットレートの符号化方法の標準化を目指してきたが、現在は、標準化の対象が、インタレース画像に対応した高ビットレートのより汎用的な符号化処理に拡張されている。
【0007】
さて、MPEG2は、汎用符号化処理に対応した規格であり、用途に応じて様々な条件で運用可能である。ここで、MPEG2の運用条件は、表示画面における画素数や画像符号化信号(ビットストリーム)のビットレートなどの、画像品質に関連する要素により決定されるものである。
しかしながら、各画像機器では、ハードウェアの性能がコストの制約により制限されることから、入力画像信号として扱うことができるビットストリームは、予め決められた条件の下で符号化されたビットストリームに限定されることが多い。
例えば、通常品質TV(テレビジョンセット)のデコーダでは、HDTV(High Definition Television)品質の(高画素数の画像に対応した)ビットストリームを復号化することはできない。
一方、画像信号をビットレートが6Mbpsとなるよう符号化して得られたビットストリームを、2時間の映像に相当する分だけ記録可能な記録装置では、6Mbpsのビットレートを有する入力ビットストリームを該装置内部でビットレートが3Mbpsになるよう圧縮することにより、上記ビットストリームを4時間の映像に相当する分だけ記録する長時間記録が可能となる。
【0008】
そこで、各画像機器に入力されるMPEG2のビットストリームを、該各画像機器にてそのハードウエアの性能やその使用目的に応じたMPEG2ビットストリームに変換する再符号化技術が重要となってくる。なお、このような再符号化技術については、近年、多くの研究結果発表が行われている (GertjanKeesman, Robert Hellinghuizen, Fokke Hoeksema, Geert Heideman ,"Transcoding of MPEG bitstreams", Signal Processing:Image Communication Vol.8, 1996, pp.481-500等)。
【0009】
図20は、従来の再符号化システム100aを説明するためのブロック図である。
この従来の再符号化システム100aは、画像データに対するMPEG2準拠の符号化処理により得られたMPEG2のビットストリームEg1を受け、該ビットストリームEg1に対して復号化処理を施して復号化データRg1を生成する復号化ユニットD1と、該復号化データRg1に対して、上記符号化処理とは異なる条件でもってMPEG2準拠の符号化処理を施して再符号化データEg2を出力する符号化ユニットE1とから構成されている。ここで、上記MPEG2のビットストリームは、画像データを、所定数の画素からなる、符号化単位としての画像空間(ブロック)毎に符号化して得られたものである。従って、上記復号化ユニットD1は、ビットストリームに対する復号化処理を、上記ブロック毎に行う構成となっており、また、符号化ユニットE1は、上記復号化データRg1に対する符号化処理を上記ブロック毎に行う構成となっている。
【0010】
次に、再符号化システム100aを構成する復号化ユニットD1の詳細な構成について説明する。
この復号化ユニットD1は、上記符号化されたMPEG2ビットストリームEg1に対して可変長復号化処理を施すVLD(可変長復号化装置)100と、該VLD100の出力Vgに対して逆量子化を施す逆量子化装置101と、該逆量子化装置101の出力IQgに対して、周波数領域のデータを空間領域のデータに変換するIDCT(逆離散コサイン変換)処理を施すIDCT器102とを有している。また上記復号化ユニットD1は、該IDCT器102の出力データITgと予測データMg1とを加算する加算器103と、該加算器103の出力Rg1を上記予測データMg1として格納するフレームメモリ104とを有し、該加算器103の出力Rg1を上記復号化データとして出力する構成となっている。
【0011】
次に、上記再符号化システム100aを構成する符号化ユニットE1の詳細な構成について説明する。
この符号化ユニットE1は、上記復号化ユニットD1からの出力データRg1とその予測データMg2との差分値Dgを計算する減算器105と、該減算器105の出力Dgに対して空間領域のデータを周波数領域のデータに変換するDCT(離散コサイン変換)処理を施すDCT器106と、上記DCT器106の出力Tgに対して、量子化制御信号Cqに基づいて量子化処理を施す量子化装置107とを有している。また上記符号化ユニットE1は、該量子化装置107の出力Qgに対して可変長符号化処理を施すVLC(可変長符号化)器112と、該VLC器の出力Eg2に基づいて上記量子化制御信号Cqを上記量子化装置107に出力するレート制御装置113とを有し、上記VLC器112の出力Eg2を再符号化データとして出力する構成となっている。
【0012】
ここで、上記レート制御装置113は、再符号化データEg2に基づいて、符号化処理の対象となっているブロック(被処理ブロック)に対応するDCT出力Tgを符号化する際の目標ビット数を算出し、得られた目標ビット数を上記量子化制御信号Cqとして上記量子化装置107に出力する構成となっている。
【0013】
また、符号化ユニットE1は、上記量子化装置107の出力Qgに対して逆量子化を施す逆量子化装置108と、該逆量子化装置108の出力IQg2に対してIDCT(逆離散コサイン変換)処理を施すIDCT器109とを有している。また上記符号化ユニットE1は、上記IDCT器109からの出力データITg2と予測データMg2とを加算する加算器110と、該加算器110の出力Rg2を格納するフレームメモリ111とを有し、該フレームメモリ111の出力Mg2を上記予測データとして出力する構成となっている。
【0014】
図21は、上記量子化装置107の詳細な構成を示すブロック図である。
この量子化装置107は、レート制御装置113からの目標ビット数Cqを受けて量子化ステップQs2を導出する量子化ステップ導出器200と、該量子化ステップQs2に基づいてDCT器106の出力Tgに対して量子化処理を施す量子化器201とを有している。
【0015】
次に動作について説明する。
まず、画像信号に対して符号化処理を施して得られる符号化データEg1が復号化ユニットD1に入力される。
VLD器100では、上記符号化データEg1は、可変長復号化処理により量子化係数Vgに変換され、逆量子化装置101へ出力される。該量子化係数Vgは、逆量子化装置101にて、画像信号に対する符号化処理における量子化ステップに基づいて逆量子化処理が施されて周波数成分IQgが復元される。この周波数成分IQgはIDCT器102にて、周波数領域のデータを空間領域のデータに変換するIDCT(逆離散コサイン変換)処理により、空間領域のデータITgに変換される。この空間領域のデータITgが加算器103へ入力されると、該加算器103では、該空間領域のデータITgと予測データMg1との加算処理が行われる。この加算処理により得られる再生データRg1は、フレームメモリ104に復号化済みの画像データ(予測データ)Mg1として格納されるとともに復号化データとして出力される。
【0016】
続いて、上記再符号化システム100aにおける符号化ユニットE1の動作について説明する。
まず、復号化ユニットD1から出力された再生データRg1が、減算器105に入力される。減算器105では、復号化ユニットD1からの再生データRg1とその予測データMg2との差分値が差分データDgとして求められる。該差分データDgは、DCT器106へ出力される。DCT器106では、該差分データDgは、空間領域のデータを周波数領域のデータに変換するDCT(離散コサイン変換)処理により、DCT係数(周波数成分)Tgに変換され、該DCT係数Tgが量子化装置107へ出力される。
【0017】
この量子化装置107では、レート制御装置113からの量子化制御信号Cqに基づいて、DCT器106からのDCT係数Tgに対して量子化処理が施される。つまり、上記量子化装置107の量子化ステップ導出器200では、上記量子化制御信号Cqに基づいて、上記復号化ユニットでの逆量子化処理における量子化ステップとは異なる量子化ステップが導出される。そして、量子化器201では、この導出された量子化ステップに基づいて上記DCT係数Tgの量子化処理が行われる。
【0018】
この量子化処理により得られた量子化値Qgは、VLC器112および逆量子化装置108へ出力される。VLC器112では、上記量子化装置107からの量子化値Qgを可変長符号に変換する可変長符号化処理が行われ、該可変長符号が再符号化データEg2として出力される。また、レート制御装置113では、該VLCの出力Eg2に基づいて上記量子化制御信号Cqが生成され、上記量子化装置107へ出力される。
【0019】
一方、逆量子化装置108では、量子化装置107からの量子化値Qgに対して逆量子化処理が施され、この逆量子化処理により得られたDCT係数IQg2がIDCT器109へ出力される。該DCT係数IQg2は、IDCT器109にて、IDCT(逆離散コサイン変換)処理により空間領域のデータITg2に変換され、該データITg2が加算器110へ出力される。該加算器110では、IDCT器109からの出力データITg2と予測データMg2との加算処理が行われる。この加算処理により得られる再生データRg2は、フレームメモリ111に予測データMg2として格納される。
なお、図20に示す再符号化システム100aでは、入力される符号化データ(ビットストリーム)と、このシステムから出力される符号化データとが、同一の符号化方式(MPEG2方式)に対応するものとなっているが、上記再符号化システム100aは、H261規格,H263規格,MPEG1規格,あるいはMPEG2規格に対応する符号化データを、MPEG4規格に対応する符号化データに変換するものであってもよい。また、上記再符号化システム100aは、MPEG4規格に対応する符号化データを、H263規格に対応する符号化データに変換するものであってもよい。
【0020】
【発明が解決しようとする課題】
ところが、従来の再符号化システムでは、再符号化ストリームに含まれる量子化誤差を小さくすることが困難であるという問題があった。
すなわち、上述したように、再符号化システム100aに入力される符号化データEg1は、画像データに対して量子化処理を含む符号化処理を施して得られたデータであるため、符号化データEg1には、量子化誤差が含まれている。このため、該符号化データEg1に対して復号化処理及び再符号化処理を施して得られる再符号化データEg2は、上記符号化データEg1に含まれる量子化誤差を含むものとなっている。しかも、再符号化処理における量子化条件によっては、再符号化データEg2に含まれる量子化誤差が、上記符号化データEg1に含まれる量子化誤差に比べて著しく大きくなってしまう場合があるという問題点がある。
【0021】
さらに、従来の再符号化システム100aでは、再符号化処理における量子化ステップを符号化誤差の最小化が図れるよう設定することが困難であるという課題があり、以下この課題について詳しく説明する。
図22は、符号化ストリームのビットレートと符号化ストリームに含まれる符号化誤差の関係を説明するための図であり、図22には、レート誤差理論に基づく両者の関係が2次元座標上にグラフCにより示されている。この座標では、横軸がビットレートに縦軸が符号化誤差に対応している。
【0022】
一般に、上記ビットレートと符号化誤差の間には、上記レート誤差理論に基づく関係が成立し、ビットレートに応じて符号化誤差の下限値が決っている。言い換えると、ビットレートが高ければ、符号化誤差をより小さい値にすることができるが、ビットレートが低ければ、符号化誤差をあまり小さくすることはできない。
そこで、直接符号化処理,つまり符号化処理が施されていない画像信号を符号化する処理では、以下のようにして最適量子化ステップを決定するようにしている。
【0023】
まず、画像信号に対して予め2つの量子化ステップを用いて量子化処理を含む符号化処理を施して得られる2組のビットレートと符号化誤差に基づいて、符号化処理の対象となる画像に対応する、ビットレートと符号化誤差の関係を示す関係式(指数関数)を求める。この関係式から符号化ストリームのビットレートに対応する符号化誤差の下限値が分かる。
【0024】
次に、この関係式に基づいて、各フレーム(画面)に対応する総ビット数がフレーム目標ビット数を超えない範囲で、1フレーム毎に符号化誤差が最小となるよう量子化ステップを決定している。つまり、実際の符号化誤差が、許容される最大のビットレートに対応する符号化誤差の下限値に最も近くなるよう量子化ステップを決定している。
ところが、このような最適量子化ステップの導出方法は、ビットレートと符号化誤差の関係を示す関係式(指数関数)に基づくものであり、この関係式が導出できない再符号化処理では利用できないという問題がある。
【0025】
つまり、再符号化処理により得られるストリームでは、符号化誤差が、入力ストリームに含まれる符号化誤差と、再符号化処理により生ずる符号化誤差とを合わせたものとなる。この場合、入力ストリームに含まれる符号化誤差が不明であるため、上記直接符号化処理のように、ビットレートと符号化誤差の関係を示す関係式(指数関数)を求めることができない。
また、このような量子化ステップの導出方法は、フレーム(画面)単位で量子化ステップを決定しているため、符号化誤差を効率よく低減することができないという問題もある。
【0026】
さらに、上記量子化ステップ導出方法は、符号化処理の対象となる対象画面(被処理フレーム)に対する符号化誤差が小さくなるよう量子化ステップを決定するものであり、MPEGにおける画面間予測符号化処理に対応したものとはなっていないという問題があり、以下この問題について簡単に説明する。
図23はMPEGにおける画面間予測符号化処理を説明するための模式図であり、Iフレーム、Pフレーム、Bフレームを含む、MPEG対応の符号化処理の対象となる代表的な動画像の画像データが示されている。
【0027】
ここで、IフレームF(1)は、これに対応する画像データに対して、他のフレームに対応する画像データを参照しない画面内符号化処理が施されるフレームである。PフレームF(3),F(5)は、これらに対応する画像データに対して、表示順序がこれらのフレームより前である符号化処理済みのフレームに対応する画像データを参照する画面間予測符号化処理が施されるフレームである。BフレームF(2),F(4)は、これらに対応する画像データに対して、表示順序がこれらのフレームの前後である符号化処理済みのフレームに対応する画像データを参照する画面間予測符号化処理が施されるフレームである。また、各フレームF(1)〜F(5)には、表示時刻T1〜T5(T1<T2<T3<T4<T5)が設定されている。
【0028】
この場合、PフレームF(3)に対する符号化処理は、IフレームF(1)に対応する画像データを参照して行われ、このPフレームF(3)に対応する画像データは、PフレームF(5)、BフレームF(2),F(4)に対する符号化処理の際に参照されることになる。従って、PフレームF(3)に対する符号化処理に伴う符号化誤差は、少なくとも、フレームF(2),F(4),F(5)に対する画面間予測符号化処理における予測残差を増加させることとなる。
【0029】
言い換えると、画面間予測符号化処理では、フレームF(3)に対する符号化誤差を最小化するようフレームF(3)に対応する量子化ステップを設定するだけでは、フレームF(3)に対応する画像データを参照して符号化処理が行われるフレームF(2),F(4),F(5)に対応する符号化誤差の最小化を効果的に行うことはできないという問題があった。
【0030】
本発明は、上記のような問題点を解決するためになされたもので、画像データの符号化により得られる符号化データに対する再符号化処理を、該符号化データに含まれる量子化誤差の増大を効果的に抑制しつつ行うことができる符号化データ変換方法及び該符号化データ変換方法による処理をコンピュータにより行うためのプログラムを格納したデータ記録媒体を得ることを目的とする。
【0032】
【課題を解決するための手段】
この発明(請求項1)に係る符号化データ変換方法は、画像データに対して第1の直交変換処理及び第1の量子化処理を含む符号化処理を施して得られる第1の符号化データを符号化単位毎に復号化して復号化データを生成する復号化処理と、該復号化データを符号化単位毎に符号化して第2の符号化データを生成する再符号化処理とを含む符号化データ変換方法であって、上記復号化処理を、上記第1の符号化データから得られる量子化係数を、上記第1の量子化処理で用いられた第1の量子化ステップでもって逆量子化する逆量子化処理を含む処理とし、上記再符号化処理を、上記復号化データを直交変換して周波数領域のデータを生成する第2の直交変換処理と、上記第2の符号化データ及び上記第1の量子化ステップに基づいて第2の量子化ステップを導出し、上記周波数領域のデータを該第2の量子化ステップでもって量子化する第2の量子化処理とを含む処理とし、上記第2の量子化処理を、上記第2の符号化データに基づいて量子化ステップ候補を導出する候補導出処理と、該量子化ステップ候補と上記第1の量子化ステップとに基づいて、上記第2の量子化ステップを導出する量子化ステップ導出処理とを含む処理とし、上記量子化ステップ導出処理を、上記量子化ステップ候補が、上記第1の量子化ステップの値以上で、かつ該第1の量子化ステップの値の2倍より小さい範囲内の値を有するときは、上記第2の量子化ステップとして、上記第1の量子化ステップの値と同じ値を有する量子化ステップか、もしくは該第1の量子化ステップの値の2倍以上の値を有する量子化ステップを導出し、上記量子化ステップ候補が上記範囲内以外の値を有するとき、上記第2の量子化ステップとして、該量子化ステップ候補を導出する処理としたものである。
【0039】
この発明(請求項)に係るデータ記録媒体は、請求項1記載の符号化データ変換方法をコンピュータにより行うためのデータ変換プログラムを格納したものである。
【0057】
【発明の実施の形態】
まず、本発明の着眼点及び基本原理について説明する。
従来の技術において説明したように、再符号化システムに入力される符号化データは、画像データに対して量子化処理(第1の量子化処理)を含む符号化処理を施して得られたものであり、この符号化データには、量子化誤差が含まれている。
また、再符号化システムでは、上記符号化データに対して逆量子化処理を含む復号化処理が施されて復号化データが生成され、さらにこの復号化データに対して、再度量子化処理(第2の量子化処理)を含む符号化処理が施されて再符号化データが生成される。
【0058】
本件発明者は、このようにして得られる再符号化データでは、再符号化処理における量子化条件によっては、量子化誤差が上記符号化データに含まれる量子化誤差に比べて著しく大きくなってしまうという課題について研究を重ねた結果、第1の量子化処理における量子化ステップと第2の量子化処理における量子化ステップの大小関係によって、上記再符号化データに含まれる第2の量子化処理に起因する量子化誤差の大きさが著しく変化することを見いだした。
【0059】
以下グラフを用いて簡単に説明する。
図7は、再符号化データのビットレートと該再符号化データに含まれる量子化歪の関係を2次元座標上のグラフにより示す図である。ここでは、横軸はビットレートの大きさに、縦軸は上記量子化歪として量子化誤差の逆数に対応している。ここで、実線のグラフAは、画像データに量子化処理を含む符号化処理を1回のみ施して得られる符号化データ(以下直接符号化データともいう。)に対応する、ビットレートと量子化歪みの関係を示している。点線のグラフBは、上記直接符号化データに対して再符号化処理を施して得られる再符号化データに対応する、ビットレートと量子化歪みの関係を示している。
【0060】
実線のグラフAから分かるように、画像データに対する量子化処理が1回である符号化処理(直接符号化処理)では、符号化処理における量子化ステップを媒介変数とする、ビットレートと量子化歪み(量子化誤差)の逆数との関数は、ほぼ線形なものとなっている。一方、上記直接符号化データに対する再符号化処理では、点線のグラフBで示すように、再符号化処理における量子化ステップを媒介変数とする、ビットレートと量子化歪(量子化誤差)の逆数のとの関数が非線形なものとなる。
【0061】
例えば、直接符号化処理における量子化処理が量子化ステップ値(第1の量子化ステップ値)QPi(QPi=QP)でもって行われている場合に、再符号化処理における量子化ステップ値(第2の量子化ステップ値)QPrを所定範囲(QP≦QPr≦2QP)内に設定すると、直接符号化処理における量子化ステップ値(第1の量子化ステップ値)QPiが所定範囲(QP≦QPi≦2QP)内に設定されているときに比べて、量子化誤差が著しく増加することが分かる。
【0062】
具体的には、再符号化データにおける量子化誤差は、そのビットレートが高い場合、即ち、第1の量子化処理における量子化ステップ値QPiと、第2の量子化処理における量子化ステップ値QPrとの差が小さい場合に大きく、一方、第2の量子化処理における量子化ステップ値QPrが2QP(QPi=QP)以上であって、再符号化データのビットレートが低い場合には、直接符号化処理における量子化誤差と再符号化処理による量子化誤差の差は殆ど無くなることが、今回、実験により判明した。
【0063】
また、第1の量子化処理の量子化ステップより密な量子化ステップで第2の量子化処理を行った場合には、再符号化データにおける量子化誤差は、第2の量子化処理による量子化誤差よりも第1の量子化処理に起因する量子化誤差の方が大きくて支配的なものとなる。従って、第2の量子化処理を第1の量子化処理における量子化ステップより密な量子化ステップで行っても、再符号化データにおけるビットレートが増加するだけで量子化誤差の低減にはつながらず無意味であると言える。
【0064】
そこで、本件発明者は、上記のような再符号化処理における量子化ステップと量子化誤差の関係に着眼し、上記再符号化処理により得られる再符号化データの量子化誤差が、直接符号化処理により得られる符号化データの量子化誤差に比べて著しく大きくなってしまう場合があるという課題を解決するため、画像データに直接符号化処理を施して得られる符号化データに対する再符号化処理では、その量子化処理における量子化ステップ値(第2の量子化ステップ値)QPrを、上記直接符号化処理に含まれる量子化処理の量子化ステップ値(第1の量子化ステップ値)QPiの2倍以上とする方法を考え出した。
【0065】
さらに、MPEG等符号化方式では、画面内符号化処理と画面間符号化処理のそれぞれに対して最適化した量子化処理を用いており、従って、画面内符号化用の量子化手法は画面間符号化用の量子化手法とは異なっている。また、再符号化処理により発生する量子化誤差の大きさは、再符号化処理における量子化手法と密接な関係がある。
【0066】
例えば、画面内符号化処理と画面間符号化処理において、それぞれMPEGに準拠した量子化処理を同じ第1の量子化ステップで行い、さらにこれらの符号化処理により得られるビットストリームに対する、それぞれ同様に第1の量子化ステップのk倍である第2の量子化ステップによる第2の量子化処理を含む再符号化処理を行った場合、画面内符号化処理による量子化誤差が画面間符号化処理による量子化誤差よりも大きくなることも、今回、実験で判明した。
【0067】
そこで、本件発明者は、画面内符号化処理における第1の量子化ステップに対する第2の量子化ステップの比率(再量子化比率)が、画面間符号化処理における再量子化比率に比べて小さくなるように第2の量子化ステップを導出する方法を考え出した。
【0068】
また、本件発明者は、上述した再符号化処理における量子化ステップQrdを符号化誤差の最小化が図れるよう設定することが困難であるという課題を解決すべく鋭意研究を行った結果、ビットレートと符号化誤差の関係は、符号化方式や符号化対象画像によって変化するものであるが、ビットレートの単位変動分当りに対する符号化誤差の変動分(つまり図23に示す曲線グラフCの傾き)が、1フレームを構成する全ての符号化単位(例えば、8×8画素からなるブロック、あるいは16×16画素からなるマクロブロックなど)についてほぼ一定となるようにすれば、1フレームにおけるすべての符号化単位に対応する符号化誤差の平均値が最小となることを見出した。
【0069】
そこで、本発明に係る再符号化方法及び再符号化システムは、入力される符号化ストリームをそのビットレートが削減されるよう量子化して符号化する、量子化ステップが異なる複数種類の模擬符号化処理を符号化単位毎に行って、ビットレートの単位量変動分に対する符号化誤差の変動量を再符号化誤差増加率として求め、各符号化単位に対応する再符号化誤差増加率ができるだけ一定となるよう、各符号化単位毎に量子化ステップを決定するようにしたものである。
以下、本発明の実施の形態について、図1から図19を用いて説明する。
【0070】
(実施の形態1)
図1は、本発明の実施の形態による再符号化システム10を説明するためのブロック図である。
本実施の形態1の再符号化システム10は、画像データに対して量子化処理(第1の量子化処理)を含む符号化処理を施して得られた符号化データEg1を受け、該符号化データEg1に対して逆量子化処理を含む復号化処理を施して復号化データRg1を生成する復号化ユニットDa1と、この復号化データRg1に対して、再度量子化処理(第2の量子化処理)を含む符号化処理(再符号化処理)を施して再符号化データEg2を生成する符号化ユニットEa1とから構成されている。
【0071】
そして、本実施の形態1の再符号化システム10の復号化ユニットDa1は、従来の復号化ユニットD1における逆量子化装置101に代えて、VLD(可変長復号化)器100の出力Vgに対する逆量子化処理を行うとともに、この際に用いられた第1の量子化ステップQs1を符号化ユニットE1へ出力する逆量子化装置101aを備えたものである。ここで、上記逆量子化処理にて用いられた第1の量子化ステップQs1は、画像データに対する量子化処理(第1の量子化処理)にて用いられた量子化ステップと同一である。また本実施の形態1の再符号化システム10の再符号化ユニットEa1は、従来の再符号化ユニットE1における量子化装置107に代えて、DCT器106の出力Tgに対して、レート制御装置113からの量子化制御信号Cq及び上記逆量子化装置101aからの第1の量子化ステップQs1に基づいて量子化処理を施す量子化装置151を備えたものである。
なお、この実施の形態1の再符号化システム10におけるその他の構成は従来の再符号化システム100aと同一である。
【0072】
図2は、符号化ユニットEa1における量子化装置151の具体的な構成を示すブロック図である。
この量子化装置151は、レート制御装置113からの量子化制御信号Cqに基づいて、符号化処理の対象となる対象フレームに対する符号化ビット数が該対象フレームに対する目標ビット数に近づくよう量子化ステップ候補Qsbを導出する量子化ステップ候補導出器250と、該量子化ステップ候補Qsb及び上記第1の量子化ステップQs1に基づいて第2の量子化処理における量子化ステップ(第2の量子化ステップ)Qs2を導出する量子化ステップ導出器251と、上記第2の量子化ステップQs2に基づいてDCT器106の出力Tgに対して量子化処理を施して量子化係数Qgを出力する量子化器201とを有している。
【0073】
図3は、上記量子化装置151における量子化ステップ導出器251の具体的な構成を示すブロック図である。
この量子化ステップ導出器251は、上記量子化ステップ候補導出器250からの量子化ステップ候補Qsbと逆量子化装置101aからの第1の量子化ステップQs1を比較する比較器260と、該比較器260の比較結果CP1に基づいて上記量子化ステップ候補Qsbと上記第1の量子化ステップQs1の一方を選択して出力するスイッチ261とを有し、該スイッチ261の出力を第2の量子化ステップQs2として出力する構成となっている。
具体的には上記スイッチ261は、量子化ステップ候補Qsbが第1の量子化ステップQs1未満であれば第1の量子化ステップQs1が選択され、また量子化ステップ候補Qsbが第1の量子化ステップQs1以上であれば量子化ステップ候補Qsbが選択されるよう構成されている。
【0074】
次に動作について説明する。
この実施の形態1の再符号化システム10に、画像データに対して量子化処理を含む符号化処理を施して得られる符号化データEg1が入力されると、その復号化ユニットDa1では、該符号化データEg1に対して逆量子化処理を含む復号化処理が施されて復号化データ(再生データ)Rg1が生成される。また、上記逆量子化処理の際には、上記量子化処理の際に用いられた第1の量子化ステップQs1が、逆量子化装置101aから符号化ユニットEa1の量子化装置151へ出力される。
【0075】
上記復号化ユニットDa1から出力された再生データRg1が上記符号化ユニットEa1に入力されると、その減算器105では、復号化ユニットDa1からの再生データRg1とその予測データMg2との差分値が求められ、これが差分データDgとしてDCT器106へ出力される。DCT器106では、該差分データDgは、DCT(離散コサイン変換)処理によりDCT係数Tgに変換され、該DCT係数Tgが量子化装置151へ出力される。
【0076】
上記量子化装置151では、復号化ユニットDa1の逆量子化装置101aからの第1の量子化ステップQs1及びレート制御装置113からの量子化制御信号Cqに基づいて、DCT器106からのDCT係数Tgに対し量子化処理(第2の量子化処理)が施される。この量子化処理により得られた量子化値(量子化係数)QgがVLC器112及び逆量子化装置108へ出力される。
【0077】
そして、上記VLC器112では上記量子化装置151からの量子化値Qgを可変長符号に変換する可変長符号化処理が行われ、該可変長符号が再符号化データEg2として出力される。またレート制御装置113では、該VLC器112の出力Eg2に基づいて、対象フレームに対する目標ビット数を示す量子化制御信号Cqが生成され、上記量子化装置151へ出力される。
【0078】
一方、逆量子化装置108では、量子化装置151からの量子化値Qgに対して逆量子化処理が施され、この逆量子化処理により得られたDCT係数IQg2がIDCT器109へ出力される。該DCT係数IQg2は、IDCT器109にてIDCT(逆離散コサイン変換)処理により空間領域のデータITg2に変換されて加算器110へ出力される。加算器110では、IDCT器109からの出力データITg2と上記予測データMg2との加算処理が行われ、この加算処理により得られる再生データRg2は、フレームメモリ111に予測データMg2として格納される。
【0079】
以下、図2を用いて、上記量子化装置151の動作を詳述する。
上記レート制御装置113から出力された、符号化処理の対象となる対象フレームに対する目標ビット数を示す量子化制御信号Cqが量子化ステップ候補導出器250へ入力される。量子化ステップ候補導出器250では、上記対象フレームに対する符号化ビット数が該対象フレームに対する目標ビット数に近づくような量子化ステップ候補Qsbが導出され、量子化ステップ候補Qsbが量子化ステップ導出器251へ出力される。
すると、量子化ステップ導出器251では、上記量子化ステップ候補Qsbと復号化ユニットDa1からの第1の量子化ステップQs1とに基づいて第2の量子化ステップQs2が導出され、第2の量子化ステップQs2が量子化器201へ出力される。該量子化器201では、上記第2の量子化ステップQs2に基づいて、DCT器の出力Tgに対し量子化処理が施される。
【0080】
このとき、図3で示す上記量子化ステップ導出器251では、比較器260に上記量子化ステップ候補導出器250の出力Qsb(量子化ステップ候補)と復号化ユニットDa1の逆量子化装置101aの出力Qs1(第1の量子化ステップ)が入力される。上記比較器260では、上記量子化ステップ候補導出器250の出力Qsbと上記逆量子化装置101aの出力Qs1の比較が行われ、比較結果CP1がスイッチ261へ出力される。スイッチ261では、上記比較結果CP1に基づいて、上記量子化ステップ候補導出器250の出力Qsbと上記逆量子化装置101aの出力Qs1の一方が選択されて第2の量子化ステップQs2として導出される。
【0081】
このように本実施の形態1による再符号化システムによれば、復号化ユニットDa1における逆量子化装置101aを、VLD器100の出力Vgに対する逆量子化処理を行うとともに、この逆量子化処理の際に用いられた第1の量子化ステップQs1を符号化ユニットEa1へ出力するよう構成し、また符号化ユニットEa1における量子化装置151を、対象フレームに対する目標ビット数を示す量子化制御信号Cq及び上記第1の量子化ステップQs1に基づいて、上記第1の量子化ステップQs1よりも大きな量子化ステップで量子化処理を行うよう構成したので、符号化データEg1に対する再符号化処理を、ビット数の増大を招くことなく量子化誤差の増加を抑制しつつ行うことができる。
【0082】
また、この実施の形態1では、上記第2の量子化ステップQs2として、必要に応じて、上記量子化制御信号Cq(目標ビット数)に基づいて得られた量子化ステップ候補Qsbと第1の量子化ステップの一方が用いられるため、上記第2の量子化ステップとして量子化ステップ候補Qsbのみを用いる場合に比べて再符号化データEg2のフレーム当たりのビット数は、目標ビット数に対し若干増減してしまうが、このビット数の増減は無視できる程度のものである。つまり、この実施の形態1では、フレームにおける所定数の画素数からなるブロック単位で、かつ、第1の量子化ステップQs1よりも大きな量子化ステップでもって再符号化処理における量子化処理が行われる。このため、実際の用途において、重要であるフレーム単位でビット数が変動することによるマクロ的なビット数の増減は、無視できる程度のものとなっている。従って、この実施の形態1における第1の量子化ステップQs1よりも大きな量子化ステップで第2の量子化処理を行う構成は、この実施の形態1のレート制御、つまり再符号化データに基づいて量子化ステップによりフレーム当たりのビット数を制御するフィードバック制御を阻害するものではない。
【0083】
(実施の形態2)
図4は、本発明の実施の形態2による再符号化システムを構成する量子化装置152を説明するためのブロック図である。
本実施の形態2の再符号化システムにおける量子化装置152は、実施の形態1の量子化装置151における量子化ステップ導出器251に代えて、量子化ステップ候補Qsbを、第1の量子化処理における量子化ステップ(第1の量子化ステップ)Qs1から得られる閾値Qth及び該第1の量子化ステップQs1を定数倍して得られる定数倍値Qmuと比較し、この比較結果に応じて第2の量子化ステップQs2を導出する量子化ステップ導出器252を備えたものである。ここで、上記閾値Qthは、第1の量子化ステップQs1のm倍であり、上記定数倍値Qmuは、第1の量子化ステップQs1のn倍(n>m)としており、具体的には、mは1.5,nは2である。
そして、本実施の形態2の再符号化システムにおけるその他の構成は、実施の形態1の再符号化システム10と全く同一の構成となっている。
【0084】
図5は、該量子化装置152を構成する量子化ステップ導出器252を示している。
上記量子化ステップ導出器252は、第1の量子化ステップQs1に基づいて閾値Qth(=m×Qs1)を導出する閾値導出器262と、該閾値Qthと量子化ステップ候補導出器250にて生成された量子化ステップ候補Qsbとを比較して、比較結果を示す比較出力CP2を出力する比較器263と、該比較器263の出力CP2に基づいて、上記第1の量子化ステップQs1と上記量子化ステップ候補Qsbの一方を選択して選択量子化ステップQseとして出力するスイッチ264とを有している。ここで、該スイッチ264は、上記比較器263での比較の結果、量子化ステップ候補Qsbが上記閾値Qth未満であるときは、第1の量子化ステップQs1を選択量子化ステップQseとして出力し、量子化ステップ候補Qsbが上記閾値Qth以上であるときは、該量子化ステップ候補Qsbを選択量子化ステップQseとして出力するよう構成されている。
【0085】
また、上記量子化ステップ導出器252は、第1の量子化ステップQs1を定数倍(n倍)して定数倍値Qmu(=n×Qs1)を出力する定数倍器265と、該定数倍値Qmuと上記量子化ステップ候補導出器250からの量子化ステップ候補Qsbとを比較して、比較結果を示す比較出力CP3を出力する比較器266と、該比較器266からの比較出力CP3に基づいて、上記スイッチ264からの選択量子化ステップQseと上記定数倍器265からの定数倍値Qmuの一方を選択して、第2の量子化ステップQs2として出力するスイッチ267とを有している。ここで、該スイッチ267は、上記比較器266での比較の結果、量子化ステップ候補Qsbが上記定数倍値Qmu未満であるときは、上記定数値Qmuを第2の量子化ステップQs2として出力し、量子化ステップ候補Qsbが上記定数倍値Qmu以上であるときは、スイッチ264からの選択量子化ステップQseを第2の量子化ステップQs2として出力するよう構成されている。
なお、上記定数倍器265での倍数値nは、上記閾値導出器262での倍数値m以上であり、この閾値導出器262における倍数値mは、目標ビットレートやフレームレート、量子化方式等によって切替えることが可能である。
【0086】
また図6は、上記のような構成の量子化ステップ導出器252により得られる第2の量子化ステップQs2と、量子化ステップ候補導出器250から出力される量子化ステップ候補Qsbの関係をグラフDにより示している。なお、m,nはそれぞれm=1.5,n=2としている。
このグラフDから分かるように量子化ステップ導出器252では、量子化ステップ候補Qsbが閾値Qth未満であれば、第1の量子化ステップQs1が第2の量子化ステップQs2として出力される。また、量子化ステップ候補Qsbが閾値Qth(1.5×Qs1)以上で上記定数倍値Qmu(=2×Qs1)未満であれば、第1の量子化ステップQs1の2倍(2×Qs1)が第2の量子化ステップQs2として選択される。さらに、量子化ステップ候補Qsbが上記倍数値Qmu(=2×Qs1)以上であれば、量子化ステップ候補Qsbが第2の量子化ステップQs2として選択される。
【0087】
次に動作について説明する。
なお、本実施の形態2の再符号化システムでは、その量子化装置152を構成する量子化ステップ導出器252以外の動作は、実施の形態1の再符号化システム10におけるものと同一である。従って、以下、量子化ステップ導出器252の動作についてのみ詳しく説明する。
【0088】
本実施の形態2の再符号化システムでは、復号化ユニットDa1にて再生されたデータRgに対して符号化ユニットにて量子化処理を含む符号化処理が施される際、量子化装置152では、量子化ステップ候補導出器250にて量子化ステップ候補Qsbが生成される。すると、量子化ステップ導出器252では、復号化ユニットDa1の逆量子化装置101aから供給される第1の量子化ステップQs1から得られる閾値Qth及び定数倍値Qmuに基づいて、上記第1の量子化ステップQs1,定数倍値Qmu,及び量子化ステップ候補Qsbのうちの1つが第2の量子化ステップQs2として選択される。そして、量子化器201では、該第2の量子化ステップQs2に基づいて周波数領域のデータTgに対して量子化処理が施される。
【0089】
以下、上記量子化ステップ導出器252の動作について具体的に説明する。
上記量子化ステップ導出器252に復号化ユニットから第1の量子化ステップQs1が入力されると、閾値導出器262では、第1の量子化ステップQs1をm倍する演算により所定の閾値Qthが導出され、この閾値Qthが比較器263へ出力される。すると、比較器263では、量子化ステップ候補導出器250からの量子化ステップ候補Qsbが閾値導出器262からの閾値Qthと比較され、その比較結果を示す比較出力CP2がスイッチ264へ出力される。スイッチ264では、上記比較出力CP2に基づいて、上記第1の量子化ステップQs1と量子化ステップ候補Qsbの一方が選択されて選択量子化ステップQseとしてスイッチ267へ出力される。
【0090】
このとき、定数倍器265では、上記復号化ユニットDa1からの第1の量子化ステップQs1をn倍する演算により定数倍値Qmuが生成され、この定数倍値Qmuがスイッチ267および比較器266へ出力される。この比較器266では、量子化ステップ候補導出器250からの量子化ステップ候補Qsbが、定数倍器265からの定数倍値Qmuと比較されて、その比較結果を示す比較出力CP3がスイッチ267へ出力される。すると、上記スイッチ267では、上記比較出力CP3に基づいて、上記定数倍器265からの定数倍値Qmuと上記スイッチ264にて選択された選択量子化ステップQseの一方が選択されて第2の量子化ステップQs2として導出される。
【0091】
このように本実施の形態2による再符号化システムでは、再符号化データのビットレートと該再符号化データに含まれる量子化歪との関係に基づいて量子化ステップ候補Qsbを導出する量子化ステップ候補導出器250と、該量子化ステップ候補Qsb及び逆量子化処理で用いられる第1の量子化ステップQs1に基づいて再符号化処理における量子化ステップ(第2の量子化ステップ)Qs2を導出する量子化ステップ導出器252とを備え、上記量子化ステップ候補Qsbが、この量子化ステップ候補Qsbと第1の量子化ステップQs1及びその定数倍値Qmuとの大小関係から決まる最適な範囲内の値を有するとき、上記量子化ステップ候補Qsbを第2の量子化ステップQs2として出力し、上記量子化ステップ候補Qsbが該最適な範囲外の値を有するときには、第1の量子化ステップQs1あるいはその定数倍の量子化ステップQmuを出力するので、符号化データEg1に対する再符号化処理を、ビット数の増大を招くことなく量子化誤差の増大を効果的に抑制しつつ行うことができる。
【0092】
なお、本実施の形態2では、上記量子化ステップ候補Qsbが、定数倍値Qmu(第1の量子化ステップQs1のn倍)未満である場合は、第2の量子化ステップQs2を、閾値Qth(m×Qs1)を基準として、第1の量子化ステップQs1または第1の量子化ステップQs1のn倍である定数倍値Qmuのいずれかに丸めるようにしているが、上記閾値Qthを変動させるようにしてもよい。
例えば、上記閾値Qthを、第2の量子化ステップQs2が、上記第1の量子化ステップQs1と、上記第1の量子化ステップQs1のn倍である定数倍値Qmuとの間で頻繁に切替わるよう変動させることにより、符号化ビットレートを所定のビットレートとするレート制御を応答性の高いものとすることも可能である。
【0093】
具体的には、閾値Qthを以下のように変動させ、求められた新しい閾値Qth’に基づいて量子化ステップQs2を決定する。
まず、量子化ステップ候補Qsbの平均を目標の平均量子化ステップQtとして求め、第2の量子化ステップQs2の平均を実際の平均量子化ステップQaveとして求める。
そして、実際の平均量子化ステップQaveが目標の平均量子化ステップQtより大きい場合、言い替えると、量子化ステップ候補Qsbが平均的に小さい値となっている場合、Qth’=Qth/2を新しい閾値とする。但し、Qth’がQs1より小さい場合、Qth’=Qs1とする。
また、実際の平均量子化ステップQaveが目標の平均量子化ステップQtより小さい場合、言い替えると、量子化ステップ候補Qsbが平均的に大きい値となっている場合、Qth’=Qth+Qth/2を新しい閾値とする。但し、Qth’がQmuより大きい場合、Qth’=Qmuとする。
【0094】
(実施の形態3)
図8は、本実施の形態3による再符号化システム30を説明するためのブロック図である。
本実施の形態3の再符号化システム30は、実施の形態1の符号化ユニットEa1における量子化装置151に代えて、画面内符号化処理及び画面間符号化処理に対応する量子化ステップをそれぞれ導出し、各符号化処理に対応した量子化ステップでもって量子化処理を行う量子化装置153を備え、画面内符号化処理と画面間符号化処理の切り替えがブロック単位またはフレーム単位で行われるのに応じて、量子化処理も画面内符号化処理に対応したもの(画面内量子化処理)と画面間符号化処理に対応したもの(画面間量子化処理)との間で切り替えられよう構成されている。
【0095】
図9は、上記量子化装置153の構成を示すブロック図である。
この量子化装置153は、復号化ユニットDa1にて逆量子化処理の際に用いられた第1の量子化ステップQs1に基づいて、画面内量子化処理における各マクロブロックに対する量子化ステップを1フレーム毎に平均して得られる値Qintra(第1の画面内平均量子化ステップQsI1)を算出する画面内平均量子化ステップ導出器270と、上記第1の量子化ステップQs1に基づいて、画面間量子化処理における各マクロブロックに対する量子化ステップを1フレーム毎に平均して得られる値Qinter(第1の画面間平均量子化ステップQsP1)を算出する画面間平均量子化ステップ導出器271とを有している。
【0096】
また、この量子化装置153にて、符号化処理の対象となる対象フレーム直前の前フレームまでの量子化処理の際に用いられる第2の量子化ステップQs2に基づいて、画面内量子化処理における各マクロブロックに対する量子化ステップを1フレーム毎に平均して得られる値Qintra(第2の画面内平均量子化ステップQsI2)を算出する画面内平均量子化ステップ導出器272aと、上記第2の量子化ステップQs2に基づいて、画面間量子化処理における各マクロブロックに対する量子化ステップを1フレーム毎に平均して得られる値Qinter(第2の画面間平均量子化ステップQsP2)を算出する画面間平均量子化ステップ導出器272bとを有している。
【0097】
さらに、この量子化装置153は、上記第1,第2の画面内平均量子化ステップSQsI1,QsI2と第1,第2の画面間平均量子化ステップQsP1,QsP2を参照して、量子化制御信号Cqとして入力される目標ビット数から量子化ステップQs2を導出する量子化ステップ導出器273と、該第2の量子化ステップQs2に基づいてDCT器106からの出力Tgを量子化する量子化器201とを有している。
【0098】
また、図10は、量子化ステップ導出器273の具体的な構成を示すブロック図である。
この量子化ステップ導出器273は、上記第1の画面内平均量子化ステップQsI1及び上記第1の画面間平均量子化ステップQsP1に基づいて、量子化制御信号Cqにより示される被処理マクロブロックに対応する目標ビット数から、再量子化処理の対象となる被処理フレームに対する目標ビット数fCgを算出するフレーム目標ビット数決定器710と、被処理フレームに対する目標ビット数fCg及びレート制御装置113からの量子化制御信号Cqに基づいて、被処理マクロブロックに対して使用可能なビット数mCgを生成するマクロブロック目標ビット数決定器711と、該ビット数mCg,上記第2の画面内平均量子化ステップQsI2,上記第2の画面間平均量子化ステップQsP2及びレート制御装置113からの量子化制御信号Cqに基づいて、被処理マクロブロックに対する量子化ステップQs2を決定する量子化ステップ決定器712とを有している。
【0099】
ここで、第1の画面内平均量子化ステップQsI1の値をQintra、第1の画面間平均量子化ステップQsP1の値をQinterとし、画面内符号化フレーム,画面間符号化フレームの1フレーム当たりの符号化ビット数をそれぞれNintra、Ninterとし、画面内符号化処理および画面間符号化処理における再量子化誤差の比率が補正されるよう、画面内再量子化ステップと画面間再量子化ステップの比をα×Qintra:Qinterとする。すると、量子化ステップと符号化ビット数は反比例関係にあることから、再量子化後の画面内符号化フレームと画面間符号化フレームの間での1フレーム当たりのビット数の比は、Nintra/α:Ninterとなる。ここで、αは0<α<1を満たす値となっている。
【0100】
そこで、上記フレーム目標ビット数決定器710は、再符号化処理により出力される単位時間当たりのビット数に関する、画面内符号化フレームと画面間符号化フレームの間の比率が、Nintra/α×画面内符号化フレーム数:Ninter×画面間符号化フレーム数となるよう、各フレーム当たりの目標ビット数fCgを生成する構成としている。
【0101】
また、上記マクロブロック目標ビット数決定器711は、フレーム目標ビット数決定器710により導出された1フレーム当たりの目標ビット数fCgから、被処理フレームにおける既処理マクロブロックに対する符号化処理で発生したビット数を減算し、該被処理フレームに対応する残りのビット数(つまり該被処理フレームにおける未処理マクロブロックに対する符号化処理に使用できるビット数)を未処理マクロブロック数で除算し、得られたビット数を被符号化マクロブロックに使用できるビット数としてマクロブロック量子化ステップ決定器712に出力する構成となっている。
【0102】
また、マクロブロックに対応するビット数と量子化ステップは、一般に下記の関係にある。
画面内符号化量子化ステップ
= Kintra/被符号化マクロブロックに使用できるビット数 (式A)
【0103】
画面間符号化量子化ステップ
= Kinter/被符号化マクロブロックに使用できるビット数 (式B)
ここで、Kintra及びKinterは定数である。また、画面内符号化量子化ステップは、画面内符号化処理における量子化処理(画面内量子化処理)にて処理対象となる各マクロブロックに対して用いられる量子化ステップ、また、画面間符号化量子化ステップは、画面間符号化処理における量子化処理(画面間量子化処理)にて処理対象となる各マクロブロックに対して用いられる量子化ステップである。
【0104】
上記マクロブロック量子化ステップ決定器712では、レート制御器113からの目標ビット数Cg,画面内平均量子化ステップQsI2,画面間平均量子化ステップQsP2に基づいて下記の(式C)および(式D)により、各マクロブロック毎にKintra及びKinterの値を求める。次に、得られたKintra及びKinterの値により上記(式A)または(式B)におけるKintra及びKinterを更新し、これらの(式A)及び(式B)に、被符号化マクロブロックに対して使用できるビット数を代入することにより、各マクロブロックに対応する量子化ステップQs2を導出する。
Kintra
= 画面内平均量子化ステップ
×(画面内符号化済みビット数/画面内符号化済マクロブロック数)(式C)
Kinter
= 画面間平均量子化ステップ
×(画面間符号化済みビット数/画面間符号化済マクロブロック数)(式D)
【0105】
次に作用効果について説明する。
MPEGなどの符号化方式では、画像信号(画像データ)に対する符号化処理は、画面内の画素値相関を利用する画面内符号化処理と、画面間の画素値相関を利用する画面間符号化処理との間で、マクロブロック単位もしくはフレーム単位で切替えられる。さらに上記符号化処理の際には、量子化方式も、画面内符号化処理に応じた方式と画面間符号化処理に応じた方式との間で切り替えられる。
【0106】
ところで、量子化方式の違いによって、再符号化処理により生ずる量子化誤差も異なるため、再符号化歪を低減するためには符号化処理の種類に対応した量子化ステップの導出を行う必要がある。
特にMPEG方式では、画面内符号化処理により得られた画面内符号化データ、及び画面間符号化処理により得られた画面間符号化データに対する再符号化処理の際に、これらの符号化データに対して同じ量子化ステップでもって量子化処理を施した場合、画面内符号化データに対する再符号化誤差が、画面間符号化データに対する再符号化誤差よりも大きくなる傾向がある。
そこで、画面内符号化データに対する再符号化処理では、画面間符号化データに対する再符号化処理に比べてより密な量子化ステップ(つまりより小さい量子化ステップ)で再量子化処理を行う必要がある。また、画面内符号化データに対する再符号化処理により発生するビット数は、目標ビット数となるようにする必要がある。
【0107】
つまり、この実施の形態3の量子化ステップ導出器273では、画面内平均量子化ステップ導出器270および画面間平均量子化ステップ導出器271の出力である平均量子化ステップに基づいて、量子化器201での量子化処理における画面内符号化量子化ステップ及び画面間符号化量子化ステップ、並びに再符号化処理により発生する1フレームに対応するビット数が予測される。そして、量子化ステップ導出器273では、これらの予測値に基づいて、上記画面内符号化量子化ステップ及び画面間符号化量子化ステップが、各フレームに対応するビット数が平均的に所定のビット数となり、しかも画面内符号化量子化ステップが画面間符号化量子化ステップよりも密になるよう決定される。
また、画面内平均量子化ステップ導出器272a及び画面間平均量子化ステップ導出器272bでは、それぞれ量子化ステップ導出器273にて第2の量子化ステップとして導出した画面内量子化ステップ及び画面間量子化ステップの平均値が計算される。さらに、量子化ステップ導出器273では、これらの平均値に基づいて、第2の量子化ステップの導出処理に必要な各マクロブロックに対応する目標ビット数と量子化ステップの関係を示す関係式(上記(式A)及び(式B))が補正される。
【0108】
以下、本実施の形態3の再符号化システムの具体的な動作について説明する。
なお、本実施の形態3の再符号化システムでは、その符号化ユニットEa1を構成する量子化装置153以外の動作は、実施の形態1の再符号化システム10におけるものと同一である。従って、以下、量子化装置153の動作について説明する。
【0109】
本実施の形態3の再符号化システムでは、復号化ユニットDa1にて生成されたデータRgに対して符号化ユニットEa1にて量子化処理を含む符号化処理が施される際、量子化装置153では、量子化ステップ導出器273にて画面内符号化処理及び画面間符号化処理の各処理に応じた第2の量子化ステップQs2がそれぞれ導出され、該第2の量子化ステップに基づいて周波数領域データTgに対する量子化処理が施される。
【0110】
すなわち、復号化ユニットDa1から第1の量子化ステップQs1が上記量子化装置153に入力されると、画面内平均量子化ステップ導出器270及び画面間平均量子化ステップ導出器271では、入力された第1の量子化ステップQs1より、第1の画面内平均量子化ステップQsI1及び第1の画面間平均量子化ステップQsP1がそれぞれ算出され、これらの量子化ステップQsI1及びQsP1が量子化ステップ導出器273へ出力される。
【0111】
上記量子化ステップ導出器273では、上記両量子化ステップQsI1及びQsP1と、再符号化処理済のフレームに対する第2の画面内平均量子化ステップQsI2及び第2の画面内平均量子化ステップQsP2とを参照して、量子化制御信号Cqにより示される目標ビット数に基づいて第2の量子化ステップQs2が導出され、該第2の量子化ステップQs2が量子化器201へ出力される。
【0112】
すると、この量子化器201では、導出された上記第2の量子化ステップQs2に基づいて、符号化ユニットEa1におけるDCT器106からの周波数領域のデータTgに対して量子化処理が施される。また、画面内平均量子化ステップ導出器272aおよび画面間平均量子化ステップ導出器272bでは、それぞれ上記量子化ステップ導出器273の出力Qs2に基づいて、上記第2の画面内平均量子化ステップQsI2及び第2の画面間平均量子化ステップQsP2が算出される。
【0113】
以下、図10を用いて上記量子化ステップ導出器273の動作を詳述する。
上記量子化ステップ導出器273に、画面内平均量子化ステップ導出器270からの第1の画面内平均量子化ステップQsI1と、画面間平均量子化ステップ導出器271からの第1の画面間平均量子化ステップQsP1が入力されると、フレーム目標ビット数決定器710では、これらの量子化ステップQsI1及びQsP1に基づいて、レート制御装置113からの量子化制御信号Cqが示す各マクロブロックに対する目標ビット数から各フレーム当たりの目標ビット数fCgが算出され、マクロブロック目標ビット数決定器711へ出力される。
【0114】
該マクロブロック目標ビット数決定器711では、まず量子化制御信号Cqに基づいて被処理フレームにおける既処理マクロブロックの符号化処理にて発生したビット数、及び未処理マクロブロックの数が算出される。次に、マクロブロック目標ビット数決定器711では、上記フレーム目標ビット数決定器710からの1フレーム当たりの目標ビット数fCgに基づいてこの目標ビット数fCgから、上記被処理フレームにおける既処理マクロブロックの符号化処理にて発生したビット数が減算され、該被処理フレームの残りのビット数が算出される。そして算出された上記被処理フレームの残りのビット数は、上記未処理マクロブロックの数により除算される。これにより得られたビット数が、被処理マクロブロックに使用できるビット数mCgとして、マクロブロック量子化ステップ決定器712へ出力される。
【0115】
このマクロブロック量子化ステップ決定器712では、上記被符号化マクロブロックに使用できるビット数mCgが入力されると、レート制御装置113の出力である量子化制御信号Cqと、画面内平均量子化ステップ導出器272aの出力である第2の平均量子化ステップQsI2及び画面間平均量子化ステップ導出器272bの出力である第2の平均量子化ステップQsP2とを参照して、マクロブロックに対応するビット数と量子化ステップの関係(上記(式A)〜(式D))に基づいて、被処理マクロブロックに対する量子化ステップQs2が導出される。
【0116】
このように本実施の形態3による再符号化システム30では、量子化ステップ導出器273を、画面内符号化処理および画面間符号化処理における再量子化誤差の比率が補正されるよう、各マクロブロックに対応する第2の量子化ステップを導出する構成としたので、画面内符号化処理と画面間符号化処理を含む再符号化処理を、量子化誤差の増大を効果的に抑制しつつ行うことができる。
【0117】
(実施の形態4)
図11は本発明の実施の形態4による再符号化システムを説明するためのブロック図である。
本実施の形態4の再符号化システム40は、入力ストリームVinに対して、符号化単位毎に逆量子化処理を含む復号化処理を施して復号画像データ(復号化ストリーム)Vdecを出力するとともに、該逆量子化処理で用いられた量子化ステップQinを出力する復号化器U1と、上記復号画像データVdecに対して、参照画面の画像データを参照して、量子化ステップQaによる量子化処理及び局所復号化処理を含む第1の模擬符号化処理を符号化単位毎に施す第1の模擬符号化器U2aと、上記画像復号データVdecに対して参照画面の画像データを参照して、上記量子化ステップQaより大きい量子化ステップQbによる量子化処理及び局所復号化処理を含む第2の模擬符号化処理を符号化単位毎に施す第2の模擬符号化器U2bとを有している。なお、上記入力ストリームVinは、画像データに対して、その符号化単位毎に量子化処理を含む符号化処理を施して得られる画像符号化データである。また、上記符号化単位は、1画面(フレーム)における16×16画素からなる領域(マクロブロック)としている。
【0118】
ここで、上記第1の模擬符号化器U2aは、上記第1の模擬符号化処理に含まれる局所復号化処理により得られた局所復号画像データVstraを出力するとともに、該模擬符号化処理に含まれる量子化処理にて用いた、各符号化単位に対応する量子化ステップQa,該模擬符号化処理により生じた、各符号化単位に対応する符号化誤差(模擬符号化増加誤差)Da,及び該模擬符号化処理により発生した符号化単位当たりのビット数(模擬符号化ビット数)Raを、各符号化単位毎に出力するよう構成されている。また、上記第2の模擬符号化器U2bは、上記第2の模擬符号化処理に含まれる局所復号化処理により得られた局所復号画像データVstrbを出力するとともに、該模擬符号化処理に含まれる量子化処理にて用いた量子化ステップQb,該模擬符号化処理により生じた符号化誤差(模擬符号化増加誤差)Db,及び該模擬符号化処理により発生した符号化単位当たりのビット数(模擬符号化ビット数)Rbを、各符号化単位毎に出力するよう構成されている。
【0119】
さらに、上記再符号化システム40は、上記第1の模擬符号化器U2aから出力される局所復号画像データVstraを格納する第1の模擬メモリU3aと、上記第2の模擬符号化器U2bから出力される局所復号画像データVstrbを格納する第2の模擬メモリU3bとを有している。
【0120】
また、上記再符号化システム40は、上記第1の模擬符号化器U2aから出力される量子化ステップQa,模擬符号化増加誤差Da,及び模擬符号化ビット数Raと、第2の模擬符号化器U2bから出力される量子化ステップQb,模擬符号化増加誤差Db,及び模擬符号化ビット数Rbと、各フレーム(画面)に割り当てられるビット数(フレーム目標ビット数)Rdとに基づいて、各符号化単位に対応する最適量子化ステップQdとして上記量子化ステップQa及びQbの一方を選択して出力する量子化ステップ導出器U74を有している。具体的には、この量子化ステップ導出器U74では、上記量子化ステップQa,Qb、模擬符号化増加誤差Da,Db、及び模擬符号化ビット数Ra,Rbから、各符号化単位毎に再符号化誤差増加率λを求め、各符号化単位に対応する再符号化誤差増加率ができるだけ一定となるよう、各符号化単位に対応する量子化ステップとして上記量子化ステップQa及びQbの一方が選択されるようになっている。
【0121】
また、上記再符号化システム40は、上記復号画像データVdecに対して、量子化ステップQdによる量子化処理及び局所復号化処理を含む再符号化処理を、参照画面の画像データを参照して施して、再符号化ストリームVoutを出力するとともに、該局所復号化処理により得られる局所復号画像データVstrdを出力する主符号化器U2dと、該局所復号画像データVstrdを格納する主メモリU3dと、外部から供給される目標ビットレートRateと再符号化ストリームVoutのビットレートに基づいて、上記フレーム目標ビット数Rdを算出するフレーム目標ビット数計算器U6とを有している。
【0122】
ここで、上記第1の模擬メモリU3aは、上記第1の模擬符号化器U2aからの局所復号画像データVstraを格納し、該格納された画像データを、被処理画面に続く未処理画面に対する模擬符号化処理の際に参照画面の画像データ(参照画像データ)Vaとして上記第1の模擬符号化器U2aに出力する構成となっている。上記第2の模擬メモリU3bは、上記第2の模擬符号化器U2bからの局所復号画像データVstrbを格納し、該格納された画像データを、被処理画面に続く未処理画面に対する模擬符号化処理の際に参照画面の画像データ(参照画像データ)Vbとして第2の模擬符号化器U2bに出力する構成となっている。さらに、上記主メモリU3dは、上記格納された局所復号画像データVstrdを、被処理画面に続く未処理画面に対する再符号化処理の際に参照画面の画像データ(参照画像データ)Vrefdとして上記主符号化器U2dに出力するとともに、被処理画面に続く未処理画面に対する第1,第2の模擬符号化処理の際に参照画面の画像データ(参照画像データ)Vrefa,Vrefbとして、上記第1,第2の模擬符号化器U2a,U2bに出力する構成となっている。
【0123】
このように、主メモリU3dには、実際に出力されている再符号化ストリームに対応する局所復号化画像データが格納されているため、上記第1,第2の模擬符号化器U2a,U2bは、主メモリU3dに格納されている各符号化済み画面の画像データのうち、第1,第2の模擬メモリU3a,U3bに格納されている符号化済み画面の画像データと同一の画面に対応する画像データについては、第1,第2の模擬メモリU3a,U3bに格納されている符号化済み画面の画像データVa,Vbに代えて、主メモリU3dに格納されている各符号化済み画面の画像データVrefa,Vrefbを参照するようになっている。
【0124】
次に、この実施の形態4の量子化ステップ導出器U74にて用いられる再符号化誤差増加率λ1について説明する。
図12は、上記再符号化システム40の第1,第2の模擬符号化器U3a,U3bによる復号画像データVdecの模擬符号化処理により生ずる模擬符号化誤差と、該模擬符号化処理により発生する符号化単位当たりのビット数(模擬符号化ビット数)との関係を説明するための図である。
【0125】
ここで、各模擬符号化器にて生成される模擬符号化ストリームに含まれる実際の符号化誤差Dra,Drb は、入力ストリームVinに含まれる符号化誤差Dinと、各模擬符号化処理により生ずる模擬符号化誤差Da,Dbの和となる。
つまり、量子化ステップQaの量子化処理を含む第1の模擬符号化処理を復号画像データVdecに施して得られる第1の模擬符号化ストリームに含まれる実際の符号化誤差Draは以下の式1により表される。
Dra=Din+Da (式1)
【0126】
また、量子化ステップQbの量子化処理を含む第2の模擬符号化処理を復号画像データVdecに施して得られる第2の模擬符号化ストリームに含まれる実際の符号化誤差Drbは以下の式2により表される。
Drb=Din+Db (式2)
【0127】
従って、上記第1,第2の模擬符号化ストリームに含まれる実際の符号化誤差の差分ΔDabは、以下の式3により表される。ただしここでは、第2の模擬符号化処理における量子化ステップQbは、第1の模擬符号化処理における量子化ステップQaより大きいため、第2の模擬符号化処理による符号化誤差Dbは、第2の模擬符号化処理による符号化誤差Daより大きい。

Figure 0004421734
【0128】
また、上記第1,第2の模擬符号化処理により得られる符号化単位当たりのビット数(第1,第2の模擬符号化ビット数)Ra,Rbの差分ΔRabは、以下の式4により表される。ただしここでは、第2の模擬符号化処理における量子化ステップQbは、第1の模擬符号化処理における量子化ステップQaより大きいため、第2の模擬符号化ビット数Rbは、第1の模擬符号化ビット数Raより小さい。
ΔRab=Ra−Rb (式4)
【0129】
そこで、上記再符号化誤差増加率(ビットレートの単位変動量当りの模擬符号化ビット数の変動分)λ1は、以下の式5により表される。
Figure 0004421734
【0130】
一般に、符号化処理における量子化ステップが大きくなると、符号化ストリームにおける、単位ビット数当りの符号化誤差の変動分が大きくなる。
このため、各符号化単位毎に最適量子化ステップQdとして、第1の模擬符号化処理における量子化ステップQa及び第2の模擬符号化処理における量子化ステップQbの一方を選択する量子化ステップ導出器U74では、上記再符号化誤差増加率λ1が1フレームにおける各符号化単位の間でできるだけ同じ値となるようにするための誤差最小化の条件は、上記再符号化誤差増加率λ1が小さい符号化単位に対しては最適量子化ステップQdとして、大きい方の量子化ステップQbを用い、上記再符号化誤差増加率λ1が大きい符号化単位に対しては最適量子化ステップQdとして、小さい方の量子化ステップQaを用いるというものとなる。
【0131】
図13は、上記実施の形態4の再符号化システム40を構成する量子化ステップ導出器U74の具体的構成を示すブロック図である。
上記量子化ステップ導出器U74は、上記第1,第2の模擬符号化器U2a,U2bからの第1,第2の模擬符号化処理により発生する、各符号化単位に対応する第1,第2の模擬符号化ビット数Ra,Rbを受け、これらの模擬符号化ビット数の差分を模擬符号化ビット数増加量ΔRabとして算出するビット数減算器U8bと、上記第1,第2の模擬符号化器U2a,U2bからの、各符号化単位に対応する模擬符号化誤差(再符号化増加誤差)Da,Dbを受け、これらの再符号化増加誤差の差分を模擬符号化誤差増加量Dabとして算出する誤差減算器U9bとを有している。
【0132】
また、上記量子化ステップ導出器U74は、模擬符号化誤差増加量ΔDabを模擬符号化ビット数増加量ΔRabにより除算して、各符号化単位に対応する再符号化誤差増加率λ1を導出する除算器U10bと、上記第1,第2の模擬符号化器U2a,U2bからの、各符号化単位に対応する量子化ステップQa,Qbの一方を、制御信号Qse1に基づいて選択して、処理対象となっている符号化単位に対応する最適量子化ステップQdとして出力する選択スイッチU14と、各符号化単位の間で再符号化誤差増加率λ1の大きさを比較し、フレームビット数(1フレーム分の再符号化ストリームにおけるビット数)がフレーム目標ビット数Rdとなるよう、制御信号Qse1により上記選択スイッチ14を制御する最小誤差選択器U20とを有している。
【0133】
次に動作について説明する。
この再符号化システム40に入力ストリームVinが供給されると、復号化器U1では、符号化ストリームである入力ストリームVinに対して、逆量子化処理を含む復号化処理が施され、復号化ストリーム(復号画像データ)Vdec及び上記逆量子化処理における量子化ステップQinが各符号化単位毎に出力される。
すると、第1の模擬符号化器U2aでは、第1の模擬メモリU3aに格納されている参照画像データVaあるいは主メモリU3dに格納されている参照画像データVrefaを参照して、処理対象となっている対象画面の復号化ストリームVdecに対して、量子化ステップQaによる量子化処理及び局所復号化処理を含む第1の模擬符号化処理が符号化単位毎に施される。なお、上記量子化ステップQaは上記逆量子化処理で用いられた量子化ステップQinより小さくならいよう設定される。これにより上記第1の模擬符号化器U2aからは、局所復号化画像データVstraが出力されるとともに、上記量子化ステップQa,模擬符号化ビット数Ra,及び模擬符号化誤差Daが出力される。
【0134】
同様に、第2の模擬符号化器U2bでは、第2の模擬メモリU3bに格納されている参照画像データVbあるいは主メモリU3dに格納されている参照画像データVrefbを参照して、処理対象となっている対象画面の復号化ストリームVdecに対して、量子化ステップQbによる量子化処理及び局所復号化処理を含む第2の模擬符号化処理が施される。なお、上記量子化ステップQbは、上記第1の模擬符号化処理に含まれる逆量子化処理における量子化ステップQinより小さくならず、かつ上記量子化ステップQaより大きな値になるよう設定される。これにより上記第2の模擬符号化器U2bからは、局所復号化画像データVstrbが出力されるとともに、上記量子化ステップQb,模擬符号化ビット数Rb,及び模擬符号化誤差Dbが出力される。
【0135】
このとき、上記第1,第2の模擬メモリU3a,U3bには上記局所復号化画像データVstra、Vstrbが、符号化処理済みの画面(フレーム)に対応する画像データとして格納される。このように第1,第2の模擬メモリU3a,U3bに格納された画像データは、未処理画面に対応する復号化データの符号化処理の際に、上記参照画像データVa,Vbとして用いられる。
【0136】
そして、上記量子化ステップ導出部U74では、上記第1,第2の模擬符号化器U2a,U2bからの量子化ステップQa,Qb、模擬符号化ビット数Ra,Rb、及び模擬符号化誤差Da,Dbに基づいて、処理対象となっている対象画面に対応する符号化ビット数がフレーム目標ビット数Rdを超えないよう、各符号化単位に対応する最適量子化ステップQdを導出する処理が行われる。
【0137】
この最適量子化ステップQdは主符号化器U2dに供給され、該主符号化器U2dでは、上記復号画像データVdecに対して、量子化ステップQdによる量子化処理及び局所復号化処理を含む再符号化処理が、主メモリU3dに格納されている参照画像データVrefdを参照して施される。これにより、主符号化器U2dからは再符号化ストリームVoutが出力されるとともに、局所復号化画像データVstrdが出力される。
【0138】
このとき、上記主メモリU3dには上記局所復号化画像データVstrdが、符号化処理済みの画面(フレーム)に対応する画像データとして格納される。このように主メモリU3dに格納された画像データは、未処理画面に対応する画像データの再符号化処理の際に上記参照画面データVrefdとして用いられ、また、未処理画面に対応する画像データの第1,第2の模擬符号化処理の際にも、上記参照画面データVrefa,Vrefbとして用いられる。
【0139】
なお、上記主メモリU3dには、実際に出力されている再符号化ストリームVoutに対応する局所復号化画像データが格納されているため、上記第1,第2の模擬符号化器U2a,U2bでは、主メモリU3dに格納されている各符号化済み画面の画像データのうち、第1,第2の模擬メモリU3a,U3bに格納されている符号化済み画面の画像データと同一の画面に対応する画像データについては、第1,第2の模擬メモリU3a,U3bに格納されている符号化済み画面の画像データ(参照画像データ)Va,Vbに代えて、主メモリU3dに格納されている各符号化済み画面の画像データが参照画像データVrefa,Vrefとして用いられる。
【0140】
また、上記再符号化ストリームVoutはフレーム目標ビット数計算器U6に供給され、該計算器U6では、再符号化ストリームVoutのビットレートと外部から供給される目標ビットレートRateとに基づいて、処理済み画面につづく処理対象画面に対応するフレーム目標ビット数Rdが計算され、上記量子化ステップ導出器U74に出力される。
【0141】
以下、上記量子化ステップ導出器U74の具体的な動作について説明する。
まず、ビット数減算器U8bでは、第1の模擬符号化ビット数Raから第2の模擬符号化ビット数Rbを引き算する減算処理が行われて、これらの模擬符号化ビット数の差分(模擬符号化ビット数変動量)ΔRabが算出される。また、誤差減算器U9bでは、上記第2の模擬符号化器U2bからの模擬符号化誤差Dbから上記第1の模擬符号化器U2aからの模擬符号化誤差Daを引き算する減算処理が行われて、これらの模擬符号化誤差の差分(模擬符号化誤差変動量)ΔDabが算出される。さらに、除算器U10bでは、模擬符号化誤差変動量ΔDabを模擬符号化ビット数変動量ΔRabにより除算する演算処理が行われて、上記再符号化誤差増加率λ1が導出される。
【0142】
そして、最小誤差選択器U20では、各符号化単位の間で再符号化誤差増加率λ1の大きさを比較する処理が行われ、フレームビット数(1フレーム分の再符号化ストリームにおけるビット数)がフレーム目標ビット数Rdを超えないよう、上記比較処理結果に応じて、各符号化単位毎に上記第1,第2の模擬符号化器U2a,U2bからの量子化ステップQa,Qbの一方を選択するための制御信号Qse1が選択スイッチU14に出力される。
該選択スイッチU14では、上記制御信号Qse1に基づいて、上記量子化ステップQa,Qbの一方が各符号化単位毎に選択され、選択された量子化ステップが最適量子化ステップQdとして出力される。
【0143】
次に、上記最小誤差選択器U20の具体的な動作について説明する。
図14は、上記最小誤差選択器U20により各符号化単位の最適量子化ステップを導出する処理を説明するための図である。図14(a)は、該量子化ステップ導出処理のフローを示し、図14(b)は、1画面(1フレーム)における符号化単位の配列を示している。また、図14(c)は、1フレームにおける各符号化単位に対応する最適量子化ステップQdが、上記第1,第2の模擬符号化処理における量子化ステップQa,Qbのいずれかに設定された状態を模式的に示している。
【0144】
ここで、符号化単位は、1画面(フレーム)における16×16画素からなる表示領域(マクロブロック)とし、1フレームにおけるマクロブロックの数をn個とする。また、1フレームにおけるi(i=1,2,…,n)番目のマクロブロックB[i]に対応する量子化ステップを示す変数をQ[i]とし、i番目のマクロブロックB[i]に対応する復号画像データに対して、量子化ステップQa,Qbによる量子化処理を含む模擬符号化処理を施して得られる模擬符号化ビット数をそれぞれ、Ra[i],Rb[i]とする。なお、以下、図4に関する説明ではマクロブロックを単にブロックという。
【0145】
上記最小誤差選択器U20にて、処理対象となっている対象画面(被処理フレーム)における各ブロックの最適量子化ステップを決定する処理では、まず、各ブロックB[i]の復号画像データに対して量子化ステップQa,Qbによる量子化処理を含む第1,第2の模擬符号化処理を施した場合の第1,第2の模擬符号化ビット数Ra[i],Rb[i]が求められ、さらに被処理フレームにおける全ブロックの第1の模擬符号化ビット数Ra[i]の和R(=ΣRa[i])が算出される(ステップS1)。
【0146】
次に、被処理フレームにおける全ブロックについて、対応する量子化ステップを示す変数Q[i]が上記量子化ステップQaにより初期化される(ステップS2)。つまり、この時点で、被処理フレームにおける各ブロックB[i]に対応する量子化ステップQ[i]が一旦すべてQ[i]=Qaとなる。この結果、被処理フレームにおける全ブロックの模擬符号化ビット数Ra[i]の和Rは、R=ΣRa[i]となる。
その後、その量子化ステップQ[i]がQaであり、かつ再符号化誤差増加率λ1(=(Db−Da)/(Ra−Rb))が最小となるブロックB[k]を検索する処理が行われる(ステップS3)。
【0147】
続いて、該検索処理により見つけられたブロックB[k]の量子化ステップQ[k]が、量子化ステップQaからこれより大きい量子化ステップQbに変更され、被処理フレームにおける全ブロックの模擬符号化ビット数の和Rが、R+Rb[k]−Ra[k]に更新される(ステップS4)。
【0148】
そして、上記被処理フレームにおける全ブロックの模擬符号化ビット数の和Rがフレーム目標ビット数Rdより大きいか否かの判定が行われる(ステップS5)。この判定の結果、模擬符号化ビット数の和Rがフレーム目標ビット数Rdより大きければ、再度上記ステップS3〜ステップS5の処理が繰り返し行われる。一方、上記ステップS5での判定の結果、模擬符号化ビット数の和Rがフレーム目標ビット数Rd以下であれば、この時点での被処理フレームにおける各ブロックの量子化ステップQ[i]の値(QaあるいはQb)(図14(c)参照)が、各ブロックに対応する最適量子化ステップQdとして出力される(ステップS6)。
【0149】
このように本実施の形態4の再符号化システム40では、入力ストリームを復号化して得られる被処理フレームに対応する復号画像データ(復号化ストリーム)Vdecに対して、予め量子化ステップQa,Qbによる量子化処理を含む第1,第2の模擬符号化処理を符号化単位毎に施す第1,第2の模擬符号化器U2a,U2bを備え、該各模擬符号化処理の結果から各符号化単位に対応する再符号化誤差増加率λ1を求め、被処理フレームにおけるすべての符号化単位の符号化ビット数の総和が目標フレームビット数Rdを越えないよう、被処理フレームにおける再符号化誤差増加率λ1が小さい符号化単位から順に上記両量子化ステップのうちの大きい方Qbを割り当て、被処理フレームにおける残りの符号化単位にその小さい方Qaを割り当てる処理を行うので、被処理フレームにおける各符号化単位に対応する再符号化誤差増加率が一定値に近づくこととなる。これにより入力ストリームVinに含まれる符号化誤差がわからない再符号化処理においても再符号化誤差を小さくすることができ、再符号化ストリームVoutから再生される画像の画質の劣化を小さく抑えることができる。
【0150】
なお、上記実施の形態4では、符号化処理の単位をマクロブロック(1フレームにおける16×16画素からなる領域)としているが、符号化処理の単位は上記のようなMPEGにおけるマクロブロックに限るものではない。例えば、上記符号化処理の単位は、上記マクロブロックを構成する8×8画素からなるサブブロック、あるいは上記マクロブロック数個から構成されるスライスなどであってもよい。
【0151】
また、上記実施の形態4では、再符号化システムとして、第1,第2の模擬符号化器U2a,U2bでは主符号化器U2dでの再符号化処理の対象となるフレームに対してのみ、量子化処理を含む模擬符号化処理を行うものを示しているが、上記再符号化システムの構成はこれに限るものではない。
例えば、再符号化システムは、MPEGにおける画面間予測符号化処理を行う場合には、第1,第2の模擬符号化器U2a,U2bでは、主符号化器U2dでの再符号化処理の対象となる被処理フレームに対してだけでなく、再符号化処理の際にこの被処理フレームを参照フレームとして用いるその他のフレームに対しても模擬符号化処理を施す構成であってもよい。
【0152】
つまりこのような構成の再符号化システムでは、具体的には、主符号化器U2dにて、図24に示す表示時刻T3が設定されているPフレームF(3)に対する再符号化処理を行う場合、上記第1,第2の模擬符号化器U2a,U2bにて、該PフレームF(3)に対してだけでなく、表示時刻T2,T4が設定されているBフレームF(2),T(4)及び表示時刻T5が設定されているPフレームF(5)に対しての模擬符号化処理が施される。また、各フレームF(2)〜F(5)におけるすべての符号化単位毎に、対応する模擬符号化増加誤差Da,Db、模擬符号化ビット数Ra,Rbが計算され、再符号化誤差増加率λ1が求められる。そしてさらに、上記フレームF(3)における各符号化単位には、各フレームF(2)〜F(5)におけるすべての符号化単位毎に対応する再符号化誤差増加率λ1に基づいて、最適量子化ステップとして、上記量子化ステップQa,Qbの一方が設定される。
【0153】
この場合、フレームF(3)における各符号化単位に対応する最適量子化ステップは、フレームF(3),F(2),F(4),F(5)に対応する符号化誤差が最小化するよう設定される。
なお、ここで、PフレームF(3)は、その画像データがBフレームF(2),T(4),及びPフレームF(5)に対する画面間符号化処理の際に参照されるフレームであることは言うまでもない。
【0154】
(実施の形態5)
図15は本発明の実施の形態5による再符号化システムを説明するためのブロック図である。
本実施の形態5の再符号化システム50は、上記実施の形態4の再符号化システム40における第1,第2の模擬符号化器U2a,U2bに加えて、上記復号化器U1からの画像復号データ(復号化ストリーム)Vdecに対して、参照画面の画像データを参照して、上記量子化ステップQbより大きい量子化ステップQcによる量子化処理及び局所復号化処理を含む第3の模擬符号化処理を符号化単位毎に施す第3の模擬符号化器U2cを有している。この第3の模擬符号化器U2cは、上記第3の模擬符号化処理に含まれる局所復号化処理により得られる局所復号画像データVstrcを出力するとともに、該模擬符号化処理に含まれる量子化処理にて用いた量子化ステップQc,該模擬符号化処理により生じた符号化誤差(模擬符号化増加誤差)Dc,及び該模擬符号化処理により発生した模擬符号化ビット数Rcを、各符号化単位毎に出力するよう構成されている。
【0155】
また、この再符号化システム50は、上記実施の形態4の再符号化システム40における第1,第2の模擬メモリU3a,U3bに加えて、上記第3の模擬符号化器U2cから出力される局所復号画像データVstrcを格納する第3の模擬メモリU3cを有している。また、この第3の模擬メモリU3cは、上記第3の模擬符号化器U2cからの局所復号画像データVstrcを格納し、該格納した画像データを、上記被処理画面に続く未処理画面の模擬符号化処理の際に参照画面の画像データVcとして第3の模擬符号化器U2cに出力する構成となっている。
【0156】
さらに、この再符号化システム50では、上記主メモリU3dは、上記格納された局所復号画像データVstrdを、被処理画面に続く未処理画面に対する再符号化処理の際に参照画面の画像データ(参照画像データ)Vrefdとして上記主符号化器U2dに出力するとともに、被処理画面に続く未処理画面に対する第1,第2,第3の模擬符号化処理の際に参照画面の画像データ(参照画像データ)Vrefa,Vrefb,Vrefcとして、上記第1,第2,第3の模擬符号化器U2a,U2b,U2cに出力する構成となっている。
【0157】
このように、主メモリU3dには、実際に出力されている再符号化ストリームに対応する局所復号化画像データが格納されているため、上記第1,第2,第3の模擬符号化器U2a,U2b,U2cは、主メモリU3dに格納されている各符号化済み画面の画像データのうち、第1,第2,第3の模擬メモリU3a,U3b,U3bに格納されている符号化済み画面の画像データと同一の画面に対応する画像データについては、第1,第2,第3の模擬メモリU3a,U3b,U3cに格納されている符号化済み画面の画像データVa,Vb,Vcに代えて、主メモリU3dに格納されている各符号化済み画面の画像データVrefa,Vrefb,Vrefcを参照するようになっている。
【0158】
また、この再符号化システム50は、上記実施の形態4の再符号化システム40におけるフレーム目標ビット数計算器U6に代えて、主符号化器U2dからの再符号化ストリームVoutに基づいて、再符号化ストリームVoutのビットレート(現在のビットレート)を外部からの目標ビットレートRateと比較し、この比較結果に応じて、被処理フレームに対応する再符号化誤差増加率λをフレーム毎に計算するレート歪計算器U5を有している。
【0159】
ここで、このレート歪計算器U5では、各フレームに対応する再符号化ストリームVoutに基づいて、符号化処理中のフレーム(被処理フレーム)の平均的なビットレートが目標ビットレートより大きくなりそうであれば、符号化処理の対象となっている符号化単位に対応する再符号化誤差増加率λとして大きな値を出力し、符号化処理中のフレーム(被処理フレーム)の平均的なビットレートが目標ビットレートより少なくなりそうであれば、符号化処理の対象となっている符号化単位に対応する再符号化誤差増加率λとして小さな値を出力する構成となっている。これは、この実施の形態5の再符号化システム50では、再符号化誤差増加率λが大きければ、最適量子化ステップQdが大きくなって再符号化ストリームVoutのビットレートが減少し、一方再符号化誤差増加率λが小さければ、最適量子化ステップQdが小さくなって再符号化ストリームVoutのビットレートが増加するようになっているためである。
【0160】
さらに、この再符号化システム50は、上記実施の形態4の再符号化システム40における量子化ステップ導出器U74に代えて、上記第1の模擬符号化器U2aから出力される量子化ステップQa,模擬符号化増加誤差Da,及び模擬符号化ビット数Raと、第2の模擬符号化器U2bから出力される量子化ステップQb,模擬符号化増加誤差Db,及び模擬符号化ビット数Rbと、第3の模擬符号化器U2cから出力される量子化ステップQc,模擬符号化増加誤差Dc,及び模擬符号化ビット数Rcと、上記レート歪計算器U5からの再符号化誤差増加率λとに基づいて、各符号化単位に対応する最適量子化ステップQdとして上記量子化ステップQa,Qb及びQcのうちの1つを選択して出力する量子化ステップ導出器U75を有している。
そして、この実施の形態5の再符号化システム50におけるその他の構成は、図11に示す実施の形態4の再符号化システム40と同一となっている。
【0161】
図16はこの実施の形態5の再符号化システム50を構成する量子化ステップ導出器U75の具体的構成を示すブロック図である。
上記量子化ステップ導出器U75は、上記第1,第2の模擬符号化器U2a,U2bからの第1,第2の模擬符号化ビット数Ra,Rbを受け、これらの差分(模擬符号化ビット数変動量)ΔRabを算出する第1のビット数減算器U8bと、上記第2,第3の模擬符号化器U2b,U2cからの第2,第3の模擬符号化ビット数Rb,Rcを受け、これらの差分(模擬符号化ビット数変動量)ΔRbcを算出する第2のビット数減算器U8cとを有している。
【0162】
また、上記量子化ステップ導出器U75は、上記第1,第2の模擬符号化器U2a,U2bからの模擬符号化増加誤差Da,Dbを受け、これらの差分(模擬符号化誤差変動量)Dabを算出する第1の誤差減算器U9bと、上記第2,第3の模擬符号化器U2b,U2cからの模擬符号化増加誤差Db,Dcを受け、これらの差分(模擬符号化誤差変動量)Dbcを算出する第2の誤差減算器U9cとを有している。
【0163】
また、上記量子化ステップ導出器U75は、模擬符号化誤差変動量ΔDabを模擬符号化ビット数変動量ΔRabにより除算して、各符号化単位に対応する第1の再符号化誤差増加率λ1を導出する第1の除算器U10bと、模擬符号化誤差変動量ΔDbcを模擬符号化ビット数変動量ΔRbcにより除算して、各符号化単位に対応する第2の再符号化誤差増加率λ2を導出する第2の除算器U10cとを有している。
【0164】
また、上記量子化ステップ導出器U75は、上記レート歪計算器U5からの現在の再符号化処理における再符号化誤差増加率λと、上記除算器U10bからの第1の再符号化誤差増加率λ1とを比較して、比較結果に応じた第1のスイッチ制御信号Qsebを出力する第1の比較器U11bと、上記現在の再符号化処理における再符号化誤差増加率λと、上記除算器U10cからの第2の再符号化誤差増加率λ2とを比較して、比較結果に応じた第2のスイッチ制御信号Qsecを出力する第2の比較器U11cとを有している。
【0165】
そして、上記上記量子化ステップ導出器U75は、上記第1,第2のスイッチ制御信号Qseb,Qsecに基づいて、上記各模擬符号化器U2a,U2b,U2cから供給される量子化ステップQa,Qb,Qcのうちの1つを選択し、選択された量子化ステップを最適量子化ステップQdとして出力する選択スイッチU50を有している。
【0166】
具体的には、上記量子化ステップ導出器U75は、再符号化誤差増加率λが上記再符号化誤差増加率λ1以下であるときには、スイッチU50では、上記スイッチ制御信号Qsebにより、量子化ステップQaが最適量子化ステップQdとして選択され、上記再符号化誤差増加率λが再符号化誤差増加率λ1より大きくかつ再符号化誤差増加率λ2以下であるときには、スイッチU50では、スイッチ制御信号Qseb及びスイッチ制御信号Qsecにより、量子化ステップQbが最適量子化ステップQdとして選択され、さらに上記再符号化誤差増加率λが再符号化誤差増加率λ2より大きいときには、スイッチU50では、スイッチ制御信号Qsecにより、量子化ステップQcが最適量子化ステップQdとして選択されるようになっている。
【0167】
次に動作について説明する。
この再符号化システム50に入力ストリームVinが供給されると、復号化器U1では、実施の形態4と同様、符号化ストリームである入力ストリームVinに対して復号化処理が施され、第1,第2の模擬符号化器U2a,U2bにて復号化ストリームVdecに対して第1,第2の模擬符号化処理が施される。
このとき、本実施の形態5では、第3の模擬符号化器U2cにて、上記第1,第2の模擬符号化器U2a,U2bにおける第1,第2の模擬符号化処理と同様な第3の模擬符号化処理が上記復号化ストリームVdecに対して施される。
【0168】
つまり、第3の模擬符号化器U2cでは、第3の模擬メモリU3cに格納されている参照画像データVcあるいは主メモリU3dに格納されている参照画像データVrefcを参照して、処理対象となっている処理画面の復号化ストリームVdecに対して、量子化ステップQc(Qc>Qb>Qa)による量子化処理及び局所復号化処理を含む第3の模擬符号化処理が施される。なお、上記量子化ステップQcは上記逆量子化処理で用いられた量子化ステップQinより小さくならいよう設定される。これにより上記第3の模擬符号化器U2cからは、局所復号化画像データVstrcが出力されるとともに、各符号化単位に対応する量子化ステップQc,模擬符号化ビット数Rc,及び模擬符号化誤差Dcが出力される。
【0169】
このとき、上記第3の模擬メモリU3cには上記局所復号化画像データVstrcが、符号化処理済みの画面(フレーム)に対応する画像データとして格納される。このように第3の模擬メモリU3cに格納された画像データは、未処理画面に対応する画像データの模擬符号化処理の際に、上記参照画面データVcとして用いられる。
【0170】
そして、上記量子化ステップ導出部U75では、上記第1,第2,第3の模擬符号化器U2a,U2b,U2cからの量子化ステップQa,Qb,Qc、模擬符号化ビット数Ra,Rb,Rc、及び模擬符号化誤差Da,Db,Dcに基づいて、各ブロック(符号化単位)に対応する再符号化誤差増加率が、被処理画面に対応する平均的な再符号化誤差増加率(目標再符号化誤差増加率)λを超えないよう、各符号化単位に対応する最適量子化ステップQdが導出される。
【0171】
すると、上記主符号化器U2dでは、実施の形態4と同様、上記復号画像データVdecに対して、最適量子化ステップQdによる量子化処理及び局所復号化処理を含む再符号化処理が、主メモリU3dに格納されている参照画像データVrefdを参照して施される。これにより、主符号化器U2dからは再符号化ストリームVoutが出力されるとともに、局所復号化画像データVstrdが出力される。
【0172】
また、レート歪計算器U5では、各フレームに対応する再符号化ストリームVoutに基づいて、符号化処理中のフレームの平均的なビットレートが該フレームの目標ビットレートより大きくなりそうであれば、再符号化誤差増加率λとして大きな値が出力され、符号化処理中のフレームの平均的なビットレートが該フレームの目標ビットレートより少なくなりそうであれば、再符号化誤差増加率λとして小さな値が出力される。
【0173】
以下、上記量子化ステップ導出器U75の具体的な動作について説明する。
まず、この実施の形態5では、第1のビット数減算器U8bにおける模擬符号化ビット数変動量ΔRabを算出する減算処理、第1の誤差減算器U9bにおける模擬符号化誤差変動量ΔDabを算出する減算処理、及び第1の除算器U10bにおける再符号化誤差増加率λ1を導出する演算処理が行われるとともに、第2のビット数減算器U8cにおける模擬符号化ビット数変動量ΔRbcを算出する減算処理、第2の誤差減算器U9cにおける模擬符号化誤差変動量ΔDbcを算出する減算処理、及び第2の除算器U10cにおける再符号化誤差増加率λ2を導出する演算処理が行われる。
【0174】
ここで、第1のビット数減算器U8b,第1の誤差減算器U9b,第1の除算器U10bにおける処理は、実施の形態4のものと全く同一であり、第2のビット数減算器U8c,第2の誤差減算器U9c,第2の除算器U10cにおける処理は、上記減算器U8b,減算器U9b,除算器U10bにおける処理と同様なものとなっている。
【0175】
つまり、上記第2のビット数減算器U8cでは、第2の模擬符号化ビット数Rbから第3の模擬符号化ビット数Rcを引き算する減算処理が行われて、これらの差分(模擬符号化ビット数変動量)ΔRbcが算出される。また、第2の誤差減算器U9cでは、上記第3の模擬符号化器U2cからの模擬符号化増加誤差Dcから上記第2の模擬符号化器U2bからの模擬符号化増加誤差Dbを引き算する減算処理が行われて、これらの差分(模擬符号化誤差変動量)ΔDbcが算出される。さらに、第2の除算器U10cでは、模擬符号化誤差変動量ΔDbcを模擬符号化ビット数変動量ΔRbcで除算する演算処理が行われて、上記第2の再符号化誤差増加率λ2が導出される。
【0176】
また、上記除算器U10bからの第1の再符号化誤差増加率λ1は、第1の比較器U11bにて、現在の再符号化処理における再符号化誤差増加率λと比較されて、比較結果に応じた第1のスイッチ制御信号Qsebが出力される。上記除算器U10cからの第2の再符号化誤差増加率λ2は、第2の比較器U11cにて、現在の再符号化処理における再符号化誤差増加率λと比較されて、比較結果に応じた第2のスイッチ制御信号Qsecが出力される。
【0177】
そして、上記選択スイッチU50では、上記第1,第2のスイッチ制御信号Qseb,Qsecに基づいて、上記各模擬符号化器U2a,U2b,U2cから供給される量子化ステップQa,Qb,Qcのうちの1つが選択され、選択された量子化ステップが最適量子化ステップQdとして出力される。
【0178】
具体的には、再符号化誤差増加率λが上記再符号化誤差増加率λ1以下であるときには、スイッチU50では、上記スイッチ制御信号Qsebにより、量子化ステップQaが最適量子化ステップQdとして選択される。また、上記再符号化誤差増加率λが再符号化誤差増加率λ1より大きくかつ再符号化誤差増加率λ2以下であるときには、スイッチU50では、スイッチ制御信号Qseb及びスイッチ制御信号Qsecにより、量子化ステップQbが最適量子化ステップQdとして選択される。さらに上記再符号化誤差増加率λが再符号化誤差増加率λ2より大きいときには、スイッチU50では、スイッチ制御信号Qsecにより、量子化ステップQcが最適量子化ステップQdとして選択される。
【0179】
このように本実施の形態5では、主符号化器U2dからの再符号化ストリームVoutに基づいて、再符号化ストリームVoutのビットレート(現在のビットレート)を外部からの目標ビットレートRateと比較し、この比較結果に応じて、被処理フレームに対応する画質の指標となる平均的な再符号化誤差増加率λを計算するレート歪計算器U5を備え、それぞれ、量子化ステップQa,Qb.Qc(Qa<Qb<Qc)が異なる第1,第2,第3の模擬符号化器U2a,U2b,U2bでの符号化結果から得られる、符号化単位に対応する第1,第2の再符号化誤差増加率λ1,λ2(λ1<λ2)が、上記1フレームの平均的な再符号化誤差増加率λより小さいときには、そのブロックに対応する最適量子化ステップQdを量子化ステップQb,Qcにするようにしたので、画質の劣化を抑えつつ、ビットレートを低減することができる。
【0180】
なお、上記実施の形態5では、3つの模擬符号化器を有し、第1,第2の再符号化誤差増加率λ1,λ2を、上記1フレームの平均的な再符号化誤差増加率λと比較して、各ブロックに対応する最適量子化ステップQdを決定するものを示したが、再符号化システムにおける模擬符号化器の個数は3つに限るものではなく、実施の形態4における再符号化システム40のように2つであっても、あるいは4つ以上であってもよい。
【0181】
例えば、模擬符号化器として第1,第2の模擬符号化器を有する再符号化システムでは、上記量子化ステップ導出器U75は、量子化ステップQa,Qb(Qa<Qb)が異なる第1,第2の模擬符号化器U2a,U2bでの符号化結果から得られる、符号化単位に対応する第1の再符号化誤差増加率λ1が、上記1フレームの平均的な再符号化誤差増加率λより小さいときには、そのブロックに対応する最適量子化ステップQdを量子化ステップQa及びQbのうちの大きい方を選択し、第1の再符号化誤差増加率λ1が、上記1フレームの平均的な再符号化誤差増加率λより小さくないときには、量子化ステップQa及びQbのうちの小さい方を選択する構成となる。
【0182】
(実施の形態6)
図17は本発明の実施の形態6による再符号化システムを説明するためのブロック図であり、この実施の形態6の再符号化システムにおける量子化ステップ導出器の構成を示している。
この実施の形態6の再符号化システムは、上記実施の形態5の再符号化システム50の量子化ステップ導出器U75に代えて、各模擬符号化器での模擬符号化処理の結果得られる量子化ステップQb,Qc、模擬符号化ビット数Ra,Rb,Rc、及び模擬符号化増加誤差Da,Db,Dcに基づいて、再符号化誤差増加率λと量子化ステップQとの関係式を求め、この関係式と、レート歪計算器U5からの目標再符号化誤差増加率λとに基づいて、各符号化単位に対応する最適量子化ステップQdを求める量子化ステップ導出器U76を備えたものである。そして、この実施の形態6の再符号化システムにおけるその他の構成は、上記実施の形態5の再符号化システムと同一である。
【0183】
以下、図17を用いて、この実施の形態6の再符号化システムを構成する量子化ステップ導出器U76の具体的構成について説明する。
本実施の形態6の量子化ステップ導出器U76は、実施の形態5の量子化ステップ導出器U75の第1,第2の比較器U11b,U11c及びスイッチU50に代えて、目標再符号化誤差増加率λとビットレートRとの関係を示す誤差RD関数fを導出する誤差RD導出器U12と、この誤差RD関数fを用いて、量子化ステップQと再符号化ビット数(復号化ストリームVdecの符号化処理により得られる符号化単位に対応するビット数)Rとの関係から、再符号化誤差増加率λに対応する最適量子化ステップを符号化単位毎に算出する量子化ステップ計算器U31とを備えている。ここで、ビットレートは、符号化単位に対応して発生するビット数と等価である。
【0184】
以下、上記誤差RD導出器U12及び量子化ステップ計算器U31について具体的に説明する。
一般に各ブロック(符号化単位)に対応する符号化ビット数Rと、各ブロックに対応する符号化誤差Dとの間には、下記の式6で表される関数(レート誤差関数)が成立する。
D=g(R) (式6)
【0185】
そこで、再符号化処理では、再符号化ストリームに含まれる符号化誤差Dは、下記の式7により表される。
ΔD+Din=g(R) (式7)
ここで、ΔDは、再符号化増加誤差(再符号化処理により増加する符号化誤差)、Dinは、入力ストリームVinの符号化誤差である。
【0186】
従って、再符号化誤差増加率λは、下記の式8で表される。
λ=∂D/∂R=∂ΔD/∂R=∂g(R)/∂R (式8)
ここで、上記関数g(R)は、下記の式9に示すように近似できることが知られている。
g(R)=A・RB (式9)
ここで、AとBは定数である。
【0187】
従って、上記式8及び式9より、再符号化誤差増加率λは以下の式10により表される。
λ=A・RB-1 (式10)
【0188】
ここで、再符号化誤差増加率λ1を、R=Rbであるときの再符号化誤差増加率λとし、再符号化誤差増加率λ2を、R=Rcであるときの再符号化誤差増加率λであるとすれば、上記の式10より上記定数A,Bを求めることができる。この結果、下記の式11で示す誤差RD関数fが導出される。
R=f(λ) (式11)
上記誤差RD導出器U12は、第2,第3の模擬符号化器U2b,U2cからの再符号化ストリームのビットレートRb,Rc、及び除算器U10b,U10cからの再符号化誤差増加率λ1,λ2に基づいて、上記式11で示される関数fを導出する演算処理を行う構成となっている。
【0189】
一方、量子化ステップQとビットレートRとの間には、以下の式12で示す関係が成立する。
R=α・Qβ (式12)
【0190】
ここで、αとβは定数であり、上記式12に、ビットレートRb,Rcと、量子化ステップQb,Qcを代入すれば、αとβが得られる。この結果、下記の式13で示す関数hが導出される。
R=h(Q) (式13)
【0191】
従って、上記式11と式13から、再符号化誤差増加率λに対応する量子化ステップQの関係を示す関数sが以下の式14で示すように求められる。
Q=s(λ) (式14)
【0192】
言い換えると、この式14を用いて、再符号化誤差増加率λに対応する量子化ステップを、最適量子化ステップQdとして導出できる。
上記量子化ステップ計算器U31は、第2の模擬符号化器U2bからの模擬符号化ビット数Rb及び第2の模擬符号化処理における量子化ステップQbと、第3の模擬符号化器U2cからの模擬符号化ビット数Rc及び第3の模擬符号化処理における量子化ステップQcとに基づいて、上記式13で示される関数hを導出する演算処理を行うとともに、この関数hと、上記誤差RD導出器U12で求められた関数fとから上記関数sを求め、さらに、この関数sから、上記レート歪計算器U5にて求められた目標再符号化誤差増加率λに対応する量子化ステップを最適量子化ステップQdとして求める構成となっている。
【0193】
次に動作について説明する。
この実施の形態6の再符号化システムは、量子化ステップ導出器U76の動作以外は実施の形態5の再符号化システム50と全く同様な動作をする。
そこで以下、量子化ステップ導出器U76の動作について説明する。
まず、この実施の形態6では、第1のビット数減算器U8bにおける模擬符号化ビット数変動量ΔRabを算出する減算処理、第1の誤差減算器U9bにおける模擬符号化誤差変動量ΔDabを算出する減算処理、及び第1の除算器U10bにおける再符号化誤差増加率λ1を導出する演算処理が行われとともに、第2のビット数減算器U8cにおける模擬符号化ビット数変動量ΔRbcを算出する減算処理、第2の誤差減算器U9cにおける模擬符号化誤差変動量ΔDbcを算出する減算処理、及び第2の除算器U10cにおける再符号化誤差増加率λ2を導出する演算処理が行われる。
【0194】
すると、誤差RD導出器U12は、第2,第3の模擬符号化器U2b,U2cにて得られる模擬符号化ビット数Rb,Rc、及び第1,第2の除算器U10b,U10cからの再符号化誤差増加率λ1,λ2に基づいて、上記式11で示される関数f(R=f(λ))が導出される。
【0195】
また、上記量子化ステップ計算器U31では、第2の模擬符号化処理による模擬符号化ビット数Rb及び第2の模擬符号化処理における量子化ステップQbと、第3の模擬符号化処理による模擬符号化ビット数Rc及び第3の模擬符号化処理における量子化ステップQcとに基づいて、上記式13で示される関数h(R=h(Q))を導出する演算処理が行われる。さらに、この関数hと、上記誤差RD導出器U12で求められた関数fとから、上記式14で示される関数s(Q=s(λ))が求められる。そして、この関数sを用いて、上記レート歪計算器U5にて求められた目標再符号化誤差増加率λに対応する量子化ステップが最適量子化ステップQdとして求められる。
【0196】
このように本実施の形態6の再符号化システムでは、量子化ステップ導出器U76を、模擬符号化処理の結果に基づいて、再符号化誤差増加率λとビットレートの関係を示す関数f(R=f(λ))を導出する誤差RD導出器U12と、該関数fと上記模擬符号化処理の結果に基づいて、再符号化誤差増加率λと量子化ステップとの関係を示す関数s(Q=s(λ))を求め、この関数sを用いて、レート歪計算器U5にて求められた目標再符号化誤差増加率λに対応する量子化ステップを最適量子化ステップQdとして各符号化単位毎に導出する量子化ステップ計算機U31とを有する構成としたので、各符号化単位に対応する最適量子化ステップQdを細かく設定することができる。
【0197】
なお、この実施の形態6では、模擬符号化増加誤差Db,Daの差、模擬符号化ビット数Ra,Rbの差、模擬符号化増加誤差Db,Dcの差、模擬符号化ビット数Rb,Rcの差に基づいて、誤差RD関数fを導出したが、上記模擬符号化増加誤差の差分には、模擬符号化増加誤差Dc,Daの差分を用いてもよく、また、符号化単位(ブロック)当りの模擬符号化ビット数の差分には、再符号化ビット数Ra,Rcの差分を用いてもよい。
【0198】
(実施の形態7)
図18は本発明の実施の形態7による再符号化システムを説明するためのブロック図であり、この実施の形態7の再符号化システムにおける量子化ステップ導出器の構成を示している。
この実施の形態7の再符号化システムは、上記実施の形態6の再符号化システムの量子化ステップ導出器U76に代えて、再符号化誤差増加率λ1の大きさに応じて、量子化ステップ計算器U31から出力される量子化ステップQfと、上記量子化ステップQa,Qb,Qcのうちでの最小の量子化ステップQaの一方を選択し、該選択された量子化ステップを最適量子化ステップQdとして出力する量子化ステップ導出器U77を備えたものである。
【0199】
以下、図18を用いて、この実施の形態7の再符号化システムを構成する量子化ステップ導出器U77の具体的構成について説明する。
この量子化ステップ導出器U77は、上記実施の形態6の量子化ステップ導出器U76の構成に加えて、第1の除算器U10bからの第1の再符号化誤差増加率λ1と、レート歪計算器からの目標再符号化誤差増加率λとを比較してスイッチ制御信号Qseを出力する比較器U11と、該スイッチ制御信号Qseに応じて、量子化ステップ計算器U31から出力される量子化ステップQf及び上記最小の量子化ステップQaの一方を選択する選択スイッチU70とを備え、該選択された量子化ステップを最適量子化ステップQdとして出力する構成となっている。
【0200】
以下、上記比較器U11の具体的な構成について簡単に説明する。
一般的に再符号化システムでは、入力ストリームVinに施された符号化処理における量子化ステップQinの大きさと、再符号化処理における量子化ステップQdの大きさの差が大きい場合は、つまり、再符号化誤差増加率が大きい場合は、量子化ステップQdが大きくなるにつれて再符号化誤差増加率λが単調増加するという現象が現れる。一方、入力ストリームVinに対する符号化処理における量子化ステップQinの大きさと、再符号化処理における量子化ステップQdの大きさの差が小さい場合は、つまり、再符号化誤差増加率が小さい場合は、量子化ステップQdが大きくなっても必ずしも再符号化誤差増加率λが増加するとは限らず、場合によっては減少することもありうる。この点については、上記実施の形態2にて図7を用いて説明した通りであり、また文献(電子情報通信学会研究会報告IE99-32 MPEG2再符号化における再量子化誤差の検討)に詳しく記載されている。
【0201】
つまり、図7では、再符号化データにおける量子化誤差は、そのビットレートが高い場合、即ち、第1の量子化処理(符号化処理における量子化処理)における量子化ステップ値QPiと、第2の量子化処理(再符号化処理における量子化処理)における量子化ステップ値QPrとの差が小さい場合に大きく、一方、第2の量子化処理における量子化ステップ値QPrが2QP(QPi=QP)以上であって、再符号化データのビットレートが低い場合には、直接符号化処理における量子化誤差と再符号化処理による量子化誤差の差は殆ど無くなることが示されている。ここで、再符号化データにおける量子化誤差の増減は、再符号化誤差増加率の増減に対応したものとなっている。
【0202】
そこで、上記比較器U11は、模擬符号化処理により得られる符号化単位(被処理ブロック)に対応する再符号化誤差増加率λ1が、被処理フレームに対する目標再符号化誤差増加率λより小さいときには、上記選択スイッチU70が、第1,第2,第3の模擬符号化処理における量子化ステップQa,Qb,Qc(Qa<Qb<Qc)のうちでの最小の量子化ステップQaを選択し、上記再符号化誤差増加率λ1が再符号化誤差増加率λ以上であるときには、上記選択スイッチU70が、上記量子化ステップ計算器U31からの量子化ステップQfを選択するよう、上記選択スイッチU70を制御する構成となっている。
言い替えると、この実施の形態7は、上記実施の形態6の再符号化システムと実施の形態2の再符号化システムとを組み合わせて得られる構成に相当している。具体的には、この実施の形態7の量子化ステップ導出器U77における比較器U11及び選択スイッチU70は、上記実施の形態2の量子化装置152における量子化ステップ導出器252に相当し、上記量子化ステップ導出器U77における比較器U11及び選択スイッチU70以外の部分が、上記実施の形態2の量子化装置152における量子化ステップ候補導出器250に相当している。
そして、この実施の形態7の量子化ステップ導出器U77では、模擬符号化処理により得られる再符号化誤差増加率λ1を被処理フレームに対する目標再符号化誤差増加率λと比較し、λ1<λのとき、上記各模擬符号化処理における最小の量子化ステップQaを、λ1≧λのとき、上記量子化ステップ計算器U31からの量子化ステップQfを、再符号化処理における量子化ステップとして選択するようにしている。このような量子化ステップの導出処理は、上記実施の形態2にて、量子化ステップ候補Qsbを閾値Qth(=n×Qs1)及び定数倍値Qmu(=m×Qs1>Qth)と比較し、Qsb<Qmuのとき、量子化ステップとして第1の量子化ステップQs1あるいは定数倍値Qmuを選択し、Qmu≦Qsbのとき、量子化ステップとして量子化ステップ候補Qsbを選択する処理と同等なものである。
【0203】
次に動作について説明する。
この実施の形態7の再符号化システムは、量子化ステップ導出器U77の動作以外は実施の形態5の再符号化システム50と全く同様な動作をする。
そこで以下、量子化ステップ導出器U77の動作について説明する。
この実施の形態7では、減算器U8b,U8c、減算器U9b,U9c、除算器U10b,U10c、誤差RD計算器U12、及び量子化ステップ計算器U31では、上記実施の形態6と全く同一の演算処理が行われる。これにより上記除算器U10b,U10cからは、符号化単位(被処理ブロック)に対応する第1,第2の再符号化誤差増加率λ1,λ2が出力される。また、誤差RD計算器U12からは、誤差RD関数fが導出され、量子化ステップ計算器U31からは、被処理ブロックに対応する量子化ステップとして、被処理フレームに対応する目標再符号化誤差増加率λに応じた値Qfが出力される。
【0204】
そして、上記比較器U11では、被処理ブロックに対応する第1の再符号化誤差増加率λ1と、被処理フレームに対応する目標再符号化誤差増加率λとの大小比較が行われ、比較結果に応じてスイッチ制御信号Qseが上記選択スイッチU70に出力される。該選択スイッチU70では、スイッチ制御信号Qseに応じて、量子化ステップ計算器U31からの量子化ステップQfと、第1の模擬符号化処理における量子化ステップQaの一方が最適量子化ステップQdとして選択されて出力される。
【0205】
具体的には、上記被処理ブロックに対応する第1の再符号化誤差増加率λ1が、被処理フレームに対応する目標の再符号化誤差増加率λより小さいときには、上記スイッチ制御信号Qseにより、上記選択スイッチU70では量子化ステップQaが最適量子化ステップQdとして選択され、上記第1の再符号化誤差増加率λ1が目標の再符号化誤差増加率λより小さくないときには、上記選択スイッチU70では量子化ステップ計算器U31からの量子化ステップQfが最適量子化ステップQdとして選択される。
【0206】
このように本実施の形態7の再符号化システムでは、量子化ステップ導出器U77を、上記実施の形態6の量子化ステップ導出器U76の構成に加えて、除算器U10bからの再符号化誤差増加率λ1をレート歪計算器からの目標再符号化誤差増加率λと比較して、比較結果に応じたスイッチ制御信号Qseを出力する比較器U11を有し、再符号化誤差増加率λ1がレート歪計算器からの目標再符号化誤差増加率λより小さいときのみ、被処理ブロックに対応する量子化ステップとして、量子化ステップ計算器U31により得られる量子化ステップQfに代えて、模擬符号化処理における最小の量子化ステップQaを選択するようにしたので、再符号化誤差増加率が、量子化ステップの増加に対する再符号化誤差増加率の変化が単調増加でなく、量子化ステップ計算器U31により、再符号化誤差が最小となる最適量子化ステップQdを導出困難な範囲内の値であるときには、常に、模擬符号化処理における最小の量子化ステップQaが、被処理ブロックの最適量子化ステップQdとして用いられることとなる。
【0207】
このため、被処理フレームの目標再符号化誤差増加率λが、入力ストリームVinの量子化ステップQinと、入力ストリームVinに対する再符号化処理における量子化ステップQdとの差分が小さくなる範囲内の値である場合には、動作が不安定になることを防止することができる。また、上記被処理フレームの目標再符号化誤差増加率λが上記範囲外の値であるときには、量子化ステップ計算器U31により導出した量子化ステップQfを量子化ステップQdとすることにより、再符号化誤差を最小化することができる。
【0208】
なお、上記実施の形態6及び7では、再符号化ストリームの符号化単位当たりの符号化ビット数Rと再符号化誤差増加率λとの関係を示す関数として、式11に示す誤差RD関数fを示したが、これらの関係を示す関数はこれに限るものではない。
【0209】
例えば、模擬符号化増加誤差Da,Db,Dc、及び模擬符号化ビット数Ra,Rb,Rcから、上記式11に示す誤差RD関数fと同様な傾向,性質を有する他の誤差RD関数が導出できれば、この他の誤差RD関数を、符号化ビット数Rと再符号化誤差増加率λとの関係を示す関数として使用してもよい。
【0210】
また、上記実施の形態5ないし7では、再符号化システムとして、第1,第2,第3の模擬符号化器U2a,U2b,U2cでは主符号化器U2dでの再符号化処理の対象となるフレームに対してのみ、量子化処理を含む模擬符号化処理を行うものを示しているが、上記再符号化システムの構成はこれに限るものではない。
【0211】
例えば、上記実施の形態4にて具体的に説明したように、再符号化システムは、MPEGにおける画面間予測符号化処理を行う場合には、第1,第2,第3の模擬符号化器U2a,U2b,U2cでは、主符号化器U2dでの再符号化処理の対象となる被処理フレームに対してだけでなく、再符号化処理の際にこの被処理フレームを参照フレームとして用いるその他のフレームに対しても模擬符号化処理を施す構成であってもよい。
【0212】
さらに、上記実施の形態1〜7の再符号化システムによる再符号化処理をソフトウエアにより行うための処理プログラムを、フロッピディスクなどのデータ記憶媒体に記録するようにすることにより、上記各実施の形態の再符号化処理を、独立したコンピュータシステムにより簡単に実現することが可能となる。
【0213】
図19は、上記各実施の形態の再符号化処理をコンピュータシステムにより行うためのプログラムを格納したデータ記録媒体(図19(a),(b))、及び上記コンピュータシステム(図19(c))を説明するための図である。
図19(a)は、フロッピーディスクの正面からみた外観、断面構造、及びフロッピーディスクを示し、図19(b) は、記録媒体本体であるフロッピーディスクの物理フォーマットの例を示している。フロッピーディスクFDはケースF内に内蔵され、該ディスクの表面には、同心円状に外周からは内周に向かって複数のトラックTrが形成され、各トラックは角度方向に16のセクタSeに分割されている。従って、上記プログラムを格納したフロッピーディスクでは、上記フロッピーディスクFD上に割り当てられた領域に、上記プログラムが記録されている。
また、図19(c) は、フロッピーディスクFDに上記プログラムの記録再生を行うための構成を示す。上記プログラムをフロッピーディスクFDに記録する場合は、コンピュータシステムCsによりから上記プログラムとしてのデータをフロッピーディスクドライブを介してフロッピーディスクFDに書き込む。また、フロッピーディスク内のプログラムにより上記各実施の形態の再符号化処理を行うシステムをコンピュータシステム中に構築する場合は、フロッピーディスクドライブによりプログラムをフロッピーディスクから読み出し、コンピュータシステムに転送する。
【0214】
なお、上記説明では、データ記憶媒体の具体例としてフロッピーディスクを挙げたが、光ディスクを用いても上記フロッピーディスクの場合と同様にソフトウェアによる再符号化処理を行うことができる。さらに、データ記憶媒体は上記光ディスクやフロッピーディスクに限るものではなく、ICカード、ROMカセット等、プログラムを記録できるものであればどのようなものでもよく、これらのデータ記録媒体を用いる場合でも、上記フロッピーディスク等を用いる場合と同様にソフトウェアによる再符号化処理を実施することができる。
【0215】
【発明の効果】
以上のようにこの発明に係る符号化データ変換方法によれば、第1の直交変換処理及び第1の量子化処理を含む符号化処理により得られた符号化データを復号化して復号化データを生成する復号化処理と、該復号化データに対して第2の直交変換処理及び第2の量子化処理を施して再符号化データを生成する再符号化処理とを含み、上記再符号化処理では、上記第2の量子化処理を、上記再符号化データ及び上記第1の量子化処理における量子化ステップに基づいて行うので、上記第2の量子化処理における量子化ステップを、上記第1の量子化ステップにおける量子化ステップに応じて設定することが可能となる。つまり、上記再符号化データに基づく再符号化処理における目標ビット数の制約の下で、上記第2の量子化処理における量子化ステップを、再符号化処理におけるビットレートと量子化歪(量子化誤差)との非線形な関係を考慮して、量子化誤差ができるだけ小さくなるよう設定することができる。これにより再符号化処理における量子化誤差の増大を、ビットレートの制約の下で効果的に抑制することができるという効果がある。
【0216】
この発明によれば、上記符号化データ変換方法において、上記第2の量子化処理,つまり再符号化処理における量子化処理では、上記再符号化データに基づいて量子化ステップ候補を導出し、該量子化ステップ候補と上記第1の量子化処理における量子化ステップとに基づいて量子化ステップを導出するので、上記量子化ステップ候補と上記第1の量子化処理における量子化ステップのうちで大きい方を第2の量子化処理における量子化ステップとして選択するという簡単な処理により、量子化誤差の増大を抑えつつ再符号化処理により発生するビット数を目標ビット数以下にすることができるという効果がある。
【0217】
この発明によれば、上記符号化データ変換方法において、上記第2の量子化処理(再符号化処理における量子化処理)における量子化ステップを導出する処理では、上記量子化ステップ候補の大きさに応じて、上記第2の量子化処理における量子化ステップとして、上記第1の量子化処理における量子化ステップと同じ値の量子化ステップ、その2倍以上である量子化ステップ、あるいは上記量子化ステップ候補を導出するので、第2の量子化処理における量子化ステップとしては、上記第1の量子化処理における量子化ステップの1倍からその2倍までの範囲以外の値を設定することが可能となる。これにより、符号化データに対してビット数を増やさずに、量子化誤差の著しい増大を招くことなく、再符号化処理により発生するビット数を目標ビット数以下にすることができるという効果がある。
【0222】
この発明に係るデータ記録媒体によれば、上記符号化データ変換方法により第1の符号化データを第2の符号化データに変換する処理をコンピュータにより行うプログラムを格納したので、再符号化処理を、量子化誤差の増大を効果的に抑制して行うことができるという効果を有する。
【図面の簡単な説明】
【図1】本発明の実施の形態1による再符号化システム10を説明するためのブロック図である。
【図2】上記実施の形態1の再符号化システム10を構成する量子化装置151を説明するためのブロック図である。
【図3】上記実施の形態1の量子化装置151を構成する量子化ステップ導出器251を説明するためのブロック図である。
【図4】本発明の実施の形態2による再符号化システムを構成する量子化装置152を説明するためのブロック図である。
【図5】上記実施の形態2の量子化装置152を構成する量子化ステップ導出器252を説明するためのブロック図である。
【図6】上記実施の形態2の量子化ステップ導出器252により得られる第2の量子化ステップQs2と、上記実施の形態2の量子化装置152を構成する量子化ステップ候補導出器250より出力される量子化ステップ候補Qsbとの関係をグラフにより示す図である。
【図7】再符号化処理によるビットレートと量子化歪(量子化誤差)の関係を示す図である。
【図8】本発明の実施の形態3による再符号化システム30を説明するためのブロック図である。
【図9】上記実施の形態3の再符号化システム30を構成する量子化装置153を説明するためのブロック図である。
【図10】上記実施の形態3の量子化装置153を構成する量子化ステップ導出器273を説明するためのブロック図である。
【図11】本発明の実施の形態4による再符号化システム40を説明するためのブロック図である。
【図12】上記実施の形態4の再符号化システム40にて復号画像データVdecの模擬符号化処理により生ずる模擬符号化誤差と、該模擬符号化処理により発生する符号化単位当たりのビット数(模擬符号化ビット数)との関係をグラフにより示す図である。
【図13】上記実施の形態4の再符号化システム40を構成する量子化ステップ導出器U74の具体的構成を示すブロック図である。
【図14】上記実施の形態4における各符号化単位の最適量子化ステップを導出する処理を説明するための図であり、該処理のフロー(図(a))、1フレームにおける符号化単位の配列(図(b))、及び各符号化単位に対して最適量子化ステップQdが設定された状態(図(c))を示している。
【図15】本発明の実施の形態5による再符号化システム50を説明するためのブロック図である。
【図16】上記実施の形態5の再符号化システム50を構成する量子化ステップ導出器U75の具体的構成を示すブロック図である。
【図17】本発明の実施の形態6による再符号化システムを説明するためのブロック図であり、この再符号化システムにおける量子化ステップ導出器U76の構成を示している。
【図18】本発明の実施の形態7による再符号化システムを説明するためのブロック図であり、この再符号化システムにおける量子化ステップ導出器U77の構成を示している。
【図19】上記実施の形態1〜7の再符号化システムによる再符号化処理を、コンピュータシステムにより行うためのプログラムを格納したデータ記録媒体(図(a),(b))、及び上記コンピュータシステム(図(c))を説明するための図である。
【図20】従来の再符号化システム100aを説明するためのブロック図である。
【図21】従来の再符号化システム100aを構成する量子化装置107を説明するためのブロック図である。
【図22】符号化ストリームのビットレートと符号化ストリームに含まれる符号化誤差の関係をグラフにより示す図である。
【図23】MPEGにおける画面間予測符号化処理を説明するための模式図である。
【符号の説明】
10,30,40,50 再符号化システム
100 VLD器
101a,108 逆量子化装置
102,109 IDCT器
103,110 加算器
104,111 フレームメモリ
105 減算器
106 DCT器
112 VLC器
113 レート制御装置
151,152,153 量子化装置
201 量子化器
250 量子化ステップ候補導出器
251,252,273,U74,U75,U76,U77 量子化ステップ導出器
260,263,266 比較器
261,264,267 スイッチ
262 閾値導出器
265 定数倍器
270,272a 画面内平均量子化ステップ導出器
271,272b 画面間平均量子化ステップ導出器
CP1,CP2,CP3 比較出力
Da,Db,Dc 第1,第2,第3の模擬符号化増加誤差
Da1 復号化ユニット
Ea1 符号化ユニット
Eg1 符号化データ
Eg2 再符号化データ
f 誤差RD関数
Qa,Qb,Qc,Qf,Qin 量子化ステップ
Qd 最適量子化ステップ
Qs1 第1の量子化ステップ
Qs2 第2の量子化ステップ
Qsb 量子化ステップ候補
Qse 選択量子化ステップ
Qseb,Qsec,Qse1 スイッチ制御信号
Qth 閾値
Qmu 定数倍値
Ra,Rb,Rc 第1,第2,第3の模擬符号化ビット数
Rate 目標ビットレート
Rd フレーム目標ビット数
U1 復号化器
U2a,U2b,U2c 第1,第2,第3の模擬符号化器
U2d 主符号化器
U3a,U3b,U3c 第1,第2,第3の模擬メモリ
U3d 主メモリ
U5 レート歪計算器
U6 フレームビット数計算器
U8b,U8c 第1,第2のビット数減算器
U9b,U9c 第1,第2の誤差減算器
U10b,U10c 第1,第2の除算器
U11b,U11c 第1,第2の比較器
U12 誤差RD計算器
U14,U50,U70 選択スイッチ
U20 最小誤差選択器
U31 量子化ステップ計算器
Vrefa,Vrefb,Vrefc,Vrefd,Va,Vb,Vc 参照画像データ
Vstra,Vstrb,Vstrc,Vstrd 局所復号化画像データ
Vdec 復号画像データ(復号化ストリーム)
Vin 入力ストリーム
Vout 再符号化ストリーム
λ 目標再符号化誤差増加率
λ1,λ2 第1,第2の再符号化誤差増加率
ΔDab,ΔDac,ΔDbc 模擬符号化誤差変動量
ΔRab,ΔRac,ΔRbc 模擬符号化ビット数変動量
Cs コンピュータシステム
F フロッピディスクケース
FD フロッピディスク
FDD フロッピディスクドライブ
Se セクタ
Tr トラック[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an encoded data conversion method. , And In particular, with respect to data recording media, re-encoding of encoded data stored in a database or the like and obtained by performing encoding processing on a moving image signal with an encoding method or encoding parameters different from the encoding processing Encoded data conversion method for converting into encoded data that can be decoded by receiver by processing , And And a data recording medium storing a program for executing the re-encoding processing by software.
[0002]
[Prior art]
In recent years, the multimedia era has come in which audio, image, and other information are handled in an integrated manner, and conventional information media, that is, means for transmitting information such as newspapers, magazines, television, radio, and telephones to people are targeted for multimedia. It has come to be taken up as. In general, multimedia refers to not only characters but also figures, sounds, especially images, etc. that are associated with each other at the same time. Is a digital format information (digital data).
[0003]
However, when the amount of information handled by each information medium is estimated as the amount of information in digital format, the amount of information per character is 1 to 2 bytes for characters, whereas 64 Kbits per second for speech. (Telephone quality) Furthermore, for moving images, an information amount of 100 Mbits (current television broadcast quality) or more per second is required. In other words, it is not realistic to handle digital information such as a moving image whose information amount is enormous as it is with a corresponding information medium. For example, a video phone has already been put into practical use by an integrated services digital network (ISDN) having a transmission rate of 64 Kbps to 1.5 Mbps, but digital video information corresponding to video output of a TV camera is used as it is. It is impossible to send by ISDN.
[0004]
Therefore, what is required is information compression technology. For example, for videophones, H.264 has been internationally standardized by ITU-T (International Telecommunication Union Telecommunication Standardization Sector). 261 and H.264. H.263 standard video compression technology is used. Further, according to the information compression technology of the MPEG1 standard, it is possible to record image information together with audio information on a normal music CD (compact disc).
[0005]
Here, MPEG (Moving Picture Experts Group) is an international standard relating to the compression technology of moving image data (moving image signal), and MPEG1 has moving image data up to 1.5 Mbps, that is, information of a television signal is about 100. It is a standard that compresses to a fraction. In addition, since the transmission speed for the MPEG1 standard is mainly limited to about 1.5 Mbps, in MPEG2 standardized to meet the demand for higher image quality, moving image data is compressed to 2 to 15 Mbps. .
MPEG2 is a standard relating to the most typical digital image encoding system of the world standard, and is now rapidly spreading in technical fields related to digital TV broadcasting, digital video discs, and the like.
[0006]
Furthermore, the current working group (ISO / IEC JTC1 / SC29 / WG11), which has been standardizing with MPEG1 and MPEG2, enables encoding processing and signal manipulation on an object basis, and realizes new functions required in the multimedia era. The moving image data compression technology is being standardized as MPEG4. MPEG4 originally aimed at standardization of a low bit rate encoding method, but at present, the object of standardization has been extended to a more general encoding process of high bit rate corresponding to interlaced images. Yes.
[0007]
MPEG2 is a standard that supports general-purpose encoding processing, and can be operated under various conditions depending on the application. Here, the operating conditions of MPEG2 are determined by factors related to image quality, such as the number of pixels on the display screen and the bit rate of an image encoded signal (bit stream).
However, in each image device, since the hardware performance is limited by cost constraints, the bitstream that can be handled as the input image signal is limited to the bitstream encoded under a predetermined condition. Often done.
For example, a normal quality TV (television set) decoder cannot decode a HDTV (High Definition Television) quality bitstream (corresponding to a high pixel count image).
On the other hand, in a recording apparatus capable of recording a bit stream obtained by encoding an image signal so that the bit rate becomes 6 Mbps, an input bit stream having a bit rate of 6 Mbps is recorded in the apparatus. By internally compressing the bit rate to 3 Mbps, it is possible to record for a long time by recording the bit stream by an amount corresponding to 4 hours of video.
[0008]
Therefore, a re-encoding technique for converting an MPEG2 bitstream input to each image device into an MPEG2 bitstream corresponding to the hardware performance and purpose of use at each image device becomes important. In recent years, a lot of research results have been published on such re-encoding techniques (Gertjan Keesman, Robert Hellinghuizen, Fokke Hoeksema, Geert Heideman, "Transcoding of MPEG bitstreams", Signal Processing: Image Communication Vol. 8, 1996, pp.481-500 etc.).
[0009]
FIG. 20 is a block diagram for explaining a conventional re-encoding system 100a.
The conventional re-encoding system 100a receives an MPEG2 bit stream Eg1 obtained by an MPEG2-compliant encoding process for image data, and performs a decoding process on the bit stream Eg1 to generate decoded data Rg1. And a coding unit E1 that performs MPEG2 compliant coding processing on the decoded data Rg1 under conditions different from those of the coding processing and outputs re-coded data Eg2. Has been. Here, the MPEG2 bit stream is obtained by encoding image data for each image space (block) as a unit of encoding composed of a predetermined number of pixels. Accordingly, the decoding unit D1 is configured to perform a decoding process on the bitstream for each block, and the encoding unit E1 performs an encoding process on the decoded data Rg1 for each block. It is configured to do.
[0010]
Next, a detailed configuration of the decoding unit D1 constituting the re-encoding system 100a will be described.
The decoding unit D1 performs VLD (variable length decoding device) 100 that performs variable length decoding processing on the encoded MPEG2 bit stream Eg1, and performs inverse quantization on the output Vg of the VLD 100. An inverse quantization apparatus 101; and an IDCT device 102 that performs an IDCT (Inverse Discrete Cosine Transform) process for converting frequency domain data into spatial domain data on an output IQg of the inverse quantization apparatus 101. Yes. The decoding unit D1 includes an adder 103 that adds the output data ITg of the IDCT unit 102 and the prediction data Mg1, and a frame memory 104 that stores the output Rg1 of the adder 103 as the prediction data Mg1. The output Rg1 of the adder 103 is output as the decoded data.
[0011]
Next, a detailed configuration of the encoding unit E1 constituting the re-encoding system 100a will be described.
The encoding unit E1 includes a subtractor 105 that calculates a difference value Dg between the output data Rg1 from the decoding unit D1 and the prediction data Mg2, and spatial domain data for the output Dg of the subtractor 105. A DCT unit 106 that performs DCT (discrete cosine transform) processing to convert the data into frequency domain, and a quantization device 107 that performs quantization processing on the output Tg of the DCT unit 106 based on a quantization control signal Cq; have. The encoding unit E1 also includes a VLC (variable length encoding) unit 112 that performs variable length encoding processing on the output Qg of the quantization device 107, and the quantization control based on the output Eg2 of the VLC unit. A rate control device 113 that outputs the signal Cq to the quantization device 107, and outputs the output Eg2 of the VLC unit 112 as re-encoded data.
[0012]
Here, the rate control device 113 sets the target number of bits when encoding the DCT output Tg corresponding to the block (processed block) that is the target of the encoding process based on the re-encoded data Eg2. The calculated target bit number is output to the quantization device 107 as the quantization control signal Cq.
[0013]
The encoding unit E1 also performs inverse quantization on the output Qg of the quantization device 107, and IDCT (inverse discrete cosine transform) on the output IQg2 of the inverse quantization device 108. And an IDCT device 109 that performs processing. The encoding unit E1 includes an adder 110 that adds the output data ITg2 from the IDCT unit 109 and the prediction data Mg2, and a frame memory 111 that stores the output Rg2 of the adder 110. The output Mg2 of the memory 111 is output as the prediction data.
[0014]
FIG. 21 is a block diagram showing a detailed configuration of the quantizing device 107.
The quantization device 107 receives the target number of bits Cq from the rate control device 113, derives a quantization step Qs2, and outputs the output Tg of the DCT device 106 based on the quantization step Qs2. It also has a quantizer 201 that performs quantization processing.
[0015]
Next, the operation will be described.
First, encoded data Eg1 obtained by performing an encoding process on an image signal is input to the decoding unit D1.
In the VLD unit 100, the encoded data Eg1 is converted into a quantized coefficient Vg by variable length decoding processing and output to the inverse quantization apparatus 101. The quantization coefficient Vg is subjected to an inverse quantization process based on a quantization step in an encoding process for an image signal by the inverse quantization apparatus 101 to restore the frequency component IQg. The frequency component IQg is converted into spatial domain data ITg by IDCT (Inverse Discrete Cosine Transform) processing in which the frequency domain data is converted into spatial domain data by the IDCT unit 102. When the spatial region data ITg is input to the adder 103, the adder 103 performs addition processing of the spatial region data ITg and the prediction data Mg1. The reproduction data Rg1 obtained by the addition process is stored as decoded image data (predicted data) Mg1 in the frame memory 104 and is output as decoded data.
[0016]
Next, the operation of the encoding unit E1 in the re-encoding system 100a will be described.
First, the reproduction data Rg1 output from the decoding unit D1 is input to the subtractor 105. In the subtractor 105, a difference value between the reproduction data Rg1 from the decoding unit D1 and the prediction data Mg2 is obtained as difference data Dg. The difference data Dg is output to the DCT unit 106. In the DCT unit 106, the difference data Dg is converted into a DCT coefficient (frequency component) Tg by a DCT (discrete cosine transform) process for converting spatial domain data into frequency domain data, and the DCT coefficient Tg is quantized. It is output to the device 107.
[0017]
In the quantization device 107, the quantization process is performed on the DCT coefficient Tg from the DCT unit 106 based on the quantization control signal Cq from the rate control device 113. That is, the quantization step deriving unit 200 of the quantization apparatus 107 derives a quantization step different from the quantization step in the inverse quantization process in the decoding unit based on the quantization control signal Cq. . In the quantizer 201, the DCT coefficient Tg is quantized based on the derived quantization step.
[0018]
The quantized value Qg obtained by this quantization processing is output to the VLC unit 112 and the inverse quantization device 108. In the VLC unit 112, variable length coding processing for converting the quantized value Qg from the quantization device 107 into a variable length code is performed, and the variable length code is output as re-encoded data Eg2. Further, the rate control device 113 generates the quantization control signal Cq based on the output Eg2 of the VLC and outputs it to the quantization device 107.
[0019]
On the other hand, in the inverse quantization device 108, the quantization value Qg from the quantization device 107 is subjected to inverse quantization processing, and the DCT coefficient IQg 2 obtained by this inverse quantization processing is output to the IDCT device 109. . The DCT coefficient IQg2 is converted into spatial domain data ITg2 by IDCT (Inverse Discrete Cosine Transform) processing in the IDCT unit 109, and the data ITg2 is output to the adder 110. In the adder 110, the addition process of the output data ITg2 from the IDCT unit 109 and the prediction data Mg2 is performed. The reproduction data Rg2 obtained by this addition processing is stored as prediction data Mg2 in the frame memory 111.
In the re-encoding system 100a shown in FIG. 20, the input encoded data (bit stream) and the encoded data output from this system correspond to the same encoding method (MPEG2 method). However, the re-encoding system 100a converts encoded data corresponding to the H261 standard, H263 standard, MPEG1 standard, or MPEG2 standard into encoded data corresponding to the MPEG4 standard. Good. The re-encoding system 100a may convert encoded data corresponding to the MPEG4 standard into encoded data corresponding to the H263 standard.
[0020]
[Problems to be solved by the invention]
However, the conventional re-encoding system has a problem that it is difficult to reduce the quantization error included in the re-encoded stream.
That is, as described above, the encoded data Eg1 input to the re-encoding system 100a is data obtained by performing an encoding process including a quantization process on the image data. Includes a quantization error. Therefore, the re-encoded data Eg2 obtained by performing the decoding process and the re-encoding process on the encoded data Eg1 includes a quantization error included in the encoded data Eg1. In addition, depending on the quantization condition in the re-encoding process, the quantization error included in the re-encoded data Eg2 may be significantly larger than the quantization error included in the encoded data Eg1. There is a point.
[0021]
Furthermore, in the conventional re-encoding system 100a, there is a problem that it is difficult to set the quantization step in the re-encoding process so that the encoding error can be minimized, and this problem will be described in detail below.
FIG. 22 is a diagram for explaining the relationship between the bit rate of the encoded stream and the encoding error included in the encoded stream. FIG. 22 shows the relationship between the two based on the rate error theory on two-dimensional coordinates. This is illustrated by graph C. In this coordinate, the horizontal axis corresponds to the bit rate and the vertical axis corresponds to the encoding error.
[0022]
In general, a relationship based on the rate error theory is established between the bit rate and the coding error, and a lower limit value of the coding error is determined according to the bit rate. In other words, if the bit rate is high, the encoding error can be made smaller, but if the bit rate is low, the encoding error cannot be reduced so much.
Therefore, in the direct encoding process, that is, the process of encoding the image signal that has not been subjected to the encoding process, the optimum quantization step is determined as follows.
[0023]
First, based on two sets of bit rates and encoding errors obtained by performing an encoding process including a quantization process on the image signal in advance using two quantization steps, an image to be encoded A relational expression (exponential function) corresponding to the bit rate and encoding error is obtained. From this relational expression, the lower limit value of the encoding error corresponding to the bit rate of the encoded stream is known.
[0024]
Next, based on this relational expression, the quantization step is determined so that the coding error is minimized for each frame within a range where the total number of bits corresponding to each frame (screen) does not exceed the frame target bit number. ing. That is, the quantization step is determined so that the actual coding error is closest to the lower limit value of the coding error corresponding to the maximum allowable bit rate.
However, such a method for deriving the optimum quantization step is based on a relational expression (exponential function) indicating the relation between the bit rate and the coding error, and cannot be used in re-encoding processing in which this relational expression cannot be derived. There's a problem.
[0025]
That is, in the stream obtained by the re-encoding process, the encoding error is a combination of the encoding error included in the input stream and the encoding error generated by the re-encoding process. In this case, since the encoding error included in the input stream is unknown, a relational expression (exponential function) indicating the relationship between the bit rate and the encoding error cannot be obtained as in the direct encoding process.
In addition, since the quantization step derivation method determines the quantization step in units of frames (screens), there is a problem in that the encoding error cannot be reduced efficiently.
[0026]
Further, the quantization step derivation method is to determine a quantization step so that a coding error with respect to a target screen (frame to be processed) to be encoded is reduced. There is a problem that does not correspond to the above, and this problem will be briefly described below.
FIG. 23 is a schematic diagram for explaining inter-picture predictive encoding processing in MPEG, and includes image data of typical moving images to be subjected to MPEG-compatible encoding processing, including I frame, P frame, and B frame. It is shown.
[0027]
Here, the I frame F (1) is a frame on which image data corresponding to the I frame F (1) is subjected to an intra-screen encoding process that does not refer to image data corresponding to another frame. P frames F (3) and F (5) are inter-frame predictions that refer to image data corresponding to encoded frames whose display order is earlier than these frames with respect to the image data corresponding thereto. It is a frame on which encoding processing is performed. The B frames F (2) and F (4) are inter-picture predictions that refer to image data corresponding to encoded frames whose display order is before and after these frames. It is a frame on which encoding processing is performed. In addition, display times T1 to T5 (T1 <T2 <T3 <T4 <T5) are set in the frames F (1) to F (5).
[0028]
In this case, the encoding process for the P frame F (3) is performed with reference to the image data corresponding to the I frame F (1), and the image data corresponding to the P frame F (3) is the P frame F. (5) It will be referred to when encoding the B frames F (2) and F (4). Therefore, the coding error associated with the coding process for the P frame F (3) increases at least the prediction residual in the inter-frame prediction coding process for the frames F (2), F (4), and F (5). It will be.
[0029]
In other words, in the inter-picture predictive encoding process, it is possible to correspond to the frame F (3) only by setting the quantization step corresponding to the frame F (3) so as to minimize the encoding error for the frame F (3). There has been a problem that the encoding error corresponding to the frames F (2), F (4), and F (5) that are encoded with reference to the image data cannot be effectively minimized.
[0030]
The present invention has been made to solve the above-described problems, and performs re-encoding processing on encoded data obtained by encoding image data to increase a quantization error included in the encoded data. Encoded data conversion method capable of effectively suppressing The It is an object of the present invention to obtain a data recording medium storing a program for performing processing by an encoded data conversion method by a computer.
[0032]
[Means for Solving the Problems]
The encoded data conversion method according to the present invention (Claim 1) is the first encoded data obtained by performing the encoding process including the first orthogonal transform process and the first quantization process on the image data. A decoding process that generates decoded data by decoding for each coding unit and a re-encoding process that generates second encoded data by encoding the decoded data for each coding unit A method of transforming a quantized data, wherein the decoding process is performed by converting a quantization coefficient obtained from the first encoded data into an inverse quantum by the first quantization step used in the first quantization process. The re-encoding process is a second orthogonal transform process for orthogonally transforming the decoded data to generate frequency domain data, the second encoded data, and the re-encoding process. Second based on the first quantization step; Deriving a quantization step, a process that includes a second quantization process for quantizing with data of the frequency domain in the second quantization step The second quantization process is based on a candidate derivation process for deriving a quantization step candidate based on the second encoded data, and the quantization step candidate and the first quantization step. A quantization step derivation process for deriving the second quantization step, wherein the quantization step derivation process is performed when the quantization step candidate is greater than or equal to the value of the first quantization step, and When having a value within a range smaller than twice the value of the first quantization step, as the second quantization step, a quantization step having the same value as the value of the first quantization step, Alternatively, when a quantization step having a value twice or more the value of the first quantization step is derived and the quantization step candidate has a value outside the above range, the second quantization step is as follows: The amount And process of deriving the reduction step candidate It is a thing.
[0039]
This invention (claim) 2 The data recording medium according to claim 1 stores a data conversion program for performing the encoded data conversion method according to claim 1 by a computer.
[0057]
DETAILED DESCRIPTION OF THE INVENTION
First, the focus and basic principles of the present invention will be described.
As described in the related art, the encoded data input to the re-encoding system is obtained by performing encoding processing including quantization processing (first quantization processing) on image data. The encoded data includes a quantization error.
Further, in the re-encoding system, decoding processing including inverse quantization processing is performed on the encoded data to generate decoded data, and the decoded data is re-quantized (first processing). Re-encoded data is generated by performing an encoding process including a second quantization process.
[0058]
The inventor of the present invention, in the re-encoded data obtained in this way, depending on the quantization condition in the re-encoding process, the quantization error is significantly larger than the quantization error included in the encoded data. As a result of repeated research on the subject, the second quantization process included in the re-encoded data is determined by the magnitude relationship between the quantization step in the first quantization process and the quantization step in the second quantization process. We found that the magnitude of the resulting quantization error changed significantly.
[0059]
This will be briefly described below using graphs.
FIG. 7 is a graph showing the relationship between the bit rate of re-encoded data and the quantization distortion included in the re-encoded data, using a graph on two-dimensional coordinates. Here, the horizontal axis corresponds to the bit rate, and the vertical axis corresponds to the inverse of the quantization error as the quantization distortion. Here, a solid line graph A indicates the bit rate and the quantization corresponding to the encoded data (hereinafter also referred to as direct encoded data) obtained by performing the encoding process including the quantization process only once on the image data. The relationship of distortion is shown. A dotted line graph B shows the relationship between the bit rate and the quantization distortion corresponding to the re-encoded data obtained by re-encoding the directly encoded data.
[0060]
As can be seen from the graph A of the solid line, in the encoding process (direct encoding process) in which the image data is quantized once, the bit rate and the quantization distortion using the quantization step in the encoding process as parameters. The function of the inverse of (quantization error) is almost linear. On the other hand, in the re-encoding process for the directly encoded data, as shown by the dotted line B, the inverse of the bit rate and the quantization distortion (quantization error) using the quantization step in the re-encoding process as a parameter. The function of and is non-linear.
[0061]
For example, when the quantization process in the direct encoding process is performed with the quantization step value (first quantization step value) QPi (QPi = QP), the quantization step value (the first quantization step value in the re-encoding process) 2 quantization step value) QPr is set within a predetermined range (QP ≦ QPr ≦ 2QP), the quantization step value (first quantization step value) QPi in the direct encoding process is set within the predetermined range (QP ≦ QPi ≦ It can be seen that the quantization error is remarkably increased as compared to when it is set within 2QP).
[0062]
Specifically, the quantization error in the re-encoded data has a high bit rate, that is, the quantization step value QPi in the first quantization process and the quantization step value QPr in the second quantization process. On the other hand, when the quantization step value QPr in the second quantization process is 2QP (QPi = QP) or more and the bit rate of the re-encoded data is low, the direct code Experiments have now shown that there is almost no difference between the quantization error in the quantization process and the quantization error due to the re-encoding process.
[0063]
In addition, when the second quantization process is performed in a quantization step that is denser than the quantization step of the first quantization process, the quantization error in the re-encoded data is caused by the quantization error caused by the second quantization process. The quantization error resulting from the first quantization process is larger and dominant than the quantization error. Therefore, even if the second quantization process is performed in a quantization step that is denser than the quantization step in the first quantization process, the bit rate in the re-encoded data only increases and the quantization error can be reduced. It can be said that it is meaningless.
[0064]
Therefore, the present inventor pays attention to the relationship between the quantization step and the quantization error in the re-encoding process as described above, and the quantization error of the re-encoded data obtained by the re-encoding process is directly encoded. In order to solve the problem that it may be significantly larger than the quantization error of the encoded data obtained by the processing, in the re-encoding processing for the encoded data obtained by directly performing the encoding processing on the image data, Then, the quantization step value (second quantization step value) QPr in the quantization process is set to 2 of the quantization step value (first quantization step value) QPi of the quantization process included in the direct encoding process. I came up with a way to make it more than double.
[0065]
Furthermore, in the MPEG encoding method, quantization processing optimized for each of the intra-screen coding processing and the inter-screen coding processing is used, and therefore, the quantization method for intra-screen coding is an inter-screen coding method. This is different from the quantization method for encoding. Also, the magnitude of the quantization error generated by the re-encoding process is closely related to the quantization method in the re-encoding process.
[0066]
For example, in the intra-picture coding process and the inter-picture coding process, the quantization process based on MPEG is performed in the same first quantization step, and the bit streams obtained by these coding processes are similarly applied to the same. When the re-encoding process including the second quantization process by the second quantization step which is k times the first quantization step is performed, the quantization error due to the intra-picture encoding process is the inter-picture encoding process. This experiment also revealed that the error is larger than the quantization error due to.
[0067]
Accordingly, the present inventor has found that the ratio of the second quantization step to the first quantization step in the intra-picture encoding process (requantization ratio) is smaller than the re-quantization ratio in the inter-picture encoding process. A method for deriving the second quantization step was devised.
[0068]
In addition, as a result of intensive studies to solve the problem that it is difficult to set the quantization step Qrd in the re-encoding process described above so that the encoding error can be minimized, the inventor has conducted a bit rate. The relationship between the coding error and the coding error varies depending on the coding method and the image to be coded, but the variation of the coding error relative to the unit variation of the bit rate (that is, the slope of the curve graph C shown in FIG. 23). If all the coding units (for example, a block consisting of 8 × 8 pixels or a macro block consisting of 16 × 16 pixels) constituting one frame are substantially constant, all codes in one frame It has been found that the average value of the encoding error corresponding to the encoding unit is minimized.
[0069]
Therefore, the re-encoding method and re-encoding system according to the present invention quantizes and encodes an input encoded stream so that the bit rate is reduced, and a plurality of types of simulated encoding with different quantization steps. Processing is performed for each coding unit, and the fluctuation amount of the coding error with respect to the unit amount fluctuation of the bit rate is obtained as the re-coding error increase rate, and the re-coding error increase rate corresponding to each coding unit is as constant as possible. Thus, the quantization step is determined for each coding unit.
Hereinafter, embodiments of the present invention will be described with reference to FIGS.
[0070]
(Embodiment 1)
FIG. 1 is a block diagram for explaining a re-encoding system 10 according to an embodiment of the present invention.
The re-encoding system 10 according to the first embodiment receives encoded data Eg1 obtained by performing an encoding process including a quantization process (first quantization process) on image data. Decoding unit Da1 that performs decoding processing including inverse quantization processing on data Eg1 to generate decoded data Rg1, and quantization processing (second quantization processing) again on this decoded data Rg1 ) Including the encoding unit Ea1 that generates the re-encoded data Eg2.
[0071]
The decoding unit Da1 of the re-encoding system 10 according to the first embodiment is the inverse of the output Vg of the VLD (variable length decoder) 100 instead of the inverse quantization device 101 in the conventional decoding unit D1. In addition to performing the quantization process, the apparatus includes an inverse quantization device 101a that outputs the first quantization step Qs1 used at this time to the encoding unit E1. Here, the first quantization step Qs1 used in the inverse quantization process is the same as the quantization step used in the quantization process (first quantization process) for the image data. Further, the re-encoding unit Ea1 of the re-encoding system 10 according to the first embodiment replaces the quantization device 107 in the conventional re-encoding unit E1 with respect to the output Tg of the DCT unit 106, and a rate control device 113. And a quantization device 151 that performs a quantization process based on the quantization control signal Cq from the first quantization step Qs1 from the inverse quantization device 101a.
The remaining configuration of the re-encoding system 10 according to the first embodiment is the same as that of the conventional re-encoding system 100a.
[0072]
FIG. 2 is a block diagram showing a specific configuration of the quantization device 151 in the encoding unit Ea1.
The quantization device 151 performs a quantization step based on the quantization control signal Cq from the rate control device 113 so that the number of encoded bits for the target frame to be encoded approaches the target number of bits for the target frame. Quantization step candidate derivation unit 250 for deriving the candidate Qsb, and a quantization step in the second quantization process (second quantization step) based on the quantization step candidate Qsb and the first quantization step Qs1 A quantization step derivation unit 251 for deriving Qs2, and a quantization unit 201 for performing quantization on the output Tg of the DCT unit 106 based on the second quantization step Qs2 and outputting a quantization coefficient Qg have.
[0073]
FIG. 3 is a block diagram showing a specific configuration of the quantization step deriving unit 251 in the quantization apparatus 151.
The quantization step derivation unit 251 includes a comparator 260 that compares the quantization step candidate Qsb from the quantization step candidate derivation unit 250 with the first quantization step Qs1 from the inverse quantization apparatus 101a, and the comparator A switch 261 that selects and outputs one of the quantization step candidate Qsb and the first quantization step Qs1 based on the comparison result CP1 of 260, and outputs the output of the switch 261 to the second quantization step. It is configured to output as Qs2.
Specifically, the switch 261 selects the first quantization step Qs1 if the quantization step candidate Qsb is less than the first quantization step Qs1, and the quantization step candidate Qsb is the first quantization step. If Qs1 or more, the quantization step candidate Qsb is selected.
[0074]
Next, the operation will be described.
When the encoded data Eg1 obtained by performing the encoding process including the quantization process on the image data is input to the re-encoding system 10 of the first embodiment, the decoding unit Da1 receives the encoded data The decoded data Eg1 is subjected to a decoding process including an inverse quantization process to generate decoded data (reproduced data) Rg1. In the case of the inverse quantization process, the first quantization step Qs1 used in the quantization process is output from the inverse quantization apparatus 101a to the quantization apparatus 151 of the encoding unit Ea1. .
[0075]
When the reproduction data Rg1 output from the decoding unit Da1 is input to the encoding unit Ea1, the subtracter 105 obtains a difference value between the reproduction data Rg1 from the decoding unit Da1 and the prediction data Mg2. This is output to the DCT unit 106 as difference data Dg. In the DCT unit 106, the difference data Dg is converted into a DCT coefficient Tg by DCT (Discrete Cosine Transform) processing, and the DCT coefficient Tg is output to the quantization device 151.
[0076]
In the quantization device 151, the DCT coefficient Tg from the DCT unit 106 is based on the first quantization step Qs1 from the inverse quantization device 101a of the decoding unit Da1 and the quantization control signal Cq from the rate control device 113. Is subjected to a quantization process (second quantization process). The quantization value (quantization coefficient) Qg obtained by this quantization processing is output to the VLC unit 112 and the inverse quantization device 108.
[0077]
Then, the VLC unit 112 performs variable length coding processing for converting the quantized value Qg from the quantization device 151 into a variable length code, and the variable length code is output as re-encoded data Eg2. Further, the rate control device 113 generates a quantization control signal Cq indicating the target number of bits for the target frame based on the output Eg2 of the VLC unit 112 and outputs the generated quantization control signal Cq to the quantization device 151.
[0078]
On the other hand, in the inverse quantization device 108, the quantization value Qg from the quantization device 151 is subjected to inverse quantization processing, and the DCT coefficient IQg2 obtained by this inverse quantization processing is output to the IDCT device 109. . The DCT coefficient IQg2 is converted into data ITg2 in the spatial domain by IDCT (Inverse Discrete Cosine Transform) processing in the IDCT unit 109 and output to the adder 110. The adder 110 adds the output data ITg2 from the IDCT unit 109 and the prediction data Mg2, and the reproduction data Rg2 obtained by the addition processing is stored in the frame memory 111 as prediction data Mg2.
[0079]
Hereinafter, the operation of the quantization apparatus 151 will be described in detail with reference to FIG.
A quantization control signal Cq that is output from the rate control device 113 and indicates the target number of bits for the target frame to be encoded is input to the quantization step candidate derivation unit 250. The quantization step candidate derivation unit 250 derives a quantization step candidate Qsb such that the number of coded bits for the target frame approaches the target number of bits for the target frame, and the quantization step candidate Qsb is obtained from the quantization step derivation unit 251. Is output.
Then, the quantization step deriving unit 251 derives the second quantization step Qs2 based on the quantization step candidate Qsb and the first quantization step Qs1 from the decoding unit Da1, and the second quantization step Qs2 is derived. Step Qs2 is output to the quantizer 201. The quantizer 201 performs a quantization process on the output Tg of the DCT device based on the second quantization step Qs2.
[0080]
At this time, in the quantization step derivation unit 251 shown in FIG. 3, the output 260 of the quantization step candidate derivation unit 250 is output to the comparator 260 and the output of the inverse quantization apparatus 101a of the decoding unit Da1. Qs1 (first quantization step) is input. The comparator 260 compares the output Qsb of the quantization step candidate derivation unit 250 with the output Qs1 of the inverse quantization apparatus 101a, and outputs a comparison result CP1 to the switch 261. Based on the comparison result CP1, the switch 261 selects one of the output Qsb of the quantization step candidate derivation unit 250 and the output Qs1 of the inverse quantization apparatus 101a and derives it as the second quantization step Qs2. .
[0081]
As described above, according to the re-encoding system according to the first embodiment, the inverse quantization apparatus 101a in the decoding unit Da1 performs the inverse quantization process on the output Vg of the VLD unit 100 and performs the inverse quantization process. The first quantization step Qs1 used at the time is configured to be output to the encoding unit Ea1, and the quantization device 151 in the encoding unit Ea1 is connected to the quantization control signal Cq indicating the target number of bits for the target frame and Based on the first quantization step Qs1, since the quantization process is performed with a larger quantization step than the first quantization step Qs1, the re-encoding process for the encoded data Eg1 is performed in the number of bits. This can be performed while suppressing an increase in quantization error without causing an increase in.
[0082]
In the first embodiment, as the second quantization step Qs2, if necessary, the quantization step candidate Qsb obtained based on the quantization control signal Cq (target bit number) and the first quantization step Qs2 Since one of the quantization steps is used, the number of bits per frame of the re-encoded data Eg2 slightly increases or decreases with respect to the target number of bits as compared with the case where only the quantization step candidate Qsb is used as the second quantization step. However, the increase / decrease in the number of bits is negligible. That is, in the first embodiment, the quantization process in the re-encoding process is performed in a block unit having a predetermined number of pixels in the frame and with a quantization step larger than the first quantization step Qs1. . For this reason, in an actual application, the increase or decrease in the macro number of bits due to the change in the number of bits in frame units, which is important, is negligible. Therefore, the configuration in which the second quantization process is performed in a quantization step larger than the first quantization step Qs1 in the first embodiment is based on the rate control in this first embodiment, that is, the re-encoded data. It does not hinder the feedback control that controls the number of bits per frame by the quantization step.
[0083]
(Embodiment 2)
FIG. 4 is a block diagram for explaining the quantizing device 152 constituting the re-encoding system according to Embodiment 2 of the present invention.
The quantization device 152 in the re-encoding system of the second embodiment replaces the quantization step derivation unit 251 in the quantization device 151 of the first embodiment with the quantization step candidate Qsb as the first quantization process. Quantization step (first quantization step) at Qs1 is compared with a threshold value Qth obtained from Qs1 and a constant multiple value Qmu obtained by multiplying the first quantization step Qs1 by a constant number. The quantization step derivation unit 252 for deriving the quantization step Qs2 is provided. Here, the threshold value Qth is m times the first quantization step Qs1, and the constant multiple value Qmu is n times (n> m) the first quantization step Qs1, specifically, , M is 1.5, and n is 2.
The other configurations in the re-encoding system according to the second embodiment are the same as those in the re-encoding system 10 according to the first embodiment.
[0084]
FIG. 5 shows a quantization step deriving unit 252 constituting the quantization device 152.
The quantization step derivation unit 252 generates a threshold value derivation unit 262 that derives a threshold value Qth (= m × Qs1) based on the first quantization step Qs1, and the threshold value Qth and the quantization step candidate derivation unit 250. The comparison with the quantized quantization step candidate Qsb, and outputs a comparison output CP2 indicating the comparison result, and based on the output CP2 of the comparator 263, the first quantization step Qs1 and the quantum step And a switch 264 that selects one of the quantization step candidates Qsb and outputs it as the selected quantization step Qse. Here, when the result of the comparison by the comparator 263 is that the quantization step candidate Qsb is less than the threshold value Qth, the switch 264 outputs the first quantization step Qs1 as the selective quantization step Qse, When the quantization step candidate Qsb is equal to or greater than the threshold value Qth, the quantization step candidate Qsb is output as the selective quantization step Qse.
[0085]
The quantization step derivation unit 252 includes a constant multiplier 265 that outputs a constant multiple value Qmu (= n × Qs1) by multiplying the first quantization step Qs1 by a constant number (n times), and the constant multiple value. Qmu is compared with the quantization step candidate Qsb from the quantization step candidate derivation unit 250, and a comparator 266 that outputs a comparison output CP3 indicating the comparison result, and a comparison output CP3 from the comparator 266 And a switch 267 that selects one of the selected quantization step Qse from the switch 264 and the constant multiple value Qmu from the constant multiplier 265 and outputs it as the second quantization step Qs2. Here, when the result of the comparison by the comparator 266 is that the quantization step candidate Qsb is less than the constant multiple value Qmu, the switch 267 outputs the constant value Qmu as the second quantization step Qs2. When the quantization step candidate Qsb is equal to or larger than the constant multiple value Qmu, the selected quantization step Qse from the switch 264 is output as the second quantization step Qs2.
The multiple value n in the constant multiplier 265 is equal to or greater than the multiple value m in the threshold deriving unit 262. The multiple value m in the threshold deriving unit 262 is a target bit rate, frame rate, quantization method, or the like. It is possible to switch by.
[0086]
FIG. 6 is a graph showing the relationship between the second quantization step Qs2 obtained by the quantization step derivation unit 252 configured as described above and the quantization step candidate Qsb output from the quantization step candidate derivation unit 250. Is shown. Note that m and n are m = 1.5 and n = 2, respectively.
As can be seen from the graph D, if the quantization step candidate Qsb is less than the threshold value Qth, the quantization step derivation unit 252 outputs the first quantization step Qs1 as the second quantization step Qs2. If the quantization step candidate Qsb is equal to or greater than the threshold value Qth (1.5 × Qs1) and less than the constant multiple value Qmu (= 2 × Qs1), it is twice the first quantization step Qs1 (2 × Qs1). Is selected as the second quantization step Qs2. Further, if the quantization step candidate Qsb is equal to or greater than the multiple value Qmu (= 2 × Qs1), the quantization step candidate Qsb is selected as the second quantization step Qs2.
[0087]
Next, the operation will be described.
In the re-encoding system of the second embodiment, the operations other than the quantization step derivation unit 252 constituting the quantization device 152 are the same as those in the re-encoding system 10 of the first embodiment. Therefore, only the operation of the quantization step derivation unit 252 will be described in detail below.
[0088]
In the re-encoding system of the second embodiment, when the encoding process including the quantization process is performed on the data Rg reproduced by the decoding unit Da1, the quantization apparatus 152 The quantization step candidate derivation unit 250 generates a quantization step candidate Qsb. Then, in the quantization step deriving device 252, based on the threshold value Qth and the constant multiple value Qmu obtained from the first quantization step Qs1 supplied from the inverse quantization device 101a of the decoding unit Da1, the first quantum value is calculated. One of the quantization step Qs1, the constant multiple value Qmu, and the quantization step candidate Qsb is selected as the second quantization step Qs2. Then, the quantizer 201 performs a quantization process on the frequency domain data Tg based on the second quantization step Qs2.
[0089]
Hereinafter, the operation of the quantization step deriving unit 252 will be specifically described.
When the first quantization step Qs1 is input from the decoding unit to the quantization step deriving unit 252, the threshold deriving unit 262 derives a predetermined threshold Qth by an operation of multiplying the first quantization step Qs1 by m. The threshold value Qth is output to the comparator 263. Then, the comparator 263 compares the quantization step candidate Qsb from the quantization step candidate derivation 250 with the threshold Qth from the threshold derivation 262, and outputs a comparison output CP2 indicating the comparison result to the switch 264. The switch 264 selects one of the first quantization step Qs1 and the quantization step candidate Qsb based on the comparison output CP2 and outputs the selected quantization step Qse to the switch 267.
[0090]
At this time, the constant multiplier 265 generates a constant multiple value Qmu by an operation of multiplying the first quantization step Qs1 from the decoding unit Da1 by n, and the constant multiple value Qmu is supplied to the switch 267 and the comparator 266. Is output. In this comparator 266, the quantization step candidate Qsb from the quantization step candidate derivation unit 250 is compared with the constant multiple value Qmu from the constant multiplier 265, and the comparison output CP3 indicating the comparison result is output to the switch 267. Is done. Then, in the switch 267, one of the constant multiplication value Qmu from the constant multiplier 265 and the selected quantization step Qse selected by the switch 264 is selected based on the comparison output CP3, and the second quantum is selected. Step Qs2.
[0091]
As described above, in the re-encoding system according to the second embodiment, quantization for deriving the quantization step candidate Qsb based on the relationship between the bit rate of the re-encoded data and the quantization distortion included in the re-encoded data. Deriving a quantization step (second quantization step) Qs2 in the re-encoding process based on the step candidate derivation unit 250, the quantization step candidate Qsb, and the first quantization step Qs1 used in the inverse quantization process The quantization step candidate Qsb is within an optimum range determined from the magnitude relationship between the quantization step candidate Qsb, the first quantization step Qs1 and its constant multiple value Qmu. If it has a value, the quantization step candidate Qsb is output as a second quantization step Qs2, and the quantization step candidate Qsb When the value is out of the range, the first quantization step Qs1 or a quantization step Qmu that is a multiple of the first quantization step Qs1 is output, so that the re-encoding process on the encoded data Eg1 is performed without increasing the number of bits. This can be performed while effectively suppressing an increase in the conversion error.
[0092]
In the second embodiment, when the quantization step candidate Qsb is less than the constant multiple value Qmu (n times the first quantization step Qs1), the second quantization step Qs2 is set to the threshold value Qth. With (m × Qs1) as a reference, rounding is performed to either the first quantization step Qs1 or a constant multiple value Qmu that is n times the first quantization step Qs1, but the threshold value Qth is varied. You may do it.
For example, the threshold value Qth is frequently switched between the second quantization step Qs2 and the constant multiple value Qmu, which is n times the first quantization step Qs1. By changing it so that it changes, it is possible to make the rate control with a predetermined bit rate the encoding bit rate highly responsive.
[0093]
Specifically, the threshold value Qth is changed as follows, and the quantization step Qs2 is determined based on the obtained new threshold value Qth ′.
First, the average of the quantization step candidates Qsb is obtained as the target average quantization step Qt, and the average of the second quantization step Qs2 is obtained as the actual average quantization step Qave.
When the actual average quantization step Qave is larger than the target average quantization step Qt, in other words, when the quantization step candidate Qsb has an average small value, Qth ′ = Qth / 2 is set as a new threshold value. And However, when Qth ′ is smaller than Qs1, Qth ′ = Qs1.
Further, when the actual average quantization step Qave is smaller than the target average quantization step Qt, in other words, when the quantization step candidate Qsb has an average large value, Qth ′ = Qth + Qth / 2 is set as a new threshold value. And However, when Qth ′ is larger than Qmu, Qth ′ = Qmu.
[0094]
(Embodiment 3)
FIG. 8 is a block diagram for explaining the re-encoding system 30 according to the third embodiment.
The re-encoding system 30 according to the third embodiment replaces the quantization device 151 in the encoding unit Ea1 according to the first embodiment with quantization steps corresponding to the intra-frame coding process and the inter-frame coding process, respectively. And a quantization device 153 that performs quantization processing in quantization steps corresponding to each encoding processing, and switches between intra-screen encoding processing and inter-screen encoding processing in units of blocks or frames. The quantization process can be switched between the one corresponding to the intra-frame encoding process (intra-screen quantization process) and the one corresponding to the inter-picture encoding process (inter-screen quantization process). ing.
[0095]
FIG. 9 is a block diagram showing the configuration of the quantization device 153. As shown in FIG.
The quantization device 153 performs one frame quantization step for each macroblock in the in-screen quantization process based on the first quantization step Qs1 used in the inverse quantization process by the decoding unit Da1. On the basis of the in-screen average quantization step deriving device 270 for calculating a value Qintra (first in-screen average quantization step QsI1) obtained by averaging every time, and the inter-screen quantum based on the first quantization step Qs1. An inter-screen average quantization step derivation unit 271 that calculates a value Qinter (first inter-screen average quantization step QsP1) obtained by averaging the quantization steps for each macroblock in the quantization process for each frame. ing.
[0096]
Further, in the quantization device 153, in the in-screen quantization process based on the second quantization step Qs2 used in the quantization process up to the previous frame immediately before the target frame to be encoded. An in-screen average quantization step derivation unit 272a for calculating a value Qintra (second in-screen average quantization step QsI2) obtained by averaging the quantization steps for each macroblock for each frame; and the second quantum The inter-screen average for calculating a value Qinter (second inter-screen average quantization step QsP2) obtained by averaging the quantization steps for each macroblock in the inter-screen quantization processing for each frame based on the quantization step Qs2 A quantization step deriving device 272b.
[0097]
Further, the quantization device 153 refers to the first and second intra-screen average quantization steps SQsI1 and QsI2 and the first and second inter-screen average quantization steps QsP1 and QsP2, and thereby performs a quantization control signal. A quantization step derivation unit 273 that derives the quantization step Qs2 from the target number of bits input as Cq, and a quantizer 201 that quantizes the output Tg from the DCT unit 106 based on the second quantization step Qs2. And have.
[0098]
FIG. 10 is a block diagram showing a specific configuration of the quantization step deriving device 273.
The quantization step derivation unit 273 corresponds to the processed macroblock indicated by the quantization control signal Cq based on the first intra-screen average quantization step QsI1 and the first inter-screen average quantization step QsP1. A frame target bit number determiner 710 for calculating a target bit number fCg for the processing target frame to be requantized from the target bit number to be requantized, and the target bit number fCg for the processing target frame and the quantum from the rate control device 113 A macroblock target bit number determiner 711 for generating a bit number mCg that can be used for the processed macroblock based on the control signal Cq, and the bit number mCg, the second in-screen average quantization step QsI2 , The second inter-screen average quantization step QsP2 and the quantum from the rate control device 113 Based on the control signal Cq, and a quantization step determiner 712 determines a quantization step Qs2 for the processing macro block.
[0099]
Here, the value of the first intra-screen average quantization step QsI1 is Qintra, and the value of the first inter-screen average quantization step QsP1 is Qinter. The ratio between the intra-screen requantization step and the inter-screen requantization step is set so that the number of encoded bits is Nintra and Ninter, respectively, and the ratio of the requantization error in the intra-frame encoding process and the inter-screen encoding process is corrected. Is α × Qintra: Qinter. Then, since the quantization step and the number of encoded bits are in an inversely proportional relationship, the ratio of the number of bits per frame between the intra-coded frame after re-quantization and the inter-coded frame is Nintra / α: Ninter. Here, α is a value satisfying 0 <α <1.
[0100]
Therefore, the frame target bit number determiner 710 determines that the ratio between the intra-frame encoded frame and the inter-frame encoded frame regarding the number of bits per unit time output by the re-encoding process is Nintra / α × screen. The target number of bits fCg per frame is generated so that the number of inner encoded frames is Ninter × the number of interframe encoded frames.
[0101]
Further, the macroblock target bit number determiner 711 uses the bit generated in the encoding process for the already processed macroblock in the frame to be processed from the target bit number fCg per frame derived by the frame target bit number determiner 710. The number of bits is subtracted, and the remaining number of bits corresponding to the processed frame (that is, the number of bits that can be used for encoding the unprocessed macroblock in the processed frame) is divided by the number of unprocessed macroblocks. The number of bits is output to the macroblock quantization step determiner 712 as the number of bits that can be used for the encoded macroblock.
[0102]
The number of bits corresponding to a macroblock and the quantization step are generally in the following relationship.
Intrascreen coding quantization step
= Kintra / Number of bits that can be used for coded macroblock (Formula A)
[0103]
Inter-screen coding quantization step
= Kinter / number of bits available for coded macroblock (formula B)
Here, Kintra and Kinter are constants. In addition, the intra-frame coding quantization step is a quantization step used for each macroblock to be processed in the quantization process (intra-screen quantization process) in the intra-screen coding process. The quantization quantization step is a quantization step used for each macroblock to be processed in the quantization processing (inter-screen quantization processing) in the inter-screen encoding processing.
[0104]
In the macroblock quantization step determiner 712, the following (formula C) and (formula D) are based on the target bit number Cg from the rate controller 113, the in-screen average quantization step QsI2, and the inter-screen average quantization step QsP2. ) To obtain the values of Kintra and Kinter for each macroblock. Next, Kintra and Kinter in the above (formula A) or (formula B) are updated with the obtained values of Kintra and Kinter, and these (formula A) and (formula B) are updated with respect to the encoded macroblock. By substituting the number of bits that can be used in this manner, the quantization step Qs2 corresponding to each macroblock is derived.
Kintra
= In-screen average quantization step
× (Number of intra-coded bits / number of intra-coded macro blocks) (Formula C)
Kinter
= Inter-screen average quantization step
× (number of inter-coded bits / number of inter-coded macro blocks) (Formula D)
[0105]
Next, the function and effect will be described.
In an encoding method such as MPEG, an encoding process for an image signal (image data) includes an intra-screen encoding process that uses a pixel value correlation within a screen and an inter-screen encoding process that uses a pixel value correlation between screens. Are switched in units of macroblocks or frames. Further, in the encoding process, the quantization method is switched between a method corresponding to the intra-screen encoding process and a method corresponding to the inter-screen encoding process.
[0106]
By the way, since the quantization error caused by the re-encoding process differs depending on the quantization method, it is necessary to derive a quantization step corresponding to the type of the encoding process in order to reduce re-encoding distortion. .
In particular, in the MPEG system, when re-encoding processing is performed on intra-screen encoded data obtained by intra-screen encoding processing and inter-screen encoded data obtained by inter-screen encoding processing, On the other hand, when the quantization process is performed with the same quantization step, the re-encoding error for intra-frame encoded data tends to be larger than the re-encoding error for inter-frame encoded data.
Therefore, in the re-encoding process for the intra-picture encoded data, it is necessary to perform the re-quantization process in a denser quantization step (that is, a smaller quantization step) compared to the re-encoding process for the inter-picture encoded data. is there. In addition, the number of bits generated by the re-encoding process for the intra-picture encoded data needs to be the target number of bits.
[0107]
That is, in the quantization step derivation unit 273 of the third embodiment, the quantizer is based on the average quantization steps that are the outputs of the intra-screen average quantization step derivation unit 270 and the inter-screen average quantization step derivation unit 271. The number of bits corresponding to one frame generated by the intra-frame coding quantization step, the inter-frame coding quantization step, and the re-coding process in the quantization process 201 is predicted. Then, in the quantization step deriving device 273, based on these prediction values, the above-mentioned intra-frame encoding quantization step and inter-frame encoding quantization step are such that the number of bits corresponding to each frame is a predetermined number of bits on average. In addition, the intra-picture encoding quantization step is determined to be denser than the inter-picture encoding quantization step.
Further, the intra-screen average quantization step derivation unit 272a and the inter-screen average quantization step derivation unit 272b respectively perform the intra-screen quantization step and the inter-screen quantization derived as the second quantization step by the quantization step derivation unit 273, respectively. The average value of the conversion step is calculated. Further, in the quantization step deriving device 273, based on these average values, a relational expression indicating the relationship between the number of target bits corresponding to each macroblock necessary for the second quantization step deriving process and the quantization step ( The above (formula A) and (formula B)) are corrected.
[0108]
Hereinafter, a specific operation of the re-encoding system according to the third embodiment will be described.
In the re-encoding system according to the third embodiment, the operations other than the quantization device 153 constituting the encoding unit Ea1 are the same as those in the re-encoding system 10 according to the first embodiment. Therefore, the operation of the quantization device 153 will be described below.
[0109]
In the re-encoding system of the third embodiment, when the encoding unit Ea1 performs the encoding process including the quantization process on the data Rg generated by the decoding unit Da1, the quantization device 153 Then, the quantization step derivation unit 273 derives the second quantization step Qs2 corresponding to each of the intra-frame coding processing and the inter-screen coding processing, and the frequency based on the second quantization step. A quantization process is performed on the region data Tg.
[0110]
That is, when the first quantization step Qs1 is input from the decoding unit Da1 to the quantization device 153, the average quantization step deriving unit 270 and the inter-screen average quantization step deriving unit 271 input the first quantization step Qs1. From the first quantization step Qs1, a first intra-screen average quantization step QsI1 and a first inter-screen average quantization step QsP1 are respectively calculated, and these quantization steps QsI1 and QsP1 are quantized step deriving device 273. Is output.
[0111]
In the quantization step derivation unit 273, both the quantization steps QsI1 and QsP1, and the second intra-screen average quantization step QsI2 and the second intra-screen average quantization step QsP2 for the re-encoded frame are performed. Referring to FIG. 8, second quantization step Qs 2 is derived based on the target number of bits indicated by quantization control signal Cq, and second quantization step Qs 2 is output to quantizer 201.
[0112]
Then, in this quantizer 201, based on the derived second quantization step Qs2, the quantization process is performed on the frequency domain data Tg from the DCT unit 106 in the encoding unit Ea1. The intra-screen average quantization step derivation unit 272a and the inter-screen average quantization step derivation unit 272b are based on the output Qs2 of the quantization step derivation unit 273, respectively, and the second intra-screen average quantization step QsI2 and A second inter-screen average quantization step QsP2 is calculated.
[0113]
Hereinafter, the operation of the quantization step deriving device 273 will be described in detail with reference to FIG.
The quantization step deriving unit 273 includes a first intra-screen average quantization step QsI1 from the intra-screen average quantization step deriving unit 270 and a first inter-screen average quantization step deriving unit 271. When the quantization step QsP1 is input, the frame target bit number determiner 710, based on these quantization steps QsI1 and QsP1, sets the target bit number for each macroblock indicated by the quantization control signal Cq from the rate control device 113 The target bit number fCg per frame is calculated and output to the macroblock target bit number determiner 711.
[0114]
The macroblock target bit number determiner 711 first calculates the number of bits generated in the encoding process of the processed macroblock in the processed frame and the number of unprocessed macroblocks based on the quantization control signal Cq. . Next, in the macroblock target bit number determiner 711, based on the target bit number fCg per frame from the frame target bit number determiner 710, the processed macroblock in the processed frame is calculated from the target bit number fCg. The number of bits generated in the encoding process is subtracted, and the remaining number of bits of the processed frame is calculated. Then, the calculated remaining number of bits of the frame to be processed is divided by the number of unprocessed macroblocks. The number of bits obtained in this way is output to the macroblock quantization step determiner 712 as the number of bits mCg that can be used for the processed macroblock.
[0115]
When the number of bits mCg that can be used for the encoded macroblock is input to the macroblock quantization step determiner 712, the quantization control signal Cq that is the output of the rate control device 113 and the in-screen average quantization step With reference to the second average quantization step QsI2 that is the output of the derivation unit 272a and the second average quantization step QsP2 that is the output of the inter-screen average quantization step derivation unit 272b, the number of bits corresponding to the macroblock And the quantization step Qs2 for the macro block to be processed is derived based on the relationship between the quantization step (the above (formula A) to (formula D)).
[0116]
As described above, in the re-encoding system 30 according to the third embodiment, the quantization step derivation unit 273 causes each macro to correct the ratio of the re-quantization error in the intra-frame coding process and the inter-frame coding process. Since the second quantization step corresponding to the block is derived, re-encoding processing including intra-screen encoding processing and inter-screen encoding processing is performed while effectively suppressing an increase in quantization error. be able to.
[0117]
(Embodiment 4)
FIG. 11 is a block diagram for explaining a re-encoding system according to Embodiment 4 of the present invention.
The re-encoding system 40 of the fourth embodiment performs a decoding process including an inverse quantization process for each encoding unit on the input stream Vin and outputs decoded image data (decoded stream) Vdec. , A decoder U1 that outputs the quantization step Qin used in the inverse quantization process, and a quantization process by the quantization step Qa with reference to the image data of the reference screen with respect to the decoded image data Vdec And a first simulated encoder U2a that performs a first simulated encoding process including a local decoding process for each encoding unit, and the image data of the reference screen with respect to the image decoded data Vdec, A second simulated encoder U2b that performs a second simulated encoding process including a quantization process by a quantization step Qb larger than the quantization step Qa and a local decoding process for each encoding unit; The input stream Vin is image encoded data obtained by performing an encoding process including a quantization process for each encoding unit on the image data. The coding unit is an area (macroblock) composed of 16 × 16 pixels in one screen (frame).
[0118]
Here, the first simulated encoder U2a outputs the local decoded image data Vstra obtained by the local decoding process included in the first simulated encoding process, and is included in the simulated encoding process. A quantization step Qa corresponding to each coding unit used in the quantization process, a coding error (simulated coding increase error) Da corresponding to each coding unit generated by the simulation coding process, and The number of bits per coding unit (number of simulated coding bits) Ra generated by the simulation coding process is output for each coding unit. The second simulated encoder U2b outputs local decoded image data Vstrb obtained by the local decoding process included in the second simulated encoding process, and is included in the simulated encoding process. The quantization step Qb used in the quantization process, the coding error (simulated coding increase error) Db caused by the simulation coding process, and the number of bits per coding unit (simulation) generated by the simulation coding process The encoding bit number) Rb is output for each encoding unit.
[0119]
Further, the re-encoding system 40 outputs a first simulated memory U3a for storing the locally decoded image data Vstra output from the first simulated encoder U2a and an output from the second simulated encoder U2b. And a second simulated memory U3b for storing the locally decoded image data Vstrb.
[0120]
In addition, the re-encoding system 40 includes a quantization step Qa, a simulated encoding increase error Da, a simulated encoding bit number Ra output from the first simulated encoder U2a, and a second simulated encoding. On the basis of the quantization step Qb, the simulated encoding increase error Db, the simulated encoded bit number Rb, and the number of bits (frame target bit number) Rd assigned to each frame (screen) output from the unit U2b A quantization step derivation unit U74 that selects and outputs one of the quantization steps Qa and Qb as the optimum quantization step Qd corresponding to the coding unit is provided. Specifically, in this quantization step derivation unit U74, recoding is performed for each coding unit from the quantization steps Qa, Qb, simulated coding increase errors Da, Db, and simulated coding bit numbers Ra, Rb. One of the quantization steps Qa and Qb is selected as a quantization step corresponding to each encoding unit so that the increase rate of the encoding error λ is obtained and the re-encoding error increase rate corresponding to each encoding unit is as constant as possible. It has come to be.
[0121]
The re-encoding system 40 performs re-encoding processing including quantization processing and local decoding processing in the quantization step Qd on the decoded image data Vdec with reference to the image data on the reference screen. A main encoder U2d that outputs a re-encoded stream Vout and outputs locally decoded image data Vstrd obtained by the local decoding process, a main memory U3d that stores the locally decoded image data Vstrd, and an external A frame target bit number calculator U6 for calculating the frame target bit number Rd based on the target bit rate Rate supplied from the bit rate and the bit rate of the re-encoded stream Vout.
[0122]
Here, the first simulated memory U3a stores the locally decoded image data Vstra from the first simulated encoder U2a, and the stored image data is simulated for an unprocessed screen following the screen to be processed. In the encoding process, the reference screen image data (reference image data) Va is output to the first simulated encoder U2a. The second simulated memory U3b stores the locally decoded image data Vstrb from the second simulated encoder U2b, and the stored image data is subjected to a simulated encoding process for an unprocessed screen following the screen to be processed. In this case, the image data (reference image data) Vb of the reference screen is output to the second simulated encoder U2b. Further, the main memory U3d converts the stored local decoded image data Vstrd as image data (reference image data) Vrefd of the reference screen during re-encoding processing on the unprocessed screen following the processing target screen. Output to the converter U2d, and the first and second reference image data (reference image data) Vrefa and Vrefb at the time of the first and second simulation encoding processes for the unprocessed screen following the screen to be processed. It is configured to output to two simulated encoders U2a and U2b.
[0123]
As described above, since the locally decoded image data corresponding to the re-encoded stream that is actually output is stored in the main memory U3d, the first and second simulated encoders U2a and U2b Of the image data of each encoded screen stored in the main memory U3d, it corresponds to the same screen as the image data of the encoded screen stored in the first and second simulated memories U3a and U3b. For the image data, instead of the encoded screen image data Va and Vb stored in the first and second simulated memories U3a and U3b, the image of each encoded screen stored in the main memory U3d. Data Vrefa and Vrefb are referred to.
[0124]
Next, the recoding error increase rate λ1 used in the quantization step derivation unit U74 of the fourth embodiment will be described.
FIG. 12 shows a simulation encoding error caused by the simulation encoding process of the decoded image data Vdec by the first and second simulation encoders U3a and U3b of the re-encoding system 40 and the simulation encoding process. It is a figure for demonstrating the relationship with the number of bits per encoding unit (simulated encoding bit number).
[0125]
Here, the actual encoding errors Dra and Drb included in the simulated encoded stream generated by each simulated encoder are the encoding error Din included in the input stream Vin and the simulation generated by each simulated encoding process. This is the sum of encoding errors Da and Db.
That is, the actual encoding error Dra included in the first simulated encoded stream obtained by applying the first simulated encoding process including the quantization process of the quantization step Qa to the decoded image data Vdec is expressed by the following equation (1). It is represented by
Dra = Din + Da (Formula 1)
[0126]
The actual coding error Drb included in the second simulated encoded stream obtained by applying the second simulated encoding process including the quantization process of the quantization step Qb to the decoded image data Vdec is expressed by the following equation (2). It is represented by
Drb = Din + Db (Formula 2)
[0127]
Therefore, the actual encoding error difference ΔDab included in the first and second simulated encoded streams is expressed by the following Equation 3. However, here, since the quantization step Qb in the second simulation encoding process is larger than the quantization step Qa in the first simulation encoding process, the encoding error Db by the second simulation encoding process is equal to the second simulation encoding process. It is larger than the coding error Da by the simulation coding process.
Figure 0004421734
[0128]
Further, the difference ΔRab between the number of bits per coding unit (first and second simulated coding bits) Ra and Rb obtained by the first and second simulated coding processes is expressed by the following equation (4). Is done. However, here, since the quantization step Qb in the second simulation encoding process is larger than the quantization step Qa in the first simulation encoding process, the second simulation encoding bit number Rb is the first simulation code. Smaller than the number of bits Ra.
ΔRab = Ra−Rb (Formula 4)
[0129]
Therefore, the re-encoding error increase rate (a variation in the number of simulated encoded bits per unit variation of the bit rate) λ1 is expressed by the following Equation 5.
Figure 0004421734
[0130]
In general, as the quantization step in the encoding process increases, the amount of variation in encoding error per unit bit number in the encoded stream increases.
Therefore, a quantization step derivation for selecting one of the quantization step Qa in the first simulation encoding process and the quantization step Qb in the second simulation encoding process as the optimum quantization step Qd for each encoding unit. In the unit U74, the re-encoding error increase rate λ1 is small as a condition for error minimization so that the re-encoding error increase rate λ1 has the same value as much as possible between the respective encoding units in one frame. For the coding unit, the larger quantization step Qb is used as the optimum quantization step Qd, and for the coding unit having the larger recoding error increase rate λ1, the smaller one is used as the optimum quantization step Qd. The quantization step Qa is used.
[0131]
FIG. 13 is a block diagram showing a specific configuration of the quantization step derivation unit U74 constituting the re-encoding system 40 of the fourth embodiment.
The quantization step deriving unit U74 generates first and first corresponding to each coding unit generated by the first and second simulated encoding processes from the first and second simulated encoders U2a and U2b. A bit number subtracter U8b which receives the simulated coded bit numbers Ra and Rb of 2 and calculates a difference between these simulated coded bit numbers as a simulated coded bit number increase amount ΔRab; and the first and second simulated codes The encoders U2a and U2b receive simulated encoding errors (recoding increase errors) Da and Db corresponding to the respective encoding units, and the difference between these recoding increase errors is used as a simulated encoding error increase amount Dab. And an error subtracter U9b for calculation.
[0132]
Further, the quantization step derivation unit U74 divides the simulated coding error increase amount ΔDab by the simulated coding bit number increase amount ΔRab to derive a recoding error increase rate λ1 corresponding to each coding unit. One of the quantization steps Qa and Qb corresponding to each coding unit from the unit U10b and the first and second simulated encoders U2a and U2b is selected based on the control signal Qse1 and processed The selection switch U14 output as the optimum quantization step Qd corresponding to the coding unit is compared with the size of the recoding error increase rate λ1 between the coding units, and the number of frame bits (1 frame) A minimum error selector U20 that controls the selection switch 14 with a control signal Qse1 so that the number of bits in the re-encoded stream) becomes the frame target bit number Rd.
[0133]
Next, the operation will be described.
When the input stream Vin is supplied to the re-encoding system 40, the decoder U1 performs a decoding process including an inverse quantization process on the input stream Vin that is the encoded stream, and the decoded stream (Decoded image data) Vdec and the quantization step Qin in the inverse quantization process are output for each coding unit.
Then, in the first simulated encoder U2a, the reference image data Va stored in the first simulated memory U3a or the reference image data Vrefa stored in the main memory U3d is referred to as a processing target. A first simulated encoding process including a quantization process by the quantization step Qa and a local decoding process is performed for each decoding unit on the decoded stream Vdec of the target screen. The quantization step Qa is set not to be smaller than the quantization step Qin used in the inverse quantization process. Accordingly, the first simulated encoder U2a outputs the locally decoded image data Vstra, and also outputs the quantization step Qa, the simulated encoded bit number Ra, and the simulated encoding error Da.
[0134]
Similarly, in the second simulated encoder U2b, the reference image data Vb stored in the second simulated memory U3b or the reference image data Vrefb stored in the main memory U3d is referred to as a processing target. A second simulated encoding process including a quantization process by the quantization step Qb and a local decoding process is performed on the decoded stream Vdec of the target screen. Note that the quantization step Qb is set not to be smaller than the quantization step Qin in the inverse quantization process included in the first simulated encoding process, and to a value larger than the quantization step Qa. Thus, the second simulated encoder U2b outputs the locally decoded image data Vstrb, and also outputs the quantization step Qb, the simulated encoded bit number Rb, and the simulated encoding error Db.
[0135]
At this time, the locally decoded image data Vstra and Vstrb are stored in the first and second simulated memories U3a and U3b as image data corresponding to the encoded screen (frame). Thus, the image data stored in the first and second simulated memories U3a and U3b are used as the reference image data Va and Vb in the process of encoding the decoded data corresponding to the unprocessed screen.
[0136]
In the quantization step deriving unit U74, the quantization steps Qa and Qb from the first and second simulated encoders U2a and U2b, the number of simulated encoded bits Ra and Rb, and the simulated encoding error Da, Based on Db, a process of deriving an optimal quantization step Qd corresponding to each encoding unit is performed so that the number of encoded bits corresponding to the target screen being processed does not exceed the frame target bit number Rd. .
[0137]
This optimum quantization step Qd is supplied to the main encoder U2d, and the main encoder U2d re-encodes the decoded image data Vdec including the quantization process by the quantization step Qd and the local decoding process. Processing is performed with reference to the reference image data Vrefd stored in the main memory U3d. As a result, the re-encoded stream Vout is output from the main encoder U2d, and the locally decoded image data Vstrd is output.
[0138]
At this time, the locally decoded image data Vstrd is stored in the main memory U3d as image data corresponding to the encoded screen (frame). The image data stored in the main memory U3d in this way is used as the reference screen data Vrefd in the re-encoding process of the image data corresponding to the unprocessed screen, and the image data corresponding to the unprocessed screen is stored. The reference screen data Vrefa and Vrefb are also used in the first and second simulation encoding processes.
[0139]
Since the main memory U3d stores locally decoded image data corresponding to the re-encoded stream Vout that is actually output, the first and second simulated encoders U2a and U2b Of the image data of each encoded screen stored in the main memory U3d, it corresponds to the same screen as the image data of the encoded screen stored in the first and second simulated memories U3a and U3b. For the image data, each code stored in the main memory U3d instead of the image data (reference image data) Va and Vb of the encoded screen stored in the first and second simulated memories U3a and U3b. The image data of the converted screen is used as reference image data Vrefa and Vref.
[0140]
The re-encoded stream Vout is supplied to the frame target bit number calculator U6. The calculator U6 performs processing based on the bit rate of the re-encoded stream Vout and the target bit rate Rate supplied from the outside. The frame target bit number Rd corresponding to the processing target screen following the completed screen is calculated and output to the quantization step derivation unit U74.
[0141]
Hereinafter, a specific operation of the quantization step derivation unit U74 will be described.
First, in the bit number subtracter U8b, a subtraction process for subtracting the second simulated encoded bit number Rb from the first simulated encoded bit number Ra is performed, and a difference (simulated code) between these simulated encoded bit numbers is performed. Bit rate variation amount) ΔRab is calculated. The error subtracter U9b performs a subtraction process for subtracting the simulated coding error Da from the first simulated coder U2a from the simulated coding error Db from the second simulated coder U2b. Then, a difference (simulated coding error fluctuation amount) ΔDab between these simulated coding errors is calculated. Further, the divider U10b performs arithmetic processing for dividing the simulated coding error fluctuation amount ΔDab by the simulated coding bit number fluctuation amount ΔRab to derive the recoding error increase rate λ1.
[0142]
Then, the minimum error selector U20 performs a process of comparing the re-encoding error increase rate λ1 between the respective encoding units, and the number of frame bits (the number of bits in the re-encoded stream for one frame). In order not to exceed the frame target bit number Rd, one of the quantization steps Qa and Qb from the first and second simulated encoders U2a and U2b is determined for each encoding unit according to the comparison processing result. A control signal Qse1 for selection is output to the selection switch U14.
In the selection switch U14, one of the quantization steps Qa and Qb is selected for each encoding unit based on the control signal Qse1, and the selected quantization step is output as the optimum quantization step Qd.
[0143]
Next, a specific operation of the minimum error selector U20 will be described.
FIG. 14 is a diagram for explaining a process of deriving an optimal quantization step for each coding unit by the minimum error selector U20. FIG. 14A shows the flow of the quantization step derivation process, and FIG. 14B shows the arrangement of coding units in one screen (one frame). In FIG. 14 (c), the optimum quantization step Qd corresponding to each coding unit in one frame is set to one of the quantization steps Qa and Qb in the first and second simulation coding processes. The state is shown schematically.
[0144]
Here, the encoding unit is a display area (macroblock) composed of 16 × 16 pixels in one screen (frame), and the number of macroblocks in one frame is n. Further, the variable indicating the quantization step corresponding to the i (i = 1, 2,..., N) -th macroblock B [i] in one frame is Q [i], and the i-th macroblock B [i]. Ra [i] and Rb [i] are the numbers of simulated coded bits obtained by performing simulated coding processing including quantization processing by the quantization steps Qa and Qb on the decoded image data corresponding to . In the following description of FIG. 4, a macro block is simply referred to as a block.
[0145]
In the process of determining the optimal quantization step of each block in the target screen (frame to be processed) by the minimum error selector U20, first, the decoded image data of each block B [i] is determined. Thus, the first and second simulated encoded bit numbers Ra [i] and Rb [i] when the first and second simulated encoding processes including the quantization process by the quantization steps Qa and Qb are performed are obtained. Further, the sum R (= ΣRa [i]) of the first simulated encoded bit number Ra [i] of all the blocks in the processed frame is calculated (step S1).
[0146]
Next, for all blocks in the frame to be processed, the variable Q [i] indicating the corresponding quantization step is initialized by the quantization step Qa (step S2). That is, at this time, all the quantization steps Q [i] corresponding to the respective blocks B [i] in the frame to be processed once satisfy Q [i] = Qa. As a result, the sum R of the simulated coding bit numbers Ra [i] of all blocks in the processed frame is R = ΣRa [i].
Thereafter, a process of searching for a block B [k] in which the quantization step Q [i] is Qa and the recoding error increase rate λ1 (= (Db−Da) / (Ra−Rb)) is minimized. Is performed (step S3).
[0147]
Subsequently, the quantization step Q [k] of the block B [k] found by the search processing is changed from the quantization step Qa to a larger quantization step Qb, and the simulated codes of all blocks in the processed frame The sum R of the number of bits is updated to R + Rb [k] −Ra [k] (step S4).
[0148]
Then, it is determined whether or not the sum R of the simulated encoded bit numbers of all blocks in the processed frame is larger than the frame target bit number Rd (step S5). As a result of this determination, if the sum R of the number of simulated coding bits is larger than the frame target bit number Rd, the processing of step S3 to step S5 is repeated again. On the other hand, if the result of determination in step S5 is that the sum R of the simulated encoded bit numbers is equal to or less than the frame target bit number Rd, the value of the quantization step Q [i] of each block in the processed frame at this time (Qa or Qb) (see FIG. 14C) is output as the optimum quantization step Qd corresponding to each block (step S6).
[0149]
As described above, in the re-encoding system 40 according to the fourth embodiment, the quantization steps Qa and Qb are performed in advance on the decoded image data (decoded stream) Vdec corresponding to the processing frame obtained by decoding the input stream. Are provided with first and second simulated encoders U2a and U2b that perform first and second simulated encoding processes including a quantization process for each encoding unit, and each code is obtained from the result of each simulated encoding process. A re-encoding error increase rate λ1 corresponding to the encoding unit is obtained, and the re-encoding error in the processing frame is set so that the total number of encoding bits of all the encoding units in the processing frame does not exceed the target frame bit number Rd. The larger Qb of the two quantization steps is assigned in order from the coding unit with the smallest increase rate λ1, and the smaller Qa is assigned to the remaining coding units in the frame to be processed. Therefore, the re-encoding error increase rate corresponding to each encoding unit in the frame to be processed approaches a constant value. Thereby, even in the re-encoding process in which the encoding error included in the input stream Vin is not known, the re-encoding error can be reduced, and the deterioration of the image quality of the image reproduced from the re-encoded stream Vout can be suppressed to a small level. .
[0150]
In the fourth embodiment, the unit of the encoding process is a macro block (an area composed of 16 × 16 pixels in one frame), but the unit of the encoding process is limited to the macro block in MPEG as described above. is not. For example, the unit of the encoding process may be a sub-block composed of 8 × 8 pixels constituting the macroblock, or a slice composed of several macroblocks.
[0151]
In Embodiment 4 described above, as the re-encoding system, the first and second simulated encoders U2a and U2b only perform the re-encoding process on the main encoder U2d. Although a simulation encoding process including a quantization process is shown, the configuration of the re-encoding system is not limited to this.
For example, when the re-encoding system performs inter-picture predictive encoding processing in MPEG, the first and second simulated encoders U2a and U2b are subject to re-encoding processing in the main encoder U2d. A configuration may be employed in which the simulation encoding process is performed not only on the processing target frame to be, but also on other frames using the processing target frame as a reference frame in the re-encoding process.
[0152]
That is, in the re-encoding system having such a configuration, specifically, the main encoder U2d performs re-encoding processing for the P frame F (3) for which the display time T3 shown in FIG. 24 is set. In this case, in the first and second simulated encoders U2a and U2b, not only the P frame F (3) but also the B frame F (2), in which the display times T2 and T4 are set, Simulated encoding processing is performed on P frame F (5) in which T (4) and display time T5 are set. Also, for each coding unit in each of the frames F (2) to F (5), the corresponding simulated coding increase errors Da and Db and simulated coding bit numbers Ra and Rb are calculated, and the recoding error increases. A rate λ1 is determined. Further, each coding unit in the frame F (3) is optimal based on the recoding error increase rate λ1 corresponding to every coding unit in each frame F (2) to F (5). One of the quantization steps Qa and Qb is set as the quantization step.
[0153]
In this case, the optimum quantization step corresponding to each coding unit in the frame F (3) has the smallest coding error corresponding to the frames F (3), F (2), F (4), F (5). Is set to be
Here, the P frame F (3) is a frame in which the image data is referred to in the inter-frame encoding process for the B frames F (2), T (4), and the P frame F (5). Needless to say.
[0154]
(Embodiment 5)
FIG. 15 is a block diagram for explaining a re-encoding system according to Embodiment 5 of the present invention.
The re-encoding system 50 according to the fifth embodiment includes an image from the decoder U1 in addition to the first and second simulated encoders U2a and U2b in the re-encoding system 40 according to the fourth embodiment. A third simulated encoding including a quantization process and a local decoding process by a quantization step Qc larger than the quantization step Qb with reference to the image data of the reference screen with respect to the decoded data (decoded stream) Vdec A third simulated encoder U2c that performs processing for each encoding unit is included. The third simulated encoder U2c outputs local decoded image data Vstrc obtained by the local decoding process included in the third simulated encoding process, and also includes a quantization process included in the simulated encoding process. The quantization step Qc used in FIG. 1, the coding error (simulated coding increase error) Dc generated by the simulated coding process, and the simulated coding bit number Rc generated by the simulated coding process It is configured to output every time.
[0155]
Further, the re-encoding system 50 is output from the third simulated encoder U2c in addition to the first and second simulated memories U3a and U3b in the re-encoding system 40 of the fourth embodiment. A third simulated memory U3c for storing the locally decoded image data Vstrc is provided. The third simulated memory U3c stores the locally decoded image data Vstrc from the third simulated encoder U2c, and the stored image data is used as a simulated code for an unprocessed screen following the screen to be processed. It is configured to output to the third simulated encoder U2c as image data Vc of the reference screen during the conversion process.
[0156]
Further, in the re-encoding system 50, the main memory U3d uses the stored local decoded image data Vstrd as the reference screen image data (reference) in the re-encoding process for the unprocessed screen following the processing target screen. (Image data) Vrefd is output to the main encoder U2d, and image data (reference image data) of the reference screen is displayed during the first, second, and third simulation encoding processes for the unprocessed screen that follows the screen to be processed. ) Vrefa, Vrefb, Vrefc are output to the first, second, and third simulated encoders U2a, U2b, U2c.
[0157]
As described above, since the locally decoded image data corresponding to the re-encoded stream that is actually output is stored in the main memory U3d, the first, second, and third simulated encoders U2a are stored. , U2b, U2c are encoded screens stored in the first, second, and third simulated memories U3a, U3b, U3b among the image data of the encoded screens stored in the main memory U3d. For the image data corresponding to the same screen as the image data of, the image data Va, Vb, Vc of the encoded screen stored in the first, second, and third simulated memories U3a, U3b, U3c are used. Thus, the image data Vrefa, Vrefb, Vrefc of each encoded screen stored in the main memory U3d is referred to.
[0158]
Further, the re-encoding system 50 re-encoded based on the re-encoded stream Vout from the main encoder U2d instead of the frame target bit number calculator U6 in the re-encoding system 40 of the fourth embodiment. The bit rate (current bit rate) of the encoded stream Vout is compared with the target bit rate Rate from the outside, and the re-encoding error increase rate λ corresponding to the processed frame is calculated for each frame according to the comparison result. A rate distortion calculator U5.
[0159]
Here, in the rate distortion calculator U5, based on the re-encoded stream Vout corresponding to each frame, the average bit rate of the frame being processed (frame to be processed) is likely to be larger than the target bit rate. If so, a large value is output as the re-encoding error increase rate λ corresponding to the encoding unit to be encoded, and the average bit rate of the frame being processed (processed frame) Is smaller than the target bit rate, a small value is output as the re-encoding error increase rate λ corresponding to the encoding unit to be encoded. This is because in the re-encoding system 50 of the fifth embodiment, if the re-encoding error increase rate λ is large, the optimum quantization step Qd becomes large and the bit rate of the re-encoded stream Vout decreases, while the re-encoding error increase rate λ decreases. This is because if the coding error increase rate λ is small, the optimum quantization step Qd becomes small and the bit rate of the re-encoded stream Vout increases.
[0160]
Furthermore, this re-encoding system 50 is replaced with the quantization step Qa output from the first simulated encoder U2a in place of the quantization step derivation unit U74 in the re-encoding system 40 of the fourth embodiment. The simulated encoding increase error Da and the simulated encoded bit number Ra, the quantization step Qb, the simulated encoded increase error Db, and the simulated encoded bit number Rb output from the second simulated encoder U2b, 3 based on the quantization step Qc, the simulated coding increase error Dc, the simulated coding bit number Rc output from the simulated encoder U2c, and the recoding error increase rate λ from the rate distortion calculator U5. A quantization step derivation unit U75 that selects and outputs one of the quantization steps Qa, Qb, and Qc as the optimum quantization step Qd corresponding to each coding unit. To have.
Other configurations in the re-encoding system 50 of the fifth embodiment are the same as those of the re-encoding system 40 of the fourth embodiment shown in FIG.
[0161]
FIG. 16 is a block diagram showing a specific configuration of a quantization step derivation unit U75 constituting the re-encoding system 50 of the fifth embodiment.
The quantization step derivation unit U75 receives the first and second simulated encoded bit numbers Ra and Rb from the first and second simulated encoders U2a and U2b, and the difference between these (simulated encoded bits). A first bit number subtracter U8b for calculating (number fluctuation amount) ΔRab, and second and third simulated encoded bit numbers Rb and Rc from the second and third simulated encoders U2b and U2c. And a second bit number subtracter U8c for calculating the difference (simulated coding bit number fluctuation amount) ΔRbc.
[0162]
Further, the quantization step derivation unit U75 receives the simulated encoding increase errors Da and Db from the first and second simulated encoders U2a and U2b, and the difference (simulated encoding error fluctuation amount) Dab. Are received by the first error subtracter U9b that calculates the error and the simulated encoding increase errors Db and Dc from the second and third simulated encoders U2b and U2c, and the difference between these (the simulated encoding error fluctuation amount). And a second error subtracter U9c for calculating Dbc.
[0163]
The quantization step derivation unit U75 divides the simulated coding error fluctuation amount ΔDab by the simulated coding bit number fluctuation amount ΔRab to obtain the first recoding error increase rate λ1 corresponding to each coding unit. The first divider U10b to be derived and the simulated coding error variation ΔDbc are divided by the simulated coding bit number variation ΔRbc to derive the second re-encoding error increase rate λ2 corresponding to each coding unit. And a second divider U10c.
[0164]
Also, the quantization step derivation unit U75 includes the re-encoding error increase rate λ in the current re-encoding process from the rate distortion calculator U5 and the first re-encoding error increase rate from the divider U10b. a first comparator U11b that compares λ1 and outputs a first switch control signal Qseb according to the comparison result, a recoding error increase rate λ in the current recoding process, and the divider A second comparator U11c that compares the second re-encoding error increase rate λ2 from U10c and outputs a second switch control signal Qsec according to the comparison result is provided.
[0165]
The quantization step deriving unit U75 is supplied with the quantization steps Qa, Qb supplied from the simulated encoders U2a, U2b, U2c based on the first and second switch control signals Qseb, Qsec. , Qc, and a selection switch U50 that outputs the selected quantization step as the optimum quantization step Qd.
[0166]
Specifically, when the recoding error increase rate λ is equal to or less than the recoding error increase rate λ1, the quantization step derivation unit U75 uses the switch control signal Qseb to generate the quantization step Qa. Is selected as the optimal quantization step Qd, and the re-encoding error increase rate λ is greater than the re-encoding error increase rate λ 1 and less than or equal to the re-encoding error increase rate λ 2, the switch U50 selects the switch control signal Qseb and When the quantization step Qb is selected as the optimum quantization step Qd by the switch control signal Qsec, and the recoding error increase rate λ is larger than the recoding error increase rate λ2, the switch U50 uses the switch control signal Qsec. The quantization step Qc is selected as the optimum quantization step Qd.
[0167]
Next, the operation will be described.
When the input stream Vin is supplied to the re-encoding system 50, the decoder U1 performs a decoding process on the input stream Vin, which is an encoded stream, in the same manner as in the fourth embodiment. First and second simulation encoding processes are performed on the decoded stream Vdec by the second simulation encoders U2a and U2b.
At this time, in the fifth embodiment, the third simulated encoder U2c performs the same processing as the first and second simulated encoding processes in the first and second simulated encoders U2a and U2b. 3 is performed on the decoded stream Vdec.
[0168]
That is, in the third simulated encoder U2c, the reference image data Vc stored in the third simulated memory U3c or the reference image data Vrefc stored in the main memory U3d is referred to as a processing target. A third simulated encoding process including a quantization process by a quantization step Qc (Qc>Qb> Qa) and a local decoding process is performed on the decoded stream Vdec of the processing screen. The quantization step Qc is set not to be smaller than the quantization step Qin used in the inverse quantization process. As a result, the third simulated encoder U2c outputs the locally decoded image data Vstrc, the quantization step Qc corresponding to each encoding unit, the simulated encoded bit number Rc, and the simulated encoding error. Dc is output.
[0169]
At this time, the locally decoded image data Vstrc is stored in the third simulated memory U3c as image data corresponding to a screen (frame) that has been encoded. Thus, the image data stored in the third simulated memory U3c is used as the reference screen data Vc in the simulated encoding process of the image data corresponding to the unprocessed screen.
[0170]
Then, in the quantization step deriving unit U75, the quantization steps Qa, Qb, Qc from the first, second, and third simulated encoders U2a, U2b, U2c, the number of simulated encoded bits Ra, Rb, Based on Rc and simulated encoding errors Da, Db, and Dc, the re-encoding error increase rate corresponding to each block (encoding unit) becomes an average re-encoding error increase rate corresponding to the screen to be processed ( The optimal quantization step Qd corresponding to each coding unit is derived so as not to exceed the target recoding error increase rate (λ).
[0171]
Then, in the main encoder U2d, as in the fourth embodiment, the re-encoding process including the quantization process by the optimum quantization step Qd and the local decoding process is performed on the decoded image data Vdec in the main memory. The reference image data Vrefd stored in U3d is referred to. As a result, the re-encoded stream Vout is output from the main encoder U2d, and the locally decoded image data Vstrd is output.
[0172]
Further, in the rate distortion calculator U5, based on the re-encoded stream Vout corresponding to each frame, if the average bit rate of the frame being encoded is likely to be larger than the target bit rate of the frame, If a large value is output as the recoding error increase rate λ and the average bit rate of the frame being encoded is likely to be smaller than the target bit rate of the frame, the recoding error increase rate λ is small. The value is output.
[0173]
Hereinafter, a specific operation of the quantization step derivation unit U75 will be described.
First, in the fifth embodiment, a subtraction process for calculating the simulated encoded bit number fluctuation amount ΔRab in the first bit number subtractor U8b, and a simulated encoding error fluctuation amount ΔDab in the first error subtractor U9b are calculated. Subtraction processing and arithmetic processing for deriving the re-encoding error increase rate λ1 in the first divider U10b are performed, and subtraction processing for calculating the simulated encoded bit number variation ΔRbc in the second bit number subtractor U8c Then, a subtraction process for calculating the simulated coding error fluctuation amount ΔDbc in the second error subtractor U9c and a calculation process for deriving the recoding error increase rate λ2 in the second divider U10c are performed.
[0174]
Here, the processing in the first bit number subtracter U8b, the first error subtractor U9b, and the first divider U10b is exactly the same as that in the fourth embodiment, and the second bit number subtracter U8c. The processes in the second error subtracter U9c and the second divider U10c are the same as the processes in the subtractor U8b, subtractor U9b and divider U10b.
[0175]
That is, in the second bit number subtracter U8c, a subtraction process for subtracting the third simulated encoded bit number Rc from the second simulated encoded bit number Rb is performed, and these differences (simulated encoded bits) are performed. (Number fluctuation amount) ΔRbc is calculated. In the second error subtracter U9c, the subtraction for subtracting the simulated coding increase error Db from the second simulated encoder U2b from the simulated coding increase error Dc from the third simulated encoder U2c. Processing is performed to calculate the difference (simulated coding error fluctuation amount) ΔDbc. Further, in the second divider U10c, arithmetic processing for dividing the simulated coding error fluctuation amount ΔDbc by the simulated coding bit number fluctuation amount ΔRbc is performed, and the second recoding error increase rate λ2 is derived. The
[0176]
Also, the first re-encoding error increase rate λ1 from the divider U10b is compared with the re-encoding error increase rate λ in the current re-encoding process by the first comparator U11b, and the comparison result The first switch control signal Qseb corresponding to is output. The second re-encoding error increase rate λ2 from the divider U10c is compared with the re-encoding error increase rate λ in the current re-encoding process by the second comparator U11c, according to the comparison result. The second switch control signal Qsec is output.
[0177]
In the selection switch U50, based on the first and second switch control signals Qseb and Qsec, among the quantization steps Qa, Qb and Qc supplied from the simulation encoders U2a, U2b and U2c. Are selected, and the selected quantization step is output as the optimum quantization step Qd.
[0178]
Specifically, when the recoding error increase rate λ is equal to or less than the recoding error increase rate λ1, the switch U50 selects the quantization step Qa as the optimum quantization step Qd by the switch control signal Qseb. The When the re-encoding error increase rate λ is larger than the re-encoding error increase rate λ 1 and less than or equal to the re-encoding error increase rate λ 2, the switch U 50 performs quantization using the switch control signal Qseb and the switch control signal Qsec. Step Qb is selected as the optimal quantization step Qd. Further, when the recoding error increase rate λ is greater than the recoding error increase rate λ2, the switch U50 selects the quantization step Qc as the optimum quantization step Qd by the switch control signal Qsec.
[0179]
As described above, in the fifth embodiment, the bit rate (current bit rate) of the re-encoded stream Vout is compared with the external target bit rate Rate based on the re-encoded stream Vout from the main encoder U2d. And a rate distortion calculator U5 for calculating an average re-encoding error increase rate λ, which is an index of image quality corresponding to the frame to be processed, according to the comparison result, and includes quantization steps Qa, Qb. The first and second reproductions corresponding to the encoding units, obtained from the encoding results in the first, second and third simulated encoders U2a, U2b and U2b having different Qc (Qa <Qb <Qc). When the coding error increase rate λ1, λ2 (λ1 <λ2) is smaller than the average recoding error increase rate λ of the one frame, the optimum quantization step Qd corresponding to the block is quantized by the quantization steps Qb, Qc. Therefore, the bit rate can be reduced while suppressing the deterioration of the image quality.
[0180]
In the fifth embodiment, three simulated encoders are provided, and the first and second recoding error increase rates λ1 and λ2 are set to the average recoding error increase rate λ1 of the one frame. Compared to the above, the determination of the optimum quantization step Qd corresponding to each block is shown. However, the number of simulated encoders in the re-encoding system is not limited to three, and the re-encoding in the fourth embodiment is not limited. There may be two as in the encoding system 40, or four or more.
[0181]
For example, in a re-encoding system having first and second simulated encoders as simulated encoders, the quantization step derivation unit U75 has first and second quantization steps Qa and Qb (Qa <Qb) different from each other. The first re-encoding error increase rate λ1 corresponding to the encoding unit obtained from the encoding results of the second simulated encoders U2a and U2b is the average re-encoding error increase rate of the one frame. When smaller than λ, the optimum quantization step Qd corresponding to the block is selected as the larger one of the quantization steps Qa and Qb, and the first re-encoding error increase rate λ1 is the average of the one frame. When it is not smaller than the re-encoding error increase rate λ, the smaller one of the quantization steps Qa and Qb is selected.
[0182]
(Embodiment 6)
FIG. 17 is a block diagram for explaining a re-encoding system according to Embodiment 6 of the present invention, and shows a configuration of a quantization step derivation unit in the re-encoding system of Embodiment 6.
In the re-encoding system of the sixth embodiment, instead of the quantization step derivation unit U75 of the re-encoding system 50 of the above-described fifth embodiment, the quantum obtained as a result of the simulation encoding process in each simulation encoder Based on the encoding steps Qb and Qc, the simulated encoding bit numbers Ra, Rb and Rc, and the simulated encoding increase errors Da, Db and Dc, a relational expression between the recoding error increase rate λ and the quantization step Q is obtained. A quantization step derivation unit U76 for obtaining an optimum quantization step Qd corresponding to each coding unit based on this relational expression and the target recoding error increase rate λ from the rate distortion calculator U5 It is. The other configurations of the re-encoding system according to the sixth embodiment are the same as those of the re-encoding system according to the fifth embodiment.
[0183]
Hereinafter, the specific configuration of the quantization step derivation unit U76 constituting the re-encoding system of the sixth embodiment will be described with reference to FIG.
The quantization step derivation unit U76 of the sixth embodiment replaces the first and second comparators U11b and U11c and the switch U50 of the quantization step derivation unit U75 of the fifth embodiment, and increases the target recoding error. An error RD deriving unit U12 for deriving an error RD function f indicating the relationship between the rate λ and the bit rate R, and using this error RD function f, the quantization step Q and the number of re-encoded bits (decoding stream Vdec) A quantization step calculator U31 for calculating an optimum quantization step corresponding to the re-encoding error increase rate λ for each encoding unit from the relationship with the number of bits (R) corresponding to the encoding unit obtained by the encoding process; It has. Here, the bit rate is equivalent to the number of bits generated corresponding to the coding unit.
[0184]
Hereinafter, the error RD derivation unit U12 and the quantization step calculator U31 will be specifically described.
In general, a function (rate error function) expressed by the following equation 6 is established between the number of coding bits R corresponding to each block (coding unit) and the coding error D corresponding to each block. .
D = g (R) (Formula 6)
[0185]
Therefore, in the re-encoding process, the encoding error D included in the re-encoded stream is expressed by the following Expression 7.
ΔD + Din = g (R) (Formula 7)
Here, ΔD is a re-encoding increase error (encoding error that increases due to the re-encoding process), and Din is an encoding error of the input stream Vin.
[0186]
Therefore, the re-encoding error increase rate λ is expressed by the following Equation 8.
λ = ∂D / ∂R = ∂ΔD / ∂R = ∂g (R) / ∂R (Formula 8)
Here, it is known that the function g (R) can be approximated as shown in Equation 9 below.
g (R) = A ・ R B (Formula 9)
Here, A and B are constants.
[0187]
Therefore, the recoding error increase rate λ is expressed by the following expression 10 from the above expressions 8 and 9.
λ = A ・ R B-1 (Formula 10)
[0188]
Here, the recoding error increase rate λ1 is the recoding error increase rate λ when R = Rb, and the recoding error increase rate λ2 is the recoding error increase rate when R = Rc. Assuming that λ, the constants A and B can be obtained from Equation 10 above. As a result, an error RD function f expressed by the following equation 11 is derived.
R = f (λ) (Formula 11)
The error RD derivation unit U12 includes the bit rate Rb, Rc of the re-encoded stream from the second and third simulated encoders U2b, U2c, and the re-encoding error increase rate λ1, from the dividers U10b, U10c. Based on λ2, a calculation process for deriving the function f expressed by the above equation 11 is performed.
[0189]
On the other hand, between the quantization step Q and the bit rate R, the relationship shown by the following Expression 12 is established.
R = α ・ Q β (Formula 12)
[0190]
Here, α and β are constants, and α and β can be obtained by substituting the bit rates Rb and Rc and the quantization steps Qb and Qc into the above equation 12. As a result, a function h represented by the following expression 13 is derived.
R = h (Q) (Formula 13)
[0191]
Accordingly, a function s indicating the relationship of the quantization step Q corresponding to the re-encoding error increase rate λ is obtained as shown in the following expression 14 from the above expressions 11 and 13.
Q = s (λ) (Formula 14)
[0192]
In other words, the quantization step corresponding to the re-encoding error increase rate λ can be derived as the optimum quantization step Qd using this equation (14).
The quantization step calculator U31 includes the simulated encoded bit number Rb from the second simulated encoder U2b, the quantization step Qb in the second simulated encoding process, and the third simulated encoder U2c. Based on the simulated coding bit number Rc and the quantization step Qc in the third simulated coding process, an arithmetic process for deriving the function h represented by the above equation 13 is performed, and the function h and the error RD derivation are performed. The function s is obtained from the function f obtained by the unit U12, and the quantization step corresponding to the target recoding error increase rate λ obtained by the rate distortion calculator U5 is optimized from the function s. The quantization step Qd is obtained.
[0193]
Next, the operation will be described.
The re-encoding system according to the sixth embodiment performs exactly the same operation as the re-encoding system 50 according to the fifth embodiment except for the operation of the quantization step derivation unit U76.
Therefore, the operation of the quantization step derivation unit U76 will be described below.
First, in the sixth embodiment, a subtraction process for calculating the simulated encoded bit number variation ΔRab in the first bit number subtractor U8b, and a simulated encoding error variation ΔDab in the first error subtractor U9b are calculated. Subtraction processing and arithmetic processing for deriving the re-encoding error increase rate λ1 in the first divider U10b are performed, and subtraction processing for calculating the simulated encoded bit number variation ΔRbc in the second bit number subtractor U8c Then, a subtraction process for calculating the simulated coding error fluctuation amount ΔDbc in the second error subtractor U9c and a calculation process for deriving the recoding error increase rate λ2 in the second divider U10c are performed.
[0194]
Then, the error RD derivation unit U12 regenerates the simulated encoded bit numbers Rb and Rc obtained by the second and third simulated encoders U2b and U2c and the first and second dividers U10b and U10c. Based on the coding error increase rates λ1 and λ2, the function f (R = f (λ)) expressed by the above equation 11 is derived.
[0195]
In the quantization step calculator U31, the simulated coding bit number Rb in the second simulated coding process, the quantization step Qb in the second simulated coding process, and the simulated code in the third simulated coding process Based on the number of quantization bits Rc and the quantization step Qc in the third simulation encoding process, a calculation process for deriving the function h (R = h (Q)) expressed by the above equation 13 is performed. Further, from this function h and the function f obtained by the error RD deriving unit U12, a function s (Q = s (λ)) represented by the equation 14 is obtained. Then, using this function s, the quantization step corresponding to the target recoding error increase rate λ obtained by the rate distortion calculator U5 is obtained as the optimum quantization step Qd.
[0196]
As described above, in the re-encoding system of the sixth embodiment, the quantization step derivation unit U76 causes the function f () indicating the relationship between the re-encoding error increase rate λ and the bit rate based on the result of the simulation encoding process. R = f (λ)), an error RD derivation unit U12, and a function s indicating the relationship between the recoding error increase rate λ and the quantization step based on the function f and the result of the simulation encoding process. (Q = s (λ)) is obtained, and using this function s, each quantization step corresponding to the target recoding error increase rate λ obtained by the rate distortion calculator U5 is set as an optimum quantization step Qd. Since the quantization step calculator U31 derived for each coding unit is included, the optimum quantization step Qd corresponding to each coding unit can be set finely.
[0197]
In the sixth embodiment, the difference between simulated coding increase errors Db and Da, the difference between simulated coding bit numbers Ra and Rb, the difference between simulated coding increase errors Db and Dc, and the simulated coding bit numbers Rb and Rc. Although the error RD function f is derived based on the difference between the above, the difference between the simulated coding increase errors Dc and Da may be used as the difference between the simulated coding increase errors and the coding unit (block). The difference between the recoded bit numbers Ra and Rc may be used as the difference in the number of simulated coded bits per hit.
[0198]
(Embodiment 7)
FIG. 18 is a block diagram for explaining a re-encoding system according to the seventh embodiment of the present invention, and shows a configuration of a quantization step derivation unit in the re-encoding system according to the seventh embodiment.
In this re-encoding system of the seventh embodiment, instead of the quantization step derivation unit U76 of the re-encoding system of the sixth embodiment, a quantization step is performed according to the magnitude of the re-encoding error increase rate λ1. One of the quantization step Qf output from the calculator U31 and the minimum quantization step Qa among the quantization steps Qa, Qb, and Qc is selected, and the selected quantization step is selected as the optimum quantization step. A quantization step derivation unit U77 that outputs Qd is provided.
[0199]
Hereinafter, the specific configuration of the quantization step derivation unit U77 constituting the re-encoding system of the seventh embodiment will be described with reference to FIG.
In addition to the configuration of the quantization step derivation unit U76 of the sixth embodiment, the quantization step derivation unit U77 includes the first re-encoding error increase rate λ1 from the first divider U10b and the rate distortion calculation. A comparator U11 that compares the target re-encoding error increase rate λ from the comparator and outputs a switch control signal Qse, and a quantization step output from the quantization step calculator U31 in response to the switch control signal Qse A selection switch U70 for selecting one of Qf and the minimum quantization step Qa, and outputting the selected quantization step as an optimum quantization step Qd.
[0200]
Hereinafter, a specific configuration of the comparator U11 will be briefly described.
In general, in a re-encoding system, if the difference between the quantization step Qin in the encoding process performed on the input stream Vin and the quantization step Qd in the re-encoding process is large, When the coding error increase rate is large, a phenomenon appears in which the recoding error increase rate λ monotonously increases as the quantization step Qd increases. On the other hand, when the difference between the quantization step Qin in the encoding process for the input stream Vin and the quantization step Qd in the re-encoding process is small, that is, when the re-encoding error increase rate is small, Even if the quantization step Qd increases, the re-encoding error increase rate λ does not necessarily increase, and may decrease depending on circumstances. This point is as described in the second embodiment with reference to FIG. 7, and is described in detail in the literature (Research on requantization error in IE99-32 MPEG2 re-encoding by IEICE Technical Committee). Are listed.
[0201]
That is, in FIG. 7, the quantization error in the re-encoded data indicates the quantization step value QPi in the first quantization process (quantization process in the encoding process) and the second value when the bit rate is high. When the difference from the quantization step value QPr in the quantization process (quantization process in the re-encoding process) is small, the quantization step value QPr in the second quantization process is 2 QP (QPi = QP). As described above, it is shown that when the bit rate of the re-encoded data is low, there is almost no difference between the quantization error in the direct encoding process and the quantization error in the re-encoding process. Here, the increase / decrease in the quantization error in the re-encoded data corresponds to the increase / decrease in the re-encoding error increase rate.
[0202]
Therefore, the comparator U11 determines that the re-encoding error increase rate λ1 corresponding to the encoding unit (processed block) obtained by the simulation encoding process is smaller than the target re-encoding error increase rate λ for the processed frame. The selection switch U70 selects the minimum quantization step Qa among the quantization steps Qa, Qb, Qc (Qa <Qb <Qc) in the first, second, and third simulation encoding processes, When the re-encoding error increase rate λ1 is equal to or higher than the re-encoding error increase rate λ, the selection switch U70 is set so that the selection switch U70 selects the quantization step Qf from the quantization step calculator U31. It is the structure to control.
In other words, the seventh embodiment corresponds to a configuration obtained by combining the re-encoding system of the sixth embodiment and the re-encoding system of the second embodiment. Specifically, the comparator U11 and the selection switch U70 in the quantization step derivation unit U77 of the seventh embodiment correspond to the quantization step derivation unit 252 in the quantization device 152 of the second embodiment, and The portion other than the comparator U11 and the selection switch U70 in the quantization step derivation unit U77 corresponds to the quantization step candidate derivation unit 250 in the quantization device 152 of the second embodiment.
Then, the quantization step derivation unit U77 of the seventh embodiment compares the re-encoding error increase rate λ1 obtained by the simulation encoding process with the target re-encoding error increase rate λ for the frame to be processed, and λ1 <λ At this time, the minimum quantization step Qa in each simulation encoding process is selected, and when λ1 ≧ λ, the quantization step Qf from the quantization step calculator U31 is selected as the quantization step in the re-encoding process. I am doing so. In this second embodiment, the quantization step derivation process compares the quantization step candidate Qsb with the threshold value Qth (= n × Qs1) and the constant multiple value Qmu (= m × Qs1> Qth). When Qsb <Qmu, the first quantization step Qs1 or the constant multiple value Qmu is selected as the quantization step, and when Qmu ≦ Qsb, the processing is equivalent to selecting the quantization step candidate Qsb as the quantization step. is there.
[0203]
Next, the operation will be described.
The re-encoding system of the seventh embodiment operates in exactly the same manner as the re-encoding system 50 of the fifth embodiment except for the operation of the quantization step derivation unit U77.
Therefore, the operation of the quantization step derivation unit U77 will be described below.
In the seventh embodiment, the subtracters U8b and U8c, the subtracters U9b and U9c, the dividers U10b and U10c, the error RD calculator U12, and the quantization step calculator U31 are exactly the same as those in the sixth embodiment. Processing is performed. Thereby, the dividers U10b and U10c output the first and second re-encoding error increase rates λ1 and λ2 corresponding to the encoding unit (processed block). The error RD function f is derived from the error RD calculator U12, and the target re-encoding error increase corresponding to the processing frame is increased from the quantization step calculator U31 as the quantization step corresponding to the processing target block. A value Qf corresponding to the rate λ is output.
[0204]
The comparator U11 compares the first recoding error increase rate λ1 corresponding to the processing target block with the target recoding error increase rate λ corresponding to the processing target frame, and compares the result. In response to this, the switch control signal Qse is output to the selection switch U70. In the selection switch U70, one of the quantization step Qf from the quantization step calculator U31 and the quantization step Qa in the first simulation encoding process is selected as the optimum quantization step Qd according to the switch control signal Qse. Is output.
[0205]
Specifically, when the first recoding error increase rate λ1 corresponding to the processing target block is smaller than the target recoding error increase rate λ corresponding to the processing target frame, the switch control signal Qse In the selection switch U70, the quantization step Qa is selected as the optimum quantization step Qd, and when the first recoding error increase rate λ1 is not smaller than the target recoding error increase rate λ, the selection switch U70 The quantization step Qf from the quantization step calculator U31 is selected as the optimum quantization step Qd.
[0206]
As described above, in the re-encoding system of the seventh embodiment, the quantization step derivation unit U77 is added to the configuration of the quantization step derivation unit U76 of the sixth embodiment, and the re-encoding error from the divider U10b. The increase rate λ1 is compared with the target re-encoding error increase rate λ from the rate distortion calculator, and has a comparator U11 that outputs a switch control signal Qse according to the comparison result, and the re-encoding error increase rate λ1 is Only when it is smaller than the target re-encoding error increase rate λ from the rate distortion calculator, instead of the quantization step Qf obtained by the quantization step calculator U31 as a quantization step corresponding to the block to be processed, simulated encoding is performed. Since the minimum quantization step Qa in the processing is selected, the re-encoding error increase rate is not monotonically increasing due to the change in the re-encoding error increasing rate with respect to the increase of the quantization step. When the quantization step calculator U31 has a value within a range in which it is difficult to derive the optimum quantization step Qd that minimizes the re-encoding error, the minimum quantization step Qa in the simulation encoding process is always processed. This is used as the optimum quantization step Qd of the block.
[0207]
Therefore, the target re-encoding error increase rate λ of the frame to be processed is a value within a range where the difference between the quantization step Qin of the input stream Vin and the quantization step Qd in the re-encoding process for the input stream Vin becomes small. In this case, it is possible to prevent the operation from becoming unstable. When the target re-encoding error increase rate λ of the frame to be processed is a value outside the above range, the re-encoding is performed by setting the quantization step Qf derived by the quantization step calculator U31 as the quantization step Qd. Error can be minimized.
[0208]
In Embodiments 6 and 7, the error RD function f shown in Expression 11 is used as a function indicating the relationship between the number R of coded bits per coding unit of the recoded stream and the recoding error increase rate λ. However, the function indicating these relationships is not limited to this.
[0209]
For example, another error RD function having the same tendency and property as the error RD function f shown in the above equation 11 is derived from the simulated coding increase errors Da, Db, Dc and the number of simulated coding bits Ra, Rb, Rc. If possible, this other error RD function may be used as a function indicating the relationship between the number R of encoded bits and the re-encoding error increase rate λ.
[0210]
In Embodiments 5 to 7, the first, second, and third simulated encoders U2a, U2b, and U2c are re-encoding systems that are subject to re-encoding processing in the main encoder U2d. Although the simulation encoding process including the quantization process is performed only on the frame, the configuration of the re-encoding system is not limited to this.
[0211]
For example, as specifically described in the fourth embodiment, when the re-encoding system performs the inter-picture predictive encoding process in MPEG, the first, second, and third simulated encoders are used. In U2a, U2b, and U2c, not only the processing target frame to be re-encoded by the main encoder U2d, but also other frames that use this processed frame as a reference frame in the re-encoding processing. A configuration in which a simulation encoding process is performed on a frame may also be used.
[0212]
Furthermore, by recording a processing program for performing re-encoding processing by the re-encoding system of the first to seventh embodiments by software on a data storage medium such as a floppy disk, each of the above-described embodiments. The form re-encoding process can be easily realized by an independent computer system.
[0213]
FIG. 19 shows a data recording medium (FIGS. 19 (a) and 19 (b)) storing a program for performing the re-encoding process of each of the above embodiments by a computer system, and the computer system (FIG. 19 (c)). FIG.
FIG. 19A shows an external appearance, a cross-sectional structure, and a floppy disk as viewed from the front of the floppy disk, and FIG. 19B shows an example of a physical format of the floppy disk that is a recording medium body. The floppy disk FD is built in the case F, and on the surface of the disk, a plurality of tracks Tr are formed concentrically from the outer periphery toward the inner periphery, and each track is divided into 16 sectors Se in the angular direction. ing. Therefore, in the floppy disk storing the program, the program is recorded in an area allocated on the floppy disk FD.
FIG. 19C shows a configuration for recording and reproducing the program on the floppy disk FD. When recording the program on the floppy disk FD, the computer system Cs writes data as the program on the floppy disk FD via the floppy disk drive. When a system that performs the re-encoding process of each of the above embodiments using a program in a floppy disk is built in a computer system, the program is read from the floppy disk by a floppy disk drive and transferred to the computer system.
[0214]
In the above description, a floppy disk is used as a specific example of the data storage medium. However, even if an optical disk is used, re-encoding processing by software can be performed as in the case of the floppy disk. Further, the data storage medium is not limited to the optical disk and the floppy disk, and any data recording medium can be used as long as it can record a program, such as an IC card and a ROM cassette. Similar to the case of using a floppy disk or the like, re-encoding processing by software can be performed.
[0215]
【The invention's effect】
As above Clearly According to the encoded data conversion method, a decoding process for generating decoded data by decoding encoded data obtained by the encoding process including the first orthogonal transform process and the first quantization process; A re-encoding process for generating re-encoded data by performing a second orthogonal transform process and a second quantization process on the decoded data, and in the re-encoding process, the second quantum Since the quantization process is performed based on the re-encoded data and the quantization step in the first quantization process, the quantization step in the second quantization process is changed to the quantization in the first quantization step. It becomes possible to set according to the step. That is, under the restriction of the target number of bits in the re-encoding process based on the re-encoded data, the quantization step in the second quantization process is changed to the bit rate and the quantization distortion (quantization in the re-encoding process). In consideration of the non-linear relationship with the error), the quantization error can be set as small as possible. As a result, an increase in quantization error in the re-encoding process can be effectively suppressed under the restriction of the bit rate.
[0216]
This departure Clearly According to the above In the encoded data conversion method, in the second quantization process, that is, the quantization process in the re-encoding process, a quantization step candidate is derived based on the re-encoded data, and the quantization step candidate and the first Since the quantization step is derived based on the quantization step in one quantization process, the larger one of the quantization step candidates and the quantization step in the first quantization process is the second quantization process. By the simple process of selecting as the quantization step in FIG. 4, there is an effect that the number of bits generated by the re-encoding process can be made equal to or less than the target number of bits while suppressing an increase in quantization error.
[0217]
This departure Clearly According to the above In the encoded data conversion method, in the process of deriving the quantization step in the second quantization process (quantization process in the re-encoding process), the second step is performed according to the size of the quantization step candidate. As a quantization step in the quantization process, a quantization step having the same value as the quantization step in the first quantization process, a quantization step that is twice or more, or the quantization step candidate is derived. As the quantization step in the second quantization process, it is possible to set a value outside the range from 1 to 2 times the quantization step in the first quantization process. Accordingly, there is an effect that the number of bits generated by the re-encoding process can be made equal to or less than the target number of bits without increasing the number of bits with respect to the encoded data and without causing a significant increase in quantization error. .
[0222]
This departure Clearly According to such a data recording medium, the above Since the computer program for performing the process of converting the first encoded data into the second encoded data by the encoded data conversion method is stored, the re-encoding process effectively suppresses the increase of the quantization error. The effect that it can be performed.
[Brief description of the drawings]
FIG. 1 is a block diagram for explaining a re-encoding system 10 according to a first embodiment of the present invention.
FIG. 2 is a block diagram for explaining a quantization device 151 constituting the re-encoding system 10 of the first embodiment.
FIG. 3 is a block diagram for explaining a quantization step deriving unit 251 constituting the quantization apparatus 151 according to the first embodiment.
FIG. 4 is a block diagram for explaining a quantizing device 152 constituting a re-encoding system according to Embodiment 2 of the present invention.
FIG. 5 is a block diagram for explaining a quantization step derivation unit 252 constituting the quantization device 152 of the second embodiment.
FIG. 6 shows a second quantization step Qs2 obtained by the quantization step derivation unit 252 of the second embodiment and an output from the quantization step candidate derivation unit 250 constituting the quantization device 152 of the second embodiment. It is a figure which shows the relationship with the quantization step candidate Qsb performed with a graph.
FIG. 7 is a diagram illustrating a relationship between a bit rate and quantization distortion (quantization error) by re-encoding processing.
FIG. 8 is a block diagram for explaining a re-encoding system 30 according to a third embodiment of the present invention.
FIG. 9 is a block diagram for explaining a quantization device 153 constituting the re-encoding system 30 of the third embodiment.
FIG. 10 is a block diagram for explaining a quantization step deriving device 273 constituting the quantization device 153 of the third embodiment.
FIG. 11 is a block diagram for explaining a re-encoding system 40 according to a fourth embodiment of the present invention.
12 shows a simulated coding error caused by a simulated coding process of decoded image data Vdec in the re-encoding system 40 of the fourth embodiment, and the number of bits per coding unit generated by the simulated coding process ( It is a figure which shows the relationship with a simulation encoding bit number) with a graph.
FIG. 13 is a block diagram showing a specific configuration of a quantization step derivation unit U74 that constitutes the re-encoding system 40 of the fourth embodiment.
FIG. 14 is a diagram for explaining a process for deriving an optimal quantization step for each coding unit in the fourth embodiment, and shows a flow of the process (FIG. (A)) of coding units in one frame; The arrangement (FIG. (B)) and the state (FIG. (C)) in which the optimum quantization step Qd is set for each coding unit are shown.
FIG. 15 is a block diagram for explaining a re-encoding system 50 according to a fifth embodiment of the present invention.
FIG. 16 is a block diagram showing a specific configuration of a quantization step derivation unit U75 constituting the re-encoding system 50 of the fifth embodiment.
FIG. 17 is a block diagram for explaining a re-encoding system according to a sixth embodiment of the present invention, and shows a configuration of a quantization step derivation unit U76 in this re-encoding system.
FIG. 18 is a block diagram for explaining a re-encoding system according to a seventh embodiment of the present invention, and shows a configuration of a quantization step derivation unit U77 in this re-encoding system.
FIG. 19 is a data recording medium (FIGS. (A) and (b)) storing a program for performing re-encoding processing by the re-encoding system of the first to seventh embodiments by a computer system, and the computer. It is a figure for demonstrating a system (FIG. (C)).
FIG. 20 is a block diagram for explaining a conventional re-encoding system 100a.
FIG. 21 is a block diagram for explaining a quantization apparatus 107 constituting a conventional re-encoding system 100a.
FIG. 22 is a graph showing the relationship between the bit rate of the encoded stream and the encoding error included in the encoded stream.
FIG. 23 is a schematic diagram for explaining inter-picture predictive encoding processing in MPEG.
[Explanation of symbols]
10, 30, 40, 50 Re-encoding system
100 VLD device
101a, 108 inverse quantizer
102,109 IDCT device
103,110 adder
104,111 frame memory
105 Subtractor
106 DCT device
112 VLC unit
113 Rate control device
151, 152, 153 Quantizer
201 Quantizer
250 Quantization step candidate derivation
251 252 273 U74 U75 U76 U77 quantization step derivation
260, 263, 266 comparator
261,264,267 switch
262 Threshold Derivator
265 constant multiplier
270,272a In-screen average quantization step derivation
271 and 272b Average quantization step derivation between screens
CP1, CP2, CP3 comparative output
Da, Db, Dc 1st, 2nd, 3rd simulated coding increase error
Da1 decoding unit
Ea1 encoding unit
Eg1 encoded data
Eg2 re-encoded data
f Error RD function
Qa, Qb, Qc, Qf, Qin quantization step
Qd Optimal quantization step
Qs1 first quantization step
Qs2 second quantization step
Qsb Quantization step candidate
Qse selective quantization step
Qseb, Qsec, Qse1 Switch control signal
Qth threshold
Qmu constant multiple
Ra, Rb, Rc Number of first, second and third simulated encoded bits
Rate Target bit rate
Rd Frame target bit number
U1 decoder
U2a, U2b, U2c first, second and third simulated encoders
U2d main encoder
U3a, U3b, U3c 1st, 2nd, 3rd simulated memory
U3d main memory
U5 rate distortion calculator
U6 frame bit number calculator
U8b, U8c first and second bit number subtracters
U9b, U9c first and second error subtracters
U10b, U10c first and second dividers
U11b, U11c first and second comparators
U12 error RD calculator
U14, U50, U70 selection switch
U20 Minimum error selector
U31 quantization step calculator
Vrefa, Vrefb, Vrefc, Vrefd, Va, Vb, Vc Reference image data
Vstra, Vstrb, Vstrc, Vstrd Locally decoded image data
Vdec decoded image data (decoded stream)
Vin input stream
Vout re-encoded stream
λ Target recoding error increase rate
λ1, λ2 First and second re-encoding error increase rate
ΔDab, ΔDac, ΔDbc Simulated coding error variation
ΔRab, ΔRac, ΔRbc Simulated coding bit number variation
Cs computer system
F floppy disk case
FD floppy disk
FDD floppy disk drive
Se sector
Tr track

Claims (2)

画像データに対して第1の直交変換処理及び第1の量子化処理を含む符号化処理を施して得られる第1の符号化データを符号化単位毎に復号化して復号化データを生成する復号化処理と、該復号化データを符号化単位毎に符号化して第2の符号化データを生成する再符号化処理とを含む符号化データ変換方法であって、
上記復号化処理は、
上記第1の符号化データから得られる量子化係数を、上記第1の量子化処理で用いられた第1の量子化ステップでもって逆量子化する逆量子化処理を含み、
上記再符号化処理は、
上記復号化データを直交変換して周波数領域のデータを生成する第2の直交変換処理と、
上記第2の符号化データ及び上記第1の量子化ステップに基づいて第2の量子化ステップを導出し、上記周波数領域のデータを該第2の量子化ステップでもって量子化する第2の量子化処理とを含み、
上記第2の量子化処理は、
上記第2の符号化データに基づいて量子化ステップ候補を導出する候補導出処理と、
該量子化ステップ候補と上記第1の量子化ステップとに基づいて、上記第2の量子化ステップを導出する量子化ステップ導出処理とを含み、
上記量子化ステップ導出処理では、
上記量子化ステップ候補が、上記第1の量子化ステップの値以上で、かつ該第1の量子化ステップの値の2倍より小さい範囲内の値を有するときは、上記第2の量子化ステップとして、上記第1の量子化ステップの値と同じ値を有する量子化ステップか、もしくは該第1の量子化ステップの値の2倍以上の値を有する量子化ステップを導出し、
上記量子化ステップ候補が上記範囲内以外の値を有するとき、上記第2の量子化ステップとして、該量子化ステップ候補を導出する
ことを特徴とする符号化データ変換方法。
Decoding that decodes first encoded data obtained by performing encoding processing including first orthogonal transformation processing and first quantization processing on image data for each encoding unit to generate decoded data An encoded data conversion method comprising: an encoding process; and a re-encoding process for encoding the decoded data for each encoding unit to generate second encoded data,
The decryption process
Including a dequantization process for dequantizing a quantized coefficient obtained from the first encoded data by the first quantization step used in the first quantization process,
The re-encoding process is
A second orthogonal transform process for orthogonally transforming the decoded data to generate frequency domain data;
A second quantization step for deriving a second quantization step based on the second encoded data and the first quantization step, and for quantizing the frequency domain data by the second quantization step look at including the processing,
The second quantization process is as follows.
Candidate derivation processing for deriving quantization step candidates based on the second encoded data;
A quantization step deriving process for deriving the second quantization step based on the quantization step candidate and the first quantization step;
In the quantization step derivation process,
When the quantization step candidate has a value that is greater than or equal to the value of the first quantization step and less than twice the value of the first quantization step, the second quantization step As a result, a quantization step having the same value as the value of the first quantization step or a quantization step having a value more than twice the value of the first quantization step is derived.
When the quantization step candidate has a value outside the range, the quantization step candidate is derived as the second quantization step .
An encoded data conversion method characterized by the above.
請求項1記載の符号化データ変換方法をコンピュータにより行うためのデータ変換プログラムを格納したことを特徴とするデータ記録媒体。  A data recording medium storing a data conversion program for performing the encoded data conversion method according to claim 1 by a computer.
JP2000112219A 1999-04-13 2000-04-13 Encoded data conversion method and data recording medium Expired - Fee Related JP4421734B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000112219A JP4421734B2 (en) 1999-04-13 2000-04-13 Encoded data conversion method and data recording medium

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP10578199 1999-04-13
JP31871599 1999-11-09
JP11-318715 1999-11-09
JP11-105781 1999-11-09
JP2000112219A JP4421734B2 (en) 1999-04-13 2000-04-13 Encoded data conversion method and data recording medium

Publications (2)

Publication Number Publication Date
JP2001204028A JP2001204028A (en) 2001-07-27
JP4421734B2 true JP4421734B2 (en) 2010-02-24

Family

ID=27310576

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000112219A Expired - Fee Related JP4421734B2 (en) 1999-04-13 2000-04-13 Encoded data conversion method and data recording medium

Country Status (1)

Country Link
JP (1) JP4421734B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4693309B2 (en) * 2001-09-19 2011-06-01 キヤノン株式会社 Image processing apparatus, control method therefor, computer program, and storage medium
JP4989416B2 (en) * 2007-10-26 2012-08-01 Kddi株式会社 Video compression encoding device
JP5098043B2 (en) 2008-02-26 2012-12-12 株式会社メガチップス Transcoder
JP5495156B2 (en) * 2008-12-25 2014-05-21 株式会社メガチップス Transcoder
JP5232898B2 (en) * 2011-06-10 2013-07-10 株式会社メガチップス Transcoder
JP5391294B2 (en) * 2012-03-01 2014-01-15 株式会社メガチップス Transcoder
JP5943733B2 (en) * 2012-06-20 2016-07-05 キヤノン株式会社 Image encoding apparatus, control method therefor, and program
JP2015186120A (en) * 2014-03-25 2015-10-22 沖電気工業株式会社 Encoding method conversion apparatus and program

Also Published As

Publication number Publication date
JP2001204028A (en) 2001-07-27

Similar Documents

Publication Publication Date Title
US6590936B1 (en) Coded data transform method, transcoding method, transcoding system, and data storage media
JP3072035B2 (en) Two-stage video film compression method and system
JP5021502B2 (en) Method and apparatus for controlling rate distortion trade-off by mode selection of video encoder
KR100987765B1 (en) Prediction method and apparatus in video encoder
US7301999B2 (en) Quantization method and system for video MPEG applications and computer program product therefor
TWI221738B (en) Apparatus and methods for transcoder-based adaptive quantization
WO2006082690A1 (en) Image encoding method and image encoding device
JP2002525989A (en) Intra-frame quantizer selection for video compression
KR19980042772A (en) Moving picture variable bit rate coding apparatus, moving picture variable bit rate coding method, and moving picture variable bit rate coding program recording medium
KR20070007295A (en) Video encoding method and apparatus
KR101096827B1 (en) Method and apparatus for encoding a picture sequence using predicted and non-predicted pictures which each include multiple macroblocks
US20100020883A1 (en) Transcoder, transcoding method, decoder, and decoding method
JP4421734B2 (en) Encoded data conversion method and data recording medium
JP4224778B2 (en) STREAM CONVERTING APPARATUS AND METHOD, ENCODING APPARATUS AND METHOD, RECORDING MEDIUM, AND PROGRAM
JP3818819B2 (en) Image coding method conversion apparatus, image coding method conversion method, and recording medium
JP3149673B2 (en) Video encoding device, video encoding method, video reproducing device, and optical disc
JP3586069B2 (en) Moving picture coding method and apparatus
JP2004056616A (en) Device, method and program for decoding encoded signal
JP4169767B2 (en) Encoding method
JPH0951538A (en) Encoding method for image signal
JPH10174106A (en) Video data compressor and its method
KR100932727B1 (en) Video stream switching device and method
JPH08186821A (en) Animation image coder and transmitter thereof
JP2003189309A (en) Re-coding method and apparatus for compressed moving picture
JP4747109B2 (en) Calculation amount adjustment device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070405

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090814

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090818

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091016

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: 20091110

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091203

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

Free format text: PAYMENT UNTIL: 20121211

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees