JP4241417B2 - Arithmetic decoding device and arithmetic decoding program - Google Patents

Arithmetic decoding device and arithmetic decoding program Download PDF

Info

Publication number
JP4241417B2
JP4241417B2 JP2004028423A JP2004028423A JP4241417B2 JP 4241417 B2 JP4241417 B2 JP 4241417B2 JP 2004028423 A JP2004028423 A JP 2004028423A JP 2004028423 A JP2004028423 A JP 2004028423A JP 4241417 B2 JP4241417 B2 JP 4241417B2
Authority
JP
Japan
Prior art keywords
information
context variable
decoding
unit
variable information
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 - Lifetime
Application number
JP2004028423A
Other languages
Japanese (ja)
Other versions
JP2005223533A (en
Inventor
智 坂爪
徹 熊倉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP2004028423A priority Critical patent/JP4241417B2/en
Publication of JP2005223533A publication Critical patent/JP2005223533A/en
Application granted granted Critical
Publication of JP4241417B2 publication Critical patent/JP4241417B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

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

Description

本発明は、算術復号を利用する画像、映像、音声などの復号化において用いられる算術復号化装置、および算術復号化プログラムに関するものである。   The present invention relates to an arithmetic decoding device and an arithmetic decoding program used in decoding of images, video, audio, and the like using arithmetic decoding.

従来、MPEGに代表される動画像符号化においては、ビットストリーム出力時に用いられるエントロピー符号化として、可変長符号化であるVLC(Variable Length Code)が用いられている。VLCはハフマン符号化の手法に基づいて行われるため、符号化効率を向上させようとするとハフマンテーブルの増大を引き起こす(非特許文献1)など、いくつかの問題を生じることが知られている。そこで近年VLCに代わり、JBIG(非特許文献2)ではQM-Coder、JPEG2000(非特許文献3)ではEBCOT、ITU-T H.264(非特許文献4)(以降、AVCと称す)ではVLCの他にCABAC(Context-based Adaptive Binary Arithmetic Coding)などといった各種の算術符号化・復号化の手法が採用されている。   Conventionally, in moving picture coding represented by MPEG, VLC (Variable Length Code), which is variable length coding, is used as entropy coding used when a bitstream is output. Since VLC is performed based on a Huffman coding method, it is known that several problems such as causing an increase in the Huffman table (Non-Patent Document 1) are caused when an attempt is made to improve the coding efficiency. Therefore, in recent years, instead of VLC, JBIG (Non-Patent Document 2) uses QM-Coder, JPEG2000 (Non-Patent Document 3) uses EBCOT, and ITU-T H.264 (Non-Patent Document 4) (hereinafter referred to as AVC) uses VLC. In addition, various arithmetic coding / decoding methods such as CABAC (Context-based Adaptive Binary Arithmetic Coding) are adopted.

基本的な算術符号化および復号化であるエリアス符号化・復号化の概念を、図7に示す。算術符号化および復号化では、一般に下限値0以上、上限値1未満の実数直線を考える。この区間を初期のrangeとする。   The concept of alias coding / decoding, which is basic arithmetic coding and decoding, is shown in FIG. In arithmetic coding and decoding, in general, a real line with a lower limit value of 0 or more and an upper limit value of less than 1 is considered. This interval is the initial range.

算術符号化においては、優勢シンボル(以降、MPSと称す)、劣勢シンボル(以降、LPSと称す)の発生確率に基づいて実数直線を分割する。分割した領域をそれぞれrMPS、rLPSとする。その後、符号化出力対象となるシンボルが属する領域を選択する。ここでは仮にrMPSを選択したとする。その後、選択したrMPSを次のrangeとし、このrangeに対して同様にrMPS、rLPSに分割し、符号化出力対象となる領域を選択する。この動作を符号化出力対象が無くなるまで繰り返し、最終的に特定された領域であるrangeの範囲内に収まる値を出力値valueとして出力することで符号化が完了する。通常はrangeの下限値を出力値valueとして出力する。   In arithmetic coding, a real line is divided based on the occurrence probability of a dominant symbol (hereinafter referred to as MPS) and an inferior symbol (hereinafter referred to as LPS). Let the divided areas be rMPS and rLPS, respectively. Thereafter, a region to which a symbol to be encoded output belongs is selected. Here, it is assumed that rMPS is selected. Thereafter, the selected rMPS is set as the next range, and this range is similarly divided into rMPS and rLPS, and an area to be encoded is selected. This operation is repeated until there are no encoding output targets, and the value that falls within the range of the range that is finally specified is output as the output value value, thereby completing the encoding. Normally, the lower limit value of the range is output as the output value value.

また、算術復号化においては、算術符号化において出力された出力値valueを復号するための値を入力値valueとすると、算術符号化と同様にMPS、LPSの発生確率に基づいて実数直線を分割する。その後、入力値valueが含まれる領域を特定する。ここではrMPSが選択され、この領域に対応するシンボルを復号シンボルとして出力する。この動作を繰り返すことで、必要な復号シンボル列を得ることができる。   Also, in arithmetic decoding, if the value to decode the output value value output in arithmetic encoding is the input value value, the real line is divided based on the occurrence probability of MPS and LPS as in arithmetic encoding. To do. Thereafter, an area including the input value value is specified. Here, rMPS is selected, and a symbol corresponding to this area is output as a decoded symbol. By repeating this operation, a necessary decoded symbol string can be obtained.

上述の基本的な算術符号化・復号化は、区間のrangeや入力・出力値であるvalueが実数値であり、演算精度の問題から現実的ではない。そこで実数直線を有限のビット幅を持つ整数区間とし、特定した区間の幅であるrangeと特定した区間の下限値であるvalueに対して正規化処理を導入することで問題を解決している。正規化処理は、左シフト演算により行われ、この正規化処理によって、rangeとvalueの演算精度を確保している。   The basic arithmetic coding / decoding described above is not practical because the range of the section and the value that is the input / output value are real values, and it is not practical due to the problem of calculation accuracy. Therefore, the real line is an integer interval having a finite bit width, and the problem is solved by introducing a normalization process to the range that is the width of the specified interval and the value that is the lower limit value of the specified interval. The normalization process is performed by a left shift operation, and the calculation accuracy of range and value is ensured by this normalization process.

現在一般的に利用されているQM-Coder、EBCOT、CABACなどの算術符号化・復号化もこの減算シフト型の適応算術符号化・復号化に基づいて行われている。   Arithmetic encoding / decoding such as QM-Coder, EBCOT, CABAC and the like that are currently generally used is also performed based on the subtraction shift type adaptive arithmetic encoding / decoding.

また、CABACでは、複数のコンテキスト変数情報を利用して符号化効率の向上を図っており、このように符号化されたビットストリームを算術復号するために、デコーダは図8および図9に示すように構成される(詳細については後述)。   CABAC uses a plurality of context variable information to improve the encoding efficiency. In order to arithmetically decode the bit stream encoded in this way, the decoder is as shown in FIG. 8 and FIG. (Details will be described later).

コンテキスト変数情報は、算術符号化を行う際に利用される確率の状態であるステート情報(以降、pStateIdxと記す)と、優勢シンボル情報(以降、valMPSと記す)とから構成される。複数のコンテキスト変数情報を特定するために、それぞれコンテキスト変数情報の構造に対してコンテキストインデックス(以降、ctxIdxと記す)が付与される。ここで、優勢シンボルとは、あるシンボル系列を算術符号化している場合において、現在までに符号化した0,1のバイナリシンボルのうち、どちらのシンボルが多く発生したかを表す。   The context variable information includes state information (hereinafter referred to as pStateIdx) that is a probability state used when performing arithmetic coding, and dominant symbol information (hereinafter referred to as valMPS). In order to specify a plurality of pieces of context variable information, a context index (hereinafter referred to as ctxIdx) is assigned to the structure of the context variable information. Here, the dominant symbol represents which of the 0 and 1 binary symbols encoded up to the present when a certain symbol sequence is arithmetically encoded.

算術符号化においては、一般に、各シンボルの生起確率を利用して0から1までの位置と区間幅を特定することで入力シンボル列を符号化する。この各シンボルの生起確率が予め正確に判っている場合に、入力シンボル列のエントロピーに最も近い状態で符号化できる。しかし、入力シンボル列がリアルタイムに入力される場合には、この各入力シンボルの生起確率を正確に特定することは難しい。この特定された各入力シンボルの生起確率と実際の生起確率との違いが大きいほど符号化効率は低下することになる。   In arithmetic coding, generally, an input symbol string is coded by specifying a position from 0 to 1 and a section width using the occurrence probability of each symbol. When the occurrence probability of each symbol is known accurately in advance, encoding can be performed in a state closest to the entropy of the input symbol string. However, when the input symbol string is input in real time, it is difficult to accurately specify the occurrence probability of each input symbol. The greater the difference between the occurrence probability of each identified input symbol and the actual occurrence probability, the lower the coding efficiency.

入力シンボル系列が複数のシンボル系列の連続で構成されているものや、入力シンボル系列における各シンボルの生起確率に変化があるものをリアルタイムに算術符号化を行うことを考えると、算術符号化を行う際に、予め決められた各入力シンボルの生起確率を利用してこの入力シンボル列の全てを符号化する場合には、入力シンボル列の生起確率の実態に即していないために、符号化効率が低下してしまう。   Performing arithmetic coding in consideration of performing real-time arithmetic coding on input symbol sequences that consist of a series of multiple symbol sequences, or on changes in the occurrence probability of each symbol in the input symbol sequence In this case, when all the input symbol sequences are encoded using the predetermined occurrence probability of each input symbol, the encoding efficiency is not matched with the actual occurrence probability of the input symbol sequence. Will fall.

算術符号化装置が入力されるシンボルに応じて適応的に生起確率を更新することができる適応型の装置である場合であっても、例えば、図10に示すように、系列A、系列B、系列C…と明らかに違ったシンボル系列の組み合わせからなる入力シンボル列を符号化する場合には、入力シンボルから推定される生起確率が収束するまでにある程度の時間がかかるため、シンボル系列の切り替えを行う際に生起確率の不整合が生じ、結果として符号化効率が低下してしまう。   Even when the arithmetic coding device is an adaptive device that can adaptively update the occurrence probability according to the input symbol, for example, as shown in FIG. When an input symbol sequence consisting of a combination of symbol sequences that is clearly different from the sequence C is encoded, it takes a certain amount of time for the occurrence probability estimated from the input symbols to converge. When performing, mismatch of occurrence probability arises, and as a result, encoding efficiency will fall.

そこで、図10に示されるように、入力シンボル列が複数のシンボル系列から構成されていることが予め分かっている場合には、それぞれの系列に対応するコンテキスト、つまり最適な生起確率を用意しておき、シンボル系列が切り替わる度に対応するコンテキストに切り替えることによって、生起確率の不整合を減らすことが可能となる。   Therefore, as shown in FIG. 10, when it is known in advance that the input symbol string is composed of a plurality of symbol sequences, a context corresponding to each sequence, that is, an optimal occurrence probability is prepared. In addition, it is possible to reduce the occurrence probability mismatch by switching to the corresponding context each time the symbol sequence is switched.

コンテキストの切り替えは、一般に所定のルールに従って制御される。CABACでは、シンタックスに従うことで各シンタックス情報に対応する少なくとも1つのコンテキスト変数情報が特定され、内部状態に応じて少なくとも1つのコンテキスト変数情報の中から適切なコンテキスト変数情報が選択される。このような細かいコンテキストの切り替え制御により、符号化効率の向上を図っている。   Context switching is generally controlled according to a predetermined rule. In CABAC, at least one context variable information corresponding to each syntax information is specified by following the syntax, and appropriate context variable information is selected from at least one context variable information according to the internal state. Encoding efficiency is improved by such fine context switching control.

なお、シンタックスとは、復号手順そのもののことを指し、復号するシンタックスエレメントをどのような順序で符号・復号するかが規定されており、また、シンタックスエレメントとは、シンタックスを構成する各要素のことを指し、シンタックスを構成する各要素の例としては、ベクトル情報、DCTによって得られるDCT係数に関する情報、各種のモード判定を行うためのフラグ情報等がある。以降、シンタックスエレメント=シンタックス情報として扱う。   Note that the syntax refers to the decoding procedure itself, and defines in what order the syntax elements to be decoded are encoded and decoded, and the syntax elements constitute the syntax. Examples of each element that refers to each element and constitutes syntax include vector information, information on DCT coefficients obtained by DCT, flag information for performing various mode determinations, and the like. Hereinafter, the syntax element is treated as syntax information.

図8は、一般的なAVCにおいて、ビットストリームをデコードしてシンタックス情報を出力する処理を行うデコーダ101の機能ブロック図である。   FIG. 8 is a functional block diagram of a decoder 101 that performs a process of decoding a bitstream and outputting syntax information in general AVC.

デコーダ101は、図8に示すように、ビットストリーム取得部102、復号位置検出部103、ビットストリームバッファ104、復号位置管理部105、シンタックス情報取得部106、シンタックス情報格納部107、および算術復号部108によって構成される。   As shown in FIG. 8, the decoder 101 includes a bit stream acquisition unit 102, a decoding position detection unit 103, a bit stream buffer 104, a decoding position management unit 105, a syntax information acquisition unit 106, a syntax information storage unit 107, and an arithmetic unit. The decoding unit 108 is configured.

ビットストリーム取得部102は、符号化されたビットストリームを取得する機能を有する。   The bit stream acquisition unit 102 has a function of acquiring an encoded bit stream.

復号位置検出部103は、ビットストリーム取得部102によって取得されたビットストリームを、復号位置管理部105より得られるスタートコードに基づいて探索し、スタートコードと一致したビットストリーム内の位置を検出することでデコードの先頭位置を特定する機能を有する。また、復号位置検出部103は、次の復号位置を特定することで復号単位を特定する機能を有する。ここでは、少なくとも1つのスライスを復号することができるビット列を復号単位として特定できるようにすることで、より良い構成となる。復号位置検出部103によって特定されたビットストリーム中のビット列は、ビットストリームバッファ104に格納される。   The decoding position detection unit 103 searches the bit stream acquired by the bit stream acquisition unit 102 based on the start code obtained from the decoding position management unit 105, and detects a position in the bit stream that matches the start code. Has a function of specifying the start position of decoding. The decoding position detection unit 103 has a function of specifying a decoding unit by specifying the next decoding position. Here, a better configuration is achieved by enabling a bit string that can decode at least one slice to be specified as a decoding unit. A bit string in the bit stream specified by the decoding position detection unit 103 is stored in the bit stream buffer 104.

ビットストリームバッファ104は、復号位置検出部103により特定されたビット列を格納する。   The bit stream buffer 104 stores the bit string specified by the decoding position detection unit 103.

復号位置管理部105は、ビットストリーム取得部102が取得する入力ビットストリーム中の復号位置を管理する機能を有する。また、復号位置管理部105は、ビットストリームバッファに格納されているビット列中の復号位置を管理する機能を有し、必要に応じて復号位置検出部103に対してスタートコードを指定してビットストリームバッファ104内のビット列を更新する。さらに、復号位置管理部105は、シンタックス情報取得部106、算術復号部108に対して、ビットストリームバッファ104内の復号位置情報を通知する機能を有する。   The decoding position management unit 105 has a function of managing the decoding position in the input bitstream acquired by the bitstream acquisition unit 102. In addition, the decoding position management unit 105 has a function of managing the decoding position in the bit string stored in the bit stream buffer, and designates a start code to the decoding position detection unit 103 as necessary to generate a bit stream. The bit string in the buffer 104 is updated. Further, the decoding position management unit 105 has a function of notifying the syntax information acquisition unit 106 and the arithmetic decoding unit 108 of the decoding position information in the bit stream buffer 104.

シンタックス情報取得部106は、復号位置管理部105から得られる復号位置情報と、ビットストリームバッファ104に格納されているビット列から、算術復号部108で符号化されたビット列よりも上位に位置するヘッダ情報を復号する機能を有し、その後、得られるシンタックス情報をシンタックス情報格納部107に通知する機能を有する。   The syntax information acquisition unit 106 is a header positioned higher than the bit sequence encoded by the arithmetic decoding unit 108 from the decoding location information obtained from the decoding location management unit 105 and the bit sequence stored in the bit stream buffer 104. It has a function of decoding information, and then has a function of notifying syntax information storage section 107 of syntax information obtained.

シンタックス情報格納部107は、シンタックス情報取得部106から得られる各種のシンタックス情報を格納し、必要に応じて、算術復号部108にシンタックス情報を通知する機能を有する。   The syntax information storage unit 107 has a function of storing various pieces of syntax information obtained from the syntax information acquisition unit 106 and notifying the arithmetic decoding unit 108 of the syntax information as necessary.

算術復号部108は、復号位置管理部105から得られる復号位置情報と、ビットストリームバッファ104に格納されているビット列から、復号位置情報によって特定されたビット列の位置から算術復号を行い、復号結果を出力シンタックス情報として出力する機能を有する。   The arithmetic decoding unit 108 performs arithmetic decoding from the position of the bit string specified by the decoding position information from the decoding position information obtained from the decoding position management unit 105 and the bit string stored in the bit stream buffer 104, and the decoding result is obtained. It has a function of outputting as output syntax information.

図11は、図8に示すデコーダ101の動作を表すフローチャートである。以下に図11を用いてデコーダ101の動作を説明する。   FIG. 11 is a flowchart showing the operation of the decoder 101 shown in FIG. The operation of the decoder 101 will be described below with reference to FIG.

デコーダ101がビットストリームの復号処理を開始すると、ビットストリーム取得部102は、復号対象となる入力ビットストリームを取得する(ステップS101)。   When the decoder 101 starts a bitstream decoding process, the bitstream acquisition unit 102 acquires an input bitstream to be decoded (step S101).

復号位置検出部103は、復号位置管理部105から復号位置を特定するために必要なスタートコードを取得し(ステップS102)、ビットストリーム取得部102が取得したビットストリームを探索し、ビット列を特定する。   The decoding position detection unit 103 acquires a start code necessary for specifying the decoding position from the decoding position management unit 105 (step S102), searches the bit stream acquired by the bit stream acquisition unit 102, and specifies a bit string. .

次に、復号位置検出部103は、ステップS102で特定したビット列をビットストリームバッファ104に格納する(ステップS103)。   Next, the decoding position detection unit 103 stores the bit string specified in step S102 in the bit stream buffer 104 (step S103).

シンタックス情報取得部106は、ビットストリームバッファ104に格納されているビット列と、復号位置管理部105から得られる復号位置情報に基づいて復号を行い、シンタックス情報を取得し(ステップS104)、そのシンタックス情報をシンタックス情報格納部116に格納する(ステップS105)。   The syntax information acquisition unit 106 performs decoding based on the bit string stored in the bit stream buffer 104 and the decoding position information obtained from the decoding position management unit 105 to acquire syntax information (step S104). The syntax information is stored in the syntax information storage unit 116 (step S105).

算術復号部108は、ビットストリームバッファ104からビット列を取得し、復号位置管理部105からビット列の復号位置情報を取得する。また、算術復号部108は、復号位置情報から特定されるビット列上の位置のビットをどのように解釈して復号するかを決定するために、シンタックス情報格納部107から必要なシンタックス情報を取得する。これらの情報を基に算術復号部108は算術復号を行い(ステップS106)、復号結果である出力シンタックス情報を順次出力し、デコーダは、ビットストリームの復号処理を終了する。   The arithmetic decoding unit 108 acquires a bit string from the bit stream buffer 104 and acquires decoding position information of the bit string from the decoding position management unit 105. Further, the arithmetic decoding unit 108 obtains necessary syntax information from the syntax information storage unit 107 in order to determine how to interpret and decode the bit at the position on the bit string specified from the decoding position information. get. Based on these pieces of information, the arithmetic decoding unit 108 performs arithmetic decoding (step S106), sequentially outputs output syntax information that is a decoding result, and the decoder ends the decoding process of the bitstream.

図9は、図8で示した算術復号部108をより詳しく示した機能ブロック図である。   FIG. 9 is a functional block diagram showing the arithmetic decoding unit 108 shown in FIG. 8 in more detail.

算術復号部108は、状態遷移管理部111、コンテキスト初期化部112、コンテキスト初期化情報格納部113、コンテキスト変数情報格納部114、ビット列カウント部115、ビット列情報管理部116、コンテキスト特定部117、2値算術復号部118、復号ビット取得部119、およびビット列比較部120によって構成される。   The arithmetic decoding unit 108 includes a state transition management unit 111, a context initialization unit 112, a context initialization information storage unit 113, a context variable information storage unit 114, a bit string count unit 115, a bit string information management unit 116, a context specification unit 117, 2 The value arithmetic decoding unit 118, the decoded bit acquisition unit 119, and the bit string comparison unit 120 are configured.

状態遷移管理部111は、シンタックスに従って現在復号しようとしているシンタックス情報を正しく復号することができるように算術復号部108内の内部状態を管理する機能を有する。この状態遷移管理部111は、コンテキスト初期化部112に対する初期化要求や、ビット列カウント部115の制御、ビット列情報管理部116の制御、コンテキスト特定部117の制御、2値算術復号化部118に対する復号開始要求を行うことで、内部状態を管理する。   The state transition management unit 111 has a function of managing the internal state in the arithmetic decoding unit 108 so that syntax information that is currently being decoded can be correctly decoded according to the syntax. The state transition management unit 111 performs an initialization request to the context initialization unit 112, control of the bit string count unit 115, control of the bit string information management unit 116, control of the context identification unit 117, and decoding to the binary arithmetic decoding unit 118. The internal state is managed by making a start request.

コンテキスト初期化部112は、状態遷移管理部111の初期化要求に応じて、算術復号を行う際に使用するコンテキスト変数情報の初期化処理を行う機能を有する。コンテキスト初期化部112は、コンテキスト初期化情報格納部113に格納されている所定の定数と、復号済みシンタックス情報を利用してコンテキスト変数情報の初期化を行う。CABACの初期化を行う際に必要となる復号済みシンタックス情報は、pic_parameter_set_rbsp()に含まれるpic_init_qp_minus26とslice_header()に含まれるslice_qp_deltaから求めるSliceQPY、slice_header()に含まれるslice_type及びcabac_init_idcである。SliceQPYやコンテキスト変数情報の詳しい初期化に関しては、後述する図14で説明するため、ここでは省略する。コンテキスト変数情報の初期化は、一般に復号単位を復号する際の先頭で行われ、CABACでは、復号単位がスライスであるため、スライスを復号する度にその先頭でコンテキスト変数情報の初期化が行われる。   The context initialization unit 112 has a function of performing initialization processing of context variable information used when performing arithmetic decoding in response to an initialization request from the state transition management unit 111. The context initialization unit 112 initializes context variable information using a predetermined constant stored in the context initialization information storage unit 113 and the decoded syntax information. Decoded syntax information required for CABAC initialization is SliceQPY and slice_type and cabac_init_idc included in slice_header () obtained from pic_init_qp_minus26 included in pic_parameter_set_rbsp () and slice_qp_delta included in slice_header (). Detailed initialization of SliceQPY and context variable information will be described later with reference to FIG. Initialization of context variable information is generally performed at the head when decoding a decoding unit. In CABAC, since the decoding unit is a slice, context variable information is initialized at the head every time a slice is decoded. .

コンテキスト初期化情報格納部113は、コンテキスト初期化部112がコンテキスト変数情報の初期化を行う際に使用する所定の定数を格納する。図12は、格納されているコンテキスト初期化情報の例として、CABACで用いる所定の定数が記述されたテーブルの一部を抜粋したものである。CABACでは、復号済みシンタックス情報から得られるslice_type、cabac_init_idc、そして各コンテキストを特定するためのctxIdxを利用して、図12に示すようなコンテキスト初期化情報のテーブルから定数m、nが特定され、コンテキスト変数情報の初期化に利用される。   The context initialization information storage unit 113 stores predetermined constants used when the context initialization unit 112 initializes context variable information. FIG. 12 is an excerpt of a part of a table in which predetermined constants used in CABAC are described as an example of stored context initialization information. In CABAC, constants m and n are identified from a table of context initialization information as shown in FIG. 12, using slice_type obtained from decrypted syntax information, cabac_init_idc, and ctxIdx for identifying each context. Used to initialize context variable information.

コンテキスト変数情報格納部114は、コンテキスト初期化部112の初期化処理によって求められたコンテキスト変数情報を格納する。このコンテキスト変数情報格納部114に格納されるコンテキスト変数情報は、2値算術復号化部118の復号結果に応じて変更される。図9の構成では、コンテキスト変数情報の更新はコンテキスト特定部117を介して行われるが、一般に2値算術復号化部118が直接コンテキスト変数情報格納部114の内容を変更することができるような構成をとることも可能である。   The context variable information storage unit 114 stores the context variable information obtained by the initialization process of the context initialization unit 112. The context variable information stored in the context variable information storage unit 114 is changed according to the decoding result of the binary arithmetic decoding unit 118. In the configuration of FIG. 9, the context variable information is updated via the context specifying unit 117. In general, the binary arithmetic decoding unit 118 can directly change the contents of the context variable information storage unit 114. It is also possible to take

ビット列カウント部115は、現在復号しようとしているビットがビット列中のどの位置に対応するかをカウントする機能を有する。これは、復号するビット位置によってビットの発生確率が違うことから、ビット位置に応じたコンテキスト変数情報を対応付ける必要があるためである。   The bit string count unit 115 has a function of counting which position in the bit string the bit currently being decoded corresponds to. This is because the occurrence probability of a bit differs depending on the bit position to be decoded, and therefore context variable information corresponding to the bit position needs to be associated.

ビット列情報管理部116は、復号しようとしているシンタックス情報の候補となる情報をビット列表記した情報に変換して対応付けを行う機能を有する。この対応関係は、ビット列比較部120によって利用される。   The bit string information management unit 116 has a function of converting information that becomes syntax information candidates to be decoded into information expressed in bit strings and performing association. This correspondence is used by the bit string comparison unit 120.

コンテキスト特定部117は、復号しようとしているビットのコンテキスト変数情報を特定するためのctxIdxを、状態遷移管理部111から得られる現在復号しようとしているシンタックス情報の種類に関する情報、ビット列カウント部115から得られる現在復号しようとしているビット列中のビット位置、復号済みシンタックス情報に基づいて特定する機能を有する。   The context specifying unit 117 obtains, from the bit string count unit 115, information regarding the type of syntax information that is to be decoded currently obtained from the state transition management unit 111, and ctxIdx for specifying the context variable information of the bit that is to be decoded. And a function of specifying based on the bit position in the currently decoded bit string and the decoded syntax information.

2値算術復号部118は、コンテキスト特定部117により特定されたコンテキスト変数情報を利用して算術復号を行う機能を有する。算術復号によって状態が変化したコンテキスト変数情報は、順次コンテキスト変数情報格納部114に格納される。図9においては、コンテキスト特定部117を介して行われる。また、2値算術復号部118は、算術復号時に正規化によりビットストリームからのビット補充が必要な場合には、復号ビット取得部119から必要なビットを補充する。   The binary arithmetic decoding unit 118 has a function of performing arithmetic decoding using the context variable information specified by the context specifying unit 117. The context variable information whose state has been changed by arithmetic decoding is sequentially stored in the context variable information storage unit 114. In FIG. 9, this is performed via the context specifying unit 117. The binary arithmetic decoding unit 118 supplements necessary bits from the decoded bit acquisition unit 119 when it is necessary to replenish bits from the bitstream by normalization during arithmetic decoding.

復号ビット取得部119は、2値算術復号化部118のビット要求に応じてビットストリームと復号位置情報を用いて取得する機能を有する。   The decoded bit acquisition unit 119 has a function of acquiring a bit stream and decoding position information in response to a bit request from the binary arithmetic decoding unit 118.

ビット列比較部120は、2値算術復号化部118の出力結果を保持し、ビット列情報管理部116で用意されているビット列情報との比較を行う機能を有する。ビット列情報中に等しいものが存在した場合は、ビット列比較部120は、等しいビット列情報に対応するシンタックス情報を取得して出力シンタックス情報として出力し、保持していた2値算術復号化部118の出力結果を初期化して次のシンタックス情報の復号に備える。また、ビット列比較部120は、必要に応じて状態遷移管理部111に出力シンタックス情報を通知する。   The bit string comparison unit 120 has a function of holding the output result of the binary arithmetic decoding unit 118 and comparing with the bit string information prepared by the bit string information management unit 116. If there is an equal bit string information, the bit string comparison unit 120 acquires syntax information corresponding to the equal bit string information, outputs the syntax information as output syntax information, and holds the held binary arithmetic decoding unit 118. Is prepared for decoding of the next syntax information. Further, the bit string comparison unit 120 notifies the state transition management unit 111 of output syntax information as necessary.

図13は、CABACの復号単位である1スライス分の復号動作を表すフローチャートである。以下に図13を用いて算術復号部108の動作を説明する。   FIG. 13 is a flowchart showing a decoding operation for one slice, which is a CABAC decoding unit. The operation of the arithmetic decoding unit 108 will be described below using FIG.

CABACの復号を開始すると、状態遷移管理部111は、復号する対象となるシンタックス情報がスライスにおける最初のシンタックス情報であるかを判定し、(ステップS111)。最初のシンタックス情報である場合は、コンテキスト初期化部112に対して初期化要求を、2値算術復号化部118に対して初期化要求を行う。最初のシンタックス情報ではない場合は、ステップS114の処理へ移行する。   When CABAC decoding is started, the state transition management unit 111 determines whether the syntax information to be decoded is the first syntax information in the slice (step S111). In the case of the first syntax information, an initialization request is made to the context initialization unit 112, and an initialization request is made to the binary arithmetic decoding unit 118. If it is not the first syntax information, the process proceeds to step S114.

コンテキスト初期化部112は、状態遷移管理部111から初期化要求がされると、コンテキスト変数情報の初期化を行う(ステップS112)。このコンテキスト変数情報の初期化に関しては、後述する図14で詳しく説明するため、ここでは省略する。   When the initialization request is received from the state transition management unit 111, the context initialization unit 112 initializes context variable information (step S112). The initialization of the context variable information will be described in detail later with reference to FIG.

2値算術復号化部118は、状態遷移管理部111から初期化要求がされると、rangeを所定の値に初期化し、valueを復号ビット取得部119から取得したビットで初期化する(ステップS113)。   When the initialization request is received from the state transition management unit 111, the binary arithmetic decoding unit 118 initializes the range to a predetermined value and initializes the value with the bit acquired from the decoded bit acquisition unit 119 (step S113). ).

次に、状態遷移管理部111が、ビット列情報管理部116に対して現在復号しようとするシンタックス情報の候補となる情報をビット列表記した情報に変換して対応付けるよう要求すると、この要求に基づいて、ビット列情報管理部116は、ビット列情報を作成する(ステップS114)。   Next, when the state transition management unit 111 requests the bit string information management unit 116 to convert information associated with syntax information candidates to be currently decoded into information represented by bit strings, the state transition management unit 111 is based on this request. The bit string information management unit 116 creates bit string information (step S114).

また、ビット列カウント部115は、ビット列カウント部115内のビット列カウンタbinIdxを−1に初期化する(ステップS115)。   Further, the bit string count unit 115 initializes the bit string counter binIdx in the bit string count unit 115 to −1 (step S115).

次に、ビット列カウント部115は、ビット列カウント部115内のビット列カウンタbinIdxを1増加する(ステップS116)。   Next, the bit string count unit 115 increments the bit string counter binIdx in the bit string count unit 115 by 1 (step S116).

次に、状態遷移管理部111がコンテキスト判定部117に対して復号で使用するコンテキスト変数情報を特定するためのctxIdxを特定するように要求すると、コンテキスト判定部117は、現在復号しようとしているビットのコンテキスト変数情報を特定するためのctxIdxを、状態遷移管理部111から得られる現在復号しようとしているシンタックス情報の種類に関する情報、ビット列カウント部115から得られる現在復号しようとしているビット列中のビット位置、復号済みシンタックス情報を利用して特定する(ステップS117)。   Next, when the state transition management unit 111 requests the context determination unit 117 to specify ctxIdx for specifying the context variable information used in decoding, the context determination unit 117 determines the bit that is currently being decoded. CtxIdx for specifying the context variable information, information on the type of syntax information to be decoded currently obtained from the state transition management unit 111, the bit position in the bit string to be decoded currently obtained from the bit string count unit 115, Identification is performed using the decoded syntax information (step S117).

状態遷移管理部111が2値算術復号化部118に対して復号要求すると、2値算術復号化部118は、コンテキスト特定部117から特定されたctxIdxに基づいて得られるコンテキスト変数情報を取得し、復号を行う(ステップS118)。算術復号時に正規化によりビットストリームからのビット補充が必要な場合には、復号ビット取得部119から必要なビットを補充する。復号が完了すると、2値算術復号化部118は、復号結果をビット列比較部120に通知する。   When the state transition management unit 111 makes a decoding request to the binary arithmetic decoding unit 118, the binary arithmetic decoding unit 118 acquires context variable information obtained based on the ctxIdx specified from the context specifying unit 117, Decoding is performed (step S118). When bit supplementation from the bitstream is necessary due to normalization at the time of arithmetic decoding, necessary bits are supplemented from the decoded bit acquisition unit 119. When the decoding is completed, the binary arithmetic decoding unit 118 notifies the bit string comparison unit 120 of the decoding result.

次に、ビット列比較部120は、自己が保持している2値算術復号化部118からの出力結果と、ビット列情報管理部116に格納されているビット列情報との比較を行う(ステップS119)。ビット列情報中に等しいものが存在しない場合は、ステップS116に移行し、処理が継続される。ビット列情報中に等しいものが存在した場合は、ビット列比較部120は、等しいビット列情報に対応するシンタックス情報を取得して出力シンタックス情報として出力し、保持していた2値算術復号化部118の出力結果を初期化して次のシンタックス情報の復号に備える。また、ビット列比較部120は、必要に応じて状態遷移管理部111に出力シンタックス情報を通知する。   Next, the bit string comparison unit 120 compares the output result from the binary arithmetic decoding unit 118 held by the bit string comparison unit 120 with the bit string information stored in the bit string information management unit 116 (step S119). If there is no equal bit string information, the process proceeds to step S116 and the process is continued. If there is an equal bit string information, the bit string comparison unit 120 acquires syntax information corresponding to the equal bit string information, outputs the syntax information as output syntax information, and holds the held binary arithmetic decoding unit 118. Is prepared for decoding of the next syntax information. Further, the bit string comparison unit 120 notifies the state transition management unit 111 of output syntax information as necessary.

次に、状態遷移管理部111は、現在復号対象となっているこれから復号しようとしている次のシンタックス情報がmb_typeであり、かつステップS118の処理において得られる復号結果がI_PCMであるか否か判定する。この条件を満たす場合には、ステップS121に移行し、条件を満たさない場合には、CABACの復号を終了する。   Next, the state transition management unit 111 determines whether or not the next syntax information to be decoded that is currently the decoding target is mb_type and the decoding result obtained in the process of step S118 is I_PCM. To do. If this condition is satisfied, the process proceeds to step S121. If the condition is not satisfied, the CABAC decoding is terminated.

2値算術復号化部118は、状態遷移管理部111から初期化要求がされると、rangeを所定の値に初期化し、valueを復号ビット取得部119から取得したビットで初期化する(ステップS121)。初期化が完了すると、一連のCABACの復号処理が終了する。   When the initialization request is received from the state transition management unit 111, the binary arithmetic decoding unit 118 initializes the range to a predetermined value and initializes the value with the bit acquired from the decoded bit acquisition unit 119 (step S121). ). When the initialization is completed, a series of CABAC decoding processes are completed.

図14は、図13のコンテキスト変数情報の初期化(ステップS112)についてより詳しく説明したフローチャートである。以下に図14を用いてコンテキスト変数情報の初期化処理についてさらに説明する。   FIG. 14 is a flowchart illustrating in more detail the initialization of the context variable information (step S112) in FIG. The context variable information initialization process will be further described below with reference to FIG.

コンテキスト変数情報の初期化を開始すると、まず、状態遷移管理部111からの初期化要求に応じて、コンテキスト初期化部112は、復号済みシンタックス情報から現在復号しようとしているスライスのpic_init_qp_minus26、slice_qp_delta、slice_type、cabac_init_idcを取得する(ステップS131)。ここでは、コンテキスト初期化部112は、pic_init_qp_minus26=4、slice_qp_delta=5、slice_type=0(P slice)、cabac_init_idc=1を取得したものとする。   When the initialization of the context variable information is started, first, in response to the initialization request from the state transition management unit 111, the context initialization unit 112 selects pic_init_qp_minus26, slice_qp_delta, slice_qp_delta of the slice currently being decoded from the decoded syntax information Slice_type and cabac_init_idc are acquired (step S131). Here, it is assumed that the context initialization unit 112 has acquired pic_init_qp_minus26 = 4, slice_qp_delta = 5, slice_type = 0 (P slice), and cabac_init_idc = 1.

次に、コンテキスト初期化部112は、下記の数式に従ってSliceQPYを算出する(ステップS132)。   Next, the context initialization unit 112 calculates SliceQPY according to the following mathematical formula (step S132).

[数1]
SliceQPY=26+pic_init_qp_minus26+slice_qp_delta
=26+4+5
=35
次に、コンテキスト初期化部112は、ステップS131において取得した復号済みコンテキスト変数情報slice_type、cabac_init_idcから、初期化が必要なctxIdxを特定し、そのctxIdxに対応するm、nをコンテキスト初期化情報格納部113から取得する(ステップS133)。初期化が必要なctxIdxがctxIdx=70であるものとすると、コンテキスト初期化部112は、図12に示すコンテキスト初期化情報のテーブルに従ってm=13、n=15を取得する。
[Equation 1]
SliceQPY = 26 + pic_init_qp_minus26 + slice_qp_delta
= 26 + 4 + 5
= 35
Next, the context initialization unit 112 identifies ctxIdx that needs to be initialized from the decoded context variable information slice_type and cabac_init_idc acquired in step S131, and sets m and n corresponding to the ctxIdx to the context initialization information storage unit 113 (step S133). Assuming that ctxIdx requiring initialization is ctxIdx = 70, the context initialization unit 112 acquires m = 13 and n = 15 according to the context initialization information table shown in FIG.

次に、コンテキスト初期化部112は、ステップS132で算出されたSliceQPYと、ステップS133で取得されたm、nを用いて、下記の数式に従って、一時変数preCtxStateを算出する(ステップS134)。   Next, the context initialization unit 112 calculates a temporary variable preCtxState according to the following formula using SliceQPY calculated in step S132 and m and n acquired in step S133 (step S134).

[数2]
preCtxState=((m×SliceQPY)>>4)+n
=(13×35)>>4+15
=28+15
=43
ここで、数式中の「>>4」は、4ビットの右シフト演算を行うことを示す。
[Equation 2]
preCtxState = ((m × SliceQPY) >> 4) + n
= (13 × 35) >> 4 + 15
= 28 + 15
= 43
Here, “>> 4” in the equation indicates that a 4-bit right shift operation is performed.

次に、コンテキスト初期化部112は、一時変数preCtxStateが1より小さいかどうかを判定する(ステップS135)。   Next, the context initialization unit 112 determines whether or not the temporary variable preCtxState is smaller than 1 (step S135).

一時変数preCtxStateが1より小さい場合は、コンテキスト初期化部112は、一時変数preCtxStateに1を設定する(ステップS136)。   When the temporary variable preCtxState is smaller than 1, the context initialization unit 112 sets 1 to the temporary variable preCtxState (step S136).

一時変数preCtxStateが1より小さくない場合、または、一時変数preCtxStateに1が設定された後、コンテキスト初期化部112は、一時変数preCtxStateが126より大きいかどうかを判定する(ステップS137)。   When the temporary variable preCtxState is not smaller than 1, or after the temporary variable preCtxState is set to 1, the context initialization unit 112 determines whether the temporary variable preCtxState is larger than 126 (step S137).

一時変数preCtxStateが126より大きい場合は、コンテキスト初期化部112は、一時変数preCtxStateに126を設定する(ステップS138)。   If the temporary variable preCtxState is larger than 126, the context initialization unit 112 sets 126 to the temporary variable preCtxState (step S138).

一時変数preCtxStateが126より大きくない場合、または、一時変数preCtxStateに126が設定された後、コンテキスト初期化部112は、一時変数preCtxStateが63以下であるかを判定する(ステップS139)。   If the temporary variable preCtxState is not greater than 126, or after 126 is set in the temporary variable preCtxState, the context initialization unit 112 determines whether the temporary variable preCtxState is 63 or less (step S139).

一時変数preCtxStateが63以下でなかった場合、コンテキスト初期化部112は、現在初期化を行っているctxIdxに対応するコンテキスト変数情報の構成要素であるステート情報pStateIdxに一時変数preCtxStateから64を引いた値を設定し、また、コンテキスト初期化部112は、コンテキスト変数情報の構成要素である優勢シンボル情報valMPSに1を設定する(ステップS140)。   When the temporary variable preCtxState is not 63 or less, the context initialization unit 112 is a value obtained by subtracting 64 from the temporary variable preCtxState to the state information pStateIdx that is a component of the context variable information corresponding to the currently initialized ctxIdx In addition, the context initialization unit 112 sets 1 to the dominant symbol information valMPS, which is a component of the context variable information (step S140).

また、一時変数preCtxStateが63以下であった場合、コンテキスト初期化部112は、現在初期化を行っているctxIdxに対応するコンテキスト変数情報の構成要素であるステート情報pStateIdxに63から一時変数preCtxStateを引いた値を設定し、また、コンテキスト変数情報の構成要素である優勢シンボル情報valMPSに0を設定する(ステップS141)。ここでは、preCtxState=43であるため、
[数3]
pStateIdx=63−preCtxState
=63−43
=20
valMPS=0
となる。
If the temporary variable preCtxState is 63 or less, the context initialization unit 112 subtracts the temporary variable preCtxState from 63 to the state information pStateIdx that is a component of the context variable information corresponding to the currently initialized ctxIdx. Also, 0 is set to the dominant symbol information valMPS which is a component of the context variable information (step S141). Here, since preCtxState = 43,
[Equation 3]
pStateIdx = 63−preCtxState
= 63−43
= 20
valMPS = 0
It becomes.

次に、コンテキスト初期化部112は、ステップS140またはステップS141で求めたコンテキスト変数情報をコンテキスト変数情報格納部114に格納する(ステップS142)。ここでは、pStateIdx=63−43=20、valMPS=0がctxIdx=70のコンテキスト変数情報としてコンテキスト変数情報格納部114に格納される。   Next, the context initialization unit 112 stores the context variable information obtained in step S140 or step S141 in the context variable information storage unit 114 (step S142). Here, pStateIdx = 63−43 = 20 and valMPS = 0 are stored in the context variable information storage unit 114 as context variable information of ctxIdx = 70.

次に、コンテキスト初期化部112は、初期化すべきctxIdxが存在するかどうかを判定し(ステップS143)、初期化すべきctxIdxが存在する場合は、ステップS133に戻り、初期化処理を継続し、初期化すべきctxIdxが存在しない場合は、コンテキスト変数情報の初期化処理を終了する。   Next, the context initialization unit 112 determines whether there is a ctxIdx to be initialized (step S143). If there is a ctxIdx to be initialized, the process returns to step S133 to continue the initialization process. If there is no ctxIdx to be converted, the context variable information initialization process is terminated.

以上のようなステップを経ることでCABACはコンテキスト変数情報の初期化処理を行っている。従って、CABACにおけるコンテキストの初期化処理は、pic_init_qp_minus26、slice_qp_delta、slice_type、cabac_init_idcといった復号済みシンタックス情報に依存することになる。また、これらのシンタックス情報に基づいて、CABACの復号単位であるスライスの先頭において、毎回複数のコンテキスト変数情報を初期化する必要がある。   CABAC performs the initialization process of the context variable information through the above steps. Therefore, context initialization processing in CABAC depends on decoded syntax information such as pic_init_qp_minus26, slice_qp_delta, slice_type, and cabac_init_idc. Also, it is necessary to initialize a plurality of context variable information each time at the head of a slice, which is a CABAC decoding unit, based on the syntax information.

他のJBIGやJPEG2000などでも、同様に複数のコンテキスト変数情報を利用して符号化効率の向上を図っている。   Other JBIG and JPEG2000 also use a plurality of context variable information to improve the encoding efficiency.

JBIGでは、CABACと類似したコンテキスト変数情報が113存在し、これらのコンテキスト変数情報は、復号単位である画像の復号を開始する先頭で、初期化処理が行われる。   In JBIG, there are 113 context variable information similar to CABAC, and these context variable information is initialized at the beginning of decoding of an image as a decoding unit.

このJBIGにおける初期化処理の改善方法として、特許文献1が開示されている。この特許文献1では、ファクシミリなどで複数ページの画像を算術符号化する時、各画像の属性が変わらない場合、あるページの画像の算術符号化終了時の状態管理変数、つまりステート情報と、優勢シンボル情報を引き継ぎ、属性が変わった場合は、この状態管理変数の初期化を行うことを復号側に通知することで、初期化処理の軽減と圧縮効率の向上を図っている。   Patent Document 1 is disclosed as a method for improving the initialization process in JBIG. In this Patent Document 1, when a plurality of pages of images are arithmetically encoded by a facsimile or the like, if the attribute of each image does not change, the state management variable at the end of arithmetic encoding of an image of a certain page, that is, state information, is dominant. When the symbol information is inherited and the attribute changes, the decoding side is notified that the state management variable is to be initialized, thereby reducing the initialization process and improving the compression efficiency.

特許文献1で開示されている初期化処理の軽減と圧縮効率の向上を試みる方法では、符号化時に各画像の属性の変化を測定して、画像の属性が変化しない場合には、コンテキスト変数情報の初期化を行わずに状態を引き継ぎ、属性が変化した場合には、コンテキスト変数情報の初期化を行うことを復号側に通知することで、復号側での初期化処理を軽減する。しかし、復号側のみで初期化処理の軽減を行うことは考慮されておらず、復号側での画像の属性判定に依存してしまう。   In the method of trying to reduce the initialization process and improve the compression efficiency disclosed in Patent Document 1, when the change of the attribute of each image is measured during encoding and the attribute of the image does not change, the context variable information If the state is inherited without initialization, and the attribute changes, the initialization process on the decoding side is reduced by notifying the decoding side that the context variable information is initialized. However, reducing the initialization process only on the decoding side is not considered, and depends on image attribute determination on the decoding side.

また、JBIG等の初期化処理では、予め所定の定数で初期化することができるが、非特許文献4で用いられるCABACの初期化処理などのように、算術復号で必要となる各コンテキスト変数情報、つまり確率分布の状態を特定するためのステート情報と優勢シンボル情報を、一定の復号化単位毎に変化するシンタックス情報によって対応する各コンテキスト初期化情報を特定し、各コンテキスト変数情報を対応する各コンテキスト初期化情報に基づいて算出しながら、一定の復号化単位毎に毎回初期化しなければならなかった。
植松友彦著 「文書データ圧縮アルゴリズム入門」CQ出版 1994年 ITU−T T.82 ISO/IEC 15444 ITU−T H.264 特開平6−319046号公報
In addition, in the initialization process such as JBIG, it can be initialized with a predetermined constant in advance, but each context variable information necessary for arithmetic decoding such as the CABAC initialization process used in Non-Patent Document 4 is used. In other words, the state information and the dominant symbol information for specifying the state of the probability distribution are identified by the corresponding context initialization information by the syntax information that changes for each fixed decoding unit, and each context variable information is associated. While calculating based on each context initialization information, it had to be initialized every time every certain decoding unit.
Tomohiko Uematsu “Introduction to Document Data Compression Algorithm” CQ Publishing 1994 ITU-T TT. 82 ISO / IEC 15444 ITU-TH. H.264 JP-A-6-319046

上記の問題点を解決するために本発明では、算術復号を行う際に、コンテキスト変数情報を初期化した場合は、このコンテキスト変数情報を初期化済みコンテキスト変数情報として蓄積し、一定の復号化単位毎に変化するシンタックス情報を監視しながら、取得したシンタックス情報によってすでに初期化されたコンテキスト変数情報が初期化済みコンテキスト変数情報として蓄積されている場合には、この初期化済みコンテキスト変数情報に基づいてコンテキスト変数情報を初期化する。このように算術復号におけるコンテキスト変数情報を初期化する際の演算回数を軽減することにより、コンテキスト変数情報の初期化処理を軽減し、初期化処理にかかる演算量を削減するとともに、初期化処理にかかる演算量の削減によって復号が完了するまでにかかる時間を短縮することで、より高速な算術復号化装置、および算術復号化プログラムを提供することを目的とする。   In order to solve the above problems, in the present invention, when context variable information is initialized when performing arithmetic decoding, the context variable information is accumulated as initialized context variable information, and a certain decoding unit is stored. When the context variable information that has been initialized by the acquired syntax information is accumulated as the initialized context variable information while monitoring the syntax information that changes every time, the initialized context variable information is stored in the initialized context variable information. Based on the context variable information is initialized. In this way, by reducing the number of operations when initializing context variable information in arithmetic decoding, the context variable information initialization process is reduced, the amount of calculation required for the initialization process is reduced, and the initialization process is performed. An object of the present invention is to provide a faster arithmetic decoding device and an arithmetic decoding program by reducing the time required for decoding to be completed by reducing the amount of calculation.

上記目的を達成するために、請求項1に記載の算術復号化装置は、入力されるビットストリームの復号位置を特定するためのスタートコードを基に、入力される前記ビットストリームを探索して算術復号するビット列を特定し、特定したビット列をバッファメモリに格納し、算術復号を開始するビット列上の位置を示す復号位置情報に基づいて、前記バッファメモリに格納されているビット列のヘッダ情報を復号して、当該復号位置情報によって指定されるビット列上の特定位置におけるビット列を算術復号するための復号手順を示すシンタックス情報を取得し、予め複数用意されているコンテキスト変数情報のうちの1つを、前記シンタックス情報に応じて初期化し、その初期化した前記コンテキスト変数情報を利用して、前記特定位置におけるビット列を算術復号する算術復号化装置であって、前記シンタックス情報の種類に応じて初期化された前記コンテキスト変数情報を初期化済みコンテキスト変数情報として複数格納する初期化済みコンテキスト変数情報格納手段と、前記コンテキスト変数情報の初期化に必要な復号済みの前記シンタックス情報を取得し、当該復号済みのシンタックス情報の種類に従って、前記コンテキスト変数情報が前記初期化済みコンテキスト変数情報格納手段に格納されているか否かを判定し、格納されていなかった場合、前記復号済みのシンタックス情報に応じて前記コンテキスト変数情報の初期化を行った後、前記初期化済みコンテキスト変数情報格納手段に格納し、格納されていた場合、前記復号済みのシンタックス情報に基づいて、前記初期化済みコンテキスト変数情報格納手段から特定の前記コンテキスト変数情報を取得するコンテキスト変数管理手段とを備えることを特徴とする。   In order to achieve the above object, the arithmetic decoding apparatus according to claim 1, wherein the arithmetic decoding apparatus searches for the input bitstream based on a start code for specifying a decoding position of the input bitstream, and performs arithmetic operation. The bit string to be decoded is specified, the specified bit string is stored in the buffer memory, and the header information of the bit string stored in the buffer memory is decoded based on the decoding position information indicating the position on the bit string at which the arithmetic decoding is started. Acquiring syntax information indicating a decoding procedure for arithmetically decoding a bit string at a specific position on the bit string specified by the decoding position information, and acquiring one of a plurality of context variable information prepared in advance, Initialization is performed according to the syntax information, and the initialized context variable information is used for the specific position. An arithmetic decoding device that arithmetically decodes a bit string, wherein a plurality of the context variable information initialized according to the type of syntax information is stored as initialized context variable information. And the decoded syntax information necessary for initializing the context variable information is acquired, and the context variable information is stored in the initialized context variable information storage unit according to the type of the decoded syntax information. If it is not stored, the context variable information is initialized according to the decoded syntax information, and then stored in the initialized context variable information storage means. , If stored, based on the decoded syntax information, the Characterized in that the initialized already a context variable information storage means and a context variable management means for acquiring specific the context variable information.

また、請求項2に記載の算術復号化プログラムは、入力されるビットストリームの復号位置を特定するためのスタートコードを基に、入力される前記ビットストリームを探索して算術復号するビット列を特定し、特定したビット列をバッファメモリに格納し、算術復号を開始するビット列上の位置を示す復号位置情報に基づいて、前記バッファメモリに格納されているビット列のヘッダ情報を復号して、当該復号位置情報によって指定されるビット列上の特定位置におけるビット列を算術復号するための復号手順を示すシンタックス情報を取得し、予め複数用意されているコンテキスト変数情報のうちの1つを、前記シンタックス情報に応じて初期化し、その初期化した前記コンテキスト変数情報を利用して、前記特定位置におけるビット列を算術復号する算術復号化装置をコンピュータに実現させるための算術復号化プログラムであって、前記コンピュータを、前記シンタックス情報の種類に応じて初期化された前記コンテキスト変数情報を初期化済みコンテキスト変数情報として複数格納する初期化済みコンテキスト変数情報格納手段と、前記コンテキスト変数情報の初期化に必要な復号済みの前記シンタックス情報を取得し、当該復号済みのシンタックス情報の種類に従って、前記コンテキスト変数情報が前記初期化済みコンテキスト変数情報格納手段に格納されているか否かを判定し、格納されていなかった場合、前記復号済みのシンタックス情報に応じて前記コンテキスト変数情報の初期化を行った後、前記初期化済みコンテキスト変数情報格納手段に格納し、格納されていた場合、前記復号済みのシンタックス情報に基づいて、前記初期化済みコンテキスト変数情報格納手段から特定の前記コンテキスト変数情報を取得するコンテキスト変数管理手段として機能させることを特徴とする。   The arithmetic decoding program according to claim 2 specifies a bit string to be arithmetically decoded by searching the input bitstream based on a start code for specifying a decoding position of the input bitstream. And decoding the header information of the bit string stored in the buffer memory based on the decoding position information indicating the position on the bit string where the specified bit string is stored in the buffer memory and starting the arithmetic decoding, and the decoding position information To obtain syntax information indicating a decoding procedure for arithmetic decoding of a bit string at a specific position on a bit string specified by the one of a plurality of context variable information prepared in advance according to the syntax information. And using the initialized context variable information, a bit string at the specific position An arithmetic decoding program for causing a computer to perform an arithmetic decoding device for arithmetic decoding, wherein the context variable information initialized according to the type of syntax information is initialized by the computer. A plurality of initialized context variable information storage means for acquiring the decoded syntax information necessary for initialization of the context variable information, and according to the type of the decoded syntax information, the context variable information Is stored in the initialized context variable information storage means, and if not stored, after initialization of the context variable information according to the decoded syntax information, Stored in the initialized context variable information storage means; If you were, on the basis of the decoded syntax information, characterized in that to function as the context variables management means for acquiring a particular said context variable information from the initialized context variable information storage means.

本発明では、算術復号におけるコンテキスト変数情報を初期化する際の演算回数を軽減することにより、コンテキスト変数情報の初期化処理を軽減し、初期化処理にかかる演算量を削減できる。また、初期化処理にかかる演算量の削減によって復号が完了するまでにかかる時間を短縮できる。   In the present invention, by reducing the number of operations when initializing context variable information in arithmetic decoding, the initialization processing of context variable information can be reduced, and the amount of calculation required for the initialization processing can be reduced. Further, the time required for decoding to be completed can be shortened by reducing the amount of calculation required for the initialization process.

本発明の実施形態を、図1〜図6を用いて説明する。   An embodiment of the present invention will be described with reference to FIGS.

図1は、本発明の算術復号化装置であるAVCのデコーダにおいて、本発明の初期化部を備える算術復号部が実際にビットストリームをデコードしてシンタックス情報を出力するまでを示した機能ブロック図である。   FIG. 1 is a functional block diagram showing how an arithmetic decoding unit including an initialization unit of the present invention actually decodes a bitstream and outputs syntax information in an AVC decoder which is an arithmetic decoding device of the present invention. FIG.

デコーダ1は、図1に示すように、ビットストリーム取得部2、復号位置検出部3、ビットストリームバッファ4、復号位置管理部5、シンタックス情報取得部6、シンタックス情報格納部7、および算術復号部8によって構成される。   As shown in FIG. 1, the decoder 1 includes a bitstream acquisition unit 2, a decoding position detection unit 3, a bitstream buffer 4, a decoding position management unit 5, a syntax information acquisition unit 6, a syntax information storage unit 7, and an arithmetic The decoding unit 8 is used.

ビットストリーム取得部2は、符号化されたビットストリームをデコードするために取得する機能を有する。   The bit stream acquisition unit 2 has a function of acquiring an encoded bit stream for decoding.

復号位置検出部3は、ビットストリーム取得部2によって取得されたビットストリーム内を、復号位置管理部5より得られるスタートコードに基づいて探索し、スタートコードと一致したビットストリーム内の位置を検出することでデコードの先頭位置を特定する機能を有する。また、復号位置検出部3は、次の復号位置を特定することで復号単位を特定する機能を有する。ここでは、少なくとも1つのスライスを復号することができるビット列を復号単位として特定できることで、より良い構成となる。このようにして特定されたビットストリーム中のビット列は、後述するビットストリームバッファに格納される。   The decoding position detection unit 3 searches the bit stream acquired by the bit stream acquisition unit 2 based on the start code obtained from the decoding position management unit 5, and detects a position in the bit stream that matches the start code. Thus, it has a function of specifying the start position of decoding. The decoding position detection unit 3 has a function of specifying a decoding unit by specifying the next decoding position. Here, a bit stream that can decode at least one slice can be specified as a decoding unit, so that a better configuration can be obtained. The bit string in the bit stream specified in this way is stored in a bit stream buffer described later.

ビットストリームバッファ4は、復号位置検出部3によって特定されたビット列を格納する。   The bit stream buffer 4 stores the bit string specified by the decoding position detection unit 3.

復号位置管理部5は、ビットストリーム取得部2が取得する入力ビットストリーム中の復号位置を管理する機能を有する。また、復号位置管理部5は、ビットストリームバッファ4に格納されているビット列中の復号位置を管理する機能を有し、必要に応じて復号位置検出部3に対してスタートコードを指定してビットストリームバッファ4内のビット列を更新する機能を有する。さらに、復号位置管理部5は、シンタックス情報取得部6、および算術復号部8に対して、ビットストリームバッファ4内の復号位置情報を通知し、また、算術復号部8からの復号位置の検出要求に応じて復号位置検出部3に検出要求に応じたスタートコードを通知する機能を有する。   The decoding position management unit 5 has a function of managing the decoding position in the input bitstream acquired by the bitstream acquisition unit 2. The decoding position management unit 5 has a function of managing the decoding position in the bit string stored in the bit stream buffer 4, and designates a start code to the decoding position detection unit 3 as necessary to specify a bit. The bit string in the stream buffer 4 is updated. Further, the decoding position management unit 5 notifies the syntax information acquisition unit 6 and the arithmetic decoding unit 8 of the decoding position information in the bit stream buffer 4 and detects the decoding position from the arithmetic decoding unit 8. In response to the request, the decoding position detector 3 has a function of notifying a start code corresponding to the detection request.

シンタックス情報取得部6は、復号位置管理部5から得られる復号位置情報と、ビットストリームバッファ4に格納されているビット列から、後述する算術復号部8で符号化されたビット列よりも上位に位置するヘッダ情報を復号し、得られるシンタックス情報を後述するシンタックス情報格納部7に通知する機能を有する。   The syntax information acquisition unit 6 is positioned higher than the bit sequence encoded by the arithmetic decoding unit 8 to be described later from the decoding location information obtained from the decoding location management unit 5 and the bit sequence stored in the bit stream buffer 4. The header information to be decoded is decoded, and the obtained syntax information is notified to the syntax information storage unit 7 described later.

シンタックス情報格納部7は、シンタックス情報取得部6から得られる各種のシンタックス情報を格納する。また、シンタックス情報格納部7は、必要に応じて、算術復号部8にシンタックス情報を通知する機能を有する。   The syntax information storage unit 7 stores various types of syntax information obtained from the syntax information acquisition unit 6. In addition, the syntax information storage unit 7 has a function of notifying the arithmetic decoding unit 8 of syntax information as necessary.

算術復号部8は、復号位置管理部5から得られる復号位置情報と、ビットストリームバッファ4に格納されているビット列から、復号位置情報によって特定されたビット列の位置から算術復号を行い、復号結果を出力シンタックス情報として出力する機能を有する。また、算術復号部8は、必要に応じて、復号位置管理部5に対して現在の復号位置よりも前もしくは後ろの復号位置の検出要求を行う機能を有する。   The arithmetic decoding unit 8 performs arithmetic decoding from the decoding position information obtained from the decoding position management unit 5 and the bit string stored in the bit stream buffer 4 from the position of the bit string specified by the decoding position information, and the decoding result is obtained. It has a function of outputting as output syntax information. Further, the arithmetic decoding unit 8 has a function of requesting the decoding position management unit 5 to detect a decoding position before or after the current decoding position as necessary.

図2は、図1の算術復号部8をより詳しく示したブロック図である。   FIG. 2 is a block diagram showing the arithmetic decoding unit 8 of FIG. 1 in more detail.

算術復号部8は、状態遷移管理部11、コンテキスト変数管理部12、初期化済みコンテキスト変数情報格納部13、コンテキスト初期化部14、コンテキスト初期化情報格納部15、コンテキスト変数情報格納部16、ビット列カウント部17、ビット列情報管理部18、コンテキスト特定部19、2値算術復号部20、復号ビット取得部21、およびビット列比較部22によって構成される。   The arithmetic decoding unit 8 includes a state transition management unit 11, a context variable management unit 12, an initialized context variable information storage unit 13, a context initialization unit 14, a context initialization information storage unit 15, a context variable information storage unit 16, and a bit string. The count unit 17, the bit string information management unit 18, the context identification unit 19, the binary arithmetic decoding unit 20, the decoded bit acquisition unit 21, and the bit string comparison unit 22 are configured.

状態遷移管理部11は、現在復号しようとしているシンタックス情報を正しく復号することができるように算術復号部8内の内部状態を管理する機能を有する。この状態遷移管理部11は、コンテキスト変数管理部12に対する初期化要求や、ビット列カウント部17の制御、ビット列情報管理部18の制御、コンテキスト特定部19の制御、2値算術復号化部20に対する復号開始要求を行うことで、内部状態を管理する。   The state transition management unit 11 has a function of managing the internal state in the arithmetic decoding unit 8 so that syntax information that is currently being decoded can be correctly decoded. The state transition management unit 11 performs an initialization request to the context variable management unit 12, control of the bit string count unit 17, control of the bit string information management unit 18, control of the context specification unit 19, and decoding to the binary arithmetic decoding unit 20. The internal state is managed by making a start request.

コンテキスト変数管理部12は、状態遷移管理部11からの初期化要求に応じて、コンテキスト変数情報の初期化が必要かどうかを判定する機能を有する。コンテキスト変数情報の初期化判定では、後述する初期化済みコンテキスト変数情報格納部13に格納されている初期化済みコンテキスト変数情報の中から、取得した復号済みシンタックス情報に基づいて初期化されたものが存在するかどうかを検索する。検索の結果、対応する初期化済みコンテキスト変数情報が存在する場合には、後述するコンテキスト変数情報格納部16に格納することでコンテキスト変数情報初期化時の演算回数を削減する。また、対応する初期化済みコンテキスト変数情報が存在しない場合には、通常のコンテキスト変数情報の初期化処理を行うため、コンテキスト初期化部14に対して初期化要求を行い、初期化されたコンテキスト変数情報を初期化済みコンテキスト変数情報として後述する初期化済みコンテキスト変数情報格納部13に格納するとともに、後述するコンテキスト変数情報格納部16に格納する。ここで、後述する初期化済みコンテキスト変数情報格納部13にコンテキスト変数情報を格納する際に、復号済みシンタックス情報から所定の先読み数の分の情報を取得し、初期化済みコンテキスト変数情報格納部13に対してコンテキスト変数情報の格納を制御できることで、より良い構成となる。所定の先読み数分だけ復号済みシンタックス情報が取得できない場合には、先読み要求情報604を図9の復号位置管理部5に通知し、再度復号済みシンタックス情報の取得を試みることができる。   The context variable management unit 12 has a function of determining whether initialization of context variable information is necessary in response to an initialization request from the state transition management unit 11. In initialization determination of context variable information, information initialized based on acquired decoded syntax information from initialized context variable information stored in an initialized context variable information storage unit 13 to be described later Search for the existence of. If the corresponding initialized context variable information exists as a result of the search, it is stored in the context variable information storage unit 16 to be described later, thereby reducing the number of computations when initializing the context variable information. If there is no corresponding initialized context variable information, an initialization request is made to the context initialization unit 14 in order to perform normal context variable information initialization processing, and the initialized context variable The information is stored as initialized context variable information in an initialized context variable information storage unit 13 described later and also stored in a context variable information storage unit 16 described later. Here, when storing context variable information in an initialized context variable information storage unit 13 to be described later, information for a predetermined number of prefetches is acquired from the decoded syntax information, and an initialized context variable information storage unit is acquired. It is possible to control the storage of context variable information with respect to 13, so that the configuration becomes better. When the decoded syntax information cannot be acquired by the predetermined number of prefetches, the prefetch request information 604 can be notified to the decoding position management unit 5 in FIG. 9, and the acquisition of the decoded syntax information can be attempted again.

また、コンテキスト変数情報を初期化済みコンテキスト変数情報として格納する際に、初期化済みコンテキスト変数情報格納部13に格納されている初期化済みコンテキスト変数情報の参照率を保持し、新たに初期化済みコンテキスト変数情報格納部13に対して追加できなくなった場合に、参照率の最も低いものと置き換えができることで、より良い構成となる。   Further, when storing context variable information as initialized context variable information, the reference rate of the initialized context variable information stored in the initialized context variable information storage unit 13 is retained and newly initialized. When it becomes impossible to add to the context variable information storage unit 13, it can be replaced with the one with the lowest reference rate, so that a better configuration is obtained.

初期化済みコンテキスト変数情報格納部13は、コンテキスト初期化部14によって初期化され、コンテキスト変数管理部12によって通知されたコンテキスト変数情報を、コンテキスト変数管理部12が取得する復号済みシンタックス情報に基づいてコンテキスト変数情報の初期化処理を行わずに再利用できるように格納する。   The initialized context variable information storage unit 13 is initialized by the context initialization unit 14 and the context variable information notified by the context variable management unit 12 is based on the decoded syntax information acquired by the context variable management unit 12. And store it so that it can be reused without initializing the context variable information.

コンテキスト初期化部14は、コンテキスト変数管理部12の初期化要求に応じて、算術復号を行う際に使用するコンテキスト変数情報の初期化処理を行う機能を有する。コンテキスト初期化部14は、コンテキスト初期化情報格納部15に格納されている所定の定数と、コンテキスト変数管理部12から通知される復号済みシンタックス情報を利用してコンテキスト変数情報の初期化を行う。   The context initialization unit 14 has a function of performing initialization processing of context variable information used when performing arithmetic decoding in response to an initialization request from the context variable management unit 12. The context initialization unit 14 initializes context variable information using a predetermined constant stored in the context initialization information storage unit 15 and decoded syntax information notified from the context variable management unit 12. .

CABACの初期化を行う際に必要となる復号済みシンタックス情報は、pic_parameter_set_rbsp()に含まれるpic_init_qp_minus26と、slice_header()に含まれるslice_qp_deltaから求めるSliceQPY、slice_header()に含まれるslice_type及びcabac_init_idcである。CABACでは、復号単位がスライスであるため、スライスを復号する度にその先頭でコンテキスト変数情報の初期化が行われる。   Decoded syntax information necessary for CABAC initialization is pic_init_qp_minus26 included in pic_parameter_set_rbsp () and SliceQPY obtained from slice_qp_delta included in slice_header (), and slice_type and cabac_init_idc included in slice_header (). In CABAC, since the decoding unit is a slice, the context variable information is initialized at the head every time the slice is decoded.

コンテキスト初期化情報格納部15は、コンテキスト初期化部14がコンテキスト変数情報の初期化を行う際に使用する所定の定数を格納する。図12は、コンテキスト初期化情報格納部15に格納されているコンテキスト初期化情報の例として、CABACで用いる所定の定数が記述されたテーブルの一部を抜粋したものである。CABACでは、復号済みシンタックス情報から得られるslice_type、cabac_init_idc、そして各コンテキストを特定するためのctxIdxを利用して、図12に示すようなコンテキスト初期化情報のテーブルから定数m、nが特定され、コンテキスト変数情報の初期化に利用される。   The context initialization information storage unit 15 stores a predetermined constant used when the context initialization unit 14 initializes context variable information. FIG. 12 is an excerpt of a part of a table in which predetermined constants used in CABAC are described as an example of the context initialization information stored in the context initialization information storage unit 15. In CABAC, constants m and n are identified from a table of context initialization information as shown in FIG. 12, using slice_type obtained from decrypted syntax information, cabac_init_idc, and ctxIdx for identifying each context. Used to initialize context variable information.

コンテキスト変数情報格納部16は、算術復号で実際に使用するコンテキスト変数情報を格納し、コンテキスト変数情報の初期化が必要な場合には、状態遷移管理部11の要求に応じて、コンテキスト変数管理部12は必要なコンテキスト変数情報を取得し、コンテキスト変数情報格納部16に通知する機能を有する。また、コンテキスト変数情報格納部16は、通知されたコンテキスト変数情報に基づいて格納されているコンテキスト変数情報を更新することでコンテキスト変数情報の初期化を行う機能を有する。コンテキスト変数情報格納部16が格納しているコンテキスト変数情報は、2値算術復号化部20の復号結果に応じて変更される。   The context variable information storage unit 16 stores context variable information that is actually used in arithmetic decoding. When the context variable information needs to be initialized, the context variable management unit 16 responds to a request from the state transition management unit 11. 12 has a function of acquiring necessary context variable information and notifying the context variable information storage unit 16. The context variable information storage unit 16 has a function of initializing context variable information by updating the context variable information stored based on the notified context variable information. The context variable information stored in the context variable information storage unit 16 is changed according to the decoding result of the binary arithmetic decoding unit 20.

図2に示す算術復号部8の構成では、コンテキスト変数情報の更新はコンテキスト特定部19を介して行われるが、一般に2値算術復号化部20が直接コンテキスト変数情報格納部16の内容を変更することができるような構成をとることも可能である。   In the configuration of the arithmetic decoding unit 8 shown in FIG. 2, the context variable information is updated via the context specifying unit 19. In general, the binary arithmetic decoding unit 20 directly changes the contents of the context variable information storage unit 16. It is also possible to take a configuration that can be used.

ビット列カウント部17は、現在復号しようとしているビットがビット列中のどの位置に対応するかをカウントする機能を有する。これは、復号するビット位置によってビットの発生確率が違うことから、ビット位置に応じたコンテキスト変数情報を対応付ける必要があるためである。   The bit string count unit 17 has a function of counting to which position in the bit string the bit to be decoded currently corresponds. This is because the occurrence probability of a bit differs depending on the bit position to be decoded, and therefore context variable information corresponding to the bit position needs to be associated.

ビット列情報管理部18は、現在復号しようとしているシンタックス情報の候補となる情報をビット列表記した情報に変換して対応付けを行う機能を有する。この対応関係は、後述するビット列比較部22によって利用される。   The bit string information management unit 18 has a function of converting information corresponding to syntax information candidates that are currently being decoded into information expressed in bit strings and performing association. This correspondence is used by the bit string comparison unit 22 described later.

コンテキスト特定部19は、現在復号しようとしているビットのコンテキスト変数情報を特定するためのctxIdxを、状態遷移管理部11から得られる現在復号しようとしているシンタックス情報の種類に関する情報、ビット列カウント部17から得られる現在復号しようとしているビット列中のビット位置、復号済みシンタックス情報を利用して特定する機能を有する。   The context specifying unit 19 obtains the ctxIdx for specifying the context variable information of the bit currently being decoded from the information regarding the type of syntax information to be decoded currently obtained from the state transition management unit 11, from the bit string count unit 17. It has a function of specifying the bit position in the obtained bit string to be decoded and the decoded syntax information.

2値算術復号化部20は、コンテキスト特定部19により特定されたコンテキスト変数情報を利用して算術復号を行う機能を有する。算術復号によって状態が変化したコンテキスト変数情報は、順次コンテキスト変数情報格納部16に反映される。図2の算術復号部8においては、コンテキスト特定部19を介して行われる。また、算術復号時に正規化によりビットストリームからのビット補充が必要な場合には、2値算術復号化部20は、復号ビット取得部21から必要なビットを補充する。   The binary arithmetic decoding unit 20 has a function of performing arithmetic decoding using the context variable information specified by the context specifying unit 19. The context variable information whose state has been changed by arithmetic decoding is sequentially reflected in the context variable information storage unit 16. In the arithmetic decoding unit 8 in FIG. 2, this is performed via the context specifying unit 19. In addition, when bit supplementation from the bitstream is required by normalization at the time of arithmetic decoding, the binary arithmetic decoding unit 20 supplements necessary bits from the decoded bit acquisition unit 21.

復号ビット取得部21は、2値算術復号化部20のビット要求に応じてビットストリームと復号位置情報を用いて取得する機能を有する。   The decoded bit acquisition unit 21 has a function of acquiring a bit stream and decoding position information in response to a bit request from the binary arithmetic decoding unit 20.

ビット列比較部22は、2値算術復号化部20の出力結果を保持し、ビット列情報管理部18で用意されているビット列情報との比較を行う機能を有する。ビット列情報中に等しいものが存在した場合は、ビット列比較部22は、等しいビット列情報に対応するシンタックス情報を取得して出力シンタックス情報として出力し、保持していた2値算術復号化部20の出力結果を初期化して次のシンタックス情報の復号に備える。また、ビット列比較部22は、必要に応じて状態遷移管理部11に出力シンタックス情報を通知する。   The bit string comparison unit 22 has a function of holding the output result of the binary arithmetic decoding unit 20 and comparing with the bit string information prepared by the bit string information management unit 18. If there is an equal bit string information, the bit string comparison unit 22 acquires syntax information corresponding to the equal bit string information, outputs the syntax information as output syntax information, and holds the binary arithmetic decoding unit 20 held therein. Is prepared for decoding of the next syntax information. In addition, the bit string comparison unit 22 notifies the state transition management unit 11 of output syntax information as necessary.

図3は、ビットストリーム復号時の処理手順を示すフローチャートである。以下に図3を用いて、まず、デコーダ1の復号処理時における動作の概要について説明する。   FIG. 3 is a flowchart showing a processing procedure at the time of bitstream decoding. The outline of the operation of the decoder 1 during the decoding process will be described below with reference to FIG.

まず、デコーダ1がビットストリームの復号処理を開始すると、ビットストリーム取得部2は、入力ビットストリームを取得するため、復号対象となる入力ビットストリームを取得する(ステップS01)。   First, when the decoder 1 starts the decoding process of the bit stream, the bit stream acquisition unit 2 acquires the input bit stream to be decoded in order to acquire the input bit stream (step S01).

次に、復号位置検出部3は、復号位置管理部5から復号位置を特定するために必要なスタートコードを取得する(ステップS02)。復号位置検出部3は、ビットストリーム取得部2が取得したビットストリームを探索、ビット列を特定し、特定したビット列をビットストリームバッファ4に格納する(ステップS03)。   Next, the decoding position detection unit 3 acquires a start code necessary for specifying the decoding position from the decoding position management unit 5 (step S02). The decoding position detection unit 3 searches the bit stream acquired by the bit stream acquisition unit 2, identifies the bit string, and stores the identified bit string in the bit stream buffer 4 (step S03).

次に、シンタックス情報取得部6は、シンタックス情報を取得するため、ビットストリームバッファ4に格納されているビット列と、復号位置管理部5から得られる復号位置情報に基づいて復号を行い、シンタックス情報を取得し(ステップS04)、取得したシンタックス情報をシンタックス情報格納部7に格納する(ステップS05)。   Next, the syntax information acquisition unit 6 performs decoding based on the bit string stored in the bit stream buffer 4 and the decoding position information obtained from the decoding position management unit 5 in order to acquire syntax information. The syntax information is acquired (step S04), and the acquired syntax information is stored in the syntax information storage unit 7 (step S05).

復号位置管理部5は、算術復号部8から必要に応じて通知される復号位置検出要求に基づいて、算術復号を実行する際に、ビットストリーム内を先読みして次のシンタックス情報を取得する必要があるかどうかを判定する(ステップS06)。次のシンタックス情報が必要な場合には、ステップS02の処理に移行する。   Based on the decoding position detection request notified from the arithmetic decoding unit 8 as necessary, the decoding position management unit 5 prefetches the bitstream and acquires the next syntax information when performing arithmetic decoding. It is determined whether it is necessary (step S06). When the next syntax information is necessary, the process proceeds to step S02.

算術復号を行うため、算術復号部8は、ビットストリームバッファ4からビット列を取得、また、復号位置管理部5からビット列の復号位置情報を取得し、復号位置情報から特定されるビット列上の位置のビットをどのように解釈して復号するかを決定するために、シンタックス情報格納部から必要なシンタックス情報を取得する。算術復号部8は、これらの情報を基に算術復号を行い、復号結果である出力シンタックス情報を順次出力する(ステップS07)。   In order to perform arithmetic decoding, the arithmetic decoding unit 8 acquires a bit string from the bit stream buffer 4, acquires decoding position information of the bit string from the decoding position management unit 5, and obtains a position on the bit string specified from the decoding position information. In order to determine how to interpret and decode the bits, the necessary syntax information is obtained from the syntax information storage unit. The arithmetic decoding unit 8 performs arithmetic decoding based on these pieces of information, and sequentially outputs output syntax information that is a decoding result (step S07).

次に、コンテキスト変数情報の初期化処理について説明する。図4は、コンテキスト変数情報の初期化処理における処理手順を示すフローチャートである。以下に、図4を用いて算術復号部8の動作を説明する。   Next, context variable information initialization processing will be described. FIG. 4 is a flowchart showing a processing procedure in the initialization processing of context variable information. Hereinafter, the operation of the arithmetic decoding unit 8 will be described with reference to FIG.

コンテキスト変数情報の初期化を開始すると、コンテキスト変数管理部12は、コンテキスト変数情報の初期化に必要なパラメータを取得する(ステップS11)。図2では、コンテキスト変数管理部12が初期化要求を受けた際に取得する復号済みシンタックス情報が、コンテキスト変数情報の初期化に必要なパラメータとなる。   When the initialization of the context variable information is started, the context variable management unit 12 acquires parameters necessary for the initialization of the context variable information (step S11). In FIG. 2, decoded syntax information acquired when the context variable management unit 12 receives an initialization request is a parameter necessary for initialization of context variable information.

次に、コンテキスト変数管理部12は、取得したパラメータによって初期化されたコンテキスト変数情報が存在するか否かを判定する(ステップS12)。図2に示す算術復号部8においては、コンテキスト変数管理部12は、ステップS11において取得したパラメータである復号済みシンタックス情報に基づいて初期化済みコンテキスト変数情報格納部13に格納されている初期化済みコンテキスト変数情報を検索する。取得したパラメータで初期化されたコンテキスト変数情報が初期化済みコンテキスト変数情報格納部13に格納されている場合には、ステップS15の処理に移行し、それ以外は、ステップS13の処理に移行する。   Next, the context variable management unit 12 determines whether there is context variable information initialized by the acquired parameter (step S12). In the arithmetic decoding unit 8 shown in FIG. 2, the context variable management unit 12 performs initialization stored in the initialized context variable information storage unit 13 based on the decoded syntax information that is the parameter acquired in step S11. Search for completed context variable information. When the context variable information initialized with the acquired parameter is stored in the initialized context variable information storage unit 13, the process proceeds to step S15, and otherwise, the process proceeds to step S13.

取得したパラメータで初期化されたコンテキスト変数情報が初期化済みコンテキスト変数情報格納部13に格納されていない場合、コンテキスト変数管理部12は、コンテキスト初期化部14に対して初期化要求を行う(ステップS13)。この初期化要求によって、コンテキスト初期化部14は、通常のコンテキスト変数情報の初期化処理を行う。   When the context variable information initialized with the acquired parameter is not stored in the initialized context variable information storage unit 13, the context variable management unit 12 issues an initialization request to the context initialization unit 14 (step S13). In response to this initialization request, the context initialization unit 14 performs normal context variable information initialization processing.

コンテキスト変数管理部12は、コンテキスト初期化部14によって初期化されたコンテキスト変数情報を取得し、初期化済みコンテキスト変数情報格納部13に格納する(ステップS14)。   The context variable management unit 12 acquires the context variable information initialized by the context initialization unit 14 and stores it in the initialized context variable information storage unit 13 (step S14).

次に、コンテキスト変数管理部12は、取得した復号済みシンタックス情報に基づいて、初期化済みコンテキスト変数情報格納部13に格納されている初期化済みコンテキスト変数情報から検索することにより該当するコンテキスト変数情報を特定する(ステップS15)。   Next, the context variable management unit 12 searches the initialized context variable information stored in the initialized context variable information storage unit 13 on the basis of the acquired decoded syntax information, thereby corresponding context variables. Information is specified (step S15).

次に、コンテキスト変数管理部12は、ステップS15で特定したコンテキスト変数情報をコンテキスト変数情報格納部16に格納する(ステップS16)。   Next, the context variable management unit 12 stores the context variable information specified in step S15 in the context variable information storage unit 16 (step S16).

このようにして、復号時に必要なコンテキスト変数情報の初期化処理が行われる。   In this way, initialization processing of context variable information necessary at the time of decoding is performed.

次に、コンテキスト変数情報の初期化処理について、図5のフローチャートに基づいて、詳細に説明する。   Next, context variable information initialization processing will be described in detail based on the flowchart of FIG.

コンテキスト変数情報の初期化を開始すると、状態遷移管理部11からの初期化要求に応じて、コンテキスト変数管理部12は、復号済みシンタックス情報から現在復号しようとしているスライスのpic_init_qp_minus26、slice_qp_delta、slice_type、cabac_init_idcを取得する(ステップS21)。ここでは、pic_init_qp_minus26=4、slice_qp_delta=5、slice_type=0(P slice)、cabac_init_idc=1を取得したものとする。   When the initialization of the context variable information is started, the context variable management unit 12 responds to the initialization request from the state transition management unit 11, and the pic_init_qp_minus26, slice_qp_delta, slice_type, slice_type, cabac_init_idc is acquired (step S21). Here, it is assumed that pic_init_qp_minus26 = 4, slice_qp_delta = 5, slice_type = 0 (P slice), and cabac_init_idc = 1 are acquired.

ここで、初期化済みコンテキスト変数情報格納部13に対するコンテキスト変数情報の格納を制御するための所定の先読み数が設定されている場合には、コンテキスト変数管理部12は、復号済みシンタックス情報から所定の先読み数分の情報を取得する。所定の先読み数分だけ復号済みシンタックス情報が取得できない場合には、コンテキスト変数管理部12は、先読み要求情報を復号位置管理部5に通知し、再度復号済みシンタックス情報の取得を行う。   Here, when a predetermined number of prefetches for controlling the storage of context variable information in the initialized context variable information storage unit 13 is set, the context variable management unit 12 determines a predetermined number from the decoded syntax information. Get information for the number of read-aheads. When the decoded syntax information cannot be acquired by a predetermined number of prefetches, the context variable management unit 12 notifies the prefetch request information to the decoding position management unit 5 and acquires the decoded syntax information again.

次に、現在復号しようとしているシンタックス情報に該当する初期化済みコンテキスト変数情報を検索するため、コンテキスト変数管理部12は、取得した復号済みシンタックス情報の種類に基づいて、初期化済みコンテキスト変数情報格納部13に格納されている初期化済みコンテキスト変数情報から取得した復号済みシンタックス情報に対応するコンテキスト変数情報が存在するか検索し(ステップS22)、初期化済みコンテキスト変数情報が存在するかを判定する(ステップS23)。対応する初期化済みコンテキスト変数情報が存在する場合には、ステップS24の処理に移行し、それ以外は、ステップS25の処理に移行する。   Next, in order to search for the initialized context variable information corresponding to the syntax information that is currently being decoded, the context variable management unit 12 determines the initialized context variable based on the type of the acquired decoded syntax information. It is searched whether there is context variable information corresponding to the decoded syntax information acquired from the initialized context variable information stored in the information storage unit 13 (step S22), and whether there is initialized context variable information. Is determined (step S23). If the corresponding initialized context variable information exists, the process proceeds to step S24. Otherwise, the process proceeds to step S25.

対応する初期化済みコンテキスト変数情報が存在する場合、コンテキスト変数管理部12は、初期化済みコンテキスト変数情報格納部13から特定したコンテキスト変数情報をコンテキスト変数情報格納部16に格納し(ステップS24)、コンテキスト変数情報の初期化処理を終了する。   When the corresponding initialized context variable information exists, the context variable management unit 12 stores the context variable information specified from the initialized context variable information storage unit 13 in the context variable information storage unit 16 (step S24), End the initialization process of the context variable information.

また、対応する初期化済みコンテキスト変数情報が存在しない場合、コンテキスト変数管理部12は、下記の数式に従ってSliceQPYを算出する(ステップS25)。   When there is no corresponding initialized context variable information, the context variable management unit 12 calculates SliceQPY according to the following mathematical formula (step S25).

[数4]
SliceQPY=26+pic_init_qp_minus26+slice_qp_delta
=26+4+5
=35
次に、コンテキスト初期化部14は、ステップS21において取得した復号済みコンテキスト変数情報slice_type、cabac_init_idcから、初期化が必要なctxIdxを特定し、そのctxIdxに対応するm、nをコンテキスト初期化情報格納部15から取得する(ステップS26)。ここでは、初期化が必要なctxIdxがctxIdx=70であるものとすると、図11に示すコンテキスト初期化情報のテーブルに従ってm=13、n=15を取得する。
[Equation 4]
SliceQPY = 26 + pic_init_qp_minus26 + slice_qp_delta
= 26 + 4 + 5
= 35
Next, the context initialization unit 14 identifies ctxIdx that needs to be initialized from the decoded context variable information slice_type and cabac_init_idc acquired in step S21, and sets m and n corresponding to the ctxIdx to the context initialization information storage unit. 15 (step S26). Here, assuming that ctxIdx requiring initialization is ctxIdx = 70, m = 13 and n = 15 are acquired according to the context initialization information table shown in FIG.

次に、コンテキスト初期化部14は、ステップS25で算出されたSliceQPYと、ステップS26で取得されたm、nを用いて、下記の数式に従って一時変数preCtxStateを算出する(ステップS27)。   Next, the context initialization unit 14 calculates a temporary variable preCtxState according to the following equation using SliceQPY calculated in step S25 and m and n acquired in step S26 (step S27).

[数5]
preCtxState=((m×SliceQPY)>>4)+n
=(13×35)>>4+15
=28+15
=43
ここで、数式中の「>>4」は、4ビットの右シフト演算を行うことを示す。
[Equation 5]
preCtxState = ((m × SliceQPY) >> 4) + n
= (13 × 35) >> 4 + 15
= 28 + 15
= 43
Here, “>> 4” in the equation indicates that a 4-bit right shift operation is performed.

次に、コンテキスト初期化部14は、一時変数preCtxStateが1より小さいかどうかを判定する(ステップS28)。一時変数preCtxStateが1より小さい場合は、ステップS29の処理に移行し、それ以外の場合は、ステップS30の処理に移行する。   Next, the context initialization unit 14 determines whether or not the temporary variable preCtxState is smaller than 1 (step S28). If the temporary variable preCtxState is smaller than 1, the process proceeds to step S29. Otherwise, the process proceeds to step S30.

一時変数preCtxStateが1より小さい場合、コンテキスト初期化部14は、一時変数preCtxStateに1を設定する(ステップS29)。   When the temporary variable preCtxState is smaller than 1, the context initialization unit 14 sets 1 to the temporary variable preCtxState (step S29).

次に、コンテキスト初期化部14は、一時変数preCtxStateが126より大きいかどうかを判定する(ステップS30)。一時変数preCtxStateが126より大きい場合は、ステップS31の処理に移行し、それ以外の場合は、ステップS32の処理に移行する。   Next, the context initialization unit 14 determines whether or not the temporary variable preCtxState is greater than 126 (step S30). If the temporary variable preCtxState is greater than 126, the process proceeds to step S31. Otherwise, the process proceeds to step S32.

一時変数preCtxStateが126より大きい場合、コンテキスト初期化部14は、一時変数preCtxStateに126を設定する(ステップS31)。   When the temporary variable preCtxState is larger than 126, the context initialization unit 14 sets 126 to the temporary variable preCtxState (step S31).

次に、コンテキスト初期化部14は、一時変数preCtxStateが63以下であるかを判定する(ステップS32)。一時変数preCtxStateが63以下の場合は、ステップS34の処理に移行し、それ以外の場合は、ステップS33の処理に移行する。   Next, the context initialization unit 14 determines whether the temporary variable preCtxState is 63 or less (step S32). If the temporary variable preCtxState is 63 or less, the process proceeds to step S34. Otherwise, the process proceeds to step S33.

一時変数preCtxStateが63以下でない場合、コンテキスト初期化部14は、現在初期化を行っているctxIdxに対応するコンテキスト変数情報の構成要素であるステート情報pStateIdxに一時変数preCtxStateから64を引いた値を設定し、また、コンテキスト変数情報の構成要素である優勢シンボル情報valMPSに1を設定する(ステップS33)。   If the temporary variable preCtxState is not 63 or less, the context initialization unit 14 sets a value obtained by subtracting 64 from the temporary variable preCtxState in the state information pStateIdx that is a component of the context variable information corresponding to the currently initialized ctxIdx. In addition, 1 is set to the dominant symbol information valMPS which is a component of the context variable information (step S33).

また、一時変数preCtxStateが63以下の場合、コンテキスト初期化部14は、現在初期化を行っているctxIdxに対応するコンテキスト変数情報の構成要素であるステート情報pStateIdxに63から一時変数preCtxStateを引いた値を設定し、また、コンテキスト変数情報の構成要素である優勢シンボル情報valMPSに0を設定する(ステップS34)。   When the temporary variable preCtxState is 63 or less, the context initialization unit 14 subtracts the temporary variable preCtxState from 63 to the state information pStateIdx that is a component of the context variable information corresponding to the currently initialized ctxIdx. Is set, and the dominant symbol information valMPS, which is a component of the context variable information, is set to 0 (step S34).

ここでは、preCtxState=43であるため、
[数6]
pStateIdx=63−preCtxState
=63−43
=20
valMPS=0
となる。
Here, since preCtxState = 43,
[Equation 6]
pStateIdx = 63−preCtxState
= 63−43
= 20
valMPS = 0
It becomes.

次に、コンテキスト初期化部14は、ステップS33またはステップS34において取得されたコンテキスト変数情報をコンテキスト変数情報格納部16に格納する(ステップS35)。更に、コンテキスト初期化部14は、同様のコンテキスト変数情報を初期化済みコンテキスト変数情報として初期化済みコンテキスト変数情報格納部13に格納する。   Next, the context initialization unit 14 stores the context variable information acquired in step S33 or step S34 in the context variable information storage unit 16 (step S35). Further, the context initialization unit 14 stores similar context variable information in the initialized context variable information storage unit 13 as initialized context variable information.

ここでは、pStateIdx=63−43=20、valMPS=0が、ctxIdx=70のコンテキスト変数情報としてコンテキスト変数情報格納部16および初期化済みコンテキスト変数情報格納部13に格納される。   Here, pStateIdx = 63−43 = 20 and valMPS = 0 are stored in the context variable information storage unit 16 and the initialized context variable information storage unit 13 as context variable information of ctxIdx = 70.

ここで、所定の先読み量が設定されており、ステップS21において、所定の先読み量の分だけ復号済みシンタックス情報が取得できている場合には、現在のコンテキスト変数情報を初期化した条件が、取得した復号済みシンタックス情報に該当する場合のみ格納し、それ以外は格納せずに破棄することで、初期化済みコンテキスト変数情報格納部13に対する格納を制御する。   Here, when a predetermined amount of prefetching is set, and in step S21, when the decoded syntax information can be acquired by the amount of the predetermined prefetching amount, the condition for initializing the current context variable information is: By storing only when it corresponds to the acquired decoded syntax information, and discarding it without storing it, the storage to the initialized context variable information storage unit 13 is controlled.

コンテキスト初期化部14は、初期化すべきctxIdxが存在するか否かを判定し(ステップS36)、初期化すべきctxIdxが存在する場合は、ステップS26の処理に移行し、初期化処理を継続し、初期化すべきctxIdxが存在しない場合は、コンテキスト変数情報の初期化処理を終了する。   The context initialization unit 14 determines whether there is a ctxIdx to be initialized (step S36). If there is a ctxIdx to be initialized, the process proceeds to the process of step S26, and the initialization process is continued. If there is no ctxIdx to be initialized, the context variable information initialization process is terminated.

このように、不必要なコンテキスト変数情報の初期化処理を軽減し、初期化処理にかかる演算量を削減するとともに、初期化処理にかかる演算量の削減によって、復号が完了するまでにかかる時間を短縮できる。特に、コンテキスト変数管理部12、初期化済みコンテキスト変数情報格納部13を備えることで、一定の復号化単位毎に毎回初期化していたコンテキスト変数情報の再利用が可能となる。   In this way, the initialization processing of unnecessary context variable information is reduced, the amount of computation required for the initialization processing is reduced, and the time required for decoding to be completed is reduced by reducing the amount of computation required for the initialization processing. Can be shortened. In particular, by including the context variable management unit 12 and the initialized context variable information storage unit 13, it is possible to reuse the context variable information that has been initialized each time for a certain decoding unit.

次に、本実施形態におけるCABACの復号処理について、図6のフローチャートに基づいて説明する。図6は、CABACの復号単位である1スライス分の復号動作を表すフローチャートである。   Next, CABAC decoding processing in the present embodiment will be described based on the flowchart of FIG. FIG. 6 is a flowchart showing a decoding operation for one slice, which is a CABAC decoding unit.

CABACの復号処理を開始すると、状態遷移管理部11は、復号する対象となるシンタックス情報がスライスにおける最初のシンタックス情報であるかを判定する(ステップS41)。復号する対象となるシンタックス情報が最初のシンタックス情報である場合は、ステップS42の処理へ移行し、最初のシンタックス情報ではない場合は、ステップS44の処理へ移行する。   When the CABAC decoding process is started, the state transition management unit 11 determines whether the syntax information to be decoded is the first syntax information in the slice (step S41). If the syntax information to be decoded is the first syntax information, the process proceeds to step S42. If the syntax information is not the first syntax information, the process proceeds to step S44.

復号する対象となるシンタックス情報が最初のシンタックス情報である場合、状態遷移管理部11は、コンテキスト変数管理部12に対して初期化要求を行い、コンテキスト初期化部14は、状態遷移管理部11から初期化要求がされると、上述のコンテキスト変数情報の初期化を行う(ステップS42)。   When the syntax information to be decoded is the first syntax information, the state transition management unit 11 makes an initialization request to the context variable management unit 12, and the context initialization unit 14 When an initialization request is issued from 11, the above-described context variable information is initialized (step S42).

また、状態遷移管理部11が2値算術復号化部20対して初期化要求を行うと、2値算術復号化部20は、rangeを所定の値に初期化し、valueを復号ビット取得部21から取得したビットで初期化する(ステップS43)。   When the state transition management unit 11 issues an initialization request to the binary arithmetic decoding unit 20, the binary arithmetic decoding unit 20 initializes the range to a predetermined value and sets the value from the decoded bit acquisition unit 21. It initializes with the acquired bit (step S43).

次に、状態遷移管理部11がビット列情報管理部18に対して現在復号しようとするシンタックス情報の候補となる情報をビット列表記した情報に変換して対応付けるよう要求すると、この要求に基づいて、ビット列情報管理部18は、ビット列情報を作成する(ステップS44)。   Next, when the state transition management unit 11 requests the bit string information management unit 18 to convert information associated with syntax information candidates to be currently decoded into information expressed in bit strings, the request is based on this request. The bit string information management unit 18 creates bit string information (step S44).

次に、状態遷移管理部11は、ビット列カウント部17内のビット列カウンタbinIdxを‐1に初期化する(ステップS45)。   Next, the state transition management unit 11 initializes the bit string counter binIdx in the bit string counting unit 17 to −1 (step S45).

次に、状態遷移管理部11は、ビット列カウント部17内のビット列カウンタbinIdxを1増加する(ステップS46)。   Next, the state transition management unit 11 increments the bit string counter binIdx in the bit string counting unit 17 by 1 (step S46).

次に、状態遷移管理部11がコンテキスト判定部19に対して、復号で使用するコンテキスト変数情報を特定するためのctxIdxを特定するように要求すると、コンテキスト判定部19は、現在復号しようとしているビットのコンテキスト変数情報を特定するためのctxIdxを、状態遷移管理部11から得られる現在復号しようとしているシンタックス情報の種類に関する情報、ビット列カウント部17から得られる現在復号しようとしているビット列中のビット位置、復号済みシンタックス情報を利用して特定する(ステップS47)。   Next, when the state transition management unit 11 requests the context determination unit 19 to specify the ctxIdx for specifying the context variable information used for decoding, the context determination unit 19 uses the bit currently being decoded. CtxIdx for specifying the context variable information of information on the type of syntax information to be decoded currently obtained from the state transition management unit 11, the bit position in the bit string to be decoded currently obtained from the bit string counting unit 17 Then, identification is performed using the decoded syntax information (step S47).

次に、状態遷移管理部11が2値算術復号化部20に対して復号要求すると、2値算術復号化部20は、コンテキスト特定部19から特定されたctxIdxに基づいて得られるコンテキスト変数情報を取得し、復号を行う(ステップS48)。算術復号時に正規化によりビットストリームからのビット補充が必要な場合には、2値算術復号化部20は、復号ビット取得部21から必要なビットを補充し、また、復号が完了すると、復号結果をビット列比較部22に通知する。   Next, when the state transition management unit 11 requests the binary arithmetic decoding unit 20 to decode, the binary arithmetic decoding unit 20 obtains context variable information obtained based on the ctxIdx specified from the context specifying unit 19. Obtain and decrypt (step S48). When bit supplementation from the bitstream is required by normalization at the time of arithmetic decoding, the binary arithmetic decoding unit 20 supplements necessary bits from the decoded bit acquisition unit 21, and when the decoding is completed, the decoding result To the bit string comparison unit 22.

ビット列比較部22は、保持している2値算術復号化部20からの出力結果と、ビット列情報管理部18で用意されているビット列情報との比較を行い、ビット列情報中に等しいものが存在するか否かを判定する(ステップS49)。ビット列情報中に等しいものが存在しない場合は、ステップS46の処理に移行し、処理を継続する。ビット列情報中に等しいものが存在した場合は、ビット列比較部22は、等しいビット列情報に対応するシンタックス情報を取得して出力シンタックス情報として出力し、保持していた2値算術復号化部20の出力結果を初期化して次のシンタックス情報の復号に備え、必要に応じて状態遷移管理部11に出力シンタックス情報を通知する。   The bit string comparison unit 22 compares the held output result from the binary arithmetic decoding unit 20 with the bit string information prepared by the bit string information management unit 18, and there is an equal bit string information. Whether or not (step S49). If there is no equal bit string information, the process proceeds to step S46 and the process is continued. If there is an equal bit string information, the bit string comparison unit 22 acquires syntax information corresponding to the equal bit string information, outputs the syntax information as output syntax information, and holds the binary arithmetic decoding unit 20 held therein. In response to the initialization of the output result, the state transition management unit 11 is notified of the output syntax information in preparation for decoding of the next syntax information.

次に、状態遷移管理部11は、現在復号対象となっているこれから復号しようとしている次のシンタックス情報がmb_typeであり、かつステップS48の処理において得られる復号結果がI_PCMであるか否か判定する。この条件を満たす場合には、ステップS51に移行し、条件を満たさない場合には、CABACの復号を終了する。   Next, the state transition management unit 11 determines whether or not the next syntax information to be decoded that is currently the decoding target is mb_type and the decoding result obtained in the process of step S48 is I_PCM. To do. If this condition is satisfied, the process proceeds to step S51. If the condition is not satisfied, the CABAC decoding is terminated.

ステップS51では、ステップS43と同様の処理を行うことで、2値算術復号化部20の状態を初期化する。初期化が完了すると、CABACの復号を終了する。   In step S51, the state of the binary arithmetic decoding unit 20 is initialized by performing the same process as in step S43. When the initialization is completed, the CABAC decryption is terminated.

このように処理を行うことによって、コンテキスト変数情報を初期化する際の演算回数が軽減され、算術復号時の初期化処理の高速化を図ることが可能となる。   By performing the processing in this way, the number of operations when initializing the context variable information is reduced, and it is possible to speed up the initialization processing at the time of arithmetic decoding.

なお、本発明は、上記の算術復号化装置(デコーダ1)の機能をコンピュータに実現させるためのプログラムを含むものである。このプログラムは、記録媒体から読み取られてコンピュータに取り込まれても良いし、通信ネットワークを介して伝送されコンピュータに取り込まれても良い。   The present invention includes a program for causing a computer to realize the functions of the arithmetic decoding device (decoder 1). This program may be read from a recording medium and taken into a computer, or may be transmitted via a communication network and taken into a computer.

本発明のデコーダの基本構成を示す機能ブロック図である。It is a functional block diagram which shows the basic composition of the decoder of this invention. 本発明の算術復号部の構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the arithmetic decoding part of this invention. 本発明の基本動作を示すフローチャートである。It is a flowchart which shows the basic operation | movement of this invention. 本発明の算術復号部の基本動作を示すフローチャートである。It is a flowchart which shows the basic operation | movement of the arithmetic decoding part of this invention. 本発明の算術復号部の詳細な動作を示すフローチャートである。It is a flowchart which shows the detailed operation | movement of the arithmetic decoding part of this invention. 本発明の算術復号部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the arithmetic decoding part of this invention. 算術符号化・復号化の概念を説明するための概念図である。It is a conceptual diagram for demonstrating the concept of arithmetic encoding / decoding. CABACの基本構成を示す機能ブロック図である。It is a functional block diagram which shows the basic composition of CABAC. CABACにおける算術復号部の構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the arithmetic decoding part in CABAC. コンテキスト切り替えによる系列の分離を説明するための図である。It is a figure for demonstrating the isolation | separation of the series by context switching. CABACの基本動作を示すフローチャートである。It is a flowchart which shows the basic operation | movement of CABAC. CABACにおいてコンテキスト変数情報を初期化する際に使用するパラメータm、nの例を示すための図である。It is a figure for showing the example of parameters m and n used when initializing context variable information in CABAC. CABACにおける算術復号部の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the arithmetic decoding part in CABAC. CABACにおけるコンテキスト変数情報の初期化処理における動作を示すフローチャートである。It is a flowchart which shows the operation | movement in the initialization process of the context variable information in CABAC.

符号の説明Explanation of symbols

1 デコーダ
2 ビットストリーム取得部
3 復号位置検出部
4 ビットストリームバッファ
5 復号位置管理部
6 シンタックス情報取得部
7 シンタックス情報格納部
8 算術復号部
11 状態遷移管理部
12 コンテキスト変数管理部
13 初期化済みコンテキスト変数情報格納部
14 コンテキスト初期化部
15 コンテキスト初期化情報格納部
16 コンテキスト変数情報格納部
17 ビット列カウント部
18 ビット列情報管理部
19 コンテキスト特定部
20 2値算術復号化部
21 復号ビット取得部
22 ビット列比較部
101 デコーダ
102 ビットストリーム取得部
103 復号位置検出部
104 ビットストリームバッファ
105 復号位置管理部
106 シンタックス情報取得部
107 シンタックス情報格納部
108 算術復号部
111 状態遷移管理部
112 コンテキスト初期化部
113 コンテキスト初期化情報格納部
114 コンテキスト変数情報格納部
115 ビット列カウント部
116 ビット列情報管理部
117 コンテキスト特定部
118 2値算術復号化部
119 復号ビット取得部
120 ビット列比較部
DESCRIPTION OF SYMBOLS 1 Decoder 2 Bit stream acquisition part 3 Decoding position detection part 4 Bit stream buffer 5 Decoding position management part 6 Syntax information acquisition part 7 Syntax information storage part 8 Arithmetic decoding part 11 State transition management part 12 Context variable management part 13 Initialization Context variable information storage unit 14 Context initialization unit 15 Context initialization information storage unit 16 Context variable information storage unit 17 Bit string count unit 18 Bit string information management unit 19 Context identification unit 20 Binary arithmetic decoding unit 21 Decoding bit acquisition unit 22 Bit string comparison unit 101 Decoder 102 Bit stream acquisition unit 103 Decoding position detection unit 104 Bit stream buffer 105 Decoding position management unit 106 Syntax information acquisition unit 107 Syntax information storage unit 108 Arithmetic decoding unit 111 State Transition Management Unit 112 Context Initialization Unit 113 Context Initialization Information Storage Unit 114 Context Variable Information Storage Unit 115 Bit Sequence Count Unit 116 Bit Sequence Information Management Unit 117 Context Specification Unit 118 Binary Arithmetic Decoding Unit 119 Decoded Bit Acquisition Unit 120 Bit Sequence Comparison part

Claims (2)

入力されるビットストリームの復号位置を特定するためのスタートコードを基に、入力される前記ビットストリームを探索して算術復号するビット列を特定し、特定したビット列をバッファメモリに格納し、
算術復号を開始するビット列上の位置を示す復号位置情報に基づいて、前記バッファメモリに格納されているビット列のヘッダ情報を復号して、当該復号位置情報によって指定されるビット列上の特定位置におけるビット列を算術復号するための復号手順を示すシンタックス情報を取得し、
予め複数用意されているコンテキスト変数情報のうちの1つを、前記シンタックス情報に応じて初期化し、その初期化した前記コンテキスト変数情報を利用して、前記特定位置におけるビット列を算術復号する算術復号化装置であって、
前記シンタックス情報の種類に応じて初期化された前記コンテキスト変数情報を初期化済みコンテキスト変数情報として複数格納する初期化済みコンテキスト変数情報格納手段と、
前記コンテキスト変数情報の初期化に必要な復号済みの前記シンタックス情報を取得し、当該復号済みのシンタックス情報の種類に従って、前記コンテキスト変数情報が前記初期化済みコンテキスト変数情報格納手段に格納されているか否かを判定し、
格納されていなかった場合、前記復号済みのシンタックス情報に応じて前記コンテキスト変数情報の初期化を行った後、前記初期化済みコンテキスト変数情報格納手段に格納し、
格納されていた場合、前記復号済みのシンタックス情報に基づいて、前記初期化済みコンテキスト変数情報格納手段から特定の前記コンテキスト変数情報を取得するコンテキスト変数管理手段と、
を備えることを特徴とする算術復号化装置。
Based on the start code for specifying the decoding position of the input bit stream, the input bit stream is searched to specify a bit string for arithmetic decoding, and the specified bit string is stored in the buffer memory,
Based on decoding position information indicating a position on the bit string at which arithmetic decoding is started, the header information of the bit string stored in the buffer memory is decoded, and a bit string at a specific position on the bit string specified by the decoding position information To obtain syntax information indicating a decoding procedure for arithmetic decoding,
Arithmetic decoding that initializes one of a plurality of context variable information prepared in advance according to the syntax information, and arithmetically decodes the bit string at the specific position using the initialized context variable information Device.
Initialized context variable information storage means for storing a plurality of the context variable information initialized according to the type of syntax information as initialized context variable information;
The decoded syntax information necessary for initialization of the context variable information is acquired, and the context variable information is stored in the initialized context variable information storage unit according to the type of the decoded syntax information. Whether or not
If not stored, after initializing the context variable information according to the decoded syntax information, stored in the initialized context variable information storage means,
If stored, context variable management means for acquiring the specific context variable information from the initialized context variable information storage means based on the decoded syntax information;
An arithmetic decoding device comprising:
入力されるビットストリームの復号位置を特定するためのスタートコードを基に、入力される前記ビットストリームを探索して算術復号するビット列を特定し、特定したビット列をバッファメモリに格納し、
算術復号を開始するビット列上の位置を示す復号位置情報に基づいて、前記バッファメモリに格納されているビット列のヘッダ情報を復号して、当該復号位置情報によって指定されるビット列上の特定位置におけるビット列を算術復号するための復号手順を示すシンタックス情報を取得し、
予め複数用意されているコンテキスト変数情報のうちの1つを、前記シンタックス情報に応じて初期化し、その初期化した前記コンテキスト変数情報を利用して、前記特定位置におけるビット列を算術復号する算術復号化装置をコンピュータに実現させるための算術復号化プログラムであって、
前記コンピュータを、
前記シンタックス情報の種類に応じて初期化された前記コンテキスト変数情報を初期化済みコンテキスト変数情報として複数格納する初期化済みコンテキスト変数情報格納手段と、
前記コンテキスト変数情報の初期化に必要な復号済みの前記シンタックス情報を取得し、当該復号済みのシンタックス情報の種類に従って、前記コンテキスト変数情報が前記初期化済みコンテキスト変数情報格納手段に格納されているか否かを判定し、
格納されていなかった場合、前記復号済みのシンタックス情報に応じて前記コンテキスト変数情報の初期化を行った後、前記初期化済みコンテキスト変数情報格納手段に格納し、
格納されていた場合、前記復号済みのシンタックス情報に基づいて、前記初期化済みコンテキスト変数情報格納手段から特定の前記コンテキスト変数情報を取得するコンテキスト変数管理手段と、
して機能させることを特徴とする算術復号化プログラム。
Based on the start code for specifying the decoding position of the input bit stream, the input bit stream is searched to specify a bit string for arithmetic decoding, and the specified bit string is stored in the buffer memory,
Based on decoding position information indicating a position on the bit string at which arithmetic decoding is started, the header information of the bit string stored in the buffer memory is decoded, and a bit string at a specific position on the bit string specified by the decoding position information To obtain syntax information indicating a decoding procedure for arithmetic decoding,
Arithmetic decoding that initializes one of a plurality of context variable information prepared in advance according to the syntax information, and arithmetically decodes the bit string at the specific position using the initialized context variable information An arithmetic decoding program for causing a computer to realize the encoding device,
The computer,
Initialized context variable information storage means for storing a plurality of the context variable information initialized according to the type of syntax information as initialized context variable information;
The decoded syntax information necessary for initialization of the context variable information is acquired, and the context variable information is stored in the initialized context variable information storage unit according to the type of the decoded syntax information. Whether or not
If not stored, after initializing the context variable information according to the decoded syntax information, stored in the initialized context variable information storage means,
If stored, context variable management means for acquiring the specific context variable information from the initialized context variable information storage means based on the decoded syntax information;
An arithmetic decoding program characterized by being made to function.
JP2004028423A 2004-02-04 2004-02-04 Arithmetic decoding device and arithmetic decoding program Expired - Lifetime JP4241417B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004028423A JP4241417B2 (en) 2004-02-04 2004-02-04 Arithmetic decoding device and arithmetic decoding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004028423A JP4241417B2 (en) 2004-02-04 2004-02-04 Arithmetic decoding device and arithmetic decoding program

Publications (2)

Publication Number Publication Date
JP2005223533A JP2005223533A (en) 2005-08-18
JP4241417B2 true JP4241417B2 (en) 2009-03-18

Family

ID=34998842

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004028423A Expired - Lifetime JP4241417B2 (en) 2004-02-04 2004-02-04 Arithmetic decoding device and arithmetic decoding program

Country Status (1)

Country Link
JP (1) JP4241417B2 (en)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007074648A (en) * 2005-09-09 2007-03-22 Matsushita Electric Ind Co Ltd Cabac decoding apparatus
US7245242B2 (en) * 2005-11-28 2007-07-17 Conexant Systems, Inc. Decoding systems and methods
JP2007300517A (en) * 2006-05-02 2007-11-15 Sony Corp Moving image processing method, program of moving image processing method, recording medium with program of moving image processing method recorded thereon and moving image processor
JP4865509B2 (en) * 2006-11-01 2012-02-01 キヤノン株式会社 Decoding device and decoding method
JP2008289125A (en) * 2007-04-20 2008-11-27 Panasonic Corp Arithmetic decoding apparatus and method thereof
JP5278827B2 (en) * 2007-09-06 2013-09-04 日本電気株式会社 Video encoding device, video decoding device, video encoding method, video decoding method, video encoding or decoding program
JP2009152990A (en) * 2007-12-21 2009-07-09 Panasonic Corp Image encoding device and image decoding device
JP4915350B2 (en) 2008-01-16 2012-04-11 日本電気株式会社 Entropy encoder, video encoding device, video encoding method, and video encoding program
KR101223835B1 (en) 2008-07-11 2013-01-17 프라운호퍼 게젤샤프트 쭈르 푀르데룽 데어 안겐반텐 포르슝 에. 베. Audio signal synthesizer and audio signal encoder
CA2871252C (en) * 2008-07-11 2015-11-03 Nikolaus Rettelbach Audio encoder, audio decoder, methods for encoding and decoding an audio signal, audio stream and computer program
BR112012009446B1 (en) 2009-10-20 2023-03-21 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V DATA STORAGE METHOD AND DEVICE
PT2524371T (en) * 2010-01-12 2017-03-15 Fraunhofer Ges Forschung Audio encoder, audio decoder, method for encoding an audio information, method for decoding an audio information and computer program using a hash table describing both significant state values and interval boundaries
US8344917B2 (en) * 2010-09-30 2013-01-01 Sharp Laboratories Of America, Inc. Methods and systems for context initialization in video coding and decoding
US9313514B2 (en) * 2010-10-01 2016-04-12 Sharp Kabushiki Kaisha Methods and systems for entropy coder initialization
FR2972588A1 (en) 2011-03-07 2012-09-14 France Telecom METHOD FOR ENCODING AND DECODING IMAGES, CORRESPONDING ENCODING AND DECODING DEVICE AND COMPUTER PROGRAMS
CN106851290B (en) * 2011-03-10 2020-11-03 威勒斯媒体国际有限公司 Decoding method, decoding device, encoding method, and encoding device
RU2642373C1 (en) * 2011-06-16 2018-01-24 ДжиИ Видео Компрешн, ЭлЭлСи Initialization of context in entropy coding
FR2977111A1 (en) * 2011-06-24 2012-12-28 France Telecom METHOD FOR ENCODING AND DECODING IMAGES, CORRESPONDING ENCODING AND DECODING DEVICE AND COMPUTER PROGRAMS
US9060173B2 (en) * 2011-06-30 2015-06-16 Sharp Kabushiki Kaisha Context initialization based on decoder picture buffer
US10412417B2 (en) 2011-07-07 2019-09-10 Sony Corporation Image processing device and method capable of performing an encoding process or a decoding process on an image at high speed
UA114674C2 (en) 2011-07-15 2017-07-10 ДЖ.І. ВІДІЕУ КЕМПРЕШН, ЛЛСі CONTEXT INITIALIZATION IN ENTHROPIC CODING
JP5521083B2 (en) * 2013-04-18 2014-06-11 パナソニック株式会社 Image encoding device

Also Published As

Publication number Publication date
JP2005223533A (en) 2005-08-18

Similar Documents

Publication Publication Date Title
JP4241417B2 (en) Arithmetic decoding device and arithmetic decoding program
US6894628B2 (en) Apparatus and methods for entropy-encoding or entropy-decoding using an initialization of context variables
JP5736032B2 (en) Adaptive binarization for arithmetic coding
JP4313771B2 (en) Method and apparatus for encoding transform coefficients in image and / or video encoder and decoder and corresponding computer program and corresponding computer readable storage medium
JP5952900B2 (en) Mode switching to support entropy coding
EP3550726B1 (en) Methods and devices for reducing sources in binary entropy coding and decoding
US6900748B2 (en) Method and apparatus for binarization and arithmetic coding of a data value
US9397694B2 (en) Methods and devices for coding and decoding the position of the last significant coefficient
US8102911B2 (en) Picture coding device
US20070103347A1 (en) Method and device for decoding syntax element in CABAC decoder
KR100717055B1 (en) Method of decoding bin values using pipeline architecture, and decoding apparatus therefor
US20110080958A1 (en) Multimedia signature coding and decoding
US20120314760A1 (en) Method and system to reduce modelling overhead for data compression
JP2007166039A (en) Image coding equipment
CA2799763A1 (en) Methods and devices for data compression using context-based coding order
EP2697974A2 (en) Methods and devices for coding and decoding the position of the last significant coefficient
JP2006279333A (en) Arithmetic coding apparatus and arithmetic coding method
US20100040136A1 (en) Method for performing binarization using a lookup table
JP2009534886A5 (en)
JP5961189B2 (en) Method and apparatus for arithmetic coding and termination
JP2010193398A (en) Image encoding device, and image encoding method
KR20060038189A (en) Method and apparatus for context-based adaptive binary arithmetic coding
JP2010130522A (en) Moving image encoding device and moving image encoding method
US20050232362A1 (en) High-speed image compression apparatus using last non-zero detection circuit
US8970405B2 (en) Method and apparatus for entropy decoding

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060630

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081205

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

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

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

Free format text: PAYMENT UNTIL: 20120109

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 4241417

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20120109

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120109

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20130109

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130109

Year of fee payment: 4