JP2014068247A - Code amount calculation device and program and moving image encoder and program - Google Patents
Code amount calculation device and program and moving image encoder and program Download PDFInfo
- Publication number
- JP2014068247A JP2014068247A JP2012212926A JP2012212926A JP2014068247A JP 2014068247 A JP2014068247 A JP 2014068247A JP 2012212926 A JP2012212926 A JP 2012212926A JP 2012212926 A JP2012212926 A JP 2012212926A JP 2014068247 A JP2014068247 A JP 2014068247A
- Authority
- JP
- Japan
- Prior art keywords
- binary code
- code amount
- code string
- section width
- width
- 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)
Abstract
Description
本発明は、符号量計算装置及びプログラム、並びに、動画像符号化装置及びプログラムに関し、例えば、H.264/MPEG−4AVC等の動画像符号化技術による動画像圧縮符号の処理に適用できる。 The present invention relates to a code amount calculation device and program, and a moving image encoding device and program. The present invention can be applied to processing of a moving image compression code by a moving image encoding technique such as H.264 / MPEG-4AVC.
従来、H.264/MPEG−4AVC(以下、単に「H.264」と呼ぶ)等に代表される映像符号化技術による映像情報の圧縮符号化処理では、入力された画像を分割した処理単位毎に、動き補償予測等を行った予測画像と、入力された画像との差分である予測残差信号に、離散コサイン変換等の空間変換を施した変換係数を量子化し、さらに、これを算術符号等のエントロピー符号化することによって高効率の映像圧縮を実現している。 Conventionally, H.M. In video information compression encoding processing using video encoding technology represented by H.264 / MPEG-4AVC (hereinafter simply referred to as “H.264”), motion compensation is performed for each processing unit obtained by dividing an input image. The prediction residual signal that is the difference between the predicted image that has been predicted and the input image is quantized with a transform coefficient obtained by performing spatial transformation such as discrete cosine transformation, and this is further entropy code such as arithmetic code To achieve highly efficient video compression.
そして、従来の量子化処理により量子化雑音が発生した場合、復号側で再生される復号画像に歪が生じるが、量子化することによって、符号化すべき情報量が削減される。そして、従来の量子化処理では、量子化された係数情報等は算術符号等のエントロピー符号化により、情報の発生確率に応じた符号量となるように符号化される。例えば、H.264ではCABAC(Context−based Adaptive Binary Arithmetic Coding)と呼ばれるコンテキスト適応2値算術符号等が使用されている。 When quantization noise is generated by the conventional quantization process, distortion occurs in the decoded image reproduced on the decoding side, but the amount of information to be encoded is reduced by quantization. In the conventional quantization process, quantized coefficient information and the like are encoded by entropy encoding such as an arithmetic code so as to have a code amount corresponding to the occurrence probability of information. For example, H.M. In H.264, a context adaptive binary arithmetic code called CABAC (Context-based Adaptive Binary Arithmetic Coding) is used.
従来の映像符号化技術では、このような歪と符号量(レート)のトレードオフを評価し、符号化モード選択等に利用する技術としてレート歪最適化技術がある。レート歪最適化技術とは、複数の符号化モード等の選択肢について、その選択肢を選択した場合に得られる復号画像の対象画像に対する歪Dと、その選択肢で符号化したときに発生する符号量Rと、ラグランジュ乗数λで表されるRDコストJ(J=D+λR)を最小化するような選択をすることによって、レートと歪のトレードオフが最適な符号化をする方法である。 In the conventional video encoding technique, there is a rate distortion optimization technique as a technique for evaluating such a trade-off between distortion and code amount (rate) and using it for selecting an encoding mode. The rate distortion optimization technique refers to a distortion D with respect to a target image of a decoded image obtained when the option is selected, and a code amount R generated when the option is encoded. Thus, by selecting such that the RD cost J (J = D + λR) represented by the Lagrangian multiplier λ is minimized, the rate / distortion tradeoff is the optimum encoding method.
例えば、ある符号化単位(H.264ではマクロブロック等)で複数ある符号化モード候補(イントラモード、インターモード、スキップモード等〉からの選択を行う場合に、その選択肢で符号化したときに発生する符号量Rを計算する。この場合、従来技術では、実際に符号化してみることによって符号量を求める必要がある。また、その他にも、特許文献1の記載技術のように、コンテキスト変数が表す確率状態ごとに対応する符号量をテーブル引きにより求め、テーブル引きの結果を累積加算することで符号量を推定する方法がある。 For example, when selecting from a plurality of encoding mode candidates (intra mode, inter mode, skip mode, etc.) in a certain encoding unit (macroblock, etc. in H.264), it occurs when encoding with that option In this case, in the prior art, it is necessary to obtain the code amount by actually encoding.In addition, as in the technique described in Patent Document 1, the context variable may be There is a method of estimating a code amount by obtaining a code amount corresponding to each probability state to be represented by table lookup and cumulatively adding the table lookup results.
しかしながら、従来の符号化技術のように実際に符号化を行ってみる方法では、出力されるビットパターンを求める処理等の演算量が多く処理の無駄が多い。さらに、従来技術では、符号量として整数精度のビット数しか得られず、算術符号がもつ整数符号長でない符号化が可能である特徴をモード選択等に有効に反映できない。 However, in the method of actually performing the encoding as in the conventional encoding technique, the amount of calculation such as processing for obtaining the output bit pattern is large, and the processing is wasted. Furthermore, in the prior art, only the number of bits with integer precision can be obtained as the code amount, and the feature that enables encoding that is not the integer code length of the arithmetic code cannot be effectively reflected in mode selection or the like.
また、特許文献1の記載技術のように、符号量テーブルを用いて加算していく方法では、算術符号の区間幅の分布に関する近似が用いられているために精度の高い符号量の推定ができず、より符号化効率の高い最適な選択がなされない場合があるという課題があった。 In addition, in the method of adding using a code amount table as in the technique described in Patent Document 1, since the approximation related to the distribution of the interval width of the arithmetic code is used, it is possible to estimate the code amount with high accuracy. Therefore, there has been a problem that optimal selection with higher encoding efficiency may not be made.
上述のような課題に鑑みて、動画像を符号化する際の符号量を効率的に求めることができる符号量計算装置及びプログラム、並びに、動画像符号化装置及びプログラムが望まれている。 In view of the above-described problems, a code amount calculation device and program, and a moving image encoding device and program capable of efficiently obtaining a code amount when encoding a moving image are desired.
第1の本発明は、動画像を構成する対象画像と上記対象画像の予測画像との残差信号や予測情報等の符号化情報に係る2値符号列の系列と、上記符号化情報に係る2値符号列のそれぞれの確率状態を表すコンテキスト変数の系列とに基づいて、上記符号化情報のエントロピー符号化を行うエントロピー符号化手段を用いて、上記動画像の符号化を行う場合に、上記エントロピー符号化手段で出力する符号の符号量を計算する符号量計算装置において、(1)上記2値符号列の系列に係る処理開始時での初期区間幅を記憶する初期区間幅記憶手段と、(2)上記初期区間幅を初期値とし、上記2値符号列の系列に応じて更新される区間幅を保持する区間幅保持手段と、(3)上記2値符号列の系列及び上記コンテキスト変数の系列に応じて、上記区間幅保持手段の区間幅の状態遷移を制御する2値符号列処理手段と、(4)上記2値符号列処理手段が、正規化処理によって区間幅をビットシフトした回数をカウントするビットシフト回数カウント手段と、(5)上記ビットシフト回数カウント手段のカウント値と、上記初期区間幅に対応する符号量と、上記2値符号列の系列に係るすべての2値符号列の処理終了時に上記区間幅保持手段が保持する区間幅に対応する符号量とに基づいて、上記エントロピー符号化手段から出力する符号量を計算する計算手段とを有することを特徴とする。 The first aspect of the present invention relates to a sequence of binary code sequences related to encoding information such as a residual signal and prediction information between a target image constituting a moving image and a predicted image of the target image, and the encoding information. When encoding the moving image using entropy encoding means for performing entropy encoding of the encoded information based on a context variable sequence representing each probability state of the binary code string, In the code amount calculation device for calculating the code amount of the code output by the entropy encoding means, (1) an initial interval width storage means for storing an initial interval width at the start of processing related to the binary code string sequence; (2) section width holding means for setting the initial section width as an initial value and holding a section width updated in accordance with the binary code string sequence; and (3) the binary code string series and the context variable. Depending on the series A binary code string processing means for controlling the state transition of the section width of the section width holding means; and (4) the number of bit shifts for counting the number of times that the binary code string processing means has bit-shifted the section width by the normalization process. (5) a count value of the bit shift number counting means, a code amount corresponding to the initial interval width, and the interval at the end of processing of all binary code sequences related to the binary code sequence And calculating means for calculating the code amount output from the entropy encoding means based on the code amount corresponding to the section width held by the width holding means.
なお、上述の第1の本発明の符号量計算装置には、「動画像を構成する対象画像と上記対象画像の予測画像との誤差信号に係る2値符号列の系列と、上記誤差信号に係る2値符号列のそれぞれの確率状態を表すコンテキスト変数の系列とに基づいて、上記誤差信号のエントロピー符号化を行うエントロピー符号化手段を用いて、上記動画像の符号化を行う場合に、上記エントロピー符号化手段で出力する符号の符号量を計算する符号量計算装置において、(1)上記2値符号列の系列に係る処理開始時での初期区間幅を初期値とし、上記2値符号列の系列に応じて更新される区間幅を保持する区間幅保持手段と、(2)上記2値符号列の系列及び上記コンテキスト変数の系列に応じて、上記区間幅保持手段の区間幅の状態遷移を制御する2値符号列処理手段と、(3)上記2値符号列ごとに、上記区間幅保持手段で更新される区間幅をビットシフトにより正規化する処理を行う正規化処理手段と、(4)上記正規化処理手段が、ビットシフトした回数をカウントするビットシフト回数カウント手段と、(5)上記ビットシフト回数カウント手段のカウント値と、上記初期区間幅に対応する符号量と、上記2値符号列の系列に係るすべての2値符号列の処理終了時に上記区間幅保持手段が保持する区間幅に対応する符号量とに基づいて、上記エントロピー符号化手段から出力する符号量を計算する計算手段とを有することを特徴とする符号量計算装置。」が含まれる。 The code amount calculation apparatus according to the first aspect of the present invention includes: “a sequence of binary code sequences related to an error signal between a target image constituting a moving image and a predicted image of the target image; and the error signal. When encoding the moving image using entropy encoding means for performing entropy encoding of the error signal based on a sequence of context variables representing respective probability states of the binary code sequence, In the code amount calculation apparatus for calculating the code amount of the code output by the entropy encoding means, (1) an initial section width at the start of processing related to the binary code sequence is set as an initial value, and the binary code sequence (2) section width state transition of the section width holding means according to the binary code string series and the context variable series; Binary to control Sequence processing means; (3) normalization processing means for normalizing the section width updated by the section width holding means by bit shift for each of the binary code strings; and (4) the normalization. A bit shift number count unit for counting the number of times the bit shift is performed; (5) a count value of the bit shift number count unit; a code amount corresponding to the initial interval width; and a sequence of the binary code string Calculation means for calculating the code amount output from the entropy encoding means based on the code amount corresponding to the section width held by the section width holding means at the end of processing of all binary code strings according to The code amount calculation apparatus characterized by the above. "
第2の本発明は、動画像を構成する対象画像と上記対象画像の予測画像との残差信号や予測情報等の符号化情報に係る2値符号列と、上記符号化情報に係る2値符号列のそれぞれの確率状態を表すコンテキスト変数の系列とに基づいて、上記符号化情報のエントロピー符号化を行うエントロピー符号化手段と、上記エントロピー符号化手段で、動画像の符号化を行う場合に、必要となる符号量を推定する符号量計算手段とを備え、上記エントロピー符号化手段は、上記符号量計算装置の推定結果に基づいて選択された符号化情報に係る符号を出力する動画像符号化装置において、上記符号量計算手段として第1の本発明の符号量計算装置を適用したことを特徴とする。 The second aspect of the present invention is a binary code sequence related to encoding information such as a residual signal or prediction information between a target image constituting a moving image and a predicted image of the target image, and a binary code related to the encoded information. When entropy coding means for performing entropy coding of the coded information based on a sequence of context variables representing each probability state of the code string, and when encoding a moving image by the entropy coding means, A code amount calculating means for estimating a required code amount, wherein the entropy encoding means outputs a code relating to encoding information selected based on the estimation result of the code amount calculating device. In the encoding apparatus, the code amount calculation apparatus according to the first aspect of the present invention is applied as the code amount calculation means.
第3の本発明は、動画像を構成する対象画像と上記対象画像の予測画像との残差信号や予測情報等の符号化情報に係る2値符号列と、上記符号化情報に係る2値符号列のそれぞれの確率状態を表すコンテキスト変数の系列とに基づいて、上記符号化情報のエントロピー符号化を行うエントロピー符号化手段を用いて、上記動画像の符号化を行う場合に、上記エントロピー符号化手段で出力する符号の符号量を計算する符号量計算プログラムにおいて、コンピュータを、(1)上記2値符号列の系列に係る処理開始時での初期区間幅を記憶する初期区間幅記憶手段と、(2)上記初期区間幅を初期値とし、上記2値符号列の系列に応じて更新される区間幅を保持する区間幅保持手段と、(3)上記2値符号列の系列及び上記コンテキスト変数の系列に応じて、上記区間幅保持手段の区間幅の状態遷移を制御する2値符号列処理手段と、(4)上記2値符号列処理手段が、正規化処理によって区間幅をビットシフトした回数をカウントするビットシフト回数カウント手段と、(5)上記ビットシフト回数カウント手段のカウント値と、上記初期区間幅に対応する符号量と、上記2値符号列の系列に係るすべての2値符号列の処理終了時に上記区間幅保持手段が保持する区間幅に対応する符号量とに基づいて、上記エントロピー符号化手段から出力する符号量を計算する計算手段として機能させることを特徴とする。 The third aspect of the present invention is a binary code sequence related to encoding information such as a residual signal and prediction information between a target image constituting a moving image and a predicted image of the target image, and a binary code related to the encoded information. When encoding the moving image using entropy encoding means for performing entropy encoding of the encoded information based on a sequence of context variables representing each probability state of the code string, the entropy code In the code amount calculation program for calculating the code amount of the code output by the converting means, the computer includes (1) an initial interval width storage means for storing an initial interval width at the start of processing related to the binary code string sequence; (2) Section width holding means for setting the initial section width as an initial value and holding a section width updated in accordance with the binary code string sequence; and (3) the binary code string sequence and the context Variable A binary code string processing means for controlling the state transition of the section width of the section width holding means according to the sequence; and (4) the number of times that the binary code string processing means bit-shifts the section width by the normalization process. And (5) a count value of the bit shift number counting means, a code amount corresponding to the initial interval width, and all binary code strings related to the binary code string series It is made to function as calculation means for calculating the code amount output from the entropy encoding means based on the code amount corresponding to the interval width held by the interval width holding means at the end of the process.
第4の本発明の動画像符号化プログラムは、コンピュータを、(1)動画像を構成する対象画像と上記対象画像の予測画像との残差信号や予測情報等の符号化情報に係る2値符号列と、上記符号化情報に係る2値符号列のそれぞれの確率状態を表すコンテキスト変数の系列とに基づいて、上記符号化情報のエントロピー符号化を行うエントロピー符号化手段と、(2)上記エントロピー符号化手段で、動画像の符号化を行う場合に、必要となる符号量を推定する符号量計算手段として機能させ、(3)上記エントロピー符号化手段は、上記符号量計算装置の推定結果に基づいて選択された符号化情報に係る符号を出力し、(4)上記符号量計算手段は、(4−1)上記2値符号列の系列に係る処理開始時での初期区間幅を記憶する初期区間幅記憶手段と、(4−2)上記初期区間幅を初期値とし、上記2値符号列の系列に応じて更新される区間幅を保持する区間幅保持手段と、(4−3)上記2値符号列の系列及び上記コンテキスト変数の系列に応じて状態遷移を制御する2値符号列処理手段と、(4−4)上記2値符号列処理手段が、正規化処理によって区間幅をビットシフトした回数をカウントするビットシフト回数カウント手段と、(4−5)上記ビットシフト回数カウント手段のカウント値と、上記初期区間幅に対応する符号量と、上記2値符号列の系列に係るすべての2値符号列の処理終了時に上記区間幅保持手段が保持する区間幅に対応する符号量とに基づいて、上記エントロピー符号化手段から出力する符号量を計算する計算手段とを有することを特徴とする。
A moving picture coding program according to a fourth aspect of the present invention provides a computer, (1) a binary signal relating to coding information such as a residual signal and prediction information between a target image constituting a moving picture and a predicted picture of the target picture. Entropy coding means for performing entropy coding of the coded information based on the code string and a sequence of context variables representing respective probability states of the binary code string related to the coded information; (2) the above When the entropy encoding unit encodes a moving image, the entropy encoding unit functions as a code amount calculation unit that estimates a required code amount. (3) The entropy encoding unit performs the estimation result of the code amount calculation device. (4) The code amount calculation means stores (4-1) an initial interval width at the start of processing related to the binary code string sequence. Initial section width Storing means, (4-2) section width holding means for setting the initial section width as an initial value, and holding a section width updated in accordance with the sequence of the binary code string, and (4-3) the binary value. A binary code string processing means for controlling state transition in accordance with a code string series and the context variable series; and (4-4) the binary code string processing means has bit-shifted the section width by normalization processing. A bit shift number counting means for counting the number of times, (4-5) a count value of the bit shift number counting means, a code amount corresponding to the initial interval width, and all 2 relating to the binary code string series And calculating means for calculating a code amount output from the entropy encoding means based on a code amount corresponding to the section width held by the section width holding means at the end of the processing of the value code string. .
本発明によれば、動画像を符号化する際の符号量を効率的に求めることができる。 ADVANTAGE OF THE INVENTION According to this invention, the code amount at the time of encoding a moving image can be calculated | required efficiently.
(A)第1の実施形態
以下、本発明による符号量計算装置及びプログラム、並びに、動画像符号化装置及びプログラムの第1の実施形態を、図面を参照しながら詳述する。なお、第1の実施形態では、本発明の符号量計算装置を、動画像符号化装置を構成する符号量計算部として構成した例について示している。
(A) First Embodiment A code amount calculation device and program, and a moving image encoding device and program according to a first embodiment of the present invention will be described in detail below with reference to the drawings. In the first embodiment, an example is shown in which the code amount calculation device of the present invention is configured as a code amount calculation unit that constitutes a moving image encoding device.
(A−1)第1の実施形態の構成
図2は、この実施形態の動画像符号化装置1の全体構成を示すブロック図である。なお、図2において、括弧内の符号は、後述する第2の実施形態でのみ用いられる符号である。
(A-1) Configuration of the First Embodiment FIG. 2 is a block diagram showing the overall configuration of the moving picture encoding apparatus 1 of this embodiment. In FIG. 2, the reference numerals in parentheses are used only in the second embodiment to be described later.
動画像符号化装置1は、画面分割部101、空間変換部102、量子化部103、エントロピー符号化部104、逆量子化部105、逆空間変換部106、ループ内フィルタ部107、参照画像バッファ108、インター予測部109、イントラ予測部110、符号化モード選択部111、符号量計算部112、予測残差信号生成部113、及び復号画像生成部114を有している。
The moving image encoding apparatus 1 includes a
動画像符号化装置1は、プロセッサ及びメモリ等を有するコンピュータ(1台に限定されず、複数台を分散処理し得るようにしたものであっても良い。)に、実施形態の動画像符号化プログラム(実施形態の符号量計算プログラムを含む)等をインストールすることにより構築しても良く、その場合でも、機能的には上述の図2のように示すことができる。なお、図2において、符号量計算部112以外の構成について限定されないものであり、例えば、H.264等に準拠した種々の動画像符号化装置と同様のものを適用することができるため、詳細については説明省略する。
The moving picture coding apparatus 1 is a moving picture coding according to the embodiment to a computer having a processor, a memory, and the like (not limited to one, but may be configured so that a plurality of pieces can be distributedly processed). It may be constructed by installing a program (including the code amount calculation program of the embodiment) or the like, and even in that case, it can be functionally shown as in FIG. 2, the configuration other than the code
画面分割部101は、対象画像(入力画像)を、マクロブロック等の処理単位領域ごとに画面分割して、予測残差信号生成部113に供給する。
The
予測残差信号生成部113は、画面分割部101から供給される分割済の画像データとインター予測部109又はイントラ予測部110から供給される予測画像とから、予測残差信号を得て、空間変換部102に供給するものである。
The prediction residual
空間変換部102は、予測残差信号を、DCT(離散コサイン変換)やその整数近似変換等によって空間変換して変換係数を得る。そして、量子化部103は、その変換係数を、所定の量子化幅で量子化した結果として、量子化された予測残差信号を得て、エントロピー符号化部104に供給する。
The
そして、エントロピー符号化手段としてのエントロピー符号化部104は、量子化された予測残差信号とモード情報等の符号化情報についてエントロピー符号化(例えば、算術符号化等)を行って、その他の符号化情報とともに符号化ストリームのデータを生成する。この符号化ストリームのデータが、動画像符号化装置1の出力となる。
Then, the
逆量子化部105は、量子化された予測残差信号を逆量子化する。そして、逆空間変換部106は、予測残差信号が逆量子化された結果に対して、逆空間変換(逆直交変換等)を行い、量子化誤差を伴う予測残差信号を得て、復号画像生成部114に供給する。
The
復号画像生成部114は、量子化誤差を伴う予測残差信号(逆空間変換部106からの入力信号)と予測画像(インター予測部109又はイントラ予測部110からの予測画像)より復号画像を得る。復号画像生成部114は、復号画像をループ内フィルタ部107及びイントラ予測部110に供給する。
The decoded
ループ内フィルタ部107は、復号画像に対して、量子化によるブロック歪を軽減するデブロッキングフィルタ等として機能するものである。そして、ループ内フィルタ部107は、フィルタ処理した復号画像を参照画像バッファ108に供給する。
The in-
参照画像バッファ108は、ループ内フィルタ部107からのフィルタ処理した復号画像を、後続の画像の符号化時のインター予測の動き補償のための参照画像として保持する。なお、H.264/AVC標準の場合、動き補償で参照する画像は、現在符号化を行おうとしている画像の直前画像に限定されず、複数の時刻の画像が参照画像となり得る。
The
インター予測部109は、現在符号化を行おうとしている対象画像データと、参照画像バッファ108の参照画像から動き補償等の予測情報を得て予測画像データを生成するものである。イントラ予測部110は、対象画像の既に符号化され、局所復号された復号画像を用いて予測画像データを生成するものである。動画像符号化装置1では、符号化モード選択部111の制御に応じて、インター予測部109又はイントラ予測部110のいずれかを用いた予測画像データが、予測残差信号生成部113及び復号画像生成部114に供給される。
The
符号化モード選択部111は、対象画像ごとにイントラ予測に基づく符号化モード(イントラ予測部110が出力する予測画像に基づく符号化)と、インター予測に基づく符号化モード(インター予測部109が出力する予測画像に基づく符号化)のいずれかを決定する。この実施形態の動画像符号化装置1では、上述の2つの符号化モードに対応しているものとして説明するが、動画像符号化装置1が対応する符号化モードの数や種類については限定されないものである。そして、符号化モード選択部111は、複数の符号化モードから、レート歪最適化によって、RDコストが最小となるような符号化モードを選択する。このとき、符号化モード選択部111は、それぞれの符号化モードで符号化を行った場合の発生符号量Rを符号量計算部112によって求め、RDコストの算出に用いるものとする。
The encoding mode selection unit 111 includes an encoding mode based on intra prediction (encoding based on a prediction image output from the intra prediction unit 110) and an encoding mode based on inter prediction (output from the inter prediction unit 109) for each target image. Or encoding based on the predicted image to be determined). In the moving image encoding apparatus 1 of this embodiment, although it demonstrates as what respond | corresponds to the above-mentioned two encoding modes, it does not limit about the number and kind of encoding mode which the moving image encoding apparatus 1 respond | corresponds. Is. Then, the coding mode selection unit 111 selects a coding mode that minimizes the RD cost by rate distortion optimization from a plurality of coding modes. At this time, the encoding mode selection unit 111 obtains the generated code amount R when encoding is performed in each encoding mode by the code
次に、エントロピー符号化部104の内部構成について、図3を用いて説明する。
Next, the internal configuration of the
この実施形態のエントロピー符号化部104では、エントロピー符号化としてCABACのような算術符号によるエントロピー符号化を行うものとする。
In the
図3に示すように、この実施形態のエントロピー符号化部104は、2値化部201、コンテキスト計算部202、コンテキスト変数テーブル204、及び算術符号化部203を有している。
As shown in FIG. 3, the
エントロピー符号化部104では、量子化部103からの、量子化された予測残差信号である係数情報やモード情報等が、シンタックス要素として入力される。
In the
そして、そのシンタックス要素は、2値化部201により、ビンと呼ばれる2値符号列の系列に変換される。そして、コンテキスト計算部202は、シンタックス要素や周囲の符号化済み情報等に応じたコンテキストごとにビンの生起確率に関する状態を保持するコンテキスト変数テーブル204へのインデックスを求める。
Then, the syntax element is converted by the
そして、算術符号化部203は、2値化部201で生成されたビンごとに、対応するコンテキスト変数に応じた算術符号化を行い、符号化ビットストリームとして出力する。
Then, the
次に、符号量計算部112の内部構成について図1を用いて説明する。
Next, the internal configuration of the code
図1に示すように、符号量計算部112は、初期区間幅記憶部301、区間幅保持部302、ビット数カウンタ303、2値符号列処理部304、及び符号量算出部305を有している。
As shown in FIG. 1, the code
図1に示すように、符号量計算部112には、符号量を推定する符号化単位のシンタックス要素に対して、エントロピー符号化部104で生成されるのと同様のビン(2値符号列)の系列と、各ビンに対応するコンテキスト変数の系列が入力されるものとして説明する。
As shown in FIG. 1, the code
初期区間幅記憶部301は、符号量推定開始時の算術符号化部203の内部状態である区間幅情報を読み出して記憶するものである。
The initial section
区間幅保持部302は、初期区間幅で初期化され、2値符号列処理部304により更新される区間幅を保持するものである。
The section
2値符号列処理部304は、入力されるビンと、コンテキスト変数に応じて、算術符号化を実際に行う場合と同様に、区間幅保持部302の区間幅の状態遷移を制御するものである。
The binary code
ビット数カウンタ303は、区間幅を正規化によってビットシフトした回数を保持するものである。
The
符号量算出部305は、計算対象となる符号化単位の2値符号列が処理されると、ビット数カウンタ303で保持される値と、2値符号列処理部304の処理終了時の区間幅に対応する符号量の和から、初期区間幅に対応する符号量を減算して、符号化対象の符号量として出力する。
(A−2)第1の実施形態の動作
次に、以上のような構成を有する第1の実施形態の動画像符号化装置1の動作について、を説明する。
When the binary code string of the encoding unit to be calculated is processed, the code
(A-2) Operation of the First Embodiment Next, the operation of the video encoding device 1 of the first embodiment having the above configuration will be described.
上述の通り、動画像符号化装置1では、符号量計算部112以外の処理については、種々の動画像符号化装置と同様のものを適用することができるため、符号量計算部112以外の動作説明については省略する。
As described above, in the video encoding device 1, the same processing as that of various video encoding devices can be applied to the processing other than the code
以下では、符号量計算部112が、計算対象となる対象画像の符号化単位について符号量を計算するする動作の具体例について説明する。
Hereinafter, a specific example of the operation in which the code
符号量計算部112では、符号量計算対象の符号化単位の2値符号列と、各ビンに対応するコンテキスト変数の系列が入力されると、まず、初期区間幅記憶部301に初期区間幅を記憶する。初期区間幅は、実際の算術符号化を行う算術符号化部203の内部状態を読み出したものであり、対象符号化単位までに符号化を行ったことによる算術符号化器(エントロピー符号化部104)の区間幅である。
In the code
また、このとき、区間幅保持部302は、この初期区間幅で初期化される。さらに、ビット数カウンタ303も0に初期化される。
At this time, the section
そして、2値符号列処理部304は、入力される2値符号列の各ビンと対応するコンテキスト変数を用いて、実際に算術符号化を行う場合と同様に区間幅の状態遷移を処理する。
Then, the binary code
図4は、符号量計算部112(2値符号列処理部304)による各ビンの処理について示したフローチャートである。2値符号列処理部304は、各ビン(binVal)に対して、図4のフローチャートの処理を実行する。
FIG. 4 is a flowchart showing processing of each bin by the code amount calculation unit 112 (binary code string processing unit 304). The binary code
まず、ビン(binVal)とコンテキスト変数(pStateIdx,valMPS)が入力されると、2値符号列処理部304は、区間幅保持部302に保持されている区間幅(codIRange)の分割幅を求める(S101)。
First, when a bin (binVal) and a context variable (pStateIdx, valMPS) are input, the binary code
なお、区間幅はLPS(least probable symbol)とMPS(most probable symbol)のための区間に分割されているため、2値符号列処理部304は、その分割された区間幅を求めることになる(codIRangeLPS,codIRangeMPS)。すなわち、ステップS101では、区間幅保持部302に保持されている区間幅(codlRange)を分割したLPSとMPSのための区間幅(codIRangeLPS,CcodIRangeMPS)を求める。また、CABACではpStateIdxとcodIRangeの上位ビットによるテーブル引きでcodIRangeLPSを求めている。
Since the section width is divided into sections for LPS (least probable symbol) and MPS (most probable symbol), the binary code
そして、2値符号列処理部304は、今回入力されたビン(binVal)がMPSである(valMPSと等しい)か否かを判定する(S102)。2値符号列処理部304は、ステップS102で、今回入力されたビンがMPSと判定された場合後述するステップS103から動作し、MPSと判定されなかった場合(LPSだった場合)には後述するステップS107から動作する。
Then, the binary code
上述のステップS102で、今回入力されたビンがMPSと判定された場合、2値符号列処理部304は、区間幅保持部302の区間幅をMPSの区間幅に更新(codIRange=codIRangeMPS)し(S103)、さらに、コンテキスト変数の更新を行う(S104)。
If it is determined in step S102 that the bin currently input is MPS, the binary code
そして、2値符号列処理部304は、更新された区間幅が256(16進数で「0x100」)より小さくなっているか否かを確認する(S105)。
Then, the binary code
そして、2値符号列処理部304は、更新された区間幅が256より小さくなっている場合には、正規化(ビットシフト)が1回必要であるので(MPSの場合は最大1回である)、ビット数カウンタ303の値(bitCount)を1増やし(bitCount=bitCount+1)、区間幅も1ビットシフトして正規化して(codIRange=codIRange<<1)(S106)、当該ビンの処理を終了する。なお、上述のステップS105で更新された区間幅が256以上と確認された場合には、2値符号列処理部304は、当該ビンの処理を終了する。
The binary code
一方、上述のステップS102で、今回入力されたビン(binVal)がLPSと判断された場合、2値符号列処理部304は、区間幅保持部302の区間幅をLPSの区間幅に更新(codIRange=codlRangeLPS)し(S107)、さらに、コンテキスト変数の更新を行う(S108)。
On the other hand, if it is determined in step S102 that the bin (binVal) input this time is LPS, the binary code
そして、2値符号列処理部304は、区間幅が256(16進数で「0x100」)以上となるまで(正規化処理が完了するまで)、ビット数カウンタと区間幅の更新による正規化処理(上述のステップS106と同様のビットシフトの処理)を繰り返して、当該ビンに係る処理を終了する(S109、S110)。
Then, the binary code
なお、バイパス符号化(コンテキスト変数を伴わない確率1/2想定のビン)の場合は、2値符号列処理部304は、単純にビット数カウンタを1増やす(bitCount=bitCount+1)ように構成してもよい。また、バイパス符号化のビンが連続する場合は、2値符号列処理部304は、バイパス符号化ビン数mをビット数カウンタに加算(bitCount=bitCount+m)するよう構成しても良い。
In the case of bypass coding (a bin with a probability of 1/2 assuming no context variable), the binary code
以上の、図4のフローチャートの処理を入力されるビンの系列と、各ビンに対応するコンテキスト変数の系列に関して繰り返すことにより、区間幅保持部302の区間幅が、実際に算術符号化を行った場合と同様に状態遷移する。その結果、出力されるであろうビット数が、ビット数カウンタ303に保持されることになる。
The above processing of the flowchart of FIG. 4 is repeated for the input bin series and the context variable series corresponding to each bin, so that the section width of the section
符号量算出部305は、以上の処理によって求められたビット数カウンタ303の値(bitCount)と、初期区間幅記憶部301に記憶された初期区間幅(codIRangeS)と、対象系列処理後の区間幅保持部302の区間幅(codIRange)を用いて符号化対象に対する符号量を算出する。
The code
CABACでは、算術符号の区間幅は9ビット精度で表現されており以下の(1)式を満たすように正規化されている。すなわち、CABACでは算術符号の区間幅が小さいほど1ビット以下の情報がすでに符号量として発生していることに相当し、その符号量は以下の(2)式のように示すことができる。なお、(1)、(2)式で、「0x100」及び「0x200」は16進数の表現となっている。 In CABAC, the interval width of an arithmetic code is expressed with 9-bit precision and is normalized so as to satisfy the following expression (1). That is, in CABAC, as the interval width of the arithmetic code is smaller, it corresponds to the fact that information of 1 bit or less is already generated as the code amount, and the code amount can be expressed as the following equation (2). In the expressions (1) and (2), “0x100” and “0x200” are expressed in hexadecimal numbers.
0×100≦coIRange<0x200 …(1)
−log2(codIRange/0x200) …(2)
そして、区間幅に対応する符号量を図5に示すように、例えば小数点以下16ビットの固定少数で表したテーブル(以下、「符号量テーブルT」と呼ぶ)として実現できる。
0 × 100 ≦ coIRRange <0x200 (1)
-Log 2 (codIRRange / 0x200) (2)
Then, as shown in FIG. 5, the code amount corresponding to the section width can be realized, for example, as a table (hereinafter referred to as “code amount table T”) expressed by a fixed decimal having 16 bits after the decimal point.
符号量算出部305は、例えば小数点以下16ビットの固定少数として符号量Rを算出する場合、「bitCount」と、「codIRangeSとcodIRange」と、上述の符号量テーブルTとを用いて、以下の(3)式により求めることができる。そして、符号量算出部305は、求めた符号量Rを出力する。
For example, when the code amount R is calculated as a fixed decimal with 16 bits after the decimal point, the code
R=(bitCount<<16)+T[codIRange−0×100]
−T[codIRangeS−0×100] …(3)
(A−3)第1の実施形態の効果
第1の実施形態によれば、以下のような効果を奏することができる。
R = (bitCount << 16) + T [codIRrange-0 × 100]
-T [codIRRangeS-0 × 100] (3)
(A-3) Effects of First Embodiment According to the first embodiment, the following effects can be achieved.
動画像符号化装置1の符号量計算部112では、エントロピー符号化部104の算術符号化によって必要となる符号量を、実際に符号化することなく(出力ビットパターンを求める処理はせず)、整数精度より高精度に求めることができる。
The code
具体的には、符号化モード選択部111では、実際に符号化を行った場合と同様の算術符号の区間幅の遷移処理を行うので、特許文献1のテーブル引きによる処理のような近似ではない符号量が計算できる。さらに、符号化モード選択部111では、符号化開始時の初期状態、及び終了時の状態の区間幅から、整数精度より高精度な符号量を求めることができる。これにより、動画像符号化装置1では、符号化モード選択部111において、より最適な符号化モード選択が可能となり、符号化効率が向上する。 Specifically, since the encoding mode selection unit 111 performs the transition process of the section width of the arithmetic code similar to the case where the encoding is actually performed, it is not an approximation like the process by the table lookup of Patent Document 1. Code amount can be calculated. Furthermore, the encoding mode selection unit 111 can obtain a code amount with higher accuracy than integer accuracy from the section width of the initial state at the start of encoding and the state at the end. Thereby, in the moving image encoding device 1, the encoding mode selection unit 111 can select a more optimal encoding mode, and the encoding efficiency is improved.
(B)第2の実施形態
以下、本発明による符号量計算装置及びプログラム、並びに、動画像符号化装置及びプログラムの第2の実施形態を、図面を参照しながら詳述する。なお、第2の実施形態では、本発明の符号量計算装置を、動画像符号化装置を構成する符号量計算部として構成した例について示している。
(B) Second Embodiment Hereinafter, a second embodiment of a code amount calculation device and program, and a moving image coding device and program according to the present invention will be described in detail with reference to the drawings. In the second embodiment, an example is shown in which the code amount calculation device of the present invention is configured as a code amount calculation unit that constitutes a moving image encoding device.
(B−1)第2の実施形態の構成
第2の実施形態の動画像符号化装置1Aの全体構成も、上述の図2を用いて示すことができる。
(B-1) Configuration of Second Embodiment The overall configuration of the moving image encoding apparatus 1A of the second embodiment can also be shown using FIG.
そして、図6は、第2の実施形態の動画像符号化装置1Aに搭載される符号量計算部112Aの機能的構成について示したブロック図であり、上述の図1と同一又は対応する部分には同一又は対応する符号を付している。
FIG. 6 is a block diagram illustrating a functional configuration of the code
符号量計算部112Aでは、正規化回数テーブル306が追加されている点で第1の実施形態と異なっている。正規化回数テーブル306は、各ビンの区間幅に対応する正規化回数kを得ることを可能とするテーブルである。
The code
上述の通り、2値符号列処理部304が各ビンに対して処理を行う際、当該ビンがLPSの場合は正規化処理を複数回行う必要がある。第1の実施形態の2値符号列処理部304は、LPSのビンに対する正規化回数をループ処理(上述のステップS109、S110の処理)で管理していたが、第2の実施形態では、ビンごとに対応する正規化回数kを取得可能な正規化回数テーブル306を用いて管理する。
As described above, when the binary code
すなわち、2値符号列処理部304は、各ビンについて処理する際に、当該ビンがLPSの場合は、正規化回数テーブル306から当該ビンに対応する正規化回数kを取得する。そして、2値符号列処理部304は、取得した正規化回数kの回数分の正規化処理(上述のステップS110と同様の処理)を実行する。
That is, when processing each bin, if the bin is an LPS, the binary code
LPSのビンについては、更新された区間幅はcodIRangeLPSのみに依存している。したがって、符号量計算部112Aにおいて、codIRangeLPSに基づいて、ビンごとに必要な正規化回数kをあらかじめ正規化回数テーブル306として用意しておくことが可能である。
For LPS bins, the updated interval width depends only on codIrangeLPS. Therefore, the code
例えば、CABACではcodIRangeLPSが取りうる範囲に応じて限定したテーブルを用意しておくことが可能である。あるいは、codIRangeLPSを求めるテーブルに、対応する正規化回数も含めたテーブルとしておくことも可能である。 For example, in CABAC, it is possible to prepare a table limited according to the range that codIRangeLPS can take. Alternatively, the table for obtaining codIRangeLPS may be a table including the corresponding number of normalizations.
(B−2)第2の実施形態の動作
次に、以上のような構成を有する第2の実施形態の動画像符号化装置1A(符号量計算部112A)の動作について、第1の実施形態との差異を中心に説明する。
(B-2) Operation of Second Embodiment Next, the operation of the moving image coding apparatus 1A (code
図7は、符号量計算部112Aを構成する符号量計算部112A(2値符号列処理部304)による各ビンの処理について示したフローチャートである。第2の実施形態の2値符号列処理部304は、各ビン(binVal)に対して、図7のフローチャートの処理を実行する。
FIG. 7 is a flowchart showing processing of each bin by the code
図7に示すステップS201〜S208については、第1の実施形態のステップS101〜S108と同様であるので詳しい説明は省略する。 Since steps S201 to S208 shown in FIG. 7 are the same as steps S101 to S108 of the first embodiment, detailed description thereof will be omitted.
そして、第2の実施形態の符号量計算部112A(2値符号列処理部304)では、LPSのビンについて正規化する際に、第1の実施形態のようなループ処理(ステップS109、S110)ではなく、正規化回数テーブル306を用いた処理により複数回の正規化処理を実現している。
Then, the code
具体的には、2値符号列処理部304は、上述のステップS202で、処理対象となるビンがLPSと判定された場合、正規化回数テーブル306から当該ビンに対応する正規化回数k(codIRangeLPSに対応する正規化回数k)を正規化回数テーブル306から求める(S209)。そして、2値符号列処理部304は、区間幅保持部302が保持する区間幅に対して正規化回数kの回数分の正規化処理(ビットシフトの処理)を行う(S210)。
Specifically, when the bin to be processed is determined to be LPS in step S202 described above, the binary code
具体的にはステップS210において、2値符号列処理部304は、正規化回数kにしたがって、ビット数カウンタ303の値をkビット分増やし(bitCount=bitCount+k)、区間幅保持部302の区間幅もkビットシフトして正規化する(codIRange=codIRange<<k)。
Specifically, in step S210, the binary code
以上の処理を入力されるビンの系列と、各ビンに対応するコンテキスト変数の系列に関して繰り返すことにより、符号量計算部112Aでは、区間幅保持部302の区間幅が、実際に算術符号化を行った場合と同様に状態遷移し、出力されるであろうビット数がビット数カウンタ303に求まる。
By repeating the above process for the input bin series and the context variable series corresponding to each bin, the code
そして、符号量算出部305は、以上の処理によって求められたビット数カウンタ303の値(bitCount)と、初期区間幅記憶部301に記憶された初期区間幅(codIRangeS)と、対象系列処理後の区間幅保持部302の区間幅(codlRange)を用いて計算対象系列に対する符号量Rを算出し出力する。
The code
(B−3)第2の実施形態の効果
第2の実施形態によれば、第1の実施形態の効果に加えて以下のような効果を奏することができる。
(B-3) Effects of Second Embodiment According to the second embodiment, the following effects can be obtained in addition to the effects of the first embodiment.
第2の実施形態の符号量計算部112では、区間幅のビットシフトによる正規化処理を、第1の実施形態のようなループ処理ではなく、テーブル引き処理とすることで、第1の実施形態よりも符号量算出に必要な処理量を低減することができる。
In the code
(C)他の実施形態
本発明は、上記の各実施形態に限定されるものではなく、以下に例示するような変形実施形態も挙げることができる。
(C) Other Embodiments The present invention is not limited to the above-described embodiments, and may include modified embodiments as exemplified below.
(C−1)上記の各実施形態では、符号量計算部は動画像符号化装置の一部を構成するものとして説明したが、符号量計算部を独立した装置(符号量計算装置)として構築するようにしてもよい。その場合、本発明の符号量計算装置の機能的構成は、図1のように示すことができる。なお、本発明の符号量計算装置は、プロセッサ及びメモリ等を有するコンピュータ(1台に限定されず、複数台を分散処理し得るようにしたものであっても良い。)に、本発明の符号量計算プログラム等をインストールすることにより構築しても良く、その場合でも、機能的には上述の図1のように示すことができる。 (C-1) In each of the above embodiments, the code amount calculation unit has been described as constituting a part of the moving image encoding device. However, the code amount calculation unit is constructed as an independent device (code amount calculation device). You may make it do. In that case, the functional configuration of the code amount calculation apparatus of the present invention can be shown as shown in FIG. Note that the code amount calculation apparatus according to the present invention is applied to a computer (not limited to one, but may be configured to be capable of distributed processing of a plurality of units) having a processor and a memory. It may be constructed by installing a quantity calculation program or the like, and even in that case, it can be functionally shown as in FIG.
(C−2)上記の実施形態では、本発明の動画像符号化装置は、H.264に基づくエントロピー符号化(CABAC)を用いる例について説明したが、算術符号化を用いるその他の種々の符号化に対応する映像符号化処理を適用するようにしてもよい。 (C-2) In the above embodiment, the moving picture coding apparatus according to the present invention is an H.264 format. Although an example using entropy coding (CABAC) based on H.264 has been described, video coding processing corresponding to various other coding using arithmetic coding may be applied.
1…動画像符号化装置11…画面分割部、102…空間変換部、103…量子化部、104…エントロピー符号化部、105…逆量子化部、106…逆空間変換部、107…ループ内フィルタ部、108…参照画像バッファ、109…インター予測部、110…イントラ予測部、111…符号化モード選択部、112…符号量計算部、113…予測残差信号生成部、114…復号画像生成部、201…2値化部、202…コンテキスト計算部、203…算術符号化部、204…コンテキスト変数テーブル、301…初期区間幅記憶部、302…区間幅保持部、303…ビット数カウンタ、304…2値符号列処理部、305…符号量算出部。
DESCRIPTION OF SYMBOLS 1 ... Moving image encoder 11 ... Screen division part, 102 ... Spatial transformation part, 103 ... Quantization part, 104 ... Entropy coding part, 105 ... Inverse quantization part, 106 ... Inverse space transformation part, 107 ... In a
Claims (6)
上記2値符号列の系列に係る処理開始時での初期区間幅を記憶する初期区間幅記憶手段と、
上記初期区間幅を初期値とし、上記2値符号列の系列に応じて更新される区間幅を保持する区間幅保持手段と、
上記2値符号列の系列及び上記コンテキスト変数の系列に応じて、上記区間幅保持手段の区間幅の状態遷移を制御する2値符号列処理手段と、
上記2値符号列処理手段が、正規化処理によって区間幅をビットシフトした回数をカウントするビットシフト回数カウント手段と、
上記ビットシフト回数カウント手段のカウント値と、上記初期区間幅に対応する符号量と、上記2値符号列の系列に係るすべての2値符号列の処理終了時に上記区間幅保持手段が保持する区間幅に対応する符号量とに基づいて、上記エントロピー符号化手段から出力する符号量を計算する計算手段と
を有することを特徴とする符号量計算装置。 A sequence of binary code sequences related to encoded information such as a residual signal and prediction information of a target image constituting a moving image and a predicted image of the target image, and a binary code sequence related to the encoded information When the moving image is encoded using the entropy encoding unit that performs entropy encoding of the encoding information based on the context variable sequence representing the probability state, the entropy encoding unit outputs the encoded moving image. In the code amount calculation device for calculating the code amount of the code,
Initial interval width storage means for storing an initial interval width at the start of processing related to the binary code string sequence;
Section width holding means for setting the initial section width as an initial value and holding a section width updated according to the sequence of the binary code string;
Binary code string processing means for controlling the state transition of the section width of the section width holding means in accordance with the binary code string series and the context variable series;
The binary code string processing means counts the number of times the section width is bit-shifted by normalization processing;
The count value of the bit shift number counting means, the code amount corresponding to the initial interval width, and the interval held by the interval width holding means at the end of processing of all binary code strings related to the binary code string sequence A code amount calculation apparatus comprising: a calculation unit that calculates a code amount output from the entropy encoding unit based on a code amount corresponding to a width.
上記2値符号列処理手段は、上記2値符号列に係る区間幅ごとに、上記正規化回数情報保持手段で保持されている情報に基づいた回数分のビットシフトにより正規化処理を行い、
上記ビットシフト回数カウント手段は、上記2値符号列に係る区間幅ごとに、上記正規化回数保持手段で保持されている情報に基づいた回数をカウンタ値に加算する
ことを特徴とする請求項1に記載の符号量計算装置。 A normalization number information holding means for holding information capable of acquiring a normalization number corresponding to each interval width related to the binary code string;
The binary code string processing means performs a normalization process by a bit shift for the number of times based on information held in the normalization number information holding means for each interval width related to the binary code string,
The bit shift number counting means adds the number of times based on the information held in the normalized number holding means to the counter value for each section width related to the binary code string. The code amount calculation device described in 1.
上記符号量計算手段として請求項1〜3のいずれかの符号量計算装置を適用したことを特徴とする動画像符号化装置。 Probability states of a binary code string related to encoded information such as a residual signal and prediction information of a target image constituting the moving image and a predicted image of the target image, and a binary code string related to the encoded information The entropy coding means for performing entropy coding of the coding information based on the context variable sequence representing the coding information, and the amount of code required when the moving image is coded by the entropy coding means, A moving picture coding apparatus that outputs a code related to coding information selected based on an estimation result of the coding quantity calculation apparatus.
4. A moving picture coding apparatus, wherein the code quantity calculation apparatus according to claim 1 is applied as the code quantity calculation means.
コンピュータを、
上記2値符号列の系列に係る処理開始時での初期区間幅を記憶する初期区間幅記憶手段と、
上記初期区間幅を初期値とし、上記2値符号列の系列に応じて更新される区間幅を保持する区間幅保持手段と、
上記2値符号列の系列及び上記コンテキスト変数の系列に応じて、上記区間幅保持手段の区間幅の状態遷移を制御する2値符号列処理手段と、
上記2値符号列処理手段が、正規化処理によって区間幅をビットシフトした回数をカウントするビットシフト回数カウント手段と、
上記ビットシフト回数カウント手段のカウント値と、上記初期区間幅に対応する符号量と、上記2値符号列の系列に係るすべての2値符号列の処理終了時に上記区間幅保持手段が保持する区間幅に対応する符号量とに基づいて、上記エントロピー符号化手段から出力する符号量を計算する計算手段と
して機能させることを特徴とする符号量計算プログラム。 Probability states of a binary code string related to encoded information such as a residual signal and prediction information of a target image constituting the moving image and a predicted image of the target image, and a binary code string related to the encoded information When encoding the moving image using the entropy encoding unit that performs entropy encoding of the encoding information based on the context variable sequence that represents the code of the code output by the entropy encoding unit In the code amount calculation program for calculating the code amount,
Computer
Initial interval width storage means for storing an initial interval width at the start of processing related to the binary code string sequence;
Section width holding means for setting the initial section width as an initial value and holding a section width updated according to the sequence of the binary code string;
Binary code string processing means for controlling the state transition of the section width of the section width holding means in accordance with the binary code string series and the context variable series;
The binary code string processing means counts the number of times the section width is bit-shifted by normalization processing;
The count value of the bit shift number counting means, the code amount corresponding to the initial interval width, and the interval held by the interval width holding means at the end of processing of all binary code strings related to the binary code string sequence A code amount calculation program that functions as a calculation unit that calculates a code amount output from the entropy encoding unit based on a code amount corresponding to a width.
動画像を構成する対象画像と上記対象画像の予測画像との残差信号や予測情報等の符号化情報に係る2値符号列と、上記符号化情報に係る2値符号列のそれぞれの確率状態を表すコンテキスト変数の系列とに基づいて、上記符号化情報のエントロピー符号化を行うエントロピー符号化手段と、
上記エントロピー符号化手段で、動画像の符号化を行う場合に、必要となる符号量を推定する符号量計算手段として機能させ、
上記エントロピー符号化手段は、上記符号量計算装置の推定結果に基づいて選択された符号化情報に係る符号を出力し、
上記符号量計算手段は、
上記2値符号列の系列に係る処理開始時での初期区間幅を記憶する初期区間幅記憶手段と、
上記初期区間幅を初期値とし、上記2値符号列の系列に応じて更新される区間幅を保持する区間幅保持手段と、
上記2値符号列の系列及び上記コンテキスト変数の系列に応じて上記区間幅保持手段の区間幅の状態遷移を制御する2値符号列処理手段と、
上記2値符号列処理手段が、正規化処理によって区間幅をビットシフトした回数をカウントするビットシフト回数カウント手段と、
上記ビットシフト回数カウント手段のカウント値と、上記初期区間幅に対応する符号量と、上記2値符号列の系列に係るすべての2値符号列の処理終了時に上記区間幅保持手段が保持する区間幅に対応する符号量とに基づいて、上記エントロピー符号化手段から出力する符号量を計算する計算手段とを有する
ことを特徴とする動画像符号化プログラム。 Computer
Probability states of a binary code string related to encoded information such as a residual signal and prediction information of a target image constituting the moving image and a predicted image of the target image, and a binary code string related to the encoded information Entropy encoding means for performing entropy encoding of the encoded information based on a sequence of context variables representing
When encoding the moving image with the entropy encoding unit, the entropy encoding unit functions as a code amount calculation unit that estimates a required code amount,
The entropy encoding means outputs a code related to encoding information selected based on the estimation result of the code amount calculation device,
The code amount calculation means includes:
Initial interval width storage means for storing an initial interval width at the start of processing related to the binary code string sequence;
Section width holding means for setting the initial section width as an initial value and holding a section width updated according to the sequence of the binary code string;
Binary code string processing means for controlling state transition of the section width of the section width holding means in accordance with the binary code string series and the context variable series;
The binary code string processing means counts the number of times the section width is bit-shifted by normalization processing;
The count value of the bit shift number counting means, the code amount corresponding to the initial interval width, and the interval held by the interval width holding means at the end of processing of all binary code strings related to the binary code string sequence A moving picture encoding program comprising: a calculation unit that calculates a code amount output from the entropy encoding unit based on a code amount corresponding to a width.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012212926A JP2014068247A (en) | 2012-09-26 | 2012-09-26 | Code amount calculation device and program and moving image encoder and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012212926A JP2014068247A (en) | 2012-09-26 | 2012-09-26 | Code amount calculation device and program and moving image encoder and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2014068247A true JP2014068247A (en) | 2014-04-17 |
Family
ID=50744231
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012212926A Pending JP2014068247A (en) | 2012-09-26 | 2012-09-26 | Code amount calculation device and program and moving image encoder and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2014068247A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017123513A (en) * | 2016-01-05 | 2017-07-13 | 日本電信電話株式会社 | Image coding method, image encoder and image coding program |
-
2012
- 2012-09-26 JP JP2012212926A patent/JP2014068247A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017123513A (en) * | 2016-01-05 | 2017-07-13 | 日本電信電話株式会社 | Image coding method, image encoder and image coding program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6730187B2 (en) | Data encoding and decoding | |
TWI685245B (en) | Data encoding and decoding | |
JP4354520B2 (en) | Encoder | |
JP6400092B2 (en) | Data encoding and decoding | |
JP5492206B2 (en) | Image encoding method and image decoding method, and image encoding device and image decoding device | |
JP5139542B2 (en) | Two-pass quantization for CABAC coders | |
JP2023052667A (en) | dependent quantization | |
JP4949462B2 (en) | Code amount estimation method, apparatus, program thereof, and recording medium | |
KR102020101B1 (en) | Method and apparatus for syntax element encoding in a video codec | |
JP2017118549A (en) | Data encoding and decoding | |
JP4819940B2 (en) | Video encoding device | |
JP2018056685A (en) | Image encoder, image encoding method and image encoding program, and image decoder, image decoding method and image decoding program | |
US20140286417A1 (en) | Data encoding and decoding | |
TWI650012B (en) | Apparatus, method, and storage medium for data encoding and decoding | |
JP6476900B2 (en) | Moving picture coding apparatus, moving picture coding method, and computer program for moving picture coding | |
JP5231243B2 (en) | Encoding apparatus and encoding method | |
US20080144721A1 (en) | Video coding apparatus | |
KR101652183B1 (en) | Coding syntax elements using vlc codewords | |
JP6708211B2 (en) | Moving picture coding apparatus, moving picture coding method, and recording medium storing moving picture coding program | |
JP2009021775A (en) | Coder and coding method | |
JP2007074337A (en) | Coding device and method therefor | |
JP2014068247A (en) | Code amount calculation device and program and moving image encoder and program | |
JP6402520B2 (en) | Encoding apparatus, method, program, and apparatus | |
JP6497100B2 (en) | Video encoding apparatus, method and program | |
GB2496193A (en) | Context adaptive data encoding and decoding |