JP2011188431A - Variable length decoding apparatus - Google Patents

Variable length decoding apparatus Download PDF

Info

Publication number
JP2011188431A
JP2011188431A JP2010054446A JP2010054446A JP2011188431A JP 2011188431 A JP2011188431 A JP 2011188431A JP 2010054446 A JP2010054446 A JP 2010054446A JP 2010054446 A JP2010054446 A JP 2010054446A JP 2011188431 A JP2011188431 A JP 2011188431A
Authority
JP
Japan
Prior art keywords
decoding
unit
run
zeros
coefficient
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010054446A
Other languages
Japanese (ja)
Inventor
Hirotake Usami
裕丈 宇佐美
Masatoshi Kondo
雅俊 近藤
Masatoshi Takada
昌敏 高田
Yuichi Onami
雄一 大波
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.)
Hitachi Kokusai Electric Inc
Original Assignee
Hitachi Kokusai Electric Inc
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 Hitachi Kokusai Electric Inc filed Critical Hitachi Kokusai Electric Inc
Priority to JP2010054446A priority Critical patent/JP2011188431A/en
Publication of JP2011188431A publication Critical patent/JP2011188431A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To reduce the number of cycles required for "Run_before" decoding processing in H.264 decoding processing. <P>SOLUTION: In a variable length decoding apparatus, a decoding look-up table to be referenced in the "Run_before" decoding processing is optimized, thereby reducing the number of times of accessing the look-up table, and 14 decoding processing cycles at a maximum required up to now can be reduced to a single cycle. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、可変長復号装置に関わり、特に、H.264可変長符号化ストリームの復号処理における処理サイクル数の短縮に関するものである。   The present invention relates to a variable-length decoding device, and more particularly to reduction of the number of processing cycles in decoding processing of an H.264 variable-length encoded stream.

H.264符号化方式には、適応可変調符号化(CAVLC)と算術符号化(CABAC)の2つのエントロピー符号化が採用されており、これらエントロピー符号化により生成された符号化ストリームの復号プロセスについては、ISO/IEC14496-10規格に記載がある。本発明はこのうちCAVLCに関係するものであり、ここでは、従来のCAVLCの復号プロセスについて説明する。
CAVLCとは、context-based adaptive variable length codingの略であり、入力される符号化ストリーム中の符号化コードと、復号プロセスで得られる復号シンボルを使い参照する復号テーブルの参照先アドレスを適応的に変化させて、符号化ストリーム中の符号化コードを復号していくものである。
The H.264 coding scheme employs two entropy codings, adaptive modulation coding (CAVLC) and arithmetic coding (CABAC), and a decoding process of a coded stream generated by these entropy codings. Is described in the ISO / IEC 14496-10 standard. The present invention relates to CAVLC, and here, a conventional CAVLC decoding process will be described.
CAVLC is an abbreviation for context-based adaptive variable length coding, and adaptively specifies the encoding code in the input encoding stream and the reference address of the decoding table that is referenced using the decoding symbol obtained in the decoding process. By changing, the encoded code in the encoded stream is decoded.

図3Aは、従来の可変長復号装置の一例の構成を示すブロック図である。図3Aを用いて、従来の可変長復号装置における復号プロセスを説明する。300は従来の可変長復号装置、101〜104および305は復号部、106はレベル係数部、308は結合部である。
5つの復号部101〜104、および305は、前段に位置する復号部から順に以下の復号を行う。即ち、復号部101は入力された符号化ストリームのCoeff_token係数のシンボルを復号し、復号部102はTrailing_ones係数シンボルを復号し、復号部103はレベル係数シンボルを復号し、復号部104はTotal_zeros係数シンボルを復号し、復号部305はラン係数のシンボルを復号する。各復号部は、前段の復号プロセスが完了すると、その復号シンボルを使って復号処理が開始できるようになっている。
一連の復号処理は、サブマクロブロック(SMB)と呼ばれる4画素×4画素のブロック単位で行われる。そして、復号部101と復号部102は、それぞれ、上記Coeff_token係数とTotal_zeros係数を1SMBあたりに1回、復号処理する。また復号部103、104および305は、それぞれ、Trailing_ones係数、レベル係数、ラン係数について、入力符号化ストリームに応じ、繰り返し、シンボルの復号処理を行う。従って、1SMBの復号処理を行うには、複数回にわたり復号テーブルにアクセスしなければならない。
FIG. 3A is a block diagram showing a configuration of an example of a conventional variable length decoding device. The decoding process in the conventional variable length decoding device will be described with reference to FIG. 3A. Reference numeral 300 is a conventional variable length decoding device, 101 to 104 and 305 are decoding units, 106 is a level coefficient unit, and 308 is a combining unit.
The five decoding units 101 to 104 and 305 perform the following decoding in order from the decoding unit located in the preceding stage. That is, the decoding unit 101 decodes the Coeff_token coefficient symbol of the input encoded stream, the decoding unit 102 decodes the Trailing_ones coefficient symbol, the decoding unit 103 decodes the level coefficient symbol, and the decoding unit 104 calculates the Total_zeros coefficient symbol. The decoding unit 305 decodes the run coefficient symbols. Each decoding unit can start decoding using the decoded symbol when the preceding decoding process is completed.
A series of decoding processes is performed in units of 4 × 4 pixel blocks called sub-macroblocks (SMB). Then, the decoding unit 101 and the decoding unit 102 respectively decode the Coeff_token coefficient and the Total_zeros coefficient once per SMB. Also, the decoding units 103, 104, and 305 repeatedly perform symbol decoding processing on the Trailing_ones coefficient, the level coefficient, and the run coefficient according to the input encoded stream, respectively. Therefore, in order to perform 1 SMB decoding processing, the decoding table must be accessed multiple times.

図3Aの可変長復号装置300において、符号化ストリームは復号部(Coeff_token復号部)101に入力する。復号部101は、これから復号を開始するSMB内にあるレベル係数の数を示すシンボルTotal_coeffのシンボルの復号処理を実行する。図3BにCoeff_token復号部101の内部機能構成を示す。
Coeff_token復号部101は、符号化ストリームをバッファリングしておくためのストリーム記憶手段120と、シフトレジスタなどで構成されるストリーム供給手段121、ISO/IEC14496-10規格のJVT−G0501に記載があるCoeff_token復号テーブル122、および、復号シンボルを一時記憶するためのTotal_coeff記憶手段123からなる。
In the variable length decoding device 300 of FIG. 3A, the encoded stream is input to the decoding unit (Coeff_token decoding unit) 101. The decoding unit 101 executes a symbol decoding process for the symbol Total_coeff indicating the number of level coefficients in the SMB from which decoding is to start. FIG. 3B shows an internal functional configuration of the Coeff_token decoding unit 101.
The Coeff_token decoding unit 101 includes a stream storage unit 120 for buffering an encoded stream, a stream supply unit 121 including a shift register, and the Coeff_token described in JVT-G0501 of the ISO / IEC 14496-10 standard. It comprises a decoding table 122 and Total_coeff storage means 123 for temporarily storing decoded symbols.

Coeff_token復号部101の処理動作を、図3BのCoeff_token復号部101を用いて説明する。
図3Bにおいて、ストリーム記憶手段120は、符号化ストリームをバッファリングする。ストリーム供給手段121は、ストリーム記憶手段120から、復号する符号化ストリームを取り込み、Coeff_token復号テーブル122に出力する。
Coeff_token復号テーブル122は、入力されたストリームを、先頭ビットから順々にマッチングし、一致すると、対応付けされた値がシンボルとしてTotal_coeffとなる。復号されたTotal_coeffは、SMB内のレベル係数の総数を示すもので、後段の復号部で必要なシンボルである。このため、Total_coeff記憶手段123に出力され、Total_coeff記憶手段123はこのシンボルを記憶する。またこの時、Coeff_token復号テーブル122は、一致した符号化コードのビット長を、消費ビットとして、ストリーム供給手段121に出力(フィードバック)する。
ストリーム供給手段121は、フィードバックされる消費ビット長分、次のストリームの読み出し位置をシフトさせ、符号化ストリームを次の符号化コードの先頭から読み出せるようにしている。
ストリーム供給手段121で、消費ビット長分ストリームがシフトすると、Coeff_token復号部101の処理が完了したとして、Trailing_ones復号部102に処理が移行する。
The processing operation of the Coeff_token decoding unit 101 will be described using the Coeff_token decoding unit 101 in FIG. 3B.
In FIG. 3B, the stream storage unit 120 buffers the encoded stream. The stream supply unit 121 takes in the encoded stream to be decoded from the stream storage unit 120 and outputs it to the Coeff_token decoding table 122.
The Coeff_token decoding table 122 matches the input streams in order from the first bit, and if they match, the associated value becomes Total_coeff as a symbol. The decoded Total_coeff indicates the total number of level coefficients in the SMB, and is a symbol necessary for the subsequent decoding unit. For this reason, it is output to the Total_coeff storage means 123, and the Total_coeff storage means 123 stores this symbol. At this time, the Coeff_token decoding table 122 outputs (feeds back) the bit length of the matching encoded code to the stream supply unit 121 as a consumption bit.
The stream supply means 121 shifts the read position of the next stream by the consumed bit length fed back so that the encoded stream can be read from the head of the next encoded code.
When the stream supply means 121 shifts the stream by the consumed bit length, the processing shifts to the Trailing_ones decoding unit 102 assuming that the processing of the Coeff_token decoding unit 101 is completed.

Trailing_ones復号部102は、上記Total_coeff記憶手段123に一時記憶されたTotal_coeffが示すレベル係数において係数“1”の符号に関するシンボルを復号する復号部で、上記Coeff_token復号部101と同様、復号テーブルを使った処理が行われる。   The Trailing_ones decoding unit 102 is a decoding unit that decodes a symbol related to the code of the coefficient “1” in the level coefficient indicated by Total_coeff temporarily stored in the Total_coeff storage unit 123, and uses a decoding table in the same manner as the Coeff_token decoding unit 101. Processing is performed.

次に、レベル復号部103の処理動作を、図3Cに示すレベル復号部の内部機能ブロック図を用いて説明する。
レベル復号部103は、レベル係数に関する復号処理であり、H.264符号化方式における符号なしゴロム復号にあたる。ここでは、符号なしゴロム復号の一般的な復号方法について説明する。
Next, the processing operation of the level decoding unit 103 will be described using the internal functional block diagram of the level decoding unit shown in FIG. 3C.
The level decoding unit 103 is a decoding process for level coefficients, and corresponds to unsigned Golomb decoding in the H.264 encoding method. Here, a general decoding method of unsigned Golomb decoding will be described.

レベル復号部103は、前述したCoeff_token復号部101と共通のストリーム記憶手段120とストリーム供給手段121を備え、そのほかにプレフィックス復号部130、プレフィックス記憶手段131、サフィックス復号手段133およびレベルコード演算手段132、消費ビット選択手段134を備える。
図3Bと同様に、ストリーム記憶手段120は、符号化ストリームをバッファリングする。ストリーム供給手段121は、ストリーム記憶手段120から、復号する符号化ストリームを取り込み、プレフィックス復号部130とサフィックス復号手段133に出力する。
ストリーム供給手段121からストリーム記憶手段120の符号化ストリームが供給されると、はじめにプレフィックス処理を行う。プレフィックス復号部130は、供給されたストリームを復号テーブルであらかじめ用意されているプレフィックス値に対応したビット列と照合し、プレフィックス値と完全に一致したストリームのビット長を求める。一致したプレフィックス値は、プレフィックス記憶手段131に一時記憶されると共に、ビット長の情報は、消費ビット選択手段134を経由しストリーム供給手段121出力される。
ストリーム供給手段121は、消費ビット選択手段134から入力されてくるビット長分、符号化ストリームをシフトさせ、次のサイクルからサフィックスに対応する符号化コードの復号をスタートさせる。通常は、外部から入力するタイミング信号に基づいて、プレフィックス復号手段130が終了した次のサイクルから、サフィックス復号手段133が有効になるように制御を切り替えている。
一方、サフィックス復号手段133は、プレフィックス記憶手段131に記憶されたプレフィックス値をもとに、供給されてくる符号化ストリームの有効ビットを認識し処理を行う。また、レベルコード演算手段132は、プレフィックス記憶手段131に格納されているプレフィックス復号シンボルと、サフィックス復号手段133で復号された復号シンボルを使い、所定の演算処理を行い、レベル係数を復号結果として出力する。同時にサフィックス復号手段133は、消費したビット長を消費ビット選択手段134に出力する。
消費ビット選択手段134は、上記タイミング信号に従い、有効中の復号手段がプレフィックス復号手段130なのか、サフィックス復号手段133なのかに判断し、入力される消費ビットをストリーム供給手段121へ出力する。1シンボルの復号で、ストリーム供給手段121は、プレフィックスの復号とサフィックスの復号の2回ストリームを読み出さなければならないため、2サイクル必要となる。また、レベル復号部の繰り返し処理は、レベル係数の数に一致し、1SMBあたりの最大復号シンボル数は15係数であるため、レベル復号部103で想定される処理サイクル数は最大30サイクルとなる。なお、符号なしゴロム復号方法については、プレフィックスとサフィックスを同時処理させ、サイクルを短くするための提案もいくつか出ており、一例としては、特許文献1などがある。
The level decoding unit 103 includes a stream storage unit 120 and a stream supply unit 121 that are common to the above-described Coeff_token decoding unit 101. In addition, a prefix decoding unit 130, a prefix storage unit 131, a suffix decoding unit 133, and a level code calculation unit 132, Consumption bit selection means 134 is provided.
Similar to FIG. 3B, the stream storage unit 120 buffers the encoded stream. The stream supply unit 121 takes in the encoded stream to be decoded from the stream storage unit 120 and outputs it to the prefix decoding unit 130 and the suffix decoding unit 133.
When the encoded stream of the stream storage unit 120 is supplied from the stream supply unit 121, prefix processing is first performed. The prefix decoding unit 130 compares the supplied stream with a bit string corresponding to a prefix value prepared in advance in the decoding table, and obtains the bit length of the stream that completely matches the prefix value. The matched prefix value is temporarily stored in the prefix storage unit 131 and the bit length information is output to the stream supply unit 121 via the consumption bit selection unit 134.
The stream supply unit 121 shifts the encoded stream by the bit length input from the consumption bit selection unit 134, and starts decoding of the encoded code corresponding to the suffix from the next cycle. Normally, based on a timing signal input from the outside, the control is switched so that the suffix decoding unit 133 becomes effective from the next cycle after the prefix decoding unit 130 ends.
On the other hand, the suffix decoding unit 133 recognizes the valid bit of the supplied encoded stream based on the prefix value stored in the prefix storage unit 131 and performs processing. Further, the level code calculation unit 132 performs a predetermined calculation process using the prefix decoded symbol stored in the prefix storage unit 131 and the decoded symbol decoded by the suffix decoding unit 133, and outputs a level coefficient as a decoding result. To do. At the same time, the suffix decoding unit 133 outputs the consumed bit length to the consumed bit selecting unit 134.
The consumption bit selection means 134 determines whether the valid decoding means is the prefix decoding means 130 or the suffix decoding means 133 according to the timing signal, and outputs the input consumption bits to the stream supply means 121. In decoding of one symbol, the stream supply means 121 needs to read two streams of prefix decoding and suffix decoding, so two cycles are required. Further, the iterative processing of the level decoding unit matches the number of level coefficients, and the maximum number of decoded symbols per SMB is 15 coefficients. Therefore, the maximum number of processing cycles assumed by the level decoding unit 103 is 30 cycles. As for the unsigned Golomb decoding method, some proposals have been made to shorten the cycle by simultaneously processing the prefix and the suffix, and there is Patent Document 1 as an example.

次に、Total_zeros復号部104の処理動作を、図3Dに示すTotal_zeros復号部の内部機能ブロック図を用いて説明する。復号されるシンボルのTotal_zerosは、4×4のSMBを高周波成分側から逆スキャンした際にもっとも高周波成分側に位置する有意係数からDC成分までの1次元配列において存在するゼロ係数の数を表すものである。図3Dに示すように、上記Coeff_token復号部101と同様に、ストリーム記憶手段120から符号化ストリームをストリーム供給手段121に取り込み、ISO/IEC14496-10規格のJVT−G0501に記載があるTotal_zeros復号テーブル140とのマッチングにより、Total_zerosと一致した符号化ストリームのビット長を求める。   Next, the processing operation of the Total_zeros decoding unit 104 will be described using an internal functional block diagram of the Total_zeros decoding unit shown in FIG. 3D. Total_zeros of the symbol to be decoded represents the number of zero coefficients existing in a one-dimensional array from the significant coefficient located on the high frequency component side to the DC component when 4 × 4 SMB is reverse scanned from the high frequency component side. It is. As shown in FIG. 3D, similar to the Coeff_token decoding unit 101, an encoded stream is fetched from the stream storage unit 120 into the stream supply unit 121, and the Total_zeros decoding table 140 described in JVT-G0501 of the ISO / IEC 14496-10 standard. To obtain the bit length of the encoded stream that matches Total_zeros.

Total_zerosは、Total_zeros記憶手段141に一時記憶され、ビット長は先に説明した各復号部101〜103と共通のストリーム供給手段121へ送られる。ストリーム供給手段121はTotal_zeros復号テーブル140から受け取った消費ビット長分、次のストリームの読み出し位置をシフトさせることにより、次の復号部であるRun_before復号部305では符号化コードの先頭から始まる符号化ストリームを入力できるようになる。
つまり、ストリーム供給手段121が、ストリームを消費ビット数分シフトすると、Total_zeros復号部104の処理は完了となり、Run_before復号部305に処理が移る。1SMBあたりに行うTotal_zeros復号部104の処理が1回であることから、Total_zeros復号部104での処理サイクル回数は1サイクルとなる。
Total_zeros is temporarily stored in the Total_zeros storage unit 141, and the bit length is sent to the stream supply unit 121 common to the decoding units 101 to 103 described above. The stream supply means 121 shifts the read position of the next stream by the consumed bit length received from the Total_zeros decoding table 140, so that the run_before decoding unit 305 that is the next decoding unit starts the encoded stream starting from the beginning of the encoded code. Can be entered.
That is, when the stream supply unit 121 shifts the stream by the number of consumed bits, the processing of the Total_zeros decoding unit 104 is completed, and the processing moves to the Run_before decoding unit 305. Since the total_zeros decoding unit 104 performs one process per SMB, the total number of processing cycles in the total_zeros decoding unit 104 is one cycle.

最後に、Run_before復号部305について説明する。図3Aの可変長復号装置300から最終的に出力される伸張ストリームは、4×4のSMBを高周波成分側から逆スキャンして並べた一次係数列である。
16個の係数列の並びは、入力符号化ストリームにより変動し、先にレベル復号部103にて復号されたシンボルのレベル係数は、この係数列を構成する非ゼロ係数に該当する。例えば、レベル復号部103にて復号されたレベル係数のシンボル数が16個未満のときには、ゼロ係数がこのレベル係数との間に挿入されることになる。つまり、Run_before復号部305は、先にレベル復号部103で復号されたレベル係数とTotal_zeros復号部104で復号されたゼロ係数を配列するためのシンボルを復号し、一次係数列にする際にゼロ係数の挿入位置とその挿入数に関するシンボルとなる。このシンボルを使い結合部308でレベル係数とゼロ係数の配列をおこない最終的な伸張ストリームが出力されることになる。
Finally, the Run_before decoding unit 305 will be described. The expanded stream finally output from the variable length decoding device 300 in FIG. 3A is a primary coefficient sequence in which 4 × 4 SMBs are arranged by reverse scanning from the high frequency component side.
The arrangement of the 16 coefficient sequences varies depending on the input encoded stream, and the level coefficient of the symbol previously decoded by the level decoding unit 103 corresponds to a non-zero coefficient constituting the coefficient sequence. For example, when the number of symbols of the level coefficient decoded by the level decoding unit 103 is less than 16, a zero coefficient is inserted between the level coefficient. That is, the Run_before decoding unit 305 decodes a symbol for arranging the level coefficient previously decoded by the level decoding unit 103 and the zero coefficient decoded by the Total_zeros decoding unit 104 to generate a zero coefficient This is a symbol related to the insertion position and the number of insertions. Using this symbol, the level coefficient and zero coefficient are arranged in the combining unit 308, and a final decompressed stream is output.

Run_before復号部305の内部機能ブロック図を図3Eに示す。Run_before復号部305は、ストリーム記憶手段120、ストリーム供給手段121、アドレス生成手段150、ISO/IEC14496-10規格のJVT−G0501に記載があるRun_before復号テーブル151、およびZeros記憶手段152からなる。
アドレス生成手段150は、ストリーム記憶手段120からストリーム供給手段121に取り込まれた符号化ストリームと、Zeros記憶手段152から入力されるZeros_leftとに基づいて、Run_before復号テーブル151の参照アドレスを決定する。Run_before復号テーブル151は、ゼロ係数の挿入の有無と挿入時の個数を示すシンボルとなるRun_beforeを復号し、Run_before積算手段153および結合部308に出力する。またRun_before復号テーブル151は、消費ビット数をストリーム供給手段121を介してスタート記憶手段120に出力し、スタート記憶手段120に記憶させる。同様に、Run_before積算手段153は、入力されたシンボルRun_beforeを積算し、Zeros記憶手段152に出力し、Zeros記憶手段152のデータを更新する(詳細は後述する)。
An internal functional block diagram of the Run_before decoding unit 305 is shown in FIG. 3E. The Run_before decoding unit 305 includes a stream storage unit 120, a stream supply unit 121, an address generation unit 150, a Run_before decoding table 151 described in JVT-G0501 of the ISO / IEC 14496-10 standard, and a Zeros storage unit 152.
The address generation unit 150 determines a reference address of the Run_before decoding table 151 based on the encoded stream fetched from the stream storage unit 120 to the stream supply unit 121 and Zeros_left input from the Zeros storage unit 152. The Run_before decoding table 151 decodes Run_before, which is a symbol indicating the presence / absence of zero coefficient insertion and the number at the time of insertion, and outputs it to the Run_before integration unit 153 and the combining unit 308. In addition, the Run_before decoding table 151 outputs the number of consumed bits to the start storage unit 120 via the stream supply unit 121 and stores it in the start storage unit 120. Similarly, the Run_before integration unit 153 integrates the input symbol Run_before and outputs it to the Zeros storage unit 152 to update data in the Zeros storage unit 152 (details will be described later).

Run_before復号処理は、アドレス生成手段150に入力されるZeros_leftが更新されゼロになるまで繰り返される。
即ち、Run_before復号部305は、Run_before復号テーブル151にアクセスし、1シンボルずつ復号されるたびに、消費したビット長がRun_before復号テーブル151からストリーム供給手段121に送られ、ストリーム供給手段121にて消費ビット長分、次のストリームの読み出し位置がシフトするようになっている。
また、復号開始時は、Total_zeros復号部104で復号されたシンボルTotal_zerosがZeros_leftの初期値となりRun_before復号テーブル151の参照アドレスを確定する。また、2回目以降は、シンボルを繰り返して復号する際には、復号したシンボルRun_beforeをRun_before積算手段153で累積加算したシンボルZerosを、Zeros記憶手段152に記憶されているシンボルZeros_leftから減算し、減算結果に置き換えて更新したシンボルZeros_leftを使い、Run_before復号テーブル151の参照アドレスを適応的に変えていく。
The Run_before decoding process is repeated until Zeros_left input to the address generation unit 150 is updated to zero.
That is, the Run_before decoding unit 305 accesses the Run_before decoding table 151, and every time one symbol is decoded, the consumed bit length is sent from the Run_before decoding table 151 to the stream supply unit 121 and consumed by the stream supply unit 121. The read position of the next stream is shifted by the bit length.
At the start of decoding, the symbol Total_zeros decoded by the Total_zeros decoding unit 104 becomes the initial value of Zeros_left, and the reference address of the Run_before decoding table 151 is determined. In addition, when the symbol is repeatedly decoded after the second time, the symbol Zeros obtained by accumulating the decoded symbol Run_before by the Run_before accumulating unit 153 is subtracted from the symbol Zeros_left stored in the Zeros storage unit 152 and subtracted. The symbol Zeros_left updated and replaced with the result is used to adaptively change the reference address of the Run_before decoding table 151.

従来のRun_before復号テーブル151の一例を図4に示す。図4を用いて、従来例として、具体的に入力符号化ストリームを“10010000・・・”、Total_zeros=“7”とした場合の復号処理について説明する。
上述のように、復号開始時は、Total_zerosの値がZeros_leftの初期値になる。そして、ストリーム供給手段121から供給されるビット列の先頭が“100・・”である。このことから、図4のRun_before復号テーブルで復号される最初のシンボルRun_before(0)の値は“3”となる。一方、復号結果のRun_before(0)値は、Run_before積算手段153にも出力され、累積加算されたZerosが後段のZeros記憶手段152に出力される。Zeros記憶手段152は、入力されたZerosをTotal_zerosの値から減算し、この減算結果(=“7”−“3”)をあらたなZeros_leftとして記憶する。Zeros_left≠”0”であることから2回目の復号処理が始まる。
引き続き行われる2番目のシンボルRun_before(1)の復号は、Zeros_left=“4”、ストリーム供給手段121で消費ビット分シフトされ“10”からビット列がはじまることから、Run_before(1)=“1”となる。また、同時にZeros記憶手段152のZeros_leftは“3”(=“4”−“1”)に更新される。
以下同様、3番目のRun_before(2)の値の復号については、Zeros_left=“3”、ストリーム供給手段121で消費ビット分シフトされ“00”からビット列がはじまることから、Run_before(2)=“3”となる。また、Zeros記憶手段152のZeros_leftは“0”(=“3”−“3”)となる。上記一連の処理を繰り返し、Zeros_leftが“0”になると同時にRun_beforeに関する復号が完了する。
上記例では、Zeros_left が“0”になるまでに3つのシンボルRun_before(0)、Run_before(1)、Run_before(2)が復号され、Run_before復号テーブル151に3回のサイクルかかったことを意味する。
An example of a conventional Run_before decoding table 151 is shown in FIG. As a conventional example, a decoding process when the input encoded stream is specifically “10010000...” And Total_zeros = “7” will be described with reference to FIG.
As described above, when decoding starts, the value of Total_zeros becomes the initial value of Zeros_left. The head of the bit string supplied from the stream supply means 121 is “100...”. Therefore, the value of the first symbol Run_before (0) decoded in the Run_before decoding table of FIG. 4 is “3”. On the other hand, the Run_before (0) value of the decoding result is also output to the Run_before integration unit 153, and the accumulated zeros are output to the subsequent Zeros storage unit 152. The Zeros storage unit 152 subtracts the input Zeros from the value of Total_zeros, and stores this subtraction result (= “7” − “3”) as a new Zeros_left. Since Zeros_left ≠ “0”, the second decoding process starts.
In the subsequent decoding of the second symbol Run_before (1), Zeros_left = “4”, shifted by the consumption bit by the stream supply means 121, and the bit string starts from “10”, so Run_before (1) = “1”. Become. At the same time, Zeros_left in the Zeros storage unit 152 is updated to “3” (= “4” − “1”).
Similarly, for decoding of the third value of Run_before (2), Zeros_left = “3”, the bit is shifted by the consumption bit by the stream supply means 121, and the bit string starts from “00”. Therefore, Run_before (2) = “3” " In addition, Zeros_left of the Zeros storage unit 152 is “0” (= “3” − “3”). The above-described series of processing is repeated, and at the same time Zeros_left becomes “0”, decoding regarding Run_before is completed.
In the above example, three symbols Run_before (0), Run_before (1), and Run_before (2) are decoded until Zeros_left becomes “0”, which means that the Run_before decoding table 151 has taken three cycles.

特開2007−60199号公報JP 2007-60199 A

上述した説明のように、4×4のSMBの伸張処理では、5つの復号部において若しくは5つの復号プロセスを経て、必要なシンボルを復号する。このときの各復号部若しくは各復号プロセスに必要な処理サイクル数は、Coeff_token復号部101、および、Total_zeros復号部104で1サイクルずつ、それ以外の復号部においては、入力符号化ストリームによって変動するものの、テーブルアクセス回数から換算した最大のサイクル数は、Trailing_ones復号部102で3サイクル、レベル復号部103で30サイクル、Run_before復号部305で14サイクルとなる。
従って、従来の構成では、1SMBの符号化ストリームを復号処理するには最大で約50サイクル必要であることになる。特に、従来のRun_before復号部305の処理においては、レベル係数とゼロ係数が隣接するかどうかを、Run_beforeの復号結果をもとに、高周波成分側にあるレベル係数から1レベル係数ずつ順にチェックしていかねばならず、レベル係数が連続し、ゼロ係数が隣接しない場合であっても、「レベル係数の隣にゼロ係数はない」ということをシンボルとして復号しなければならない。このため、Run_before復号テーブル151へのアクセス回数がレベル係数の数だけ発生し、サイクル数が長くなるという問題があった。
そこで、本発明は、Run_before復号部305における、上記問題を解決し、1SMBあたりの処理に要するサイクル数を低減することを目的とする。具体的には、H.264可変長復号処理のRun_before復号処理おいて、非ゼロ係数(レベル係数)とゼロ係数との並び関係を示すラン係数に加え、単位ブロック中にあるゼロ係数の総数(Total_Zeros)からラン係数を減算したZerosシンボルと、連続してならぶレベル係数の数を示すSkipシンボルを出力するルックアップテーブルを使い、復号処理を行い、1SMBあたりのサイクル数を短くすることを目的とする。
As described above, in 4 × 4 SMB decompression processing, necessary symbols are decoded by five decoding units or through five decoding processes. The number of processing cycles necessary for each decoding unit or each decoding process at this time is one cycle at each of the Coeff_token decoding unit 101 and the Total_zeros decoding unit 104, and other decoding units vary depending on the input encoded stream. The maximum number of cycles converted from the number of table accesses is 3 cycles in the Trailing_ones decoding unit 102, 30 cycles in the level decoding unit 103, and 14 cycles in the Run_before decoding unit 305.
Therefore, in the conventional configuration, about 50 cycles are required at the maximum to decode the encoded stream of 1 SMB. In particular, in the processing of the conventional Run_before decoding unit 305, whether or not the level coefficient and the zero coefficient are adjacent to each other is checked in order from the level coefficient on the high frequency component side, one level coefficient based on the Run_before decoding result. Even if the level coefficient is continuous and the zero coefficient is not adjacent, it must be decoded as a symbol that “there is no zero coefficient next to the level coefficient”. Therefore, there is a problem that the number of accesses to the Run_before decoding table 151 occurs as many as the number of level coefficients, and the number of cycles becomes long.
Therefore, an object of the present invention is to solve the above problem in the Run_before decoding unit 305 and reduce the number of cycles required for processing per 1 SMB. Specifically, in the Run_before decoding process of the H.264 variable length decoding process, in addition to the run coefficient indicating the alignment relationship between the non-zero coefficient (level coefficient) and the zero coefficient, the total number of zero coefficients ( Total_Zeros) The purpose is to reduce the number of cycles per SMB by using a lookup table that outputs Zeros symbols obtained by subtracting run coefficients and Skip symbols indicating the number of consecutive level coefficients. To do.

上記の課題を解決するために、本発明の可変長符号装置は、符号化ストリームを入力し、Coeff_token係数のシンボルを復号するCoeff_token復号部と、Trailing_ones係数シンボルを復号するTrailing_ones復号部と、レベル係数シンボルを復号するレベル復号部と、Total_zeros係数シンボルを復号するTotal_zeros復号部と、前記レベル係数とゼロ係数が隣接するかどうかの判断を、高周波成分側にあるレベル係数から順にRun_beforeを復号することなく前記ゼロ係数が配列される位置とその配列個数が特定できるように復号ルックアップテーブルの最適化を行うRun_before復号部と、レベル係数部と、結合情報記憶部と、結合部を有したことを特徴とし、処理にかかるサイクル数を短縮するものである。   In order to solve the above problems, the variable length coding apparatus of the present invention receives a coded stream, decodes a Coeff_token coefficient symbol, a Coeff_token decoding unit, a Trailing_ones decoding unit that decodes a Trailing_ones coefficient symbol, and a level coefficient A level decoding unit that decodes a symbol, a Total_zeros decoding unit that decodes a Total_zeros coefficient symbol, and whether or not the level coefficient and the zero coefficient are adjacent to each other without decoding Run_before sequentially from the level coefficient on the high frequency component side A Run_before decoding unit that optimizes a decoding lookup table so that the position where the zero coefficients are arranged and the number of the zero coefficients can be specified, a level coefficient unit, a combined information storage unit, and a combining unit are included. The number of cycles required for processing is shortened.

上記の課題を解決するために、本発明の可変長符号装置は、H.264可変長復号装置の復号処理において、参照する復号テーブルへのアクセス回数を減らし、単位ブロックあたりの復号処理サイクル数を短縮することを特徴とする。
H.264可変長復号処理のRun_before復号処理おいて、非ゼロ係数(レベル係数)とゼロ係数との並び関係を示すラン係数に加え、単位ブロック中にあるゼロ係数の総数(Total_Zeros)からラン係数を減算したZerosシンボルと、連続して並ぶレベル係数の数を示すSkipシンボルを出力する復号ルックアップテーブルを使い、復号処理を行うことを特徴とする。
In order to solve the above problems, the variable length coding apparatus of the present invention reduces the number of accesses to a decoding table to be referenced in the decoding process of the H.264 variable length decoding apparatus, and reduces the number of decoding processing cycles per unit block. It is shortened.
In the Run_before decoding process of the H.264 variable length decoding process, in addition to the run coefficient indicating the alignment relationship between the non-zero coefficient (level coefficient) and the zero coefficient, the run coefficient is calculated from the total number of zero coefficients (Total_Zeros) in the unit block. The decoding process is performed using a decoding look-up table that outputs a Zeros symbol obtained by subtracting 0 and a Skip symbol indicating the number of level coefficients arranged in succession.

H.264可変長復号処理のRun_before復号処理おいて、復号されるTotal_zerosに応じ、適応的に処理サイクル数を減らし、復号ルックアップテーブルへのアクセス回数を減らし消費電力を下げることを特徴とした可変長復号装置。   In the Run_before decoding process of the H.264 variable length decoding process, the variable is characterized by adaptively reducing the number of processing cycles according to the total_zeros to be decoded, reducing the number of accesses to the decoding lookup table, and reducing power consumption. Long decoding device.

本発明によれば、H.264可変長復号処理のRun_before復号処理おいて、復号ルックアップテーブルの最適化を行うことにより、ルックアップテーブルへのアクセス回数を減らしこれまで最大14サイクルかかっていた復号処理サイクルを1サイクルに短縮することができる。   According to the present invention, in the Run_before decoding process of the H.264 variable length decoding process, the decoding look-up table is optimized to reduce the number of accesses to the look-up table. The processing cycle can be shortened to one cycle.

本発明における可変長復号装置の一実施例の構成を示すブロック図である。It is a block diagram which shows the structure of one Example of the variable-length decoding apparatus in this invention. 本発明の可変長復号装置のRun_before復号部の一実施例の内部機能ブロックを示す図である。It is a figure which shows the internal function block of one Example of the Run_before decoding part of the variable-length decoding apparatus of this invention. 従来の可変長復号装置の一実施例の構成を示すブロック図である。It is a block diagram which shows the structure of one Example of the conventional variable length decoding apparatus. 従来のCoeff_token復号部の内部機能構成を示すブロック図である。It is a block diagram which shows the internal function structure of the conventional Coeff_token decoding part. 従来のレベル復号部の内部機能ブロック図である。It is an internal functional block diagram of the conventional level decoding part. 従来のTotal_zeros復号部の内部機能ブロック図である。It is an internal functional block diagram of the conventional Total_zeros decoding part. 従来のRun_before復号部の内部機能ブロック図である。It is an internal functional block diagram of the conventional Run_before decoding part. 従来のRun_before復号テーブルである。It is a conventional Run_before decoding table. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention. 本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。It is a figure which shows one Example of the decoding lookup table in the variable-length decoding apparatus of this invention.

以下に本発明の一実施形態を図面等を用いて説明する。なお、以下の説明は、本発明の一実施形態を説明するためのものであり、本願発明の範囲を制限するものではない。従って、当業者であればこれらの各要素若しくは全要素をこれと均等なものに置換した実施形態を採用することが可能であり、これらの実施形態も本願発明の範囲に含まれる。
また、本書では、既に説明した図3A〜図3E、および図4を含め、以降の各図の説明において、共通な機能を有する構成要素には同一の参照番号を付し、説明を省略する。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings. In addition, the following description is for describing one embodiment of the present invention, and does not limit the scope of the present invention. Accordingly, those skilled in the art can employ embodiments in which these elements or all of the elements are replaced with equivalent ones, and these embodiments are also included in the scope of the present invention.
In addition, in this document, in the following description of each drawing including FIGS. 3A to 3E and FIG. 4 described above, the same reference numerals are assigned to components having common functions, and the description thereof is omitted.

図1は、本発明における可変長復号装置の一実施例の構成を示すブロック図である。図1を用いて、本発明の可変長復号装置における復号プロセスの一実施例を説明する。100は本発明の可変長復号装置、105は復号部(Run_before復号部)、107は結合情報記憶部、108は結合部である。図1の可変長復号装置100は、従来の可変長復号装置300と比較し(図3A参照)、復号部305の替わりに復号部105を設け、結合部308の替わりに結合部108を設け、復号部105と結合部108の間に結合情報記憶部107を設けたものである。   FIG. 1 is a block diagram showing a configuration of an embodiment of a variable length decoding device according to the present invention. An embodiment of a decoding process in the variable length decoding device of the present invention will be described with reference to FIG. 100 is a variable length decoding device of the present invention, 105 is a decoding unit (Run_before decoding unit), 107 is a combined information storage unit, and 108 is a combining unit. The variable length decoding device 100 of FIG. 1 is provided with a decoding unit 105 instead of the decoding unit 305 and a combining unit 108 instead of the combining unit 308, as compared with the conventional variable length decoding device 300 (see FIG. 3A). A combined information storage unit 107 is provided between the decoding unit 105 and the combining unit 108.

5つの復号部101〜105は、上位に位置する復号部から順に、Coeff_token係数、Trailing_ones係数、レベル係数、Total_zeros係数、ラン係数の各シンボルを復号する。各復号部101〜105は、上位の復号プロセスが完了すると、その復号シンボルを使って復号処理が開始できるようになっている点は、従来の復号プロセスと変わらず、復号部101〜104、レベル係数記憶部106に関しては、従来の図3Aの可変長復号装置300のものと、構成および機能とも全く同じである。従ってここでは、従来と異なるRun_before復号部105と、結合記憶部107および結合部108について説明する。   The five decoding units 101 to 105 decode the symbols of the Coeff_token coefficient, the Trailing_ones coefficient, the level coefficient, the Total_zeros coefficient, and the run coefficient in order from the decoding unit located at the upper level. Each decoding unit 101-105, when the upper decoding process is completed, the decoding process can be started using the decoded symbol, the same as the conventional decoding process, the decoding units 101-104, level The coefficient storage unit 106 has the same configuration and function as those of the conventional variable length decoding device 300 in FIG. 3A. Therefore, here, the Run_before decoding unit 105, the combination storage unit 107, and the combination unit 108 which are different from the conventional one will be described.

はじめに、図2を用いて、本発明におけるRun_before復号部105の構成および動作について説明する。図2は、本発明の可変長復号装置のRun_before復号部105の一実施例の内部機能ブロックを示す図である。251はRun_before復号ルックアップテーブル、252はZeros_left選択手段、253はZeros_left記憶手段である。図2のRun_before復号部105は、従来のRun_before復号部305と比較し(図3E参照)、ISO/IEC14496-10規格のJVT−G0501に記載があるRun_before復号テーブル151の替わりにRun_before復号ルックアップテーブル251を設け、Zeros_left選択手段152の替わりにZeros_left選択手段252を設け、Zeros_left積算手段153の替わりにZeros_left記憶手段253を設けたものである。   First, the configuration and operation of the Run_before decoding unit 105 according to the present invention will be described with reference to FIG. FIG. 2 is a diagram showing internal function blocks of an embodiment of the Run_before decoding unit 105 of the variable length decoding device of the present invention. 251 is a Run_before decoding lookup table, 252 is Zeros_left selection means, and 253 is Zeros_left storage means. The Run_before decoding unit 105 in FIG. 2 is compared with the conventional Run_before decoding unit 305 (see FIG. 3E), and instead of the Run_before decoding table 151 described in JVT-G0501 of the ISO / IEC 14496-10 standard, the Run_before decoding lookup table 251 is provided, a Zeros_left selection unit 252 is provided instead of the Zeros_left selection unit 152, and a Zeros_left storage unit 253 is provided instead of the Zeros_left integration unit 153.

図2の実施例において、ストリーム記憶手段120、ストリーム供給手段121、および、アドレス生成手段150については従来と変わらない。そして、Zeros_left選択手段252、Run_before復号ルックアップテーブル251、およびZeros_left記憶手段253が、本発明の特徴となる部分である。
ストリーム記憶手段120からストリーム供給手段121に取り込んだ符号化ストリーム、および、Zeros_left選択手段252に記憶されているZeros_leftが、アドレス生成手段150に入力され、Run_before復号ルックアップテーブル251の参照アドレスを生成する。
Run_before復号ルックアップテーブル251は、従来の復号テーブルとインタフェースは変わらず、Zeros_leftに応じてRun_beforeの復号テーブルが変わる点は同じである。ただし、本発明のRun_before復号ルックアップテーブル251は、従来の復号テーブルを、最適化し、符号化ストリームとのマッチングを行う際に、符号化ストリームの先頭から連続して並ぶ“1”のビット列に着目し、全ビットサーチを行う。この結果、従来のRun_before復号テーブル151と異なり、Run_before値に加え、一致コードに対応付けられた、レベル係数とゼロ係数の並びを示すSkip値、および、新zeos_leftを同時に復号結果として出力することができる。
In the embodiment of FIG. 2, the stream storage means 120, the stream supply means 121, and the address generation means 150 are the same as in the prior art. The Zeros_left selection unit 252, the Run_before decoding lookup table 251, and the Zeros_left storage unit 253 are the parts that characterize the present invention.
The encoded stream fetched from the stream storage unit 120 to the stream supply unit 121 and Zeros_left stored in the Zeros_left selection unit 252 are input to the address generation unit 150 to generate a reference address of the Run_before decoding lookup table 251. .
The Run_before decoding lookup table 251 has the same interface as the conventional decoding table, but is the same in that the Run_before decoding table changes according to Zeros_left. However, the Run_before decoding lookup table 251 of the present invention focuses on a bit string of “1” continuously arranged from the head of the encoded stream when the conventional decoding table is optimized and matched with the encoded stream. And perform all bit search. As a result, unlike the conventional Run_before decoding table 151, in addition to the Run_before value, the Skip value indicating the arrangement of the level coefficient and the zero coefficient and the new zeos_left, which are associated with the matching code, can be output simultaneously as a decoding result. it can.

図5A〜図5Xを用いて、本発明の復号ルックアップテーブルの一実施例を説明する。図5A〜図5Xは、本発明の可変長復号装置における復号ルックアップテーブルの一実施例を示す図である。
図5A〜図5X、復号ルックアップテーブル入力されるZeros_leftに応じて分類し、Zeros_left=1からZeros_left=14までの14種類のテーブルを持つ。また、1サイクルで参照する符号ストリームの最大ビット幅は、符号化ストリームの先頭から25ビットであり、この25ビットにおける“1”、“0”の並びに対応付けられた次の3つのシンボル、Skip、Run_before、Next_Zeros_leftがアクセスのたびに同時に出力される。
ここで、Skipとは復号されたレベル係数が複数ある場合に、これらレベル係数が連続した係数列になるかどうかを意味するシンボルであり、Skip=“0”の時は、レベル係数は連続して並ばず、このとき同時に復号されたRun_beforeが示す数だけゼロ係数がこの間挿入されることを意味する。
また、復号シンボルのNext_Zeros_leftは、Run_beforeの復号において、次のサイクルが必要かを判断するためのシンボルであり、Zeros_leftから、Run_beforeを減算した値があらかじめ、Next_Zeros_leftに割り当てられており、Next_Zeros_left=“0”となるまでRun_before復号処理が繰り返される。
An embodiment of the decoding lookup table of the present invention will be described with reference to FIGS. 5A to 5X. 5A to 5X are diagrams showing an example of a decoding lookup table in the variable length decoding device of the present invention.
5A to 5X, the decoding lookup table is classified according to the input Zeros_left, and has 14 types of tables from Zeros_left = 1 to Zeros_left = 14. Also, the maximum bit width of the code stream referred to in one cycle is 25 bits from the head of the encoded stream, and the next three symbols, “1” and “0” in the 25 bits, and the next three symbols, Skip , Run_before and Next_Zeros_left are output at the same time every access.
Here, “Skip” is a symbol indicating whether or not these level coefficients become a continuous coefficient sequence when there are a plurality of decoded level coefficients. When Skip = “0”, the level coefficients are continuous. This means that zero coefficients are inserted during this time as many times as indicated by Run_before decoded at the same time.
The decoded symbol Next_Zeros_left is a symbol for determining whether or not the next cycle is necessary in the decoding of Run_before. A value obtained by subtracting Run_before from Zeros_left is assigned to Next_Zeros_left in advance, and Next_Zeros_left = “0”. The Run_before decoding process is repeated until “

一方、Next_Zeros_left≠“0”の場合には、Run_before復号ルックアップテーブル251は、Zeros_left記憶手段253に、上記Next_Zeros_left値を出力し、Zeros_left記憶手段253は、入力された上記Next_Zeros_left値を記憶する。また同時に、Run_before復号ルックアップテーブル251は、Run_before復号ルックアップテーブル251で消費したビット長を、ストリーム供給手段121に出力する。そして、消費ビット長分、読み出し位置がシフトした次の符号化ストリームが、ストリーム供給手段121から供給される際に、Zeros_left記憶手段253に記憶された上記Next_Zeros_left値は、Zeros_left選択手段252を経由し、新たなZeros_leftとして出力される。
Run_before復号処理により復号されたSkip、Run_before、Next_Zeros_leftのシンボルは、後段の結合情報記憶部107に記憶される。
最後に、結合部108は、上記結合情報記憶部107の結果と照らし合わせて、レベル係数記憶部106に記憶されているレベル係数に、ゼロ係数を挿入し一次元の係数列に結合した伸張ストリームを出力する。
On the other hand, when Next_Zeros_left ≠ “0”, the Run_before decoding lookup table 251 outputs the Next_Zeros_left value to the Zeros_left storage unit 253, and the Zeros_left storage unit 253 stores the input Next_Zeros_left value. At the same time, the Run_before decoding lookup table 251 outputs the bit length consumed by the Run_before decoding lookup table 251 to the stream supply unit 121. Then, when the next encoded stream whose read position is shifted by the consumed bit length is supplied from the stream supply unit 121, the Next_Zeros_left value stored in the Zeros_left storage unit 253 passes through the Zeros_left selection unit 252. And output as a new Zeros_left.
The Skip, Run_before, and Next_Zeros_left symbols decoded by the Run_before decoding process are stored in the subsequent combination information storage unit 107.
Finally, the combining unit 108 inserts a zero coefficient into the level coefficient stored in the level coefficient storage unit 106 in comparison with the result of the combined information storage unit 107, and combines it with a one-dimensional coefficient sequence. Is output.

以下、上記実施例を、従来復号テーブルを使ったRun_before復号処理に比べて、Run_before復号処理の処理リサイクル数を比較してみる。
4×4のSMBにおいて、すでにレベル係数復号部103で復号されたレベル係数が15ヶあり、Total_zeros=“1”で、入力符号化ストリームが“11111111111110・・・・”というケースを説明する。
従来技術で説明したように、復号開始時には、Total_zerosの値がZeros_leftの初期値になっている。そして、ストリーム供給手段121から供給されるビット列の先頭が“1・・”であることから、図4のRun_before復号テーブルで復号される最初のシンボルRun_before(0)の値は“0”となる。
Hereinafter, compared with the Run_before decoding process using the conventional decoding table, the above embodiment is compared with the process recycle number of the Run_before decoding process.
In the 4 × 4 SMB, there are 15 level coefficients that have already been decoded by the level coefficient decoding unit 103, Total_zeros = “1”, and the input encoded stream is “11111111111110...”.
As described in the related art, when decoding is started, the value of Total_zeros is the initial value of Zeros_left. Since the head of the bit string supplied from the stream supply means 121 is “1...”, The value of the first symbol Run_before (0) decoded in the Run_before decoding table of FIG.

一方、復号結果のRun_before(0)値は、Run_before積算手段153にも送られ、累積加算されたZerosが後段のZeros記憶手段152に渡される。Zeros記憶手段152は、入力されたZerosをTotal_zerosの値から減算し、この減算結果(=“1”−“0”)をあらたなZeros_leftとして記憶する。Zeros_left≠“0”であることから2回目の復号処理が始まる。引き続き行われる2番目のシンボルRun_before(1)の復号は、Zeros_left=“1”、ストリーム供給手段121で消費ビット分シフトされ再び“1・・”からはじまることから、Run_before(1)=“0”となる。また、同時にZeros記憶手段152のZeros_leftは、“1”(=“1”−“0”)に更新される。   On the other hand, the Run_before (0) value of the decoding result is also sent to the Run_before integration unit 153, and the accumulated zeros are transferred to the subsequent zeros storage unit 152. The Zeros storage unit 152 subtracts the input Zeros from the value of Total_zeros, and stores this subtraction result (= “1” − “0”) as a new Zeros_left. Since Zeros_left ≠ “0”, the second decoding process starts. The subsequent decoding of the second symbol Run_before (1) is Zeros_left = “1”, shifted by the consumption bit by the stream supply means 121 and starts again from “1...”, So Run_before (1) = “0” It becomes. At the same time, Zeros_left of the Zeros storage unit 152 is updated to “1” (= “1” − “0”).

入力符号化ストリームにおいて、以降も“1”が“111111111110・・・・”と11ヶ続くため、同様にRun_before(2)=“0”、Run_before(3)=“0”、Run_before(4)=“0”、・・・・Run_before(12)=“0”、となり13回、復号テーブルにアクセスした後、入力符号化ストリームの先頭ビットが“0・・・”となり、Run_before(13)=“1”となり、Run_before積算手段153に送られ、累積加算されたZerosが“1”と変わって、後段のZeros記憶手段152に渡される。Zeros記憶手段152は、入力されたZerosをTotal_zerosの値から減算し、この結果、Zeros_left=“0”(=“1”−“1”)となり、Run_beforeの復号処理が終了する。この間、14ケの復号シンボル(Run_before(0)〜Run_before(13))を復号し、結果的に復号までに14サイクル要する。   In the input encoded stream, since “1” continues 11 times “111111111110...”, Run_before (2) = “0”, Run_before (3) = “0”, Run_before (4) = “0”,... Run_before (12) = “0” and 13 times after accessing the decoding table, the first bit of the input encoded stream becomes “0...” And Run_before (13) = “ 1 ”is sent to the Run_before integrating unit 153, and the accumulated zeros are changed to“ 1 ”and transferred to the subsequent Zeros storage unit 152. The Zeros storage unit 152 subtracts the input Zeros from the value of Total_zeros. As a result, Zeros_left = “0” (= “1” − “1”), and the Run_before decoding process ends. During this time, 14 decoded symbols (Run_before (0) to Run_before (13)) are decoded, and as a result, 14 cycles are required until decoding.

一方、本発明における復号ルックアップテーブルを使った場合、Zeros_left=1からZeros_left=14まである4種類のテーブルのうち、Zeros_left=1の復号ルックアップテーブルを参照することになる。この結果、符号ストリームを先頭ビットからパターン検索し、全ビットパターンがマッチする符号列“11111111111110・・・・”を1サイクルで見つけ出し、Skip=“13”、Run_before=“1”、Next_Zeros_left=“0”を復号する。Next_Zeros_left=“0”であることから、Run_before復号処理は終了する。また、このシンボルを用い、結合部4は、Skipシンボルと同数(=13ヶ)、レベル係数が連続した後に、Run_beforeシンボルと同数(=0ヶ)、ゼロ系数が挿入された係数列に結合が可能となる。   On the other hand, when the decoding lookup table in the present invention is used, the decoding lookup table with Zeros_left = 1 is referred to among the four types of tables from Zeros_left = 1 to Zeros_left = 14. As a result, the code stream is pattern-searched from the first bit, the code string “11111111111110...” That matches all the bit patterns is found in one cycle, Skip = “13”, Run_before = “1”, Next_Zeros_left = “0” "Is decrypted. Since Next_Zeros_left = “0”, the Run_before decoding process ends. In addition, using this symbol, the combining unit 4 combines the same number (= 13) of Skip symbols with the same number (= 0) of Run_before symbols and the coefficient sequence in which zero coefficients are inserted after level coefficients are continuous. It becomes possible.

以上説明したように、上記実施例によれば、H.264可変長復号処理のRun_before復号処理おいて、復号ルックアップテーブルの最適化を行うことにより、ルックアップテーブルへのアクセス回数を減らしこれまで最大14サイクルかかっていた復号処理サイクルを1サイクルに短縮することができる。   As described above, according to the above-described embodiment, the number of accesses to the lookup table is reduced by optimizing the decoding lookup table in the Run_before decoding process of the H.264 variable length decoding process. It is possible to shorten the decryption processing cycle, which took 14 cycles at the maximum, to 1 cycle.

101〜105:復号部、 106:レベル係数部、 107:結合記憶部、 108:結合部、 120:ストリーム記憶手段、 121:ストリーム供給手段、 122:Coeff_token復号テーブル、 123:Total_coeff記憶手段、 300:従来の可変長復号装置、 305:復号部、 308:結合部、 130:プレフィックス復号部、 131:プレフィックス記憶手段、 132:レベルコード演算手段、 133:サフィックス復号手段、 134:消費ビット選択手段、 150:アドレス生成手段、 151:Run_before復号テーブル、 152:Zeros記憶手段、 153:Run_before積算手段、 251:Run_before復号ルックアップテーブル、 252:Zeros_left選択手段、 253:Zeros_left記憶手段。   101: 105: decoding unit, 106: level coefficient unit, 107: combination storage unit, 108: combination unit, 120: stream storage unit, 121: stream supply unit, 122: Coeff_token decoding table, 123: Total_coeff storage unit, 300: Conventional variable length decoding device, 305: decoding unit, 308: combining unit, 130: prefix decoding unit, 131: prefix storage unit, 132: level code calculation unit, 133: suffix decoding unit, 134: consumption bit selection unit, 150 : Address generation means, 151: Run_before decoding table, 152: Zeros storage means, 153: Run_before integration means, 251: Run_before decoding lookup table, 252: Zeros_left selection means, 253: Zeros_left storage means.

Claims (1)

符号化ストリームを入力し、Coeff_token復号部と、Trailing_ones復号部と、レベル復号部と、Total_zeros復号部と、前記レベル係数とゼロ係数が隣接するかどうかの判断を、高周波成分側にあるレベル係数から順にRun_beforeを復号することなく前記ゼロ係数が配列される位置とその配列個数が特定できるように復号ルックアップテーブルの最適化を行うRun_before復号部と、レベル係数部と、結合情報記憶部と、結合部を有したことを特徴とする可変長復号装置。   The encoded stream is input, and the Coeff_token decoding unit, the Trailing_ones decoding unit, the level decoding unit, the Total_zeros decoding unit, and whether the level coefficient and the zero coefficient are adjacent to each other are determined from the level coefficient on the high frequency component side. A Run_before decoding unit that optimizes a decoding look-up table so that the position where the zero coefficients are arranged and the number of arrangements thereof can be identified without sequentially decoding Run_before, a level coefficient unit, a combined information storage unit, and a combination A variable-length decoding device characterized by comprising a unit.
JP2010054446A 2010-03-11 2010-03-11 Variable length decoding apparatus Pending JP2011188431A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010054446A JP2011188431A (en) 2010-03-11 2010-03-11 Variable length decoding apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010054446A JP2011188431A (en) 2010-03-11 2010-03-11 Variable length decoding apparatus

Publications (1)

Publication Number Publication Date
JP2011188431A true JP2011188431A (en) 2011-09-22

Family

ID=44794138

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010054446A Pending JP2011188431A (en) 2010-03-11 2010-03-11 Variable length decoding apparatus

Country Status (1)

Country Link
JP (1) JP2011188431A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006287862A (en) * 2005-04-05 2006-10-19 Canon Inc Decoder
JP2007329903A (en) * 2006-05-11 2007-12-20 Matsushita Electric Ind Co Ltd Variable length decoding device, variable length decoding method and imaging system
JP2008034920A (en) * 2006-07-26 2008-02-14 Sony Corp Decoding method, program for decoding method, recording medium for recording the program for the decoding method, and decoding apparatus
JP2008227946A (en) * 2007-03-13 2008-09-25 Toshiba Corp Image decoding apparatus
JP2009296200A (en) * 2008-06-04 2009-12-17 Renesas Technology Corp Variable length decoder and moving image decoder using the same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006287862A (en) * 2005-04-05 2006-10-19 Canon Inc Decoder
JP2007329903A (en) * 2006-05-11 2007-12-20 Matsushita Electric Ind Co Ltd Variable length decoding device, variable length decoding method and imaging system
JP2008034920A (en) * 2006-07-26 2008-02-14 Sony Corp Decoding method, program for decoding method, recording medium for recording the program for the decoding method, and decoding apparatus
JP2008227946A (en) * 2007-03-13 2008-09-25 Toshiba Corp Image decoding apparatus
JP2009296200A (en) * 2008-06-04 2009-12-17 Renesas Technology Corp Variable length decoder and moving image decoder using the same

Similar Documents

Publication Publication Date Title
JP4886755B2 (en) Context-adaptive binary arithmetic encoding and decoding system and method
KR100717055B1 (en) Method of decoding bin values using pipeline architecture, and decoding apparatus therefor
KR100717052B1 (en) Method of decoding syntax element in cabac decoder with parallel processing of binary arithmetic decoding and binarization matching, and decoding apparatus therefor
JP6195997B2 (en) Data source encoding / decoding method and apparatus with symbol compression
JP6134055B2 (en) Data encoding and decoding
US7079057B2 (en) Context-based adaptive binary arithmetic coding method and apparatus
KR100750165B1 (en) Cabac encoding method and apparatus using improved context model selection with better compression ratio, and cabac decoding method and apparatus
US7898445B2 (en) Entropy coding apparatus
US7119723B1 (en) Decoding variable length codes while using optimal resources
US8094048B2 (en) Method of decoding syntax element in context-based adaptive binary arithmetic coding decoder and decoding device therefor
US20140286417A1 (en) Data encoding and decoding
US9001882B2 (en) System for entropy decoding of H.264 video for real time HDTV applications
JP2017507590A5 (en)
US20080100479A1 (en) Decoding apparatus and decoding method
US20100195739A1 (en) Adaptive canonical huffman decoder and method thereof and video decoder
JP2008289125A (en) Arithmetic decoding apparatus and method thereof
JP2009534886A5 (en)
JPH1065549A (en) Device for determining length of variable length encoded data value, device for decoding data stream of variable length encoded data value, and method for determining length of variable length encoded data value
JP2008227946A (en) Image decoding apparatus
US7348901B2 (en) Method and system for decoding variable length encoded signals, computer program product therefor
JP2008118303A (en) Decoding device and decoding method
US20080198046A1 (en) Variable length code decoding apparatus and variable length code decoding method
JP2011188431A (en) Variable length decoding apparatus
JP2010050697A (en) Apparatus and method for compressing/decompressing image
JP2007158698A (en) Image decoding apparatus and image decoding method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120330

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130515

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130521

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20130924