JP2004242056A - Encoding apparatus and method, recording medium, and program - Google Patents
Encoding apparatus and method, recording medium, and program Download PDFInfo
- Publication number
- JP2004242056A JP2004242056A JP2003029149A JP2003029149A JP2004242056A JP 2004242056 A JP2004242056 A JP 2004242056A JP 2003029149 A JP2003029149 A JP 2003029149A JP 2003029149 A JP2003029149 A JP 2003029149A JP 2004242056 A JP2004242056 A JP 2004242056A
- Authority
- JP
- Japan
- Prior art keywords
- data
- value
- rounding
- encoding
- threshold
- 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.)
- Pending
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は符号化装置および方法、記録媒体、並びにプログラムに関し、特に、より効果的な符号化処理を行うことができるようにした符号化装置および方法、記録媒体、並びにプログラムに関する。
【0002】
【従来の技術】
従来、動画像データ等の画像信号を伝送したり、記録したりする場合、その画像信号は、所定の圧縮符号化方式により圧縮され、データ量が低減される。
【0003】
映像データおよび音声データを圧縮して情報量を減らす方法としては、種々の圧縮符号化方法が提案されており、その代表的なものにMPEG2(Moving PictureExperts Group Phase 2)や、MPEG4(Moving Picture Experts Group Phase 4)等がある。
【0004】
MPEG方式において、画像信号は、各フレームが、Iピクチャ、Pピクチャ、またはBピクチャに割り当てられ、フレーム内符号化や、動き補償を用いたフレーム間符号化が行われる。
【0005】
このとき、データ送信側であるエンコーダは、デコーダにおいてオーバーフロー、およびアンダーフローが生じないようにするため、符号化データの発生符号量を制御(レートコントロール)する必要がある。しかしながら、画面の更新に必要なIピクチャの発生符号量が多いので、Iピクチャの画像データの伝送時間が多く必要となるため、この時間が遅延となってしまう。
【0006】
テレビ電話やテレビ会議等の画像データなど、リアルタイム性を要求される実時間伝送を行う場合、このような、伝送時間に起因する遅延や、リオーダリングディレイが発生してしまうと、送信側から送られてきた符号化データを受信側で受信して再生画像を表示するまでに時間差が生じてしまう。これに対して、このような遅延を少なくするために、遅延時間を150[ms]以下に短縮するローディレイコーディング(Low Delay Coding)という方法が存在する(例えば、特許文献1参照)。
【0007】
ローディレイコーディングにおいては、リオーダリングディレイの原因となるBピクチャ、および、発生符号量の多いIピクチャを使用せずに、フレーム内符号化を行うブロックのみで構成される数スライス、並びに、フレーム内符号化を行うブロックおよびフレーム間符号化を行うブロックが混在する、残り全てのスライスにより構成されるPピクチャを用いることにより、リオーダリングなしに符号化することができるようになされている。
【0008】
この方法において、フレーム内符号化を行うブロックのみで構成される数スライスは、その対応する画像領域内の位置が、連続する前後のフレームにおいて、その数スライス分ずれるように配置されており、連続する数フレーム分の、それらが対応する領域を合わせると、画像領域全体になるように配置されている。
【0009】
エンコーダは、フレーム内符号化を行うブロックについては、他のフレームを参照せずに、そのまま伝送データとして符号化し、フレーム間符号化を行うブロックについては、そのフレームの前に存在する、フレーム画像の同じ領域の、フレーム内符号化行うブロックを参照画像とし、フレーム間符号化を行う。以下において、この符号化方式をイントラスライス方式と称する。
【0010】
このようにイントラスライス方式により符号化を行うことにより、各フレームで発生する符号量を均一化することができ、デコード制御を容易にし、遅延やリオーダリングディレイによる不具合を解消することができ、再生画像を遅延なく表示することができる。
【0011】
ところで、以上のような、MPEG方式で画像データを符号化するエンコーダは、画像データを符号化する際に、画像データをDCT(Discrete Cosine Transform :離散コサイン変換)処理することによって得られたDCT係数に対して量子化処理を行い、人間の目には見えにくい高周波成分の画像データを削除することにより、効率的な符号化を図る。
【0012】
その量子化の際に、エンコーダは、量子化されたDCT係数に対して、有効桁以下の値を切り捨てたり、または切り上げたりする丸め処理(以下、量子化丸めと称する)を行い、有効桁内の値を抽出する。通常、フレーム間符号化において量子化されたDCT係数は、量子化丸め処理により、有効桁以下の値が切り捨てられ、フレーム内符号化において量子化されたDCT係数は、量子化丸め処理により、有効桁以下の値が四捨五入される。
【0013】
例えば、フレーム内符号化における量子化されたDCT係数に対して、整数値を有効桁とし、小数点以下4ビットに対して量子化丸め処理を行う場合、量子化丸め処理は、図1に示されるフローチャートのように実行される。
【0014】
最初に、エンコーダは、ステップS1において、量子化演算されたDCT係数の有効桁以下の値、すなわち、小数点以下4ビットの値が、8以上(16進数で0x8以上)であるか否かを判定し、8以上であると判定した場合、ステップS2に処理を進め、有効桁以下の値(小数点以下4ビットの値)を切り上げ、量子化丸め処理を終了する。
【0015】
また、ステップS1において、量子化演算されたDCT係数の有効桁以下の値(小数点以下4ビットの値)が、8以上(16進数で0x8以上)でないと判定した場合、エンコーダは、処理をステップS3に進め、有効桁以下の値(小数点以下4ビットの値)を切り捨て、量子化丸め処理を終了する。
【0016】
【特許文献1】
特開平11−205803号公報(第3−6ページ、図10、図11)
【0017】
【発明が解決しようとする課題】
しかしながら、以上のような量子化丸め方法を用いた場合、エンコーダは、フレーム内符号化を行うブロックの画像データに対して、フレーム間符号化を行うブロックの画像データの場合と比較して、より詳細に高周波成分を符号化することができるが、それと同時に、量子化誤差によるモスキートノイズ等を多く発生させてしまう。
【0018】
これにより、デコーダにより復号された画像データの画像において、フレーム内符号化を行うブロックに対応する領域と、フレーム間符号化を行うブロックに対応する領域とで、視覚的画質が変化してしまい、ユーザには、フレーム内符号化を行うブロックに対応する領域の画像が、フレーム間符号化を行うブロックに対応する領域の中で浮き立った不自然な画像に見えてしまうという課題があった。
【0019】
本発明はこのような状況に鑑みてなされたものであり、より効果的な符号化処理を行うことができるようにしたものである。
【0020】
【課題を解決するための手段】
本発明の符号化装置は、フレーム画像に対応する、量子化演算された第1のデータに、第1のデータの高周波成分における量子化誤差が低減されるように予め定められた値を第1の閾値として、第1のデータの有効桁以下の値が第1の閾値以上である場合第1のデータの有効桁以下の値を切り上げ、第1のデータの有効桁以下の値が第1の閾値より小さい場合第1のデータの有効桁以下の値を切り捨てる丸め処理を行う演算手段を備えることを特徴とする。
【0021】
前記演算手段は、フレーム画像に対応する、第1のデータと異なる、量子化演算された第2のデータに、第2のデータの有効桁以下の値の大きさに関わらず、第2のデータの有効桁以下の値を切り捨てる切り捨て処理をさらに行い、第1の閾値は、第1のデータに対応する第1の復号画像と、第2のデータに対応する第2の復号画像とにおいて、視聴者による視覚的変化が生じない程度まで、第1のデータの高周波成分における量子化誤差が低減されるように予め定められるようにすることができる。
【0022】
前記演算手段の演算を制御する制御手段をさらに備え、演算手段は、第1のデータの高周波成分における量子化誤差が低減されるように定められた値を第1の閾値として、第1のデータに丸め処理を行う第1の丸め処理、または、第1のデータが取り得る値の範囲の中央値を第1の閾値として、第1のデータに丸め処理を行う第2の丸め処理のいずれかを実行し、制御手段は、演算手段の演算を制御し、第1の丸め処理、または第2の丸め処理のいずれか一方を選択して、演算手段に実行させるようにすることができる。
【0023】
前記制御手段は、ユーザの指示に基づいて設定される符号化の符号化方式、または、ユーザの指示、若しくは、符号化された第1のデータが伝送されるネットワークの状態に基づいて設定される符号化のビットレートの内、少なくともいずれか1つに基づいて、第1の丸め処理、または第2の丸め処理のいずれか一方を選択するようにすることができる。
【0024】
前記制御手段は、符号化方式が、1つのフレームにフレーム内符号化されるデータおよびフレーム間符号化されるデータが含まれるように符号化するイントラスライス方式である場合、第1の丸め処理を選択し、それ以外の場合、第2の丸め処理を選択するようにすることができる。
【0025】
前記制御手段は、ビットレートが、予め定められた第2の閾値より小さい場合、第1の丸め処理を選択し、それ以外の場合、第2の丸め処理を選択するようにすることができる。
【0026】
本発明の符号化方法は、フレーム画像に対応する、量子化演算されたデータに、データの高周波成分における量子化誤差が低減されるように予め定められた値を閾値として、データの有効桁以下の値が閾値以上である場合データの有効桁以下の値を切り上げ、データの有効桁以下の値が閾値より小さい場合データの有効桁以下の値を切り捨てる丸め処理を行う演算ステップを含むことを特徴とする。
【0027】
本発明の記録媒体のプログラムは、フレーム画像に対応する、量子化演算されたデータに、データの高周波成分における量子化誤差が低減されるように予め定められた値を閾値として、データの有効桁以下の値が閾値以上である場合データの有効桁以下の値を切り上げ、データの有効桁以下の値が閾値より小さい場合データの有効桁以下の値を切り捨てる丸め処理を行う演算ステップを含むことを特徴とする。
【0028】
本発明のプログラムは、フレーム画像に対応する、量子化演算されたデータに、データの高周波成分における量子化誤差が低減されるように予め定められた値を閾値として、データの有効桁以下の値が閾値以上である場合データの有効桁以下の値を切り上げ、データの有効桁以下の値が閾値より小さい場合データの有効桁以下の値を切り捨てる丸め処理を行う演算ステップをコンピュータに実現させることを特徴とする。
【0029】
本発明の符号化装置および方法、記録媒体、並びにプログラムにおいては、フレーム画像に対応する、量子化演算されたデータに、データの高周波成分における量子化誤差が低減されるように予め定められた値が閾値とされ、データの有効桁以下の値が閾値以上である場合データの有効桁以下の値が切り上げられ、データの有効桁以下の値が閾値より小さい場合データの有効桁以下の値が切り捨てられる丸め処理が行われる。
【0030】
【発明の実施の形態】
図2は、本発明を適用したエンコーダの構成例を表すブロック図である。
【0031】
エンコーダ1は、全てPピクチャを用いたイントラスライス方式によって、画像データを符号化するようになされている。エンコーダ1の前処理部11は、外部から供給される画像データの入力を受ける。
【0032】
前処理部11は、順次入力される画像データの各フレーム画像(この場合全てPピクチャ)を、16画素×16ラインの輝度信号、および輝度信号に対応する色差信号によって構成されるマクロブロックに分割し、これをマクロブロックデータとして、演算部12、および動き検出部21に供給する。
【0033】
動き検出部21は、マクロブロックデータの入力を受け、各マクロブロックの動きベクトルを算出し、動きベクトルデータとして、動き補償部25に送出する。
【0034】
演算部12は、前処理部11から供給されたマクロブロックデータについて、各マクロブロックの画像タイプに基づいて、フレーム内符号化を行うブロックに対してはイントラモードで、フレーム間符号化を行うブロックに対しては順方向予測モードで、動き補償を行う。
【0035】
ここでイントラモードとは、符号化対象となるフレーム画像をそのまま伝送データとする方法であり、順方向予測モードとは、符号化対象となるフレーム画像と過去参照画像との予測残差を伝送データとする方法である。エンコーダ1においては、Pピクチャのみを使用して、フレーム内符号化を行うブロックとフレーム間符号化を行うブロックに分けて符号化するようになされている。
【0036】
まず、マクロブロックデータが、フレーム内符号化を行うブロックにより構成される場合、マクロブロックデータはイントラモードで処理される。すなわち、演算部12は、入力されたマクロブロックデータのマクロブロックを、そのまま演算データとして直交変換部13に送出する。直交変換部13は、入力された演算データに対しDCT変換処理を行うことによりDCT係数化し、これをDCT係数データとして、量子化部14に供給する。
【0037】
量子化部14は、レート制御部17より供給される量子化インデックスを用いて、入力されたDCT係数データに対して量子化処理を行う。その際、量子化部14は、演算後のデータを丸め処理部30に供給し、量子化丸め処理を行わせる。
【0038】
丸め処理部30は、丸め処理部30を制御する制御部31および丸めの演算を行う丸め演算部32を有している。制御部31は、イントラモードの場合、後述するように、量子化部14より入力されたデータに、データの有効桁以下の値で丸めの演算を実行させるように丸め演算部32を制御する。
【0039】
丸め演算部32は、制御部31に制御され、入力されたデータに対して、そのデータの有効桁以下の値が予め定められた所定の閾値以上である場合は、そのデータの有効桁以下の値を切り上げ、そのデータの有効桁以下の値が予め定められた所定の閾値より小さい場合は、そのデータの有効桁以下の値を切り捨てる丸めの演算を行う。この時、丸め演算部32は、通常の四捨五入演算(すなわち、対象となるデータがとる値の範囲の中央値を閾値とし、その閾値より小さい場合切捨て、閾値以上の場合切り上げる演算)による丸め処理ではなく、高周波成分の量子化誤差がインターモードの場合と同等になるように調整された、予め定められた値を閾値とした、上述したような演算の丸め処理を行う。丸め演算部32における演算結果は、量子化部14に供給される。
【0040】
そして、量子化部14は、量子化丸めを行ったデータを量子化DCT係数データとしてVLC(Variable Length Code;可変長符号化)部15および逆量子化部22に供給する。
【0041】
逆量子化部22に供給された量子化DCT係数データは、量子化部14と同じ量子化ステップサイズによる逆量子化処理を受け、DCT係数データとして、逆直交変換部23に供給される。逆直交変換部23は、供給されたDCT係数データに逆DCT処理を施し、生成された演算データは、演算部24を介して、参照画像データとして動き補償部25に供給される。
【0042】
そして、マクロブロックデータがフレーム間符号化を行うブロックにより構成される場合、演算部12はマクロブロックデータについて、順方向予測モードによる動き補償処理を行う。
【0043】
動き補償部25は、供給された参照画像データを、動きベクトルデータに応じて動き補償し、順方向予測画像データを算出する。演算部12は、マクロブロックデータについて、動き補償部25より供給される順方向予測画像データを用いて減算処理を実行する。
【0044】
すなわち、動き補償部25は、順方向予測モードにおいて、動きベクトルデータに応じて参照画像データを選択し、これを順方向予測画像データとして演算部12および演算部24に供給する。演算部12は、供給されたマクロブロックデータから、順方向予測画像データを減算して、予測残差としての差分データを得る。そして、演算部12は、差分データを直交変換部13に供給する。
【0045】
また、演算部24には、動き補償部25より順方向予測画像データが供給されており、演算部24は、逆直交変換部23から供給された演算データに、順方向予測画像データを加算することにより、参照画像データを局部再生し、動き補償部25に供給する。
【0046】
演算部12より出力された差分データは、イントラモードの場合と同様に、直交変換部13においてDCT変換処理を行われ、DCT係数が量子化部14に供給される。量子化処理部14は、供給されたDCT係数を量子化する際に、イントラモードの場合と同様に、演算後のデータを丸め処理部30に供給し、量子化丸め処理を行わせる。
【0047】
丸め処理部30の制御部31は、順方向予測モードの場合、後述するように、量子化部14より入力されたデータの有効桁以下の値を、その値の大きさに関わらず、切り捨てる演算を実行させるように丸め演算部32を制御する。丸め演算部32は、制御部31に制御され、入力されたデータの有効桁以下の値を、その値の大きさに関わらず、切り捨てる演算を行う。丸め演算部32における演算結果は、量子化部14に供給される。
【0048】
かくして、エンコーダ1に入力された画像データは、動き補償予測処理、DCT処理および量子化処理を受け、量子化DCT係数データとして、VLC部15に供給される。VLC部15は、量子化DCT係数データに対し、所定の変換テーブルに基づく可変長符号化処理を行い、その結果得られる可変長符号化データを蓄積バッファ16に供給する。
【0049】
レート制御部17は、例えば、符号化難易度、蓄積バッファ16の蓄積状態、または、その他のパラメータに基づいて、量子化インデックスを生成し、量子化部14に対して出力する。量子化インデックスの算出方法は、いずれの方法が用いられていても良く、量子化インデックスの算出に利用するパラメータも、その方法により、様々なパラメータが利用される。
【0050】
蓄積バッファ16は、供給された可変長符号化データを一旦蓄積した後、ビットストリーム出力としてエンコーダ1の外部に出力する。
【0051】
以上のように、丸め処理部30の丸め演算部32は、イントラモードの場合、すなわち、フレーム内符号化を行うブロックの場合、供給されたデータ(量子化部14において量子化演算されたDCT係数)の有効桁以下の値に対して、量子化丸め処理を行う。なお、以下においては、量子化演算されたDCT係数の整数値を有効桁とし、小数点以下4ビットの値を有効桁以下の値とする場合について説明する。
【0052】
図3のフローチャートを参照して、丸め演算部32による量子化丸め処理を説明する。
【0053】
有効桁以下の値を所定の値を閾値として丸めの演算を実行するように、制御部31に制御された丸め演算部32は、最初に、ステップS21において、供給されたデータ(量子化演算されたDCT係数)の値の有効桁以下の値、すなわち、小数点以下4ビットの値が、10以上(16進数で0xa以上)であるか否かを判定し、10以上であると判定した場合、ステップS22に処理を進め、有効桁以下の値(小数点以下4ビットの値)を切り上げ、量子化丸め処理を終了する。
【0054】
また、ステップS21において、量子化演算されたDCT係数の有効桁以下の値(小数点以下4ビットの値)が、10以上(16進数で0xa以上)でないと判定した場合、丸め演算部32は、処理をステップS23に進め、有効桁以下の値(小数点以下4ビットの値)を切り捨て、量子化丸め処理を終了する。
【0055】
図4は、丸め演算部32による量子化丸め処理の様子を示す図である。
【0056】
図4において、入力データ40は、図2の量子化部14より丸め処理部30に供給される量子化演算されたDCT係数であり、図中左側のビットほど上位ビットとなる。すなわち、ビット41および42が有効桁内の下位2ビットであり、ビット43乃至46が有効桁以下の4ビット(小数点以下4ビット)である。図4に示されるように、入力データ40の有効桁内の最下位ビットであるビット42の値は「0」であり、入力データ40の小数点以下4ビット(ビット43乃至46)の値は「10」(2進数で「1010」、16進数で「0xa」)である。
【0057】
このような入力データ40に対して、丸め演算部32は、有効桁以下の値が「10」乃至「15」の場合切り上げ、有効桁以下の値が「0」乃至「9」の場合切り捨てる演算処理50を実行し、出力データ60を出力する。この場合、入力データ40の有効桁以下の値が「10」であるので、演算処理50により、入力データ40の有効桁以下の4ビットの値は切り上げられ、有効桁のみで構成される出力データ60の最下位ビット62の値は「1」となる。
【0058】
また、入力データ70は、入力データ40と同様に、図2の量子化部14より丸め処理部30に供給される量子化演算されたDCT係数であり、図中左側のビットほど上位ビットとなる。すなわち、ビット71および72が有効桁内の下位2ビットであり、ビット73乃至76が有効桁以下の4ビット(小数点以下4ビット)である。図4に示されるように、入力データ70の有効桁内の最下位ビットであるビット72の値は「0」であり、入力データ70の小数点以下4ビット(ビット73乃至76)の値は「9」(2進数で「1001」、16進数で「0x9」)である。
【0059】
このような入力データ70に対して、丸め演算部32は、演算処理50を実行し、出力データ80を出力する。この場合、入力データ70の有効桁以下の値が「9」であるので、演算処理50により、入力データ70の有効桁以下の4ビットの値は切り捨てられ、有効桁のみで構成される出力データ80の最下位ビット82の値は「0」のままとなる。
【0060】
以上のように、フレーム内符号化を行うブロックの量子化丸めにおいて、丸めの演算の閾値を、通常の中央値より大きい値に設定することにより、エンコーダ1は、フレーム内符号化を行うブロックの高周波成分における量子化誤差の量を調整し、フレーム間符号化を行うブロックの高周波成分における量子化誤差の量と同程度にすることができる。
【0061】
これにより、エンコーダ1は、デコーダにより復号された画像において、フレーム内符号化を行うブロックに対応する画像と、フレーム間符号化を行うブロックに対応する画像との間で生じる視覚的変化を低減させ、より自然な復号画像が得られるような、より効果的な符号化処理を実行することができる。
【0062】
なお、以上においては、丸め演算部32による丸めの演算の閾値を「10」としたが、これに限らず、上述したように、フレーム内符号化を行うブロックの高周波成分の量子化誤差がフレーム間符号化を行うブロックの場合と同等になるように調整された、予め定められた値であれば、どのような値であってもよい。
【0063】
また、以上においては、量子化演算されたDCT係数の整数を有効桁とし、小数点以下4ビットの値を、有効桁以下の値として、丸め処理を行うように説明したが、これに限らず、どのような桁を有効桁としてもよいし、有効桁以下の値が何ビットであってもよい。
【0064】
さらに、丸め演算部32が、互いに閾値が異なる複数の丸めの演算処理を実行できるようにし、制御部31の制御によって、実行する丸めの演算を選択することができるようにしてもよい。
【0065】
図5は、本発明を適用したエンコーダの他の構成例を示す図である。
【0066】
図5において、エンコーダ100は、Iピクチャ、Pピクチャ、およびBピクチャを用いた通常の符号化方式や、ローディレイコーディング等において用いられるイントラスライス符号化方式等、複数の符号化方式に対応しており、符号化制御部142により決定された符号化方式により入力された画像データを符号化する。
【0067】
エンコーダ100の前処理部111、演算部112、直交変換部113、量子化部114、VLC部115、蓄積バッファ116、レート制御部117、動き検出部121、逆量子化部122、逆直交変換部123、演算部124、および動き補償部125は、イントラスライス方式の場合、それぞれ、図2に示されるエンコーダ1の前処理部11、演算部12、直交変換部13、量子化部14、VLC部15、蓄積バッファ16、レート制御部17、動き検出部21、逆量子化部22、逆直交変換部23、演算部24、および動き補償部25と基本的に同様の処理を行うのでその説明は省略する。
【0068】
なお、通常の符号化方式の場合においても、エンコーダ100の各部は、Iピクチャに対してフレーム内符号化を行い、Pピクチャに対して、フレーム間順方向予測符号化を行い、Bピクチャに対して、フレーム間双方向予測符号化を行う以外は、上述したイントラスライス方式の場合と同様の処理を行うので、その説明は省略する。
【0069】
エンコーダ100の丸め処理部130は、丸め処理部130内の各部を制御する制御部131、符号化制御部142より供給された設定情報を記憶する記憶部132、互いに異なる閾値で丸めの演算を行う第1丸め演算部133および第2丸め演算部134を有している。
【0070】
制御部131は、後述するように、設定処理を行い、符号化制御部142より供給された情報に基づいて、記憶部132に記憶されている設定情報を更新したり、量子化丸め制御処理を実行し、第1丸め演算部133または第2丸め演算部134のいずれを用いて量子化丸め処理を実行するかを決定する。
【0071】
記憶部132は、DRAM(Dynamic Random Access Memory)やEEPROM(Electronically Erasable and Programmable Read Only Memory)等の記憶素子により構成され、符号化制御部142より供給される符号化方式に関する情報や、符号化データ送信時のビットレートに関する情報等に基づいて設定される設定情報を記憶する。
【0072】
第1丸め演算部133は、図2の丸め演算部32と同様に、量子化演算されたDCT係数が、例えばIピクチャのブロック等のように、フレーム内符号化を行うブロックのデータである場合、有効桁以下の小数点以下4ビットに対して、値「10」を閾値とする丸めの演算処理を実行し、例えばPピクチャやBピクチャのブロック等のように、フレーム間符号化を行うブロックのデータである場合、有効桁以下の小数点以下4ビットを切り捨てる処理を行う。
【0073】
第2丸め演算部134は、量子化演算されたDCT係数がフレーム内符号化を行うブロックのデータである場合、有効桁以下の小数点以下4ビットに対して、図1に示されるような、値「8」(中央値)を閾値とする、従来の四捨五入演算処理を実行し、フレーム間符号化を行うブロックのデータである場合、有効桁以下の小数点以下4ビットを切り捨てる処理を行う。
【0074】
第1丸め演算部133または第2丸め演算部134における演算結果は、量子化部14に供給される。
【0075】
符号化制御部142は、入力部141を介して入力されたユーザの指示に基づいて、符号化方式を決定し、その符号化方式で符号化が行われるように、エンコーダ100の各部を制御する。
【0076】
また、符号化制御部142は、入力部141を介して入力されたユーザの指示や、符号化データであるビットストリーム出力を他の装置に出力する通信部143より供給される、ビットストリーム出力の伝送路であるネットワークの状況に関する情報等に基づいて、ビットレートを決定し、そのビットレートにおいて符号化が行われるように、エンコーダ100の各部を制御する。
【0077】
そして、符号化制御部142は、その符号化方式に関する情報や、ビットレートに関する情報を丸め処理部130に供給する。
【0078】
以上のような情報を供給された丸め処理部130の制御部131は、設定処理を行い、記憶部132に記憶されている量子化丸め処理に関する設定情報の更新を行う。
【0079】
図6のフローチャートを参照して、制御部131による設定処理について説明する。
【0080】
最初に制御部131は、ステップS41において、符号化制御部142より符号化方式に関する情報を取得したか否かを判定し、取得したと判定した場合、ステップS42において、取得した符号化方式に関する情報を記憶部132に供給し、記憶部132に記憶されている量子化丸め処理に関する設定情報に含まれる、符号化方式情報を更新する。ステップS42の処理を終了した制御部131は、処理をステップS43に進める。
【0081】
また、ステップS41において、符号化制御部142より符号化方式に関する情報を取得していないと判定した場合、制御部131は、ステップS42の処理を省略し、ステップS43に処理を進める。
【0082】
ステップS43において、制御部131は、符号化制御部142よりビットレートに関する情報を取得したか否かを判定し、取得したと判定した場合、ステップS44において、取得したビットレートに関する情報を記憶部132に供給し、記憶部132に記憶されている量子化丸め処理に関する設定情報に含まれる、ビットレート情報を更新する。ステップS44の処理を終了した制御部131は、処理をステップS45に進める。
【0083】
また、ステップS43において、符号化制御部142よりビットレートに関する情報を取得していないと判定した場合、制御部131は、ステップS44の処理を省略し、ステップS45に処理を進める。
【0084】
ステップS45において、制御部131は、設定処理を終了するか否かを判定し、終了しないと判定した場合、ステップS41に処理を戻し、それ以降の処理を繰り返す。ステップS45において、ユーザの指示等に基づいて、設定処理を終了すると判定した場合、制御部131は、ステップS46に処理を進め、終了処理を実行した後、設定処理を終了する。
【0085】
量子化部14より、フレーム内符号化を行うブロックの量子化演算されたDCT係数が供給されると、制御部131は、以上のようにして、設定し、記憶部132に記憶されている設定情報に基づいて、量子化丸め制御処理を実行し、第1丸め演算部133または第2丸め演算部134を制御し、量子化丸め処理を実行させる。
【0086】
図7のフローチャートを参照して、設定情報の符号化方式情報に基づいて、量子化丸め処理に用いる演算部を決定する場合の、制御部131による量子化丸め制御処理について説明する。
【0087】
最初に、ステップS61において、制御部131は、記憶部132を制御し、記憶部132に記憶されている設定情報の符号化方式情報を読み出す。
【0088】
そして、ステップS62において、制御部131は、その読み出した符号化方式情報に基づいて、符号化方式がイントラスライス方式であるか否かを判定し、イントラスライス方式であると判定した場合、ステップS63に処理を進め、第1丸め演算部133を制御し、値「10」を閾値とする第1の量子化丸め処理を実行させる。
【0089】
制御部131に制御されて第1丸め演算部133により実行される第1の量子化丸め処理は、図3のフローチャートを参照して説明した量子化丸め処理と基本的に同様の処理であるので、その説明を省略する。
【0090】
ステップS63の処理を終了した制御部131は、量子化丸め制御処理を終了する。
【0091】
また、ステップS62において、符号化方式がイントラスライス方式でないと判定した場合、制御部131は、処理をステップS64に進め、第2丸め演算部134を制御し、値「8」を閾値とする第2の量子化丸め処理を実行させる。
【0092】
制御部131に制御されて第2丸め演算部134により実行される第2の量子化丸め処理は、図1のフローチャートを参照して説明した量子化丸め処理と基本的に同様の処理であるので、その説明を省略する。
【0093】
ステップS64の処理を終了した制御部131は、量子化丸め制御処理を終了する。
【0094】
以上のように、丸め処理部130の制御部131が量子化丸め制御処理を行うことにより、エンコーダ100は、通常の符号化方式の場合、Iピクチャは、フレーム内符号化を行うブロックのみで構成されるので、フレーム内符号化を行うブロックの高周波成分をより詳細に符号化することができるように、値「8」を閾値とする丸めの演算を行い、イントラスライス方式の場合、同じピクチャにフレーム内符号化を行うブロックとフレーム間符号化を行うブロックが混在するので、フレーム内符号化を行うブロックの高周波成分の量子化誤差を、フレーム間符号化を行うブロックの高周波成分の量子化誤差に合わせるように符号化するために、値「10」を閾値とする丸めの演算を行う。
【0095】
これにより、エンコーダ100は、複数の符号化方式において、フレーム内符号化を行うブロックの高周波成分の量子化誤差を最適な値に調整することができ、より効果的な符号化処理を行うことができる。
【0096】
また、以上において、制御部131は、符号化方式情報に基づいて、量子化丸め処理を制御するように説明したが、これに限らず、符号化制御部142により決定される符号化のビットレートに基づいて、量子化丸め処理を制御するようにしてもよい。
【0097】
図8のフローチャートを参照して、設定情報のビットレート情報に基づいて、量子化丸め処理に用いる演算部を決定する場合の、制御部131による量子化丸め制御処理について説明する。
【0098】
最初に、ステップS81において、制御部131は、記憶部132を制御し、記憶部132に記憶されている設定情報のビットレート情報を読み出す。
【0099】
そして、ステップS82において、制御部131は、その読み出したビットレート情報に基づいて、符号化制御部142により設定されたビットレートが、予め定められた所定の閾値Aより小さいか否かを判定し、閾値Aより小さいと判定した場合、ステップS83に処理を進め、図7のステップS63の場合と同様に、第1丸め演算部133を制御し、値「10」を閾値とする第1の量子化丸め処理を実行させる。ステップS83の処理を終了した制御部131は、量子化丸め制御処理を終了する。
【0100】
また、ステップS82において、符号化制御部142により設定されたビットレートが、予め定められた所定の閾値Aより小さくないと判定した場合、制御部131は、処理をステップS84に進め、図7のステップS64の場合と同様に、第2丸め演算部134を制御し、値「8」を閾値とする第2の量子化丸め処理を実行させる。ステップS84の処理を終了した制御部131は、量子化丸め制御処理を終了する。
【0101】
以上のように、丸め処理部130の制御部131が量子化丸め制御処理を行うことにより、エンコーダ100は、ビットレートが閾値Aより大きく、転送可能なデータ量に余裕がある場合、フレーム内符号化を行うブロックの高周波成分をより詳細に符号化することができるように、値「8」を閾値とする丸めの演算を行い、ビットレートが閾値Aより小さく、転送可能なデータ量に余裕がない場合、フレーム内符号化を行うブロックの高周波成分の量子化誤差を、フレーム間符号化を行うブロックの高周波成分の量子化誤差に合わせ、符号化データ量を減らすように符号化するために、値「10」を閾値とする丸めの演算を行う。
【0102】
すなわち、この場合、エンコーダ100は、符号化方式が、Iピクチャ、Pピクチャ、およびBピクチャを用いる通常の符号化方式であっても、転送可能なデータ量に余裕があるときは、丸め処理部130において、上述したように、値「8」を閾値とする丸めの演算を行う。
【0103】
これにより、エンコーダ100は、ビットレートに合わせて、フレーム内符号化を行うブロックの高周波成分の量子化誤差を最適な値に調整することができ、より効果的な符号化処理を行うことができる。
【0104】
なお、以上において、制御部131は、設定情報の符号化方式情報、または、ビットレート情報に基づいて、フレーム内符号化を行うブロックの量子化丸め処理における丸めの演算の閾値を決定するように説明したが、設定情報の符号化方式情報およびビットレート情報の両方に基づいて、フレーム内符号化を行うブロックの量子化丸め処理における丸めの演算の閾値を決定するようにしてもよい。
【0105】
その場合、制御部131は、図7のフローチャートを参照して説明した量子化丸め制御処理、および図8のフローチャートを参照して説明した量子化丸め制御処理を組み合わせて、フレーム内符号化を行うブロックの量子化丸め処理における丸めの演算の閾値を決定する。
【0106】
例えば、制御部は、図7のステップS61および図8のステップS81の処理を実行し、記憶部132に記憶されている設定情報の符号化方式情報およびビットレート情報を取得し、図7のステップS62の処理を実行し、符号化方式がイントラスライス方式であると判定した場合、図8のステップS82の処理を実行し、ビットレートが閾値Aより小さいと判定したときは、図7のステップS63(図8のステップS83)の処理を実行し、第1丸め演算部133を制御し、値「10」を閾値とする第1の量子化丸め処理を実行させる。
【0107】
また、図7のステップS62の処理を実行し、符号化方式がイントラスライス方式でないと判定した場合、または、図8のステップS82の処理を実行し、ビットレートが閾値Aより小さくないと判定した場合、制御部131は、図7のステップS64(図8のステップS84)の処理を実行し、第2丸め演算部134を制御し、値「8」を閾値とする第2の量子化丸め処理を実行させる。
【0108】
なお、制御部131が、図7のステップS62の処理を実行し、符号化方式がイントラスライス方式でないと判定した場合に、図8のステップS82の処理を実行するようにしてももちろんよい。
【0109】
その場合、制御部131は、図7のステップS62の処理において、符号化方式がイントラスライス方式であると判定した場合、または、図8のステップS82の処理において、ビットレートが閾値Aより小さいと判定した場合に、図7のステップS63(図8のステップS83)の処理を実行し、第1丸め演算部133を制御し、値「10」を閾値とする第1の量子化丸め処理を実行させる。
【0110】
そして、図7のステップS62の処理において、符号化方式がイントラスライス方式でないと判定し、かつ、図8のステップS82の処理において、ビットレートが閾値Aより小さくないと判定した場合に、図7のステップS64(図8のステップS84)の処理を実行し、第2丸め演算部134を制御し、値「8」を閾値とする第2の量子化丸め処理を実行させる。
【0111】
また、以上のほかに、図8のステップS82の判定処理、すなわち、ビットレート情報に基づいた判定処理を、図7のステップS62の、符号化方式情報に基づいた判定処理に優先させるようにしてももちろんよい。
【0112】
その場合、制御部131は、図7のステップS61および図8のステップS81の処理を実行し、記憶部132に記憶されている設定情報の符号化方式情報およびビットレート情報を取得し、図8のステップS82の処理を実行し、ビットレートが閾値Aより小さいと判定した場合、図7のステップS62の処理を実行するようにしてもよいし、ビットレートが閾値Aより小さくないと判定した場合、図7のステップS62の処理を実行するようにしてもよい。
【0113】
すなわち、制御部131は、図8のステップS82の処理において、ビットレートが閾値Aより小さいと判定し、さらに、図7のステップS62の処理において、符号化方式がイントラスライス方式であると判定した場合のみ、図7のステップS63(図8のステップS83)の処理を実行し、それ以外の場合、図7のステップS64(図8のステップS84)の処理を実行するようにしてもよいし、図8のステップS82の処理において、ビットレートが閾値Aより小さいと判定した場合、または、図7のステップS62の処理において、符号化方式がイントラスライス方式であると判定した場合に、図7のステップS63(図8のステップS83)の処理を実行し、それ以外の場合、図7のステップS64(図8のステップS84)の処理を実行するようにしてもよい。
【0114】
また、制御部131が、以上において説明した、符号化方式およびビットレート以外の情報に基づいて、フレーム内符号化を行うブロックの量子化丸め処理における丸めの演算の閾値を決定するようにしても、もちろんよいし、決定する閾値の値も上述した2種類でなく、それ以外の値でもよいし、さらに、3つ以上の値の閾値の中から選択するようにしてもよい。
【0115】
上述した一連の処理は、ハードウェアにより実行させることもできるし、上述したようにソフトウェアにより実行させることもできる。一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが専用のハードウェアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば汎用のパーソナルコンピュータなどに、記録媒体等からインストールされる。
【0116】
図9は、このような処理を実行するパーソナルコンピュータの内部構成例を示す図である。
【0117】
パーソナルコンピュータ200のCPU(Central Processing Unit)201は、ROM(Read Only Memory)202に記憶されているプログラムに従って各種の処理を実行する。RAM(Random Access Memory)203には、CPU201が各種の処理を実行する上において必要なデータやプログラムなどが適宜記憶される。
【0118】
CPU201、ROM202、およびRAM203は、バス204を介して相互に接続されている。このバス204にはまた、入出力インタフェース210も接続されている。
【0119】
入出力インタフェース210は、キーボードやマウスから構成される入力部211が接続され、入力部211に入力された信号をCPU201に出力する。また、入出力インタフェース210には、ディスプレイやスピーカなどから構成される出力部212も接続されている。
【0120】
さらに、入出力インタフェース210には、ハードディスクなどから構成される記憶部213、および、インターネットなどのネットワークを介して他の装置とデータの通信を行う通信部214も接続されている。ドライブ215は、磁気ディスク、光ディスク、光磁気ディスク、または半導体メモリなどの記録媒体からなるリムーバブルメディア221よりデータを読み出したり、データを書き込んだりするときに用いられる。
【0121】
記録媒体は、図9に示されるように、パーソナルコンピュータとは別に、ユーザにプログラムを提供するために配布される、プログラムが記録されている磁気ディスク(フレキシブルディスクを含む)、光ディスク(CD−ROM(Compact Disc−Read Only Memory),DVD(Digital Versatile Disc)を含む)、光磁気ディスク(MD(Mini−Disc)(登録商標)を含む)、若しくは半導体メモリなどよりなるパッケージメディアを含むリムーバブルメディア221により構成されるだけでなく、コンピュータに予め組み込まれた状態でユーザに提供される、プログラムが記憶されているROM202や記憶部213が含まれるハードディスクなどで構成される。
【0122】
なお、本明細書において、媒体により提供されるプログラムを記述するステップは、記載された順序に従って、時系列的に行われる処理は勿論、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。
【0123】
【発明の効果】
以上のように、本発明によれば、画像情報を符号化することができる。特に、より効果的な符号化処理を行うことができる。
【図面の簡単な説明】
【図1】従来の量子化丸め処理について説明するフローチャートである。
【図2】本発明を適用したエンコーダの構成例を示すブロック図である。
【図3】図2の丸め演算部32による量子化丸め処理の例について説明するフローチャートである。
【図4】図2の丸め演算部32による量子化丸め処理の様子を説明する図である。
【図5】本発明を適用したエンコーダの他の構成例を示すブロック図である。
【図6】図5の制御部による設定処理の例について説明するフローチャートである。
【図7】図5の制御部による量子化丸め制御処理の例について説明するフローチャートである。
【図8】図5の制御部による量子化丸め制御処理の他の例について説明するフローチャートである。
【図9】パーソナルコンピュータの構成例を示すブロック図である。
【符号の説明】
1 エンコーダ, 30 丸め処理部, 31 制御部, 32 丸め演算部, 40 入力データ, 41乃至46 ビット, 50 処理, 60 出力データ, 61および62 ビット, 70 入力データ, 71乃至76 ビット, 80 出力データ, 81および82 ビット, 130 丸め処理部, 131 制御部, 132 記憶部, 133 第1丸め演算部, 134第2丸め演算部, 141 入力部, 142 符号化制御部, 143 通信部[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an encoding device and method, a recording medium, and a program, and more particularly to an encoding device and method, a recording medium, and a program capable of performing more effective encoding processing.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, when an image signal such as moving image data is transmitted or recorded, the image signal is compressed by a predetermined compression encoding method to reduce the data amount.
[0003]
As a method of compressing video data and audio data to reduce the amount of information, various compression encoding methods have been proposed. Representative methods include MPEG2 (Moving Picture Experts Group Phase 2) and MPEG4 (Moving Picture Experts). Group Phase 4) and the like.
[0004]
In the MPEG system, each frame of an image signal is assigned to an I picture, a P picture, or a B picture, and intra-frame coding or inter-frame coding using motion compensation is performed.
[0005]
At this time, the encoder on the data transmission side needs to control the generated code amount of the encoded data (rate control) in order to prevent overflow and underflow from occurring in the decoder. However, since the generated code amount of the I picture necessary for updating the screen is large, a long transmission time of the image data of the I picture is required, and this time is delayed.
[0006]
When performing real-time transmission that requires real-time properties, such as image data for videophone calls and video conferences, if a delay due to the transmission time or a reordering delay occurs, the There is a time difference between receiving the encoded data received on the receiving side and displaying the reproduced image. On the other hand, in order to reduce such a delay, there is a method called low delay coding (Low Delay Coding) for reducing the delay time to 150 [ms] or less (for example, see Patent Document 1).
[0007]
In low-delay coding, B slices that cause reordering delay and I-pictures with a large amount of generated code are not used, and several slices composed of only blocks to be subjected to intra-frame coding, and intra-frame coding are used. By using a P picture composed of all remaining slices in which blocks to be encoded and blocks to be subjected to inter-frame encoding coexist, encoding can be performed without reordering.
[0008]
In this method, several slices composed only of blocks to be subjected to intra-frame encoding are arranged such that the position in the corresponding image area is shifted by the number of slices in the preceding and succeeding frames. These frames are arranged so that, when the corresponding regions of several frames are combined, the entire image region is obtained.
[0009]
The encoder encodes the block for performing intra-frame encoding as it is as transmission data without referring to another frame, and for the block for performing inter-frame encoding, a frame image existing before the frame. Inter-frame coding is performed by using a block in the same area for performing intra-frame coding as a reference image. Hereinafter, this encoding method is referred to as an intra slice method.
[0010]
By performing encoding using the intra-slice method in this way, the amount of code generated in each frame can be made uniform, decoding control can be facilitated, and problems due to delay and reordering delay can be eliminated. Images can be displayed without delay.
[0011]
By the way, the encoder that encodes image data in the MPEG system as described above, when encoding image data, obtains a DCT coefficient obtained by performing DCT (Discrete Cosine Transform) processing on the image data. , And performs efficient encoding by deleting image data of high-frequency components that are hardly visible to human eyes.
[0012]
At the time of the quantization, the encoder performs a rounding process (hereinafter, referred to as quantization rounding) on the quantized DCT coefficient so as to round down or round up a value below the significant digit, and to perform conversion within the significant digit. Extract the value of Normally, DCT coefficients quantized in inter-frame coding are truncated to values less than significant digits by quantization rounding, and DCT coefficients quantized in intra-frame coding are converted to valid digits by quantization rounding. Any value below the decimal place is rounded.
[0013]
For example, when an integer value is used as an effective digit for quantized DCT coefficients in intra-frame encoding and quantization rounding is performed on 4 bits after the decimal point, the quantization rounding is illustrated in FIG. It is executed as shown in the flowchart.
[0014]
First, in step S1, the encoder determines whether or not the value of the quantized DCT coefficient that is less than the significant digit, that is, the value of 4 bits after the decimal point, is 8 or more (0x8 or more in hexadecimal). If it is determined that the value is 8 or more, the process proceeds to step S2, rounds up the value below the significant digit (four bits after the decimal point), and ends the quantization rounding process.
[0015]
If it is determined in step S1 that the value of the quantized DCT coefficient below the significant digit (four bits after the decimal point) is not 8 or more (0x8 or more in hexadecimal), the encoder performs the processing in step S1. Proceeding to S3, the value below the significant digit (four bits after the decimal point) is discarded, and the quantization and rounding process ends.
[0016]
[Patent Document 1]
JP-A-11-205803 (pages 3-6, FIGS. 10 and 11)
[0017]
[Problems to be solved by the invention]
However, when using the quantization and rounding method as described above, the encoder is more effective in comparing the image data of the block for performing the intra-frame encoding with the image data of the block for performing the inter-frame encoding. Although high-frequency components can be encoded in detail, at the same time, a lot of mosquito noise and the like due to quantization errors are generated.
[0018]
As a result, in the image of the image data decoded by the decoder, the visual image quality changes between the region corresponding to the block performing the intra-frame encoding and the region corresponding to the block performing the inter-frame encoding, The user has a problem that an image in an area corresponding to a block for performing intra-frame encoding appears as an unnatural image floating in an area corresponding to a block for performing inter-frame encoding.
[0019]
The present invention has been made in view of such a situation, and is intended to perform more effective encoding processing.
[0020]
[Means for Solving the Problems]
The encoding apparatus according to the present invention is configured to add a predetermined value to the quantized first data corresponding to the frame image so that a quantization error in a high-frequency component of the first data is reduced. When the value less than the significant digit of the first data is greater than or equal to the first threshold, the value less than the significant digit of the first data is rounded up, and the value less than the significant digit of the first data is the first value. An arithmetic unit for performing a rounding process for rounding down a value of the first data below the significant digit when the value is smaller than the threshold value is provided.
[0021]
The calculating means may add, to the quantized second data different from the first data corresponding to the frame image, the second data irrespective of the magnitude of the value of the second data which is smaller than the effective digit. Further, a truncation process of truncating a value less than or equal to the effective digit of the first data is performed, and the first threshold value is set between the first decoded image corresponding to the first data and the second decoded image corresponding to the second data. The quantization error in the high-frequency component of the first data can be set to be predetermined so that the visual change by the user does not occur.
[0022]
The control device further includes control means for controlling the calculation of the calculation means, wherein the calculation means sets a value determined so as to reduce a quantization error in a high-frequency component of the first data as a first threshold value, Either a first rounding process that performs rounding on the first data, or a second rounding process that performs rounding on the first data using a median of a range of values that the first data can take as a first threshold value And the control means controls the calculation of the calculation means, selects either the first rounding processing or the second rounding processing, and causes the calculation means to execute the processing.
[0023]
The control means is set based on a coding scheme of coding set based on a user's instruction, or a user's command, or a state of a network through which the coded first data is transmitted. Either the first rounding process or the second rounding process can be selected based on at least one of the encoding bit rates.
[0024]
The control means performs the first rounding process when the encoding method is an intra-slice method in which encoding is performed so that one frame includes data to be intra-coded and data to be inter-coded. Selection, otherwise a second rounding operation may be selected.
[0025]
The control means may select the first rounding process when the bit rate is smaller than a second predetermined threshold value, and may select the second rounding process otherwise.
[0026]
The encoding method according to the present invention provides a quantized data corresponding to a frame image, in which a predetermined value is set as a threshold so that a quantization error in a high frequency component of the data is reduced. If the value of the data is greater than or equal to the threshold value, a rounding process is performed to round up the value less than the significant digit of the data and to round down the value less than the significant digit of the data if the value less than the significant digit of the data is smaller than the threshold And
[0027]
The program of the recording medium according to the present invention uses a predetermined value such that a quantization error in a high-frequency component of the data is reduced as a threshold value in the quantized data corresponding to the frame image. If the following value is greater than or equal to the threshold value, round up the value less than the significant digit of the data, and if the value less than the significant digit of the data is smaller than the threshold value, round off the value less than the significant digit of the data. Features.
[0028]
The program according to the present invention provides a quantized data corresponding to a frame image, wherein a predetermined value such that a quantization error in a high-frequency component of the data is reduced is set as a threshold, and a value less than or equal to an effective digit of the data is set. If the value is greater than or equal to the threshold value, round up the value less than the significant digit of the data, and if the value less than the significant digit of the data is smaller than the threshold value, round down the value less than the significant digit of the data. Features.
[0029]
In the encoding device and method, the recording medium, and the program according to the present invention, a predetermined value such that a quantization error in a high-frequency component of data is reduced in quantized data corresponding to a frame image. Is set as the threshold, and if the value of the data below the significant digit is greater than or equal to the threshold, the value of the data below the significant digit is rounded up. Rounding is performed.
[0030]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 2 is a block diagram illustrating a configuration example of an encoder to which the present invention has been applied.
[0031]
The
[0032]
The
[0033]
The
[0034]
The
[0035]
Here, the intra mode is a method in which a frame image to be encoded is directly used as transmission data, and the forward prediction mode is a method in which a prediction residual between the frame image to be encoded and a past reference image is transmitted data. Is a method. The
[0036]
First, when the macroblock data is composed of blocks for performing intra-frame coding, the macroblock data is processed in the intra mode. That is, the
[0037]
The
[0038]
The rounding section 30 has a
[0039]
The rounding
[0040]
Then, the
[0041]
The quantized DCT coefficient data supplied to the inverse quantization unit 22 undergoes an inverse quantization process using the same quantization step size as the
[0042]
When the macroblock data is composed of blocks for performing inter-frame coding, the
[0043]
The
[0044]
That is, in the forward prediction mode, the
[0045]
Further, the forward prediction image data from the
[0046]
The difference data output from the
[0047]
In the case of the forward prediction mode, the
[0048]
Thus, the image data input to the
[0049]
The
[0050]
The
[0051]
As described above, in the case of the intra mode, that is, in the case of a block on which intra-frame encoding is performed, the rounding
[0052]
With reference to the flowchart of FIG. 3, the quantization and rounding processing by the rounding
[0053]
First, in step S21, the rounding
[0054]
In step S21, if it is determined that the value of the quantized DCT coefficient below the significant digit (four bits after the decimal point) is not 10 or more (0xa or more in hexadecimal), the rounding
[0055]
FIG. 4 is a diagram illustrating a state of the quantization rounding process performed by the rounding
[0056]
In FIG. 4,
[0057]
For
[0058]
Further, similarly to the
[0059]
For
[0060]
As described above, in the quantization rounding of a block on which intra-frame encoding is performed, the
[0061]
Thereby, the
[0062]
In the above description, the threshold value of the rounding operation by the rounding
[0063]
Further, in the above description, it has been described that the integer of the quantized DCT coefficient is set as an effective digit and the value of 4 bits after the decimal point is set as the value of the effective digit or less, and the rounding process is performed. Any digit may be used as a significant digit, and the value below the significant digit may be any number of bits.
[0064]
Furthermore, the rounding
[0065]
FIG. 5 is a diagram showing another configuration example of the encoder to which the present invention is applied.
[0066]
In FIG. 5, an encoder 100 supports a plurality of encoding schemes such as a normal encoding scheme using I pictures, P pictures, and B pictures, and an intra slice encoding scheme used in low delay coding and the like. In this case, the input image data is encoded according to the encoding method determined by the
[0067]
[0068]
Note that, even in the case of a normal encoding method, each unit of the encoder 100 performs intra-frame encoding on an I picture, performs inter-frame forward prediction encoding on a P picture, and performs Since the same processing as in the case of the above-described intra slice method is performed except for performing the inter-frame bidirectional prediction encoding, the description thereof is omitted.
[0069]
The rounding
[0070]
The
[0071]
The
[0072]
The first rounding
[0073]
When the quantized DCT coefficient is data of a block to be subjected to intra-frame encoding, the second rounding
[0074]
The operation result in the first rounding
[0075]
The
[0076]
In addition, the
[0077]
Then, the
[0078]
The
[0079]
The setting process by the
[0080]
First, in step S41, the
[0081]
If it is determined in step S41 that the information on the encoding method has not been obtained from the
[0082]
In step S43, the
[0083]
If it is determined in step S43 that the information on the bit rate has not been obtained from the
[0084]
In step S45, the
[0085]
When the quantized DCT coefficient of the block to be subjected to intra-frame encoding is supplied from the
[0086]
With reference to the flowchart of FIG. 7, a description will be given of quantization / rounding control processing performed by the
[0087]
First, in step S61, the
[0088]
Then, in step S62, the
[0089]
The first quantization rounding process controlled by the
[0090]
The
[0091]
If it is determined in step S62 that the encoding method is not the intra slice method, the
[0092]
The second quantization rounding process controlled by the
[0093]
The
[0094]
As described above, the
[0095]
Thereby, the encoder 100 can adjust the quantization error of the high-frequency component of the block for performing the intra-frame encoding to an optimal value in a plurality of encoding schemes, and perform more effective encoding processing. it can.
[0096]
In the above description, the
[0097]
With reference to the flowchart of FIG. 8, a description will be given of quantization / rounding control processing performed by the
[0098]
First, in step S81, the
[0099]
Then, in step S82, the
[0100]
If it is determined in step S82 that the bit rate set by the
[0101]
As described above, the
[0102]
That is, in this case, even if the encoding method is a normal encoding method using an I picture, a P picture, and a B picture, the encoder 100 At 130, as described above, a rounding operation using the value “8” as a threshold is performed.
[0103]
Thereby, the encoder 100 can adjust the quantization error of the high-frequency component of the block on which intra-frame encoding is performed to an optimal value in accordance with the bit rate, and can perform more effective encoding processing. .
[0104]
In the above, the
[0105]
In this case, the
[0106]
For example, the control unit executes the processing of step S61 of FIG. 7 and step S81 of FIG. 8, acquires the encoding method information and the bit rate information of the setting information stored in the
[0107]
Also, the processing of step S62 in FIG. 7 is performed, and it is determined that the encoding scheme is not the intra slice scheme, or the processing of step S82 in FIG. 8 is performed, and it is determined that the bit rate is not smaller than the threshold A. In this case, the
[0108]
Note that the
[0109]
In that case, the
[0110]
When it is determined in step S62 in FIG. 7 that the encoding method is not the intra slice method, and when it is determined in step S82 in FIG. Then, the process of step S64 (step S84 in FIG. 8) is executed, and the second rounding
[0111]
In addition to the above, the determination process in step S82 of FIG. 8, that is, the determination process based on the bit rate information is prioritized over the determination process based on the encoding system information in step S62 in FIG. Of course it is good.
[0112]
In this case, the
[0113]
That is, the
[0114]
Further, the
[0115]
The above-described series of processing can be executed by hardware, or can be executed by software as described above. When a series of processing is executed by software, various functions can be executed by installing a computer in which the programs constituting the software are embedded in dedicated hardware, or by installing various programs For example, it is installed in a general-purpose personal computer from a recording medium or the like.
[0116]
FIG. 9 is a diagram illustrating an example of the internal configuration of a personal computer that executes such processing.
[0117]
A CPU (Central Processing Unit) 201 of the
[0118]
The
[0119]
The input /
[0120]
Further, a
[0121]
As shown in FIG. 9, the recording medium is a magnetic disk (including a flexible disk) on which the program is recorded and an optical disk (CD-ROM) which are distributed to provide the program to the user separately from the personal computer. (Including Compact Disc-Read Only Memory), DVD (Digital Versatile Disc), magneto-optical disc (including MD (Mini-Disc) (registered trademark)), and removable media 221 including package media including semiconductor memory. And a hard disk including a
[0122]
In this specification, the steps of describing a program provided by a medium include, in the order described, not only processing performed in chronological order but also processing in chronological order, or in parallel or individually. This includes the processing to be executed.
[0123]
【The invention's effect】
As described above, according to the present invention, image information can be encoded. In particular, more effective encoding processing can be performed.
[Brief description of the drawings]
FIG. 1 is a flowchart illustrating a conventional quantization rounding process.
FIG. 2 is a block diagram illustrating a configuration example of an encoder to which the present invention has been applied.
FIG. 3 is a flowchart illustrating an example of a quantization rounding process performed by a rounding
FIG. 4 is a diagram illustrating a state of a quantization rounding process performed by a rounding
FIG. 5 is a block diagram illustrating another configuration example of an encoder to which the present invention has been applied.
FIG. 6 is a flowchart illustrating an example of a setting process by a control unit in FIG. 5;
FIG. 7 is a flowchart illustrating an example of quantization and rounding control processing by a control unit in FIG. 5;
FIG. 8 is a flowchart illustrating another example of quantization / rounding control processing performed by the control unit in FIG. 5;
FIG. 9 is a block diagram illustrating a configuration example of a personal computer.
[Explanation of symbols]
1 encoder, 30 rounding section, 31 control section, 32 rounding section, 40 input data, 41 to 46 bits, 50 processing, 60 output data, 61 and 62 bits, 70 input data, 71 to 76 bits, 80 output data , 81 and 82 bits, 130 rounding section, 131 control section, 132 storage section, 133 first rounding section, 134 second rounding section, 141 input section, 142 encoding control section, 143 communication section
Claims (9)
前記フレーム画像に対応する、量子化演算された第1のデータに、前記第1のデータの高周波成分における量子化誤差が低減されるように予め定められた値を第1の閾値として、前記第1のデータの有効桁以下の値が前記第1の閾値以上である場合前記第1のデータの有効桁以下の値を切り上げ、前記第1のデータの有効桁以下の値が前記第1の閾値より小さい場合前記第1のデータの有効桁以下の値を切り捨てる丸め処理を行う演算手段を備える
ことを特徴とする符号化装置。In an encoding device that encodes a frame image,
The first data corresponding to the frame image, which has been subjected to the quantization operation, is set as a first threshold, using a predetermined value such that a quantization error in a high frequency component of the first data is reduced. If the value of the first data is less than or equal to the first threshold, the value of the first data that is less than the significant digit is rounded up, and the value of the first data that is less than the significant digit is the first threshold. An encoding apparatus, comprising: an arithmetic unit that performs a rounding process for rounding down the value of the first data that is less than the significant digit when the value is smaller than the first data.
前記第1の閾値は、前記第1のデータに対応する第1の復号画像と、前記第2のデータに対応する第2の復号画像とにおいて、視聴者による視覚的変化が生じない程度まで、前記第1のデータの高周波成分における量子化誤差が低減されるように予め定められる
ことを特徴とする請求項1に記載の符号化装置。The arithmetic means, the second data subjected to the quantization operation, which is different from the first data and corresponds to the frame image, irrespective of the magnitude of the value less than the significant digit of the second data, Further perform a truncation process of truncating the value of the second data below the significant digit,
The first threshold value is set so that a visual change by a viewer does not occur between a first decoded image corresponding to the first data and a second decoded image corresponding to the second data. 2. The encoding apparatus according to claim 1, wherein a predetermined quantization error in a high-frequency component of the first data is reduced.
前記演算手段は、前記第1のデータの高周波成分における量子化誤差が低減されるように定められた値を前記第1の閾値として、前記第1のデータに前記丸め処理を行う第1の丸め処理、または、前記第1のデータが取り得る値の範囲の中央値を前記第1の閾値として、前記第1のデータに前記丸め処理を行う第2の丸め処理のいずれかを実行し、
前記制御手段は、前記演算手段の演算を制御し、前記第1の丸め処理、または前記第2の丸め処理のいずれか一方を選択して、前記演算手段に実行させる
ことを特徴とする請求項1に記載の符号化装置。Further comprising a control means for controlling the calculation of the calculation means,
A first rounding unit that performs the rounding process on the first data by using a value determined so that a quantization error in a high-frequency component of the first data is reduced as the first threshold value; Performing one of a process and a second rounding process of performing the rounding process on the first data, with the median of a range of values that the first data can take as the first threshold value,
The control unit controls an operation of the operation unit, selects one of the first rounding process and the second rounding process, and causes the operation unit to execute the operation. 2. The encoding device according to 1.
ことを特徴とする請求項3に記載の符号化装置。The control means is configured based on an encoding method of the encoding set based on a user instruction, or an instruction of the user, or a state of a network through which the encoded first data is transmitted. 4. The method according to claim 3, wherein one of the first rounding process and the second rounding process is selected based on at least one of the set bit rates of the encoding. An encoding device according to claim 1.
ことを特徴とする請求項4に記載の符号化装置。The control unit may be configured to perform the first rounding when the encoding method is an intra-slice method that performs encoding so that one frame includes data to be intra-coded and data to be inter-coded. 5. The encoding apparatus according to claim 4, wherein a processing is selected, and otherwise, the second rounding processing is selected.
ことを特徴とする請求項4に記載の符号化装置。The control means selects the first rounding process when the bit rate is smaller than a predetermined second threshold value, and otherwise selects the second rounding process. The encoding device according to claim 4, wherein
前記フレーム画像に対応する、量子化演算されたデータに、前記データの高周波成分における量子化誤差が低減されるように予め定められた値を閾値として、前記データの有効桁以下の値が前記閾値以上である場合前記データの有効桁以下の値を切り上げ、前記データの有効桁以下の値が前記閾値より小さい場合前記データの有効桁以下の値を切り捨てる丸め処理を行う演算ステップを含む
ことを特徴とする符号化方法。A coding method of a coding device for coding a frame image,
Corresponding to the frame image, the quantized data, as a threshold a predetermined value so that the quantization error in the high-frequency component of the data is reduced, the value of the data below the significant digit is the threshold In the case where the value is greater than or equal to, the value including the significant digit of the data is rounded up. Encoding method.
前記フレーム画像に対応する、量子化演算されたデータに、前記データの高周波成分における量子化誤差が低減されるように予め定められた値を閾値として、前記データの有効桁以下の値が前記閾値以上である場合前記データの有効桁以下の値を切り上げ、前記データの有効桁以下の値が前記閾値より小さい場合前記データの有効桁以下の値を切り捨てる丸め処理を行う演算ステップを含む
ことを特徴とするコンピュータが読み取り可能なプログラムが記録されていることを特徴とする記録媒体。A program that causes a computer to perform a process of encoding a frame image,
Corresponding to the frame image, the quantized data, as a threshold a predetermined value so that the quantization error in the high-frequency component of the data is reduced, the value of the data below the significant digit is the threshold In the case where the value is greater than or equal to, the value including the significant digit of the data is rounded up. A recording medium characterized by recording a computer-readable program.
前記フレーム画像に対応する、量子化演算されたデータに、前記データの高周波成分における量子化誤差が低減されるように予め定められた値を閾値として、前記データの有効桁以下の値が前記閾値以上である場合前記データの有効桁以下の値を切り上げ、前記データの有効桁以下の値が前記閾値より小さい場合前記データの有効桁以下の値を切り捨てる丸め処理を行う演算ステップを含む処理をコンピュータに実行させる
ことを特徴とするプログラム。In a program that causes a computer to perform a process of encoding a frame image,
Corresponding to the frame image, the quantized data, as a threshold a predetermined value so that the quantization error in the high-frequency component of the data is reduced, the value of the data below the significant digit is the threshold If the value is greater than or equal to the value, the value of the data is rounded up to the significant digit, and if the value of the data is less than the threshold, the processing including a rounding process of rounding down the value of the data is reduced to a computer. A program characterized by being executed by a user.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003029149A JP2004242056A (en) | 2003-02-06 | 2003-02-06 | Encoding apparatus and method, recording medium, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003029149A JP2004242056A (en) | 2003-02-06 | 2003-02-06 | Encoding apparatus and method, recording medium, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004242056A true JP2004242056A (en) | 2004-08-26 |
Family
ID=32956406
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003029149A Pending JP2004242056A (en) | 2003-02-06 | 2003-02-06 | Encoding apparatus and method, recording medium, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004242056A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10288067B2 (en) | 2012-12-04 | 2019-05-14 | Magna Powertrain Bad Homburg GmbH | Electric motor-driven motor-vehicle vacuum pump, and drive shaft for a motor vehicle vacuum pump |
-
2003
- 2003-02-06 JP JP2003029149A patent/JP2004242056A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10288067B2 (en) | 2012-12-04 | 2019-05-14 | Magna Powertrain Bad Homburg GmbH | Electric motor-driven motor-vehicle vacuum pump, and drive shaft for a motor vehicle vacuum pump |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4633417B2 (en) | Bitstream control post-processing filtering | |
JP6701391B2 (en) | Digital frame encoding/decoding by downsampling/upsampling with improved information | |
JP2618083B2 (en) | Image recovery method and apparatus | |
JP4393875B2 (en) | System and method for providing a single layer video encoded bitstream suitable for reduced complexity decoding | |
US20050129125A1 (en) | Method and apparatus for pitcure compression using variable block of arbitrary size | |
JP2003304538A (en) | Image encoder, image decoder, and method for them | |
US6823015B2 (en) | Macroblock coding using luminance date in analyzing temporal redundancy of picture, biased by chrominance data | |
JP3508916B2 (en) | Moving image variable bit rate encoding method and apparatus | |
JP2003348597A (en) | Device and method for encoding image | |
EP1720356A1 (en) | A frequency selective video compression | |
JP4736619B2 (en) | Image processing apparatus and image processing method | |
JP2008544621A (en) | Encoding and decoding method and apparatus for improving video error concealment | |
JPH07135657A (en) | Method and device for coding | |
JP2004242056A (en) | Encoding apparatus and method, recording medium, and program | |
US7623720B2 (en) | Image processing apparatus and method | |
JP4539028B2 (en) | Image processing apparatus, image processing method, recording medium, and program | |
JP4186544B2 (en) | Encoding apparatus, encoding method, program, and recording medium | |
JP2007300557A (en) | Image encoding device and image encoding method | |
JP2006157084A (en) | Image coding apparatus, image coding method, and computer program | |
JP4058674B2 (en) | Encoding apparatus, encoding method, program, and recording medium | |
JPH10164594A (en) | Compression encoding method for moving image and device therefor | |
KR100627493B1 (en) | Moving picture encoder and method for coding using the same | |
JPH10164578A (en) | Image encoder and encoder | |
JP4390009B2 (en) | Encoding apparatus and method, and image processing system | |
JP2007074559A (en) | Coding apparatus and coding method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050927 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20071218 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080325 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080508 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20081118 |