JP4539028B2 - Image processing apparatus, image processing method, recording medium, and program - Google Patents
Image processing apparatus, image processing method, recording medium, and program Download PDFInfo
- Publication number
- JP4539028B2 JP4539028B2 JP2003135349A JP2003135349A JP4539028B2 JP 4539028 B2 JP4539028 B2 JP 4539028B2 JP 2003135349 A JP2003135349 A JP 2003135349A JP 2003135349 A JP2003135349 A JP 2003135349A JP 4539028 B2 JP4539028 B2 JP 4539028B2
- Authority
- JP
- Japan
- Prior art keywords
- encoding
- quantization
- unit
- quantization matrix
- encoding parameter
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、画像処理装置および画像処理方法、記録媒体、並びに、プログラムに関し、特に、対応するデータに対して過去に施された符号化に関する情報を用いて再符号化することが可能なようになされている場合に用いて好適な、画像処理装置および画像処理方法、記録媒体、並びに、プログラムに関する。
【0002】
【従来の技術】
例えば、テレビ会議システム、テレビ電話システムなどのように、動画像信号を遠隔地に伝送するシステムにおいては、伝送路を効率良く利用するため、映像信号のライン相関やフレーム間相関が利用されて、画像信号が圧縮符号化される。
【0003】
画像信号が圧縮符号化される場合、生成されるビットストリームが、所定のビットレートになるように符号化が行われる。しかしながら、実運用上において、伝送路の都合により、ビットストリームのビットレートを変換する必要が生じることがある。
【0004】
また、例えば、伝送された画像信号が、放送局において編集される場合、編集は秒単位で行われるので、フレームの画像情報は、他のフレームの画像情報から独立しているほうがよい。そこで、低いビットレート(例えば、3乃至9Mbps)で転送しても画質が劣化しないように、情報が相関関係にあるフレームの集合であるGOP(Group of Picture)を構成するフレーム数が多いLong GOPと、高ビットレート(18乃至50Mbps)で転送される、GOPを構成するフレーム数が少ないShort GOPとを、相互に変換する必要があった。
【0005】
例えば、非圧縮のデータをMPEGのLong GOPのストリームデータに符号化した後、フレーム編集することが可能なシステムについて、図1を用いて説明する。
【0006】
SDI(Serial Digital Interface)−ASI(Asynchronous Serial Interface)変換装置1は、供給されたSDI入力画像を、MPEGのLong GOP(ASIストリーム)となるように符号化し、符号化されたMPEGのLong GOPのストリームデータを出力する。SDIとは、Point to Pointの伝送を基本に考えた、非圧縮のデジタルビデオ・オーディオの伝送方式であり、ANSI(American National Standards Institute)/SMPTE(Society of Motion Picture and Television Engineers)259Mに規定されている。
【0007】
ASI−SDTI CP(Serial Data Transport Interface Contents Package)変換装置2は、供給されたMPEGのLong GOPのストリームデータを、復号部21で一旦復号した後、符号化部22において、全てイントラフレーム(All Intra)となるように符号化し、符号化された全てイントラフレームのストリームデータ(SDTI CPストリーム)を、SDTI CPインタフェースのフレーム編集装置3に出力する。SDTI CPとは、Pro−MPEGフォーラムの推進でSMPTE326Mとして標準化された、MPEGデータをリアルタイムに伝送(同期転送)する伝送方式の世界標準規格である。
【0008】
フレーム編集装置3にてフレーム編集されたストリームデータは、SDTI CP−ASI変換装置4に供給される。SDTI CP−ASI変換装置4は、供給された全てイントラフレームのストリームデータを、復号部31で一旦復号した後、符号化部32において、MPEGのLong GOPとなるように符号化し、符号化されたMPEGのLong GOPのストリームデータ(ASIストリーム)を出力する。
【0009】
また、入力画像を高ビットレートでMPEGのLong GOPに符号化し、それを復号して低ビットレートのMPEGのLong GOPに再符号化することが可能なシステムについて、図2を用いて説明する。
【0010】
Long GOP符号化装置51は、供給されたSDI入力画像を、復号部61で一旦復号した後、符号化部62において、高ビットレートのMPEGのLong GOPとなるように符号化し、符号化されたMPEGのLong GOPのストリーム(ASIストリーム)データを出力する。Long GOP符号化装置52は、供給された高ビットレートのMPEGのLong GOPを、復号部71で一旦復号した後、符号化部72において、低ビットレートのMPEGのLong GOPとなるように符号化し、符号化された低ビットレートのMPEGのLong GOPのストリーム(ASIストリーム)データを出力する。
【0011】
このように、画像情報に対する符号化および復号が繰り返された場合、符号化の度に使用される符号化パラメータが変化してしまうと、画像情報が劣化してしまう。この画像情報の劣化を防止するため、ビットストリームのピクチャ層のユーザデータエリアに挿入された符号化履歴情報を用いることにより、再符号化に伴う画像の劣化を抑制することができる技術がある(例えば、特許文献1参照)。
【0012】
【特許文献1】
特開2000−059788号公報
【0013】
例えば、非圧縮のデータをMPEGのLong GOPのストリームデータに符号化した後、フレーム編集を行うことが可能なシステムにおいて、符号化履歴情報を利用する場合について、図3を用いて説明する。なお、図1における場合と対応する部分には同一の符号を付してあり、その説明は適宜省略する。
【0014】
すなわち、ASI−SDTI CP変換装置101は、図1と同様のSDI−ASI変換装置1により符号化されて生成された、MPEGのLong GOP(ASIストリーム)の供給を受ける。
【0015】
MPEGのLong GOPはそれぞれ符号化の素性の異なる3種類のピクチャタイプのピクチャ(Iピクチャ、Pピクチャ、および、Bピクチャ)により構成されるため、それを復号したビデオデータにも、フレームによってそれぞれIピクチャ、Pピクチャ、Bピクチャの素性を持ったものが存在する。したがって、このビデオデータをMPEGのLong GOPで再符号化する場合、Iピクチャ、Pピクチャ、または、Bピクチャの素性を持ったビデオデータに対して、それぞれ別のピクチャタイプで符号化してしまうと、画像劣化が発生する場合がある。例えば、復号前に、IピクチャおよびPピクチャより歪が多くなりやすいBピクチャであったビデオデータをIピクチャとして符号化してしまうと、その周辺のピクチャが、歪の多いIピクチャを参照画像として予測符号化されてしまうため、画質が劣化してしまう。
【0016】
このような再符号化による画質劣化を引き起こさないため、ASI−SDTICP変換装置101は、供給されたMPEGのLong GOPのストリームデータを、復号部111で一旦復号した後、符号化部112において、全てイントラフレームとなるように符号化するとき、過去に実行された符号化、すなわち、SDI−ASI変換装置1による符号化のピクチャタイプや量子化値などのパラメータを、全てイントラフレームのSDTI-CPストリーム上に、SMPTE328Mのヒストリー情報(History data)として付加し、フレーム編集装置3に供給する。
【0017】
フレーム編集装置3にてフレーム編集されたストリームデータは、SDTI CP−ASI変換装置102に供給される。SDTI CP−ASI変換装置102は、供給された、ヒストリー情報つきの全てイントラフレームのストリームデータを、復号部121で復号する。符号化部122は、復号されたヒストリー情報に含まれている、ピクチャタイプや量子化値等の必要なパラメータを使用して、Long GOPに再符号化して出力する。
【0018】
また、図2を用いて説明したように、入力画像を高ビットレートでMPEGのLongGOPに符号化し、それを復号して低ビットレートのMPEGのLongGOPに再符号化することが可能なシステムにおいて、再符号化のための画像劣化が発生しないようになされている場合について、図4を用いて説明する。なお、図2における場合と対応する部分には同一の符号を付してあり、その説明は適宜省略する。
【0019】
すなわち、LongGOP符号化装置51により符号化されたMPEGのLong GOPのストリーム(ASIストリーム)データの供給を受けたLongGOP符号化装置131は、高ビットレートのMPEGのLong GOPを、復号部141で復号するときに、必要な符号化パラメータを取得して、復号されたビデオデータと取得された符号化パラメータを符号化部142に供給する。符号化部142は、供給された符号化パラメータを用いて、ビデオデータを、低ビットレートのMPEGのLong GOPとなるように符号化し、符号化された低ビットレートのMPEGのLong GOPのストリーム(ASIストリーム)データを出力する。
【0020】
【発明が解決しようとする課題】
上述したように、ヒストリー情報、または、符号化パラメータを用いて、過去の符号化の情報(過去に行われた符号化のピクチャタイプ、動きベクトル、量子化値等)を再利用して符号化することにより、画質劣化を防ぐことが可能である。しかしながら、図4を用いて説明したシステムのように、再符号化によりビットレートを低くするような場合、量子化値をそのまま利用するとビットレートを低くすることができないため、量子化値を再利用することができない。また、図3を用いて説明したシステムにおいて、例えば、編集点を含むストリームの符号化時のVBVバッファ状態などによっては、量子化値を再利用して符号化を行うことができない場合がある。
【0021】
このように、ヒストリー情報、または、符号化パラメータを用いて、過去の符号化の情報を再利用して符号化するにあたって、ヒストリー情報、または、符号化パラメータに含まれる情報のうち、量子化値について再利用することができない場合、量子化値は、通常の符号化で用いるTM5等のレート制御により決定される。すなわち、符号化に用いられる量子化値は、過去の符号化の量子化値とは異なってくる。
【0022】
更に、過去に符号化が実行された符号化装置もしくはトランスコーダと、再符号化を行う符号化装置もしくはトランスコーダとが異なり、装置によってレート制御方法等が異なる場合、過去の符号化と次に実行される符号化において、量子化値が異なるものとなる可能性が高い。
【0023】
再符号化で用いられる量子化値が、過去の符号化における量子化値と異なる場合、その差分によっては、画質劣化を引き起こしてしまう。例えば、過去の符号化における量子化値に対して2倍前後の量子化値の差分を有している場合、顕著な画質劣化を引き起こしてしまい、過去の符号化における量子化値に対して2倍以上の量子化値の差分を有している場合、より一層顕著な画質劣化を引き起こしてしまう。
【0024】
この原因については、例えば、次にあげられるようなことが考えられる。
【0025】
符号化するビデオデータが、ノイズや細かいテクスチャ等の高周波成分を多く含む場合、量子化しても0にならないDCT係数が高次まで広く分布する。例えば、イントラマクロブロックのうちの、ある高次の係数を量子化した結果が1であった場合を考える。再符号化において、この部分を2倍の量子化値で量子化すると、その結果は0.5となり、丸めにより再び1となる。更に、復号時に逆量子化されて、2倍の量子化値が乗算されるため、その係数値は、過去の符号化時の係数値の2倍となる。したがって、逆DCTしたときに、ビデオデータのノイズや細かいテクスチャ等の高周波成分が、過去の符号化時の入力ビデオデータに比べて強調されてしまう。
【0026】
また、同様の部分に対して、再符号化において2倍を超える量子化値を用いて量子化が施された場合、その係数は0に丸められるので、解像度が落ちてしまう。このような場合、量子化計算を切捨てで行っている符号化装置においては、再符号化において用いられる量子化値が、過去の量子化値より僅かに大きくなるだけで、量子化結果が0となってしまうため、過去に1であるデータが、全て0となり、解像度が落ち、画像が劣化してしまう。
【0027】
特に、過去の符号化でIピクチャであった部分が、再びIピクチャとして再符号化される場合には、このような高周波成分の強調や解像度落ちの画質劣化が引き起こされやすい。したがって、再符号化後のビデオデータにおいて、Iピクチャの部分のみで高周波成分が強調されてしまったり、解像度が落ちてしまうため、再生されるビデオデータのうち、Iピクチャに対応する部分のみが強調されて、フリッカーが発生してしまう。
【0028】
ビットレートを小さくする場合、量子化値が大きくなりやすいために、上述した画質劣化が発生しやすい。また、ビットレートはそのままである場合であっても、再符号化時の入力ビデオデータが過去の符号化時の入力ビデオデータとは異なるものである場合、Iピクチャ、Pピクチャ、Bピクチャのビット発生量割り振りに、差が発生してしまう。このような場合も、過去の符号化時と比較して、量子化値が異なるものとなる可能性があるため、過去の量子化値との差異の大きさによっては、画質劣化が発生してしまう。
【0029】
本発明はこのような状況に鑑みてなされたものであり、過去の符号化におけるパラメータを再利用して符号化する場合において、量子化値を再利用できないときに、画質劣化が発生してしまうことを防ぐことができるようにするものである。
【0030】
【課題を解決するための手段】
本発明の第1の画像処理装置は、前記画像データに対する過去の符号化において利用された符号化パラメータを受け取る受け取り手段と、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しないで前記画像データを符号化する場合に利用する、符号化規格で定められている量子化マトリクスに比べて、高域のAC成分の値を小さくした量子化マトリクスを記憶する記憶手段と、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用するか否かを判定する判定手段と、前記判定手段の判定結果に基づいて、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用する場合には、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化マトリクスを再利用して前記画像データを符号化するとともに、前記判定手段の判定結果に基づいて、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しない場合には、前記記憶手段に記憶された量子化マトリクスを利用して前記画像データを符号化する符号化手段とを備える。
【0031】
前記符号化手段は、前記受け取り手段により受け取られた符号化パラメータを再利用しないで前記画像データを符号化する場合には、符号化規格においてデフォルトとされている量子化マトリクスを利用して前記画像データを符号化するようにすることができる。
【0032】
前記量子化マトリクスは、イントラ量子化マトリクス又は非イントラ量子化マトリクスであるようにすることができる。
【0035】
前記記憶手段に記憶された量子化マトリクスは、高域のAC成分の値がDC成分の2倍以下に制限されているようにすることができる。
【0036】
前記記憶手段に記憶された量子化マトリクスは、高域のAC成分の値と低域のAC成分の値とが同一又は略同一であるようにすることができる。
【0037】
前記符号化手段は、MPEG規格に従って、前記画像データを符号化するようにすることができる。
【0039】
前記判定手段は、前記画像データを符号化する際のビットレートが前記受け取り手段により受け取られた符号化パラメータに示されるビットレートよりも小さい場合に、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しないと判定するようにすることができる。
【0040】
前記判定手段は、過去の符号化においてIピクチャとして符号化された画像データを、Iピクチャと符号する場合には、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しないと判定するようにすることができる。
【0041】
本発明の第1の画像処理方法は、受け取り手段が、前記画像データに対する過去の符号化において利用された符号化パラメータを受け取り、記憶手段が、前記受け取られた符号化パラメータに含まれる量子化値を再利用しないで前記画像データを符号化する場合に利用する、符号化規格で定められている量子化マトリクスに比べて、高域のAC成分の値を小さくした量子化マトリクスを記憶し、判定手段が受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用するか否かを判定し、符号化手段が、判定手段の判定結果に基づいて、前記受け取られた符号化パラメータに含まれる量子化値を再利用する場合には、前記受け取られた符号化パラメータに含まれる量子化マトリクスを再利用して前記画像データを符号化するとともに、判定手段の判定結果に基づいて、前記受け取られた符号化パラメータに含まれる量子化値を再利用しない場合には、前記記憶された量子化マトリクスを利用して前記画像データを符号化するステップを含む。
【0042】
本発明の第1のプログラムは、コンピュータを、画像データを符号化する画像処理装置において、前記画像データに対する過去の符号化において利用された符号化パラメータを受け取る受け取り手段と、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しないで前記画像データを符号化する場合に利用する、符号化規格で定められている量子化マトリクスに比べて、高域のAC成分の値を小さくした量子化マトリクスを記憶する記憶手段と、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用するか否かを判定する判定手段と、前記判定手段の判定結果に基づいて、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用する場合には、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化マトリクスを再利用して前記画像データを符号化するとともに、前記判定手段の判定結果に基づいて、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しない場合には、前記記憶手段に記憶された量子化マトリクスを利用して前記画像データを符号化する符号化手段とを備える画像処理装置として機能させる。
【0043】
本発明の第1の画像処理装置および方法、並びにプログラムにおいては、前記画像データに対する過去の符号化において利用された符号化パラメータが受け取られ、前記受け取られた符号化パラメータに含まれる量子化値を再利用しないで前記画像データを符号化する場合に利用する、符号化規格で定められている量子化マトリクスに比べて、高域のAC成分の値を小さくした量子化マトリクスが記憶され、受け取られた符号化パラメータに含まれる量子化値を再利用するか否かが判定され、判定結果に基づいて、受け取られた符号化パラメータに含まれる量子化値を再利用する場合には、前記受け取られた符号化パラメータに含まれる量子化マトリクスを再利用して前記画像データが符号化されるとともに、判定結果に基づいて、受け取られた符号化パラメータに含まれる量子化値を再利用しない場合には、前記記憶された量子化マトリクスを利用して前記画像データが符号化される。
【0044】
本発明の第2の画像処理装置は、前記符号化ストリームに対する過去の符号化において利用された符号化パラメータを受け取る受け取り手段と、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しないで前記符号化ストリームを再符号化する場合に利用する、符号化規格で定められている量子化マトリクスに比べて、高域のAC成分の値を小さくした量子化マトリクスを記憶する記憶手段と、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用するか否かを判定する判定手段と、前記判定手段の判定結果に基づいて、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用する場合には、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化マトリクスを再利用して前記符号化ストリームを再符号化するとともに、前記判定手段の判定結果に基づいて、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しない場合には、前記記憶手段に記憶された量子化マトリクスを利用して前記符号化ストリームを再符号化する再符号化手段とを備える。
【0045】
本発明の第2の画像処理装置は、受け取り手段が、前記符号化ストリームに対する過去の符号化において利用された符号化パラメータを受け取り、記憶手段が、前記受け取られた符号化パラメータに含まれる量子化値を再利用しないで前記符号化ストリームを再符号化する場合に利用する、符号化規格で定められている量子化マトリクスに比べて、高域のAC成分の値を小さくした量子化マトリクスを記憶し、判定手段が、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用するか否かを判定し、再符号化手段が、前記判定手段の判定結果に基づいて、前記受け取られた符号化パラメータに含まれる量子化値を再利用する場合には、前記受け取られた符号化パラメータに含まれる量子化マトリクスを再利用して前記符号化ストリームを再符号化するとともに、前記判定手段の判定結果に基づいて、前記受け取られた符号化パラメータに含まれる量子化値を再利用しない場合には、前記記憶された量子化マトリクスを利用して前記符号化ストリームを再符号化するステップを含む。
【0046】
本発明の第2のプログラムは、コンピュータを、符号化ストリームを再符号化するする画像処理装置において、前記符号化ストリームに対する過去の符号化において利用された符号化パラメータを受け取る受け取り手段と、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しないで前記符号化ストリームを再符号化する場合に利用する、符号化規格で定められている量子化マトリクスに比べて、高域のAC成分の値を小さくした量子化マトリクスを記憶する記憶手段と、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用するか否かを判定する判定手段と、前記判定手段の判定結果に基づいて、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用する場合には、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化マトリクスを再利用して前記符号化ストリームを再符号化するとともに、前記判定手段の判定結果に基づいて、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しない場合には、前記記憶手段に記憶された量子化マトリクスを利用して前記符号化ストリームを再符号化する再符号化手段とを備える画像処理装置として機能させる。
【0047】
本発明の第2の画像処理装置および方法、並びにプログラムにおいては、前記符号化ストリームに対する過去の符号化において利用された符号化パラメータが受け取られ、前記受け取られた符号化パラメータに含まれる量子化値を再利用しないで前記符号化ストリームを再符号化する場合に利用する、符号化規格で定められている量子化マトリクスに比べて、高域のAC成分の値を小さくした量子化マトリクスが記憶され、受け取られた符号化パラメータに含まれる量子化値を再利用するか否かが判定され、判定結果に基づいて、前記受け取られた符号化パラメータに含まれる量子化値を再利用する場合には、前記受け取られた符号化パラメータに含まれる量子化マトリクスを再利用して前記符号化ストリームが再符号化されるとともに、判定結果に基づいて、前記受け取られた符号化パラメータに含まれる量子化値を再利用しない場合には、前記記憶された量子化マトリクスを利用して前記符号化ストリームが再符号化される。
【0060】
以下、図を参照して、本発明の実施の形態について説明する。
【0061】
図5は、本発明を適用した、非圧縮のデータをMPEGのLong GOPのストリームデータに符号化した後、フレーム編集することが可能なシステムの構成を示すブロックである。
【0062】
なお、図3を用いて説明した従来の場合と対応する部分には同一の符号を付してあり、その説明は適宜省略する。すなわち、本発明を適用した、非圧縮のデータをMPEGのLong GOPのストリームデータに符号化した後、フレーム編集することが可能なシステムにおいては、SDTI CP−ASI変換装置102に代わって、SDTI CP−ASI変換装置151が設けられているほかは、図3を用いて説明した従来の場合と基本的に同様に構成されており、SDTI CP−ASI変換装置151は、符号化部122に代わって、量子化値が再利用できるか否かに基づいて、最適な量子化マトリクスを選択して量子化処理を実行することが可能な符号化部161が設けられているほかは、SDTI CP−ASI変換装置102と基本的に同様に構成されている。
【0063】
ASI−SDTI CP変換装置101は、SDI−ASI変換装置1により符号化されて生成された、MPEGのLong GOP(ASIストリーム)の供給を受ける。
【0064】
MPEGのLongGOPは、3種類のピクチャタイプのピクチャ(Iピクチャ、Pピクチャ、および、Bピクチャ)により構成される。ASI−SDTI CP変換装置101は、供給されたMPEGのLong GOPのストリームデータを、復号部111で一旦復号した後、符号化部112において、全てイントラフレームとなるように符号化する場合、その後の処理において、これらのストリームデータがLongGOPで再符号化されるにあたって、Iピクチャ、Pピクチャ、または、Bピクチャの素性を持ったビデオデータに対して、別のピクチャタイプで符号化されてしまうことを防ぐため、過去に実行された符号化、すなわち、SDI−ASI変換装置1による符号化のピクチャタイプや量子化値などのパラメータを、SMPTE328Mのヒストリー情報(History data)として、全てイントラフレームのSDTI-CPストリーム上に付加し、フレーム編集装置3に供給する。
【0065】
フレーム編集装置3にてフレーム編集された、ヒストリー情報付のストリームデータは、SDTI CP−ASI変換装置151に供給される。SDTI CP−ASI変換装置151は、供給された、ヒストリー情報付の全てイントラフレームのストリームデータを、復号部121で復号する。符号化部161は、復号されたヒストリー情報に含まれている、ピクチャタイプや量子化値等のパラメータを、必要に応じて使用して、LongGOPに再符号化して出力する。
【0066】
図6は、符号化部161の構成を示すブロック図である。
【0067】
ヒストリー抽出部171は、復号部121により復号された、SMPTE328Mのヒストリー情報付のSDIT CPストリームから、ヒストリー情報を抽出して、レート設定部177に供給するとともに、映像ストリームを映像並べ替え部172に供給する。ヒストリー情報には、例えば、ピクチャタイプ、量子化値、動きベクトル、または、量子化マトリクスなど、過去に実行された符号化に関する情報が含まれている。
【0068】
映像並べ替え部172は、順次入力される画像データの各フレーム画像を、必要に応じて、並べ替えたり、画像データの各フレーム画像を、16画素×16ラインの輝度信号、および輝度信号に対応する色差信号によって構成されるマクロブロックに分割したマクロブロックデータを生成して、演算部173、および、動きベクトル検出部174に供給する。
【0069】
動きベクトル検出部174は、マクロブロックデータの入力を受け、各マクロブロックの動きベクトルを、マクロブロックデータ、および、フレームメモリ183に記憶されている参照画像データを基に算出し、動きベクトルデータとして、動き補償部182に送出する。
【0070】
演算部173は、映像並べ替え部172から供給されたマクロブロックデータについて、各マクロブロックの画像タイプに基づいた動き補償を行う。具体的には、演算部173は、Iピクチャに対してはイントラモードで動き補償を行い、Pピクチャに対しては、順方向予測モードで動き補償を行い、Bピクチャに対しては、双方向予測モードで動き補償を行うようになされている。
【0071】
ここでイントラモードとは、符号化対象となるフレーム画像をそのまま伝送データとする方法であり、順方向予測モードとは、符号化対象となるフレーム画像と過去参照画像との予測残差を伝送データとする方法であり、双方向予測モードとは、符号化対象となるフレーム画像と、過去と将来の参照画像との予測残差を伝送データとする方法である。
【0072】
まず、マクロブロックデータがIピクチャであった場合、マクロブロックデータはイントラモードで処理される。すなわち、演算部173は、入力されたマクロブロックデータのマクロブロックを、そのまま演算データとしてDCT(Discrete Cosine Transform :離散コサイン変換)部175に送出する。DCT部175は、入力された演算データに対し、直交変換であるDCT変換処理を行うことによりDCT係数化し、これをDCT係数データとして、量子化部176に送出する。
【0073】
量子化部176は、レート設定部177から供給される量子化値Qおよび量子化マトリクスに基づいて、入力されたDCT係数データに対して量子化処理を行い、量子化DCT係数としてVLC(Variable Length Code;可変長符号化)部178および逆量子化部179に送出する。量子化部176は、次の式(1)を用いて、量子化DCT係数Sqを算出する。
【0074】
Sq=((32×S)/q)/(2×Q) ・・・(1)
【0075】
ただし、式(1)においては、量子化前のDCT係数成分値をSとし、量子化マトリクスの成分値をqとし、乗算の結果は、四捨五入するものとする。
【0076】
逆量子化部179に送出された量子化DCT係数データは、量子化部176と同じ量子化ステップサイズによる逆量子化処理を受け、DCT係数データとして、逆DCT部180に送出される。逆量子化部179は、次の式(2)を用いて、逆量子化DCT係数Siqを算出する。
【0077】
Siq=(2×Sq×q×Q)/32 ・・・(2)
【0078】
逆DCT部180は、供給されたDCT係数データに逆DCT処理を施し、生成された演算データは、演算部181に送出され、参照画像データとしてフレームメモリ183に記憶される。
【0079】
そして、演算部173は、マクロブロックデータがPピクチャであった場合、マクロブロックデータについて、順方向予測モードよる動き補償処理を行い、Bピクチャであった場合、マクロブロックデータについて、双方向予測モードによる動き補償処理を行う。
【0080】
動き補償部182は、フレームメモリ183に記憶されている参照画像データを、動きベクトルデータに応じて動き補償し、順方向予測画像データ、または、双方向予測画像データを算出する。演算部173は、マクロブロックデータについて、動き補償部182より供給される順方向予測画像データ、または、双方向予測画像データを用いて減算処理を実行する。
【0081】
すなわち、順方向予測モードにおいて、動き補償部182は、フレームメモリ183の読み出しアドレスを、動きベクトルデータに応じてずらすことによって、参照画像データを読み出し、これを順方向予測画像データとして演算部173および演算部181に供給する。演算部173は、供給されたマクロブロックデータから、順方向予測画像データを減算して、予測残差としての差分データを得る。そして、演算部173は、差分データをDCT部175に送出する。
【0082】
演算部181には、動き補償部182より順方向予測画像データが供給されており、演算部181は、逆DCT部から供給された演算データに、順方向予測画像データを加算することにより、参照画像データを局部再生し、フレームメモリ183に出力して記憶させる。
【0083】
また、双方向予測モードにおいて、動き補償部182は、フレームメモリ183の読み出しアドレスを、動きベクトルデータに応じてずらすことによって、参照画像データを読み出し、これを双方向予測画像データとして演算部173および演算部181に供給する。演算部173は、供給されたマクロブロックデータから、双方向予測画像データを減算して、予測残差としての差分データを得る。
そして、演算部173は、差分データをDCT部175に送出する。
【0084】
演算部181には、動き補償部182より双方向予測画像データが供給されており、演算部181は、逆DCT部から供給された演算データに、双方向予測画像データを加算することにより、参照画像データを局部再生し、フレームメモリ183に出力して記憶させる。
【0085】
かくして、符号化部161に入力された画像データは、動き補償予測処理、DCT処理および量子化処理を受け、量子化DCT係数データとして、VLC部178に供給される。VLC部178は、量子化DCT係数データに対し、所定の変換テーブルに基づく可変長符号化処理を行い、その結果得られる可変長符号化データをバッファ184に送出する。バッファ184は、供給された可変長符号化データをバッファリングした後、出力する。
【0086】
レート設定部177は、バッファ184に格納される可変長符号化データの蓄積状態を常時監視しており、蓄積状態を表す占有量情報、または、ヒストリー抽出部171から供給されるヒストリー情報を基に量子化ステップサイズを決定するようになされている。
【0087】
このとき、レート設定部177は、ヒストリー抽出部171から供給されるヒストリー情報に含まれている量子化マトリクス、または、メモリ185に記憶されている複数の量子化マトリクスのうち、後述する符号化の条件に合致するものを選択するようになされている。
【0088】
メモリ185には、図7に示される、MPEG2においてデフォルトとされているイントラ量子化マトリクス、および、非イントラ(インター)量子化マトリクス(図12)以外に、図8に示される、過去の符号化の情報のうちの量子化値が再利用できない場合に用いられるイントラ量子化マトリクスが記憶されている。
【0089】
前述したように、過去の符号化の情報を用いて再符号化する場合に、例えば、再符号化によりビットレートが低くされたり、編集点を含むストリームの符号化時のVBVバッファの状態によっては、過去の符号化における量子化値を再利用することができない場合がある。過去の符号化における量子化値を再利用できないことにより発生する画質劣化を防ぐためには、AC成分の値を小さくして、その周波数成分を保護することができるイントラ量子化マトリクスを再符号化に用いるようにすればよい。
【0090】
図7に、MPEG2においてデフォルトとされているイントラ量子化マトリクスを示す。図7のイントラ量子化マトリクスは、高域のAC成分ほど大きな値となるように設定されている。これは、人間の視覚が、高域成分の画像の劣化に鈍感であるという特性を利用して、高域成分をより大きな値で除算することにより、画像の見た目を劣化させることなく、データを大きく削減することができるようにするためである。量子化前のDCT係数は、DC成分が大きな値となり、AC成分は小さな値となる傾向があるため、図7に示されるような、高域になるほど大きな値をとる量子化マトリクスを用いることにより、量子化後の係数は、高域成分がほとんど0となるような場合が多い。なお、MPEG2において、量子化マトリクスの各成分がとりえる値の最高値は255である。
【0091】
しかしながら、ビデオデータがノイズや細かいテクスチャ等の高周波成分を多く含む場合、量子化前のDCT係数の高域成分にも係数が残り、その値が1であるような場合が多く発生する。このようなビデオデータが、復号されて再符号化される場合、過去の符号化と同一の量子化マトリクスを用いる可能であり、かつ、量子化値も過去の符号化と同一であれば、量子化後の係数も1となって、元の値に再び復号することができる。しかしながら、上述したように、量子化値が、例えば、過去の符号化の2倍程度になってしまうと、再符号化後の復号後の値が、過去の符号化の前の値と大きく異なってしまう場合が発生する。
【0092】
このようにして、多くの成分において、値の変動が発生してしまうことにより、画質が著しく劣化してしまう。更に、このようなビデオデータに対して、再符号化が繰り返されてしまうと、同様の復号値の変動も繰り返されてしまうため、再符号化が施される毎に、更に画質が劣化してしまう。
【0093】
そこで、高域のAC成分においても、大きな値が設定されておらず、高域成分が低域成分と同一か、略同等の値で構成されている量子化マトリクスを使用することにより、再符号化時に、量子化値で除算する直前の値をある程度大きな値とすることができるので、上述した量子化値の変動による復号値の変動の影響を受けないようにすることができる。例えば、図8に示されるように、MPEG2の規格で「8」に定められているDC成分以外の全ての成分を、DC成分の2倍の値である16とした量子化マトリクスを使用することにより、上述した量子化値の変動による復号値の変動の影響を受けないようにすることができる。
【0094】
図7に示される、MPEG2においてデフォルトとされているイントラ量子化マトリクスが用いられた場合、過去の符号化時において量子化前のDCT係数成分値が9であり、対応する成分の量子化マトリクス値がq=34であり、量子化値がQ=4であれば、上述した式(1)より、量子化結果は、Sq=((32×9)/34)/(2×4)=1となり、逆量子化すると、上述した式(2)より、Siq=(2×1×34×4)/32=9となる。
【0095】
このとき、再符号化時に量子化値Qが、Q=4から、2倍のQ=8になった場合、量子化結果は、同様に、式(1)から、Sq=((32×9)/34)/(2×8)=1となり、逆量子化すると、式(2)から、Siq=(2×1×34×8)/32=17となり、量子化前のDCT係数成分値である9と、大きく異なる値となる。
【0096】
これに対して、例えば、図8の量子化マトリクスを再符号化に用いた場合、対応する成分の量子化マトリクス値がq=16であるため、量子化値Qが、Q=4から、2倍のQ=8になったとしても、再符号化時の量子化結果は、式(1)より、Sq=((32×9)/16)/(2×8)=1となり、逆量子化すると、式(2)より、Siq=(2×1×16×8)/32=8となる。すなわち、図8の量子化マトリクスを再符号化に用いた場合には、量子化前のDCT係数成分値である9と、大きく変わらない逆量子化結果を得ることができるため、量子化値の変動による復号値の変動に対して、影響を受けにくくなることが分かる。
【0097】
したがって、量子化値を再利用できない場合には、図8に示されるような、高域のAC成分においても大きな値が設定されていない(高域のAC成分の値が、DC成分の2倍以下に制限され、低域のAC成分の値と同一か、または、略等しい値となる)イントラ量子化マトリクスを使用することにより、再符号化後の画質劣化を抑制できる。
【0098】
ここでは、図8のイントラ量子化マトリクスを、高域のAC成分においても、大きな値が設定されておらず、高域成分が低域成分と同一か、略同等の値で構成されているイントラ量子化マトリクスの例として説明したが、本発明に用いられるイントラ量子化マトリクスは、図8のイントラ量子化マトリクスに限定されるものではなく、図8のイントラ量子化マトリクスのように、AC成分が全て同一の値でなくても、例えば、高域成分が、DC成分の2倍以下となるような、充分小さな値が用いられていればよい。
【0099】
レート設定部177は、図示しない操作入力部から供給されるユーザの操作入力を示す信号、または、ヒストリー抽出部171からヒストリー情報が供給されたか否かを基に、ヒストリー情報を用いて符号化を行うことが可能か否かを判断する。ヒストリー抽出部171から供給されるヒストリー情報には、上述したように、例えば、ピクチャタイプ、量子化値、動きベクトル、または、量子化マトリクスなどが含まれる。
【0100】
レート設定部177は、ヒストリー情報を用いて符号化を行うことができないと判断した場合、通常の符号化に用いられる、図7を用いて説明したイントラ量子化マトリクスを、メモリ185から読み出して、量子化部176に供給する。
ヒストリー情報を用いて符号化を行うことができないと判断した場合の量子化値Qの決定方法については後述する。
【0101】
レート設定部177は、ヒストリー情報を用いて符号化を行うことが可能であると判断した場合、ヒストリー抽出部171から供給されるヒストリー情報を基に、量子化値を再利用することが可能か否かを判断する。
【0102】
ここで、量子化値を再利用することが可能であるか否かは、例えば、量子化値を再利用できるか否かを、ユーザによって予め設定可能なようにしても良いし、ヒストリー情報の中に、量子化値を再利用することが可能であるか否の情報が記載されているものとしても良いし、ヒストリー情報に示されている以前の符号化が実行された画像枠と、再符号化時の画像枠が、位置および大きさとも一致しているか否か、ヒストリー情報に示されている以前の符号化におけるビットレートが、今回の符号化のビットレートよりも小さいか否か、または、以前の符号化におけるクロマフォーマットが、今回のクロマフォーマットより大きいか否かなどの所定の条件により決定されるようにしても良い。
【0103】
そして、量子化値を再利用することが可能であると判断された場合、レート設定部177は、ヒストリー情報に含まれる量子化マトリクスを量子化部176に供給する。一方、量子化値を再利用することが可能ではないと判断された場合、レート設定部177は、画像の劣化を防ぐために、図8を用いて説明した量子化マトリクスを、メモリ185から読み出して、量子化部176に供給する。
【0104】
また、レート設定部177は、ヒストリー情報を利用しない場合、または、ヒストリー情報に含まれる量子化値を再利用することができない場合、目標発生符号量よりも実際に発生したマクロブロックの発生符号量が多いとき、発生符号量を減らすために量子化ステップサイズを大きくし、また目標発生符号量よりも実際の発生符号量が少ないとき、発生符号量を増やすために量子化ステップサイズを小さくするようになされている。
【0105】
すなわち、レート設定部177は、デコーダ側に設けられたVBVバッファに格納された可変長符号化データの蓄積状態の推移を想定することにより、仮想バッファのバッファ占有量を求めて、量子化値Qを算出し、通常の符号化に用いられる、図7を用いて説明した量子化マトリクスとともに、量子化部176に供給する。
【0106】
j番目のマクロブロックにおける仮想バッファのバッファ占有量d(j)は、次の式(3)によって表され、また、j+1番目のマクロブロックにおける仮想バッファのバッファ占有量d(j+1)は、次の式(4)によって表され、式(3)から式(4)を減算することにより、j+1番目のマクロブロックにおける仮想バッファのバッファ占有量d(j+1)は、次の式(5)として表される。
【0107】
d(j)=d(0)+B(j−1)−{T×(j−1)/MBcnt}
・・・(3)
【0108】
ここで、d(0)は初期バッファ容量、B(j)は、j番目のマクロブロックにおける符号化発生ビット数、MBcntは、ピクチャ内のマクロブロック数、そして、Tは、ピクチャ単位の目標発生符号量である。
【0109】
d(j+1)=d(0)+B(j)−(T×j)/MBcnt
・・・(4)
【0110】
d(j+1)=d(j)+{B(j)−B(j−1)}−T/MBcnt
・・・(5)
【0111】
なお、レート設定部177は、ピクチャ内のマクロブロックが、例えば、イントラスライス部分とインタースライス部分とに分かれている場合には、イントラスライス部分のマクロブロックとインタースライス部分の各マクロブロックに割り当てる目標発生符号量TpiおよびTppをそれぞれ個別に設定することができる。
【0112】
したがって、レート設定部177は、バッファ占有量d(j+1)、および、式(6)に示される定数rを、式(7)に代入することにより、マクロブロック(j+1)の量子化インデックスデータQ(j+1)を算出し、これを量子化部176に供給する。
【0113】
r=(2×br)/pr ・・・(6)
Q(j+1)=d(j+1)×(31/r) ・・・(7)
ここで、brは、ビットレートであり、prは、ピクチャレートである。
【0114】
量子化部176は、レート設定部177から供給された量子化値Qに基づいて、次のマクロブロックにおける量子化ステップサイズを決定し、量子化ステップサイズによってDCT係数データを量子化する。
【0115】
これにより、量子化部176は、実際の発生符号量に基づいて算出された、次のピクチャの目標発生符号量にとって最適な量子化ステップサイズによって、DCT係数データを量子化することができる。
【0116】
かくして、量子化部176では、バッファ184のデータ占有量に応じて、バッファ184がオーバーフローまたはアンダーフローしないように量子化し得るとともに、デコーダ側のVBVバッファがオーバーフロー、またはアンダーフローしないように量子化した量子化DCT係数データを生成することができる。
【0117】
なお、以上においては、符号化処理を、ピクチャ単位で行う場合について説明したが、符号化処理が、ピクチャ単位ではなく、例えば、スライス単位や、マクロブロック単位で行われる場合にも、基本的に同様にして、符号化処理が実行される。
【0118】
また、図4を用いて説明した、入力画像を高ビットレートでMPEGのLongGOPに符号化し、それを復号して、低ビットレートのLongGOPに再符号化する場合に、再符号化のための画像劣化が発生しないようになされているシステムについても、同様にして本発明を適用することが可能である。図9は、本発明を適用した、入力画像を高ビットレートでMPEGのLongGOPに符号化し、それを復号して低ビットレートのLongGOPに再符号化する場合に、VBVバッファの破綻を防止しつつ、再符号化のための画像劣化が発生しないようになされているシステムの構成を示すブロック図である。なお、図4における場合と対応する部分には同一の符号を付してあり、その説明は適宜省略する。
【0119】
すなわち、図9のシステムは、LongGOP符号化装置131に代わって、LongGOP符号化装置201が備えられ、LongGOP符号化装置201は、符号化部142に代わって、最適な量子化マトリクスを用いて量子化を行うことが可能な符号化部211が設けられているほかは、基本的に、LongGOP符号化装置131と同様の構成を有する。
【0120】
LongGOP符号化装置51により符号化されたMPEGのLong GOPのストリーム(ASIストリーム)データの供給を受けたLongGOP符号化装置201は、高ビットレートのMPEGのLong GOPを、復号部141で復号するときに、必要な符号化パラメータを取得して、復号されたビデオデータと取得された符号化パラメータを符号化部211に供給する。符号化部211は、必要に応じて、供給された符号化パラメータを用いて、ビデオデータを、低ビットレートのMPEGのLong GOPとなるように符号化し、符号化された低ビットレートのMPEGのLong GOPのストリーム(ASIストリーム)データを出力する。
【0121】
図10は、符号化部211の構成を示すブロック図である。なお、図10においては、図6の符号化部161と対応する部分には同一の符号を付してあり、その説明は適宜省略する。
【0122】
すなわち、符号化部211は、ヒストリー抽出部171が省略され、復号部141から供給されるパラメータを取得してレート設定部177に供給する、パラメータ入力部221が設けられているほかは、図6の符号化部161と、基本的に同様の構成を有するものである。
【0123】
レート設定部177は、バッファ184に格納される可変長符号化データの蓄積状態を常時監視しており、蓄積状態を表す占有量情報、または、パラメータ入力部221から供給されるパラメータ情報を基に量子化ステップサイズを決定するようになされている。
【0124】
レート設定部177は、図示しない操作入力部から供給されるユーザの操作入力を示す信号、または、パラメータ入力部221からパラメータ情報が供給されたか否かを基に、パラメータ情報を用いて符号化を行うか否かを判断する。パラメータ入力部221から供給されるパラメータ情報には、上述したヒストリー情報と同様に、例えば、ピクチャタイプ、量子化値、動きベクトル、または、量子化マトリクスなどが含まれる。
【0125】
レート設定部177は、パラメータ情報を用いて符号化を行うことができないと判断した場合、通常の符号化に用いられる、図7を用いて説明した量子化マトリクスを、メモリ185から読み出して、量子化部176に供給する。
【0126】
レート設定部177は、パラメータ情報を用いて符号化を行うことが可能であると判断した場合、パラメータ入力部221から供給されるパラメータ情報を基に、量子化値を再利用することが可能か否かを判断する。
【0127】
ここで、量子化値を再利用することが可能であるか否かは、例えば、量子化値を再利用できるか否かを、ユーザによって予め設定可能なようにしても良いし、パラメータ情報の中に、量子化値を再利用することが可能であるか否の情報が記載されているものとしても良いし、パラメータ情報に示されている以前の符号化が実行された画像枠と、再符号化時の画像枠が、位置および大きさとも一致しているか否か、パラメータ情報に示されている以前の符号化におけるビットレートが、今回の符号化のビットレートよりも小さいか否か、または、以前の符号化におけるクロマフォーマットが、今回のクロマフォーマットより大きいか否かなどの所定の条件により決定される。
【0128】
そして、パラメータ情報を基に、量子化値を再利用することが可能であると判断された場合、レート設定部177は、パラメータ情報に含まれるイントラ量子化マトリクスを量子化部176に供給する。一方、量子化値を再利用することが可能ではないと判断された場合、レート設定部177は、画像の劣化を防ぐために、図8を用いて説明したイントラ量子化マトリクスを、メモリ185から読み出して、量子化部176に供給する。
【0129】
量子化部176は、レート設定部177から供給された量子化値および量子化マトリクスを基に、DCT部175から供給されたDCT係数を量子化する。
【0130】
次に、図11のフローチャートを参照して、図6の符号化部161、または、図10の符号化部211において実行される、量子化マトリクス決定処理1について説明する。
【0131】
ステップS1において、レート設定部177は、図示しない操作入力部から供給される、ユーザの操作入力を示す信号を基に、または、ヒストリー情報抽出部171からヒストリー情報、もしくは、パラメータ入力部221からパラメータの供給を受けるか否かなどを基に、ヒストリー情報もしくはパラメータに記載されている過去の符号化の情報を再利用して符号化が実行されるか否かを判断する。
【0132】
ステップS1において、過去の符号化の情報を再利用して符号化が実行されないと判断された場合、ステップS2において、レート設定部177は、通常の符号化において用いられる、図7を用いて説明したイントラ量子化マトリクスを、メモリ185から読み出して、量子化部176に供給して、処理が終了される。
【0133】
ステップS1において、過去の符号化の情報を再利用して符号化が実行されると判断された場合、ステップS3において、レート設定部177は、例えば、予め量子化値を再利用できないと設定されているか否か、ヒストリー情報やパラメータ情報の中に、量子化値を再利用することが可能であると記載されているか否か、ヒストリー情報やパラメータ情報に示されている以前の符号化が実行された画像枠と、再符号化時の画像枠が、位置および大きさとも一致しているか否か、ヒストリー情報やパラメータ情報に示されている以前の符号化におけるビットレートが、今回の符号化のビットレートよりも小さいか否か、または、以前の符号化におけるクロマフォーマットが、今回のクロマフォーマットより大きいか否かなどの所定の条件を満たしているか否かを基に、量子化値は再利用可能であるか否かを判断する。
【0134】
ステップS3において、量子化値は再利用可能であると判断された場合、ステップS4において、レート設定部177は、ヒストリー情報抽出部171から供給されたヒストリー情報、もしくは、パラメータ入力部221から供給されたパラメータに含まれている、過去の符号化におけるイントラ量子化マトリクスを、量子化部176に供給して、処理が終了される。
【0135】
ステップS3において、量子化値は再利用可能ではないと判断された場合、ステップS5において、レート設定部177は、メモリ185に保存されている、図8を用いて説明したイントラ量子化マトリクスを、量子化部176に供給して、処理が終了される。
【0136】
このような処理により、符号化に用いられる量子化値が、過去の符号化の量子化値と異なる場合において、ビットレートが小さくなるときや、再符号化時の入力ビデオデータが過去の符号化時の入力ビデオデータとは異なるものであるときでも、特に、Iピクチャにおいて、高周波成分が強調されたり、画像の解像度が落ちることなどにより発生するフリッカーを防ぐことができる。
【0137】
また、以上において説明した処理では、過去の符号化に関する情報のうち、量子化値が再利用可能ではない場合に、AC成分(特に、AC成分の高域部分)に大きな値が用いられていないイントラ量子化マトリクスが選択されて、量子化に用いられるものとして説明したが、イントラマトリクスのみならず、非イントラ(インター)量子化マトリクスについても、同様の処理により、量子化値が再利用可能であるか否かに基づいて、最適なものが選択されるようにしてもよい。
【0138】
すなわち、図6の符号化部161、または、図10の符号化部211のメモリ185に、図12に示される、MPEG2のTM5においてデフォルトとされている非イントラ量子化マトリクス以外に、図13に示される、高域のAC成分においても大きな値を用いない非イントラ量子化マトリクスとを更に保存させるようにし、レート制御部177によって、量子化値が再利用可能であるか否かに基づいて、最適なものが選択されるようにすることができる。
【0139】
図12に、MPEG2のTM5においてデフォルトとされている非イントラ量子化マトリクスを示す。図12の非イントラ量子化マトリクスも、人間の視覚が、高域成分の画像の劣化に鈍感であるという特性を利用して、高域成分をより大きな値で除算するようにするために、高域のAC成分ほど大きな値となるように設定されている。
【0140】
非イントラ量子化マトリクスにおいても、高域のAC成分においても大きな値を用いず、高域成分が低域成分と同一か、略同等の値で構成されている量子化マトリクスを使用することにより、再符号化時に、量子化値で除算する直前の値が大きくなるため、量子化値の変動による復号値の変動の影響を受けないようにすることができる。例えば、図13に示されるように、全ての成分を16とした量子化マトリクスを使用することにより、上述した量子化値の変動による復号値の変動の影響を受けないようにすることができる。
【0141】
ここでは、高域のAC成分においても大きな値を用いず、高域成分が低域成分と同一か、略同等の値で構成されている非イントラ量子化マトリクスの例として、図13に示される、全ての成分が同一である量子化マトリクスを用いて説明したが、本発明に用いられる非イントラ量子化マトリクスは、図13の非イントラ量子化マトリクスに限定されるものではなく、図13の非イントラ量子化マトリクスのように、全ての成分、または、全てのAC成分が同一の値でなくても、高域成分に、例えば、DC成分の2倍以下となるような充分小さな値や、図12を用いて説明した非イントラ量子化マトリクスよりも高域成分が小さな(例えば、32以下となる)値が用いられていればよい。
【0142】
次に、図14のフローチャートを参照して、図6の符号化部161、または、図10の符号化部211において実行される、量子化値が再利用可能であるか否かに基づいて、イントラ量子化マトリクスおよび非イントラ量子化マトリクスを選択するようになされている、量子化マトリクス決定処理2について説明する。
【0143】
ステップS21において、レート設定部177は、図示しない操作入力部から供給される、ユーザの操作入力を示す信号を基に、または、ヒストリー情報抽出部171からヒストリー情報、もしくは、パラメータ入力部221からパラメータの供給を受けるか否かなどを基に、ヒストリー情報もしくはパラメータに記載されている過去の符号化の情報を再利用して符号化が実行されるか否かを判断する。
【0144】
ステップS21において、過去の符号化の情報を再利用して符号化が実行されないと判断された場合、ステップS22において、レート設定部177は、通常の符号化において用いられる、図7を用いて説明したイントラ量子化マトリクスおよび図12を用いて説明した非イントラ量子化マトリクスを、メモリ185から読み出して、量子化部176に供給して、処理が終了される。
【0145】
ステップS21において、過去の符号化の情報を再利用して符号化が実行されると判断された場合、ステップS23において、レート設定部177は、例えば、予め量子化値を再利用できないと設定されているか否か、ヒストリー情報やパラメータ情報の中に、量子化値を再利用することが可能であると記載されているか否か、ヒストリー情報やパラメータ情報に示されている以前の符号化が実行された画像枠と、再符号化時の画像枠が、位置および大きさとも一致しているか否か、ヒストリー情報やパラメータ情報に示されている以前の符号化におけるビットレートが、今回の符号化のビットレートよりも小さいか否か、または、以前の符号化におけるクロマフォーマットが、今回のクロマフォーマットより大きいか否かなどの所定の条件を満たしているか否かを基に、量子化値は再利用可能であるか否かを判断する。
【0146】
ステップS23において、量子化値は再利用可能であると判断された場合、ステップS24において、レート設定部177は、ヒストリー情報抽出部171から供給されたヒストリー情報、もしくは、パラメータ入力部221から供給されたパラメータに含まれている、過去の符号化における、イントラ量子化マトリクスおよび非イントラ量子化マトリクスを、量子化部176に供給して、処理が終了される。
【0147】
ステップS23において、量子化値は再利用可能ではないと判断された場合、ステップS25において、レート設定部177は、メモリ185に保存されている、図8を用いて説明したイントラ量子化マトリクス、および、図13を用いて説明した非イントラ量子化マトリクスを、量子化部176に供給して、処理が終了される。
【0148】
このような処理により、符号化に用いられる量子化値が、過去の符号化の量子化値と異なる場合において、ビットレートが小さくなるときや、再符号化時の入力ビデオデータが過去の符号化時の入力ビデオデータとは異なるものであるときでも、特に、Iピクチャの画像の解像度が落ちることなどにより発生するフリッカーを防ぐことができるとともに、非イントラ部分においても、画像の劣化を防ぐようにすることができる。
【0149】
なお、以上においては、過去の符号化に関する情報が再利用されない場合に用いられる量子化マトリクスとして、符号化装置において標準的に用いられる量子化マトリクス(規格のディフォルト)が用いられるものとして説明したが、過去の符号化に関する情報が再利用されない場合に用いられる量子化マトリクス(例えば、量子化マトリクスA)がいかなる値を有するものであっても(例えば、高域成分にMPEGの規格において取りえる最高の値である255を有するものであっても)、本発明において、過去の符号化に関する情報を再利用するが、過去の符号化の量子化値を再利用しない場合に用いられる量子化マトリクス(例えば、量子化マトリクスB)が、量子化マトリクスAよりも高域成分の小さな量子化マトリクス(少なくとも、255未満の値で構成される量子化マトリクス)である場合、画像の劣化を防ぐという効果を奏することができる。
【0150】
すなわち、符号化に用いられる量子化値が、過去の符号化の量子化値と異なる場合において、量子化に量子化マトリクスBを用いることにより、量子化マトリクスAを用いる場合と比較して、ビットレートが小さくなるときや、再符号化時の入力ビデオデータが過去の符号化時の入力ビデオデータとは異なるものであるときでも、特に、Iピクチャの画像の解像度が落ちることなどにより発生するフリッカーを防ぐことができ、画像の劣化を防ぐようにすることができる。
【0151】
なお、本発明は、例えば、リオーダリングディレイの原因となるBピクチャ、および、発生符号量の多いIピクチャを使用せずに、Pピクチャのみを使用し、このPピクチャを、数スライスからなるイントラスライスと、残り全てのスライスからなるインタースライスとに区切ることにより、リオーダリングなしに符号化することができるようになされているローディレイエンコードを行う場合においても適用可能である。
【0152】
また、本発明は、ローディレイコーディングとして各フレーム画像を全てPピクチャとし、例えば、横45マクロブロック、縦24マクロブロックの画枠サイズの中でフレーム画像の上段から縦2マクロブロックおよび横45マクロブロック分の領域を1つのイントラスライス部分、他を全てインタースライス部分として設定するようにした場合においても、イントラスライス部分を縦1マクロブロック、横45マクロブロック分の領域とするなど、他の種々の大きさの領域で形成するようにした場合においても適用可能である。
【0153】
更に、上述の実施の形態においては、本発明をMPEG方式によって圧縮符号化する符号化部161、または、符号化部211に適用するようにした場合について述べたが、本発明はこれに限らず、他の種々の画像圧縮方式による符号化装置に適用するようにしても良い。
【0154】
なお、上述の実施の形態においては、ストリームデータを変換するそれぞれの変換装置やLongGOP符号化装置が、それぞれ、復号部と符号化部を有しているものとして説明したが、復号部および符号化部が、それぞれ、復号装置および符号化装置として、独立した装置として構成されている場合においても、本発明は適用可能である。
【0155】
すなわち、上述の実施の形態においては、それぞれの変換装置やLongGOP符号化装置が、ストリームデータを変換するものとして説明したが、例えば、図15に示されるように、ストリームデータを復号してベースバンド信号に変換する復号装置251、ベースバンド信号を符号化してストリームデータに変換する符号化装置252が、それぞれ独立した装置として構成されていても良い。更に、復号装置251が、供給されたストリームデータを完全に復号せず、対応する符号化装置252が、非完全に復号されたデータの対応する部分を部分的に符号化する場合においても、本発明は適用可能である。
【0156】
例えば、復号装置251が、VLC符号に対する復号および逆量子化のみを行い、逆DCT変換を実行していなかった場合、符号化装置252は、量子化および可変長符号化処理を行うが、DCT変換処理は行わない。このような部分的な符号化(中途段階からの符号化)を行う符号化装置252の量子化における量子化値を再利用するか否かの決定において、本発明を適用することができるのは言うまでもない。
【0157】
更に、復号装置251が完全に復号したベースバンド信号を、符号化装置252が中途段階まで符号化する場合(例えば、DCT変換および量子化を行うが可変長符号化処理を行わないなど)や、復号装置251が完全に復号していない(例えば、VLC符号に対する復号および逆量子化のみを行い、逆DCT変換を実行していない)ため、中途段階まで符号化されているデータに対して、符号化装置252が更に中途段階まで符号化する場合など(例えば、量子化を行うが可変長符号化処理を行わないなど)においても、本発明は適用可能である。
【0158】
更に、このような部分的な復号を行う符号化装置251と部分的な符号化を行う符号化装置252で構成されたトランスコーダ261においても、本発明は適用可能である。このようなトランスコーダ261は、例えば、スプライシングなどの編集を行う編集装置262が利用される場合などに用いられる。
【0159】
上述した一連の処理は、ハードウエアにより実行させることもできるが、ソフトウエアにより実行させることもできる。この場合、例えば、SDTI CP−ASI変換装置151や、Long GOP符号化装置201は、図16に示されるようなパーソナルコンピュータ301により構成される。
【0160】
図16において、CPU(Central Processing Unit)311は、ROM(Read Only Memory)312に記憶されているプログラム、または記憶部318からRAM(Random Access Memory)313にロードされたプログラムに従って、各種の処理を実行する。RAM313にはまた、CPU311が各種の処理を実行する上において必要なデータなども適宜記憶される。
【0161】
CPU311、ROM312、およびRAM313は、バス314を介して相互に接続されている。このバス314にはまた、入出力インタフェース315も接続されている。
【0162】
入出力インタフェース315には、キーボード、マウスなどよりなる入力部316、ディスプレイやスピーカなどよりなる出力部317、ハードディスクなどより構成される記憶部318、モデム、ターミナルアダプタなどより構成される通信部319が接続されている。通信部319は、インターネットを含むネットワークを介しての通信処理を行う。
【0163】
入出力インタフェース315にはまた、必要に応じてドライブ320が接続され、磁気ディスク331、光ディスク332、光磁気ディスク333、もしくは、半導体メモリ334などが適宜装着され、それらから読み出されたコンピュータプログラムが、必要に応じて記憶部318にインストールされる。
【0164】
一連の処理をソフトウエアにより実行させる場合には、そのソフトウエアを構成するプログラムが、専用のハードウエアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば汎用のパーソナルコンピュータなどに、ネットワークや記録媒体からインストールされる。
【0165】
この記録媒体は、図16に示されるように、装置本体とは別に、ユーザにプログラムを供給するために配布される、プログラムが記憶されている磁気ディスク331(フロッピディスクを含む)、光ディスク332(CD-ROM(Compact Disk-Read Only Memory),DVD(Digital Versatile Disk)を含む)、光磁気ディスク333(MD(Mini-Disk)(商標)を含む)、もしくは半導体メモリ334などよりなるパッケージメディアにより構成されるだけでなく、装置本体に予め組み込まれた状態でユーザに供給される、プログラムが記憶されているROM312や、記憶部318に含まれるハードディスクなどで構成される。
【0166】
なお、本明細書において、記録媒体に記憶されるプログラムを記述するステップは、含む順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的もしくは個別に実行される処理をも含むものである。
【0167】
なお、本明細書において、システムとは、複数の装置により構成される装置全体を表すものである。
【0168】
【発明の効果】
このように、本発明によれば、画像データを符号化することができる。特に、過去の符号化において用いられた量子化値が再利用できない場合に、高域成分が、255未満の値で構成されている量子化マトリクスを用いて量子化を実行することができるので、画質の劣化を防ぐようにすることができる。
【0169】
また、他の本発明によれば、画像データを符号化することができるほか、過去の符号化において用いられた情報を再利用するが、量子化値が再利用できない場合に、過去の符号化において用いられた情報を再利用できない場合に用いられる量子化マトリクスよりも小さな値で構成されている量子化マトリクスを用いて量子化を実行することができるので、画質の劣化を防ぐようにすることができる。
【0170】
また、他の本発明によれば、画像データを変換することができるほか、変換処理における符号化処理において、過去の符号化において用いられた量子化値が再利用できない場合に、高域成分が、255未満以下の値で構成されている量子化マトリクスを用いて量子化を実行することができるので、画質の劣化を防ぐようにすることができる。
【0171】
更に、他の本発明によれば、画像データを変換することができるほか、変換処理における符号化処理において、過去の符号化において用いられた情報を再利用するが、量子化値が再利用できない場合に、過去の符号化において用いられた情報を再利用できない場合に用いられる量子化マトリクスよりも小さな値で構成されている量子化マトリクスを用いて量子化を実行することができるので、画質の劣化を防ぐようにすることができる。
また、更に、他の本発明によれば、再符号化を行うことができ、特に、過去の符号化処理における量子化値が再利用可能であるかを判定して、再利用可能でないと判定された場合に、AC成分の値を小さくしたイントラ量子化マトリクスを利用して再符号化するようにしたので、画質の劣化を防ぐようにすることができる。
【図面の簡単な説明】
【図1】フレーム編集を行う場合の再符号化が行われる従来のシステムを説明するための図である。
【図2】MPEGのLong GOPのビットレートを変更して再符号化することが可能な従来のシステムについて説明するための図である。
【図3】フレーム編集を行う場合の再符号化が行われる従来のシステムにおいて、符号化履歴情報を利用する場合について、説明するための図である。
【図4】MPEGのLong GOPのビットレートを変更して再符号化することが可能な従来のシステムで符号化履歴情報を利用する場合について、説明するための図である。
【図5】本発明を適用した、フレーム編集を行う場合の再符号化が行われるシステムの構成を示すブロックである。
【図6】図5の符号化部の構成を示すブロック図である。
【図7】 MPEG2においてデフォルトとされているイントラ量子化マトリクスについて説明するための図である。
【図8】本発明において用いられるイントラ量子化マトリクスについて説明するための図である。
【図9】本発明を適用した、MPEGのLong GOPのビットレートを変更して再符号化することが可能なシステムの構成を示すブロック図である。
【図10】図9の符号化部の構成を示すブロック図である。
【図11】量子化マトリクス決定処理1について説明するためのフローチャートである。
【図12】 MPEG2においてデフォルトとされている非イントラ量子化マトリクスについて説明するための図である。
【図13】本発明において用いられる非イントラ量子化マトリクスについて説明するための図である。
【図14】量子化マトリクス決定処理2について説明するためのフローチャートである。
【図15】本発明を適用可能な異なる装置の構成について説明するための図である。
【図16】パーソナルコンピュータの構成を示すブロック図である。
【符号の説明】
1 SDI−ASI変換装置, 3 フレーム編集装置, 51 Long GOP符号化装置, 61 復号部, 62 符号化部, 101 ASI−SDTI変換装置, 111 復号部, 112 符号化部, 121 復号部, 141復号部, 151 SDTI CP−ASI変換部, 161 符号化部, 171 ヒストリー抽出部, 172 画像並べ替え部, 173 演算部, 174 動きベクトル検出部, 175 DCT部, 176 量子化部, 177 レート設定部, 178 VLC部, 179 逆量子化部, 180 逆DCT部, 181 演算部, 182 動き補償部, 183 フレームメモリ, 184 バッファ, 185 メモリ, 201 Long GOP符号化装置, 211 符号化部, 221 パラメータ入力部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus and an image processing method.,recoding mediaAnd an image processing apparatus suitable for use in a case where it is possible to re-encode the corresponding data using information relating to encoding performed in the past on the corresponding data, and Image processing method,recoding mediaAnd the program.
[0002]
[Prior art]
For example, in a system that transmits a moving image signal to a remote place such as a video conference system and a videophone system, in order to efficiently use a transmission path, line correlation and interframe correlation of video signals are used. The image signal is compression encoded.
[0003]
When the image signal is compression-encoded, encoding is performed so that the generated bit stream has a predetermined bit rate. However, in actual operation, it may be necessary to convert the bit rate of the bit stream due to the circumstances of the transmission path.
[0004]
Further, for example, when the transmitted image signal is edited at a broadcasting station, editing is performed in units of seconds. Therefore, it is preferable that the image information of a frame is independent from the image information of other frames. Therefore, a long GOP with a large number of frames constituting a GOP (Group of Picture) that is a set of frames in which information is correlated so that image quality does not deteriorate even when transferred at a low bit rate (for example, 3 to 9 Mbps). And a Short GOP transferred at a high bit rate (18 to 50 Mbps) and having a small number of frames constituting the GOP need to be mutually converted.
[0005]
For example, a system capable of frame editing after encoding uncompressed data into MPEG Long GOP stream data will be described with reference to FIG.
[0006]
An SDI (Serial Digital Interface) -ASI (Asynchronous Serial Interface)
[0007]
The ASI-SDTI CP (Serial Data Transport Interface Contents Package)
[0008]
The stream data frame-edited by the
[0009]
A system capable of encoding an input image into a MPEG long GOP at a high bit rate, decoding it, and re-encoding it into a low bit rate MPEG long GOP will be described with reference to FIG.
[0010]
The Long GOP
[0011]
As described above, when encoding and decoding of image information are repeated, if the encoding parameter used for each encoding changes, the image information deteriorates. In order to prevent the deterioration of the image information, there is a technique that can suppress the deterioration of the image due to re-encoding by using the encoding history information inserted in the user data area of the picture layer of the bit stream ( For example, see Patent Document 1).
[0012]
[Patent Document 1]
JP 2000-059788 A
[0013]
For example, a case where encoding history information is used in a system capable of performing frame editing after encoding uncompressed data into MPEG Long GOP stream data will be described with reference to FIG. In addition, the same code | symbol is attached | subjected to the part corresponding to the case in FIG. 1, The description is abbreviate | omitted suitably.
[0014]
That is, the ASI-SDTI
[0015]
Since the MPEG Long GOP is composed of three types of picture types (I picture, P picture, and B picture) having different encoding features, video data obtained by decoding the picture is also represented by a frame. There is a picture, P picture, and B picture. Therefore, when this video data is re-encoded with the MPEG Long GOP, if the video data having the feature of I picture, P picture or B picture is encoded with different picture types, Image degradation may occur. For example, if video data that is a B picture that tends to be more distorted than an I picture and a P picture is encoded as an I picture before decoding, the surrounding picture is predicted using the distorted I picture as a reference picture. Since it is encoded, the image quality deteriorates.
[0016]
In order not to cause such image quality degradation due to re-encoding, the ASI-
[0017]
The stream data subjected to frame editing by the
[0018]
Further, as described with reference to FIG. 2, in a system that can encode an input image into an MPEG LongGOP at a high bit rate, decode it, and re-encode it into an MPEG LongGOP at a low bit rate. A case where image degradation due to re-encoding is not caused will be described with reference to FIG. 2 corresponding to those in FIG. 2 are denoted by the same reference numerals, and description thereof will be omitted as appropriate.
[0019]
That is, the
[0020]
[Problems to be solved by the invention]
As described above, using history information or encoding parameters, encoding by reusing past encoding information (picture type, motion vector, quantization value, etc. of past encoding) By doing so, it is possible to prevent image quality degradation. However, when the bit rate is lowered by re-encoding as in the system described with reference to FIG. 4, if the quantized value is used as it is, the bit rate cannot be lowered, and the quantized value is reused. Can not do it. In the system described with reference to FIG. 3, for example, depending on the VBV buffer state at the time of encoding a stream including an edit point, encoding may not be performed by reusing the quantized value.
[0021]
As described above, when the history information or the encoding parameter is used and the past encoding information is reused for encoding, the history value or the quantization value among the information included in the encoding parameter is used. When it cannot be reused, the quantized value is determined by rate control such as TM5 used in normal coding. That is, the quantized value used for encoding is different from the quantized value of past encoding.
[0022]
Furthermore, if the encoding device or transcoder that has been encoded in the past is different from the encoding device or transcoder that performs re-encoding, and the rate control method differs depending on the device, There is a high possibility that the quantized values will be different in the encoding performed.
[0023]
When the quantized value used in re-encoding is different from the quantized value in past encoding, image quality degradation is caused depending on the difference. For example, when there is a difference between the quantization values of about twice the quantization value in the past encoding, the image quality is significantly deteriorated, and 2 for the quantization value in the past encoding. If the difference between the quantization values is twice or more, the image quality is further significantly deteriorated.
[0024]
Regarding this cause, for example, the following can be considered.
[0025]
When the video data to be encoded contains a lot of high-frequency components such as noise and fine textures, DCT coefficients that do not become zero even when quantized are widely distributed to higher order. For example, consider a case where the result of quantizing a certain higher-order coefficient in an intra macroblock is 1. In re-encoding, if this part is quantized with a doubled quantization value, the result is 0.5, and becomes 1 again by rounding. Further, since the inverse quantization is performed at the time of decoding and the doubled quantization value is multiplied, the coefficient value becomes twice the coefficient value at the time of past encoding. Therefore, when inverse DCT is performed, high-frequency components such as noise and fine texture of video data are emphasized as compared with input video data at the time of past encoding.
[0026]
In addition, when the same part is quantized using a quantization value more than twice in re-encoding, the coefficient is rounded to 0, resulting in a decrease in resolution. In such a case, in an encoding apparatus that performs quantization calculation with truncation, the quantization value used in re-encoding is slightly larger than the past quantization value, and the quantization result is 0. Therefore, all the data that is 1 in the past becomes 0, the resolution drops, and the image deteriorates.
[0027]
In particular, when a portion that was an I picture in past encoding is re-encoded as an I picture again, such high-frequency component emphasis and image quality deterioration due to resolution reduction are likely to occur. Therefore, in the re-encoded video data, the high frequency component is emphasized only in the I picture portion or the resolution is lowered. Therefore, only the portion corresponding to the I picture is emphasized in the reproduced video data. As a result, flicker occurs.
[0028]
When the bit rate is reduced, the quantized value tends to increase, so that the above-described image quality degradation is likely to occur. Even if the bit rate remains the same, if the input video data at the time of re-encoding is different from the input video data at the time of past encoding, the bits of I picture, P picture, and B picture There will be a difference in the amount allocation. In such a case as well, there is a possibility that the quantized value may be different from that in the past encoding. Therefore, depending on the magnitude of the difference from the past quantized value, image quality degradation may occur. End up.
[0029]
The present invention has been made in view of such a situation, and in the case of encoding by reusing parameters in past encoding, image quality deterioration occurs when the quantized value cannot be reused. It is to be able to prevent this.
[0030]
[Means for Solving the Problems]
The first image processing apparatus of the present invention includes a receiving unit that receives an encoding parameter used in past encoding of the image data, and a quantization value included in the encoding parameter received by the receiving unit. Used when encoding the image data without using itCompared to the quantization matrix defined in the coding standard, the value of the high frequency AC component was reduced.Storage means for storing a quantization matrix;Based on a determination result of determining whether to reuse a quantization value included in the encoding parameter received by the receiving means, and a determination result of the determination means,When the quantization value included in the encoding parameter received by the receiving unit is reused, the image data is encoded by reusing the quantization matrix included in the encoding parameter received by the receiving unit. AndBased on the determination result of the determination means,An encoding unit for encoding the image data using a quantization matrix stored in the storage unit when the quantization value included in the encoding parameter received by the receiving unit is not reused; Prepare.
[0031]
In the case of encoding the image data without reusing the encoding parameter received by the receiving unit, the encoding unit uses the quantization matrix that is set as a default in the encoding standard. Data can be encoded.
[0032]
The quantization matrix is an intraQuantizationIt can be a matrix or a non-intra quantization matrix.
[0035]
The quantization matrix stored in the storage means can be configured such that the value of the high frequency AC component is limited to twice or less the DC component.
[0036]
The quantization matrix stored in the storage means may be such that the value of the high frequency AC component and the value of the low frequency AC component are the same or substantially the same.
[0037]
The encoding means may encode the image data in accordance with the MPEG standard.
[0039]
Said determination meansIs included in the encoding parameter received by the receiving means when the bit rate for encoding the image data is smaller than the bit rate indicated in the encoding parameter received by the receiving means. It can be determined that the value is not reused.
[0040]
Said determination meansDetermines that the quantization value included in the encoding parameter received by the receiving unit is not reused when image data encoded as an I picture in past encoding is encoded as an I picture. Can be.
[0041]
In the first image processing method of the present invention, the receiving means receives the encoding parameter used in the past encoding for the image data, and the storage means is the quantized value included in the received encoding parameter. Used when encoding the image data without reusingCompared to the quantization matrix defined in the coding standard, the value of the high frequency AC component was reduced.Store the quantization matrix,A determination unit determines whether or not to reuse the quantization value included in the encoding parameter received by the reception unit;The encoding means isBased on the determination result of the determination means,When reusing the quantization value included in the received encoding parameter, the quantization data included in the received encoding parameter is reused, and the image data is encoded.Based on the determination result of the determination means,If the quantization value included in the received encoding parameter is not reused, the image data is encoded using the stored quantization matrix.
[0042]
The first program of the present invention is received by the receiving means for receiving the encoding parameters used in the past encoding for the image data in the image processing apparatus for encoding the image data. This is used when the image data is encoded without reusing the quantization value included in the encoding parameter.Compared to the quantization matrix defined in the coding standard, the value of the high frequency AC component was reduced.Storage means for storing a quantization matrix;Based on a determination result of determining whether to reuse a quantization value included in the encoding parameter received by the receiving means, and a determination result of the determination means,When the quantization value included in the encoding parameter received by the receiving unit is reused, the image data is encoded by reusing the quantization matrix included in the encoding parameter received by the receiving unit. AndBased on the determination result of the determination means,An encoding unit for encoding the image data using a quantization matrix stored in the storage unit when the quantization value included in the encoding parameter received by the receiving unit is not reused; It functions as an image processing apparatus provided.
[0043]
In the first image processing apparatus and method, and the program of the present invention, an encoding parameter used in past encoding for the image data is received, and a quantization value included in the received encoding parameter is calculated. Used when encoding the image data without reuseCompared to the quantization matrix defined in the coding standard, the value of the high frequency AC component was reduced.A quantization matrix is stored,It is determined whether to reuse the quantization value included in the received encoding parameter, and based on the determination result,When reusing the quantization value included in the received encoding parameter, the image data is encoded using the quantization matrix included in the received encoding parameter;Based on the judgment result,When the quantization value included in the received encoding parameter is not reused, the image data is encoded using the stored quantization matrix.
[0044]
The second image processing apparatus of the present invention includes a receiving unit that receives an encoding parameter used in past encoding for the encoded stream, and a quantization value included in the encoding parameter received by the receiving unit. Used when re-encoding the encoded stream without re-useCompared to the quantization matrix defined in the coding standard, the value of the high frequency AC component was reduced.Storage means for storing a quantization matrix;Based on a determination result of determining whether to reuse a quantization value included in the encoding parameter received by the receiving means, and a determination result of the determination means,When the quantization value included in the encoding parameter received by the receiving unit is reused, the quantization stream included in the encoding parameter received by the receiving unit is reused to convert the encoded stream into the encoded stream. Re-encode andBased on the determination result of the determination means,Re-encoding for re-encoding the encoded stream using a quantization matrix stored in the storage means when the quantization value included in the encoding parameter received by the receiving means is not reused Means.
[0045]
In the second image processing apparatus of the present invention, the receiving means receives the encoding parameter used in the past encoding for the encoded stream, and the storage means is the quantization included in the received encoding parameter. Used when re-encoding the encoded stream without reusing valuesCompared to the quantization matrix defined in the coding standard, the value of the high frequency AC component was reduced.Store the quantization matrix,Determining means determines whether to reuse the quantization value included in the encoding parameter received by the receiving means;The re-encoding means isBased on the determination result of the determination means,When re-using the quantization value included in the received encoding parameter, re-encoding the encoded stream using the quantization matrix included in the received encoding parameter;Based on the determination result of the determination means,If the quantization value included in the received encoding parameter is not reused, the method includes re-encoding the encoded stream using the stored quantization matrix.
[0046]
According to a second program of the present invention, in the image processing apparatus for re-encoding the encoded stream, the computer receives reception parameters for receiving the encoding parameters used in the past encoding for the encoded stream, and the reception Used when re-encoding the encoded stream without re-using the quantized value contained in the encoding parameter received by the meansCompared to the quantization matrix defined in the coding standard, the value of the high frequency AC component was reduced.Storage means for storing a quantization matrix;Based on a determination result of determining whether to reuse a quantization value included in the encoding parameter received by the receiving means, and a determination result of the determination means,When the quantization value included in the encoding parameter received by the receiving unit is reused, the quantization stream included in the encoding parameter received by the receiving unit is reused to convert the encoded stream into the encoded stream. Re-encode andBased on the determination result of the determination means,Re-encoding for re-encoding the encoded stream using a quantization matrix stored in the storage means when the quantization value included in the encoding parameter received by the receiving means is not reused And function as an image processing apparatus.
[0047]
In the second image processing apparatus and method, and the program of the present invention, an encoding parameter used in past encoding for the encoded stream is received, and a quantization value included in the received encoding parameter Used when re-encoding the encoded stream without reusingCompared to the quantization matrix defined in the coding standard, the value of the high frequency AC component was reduced.A quantization matrix is stored,It is determined whether to reuse the quantization value included in the received encoding parameter, and based on the determination result,When the quantization value included in the received encoding parameter is reused, the encoded stream is re-encoded using the quantization matrix included in the received encoding parameter. ,Based on the judgment result,If the quantization value included in the received encoding parameter is not reused, the encoded stream is re-encoded using the stored quantization matrix.
[0060]
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0061]
FIG. 5 is a block diagram showing the configuration of a system capable of frame editing after encoding uncompressed data to MPEG Long GOP stream data to which the present invention is applied.
[0062]
In addition, the same code | symbol is attached | subjected to the part corresponding to the conventional case demonstrated using FIG. 3, and the description is abbreviate | omitted suitably. That is, in a system capable of frame editing after encoding uncompressed data into MPEG Long GOP stream data to which the present invention is applied, instead of the SDTI CP-ASI converter 102, the SDTI CP -It is basically configured in the same manner as the conventional case described with reference to FIG. 3 except that the ASI conversion device 151 is provided. The SDTI CP-ASI conversion device 151 is replaced with the
[0063]
The ASI-
[0064]
The MPEG LongGOP is composed of three types of pictures (I picture, P picture, and B picture). When the ASI-SDTI
[0065]
The stream data with history information edited by the
[0066]
FIG. 6 is a block diagram illustrating a configuration of the
[0067]
The
[0068]
The
[0069]
The motion
[0070]
The
[0071]
Here, the intra mode is a method in which a frame image to be encoded is used as transmission data as it is, and the forward prediction mode is a prediction residual between a frame image to be encoded and a past reference image as transmission data. The bidirectional prediction mode is a method in which transmission residuals are prediction residuals between a frame image to be encoded and past and future reference images.
[0072]
First, when the macroblock data is an I picture, the macroblock data is processed in the intra mode. That is, the
[0073]
The
[0074]
Sq = ((32 × S) / q) / (2 × Q) (1)
[0075]
However, in Equation (1), the DCT coefficient component value before quantization is S, the component value of the quantization matrix is q, and the multiplication result is rounded off.
[0076]
The quantized DCT coefficient data sent to the inverse quantization unit 179 is subjected to an inverse quantization process using the same quantization step size as that of the
[0077]
Siq = (2 × Sq × q × Q) / 32 (2)
[0078]
The inverse DCT unit 180 performs inverse DCT processing on the supplied DCT coefficient data, and the generated computation data is sent to the
[0079]
When the macroblock data is a P picture, the
[0080]
The
[0081]
That is, in the forward prediction mode, the
[0082]
The
[0083]
In the bidirectional prediction mode, the
Then, the
[0084]
Bidirectional prediction image data is supplied from the
[0085]
Thus, the image data input to the
[0086]
The
[0087]
At this time, the
[0088]
In the
[0089]
As described above, when re-encoding using past encoding information, for example, the bit rate is lowered by re-encoding, or depending on the state of the VBV buffer at the time of encoding the stream including the edit point In some cases, the quantization value in the past encoding cannot be reused. In order to prevent image quality degradation caused by the fact that quantization values in past encoding cannot be reused, the intra quantization matrix that can protect the frequency component by reducing the value of the AC component is re-encoded. It may be used.
[0090]
FIG. 7 shows an intra quantization matrix that is the default in MPEG2. The intra quantization matrix in FIG. 7 is set so that the higher the AC component, the larger the value. This is because the human vision is insensitive to the degradation of the high-frequency component image, and by dividing the high-frequency component by a larger value, the data can be displayed without degrading the appearance of the image. This is because it can be greatly reduced. The DCT coefficient before quantization tends to have a large value for the DC component and a small value for the AC component. Therefore, by using a quantization matrix that takes a larger value as the frequency becomes higher, as shown in FIG. In many cases, the quantized coefficients are such that the high frequency components are almost zero. In MPEG2, the maximum value that each component of the quantization matrix can take is 255.
[0091]
However, when the video data contains a lot of high frequency components such as noise and fine texture, there are many cases where the coefficient remains in the high frequency component of the DCT coefficient before quantization and the value is 1. When such video data is decoded and re-encoded, it is possible to use the same quantization matrix as the past encoding, and if the quantization value is the same as the past encoding, the quantum The converted coefficient also becomes 1, and can be decoded again to the original value. However, as described above, if the quantized value is, for example, about twice that of past encoding, the value after decoding after re-encoding is greatly different from the value before past encoding. May occur.
[0092]
In this way, the image quality is significantly deteriorated due to the occurrence of value fluctuations in many components. Furthermore, if re-encoding is repeated for such video data, the same change in the decoded value is also repeated, so that the image quality further deteriorates every time re-encoding is performed. End up.
[0093]
Therefore, a high value is not set even in the high frequency AC component, and the high frequency component is recoded by using a quantization matrix that is configured with the same or substantially the same value as the low frequency component. Since the value immediately before dividing by the quantized value can be set to a somewhat large value at the time of conversion, it is possible to prevent the influence of the fluctuation of the decoded value due to the fluctuation of the quantized value described above. For example, as shown in FIG. 8, use a quantization matrix in which all components other than the DC component defined as “8” in the MPEG2 standard are set to 16, which is twice the value of the DC component. Thus, it is possible to avoid the influence of the fluctuation of the decoded value due to the fluctuation of the quantization value described above.
[0094]
When the default intra quantization matrix in MPEG2 shown in FIG. 7 is used, the DCT coefficient component value before quantization at the time of past encoding is 9, and the quantization matrix value of the corresponding component Is q = 34 and the quantization value is Q = 4, the quantization result is Sq = ((32 × 9) / 34) / (2 × 4) = 1 from the above-described equation (1). Then, when inverse quantization is performed, Sq = (2 × 1 × 34 × 4) / 32 = 9 is obtained from the above-described equation (2).
[0095]
At this time, when the quantization value Q becomes Q = 8 from Q = 4 at the time of re-encoding, the quantization result is similarly obtained from Equation (1) from Sq = ((32 × 9 ) / 34) / (2 × 8) = 1, and inverse quantization results in Sq = (2 × 1 × 34 × 8) / 32 = 17 from equation (2), and the DCT coefficient component value before quantization This value is significantly different from 9, which is.
[0096]
On the other hand, for example, when the quantization matrix of FIG. 8 is used for re-encoding, since the quantization matrix value of the corresponding component is q = 16, the quantization value Q is changed from Q = 4 to 2 Even if the double Q = 8, the quantization result at the time of re-encoding is Sq = ((32 × 9) / 16) / (2 × 8) = 1 from the equation (1), and the inverse quantum Then, from Equation (2), Siq = (2 × 1 × 16 × 8) / 32 = 8. That is, when the quantization matrix in FIG. 8 is used for re-encoding, an inverse quantization result that is not significantly different from the DCT
[0097]
Therefore, when the quantized value cannot be reused, a large value is not set even in the high frequency AC component as shown in FIG. 8 (the value of the high frequency AC component is twice that of the DC component). By using an intra quantization matrix that is limited to the following and is the same as or substantially equal to the value of the low-frequency AC component, image quality degradation after re-encoding can be suppressed.
[0098]
Here, the intra quantization matrix of FIG. 8 is not set to a large value even in the high frequency AC component, and the high frequency component is the same as or substantially equivalent to the low frequency component. Although described as an example of the quantization matrix, the intra quantization matrix used in the present invention is not limited to the intra quantization matrix of FIG. 8, and the AC component is not limited to the intra quantization matrix of FIG. Even if they are not all the same value, for example, a sufficiently small value may be used so that the high frequency component is not more than twice the DC component.
[0099]
The
[0100]
When the
A method for determining the quantized value Q when it is determined that encoding cannot be performed using history information will be described later.
[0101]
If the
[0102]
Here, whether or not the quantized value can be reused can be set in advance by the user as to whether or not the quantized value can be reused. The information indicating whether or not the quantized value can be reused may be included in the image frame, the image frame in which the previous encoding indicated in the history information is performed, Whether the image frame at the time of encoding matches the position and size, whether the bit rate in the previous encoding shown in the history information is smaller than the bit rate of the current encoding, Alternatively, it may be determined based on a predetermined condition such as whether or not the chroma format in the previous encoding is larger than the current chroma format.
[0103]
If it is determined that the quantization value can be reused, the
[0104]
Further, when the history information is not used, or when the quantization value included in the history information cannot be reused, the
[0105]
That is, the
[0106]
The buffer occupancy d (j) of the virtual buffer in the jth macroblock is expressed by the following equation (3), and the buffer occupancy d (j + 1) of the virtual buffer in the j + 1th macroblock is The buffer occupation amount d (j + 1) of the virtual buffer in the j + 1-th macroblock is expressed as the following equation (5) by subtracting the equation (4) from the equation (3). The
[0107]
d (j) = d (0) + B (j−1) − {T × (j−1) / MBcnt}
... (3)
[0108]
Here, d (0) is the initial buffer capacity, B (j) is the number of encoding generation bits in the j-th macroblock, MBcnt is the number of macroblocks in the picture, and T is the target generation in units of pictures. Code amount.
[0109]
d (j + 1) = d (0) + B (j) − (T × j) / MBcnt
... (4)
[0110]
d (j + 1) = d (j) + {B (j) -B (j-1)}-T / MBcnt
... (5)
[0111]
Note that when the macroblock in the picture is divided into an intra slice portion and an inter slice portion, for example, the
[0112]
Therefore, the
[0113]
r = (2 × br) / pr (6)
Q (j + 1) = d (j + 1) × (31 / r) (7)
Here, br is a bit rate and pr is a picture rate.
[0114]
The
[0115]
As a result, the
[0116]
Thus, the
[0117]
In the above description, the case where the encoding process is performed in units of pictures has been described. However, the case where the encoding process is performed in units of slices or macroblocks instead of in units of pictures is basically. Similarly, the encoding process is executed.
[0118]
Also, when the input image described with reference to FIG. 4 is encoded into an MPEG LongGOP at a high bit rate, and is decoded and re-encoded into a low bit rate LongGOP, an image for re-encoding The present invention can be similarly applied to a system in which deterioration is not caused. FIG. 9 is a diagram illustrating an example in which a VBV buffer is prevented from failing when an input image is encoded into a MPEG long GOP at a high bit rate and is decoded and re-encoded into a low bit rate long GOP. FIG. 2 is a block diagram showing the configuration of a system configured to prevent image degradation due to re-encoding. Note that portions corresponding to those in FIG. 4 are denoted by the same reference numerals, and description thereof will be omitted as appropriate.
[0119]
That is, the system of FIG. 9 includes a
[0120]
When the Long
[0121]
FIG. 10 is a block diagram illustrating a configuration of the
[0122]
That is, the
[0123]
The
[0124]
The
[0125]
If the
[0126]
If the
[0127]
Here, whether or not the quantized value can be reused can be set in advance by the user as to whether or not the quantized value can be reused. The information indicating whether or not the quantized value can be reused may be described in the image frame that has been subjected to the previous encoding indicated in the parameter information, Whether the image frame at the time of encoding matches the position and size, whether the bit rate in the previous encoding indicated in the parameter information is smaller than the bit rate of the current encoding, Alternatively, it is determined according to a predetermined condition such as whether or not the chroma format in the previous encoding is larger than the current chroma format.
[0128]
Then, when it is determined that the quantization value can be reused based on the parameter information, the
[0129]
The
[0130]
Next, the quantization
[0131]
In step S1, the
[0132]
If it is determined in step S1 that the past encoding information is not reused and the encoding is not performed, the
[0133]
If it is determined in step S1 that the past encoding information is to be reused, the
[0134]
If it is determined in step S3 that the quantized value is reusable, the
[0135]
If it is determined in step S3 that the quantization value is not reusable, in step S5, the
[0136]
By such processing, when the quantized value used for encoding is different from the quantized value of the past encoding, when the bit rate is reduced or the input video data at the time of re-encoding is encoded in the past Even when the input video data is different from the current input video data, it is possible to prevent flicker caused by high frequency components being emphasized or image resolution being lowered, particularly in an I picture.
[0137]
Further, in the processing described above, a large value is not used for the AC component (particularly, the high frequency part of the AC component) when the quantized value is not reusable among the information regarding the past encoding. The intra quantization matrix has been selected and described as being used for quantization, but not only the intra matrix but also the non-intra (inter) quantization matrix can be reused by the same processing. The optimum one may be selected based on whether or not there is.
[0138]
That is, in addition to the non-intra quantization matrix that is the default in the MPEG2 TM5 shown in FIG. 12, the
[0139]
FIG. 12 shows a non-intra quantization matrix that is the default in TM2 of MPEG2. The non-intra quantization matrix of FIG. 12 also uses a characteristic that human vision is insensitive to deterioration of the high-frequency component image, so that the high-frequency component is divided by a larger value. The AC component of the region is set to have a larger value.
[0140]
Even in the non-intra quantization matrix, a large value is not used even in the high frequency AC component, and the high frequency component is the same as the low frequency component, or by using a quantization matrix configured with substantially the same value, At the time of re-encoding, the value immediately before dividing by the quantized value becomes large, so that it is possible to avoid the influence of the fluctuation of the decoded value due to the fluctuation of the quantized value. For example, as shown in FIG. 13, by using a quantization matrix in which all the components are 16, it is possible to avoid the influence of the fluctuation of the decoded value due to the fluctuation of the quantization value described above.
[0141]
Here, FIG. 13 shows an example of a non-intra quantization matrix in which a high value is not used even in the high frequency AC component and the high frequency component is configured with the same or substantially the same value as the low frequency component. Although the description has been given using the quantization matrix in which all components are the same, the non-intra quantization matrix used in the present invention is not limited to the non-intra quantization matrix of FIG. Even if not all components or all AC components have the same value as in the intra quantization matrix, the high-frequency component has a sufficiently small value that is, for example, less than twice the DC component, It is only necessary to use a value whose high frequency component is smaller (for example, 32 or less) than the non-intra quantization matrix described with reference to 12.
[0142]
Next, referring to the flowchart in FIG. 14, based on whether or not the quantized value is reusable, which is executed in the
[0143]
In step S21, the
[0144]
If it is determined in step S21 that the past encoding information is not reused, the
[0145]
If it is determined in step S21 that the past encoding information is to be reused, the
[0146]
If it is determined in step S23 that the quantized value is reusable, the
[0147]
If it is determined in step S23 that the quantization value is not reusable, in step S25, the
[0148]
By such processing, when the quantized value used for encoding is different from the quantized value of the past encoding, when the bit rate is reduced or the input video data at the time of re-encoding is encoded in the past Even when it is different from the input video data at the time, in particular, it is possible to prevent flicker caused by a decrease in the resolution of the image of the I picture and to prevent deterioration of the image even in the non-intra part. can do.
[0149]
In the above description, it is assumed that a quantization matrix (standard default) used as a standard in the encoding device is used as a quantization matrix used when information on past encoding is not reused. Whatever value the quantization matrix (for example, quantization matrix A) used when information about past coding is not reused (for example, the highest possible in the MPEG standard for high-frequency components) In the present invention, the information relating to past coding is reused, but the quantization matrix used in the case where the quantization value of past coding is not reused (even if it has a value of 255). For example, the quantization matrix B) is a quantization matrix having a smaller high frequency component than the quantization matrix A (at least Can achieve the effect that if a quantization matrix) composed of a value less than 255, to prevent image deterioration.
[0150]
That is, in the case where the quantization value used for encoding is different from the quantization value of the previous encoding, the quantization matrix B is used for quantization, which is compared with the case where the quantization matrix A is used. Flicker that occurs especially when the resolution of the I picture image drops, even when the rate is low or when the input video data at the time of re-encoding is different from the input video data at the time of past encoding. It is possible to prevent image deterioration.
[0151]
In the present invention, for example, only a P picture is used without using a B picture that causes a reordering delay and an I picture with a large amount of generated code, and this P picture is converted into an intra-frame consisting of several slices. The present invention can also be applied to a case where low delay encoding is performed so that encoding can be performed without reordering by dividing the slice into inter slices including all remaining slices.
[0152]
In the present invention, all frame images are all P pictures as low delay coding. For example, within the frame size of 45 macroblocks in the horizontal direction and 24 macroblocks in the vertical direction, 2 macroblocks in the vertical direction and 45 macros in the horizontal direction from the top of the frame image Even when the block area is set as one intra slice part and all others are set as inter slice parts, the intra slice part is set as one vertical macro block and 45 horizontal macro block areas. The present invention can also be applied to the case of forming a region having a size of.
[0153]
Further, in the above-described embodiment, the case where the present invention is applied to the
[0154]
In the above-described embodiment, each conversion device or LongGOP encoding device that converts stream data has been described as having a decoding unit and an encoding unit. The present invention can be applied even when the units are configured as independent devices as a decoding device and an encoding device, respectively.
[0155]
That is, in the above-described embodiment, each conversion device and LongGOP encoding device has been described as converting stream data. However, for example, as shown in FIG. The
[0156]
For example, when the
[0157]
Furthermore, when the baseband signal completely decoded by the
[0158]
Furthermore, the present invention can also be applied to a
[0159]
The series of processes described above can be executed by hardware, but can also be executed by software. In this case, for example, the SDTI CP-ASI converter 151 and the
[0160]
In FIG. 16, a CPU (Central Processing Unit) 311 performs various processes according to a program stored in a ROM (Read Only Memory) 312 or a program loaded from a
[0161]
The
[0162]
The input /
[0163]
A
[0164]
When a series of processing is executed by software, a program constituting the software executes various functions by installing a computer incorporated in dedicated hardware or various programs. For example, a general-purpose personal computer is installed from a network or a recording medium.
[0165]
As shown in FIG. 16, the recording medium is distributed to supply a program to the user separately from the main body of the apparatus, and includes a magnetic disk 331 (including a floppy disk) on which the program is stored, an optical disk 332 ( Package media including CD-ROM (compact disk-read only memory), DVD (including digital versatile disk), magneto-optical disk 333 (including MD (mini-disk) (trademark)), or
[0166]
In the present specification, the step of describing the program stored in the recording medium is not limited to the processing performed in chronological order in the order in which they are included, but is not necessarily processed in chronological order, either in parallel or individually. The process to be executed is also included.
[0167]
In the present specification, the system represents the entire apparatus constituted by a plurality of apparatuses.
[0168]
【The invention's effect】
Thus, according to the present invention, image data can be encoded. In particular, when quantization values used in past encoding cannot be reused, quantization can be performed using a quantization matrix in which high frequency components are configured with values less than 255. It is possible to prevent deterioration in image quality.
[0169]
According to another aspect of the present invention, image data can be encoded, and information used in past encoding can be reused, but past quantization can be performed when a quantized value cannot be reused. Quantization can be performed using a quantization matrix that is configured with a smaller value than the quantization matrix used when the information used in can not be reused, so that degradation of image quality is prevented. Can do.
[0170]
In addition, according to another aspect of the present invention, image data can be converted, and in the encoding process in the conversion process, when the quantized value used in the past encoding cannot be reused, the high frequency component is Since quantization can be executed using a quantization matrix configured with a value of less than 255, it is possible to prevent deterioration in image quality.
[0171]
Furthermore, according to another aspect of the present invention, image data can be converted, and information used in past encoding is reused in encoding processing in conversion processing, but quantization values cannot be reused. In this case, it is possible to perform quantization using a quantization matrix configured with a smaller value than the quantization matrix used when information used in past encoding cannot be reused. Deterioration can be prevented.
Furthermore, according to another aspect of the present invention, re-encoding can be performed. In particular, it is determined whether a quantized value in the past encoding process is reusable, and is determined not to be reusable. In such a case, since the re-encoding is performed using the intra quantization matrix having a smaller AC component value, it is possible to prevent the deterioration of the image quality.
[Brief description of the drawings]
FIG. 1 is a diagram for explaining a conventional system in which re-encoding is performed when frame editing is performed.
FIG. 2 is a diagram for explaining a conventional system capable of re-encoding by changing the bit rate of MPEG Long GOP.
FIG. 3 is a diagram for describing a case where encoding history information is used in a conventional system in which re-encoding is performed when frame editing is performed.
FIG. 4 is a diagram for explaining a case where encoding history information is used in a conventional system that can re-encode by changing the bit rate of MPEG Long GOP.
FIG. 5 is a block diagram showing a system configuration in which re-encoding is performed when frame editing is applied to which the present invention is applied.
6 is a block diagram showing a configuration of an encoding unit in FIG. 5. FIG.
FIG. 7 is a diagram for explaining an intra quantization matrix that is a default in MPEG2.
FIG. 8 is a diagram for explaining an intra quantization matrix used in the present invention.
FIG. 9 is a block diagram showing the configuration of a system that can re-encode by changing the bit rate of MPEG Long GOP to which the present invention is applied;
10 is a block diagram showing a configuration of an encoding unit in FIG. 9. FIG.
FIG. 11 is a flowchart for explaining quantization
FIG. 12 is a diagram for explaining a non-intra quantization matrix that is a default in MPEG2.
FIG. 13 is a diagram for explaining a non-intra quantization matrix used in the present invention.
FIG. 14 is a flowchart for explaining quantization
FIG. 15 is a diagram for explaining a configuration of a different apparatus to which the present invention is applicable.
FIG. 16 is a block diagram illustrating a configuration of a personal computer.
[Explanation of symbols]
DESCRIPTION OF
Claims (15)
前記画像データに対する過去の符号化において利用された符号化パラメータを受け取る受け取り手段と、
前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しないで前記画像データを符号化する場合に利用する、符号化規格で定められている量子化マトリクスに比べて、高域のAC成分の値を小さくした量子化マトリクスを記憶する記憶手段と、
前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用するか否かを判定する判定手段と、
前記判定手段の判定結果に基づいて、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用する場合には、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化マトリクスを再利用して前記画像データを符号化するとともに、
前記判定手段の判定結果に基づいて、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しない場合には、前記記憶手段に記憶された量子化マトリクスを利用して前記画像データを符号化する符号化手段と
を備える画像処理装置。In an image processing apparatus that encodes image data,
Receiving means for receiving encoding parameters used in past encoding of the image data;
Compared with the quantization matrix defined in the encoding standard, which is used when the image data is encoded without reusing the quantization value included in the encoding parameter received by the receiving means. Storage means for storing a quantization matrix having a reduced AC component value;
Determining means for determining whether or not to reuse the quantization value included in the encoding parameter received by the receiving means;
In the case where the quantization value included in the encoding parameter received by the receiving unit is reused based on the determination result of the determining unit, the quantization matrix included in the encoding parameter received by the receiving unit Is used to encode the image data,
When the quantization value included in the encoding parameter received by the receiving unit is not reused based on the determination result of the determining unit, the image is obtained using the quantization matrix stored in the storage unit. An image processing apparatus comprising: an encoding unit that encodes data.
請求項1に記載の画像処理装置。In the case of encoding the image data without reusing the encoding parameter received by the receiving unit, the encoding unit uses the quantization matrix that is set as a default in the encoding standard. The image processing device according to claim 1, wherein the data is encoded.
請求項1に記載の画像処理装置。The image processing apparatus according to claim 1, wherein the quantization matrix is an intra quantization matrix or a non-intra quantization matrix.
請求項1に記載の画像処理装置。The image processing apparatus according to claim 1, wherein the quantization matrix stored in the storage unit has a high-frequency AC component value limited to twice or less of a DC component.
請求項1に記載の画像処理装置。The image processing apparatus according to claim 1, wherein the quantization matrix stored in the storage unit has a high-frequency AC component value and a low-frequency AC component value that are the same or substantially the same.
請求項1に記載の画像処理装置。The image processing apparatus according to claim 1, wherein the encoding unit encodes the image data according to an MPEG standard.
請求項1に記載の画像処理装置。The determination means is included in the encoding parameter received by the receiving means when the bit rate for encoding the image data is smaller than the bit rate indicated in the encoding parameter received by the receiving means. The image processing apparatus according to claim 1, wherein it is determined that the quantized value to be reused is not reused.
請求項1に記載の画像処理装置。The determination unit does not reuse the quantization value included in the encoding parameter received by the receiving unit when the image data encoded as the I picture in the past encoding is encoded as the I picture. The image processing apparatus according to claim 1.
受け取り手段が、前記画像データに対する過去の符号化において利用された符号化パラメータを受け取り、
記憶手段が、前記受け取られた符号化パラメータに含まれる量子化値を再利用しないで前記画像データを符号化する場合に利用する、符号化規格で定められている量子化マトリクスに比べて、高域のAC成分の値を小さくした量子化マトリクスを記憶し、
判定手段が、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用するか否かを判定し、
符号化手段が、
前記判定手段の判定結果に基づいて、前記受け取られた符号化パラメータに含まれる量子化値を再利用する場合には、前記受け取られた符号化パラメータに含まれる量子化マトリクスを再利用して前記画像データを符号化するとともに、
前記判定手段の判定結果に基づいて、前記受け取られた符号化パラメータに含まれる量子化値を再利用しない場合には、前記記憶された量子化マトリクスを利用して前記画像データを符号化するステップ
を含む画像処理方法。In an image processing method of an image processing apparatus for encoding image data,
Receiving means receives encoding parameters used in past encoding for the image data;
Compared to a quantization matrix defined in a coding standard, which is used when the storage means codes the image data without reusing the quantization value included in the received coding parameter. Stores a quantization matrix with a small AC component value,
Determining means determines whether or not to reuse the quantized value included in the encoding parameter received by the receiving means;
The encoding means is
When the quantization value included in the received encoding parameter is reused based on the determination result of the determination means, the quantization matrix included in the received encoding parameter is reused to recycle the quantization value included in the received encoding parameter. While encoding image data,
If the quantization value included in the received encoding parameter is not reused based on the determination result of the determination means, the step of encoding the image data using the stored quantization matrix An image processing method including:
画像データを符号化する画像処理装置において、
前記画像データに対する過去の符号化において利用された符号化パラメータを受け取る受け取り手段と、
前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しないで前記画像データを符号化する場合に利用する、符号化規格で定められている量子化マトリクスに比べて、高域のAC成分の値を小さくした量子化マトリクスを記憶する記憶手段と、
前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用するか否かを判定する判定手段と、
前記判定手段の判定結果に基づいて、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用する場合には、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化マトリクスを再利用して前記画像データを符号化するとともに、
前記判定手段の判定結果に基づいて、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しない場合には、前記記憶手段に記憶された量子化マトリクスを利用して前記画像データを符号化する符号化手段と
を備える画像処理装置として機能させるプログラム。Computer
In an image processing apparatus that encodes image data,
Receiving means for receiving encoding parameters used in past encoding of the image data;
Compared with the quantization matrix defined in the encoding standard, which is used when the image data is encoded without reusing the quantization value included in the encoding parameter received by the receiving means. Storage means for storing a quantization matrix having a reduced AC component value;
Determining means for determining whether or not to reuse the quantization value included in the encoding parameter received by the receiving means;
In the case where the quantization value included in the encoding parameter received by the receiving unit is reused based on the determination result of the determining unit, the quantization matrix included in the encoding parameter received by the receiving unit Is used to encode the image data,
If the quantization value included in the encoding parameter received by the receiving unit is not reused based on the determination result of the determining unit, the image is obtained using the quantization matrix stored in the storage unit. A program that causes an image processing apparatus to function as an image processing apparatus.
前記符号化ストリームに対する過去の符号化において利用された符号化パラメータを受け取る受け取り手段と、
前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しないで前記符号化ストリームを再符号化する場合に利用する、符号化規格で定められている量子化マトリクスに比べて、高域のAC成分の値を小さくした量子化マトリクスを記憶する記憶手段と、
前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用するか否かを判定する判定手段と、
前記判定手段の判定結果に基づいて、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用する場合には、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化マトリクスを再利用して前記符号化ストリームを再符号化するとともに、
前記判定手段の判定結果に基づいて、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しない場合には、前記記憶手段に記憶された量子化マトリクスを利用して前記符号化ストリームを再符号化する再符号化手段と
を備える画像処理装置。In an image processing apparatus that re-encodes an encoded stream,
Receiving means for receiving encoding parameters utilized in past encoding for the encoded stream;
Compared to a quantization matrix defined in an encoding standard, which is used when re-encoding the encoded stream without reusing the quantization value included in the encoding parameter received by the receiving means, Storage means for storing a quantization matrix in which the value of the high frequency AC component is reduced;
Determining means for determining whether or not to reuse the quantization value included in the encoding parameter received by the receiving means;
In the case where the quantization value included in the encoding parameter received by the receiving unit is reused based on the determination result of the determining unit, the quantization matrix included in the encoding parameter received by the receiving unit To re-encode the encoded stream,
When the quantization value included in the encoding parameter received by the receiving unit is not reused based on the determination result of the determining unit, the code is obtained using the quantization matrix stored in the storage unit. An image processing apparatus comprising: a re-encoding unit that re-encodes the encoded stream.
受け取り手段が、前記符号化ストリームに対する過去の符号化において利用された符号化パラメータを受け取り、
記憶手段が、前記受け取られた符号化パラメータに含まれる量子化値を再利用しないで前記符号化ストリームを再符号化する場合に利用する、符号化規格で定められている量子化マトリクスに比べて、高域のAC成分の値を小さくした量子化マトリクスを記憶し、
判定手段が、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用するか否かを判定し、
再符号化手段が、
前記判定手段の判定結果に基づいて、前記受け取られた符号化パラメータに含まれる量子化値を再利用する場合には、前記受け取られた符号化パラメータに含まれる量子化マトリクスを再利用して前記符号化ストリームを再符号化するとともに、
前記判定手段の判定結果に基づいて、前記受け取られた符号化パラメータに含まれる量子化値を再利用しない場合には、前記記憶された量子化マトリクスを利用して前記符号化ストリームを再符号化するステップ
を含む画像処理方法。In an image processing method of an image processing apparatus for re-encoding an encoded stream,
Receiving means receives encoding parameters used in past encoding for the encoded stream;
Compared with a quantization matrix defined in an encoding standard, which is used when the storage means re-encodes the encoded stream without reusing the quantization value included in the received encoding parameter. , Memorize the quantization matrix that reduced the value of the high frequency AC component,
Determining means determines whether or not to reuse the quantized value included in the encoding parameter received by the receiving means;
The re-encoding means is
When the quantization value included in the received encoding parameter is reused based on the determination result of the determination means, the quantization matrix included in the received encoding parameter is reused to recycle the quantization value included in the received encoding parameter. Re-encode the encoded stream,
Based on the determination result of the determination unit, if the quantization value included in the received encoding parameter is not reused, the encoded stream is re-encoded using the stored quantization matrix. An image processing method including the step of:
符号化ストリームを再符号化するする画像処理装置において、
前記符号化ストリームに対する過去の符号化において利用された符号化パラメータを受け取る受け取り手段と、
前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しないで前記符号化ストリームを再符号化する場合に利用する、符号化規格で定められている量子化マトリクスに比べて、高域のAC成分の値を小さくした量子化マトリクスを記憶する記憶手段と、
前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用するか否かを判定する判定手段と、
前記判定手段の判定結果に基づいて、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用する場合には、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化マトリクスを再利用して前記符号化ストリームを再符号化するとともに、
前記判定手段の判定結果に基づいて、前記受け取り手段により受け取られた符号化パラメータに含まれる量子化値を再利用しない場合には、前記記憶手段に記憶された量子化マトリクスを利用して前記符号化ストリームを再符号化する再符号化手段とを備える画像処理装置として機能させる
プログラム。Computer
In an image processing apparatus that re-encodes an encoded stream,
Receiving means for receiving encoding parameters utilized in past encoding for the encoded stream;
Compared to a quantization matrix defined in an encoding standard, which is used when re-encoding the encoded stream without reusing the quantization value included in the encoding parameter received by the receiving means, Storage means for storing a quantization matrix in which the value of the high frequency AC component is reduced;
Determining means for determining whether or not to reuse the quantization value included in the encoding parameter received by the receiving means;
In the case where the quantization value included in the encoding parameter received by the receiving unit is reused based on the determination result of the determining unit, the quantization matrix included in the encoding parameter received by the receiving unit To re-encode the encoded stream,
When the quantization value included in the encoding parameter received by the receiving unit is not reused based on the determination result of the determining unit, the code is obtained using the quantization matrix stored in the storage unit. A program that functions as an image processing apparatus comprising re-encoding means for re-encoding an encoded stream.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003135349A JP4539028B2 (en) | 2003-05-14 | 2003-05-14 | Image processing apparatus, image processing method, recording medium, and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003135349A JP4539028B2 (en) | 2003-05-14 | 2003-05-14 | Image processing apparatus, image processing method, recording medium, and program |
Publications (3)
| Publication Number | Publication Date |
|---|---|
| JP2004343279A JP2004343279A (en) | 2004-12-02 |
| JP2004343279A5 JP2004343279A5 (en) | 2006-06-15 |
| JP4539028B2 true JP4539028B2 (en) | 2010-09-08 |
Family
ID=33525634
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2003135349A Expired - Fee Related JP4539028B2 (en) | 2003-05-14 | 2003-05-14 | Image processing apparatus, image processing method, recording medium, and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4539028B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006238375A (en) * | 2005-02-28 | 2006-09-07 | Sony Corp | Encoding apparatus and method, decoding apparatus and method, image processing system and method, recording medium, and program |
| WO2020164630A1 (en) * | 2019-02-17 | 2020-08-20 | Beijing Bytedance Network Technology Co., Ltd. | Signaling of intra block copy merge candidates |
Family Cites Families (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3244399B2 (en) * | 1994-03-25 | 2002-01-07 | 三洋電機株式会社 | Circuit and method for converting information amount of compressed moving image code signal |
| JPH09294263A (en) * | 1996-04-24 | 1997-11-11 | Victor Co Of Japan Ltd | Image information compressor |
| JPH11346365A (en) * | 1998-04-03 | 1999-12-14 | Matsushita Electric Ind Co Ltd | Code compression method and code compression apparatus |
| JP3818819B2 (en) * | 1999-02-23 | 2006-09-06 | 松下電器産業株式会社 | Image coding method conversion apparatus, image coding method conversion method, and recording medium |
| JP4110345B2 (en) * | 1999-05-18 | 2008-07-02 | ソニー株式会社 | Image compression apparatus and method, and program storage medium |
| JP4292659B2 (en) * | 1999-11-18 | 2009-07-08 | ソニー株式会社 | Image information conversion apparatus and image information conversion method |
| JP3403167B2 (en) * | 1999-12-15 | 2003-05-06 | 三洋電機株式会社 | Image processing method, image processing apparatus capable of using the method, and television receiver |
| JP3374128B2 (en) * | 1999-12-15 | 2003-02-04 | 三洋電機株式会社 | Image processing method, image processing apparatus capable of using the method, and television receiver |
| JP2002354484A (en) * | 2001-05-29 | 2002-12-06 | Victor Co Of Japan Ltd | Rate transforming method for encoded image and rate transforming apparatus for encoded image |
-
2003
- 2003-05-14 JP JP2003135349A patent/JP4539028B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2004343279A (en) | 2004-12-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7301999B2 (en) | Quantization method and system for video MPEG applications and computer program product therefor | |
| JP4196726B2 (en) | Image processing apparatus, image processing method, recording medium, and program | |
| JP2010530673A (en) | Buffer-based rate control that utilizes frame complexity, buffer level, and intra-frame location in video encoding | |
| US20060104350A1 (en) | Multimedia encoder | |
| JPH07312756A (en) | Circuit, device and method for conversion of information quantity of compressed animation image code signal | |
| JP4224778B2 (en) | STREAM CONVERTING APPARATUS AND METHOD, ENCODING APPARATUS AND METHOD, RECORDING MEDIUM, AND PROGRAM | |
| JPH09322176A (en) | Encoding mode selecting method, moving image encoding device, encoding method, recording method and transmitting method | |
| JP2005072742A (en) | Encoding apparatus and encoding method | |
| EP1833256B1 (en) | Selection of encoded data, setting of encoded data, creation of recoded data, and recoding method and device | |
| JP4120934B2 (en) | Image processing apparatus, image processing method, recording medium, and program | |
| JP4826533B2 (en) | Image processing apparatus, image processing method, program, and recording medium | |
| JP3818819B2 (en) | Image coding method conversion apparatus, image coding method conversion method, and recording medium | |
| JPH10174098A (en) | Video data compression apparatus and method | |
| JP4539028B2 (en) | Image processing apparatus, image processing method, recording medium, and program | |
| JP3963296B2 (en) | Video transmission rate conversion device | |
| JP2006295449A (en) | Rate conversion method and rate conversion apparatus | |
| JP3800965B2 (en) | Data rate converter | |
| JPH10108197A (en) | Image encoding device, image encoding control method, and medium recording image encoding control program | |
| KR20030083109A (en) | apparatus for transcoding bit rate | |
| JP3652889B2 (en) | Video encoding method, video encoding device, recording medium, and video communication system | |
| JP3934772B2 (en) | Variable transfer rate encoding method and apparatus | |
| JP3922581B2 (en) | Variable transfer rate encoding method and apparatus | |
| JP3770466B2 (en) | Image coding rate conversion apparatus and image coding rate conversion method | |
| JP2002218470A (en) | Method for converting image encoded data rate and device for converting image encoding rate | |
| JP4000581B2 (en) | Image coding apparatus and method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060428 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060428 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20080527 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080529 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080728 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20090728 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20091028 |
|
| A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20091112 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100323 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100514 |
|
| 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: 20100601 |
|
| 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: 20100614 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130702 Year of fee payment: 3 |
|
| LAPS | Cancellation because of no payment of annual fees |