JP6159240B2 - Binary arithmetic encoding device, binary arithmetic encoding method, and binary arithmetic encoding program - Google Patents

Binary arithmetic encoding device, binary arithmetic encoding method, and binary arithmetic encoding program Download PDF

Info

Publication number
JP6159240B2
JP6159240B2 JP2013254531A JP2013254531A JP6159240B2 JP 6159240 B2 JP6159240 B2 JP 6159240B2 JP 2013254531 A JP2013254531 A JP 2013254531A JP 2013254531 A JP2013254531 A JP 2013254531A JP 6159240 B2 JP6159240 B2 JP 6159240B2
Authority
JP
Japan
Prior art keywords
value
context
binary arithmetic
update
lps
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2013254531A
Other languages
Japanese (ja)
Other versions
JP2015115665A (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2013254531A priority Critical patent/JP6159240B2/en
Publication of JP2015115665A publication Critical patent/JP2015115665A/en
Application granted granted Critical
Publication of JP6159240B2 publication Critical patent/JP6159240B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

本発明は、二値算術符号化処理を高速化する二値算術符号化装置、二値算術符号化方法及び二値算術符号化プログラムに関する。   The present invention relates to a binary arithmetic encoding device, a binary arithmetic encoding method, and a binary arithmetic encoding program for speeding up binary arithmetic encoding processing.

HEVC/H.265での圧縮後の画像符号化データは、統計的性質を有する。二値算術符号化処理は、この統計的性質を利用してさらに冗長度を削減するために、エントロピー符号化の一種であるCABAC(Context−based Adaptive Binary Arithmetic Coding)が用いられる。CABAC処理は大きく二進数系列化処理、コンテキストモデリング、二値算術符号化処理の3つの処理が実施される。映像符号化処理により符号化された動きベクトルや変換係数といったデータは、シンボルと呼ばれ、それぞれのシンボルの性質に応じて定められている方法で二進数系列化され、シンボルからbin(二進数)列に変換される。その二進数に対する生起確率モデルを、処理対象ブロック近傍のシンボルの状態などに応じて、動的に決定し(コンテキストモデリング処理)、その二進数はコンテキストモデリング処理で決定された生起確率モデルに従って二値算術符号化される。   HEVC / H. The encoded image data after compression by H.265 has statistical properties. In the binary arithmetic coding process, CABAC (Context-based Adaptive Binary Arithmetic Coding), which is a kind of entropy coding, is used in order to further reduce the redundancy using this statistical property. The CABAC process is largely performed by three processes: a binary series process, a context modeling process, and a binary arithmetic coding process. Data such as motion vectors and transform coefficients encoded by the video encoding process is called a symbol, and is converted into a binary number sequence by a method determined according to the property of each symbol, and bin (binary number) from the symbol. Converted to a column. The occurrence probability model for the binary number is dynamically determined according to the state of the symbol in the vicinity of the processing target block (context modeling process), and the binary number is binary according to the occurrence probability model determined by the context modeling process. Arithmetic encoded.

これらの処理の中で、二値算術符号化部は、binと呼ぶ二進数系列化された値毎にコンテキストの生起確率を変更し、その変更された生起確率を次のbin処理時に用いることが有る。また、レンジ値やロー値といった変数もbin毎に更新されるため、データ依存性が存在する。そのため、並列処理等により複数のbinを同時に処理することは困難であり、二値算術符号化処理を高速化するためには、動作周波数を上げることが必要となる。動作周波数の高速化には限界が存在するのに加え、動作周波数の高速化によりシステムの消費電力を増加させるため、動作周波数の高速化の適用は限定的である。   Among these processes, the binary arithmetic coding unit may change the occurrence probability of the context for each binary-sequenced value called bin, and use the changed occurrence probability at the next bin process. Yes. In addition, since variables such as a range value and a low value are updated for each bin, data dependency exists. Therefore, it is difficult to process a plurality of bins simultaneously by parallel processing or the like, and it is necessary to increase the operating frequency in order to increase the speed of binary arithmetic encoding processing. In addition to the limitations in increasing the operating frequency, application of increasing the operating frequency is limited because the power consumption of the system is increased by increasing the operating frequency.

一方で、アルゴリズム的に並列化させてCABAC処理を行う方式が提案されている(例えば、特許文献1参照)。これは、一つの画面をいくつかの領域(スライス)に分割し、各々のスライスにおいて独立してCABAC処理を行うものである。CABAC処理は各スライス処理の開始時点で内部状態を初期化して実行されるので、各々完全に独立させて動作させると、符号化効率が低下する。そこで、画面内の最初のスライスのCABAC処理がある程度進んだ後に、その内部状態を初期値として用いて次のスライスのCABAC処理を開始することで、符号化効率を維持しつつCABAC処理を並列化させている。   On the other hand, a method of performing CABAC processing in an algorithmic parallel manner has been proposed (see, for example, Patent Document 1). In this method, one screen is divided into several regions (slices), and CABAC processing is performed independently in each slice. Since the CABAC process is executed by initializing the internal state at the start of each slice process, the coding efficiency is reduced if each CABAC process is operated completely independently. Therefore, after the CABAC process of the first slice in the screen has progressed to some extent, the CABAC process of the next slice is started using the internal state as an initial value, so that the CABAC process is parallelized while maintaining the coding efficiency. I am letting.

特開2012−134757号公報JP 2012-134757 A

しかしながら、特許文献1の方式にあっては、符号化装置、復号化装置がこの機能に対応している必要が有ること、スライス分割せずに実行した場合の圧縮性能より劣ること、さらに、CABAC後のビット数も含めた符号化モードの決定を行う場合、コンテキスト単位での高速化が求められることから、本方式の適用も限定的である。このような理由から、スライス分割による並列処理を用いず、二値算術符号化部に入力されるbinに対する並列処理を実現し、二値算術符号化処理を高速化する必要がある。   However, in the method of Patent Document 1, it is necessary for the encoding device and the decoding device to support this function, the compression performance is poor when executed without slice division, and CABAC. When determining the encoding mode including the number of subsequent bits, the speed of the context unit is required, so the application of this method is also limited. For this reason, it is necessary to increase the speed of the binary arithmetic encoding process by realizing parallel processing for bins input to the binary arithmetic encoding unit without using parallel processing by slice division.

本発明は、このような事情に鑑みてなされたもので、二値算術符号化処理を高速化することができる二値算術符号化装置、二値算術符号化方法及び二値算術符号化プログラムを提供することを目的とする。   The present invention has been made in view of such circumstances, and a binary arithmetic encoding device, a binary arithmetic encoding method, and a binary arithmetic encoding program capable of speeding up binary arithmetic encoding processing are provided. The purpose is to provide.

本発明は、コンテキスト情報とシンボルからシンボル生起確率状態の状態遷移値とMPS/LPS情報を算出するコンテキスト更新部と、前記シンボル生起確率状態の状態遷移値、前記MPS/LPS情報とレンジ値から再正規化シフト量を算出すると同時にレンジ値を更新するレンジ更新処理部と、前記再正規化シフト量、前記MPS/LPS情報、前記更新されたレンジ値とロー値からロー値を更新するロー値更新部と、前記更新されたロー値を用いてビットストリームを生成するビットストリーム生成部とを備える二値算術符号化装置であって、前記コンテキスト更新部は、1bin目の生起確率状態から、2bin目の生起確率状態を同時に決定する際に生起確率状態テーブルを参照して複数のbinを並列処理することを特徴とする。   The present invention provides a context update unit that calculates a state transition value of symbol occurrence probability state and MPS / LPS information from context information and symbols, a state update value of the symbol occurrence probability state, MPS / LPS information, and a range value. A range update processing unit that calculates a normalized shift amount and simultaneously updates a range value; a low value update that updates a low value from the renormalized shift amount, the MPS / LPS information, and the updated range value and low value And a bit stream generation unit that generates a bit stream using the updated row value, wherein the context update unit starts from the occurrence probability state of the first bin, the second bin When simultaneously determining the occurrence probability states of a plurality of bins, a plurality of bins are processed in parallel with reference to the occurrence probability state table. .

本発明は、前記レンジ更新処理部は、1bin目と2bin目の生起確率状態を用いてLPS区間長テーブルの値を読み出し、前記レンジ値を用いて前記読み出された値の中から複数の値を選択し、前記レンジ値の更新及び再正規化シフト量の算出を行うことを特徴とする。   In the present invention, the range update processing unit reads the value of the LPS section length table using the occurrence probability states of the first bin and the second bin, and uses a plurality of values from the read values using the range value. And the range value is updated and the renormalization shift amount is calculated.

本発明は、前記ロー値更新部は、前記MPS/LPS情報、前記再正規化シフト量、更新された前記レンジ値を複数受け取り、前記ロー値と前記再正規化シフト量の累積加算を行い、当該累積加算の結果が指定された閾値を超えた場合には、前記ビットストリーム生成部へデータを出力すると共に、前記ロー値および前記出力したデータのビット数分だけ前記累積加算の結果から減ずることを特徴とする。   In the present invention, the low value update unit receives a plurality of the MPS / LPS information, the renormalization shift amount, and the updated range value, and performs cumulative addition of the low value and the renormalization shift amount, When the result of the cumulative addition exceeds a specified threshold, data is output to the bitstream generation unit and the result of the cumulative addition is reduced by the low value and the number of bits of the output data. It is characterized by.

本発明は、前記ビットストリーム生成部は、桁上がり処理を行うために、一時的に受け取ったデータを保持し、桁上がりを生じる可能性が有る場合は出力せず、受け取ったデータ量のみを加算し、桁上がりを生じないことが確認された場合に、桁上がり処理を行い保持したデータをビットストリームとして出力し、受け取ったデータ量が1になるまで桁上がり処理の結果により1あるいは0を出力し続け、確認に用いたデータを再度一時的に保持することを特徴とする。   In the present invention, the bitstream generation unit holds temporarily received data to perform carry processing, and does not output when there is a possibility of carry, but adds only the received data amount When it is confirmed that no carry occurs, the carry data is processed and the stored data is output as a bit stream, and 1 or 0 is output depending on the result of the carry process until the received data amount becomes 1. Then, the data used for confirmation is temporarily stored again.

本発明は、コンテキスト情報とシンボルからシンボル生起確率状態の状態遷移値とMPS/LPS情報を算出するコンテキスト更新部と、前記シンボル生起確率状態の状態遷移値、前記MPS/LPS情報とレンジ値から再正規化シフト量を算出すると同時にレンジ値を更新するレンジ更新処理部と、前記再正規化シフト量、前記MPS/LPS情報、前記更新されたレンジ値とロー値からロー値を更新するロー値更新部と、前記更新されたロー値を用いてビットストリームを生成するビットストリーム生成部とを備える二値算術符号化装置が行う二値算術符号化方法であって、前記コンテキスト更新部が、1bin目の生起確率状態から、2bin目の生起確率状態を同時に決定する際に生起確率状態テーブルを参照して複数のbinを並列処理することを特徴とする。   The present invention provides a context update unit that calculates a state transition value of symbol occurrence probability state and MPS / LPS information from context information and symbols, a state update value of the symbol occurrence probability state, MPS / LPS information, and a range value. A range update processing unit that calculates a normalized shift amount and simultaneously updates a range value; a low value update that updates a low value from the renormalized shift amount, the MPS / LPS information, and the updated range value and low value And a binary arithmetic encoding method performed by a binary arithmetic encoding device including a bitstream generation unit that generates a bitstream using the updated row value, wherein the context update unit includes a first bin When the occurrence probability state of the second bin is simultaneously determined from the occurrence probability state, the plurality of bins are arranged in parallel by referring to the occurrence probability state table. And characterized in that the processing.

本発明は、コンピュータを、前記二値算術符号化装置として機能させるための二値算術符号化プログラムである。   The present invention is a binary arithmetic encoding program for causing a computer to function as the binary arithmetic encoding device.

本発明によれば、スライス分割などアルゴリズムレベルでの並列化を行わなくとも、複数bin列を並列処理することにより二値算術符号化処理を高速化することができるという効果が得られる。   According to the present invention, it is possible to increase the speed of binary arithmetic coding processing by performing parallel processing on a plurality of bin sequences without performing parallelization at an algorithm level such as slice division.

本発明の一実施形態の基本構成を示すブロック図である。It is a block diagram which shows the basic composition of one Embodiment of this invention. 図1に示すコンテキスト更新部1の処理動作を示すフローチャートである。It is a flowchart which shows the processing operation of the context update part 1 shown in FIG. 図1に示すレンジ更新部2の処理動作を示すフローチャートである。It is a flowchart which shows the processing operation of the range update part 2 shown in FIG. 図1に示すロー更新部3の処理動作を示すフローチャートである。It is a flowchart which shows the processing operation of the row update part 3 shown in FIG. 2並列の二値算術符号処理の構成を示すブロック図である。It is a block diagram which shows the structure of 2 parallel binary arithmetic code processing. 二値算術符号化処理を高速化するための装置構成を示すブロック図である。It is a block diagram which shows the apparatus structure for speeding up binary arithmetic coding processing. 状態遷移テーブルの内容を示す図である。It is a figure which shows the content of a state transition table. 2並列処理のための状態遷移テーブル内容の構成を示す図である。It is a figure which shows the structure of the state transition table content for 2 parallel processing. 更新値の選択動作を示すフローチャートである。It is a flowchart which shows selection operation | movement of an update value. 2並列の処理を行う図6に示すコンテキスト更新部21の構成を示すブロック図である。It is a block diagram which shows the structure of the context update part 21 shown in FIG. 6 which performs 2 parallel processes. 選択信号生成器の論理を示す図である。It is a figure which shows the logic of a selection signal generator. 選択信号生成器の論理を示す図である。It is a figure which shows the logic of a selection signal generator. 2並列コンテキスト更新処理の流れを示す図である。It is a figure which shows the flow of 2 parallel context update processing. 2並列の処理を行う図6に示すレンジ更新部22の構成を示すブロック図である。It is a block diagram which shows the structure of the range update part 22 shown in FIG. 6 which performs 2 parallel processes. 2並列の処理を行う図6に示すロー更新部23の構成を示すブロック図である。It is a block diagram which shows the structure of the row update part 23 shown in FIG. 6 which performs 2 parallel processes. ロー更新値の処理例を示す図である。It is a figure which shows the process example of a row update value. 図6に示すビットストリーム生成部24構成を示す図である。It is a figure which shows the bit stream production | generation part 24 structure shown in FIG. ビットストリーム生成処理ステートマシンの例を示す図である。It is a figure which shows the example of a bit stream production | generation process state machine.

以下、図面を参照して、本発明の一実施形態による二値算術符号化装置の基本構成を説明する。図1は同実施形態における二値算術符号化部の基本構成を示すブロック図である。二値算術符号化処理は、コンテキスト更新処理、レンジ値更新処理、ロー値更新処理の大きく3つの処理に分かれている。HEVC Test Model(HM)では、これらの処理は一つの処理ループで実装されており、各々の更新処理は、3つの処理が完了しなければ、次のbinに対する更新ができないようになっている。   Hereinafter, a basic configuration of a binary arithmetic coding apparatus according to an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a basic configuration of a binary arithmetic encoding unit in the embodiment. The binary arithmetic encoding process is roughly divided into three processes: a context update process, a range value update process, and a low value update process. In the HEVC Test Model (HM), these processes are implemented in one processing loop, and each update process cannot be updated for the next bin unless three processes are completed.

しかしながら、各更新処理間で適切な変数を受け渡すことで、各々の更新処理は独立して動作させることが可能となる。これは、各更新処理を、依存性を持つために並列に実行できなかった処理をパイプライン処理で並列して処理可能になることを表している。図1に示すように、コンテキスト更新部1は、入力するシンボルとコンテキストに依存する。レンジ更新部2は、コンテキスト、レンジ値、コンテキスト更新部1から出力されるシンボルが優勢シンボル(MPS)か劣性シンボル(LPS)かの情報に依存する。ロー更新部3は、MPSかLPSかの情報、更新されたレンジ値と再正規化された場合、その正規化量を表すビットシフト量、そして、ロー値に依存する。   However, each update process can be operated independently by passing an appropriate variable between the update processes. This indicates that each update process can be processed in parallel by pipeline processing, which cannot be executed in parallel due to dependency. As shown in FIG. 1, the context update unit 1 depends on the input symbol and context. The range update unit 2 depends on the context, the range value, and information on whether the symbol output from the context update unit 1 is a dominant symbol (MPS) or a recessive symbol (LPS). The row updating unit 3 depends on the MPS or LPS information, the updated range value, and the bit shift amount indicating the normalization amount and the row value when renormalized.

この構成により、コンテキスト更新、レンジ更新、ロー更新をパイプライン処理化可能である。また、コンテキスト更新のみ実施し、その出力をメモリに蓄えておき、コンテキスト更新処理終了後にまとめてレンジ値更新を連続して行い、その出力もメモリに蓄えておきレンジ値更新終了後、ロー値更新を連続して行うといった処理形態をとることも可能になる。   With this configuration, context update, range update, and row update can be pipelined. Also, only the context update is performed, the output is stored in the memory, the range value is updated continuously after the context update processing is completed, the output is also stored in the memory, the range value is updated, and the low value is updated. It is also possible to adopt a processing form in which the processes are performed continuously.

また、HEVCでは、生起確率の推定が困難なbinについて、0と1の生起確率を0.5に固定し、算術符号処理の一部を省いて処理を行うバイパス処理が行われる。このバイパス処理は、ロー値の更新のみが行われるため、各更新処理を独立化させることで、コンテキスト更新部1とレンジ更新部2を動作させることなく、符号化処理を実行することが可能となる。また、ロー値更新は、レンジ更新部1においてレンジ値が小さくなった場合(256未満)に実行される再正規化が行われた場合に実行されるので、その状況になるまでロー更新部3を停止させることができる。これらの観点からも各更新部を独立に動作させられる本方式は有効である。   Further, in HEVC, bypass processing is performed in which occurrence probabilities of 0 and 1 are fixed to 0.5 and a part of arithmetic code processing is omitted for bins whose occurrence probability is difficult to estimate. In this bypass process, only the update of the low value is performed. Therefore, by making each update process independent, it is possible to execute the encoding process without operating the context update unit 1 and the range update unit 2. Become. Moreover, since the low value update is performed when the renormalization is performed when the range value becomes small (less than 256) in the range update unit 1, the low update unit 3 is updated until the situation is reached. Can be stopped. From these viewpoints, the present method that allows each updating unit to operate independently is also effective.

次に、図2を参照して、図1に示すコンテキスト更新部1の処理動作を説明する。図2は、図1に示すコンテキスト更新部1の処理動作を示すフローチャートである。コンテキスト更新部1は、コンテキスト情報(符号化パラメータとMPSシンボル値)とシンボルを入力し、符号化パラメータに対応するシンボル生成確率の状態遷移値と符号化パラメータに対応するMPSのシンボル値を読み出す(ステップS1、S2)。そして、その値をアドレスとして状態遷移テーブルをアクセスし、入力されるシンボルがMPSかLPSになった場合の値を読み出す(ステップS3)。そして、MPSシンボル値との比較により(ステップS4)、シンボル値がMPSかLPSかを判断し(ステップS5)、先の読み出した値の適した方の値を符号化パラメータに対応するシンボル生起確率の状態遷移値を格納しているテーブルに、その値を更新値として格納する(ステップS6)。そして、入力されたシンボル値がMPSかLPSかの情報と更新前のシンボル生起確率を表すシンボル生起確率の状態遷移値を出力する。   Next, the processing operation of the context updating unit 1 shown in FIG. 1 will be described with reference to FIG. FIG. 2 is a flowchart showing the processing operation of the context update unit 1 shown in FIG. The context update unit 1 inputs context information (encoding parameter and MPS symbol value) and a symbol, and reads a state transition value of a symbol generation probability corresponding to the encoding parameter and an MPS symbol value corresponding to the encoding parameter ( Steps S1, S2). Then, the state transition table is accessed using the value as an address, and the value when the input symbol is MPS or LPS is read (step S3). Then, by comparing with the MPS symbol value (step S4), it is determined whether the symbol value is MPS or LPS (step S5), and the symbol occurrence probability corresponding to the encoding parameter is set to a suitable one of the previously read values. The value is stored as an updated value in the table storing the state transition values (step S6). Then, information indicating whether the input symbol value is MPS or LPS and a state transition value of the symbol occurrence probability indicating the symbol occurrence probability before update are output.

次に、図3を参照して、図1に示すレンジ更新部2の処理動作を説明する。図3は、図1に示すレンジ更新部2の処理動作を示すフローチャートである。レンジ更新部2は、受け取ったシンボル生起確率の状態遷移値をアドレスとして、LPS区間長をrLPSテーブル4から読み出す(ステップS11)。読み出されるLPS区間長は、受け取ったレンジ値の上位2ビットにより値が異なるため、rLPSテーブル4からは、4つの値を同時に読み出し、レンジ値に従い1つの値を選択する(ステップS12)。レンジ値そのものは、受け取ったLPS/MPS情報により、LPSの場合は、読み出し、選択されたrLPSテーブルの値を、MPSの場合は、受け取ったレンジ値から選択されたrLPSテーブルの値を減じた値を選択し(ステップS13)、その値が256未満である場合、256以上、512未満になるように左シフトする(ステップS14)。このシフトが再正規化と呼ばれる処理である。このようにしてレンジ値は更新される。そして、ロー値更新に必要となるLPS/MPS情報と再正規化時に得た左シフト量、そして、レンジ値から選択されたrLPSテーブルの値を減じた値を出力する。   Next, the processing operation of the range update unit 2 shown in FIG. 1 will be described with reference to FIG. FIG. 3 is a flowchart showing the processing operation of the range update unit 2 shown in FIG. The range updating unit 2 reads the LPS section length from the rLPS table 4 using the received state transition value of the symbol occurrence probability as an address (step S11). Since the LPS section length to be read differs depending on the upper 2 bits of the received range value, four values are read simultaneously from the rLPS table 4 and one value is selected according to the range value (step S12). The range value itself is a value obtained by subtracting the value of the selected rLPS table from the received range value and the value of the selected rLPS table in the case of LPS, according to the received LPS / MPS information. Is selected (step S13), and if the value is less than 256, the value is shifted to the left so that it is 256 or more and less than 512 (step S14). This shift is a process called renormalization. In this way, the range value is updated. Then, LPS / MPS information necessary for updating the low value, the left shift amount obtained at the time of re-normalization, and a value obtained by subtracting the value of the selected rLPS table from the range value are output.

次に、図4を参照して、図1に示すロー更新部3の処理動作を説明する。図4は、図1に示すロー更新部3の処理動作を示すフローチャートである。ロー更新部3は、LPS/MPS情報により、MPSの場合、レンジ更新部から受け取ったシフト量分ロー値を左シフトして更新する(ステップS21)。LPSの場合、ロー値に、レンジ更新部2から受け取ったレンジ値から選択されたrLPSテーブル4の値を減じた値を減じ、受け取ったシフト量分左シフトして更新する(ステップS22)。この時、ロー値のMSB側から確定したビット分をビットストリームとして出力し、残りのビットを最終的に更新されたロー値とする(ステップS23)。このようにして、二値算術符号処理は実行される。   Next, the processing operation of the row updating unit 3 shown in FIG. 1 will be described with reference to FIG. FIG. 4 is a flowchart showing the processing operation of the row update unit 3 shown in FIG. In the case of MPS, the row update unit 3 shifts the row value received from the range update unit to the left by the LPS / MPS information and updates the value (step S21). In the case of LPS, the value obtained by subtracting the value of the selected rLPS table 4 from the range value received from the range update unit 2 is subtracted from the range value and updated by shifting the received shift amount to the left (step S22). At this time, the bits determined from the MSB side of the low value are output as a bit stream, and the remaining bits are finally set to the updated low value (step S23). In this way, the binary arithmetic code processing is executed.

次に、二値算術符号化処理をカスケード化することによる並列処理を行う構成について説明する。二値算術符号化処理を高速化させるために、複数binを各更新部で同時に処理することを考えると、図1に示す処理ブロックを例えば、2並列に配置し、図5に示すように2つのbin(シンボル)を同時に読み込み、各々の更新部では処理をカスケードし処理結果を次段の更新部に渡すことで、並列処理が可能となる。図5は、2並列の二値算術符号処理の構成を示すブロック図である。   Next, a configuration for performing parallel processing by cascading binary arithmetic coding processing will be described. Considering that a plurality of bins are processed simultaneously in each updating unit in order to speed up the binary arithmetic encoding process, for example, the processing blocks shown in FIG. 1 are arranged in parallel, and 2 as shown in FIG. Two bins (symbols) are read at the same time, and each update unit cascades the processing and passes the processing result to the update unit in the next stage, thereby enabling parallel processing. FIG. 5 is a block diagram showing a configuration of 2-parallel binary arithmetic code processing.

コンテキスト更新は、コンテキストAとコンテキストBが異なる場合は、コンテキストAとシンボルAによるコンテキスト更新部5と、コンテキストBとシンボルBによるコンテキスト更新部6とによって独立して行われる。   When the context A and the context B are different, the context update is performed independently by the context update unit 5 using the context A and the symbol A and the context update unit 6 using the context B and the symbol B.

しかしながら、コンテキストAとコンテキストBが同じ場合、コンテキストBの情報は用いず、更新されたコンテキストAの情報を用いてコンテキストBの更新がなされる。コンテキスト更新は、確定している符号化パラメータに対応するシンボル生成確率の状態遷移値をアドレスとして、状態遷移テーブルからLPS/MPS情報に従い実行される。通常状態遷移テーブルは、メモリで構成されるため、コンテキストAの更新のためにメモリ読み出しを行い、更新後の値で、コンテキストBの更新のためのメモリ読み出しを行う必要が有る。一般にメモリアクセス速度は遅いので、2bin分を同時にコンテキスト更新するために費やされる時間が長くなる。そのため、並列処理のメリットが削減してしまう。状態遷移テーブルの内容は、書き換わらないため、コンテキストBの状態遷移テーブルをメモリではなく、組合せ回路で構成することも考えられるが、回路規模の増大などのデメリットを生じる。   However, when context A and context B are the same, context B information is not used, and context B is updated using the updated context A information. The context update is executed according to the LPS / MPS information from the state transition table using the state transition value of the symbol generation probability corresponding to the determined encoding parameter as an address. Since the normal state transition table is configured by a memory, it is necessary to read the memory for updating the context A and to perform the memory reading for updating the context B with the updated value. In general, since the memory access speed is slow, the time spent for simultaneously updating the context for 2 bins becomes long. Therefore, the merit of parallel processing is reduced. Since the contents of the state transition table are not rewritten, it is conceivable that the context B state transition table is configured not by a memory but by a combinational circuit. However, there are disadvantages such as an increase in circuit scale.

そこで、状態遷移テーブル内容の構成に着目し、コンテキストAの状態遷移テーブルとコンテキストBの状態遷移テーブルをコンテキストAのコンテキスト更新値が確定していない状態であっても同時アクセスして処理時間を短縮する。図6は、二値算術符号化処理を高速化するための装置構成を示すブロック図である。コンテキスト更新部21、レンジ更新部22、ロー更新部23、ビットストリーム生成器24はそれぞれ図6に示すように接続されており、入力されたコンテキストAとコンテキストBは同時に処理され、2bin/cycleが実現可能となり、二値算術符号化処理の高速化が実現できる。   Therefore, paying attention to the structure of the state transition table contents, the context A state transition table and the context B state transition table are accessed simultaneously even when the context A context update value is not fixed, thereby reducing the processing time. To do. FIG. 6 is a block diagram showing a device configuration for speeding up the binary arithmetic encoding process. The context update unit 21, the range update unit 22, the row update unit 23, and the bit stream generator 24 are connected as shown in FIG. 6, and the input context A and context B are processed simultaneously, and 2 bin / cycle is It becomes feasible, and the speed of the binary arithmetic encoding process can be realized.

図7は、状態遷移テーブルの内容を示す図である。図7に示すように、状態遷移テーブルには更新前のコンテキストの状態値によって、受け取ったシンボルがLPSあるいはMPSであった場合の更新値が格納されている。例えば、現在の状態値が31であった場合、シンボルがLPSであれば24に、シンボルがMPSであれば32に状態値が更新される。図7から明らかなように、現在の状態が31であった場合、とり得る状態値は24あるいは、32なので、その次のコンテキスト更新でとり得る状態値は、現在の更新値が24の場合、19あるいは25であり、現在の更新値が32である場合、24あるいは33である。すなわち、テーブル内容としては冗長になるが、現在の状態値が31の場合、最初のコンテキスト更新でとり得る24と32を格納しておき、その次のコンテキスト更新でとり得る19、25、24、33も格納しておくことで、一度にコンテキストの次々更新時に必要となる状態値を得ることが可能になる(図8参照)。図8は、2並列処理のための状態遷移テーブル内容の構成を示す図である。   FIG. 7 is a diagram showing the contents of the state transition table. As shown in FIG. 7, the state transition table stores an update value when the received symbol is LPS or MPS, depending on the state value of the context before update. For example, if the current state value is 31, the state value is updated to 24 if the symbol is LPS and to 32 if the symbol is MPS. As is clear from FIG. 7, when the current state is 31, the possible state value is 24 or 32. Therefore, the state value that can be taken by the next context update is 24 when the current update value is 24. If it is 19 or 25 and the current update value is 32, it is 24 or 33. That is, the table contents are redundant, but when the current state value is 31, 24 and 32 that can be obtained by the first context update are stored, and 19, 25, 24, which can be obtained by the next context update. By storing 33 as well, it becomes possible to obtain a state value required at the time of updating the context one after another (see FIG. 8). FIG. 8 is a diagram showing the configuration of the state transition table contents for two parallel processing.

ここで、図9を参照して、更新値の選択処理について説明する。図9は、更新値の選択動作を示すフローチャートである。まず、コンテキストAとコンテキストBが同一であるか否かを判定する(ステップS31)。この判定の結果、同一でなければ、コンテキストAのLPS/MPS情報がLPSであるか否かを判定する(ステップS32)。この判定の結果、LPSであれば更新値としてLPSを選択し、MPSであれば更新値としてMPSを選択する。   Here, the update value selection process will be described with reference to FIG. FIG. 9 is a flowchart showing an update value selection operation. First, it is determined whether or not the context A and the context B are the same (step S31). If the result of this determination is that they are not the same, it is determined whether or not the LPS / MPS information of context A is LPS (step S32). If the result of this determination is LPS, LPS is selected as the update value, and if it is MPS, MPS is selected as the update value.

一方、コンテキストAとコンテキストBが同一であれば、コンテキストAのLPS/MPS情報がLPSであるか否かを判定する(ステップS33)。この判定の結果、LPSであれば、さらにコンテキストBのLPS/MPS情報がLPSであるか否かを判定する(ステップS34)。この判定の結果、LPSであれば更新値としてLPSLPSを選択し、MPSであれば、更新値としてLPSMPSを選択する。   On the other hand, if the context A and the context B are the same, it is determined whether the LPS / MPS information of the context A is LPS (step S33). If the result of this determination is LPS, it is further determined whether or not the LPS / MPS information of context B is LPS (step S34). If the result of this determination is LPS, LPSLPS is selected as the update value, and if it is MPS, LPSMPS is selected as the update value.

ステップS33の判定の結果、MPSであれば、さらに、コンテキストBのLPS/MPS情報がLPSであるか否かを判定する(ステップS35)。この判定の結果、LPSであれば更新値としてMPSLPSを選択し、MPSであれば、更新値としてMPSMPSを選択する。   If the result of determination in step S33 is MPS, it is further determined whether or not the LPS / MPS information of context B is LPS (step S35). If the result of this determination is LPS, MPSLPS is selected as the update value, and if it is MPS, MPSMPS is selected as the update value.

次に、図10を参照して、2並列の処理を行うコンテキスト更新処理について説明する。図10は、2並列の処理を行う図6に示すコンテキスト更新部21の構成を示すブロック図である。コンテキスト更新部21は、コンテキストAのシンボルの値を処理に合わせて一時的に記憶しておくレジスタbinValA31、binValA’32を備える。また、コンテキストBのシンボルの値を処理に合わせて記憶しておくレジスタbinValB33、binValB’34を備える。また、コンテキストAのコンテキスト情報を示すコンテキスト番号を一時的に記憶しておくレジスタctxIdxA35、ctxIdxA’36を備える。また、コンテキストBのコンテキスト番号を一時的に記憶しておくレジスタctxIdxB37、ctxIdxB’38を備える。また、各コンテキストに対する優勢シンボル値を記憶しておくメモリvalMps[]39、コンテキストに対する現在の確率状態を記憶しておくメモリpStateIdx[]40を備える。また、各々のコンテキスト更新処理に用いるvalMpsをctxIdxA35やctxIdxB37を用いてvalMps[]39から、あるいは、更新処理中の値から選択するセレクタSel1・41、Sel5・42を備える。   Next, with reference to FIG. 10, a context update process for performing two parallel processes will be described. FIG. 10 is a block diagram illustrating a configuration of the context update unit 21 illustrated in FIG. 6 that performs two parallel processes. The context update unit 21 includes registers binValA31 and binValA′32 that temporarily store the value of the symbol of context A according to the process. In addition, registers binValB33 and binValB'34 for storing the value of the context B symbol in accordance with the processing are provided. Also provided are registers ctxIdxA35 and ctxIdxA'36 for temporarily storing a context number indicating the context information of context A. Also provided are registers ctxIdxB37 and ctxIdxB'38 for temporarily storing the context number of context B. Further, a memory valMps [] 39 for storing the dominant symbol value for each context and a memory pStateIdx [] 40 for storing the current probability state for the context are provided. In addition, selectors Sel1 · 41 and Sel5 · 42 that select valMps to be used for each context update process from valMps [] 39 using ctxIdxA35 and ctxIdxB37 or from values being updated are provided.

また、各々のコンテキスト更新処理に用いるpStateIdxをctxIdxAやctxIdxBを用いてpStateIdx[]40から、あるいは、更新処理中の値から選択するセレクタSel2・43、Sel6・44を備える。また、コンテキストA、コンテキストBの更新処理に用いる優勢シンボルを一時的に記憶しておくレジスタvalMpsA45、valMpsB46、コンテキストA、コンテキストBの更新処理に用いるコンテキスト番号を一時的に記憶しておくレジスタpStateIdxA47、pStateIdxB48を備える。また、シンボル生起確率の状態遷移テーブルであるtransIdx[]49、コンテキストA、コンテキストBの優勢シンボル値の更新値を選択するSel3・50、Sel11・51、コンテキストAのシンボル生起確率の状態の更新値を選択するSel4・52、コンテキストBのシンボル生起確率の状態の更新値を選択するSel7・53、Sel10・54、Sel12・55を備える。   In addition, selectors Sel2 · 43 and Sel6 · 44 that select pStateIdx used for each context update process from pStateIdx [] 40 using ctxIdxA and ctxIdxB or from values being updated are provided. Also, registers valMpsA45 and valMpsB46 that temporarily store the dominant symbols used for the update processing of context A and context B, and registers pStateIdxA47 that temporarily store the context numbers used for the update processing of context A and context B, pStateIdxB48 is provided. Also, transIdx [] 49, which is a state transition table of the symbol occurrence probability, Sel3 · 50, Sel11 · 51 for selecting the update value of the dominant symbol value of context A and context B, and the update value of the state of symbol occurrence probability of context A Sel4 · 52, Sel7 · 53, Sel10 · 54, and Sel12 · 55 for selecting the update value of the state of the symbol occurrence probability of context B.

また、コンテキストBの優勢シンボル値としてコンテキストAの更新された優勢シンボルを使用するかコンテキストBの優勢シンボルを一時的に蓄積しているvalMpsB46の値を使用するか選択するSel8・56、コンテキストBのシンボル生起確率の状態値として、コンテキストAの更新されたシンボル生起確率の状態値を用いるか、コンテキストBのシンボル生起確率の状態を一時的に蓄積しているpStateIdxB48の値を用いるか選択するSel9・57、Sel1・41、Sel2・43の選択信号を生成する選択信号生成器58を備える。また、Sel5・42、Sel6・44の選択信号を生成する選択信号生成器59を備える。   Further, Sel8 · 56, which selects whether to use the updated dominant symbol of context A or the value of valMpsB46 temporarily storing the dominant symbol of context B as the dominant symbol value of context B, Select whether to use the state value of the updated symbol occurrence probability of the context A or the value of the pStateIdxB48 that temporarily stores the state of the symbol occurrence probability of the context B as the state value of the symbol occurrence probability. 57, a selection signal generator 58 for generating selection signals of Sel1 · 41 and Sel2 · 43. In addition, a selection signal generator 59 for generating selection signals of Sel5 · 42 and Sel6 · 44 is provided.

また、コンテキストA、コンテキストBそれぞれのシンボルが優勢シンボルか劣性シンボルかを生成するLPS/MPS生成器60、61、Sel3・50、Sel11・51の選択信号を生成する選択信号生成器62、63を備える。そして、コンテキストAとBが同じ場合、コンテキストAの情報を用いるようにSel8・56、Sel9・57に指示し、Sel10・54に生起確率状態遷移情報のLPSLPSあるいは、LPSMPS、MPSLPS、MPSMPSの選択を指示し、コンテキストに対する優勢シンボル値と生起確率状態値の書込みが衝突しないよう、コンテキストAにおける優勢シンボル値と生起確率状態値をメモリに書き戻さないように指示する信号を生成する同一コンテキスト信号発生器64を備える。   Also, selection signal generators 62 and 63 for generating selection signals of LPS / MPS generators 60 and 61, Sel3 · 50, and Sel11 · 51 that generate whether the symbols of the context A and the context B are dominant symbols or recessive symbols are provided. Prepare. If the contexts A and B are the same, the Sel8 / 56, Sel9 / 57 are instructed to use the context A information, and the Sel10 / 54 selects LPSLPS or LPSMPS, MPSLPS, MPSMPS of the occurrence probability state transition information. Same context signal generator for generating a signal that instructs to not write back the dominant symbol value and occurrence probability state value in context A to memory so that writing of the dominant symbol value and occurrence probability state value for the context does not collide 64.

選択信号発生器58は、図11示す論理、選択信号発生器59は、図12に示す論理により選択信号を生成する。図11、図12の中で、A==A’?の列で〇がついている状態は、ctxIdxA35の値とctxIdxA’36の値が同一であることを示しており、選択信号001は、図10におけるSel1・41、Sel2・43に接続される入力の右の値を選択することを意味しており、例えば、これが100である場合、左の値を選択することを意味している。これにより、コンテキストAとBが異なる場合、各々のコンテキストの優勢シンボルや生起確率状態は独立して更新され、コンテキストAとBが同一である場合、コンテキストAにおける優勢シンボルや生起確率状態値の更新値を用いてコンテキストBのコンテキスト更新処理が可能となる。   The selection signal generator 58 generates a selection signal based on the logic shown in FIG. 11, and the selection signal generator 59 generates a selection signal based on the logic shown in FIG. 11 and FIG. 12, A == A ′? The state with a circle in the column indicates that the value of ctxIdxA35 and the value of ctxIdxA'36 are the same, and the selection signal 001 is the input connected to Sel1 · 41 and Sel2 · 43 in FIG. This means that the right value is selected. For example, when this is 100, it means that the left value is selected. Thus, when contexts A and B are different, the dominant symbol and occurrence probability state of each context are updated independently. When context A and B are the same, the dominant symbol and occurrence probability state value in context A are updated. The context update process of the context B can be performed using the value.

LPS/MPS生成器60、61は、コンテキストAあるいはコンテキストBのシンボルと優勢シンボルの比較をし、同一である場合、1を出力しMPSであることを示し、異なる場合、0を出力しLPSであることを示す。   The LPS / MPS generators 60 and 61 compare the symbols of the context A or the context B with the dominant symbols, and if they are the same, output 1 to indicate that they are MPS, and if they are different, output 0 and the LPS. Indicates that there is.

選択信号発生器62、63は、コンテキストAあるいはコンテキストBのLPS/MPS生成器60、61からの出力信号がLPSでありかつ、生起確率状態値が0の場合、当該コンテキストの優勢シンボル値を反転させるようSel3・50、Sel11・51に選択信号を送る。   The selection signal generators 62 and 63 invert the dominant symbol value of the context when the output signal from the LPS / MPS generators 60 and 61 of the context A or the context B is LPS and the occurrence probability state value is 0. A selection signal is sent to Sel3 · 50 and Sel11 · 51.

同一コンテキスト信号発生器64は、先に説明したようにコンテキストAとBが同一であるか判別するため、ctxIdxA’36とctxIdxB’38の値を比較し、同じ場合、コンテキストAとBが同一であると判断し、コンテキストA側の処理におけるメモリ書込みを禁止するとともに、コンテキストA側のコンテキスト情報をコンテキストB側で用いるようにする。   The same context signal generator 64 compares the values of ctxIdxA′36 and ctxIdxB′38 in order to determine whether the contexts A and B are the same as described above. If they are the same, the contexts A and B are the same. It is determined that there is a memory write in the processing on the context A side, and the context information on the context A side is used on the context B side.

また、図9に示す更新値の選択処理動作は、Sel7・53、Sel10・54、Sel12・55で実現される。   9 is realized by Sel7 · 53, Sel10 · 54, and Sel12 · 55.

ここで、各コンテキストの優勢シンボルや生起確率状態を蓄積しているvalMps[]39やpStateIdx[]40は、図10の中で読み出し側と書きこみ側、さらにコンテキストA側とB側に個別に描かれているが、蓄積内容の同一性が必要なため、現実的には、読み出し2ポート、書込み2ポートの4ポートメモリが必要となる。また、メモリに限ることなくレジスタ等他の多ポート記憶装置であれば適用可能である。さらに、状態遷移テーブルであるtransIdx[]49は、コンテキストA、Bで個別に実装しても、一つのROM等で実装しても構わない。その場合、コンテキストA側については、transLPSとtransMPSの値だけを出力するようにして、回路規模を削減する等が適用できる。   Here, valMps [] 39 and pStateIdx [] 40 storing the dominant symbol and occurrence probability state of each context are individually shown on the reading side and writing side, and further on the context A side and B side in FIG. Although illustrated, since the same stored contents are required, a 4-port memory having 2 read ports and 2 write ports is actually required. Further, the present invention is not limited to the memory and can be applied to any other multi-port storage device such as a register. Furthermore, transIdx [] 49, which is a state transition table, may be implemented individually in contexts A and B, or may be implemented in one ROM or the like. In that case, on the context A side, it is possible to reduce the circuit scale by outputting only the values of transLPS and transMPS.

コンテキスト更新部を図10のように構成することで、図13に示すパイプライン処理が可能となり、1サイクルごとに2bin分のコンテキスト更新が実行される。図13は、2、3、4、6bin目が同一のコンテキストで、1bin目と5bin目が異なるコンテキストであるとした場合の処理の流れを矢印で示したものである。1bin目と5bin目は独立してR→Ex→Wと処理が実行されることを表している。ここで、R、Ex、Wはそれぞれ、データの読出し、処理実行、更新データの書込みを表している。3bin目と6bin目は、2bin目と4bin目で更新値をメモリに書込む値を、読み出した値の代わりに用いることを表している。また、4bin目は、3bin目の更新値を読み出した値の代わりに用いることを表している。このように、連続するコンテキストや独立したコンテキストが混在している状態であってもコンテキスト更新処理が実行可能である。   By configuring the context update unit as shown in FIG. 10, the pipeline processing shown in FIG. 13 is possible, and context update for 2 bins is executed every cycle. FIG. 13 shows the flow of processing when the second, third, fourth, and sixth bins are the same context, and the first and fifth bins are different contexts by arrows. The 1st bin and the 5th bin indicate that R → Ex → W is executed independently. Here, R, Ex, and W represent data reading, processing execution, and update data writing, respectively. The third and sixth bins indicate that the values written in the memory at the second and fourth bins are used instead of the read values. The fourth bin indicates that the updated value of the third bin is used instead of the read value. Thus, the context update process can be executed even in a state where continuous contexts and independent contexts are mixed.

次に、図14を参照して、2並列の処理を行うレンジ更新処理について説明する。図14は、2並列の処理を行う図6に示すレンジ更新部22の構成を示すブロック図である。レンジ更新部22は、コンテキストAのLPS/MPS情報を一時的に記憶するレジスタLPS/MPSA71、LPS/MPSA’72、コンテキストBのLPS/MPS情報を一時的に記憶するレジスタLPS/MPSB73、LPS/MPSB’74、を備える。また、コンテキストAの生起確率状態値を一時的に記憶するpStateIdxA75、コンテキストBの生起確率状態値を一時的に記憶するpStateIdxB76、LPS区間長を記憶するメモリあるいは、レジスタ、組合せ回路で実現されるrLPS[]77、pStateIdxA75やpStateIdxB76をアドレスとして読み出されたrLPS[]77の値を一時的に記憶しておくレジスタ群78、79を備える。   Next, a range update process for performing two parallel processes will be described with reference to FIG. FIG. 14 is a block diagram illustrating a configuration of the range update unit 22 illustrated in FIG. 6 that performs two parallel processes. The range updater 22 includes registers LPS / MPSA71 and LPS / MPSA'72 that temporarily store LPS / MPS information of context A, registers LPS / MPSB73 and LPS / MPS that temporarily store LPS / MPS information of context B MPSB'74. Also, pStateIdxA75 that temporarily stores the occurrence probability state value of the context A, pStateIdxB76 that temporarily stores the occurrence probability state value of the context B, rLPS realized by a memory, a register, or a combinational circuit that stores the LPS section length [] 77, and register groups 78 and 79 for temporarily storing the value of rLPS [] 77 read by using pStateIdxA75 and pStateIdxB76 as addresses.

また、レンジ値の初期値を一時的に記憶するレジスタm_uiRangeA80、レンジ値の更新値を記憶するレジスタm_uiRangeA’81、コンテキストAに対応するLPS/MPS情報や生起確率状態を用いてレンジ値を更新するかを指定する信号を一時的に記憶しておくレジスタvalidA82、validA’83を備える。また、同様にコンテキストBに対応するLPS/MPS情報や生起確率状態を用いてレンジ値を更新するか指定する信号を一時的に記憶しておくレジスタvalidB84、validB’85を備える。   In addition, the register m_uiRangeA80 that temporarily stores the initial value of the range value, the register m_uiRangeA′81 that stores the updated value of the range value, and the LPS / MPS information corresponding to the context A and the occurrence probability state are updated. There are provided registers validA82 and validA'83 for temporarily storing a signal for designating. Similarly, there are provided registers validB84 and validB′85 for temporarily storing a signal for designating whether to update the range value using LPS / MPS information corresponding to the context B or the occurrence probability state.

また、レンジ値を更新するために必要な加算器86、87、rLPS[]77から読み出されたLPS区間長を一時的に記憶しておくレジスタ群78、79の中からレンジ値に適した値を選択するコンテキストAに対応するSel2・86、コンテキストBに対応するSel5・87を備える。また、LPS/MPS信号により更新されたレンジ値を選択するコンテキストAに対応するSel3・88、コンテキストBに対応するSel6・89、選択されたRagne値を256以上512未満に再正規化するためのコンテキストA用のプライオリティエンコーダ(prioEncoder)90と左シフタ91と、コンテキストB用のプライオリティエンコーダ(prioEncoder)94と左シフタ95を備える。また、コンテキストAおよびコンテキストBに対する情報が有効か無効かの状態により、レンジ値を更新する値を選択するSel4・92、コンテキストAおよびコンテキストBの有効か無効化の情報からSel4の入力を選択する信号を生成する選択信号発生器93からなる。   Also suitable for the range value from among the register groups 78 and 79 for temporarily storing the LPS section length read from the adders 86 and 87 and rLPS [] 77 necessary for updating the range value. Sel 2 and 86 corresponding to context A for selecting a value and Sel 5 and 87 corresponding to context B are provided. In addition, Sel3 · 88 corresponding to the context A for selecting the range value updated by the LPS / MPS signal, Sel6 · 89 corresponding to the context B, and the selected Ragne value to be renormalized to 256 or more and less than 512 It includes a priority encoder 90 for the context A and a left shifter 91, a priority encoder 94 for the context B and a left shifter 95. Also, depending on whether the information for context A and context B is valid or invalid, Sel4 • 92 for selecting a value for updating the range value, and selecting Sel4 input from the information for valid / invalid of context A and context B It consists of a selection signal generator 93 that generates a signal.

このような構成をとることで、2bin目のLPS区間長を格納しているrLPS[]77の読み出しアドレスは、1bin目の更新されたレンジ値に依存しなくなり、コンテキスト更新部から出力される生起確率状態値を受け取ると直ちにLPS区間長の候補を読み出すことが出来るため、1bin目と2bin目のrLPS[]77のアクセスを同時に行えるようになる。これにより、2bin目のrLPS[]77のメモリアクセス時間分処理時間が削減され、レンジ値更新が高速化される。   By adopting such a configuration, the read address of rLPS [] 77 storing the LPS section length of the second bin does not depend on the updated range value of the first bin, and is generated from the context update unit. As soon as the probability state value is received, the LPS section length candidate can be read out, so that the rLPS [] 77 of the first bin and the second bin can be accessed simultaneously. As a result, the processing time is reduced by the memory access time of the second bin rLPS [] 77, and the range value update is speeded up.

また、レンジ更新において、処理タイミングの関係から常に2bin分の情報が入力されるのではなく、1bin分の情報のみが入力される、あるいは、何も入力されないことも考えられる。そこで、各コンテキストに対応する情報が有効か示すために、valid信号を用いる。validA’83とvalidB’85が共に有効な場合、2bin分の処理を行う必要がるため、コンテキストAとコンテキストB情報に対する2段のレンジ値更新が行われたのちの値でレンジ値を更新するために、Sel4・92の右側の信号が出力されるように選択信号発生器93は、選択信号を生成する。   In addition, in the range update, it is conceivable that information for 2 bins is not always input because of processing timing, but only information for 1 bin is input, or nothing is input. Therefore, a valid signal is used to indicate whether the information corresponding to each context is valid. When validA'83 and validB'85 are both valid, it is necessary to perform processing for 2 bins, so the range value is updated with the value after the two-stage range value update for context A and context B information is performed. Therefore, the selection signal generator 93 generates a selection signal so that the signal on the right side of Sel4 · 92 is output.

validA’83のみ有効な場合、1bin分の処理を行うため、コンテキストA情報に対する1段のレンジ更新が行われた後の値で、レンジ値を更新するために、Sel4の真ん中の信号が出力されるように選択信号発生器93は、選択信号を生成する。いずれも無効な場合、現在のレンジ値を保持し続けるために、Sel4・92の左の信号が出力されるように選択信号発生器93は、選択信号を生成する。   If only validA'83 is valid, the signal for the middle of Sel4 is output to update the range value with the value after the one-stage range update for the context A information to process 1 bin. As described above, the selection signal generator 93 generates a selection signal. If both are invalid, the selection signal generator 93 generates a selection signal so that the left signal of Sel4 • 92 is output in order to keep the current range value.

ロー値更新に必要な各コンテキストのLPS/MPS(LPS/MPSA、LPS/MPSB)、再正規化するために必要としたシフト量(numbitysA、 numbitsB)、レンジ値からLPS区間長を減じた値(curr_m_uiRangeA、 curr_m_uiRangeB)、そして、それぞれのコンテキストが出力する情報が有効かを示す信号(validA、validB)を出力する。   LPS / MPS (LPS / MPSA, LPS / MPSB) of each context required for low value update, shift amount required for renormalization (numbitsA, numbitsB), value obtained by subtracting LPS section length from range value ( curr_m_uiRangeA, curr_m_uiRangeB), and signals (validA, validB) indicating whether the information output by each context is valid.

次に、図15を参照して、2並列の処理を行うロー更新処理について説明する。図15は、2並列の処理を行う図6に示すロー更新部23の構成を示すブロック図である。ロー更新部23は、コンテキストAとコンテキストBに対するLPS/MPS信号を一時的に記憶するレジスタLPS/MPSA101とLPS/MPSA’102、LPS/MPSB103とLPS/MPSB’104を備える。また、コンテキストAとコンテキストBに対する再正規化により必要となるビットシフト量を一時的に記憶しておくレジスタnumBitsA105とnumBitsA’106、numBitsB107とnumBitsB’108を備える。   Next, a row update process that performs two parallel processes will be described with reference to FIG. FIG. 15 is a block diagram illustrating a configuration of the row update unit 23 illustrated in FIG. 6 that performs two parallel processes. The row update unit 23 includes registers LPS / MPSA 101 and LPS / MPSA ′ 102, LPS / MPSB 103 and LPS / MPSB ′ 104 that temporarily store LPS / MPS signals for context A and context B. In addition, registers numBitsA105 and numBitsA'106, and numBitsB107 and numBitsB'108, which temporarily store bit shift amounts necessary for renormalization with respect to context A and context B, are provided.

また、コンテキストAとコンテキストBに対するレンジ値からLPS区間長を減じた値を一時的に記憶するレジスタcurr_m_uiRangeA109とcurr_m_uiRangeA’110、curr_m_uiRangeB111とcurr_m_uiRangeB’112を備える。また、コンテキストAとコンテキストBそれぞれに対するロー更新を行うか否かを指定する信号を一時的に記憶しておくレジスタvalidA113とvalidA’114、validB115とvalidB’116を備える。   Further, registers curr_m_uiRangeA109, curr_m_uiRangeA'110, curr_m_uiRangeB'111, and curr_m_uiRangeB'112 are provided for temporarily storing values obtained by subtracting the LPS section length from the range values for context A and context B. In addition, there are provided registers validA113 and validA'114, and validB115 and validB'116 for temporarily storing signals for designating whether or not to perform row update for each of context A and context B.

また、ロー値の初期値を一時的に記憶しておくレジスタm_uiLow117、Lowの更新値であるレジスタm_uiLow’118、現在のローに対する再正規化処理によるシフト量の総和の初期値を一時的に記憶しておくレジスタacc_shift119、現在のローに対する再正規化処理によるシフト量を記憶しておくレジスタacc_shift’120を備える。また、初期化時に、m_uiLow’118とacc_shift’120にm_uiLow117とacc_shift119を設定し、それ以外では更新されたローと同じく更新された現在のローに対する再正規化処理によるシフト量の総和を設定するSel1・121、Sel4・122を備える。   In addition, a register m_uiLow 117 that temporarily stores an initial value of a low value, a register m_uiLow '118 that is an updated value of Low, and an initial value of a total sum of shift amounts by renormalization processing for the current row are temporarily stored. A register acc_shift 119 to be stored, and a register acc_shift ′ 120 to store a shift amount by the renormalization process for the current row. Also, at the time of initialization, m_uiLow'118 and acc_shift'120 are set to m_uiLow117 and acc_shift119, and otherwise, the total amount of shift by renormalization processing for the updated current row is set in the same manner as the updated row. · 121 and Sel4 · 122 are provided.

また、コンテキストAとコンテキストBそれぞれのLPS/MPS信号がLPSの場合、curr_m_uiRangeA’110あるいは、curr_m_uiRangeB’112にm_uiLow’118の値あるいは、更新されたm_uiLow117の値を加えた値を選択し、LPS/MPS信号がMPSの場合、更新されていないローを選択するセレクタSel2・123、Sel7・124を備える。   Further, when the LPS / MPS signals of the context A and the context B are LPS, the curr_m_uiRangeA'110 or the curr_m_uiRangeB'112 is added with the m_uiLow'118 value or the updated m_uiLow117 value, and the LPS / MPS signal is selected. When the MPS signal is MPS, selectors Sel2 · 123 and Sel7 · 124 for selecting rows that have not been updated are provided.

また、コンテキストBに対する情報が無効である場合、コンテキストBに対するロー値更新を行わないようにするため、LPS/MPS信号をMPSとし、再正規化のシフト量を0とし、コンテキストBに対する情報が有効である場合、ロー更新を行うため、受け取ったコンテキストBに対するLPS/MPS信号と再正規化のシフト量を用いるように選択するセレクタSel5・125、Sel6・126を備える。また、コンテキストAとコンテキストBそれぞれに対する再正規化によるシフト量によりSel2・123やSel7・124で選択された更新されたロー値を左シフトするlシフタ1・127、lシフタ2・128を備える。   In addition, when the information for the context B is invalid, the LPS / MPS signal is set to MPS, the renormalization shift amount is set to 0, and the information for the context B is valid so that the low value update for the context B is not performed. In order to perform row update, selectors Sel5 · 125 and Sel6 · 126 are selected to use the LPS / MPS signal and the renormalization shift amount for the received context B. In addition, l shifters 1 and 127 and l shifters 2 and 128 for shifting the updated low values selected in Sel2 · 123 and Sel7 · 124 to the left by shift amounts by renormalization for context A and context B are provided.

また、受け取ったコンテキストAとBに対する再正規化のシフト量を加算する加算器129、その加算された値とacc_shift’値を加算する加算器130、その加算された値が、予め指定される値を超えるか否か判定する判定器131、コンテキストA、コンテキストBのいずれかあるいは、双方が有効である場合、有効と判定する判定器132を備える。また、判定器132の出力が有効かつ、判定器131が有る閾値を超えたと判定した場合、ビットストリーム生成器に有効であることを示すためvalidを1にする論理積部133を備える。   Also, an adder 129 that adds the renormalization shift amount for the received contexts A and B, an adder 130 that adds the added value and the acc_shift ′ value, and the added value is a predesignated value. The determination unit 131 includes a determination unit 131 that determines whether or not one of the context A and the context B or both are valid. In addition, a logical product unit 133 that sets valid to 1 is provided to indicate that the output of the determiner 132 is valid and exceeds the threshold value that the determiner 131 has, and is valid for the bitstream generator.

また、判定器131で閾値を超えたと判断されたときに、加算器130の出力から減じた(ここでは8とする)シフト量を渡し、閾値を超えていないと判断された時には、先の加算器130の出力を選択する選択器Sel9・134を備える。ここでは8ビット分づつビットストリーム生成器にビットを渡すことを想定し、加算器130の出力に2を加えたビット数分、lシフタ2・128によって求められた値を右シフトして、ビットストリーム生成器に出力するrシフタ4・135、lシフタ2・128の出力からrシフタ4・135によってビットストリーム生成器に出力されなかった値を一時的に求めておくためのマスク値を例えば32ビット演算器であれば、加算器130の出力である累積されたシフト量を30から減じた値分0xffffffffを右シフトして生成するrシフタ3・136を備える。   When the determination unit 131 determines that the threshold is exceeded, the shift amount subtracted from the output of the adder 130 (here, 8) is passed, and when it is determined that the threshold is not exceeded, the previous addition is performed. Selectors Sel 9 and 134 for selecting the output of the selector 130. Here, it is assumed that bits are passed to the bit stream generator in units of 8 bits, and the value obtained by the l shifter 2 · 128 is right-shifted by the number of bits obtained by adding 2 to the output of the adder 130, and the bit For example, a mask value for temporarily obtaining a value that is not output to the bit stream generator by the r shifter 4 or 135 from the output of the r shifter 4 or 135 or l shifter 2 or 128 output to the stream generator is 32, for example. In the case of a bit calculator, an r shifter 3 · 136 is provided that shifts the accumulated shift amount, which is the output of the adder 130, to a value obtained by subtracting from 0 to 0xffffffff to the right.

また、ビットストリーム生成器にデータを送る場合、ローの更新値としてビットストリーム生成器に渡したビットを除いたデータを、ビットストリーム生成器にデータを送らない場合、lシフタ2・128から出力されるこれまで累積されたロー値をロー値の更新候補値として選択するSel8・137を備える。また、コンテキストAとコンテキストB共に有効でない場合、現在のロー値を保持し続け、いずれか一つでも有効であれば、Sel8・137の出力である更新候補値をローの更新値とするSel3・138を備える。   Also, when sending data to the bitstream generator, the data excluding the bits passed to the bitstream generator as a low update value is output from the l shifter 2 · 128 when no data is sent to the bitstream generator. Sel8 · 137 for selecting the accumulated low value as the update candidate value of the low value. If neither context A nor context B is valid, the current row value is kept, and if any one is valid, the update candidate value that is the output of Sel8 · 137 is set as the row update value. 138.

前述した説明は、閾値が8の場合について説明した。それぞれのシフト量は、図16に示すようになっており、ハードウェアで構成する場合、マスク等使用せずともバレルシフタ等で実現することができる。ビットストリーム生成器への出力値は、図16から明らかなように、acc_shift−8+10であるため、acc_shiftに2を加えた値で、lシフタ2・128の出力を右シフトした。また、マスク値も図16から明らかなようにacc_shift+2分ビット1を立てる必要が有るため、32−(acc_shift+2)すなわち、30−acc_shift分オール1の値を右にシフトする必要が有る。あるいは、ハードウェアで構成する場合容易に左シフトあるいは組合せ回路で容易にマスク値を生成できるので、acc_shift+2ビット分LSB側から1を立てるようにしてもよい。   In the above description, the case where the threshold value is 8 has been described. Each shift amount is as shown in FIG. 16, and when configured by hardware, it can be realized by a barrel shifter or the like without using a mask or the like. Since the output value to the bit stream generator is acc_shift−8 + 10 as apparent from FIG. 16, the output of the l shifter 2 · 128 is right-shifted by a value obtained by adding 2 to acc_shift. Further, since it is necessary to set acc_shift + 2 minutes bit 1 as apparent from FIG. 16, it is necessary to shift the value of all 1s to the right by 32− (acc_shift + 2), that is, 30−acc_shift. Alternatively, when configured with hardware, a mask value can be easily generated by a left shift or a combinational circuit, so 1 may be set from the LSB side for acc_shift + 2 bits.

このような構成をとることで、1bin目と2bin目に対するロー値の更新を2並列で実行可能となるとともに、再正規化によるロー値のシフトに合わせ、ロー値更新に直接関与しなくなったビット分をビットストリーム生成処理部に送ることができ、ロー値更新を行う演算器のビット数が削減される。このビット数の削減により演算処理速度が向上し、並列動作時のロー値更新が高速化される。   By adopting such a configuration, it is possible to update the row values for the first bin and the second bin in parallel, and the bit that is no longer directly involved in the row value update in accordance with the shift of the row value by renormalization. Minutes can be sent to the bitstream generation processing unit, and the number of bits of the arithmetic unit that performs the low value update is reduced. This reduction in the number of bits improves the operation processing speed and speeds up the low value update during parallel operation.

次に、ロー更新部から8ビット単位でデータを受け取る場合のビットストリーム生成処理の例を説明する。図17は、図6に示すビットストリーム生成部24構成を示す図である。ビットストリーム生成部24は、出力するビットストリームを一時的に記憶しておくoutByte_r150、outByte_r150の値を保持し続けるか、新たなデータを受け取るかをステートマシンの指示により選択するセレクタSel1・151、受け取ったデータのキャリをoutByte_r150に加算する必要が有る場合にキャリを加算する加算器152、ビットストリームとして出力する値を、outByte_rとするか、0xffとするか、0x00とするかをステートマシンの指示により選択するSel4・153を備える。   Next, an example of bit stream generation processing when data is received from the row update unit in units of 8 bits will be described. FIG. 17 is a diagram showing the configuration of the bit stream generation unit 24 shown in FIG. The bit stream generation unit 24 receives selectors Sel1 and 151 that select whether to continue holding the values of outByte_r150 and outByte_r150 for temporarily storing the output bitstream or to receive new data according to the instruction of the state machine. When it is necessary to add the carry of the data to outByte_r150, an adder 152 that adds the carry, whether the value output as a bit stream is outByte_r, 0xff, or 0x00 is determined by the instruction of the state machine Sel4 and 153 to be selected are provided.

また、ステートマシン154が使用するカウント値を初期化するか、更新値を用いて更新するかを選択するSel2・155、ステートマシン154が使用するこのビットストリーム生成器からまだ出力していないデータ数をカウントするカウンタcnt_r156、ステートマシン154の指示により、cnt_r156をインクリメントするかデクリメントするか保持するかを選択するSel3・157を備える。ステートマシンは、受け取ったデータとそのデータの有効情報、cnt_r156の値により、状態を図18に示すようにIdle、Store、Out1、Out2のいずれかに遷移させる。   In addition, Sel 2 155 for selecting whether the count value used by the state machine 154 is initialized or updated using the updated value, the number of data not yet output from the bit stream generator used by the state machine 154 Counter cnt_r 156 and Sel 3 157 for selecting whether to increment or decrement cnt_r 156 according to an instruction from state machine 154. The state machine changes the state to Idle, Store, Out1, or Out2 as shown in FIG. 18 according to the received data, the valid information of the data, and the value of cnt_r156.

基本的には、ロー更新部から受け取った値をビットストリームとして出力するが、受け取ったデータが0xffである場合、次のデータにキャリビットが立っていると、0xffが0x00に反転し、0xffの前のデータにそのキャリは伝搬する。そのため、一時的に受け取ったデータを保持し、次のデータが0xFFか否かを調べ、0xFFでなければ、先に保持しておいたデータをビットストリームとして出力し、新たに受け取ったデータをレジスタに保持することを繰り返す。もし、次のデータが0xFFの場合、次々と0xFFが続いたとしても、0xFFでないデータがキャリを持っていればそれらはすべて0x00となり、先に記述したように0xFFが続く前のデータにキャリが伝搬する。   Basically, the value received from the row update unit is output as a bit stream. However, when the received data is 0xff, if a carry bit is set in the next data, 0xff is inverted to 0x00 and 0xff The carry propagates to the previous data. Therefore, the temporarily received data is held, and it is checked whether or not the next data is 0xFF. If it is not 0xFF, the previously held data is output as a bit stream, and the newly received data is registered in the register. Repeat to hold on. If the next data is 0xFF, even if 0xFF continues one after another, if the data that is not 0xFF has a carry, they all become 0x00. As described above, a carry is added to the data before 0xFF. Propagate.

そのため、次のデータが0xFFの場合、outByte_rのデータを保持し続け、outByte_rの分も合わせてデータ数をカウントに加える。これは、インクリメント等で対応可能である。0xFFが続いたのち、0xFFでないデータを受け取った場合、キャリが有るか確認し、有る場合、outByte_rにキャリが加わるので、Sel4・153の左のデータを選択し出力する。そして、カウンタをデクリメントする。カウンタが1を超えている場合、超えた分0xFFのデータが有ることを示しているので、先のキャリが有る場合、0x00をカウンタが1になるまで出力し続けカウンタをデクリメントする、ない場合0xFFを出力し続けカウンタが1になるまで、カウンタをデクリメントする。1になった場合、受け取ったデータをoutByte_rに保持する。   Therefore, when the next data is 0xFF, the data of outByte_r is continuously held, and the number of data is added to the count together with the amount of outByte_r. This can be dealt with by increment or the like. When data that is not 0xFF is received after 0xFF continues, it is confirmed whether there is a carry. If there is, carry is added to outByte_r, so the left data of Sel4 • 153 is selected and output. Then, the counter is decremented. If the counter exceeds 1, it indicates that there is 0xFF of data for the excess, so if there is a previous carry, 0x00 continues to be output until the counter reaches 1, and the counter is decremented, otherwise 0xFF Is continuously output until the counter reaches 1. When it becomes 1, the received data is held in outByte_r.

このようにして、ビットストリーム生成処理は実行され、受け取ったロー値からビットストリームを生成する。   In this way, the bitstream generation process is executed, and a bitstream is generated from the received low value.

以上説明したように、二値算術符号化部の内部状態を表す、各コンテキストのシンボル生成確率の状態、レンジ値、ロー値を独立させて更新するのに加え、シンボル生起確率の状態の依存性を利用し、一度に複数binに対する生起確率を読み出し、更新処理を行うことで、高速化を実現することができる。   As described above, in addition to independently updating the state of symbol generation probability, range value, and low value of each context representing the internal state of the binary arithmetic coding unit, the dependency of the state of symbol occurrence probability By using, the occurrence probabilities for a plurality of bins are read out at once, and the update process is performed, so that high speed can be realized.

前述した実施形態における二値算術符号化装置をコンピュータで実現するようにしてもよい。その場合、この機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現してもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでもよい。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよく、PLD(Programmable Logic Device)やFPGA(Field Programmable Gate Array)等のハードウェアを用いて実現されるものであってもよい。   The binary arithmetic coding apparatus in the above-described embodiment may be realized by a computer. In that case, a program for realizing this function may be recorded on a computer-readable recording medium, and the program recorded on this recording medium may be read into a computer system and executed. Here, the “computer system” includes an OS and hardware such as peripheral devices. The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. Furthermore, the “computer-readable recording medium” dynamically holds a program for a short time like a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line. In this case, a volatile memory inside a computer system serving as a server or a client in that case may be included and a program held for a certain period of time. Further, the program may be for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in the computer system. It may be realized using hardware such as PLD (Programmable Logic Device) or FPGA (Field Programmable Gate Array).

以上、図面を参照して本発明の実施の形態を説明してきたが、上記実施の形態は本発明の例示に過ぎず、本発明が上記実施の形態に限定されるものではないことは明らかである。したがって、本発明の技術思想及び範囲を逸脱しない範囲で構成要素の追加、省略、置換、その他の変更を行ってもよい。   As mentioned above, although embodiment of this invention has been described with reference to drawings, the said embodiment is only the illustration of this invention, and it is clear that this invention is not limited to the said embodiment. is there. Therefore, additions, omissions, substitutions, and other modifications of the components may be made without departing from the technical idea and scope of the present invention.

スライス分割などアルゴリズムレベルでの並列化を行わなくとも、複数bin列を並列処理することにより二値算術符号化処理を高速化することが不可欠な用途に適用できる。   Even if parallelization at the algorithm level such as slice division is not performed, it can be applied to an application in which it is indispensable to speed up binary arithmetic coding processing by parallel processing of a plurality of bin sequences.

1、5、6、21・・・コンテキスト更新部、2、7、8、22・・・レンジ更新部、3、9、10、23・・・ロー更新部、4、11、12・・・rLPSテーブル、24・・・ビットストリーム生成部   1, 5, 6, 21 ... context update unit, 2, 7, 8, 22 ... range update unit, 3, 9, 10, 23 ... row update unit, 4, 11, 12 ... rLPS table, 24... bitstream generation unit

Claims (5)

コンテキスト情報とシンボルからシンボル生起確率状態の状態遷移値とMPS/LPS情報を算出するコンテキスト更新部と、
前記シンボル生起確率状態の状態遷移値、前記MPS/LPS情報とレンジ値から再正規化シフト量を算出すると同時にレンジ値を更新するレンジ更新処理部と、
前記再正規化シフト量、前記MPS/LPS情報、前記更新されたレンジ値とロー値からロー値を更新するロー値更新部と、
前記更新されたロー値を用いてビットストリームを生成するビットストリーム生成部とを備える二値算術符号化装置であって、
前記コンテキスト更新部は、1bin目の生起確率状態から、2bin目の生起確率状態を同時に決定する際に生起確率状態テーブルを参照して複数のbinを並列処理し、
前記レンジ更新処理部は、1bin目と2bin目の生起確率状態を用いてLPS区間長テーブルの値を読み出し、前記レンジ値を用いて前記読み出された値の中から複数の値を選択し、前記レンジ値の更新及び再正規化シフト量の算出を行うことを特徴とする二値算術符号化装置。
A context update unit for calculating a state transition value of the symbol occurrence probability state and MPS / LPS information from the context information and the symbol;
A range update processing unit that calculates a renormalization shift amount from the state transition value of the symbol occurrence probability state, the MPS / LPS information and the range value, and simultaneously updates the range value;
A low value update unit that updates a low value from the renormalization shift amount, the MPS / LPS information, the updated range value and a low value;
A binary arithmetic encoding device comprising: a bitstream generation unit that generates a bitstream using the updated row value;
The context update unit performs parallel processing on a plurality of bins with reference to the occurrence probability state table when simultaneously determining the occurrence probability state of the second bin from the occurrence probability state of the first bin ,
The range update processing unit reads the value of the LPS section length table using the occurrence probability state of the first bin and the second bin, selects a plurality of values from the read values using the range value, A binary arithmetic coding apparatus, wherein the range value is updated and a renormalization shift amount is calculated .
前記ロー値更新部は、前記MPS/LPS情報、前記再正規化シフト量、更新された前記レンジ値を複数受け取り、前記ロー値と前記再正規化シフト量の累積加算を行い、当該累積加算の結果が指定された閾値を超えた場合には、前記ビットストリーム生成部へデータを出力すると共に、前記ロー値および前記出力したデータのビット数分だけ前記累積加算の結果から減ずることを特徴とする請求項に記載の二値算術符号化装置。 The low value update unit receives a plurality of the MPS / LPS information, the renormalization shift amount, and the updated range value, performs cumulative addition of the low value and the renormalization shift amount, and performs the cumulative addition When the result exceeds a specified threshold, the data is output to the bitstream generation unit, and is reduced from the result of the cumulative addition by the number of bits of the low value and the output data. The binary arithmetic coding apparatus according to claim 1 . 前記ビットストリーム生成部は、桁上がり処理を行うために、一時的に受け取ったデータを保持し、桁上がりを生じる可能性が有る場合は出力せず、受け取ったデータ量のみを加算し、桁上がりを生じないことが確認された場合に、桁上がり処理を行い保持したデータをビットストリームとして出力し、受け取ったデータ量が1になるまで桁上がり処理の結果により1あるいは0を出力し続け、確認に用いたデータを再度一時的に保持することを特徴とする請求項に記載の二値算術符号化装置。 The bit stream generation unit holds the received data temporarily to perform carry processing, does not output when there is a possibility of carry, adds only the received data amount, and carries When it is confirmed that no carry occurs, the carry data is processed and the stored data is output as a bit stream, and 1 or 0 is continuously output until the received data amount becomes 1, and the check is continued. The binary arithmetic coding apparatus according to claim 2 , wherein the data used in the step is temporarily held again. コンテキスト情報とシンボルからシンボル生起確率状態の状態遷移値とMPS/LPS情報を算出するコンテキスト更新部と、
前記シンボル生起確率状態の状態遷移値、前記MPS/LPS情報とレンジ値から再正規化シフト量を算出すると同時にレンジ値を更新するレンジ更新処理部と、
前記再正規化シフト量、前記MPS/LPS情報、前記更新されたレンジ値とロー値からロー値を更新するロー値更新部と、
前記更新されたロー値を用いてビットストリームを生成するビットストリーム生成部とを備える二値算術符号化装置が行う二値算術符号化方法であって、
前記コンテキスト更新部が、1bin目の生起確率状態から、2bin目の生起確率状態を同時に決定する際に生起確率状態テーブルを参照して複数のbinを並列処理し、
前記レンジ更新処理部は、1bin目と2bin目の生起確率状態を用いてLPS区間長テーブルの値を読み出し、前記レンジ値を用いて前記読み出された値の中から複数の値を選択し、前記レンジ値の更新及び再正規化シフト量の算出を行うことを特徴とする二値算術符号化方法。
A context update unit for calculating a state transition value of the symbol occurrence probability state and MPS / LPS information from the context information and the symbol;
A range update processing unit that calculates a renormalization shift amount from the state transition value of the symbol occurrence probability state, the MPS / LPS information and the range value, and simultaneously updates the range value;
A low value update unit that updates a low value from the renormalization shift amount, the MPS / LPS information, the updated range value and a low value;
A binary arithmetic encoding method performed by a binary arithmetic encoding device including a bitstream generation unit that generates a bitstream using the updated row value,
When the context update unit simultaneously determines the occurrence probability state of the second bin from the occurrence probability state of the first bin, the plurality of bins are processed in parallel with reference to the occurrence probability state table ,
The range update processing unit reads the value of the LPS section length table using the occurrence probability state of the first bin and the second bin, selects a plurality of values from the read values using the range value, A binary arithmetic coding method, wherein the range value is updated and a renormalization shift amount is calculated .
コンピュータを、請求項1からのいずれか1項に記載の二値算術符号化装置として機能させるための二値算術符号化プログラム。 A binary arithmetic encoding program for causing a computer to function as the binary arithmetic encoding device according to any one of claims 1 to 3 .
JP2013254531A 2013-12-09 2013-12-09 Binary arithmetic encoding device, binary arithmetic encoding method, and binary arithmetic encoding program Expired - Fee Related JP6159240B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013254531A JP6159240B2 (en) 2013-12-09 2013-12-09 Binary arithmetic encoding device, binary arithmetic encoding method, and binary arithmetic encoding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013254531A JP6159240B2 (en) 2013-12-09 2013-12-09 Binary arithmetic encoding device, binary arithmetic encoding method, and binary arithmetic encoding program

Publications (2)

Publication Number Publication Date
JP2015115665A JP2015115665A (en) 2015-06-22
JP6159240B2 true JP6159240B2 (en) 2017-07-05

Family

ID=53529130

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013254531A Expired - Fee Related JP6159240B2 (en) 2013-12-09 2013-12-09 Binary arithmetic encoding device, binary arithmetic encoding method, and binary arithmetic encoding program

Country Status (1)

Country Link
JP (1) JP6159240B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180087771A (en) 2017-01-25 2018-08-02 삼성전자주식회사 Entropy encoder and video encoder including the same
JP6707045B2 (en) * 2017-03-15 2020-06-10 Nttエレクトロニクス株式会社 Binary arithmetic decoder and binary arithmetic decoding device
WO2018194190A1 (en) * 2017-04-18 2018-10-25 엘지전자(주) Methods and devices for entropy encoding and decoding of video signal
CN110365346B (en) * 2019-07-22 2021-07-06 浙江大华技术股份有限公司 Arithmetic entropy coding method and system
CN113141508B (en) * 2020-01-17 2024-03-26 阿里巴巴集团控股有限公司 Arithmetic encoder, method for realizing arithmetic encoding and image encoding method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005130099A (en) * 2003-10-22 2005-05-19 Matsushita Electric Ind Co Ltd Arithmetic decoding device, arithmetic encoding device, arithmetic encoding/decoding device, portable terminal equipment, moving image photographing device, and moving image recording/reproducing device
JP4453398B2 (en) * 2004-03-01 2010-04-21 ソニー株式会社 Encoding apparatus, program, and encoding processing method
JP4547503B2 (en) * 2006-03-07 2010-09-22 国立大学法人徳島大学 Arithmetic coding apparatus, arithmetic coding method, arithmetic coding program, and computer-readable recording medium storing the program
JP5274317B2 (en) * 2009-03-17 2013-08-28 パナソニック株式会社 Code amount estimation apparatus, code amount estimation method, code amount estimation program, and code amount estimation integrated circuit

Also Published As

Publication number Publication date
JP2015115665A (en) 2015-06-22

Similar Documents

Publication Publication Date Title
JP6159240B2 (en) Binary arithmetic encoding device, binary arithmetic encoding method, and binary arithmetic encoding program
JP3017379B2 (en) Encoding method, encoding device, decoding method, decoder, data compression device, and transition machine generation method
KR100717052B1 (en) Method of decoding syntax element in cabac decoder with parallel processing of binary arithmetic decoding and binarization matching, and decoding apparatus therefor
JP4893657B2 (en) Arithmetic decoding device
KR102386191B1 (en) Block-wise parallel freeze bit generation for polar codes
GB2530311A (en) Data compression
WO2008034094A2 (en) Entropy processor for decoding
Najmabadi et al. High throughput hardware architectures for asymmetric numeral systems entropy coding
JP4547503B2 (en) Arithmetic coding apparatus, arithmetic coding method, arithmetic coding program, and computer-readable recording medium storing the program
JPH0651943A (en) Decoding circuit for variable length code
US20120047355A1 (en) Information Processing Apparatus Performing Various Bit Operation and Information Processing Method Thereof
US7567189B2 (en) Variable length code decoding apparatus and variable length code decoding method
CN116366071A (en) Packaging method, packaging system, storage medium and packaging equipment based on ANS (analog to digital) coding
JP5413161B2 (en) Table device, encoding device, decoding device, and encoding / decoding device
GB2595031A (en) Efficient encoding methods
US9532044B2 (en) Arithmetic decoding device, image decoding apparatus and arithmetic decoding method
JP2009175861A (en) Value selection circuit
JP6695813B2 (en) Dedicated arithmetic coding instruction
JP2005217871A (en) Arithmetic decoding apparatus and arithmetic decoding program
KR100207428B1 (en) Variable length coding apparatus and method adaptive to changes of the hoffman codes
CN112073729B (en) Model updating method, device, electronic equipment and computer readable storage medium
JPH09284142A (en) Variable length decoder
CN116582669A (en) Binary arithmetic coding structure, binary arithmetic coding device, binary arithmetic coding method, and storage medium
TW202418807A (en) Noniterative entropy coding
JP2006019814A (en) Entropy decoder

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160308

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170322

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170404

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170524

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170609

R150 Certificate of patent or registration of utility model

Ref document number: 6159240

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees