JP4453398B2 - Encoding apparatus, program, and encoding processing method - Google Patents
Encoding apparatus, program, and encoding processing method Download PDFInfo
- Publication number
- JP4453398B2 JP4453398B2 JP2004056501A JP2004056501A JP4453398B2 JP 4453398 B2 JP4453398 B2 JP 4453398B2 JP 2004056501 A JP2004056501 A JP 2004056501A JP 2004056501 A JP2004056501 A JP 2004056501A JP 4453398 B2 JP4453398 B2 JP 4453398B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- unit
- encoding
- processing
- arithmetic
- 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
本発明は、例えば、画像データや音声データ等のデータを算術符号化等の符号化処理を行う符号化装置、プログラム、および符号化処理方法に関する。 The present invention relates to an encoding device, a program, and an encoding processing method that perform encoding processing such as arithmetic encoding on data such as image data and audio data.
近年、画像データをデジタルとして取り扱い、その際、効率の高い情報の伝送、蓄積を目的とし、画像情報特有の冗長性を利用して、離散コサイン変換等の直交変換と動き補償により圧縮するMPEG(Moving Picture Experts Group)などの方式に準拠した装置が、放送局などの情報配信、及び一般家庭における情報受信の双方において普及しつつある。 In recent years, image data has been handled as digital data. At that time, MPEG (compressed by orthogonal transform such as discrete cosine transform and motion compensation is used for the purpose of efficient transmission and storage of information, and using redundancy unique to image information. A device conforming to a system such as Moving Picture Experts Group) is becoming popular in both information distribution at broadcasting stations and information reception in general households.
このMPEG方式に続いて、さらなる高圧縮率を実現するJVT(Joint Video Team)と呼ばれる符号化方式が提案されている(例えば、非特許文献1参照)。
JVT方式では、構文要素(SE:Syntax Element)の符号化処理として、CAVLC(Context Based Adaptive Variable Length Coding )と、CABAC(Context Adaptive Binary Arithmetic Coding )の2種類の符号化処理を規定している。
CABACは、構文要素(SE:Syntax Element)をコンテクスト(Context)にわけて、それぞれのコンテクストについて算術符号化処理を行う符号化処理である。
In the JVT system, two types of encoding processing, CAVLC (Context Based Adaptive Variable Length Coding) and CABAC (Context Adaptive Binary Arithmetic Coding), are defined as encoding processing of a syntax element (SE).
CABAC is an encoding process in which syntax elements (SE) are divided into contexts, and arithmetic encoding processes are performed on the respective contexts.
上述したCABACによる算術符号化処理において、デコーダの負荷を考慮して、圧縮率を制限するCabacZeroWord という機能が知られている。
詳細には、CABACによる符号化処理の結果、圧縮率が高い符号化データを生成した際に、デコーダがその圧縮率の高い符号化データをデコード処理を行うと、その符号化データを所定時間内に処理しきれない場合がある。
そのため符号化処理の際に、例えば1画像の内の複数のスライス(Slice )それぞれの最後に付加データを付加する。具体的には、例えば付加データは0x000003を1単位としたスタッフィングバイト(StuffingByte)を付加することで、デコーダの負荷を軽減する。付加データは、CabacZeroWordに相当する。
In the arithmetic coding process by CABAC described above, a function called CabacZeroWord for limiting the compression rate in consideration of the load on the decoder is known.
Specifically, when encoded data having a high compression rate is generated as a result of the encoding processing by CABAC, if the decoder performs decoding processing on the encoded data having a high compression rate, the encoded data is stored within a predetermined time. There are cases where it cannot be fully processed.
Therefore, at the time of encoding processing, for example, additional data is added to the end of each of a plurality of slices (Slice) in one image. Specifically, for example, the additional data adds a stuffing byte (Stuffing Byte) with 0x000003 as one unit, thereby reducing the load on the decoder. Additional data corresponds to CabacZeroWord.
しかし、上述した符号化処理において、CabacZeroWord により1スライスの最後に付加するデータのデータ長は、1スライス分のデータの符号化処理が終了するまで不確定であるので、マクロブロック単位で画像データを量子化処理する際の量子化レートを制御できない場合がある。
また、符号化処理の結果、高圧縮率の符号化データが生成され、大量のCabacZeroWord が急激に発生した場合には、バッファがオーバーフローを起こす場合がある。
このため、1スライスよりも短い処理単位で付加データを予測できる符号化装置が望まれている。
However, in the encoding process described above, the data length of the data added to the end of one slice by CabacZeroWord is uncertain until the encoding process for one slice of data is completed. There are cases where the quantization rate at the time of quantization processing cannot be controlled.
As a result of the encoding process, encoded data with a high compression rate is generated, and if a large amount of CabacZeroWord occurs suddenly, the buffer may overflow.
For this reason, an encoding apparatus that can predict additional data in a processing unit shorter than one slice is desired.
本発明は、かかる事情に鑑みてなされたものであり、その目的は、符号化処理において、画像データのうち付加データの所定単位よりも小さい単位で付加データを予測できる符号化装置、プログラム、および符号化処理方法を提供することにある。 The present invention has been made in view of such circumstances, and an object of the present invention is to provide an encoding device, a program, and an encoding method capable of predicting additional data in a unit smaller than a predetermined unit of additional data in image data in encoding processing, and An object of the present invention is to provide an encoding processing method.
また、他の目的は、画像データのうち所定単位で付加データを予測し、予測したデータに基づいて高精度に量子化処理を行うことができる符号化装置、プログラム、および符号化処理方法を提供することにある。 Another object of the present invention is to provide an encoding device, a program, and an encoding processing method capable of predicting additional data in predetermined units of image data and performing quantization processing with high accuracy based on the predicted data. There is to do.
前記目的を達成するために、本発明の第1の観点の符号化装置は、画像データをマクロブロック単位で算術符号化処理を行い符号化データを生成する算術符号化手段と、前記算術符号化手段が生成した符号化データに、前記算術符号化手段の算術符号化処理によって生成された、複数のマクロブロックを含むスライスまたはピクチャ単位での前記画像データの圧縮の度合いを示す指標データに応じた付加データを付加する付加手段と、前記マクロブロック単位で、前記算術符号化手段による算術符号化処理の対象のデータのデータ長、および、前記算術符号化手段が生成した符号化データのデータ長に基づいて、前記付加手段が付加する付加データを予測する予測手段と、前記マクロブロック単位で、前記予測手段が予測した前記付加データに応じた所定処理を行う処理手段とを有する。 In order to achieve the above object, an encoding apparatus according to a first aspect of the present invention includes an arithmetic encoding unit that performs arithmetic encoding processing on image data in units of macroblocks to generate encoded data, and the arithmetic encoding means the generated encoded data, said arithmetic coding means is generated I by the arithmetic coding process, index data indicating the degree of compression of the image data in the slice or picture unit including a plurality of macroblocks adding means for adding additional data corresponding to, in the macro-block unit, the data length of the target data for arithmetic coding by the arithmetic coding means and the coded data said arithmetic coding means to generate based on the data length, and predicting means for predicting the additional data to which the additional means for adding, at the macro-block basis, the additional data the prediction means predicts And a processing means for performing predetermined processing corresponding.
さらに、前記目的を達成するために、本発明の第2の観点の符号化装置は、複数の異なるサイズのマクロブロックを単位として、動き補償の対象となる画像データと、前記動き補償で参照される参照画像データの間の差分に基づいて動きベクトルを生成する動きベクトル生成手段と、前記動き補償の対象となる画像データと、予測画像データとの差分に直交変換処理および量子化処理を順に施す第1の処理手段と、前記第1の処理手段で生成したデータに、逆量子化処理および逆直交変換処理を順に施して参照データを生成する第2の処理手段と、前記動きベクトルおよび前記参照画像データを基に前記予測画像データを生成する第3の処理手段と、設定された量子化の度合いを示すデータに基づいて量子化処理を行い、前記符号化手段の処理対象のデータを生成する量子化手段と、前記量子化手段が生成したデータ、および前記動きベクトルを、前記マクロブロック単位で算術符号化処理を行い符号化データを生成する算術符号化手段と、前記算術符号化手段が生成した符号化データに、前記算術符号化手段の算術符号化処理によって生成された、複数のマクロブロックを含むスライスまたはピクチャ単位での前記画像データの圧縮の度合いを示す指標データに応じた付加データを付加する付加手段と、前記マクロブロック単位で、前記算術符号化手段による算術符号化処理の対象のデータのデータ長、および、前記算術符号化手段が生成した符号化データのデータ長に基づいて、前記付加手段が付加する前記指標データに応じた付加データを予測する予測手段と、前記マクロブロック単位で、前記予測手段が予測した前記付加データに基づいて、前記量子化手段の量子化の度合いを示すデータを設定する量子化データ設定手段とを有する。Furthermore, in order to achieve the above object, the encoding apparatus according to the second aspect of the present invention refers to the image data to be subjected to motion compensation and the motion compensation in units of a plurality of macro blocks having different sizes. Motion vector generating means for generating a motion vector based on the difference between the reference image data, and the difference between the motion compensation target image data and the predicted image data are subjected to orthogonal transform processing and quantization processing in order. A first processing unit; a second processing unit configured to sequentially perform an inverse quantization process and an inverse orthogonal transform process on the data generated by the first processing unit; and generate the reference data; the motion vector and the reference A third processing unit that generates the predicted image data based on the image data, a quantization process based on the set data indicating the degree of quantization, and a process of the encoding unit; Quantization means for generating target data; data generated by the quantization means; and arithmetic coding means for generating encoded data by performing arithmetic coding processing of the motion vector in units of the macroblocks; Index data indicating the degree of compression of the image data in units of slices or pictures including a plurality of macroblocks generated by the arithmetic encoding process of the arithmetic encoding unit in the encoded data generated by the arithmetic encoding unit An additional means for adding additional data in accordance with the data length of the data to be subjected to arithmetic coding processing by the arithmetic coding means, and the encoded data generated by the arithmetic coding means in the macroblock unit. Prediction means for predicting additional data corresponding to the index data added by the adding means based on the data length; In click units, and a the prediction means on the basis of the additional data predicted, quantized data setting means for setting data indicating the degree of quantization of the quantization means.
さらに、前記目的を達成するために、本発明の第3の観点のプログラムは、符号化手段と、付加手段と、予測手段と、処理手段と、を有する情報処理装置に実行させるプログラムであって、前記符号化手段が、画像データをマクロブロック単位で算術符号化処理を行い符号化データを生成する第1の手順と、前記付加手段が、前記算術符号化手段が生成した符号化データに、前記算術符号化手段の算術符号化処理によって生成された、複数のマクロブロックを含むスライスまたはピクチャ単位での前記画像データの圧縮の度合いを示す指標データに応じた付加データを付加する第2の手順と、前記予測手段が、前記マクロブロック単位で、前記第1の手順における算術符号化処理の対象のデータのデータ長、および、前記第1の手順で生成した符号化データのデータ長に基づいて、前記第2の手順において付加する付加データを予測する第3の手順と、前記処理手段が、前記マクロブロック単位で、前記第3のステップで予測した前記付加データに応じた所定処理を行う第4の手順と、を前記情報処理装置に実行させる。Furthermore, in order to achieve the above object, a program according to a third aspect of the present invention is a program that is executed by an information processing apparatus that includes an encoding unit, an adding unit, a prediction unit, and a processing unit. The encoding means performs arithmetic encoding processing on image data in units of macroblocks to generate encoded data, and the adding means adds the encoded data generated by the arithmetic encoding means to the encoded data, A second procedure of adding additional data corresponding to index data indicating the degree of compression of the image data in units of slices or pictures including a plurality of macroblocks generated by the arithmetic encoding process of the arithmetic encoding means And the prediction means generates, in the macroblock unit, the data length of the data subject to the arithmetic coding process in the first procedure, and the first procedure. A third procedure for predicting additional data to be added in the second procedure based on a data length of encoded data, and the addition predicted by the processing unit in the third step in units of the macroblocks; And causing the information processing apparatus to execute a fourth procedure for performing predetermined processing according to data.
さらに、前記目的を達成するために、本発明の第4の観点の符号化処理方法は、符号化手段と、付加手段と、予測手段と、処理手段と、を有する情報処理装置が行う符号化処理方法であって、前記符号化手段が、画像データをマクロブロック単位で算術符号化処理を行い符号化データを生成する第1のステップと、前記付加手段が、前記算術符号化手段が生成した符号化データに、前記算術符号化手段の算術符号化処理によって生成された、複数のマクロブロックを含むスライスまたはピクチャ単位での前記画像データの圧縮の度合いを示す指標データに応じた付加データを付加する第2のステップと、前記予測手段が、前記マクロブロック単位で、前記第1のステップにおける算術符号化処理の対象のデータのデータ長、および、前記第1のステップで生成した符号化データのデータ長に基づいて、前記第2のステップにおいて付加する付加データを予測する第3のステップと、前記処理手段が、前記マクロブロック単位で、前記第3のステップで予測した前記付加データに応じた所定処理を行う第4のステップと、を有する。Furthermore, in order to achieve the above object, an encoding processing method according to a fourth aspect of the present invention is an encoding performed by an information processing apparatus having an encoding unit, an adding unit, a prediction unit, and a processing unit. A processing method, wherein the encoding means performs arithmetic encoding processing of image data in units of macroblocks to generate encoded data, and the adding means is generated by the arithmetic encoding means. Additional data according to index data indicating the degree of compression of the image data in units of slices or pictures including a plurality of macroblocks generated by the arithmetic encoding process of the arithmetic encoding unit is added to the encoded data. And the prediction means includes, in units of the macroblock, a data length of data to be subjected to arithmetic coding processing in the first step, and the first A third step of predicting additional data to be added in the second step based on the data length of the encoded data generated in the step; and the processing means in the third step in units of the macroblocks. And a fourth step of performing a predetermined process according to the predicted additional data.
本発明によれば、符号化処理において、画像データのうち付加データの所定単位よりも小さい単位で付加データを予測できる符号化装置、プログラム、および符号化処理方法を提供することができる。 According to the present invention, it is possible to provide an encoding device, a program, and an encoding processing method capable of predicting additional data in a unit smaller than a predetermined unit of additional data in image data.
また、予測したデータに基づいて高精度に量子化処理行うことができる符号化装置、プログラム、および符号化処理方法を提供することができる。 In addition, it is possible to provide an encoding device, a program, and an encoding processing method that can perform quantization processing with high accuracy based on predicted data.
以下、本発明の実施形態に係る符号化処理を採用したJVT方式の符号化装置について説明する。 Hereinafter, a JVT encoding apparatus employing an encoding process according to an embodiment of the present invention will be described.
図1は、本発明の一実施形態に係る符号化装置を採用した通信システム1の概念図である。
図1に示すように、本実施形態に係る通信システム1は、送信側に設けられた符号化装置2と、受信側に設けられた復号装置3とを有する。
通信システム1では、送信側の符号化装置2において、離散コサイン変換やカルーネン・レーベ変換などの直交変換と動き補償によって圧縮したフレーム画像データ(ビットストリーム)を生成し、当該フレーム画像データを変調した後に、衛星放送波、ケーブルTV網、電話回線網、携帯電話回線網などの伝送媒体を介して送信する。
受信側では、受信した画像信号を復調した後に、上記変調時の直交変換の逆変換と動き補償によって伸張したフレーム画像データを生成して利用する。
なお、上記伝送媒体は、光ディスク、磁気ディスクおよび半導体メモリなどの記録媒体であってもよい。
図1に示す復号装置3は符号化装置2の符号化に対応した復号を行い、従来と同じ構成を有している
FIG. 1 is a conceptual diagram of a
As shown in FIG. 1, a
In the
On the receiving side, after demodulating the received image signal, frame image data expanded by inverse transformation of orthogonal transformation and motion compensation at the time of modulation is generated and used.
The transmission medium may be a recording medium such as an optical disk, a magnetic disk, and a semiconductor memory.
The
以下、図1に示す符号化装置2について説明する。
図2は、図1に示す符号化装置2の全体構成図である。
図2に示すように、符号化装置(情報処理装置)2は、例えば、A/D変換回路22、画面並べ替え回路23、演算回路24、直交変換回路25、量子化回路26、符号化回路(符号化装置とも言う)27、バッファ28、逆量子化回路29、逆直交変換回路30、レート制御回路32、フレームメモリ34、デブロックフィルタ38、および動き予測・補償回路39を主構成要素として有する。
量子化回路26,レート制御回路32は本発明に係る処理手段に相当する。
Hereinafter, the
FIG. 2 is an overall configuration diagram of the
As shown in FIG. 2, the encoding device (information processing device) 2 includes, for example, an A /
The
以下、符号化装置2の構成要素について説明する。
A/D変換回路22は、入力されたアナログの輝度信号Y、色差信号Cb,Crから構成される原画像信号(画像データ)S10をデジタルのフレームデータS22に変換し、これを画面並べ替え回路23に出力する。
画面並べ替え回路23は、A/D変換回路22から入力したフレームデータS22を、そのピクチャタイプI,P,BからなるGOP(Group Of Pictures )構造に応じて、符号化する順番に並べ替えたフレームデータS23を演算回路24、演算回路24、レート制御回路32および動き予測・補償回路39に出力する。
Hereinafter, components of the
The A /
The
演算回路24は、フレームデータS23内の処理対象の動き補償ブロックMCB(マクロブロックともいう)と、それに対応して動き予測・補償回路39から入力した予測画像データPIの動き補償ブロックMCBとの差分を示す画像データS24を生成し、これを直交変換回路25に出力する。
直交変換回路25は、画像データS24に離散コサイン変換やカルーネン・レーベ変換などの直交変換を施して画像データ(例えばDCT係数)S25を生成し、これを量子化回路26に出力する。
量子化回路26は、画像データS25をレート制御回路32により設定された量子化の度合いを示すデータに基づいて量子化処理を行い、符号化回路27の処理対象のデータを生成する。
詳細には、量子化回路26は、レート制御回路32から入力した量子化スケールで、画像データS25を量子化して画像データS26を生成し、これを符号化回路27および逆量子化回路29に出力する。
The
The
The
Specifically, the
符号化回路27は、画像データS26、動きベクトル等を示す文脈エレメント(SE:Syntax Element )に基づいて、算術符号化処理を行い、処理結果の画像データをバッファ28に格納する。
このとき、符号化回路27は、例えばインター予測符号化が行われた場合には、動き予測・補償回路39から入力した動きベクトルMVを符号化してヘッダデータに格納する。
The
At this time, for example, when inter prediction encoding is performed, the
バッファ28に格納された画像データは、変調等された後に送信される。
逆量子化回路29は、他の動き補償ブロックMCBから参照される参照画像データの動き補償ブロックMCBの画像データS26を逆量子化した信号を生成し、これを逆直交変換回路30に出力する。
逆直交変換回路30は、逆量子化回路29から入力したデータに、直交変換回路25における直交変換の逆変換を施して生成した画像データS30をデブロックフィルタ38を介してフレームメモリ34に書き込む。
デブロックフィルタ38は、画像データS30のブロック歪みを除去した画像データを、フレームメモリ34に出力する。
The image data stored in the
The
The inverse
The
レート制御回路32は、例えば、画面並べ替え回路23から入力したフレームデータS23を基に、画像中の複雑度が高い部分は細かく量子化し、画像中の複雑度が低い部分は粗く量子化するように量子化パラメータQpを生成する。
そして、レート制御回路32は、上記生成した量子化パラメータQp、並びにバッファ28から読み出した画像データを基に量子化スケールを生成し、これを量子化回路26に出力する。
また、レート制御回路32は、上記生成した量子化パラメータQpを、動き予測・補償回路39に出力する。
For example, the
Then, the
Further, the
動き予測・補償回路39は、符号化対象のフレームデータS23およびフレームメモリ34からの参照画像データREFを基に、参照画像データ内の探索範囲SRを探索して、動き予測・補償処理を行って動き補償ブロックMCBを単位として、動きベクトルMVを算出する。
The motion prediction /
この際、動き予測・補償回路39は、Iピクチャ、Pピクチャ、Bピクチャを符号化する。ここでIピクチャは、当該Iピクチャの情報だけから符号化し、フレーム間予測(インター予測符号化)を行わない画像データを示す。
Pピクチャは、表示順が前(過去)のIピクチャまたはPピクチャを基に予測を行って符号化される画像データを示す。
Bピクチャは、表示順が前(過去)および後(未来)のIピクチャおよびPピクチャを基に双方向予測によって符号化される画像データを示す。
At this time, the motion prediction /
The P picture indicates image data that is encoded by performing prediction based on the previous (previous) I picture or P picture.
The B picture indicates image data encoded by bi-directional prediction based on an I picture and a P picture whose display order is the previous (past) and subsequent (future).
動き予測ブロック(マクロブロックMB)のブロックサイズには、16×16,8×16,16×8,8×8画素のサイズが規定され、また、8×8,4×8,8×4,および4×4画素のサイズが規定される。
動き予測・補償回路39は、フレームデータS23内の処理対象の動き補償ブロックMCBとの差異が最も小さい動き補償ブロックMCBの位置を参照画像データREFの探索範囲SR内で特定し、これらの位置関係に対応した動きベクトルMVを算出する。
また、動き予測・補償回路39は、上記選択した動きベクトルMVを基に、動き補償ブロックMCBについての予測画像データPIを生成する。
動き予測・補償回路39は、上記選択した動きベクトルMVを符号化回路27に出力し、上記生成した予測画像データPIを演算回路24に出力する。
As the block size of the motion prediction block (macroblock MB), sizes of 16 × 16, 8 × 16, 16 × 8, and 8 × 8 pixels are defined, and 8 × 8, 4 × 8, 8 × 4, and so on. And a size of 4 × 4 pixels is defined.
The motion prediction /
Further, the motion prediction /
The motion prediction /
以下、符号化回路27の符号化処理について詳細に説明する。
JVT方式の符号化処理では、文脈エレメント(SE:Syntax Element )の符号化方法として、CAVLCとCABACの2種類が規定されている。CABACは、一般的にCAVLCと比べてSEを高効率に圧縮する。本実施形態に係る符号化回路27は、CABACにより符号化処理を行う。
Hereinafter, the encoding process of the
In the JVT encoding process, two types of CAVLC and CABAC are defined as encoding methods of a context element (SE). CABAC generally compresses SE more efficiently than CAVLC. The
JVTで規定するCABACでは、SEをVLCや固定長符号によりシンボル列に変換する。ここで変換されたシンボル列の各シンボルをbin (binary symbol )という。
符号化処理では、bin を入力として、算術符号化処理(AC:Arithmetic Coding )を行い、処理結果を基に出力ビットが決定されビットストリームに出力される。
In CABAC defined by JVT, SE is converted into a symbol string by VLC or fixed length code. Each symbol of the converted symbol string is called bin (binary symbol).
In the encoding process, bin is input and arithmetic encoding (AC) is performed. Based on the processing result, output bits are determined and output to the bit stream.
図3は、算術符号化処理を説明するための図である。
算術符号化処理は、例えば符号化対象のデータ列、例えばシンボルや2値(0および1)の系列を出現確率に応じて、区間[0,1]に射影し、数直線上の確率空間を区間内の数でバイナリ表現して符号化する。
例えば算術符号化処理は、図3に示すように、0.00…以上、1.00…未満の区間を、符号化対象のデータ内の個々のデータの出現確率を基に区間を分割し、個々のデータを基に分割した区間を選択する再帰的処理を行い、符号化対象のデータに対応する区間を示すデータを符号とする。
FIG. 3 is a diagram for explaining the arithmetic encoding process.
Arithmetic encoding processing, for example, projects a data sequence to be encoded, for example, a symbol or binary (0 and 1) series to an interval [0, 1] according to the appearance probability, and creates a probability space on the number line. Encode the binary representation with the number in the interval.
For example, in the arithmetic encoding process, as shown in FIG. 3, a section of 0.00... Or more and less than 1.00... Is divided based on the appearance probability of individual data in the encoding target data. A recursive process of selecting a section divided based on individual data is performed, and data indicating a section corresponding to the data to be encoded is used as a code.
以下、説明を簡単とするため符号化対象のデータを2値とする。
算術符号化処理は、具体的には図3(A)に示すように、符号化対象のデータの内、出現確率が大きいデータをMPS(Most Probable Symbol)、出現確率が小さいデータをLPS(Least Probable Symbol )とし、それぞれの出現確率pMPS、pLPSに応じて所定の区間Aを分割する。この際、現区間のサイズをレンジRange 、現区間の境界値、例えば下限値をLow とする。また、出現確率pMPSは、1−pLPSである。
Hereinafter, in order to simplify the description, the data to be encoded is binary.
Specifically, as shown in FIG. 3A, the arithmetic coding process is performed by using MPS (Most Probable Symbol) for data with a high appearance probability and LPS (Least for data with a low appearance probability). Probable Symbol), and a predetermined section A is divided according to the appearance probabilities pMPS and pLPS. At this time, the size of the current section is set to Range, and the boundary value of the current section, for example, the lower limit value is set to Low. The appearance probability pMPS is 1-pLPS.
初期状態では、図3(A)に示すように、レンジRange ,ロウLow の値は、A,0.00…である。
符号化対象のデータ列の最初のデータがMPSの場合には、図3(A)に示すように、区間Aを出現確率pMPS,pLPSに応じて分割し、分割された区間の内、図3(B)に示すようにMPSに対応する区間を選択する。このときのレンジRange ,ロウLow の値は、p0(=pMPS),0.00…である。
In the initial state, as shown in FIG. 3A, the values of the range Range and low Low are A, 0.00.
When the first data of the data string to be encoded is MPS, as shown in FIG. 3A, the section A is divided according to the appearance probabilities pMPS and pLPS, and among the divided sections, FIG. As shown in (B), the section corresponding to MPS is selected. The values of Range Range and Low Low at this time are p0 (= pMPS), 0.00.
次に、符号化対象のデータ列の内の2番目のデータがMPSの場合には、図3(B)に示すように、区間を出現確率pMPS,pLPSに応じて分割し、分割された区間の内、図3(C)に示すようにMPSに対応する区間を選択する。このときのレンジRange ,ロウLow の値は、p00(=p0×pMPS),0.00…である。 Next, when the second data in the data string to be encoded is MPS, the section is divided according to the appearance probabilities pMPS and pLPS as shown in FIG. Of these, the section corresponding to the MPS is selected as shown in FIG. The values of the range Range and low Low at this time are p00 (= p0 × pMPS), 0.00.
次に、符号化対象のデータ列の内の3番目のデータがLPSの場合には、図3(C)に示すように、区間を出現確率pMPS,pLPSに応じて分割し、分割された区間の内、図3(D)に示すようにLPSに対応する区間を選択する。このときのレンジRange ,ロウLow の値は、p001(=p00×pLPS),p001(Low +pMPS)である。
つまり、上述した符号化処理においてLPSの場合には、下限値Low の値にpMPSが加算されて、下限値Low が更新される。
Next, when the third data in the data string to be encoded is LPS, the section is divided according to the appearance probabilities pMPS and pLPS as shown in FIG. Of these, the section corresponding to LPS is selected as shown in FIG. The values of Range Range and Low Low at this time are p001 (= p00 × pLPS) and p001 (Low + pMPS).
That is, in the case of LPS in the above-described encoding process, pMPS is added to the value of the lower limit value Low, and the lower limit value Low is updated.
また、符号化対象のデータ列のビット長が大きくなるに従いレンジRange が小さくなり、レンジRange を示すデータのビット数も多くなる。このため符号化処理の結果、確定したビットを出力することで、メモリの容量を削減する。 Further, as the bit length of the data string to be encoded increases, the range Range decreases and the number of bits of data indicating the range Range also increases. For this reason, the capacity of the memory is reduced by outputting determined bits as a result of the encoding process.
また、計算精度を保つために、図3(E)に示すように、レンジRange が所定値よりも大きくなるように拡大する正規化処理(リノーマライズ)を行う。例えば正規化処理は、レンジRange の値を2倍して、所定値よりも大きくなるように拡大する。 Further, in order to maintain the calculation accuracy, as shown in FIG. 3E, normalization processing (renormalization) for expanding the range Range so as to be larger than a predetermined value is performed. For example, in the normalization process, the value of the range Range is doubled and expanded so as to be larger than a predetermined value.
図4は、符号化処理における正規化処理を説明するための図である。
例えば、上述したように、符号化対象のデータ列を1ビット単位で符号化処理を行う毎に、図4に示すような正規化処理を行う。
具体的には、まず、レンジRange が予め設定された所定値よりも小さいか否が判別され(ST1)、所定値よりも小さい場合には、下限値Low の値の上位1ビットに応じた符号を出力した後(ST2)、レンジRange と下限値Low の値を左シフト演算することで2倍に拡大し(ST3,ST4)し、ステップST1の処理に戻る。
そして、ステップST1からST4の動作をレンジRange の値が所定値以上になるまで繰り返す。
一方、ステップST1において、レンジRange の値が所定値以上の場合には、正規化処理を終了する。
FIG. 4 is a diagram for explaining the normalization process in the encoding process.
For example, as described above, every time a data string to be encoded is encoded in units of 1 bit, the normalization process as shown in FIG. 4 is performed.
Specifically, first, it is determined whether or not the range Range is smaller than a predetermined value (ST1). If the range is smaller than the predetermined value, a code corresponding to the upper 1 bit of the value of the lower limit value Low is determined. Is output (ST2), the range Range and the lower limit value Low are left-shifted to perform double expansion (ST3, ST4), and the process returns to step ST1.
Then, the operations of steps ST1 to ST4 are repeated until the value of the range Range becomes a predetermined value or more.
On the other hand, if the value of the range Range is greater than or equal to a predetermined value in step ST1, the normalization process is terminated.
図5は、図2に示した符号化回路の機能ブロック図である。
符号化回路27は、例えば図5に示すように、2値化部(BINR)271、コンテクスト(CTX)272、更新部(UPDT)273、算術符号化部274、付加部275、および予測部276を有する。
算術符号化部274は本発明に係る算術符号化手段に相当し、付加部275は本発明に係る付加手段に相当し、予測部276は、本発明に係る予測手段に相当する。
FIG. 5 is a functional block diagram of the encoding circuit shown in FIG.
For example, as illustrated in FIG. 5, the
The
2値化部(BINR)271は、2値化処理、例えば量子化回路26や動き予測・補償回路39から入力されたSEを、VLCや固定長符号によりシンボルbin (binary symbol )の列(バイナリデータ)に変換し、信号S271として出力する。
具体的には、2値化部271は、入力されたデータが、非バイナリ値(Non Binary Value)、例えば動きベクトル(Motion vector )やtransform coeff 等の場合には、バイナリデータに変換する。
A binarization unit (BINR) 271 performs binarization processing, for example, an SE input from the
Specifically, the
コンテクスト(CTX)272は、例えば算術符号化部274で符号化されたデータの統計値によって更新され、算術符号化部274による算術符号化処理の際に参照されるデータである。
コンテクスト272には、例えば遷移状態を示すインデックスと、MPSの出現確率pMPSとが関連付けられて記憶されている。コンテクスト272のインデックスは、例えば算術符号化部274の処理結果を示す信号S274に基づいて、更新部273により更新される。
具体的には、更新部273は、例えば信号S274を基に符号化した値が1の場合には、1の出現確率が増えるようにコンテクスト272のインデックスを更新し、例えば符号化した値が0の場合には、0の出現確率が増えるようにインデックスを更新する。
こうすることにより、CTX273のインデックスは、入力されるSEに依存した出現確率に近づいていく。
The context (CTX) 272 is data that is updated with, for example, a statistical value of data encoded by the
In the
Specifically, for example, when the value encoded based on the signal S274 is 1, the
By doing so, the index of
図6は、画像データにおいてピクチャ、スライス、マクロブロックを説明するための図である。図6(a)は、画像データ内の1ピクチャが、横方向に複数のスライスにより構成されていることを示す図であり、図6(b)は、1スライスがマクロブロックにより構成されていることを示す図である。 FIG. 6 is a diagram for explaining pictures, slices, and macroblocks in image data. FIG. 6A shows that one picture in the image data is composed of a plurality of slices in the horizontal direction, and FIG. 6B shows that one slice is composed of macro blocks. FIG.
算術符号化部274は、例えば、画像データをブロック単位、例えば図6(b)に示すように、マクロブロック単位で算術符号化処理を行い、処理結果の符号化データを信号S274として出力する。
例えば、算術符号化部274は、コンテクスト272の確率を示すインデックスに基づいて、入力されたデータを算術符号化処理を行う。本実施形態では算術符号化部274は、例えば図3に示すような算術符号化処理を行う。
マクロブロックは本発明に係る第1のブロック単位に相当し、1スライスや1ピクチャは本発明に係る第2のブロック単位に相当する。
For example, the
For example, the
A macro block corresponds to a first block unit according to the present invention, and one slice or one picture corresponds to a second block unit according to the present invention.
付加部275は、算術符号化部274から出力された符号化データとしての信号S274を、算術符号化部274の算術符号化処理によるブロック単位よりも大きい所定単位、例えば1スライスでの画像データの圧縮の度合いを示す指標データに応じた付加データを付加する。付加データは、CabacZeroWordに相当する。
この付加データは、算術符号化部274による符号化処理の結果、圧縮率が高い符号化データを生成した際に、デコーダがその圧縮率の高い符号化データをデコード処理すると、その符号化データを所定時間内に処理しきれない場合があるので、例えば図6(a)に示すように、1画像の内の複数のスライス(Slice )それぞれの最後に付加される。
付加部275は、例えば付加データとして、0x000003を1単位としたスタッフィングバイト(StuffingByte)を付加することで、デコーダの負荷を軽減する。
The adding
As a result of the encoding process performed by the
The adding
具体的には、付加部275は、数式(1)に示すように指標データKを算出し、指標データKが正の場合には、1スライスの最後に、(K×3)バイト分のビットを付加データとして、算術符号化部274から出力された符号化データに付加する。
Specifically, the adding
〔数1〕
K=Ceil((Ceil((3×BinCountsInNALUnits−3×96×PicSizeInMbs)/32)−NumBytesInVclNALUnits)/3)…(1)
[Equation 1]
K = Ceil ((Ceil ((3 × BinCountsInNALUnits−3 × 96 × PicSizeInMbs) / 32) −NumBytesInVclNALUnits) / 3) (1)
数式(1)において、BinCountsInNALUnits は、算術符号化部274による算術符号化処理の前のデータであり、例えば2値化部271により出力されたデータの所定単位、例えば1ピクチャでのデータ長である。
NumBytesInVclNALUnits は、算術符号化部274により算術符号化処理されたデータの所定単位、例えば1ピクチャでのデータ長である。
PicSizeInMbsは、所定単位、例えば1ピクチャ内のマクロブロック数である。本実施形態では固定値である。
また、Ceil(A)は、値Aよりも大きい最小の整数値を示す。
In Equation (1), BinCountsInNALUnits is data before arithmetic coding processing by the
NumBytesInVclNALUnits is a predetermined unit of data subjected to arithmetic coding processing by the
PicSizeInMbs is the number of macroblocks in a predetermined unit, for example, one picture. In this embodiment, it is a fixed value.
Ceil (A) indicates a minimum integer value larger than the value A.
1スライスの最後に付加する付加データのデータ長は、コンテクスト272、算術符号化部274、および更新部273により、入力されるデータに応じて確率モデルを更新しながら符号化処理を行うので、1スライス分のデータを符号化処理するまで不確定である。このため付加部275が付加する付加データのデータ長も不確定である。
例えば一般的なレート制御回路では、算術符号化部274が生成した符号化データと付加データとに基づいて、量子化レートを制御するので、制御できない場合がある。
The data length of the additional data added at the end of one slice is 1 because the
For example, in a general rate control circuit, the quantization rate is controlled based on the encoded data generated by the
本発明では、後述する予測部276を設けることにより、1スライスよりも小さい単位、例えばマクロブロック単位で付加データを予測する。以下、詳細に説明する。
In the present invention, by providing a
予測部276は、ブロック単位で、例えばマクロブロック単位で算術符号化部274による算術符号化処理の対象のデータのデータ長、および、算術符号化部274が生成した符号化データのデータ長に基づいて、付加部275が付加する所定単位での指標データに応じた付加データを予測する。
The
詳細には、予測部276は、算術符号化部274がマクロブロック単位で、1スライス分のデータを符号化処理する途中で、算術符号化部274が算術符号化処理を行う前の処理対象のデータ、つまり2値化部271が生成したデータのデータ長と、算術符号化部274による算術符号化処理後のデータに基づいて所定単位、例えば1ピクチャー分の付加データを予測する。
Specifically, the
レート制御回路32は、ブロック単位、例えばマクロブロック単位で予測部276が予測した付加データに基づいて、量子化回路26の量子化の度合いを示すデータ、詳細には量子化レートを設定する。
また、レート制御回路32は、ブロック単位よりも大きい単位、例えば1スライス単位で符号化データに、付加部275が生成した付加データを付加したデータのデータ長に基づいて、量子化回路26の量子化の度合いを示すデータ、詳細には量子化レートを設定する。
量子化回路26は、設定された量子化レートに応じた量子化処理を行う。
The
Further, the
The
図7は、図2に示した符号化回路27の動作を説明するためのフローチャートである。図7を参照しながら符号化回路27の動作を中心に説明する。
ステップST1において、2値化部271は、2値化処理、例えば量子化回路26や動き予測・補償回路39から入力されたSEを、VLCや固定長符号によりシンボルbin (binary symbol )の列(バイナリデータ)に変換し、信号S271として出力する。
FIG. 7 is a flowchart for explaining the operation of the
In step ST1, the
ステップST2において、信号S271がコンテクスト272に入力され、算術符号化部274は、コンテクスト272により設定された確率モデルに応じて算術符号化処理を行い符号化データS274を生成する。更新部273は信号S274に応じてコンテクスト272を更新する。
In step ST2, the signal S271 is input to the
ステップST3において、予測部276は、ブロック単位で、例えばマクロブロック単位で、算術符号化部274の処理の対象のデータのデータ長、および、算術符号化部274が生成した符号化データS274のデータ長に基づいて、付加部275が符号化データS274に付加する、算術符号化処理によるブロック単位よりも大きい所定単位で、例えば1ピクチャ単位での画像データの圧縮の度合いを示す指標データKに応じた付加データを予測する。
In step ST3, the
ステップST4において、現在処理したカレントマクロブロックCurrentMB が、1スライスの途中であるか否かが判別される。具体的には、例えば現在処理したカレントマクロブロックCurrentMB が1スライス中のマクロブロック数より小さいか否かが判別される。
現在処理したカレントマクロブロックCurrentMB が、1スライスの途中ではないと判別した場合、具体的には、現在処理したカレントマクロブロックCurrentMB が1スライス中のマクロブロック数より小さくないと判別した場合には、つまり、1スライス分のデータを算術符号化部274が処理した場合には、付加部275が1スライス分の算術符号化処理の前後のデータ長に基づいて数式(1)に示すように指標データKを算出し、指標データKに応じた付加データを、1スライス分の符号化データに付加する。
レート制御回路32は、ブロック単位よりも大きい単位、例えば1スライス単位で符号化データに、付加部275が生成した付加データを付加したデータのデータ長に基づいて、量子化回路26の量子化の度合いを示すデータ、詳細には量子化レートを設定する。
量子化回路26は、その量子化レートに応じた量子化処理を行う。
In step ST4, it is determined whether or not the currently processed current macroblock CurrentMB is in the middle of one slice. Specifically, for example, it is determined whether or not the currently processed current macroblock CurrentMB is smaller than the number of macroblocks in one slice.
When it is determined that the current macroblock CurrentMB processed at present is not in the middle of one slice, specifically, when it is determined that the current macroblock CurrentMB processed at present is not smaller than the number of macroblocks in one slice, That is, when the
The
The
一方、ステップST4において、現在処理したカレントマクロブロックCurrentMB が、1スライスの途中であると判別した場合、具体的には、例えば現在処理したカレントマクロブロックCurrentMB が1スライス中のマクロブロック数より小さいと判別した場合には、レート制御回路32は、ブロック単位、例えばマクロブロック単位で予測部276が予測した付加データに基づいて、量子化回路26の量子化の度合いを示すデータ、詳細には量子化レートを設定する(ST5)。また、量子化回路26は、設定された量子化レートに応じた量子化処理を行う。
On the other hand, when it is determined in step ST4 that the currently processed current macroblock CurrentMB is in the middle of one slice, specifically, for example, if the currently processed current macroblock CurrentMB is smaller than the number of macroblocks in one slice. If it is determined, the
図8は、図5に示した算術符号化部274の動作の一具体例を示すフローチャートである。次に、図8を参照しながら、算術符号化部274の動作の一具体例を説明する。
具体的には、算術符号化部274は、指定されたコンテクスト272のインデックスctxIdxと、エンコードするシンボルbinValを入力として、符号化処理を行う。
例えば図3に示した、codIRange ,codILow は、出現確率幅(レンジRange ),下限値Low を表す。コンテクストCTX272は、インデックスctxIdxによって管理され、各コンテクストにはMPS値と遷移状態番号を示すvalMPS,pStateIdx が割り当てられる。
FIG. 8 is a flowchart showing a specific example of the operation of the
Specifically, the
For example, codIRange and codILow shown in FIG. 3 represent an appearance probability width (range Range) and a lower limit value Low. The
ステップST101において、算術符号化部274は、codIRange の値をqCodIRangeIdx という値に量子化し、規定されたテーブル値rangeTabLPS を使って、LPS の確率幅 codIRangeLPS を求める。また、codIRange をMPS の確率幅に変更する。
In step ST101, the
ステップST102において、算術符号化部274は、入力シンボルbin がMPS か否かで処理を分岐する。シンボルがMPS の時は、規格で規定しているテーブル値transIdxMPS によって状態を遷移させ、pStateIdxを更新する(ST103)。
In step ST102, the
一方,ステップST102において、入力シンボルbin がLPS のときは、codILow値、codIRange 値を更新する。
具体的には、codILowとcodIRangeを加算した値をcodILowに代入し、codIRangeにcodIRangeLPSを代入する(ST104)。
ステップST105において、pStateIdx が0でないか否が判別され、pStateIdx が0の場合にはvalMPSに1−valMPSを代入し(ST106)、ステップST107の処理に進む。ステップST105においてpStateIdx が0でない場合にもステップST107の処理に進む。
ステップST107において、pStateIdx を更新する。
ステップST108において、算術符号化部274は、後述する正規化処理を行う。
On the other hand, in step ST102, when the input symbol bin is LPS, the codILow value and the codIRange value are updated.
Specifically, a value obtained by adding codILow and codIRange is substituted into codILow, and codIRangeLPS is substituted into codIRange (ST104).
In step ST105, it is determined whether or not pStateIdx is 0. If pStateIdx is 0, 1-valMPS is substituted for valMPS (ST106), and the process proceeds to step ST107. Even when pStateIdx is not 0 in step ST105, the process proceeds to step ST107.
In step ST107, pStateIdx is updated.
In step ST108, the
図9は、図8に示した正規化処理の一具体例を説明するためのフローチャートである。算術符号化部274は、図8に示したステップST108の正規化処理を以下に示すように処理を行う。
ステップST111に示すように、算術符号化部274は、codIRange の値が所定値、例えば0x100よりも小さいか否かを判別し、codIRange の値が所定値、例えば0x100よりも小さくないと判別した場合には、正規化処理を行わない。
FIG. 9 is a flowchart for explaining a specific example of the normalization process shown in FIG. The
As shown in step ST111, the
一方、ステップST111において、codIRange の値が所定値、例えば0x100よりも小さいと判別した場合には、算術符号化部274は、codILowの値が所定値、例えば0x100よりも小さいか否かを判別する(ST112)。
codILowの値が所定値、例えば0x100よりも小さいと判別した場合には、算術符号化部274は、後述する符号化データを出力するための処理PutBit(0)を行い(ST113)、codIRange 値を1/2倍し、codILow値を1/2倍する。詳細には、codIRange 値およびcodILow値を1ビット分左シフト演算を行うことで、それぞれの値を1/2倍し(ST114)、ステップST111の処理に戻る。
On the other hand, if it is determined in step ST111 that the value of codIRange is smaller than a predetermined value, for example, 0x100, the
When it is determined that the value of codILow is smaller than a predetermined value, for example, 0x100, the
一方、ステップST112において、codIRange の値が所定値、例えば0x100よりも小さくないと判別した場合には、算術符号化部274は、codILowの値が所定値、例えば0x200以上であるか否かを判別する(ST115)。codILowの値が所定値、例えば0x200以上でないと判別した場合には、codILow値から所定値、例えば0x100を減算し、bitsOutstandingの値に1を加算し(ST116)、ステップST114の処理に進む。
このbitsOutstandingは、正規化処理の際にキャリーオーバ防止のために設けられたデータであり、bitsOutstandingのデータは、所定単位の符号化処理が終了した時点で0にリセットされる。
On the other hand, when it is determined in step ST112 that the value of codIRange is not smaller than a predetermined value, for example, 0x100, the
The bitsOutstanding is data provided to prevent carryover during the normalization process, and the bitsOutstanding data is reset to 0 when the encoding process of a predetermined unit is completed.
一方、ステップST115の判別において、codILowの値が所定値、例えば0x200以上であると判別した場合には、codILow値から所定値、例えば0x200を減算し(ST117)、後述する符号化データを出力するための処理PutBit(1)を行い(ST118)、ステップST114の処理に進む。 On the other hand, if it is determined in step ST115 that the value of codILow is a predetermined value, for example, 0x200 or more, a predetermined value, for example, 0x200 is subtracted from the codILow value (ST117), and encoded data described later is output. Process BitBit (1) is performed (ST118), and the process proceeds to step ST114.
図10は、図9に示した符号化処理のPutBit(B)の処理を説明するためのフローチャートである。図10を参照しながら、算術符号化処理のステップST113,ST118におけるPutBit(B)の動作を説明する。
算術符号化部274は、符号化データを出力する際に、最初のビットであるか否かを判別する。この判断には例えば最初のビットを示すfirstbitFlagが用いられる。firstbitFlagが0以外の場合には、最初のビットであることを示し、firstbitFlagが0の場合には、最初のビット以外であることを示す。
詳細には、算術符号化部274は、ステップST210において、firstbitFlagが0以外の場合には、firstbitFlagに0を代入して最初のビットを出力しない。
一方、ステップST210において、算術符号化部274は、firstbitFlagが0の場合には、WriteBits(B,1)の処理を行う。ここでWriteBits(B,1)は、1ビット長の値Bを出力する処理である。
FIG. 10 is a flowchart for explaining the process of PutBit (B) in the encoding process shown in FIG. The operation of PutBit (B) in steps ST113 and ST118 of the arithmetic coding process will be described with reference to FIG.
The
Specifically, when the firstbitFlag is other than 0 in step ST210, the
On the other hand, in step ST210, when the firstbitFlag is 0, the
ステップST213において、算術符号化部274は、bitsOutstandingが0より大きいか否かを判別し、0よりも大きいと判別した場合には、WriteBits(1-B,1)の処理を行い(ST214)、bitsOutstandingから1減算しステップST213の処理に戻る。ここでWriteBits(1-B,1)の処理は、1ビット長のBの補数を出力する処理である。
In step ST213, the
一方、ステップST213において、算術符号化部274は、bitsOutstandingが0以下であると判別した場合には、一連の処理を中止する。
以上説明した動作を行うことで、算術符号化部274は、キャリーオーバを起こすことなく、符号化処理を行うことができる。
On the other hand, in Step ST213, when the
By performing the operation described above, the
算術符号化部274は、マクロブロック単位で算術符号化処理を行う際に、順に符号化データを出力するのではなく、上述したようにbitsOutstanding を用いて算術符号化処理を行う場合には、bitsOutstanding の値に応じて符号化データが出力する。
このため予測部276は、このbitsOutstanding を考慮して予測を行うことが好ましい。
以下、予測部276の一具体例を詳細に説明する。
The
For this reason, it is preferable that the
Hereinafter, a specific example of the
予測部276は、例えば1スライスの内で現在処理中のマクロブロックまでに、2値化部271が生成したデータのデータ長、つまり算術符号化部274の処理対象のデータのデータ長BitCounts を計算する。
The
また、予測部276は、現在処理中のマクロブロックまでに生成された符号化データのデータ長NumBytesを計算する。
具体的には、予測部276は、データ長NumBytesとして、例えば数式(2)に示すように、現在処理中のマクロブロック(CurrentMB とも言う)までに生成した符号化データのデータ長GenBits と、その時点でのbitsOutstanding の値を加算して求める。
Also, the
Specifically, the
〔数2〕
NumBytes = (GenBits +bitsOutstanding) / 8 …(2)
[Equation 2]
NumBytes = (GenBits + bitsOutstanding) / 8 (2)
上述したように、bitsOutstanding を加算するのは、正規化処理の際にキャリーオーバを避けるために、bitsOutstanding に本来その時点でバッファに出力されるビット量をカウントしているためである。
数式(2)に示した計算により、予測部276は、より高精度に現在処理中のマクロブロックまでに生成された符号化データのデータ長NumBytesを計算することができる。
As described above, bitsOutstanding is added because bitsOutstanding originally counts the amount of bits output to the buffer at that time in order to avoid carryover during normalization processing.
By the calculation shown in Expression (2), the
また、GenBitsには、実際に符号化処理されバッファに出力されたビットであるので、エミュレーションプリベンションバイトを含む。 Since GenBits is a bit that is actually encoded and output to the buffer, it includes an emulation prevention byte.
また、予測部276は、1ピクチャ分のデータを処理中にマクロブロック単位で、例えば数式(3)に示すように、1ピクチャ分の2値化部271による2値化後のデータのデータ長の予測値EstimateBinCountsInNALUnits を、CurrentMBまでの2値化後のデータのデータ長CurrentBinarizationNum と、1ピクチャーのマクロブロック数PicSizeInMbs と、現在処理中のマクロブロックを示すデータMbNoを用いて計算する。
In addition, the
〔数3〕
EstimateBinCountsInNALUnits=CurrentBinarizationNum ×(PicSizeInMbs /MbNo)…(3)
[Equation 3]
EstimateBinCountsInNALUnits = CurrentBinarizationNum x (PicSizeInMbs / MbNo) (3)
また、予測部276は、1ピクチャ分のデータを処理中にマクロブロック単位で、例えば数式(4)に示すように、
1ピクチャ分の符号化データのデータ長の予測値EstimateNumByteInVclNALUnitsを、算術符号化部274が1ピクチャ分の算術符号化処理により出力したデータのデータ長GenBitsと、bitsOutstandingの値、および、1ピクチャーのマクロブロック数PicSizeInMbs と、現在処理中のマクロブロックを示すデータMbNoとを用いて計算する。
また、MbNoは現在処理中のマクロブロックであるが、これは1マクロブロック毎に加算されるため、これまでのエンコードしたマクロブロックの総和となる。
Further, the
Data length prediction value EstimateNumByteInVclNALUnits of encoded data for one picture, data length GenBits, bitsOutstanding value of data output by
MbNo is a macro block currently being processed. Since this is added for each macro block, it is the sum of the macro blocks encoded so far.
〔数4〕
EstimateNumByteInVclNALUnits=(GenBits +bitsOutstanding)×(PicSizeInMbs /MbNo)/8…(4)
[Equation 4]
EstimateNumByteInVclNALUnits = (GenBits + bitsOutstanding) x (PicSizeInMbs / MbNo) / 8 ... (4)
予測部276は、数式(1)に示した、BinCountsInNALUnitsおよびNumBytesInVclNALUnitsに、予測値EstimateBinCountsInNALUnitsおよびEstimateNumByteInVclNALUnitsを代入することで、1ピクチャ分の圧縮の度合いを示す指標データKを予測する。
The
詳細には、予測部276は、数式(5)に示すような計算を行うことで、指標データKを予測する。
Specifically, the
〔数5〕
K=Ceil((Ceil((3×EstimateBinCountsInNALUnits−3×96×PicSizeInMbs)/32)−EstimateNumByteInVclNALUnits)/3)…(5)
[Equation 5]
K = Ceil ((Ceil ((3 × EstimateBinCountsInNALUnits−3 × 96 × PicSizeInMbs) / 32) −EstimateNumByteInVclNALUnits) / 3) (5)
また、予測部276は、その予測した指標データKに応じた付加データのデータ長を予測する。
レート制御回路32は、その予測した指標データKに応じた付加データのデータ長に応じて、マクロブロック単位で量子化レートの制御を行う。
Further, the
The
上述したように予測部276は、1マクロブロック単位で付加部275が生成する付加データを予測することができる。また、予測部276が予測する指標データKや付加データは、算術符号化処理が進み1ピクチャの最後のマクロブロックに近づくにつれて付加部275が生成する指標データKや付加データに近づく。
各構成要素の動作は、図7に示したフローチャートと同様であるので説明を省略する。
相違点は、予測部276がbitsOutstandingを考慮し、数式(2)〜数式(5)に基づいて付加データを予測する点である。これにより、より高精度に付加データを予測することができる。
As described above, the
Since the operation of each component is the same as that of the flowchart shown in FIG.
The difference is that the
以上説明したように、画像データをマクロブロック単位で算術符号化処理を行い符号化データを生成する算術符号化部274と、算術符号化部274が生成した符号化データに、算術符号化部274の算術符号化処理によるマクロブロック単位よりも大きい所定単位での画像データの圧縮の度合いを示す指標データKに応じた付加データを付加する付加部275と、マクロブロック単位で、算術符号化部274による算術符号化処理の対象のデータのデータ長、および、算術符号化部274が生成した符号化データのデータ長に基づいて、付加部275が付加する所定単位での指標データKに応じた付加データを予測する予測部276と、マクロブロック単位で、予測部276が予測した付加データに応じた所定処理を行うレート制御回路32および量子化回路26とを設けたので、符号化処理において、画像データのうち付加データの所定単位よりも小さい単位で付加データを予測できる。
As described above, the
また、算術符号化部274による正規化処理に係るビットアウトスタンディングデータbitsOutstanding、および算術符号化部274が画像データの1ピクチャのうち算術符号化処理したブロックまでの符号化データのデータ長、および1ピクチャのうち算術符号化処理前のデータのデータ長に基づいて、所定単位での指標データに応じた付加データを予測するので、より高精度に指標データおよび付加データを予測することができる。
Also, the bit outstanding data bitsOutstanding related to the normalization processing by the
なお、本発明は本実施形態に限られるものではなく、任意好適な改変が可能である。
本実施形態に係る符号化装置では、ハードウェアにより、本発明に係る機能を実現したが、この形態に限られるものではない。例えば、コンピュータ(データ処理装置)が上述した本発明に係る機能を有するプログラムを実行することにより、本発明に係る機能を実現してもよい。
Note that the present invention is not limited to this embodiment, and any suitable modification can be made.
In the encoding apparatus according to the present embodiment, the functions according to the present invention are realized by hardware, but the present invention is not limited to this form. For example, the function according to the present invention may be realized by executing a program having the function according to the present invention described above by a computer (data processing apparatus).
1…通信システム、2…符号化装置(データ処理装置:コンピュータ)、3…復号装置、22…A/D変換回路、23…画面並べ替え回路、24…演算回路、25…直交変換回路、26…量子化回路、27…符号化回路、28…バッファ、29…逆量子化回路、30…逆直交変換回路、32…レート制御回路、34…フレームメモリ、38…デブロックフィルタ、39…動き予測・補償回路、271…2値化部(BINR)、272…コンテクスト(CTX)、273…更新部(UPDT)、274…算術符号化部、275…付加部、276…予測部、Range …レンジ、Low …下限値。
DESCRIPTION OF
Claims (6)
前記算術符号化手段が生成した符号化データに、前記算術符号化手段の算術符号化処理によって生成された、複数のマクロブロックを含むスライスまたはピクチャ単位での前記画像データの圧縮の度合いを示す指標データに応じた付加データを付加する付加手段と、
前記マクロブロック単位で、前記算術符号化手段による算術符号化処理の対象のデータのデータ長、および、前記算術符号化手段が生成した符号化データのデータ長に基づいて、前記付加手段が付加する付加データを予測する予測手段と、
前記マクロブロック単位で、前記予測手段が予測した前記付加データに応じた所定処理を行う処理手段と
を有する符号化装置。 Arithmetic coding means for performing coded coding of image data on a macroblock basis to generate coded data;
Wherein the arithmetic coding unit generated encoded data, the degree of the generated I by the arithmetic coding process in the arithmetic encoding means, of the image data in the slice or picture unit including a plurality of macro blocks compressed adding means for adding additional data corresponding to the index data indicating,
In the macro-block unit, the data length of the arithmetic coding unit target data arithmetic coding process by, and, on the basis of the data length of the coded data arithmetic coding means is generated, the additional means for adding A prediction means for predicting additional data;
And a processing unit that performs predetermined processing according to the additional data predicted by the prediction unit in units of the macroblock .
前記予測手段は、前記算術符号化手段による前記正規化処理に係るビットアウトスタンディングデータ、および前記算術符号化手段が前記画像データのピクチャのうち前記算術符号化処理したマクロブロックまでの符号化データのデータ長、および前記1ピクチャのうち前記算術符号化処理前のデータのデータ長に基づいて、前記指標データに応じた付加データを予測する
請求項1に記載の符号化装置。 The arithmetic encoding means includes a normalization process for multiplying the data to be processed by a predetermined number when performing the arithmetic encoding process,
The prediction means includes bit-outstanding data related to the normalization processing by the arithmetic coding means, and encoded data up to a macroblock that has been arithmetically coded by the arithmetic coding means in the picture of the image data. The encoding apparatus according to claim 1, wherein additional data corresponding to the index data is predicted based on a data length and a data length of the data before the arithmetic encoding process in the one picture.
前記マクロブロック単位で、前記予測手段が予測した前記付加データに基づいて、前記量子化手段の量子化の度合いを示すデータを設定する量子化データ設定手段と
を含む請求項1に記載の符号化装置。 The processing means performs quantization processing based on data indicating a set degree of quantization of the image data, and generates quantization target processing data of the arithmetic encoding means;
In the macro-block basis, on the basis of the said additional data predicting means predicts the encoding of claim 1 including the quantized data setting means for setting data indicating the degree of quantization of the quantization means apparatus.
前記動き補償の対象となる画像データと、予測画像データとの差分に直交変換処理および量子化処理を順に施す第1の処理手段と、
前記第1の処理手段で生成したデータに、逆量子化処理および逆直交変換処理を順に施して参照データを生成する第2の処理手段と、
前記動きベクトルおよび前記参照画像データを基に前記予測画像データを生成する第3の処理手段と、
設定された量子化の度合いを示すデータに基づいて量子化処理を行い、前記符号化手段の処理対象のデータを生成する量子化手段と、
前記量子化手段が生成したデータ、および前記動きベクトルを、前記マクロブロック単位で算術符号化処理を行い符号化データを生成する算術符号化手段と、
前記算術符号化手段が生成した符号化データに、前記算術符号化手段の算術符号化処理によって生成された、複数のマクロブロックを含むスライスまたはピクチャ単位での前記画像データの圧縮の度合いを示す指標データに応じた付加データを付加する付加手段と、
前記マクロブロック単位で、前記算術符号化手段による算術符号化処理の対象のデータのデータ長、および、前記算術符号化手段が生成した符号化データのデータ長に基づいて、前記付加手段が付加する前記指標データに応じた付加データを予測する予測手段と、
前記マクロブロック単位で、前記予測手段が予測した前記付加データに基づいて、前記量子化手段の量子化の度合いを示すデータを設定する量子化データ設定手段と
を有する符号化装置。 Motion vector generation means for generating a motion vector based on a difference between image data to be subjected to motion compensation and reference image data referred to in the motion compensation in units of a plurality of macro blocks of different sizes;
First processing means for sequentially performing orthogonal transformation processing and quantization processing on the difference between the image data to be subjected to motion compensation and the predicted image data;
Second processing means for generating reference data by sequentially performing inverse quantization processing and inverse orthogonal transform processing on the data generated by the first processing means;
Third processing means for generating the predicted image data based on the motion vector and the reference image data;
Quantization means for performing quantization processing based on data indicating a set degree of quantization and generating data to be processed by the encoding means;
Arithmetic encoding means for generating encoded data by performing arithmetic encoding on the data generated by the quantization means and the motion vector in units of the macroblocks ;
Wherein the arithmetic coding unit generated encoded data, the degree of the generated I by the arithmetic coding process in the arithmetic encoding means, of the image data in the slice or picture unit including a plurality of macro blocks compressed Adding means for adding additional data according to the index data indicating
In the macro-block unit, the data length of the arithmetic coding unit target data arithmetic coding process by, and, on the basis of the data length of the coded data arithmetic coding means is generated, the additional means for adding prediction means for predicting the additional data corresponding to the index data,
And a quantized data setting unit configured to set data indicating a degree of quantization of the quantizing unit based on the additional data predicted by the predicting unit for each macroblock .
前記符号化手段が、画像データをマクロブロック単位で算術符号化処理を行い符号化データを生成する第1の手順と、
前記付加手段が、前記算術符号化手段が生成した符号化データに、前記算術符号化手段の算術符号化処理によって生成された、複数のマクロブロックを含むスライスまたはピクチャ単位での前記画像データの圧縮の度合いを示す指標データに応じた付加データを付加する第2の手順と、
前記予測手段が、前記マクロブロック単位で、前記第1の手順における算術符号化処理の対象のデータのデータ長、および、前記第1の手順で生成した符号化データのデータ長に基づいて、前記第2の手順において付加する付加データを予測する第3の手順と、
前記処理手段が、前記マクロブロック単位で、前記第3のステップで予測した前記付加データに応じた所定処理を行う第4の手順と、
を前記情報処理装置に実行させるプログラム。 A program to be executed by an information processing apparatus having an encoding unit, an adding unit, a predicting unit, and a processing unit ,
A first procedure in which the encoding means performs an arithmetic encoding process on image data in units of macroblocks to generate encoded data;
The adding unit compresses the image data in units of slices or pictures including a plurality of macroblocks generated by the arithmetic encoding process of the arithmetic encoding unit in the encoded data generated by the arithmetic encoding unit. A second procedure for adding additional data according to the index data indicating the degree of
The prediction means is based on the data length of the data subject to arithmetic coding processing in the first procedure and the data length of the coded data generated in the first procedure in units of the macroblocks. a third step for predicting the additional data to be added in the second step,
A fourth procedure in which the processing means performs a predetermined process according to the additional data predicted in the third step in units of the macroblock ;
A program for causing the information processing apparatus to execute.
前記符号化手段が、画像データをマクロブロック単位で算術符号化処理を行い符号化データを生成する第1のステップと、
前記付加手段が、前記算術符号化手段が生成した符号化データに、前記算術符号化手段の算術符号化処理によって生成された、複数のマクロブロックを含むスライスまたはピクチャ単位での前記画像データの圧縮の度合いを示す指標データに応じた付加データを付加する第2のステップと、
前記予測手段が、前記マクロブロック単位で、前記第1のステップにおける算術符号化処理の対象のデータのデータ長、および、前記第1のステップで生成した符号化データのデータ長に基づいて、前記第2のステップにおいて付加する付加データを予測する第3のステップと、
前記処理手段が、前記マクロブロック単位で、前記第3のステップで予測した前記付加データに応じた所定処理を行う第4のステップと、
を有する符号化処理方法。 An encoding processing method performed by an information processing apparatus including an encoding unit, an adding unit, a prediction unit, and a processing unit ,
It said encoding means, a first step of generating encoded data subjected to arithmetic encoding processing image data in units of macroblocks,
The adding unit compresses the image data in units of slices or pictures including a plurality of macroblocks generated by the arithmetic encoding process of the arithmetic encoding unit in the encoded data generated by the arithmetic encoding unit. A second step of adding additional data according to the index data indicating the degree of
The prediction means, in the macro-block unit, the data length of the target data of the arithmetic encoding processing in the first step, and, based on the data length of the coded data generated in said first step, said a third step of predicting the additional data to be added in the second step,
It said processing means, in the macro block, and a fourth step of performing a predetermined process corresponding to the additional data predicted in the third step,
An encoding processing method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004056501A JP4453398B2 (en) | 2004-03-01 | 2004-03-01 | Encoding apparatus, program, and encoding processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004056501A JP4453398B2 (en) | 2004-03-01 | 2004-03-01 | Encoding apparatus, program, and encoding processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005252374A JP2005252374A (en) | 2005-09-15 |
JP4453398B2 true JP4453398B2 (en) | 2010-04-21 |
Family
ID=35032494
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004056501A Expired - Fee Related JP4453398B2 (en) | 2004-03-01 | 2004-03-01 | Encoding apparatus, program, and encoding processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4453398B2 (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4878262B2 (en) * | 2006-10-31 | 2012-02-15 | キヤノン株式会社 | Entropy encoding device |
JP4717780B2 (en) * | 2006-11-01 | 2011-07-06 | キヤノン株式会社 | Encoding apparatus and control method thereof |
US8170359B2 (en) | 2006-11-28 | 2012-05-01 | Panasonic Corporation | Encoding device and encoding method |
EP2091257B1 (en) | 2006-11-30 | 2017-12-27 | Panasonic Corporation | Coder |
JP4742018B2 (en) * | 2006-12-01 | 2011-08-10 | キヤノン株式会社 | Image coding apparatus and image coding method |
JP2008141530A (en) * | 2006-12-01 | 2008-06-19 | Canon Inc | Image coder and image coding method |
WO2008142956A1 (en) * | 2007-05-21 | 2008-11-27 | Nec Corporation | Video encoding device, video encoding method, and video encoding program |
JP4936574B2 (en) * | 2011-03-02 | 2012-05-23 | キヤノン株式会社 | Encoding apparatus and control method thereof |
US20130279597A1 (en) * | 2012-04-24 | 2013-10-24 | Magnum Semiconductor, Inc. | Apparatuses and methods for bitstream bitstuffing |
JP6059572B2 (en) * | 2013-03-22 | 2017-01-11 | 株式会社メガチップス | Image processing device |
JP6159240B2 (en) * | 2013-12-09 | 2017-07-05 | 日本電信電話株式会社 | Binary arithmetic encoding device, binary arithmetic encoding method, and binary arithmetic encoding program |
-
2004
- 2004-03-01 JP JP2004056501A patent/JP4453398B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2005252374A (en) | 2005-09-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7132964B2 (en) | Coding apparatus, program and data processing method | |
CN101682773B (en) | Method and apparatus for entropy-coding/entropy-decoding video data | |
JP4540585B2 (en) | Encoding device and decoding device | |
JP2004135251A (en) | Method of encoding image information, and method of decoding the image information | |
JP2014518466A (en) | Context adaptive coding of video data | |
JP2006054865A (en) | Binary arithmetic decoding apparatus and methods using pipelined structure | |
JP2007142637A (en) | Image information encoder | |
KR20070118978A (en) | Method and system for video compression using an iterative encoding algorithm | |
CA3075491A1 (en) | Binary arithmetic coding with progressive modification of adaptation parameters | |
JP4453398B2 (en) | Encoding apparatus, program, and encoding processing method | |
JP5116704B2 (en) | Image coding apparatus and image coding method | |
CN109565596B (en) | Method and apparatus for context adaptive binary arithmetic coding | |
JP4687998B2 (en) | Encoding apparatus and encoding method | |
JP5057497B2 (en) | Decoding device and decoding method | |
JP5041061B2 (en) | Decoding device and decoding method | |
JP5041060B2 (en) | Encoding apparatus and encoding method | |
JP5892203B2 (en) | Decoding device, decoding method, and decoding program | |
JP5057498B2 (en) | Decoding device and decoding method | |
JP5057496B2 (en) | Encoding apparatus and encoding method | |
JP5692172B2 (en) | Decoding device, decoding method, and decoding program. | |
JP5057495B2 (en) | Decoding device and decoding method | |
JP5062320B2 (en) | Encoding apparatus and encoding method | |
JP5057494B2 (en) | Encoding apparatus and encoding method | |
JP5500210B2 (en) | Encoding apparatus, encoding method, and encoding program | |
JP5041062B2 (en) | Decoding device and decoding method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070201 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20091008 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20091020 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20091209 |
|
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: 20100112 |
|
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: 20100125 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130212 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130212 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |