Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4365740B2 - Bit modeling processor - Google Patents
[go: Go Back, main page]

JP4365740B2 - Bit modeling processor - Google Patents

Bit modeling processor Download PDF

Info

Publication number
JP4365740B2
JP4365740B2 JP2004206223A JP2004206223A JP4365740B2 JP 4365740 B2 JP4365740 B2 JP 4365740B2 JP 2004206223 A JP2004206223 A JP 2004206223A JP 2004206223 A JP2004206223 A JP 2004206223A JP 4365740 B2 JP4365740 B2 JP 4365740B2
Authority
JP
Japan
Prior art keywords
bit
pass
processing
data
path
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004206223A
Other languages
Japanese (ja)
Other versions
JP2006033179A (en
Inventor
豊 佐藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2004206223A priority Critical patent/JP4365740B2/en
Publication of JP2006033179A publication Critical patent/JP2006033179A/en
Application granted granted Critical
Publication of JP4365740B2 publication Critical patent/JP4365740B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

本発明は、JPEG2000に準拠する符号化処理装置に関し、特に同装置の中の係数ビットモデリング処理部に関する。   The present invention relates to an encoding processing device compliant with JPEG2000, and more particularly to a coefficient bit modeling processing unit in the same device.

図9(1)は、JPEG2000における符号化処理の概略フロー図である。   FIG. 9 (1) is a schematic flow diagram of the encoding process in JPEG2000.

画像データは、DCレベルシフト・色変換処理部102、ウエーブレット変換部104、量子化部106により、サブバンド毎の係数データに変換され、係数ビットモデリング部108に入力される。係数ビットモデリング部108は、係数データを基にして、後段のMQ符号化部110で順次ビットデータが符号化されていく際に用いられる、既に符号化されたビットデータから抽出される符号化情報(コンテキストと言う。)と、実際に符号化されるビットデータ(ディシジョンと言う。)を生成する。更に、MQ符号化部110にて、そのコンテキストとディシジョンより符号データが生成され、最終的に符号形成部112にてJPEG2000符号となる。   The image data is converted into coefficient data for each subband by the DC level shift / color conversion processing unit 102, the wavelet conversion unit 104, and the quantization unit 106, and is input to the coefficient bit modeling unit 108. The coefficient bit modeling unit 108 is used when the bit data is sequentially encoded by the subsequent MQ encoding unit 110 based on the coefficient data, and is encoded information extracted from the already encoded bit data. (Referred to as context) and bit data (referred to as decision) that is actually encoded is generated. Further, the MQ encoding unit 110 generates code data from the context and the decision, and finally the JPEG 2000 code is generated by the code forming unit 112.

図9(2)は、係数ビットモデリング部108とMQ符号化器110の間のデータの流れを示す図である。係数ビットモデリング部108は、入力される係数データよりコンテキスト(CX)、ディシジョン(D)を生成し、MQ符号化器110は、それらより符号データ(C)を生成する。図9(3)は、復号時の係数ビットモデリング部108とMQ復号器111の間のデータの流れを示す図である。復号時には、まずMQ復号器111が入力される符号データ(C)よりディシジョン(D)を生成し、係数ビットモデリング部108はそのディシジョンより係数データを構成していくと同時に、MQ復号器111が次のディシジョンを生成するのに用いるコンテキスト(CX)を生成する。   FIG. 9B is a diagram showing a data flow between the coefficient bit modeling unit 108 and the MQ encoder 110. The coefficient bit modeling unit 108 generates a context (CX) and a decision (D) from the input coefficient data, and the MQ encoder 110 generates code data (C) from them. FIG. 9 (3) is a diagram illustrating a data flow between the coefficient bit modeling unit 108 and the MQ decoder 111 during decoding. At the time of decoding, first, a decision (D) is generated from code data (C) input to the MQ decoder 111, and the coefficient bit modeling unit 108 constructs coefficient data from the decision, and at the same time, the MQ decoder 111 Generate the context (CX) used to generate the next decision.

次に、係数ビットモデリング部108において、係数データよりコンテキストを生成していく手順(ビットモデリングの手順)を説明する。   Next, a procedure for generating a context from the coefficient data in the coefficient bit modeling unit 108 (bit modeling procedure) will be described.

各サブバンド内の係数データは、まず、互いに独立して符号化が行われるコードブロックと呼ばれる矩形領域に分割される。このとき、係数データは、絶対値と符号(サインビット)とで表され、更に、その絶対値の精度は量子化結果がオーバーフローしないようサブバンド毎に予め決められている。その絶対値はコードブロック内でビットプレーンに分割され、その上位のビットプレーンから順に符号化が行われる。含まれる全てのビットデータが0であるビットプレーンが最上位から続く場合その連続するビットプレーン(ゼロビットプレーン)のみが別の方式の符号化の対象となり、1のビットデータを含む最初のビットプレーンより下位のビットプレーンが、ビットモデリングを用いる符号化の対象となる。   The coefficient data in each subband is first divided into rectangular areas called code blocks that are encoded independently of each other. At this time, the coefficient data is represented by an absolute value and a sign (sign bit), and the accuracy of the absolute value is predetermined for each subband so that the quantization result does not overflow. The absolute value is divided into bit planes in the code block, and encoding is performed in order from the upper bit plane. When a bit plane in which all included bit data is 0 continues from the most significant bit, only the continuous bit plane (zero bit plane) is subjected to encoding in another system, and the first bit plane including 1 bit data Lower bit planes are subject to encoding using bit modeling.

図6(1)は、画像データがウエーブレット変換によりサブバンド毎の係数データに変換されている例を示す概念図である。この例では、画像データは3レベルのウエーブレット変換により、3LL〜1HHまでの10個のサブバンドの係数データに変換されている。   FIG. 6A is a conceptual diagram illustrating an example in which image data is converted into coefficient data for each subband by wavelet conversion. In this example, the image data is converted into coefficient data of 10 subbands from 3LL to 1HH by three-level wavelet transform.

図6(2)は、1つのサブバンドが複数のコードブロックに分割されている例を示す図である。この例では、1つのコードブロックの大きさは32×32(ビット)であり、図のサブバンドは0から15までの16個のコードブロックに分割される。また、このサブバンドでは、係数データの絶対値はMビットの精度で表される。   FIG. 6B is a diagram illustrating an example in which one subband is divided into a plurality of code blocks. In this example, the size of one code block is 32 × 32 (bits), and the subband in the figure is divided into 16 code blocks from 0 to 15. In this subband, the absolute value of the coefficient data is expressed with M-bit accuracy.

図6(3)は、コードブロックの係数データがビットプレーンに分割されている例を示す概念図である。この例では、コードブロックの係数データは、M個のビットプレーン(MSB(Most Significant Bit)側からBP(M−1)、BP(M−2)、・・・、BP(0))に分割され、各ビットプレーンは32×32個のビットデータより成る。   FIG. 6 (3) is a conceptual diagram showing an example in which the coefficient data of the code block is divided into bit planes. In this example, the coefficient data of the code block is divided into M bit planes (from the MSB (Most Significant Bit) side to BP (M−1), BP (M−2),..., BP (0)). Each bit plane is composed of 32 × 32 bit data.

図6(4)は、このコードブロック内のビットプレーンが、上位から続くゼロビットプレーンとビットモデリングを用いた符号化の対象となるビットプレーンとに分割されている様子を示す図である。ここで、BP(N−1)はMSB側から見て始めて1を含むビットプレーンである。BP(M−1)からBP(N)までのビットプレーンはすべてのビットデータが0であるから、その枚数(M−N)が符号化される。BP(N−1)からBP(0)までのビットプレーンがビットモデリングを用いた符号化の対象となる。   FIG. 6 (4) is a diagram illustrating a state in which the bit planes in the code block are divided into a zero bit plane that continues from the top and a bit plane that is an encoding target using bit modeling. Here, BP (N−1) is a bit plane including 1 when viewed from the MSB side. Since all bit data of the bit planes from BP (M−1) to BP (N) are 0, the number (M−N) is encoded. Bit planes from BP (N-1) to BP (0) are to be encoded using bit modeling.

次に、ビットプレーン毎に行われるビットモデリングの手順を、符号化処理を例にして説明する。   Next, a bit modeling procedure performed for each bit plane will be described with an example of encoding processing.

各コードブロックに含まれる全係数データには、それぞれ符号化を開始した時点で0となっている“significance state”と呼ばれる1ビットの変数が、与えられる。上位のビットプレーンから符号化が行われていく過程で、各係数データの絶対値は、上位のビットから1ビットずつ符号化されるが、最初に有意なデータである1が符号化された時点でこの係数の“significance state”も1となり、その後は1を保持する。以下において、“significance state”が1となった係数データを有意状態、0のままの係数データを非有意状態と表現する。また、符号化対象となるコードブロック外側のデータは、常に非有意状態として扱う。   All coefficient data included in each code block is given a 1-bit variable called “significance state” which is 0 when encoding is started. In the process of encoding from the upper bit plane, the absolute value of each coefficient data is encoded bit by bit from the upper bits, but when 1 that is significant data is encoded first. Thus, the “significance state” of this coefficient also becomes 1, and thereafter 1 is held. In the following, coefficient data with “significance state” of 1 is expressed as a significant state, and coefficient data that remains 0 is expressed as an insignificant state. In addition, data outside the code block to be encoded is always handled as an insignificant state.

まず、ビットプレーンを決められた順番でスキャンしていき、ある特定の条件にあてはまるビットを探索する。その条件に当てはまるビットが見つかればそのビットを符号化対象ビットとしてコンテキストを生成し、符号化を行う。そのビットプレーンのスキャンが終るまで同じ条件での符号化対象ビットの探索、コンテキスト生成、符号化を繰り返す。1回のスキャンが終了した時点ではまだそのビットプレーンには符号化されていないビットが残っているのが通常である。そこで、再度ビットプレーンのスキャンをしていくが、次は異なった条件での探索となり、その条件に当てはまるビットがあればそれを符号化対象ビットとして、コンテキスト生成、符号化をおこなう。1回のスキャンと符号化対象ビットの探索・コンテキストの生成・符号化の過程をパスと呼び、計3つのパスでそのビットプレーンに含まれる全てのビットの符号化が完了する。   First, the bit planes are scanned in a predetermined order to search for bits that meet a specific condition. If a bit satisfying the condition is found, a context is generated using the bit as a coding target bit, and encoding is performed. The search for the bit to be encoded, the context generation, and the encoding are repeated under the same conditions until the scanning of the bit plane is completed. Normally, at the time when one scan is finished, there are still uncoded bits in the bit plane. Therefore, the bit plane is scanned again. Next, the search is performed under different conditions. If there is a bit that satisfies the condition, context generation and encoding are performed using that bit as an encoding target bit. The process of one scan and search for the encoding target bit, generation of context, and encoding is called a pass, and encoding of all bits included in the bit plane is completed in a total of three passes.

符号化対象となるビットを探索するためそのビットプレーンをスキャンする順番を、図7に示す。ビットプレーンは、左上のビットから各縦方向に4ビットずつのグループ(列)に分けられる。スキャンは、グループ(列)内では上のビットから下のビットに、ビットプレーン内ではそのグループを左上から右下へ行われる。この順番は全パス共通である。   FIG. 7 shows the order in which the bit planes are scanned to search for bits to be encoded. The bit planes are divided into groups (columns) of 4 bits in each vertical direction from the upper left bits. The scan is performed from the upper bit to the lower bit in the group (column), and the group from the upper left to the lower right in the bit plane. This order is common to all paths.

各ビットプレーンの最初の符号化パスは、Significance propagationパスと呼ばれる(以下では、SPパスと言う。)。このパスにおいて、符号化の対象となるビットは、探索の時点で自らは非有意な状態で、周囲8個の係数データのうち少なくとも1つが有意状態にある係数データのビットである。さらに、対象となるビットの値が1であった場合、そのビットに続きその係数データのサインビットが符号化対象となる。2番目のパスは、Magnitude refinementパスと呼ばれる(以下では、MRパスと言う。)。このパスにおいて、自らが有意な状態であり、かつ、直前のSPパスで符号化対象とならなかった係数データのビットが符号化される。最後のパスは、Clean upパスと呼ばれる(以下では、CUパスと言う。)。このパスにおいて、直前のSPパス、MRパスで符号化されなかった全てのビットが符号化される。CUパスでもSPパスと同様、ビットデータとして1が符号化されると、その係数データのサインビットが符号化される。   The first coding pass of each bit plane is referred to as a signature propagation pass (hereinafter referred to as an SP pass). In this pass, bits to be encoded are coefficient data bits that are insignificant at the time of search and at least one of the surrounding eight coefficient data is significant. Further, when the value of the target bit is 1, the sign bit of the coefficient data following that bit becomes the encoding target. The second path is called a Magnitude refinement path (hereinafter referred to as an MR path). In this pass, the bits of the coefficient data that are in a significant state and that are not to be encoded in the immediately preceding SP pass are encoded. The last path is called a Clean up path (hereinafter referred to as a CU path). In this pass, all bits that were not encoded in the immediately preceding SP pass and MR pass are encoded. In the CU pass, as in the SP pass, when 1 is encoded as bit data, the sign bit of the coefficient data is encoded.

探索された符号化対象ビットに対して生成されるコンテキストは、パス毎に異なっている。SPパスでは、符号化対象ビットの周囲8個の係数データのsignificance stateや、符号化対象となるビットを含む上下左右の係数データのサインデータなどより、コンテキストが生成される(neighbor コンテキスト)。図10(1)(2)は、LLサブバンド、LHサブバンドに含まれるコードブロックの符号化においてSPパスで生成されるコンテキストを示す。図10(1)のXを符号化の対象となるビットとしたとき、図10(2)に示すようにその周囲8個の係数データのsignificance stateによりコンテキストが決定される。図10(2)におけるΣHiはXの左右の係数データ(H0、H1)のsignificance stateの合計を表している。ΣVi、ΣDiも同様に、上下(V0、V1)、斜め(D0、D1、D2、D3)の係数データのsignificance stateの合計である。なお、このときのディシジョンは、ビットデータ自身となる。   The context generated for the searched encoding target bit is different for each pass. In the SP pass, a context is generated based on the significance state of eight coefficient data around the encoding target bits, the sign data of the upper, lower, left, and right coefficient data including the bits to be encoded (neighbor context). FIGS. 10 (1) and 10 (2) show contexts generated by the SP path in coding of code blocks included in the LL subband and the LH subband. When X in FIG. 10 (1) is the bit to be encoded, the context is determined by the significance state of the eight coefficient data around it as shown in FIG. 10 (2). In FIG. 10 (2), ΣHi represents the sum of the significance state of the left and right coefficient data (H0, H1) of X. Similarly, ΣVi and ΣDi are the sum of the significance state of the coefficient data of upper and lower (V0, V1) and diagonal (D0, D1, D2, D3). The decision at this time is the bit data itself.

図11(1)(2)は、サインビットを符号化する際に生成されるコンテキストを示している。この場合、符号化対象の係数データの上下左右4個のsignificance stateとサインデータより、コンテキストが生成される。また、サインビットを符号化する場合のディシジョンは、図11(2)で示されるXORbitとサインビットとのEXOR(排他的論理和)をとったものとなる。   FIGS. 11 (1) and 11 (2) show contexts that are generated when sign bits are encoded. In this case, a context is generated from four significance states and sign data of the coefficient data to be encoded. In addition, the decision in the case of encoding the sign bit is an EXOR (exclusive OR) of the XOR bit and the sign bit shown in FIG.

MRパスでは、符号化対象となったビットがその係数で初めてMRパスで符号化されるビット(First refinement)かどうかということと、周囲の係数データのsignificance stateとで、コンテキストが決定される。図12にMRパスで生成されるコンテキストを示す。また、MRパスでのディシジョンは、ビットデータそのものである。   In the MR pass, the context is determined based on whether or not the bit to be encoded is a bit (First refinement) encoded for the first time with the coefficient and the significance state of the surrounding coefficient data. FIG. 12 shows a context generated by the MR path. The decision in the MR pass is bit data itself.

CUパスでのコンテキストの生成について示す。次の(a)且つ(b)の場合には、ランレングス(run−length)コンテキストと呼ばれる単独のコンテキストが使われる。
(a)図7の1つの列に含まれる4つのビットデータ全てがCUパスで符号化される。
(b)その4つのビットそれぞれの周囲8個のsignificance stateがすべて0である。
このとき、この列の4つのビットデータが全て0であればディシジョンとして0を符号化してこれら4つのビットの符号化を終了する。この列の4つのビットに一つでも1があればディシジョンとして1を符号化する。更に、4つのビットのうち最初にどの位置のビットが1となっているかを2ビットのデータで表して、それをUNIFORMコンテキストと呼ばれる単独のコンテキストで1ビットずつ符号化する。その後で、その最初に1となったビットのサインビットを、図11を用いて符号化する。
The context generation in the CU path will be described. In the following cases (a) and (b), a single context called a run-length context is used.
(A) All four bit data included in one column of FIG. 7 are encoded by the CU pass.
(B) The eight significance states around each of the four bits are all zero.
At this time, if all four bit data of this column are 0, 0 is encoded as a decision, and the encoding of these 4 bits is completed. If even one of the four bits in this column is 1, 1 is encoded as a decision. Further, the position of the first bit among the four bits is represented by 2-bit data, and is encoded bit by bit in a single context called UNIFORM context. Thereafter, the sign bit of the first bit becomes 1 with reference to FIG.

この時点で、まだ、この列で符号化されていないビットがあれば、それらを上から順に1ビットずつ(SPパスと同じ)neighborコンテキストを使って符号化する。上記(a)あるいは(b)の条件が満たされない場合、あるいは、1つの列のビットの数が3個以下の場合は、1ビットずつ(SPパスと同じ)neighborコンテキストを使って符号化する。   At this point, if there are still bits that are not encoded in this column, they are encoded bit by bit from the top (same as SP path) using the neighbor context. If the above condition (a) or (b) is not satisfied, or if the number of bits in one column is 3 or less, encoding is performed bit by bit using the neighbor context (same as the SP pass).

図8(ア)(イ)(ウ)(エ)により、ビットモデリングの符号化処理の具体例を説明する。これらの図は、3×4のサイズのコードブロックの一つのビットプレーンを3つのパスで符号化していく様子を示している。このビットプレーンにはa1〜c4までの12個のビットがあり、各ビット位置に示している1、0の数字はビットデータを表している。また、背景にハッチが掛かっているビットデータは、その係数データがすでに有意状態となっていることを示す。図8(ア)は、このビットプレーンの符号化を開始する直前の各ビットデータの様子を表しており、この時点ではa1のみが有意状態となっている。各パスにおいてa列、b列、c列の順に、各列内では1、2、3、4の順にスキャンされ符号化対象となるビットが探索されていく。   A specific example of the coding process of bit modeling will be described with reference to FIGS. 8A, 8A, 8C, and 8D. These drawings show how one bit plane of a 3 × 4 size code block is encoded in three passes. This bit plane has 12 bits from a1 to c4, and the numbers 1 and 0 shown in each bit position represent bit data. In addition, bit data with a hatched background indicates that the coefficient data is already in a significant state. FIG. 8A shows the state of each bit data immediately before starting the encoding of this bit plane, and only a1 is significant at this point. In each pass, the bits to be encoded are searched by scanning in the order of column a, column b, column c, 1, 2, 3, 4 in each column.

図8(イ)は、SPパスでの符号化の様子を示している。自らは非有意状態で、周囲8個の係数のうち少なくとも1つが有意状態にある最初のビットは“a2”であるので、SPパスにおいてはこのビットが最初に符号化される。a2の周囲8個の係数データのsignificance stateより、neighborコンテキストが生成される。a2のビットデータが1であるので、次にa2のサインビットの符号化が行われる。図8(イ)(1)はa2の符号化を終了した時点での、このビットプレーンの様子を示している。この時点でa2のsignificance stateが1となり、以後この位置の係数データは有意な状態として扱われる(このビットは既に符号化されたことを示すため、ビットデータ値が消去されている。)。次に符号化の対象となるのはa3のビットであるが、データが0であるので、このビットが符号化されてもこの位置は非有意の状態が保たれる。a3のビットの符号化が終わった時点での、ビットプレーンの様子を図8(イ)(2)に示す。更に、b1、b2、b3の順で符号化が行われる。図8(イ)(3)、(4)、(5)は、それぞれのビットの符号化が終わった時点でのビットプレーンの様子を表している。   FIG. 8A shows the state of encoding in the SP pass. Since the first bit that is insignificant and at least one of the surrounding eight coefficients is significant is “a2”, this bit is encoded first in the SP pass. A neighbor context is generated from the significance state of the eight coefficient data around a2. Since the bit data of a2 is 1, the sign bit of a2 is next encoded. FIGS. 8A and 8A show the state of this bit plane when the encoding of a2 is completed. At this time, the significance state of a2 becomes 1, and thereafter, the coefficient data at this position is treated as a significant state (the bit data value is erased to indicate that this bit has already been encoded). Next, the bit to be encoded is the bit a3, but since the data is 0, even if this bit is encoded, this position remains insignificant. FIGS. 8A and 8B show the state of the bit plane when the bit a3 is encoded. Furthermore, encoding is performed in the order of b1, b2, and b3. 8 (a), (3), (4), and (5) show the state of the bit plane at the time when encoding of each bit is completed.

ここで注意する必要があるのは、SPパスでの符号化が開始された時点で有意な状態にあったのはa1のみであったため、その時点で符号化対象となる条件を満たしているのはその周囲のa2、b1、b2のみであったものが、a2の処理が終った時点でこのビットも有意となったために、SPパスでの符号化対象にa3、b3が加わり、さらに次の対象ビットがa3となった点である。即ち、SPパスにおいては、ビットを処理する毎に符号化対象となるビットが増え、処理順も変わる可能性がある。   It should be noted here that since only a1 was in a significant state at the time when encoding in the SP pass was started, the condition to be encoded at that time is satisfied. Is only the surrounding a2, b1, and b2, but since this bit became significant when the processing of a2 was completed, a3 and b3 were added to the encoding target in the SP pass, and the following The target bit is a3. That is, in the SP pass, every time a bit is processed, the number of bits to be encoded increases and the processing order may change.

次に、MRパスで符号化が行われる。SPパス終了時(図8(イ)(5))、自らが有意な状態で、且つ、直前のSPパスで符号化対象とならなかったのは、a1のみであり、MRパスではこのビットだけが符号化の対象となる。MRパスでの符号化終了時点のビットプレーンの様子を、図8(ウ)に示す。   Next, encoding is performed in the MR pass. At the end of the SP pass (FIGS. 8 (a) and (5)), it is only a1 that is in a significant state and has not been encoded in the immediately preceding SP pass, and only this bit in the MR pass. Are subject to encoding. The state of the bit plane at the end of encoding in the MR pass is shown in FIG.

最後に、CUパスでの符号化が行われる。このパスでは、先のSPパス、MRパスで符号化されなかった6つのビットが符号化の対象となる。まず、a4が最初の符号化対象ビットとなり、このときのコンテキストは周囲8個の係数データのsignificance stateより生成される(neighborコンテキスト)。また、ビットデータが1であるので、次にa4のサインビットの符号化が行われる。b4の符号化も、neighborコンテキストを用いて行われる。a4、b4の2つのビットデータの符号化が終った時点でのビットプレーンの様子が、図8(エ)(1)、(2)に示される。a4の値が1であるため、図8(エ)(1)にてa4が有意状態に変わっている。次に、c1からのビットが符号化されるが、c列(c1、c2、c3、c4)は上述のランレングスに係る(a)(b)の条件を満たすので、4ビットまとめて符号化の対象となり、ランレングス(run−length)コンテキストが生成される。c列すべてが0であれば、このときのディシジョンを0としてこのコードブロックの符号化が完了するが、ここではc3ビットが1なのでディシジョンを1として符号化し、続けて3ビット目に1があるという情報“10”を、1ビットずつUNIFORMコンテキストを使って符号化する。更に、c3ビットのサインビットとc4ビットとがneighborコンテキストを使って符号化され、このコードブロックの符号化処理が終了する。   Finally, encoding in the CU pass is performed. In this pass, six bits not encoded in the previous SP pass and MR pass are to be encoded. First, a4 is the first bit to be encoded, and the context at this time is generated from the significance state of the surrounding eight coefficient data (neighbor context). Since the bit data is 1, the sign bit a4 is next encoded. The encoding of b4 is also performed using the neighbor context. The state of the bit plane at the time when the encoding of the two bit data a4 and b4 is completed is shown in FIGS. 8 (D), (1), and (2). Since the value of a4 is 1, a4 has changed to a significant state in FIGS. Next, the bits from c1 are encoded, but the c sequence (c1, c2, c3, c4) satisfies the conditions (a) and (b) related to the above-mentioned run length, so that 4 bits are encoded together. A run-length context is generated. If all the c columns are 0, the decision at this time is set to 0 and the encoding of this code block is completed. However, since the c3 bit is 1, the decision is encoded as 1, and subsequently, there is 1 in the 3rd bit. The information “10” is encoded bit by bit using the UNIFORM context. Further, the c3 bit sign bit and the c4 bit are encoded using the neighbor context, and the encoding process of this code block ends.

CUパスにおいても、SPパス同様、現在処理しているビットの値によって、その後のビットのコンテキストが違ってくる。例えば、b4ビットの値が1であったとすると、処理後この係数データは有意状態となるのでc列は上述の(b)の条件を満たさず、c1から順番にneighborコンテキストを用いて符号化されることになる。   Also in the CU pass, as in the SP pass, the context of subsequent bits varies depending on the value of the bit currently being processed. For example, if the value of the b4 bit is 1, this coefficient data is in a significant state after processing, so the c column does not satisfy the condition (b) described above, and is encoded using the neighbor context in order from c1. Will be.

以上、符号化処理を例にとってビットモデリングの手順を説明したが、復号処理も同様に、ビットプレーンの3パスでのスキャンと復号対象ビットの探索、コンテキストの生成という手順で行われる。ただし、符号化とは異なり、MQ復号器が生成したコンテキストを用いて符号データよりディシジョンを決定するため、係数モデリング部では、その結果を受け取って係数データの構成を行っていく。特に、SPパス、CUパスでは、復号結果によって次の復号対象ビット、コンテキストが変わるので次の復号処理を行うまでにMQ復号器がディシジョンを生成するのを待つ必要がある。   The bit modeling procedure has been described above by taking the encoding process as an example. Similarly, the decoding process is performed by a procedure of scanning in three passes of a bit plane, searching for a decoding target bit, and generating a context. However, unlike encoding, since the decision is determined from the code data using the context generated by the MQ decoder, the coefficient modeling unit receives the result and constructs the coefficient data. In particular, in the SP pass and CU pass, the next decoding target bit and context change depending on the decoding result, so it is necessary to wait for the MQ decoder to generate a decision before performing the next decoding process.

次に、符号化処理、復号処理を行うビットモデリング装置の従来例について説明する。   Next, a conventional example of a bit modeling apparatus that performs encoding processing and decoding processing will be described.

先に説明したようにあるビットがそのパスでの処理対象かどうかを判断するにあたり、その位置と周辺8個(の位置)の係数のsignificance stateを用いる。ところで、MRパス、CUパスでは先のSPパスで処理対象とならなかったビットを選択する必要がある。そのため、符号化、復号処理においてはsignificance state以外に、SPパスで処理対象となったかどうかの情報が必要となる。   As described above, in determining whether a certain bit is a processing target in the path, the significance state of the coefficient of the position and the surrounding eight (the position) is used. By the way, in the MR pass and CU pass, it is necessary to select bits that were not processed in the previous SP pass. For this reason, in the encoding and decoding processes, information on whether or not processing has been performed in the SP pass is required in addition to the signature state.

ここで説明する従来例では、コードブロックの1つの係数データに、significance stateとは別に“pass bit”という変数を割り当て、この2つの変数を使って、符号化、あるいは復号処理の対象となるビットを探索する。“pass bit”は、significance stateとの組み合わせで意味合いが変る。つまり、その係数が非有意の場合、pass bitが1であれば、直前のSPパスで処理対象となったことを示す。その係数が有意の場合、pass bitが1であれば、このビットプレーンの処理開始時点でその係数が既に有意であったため直前のSPパスでの処理対象とならなかったことを示している。   In the conventional example described here, a variable “pass bit” is assigned to one coefficient data of a code block in addition to the significance state, and a bit to be encoded or decoded using these two variables. Explore. The meaning of “pass bit” varies depending on the combination with the significance state. That is, when the coefficient is insignificant, if the pass bit is 1, it indicates that the processing target is the previous SP pass. When the coefficient is significant, if the pass bit is 1, it indicates that the coefficient has already been significant at the start of processing of this bit plane, and therefore has not been processed in the immediately preceding SP pass.

図13(1)(2)は、それぞれのパスでの処理対象となるsignificance state(以下、ssと言う。)と、pass bit(以下、psと言う。)の組み合わせ、及び、そのビットを処理した後に更新される significance state(ss)とpass bit(ps)の値(new ss 、new ps)を示す。   FIGS. 13 (1) and 13 (2) show a combination of a signature state (hereinafter referred to as ss) to be processed in each path and a pass bit (hereinafter referred to as ps), and the bit. The values (new ss, new ps) of the significance state (ss) and the pass bit (ps) that are updated after the update are shown.

SPパスでは、(ss、ps)=(1、x)の場合、その係数は既に有意になっているので処理は行わないが、すでに前のビットプレーンで有意となっていたことを示すため(new ss 、new ps)=(1、1)に書き換える。(ss、ps)=(0、0)の場合、その周囲8個の係数のsignificance stateのどれかが1(nei=1)であればそのビットを処理し、そのビットの値が1(ディシジョン、D=1)であれば、(new ss 、new ps)=(1、0)に、0(D=0)であれば(new ss 、new ps)=(0、1)にする。(ss、ps)=(0、1)の場合は、その前のビットプレーンですでにSPパスで処理していることを示しているので無条件で処理し、そのビットの値が1(ディシジョン、D=1)であれば、(new ss 、new ps)=(1、0)に更新する。   In the SP pass, if (ss, ps) = (1, x), the coefficient is already significant and no processing is performed, but to indicate that it has already become significant in the previous bit plane ( new ss, new ps) = (1, 1). When (ss, ps) = (0, 0), if any of the surrounding eight coefficients has a significance state of 1 (nei = 1), the bit is processed, and the value of the bit is 1 (decision) , D = 1), (new ss, new ps) = (1, 0), and 0 (D = 0), (new ss, new ps) = (0, 1). In the case of (ss, ps) = (0, 1), it indicates that the previous bit plane has already been processed by the SP path, so the processing is unconditional, and the value of the bit is 1 (decision) , D = 1), it is updated to (new ss, new ps) = (1, 0).

MRパスでは、(ss、ps)=(1、1)の係数のビットのみ処理する。   In the MR pass, only the bits of the coefficient (ss, ps) = (1, 1) are processed.

CUパスでは、(ss、ps)=(0、0)の係数のビットを処理し、そのビットの値が1(ディシジョン、D=1)であれば、(new ss 、new ps)=(1、1)に更新する。   In the CU pass, if the bit of the coefficient (ss, ps) = (0, 0) is processed and the value of the bit is 1 (decision, D = 1), (new ss, new ps) = (1 Update to 1).

コードブロック全体は、縦方向に4つの係数が含まれる4×4などの矩形のサブブロックに分けて処理が行われる。図14(1)は、16×16のコードブロックが4×4のサブブロックに分割されている様子を示している。この場合、0、1、2、・・・15のサブブロックが順番に処理されていく。サブブロック領域に含まれるビットデータに関して、どのビットデータをどのパスで処理するかを決定し適切なコンテキストを生成するためには、上下左右でそのサブブロックより1つずつ大きな領域のsignificance stateとサインビットの情報が必要となる。即ち、4×4のサブブロックに対しては、図14(2)に示す6×6の領域のそれらの情報が必要となる。   The entire code block is divided into 4 × 4 rectangular sub-blocks including four coefficients in the vertical direction and processed. FIG. 14A shows a state where a 16 × 16 code block is divided into 4 × 4 sub-blocks. In this case, 0, 1, 2,..., 15 sub-blocks are processed in order. In order to determine which bit data is to be processed by which path and to generate an appropriate context for the bit data included in the sub-block area, the signifi- cant sign and sign of the area larger than the sub-block one by one up, down, left, and right Bit information is required. That is, for the 4 × 4 sub-block, those pieces of information in the 6 × 6 area shown in FIG. 14 (2) are required.

図15は、符号化ビットモデリング装置108の1つの例を示す。この例では、図14(1)のようにコードブロックを4×4のサブコードブロックに分けて処理するものとする。   FIG. 15 shows an example of the coded bit modeling device 108. In this example, it is assumed that the code block is divided into 4 × 4 subcode blocks and processed as shown in FIG.

符号化時、ウエーブレット変換器104、量子化器106で変換された係数データは、絶対値とサインビットとに分けられてコードブロック毎に係数絶対値格納メモリ58、サインビット格納メモリ56に格納される。また、ssフラグ格納メモリ52、psフラグ格納メモリ54には、そのコードブロックに含まれる係数のsignificance stateとpass bitが格納される。   At the time of encoding, the coefficient data converted by the wavelet transformer 104 and the quantizer 106 is divided into absolute values and sign bits and stored in the coefficient absolute value storage memory 58 and the sign bit storage memory 56 for each code block. Is done. The ss flag storage memory 52 and the ps flag storage memory 54 store the significance state and pass bit of the coefficient included in the code block.

その際、係数絶対値データとpsフラグは、4×4のサブブロック単位で1つのアドレス領域に格納されるが、サインビットとssフラグは6×6の領域が読み出せるように格納される。このことは、例えば図16(1)に示すように、A、B2つのメモリに別々にデータを格納することで実現できる。図16(1)におけるA0はメモリAのアドレス0の領域に格納されているデータ、A1はメモリAのアドレス1の領域に格納されているデータ、・・・、B0はメモリBのアドレス0の領域に格納されているデータ、B1はメモリBのアドレス1の領域に格納されているデータ、・・・を示している。このようにメモリに格納しておき、更に図16(2)に示すような、出力を次段の入力とする3段のレジスタにそれぞれのメモリからのリードデータを入力することで、通常のメモリを用いた6×6領域のデータの読み出しが可能となる。図16(2)は、図14(2)における“5”のサブブロックを処理する場合に必要となる6×6領域のデータが、レジスタに入力されている様子を示している。   At that time, the coefficient absolute value data and the ps flag are stored in one address area in units of 4 × 4 sub-blocks, but the sign bit and the ss flag are stored so that a 6 × 6 area can be read. This can be realized, for example, by storing data separately in the two memories A and B as shown in FIG. In FIG. 16A, A0 is data stored in the address 0 area of the memory A, A1 is data stored in the address 1 area of the memory A,..., B0 is the address 0 of the memory B. Data stored in the area, B1 indicates data stored in the area of address 1 of the memory B,. In this way, by storing the read data from each memory in a three-stage register whose output is the next stage input as shown in FIG. It becomes possible to read out data in a 6 × 6 area using. FIG. 16B shows a state in which 6 × 6 area data necessary for processing the sub-block “5” in FIG. 14B is input to the register.

メモリに格納されているデータのうち、該当する4×4の領域のビットデータとpsフラグを4×4領域レジスタ68、64に、その処理に必要な6×6領域のサインビットとssフラグを6×6領域レジスタ66、62に読み込んだ後、ビットモデリング処理部2において、SPパス・MRパス・CUパスで符号化処理するビットの決定、コンテキスト・ディシジョンの生成、ssフラグとpsフラグの更新を行ってコードブロックの符号化を行っていく。   Among the data stored in the memory, the corresponding 4 × 4 area bit data and the ps flag are stored in the 4 × 4 area registers 68 and 64, and the 6 × 6 area sign bit and ss flag necessary for the processing are stored. After reading into the 6 × 6 area registers 66 and 62, the bit modeling processing unit 2 determines the bits to be encoded by the SP pass, MR pass, and CU pass, generates the context decision, and updates the ss flag and the ps flag. To code the code block.

図17は、ビットモデリング処理部2のブロック図である。   FIG. 17 is a block diagram of the bit modeling processing unit 2.

パスカウンター16は3値のカウンターであり、ビットプレーンの処理をしていくにあたって現在処理中のパスが、SPパス、MRパス、若しくはCUパスのいずれであるかを示し、1つのパスでの処理が終了するとインクリメントして次のパスを示す。pass_initは、このカウンター16の初期化信号、pass_incrementは、インクリメント信号である。   The path counter 16 is a ternary counter, and indicates whether the path currently being processed in processing a bit plane is an SP path, an MR path, or a CU path. Increments to indicate the next pass. pass_init is an initialization signal of the counter 16, and pass_increment is an increment signal.

アドレス生成部14は、係数絶対値格納メモリ58、サインビット格納メモリ56、ssフラグ格納メモリ52、psフラグ格納メモリ54から処理対象の4×4領域と6×6領域のデータを読み出す際のアドレスを生成し、その領域の処理が終る毎にインクリメントされる。add_initは、アドレス初期化信号、add_incrementは、アドレスインクリメント信号である。   The address generation unit 14 reads the data in the 4 × 4 area and 6 × 6 area to be processed from the coefficient absolute value storage memory 58, the sign bit storage memory 56, the ss flag storage memory 52, and the ps flag storage memory 54. Is incremented each time processing of the area is completed. add_init is an address initialization signal, and add_increment is an address increment signal.

パス決定ユニット4では、4×4のサブブロック中の16個のビットのそれぞれに関して、現在のパスでの処理対象ビットかそうでないかをssフラグ、psフラグより判断して出力する。   The path determination unit 4 determines whether each of the 16 bits in the 4 × 4 sub-block is a processing target bit in the current path or not based on the ss flag and the ps flag and outputs the result.

コンテキスト・ディシジョン生成部10は、ssフラグ、サインビットを使って4×4のサブブロックの16個のビットのそれぞれに関して、図10、図11、図12で示されるようなコンテキストとディシジョンデータを生成する。   The context decision generation unit 10 generates context and decision data as shown in FIGS. 10, 11, and 12 for each of 16 bits of the 4 × 4 sub-block using the ss flag and the sign bit. To do.

ss、psフラグ更新部12は、図13に示す論理に基づき処理対象となったビット位置(NXT_BIT)のssフラグとpsフラグの更新値(new ss、new ps)を生成し、update信号が入力されるとそれぞれのデータを格納している6×6領域レジスタ62、4×4領域レジスタ64の値を更新する。   The ss and ps flag updating unit 12 generates the ss flag and the updated value of the ps flag (new ss, new ps) at the bit position (NXT_BIT) that is the processing target based on the logic shown in FIG. 13, and the update signal is input. Then, the value of the 6 × 6 area register 62 and 4 × 4 area register 64 storing the respective data is updated.

図18(1)は、パス決定ユニット4の詳細なブロック図である。SPパス処理抽出部72、MRパス処理抽出部74、CUパス処理抽出部76は、16個のビットが各パスでの処理対象となる図13(2)の条件を満たしているかどうかを判断し、その結果として16ビットからなるデータINP_SP、INP_MR、INP_CUを出力する。それぞれの出力は、各ビットが処理対象となる条件を満たしていれば1、満たしていなければ0となっている。   FIG. 18A is a detailed block diagram of the path determination unit 4. The SP path processing extraction unit 72, the MR path processing extraction unit 74, and the CU path processing extraction unit 76 determine whether 16 bits satisfy the condition of FIG. 13 (2) to be processed in each path. As a result, 16-bit data INP_SP, INP_MR, and INP_CU are output. Each output is 1 if each bit satisfies the condition to be processed, and 0 if not.

4×4領域と6×6領域の各ビット位置を、図18(2)(3)に示す番号・記号で示す。SPパスでは、そのビットのsignificance stateが0で周辺の8個の係数のいずれかのsignificance stateが1であるビットが処理の対象となるので、その条件は、
INP_SP(N)=(SS(N)==0)&&(nei(N)>0),(0≦N≦15)
となる。ここで、“nei(N)”はビット位置Nでの周辺8個のデータのsignificance stateの合計値である。例えば、
nei(0)=SS(c0)+SS(l0)+SS(l1)+SS(t0)+
SS(1)+SS(t1)+SS(4)+SS(5)
nei(5)=SS(0)+SS(1)+SS(2)+SS(4)+SS(6)
+SS(8)+SS(9)+SS(10)
となる。
The bit positions of the 4 × 4 area and the 6 × 6 area are indicated by numbers and symbols shown in FIGS. 18 (2) and 18 (3). In the SP pass, a bit whose significance state is 0 and whose signifi- cant state is one of the eight neighboring coefficients is a processing target.
INP_SP (N) = (SS (N) == 0) && (nei (N)> 0), (0 ≦ N ≦ 15)
It becomes. Here, “nei (N)” is the total value of the significance state of the surrounding 8 data at the bit position N. For example,
nei (0) = SS (c0) + SS (l0) + SS (l1) + SS (t0) +
SS (1) + SS (t1) + SS (4) + SS (5)
nei (5) = SS (0) + SS (1) + SS (2) + SS (4) + SS (6)
+ SS (8) + SS (9) + SS (10)
It becomes.

MRパスでは、significance stateとpass bitが共に1となるビット、CUパスでは、significance stateとpass bitが共に0となるビットが処理対象となるので、その条件は、
INP_MR(N)=(SS(N)==1)&&(PS(N)==1)、(0≦N≦15)
INP_CU(N)=(SS(N)==0)&&(PS(N)==0)、(0≦N≦15)
となる。これら3つの出力から、パスカウンター16のパスカウント値によって現在処理しているパスに対応するデータが選択され16ビットのINPとして出力される。
In the MR pass, the bits for which the signature state and the pass bit are both 1 are processed, and in the CU pass, the bits for which the signature state and the pass bit are both 0 are processed.
INP_MR (N) = (SS (N) == 1) && (PS (N) == 1), (0 ≦ N ≦ 15)
INP_CU (N) = (SS (N) == 0) && (PS (N) == 0), (0 ≦ N ≦ 15)
It becomes. From these three outputs, the data corresponding to the currently processed path is selected by the path count value of the path counter 16 and output as 16-bit INP.

パス決定ユニット4より出力されたINP値は、マスクロジック部6に入力される。マスクロジック部6は、マスクレジスタ8より入力されるMSK値とINP値のビット毎の論理和を以下のように算出してMSK_INP値として出力する。
MSK_INP(N)=INP(N)&MSK(N)、(0≦N≦15)
The INP value output from the path determination unit 4 is input to the mask logic unit 6. The mask logic unit 6 calculates the logical sum of each bit of the MSK value and the INP value input from the mask register 8 as follows and outputs the result as an MSK_INP value.
MSK_INP (N) = INP (N) & MSK (N), (0 ≦ N ≦ 15)

上記のMSK値は、その4×4領域で直前に処理されたビットより位置的に先に探索されるビット位置のデータは0、それ以外は1となっている。即ち、
MSK(N)=0、(0≦N≦M)
MSK(N)=1、(M<N≦15)
(Mは同じ4×4領域内で直前に処理されたビットの位置)
となる。これにより、MSK_INPを図18(2)に示されたビット位置0から順に探索していって最初に1となっているビットが現在のパスで次に処理するビットとなる。これを実現するのが次段の処理ビット決定部18である。
The above MSK value is 0 for the data of the bit position searched for in the 4 × 4 area before the bit processed immediately before, and 1 for the other positions. That is,
MSK (N) = 0, (0 ≦ N ≦ M)
MSK (N) = 1, (M <N ≦ 15)
(M is the position of the bit processed immediately before in the same 4 × 4 area)
It becomes. As a result, MSK_INP is searched sequentially from bit position 0 shown in FIG. 18 (2), and the bit that is first becomes the next bit to be processed in the current pass. This is realized by the processing bit determination unit 18 in the next stage.

図19は、処理ビット決定部18の詳細なブロック図である。先に説明したように、入力されたMSK_INPは、プライオリティエンコーダ84に入力されて次に処理するビット位置情報、NXT_BITに変換される。この時の論理は、
if (MSK_INP[0] == 1) NXT_BIT = 0
else if (MSK_INP[1] == 1) NXT_BIT = 1
else if (MSK_INP[2] == 1) NXT_BIT = 2
else if (MSK_INP[3] == 1) NXT_BIT = 3


else if (MSK_INP[15] == 1 ) NXT_BIT = 15
となる。また、MSK_INPが全て0の場合、この4×4領域には現在のパスで処理対象となるビットが無いことを示しており、この時BLK_END出力が1となる。
FIG. 19 is a detailed block diagram of the processing bit determination unit 18. As described above, the input MSK_INP is input to the priority encoder 84 and converted into bit position information to be processed next, NXT_BIT. The logic at this time is
if (MSK_INP [0] == 1) NXT_BIT = 0
else if (MSK_INP [1] == 1) NXT_BIT = 1
else if (MSK_INP [2] == 1) NXT_BIT = 2
else if (MSK_INP [3] == 1) NXT_BIT = 3


else if (MSK_INP [15] == 1) NXT_BIT = 15
It becomes. When MSK_INP is all 0, this indicates that there is no bit to be processed in the current pass in the 4 × 4 area, and the BLK_END output is 1 at this time.

マスクレジスタ8では、NXT_BITで選択された位置より先に探索されるビット位置のデータは0、それ以外は1となるMSKデータを作成する。   The mask register 8 creates MSK data in which the bit position data searched before the position selected by NXT_BIT is 0, and 1 otherwise.

選択・制御部20は、ビットモデリング処理部2全体の制御を行うと同時に、現在のパス(パスカウント値)とビット位置(NXT_BIT)より最終的なコンテキストとディシジョンを選択するブロックである。   The selection / control unit 20 is a block that controls the entire bit modeling processing unit 2 and simultaneously selects the final context and decision from the current path (pass count value) and bit position (NXT_BIT).

図20は、選択・制御部20におけるコンテキストとディシジョンの選択の制御に係る概略のフローチャートである。   FIG. 20 is a schematic flowchart regarding control of selection of context and decision in the selection / control unit 20.

コードブロックの符号化をスタート(S00)した後、アドレスとパスカウント値が初期化され(S02)、最初の4×4領域のpsフラグ、ビットデータ、6×6領域のssフラグ、サインビットデータがそれぞれレジスタにロードされる(S04)。その4×4領域に処理対象となるビットがあれば(BLK_END=0)、コンテキスト・ディシジョン生成部10で生成された複数のコンテキストとディシジョンよりパスカウント値とNXT_BITの値により適切なコンテキストとディシジョンを選択して出力する。同時にMQ符号化器110に符号化を許可するためイネーブル(EN)を1とする(S08)。次に図13(2)で示される(next ss、next ps)を生成して4×4領域レジスタ64にロードされているpsフラグ、6×6領域レジスタ62にロードされているssフラグを更新する(S10)。更に、更新されたpsフラグ、ssフラグを用いて処理対象ビットの探索を行い、同様のフローを繰り返す。その4×4領域の処理が終わると(BLK_END=1)、4×4領域レジスタ64にロードされているpsフラグ、6×6領域レジスタ62にロードされているssフラグをそれぞれの格納メモリの(先に)読み出しを行ったのと同じアドレス領域に書き込む(S12)。処理の終った4×4領域が、そのコードブロックの最後のサブブロックであるかどうかを判断し(S14)、そうでなければ、アドレスをインクリメントし(S18)次の4×4領域を処理するためのpsフラグ、ビットデータ、ssフラグ、サインビットデータをレジスタにロードした後(S04)そのサブブロックの処理を行っていく。S14にて最後のサブブロックと判断されれば、処理したパスがコードブロックの最後のパスであるかどうかを判断し(S22)、まだ、処理するパスが残っていれば、パスカウント値のインクリメントとアドレスの初期化を行い(S24)新たなパスの符号化を行う。最後のパスであれば、処理を終了する(S34)。   After starting the coding of the code block (S00), the address and pass count value are initialized (S02), the first 4 × 4 area ps flag, bit data, 6 × 6 area ss flag, sign bit data Are loaded into the registers (S04). If there is a bit to be processed in the 4 × 4 area (BLK_END = 0), an appropriate context and decision are determined based on the pass count value and the value of NXT_BIT from the plurality of contexts and decisions generated by the context decision generation unit 10. Select and output. At the same time, enable (EN) is set to 1 to allow the MQ encoder 110 to perform encoding (S08). Next, (next ss, next ps) shown in FIG. 13B is generated and the ps flag loaded in the 4 × 4 area register 64 and the ss flag loaded in the 6 × 6 area register 62 are updated. (S10). Further, the processing target bit is searched using the updated ps flag and ss flag, and the same flow is repeated. When the processing of the 4 × 4 area ends (BLK_END = 1), the ps flag loaded in the 4 × 4 area register 64 and the ss flag loaded in the 6 × 6 area register 62 are stored in the respective storage memories ( First, the data is written in the same address area where the reading is performed (S12). It is determined whether or not the processed 4 × 4 area is the last sub-block of the code block (S14). If not, the address is incremented (S18) and the next 4 × 4 area is processed. After the ps flag, bit data, ss flag, and sign bit data for loading are loaded into the register (S04), the sub-block is processed. If it is determined in S14 that it is the last sub-block, it is determined whether the processed path is the last path of the code block (S22). If there are still paths to be processed, the pass count value is incremented. The address is initialized (S24) and a new pass is encoded. If it is the last pass, the process is terminated (S34).

図21は、復号ビットモデリング装置の1つの例を示す。図15に示される符号化ビットモデリング装置と大きく異なるのは、ディシジョン(D)が、ビットモデリング処理部2ではなくMQ復号器111が符号を復号した結果として出力される点である。ビットモデリング処理部2がこのディシジョンからビットデータ、サインビットを生成した後、各領域レジスタ・メモリへの書き込みが行われ、逆量子化、ウエーブレット逆変換を経て画像データへ変換される。ここで、サインビットに関しては、コンテキストを生成するのに使用されるためサインビット格納メモリ56より6×6領域レジスタ66へのロードが行われる。以上を実現するビットモデリング処理部2のブロック図を図22に示す。図17と比べてディシジョンからビットデータ、サインビットを生成するサインビット、ビットデータ生成部46が追加されている。   FIG. 21 shows one example of a decoded bit modeling apparatus. A significant difference from the encoded bit modeling apparatus shown in FIG. 15 is that the decision (D) is output as a result of decoding the code by the MQ decoder 111 instead of the bit modeling processing unit 2. After the bit modeling processing unit 2 generates bit data and a sign bit from this decision, writing to each area register / memory is performed and converted into image data through inverse quantization and wavelet inverse transformation. Here, since the sign bit is used to generate a context, the sign bit storage memory 56 loads the 6 × 6 area register 66. FIG. 22 shows a block diagram of the bit modeling processing unit 2 for realizing the above. Compared to FIG. 17, a bit data, a sign bit for generating a sign bit, and a bit data generation unit 46 are added from the decision.

以上の従来技術では、コードブロックを処理する単位に分割したサブブロックの符号化・復号処理において、現在のパスにおける処理対象ビットの有無に関わらず、一旦そのサブブロックのssフラグ、psフラグをロードした後、処理対象ビットの有無を判断していたので余分な時間がかかるという問題がある。   In the above conventional technology, in the encoding / decoding processing of a subblock divided into units for processing a code block, the ss flag and ps flag of the subblock are once loaded regardless of the presence / absence of the processing target bit in the current pass. After that, since the presence / absence of the processing target bit is determined, there is a problem that it takes extra time.

特許文献1に係る発明は、情報を符号化及び復号化する方法並びに装置を提供する。つまり、当該発明の装置は、メモリ及び復号化ハードウェアを含む。メモリは、ランカウント及び/又はスキップカウントを保持し、復号化ハードウェアは、復号化中にメモリから取得されたランカウント及び/又はスキップカウントを復号化する。特許文献2に係る発明は、処理速度の速いビットモデリングの処理方法及びそれを用いる処理回路である。つまり、当該発明に係る処理方法・処理回路は、sigパスにより、処理対象であるビットと周囲のビット群の有意フラグの状態及び符号ビットの状態に応じて変化するコンテキスト及びディシジョンとを同時に生成し、処理対象であるビットの値が1のときのみ符号ビットのコンテキスト及びディシジョンを採用し、有意フラグを更新し、処理対象であるビットの値が0のときは廃止し、処理対象であるビットの値が1か0に係わらず、処理済フラグを更新するビットモデリングの処理回路を、同一グループのビットに同時に適用し、並列に処理する。
特開2003−8445 公報 特開2003−8906 公報
The invention according to Patent Document 1 provides a method and apparatus for encoding and decoding information. That is, the apparatus of the present invention includes a memory and decoding hardware. The memory maintains run counts and / or skip counts, and decoding hardware decodes the run counts and / or skip counts obtained from the memory during decoding. The invention according to Patent Document 2 is a bit modeling processing method with a high processing speed and a processing circuit using the same. In other words, the processing method and processing circuit according to the present invention simultaneously generate a bit to be processed and a context and a decision that change according to the state of the significant flag and the state of the sign bit of the surrounding bit group through the sig path. The sign bit context and decision are adopted only when the value of the bit to be processed is 1, updates the significance flag, is abolished when the value of the bit to be processed is 0, and the bit to be processed Regardless of whether the value is 1 or 0, a bit modeling processing circuit that updates the processed flag is simultaneously applied to the bits of the same group and processed in parallel.
JP 2003-8445 A JP 2003-8906 JP

本発明は、JPEG2000に準拠する符号化・復号処理装置の係数ビットモデリング部において、コードブロックを分割したサブブロックの符号化・復号処理を効率よく行うことを目的とする。   An object of the present invention is to efficiently perform encoding / decoding processing of a sub-block obtained by dividing a code block in a coefficient bit modeling unit of an encoding / decoding processing device compliant with JPEG2000.

本発明は、上記の目的を達成するために為されたものである。本発明に係る請求項1に記載のビットモデリング処理装置は、
コードブロックが複数に分割されたサブブロック単位で処理するパスにおける処理対象のビットを、探索して符号化、又は復号の処理を行うJPEG2000のビットモデリング処理装置において、
一つのサブブロックに対するシグニフィカントプロパゲーション(Significance propagationパスの処理中に、
そのサブブロックにてその後で実施されるマグニチュードリファインメント(Magnitude refinementパス又はクリーンアップ(Clean upパスでの処理対象ビットが存在するか否かの情報を生成して格納し、
上記処理対象ビットが存在するか否かの情報が、存在することを示すデータであるとき、それに対応してマグニチュードリファインメント(Magnitude refinement)パス又はクリーンアップ(Clean up)パス処理が行われると、そのサブブロックにおける上記処理対象ビットが存在するか否かの情報が、存在しないことを示すデータに変更され、
一つのコードブロックにおけるマグニチュードリファインメント(Magnitude refinement)パス又はクリーンアップ(Clean up)パス処理時に、上記処理対象ビットが存在するか否かの情報が、そのコードブロックの全てのサブブロックに関して、存在しないことを示すデータであるとき、そのコードブロックにおけるそのパス処理を終了する
ことを特徴とする。
The present invention has been made to achieve the above object. The bit modeling processing device according to claim 1 according to the present invention includes:
In a JPEG2000 bit modeling processing apparatus that searches for and encodes or decodes a processing target bit in a pass processed in units of sub-blocks in which a code block is divided into a plurality of blocks
During processing of Shigunifikanto propagation (Significance propagation) paths for one sub-block,
It generates and stores a subsequent magnitude refinement (Magnitude refinement) path or whether the information processed bits cleanup (Clean Stay up-) path exists which is carried out in at its sub-blocks,
When the information indicating whether or not the processing target bit exists is data indicating the presence, when a magnitude refinement (Cleanup) pass process or a cleanup pass process is performed correspondingly, Information indicating whether or not the processing target bit exists in the sub-block is changed to data indicating that it does not exist,
In the magnitude refinement pass or clean up pass processing in one code block, there is no information on whether or not the processing target bit exists for all the sub blocks of the code block. When the data indicates that, the pass processing in the code block is terminated .

本発明に係る請求項2に記載の符号化復号処理装置は、
請求項1に記載のビットモデリング処理装置を含むことを特徴とするJPEG2000の符号化復号処理装置である。
The encoding / decoding processing device according to claim 2 according to the present invention includes:
A JPEG2000 encoding / decoding processing apparatus including the bit modeling processing apparatus according to claim 1 .

本発明を利用することにより、次のような効果を得ることができる。   By using the present invention, the following effects can be obtained.

MRパス、CUパスにおいて処理対象となるビットが存在するサブブロックのみ選択して処理できるので、JPEG2000の符号化、復号処理を高速に行うことができる。また、MRパス、CUパスにおいて処理対象となるビットが無ければそのパスの処理を行わずに次のパスの処理が行えるので、さらに高速な処理ができる。   Since only sub-blocks in which bits to be processed exist in the MR pass and CU pass can be selected and processed, JPEG 2000 encoding and decoding processing can be performed at high speed. In addition, if there is no bit to be processed in the MR path and CU path, the next path can be processed without performing the process for that path, so that higher speed processing can be performed.

本発明は、SPパスでの処理を行っていく際に、直後のMRパスやCUパスで処理すべきビットが判明することを利用して、それぞれのサブブロックにMRパス、あるいはCUパスでの処理対象となるビットがあるかという情報をSPパス処理時点で生成しておき、MRパス、あるいはCUパス処理時には処理対象ビットが含まれるサブブロックのみ選択して処理する。このことにより処理の高速化を図る。   The present invention makes use of the fact that the bit to be processed in the immediately following MR pass or CU pass becomes clear when performing processing in the SP pass, so that each sub-block is processed in the MR pass or CU pass. Information indicating whether there is a bit to be processed is generated at the time of the SP pass processing, and only the sub-block including the processing target bit is selected and processed at the time of the MR pass or CU pass processing. This speeds up processing.

以下、図面を参照しつつ、本発明に係る好適な実施形態を説明する。   Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.

図1は、本発明の好適な実施形態に係る符号化処理用のビットモデリング処理部2のブロック図である。従来例(図17参照)と比べると、MRパスアドレス生成部22、CUパスアドレス生成部24が追加されている。   FIG. 1 is a block diagram of a bit modeling processing unit 2 for encoding processing according to a preferred embodiment of the present invention. Compared to the conventional example (see FIG. 17), an MR path address generation unit 22 and a CU path address generation unit 24 are added.

これらのブロックは、SPパスでの処理中に更新されるssフラグとpsフラグを使って、処理中のサブブロックに次のMRパス、CUパスにおける処理対象ビットが含まれるかどうかを判断し、その判断に係る情報を格納しておく。更に、これらのブロックは、MRパス、CUパス処理中に順次その情報を使い、処理対象ビットの含まれるサブブロックのみが処理されるようにアドレス(MR_ADD、CU_ADD)を生成して出力する。また更に、これらのブロックは、それらのパスで処理対象となるビットが無い場合、そのことを示す信号(MR_NOPASS、CU_NOPASS)も出力する。   These blocks use the ss flag and ps flag that are updated during processing in the SP path to determine whether the processing target bit in the next MR path or CU path is included in the sub-block being processed, Information related to the determination is stored. Further, these blocks sequentially use the information during the MR pass and CU pass processing, and generate and output addresses (MR_ADD, CU_ADD) so that only the sub-block including the processing target bit is processed. Furthermore, these blocks also output signals (MR_NOPASS, CU_NOPASS) indicating that there is no bit to be processed in those paths.

MRパス又はCUパスが処理される際、選択・制御部20は、アドレスをインクリメントするのではなく、MR_ADD又はCU_ADDをアドレス生成部14にロードするように制御する。更に、選択・制御部20は、それぞれのパスの処理を開始する際、MR_NOPASS又はCU_NOPASSが出力されていれば、そのパスで処理するビットが無いと判断して符号化処理は行わず、パスカウンター16のパスカウント値をインクリメントして次のパスの処理を行う。   When the MR path or the CU path is processed, the selection / control unit 20 controls to load the MR_ADD or CU_ADD into the address generation unit 14 instead of incrementing the address. Further, when starting the processing of each path, the selection / control unit 20 determines that there is no bit to be processed in the path if MR_NOPASS or CU_NOPASS is output, and does not perform the encoding process. The pass count value of 16 is incremented and the next pass is processed.

図2は、MRパスアドレス生成部22の構成図を示す。MRパスアドレス生成部22では、コードブロック内のサブブロックの数と同数のフリップフロップFF0、FF1、FF2、・・・FF15が設けられる。ここで、例えば、アドレスが“0”である領域のサブブロック内に次のMRパスで処理対象となるビットが存在する場合、FF0の出力(MR_FLAG_0)が1となり、対象となるビットが存在しない場合、0となる。また、全てのサブブロックで処理対象となるビットが存在しない場合、全てのフリップフロップの出力が0となり、結果としてMR_NOPASS出力が1となる。これらのフリップフロップの動作は、en入力が1の時、set信号が入力されれば出力dは1にセットされ、clr信号が入力されれば出力dは0にクリアされる、というものである。   FIG. 2 shows a configuration diagram of the MR path address generation unit 22. In the MR path address generation unit 22, the same number of flip-flops FF0, FF1, FF2,... FF15 as the number of sub-blocks in the code block are provided. Here, for example, when there is a bit to be processed in the next MR pass in a sub-block of the area whose address is “0”, the output of FF0 (MR_FLAG_0) is 1, and there is no target bit. In this case, it becomes 0. Further, when there is no bit to be processed in all the sub-blocks, the outputs of all the flip-flops become 0, and as a result, the MR_NOPASS output becomes 1. The operation of these flip-flops is that when the en input is 1, the output d is set to 1 if the set signal is input, and the output d is cleared to 0 if the clr signal is input. .

図2に示される装置の動作を詳細に説明する。コードブロックの処理が開始される時点で、MRパスアドレス生成部22の全てのフリップフロップ(FF0、FF1、・・・FF15)の出力は、0となっている。SPパス処理時、アドレス入力がアドレスデコーダ30に入力されて、現在処理しているサブブロックに対応するフリップフロップのen入力が1となる。一方、MRパスでの処理対象ビットは、その位置のssフラグとpsフラグが共に1であるビットなので(図13参照)、更新するssフラグ(newSS)とpsフラグ(newPS)のビット毎の論理積の論理和(|(newSS & newPS))が“1”のとき、そのサブブロックにてMRパスでの処理対象ビットがあることになる。従って、そのサブブロックの処理が終ってアドレスのインクリメントが起こるタイミング(add_increment)で、前記の条件が成立すれば、現在処理しているサブブロックに対応するフリップフロップの出力が“1”にセットされる。前記条件が成立しなければ、0のままとなる。SPパスの処理においてはすべてのサブブロックが処理対象となるので、SPパスの処理終了時点ですべてのサブブロックについて処理対象ビットの有無の判断できるようになる。   The operation of the apparatus shown in FIG. 2 will be described in detail. At the time when the processing of the code block is started, the outputs of all the flip-flops (FF0, FF1,... FF15) of the MR path address generation unit 22 are zero. During the SP pass process, the address input is input to the address decoder 30 and the en input of the flip-flop corresponding to the currently processed sub-block becomes 1. On the other hand, since the processing target bit in the MR path is a bit in which both the ss flag and the ps flag are 1 (see FIG. 13), the logic for each bit of the ss flag (newSS) and the ps flag (newPS) to be updated. When the logical sum of products (| (newSS & newPS)) is “1”, there is a processing target bit in the MR pass in the sub-block. Therefore, if the above condition is satisfied at the timing (add_increment) when the address of the sub-block is finished and the address is incremented, the output of the flip-flop corresponding to the currently processed sub-block is set to “1”. The If the condition is not satisfied, it remains 0. Since all sub-blocks are processing targets in the SP pass processing, it is possible to determine whether or not there is a processing target bit for all sub-blocks when the SP pass processing ends.

MRパスアドレス生成部22の全てのフリップフロップ(FF0、FF1、・・・FF15)の出力がプライオリティエンコーダ28に入力されている。プライオリティエンコーダ28からは、出力が1であるフリップフロップのうち、先に処理されるべき位置にあるサブブロックに対応するものが優先的にデコードされてアドレス(MR_ADD)として出力される。MRパスでの処理が開始されると、add_load信号により、最初に処理されるサブブロックのアドレスがアドレス生成部14にロードされる。一方、そのアドレス出力(MR_ADD)はアドレスデコーダ30への入力となっており、add_loadが入力されるとそのアドレスに対応するフリップフロップの出力が0にクリアされる。これにより、最初に処理されるサブブロックのアドレスがアドレス生成部14にロードされると同時に、2回目に処理されるべきサブブロックのアドレスがMR_ADDより出力される。この動作を繰り返して、処理対象ビットを含む全てのサブブロックの処理が終了すると、全てのフリップフロップの出力が0にクリアされ、MR_NOPASS信号が出力される。選択・制御部20は一つのパスの処理を終って次のパスの処理を開始するように全体を制御する。   The outputs of all the flip-flops (FF0, FF1,... FF15) of the MR path address generation unit 22 are input to the priority encoder 28. From the priority encoder 28, among the flip-flops whose output is 1, the one corresponding to the sub-block at the position to be processed first is preferentially decoded and output as an address (MR_ADD). When processing in the MR path is started, the address of the sub-block to be processed first is loaded into the address generator 14 by the add_load signal. On the other hand, the address output (MR_ADD) is an input to the address decoder 30. When add_load is input, the output of the flip-flop corresponding to the address is cleared to zero. As a result, the address of the sub-block to be processed first is loaded into the address generator 14 and at the same time the address of the sub-block to be processed for the second time is output from MR_ADD. When this operation is repeated and the processing of all the sub-blocks including the processing target bit is completed, the outputs of all the flip-flops are cleared to 0 and the MR_NOPASS signal is output. The selection / control unit 20 controls the whole so as to finish the processing of one pass and start the processing of the next pass.

図3は、CUパスアドレス生成部24の構成図である。基本的な動作は、図2に示されるMRパスアドレス生成部22と同じであるが、以下の2つの点で異なっている。   FIG. 3 is a configuration diagram of the CU path address generation unit 24. The basic operation is the same as that of the MR path address generation unit 22 shown in FIG. 2, but differs in the following two points.

まず、各コードブロックの最初のビットプレーンはCUパスで処理する必要があるので、最初のCUパスではすべてのサブブロックを処理する必要がある。そのため、CUパスアドレス生成部24の全てのフリップフロップ(FF0、FF1、・・・FF15)の出力は、コードブロックの処理が開始される時点で出力が1となっている。   First, since the first bit plane of each code block needs to be processed in the CU pass, it is necessary to process all sub-blocks in the first CU pass. For this reason, the outputs of all the flip-flops (FF0, FF1,... FF15) of the CU path address generation unit 24 are 1 when the code block processing is started.

また、CUパスでの処理対象ビットは、その位置のssフラグとpsフラグが共に0のビットなので、更新するssフラグ(newSS)とpsフラグ(newPS)のビット反転したデータのビット毎の論理積の論理和(|(〜newSS &〜 newPS))が“1”のとき、アドレスのインクリメントが起こるタイミング(add_increment)で、処理しているサブブロックに対応するフリップフロップの出力が“1”にセットされる。   Further, since the ss flag and the ps flag at the position are both 0 bits for the processing target bit in the CU pass, the logical product for each bit of the bit-inverted data of the ss flag (newSS) and the ps flag (newPS) to be updated When the logical OR (| (~ newSS & ~ newPS)) is "1", the output of the flip-flop corresponding to the sub-block being processed is set to "1" at the timing of address increment (add_increment) Is done.

図4は、本発明の好適な実施形態に係るビットモデリング処理部2の選択・制御部20におけるコンテキストとディシジョンの選択の制御のフローチャートである。   FIG. 4 is a flowchart of context and decision selection control in the selection / control unit 20 of the bit modeling processing unit 2 according to the preferred embodiment of the present invention.

スタート(S00)後、pass_init信号でパスカウンターがリセットされるが、最初のパスはCUパスなので、add_load信号を発生してアドレス生成部14にCU_ADDをロードする(S02)。次にアドレス値により選択されたサブブロックのデータが各データの格納レジスタにロードされ(S04)た後、そのサブブロック内でのビットモデリング処理が行われる。(但し、先に説明したようにCUパスアドレス生成部24のフリップフロップが全て1にセットされているので、この最初のCUパスではすべてのサブブロックが処理される。)   After the start (S00), the path counter is reset by the pass_init signal, but since the first path is a CU path, an add_load signal is generated and CU_ADD is loaded into the address generation unit 14 (S02). Next, after the data of the sub-block selected by the address value is loaded into the storage register of each data (S04), the bit modeling processing in the sub-block is performed. (However, since all the flip-flops of the CU path address generation unit 24 are set to 1 as described above, all sub-blocks are processed in this first CU path.)

このサブブロック内のすべてのビットの処理が終了すると、BLK_ENDが1となるので、ssフラグ、psフラグの更新値(newSS、newPS)が格納メモリに書き込まれる(S12)。   When processing of all the bits in this sub-block is completed, BLK_END is set to 1, so the updated values (newSS, newPS) of the ss flag and ps flag are written in the storage memory (S12).

次に、処理が終ったサブブロックがそのコードブロックで最後に処理されるサブブロックかどうかが判断される。処理しているパスがMRパスかCUパスであるならば(S14・YES)NO_PASS信号にて判断し(S20)、SPパスであるならば(S14・NO)、そのアドレスが最後のサブブロックを示しているかどうかで判断する(S16)。   Next, it is determined whether the processed sub-block is the last sub-block processed in the code block. If the path being processed is an MR path or a CU path (S14, YES), a NO_PASS signal is used for determination (S20). If the path is an SP path (S14, NO), the address is the last sub-block. Judgment is made based on whether it is shown (S16).

もし、そのパスの最後のサブブロックでなければ、SPパスの場合、add_incremet信号でアドレス生成部14のアドレスをインクリメントする(S18)。MRパスかCUパスの場合、add_load信号により、処理対象ビットを含む次のサブブロックのアドレスをアドレス生成部14にロードする(S20)。   If it is not the last sub-block of the path, in the case of the SP path, the address of the address generator 14 is incremented by an add_incremet signal (S18). In the case of the MR path or the CU path, the address of the next sub-block including the processing target bit is loaded into the address generator 14 by the add_load signal (S20).

もし、そのパスの最後のサブブロックであれば、全てのパスの処理が終了したかどうかを判断して、終了していれば(S22・YES)そのコードブロックの処理を終了する(S24)。まだ、処理するパスが残っている場合(S22・NO)、pass_increment信号によりパスカウント値をインクリメントする(S24)。   If it is the last sub-block of the path, it is determined whether or not the processing of all the paths has been completed. If it has been completed (YES at S22), the processing of the code block is terminated (S24). If the path to be processed still remains (S22 / NO), the path count value is incremented by the pass_increment signal (S24).

新しいパスカウントで示されるパスがSPパスであれば、add_init信号によりアドレス生成部14のアドレスを初期化して(S28)、最初のサブブロック領域のデータのロードを行い(S04)、そのパスの処理を開始する。   If the path indicated by the new pass count is an SP path, the address of the address generation unit 14 is initialized by the add_init signal (S28), the data of the first sub-block area is loaded (S04), and the processing of that path is performed. To start.

新しいパスがMRパス又はCUパスであれば、まず、NO_PASS信号を確認する(S30)。この時点でNO_PASSが出力されていれば(S30・YES)、新しいパスでの処理対象ビットが無いことが示されているのだから、再度そのパスが最後のパスであるかどうかを確認(S22)した後、まだ処理するパスが残っていれば(S22・NO)、pass_increment信号によりパスカウント値をインクリメントして(S24)上記と同様の処理を繰り返す。   If the new path is an MR path or a CU path, first, a NO_PASS signal is confirmed (S30). If NO_PASS is output at this time (YES in S30), it is indicated that there is no processing target bit in the new path, so it is confirmed again whether the path is the last path (S22). After that, if there are still paths to be processed (S22, NO), the path count value is incremented by the pass_increment signal (S24), and the same processing as described above is repeated.

NO_PASSが出力されていなければ(S30・NO)、add_load信号によって、最初に処理すべきサブブロックを示すADD(アドレス)をアドレス生成部14にロードし(S32)、そのサブブロックのデータを各格納レジスタにロードして(S04)そのパスの処理を開始する。   If NO_PASS is not output (S30, NO), an ADD (address) indicating a sub-block to be processed first is loaded into the address generation unit 14 by an add_load signal (S32), and each sub-block data is stored. The data is loaded into the register (S04), and the processing of the path is started.

図5は、本発明の好適な実施形態に係る復号処理用のビットモデリング処理部2のブロック図である。   FIG. 5 is a block diagram of the bit modeling processing unit 2 for decoding processing according to a preferred embodiment of the present invention.

従来例(図22参照)と同様、符号化処理用のビットモデリング処理部と大きく異なるのは、ディシジョン(D)が、ビットモデリング処理部により出力されるのではなく、MQ復号器が符号を復号した結果として出力される点である。そのため、図1の符号化処理用のビットモデリング処理部2と比べると、ディシジョン(D)からビットデータ、サインビットを生成するサインビット・ビットデータ生成部46が追加されている。   As in the conventional example (see FIG. 22), the difference from the bit modeling processing unit for encoding processing is that the decision (D) is not output by the bit modeling processing unit, but the MQ decoder decodes the code. This is the point that is output as a result. Therefore, as compared with the bit modeling processing unit 2 for encoding processing in FIG. 1, a sign bit / bit data generating unit 46 for generating bit data and sign bit from the decision (D) is added.

本発明の好適な実施形態に係る符号化処理用のビットモデリング処理部のブロック図である。It is a block diagram of a bit modeling processing unit for encoding processing according to a preferred embodiment of the present invention. MRパスアドレス生成部の構成図である。It is a block diagram of a MR path address generation unit. CUパスアドレス生成部の構成図である。It is a block diagram of a CU path address generation part. 本発明の好適な実施形態に係るビットモデリング処理部の選択・制御部におけるコンテキストとディシジョンの選択の制御のフローチャートである。6 is a flowchart of context and decision selection control in a selection / control unit of a bit modeling processing unit according to a preferred embodiment of the present invention. 本発明の好適な実施形態に係る復号処理用のビットモデリング処理部のブロック図である。It is a block diagram of a bit modeling processing unit for decoding processing according to a preferred embodiment of the present invention. (1)は、画像データがウエーブレット変換によりサブバンド毎の係数データに変換されている例を示す概念図である。(2)は、1つのサブバンドが複数のコードブロックに分割されている例を示す図である。(3)は、コードブロックの係数データがビットプレーンに分割されている例を示す概念図である。(4)は、このコードブロック内のビットプレーンが、上位から続くゼロビットプレーンとビットモデリングを用いた符号化の対象となるビットプレーンとに分割されている様子を示す図である。(1) is a conceptual diagram illustrating an example in which image data is converted into coefficient data for each subband by wavelet conversion. (2) is a diagram illustrating an example in which one subband is divided into a plurality of code blocks. (3) is a conceptual diagram illustrating an example in which coefficient data of a code block is divided into bit planes. (4) is a diagram illustrating a state in which the bit plane in the code block is divided into a zero bit plane that continues from the top and a bit plane that is to be encoded using bit modeling. 符号化対象となるビットを探索するためそのビットプレーンをスキャンする順番を示す図である。It is a figure which shows the order which scans the bit plane in order to search the bit used as encoding object. ビットモデリングの符号化処理の具体例である。It is a specific example of the encoding process of bit modeling. (1)は、JPEG2000における符号化処理の概略フロー図である。(2)は、係数ビットモデリング部とMQ符号化器の間のデータの流れを示す図である。(3)は、復号時の係数ビットモデリング部とMQ復号器の間のデータの流れを示す図である。(1) is a schematic flow diagram of encoding processing in JPEG2000. (2) is a diagram illustrating a data flow between the coefficient bit modeling unit and the MQ encoder. (3) is a diagram illustrating a data flow between the coefficient bit modeling unit and the MQ decoder at the time of decoding. LLサブバンド、LHサブバンドに含まれるコードブロックの符号化においてSPパスで生成されるコンテキストを示す図である。It is a figure which shows the context produced | generated by SP path in the encoding of the code block contained in LL subband and LH subband. サインビットを符号化する際に生成されるコンテキストを示す図である。It is a figure which shows the context produced | generated when encoding a sign bit. MRパスで生成されるコンテキストを示す図である。It is a figure which shows the context produced | generated by MR path | pass. それぞれのパスでの処理対象となるsignificance state(ss)と、pass bit(ps)の組み合わせ、及び、そのビットを処理した後に更新される significance state(ss)とpass bit(ps)の値(new ss 、new ps)を示す図である。The combination of the signature state (ss) and pass bit (ps) to be processed in each pass, and the value of the signature state (ss) and pass bit (ps) updated after processing the bit (new) ss, new ps). (1)は、16×16のコードブロックが4×4のサブブロックに分割されている様子を示す図である。(2)は、4×4のサブブロックに対して必要な6×6の領域を示す図である。(1) is a diagram illustrating a state in which a 16 × 16 code block is divided into 4 × 4 sub-blocks. (2) is a diagram showing a 6 × 6 area necessary for a 4 × 4 sub-block. 従来例の符号化ビットモデリング装置のブロック図である。It is a block diagram of the coding bit modeling apparatus of a prior art example. (1)は、コードブロックに係るデータの格納例である。(2)は、図14(2)における“5”のサブブロックを処理する場合に必要となる6×6領域のデータが、レジスタに入力されている様子を示す図である。(1) is an example of data storage related to a code block. (2) is a diagram illustrating a state in which 6 × 6 area data necessary for processing the sub-block “5” in FIG. 14 (2) is input to the register. 従来例のビットモデリング処理部のブロック図である。It is a block diagram of the bit modeling process part of a prior art example. (1)は、従来例のパス決定ユニットの詳細なブロック図である。(2)(3)はそれぞれ、各ビット位置を示す番号・記号が付された4×4領域と6×6領域の図である。(1) is a detailed block diagram of a conventional path determination unit. (2) and (3) are diagrams of a 4 × 4 area and a 6 × 6 area, respectively, with numbers and symbols indicating the respective bit positions. 従来例の処理ビット決定部の詳細なブロック図である。It is a detailed block diagram of the processing bit determination part of a prior art example. 従来例の選択・制御部におけるコンテキストとディシジョンの選択の制御に係る概略のフローチャートである。It is a general | schematic flowchart regarding the control of selection of a context and a decision in the selection / control part of a prior art example. 従来例の復号ビットモデリング装置の1つの例を示す。An example of a conventional decoding bit modeling apparatus is shown. 従来例のビットモデリング処理部のブロック図である。It is a block diagram of the bit modeling process part of a prior art example.

符号の説明Explanation of symbols

2・・・ビットモデリング処理部、14・・・アドレス生成部、16・・・パスカウンター、20・・・選択・制御部、22・・・MRパスアドレス生成部、24・・・CUパスアドレス生成部、46・・・サインビット・ビットデータ生成部。

2 ... Bit modeling processing unit, 14 ... Address generation unit, 16 ... Pass counter, 20 ... Selection / control unit, 22 ... MR path address generation unit, 24 ... CU path address Generation unit, 46... Sign bit / bit data generation unit.

Claims (2)

コードブロックが複数に分割されたサブブロック単位で処理するパスにおける処理対象のビットを、探索して符号化、又は復号の処理を行うJPEG2000のビットモデリング処理装置において、
一つのサブブロックに対するシグニフィカントプロパゲーション(Significance propagationパスの処理中に、
そのサブブロックにてその後で実施されるマグニチュードリファインメント(Magnitude refinementパス又はクリーンアップ(Clean upパスでの処理対象ビットが存在するか否かの情報を生成して格納し、
上記処理対象ビットが存在するか否かの情報が、存在することを示すデータであるとき、それに対応してマグニチュードリファインメント(Magnitude refinement)パス又はクリーンアップ(Clean up)パス処理が行われると、そのサブブロックにおける上記処理対象ビットが存在するか否かの情報が、存在しないことを示すデータに変更され、
一つのコードブロックにおけるマグニチュードリファインメント(Magnitude refinement)パス又はクリーンアップ(Clean up)パス処理時に、上記処理対象ビットが存在するか否かの情報が、そのコードブロックの全てのサブブロックに関して、存在しないことを示すデータであるとき、そのコードブロックにおけるそのパス処理を終了する
ことを特徴とするビットモデリング処理装置。
In a JPEG2000 bit modeling processing apparatus that searches for and encodes or decodes a processing target bit in a pass that is processed in units of subblocks in which a code block is divided into a plurality of blocks,
During processing of Shigunifikanto propagation (Significance propagation) paths for one sub-block,
It generates and stores a subsequent magnitude refinement (Magnitude refinement) path or whether the information processed bits cleanup (Clean Stay up-) path exists which is carried out in at its sub-blocks,
When the information indicating whether or not the processing target bit exists is data indicating the presence, when a magnitude refinement (Cleanup) pass process or a cleanup (Cleanup) pass process is performed correspondingly, Information indicating whether or not the processing target bit exists in the sub-block is changed to data indicating that it does not exist,
In the magnitude refinement pass or clean up pass processing in one code block, there is no information on whether or not the processing target bit exists for all the sub blocks of the code block. The bit modeling processing device, wherein the pass processing in the code block is terminated when the data indicates the data .
請求項1に記載のビットモデリング処理装置を含むことを特徴とするJPEG2000の符号化復号処理装置 A JPEG2000 encoding / decoding processing apparatus comprising the bit modeling processing apparatus according to claim 1 .
JP2004206223A 2004-07-13 2004-07-13 Bit modeling processor Expired - Fee Related JP4365740B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004206223A JP4365740B2 (en) 2004-07-13 2004-07-13 Bit modeling processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004206223A JP4365740B2 (en) 2004-07-13 2004-07-13 Bit modeling processor

Publications (2)

Publication Number Publication Date
JP2006033179A JP2006033179A (en) 2006-02-02
JP4365740B2 true JP4365740B2 (en) 2009-11-18

Family

ID=35899035

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004206223A Expired - Fee Related JP4365740B2 (en) 2004-07-13 2004-07-13 Bit modeling processor

Country Status (1)

Country Link
JP (1) JP4365740B2 (en)

Also Published As

Publication number Publication date
JP2006033179A (en) 2006-02-02

Similar Documents

Publication Publication Date Title
KR100354799B1 (en) Image encoder and image decoder
US7418146B2 (en) Image decoding apparatus
US6546053B1 (en) System and method for decoding signal and method of generating lookup table for using in signal decoding process
JP3457269B2 (en) Arithmetic encoding / decoding method and arithmetic encoding / decoding device
JP4061104B2 (en) Memory access and skipping based on run / skip count by context model
JP4365740B2 (en) Bit modeling processor
JP5147102B2 (en) Memory access method
JP4182426B2 (en) Image processing apparatus, image processing method, and image processing program
CN101192303B (en) High speed bit flat surface decoding method and circuit suitable for Jpeg2000 standard
CN112449201A (en) Decoding method, encoding method, corresponding devices, electronic equipment and storage medium
CN114079774B (en) Method and device for encoding and decoding inter-frame prediction information
JP4771263B2 (en) Entropy encoding / decoding method and entropy encoding / decoding device
JP2934603B2 (en) Method and apparatus for decoding variable length code
CN112565750A (en) Video coding method, electronic equipment and storage medium
JP4986906B2 (en) Decoding device, decoding method, program, and recording medium
JP3193285B2 (en) Coding noise reduction filter circuit
CN101296298B (en) Method and device for high-speed decoding of binary images
CN117197264A (en) Data true lossless compression and decompression method for graphic image access intensive system
JPH0714205B2 (en) Sequential reproduction vector quantization encoding / decoding device
JP4234018B2 (en) Digital video / audio signal lossless encoding / decoding method and apparatus, and recording medium recording a computer program for executing the method
JP2005229218A (en) Image decoding apparatus
JP5412901B2 (en) Decoding device, image processing device, decoding method and program
JPH10262154A (en) Multicolor image encoding apparatus and method, and multicolor image decoding apparatus and method
JPS63132573A (en) Halftone image coding circuit
JPH1117958A (en) Coder and decoder

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070625

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090512

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090519

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090721

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090811

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090821

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

Free format text: PAYMENT UNTIL: 20120828

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120828

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130828

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees