JP2009060343A - Residual index decoder, and decoding method of residual index - Google Patents

Residual index decoder, and decoding method of residual index Download PDF

Info

Publication number
JP2009060343A
JP2009060343A JP2007225355A JP2007225355A JP2009060343A JP 2009060343 A JP2009060343 A JP 2009060343A JP 2007225355 A JP2007225355 A JP 2007225355A JP 2007225355 A JP2007225355 A JP 2007225355A JP 2009060343 A JP2009060343 A JP 2009060343A
Authority
JP
Japan
Prior art keywords
decoder
run
level
decoding
counter
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.)
Withdrawn
Application number
JP2007225355A
Other languages
Japanese (ja)
Inventor
Satoshi Takegawa
川 智 竹
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2007225355A priority Critical patent/JP2009060343A/en
Publication of JP2009060343A publication Critical patent/JP2009060343A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To improve throughput and a processing speed of a residual index decoder, and reduce a circuit size. <P>SOLUTION: The decoder is provided with: a coeffLevel decoder 115 which decodes output data following a VLC (Variable Length Code) decoder 100, a level decoder 111, a run decoder 113, a level, and a run, and transmits it to a zigzag scanning block 120; and a counter 114 which creates a count value by counting in the same order as that in processing of the run decoder 113 following data created by the VLC decoder 100, and transmits the count value to the run decoder 113, and the coeffLevel decoder 115. The run decoder 113 decodes the run following the count value transmitted from the counter 114. The coeffLevel decoder 115 adds an index to pixel data, following the count value transmitted from the counter 114. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、残差インデックスデコーダ及び残差インデックスのデコード方法に関し、特に、動画フォーマットH.264におけるresidual_block_cavlc部分のデコードに適用される残差インデックスデコーダ及び残差インデックスのデコード方法に関する。   The present invention relates to a residual index decoder and a residual index decoding method. The present invention relates to a residual index decoder applied to decoding a residual_block_cavlc portion in H.264 and a decoding method of the residual index.

近年、動画データの圧縮符号化方式としてH.264が知られている。H.264のデコード処理の1つに、CAVLC(Context-based Adaptive Variable Length Code)方式を用いた残差インデックスのデコード処理であるresidual_block_cavlcシンタックスのデコード処理がある。   In recent years, H.264 has been used as a compression encoding method for moving image data. H.264 is known. H. One of the H.264 decoding processes is a decoding process of residual_block_cavlc syntax, which is a decoding process of a residual index using a CAVLC (Context-based Adaptive Variable Length Code) method.

従来の残差インデックスデコーダは、levelデコーダ、runデコーダ及びcoeffLevelデコーダを備えている。従来の残差インデックスデコーダでは、levelデコーダ及びrunデコーダによるデコード処理の後にcoeffLevelデコーダによるデコード処理が行われるため、levelデコーダ及びrunデコーダとcoeffLevelデコーダとの間にそれぞれlevelを蓄積するためのlevelバッファ及びrunを蓄積するためのrunバッファが設けられている。   The conventional residual index decoder includes a level decoder, a run decoder, and a coeff Level decoder. In the conventional residual index decoder, since the decoding process by the coeff Level decoder is performed after the decoding process by the level decoder and the run decoder, a level buffer for storing the level between the level decoder and the run decoder and the coeff Level decoder, and A run buffer for accumulating run is provided.

ストリーム内のパラメータは、level,run(run_before) の順番に格納されており、levelとrunを全てデコードした後にrunをデコードした順序と逆順でcoffLevel[]を決定する。   The parameters in the stream are stored in the order of level and run (run_before), and after all level and run are decoded, coffLevel [] is determined in the reverse order of decoding the run.

また、runデコーダとcoeffLevelデコーダが互いに逆順のrunカウンタ及びcoeffLevelカウンタに従って動作するので、runのデコードとcoeffLevel[coeffNum]のデコードが互いに異なる処理順序で行われる。   In addition, since the run decoder and the coeff Level decoder operate according to the run counter and the coeff Level counter in the reverse order, the run decoding and the coeffLevel [coeffNum] decoding are performed in different processing orders.

しかし、coeffLevelデコーダがlevelデコーダ及びrunデコーダのデコード処理が終了するまでデコード処理を行うことができないので、スループットが悪化するという問題があった。   However, since the coeff Level decoder cannot perform the decoding process until the decoding process of the level decoder and the run decoder is completed, there is a problem that the throughput is deteriorated.

また、levelバッファとは別にrunバッファが設けられ、runカウンタとは別にcoeffLevelカウンタが設けられているので、回路規模が増加するという問題があった。   In addition, since a run buffer is provided separately from the level buffer and a coeff Level counter is provided separately from the run counter, there is a problem that the circuit scale increases.

また、runバッファが設けられることによって、runバッファアクセスに起因して処理速度が低下するという問題があった。   In addition, the provision of the run buffer has a problem that the processing speed is reduced due to the run buffer access.

一方、residual_block_cavlc シンタックスのデコード処理をソフトウェアによって実現する場合には、runのデコード及びcoeffLevelのデコードにおいてそれぞれ別々のループアルゴリズムが記述される。   On the other hand, when the decoding process of the residual_block_cavlc syntax is realized by software, separate loop algorithms are described for the run decoding and the coeffLevel decoding.

しかし、ループアルゴリズムが2つ含まれるので、ステップ数が増加するという問題がある。
特開2006−287862号公報
However, since two loop algorithms are included, there is a problem that the number of steps increases.
JP 2006-287862 A

本発明の目的は、スループット及び処理速度を向上させ且つ回路規模を削減するための残差インデックスデコーダ及び残差インデックスのデコード方法を提供することである。   An object of the present invention is to provide a residual index decoder and a residual index decoding method for improving throughput and processing speed and reducing circuit scale.

本発明の第1態様によれば、VLCデコーダによって生成されたデータに従って量子化されたDCT係数値を示すlevelを復号するlevelデコーダと、前記VLCデコーダによって生成されたデータに従って所定の順序で前記DCT係数値の前の0の連続個数を示すrunを復号するrunデコーダと、前記levelデコーダによって復号されたlevel及び前記runデコーダによって復号されたrunに従って、画素にインデックスを付加することによって出力データを復号し、当該出力データをジグザグスキャンブロックに送信するcoeffLevelデコーダと、前記VLCデコーダによって生成されたデータに従って前記runデコーダの処理と同じ順序でカウントすることによってカウント値を生成し、当該カウント値を前記runデコーダ及び前記coeffLevelデコーダに送信するカウンタと、を備え、前記runデコーダは、前記カウンタから送信されたカウント値に従って前記runを復号し、前記coeffLevelデコーダは、前記カウンタから送信されたカウント値に従って前記画素データにインデックスを付加することを特徴とする残差インデックスデコーダが提供される。   According to a first aspect of the present invention, a level decoder that decodes a level indicating a DCT coefficient value quantized according to data generated by a VLC decoder, and the DCT in a predetermined order according to the data generated by the VLC decoder. The output data is decoded by adding an index to the pixel according to the run decoder that decodes run indicating the continuous number of 0s before the coefficient value, the level decoded by the level decoder, and the run decoded by the run decoder. Then, a count value is generated by counting the output data in the same order as the processing of the run decoder according to the data generated by the VLC decoder and the coeff Level decoder that transmits the output data to the zigzag scan block. And a counter that transmits a run value to the run decoder and the coeff Level decoder, the run decoder decodes the run according to a count value sent from the counter, and the coeff Level decoder is sent from the counter A residual index decoder is provided that adds an index to the pixel data according to a count value.

本発明によれば、スループット及び処理速度を向上させ且つ回路規模を削減することが出来る。   According to the present invention, the throughput and processing speed can be improved and the circuit scale can be reduced.

以下、本発明の実施例について図面を参照して説明する。なお、以下の実施例は、本発明の実施の一形態であって、本発明の範囲を限定するものではない。   Embodiments of the present invention will be described below with reference to the drawings. The following examples are one embodiment of the present invention and do not limit the scope of the present invention.

はじめに、本発明の実施例1について説明する。本発明の実施例1は、ハードウェアを用いて本発明の目的を達成する例である。   First, Example 1 of the present invention will be described. The first embodiment of the present invention is an example in which the object of the present invention is achieved using hardware.

(構成)
図1は、本発明の実施例1に係る残差インデックスデコーダ110の構成を示すブロック図である。
(Constitution)
FIG. 1 is a block diagram illustrating a configuration of a residual index decoder 110 according to the first embodiment of the present invention.

本発明の実施例1に係る残差インデックスデコーダ110は、VLC(Variable Length Code)デコーダ100及びジグザグスキャンブロック120に接続されている。   The residual index decoder 110 according to the first embodiment of the present invention is connected to a VLC (Variable Length Code) decoder 100 and a zigzag scan block 120.

VLCデコーダ100は、シンタックスのVLCデコード処理を行うことによってVLCデコードデータを生成し、残差インデックスデコーダ110に送信する。   The VLC decoder 100 generates VLC decoded data by performing a syntax VLC decoding process, and transmits the VLC decoded data to the residual index decoder 110.

残差インデックスデコーダ110は、levelデコーダ111、levelバッファ112、runデコーダ113、カウンタ114及びcoeffLevelデコーダ115を備えている。   The residual index decoder 110 includes a level decoder 111, a level buffer 112, a run decoder 113, a counter 114, and a coeff Level decoder 115.

levelデコーダ111は、VLCデコーダ100から送信されたVLCデコードデータのパラメータに従ってlevelをデコードし、levelバッファ112に送信する。levelは、量子化されたDCT係数値を示すデータである。   The level decoder 111 decodes the level according to the parameters of the VLC decoded data transmitted from the VLC decoder 100 and transmits the decoded level to the level buffer 112. Level is data indicating a quantized DCT coefficient value.

levelバッファ112は、levelデコーダ111から送信されたlevelを蓄積するためのバッファである。   The level buffer 112 is a buffer for accumulating the level transmitted from the level decoder 111.

runデコーダ113は、VLCデコーダ100から送信されたVLCデコードデータのrun_before及びzerosLeft並びに後述のカウンタ114から送信されたカウント値及びデコード命令に従ってrunをデコードし、coeffLevelデコーダ115に送信する。run_beforeは、DCT係数値の前の0の連続個数を示すデータであり、zerosLeftは、デコードされる残りのゼロの数を示すデータであり、runは、DCT係数値の前の0の連続個数を示すデータである。   The run decoder 113 decodes run according to run_before and zerosLeft of the VLC decode data transmitted from the VLC decoder 100 and a count value and a decode command transmitted from the counter 114 described later, and transmits the run to the coeff Level decoder 115. run_before is data indicating the number of consecutive zeros before the DCT coefficient value, zerosLeft is data indicating the number of remaining zeros to be decoded, and run is the number of consecutive zeros before the DCT coefficient value. It is the data shown.

カウンタ114は、VLCデコーダ100から送信されたVLCデコードデータのTotalCoeff及びzerosLeft並びにcoeffLevelデコーダ115から送信されたカウント命令に従ってrunデコーダ113の処理と同じ順序でカウントを行うことによってカウント値を生成し、カウント値及びデコード命令をrunデコーダ113及びcoeffLevelデコーダ115に送信する。カウンタ114は、例えばアップカウンタである。TotalCoeffは、非0係数の個数を示すデータである。   The counter 114 generates a count value by counting in the same order as the processing of the run decoder 113 in accordance with the TotalCoeff and zerosLeft of the VLC decode data transmitted from the VLC decoder 100 and the count instruction transmitted from the coeffLevel decoder 115. The value and the decode command are transmitted to the run decoder 113 and the coeff Level decoder 115. The counter 114 is an up counter, for example. TotalCoeff is data indicating the number of non-zero coefficients.

coeffLevelデコーダ115は、levelバッファ112に蓄積されたlevel、runデコーダ113から送信されたrun及びカウンタ114から送信されたカウント値に従って画素にインデックスを付加することによってcoeffLevel[coeffNum]をデコードし、ジグザグスキャンブロック120に送信する。coeffLevel[coeffNum]は、出力データである。   The coeffLevel decoder 115 decodes coeffLevel [coeffNum] by adding an index to the pixel according to the level stored in the level buffer 112, the run transmitted from the run decoder 113, and the count value transmitted from the counter 114, and performs zigzag scanning. Transmit to block 120. coeffLevel [coeffNum] is output data.

ジグザグスキャンブロック120は、coeffLevelデコーダ115から送信された出力データを受信し、ジグザグスキャンを行う。   The zigzag scan block 120 receives the output data transmitted from the coeffLevel decoder 115 and performs zigzag scan.

(動作)
はじめに、levelデコーダ111は、VLCデコーダ100から送信されたVLCデコードデータのパラメータに従って全てのlevelをデコードし、デコードされたlevelをlevelバッファ112へ送信する。
(Operation)
First, the level decoder 111 decodes all levels according to the parameters of the VLC decode data transmitted from the VLC decoder 100 and transmits the decoded levels to the level buffer 112.

次に、カウンタ114は、VLCデコーダ100から送信されたVLCデコードデータのzerosLeft及びTotalCoeff初期値を決定し、coeffLevelデコーダ115から送信されたカウント命令に従ってカウントを行い、runデコーダ113及びcoeffLevelデコーダ115にカウント値及びデコード命令を送信する。   Next, the counter 114 determines zerosLeft and TotalCoeff initial values of the VLC decoded data transmitted from the VLC decoder 100, performs counting according to the count command transmitted from the coeffLevel decoder 115, and counts to the run decoder 113 and the coeffLevel decoder 115. Send values and decode instructions.

次に、coeffLevelデコーダ115は、runデコーダ113から送信されたrunを受信するとともにlevelバッファ112に蓄積されたlevelを読み出し、coeffLevel[coeffNum]をデコードする。このとき、level及びrunは、デコードされた順序でcoeffLevel[coeffNum]のデコードに使用される。すなわち、coeffLevel[]は引数であるcoeffNumが大きい順番に決定される。また、run及びcoeffLevel[]のデコードの可否は、カウンタ114から送信されたカウンタ値に従って決定される。   Next, the coeff Level decoder 115 receives the run transmitted from the run decoder 113, reads the level stored in the level buffer 112, and decodes coeffLevel [coeffNum]. At this time, level and run are used for decoding coeffLevel [coeffNum] in the order of decoding. That is, coeffLevel [] is determined in descending order of coeffNum as an argument. Whether run and coeffLevel [] can be decoded is determined according to the counter value transmitted from the counter 114.

図2は、本発明の実施例1に係る残差インデックスデコーダ110の各部111〜115から出力される波形を示す概略図である。   FIG. 2 is a schematic diagram illustrating waveforms output from the respective units 111 to 115 of the residual index decoder 110 according to the first embodiment of the present invention.

図2に示されたように、本発明の実施例1に係る残差インデックスデコーダ110は、levelデコーダ111によってデコードされたlevel及びrunデコーダ113によってデコードされたrunをデコードされた順番にデコードするので、runのデコード処理とcoeffLevel [coeffNum]のデコード処理を並列で行うことが出来る。   As shown in FIG. 2, the residual index decoder 110 according to the first embodiment of the present invention decodes the level decoded by the level decoder 111 and the run decoded by the run decoder 113 in the order of decoding. , Run decode processing and coeffLevel [coeffNum] decode processing can be performed in parallel.

本発明の実施例1によれば、runデコーダ113及びcoffLevelデコーダ115が同じ順番にデコード処理を行うので、残差インデックスデコーダ110のスループットを向上させることが出来る。   According to the first embodiment of the present invention, since the run decoder 113 and the coffLevel decoder 115 perform the decoding process in the same order, the throughput of the residual index decoder 110 can be improved.

また、本発明の実施例1によれば、runデコーダ113とcoffLevelデコーダ115の間のバッファが不要となるので、回路規模を削減し且つバッファアクセスに起因する処理速度の低下を防ぐことが出来る。   Further, according to the first embodiment of the present invention, the buffer between the run decoder 113 and the coff Level decoder 115 is not necessary, so that the circuit scale can be reduced and the processing speed due to the buffer access can be prevented from being lowered.

また、本発明の実施例1によれば、runデコーダ113とcoffLevelデコーダ115が共通のカウンタ114に従って処理を行うので、回路規模を削減することが出来る。   Further, according to the first embodiment of the present invention, the run decoder 113 and the coff Level decoder 115 perform processing according to the common counter 114, so that the circuit scale can be reduced.

次に、本発明の実施例2について説明する。本発明の実施例1は、ハードウェアを用いて本発明の目的を達成する例であるが、本発明の実施例2は、ソフトウェアを用いて本発明の目的を達成する例である。なお、本発明の実施例1と同様の内容についての説明は省略する。   Next, a second embodiment of the present invention will be described. The first embodiment of the present invention is an example of achieving the object of the present invention using hardware, while the second embodiment of the present invention is an example of achieving the object of the present invention using software. In addition, the description about the content similar to Example 1 of this invention is abbreviate | omitted.

図3は、本発明の実施例2に係る残差インデックスデコーダ210の構成を示すブロック図である。   FIG. 3 is a block diagram showing a configuration of the residual index decoder 210 according to the second embodiment of the present invention.

本発明の実施例2に係る残差インデックスデコーダ210は、VLC(Variable Length Code)デコーダ200、ジグザグスキャンブロック220及びメモリ230に接続されている。   The residual index decoder 210 according to the second embodiment of the present invention is connected to a VLC (Variable Length Code) decoder 200, a zigzag scan block 220, and a memory 230.

VLCデコーダ200は、メモリ230に記憶されたVLCデコードプログラム231に従ってVLCデコード処理を行うことによってVLCデコードデータを生成し、生成されたVLCデコードデータをメモリ230に書き込む。   The VLC decoder 200 generates VLC decode data by performing VLC decode processing according to the VLC decode program 231 stored in the memory 230, and writes the generated VLC decode data in the memory 230.

残差インデックスデコーダ210は、メモリ230に記憶された残差インデックスデコードプログラム232、levelデコードプログラム233及びrun&coeffLevelデコードプログラム234に従って残差インデックスデコード手段211、levelデコード手段212及びrun&coeffLevelデコード手段213を実現する。   The residual index decoder 210 implements a residual index decoding unit 211, a level decoding unit 212, and a run & coeff Level decoding unit 213 according to the residual index decoding program 232, the level decoding program 233, and the run & coeff Level decoding program 234 stored in the memory 230.

ジグザグスキャンブロック220は、メモリ230に記憶されたジグザグスキャンプログラム235に従って残差インデックスデコーダ210の処理結果に対してジグザグスキャンを行う。   The zigzag scan block 220 performs zigzag scan on the processing result of the residual index decoder 210 according to the zigzag scan program 235 stored in the memory 230.

メモリ230は、VLCデコーダ200の制御プログラムであるVLCデコードプログラム231、残差インデックスデコーダ210の制御プログラムである残差インデックスデコードプログラム232、levelデコードプログラム233及びrun&coeffLevelデコードプログラム234並びにジグザグスキャンブロック220の制御プログラムであるジグザグスキャンプログラム235を記憶する。また、メモリ230は、VLCデコーダ200、残差インデックスデコーダ210及びジグザグスキャンブロック220における処理に際して、ワーキングメモリとしても用いられる。   The memory 230 controls the VLC decoding program 231 which is a control program of the VLC decoder 200, the residual index decoding program 232 which is a control program of the residual index decoder 210, the level decoding program 233, the run & coeff Level decoding program 234 and the control of the zigzag scan block 220. A zigzag scan program 235 which is a program is stored. The memory 230 is also used as a working memory in processing in the VLC decoder 200, the residual index decoder 210, and the zigzag scan block 220.

図4は、本発明の実施例2に係る残差インデックスデコード処理における残差インデックスデコーダ210の処理手順を示すフローチャートである。   FIG. 4 is a flowchart showing a processing procedure of the residual index decoder 210 in the residual index decoding process according to the second embodiment of the present invention.

はじめに、残差インデックスデコード手段211は、メモリ230からVLCデコードデータを読み出すための演算“coeff_token”を実行する(S401)。   First, the residual index decoding unit 211 performs an operation “coeff_token” for reading VLC decoded data from the memory 230 (S401).

VLCデコードデータのTottalCoeffが0より大きい場合には(S402−YES)、levelデコード手段212は、メモリ230に記憶されたlevelデコードプログラム233を実行することによって後述のlevelデコード処理を行う(S403)。   If TottalCoeff of the VLC decoded data is larger than 0 (S402-YES), the level decoding means 212 performs the level decoding process described later by executing the level decoding program 233 stored in the memory 230 (S403).

次に、残差インデックスデコード手段211は、zerosLeftをデコードするための演算“decode zerosLeft”を実行する(S404)。   Next, the residual index decoding unit 211 executes an operation “decode zerosLeft” for decoding zerosLeft (S404).

次に、run&coeffLevelデコード手段213は、メモリ230に記憶されたrun&coeffLevelデコードプログラム234を実行することによって後述のrun&coeffLevelデコード処理を行う(S405)。   Next, the run & coeff Level decoding means 213 executes a run & coeff Level decoding program 234 stored in the memory 230 to perform a later-described run & coeff Level decoding process (S405).

S405が終了した後に、本発明の実施例2に係る残差インデックスデコード処理が終了する。   After S405 ends, the residual index decoding process according to the second embodiment of the present invention ends.

一方、VLCデコードデータのTottalCoeffが0より小さい場合には(S402−NO)、残差インデックスデコード手段211は、run及びcoeffLevel[]のデコードをする必要がないものと判断し、S403〜S405を行うことなく本発明の実施例2に係る残差インデックスデコード処理を終了する。   On the other hand, if TottalCoeff of the VLC decoded data is smaller than 0 (S402-NO), the residual index decoding unit 211 determines that there is no need to decode run and coeffLevel [], and performs S403 to S405. Without any processing, the residual index decoding process according to the second embodiment of the present invention is terminated.

図5は、本発明の実施例2に係るlevelデコード処理におけるlevelデコード手段212の処理手順を示すフローチャートである。   FIG. 5 is a flowchart showing the processing procedure of the level decoding means 212 in the level decoding processing according to the second embodiment of the present invention.

はじめに、levelデコード手段212は、インデックス変数iに初期値として0を代入する(S501)。   First, the level decoding unit 212 substitutes 0 as an initial value for the index variable i (S501).

インデックス変数iがVLCデコードデータのTotalCoeffより小さい場合には(S502−YES)、levelデコード手段212は、VLCデコードデータのパラメータのデコードを行うための演算“decode trailing_ones_sign_flag”を実行する(S503)。   When the index variable i is smaller than the TotalCoeff of the VLC decoded data (S502-YES), the level decoding unit 212 executes an operation “decode trailing_ones_sign_flag” for decoding the parameters of the VLC decoded data (S503).

次に、levelデコード手段212は、levelのデコードを行うための演算“decode level”を実行する(S504)。   Next, the level decoding unit 212 executes an operation “decode level” for decoding the level (S504).

次に、levelデコード手段212は、インデックス変数iをインクリメントし(S505)、S502に戻る。   Next, the level decoding means 212 increments the index variable i (S505), and returns to S502.

インデックス変数iがVLCデコードデータのTotalCoeffと等しくなった場合には(S502−NO)、levelデコード手段212は、本発明の実施例2に係るlevelデコード処理を終了し、図4のS404へジャンプする。   When the index variable i becomes equal to the TotalCoeff of the VLC decoded data (S502-NO), the level decoding unit 212 ends the level decoding process according to the second embodiment of the present invention, and jumps to S404 in FIG. .

図6は、本発明の実施例2に係るrun&coeffLevelデコード処理におけるrun&coeffLevelデコード手段213の処理手順を示すフローチャートである。   FIG. 6 is a flowchart showing a processing procedure of the run & coeff Level decoding means 213 in the run & coeff Level decoding process according to the second embodiment of the present invention.

はじめに、run&coeffLevelデコード手段213は、変数coeffNumに初期値を代入するための演算“coeffNum = TotalCoeff + zerosLeft - 1”を実行する(S601)。   First, the run & coeff Level decoding unit 213 executes an operation “coeffNum = TotalCoeff + zerosLeft−1” for substituting an initial value for the variable coeffNum (S601).

次に、run&coeffLevelデコード手段213は、インデックス変数iに初期値として0を代入する(S602)。   Next, the run & coeff Level decoding unit 213 substitutes 0 as an initial value for the index variable i (S602).

インデックス変数iがVLCデコードデータのTotalCoeffから1を引いた値より小さい場合には(S603−YES)、run&coeffLevelデコード手段213は、出力データのインデックスを決定するための演算“coeffLevel[coeffNum] = level[i]”を実行する(S604)。   When the index variable i is smaller than the value obtained by subtracting 1 from TotalCoeff of the VLC decoded data (YES in S603), the run & coeff Level decoding unit 213 calculates “coeffLevel [coeffNum] = level [ i] "is executed (S604).

次に、run&coeffLevelデコード手段213は、runのデコードを行うための演算“decode run”を実行する(S605)。   Next, the run & coeff Level decoding unit 213 executes an operation “decode run” for decoding the run (S605).

次に、run&coeffLevelデコード手段213は、演算“zerosLeft -= run”を実行する(S606)。   Next, the run & coeff Level decoding unit 213 executes the operation “zerosLeft-= run” (S606).

次に、run&coeffLevelデコード手段213は、係数の数の算出を行うための演算“coeffNum = coeffNum - run - 1”を実行する(S607)。   Next, the run & coeff Level decoding unit 213 executes an operation “coeffNum = coeffNum−run−1” for calculating the number of coefficients (S607).

次に、run&coeffLevelデコード手段213は、インデックス変数iをインクリメントし(S608)、S603に戻る。   Next, the run & coeff Level decoding means 213 increments the index variable i (S608), and returns to S603.

インデックス変数iがVLCデコードデータのTotalCoeffから1を引いた値と等しくなった場合には(S603−NO)、run&coeffLevelデコード手段213は、出力データのインデックスを決定するための演算“coeffLevel[coeffNum] = level[i]”を実行し(S609)、本発明の実施例2に係るrun&coeffLevelデコード処理を終了する。   When the index variable i becomes equal to the value obtained by subtracting 1 from TotalCoeff of the VLC decoded data (S603-NO), the run & coeff Level decoding means 213 calculates "coeffLevel [coeffNum] =" for determining the index of the output data. level [i] "is executed (S609), and the run & coeff Level decoding process according to the second embodiment of the present invention is terminated.

図7は、本発明の実施例2に係る残差インデックスデコード処理のソースコードの一例を示す概略図である。   FIG. 7 is a schematic diagram illustrating an example of a source code of residual index decoding processing according to the second embodiment of the present invention.

図7に示すように、本発明の実施例2に係る残差インデックスデコーダ210は、level及びzerosLeftをストリームからデコードしてメモリ230に書き込む。次に、coeffNumの初期値をTotalCoeffとzerosLeftに従って決定し、forループをcallする。forループではインデックスをTotalCoeffで取り、runをデコードしながら、メモリ230に書き込まれたlevelと共にcoeffLevel[coeffNum]を決定する。coeffLevel[coeffNum]の決定後に、次のcoeffLevelのインデックスとなるcoeffNum をデコードされたrunにより更新する。また、同じループ内で次のrunのデコードに必要なzerosLeftの更新も行う。   As illustrated in FIG. 7, the residual index decoder 210 according to the second embodiment of the present invention decodes level and zerosLeft from the stream and writes them in the memory 230. Next, the initial value of coeffNum is determined according to TotalCoeff and zerosLeft, and a for loop is called. In the for loop, an index is taken with TotalCoeff, and coeffLevel [coeffNum] is determined together with the level written in the memory 230 while decoding run. After determining coeffLevel [coeffNum], the coeffNum that becomes the index of the next coeffLevel is updated by the decoded run. It also updates zerosLeft, which is necessary for decoding the next run in the same loop.

次に、本発明の実施例2の変形例について説明する。本発明の実施例2の変形例は、run&coeffLevelデコード処理をwhile文を用いて実現する例である。   Next, a modification of the second embodiment of the present invention will be described. A modification of the second embodiment of the present invention is an example in which the run & coeff Level decoding process is realized using a while statement.

図8は、本発明の実施例2の変形例に係るrunデコード処理におけるrun&coeffLevelデコード手段213の処理手順を示すフローチャートである。   FIG. 8 is a flowchart showing a processing procedure of the run & coeff Level decoding means 213 in the run decoding process according to the modification of the second embodiment of the present invention.

はじめに、run&coeffLevelデコード手段213は、変数coeffNumに初期値を代入するための演算“coeffNum = TotalCoeff + zerosLeft - 1”を実行する(S801)。   First, the run & coeff Level decoding unit 213 performs an operation “coeffNum = TotalCoeff + zerosLeft−1” for substituting an initial value for the variable coeffNum (S801).

次に、run&coeffLevelデコード手段213は、インデックス変数iに初期値として0を代入する(S802)。   Next, the run & coeff Level decoding means 213 substitutes 0 as an initial value for the index variable i (S802).

VLCデコードデータのcoeffNumが0以上である場合には(S803−YES)、run&coeffLevelデコード手段213は、出力データのインデックスを決定するための演算“coeffLevel[coeffNum] = level[i]”を実行する(S804)。   When the coeffNum of the VLC decoded data is 0 or more (S803-YES), the run & coeff Level decoding means 213 executes an operation “coeffLevel [coeffNum] = level [i]” for determining the index of the output data ( S804).

次に、run&coeffLevelデコード手段213は、runのデコードを行うための演算“decode run”を実行する(S805)。   Next, the run & coeff Level decoding unit 213 executes an operation “decode run” for decoding the run (S805).

次に、run&coeffLevelデコード手段213は、演算“zerosLeft -= run”を実行する(S806)。   Next, the run & coeff Level decoding unit 213 executes the operation “zerosLeft-= run” (S806).

次に、run&coeffLevelデコード手段213は、係数の数の算出を行うための演算“coeffNum = coeffNum - run - 1”を実行する(S807)。   Next, the run & coeff Level decoding means 213 performs an operation “coeffNum = coeffNum−run−1” for calculating the number of coefficients (S807).

次に、run&coeffLevelデコード手段213は、インデックス変数iをインクリメントし(S808)、S803に戻る。   Next, the run & coeff Level decoding unit 213 increments the index variable i (S808), and returns to S803.

VLCデコードデータのcoeffNumが負の値になった場合には(S803−NO)、run&coeffLevelデコード手段213は、本発明の実施例2の変形例に係るrun&coeffLevelデコード処理を終了する。   When the coeffNum of the VLC decode data becomes a negative value (S803-NO), the run & coeff Level decode means 213 ends the run & coeff Level decode processing according to the modification of the second embodiment of the present invention.

図9は、本発明の実施例2の変形例に係る残差インデックスデコード処理のソースコードの一例を示す概略図である。   FIG. 9 is a schematic diagram illustrating an example of a source code of a residual index decoding process according to a modification of the second embodiment of the present invention.

図9に示すように、本発明の実施例2の変形例に係る残差インデックスデコーダ210は、level及びzerosLeftをストリームからデコードしてメモリ230に書き込む。次に、coeffNumの初期値をTotalCoeffとzerosLeftに従って決定し、whileループをcallする。whileループでは、インデックスが決定されていない非ゼロ係数の数を示すcoeffNumが0又は正である間処理が続けられる。whileループ内では、runをデコードしながら、メモリ230に書き込まれたlevelと共にcoeffLevel[coeffNum]を決定する。coeffLevel[coeffNum]の決定後に、次のcoeffLevelのインデックスとなるcoeffNum をデコードされたrunにより更新する。また、同じループ内で次のrunのデコードに必要なzerosLeftの更新も行う。   As shown in FIG. 9, the residual index decoder 210 according to the modification of the second embodiment of the present invention decodes level and zerosLeft from the stream and writes them in the memory 230. Next, the initial value of coeffNum is determined according to TotalCoeff and zerosLeft, and the while loop is called. In the while loop, the processing is continued while coeffNum indicating the number of non-zero coefficients whose index has not been determined is 0 or positive. In the while loop, coeffLevel [coeffNum] is determined together with the level written in the memory 230 while decoding the run. After determining coeffLevel [coeffNum], the coeffNum that becomes the index of the next coeffLevel is updated by the decoded run. It also updates zerosLeft, which is necessary for decoding the next run in the same loop.

本発明の実施例2によれば、本発明の実施例1と同様の効果に加えて、residual_block_cavlc のデコード処理をソフトウェアによって実現する場合に、runのデコード及びcoeffLevelのデコードのループアルゴリズムを共通化するので、処理ステップ数を削減することが出来る。   According to the second embodiment of the present invention, in addition to the same effects as those of the first embodiment of the present invention, when the decoding process of residual_block_cavlc is realized by software, the loop algorithm of decoding of run and decoding of coeffLevel is shared. Therefore, the number of processing steps can be reduced.

本発明の実施例1に係る残差インデックスデコーダ110の構成を示すブロック図である。It is a block diagram which shows the structure of the residual index decoder 110 which concerns on Example 1 of this invention. 本発明の実施例1に係る残差インデックスデコーダ110の各部111〜115から出力される波形を示す概略図である。It is the schematic which shows the waveform output from each part 111-115 of the residual index decoder 110 which concerns on Example 1 of this invention. 本発明の実施例2に係る残差インデックスデコーダ210の構成を示すブロック図である。It is a block diagram which shows the structure of the residual index decoder 210 which concerns on Example 2 of this invention. 本発明の実施例2に係る残差インデックスデコード処理における残差インデックスデコーダ210の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the residual index decoder 210 in the residual index decoding process which concerns on Example 2 of this invention. 本発明の実施例2に係るlevelデコード処理におけるlevelデコード手段212の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the level decoding means 212 in the level decoding process which concerns on Example 2 of this invention. 本発明の実施例2に係るrun&coeffLevelデコード処理におけるrun&coeffLevelデコード手段213の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the run & coeff Level decoding means 213 in the run & coeff Level decoding process which concerns on Example 2 of this invention. 本発明の実施例2に係る残差インデックスデコード処理のソースコードの一例を示す概略図である。It is the schematic which shows an example of the source code of the residual index decoding process which concerns on Example 2 of this invention. 本発明の実施例2の変形例に係るrunデコード処理におけるrun&coeffLevelデコード手段213の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the run & coeff Level decoding means 213 in the run decoding process which concerns on the modification of Example 2 of this invention. 本発明の実施例2の変形例に係る残差インデックスデコード処理のソースコードの一例を示す概略図である。It is the schematic which shows an example of the source code of the residual index decoding process which concerns on the modification of Example 2 of this invention.

符号の説明Explanation of symbols

100,200 VLCデコーダ
110,210 残差インデックスデコーダ
111 levelデコーダ
112 levelバッファ
113 runデコーダ
114 カウンタ
115 coeffLevelデコーダ
120,220 ジグザグスキャンブロック
211 残差インデックスデコード手段
212 levelデコード手段
213 runデコード手段
230 メモリ
100, 200 VLC decoder 110, 210 Residual index decoder 111 Level decoder 112 Level buffer 113 Run decoder 114 Counter 115 Coeff Level decoder 120, 220 Zigzag scan block 211 Residual index decoding means 212 Level decoding means 213 Run decoding means 230 Memory

Claims (5)

VLCデコーダによって生成されたデータに従って量子化されたDCT係数値を示すlevelを復号するlevelデコーダと、
前記VLCデコーダによって生成されたデータに従って所定の順序で前記DCT係数値の前の0の連続個数を示すrunを復号するrunデコーダと、
前記levelデコーダによって復号されたlevel及び前記runデコーダによって復号されたrunに従って、画素データにインデックスを付加することによって出力データを復号し、当該出力データをジグザグスキャンブロックに送信するcoeffLevelデコーダと、
前記VLCデコーダによって生成されたデータに従って前記runデコーダの処理と同じ順序でカウントすることによってカウント値を生成し、当該カウント値を前記runデコーダ及び前記coeffLevelデコーダに送信するカウンタと、を備え、
前記runデコーダは、前記カウンタから送信されたカウント値に従って前記runを復号し、
前記coeffLevelデコーダは、前記カウンタから送信されたカウント値に従って前記画素データにインデックスを付加することを特徴とする残差インデックスデコーダ。
A level decoder for decoding a level indicating a DCT coefficient value quantized according to data generated by the VLC decoder;
A run decoder that decodes run indicating the number of consecutive zeros before the DCT coefficient value in a predetermined order according to data generated by the VLC decoder;
A coeff Level decoder that decodes output data by adding an index to pixel data according to the level decoded by the level decoder and the run decoded by the run decoder, and transmits the output data to a zigzag scan block;
A counter that generates a count value by counting in the same order as the processing of the run decoder in accordance with the data generated by the VLC decoder, and transmits the count value to the run decoder and the coeff Level decoder.
The run decoder decodes the run according to the count value transmitted from the counter,
The coeff Level decoder adds an index to the pixel data according to the count value transmitted from the counter.
前記カウンタは、前記runデコーダによって復号されたrunと前記VLCデコーダによって生成されたデータのうち残りのゼロの数を示すzerosLeftとの差を取ることによって前記カウント値を生成する請求項1に記載の残差インデックスデコーダ。   The counter according to claim 1, wherein the counter generates the count value by taking a difference between run decoded by the run decoder and zerosLeft indicating the number of remaining zeros of data generated by the VLC decoder. Residual index decoder. 前記カウンタは、アップカウンタである請求項1又は2に記載の残差インデックスデコーダ。   The residual index decoder according to claim 1 or 2, wherein the counter is an up counter. 前記coeffLevelデコーダは、前記カウンタにカウント命令を送信し、
前記カウンタは、前記coeffLevelデコーダから送信されたカウント命令に応じて前記カウント値を生成する請求項1乃至3の何れか1項に記載の残差インデックスデコーダ。
The coeff Level decoder sends a count command to the counter;
4. The residual index decoder according to claim 1, wherein the counter generates the count value according to a count command transmitted from the coeffLevel decoder. 5.
VLCデコーダによって生成されたデータに従って量子化されたDCT係数値を示すlevelを復号し、
前記VLCデコーダによって生成されたデータに従って前記VLCデコーダによって生成されたデータのうち残りのゼロの数を示すzerosLeftを復号し、
前記VLCデコーダによって生成されたデータに従って所定の順序で前記DCT係数値の前の0の連続個数を示すrunを復号し、
前記復号されたlevel及びrunに従って、画素にインデックスを付加することを特徴とする残差インデックスのデコード方法。
Decoding a level indicating a DCT coefficient value quantized according to the data generated by the VLC decoder;
Decoding zeroLeft indicating the number of remaining zeros of the data generated by the VLC decoder according to the data generated by the VLC decoder;
Decoding run indicating the number of consecutive 0s before the DCT coefficient value in a predetermined order according to the data generated by the VLC decoder;
A method of decoding a residual index, comprising adding an index to a pixel according to the decoded level and run.
JP2007225355A 2007-08-31 2007-08-31 Residual index decoder, and decoding method of residual index Withdrawn JP2009060343A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007225355A JP2009060343A (en) 2007-08-31 2007-08-31 Residual index decoder, and decoding method of residual index

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007225355A JP2009060343A (en) 2007-08-31 2007-08-31 Residual index decoder, and decoding method of residual index

Publications (1)

Publication Number Publication Date
JP2009060343A true JP2009060343A (en) 2009-03-19

Family

ID=40555679

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007225355A Withdrawn JP2009060343A (en) 2007-08-31 2007-08-31 Residual index decoder, and decoding method of residual index

Country Status (1)

Country Link
JP (1) JP2009060343A (en)

Similar Documents

Publication Publication Date Title
KR101695681B1 (en) Context-based adaptive binary arithmetic coding (cabac) video stream compliance
JP4139330B2 (en) Improved variable length decoder
JP5264706B2 (en) Arithmetic decoding method and device
JP6681383B2 (en) Encoder, decoder and method
JP2014241579A (en) Video compression device
JP2009534886A5 (en)
TWI397268B (en) Entropy processor for decoding
TW201909633A (en) Method and apparatus for range derivation in context adaptive binary arithmetic coding
US8189674B2 (en) Decoding method, program for decoding method, recording medium with recorded program for decoding method, and decoding device
JP2008227946A (en) Image decoding apparatus
KR101727449B1 (en) Method for decoding video quantization parameter
US20140023137A1 (en) Techniques for context-adaptive binary data arithmetic coding (cabac) decoding
TWI683571B (en) Image decoding device, image decoding method, recording medium
CN110191341B (en) Depth data coding method and decoding method
JP2009060343A (en) Residual index decoder, and decoding method of residual index
US20190191162A1 (en) Method and device for encoding video data
CN107105249B (en) Image quantization parameter decoding method
JP2010050697A (en) Apparatus and method for compressing/decompressing image
US20220109891A1 (en) Features of range asymmetric number system encoding and decoding
JP2013016897A (en) Variable-length code decoder, code system and variable-length code decoding method
WO2019030860A1 (en) Method and device for generating error detecting redundant bit
JP2008311803A (en) Arithmetic decoding method, arithmetic decoding device and arithmetic decoding program
JP4582413B2 (en) Data processing method and data processing apparatus
JP6280266B2 (en) Decoding device and decoding method
JPH05199122A (en) Decoding circuit

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20101102