[go: up one dir, main page]

JP2000299641A - Encoding device, decoding device, encoding / decoding device, encoding method, and decoding method - Google Patents

Encoding device, decoding device, encoding / decoding device, encoding method, and decoding method

Info

Publication number
JP2000299641A
JP2000299641A JP10416299A JP10416299A JP2000299641A JP 2000299641 A JP2000299641 A JP 2000299641A JP 10416299 A JP10416299 A JP 10416299A JP 10416299 A JP10416299 A JP 10416299A JP 2000299641 A JP2000299641 A JP 2000299641A
Authority
JP
Japan
Prior art keywords
code
encoding
value
data
decoding
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.)
Granted
Application number
JP10416299A
Other languages
Japanese (ja)
Other versions
JP3745160B2 (en
Inventor
Tomohiro Kimura
智広 木村
Masayuki Yoshida
雅之 吉田
Fumitaka Ono
文孝 小野
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP10416299A priority Critical patent/JP3745160B2/en
Priority to TW89104027A priority patent/TW447196B/en
Priority to DE60000247T priority patent/DE60000247T2/en
Priority to EP20000107249 priority patent/EP1045520B1/en
Priority to US09/547,136 priority patent/US6373408B1/en
Priority to KR1020000018886A priority patent/KR100327688B1/en
Publication of JP2000299641A publication Critical patent/JP2000299641A/en
Application granted granted Critical
Publication of JP3745160B2 publication Critical patent/JP3745160B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/40Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
    • H03M7/42Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code using table look-up for the coding or decoding process, e.g. using read-only memory
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/40Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/60General implementation details not specific to a particular type of compression
    • H03M7/6011Encoder aspects

Landscapes

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

Abstract

(57)【要約】 【課題】 桁上がりを制御により符号を確定させ所定の
パターンへの置き換えにより総符号長と符号の掃出し時
間を短縮する。 【課題手段】 情報源データを蓄積するデータメモリ、
補助パラメータを基に指定される符号化対象データに関
する学習データを蓄積する学習メモリ、学習データを基
に指定される符号化パラメータを出力する確率推定テー
ブル、符号化対象データと符号化パラメータを基に算術
符号化を行い符号を出力する符号器を備える符号化装置
において、情報源データの入力処理毎または符号の出力
毎に所定の間隔を計測して通知する同期検出器、所定の
間隔で有効領域内の桁上がり境界値を検出すると共に、
その検出結果に基づいて有効領域内の切り捨て領域を指
示する桁上がり境界検出器を備え、符号器は、桁上がり
検出器により指示された有効領域を上位と下位に等分し
た部分領域の一方を切り捨てて有効領域を更新する。
(57) [Summary] [Problem] To reduce the total code length and the code sweeping time by determining the code by controlling the carry and replacing it with a predetermined pattern. A data memory for storing information source data,
A learning memory that stores learning data relating to encoding target data specified based on auxiliary parameters, a probability estimation table that outputs encoding parameters specified based on the learning data, and In an encoding device including an encoder that performs arithmetic encoding and outputs a code, a synchronization detector that measures and notifies a predetermined interval at each input processing of information source data or at each output of a code, and an effective area at a predetermined interval. The carry boundary value within
A carry boundary detector that indicates a truncation area in the effective area based on the detection result is provided, and the encoder is configured to divide one of the partial areas obtained by equally dividing the effective area indicated by the carry detector into upper and lower parts. Update the valid area by truncating.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、画像あるいはデ
ータの算術符号化および算術復号化に係るもので、符号
化装置、復号化装置、符号化復号化装置、符号化方法並
びに復号化方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to arithmetic coding and decoding of images or data, and more particularly to a coding device, a decoding device, a coding / decoding device, a coding method and a decoding method. It is.

【0002】[0002]

【従来の技術】図39は算術符号化の概念を示す説明図
である。図39において、数直線上の全体の有効領域を
優勢シンボルMPSと劣勢シンボルLPSに対する二つ
の部分領域に分割し、出現したシンボルに対応する部分
領域を新規有効領域に更新するという手順で符号化が行
われる。しかし、領域幅が小さくなるにつれて2進小数
(固定小数点)で示したように下界値、上界値は有効桁
数が増加し、演算のためのレジスタ精度も必要となって
くる。
2. Description of the Related Art FIG. 39 is an explanatory diagram showing the concept of arithmetic coding. In FIG. 39, encoding is performed in such a manner that the entire effective area on the number line is divided into two partial areas for the superior symbol MPS and the inferior symbol LPS, and the partial area corresponding to the appearing symbol is updated to a new effective area. Done. However, as the area width becomes smaller, the number of significant digits of the lower bound value and the upper bound value increases as shown by a binary decimal number (fixed point), and the register precision for the operation becomes necessary.

【0003】ここで、有効桁数が増加しても上位桁はほ
とんど変化がないことに注目し、図40に示すように、
小数部を常に領域分割の精度(図では3桁)に保ち、上
位桁を整数部に掃き出すために正規化処理を行う。図4
0では、正規化処理で2のべき乗倍に拡大することによ
って、有効領域幅Aを1/2に当たる4以上、1に当た
る8以下(8は初期値のみ)にとし、下界値(符号)C
とすれば有効領域はC以上C+A未満で表すことができ
る。
Here, it is noted that even when the number of significant digits increases, the upper digits hardly change, and as shown in FIG.
The decimal part is always kept at the accuracy of area division (three digits in the figure), and normalization is performed to sweep out the upper digits to the integer part. FIG.
At 0, the effective area width A is set to 4 or more corresponding to 1/2 and 8 or less (8 is only the initial value) by expanding the effective area width A to a power of 2 by the normalization processing, and the lower bound value (sign) C
Then, the effective area can be represented by C or more and less than C + A.

【0004】第1の従来例について 第1の従来例の算術符号化の符号器(Encoder)・復号
器(Decoder)は、ITU−Tの国際標準勧告T.82
に記載されるテーブルおよび処理を説明するフローチャ
ートによって実現できる。以下、この算術符号化をQM
−Coder、その符号器を符号部1A、その復号器を
復号部16Aと呼ぶものとし、その符号器と復号器の概
略構成を図41、図42に示す。
A first conventional example An encoder (Decoder) and a decoder (Decoder) for arithmetic coding according to a first conventional example are based on ITU-T International Standard Recommendation T.30. 82
Can be realized by a table and a flowchart describing processing. Hereinafter, this arithmetic coding is referred to as QM
-Coder, its encoder is referred to as an encoder 1A, and its decoder is referred to as a decoder 16A. FIGS. 41 and 42 show schematic configurations of the encoder and the decoder.

【0005】図41において、符号部1Aの入力は2つ
あり、第1の入力はコンテクストCX(Context)2で
あり、第2の入力は符号化する画素PIX(Pixel)3
である。出力は符号(Code)4Aである。また、図42
において、復号部16Aの入力は2つあり、第1の入力
はコンテクストCX2であり、第2の入力は符号4Aで
ある。出力は、復号された画素PIX3である。
In FIG. 41, there are two inputs to a coding section 1A, a first input is a context CX (Context) 2, and a second input is a pixel PIX (Pixel) 3 to be coded.
It is. The output is Code 4A. FIG.
, There are two inputs to the decoding unit 16A, the first input is the context CX2, and the second input is the code 4A. The output is the decoded pixel PIX3.

【0006】データメモリ5は、画像(Image)6を蓄
積し、符号化または復号化の対象となる画素に対して共
通に参照できる近隣のすでに符号化/復号化済みの画素
の中で、参照位置をモデルテンプレート(Model Templa
te)で指定される10画素の参照パターンであるコンテ
クスト(10ビット。総数1024)CX2を生成す
る。また、符号化のときは同時に符号化対象画素を出力
し、復号化のときは復号された復号対象画素を蓄積す
る。
The data memory 5 stores an image (Image) 6 and, among neighboring pixels which have already been encoded / decoded, which can be commonly referred to with respect to a pixel to be encoded or decoded. Position the model template (Model Templa
A context (10 bits, total number: 1024) CX2 that is a reference pattern of 10 pixels specified by te) is generated. Also, at the time of encoding, the encoding target pixel is output at the same time, and at the time of decoding, the decoded pixel to be decoded is accumulated.

【0007】QM−Coderには、コンテクストCX
2を生成するための図43に示される2ラインおよび3
ラインの標準モデルテンプレートのいずれかを選択し、
規定のヘッダ情報によって符号器から復号器に通知す
る。
[0007] The QM-coder has a context CX
2 and 3 shown in FIG.
Select one of the standard model templates for the line,
The encoder informs the decoder using the specified header information.

【0008】QM−Coderでは、符号化/復号化対
象画素に対する各コンテクストごとに画素値の予測一致
確率を推定し、その変動に伴って学習しながら符号化/
復号化を進める。学習は、コンテクストをインデクスと
する2つの変数テーブルで構成される学習メモリを書き
換えることによって行われる。1つは、出現する確率の
高い画素値MPS(More Probable Symbol:優勢シンボ
ル)を予測値として記憶する各1ビットのMPSテーブ
ル7である(予測一致確率の低い画素値はLPS[Less
Probable Symbol:劣勢シンボル]という)。もう1つ
は、予測値の予測一致確率の程度を総計113の状態
(State)に分類した状態番号(0〜112)を記憶す
る各7ビットのSTテーブル8である。初期値はMPS
テーブル7、STテーブル8ともに全て0である。
[0008] In the QM-coder, the prediction coincidence probability of the pixel value is estimated for each context with respect to the pixel to be encoded / decoded, and the encoding / decoding is performed while learning according to the fluctuation.
Proceed with decryption. The learning is performed by rewriting a learning memory composed of two variable tables each having a context as an index. One is a 1-bit MPS table 7 that stores a pixel value MPS (More Probable Symbol: dominant symbol) having a high probability of appearing as a predicted value (a pixel value having a low predicted matching probability is LPS [Less
Probable Symbol]. The other is a 7-bit ST table 8 for storing state numbers (0 to 112) in which the degree of the predicted matching probability of the predicted value is classified into a total of 113 states. Default value is MPS
Table 7 and ST table 8 are all 0.

【0009】変数テーブルの他に、符号化/復号の際に
状態番号(ステート)をインデクスとして参照する4つ
の定数テーブルで構成される確率推定テーブル(Probab
ility Estimation Table)が存在する。LPS領域幅を
16ビットで表すLSZテーブル9、MPS遷移先を7
ビットで表すNMPSテーブル10、LPS遷移先を7
ビットで表すNLPSテーブル11、予測値反転判定を
1ビットで表すSWTCHテーブル12である。その設
定値を図44に示す(ここで示した英字の変数・定数テ
ーブル名は、後述の処理を説明するフローチャートで用
いる配列名とする)。
[0009] In addition to the variable table, a probability estimation table (Probab) composed of four constant tables that refer to state numbers (states) as indexes during encoding / decoding.
ility Estimation Table). LSZ table 9 representing LPS area width by 16 bits, MPS transition destination is 7
NMPS table 10 represented by bits, LPS transition destination is 7
An NLPS table 11 represented by bits, and a SWTCH table 12 represented by 1 bit for prediction value inversion determination. The set values are shown in FIG. 44 (the alphabetic variable / constant table name shown here is an array name used in a flowchart for describing processing to be described later).

【0010】LSZテーブル9は、算術符号器13A/
算術復号器17A内の演算部で参照され、適応予測の学
習には直接的には関係しない。算術符号器13A/算術
復号器17Aの内部ではLSZ値を用いて演算が行わ
れ、演算精度が低下した際には正規化処理(Renormaliz
ation)を行う。この正規化処理が行われるとき、同時
に学習が指示される。
The LSZ table 9 has an arithmetic encoder 13A /
It is referred to by the arithmetic unit in the arithmetic decoder 17A and is not directly related to learning of adaptive prediction. The arithmetic operation is performed using the LSZ value inside the arithmetic encoder 13A / arithmetic decoder 17A, and the normalization processing (Renormaliz
ation). When this normalization processing is performed, learning is instructed at the same time.

【0011】符号化のとき、画素シンボル変換器15
は、コンテクストCX2をインデクスとしてMPSテー
ブル7から出力されたMPS値と画素PIX3の一致/
不一致を判定して、2値シンボル14を算術符号器13
A、学習メモリ(MPSテーブル7、STテーブル8)
へ出力し、学習指示により学習を行う。
At the time of encoding, the pixel symbol converter 15
Is the coincidence of the pixel PIX3 with the MPS value output from the MPS table 7 using the context CX2 as an index /
The discrepancy is determined, and the binary symbol 14 is converted to the arithmetic coder 13
A, learning memory (MPS table 7, ST table 8)
And learning is performed according to the learning instruction.

【0012】また、復号のとき、シンボル画素変換器1
8は、算術復号器17Aで復号された2値シンボル14
から、コンテクストCX2をインデクスとしてMPSテ
ーブル7から出力されたMPS値と復号すべき画素PI
X3の一致/不一致を判定し、一致ならばMPS値、不
一致ならばLPS値(=1−MPS)を画素PIX3値
ととして復号する。復号された2値シンボル14は、学
習メモリ(MPSテーブル7、STテーブル8)へ出力
し、学習指示により学習を行う。
At the time of decoding, the symbol pixel converter 1
8 is a binary symbol 14 decoded by the arithmetic decoder 17A.
From the MPS value output from the MPS table 7 using the context CX2 as an index and the pixel PI to be decoded
Judgment is made as to whether X3 matches or not, and if they match, the MPS value is decoded, and if they do not match, the LPS value (= 1−MPS) is decoded as the pixel PIX3 value. The decoded binary symbol 14 is output to a learning memory (MPS table 7, ST table 8), and learning is performed according to a learning instruction.

【0013】学習が指示されたとき、符号化/復号対象
の2値シンボル14が優勢シンボルであればNMPSテ
ーブル値10を、劣勢シンボルであればNLPSテーブ
ル値11をSTテーブル8に書き込み、状態遷移が実現
される。また、劣勢シンボルによる学習では、その予測
一致確率が1/2であればMPSテーブル値を反転(演
算「1−MPS」)させてMPSテーブルに書き込む。
その一致確率が1/2であるかどうかは、SWTCH値
をフラグとして判定される。
When learning is instructed, the NMPS table value 10 is written to the ST table 8 if the binary symbol 14 to be encoded / decoded is the superior symbol, and the NLPS table value 11 is written to the ST table 8 if the binary symbol 14 is the inferior symbol. Is realized. In the learning using the inferior symbol, if the predicted matching probability is 1 /, the MPS table value is inverted (operation “1-MPS”) and written into the MPS table.
Whether the match probability is 1/2 is determined using the SWTCH value as a flag.

【0014】算術符号器13Aは、LSZ値9と2値シ
ンボル14の入力から、符号(領域下界値)を示すCレ
ジスタ30Aと領域幅を示すAレジスタ31で符号化演
算が進められ、CTカウンタ50でバイト単位の符号出
力タイミングを計り、BUFFER51とSCカウンタ
で桁上がりの伝搬可能性のある未確定の符号出力待機と
確定した符号出力を行い、符号4Aを出力する。
The arithmetic encoder 13A performs an encoding operation on the input of the LSZ value 9 and the binary symbol 14 by a C register 30A indicating a code (area lower limit value) and an A register 31 indicating an area width. At 50, the code output timing is measured in byte units, the BUFFER 51 and the SC counter perform an undetermined code output standby with a possibility of carry-up and a determined code output, and output a code 4A.

【0015】また、算術復号器17Aは、LSZ値9と
符号4Aの入力から、CTカウンタ50でバイト単位の
符号入力タイミングを計り、BUFFER51を介し
て、領域下界値から符号4Aまでの変位を示すCレジス
タ30Bと、領域幅を示すAレジスタ31で復号演算が
進められ、2値シンボル14を出力する。
The arithmetic decoder 17A measures the code input timing in byte units by the CT counter 50 from the input of the LSZ value 9 and the code 4A, and indicates the displacement from the lower limit of the area to the code 4A via the BUFFER 51. The decoding operation is advanced by the C register 30B and the A register 31 indicating the area width, and the binary symbol 14 is output.

【0016】図41と図42に示される構成ブロック内
およびブロック間の詳細な処理動作は、後述の処理を説
明するフローを示す図46ないし図62で説明する。
Detailed processing operations within and between the constituent blocks shown in FIGS. 41 and 42 will be described with reference to FIGS.

【0017】符号化処理を説明するフローおよび復号処
理を説明するフローを説明する前に、符号化レジスタ
(Cレジスタ)30A、復号レジスタ(Cレジスタ)3
0Bおよび領域幅レジスタ(Aレジスタ)31のビット
配置を図45に示す。
Before describing the flow describing the encoding process and the flow describing the decoding process, the encoding register (C register) 30A and the decoding register (C register) 3
FIG. 45 shows the bit arrangement of 0B and the area width register (A register) 31.

【0018】符号化レジスタ(C)30Aにおいて、b
it15とbit16の間に小数点を設定し、"x"(1
6ビット)はLSZ9に対する演算部Cx32であり、
キャリがある場合はより上位へ伝搬する。"s"(3ビッ
ト)はスペーサビット部Cs33、"b"(8ビット)は
バイト出力部Cb34、"c"(1ビット)は桁上がり判
定部Cc35である。符号化の過程において、Cレジス
タ値は符号4として符号化したシンボルに対応させた領
域の下界値となるように更新される。
In the encoding register (C) 30A, b
A decimal point is set between it15 and bit16, and "x" (1
6 bits) is an operation unit Cx32 for LSZ9,
If there is a carry, it propagates to a higher level. "s" (3 bits) is a spacer bit section Cs33, "b" (8 bits) is a byte output section Cb34, and "c" (1 bit) is a carry determination section Cc35. In the course of the encoding, the C register value is updated so as to be the lower limit of the area corresponding to the symbol encoded as code 4.

【0019】復号レジスタ(C)30Bにおいて、下位
ワードCLOW36と上位ワードCHIGH38は32
ビットのレジスタとして実現でき、MSBであるbit
31の上位に小数点を設定し、"b"(8ビット)はバイ
ト入力部(CLOWレジスタ36)の上位バイトCb3
7、"x"(16ビット)はLSZ9に対する演算部Cx
(CHIGHレジスタ38)39である。復号の過程に
おいて、Cレジスタ値は復号したシンボルに対応させた
領域の下界値からその領域内の座標である符号4へのオ
フセット値となるように更新される。
In the decoding register (C) 30B, the lower word CLOW 36 and the upper word CHIGH 38 are 32
Bit register that can be realized as a register of bits
A decimal point is set at the upper part of 31 and "b" (8 bits) is the upper byte Cb3 of the byte input part (CLOW register 36).
7, "x" (16 bits) is the operation unit Cx for LSZ9
(CHIGH register 38) 39. In the decoding process, the C register value is updated so as to be an offset value from the lower bound value of the area corresponding to the decoded symbol to the code 4 which is the coordinates in the area.

【0020】領域幅レジスタ(A)31は符号化/復号
で共通とし、符号化/復号レジスタ30A、30Bの小
数点に対応して、"x"レジスタ部に合わせて"a"(16
ビット)が小数部として配置され、初期状態の値でのみ
整数部(bit16)が"1"なる。領域幅(領域サイズ
ともいう)は、A−LSZ(下方領域幅)またはLSZ
(上方領域幅)に更新され、初期値(整数部="1")を
除いて1/2の重みを示すbit15が"1"となるよう
に正規化され、1/2以上に保つことによって、上方領
域幅としていかなるLSZ9を選択しても下方領域の確
保を保証する。正規化処理では、Aレジスタ31、Cレ
ジスタ30Aまたは30Bを同時にシフト処理によって
拡大する。
The area width register (A) 31 is common to the encoding / decoding, and corresponds to the decimal point of the encoding / decoding registers 30A and 30B, so that "a" (16
Bit) is arranged as a decimal part, and the integer part (bit 16) is "1" only in the initial state value. The area width (also called area size) is A-LSZ (lower area width) or LSZ
(Upper region width) is updated so that bit15 indicating a weight of 1/2 except for the initial value (integer part = "1") is normalized to be "1", and is maintained at 1/2 or more. Whatever LSZ 9 is selected as the upper region width, the lower region is ensured. In the normalization processing, the A register 31 and the C register 30A or 30B are simultaneously enlarged by the shift processing.

【0021】QM−Coderでは、状態に対して固定
サイズとなる上方領域LSZ9は通常劣勢シンボルに割
り当てられるが、下方領域が上方領域より小さくなると
きには優勢シンボルに割り当てる「条件付きMPS/L
PS交換」を行っている。劣勢シンボルを符号化/復号
したとき、および条件付きMPS/LPS交換を適用し
て優勢シンボルを符号化/復号したときには正規化処理
が必ず行われる。
In the QM-coder, the upper region LSZ9, which has a fixed size with respect to the state, is normally assigned to the inferior symbol, but is assigned to the superior symbol when the lower region is smaller than the upper region.
PS exchange ". When encoding / decoding the inferior symbol and encoding / decoding the superior symbol by applying the conditional MPS / LPS exchange, the normalization process is always performed.

【0022】このレジスタのビット配置を基に、符号化
の処理を説明するフロー、復号の処理を説明するフロー
を説明する。処理を説明するフロー中の用語「レイヤ」
は階層的符号化の場合の「(解像度)層」、「ストライ
プ」は画像をNライン単位(最終ストライプのみNライ
ン以下、また、N=1でも構わない)で区切った「短
冊」を意味する。ここでは、レイヤ数=1、ストライプ
=ライン(N=1)として説明するが、複数レイヤの符
号化/復号への拡張を妨げるものではない。
Based on the bit arrangement of the register, a flow for explaining the encoding process and a flow for explaining the decoding process will be described. The term "layer" in the flow describing the process
Means "(resolution) layer" in the case of hierarchical coding, and "stripes" means "strips" obtained by dividing an image in units of N lines (only the last stripe is N lines or less, or N = 1). . Here, the number of layers = 1 and the stripe = line (N = 1) will be described, but this does not prevent extension to encoding / decoding of a plurality of layers.

【0023】符号化/復号処理を説明するフローを説明
するために、図41、図42、図45で説明した変数、
テーブル、レジスタの他に、次の補助変数CT50、B
UFFER51、SC52、TEMP53を使用する。
CT50は、正規化処理によるCレジスタ30A、30
BおよびAレジスタ31のシフト数を計数し、値が0と
なったとき次の符号バイト入出力を行うための補助変数
である。BUFFER51は、符号化のときCレジスタ
30Aから出力された符号バイト値、復号のときCレジ
スタ30Bへ入力される符号バイト値を格納する補助変
数である。SC52は、符号化のみで使用され、Cレジ
スタ30Aから出力された符号バイト値が0xFFであ
るときその連続数を計数する補助変数である。
In order to explain the flow for explaining the encoding / decoding processing, the variables described in FIGS.
In addition to tables and registers, the following auxiliary variables CT50, B
UFFER51, SC52, and TEMP53 are used.
CT50 is the C register 30A, 30
This is an auxiliary variable for counting the number of shifts of the B and A registers 31 and, when the value becomes 0, performing the next code byte input / output. BUFFER 51 is an auxiliary variable that stores the code byte value output from the C register 30A during encoding and the code byte value input to the C register 30B during decoding. SC52 is an auxiliary variable used only for encoding and counting the number of consecutive bytes when the code byte value output from the C register 30A is 0xFF.

【0024】なお、本明細書において"0x"で始まる数
値は16進数を表すものとする。TEMP53は、符号
化のみで使用され、BUFFER51への桁上がりを検
出し、桁上がり処理後はその下位8ビットを新たなBU
FFER値51とするための補助変数である。Cレジス
タ30AからTEMP53を介して設定されるBUFF
ER51は桁上がり処理を行わずに0xFFとなること
はなく、その時点でBUFFER51から下位、つまり
BUFFER51、SC52個の0xFFはCレジスタ
30Aより上位への桁上がりあれば変更される可能性が
あるためCレジスタ30Aから出力されていても符号4
として確定できていない。
In this specification, a numerical value starting with "0x" represents a hexadecimal number. The TEMP 53 is used only for encoding, detects a carry to the BUFFER 51, and after carry processing, the lower 8 bits are replaced with a new BU.
This is an auxiliary variable for setting the FFER value 51. BUFF set from C register 30A through TEMP53
The ER51 does not become 0xFF without performing the carry process, and at that time, the lower 0xFF of the BUFFER51, that is, the BUFFER51 and SC52 0xFFs may be changed if the carry goes higher than the C register 30A. Code 4 even if output from C register 30A
Has not been determined.

【0025】図46は、符号化処理の全体の流れを示す
ENCODER処理を説明するフローチャートである。
国際標準勧告T.82の本処理を説明するフローチャー
トにあるTP(Typical Prediction)およびDP(Dete
rministic Prediction)に関する処理は、直接的な関係
がないため省略する。まず、S101ではINITEN
C処理を呼び出し、符号化処理の初期化を行う。S10
2では画素PIX3とコンテクストCX2の組を1つず
つ読み出し、S103ではENCODE処理によって符
号化を行う。S104ではストライプ(ここではライ
ン)が終了するまでS102およびS103を繰り返
し、さらにS105では画像が終了するまでS102か
らS104までストライプの符号化を繰り返す。S10
6でFLUSH処理を呼び出して符号化処理の後処理を
行う。
FIG. 46 is a flowchart for explaining the ENCODER process showing the entire flow of the encoding process.
International Standard Recommendation T. 82, TP (Typical Prediction) and DP (Dete
The processing related to (rministic Prediction) is omitted because there is no direct relation. First, in S101, INITEN
The C processing is called, and the encoding processing is initialized. S10
In step 2, a pair of the pixel PIX3 and the context CX2 is read one by one, and in step S103, encoding is performed by ENCODE processing. In S104, S102 and S103 are repeated until the end of the stripe (here, line), and in S105, the encoding of the stripe is repeated from S102 to S104 until the end of the image. S10
In step 6, the FLUSH process is called to perform post-processing of the encoding process.

【0026】図47は、符号化対象画素値3と予測値7
の一致・不一致から呼び出す処理を切り替えるENCO
DE処理を説明するフローチャートである。S111で
は画素値3と予測値7の一致・不一致を判定し、一致な
らば優勢シンボル、不一致ならば劣勢シンボルを符号化
する。S113ではCODEMPS処理を呼び出して優
勢シンボルを、S112ではCODELPS処理を呼び
出して劣勢シンボルを符号化する。
FIG. 47 shows an encoding target pixel value 3 and a prediction value 7
To switch the process to be called from the match / mismatch
It is a flowchart explaining a DE process. In S111, it is determined whether the pixel value 3 matches the prediction value 7 or not. If the pixel value 3 matches and the prediction value 7 does not match, the superior symbol is encoded. In S113, the CODEMPS process is called to code the superior symbol, and in S112, the CODELPS process is called to encode the inferior symbol.

【0027】図48は、符号化対象画素値3と予測値7
が不一致のとき、すなわち劣勢シンボルを符号化する際
に呼び出されるCODELPS処理を説明するフローチ
ャートである。まず、S121では一時的にAレジスタ
31値は、下方領域幅に更新される。S122の判定が
Yesならば、条件付きMPS/LPS交換が適用さ
れ、下方領域を符号化するためAレジスタ31はそのま
まとし、Cレジスタ30Aは更新しない。S122の判
定がNoならば、上方領域を符号化し、S123で領域
下界値であるCレジスタ30A、S124で領域幅であ
るAレジスタ31を更新する。S125の判定で定数S
WTCH値12が1ならば、S126で予測値(MPS
テーブル)の反転・更新を行う。LPS符号化では、S
127でNLPSテーブル11参照による状態遷移を行
い、S128でRENORME処理を呼び出して正規化
処理を行う。
FIG. 48 shows an encoding target pixel value 3 and a prediction value 7
Is a flowchart for explaining a CODELPS process called when non-coincidence is detected, that is, when encoding the inferior symbol. First, in S121, the value of the A register 31 is temporarily updated to the lower region width. If the determination in S122 is Yes, a conditional MPS / LPS exchange is applied, the A register 31 is left as it is to encode the lower region, and the C register 30A is not updated. If the determination in S122 is No, the upper region is encoded, and in S123, the C register 30A which is the lower limit of the region, and in S124, the A register 31 which is the region width is updated. Constant S in the determination of S125
If the WTCH value 12 is 1, the predicted value (MPS
Table) is inverted and updated. In LPS coding, S
At 127, a state transition is performed by referring to the NLPS table 11, and at S128, a RENORME process is called to perform a normalization process.

【0028】図49は、符号化対象画素値3と予測値7
が一致のとき、すなわち優勢シンボルを符号化する際に
呼び出されるCODEMPS処理を説明するフローチャ
ートである。まず、S131では一時的にAレジスタ3
1値は、下方領域幅に更新される。S132の判定がN
oならばそのままCODEMPS処理を終了する。S1
32の判定がYesならば、必ずS136でNMPSテ
ーブル10参照による状態遷移を行い、S137でRE
NORME処理を呼び出して正規化処理を行う。S13
6およびS137の前に、S133の判定がYesなら
ば、下方領域を符号化するためAレジスタ31はそのま
まとし、Cレジスタ30Aは更新しない。S133の判
定がNoならば、条件付きMPS/LPS交換が適用さ
れ、上方領域を符号化し、S134でCレジスタ30
A、S135でAレジスタ31を更新する。
FIG. 49 shows an encoding target pixel value 3 and a prediction value 7
Is a flowchart for explaining a CODEMPS process called when encoding is performed, that is, when encoding a dominant symbol. First, in S131, the A register 3 is temporarily stored.
The 1 value is updated to the lower region width. N in S132
If it is o, the CODEMPS process is terminated as it is. S1
If the determination of No. 32 is Yes, the state transition by referring to the NMPS table 10 is always performed in S136, and the RE is changed in S137.
The normalization process is performed by calling the NORME process. S13
Before S6 and S137, if the determination in S133 is Yes, the A register 31 is left as it is to encode the lower region, and the C register 30A is not updated. If the determination in S133 is No, a conditional MPS / LPS exchange is applied, the upper region is encoded, and the C register 30
A, the A register 31 is updated in S135.

【0029】図50は、正規化処理を行うRENORM
E処理を説明するフローチャートである。S141では
Aレジスタ31、S142ではCレジスタ30Aを1ビ
ット上位へシフトすることによって2倍の乗算と等価な
演算を行う。S143で変数CT50から1を減じ、S
144で変数CT50値が0か否かを判定し、判定がY
esならばS145でBYTEOUT処理を呼び出して
Cレジスタ30Aから1バイト符号4を出力する。S1
46の判定は、正規化処理の終了判定を行っており、A
レジスタ31が0x8000未満ならばS141からS
145を繰り返し、0x8000以上となれば終了す
る。
FIG. 50 shows a RENORM for performing a normalization process.
It is a flowchart explaining E processing. In S141, the A register 31 is shifted, and in S142, the C register 30A is shifted upward by one bit to perform an operation equivalent to double multiplication. In S143, 1 is subtracted from the variable CT50, and S
At 144, it is determined whether or not the value of the variable CT50 is 0.
If yes, the BYTEOUT processing is called in S145, and the 1-byte code 4 is output from the C register 30A. S1
In the determination at 46, the end of the normalization process is determined.
If the value of the register 31 is less than 0x8000, S141 to S
145 is repeated, and the process ends when 0x8000 or more is reached.

【0030】図51は、Cレジスタ30Aから1バイト
ずつ符号4を出力させるBYTEOUT処理を説明する
フローチャートである。出力するバイトは符号化レジス
タC30Aのバイト出力部Cb34である。桁上がりを
判定するための桁上がり判定部Cc35も同時に処理す
る。S151でCbレジスタ34およびCcレジスタ3
5の計9ビットを変数TEMP53に設定する。S15
2で桁上がりがある場合(TEMP≧0x100;Cc
=1)、桁上がりがない場合にはS159で0xFFで
ある場合、0xFF未満である場合に分けてバイト出力
を処理する。S152の判定がYesの場合、すでにC
レジスタ30Aから出力済みの変数BUFFER51値
にS153で桁上がりの1を加えた値、S154で変数
値SC52個のバイト値0(蓄積していた0xFFが桁
上がりの伝搬により0x00となった)の合計SC+1
バイトが桁上がりを伝搬された符号値として確定する。
FIG. 51 is a flow chart for explaining BYTEOUT processing for outputting the code 4 one byte at a time from the C register 30A. The output byte is the byte output part Cb34 of the encoding register C30A. The carry determination unit Cc35 for determining carry is also processed at the same time. In S151, the Cb register 34 and the Cc register 3
5, a total of 9 bits are set in the variable TEMP53. S15
2 when there is a carry (TEMP ≧ 0x100; Cc
= 1), if there is no carry, the byte output is processed separately in S159 if 0xFF or less than 0xFF. If the determination in S152 is Yes, C
The value of the variable BUFFER 51 already output from the register 30A plus the carry 1 in S153, and the sum of the 52 byte values 0 of the variable value SC (the accumulated 0xFF has become 0x00 due to carry propagation) in S154. SC + 1
The byte determines the carry as the propagated code value.

【0031】S155で変数SC52を0とし、S15
6で変数BUFFER51に変数TEMPの下位8ビッ
トを設定する。S157で変数TEMP53として処理
したCcレジスタ35、Cbレジスタ34をクリアし、
S158で次の出力まで8ビットを処理するため変数C
T50に8を設定する。S159の判定がYesの場合
は、符号4は確定できず、変数値SC52に1を加えて
0xFFを蓄積する。S159の判定がNoの場合は、
すでにCレジスタ30Aから出力済みの符号4をS15
3でBUFFER51値、S154で変数値SC52個
のバイト値0xFFの合計SC+1バイトが符号値とし
て確定する。S163で変数SC52を0とし、S16
4で変数BUFFER51に変数TEMP53(桁上が
りがないためそのまま8ビット)を設定する。
At S155, the variable SC52 is set to 0, and at S15
In step 6, the lower 8 bits of the variable TEMP are set in the variable BUFFER51. In step S157, the Cc register 35 and the Cb register 34 processed as the variable TEMP53 are cleared,
In step S158, the variable C for processing 8 bits until the next output is output.
8. Set 8 to T50. If the determination in S159 is Yes, the code 4 cannot be determined, and 1 is added to the variable value SC52 to accumulate 0xFF. If the determination in S159 is No,
The code 4 already output from the C register 30A is assigned to S15.
3, the value of BUFFER 51 is determined, and in step S154, the sum SC + 1 bytes of the 52 variable values SCx byte value 0xFF is determined as the code value. At S163, the variable SC52 is set to 0, and at S16
In step 4, a variable BUF53 is set to a variable TEMP53 (8 bits as it is because there is no carry).

【0032】図52は、符号化開始時のSTテーブル
8、MPSテーブル7および各変数の初期値を設定する
INITENC処理を説明するフローチャートである。
S171の「このレイヤの第1ストライプ」はレイヤお
よびストライプの概念を持ち込まない場合「画像の符号
化開始の時点」を意味し、複数のストライプから構成さ
れる画像では変数テーブルをストライプごとに初期化せ
ずに処理を続けることもできる。S171では、このレ
イヤの画素の第1ストライプか、またはテーブルを強制
リセットするのかを判定する。
FIG. 52 is a flow chart for explaining the ST table 8, the MPS table 7, and the INITENC process for setting initial values of each variable at the start of encoding.
When the concept of layer and stripe is not introduced, the “first stripe of this layer” in S171 means “at the time of starting image coding”. For an image composed of a plurality of stripes, the variable table is initialized for each stripe. Processing can be continued without performing. In S171, it is determined whether the pixel is the first stripe of this layer or the table is forcibly reset.

【0033】S171の判定がYesならば、S172
ですべてのコンテクストCX2に対して変数テーブルS
T8、MPS7を初期化する。S173はSC52を、
S174はAレジスタ31値を、S175はCレジスタ
30Aを、S176は変数CT50を初期化する。変数
CT50の初期値11はCbレジスタ34のビット数と
Csレジスタ33のビット数の和であり、11ビット処
理したとき最初の符号出力を行うことになる。S171
の判定がNoの場合は、S177では変数テーブルの初
期化を行わず、同じレイヤの直前のストライプ終端のテ
ーブル値を再設定する。
If the determination in S171 is Yes, S172
Variable table S for all contexts CX2
T8 and MPS7 are initialized. S173 describes SC52,
S174 initializes the A register 31 value, S175 initializes the C register 30A, and S176 initializes the variable CT50. The initial value 11 of the variable CT50 is the sum of the number of bits of the Cb register 34 and the number of bits of the Cs register 33. When 11 bits are processed, the first code output is performed. S171
Is negative, the variable table is not initialized in S177, and the table value at the end of the stripe immediately before the same layer is reset.

【0034】図53は、符号化終了時に符号化レジスタ
30Aに残った値を掃き出す処理を含めた後処理を行う
FLUSH処理を説明するフローチャートである。S1
81でCLEARBITS処理を呼び出してCレジスタ
30Aに残った符号の有効桁数を最小にする。S182
はFINALWRITES処理を呼び出して変数BUF
FER51、SC52およびCレジスタ30Aの未確定
の符号4を確定して最終的に出力する。S183で符号
4の第1バイトは変数BUFFER51がCレジスタ3
0A値の出力に先だって(整数部として)出力されるた
め除去する。S184で符号4は最終有効領域内の小数
座標であるから、必要であれば終端に連続するバイト0
x00は除去する。
FIG. 53 is a flow chart for explaining a FLUSH process for performing post-processing including a process of sweeping out the value remaining in the encoding register 30A at the end of encoding. S1
At 81, the CLEARBITS process is called to minimize the number of significant digits of the code remaining in the C register 30A. S182
Calls FINALWRITES processing and calls the variable BUF
The undetermined code 4 of the FER 51, SC52 and C register 30A is determined and finally output. In S183, the first byte of code 4 is the variable BUFFER 51 in the C register 3.
Since it is output (as an integer part) prior to the output of the 0A value, it is removed. In step S184, the code 4 is a decimal coordinate in the final effective area.
x00 is removed.

【0035】図54は、符号化終了時の符号4の有効桁
数を最小とするための処理を行うCLEARBITS処
理を説明するフローチャートである。これによって、符
号4は終端に可能な限り0x00が連続する値となる。
S191は変数TEMP53として最終有効領域の上界
値の下位2バイト(Cxレジスタ32)をクリアした値
を設定している。S192では上界値の下位2バイトの
クリアした値とCレジスタ30A値との大小を比較す
る。S192の判定がYesならば、S193で変数値
TEMP53にクリアし過ぎた分を戻してCレジスタ3
0A値とする。S192の判定がNoならば、変数値T
EMP53をCレジスタ30A値とする。
FIG. 54 is a flowchart for explaining a CLEARBITS process for performing a process for minimizing the number of significant digits of the code 4 at the end of encoding. As a result, the code 4 is a value in which 0x00 continues at the end as much as possible.
In step S191, a value obtained by clearing the lower two bytes (Cx register 32) of the upper bound value of the final effective area is set as the variable TEMP53. In S192, the magnitude of the cleared value of the lower 2 bytes of the upper bound value is compared with the value of the C register 30A. If the determination in S192 is Yes, in S193, the value that has been cleared is returned to the variable value TEMP53 and the C register 3
The value is assumed to be 0A. If the determination in S192 is No, the variable value T
Let EMP53 be the value of C register 30A.

【0036】図55は、符号化終了時点で確定した符号
をCレジスタ30Aに残った値まで書き出すFINAL
WRITES処理を説明するフローチャートである。S
201でCレジスタを変数値CT50で示されるビット
数だけシフトして符号出力および桁上がり判定を可能と
する。S202で桁上がりの有無を判定する。S202
の判定がYesならば桁上がりがあり、Noならば桁上
がりはない。BYTEOUT処理を説明するフローと同
様にS203、S204で桁上がりのある符号値、S2
07、S208で桁上がりのない符号値とするCレジス
タから出力済みのSC+1バイトの符号4を確定する。
S205でCbレジスタ値(1バイト)、S206でそ
の下位1バイトを出力して符号出力が完了する。
FIG. 55 shows a FINAL in which the code determined at the end of encoding is written up to the value remaining in the C register 30A.
It is a flowchart explaining a WRITES process. S
At 201, the C register is shifted by the number of bits indicated by the variable value CT50 to enable code output and carry determination. At S202, the presence or absence of a carry is determined. S202
If the determination is Yes, there is a carry, and if No, there is no carry. Similar to the flow for explaining the BYTEOUT process, the code values with carry in S203 and S204, S2
At 07 and S208, the code 4 of the SC + 1 byte already output from the C register having a code value with no carry is determined.
The code output is completed by outputting the Cb register value (1 byte) in S205 and the lower 1 byte in S206.

【0037】図56は、復号処理の全体の流れを示すD
ECODER処理を説明するフローチャートである。国
際標準勧告T.82の本処理を説明するフローチャート
にあるTPおよびDPに関する処理は本発明および従来
例(第1の従来例および第2の従来例)とは関係がない
ため省略する。まず、S211ではINITDEC処理
を呼び出し、復号処理の初期化を行う。S212ではコ
ンテクストCX2を1つずつ読み出し、S213ではD
ECODE処理によって画素PIX3の復号を行う。S
214ではストライプ(ここではライン)が終了するま
でS112およびS113を繰り返し、さらにS215
では画像が終了するまでS212からS214までスト
ライプの復号を繰り返す。
FIG. 56 is a flowchart showing the overall flow of the decoding process.
It is a flowchart explaining an ECODER process. International Standard Recommendation T. The processes related to TP and DP in the flowchart describing the present process of 82 have no relation to the present invention and the conventional example (the first conventional example and the second conventional example), and thus the description thereof will be omitted. First, in step S211, the INITDEC process is called, and the decoding process is initialized. In S212, the context CX2 is read out one by one, and in S213, D
The pixel PIX3 is decoded by the ECODE processing. S
In step 214, steps S112 and S113 are repeated until the end of the stripe (here, the line).
Then, the decoding of the stripe is repeated from S212 to S214 until the image ends.

【0038】図57は、復号対象画素を復号するDEC
ODE処理を説明するフローチャートである。まず、S
221で一時的にAレジスタ31値は、下方領域幅に更
新される。S222の判定がYesならば、下方領域を
復号する。S223の判定がYesならば、S224で
MPS_EXCHANGE処理を呼び出して、S225
でRENORMD処理を呼び出して正規化処理を行う。
S223の判定がNoならば、正規化処理することなく
優勢シンボルを復号し、予測値7を画素値3とする。ま
た、S222の判定がNoならば、上方領域を復号す
る。S227でLPS_EXCHANGE処理を呼び出
して、S228でRENORMD処理を呼び出して正規
化処理を行う。MPS_EXCHANGE処理、LPS
_EXCHANGE処理を呼び出すパスでは、それぞれ
復号すべき領域は決まっていても領域の大小を比較しな
いと復号対象シンボルが優勢シンボルか劣勢シンボルか
判断できない。呼び出した処理を説明するフローチャー
トでそれぞれ復号される画素値3を決定する。
FIG. 57 shows a DEC for decoding a pixel to be decoded.
It is a flowchart explaining an ODE process. First, S
At 221, the value of the A register 31 is temporarily updated to the lower area width. If the determination in S222 is Yes, the lower area is decoded. If the determination in S223 is Yes, MPS_EXCHANGE processing is called in S224, and S225
And calls the RENORMD process to perform the normalization process.
If the determination in S223 is No, the dominant symbol is decoded without performing the normalization process, and the prediction value 7 is set to the pixel value 3. If the determination in S222 is No, the upper area is decoded. In step S227, the LPS_EXCHANGE process is called, and in S228, the RENORMD process is called to perform normalization. MPS_EXCHANGE processing, LPS
In the path that calls the _EXCHANGE process, even if the regions to be decoded are determined, it is impossible to determine whether the symbol to be decoded is the superior symbol or the inferior symbol without comparing the sizes of the regions. A pixel value 3 to be decoded is determined in the flowchart describing the called process.

【0039】図58は、上方領域を復号するLPS_E
XCHANGE処理を説明するフローチャートである。
S231の判定がYesならば優勢シンボルを復号す
る。S232でCレジスタ30Bを、S233でAレジ
スタ31を更新する。S234では予測値7をそのまま
画素値3とする。S235でNMPSテーブル10参照
による状態遷移を行う。また、S231の判定がNoな
らば劣勢シンボルを復号する。S236でCレジスタ3
0Bを、S237でAレジスタ31を更新する。S23
8では非予測値「1−予測値」を画素値3とする。S2
39の判定がYesならば、S240で予測値(MPS
テーブル)7の反転・更新を行う。S241でNLPS
テーブル11参照による状態遷移を行う。
FIG. 58 shows LPS_E for decoding the upper region.
It is a flowchart explaining an XCHANGE process.
If the determination in S231 is Yes, the dominant symbol is decoded. The C register 30B is updated in S232, and the A register 31 is updated in S233. In S234, the prediction value 7 is set to the pixel value 3 as it is. In S235, a state transition is performed by referring to the NMPS table 10. If the determination in S231 is No, the inferior symbol is decoded. C register 3 in S236
0B is updated to the A register 31 in S237. S23
In 8, the non-prediction value “1−prediction value” is set to the pixel value 3. S2
If the determination at Step 39 is Yes, the predicted value (MPS
Table) 7 is inverted and updated. NLPS in S241
State transition is performed by referring to Table 11.

【0040】図59は、下方領域を復号するMPS_E
XCHANGE処理を説明するフローチャートである。
S251の判定がYesならば劣勢シンボルを復号す
る。S252では非予測値を画素値3とする。S253
の判定がYesならば、S254で予測値(MPSテー
ブル)7の反転・更新を行う。S255でNLPSテー
ブル11参照による状態遷移を行う。また、S251の
判定がNoならば優勢シンボルを復号する。S256で
は予測値7をそのまま画素値3とする。S257でNM
PSテーブル10参照による状態遷移を行う。
FIG. 59 shows an MPS_E for decoding the lower region.
It is a flowchart explaining an XCHANGE process.
If the determination in S251 is Yes, the inferior symbol is decoded. In S252, the non-prediction value is set to the pixel value 3. S253
Is YES, the predicted value (MPS table) 7 is inverted and updated in S254. In S255, a state transition is performed by referring to the NLPS table 11. If the determination in S251 is No, the superior symbol is decoded. In S256, the prediction value 7 is set to the pixel value 3 as it is. NM in S257
State transition is performed by referring to the PS table 10.

【0041】図60は、正規化処理を行うRENORM
D処理を説明するフローチャートである。S261で変
数CT50が0か否か判定し、判定がYesならばS2
62でBYTEIN処理を呼び出してCレジスタ30B
に1バイト符号4を入力する。S263ではAレジスタ
31、S264ではCレジスタ30Bを1ビット上位へ
シフトすることによって2倍の乗算と等価な演算を行
う。S265で変数CT50から1を減じる。S266
の判定は、正規化処理の終了判定を行っており、Aレジ
スタ31が0x8000未満ならばS261からS26
5を繰り返す。S267で変数CT50値が0か否か判
定し、判定がYesならばS268でBYTEIN処理
を呼び出してCレジスタ30Bに1バイト符号を入力す
る。
FIG. 60 shows a RENORM for performing a normalization process.
It is a flowchart explaining a D process. In S261, it is determined whether or not the variable CT50 is 0. If the determination is Yes, S2 is performed.
At 62, BYTEIN processing is called and C register 30B
1 byte code 4 is input. In S263, the A register 31 is shifted, and in S264, the C register 30B is shifted one bit higher to perform an operation equivalent to double multiplication. In S265, 1 is subtracted from the variable CT50. S266
Is to determine the end of the normalization process, and if the A register 31 is less than 0x8000, the process proceeds from S261 to S26.
Repeat step 5. In S267, it is determined whether or not the value of the variable CT50 is 0. If the determination is Yes, BYTEIN processing is called in S268, and a one-byte code is input to the C register 30B.

【0042】図61は、Cレジスタ30Bに符号4を1
バイトずつ読み込むBYTEIN処理を説明するフロー
チャートである。SCD(Stripe Coded Data)はスト
ライプに対する符号4である。S271で判定がYes
の場合、読み出す符号4がないため変数BUFFER5
1は0とする。S273で変数BUFFER51をCL
OWレジスタ36(Cb37)に読み込み、S274で
次の入力まで8ビットを処理するため変数CT50に8
を設定する。また、判定がNoの場合、1バイト符号4
を変数BUFFER51に読み込む。
FIG. 61 shows a case where the code 4 is set to 1 in the C register 30B.
It is a flowchart explaining BYTEIN process which reads byte by byte. SCD (Stripe Coded Data) is a code 4 for the stripe. Determination is Yes in S271
In the case of, because there is no code 4 to be read, the variable BUFFER5
1 is set to 0. In step S273, the variable BUFFER51 is set to CL.
The value is read into the OW register 36 (Cb 37), and 8 is set in the variable CT50 to process 8 bits until the next input in S274.
Set. When the determination is No, 1 byte code 4
Is read into the variable BUFFER 51.

【0043】図62は、復号開始時のSTテーブル8、
MPSテーブル7および各変数の初期値を設定するIN
ITDEC処理を説明するフローチャートである。テー
ブルの初期値設定に関するS281、S282、S29
0については、符号化処理のINITENC処理を説明
するフローチャートのS171、S172、S177と
同様である。Cレジスタ30Bの初期値は、Cxレジス
タ39およびCbレジスタ37に符号4を3バイト読み
込むことで設定される。S283でCレジスタ30Bを
クリアし、S284でBYTEIN処理を呼び出して符
号4をCbレジスタ37に1バイト読み込む。S285
でCレジスタ30Bを8ビットシフトして、S286で
BYTEIN処理を呼び出して符号4をCbレジスタ3
7に1バイト読み込む。S287でCレジスタ30Bを
8ビットシフトして、S288でBYTEIN処理を呼
び出して符号4をCbレジスタ37に1バイト読み込
む。これで、合計3バイトの符号4をCxレジスタ39
およびCbレジスタ37に設定したことになる。S28
9ではAレジスタ31の初期値を設定する。
FIG. 62 shows an ST table 8 at the start of decoding.
MPS table 7 and IN for setting initial values of each variable
It is a flowchart explaining ITDEC processing. S281, S282, S29 for setting the initial value of the table
0 is the same as S171, S172, and S177 in the flowchart for describing the INITENC process of the encoding process. The initial value of the C register 30B is set by reading 3 bytes of the code 4 into the Cx register 39 and the Cb register 37. In step S283, the C register 30B is cleared. In step S284, the BYTEIN process is called, and the code 4 is read into the Cb register 37 by one byte. S285
Shifts the C register 30B by 8 bits, calls BYTEIN processing in S286, and sets the code 4 to the Cb register 3
Read one byte into 7 In S287, the C register 30B is shifted by 8 bits, and in S288, the BYTEIN process is called to read the code 4 into the Cb register 37 by 1 byte. Thus, the code 4 of 3 bytes in total is stored in the Cx register 39.
And Cb register 37. S28
In step 9, the initial value of the A register 31 is set.

【0044】第2の従来例について 次に第2の従来例について説明する。第2の従来例によ
る算術符号化の符号器・復号器は、日本国特許第275
5091号に記載されるテーブルおよび処理を説明する
フローチャートによって実現されるものである。ここ
で、符号をバイト単位に出力する算術符号化では、その
出力バイト値が0xFFとなるとき、後に桁上がりが発
生すると出力済みのより上位まで伝播する可能性がある
ため符号値を確定できない。そこで、出力バイト値が0
xFFとなる時点で有効領域に桁上がりの可能性があれ
ば強制的に桁上がり有無を確定させてしまうことを考え
る。
Next, a second conventional example will be described. An encoder / decoder for arithmetic coding according to the second conventional example is disclosed in Japanese Patent No. 275.
This is realized by a table described in No. 5091 and a flowchart describing processing. Here, in arithmetic coding that outputs a code in byte units, when the output byte value becomes 0xFF, if a carry occurs later, the code value cannot be determined because it may propagate to higher places already output. Therefore, if the output byte value is 0
It is considered that if there is a possibility of carry in the effective area at the time of xFF, the presence or absence of carry is forcibly determined.

【0045】図63に強制的に桁上がり有無を確定させ
る概念図を示す。図において、下界値Cは符号レジスタ
(Cレジスタ)値30Aであり、上界値U60は下界値
C30Aに有効領域幅A(Aレジスタ値)31を加えた
値となる。下界値および上界値の最上位ビットが一致し
ない場合に桁上がりありと判定され、そのとき有効領域
内に桁上がり境界値T61が存在することになる。
FIG. 63 is a conceptual diagram for forcibly determining the presence or absence of a carry. In the figure, the lower bound value C is a code register (C register) value 30A, and the upper bound value U60 is a value obtained by adding the effective area width A (A register value) 31 to the lower bound value C30A. When the most significant bits of the lower bound value and the upper bound value do not match, it is determined that there is a carry, and at that time, a carry boundary value T61 exists in the effective area.

【0046】よって、有効領域が桁上がり境界によって
分割される2つの部分領域で、桁上がりがある領域を桁
上がり領域、桁上がりがない領域を非桁上がり領域と呼
ぶものとすれば、桁上がり領域幅R162は(U−
T)、非桁上がり領域幅R063は(T−C)と表され
る。桁上がりの有無を確定するには、有効領域が桁上が
り領域または非桁上がり領域に完全に一致するか、また
は含まれればよいことになり、ここでは強制的に有効領
域をその部分領域の一方を切り捨て、他方を新たな有効
領域として修正する。領域の切り捨てに当たり、より小
さい領域を切り捨てた方が符号長のロスが少なくできる
ため、図中では、より小さいR063の部分領域を切り
捨てている。部分領域を切り捨てることによって、修正
された有効領域に対する正規化処理の必要性を再度判定
する必要がある。このような算術符号化の桁上がり制御
方法を適応領域切捨て方式と呼ぶものとする。
Accordingly, if the effective area is called a carry area and an area without carry is called a non-carry area in two partial areas divided by a carry boundary, the carry area is The region width R162 is (U-
T), the non-carry region width R063 is represented by (TC). In order to determine the presence or absence of a carry, the effective area only has to completely match or be included in the carry area or the non-carry area. And correct the other as a new valid area. In the truncation of the region, the loss of the code length can be reduced by truncating the smaller region. Therefore, in the drawing, the smaller R063 partial region is truncated. By truncating the partial area, it is necessary to determine again the necessity of the normalization processing for the corrected effective area. Such a carry control method of arithmetic coding is called an adaptive region truncation method.

【0047】適応領域切捨て方式を適用した算術符号化
の符号部1B、復号部16Bの概略構成を図64、図6
5に示す。図64では、算術符号器13B、符号4Bの
置換えに伴う符号化部1Bが第1の従来例の図41に対
応して構成される。図65では、算術復号器17B、符
号4Bの置換えに伴う復号部16Bが第1の従来例の図
42に対して異なる。これらを置き換えたブロック間の
データの流れ、また学習方法は従来の形態の図41と図
42と同様とする。
FIGS. 64 and 6 show schematic configurations of the encoding unit 1B and the decoding unit 16B of the arithmetic coding to which the adaptive region truncation method is applied.
It is shown in FIG. In FIG. 64, the encoding unit 1B associated with the replacement of the arithmetic encoder 13B and the code 4B is configured corresponding to FIG. 41 of the first conventional example. In FIG. 65, the arithmetic decoder 17B and the decoding unit 16B accompanying the replacement of the code 4B are different from FIG. 42 of the first conventional example. The data flow between the blocks in which these have been replaced, and the learning method are the same as in the conventional embodiment shown in FIGS.

【0048】算術符号器13Bは、LSZ値9と2値シ
ンボル14の入力から、Cレジスタ30AとAレジスタ
31で符号化演算が進められ、CTカウンタ50でバイ
ト単位の符号出力タイミングを計り、符号出力時に同期
して領域内に桁上がり境界の有無をUレジスタ60、T
レジスタ61、R1レジスタ62、R0レジスタ63か
ら判定し、桁上がり境界があれば適応領域切捨て方式を
適用してCレジスタ30A、Aレジスタ31を修正して
桁上がりの有無を強制確定し、最大BUFFER51ま
での桁上がり伝搬を行って確定した符号出力を行い、符
号4Bを出力する。
The arithmetic encoder 13B performs an encoding operation in the C register 30A and the A register 31 from the input of the LSZ value 9 and the binary symbol 14, and measures the code output timing in byte units by the CT counter 50, and calculates the code. In synchronization with the output, the U register 60, T
Judgment is made from the register 61, the R1 register 62, and the R0 register 63. If there is a carry boundary, the adaptive region truncation method is applied to correct the C register 30A and the A register 31 to forcibly determine whether or not a carry is present. The code is output by carrying the carry up to and the code is determined, and the code 4B is output.

【0049】また、算術復号器17Bは、LSZ値9と
符号4Bの入力から、CTカウンタ50でバイト単位の
符号入力タイミングを計り、符号入力時に同期して領域
内に桁上がり境界の有無を算術符号器13Bの符号レジ
スタ30Aを再現したDレジスタ64、Uレジスタ6
0、Tレジスタ61、R1レジスタ62、R0レジスタ
63から判定し、桁上がり境界があれば適応領域切捨て
方式を適用してCレジスタ30A、Dレジスタ64、A
レジスタ31を修正して、BUFFER51を介して、
Cレジスタ30Bと、Aレジスタ31、Dレジスタ64
で復号演算が進められ、2値シンボル14を出力する。
The arithmetic decoder 17B measures the code input timing in byte units by the CT counter 50 from the input of the LSZ value 9 and the code 4B, and arithmetically checks whether there is a carry boundary in the area at the time of code input. D register 64 and U register 6 reproducing the code register 30A of the encoder 13B
0, the T register 61, the R1 register 62, and the R0 register 63, and if there is a carry boundary, the adaptive region truncation method is applied to the C register 30A, the D register 64, and the A register.
By modifying the register 31, via the BUFFER 51,
C register 30B, A register 31, D register 64
And the decoding operation proceeds, and the binary symbol 14 is output.

【0050】図64と図65に示される構成ブロック内
およびブロック間の詳細な処理動作は、説明済みの第1
の従来例の処理を説明するフローチャートである図46
から図49、図53、図54、図56、図57、図59
と、後述の処理を説明するフロー図の図67から図76
で説明する。
The detailed processing operations within and between the constituent blocks shown in FIGS. 64 and 65 are described in the first section.
FIG. 46 is a flowchart for explaining the processing of the conventional example of FIG.
49, 53, 54, 56, 57, 59
And FIG. 67 to FIG.
Will be described.

【0051】図66に適応領域切捨て方式の符号レジス
タを示す。上記第1の従来例に係る図45に示した符号
レジスタと比較してCsレジスタ33が削除されてい
る。これは、符号器のバイト出力と復号器のバイト入力
の同期をとるためであり、適応領域切捨て処理の適用も
バイト入出力と同期して適用するものとする。ここで、
符号化(符号器)では、符号レジスタ値は有効領域の下
界値、復号(復号器)では、符号レジスタ値は有効領域
の下界値から符号値までの変位(オフセット)に更新さ
れていくという違いがあるため、復号時には符号器の符
号レジスタ値を再現していかないと桁上がり境界を正確
に判断できない。よって、復号では、符号器の符号レジ
スタと同じ構成をとるDレジスタ64でその値を保持し
ていくものとする。
FIG. 66 shows a code register of the adaptive area truncation method. The Cs register 33 is omitted in comparison with the code register shown in FIG. 45 according to the first conventional example. This is to synchronize the byte output of the encoder with the byte input of the decoder, and the application of the adaptive region truncation process is also applied in synchronization with the byte input / output. here,
In encoding (encoder), the code register value is updated to the lower bound of the effective area, and in decoding (decoder), the code register value is updated to the displacement (offset) from the lower bound of the effective area to the code value. Therefore, at the time of decoding, the carry boundary cannot be accurately determined unless the code register value of the encoder is reproduced. Therefore, in decoding, it is assumed that the value is held by the D register 64 having the same configuration as the code register of the encoder.

【0052】本第2の従来例において、修正あるいは追
加された処理を説明するフローチャートについて説明す
る。適応領域切捨て方式を、上記第1の従来例で説明し
たQM−Coderの符号化/復号処理を説明するフロ
ーチャートに必要な修正のみ加えて説明を行う。符号器
に関する図46から図49、図53、図54、復号器に
関する図56、図57、図59については、上記第1の
従来例の処理を説明するフローと同様である。また、上
記説明において使用した有効領域の上界値U60、桁上
がり境界値T61、非桁上がり領域幅R063、桁上が
り領域幅R162、Dレジスタ64を変数として追加導
入する。
A description will now be given of a flowchart for explaining a modified or added process in the second conventional example. The adaptive region truncation method will be described by adding only necessary modifications to the flowchart for explaining the encoding / decoding process of the QM-coder described in the first conventional example. 46 to 49, 53, and 54 relating to the encoder and FIGS. 56, 57 and 59 relating to the decoder are the same as the flow for explaining the processing of the first conventional example. The upper bound value U60, carry boundary value T61, non-carry area width R063, carry area width R162, and D register 64 used in the above description are additionally introduced as variables.

【0053】図67は、正規化処理を行うRENORM
E処理を説明するフローチャートである。上記第1の従
来例(図50)に対して、適応領域切捨て処理の適用を
判定するためのROUNDDOWNE処理を呼び出すS
147が追加され、BYTEOUT処理の呼び出し(図50の
S145)はROUNDDOWNE処理から行われる。
FIG. 67 shows a RENORM for performing a normalization process.
It is a flowchart explaining E processing. For the first conventional example (FIG. 50), a ROUNDDOWN process for calling the adaptive region truncation process is determined.
147 is added, and the call of the BYTEOUT process (S145 in FIG. 50) is performed from the ROUNDDOWN process.

【0054】図68は、適応領域切捨て処理を適用する
ROUNDDOWNE処理を説明するフローチャートで
ある。S301では出力バイト値が0xFFであるかを
判定し、Noならばそのまま終了する。S302で桁上
がり境界値T61(定数)を設定し、S303で非桁上
がり領域幅R063を設定する。S304で非桁上がり
領域幅R063を領域幅(Aレジスタ値)と比較し、R
0値63がAレジスタ値31より小さくない、またはR
0値63が0より大きくないならば(No)、桁上がり
境界T61が有効領域内にないためそのまま終了する。
R0値63がA値31より小さい、またはR0値63が
0より大きいならば(Yes)、S305で上界値U6
0を設定し、S306で桁上がり領域幅R162を設定
する。S307でR0値63がR1値62より小さけれ
ば(Yes)、桁上がり領域を有効領域にするため、S
308で下界値を桁上がり境界値に変更し、S309で
領域幅(Aレジスタ値)にR1値を設定し、大きければ
(No)、非桁上がり領域を有効領域にするためS30
9で領域幅(Aレジスタ値)31にR0値63を設定す
る。最後にS311でBYTEOUT処理を呼び出す。
FIG. 68 is a flow chart for explaining the ROUNDDOWN processing for applying the adaptive area truncation processing. In S301, it is determined whether or not the output byte value is 0xFF. If No, the process ends. A carry boundary value T61 (constant) is set in S302, and a non-carry region width R063 is set in S303. In step S304, the non-carry region width R063 is compared with the region width (A register value).
0 value 63 is not smaller than A register value 31 or R
If the 0 value 63 is not larger than 0 (No), the process is terminated as it is because the carry boundary T61 is not within the effective area.
If the R0 value 63 is smaller than the A value 31 or the R0 value 63 is larger than 0 (Yes), the upper bound value U6 is determined in S305.
0 is set, and a carry region width R162 is set in S306. If the R0 value 63 is smaller than the R1 value 62 in S307 (Yes), the carry-over area is set as an effective area.
At 308, the lower bound value is changed to the carry boundary value. At S309, the R1 value is set to the area width (A register value). If the value is larger (No), S30 is set to make the non-carry area an effective area.
In step 9, the R0 value 63 is set in the area width (A register value) 31. Finally, the BYTEOUT processing is called in S311.

【0055】図69(BYTEOUT処理を説明するフ
ロー)、図70(INITENC処理を説明するフロ
ー)及び図71(FINALWRITES処理を説明す
るフロー)の図51、図52及び図55に対するそれぞ
れの変更を説明すると、まず、符号レジスタのCsレジ
スタ部33の削除によって、図69(BYTEOUT処
理を説明するフロー)のS151'、S157'、図70
(INITENC処理を説明するフロー)のS17
6'、図71(FINALWRITES処理を説明する
フロー)のS202'、S205'、S206'のマスク
やシフト数の設定が変更される。
Each change in FIGS. 69 (flow describing the BYTEOUT processing), FIG. 70 (flow describing the INITENC processing), and FIG. 71 (flow describing the FINAL WRITES processing) shown in FIGS. 51, 52 and 55 will be described. Then, first, by deleting the Cs register section 33 of the code register, S151 ′ and S157 ′ of FIG. 69 (flow describing the BYTEOUT processing) and FIG. 70
S17 in (flow describing INITENC process)
6 ′, the settings of the masks and shift numbers in S202 ′, S205 ′, and S206 ′ of FIG. 71 (flow describing the FINAL WRITES processing) are changed.

【0056】また、図68(ROUNDDOWNE処理
を説明するフロー)において、出力バイト値が0xFF
であるときの桁上がり伝搬の有無についてすでに解決済
みであるため、変数BUFFERを逐次出力していくこ
とができるようになり、図69(BYTEOUT処理を
説明するフロー)の判定S159は不要となり、同時に
変数SC自体ととそれに関わる図69(BYTEOUT
処理を説明するフロー)のS154、S155、S16
0、S162、S163、図70(INITENC処理
を説明するフロー)のS173、図71(FINALW
RITES処理を説明するフロー)のS204、S20
8も不要となる。
Also, in FIG. 68 (flow describing the ROUNDDOWN processing), the output byte value is 0xFF
Since the presence or absence of carry propagation at the time of has already been solved, the variable BUFFER can be sequentially output, and the determination S159 in FIG. 69 (flow describing the BYTEOUT processing) becomes unnecessary, and The variable SC itself and the related FIG. 69 (BYTEOUT
S154, S155, S16 of the flow for explaining the processing)
0, S162, S163, S173 in FIG. 70 (flow describing the INITENC process), and FIG. 71 (FINALW)
S204, S20 of the flow describing the RITS process)
8 is also unnecessary.

【0057】図72は、上方領域を復号するLPS_E
XCHANGE処理を説明するフローチャートである。
上記第1の従来例(図58)に対して、符号器の符号
レジスタをDレジスタ64として再現するためのS24
2、S243が追加されている。
FIG. 72 shows LPS_E for decoding the upper region.
It is a flowchart explaining an XCHANGE process.
S24 for reproducing the code register of the encoder as the D register 64 with respect to the first conventional example (FIG. 58).
2. S243 has been added.

【0058】また、図73は、正規化処理を行うREN
ORMD処理を説明するフローチャートである。上記第
1の従来例(図60)に対して、符号器の符号レジスタ
をDレジスタとして再現するためのS269、適応領域
切捨て処理の適用を判定するためのROUNDDOWN
D処理を呼び出すS270が追加され、BYTEOUT処理の
呼び出し(図60のS262)はROUNDDOWND
処理から行われる。また、図60のS261とS267
の判定の冗長性を除去したため処理を説明するフロー形
状が異なるが、処理内容は同様である。
FIG. 73 shows REN for performing normalization processing.
It is a flowchart explaining an ORMD process. Compared to the first conventional example (FIG. 60), S269 for reproducing the code register of the encoder as a D register, ROUNDDOWN for determining the application of adaptive region truncation processing.
S270 for calling the D processing is added, and the calling for the BYTEOUT processing (S262 in FIG. 60) is set to ROUNDDOWND.
It is performed from processing. Also, S261 and S267 of FIG.
The flow shape for explaining the processing is different because the redundancy of the judgment has been removed, but the processing content is the same.

【0059】図74は、適応領域切捨て処理を適用する
ROUNDDOWND処理を説明するフローチャートで
ある。図68のROUNDDOWNE処理に対して、符
号レジスタ変数名C30AがD64に変更されており、
S321からS331はS301からS311に対応
し、復号器の符号レジスタ30Bに符号器の符号レジス
タ30A(レジスタD64)に対応する適応領域切捨て
処理を行うためのS332が追加されている。また、最
後に図68のBYTEOUT処理(S311)の代わり
にS331でBYTEIN処理をを呼び出す。
FIG. 74 is a flow chart for explaining a ROUNDDOWN process for applying the adaptive region truncation process. The code register variable name C30A has been changed to D64 for the ROUNDDOWN processing in FIG.
Steps S321 to S331 correspond to steps S301 to S311. The code register 30B of the decoder is additionally provided with S332 for performing the adaptive region truncation processing corresponding to the code register 30A (register D64) of the encoder. Finally, the BYTEIN process is called in S331 instead of the BYTEOUT process (S311) in FIG.

【0060】図75(BYTEIN処理を説明するフロ
ー)、図76(INITDEC処理を説明するフロー)
の図61、図62に対するそれぞれの変更として、符号
器の符号レジスタ30AをDレジスタ64として再現す
るための初期化処理である図75のS276、図76の
S290が追加されている。
FIG. 75 (flow for explaining BYTEIN processing), FIG. 76 (flow for explaining INITDEC processing)
61 and FIG. 62, S276 of FIG. 75 and S290 of FIG. 76, which are initialization processing for reproducing the code register 30A of the encoder as the D register 64, are added.

【0061】[0061]

【発明が解決しようとする課題】ところで、上述した従
来例では次のような問題点がある。第1の従来例に係る
符号器では、桁上がりの有無が解決せずに符号値が確定
できない場合にカウンタで待機する符号長を記憶させる
が、データ長の制限がないため桁あふれする可能性があ
るという課題があった。また、符号値が確定しなければ
最後まで符号が掃き出されないこともあり、特にデータ
長が不明な場合には符号の確定遅延時間を見積もれない
という課題があった。さらに符号値が確定したとき、出
力を待機していた符号長が長ければその掃き出し時間も
長くなり、符号化処理を全くまたは一時的に停止させな
ければならないという課題があった。
However, the above-mentioned prior art has the following problems. In the encoder according to the first conventional example, when the code value cannot be determined without solving for the presence or absence of a carry, the code length to wait in the counter is stored. There was a problem that there is. Further, the code may not be swept out to the end unless the code value is determined. In particular, when the data length is unknown, it is difficult to estimate the code delay time. Furthermore, when the code value is determined, the longer the code length waiting for output is, the longer the sweeping time is, and there is a problem that the encoding process must be stopped completely or temporarily.

【0062】他方、第2の従来例に係る符号器では、符
号レジスタの値により桁上がり制御の実行を判定し、桁
上がり境界を厳密に計算しなければならないという課題
があった。また、第2の従来例に係る復号器では、符号
器の符号レジスタを再現しなければ桁上がり制御の正確
な実行判定ができないという課題があった。
On the other hand, in the encoder according to the second conventional example, there is a problem that it is necessary to determine the execution of the carry control based on the value of the code register and to calculate the carry boundary exactly. Further, in the decoder according to the second conventional example, there is a problem that it is impossible to accurately determine whether carry control is performed unless the code register of the encoder is reproduced.

【0063】この発明は、以上のような従来例に係る課
題を解決するためになされたものであり、符号が確定す
るまで待機する符号長を記憶するカウンタの桁あふれを
なくし、適当な間隔で符号を強制的に確定することによ
り桁上がりを制御して符号の確定遅延時間を有限化して
見積もれるようにすると共に、符号値が確定したときに
所定のパターンへの置き換えによって総符号長と符号の
掃出し時間を短縮することを目的とする。
The present invention has been made to solve the above-described problems relating to the prior art, and eliminates the overflow of a counter for storing a code length that waits until a code is determined, thereby preventing the counter from overflowing. The carry is controlled by forcibly determining the code so that the delay time of the code is finite and can be estimated.When the code value is determined, the total code length and the code are replaced by a predetermined pattern. The purpose of the present invention is to shorten the time required for sweeping out.

【0064】また、桁上がり境界を厳密に計算せずに桁
上がり制御を行い、復号器で符号器の符号レジスタを再
現せずに桁上がり制御を行うことを目的とする。
Another object of the present invention is to perform carry control without strictly calculating a carry boundary, and to carry carry without reproducing a code register of an encoder by a decoder.

【0065】[0065]

【課題を解決するための手段】この発明に係る符号化装
置は、情報源データを蓄積して符号化対象データとその
補助的なパラメータ(コンテクスト)を出力するデータ
メモリと、上記補助パラメータを基に指定される上記符
号化対象データに関する学習データを蓄積し出力する学
習メモリと、上記学習データを基に指定される符号化パ
ラメータを出力する確率推定テーブルと、上記符号化対
象データと上記符号化パラメータを基に算術符号化を行
い符号を出力する符号器とを備える符号化装置におい
て、所定の単位の情報源データの入力処理または符号の
出力を所定の間隔として計測して通知する同期検出器
と、上記所定の間隔で有効領域内の桁上がり境界値を検
出すると共に、その検出結果に基づいて有効領域内の切
り捨て領域を指示する桁上がり境界検出器とを備え、上
記符号器は、上記桁上がり検出器により指示された上記
有効領域を上位と下位に等分した部分領域の一方を切り
捨てて上記有効領域を更新することを特徴とするもので
ある。
According to the present invention, there is provided an encoding apparatus comprising: a data memory for storing information source data and outputting encoding target data and auxiliary parameters (context) thereof; A learning memory that accumulates and outputs learning data relating to the encoding target data specified in the above, a probability estimation table that outputs an encoding parameter specified based on the learning data, the encoding target data and the encoding A coder that performs arithmetic coding based on parameters and outputs a code, and a synchronization detector that measures the input processing of information source data in a predetermined unit or outputs the code at a predetermined interval and notifies the synchronization detector Detecting a carry boundary value in the effective area at the predetermined interval, and instructing a truncation area in the effective area based on the detection result. And an up boundary detector, wherein the encoder updates the effective area by truncating one of partial areas obtained by equally dividing the effective area indicated by the carry detector into upper and lower parts. Is what you do.

【0066】また、上記符号器は、上記桁上がり境界検
出器で桁上がり境界が検出されたとき、上記桁上がり境
界検出器により指示された上記有効領域を上位と下位に
等分した部分領域の一方を切り捨てて上記有効領域を更
新することを特徴とするものである。
When the carry boundary is detected by the carry boundary detector, the encoder includes a partial area obtained by equally dividing the effective area designated by the carry boundary detector into upper and lower parts. The method is characterized in that one of the valid areas is updated by truncating one of them.

【0067】また、上記桁上がり境界検出器は、検出さ
れた桁上がり境界を含む部分領域を切り捨てるように指
示することを特徴とするものである。
Further, the carry boundary detector instructs to cut off a partial area including the detected carry boundary.

【0068】また、上記所定の間隔は、所定単位の符号
化対象データを符号化したときであることを特徴とする
ものである。
The above-mentioned predetermined interval is characterized in that a predetermined unit of data to be coded is coded.

【0069】また、上記所定の間隔は、符号値の確定ま
で待機させる符号長の最大値を基準に設定されることを
特徴とするものである。
Further, the predetermined interval is set based on the maximum value of the code length to wait until the code value is determined.

【0070】また、上記符号器は、上記所定の間隔を基
準に符号値の確定まで待機させる符号長の最大値が設定
されることを特徴とするものである。
Further, the encoder is characterized in that a maximum value of a code length to wait until a code value is determined is set based on the predetermined interval.

【0071】また、上記所定の間隔は、所定単位の符号
出力が発生したときであることを特徴とするものであ
る。
The above-mentioned predetermined interval is characterized in that a predetermined unit of code output is generated.

【0072】また、上記所定の間隔は、所定単位の符号
出力が発生し、かつ符号出力値が所定値となるときであ
ることを特徴とするものである。
The predetermined interval is characterized in that a predetermined unit of code output is generated and the code output value becomes a predetermined value.

【0073】また、上記桁上がり境界検出器は、上記有
効領域内に桁上がり境界が検出されなくても上記有効領
域を上位と下位に等分した部分領域のどちらか一方の部
分領域を指示することを特徴とするものである。
The carry boundary detector indicates one of the partial areas obtained by equally dividing the effective area into upper and lower parts even if no carry boundary is detected in the effective area. It is characterized by the following.

【0074】また、上記符号器は、確定した符号に同じ
値が連続するときにその値と長さを特定できるランレン
グスマーカに置き換えるランレングスマーカ変換器を有
することを特徴とするものである。
The encoder is characterized in that it has a run-length marker converter which replaces the determined code with a run-length marker which can specify the value and length when the same value continues.

【0075】また、上記ランレングスマーカ変換器は、
置き換えずにそのまま出力した方が変換される上記ラン
レングスマーカより符号出力が短いときには変換を行わ
ないことを特徴とするものである。
Further, the run-length marker converter includes:
If the code output is shorter than the run length marker that is converted without being replaced, the conversion is not performed.

【0076】また、上記ランレングスマーカから抽出さ
れる連続長の最大値は、復号の際のランレングスマーカ
逆変換の結果に基づいて上記符号器が上記ランレングス
マーカ変換器に設定することを特徴とするものである。
The maximum value of the continuous length extracted from the run-length marker is set by the encoder to the run-length marker converter based on the result of the inverse transform of the run-length marker at the time of decoding. It is assumed that.

【0077】また、この発明に係る復号化装置は、復号
対象データに対する補助的なパラメータ(コンテクス
ト)を出力し復号された上記復号対象データを蓄積して
情報源データとして出力するデータメモリと、上記補助
パラメータを基に指定される上記復号対象データに関す
る学習データを蓄積し出力する学習メモリと、上記学習
データを基に指定される復号パラメータを出力する確率
推定テーブルと、上記復号パラメータと符号を基に算術
復号を行い上記復号対象データを出力する復号器とを備
える復号化装置において、所定の単位の情報源データの
出力処理または符号の入力を所定の間隔として計測して
通知する同期検出器と、上記所定の間隔で有効領域内の
桁上がり境界値を検出すると共に、その検出結果に基づ
いて有効領域内の切り捨て領域を指示する桁上がり境界
検出器とを備え、上記復号器は、上記有効領域を上位と
下位に等分した部分領域の上記符号値を含まない一方を
切り捨てて上記有効領域を更新することを特徴とするも
のである。
Further, a decoding device according to the present invention includes a data memory for outputting auxiliary parameters (context) for data to be decoded, storing the decoded data to be decoded, and outputting it as information source data; A learning memory that accumulates and outputs learning data on the data to be decoded specified based on the auxiliary parameter; a probability estimation table that outputs a decoding parameter specified based on the learning data; A decoder that performs arithmetic decoding and outputs the data to be decoded, and a synchronization detector that measures and notifies output processing or code input of information source data in a predetermined unit as a predetermined interval, and The carry boundary value in the effective area is detected at the above-mentioned predetermined interval, and the cutoff in the effective area is performed based on the detection result. A carry boundary detector for indicating a discard region, wherein the decoder updates the valid region by truncating one of the partial regions, which does not include the code value, of the partial region obtained by equally dividing the valid region into upper and lower parts It is characterized by the following.

【0078】また、上記復号器は、上記桁上がり境界検
出器で桁上がり境界が検出されたとき、上記有効領域を
上位と下位に等分した部分領域の上記符号値を含まない
一方を切り捨てて上記有効領域を更新することを特徴と
するものである。
Further, when the carry boundary is detected by the carry boundary detector, the decoder cuts off one of the partial areas obtained by equally dividing the effective area into upper and lower parts that does not include the code value. It is characterized in that the effective area is updated.

【0079】また、上記桁上がり境界検出器は、検出さ
れた桁上がり境界を含む部分領域を切り捨てるように指
示することを特徴とするものである。
Further, the carry boundary detector instructs to cut off a partial area including the detected carry boundary.

【0080】また、上記所定の間隔は、所定単位の復号
対象データを復号したときであることを特徴とするもの
である。
Further, the predetermined interval is characterized in that a predetermined unit of data to be decoded is decoded.

【0081】また、上記所定の間隔は、所定単位の符号
入力が発生したときであることを特徴とするものであ
る。
The predetermined interval is characterized in that a predetermined unit of code input occurs.

【0082】また、上記所定の間隔は、所定単位の符号
入力が発生し、かつ復号と同時に再現される符号出力値
が所定値となるときであることを特徴とするものであ
る。
Further, the predetermined interval is characterized in that a code input of a predetermined unit occurs and a code output value reproduced at the same time as decoding becomes a predetermined value.

【0083】また、上記復号器は、ランレングスマーカ
を検出すると、置き換えられた長さの元の符号値に逆変
換するランレングスマーカ逆変換器を有することを特徴
とするものである。
Further, the above-mentioned decoder is characterized in that it has a run-length marker inverse transformer that, when a run-length marker is detected, inversely transforms it to the original code value of the replaced length.

【0084】また、この発明に係る符号化復号化装置
は、符号化装置として、情報源データを蓄積して符号化
対象データとその補助的なパラメータ(コンテクスト)
を出力するデータメモリと、上記補助パラメータを基に
指定される上記符号化対象データに関する学習データを
蓄積し出力する学習メモリと、上記学習データを基に指
定される符号化パラメータを出力する確率推定テーブル
と、上記符号化対象データと上記符号化パラメータを基
に算術符号化を行い符号を出力する符号器と、所定の単
位の情報源データの入力処理または符号の出力を所定の
間隔として計測して通知する同期検出器と、上記所定の
間隔で有効領域内の桁上がり境界値を検出すると共に、
その検出結果に基づいて有効領域内の切り捨て領域を指
示する桁上がり境界検出器とを備え、上記符号器は、上
記桁上がり検出器により指示された上記有効領域を上位
と下位に等分した部分領域の一方を切り捨てて上記有効
領域を更新すると共に、復号化装置として、復号対象デ
ータに対する補助的なパラメータ(コンテクスト)を出
力し復号された上記復号対象データを蓄積して情報源デ
ータとして出力するデータメモリと、上記補助パラメー
タを基に指定される上記復号対象データに関する学習デ
ータを蓄積し出力する学習メモリと、上記学習データを
基に指定される復号パラメータを出力する確率推定テー
ブルと、上記復号パラメータと符号を基に算術復号を行
い上記復号対象データを出力する復号器と、所定の単位
の情報源データの出力処理または符号の出力を所定の間
隔として計測して通知する同期検出器と、上記所定の間
隔で有効領域内の桁上がり境界値を検出すると共に、そ
の検出結果に基づいて有効領域内の切り捨て領域を指示
する桁上がり境界検出器とを備え、上記復号器は、上記
有効領域を上位と下位に等分した部分領域の上記符号値
を含まない一方を切り捨てて上記有効領域を更新するこ
とを特徴とするものである。
The encoding / decoding device according to the present invention, as an encoding device, accumulates information source data and encodes data to be encoded and its auxiliary parameters (context).
, A learning memory for accumulating and outputting learning data on the data to be encoded specified based on the auxiliary parameter, and a probability estimation for outputting an encoding parameter specified based on the learning data. A table, an encoder that performs arithmetic encoding based on the encoding target data and the encoding parameter and outputs a code, and measures input processing of information source data in a predetermined unit or output of the code as a predetermined interval. A synchronous detector for notifying and detecting a carry boundary value in the effective area at the predetermined interval,
A carry boundary detector for indicating a truncated area in the effective area based on the detection result, wherein the encoder is configured to equally divide the effective area indicated by the carry detector into upper and lower parts One of the areas is truncated to update the effective area, and the decoding device outputs auxiliary parameters (context) for the data to be decoded, accumulates the decoded data to be decoded, and outputs it as information source data. A data memory, a learning memory for accumulating and outputting learning data relating to the data to be decoded specified based on the auxiliary parameter, a probability estimation table for outputting decoding parameters specified based on the learning data, A decoder that performs arithmetic decoding based on parameters and codes and outputs the decoding target data; and a predetermined unit of information source data. A synchronization detector that measures and outputs the output of the power processing or the code as a predetermined interval, and detects a carry boundary value in the effective area at the predetermined interval, and truncates the effective area based on the detection result. A carry boundary detector for indicating a region, wherein the decoder updates the valid region by truncating one of the partial regions that does not include the code value of the partial region obtained by equally dividing the valid region into upper and lower parts. It is a feature.

【0085】また、上記符号器は、上記桁上がり境界検
出器で桁上がり境界が検出されたとき、上記桁上がり境
界検出器により指示された上記有効領域を上位と下位に
等分した部分領域の一方を切り捨てて上記有効領域を更
新すると共に、上記復号器は、上記桁上がり境界検出器
で桁上がり境界が検出されたとき、上記有効領域を上位
と下位に等分した部分領域の上記符号値を含まない一方
を切り捨てて上記有効領域を更新することを特徴とする
ものである。
When the carry boundary is detected by the carry boundary detector, the encoder includes a partial area obtained by equally dividing the effective area designated by the carry boundary detector into upper and lower parts. When the carry boundary is detected by the carry boundary detector, the code value of a partial region obtained by equally dividing the effective region into upper and lower parts is detected when the carry boundary is detected by the carry boundary detector. , And the effective area is updated by cutting off one of the effective areas.

【0086】また、この発明に係る符号化方法は、
(a)情報源データを蓄積して符号化対象データとその
補助的なパラメータ(コンテクスト)を出力するデータ
蓄積ステップと、(b)上記補助パラメータを基に指定
される上記符号化対象データに関する学習データを蓄積
し出力する学習ステップと、(c)上記学習データを基
に指定される符号化パラメータを出力する確率推定ステ
ップと、(d)上記符号化対象データと上記符号化パラ
メータを基に算術符号化を行い符号を出力する符号化ス
テップと、(e)所定の単位の情報源データの入力処理
または符号の出力を所定の間隔として計測して通知する
同期検出ステップと、(f)上記所定の間隔で有効領域
内の桁上がり境界値を検出すると共に、その検出結果に
基づいて有効領域内の切り捨て領域を指示する桁上がり
境界検出ステップと、(g)上記桁上がり境界検出ステ
ップにより指示された上記有効領域を上位と下位に等分
した部分領域の一方を切り捨てて上記有効領域を更新す
る符号化修正ステップとを有するものである。
Further, the encoding method according to the present invention
(A) a data accumulation step of accumulating information source data and outputting encoding target data and its auxiliary parameters (context); and (b) learning on the encoding target data specified based on the auxiliary parameters. A learning step of accumulating and outputting data; (c) a probability estimating step of outputting an encoding parameter specified based on the learning data; and (d) an arithmetic operation based on the encoding target data and the encoding parameter. An encoding step of encoding and outputting a code; (e) a synchronization detection step of inputting information source data in a predetermined unit or measuring and outputting a code output at a predetermined interval; A carry boundary detecting step for detecting a carry boundary value in the effective area at intervals of and instructing a truncation area in the effective area based on the detection result. , Those having an encoding correction step of updating the effective region by truncating one of (g) the carry boundary detected partial areas obtained by equally dividing the effective area indicated in the upper and lower by step.

【0087】また、上記符号化修正ステップは、上記桁
上がり境界検出ステップで桁上がり境界が検出されたと
き、上記桁上がり境界検出ステップで指示された上記有
効領域を上位と下位に等分した部分領域の一方を切り捨
てて上記有効領域を更新することを特徴とするものであ
る。
In addition, the encoding correction step includes, when a carry boundary is detected in the carry boundary detection step, a portion obtained by equally dividing the effective area designated in the carry boundary detection step into upper and lower parts. The present invention is characterized in that one of the areas is truncated to update the effective area.

【0088】また、上記符号化ステップおよび上記符号
化修正ステップは、確定した符号に同じ値が連続すると
きにその値と長さを特定できるランレングスマーカに置
き換える変換ステップを有することを特徴とするもので
ある。
Further, the encoding step and the encoding correcting step include a conversion step in which, when the same value continues to the determined code, the code is replaced with a run-length marker whose value and length can be specified. Things.

【0089】上記変換ステップは、置き換えずにそのま
ま出力した方が変換される上記ランレングスマーカより
符号出力が短いときには変換を行わないことを特徴とす
るものである。
The conversion step is characterized in that conversion is not performed when the code output is shorter than the run-length marker to be output as it is without replacement.

【0090】また、上記ランレングスマーカから抽出さ
れる連続長の最大値は、復号の際、ランレングスマーカ
逆変換の結果に基づいて上記符号化ステップが上記変換
ステップに設定することを特徴とするものである。
Further, the maximum value of the continuous length extracted from the run-length marker is set in the encoding step in the conversion step based on the result of the inverse transformation of the run-length marker during decoding. Things.

【0091】また、この発明に係る復号化方法は、
(a)復号対象データに対する補助的なパラメータ(コ
ンテクスト)を出力し復号された上記復号対象データを
蓄積して情報源データとして出力するデータ蓄積ステッ
プと、(b)上記補助パラメータを基に指定される上記
復号対象データに関する学習データを蓄積し出力する学
習ステップと、(c)上記学習データを基に指定される
復号パラメータを出力する確率推定ステップと、(d)
上記復号パラメータと符号を基に算術復号を行い上記復
号対象データを出力する復号化ステップと、(e)所定
の単位の情報源データの出力処理または符号の入力を所
定の間隔として計測して通知する同期検出ステップと、
(f)上記所定の間隔で有効領域内の桁上がり境界値を
検出すると共に、その検出結果に基づいて有効領域内の
切り捨て領域を指示する桁上がり境界検出ステップと、
(g)上記桁上がり境界検出ステップにより指示された
上記有効領域を上位と下位に等分した部分領域の一方を
切り捨てて上記有効領域を更新する復号化修正ステップ
とを有するものである。
Further, the decoding method according to the present invention
(A) a data accumulating step of outputting auxiliary parameters (context) for the data to be decoded, accumulating the decoded data to be decoded, and outputting the data as information source data; and (b) a data designation step based on the auxiliary parameters. A learning step of accumulating and outputting learning data relating to the decoding target data, (c) a probability estimating step of outputting a decoding parameter designated based on the learning data, and (d).
A decoding step of performing arithmetic decoding based on the decoding parameter and the code and outputting the decoding target data; and (e) measuring a predetermined unit of output processing of information source data or inputting a code as a predetermined interval and notifying. A synchronization detection step
(F) a carry boundary detecting step of detecting a carry boundary value in the effective area at the predetermined interval and indicating a truncation area in the effective area based on the detection result;
(G) a decoding correction step of updating the effective area by cutting off one of partial areas obtained by equally dividing the effective area specified by the carry boundary detection step into upper and lower parts.

【0092】また、上記復号化修正ステップは、上記桁
上がり境界検出ステップで桁上がり境界が検出されたと
き、上記桁上がり境界検出ステップで指示された上記有
効領域を上位と下位に等分した部分領域の一方を切り捨
てて上記有効領域を更新することを特徴とするものであ
る。
In addition, the decoding correction step includes, when a carry boundary is detected in the carry boundary detection step, a portion obtained by equally dividing the effective area designated in the carry boundary detection step into upper and lower parts. The present invention is characterized in that one of the areas is truncated to update the effective area.

【0093】さらに、上記復号化ステップは、ランレン
グスマーカを検出すると、置き換えられた長さの元の符
号値に逆変換するランレングスマーカ逆変換ステップを
有することを特徴とするものである。
Further, the decoding step includes a run-length marker inverse transforming step of, when a run-length marker is detected, performing inverse transform to an original code value having a replaced length.

【0094】[0094]

【発明の実施の形態】実施の形態1.本実施の形態1で
は、上述した第2の従来例と同様に、有効領域の部分領
域を切り捨て、出力済みの符号に対して桁上がり有無を
確定する方法をとるが、有効領域を2つの部分領域に等
分割し、桁上がり境界を含む部分領域を切り捨てるもの
である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiment 1 In the first embodiment, as in the above-described second conventional example, a method is employed in which the partial area of the effective area is truncated and the presence or absence of a carry is determined for the output code. It is equally divided into regions, and a partial region including a carry boundary is discarded.

【0095】領域幅は常に符号器と復号器とで同値をと
るため、等分割操作によれば、上記第2の従来例のよう
に桁上がり境界値を厳密に符号化/復号に持ち込まなく
ても上位/下位のどちらの部分領域に含むかだけわかれ
ばよいことになる。
Since the area width always takes the same value between the encoder and the decoder, according to the equal division operation, the carry boundary value does not have to be strictly introduced into the encoding / decoding as in the second conventional example. It is only necessary to know which of the upper and lower partial areas is included.

【0096】例えば、図1に示すように、最大有効領域
を16とするとき、正規化処理により有効領域は8以上
に保たれる。このとき、1.0000を桁上がり境界と
すれば、その境界が上位にあれば上位1/2領域を切り
捨て、下位にあれば下位1/2領域を切り捨てる。ただ
し、有効領域幅が奇数のとき、有効な表現精度の不足に
よる桁落ちによる誤差が生じるため、その解決策も含め
る必要がある。同図では、有効領域幅=9であるため、
単純に1/2とすれば4(整数)となり、それを下位領
域幅とすると上位領域幅は5となる。よって、上位領域
を切り捨てれば下位領域幅が2倍に拡大されて8、下位
領域を切り捨てれば上位領域幅が2倍に拡大されて10
となり、厳密に等しく分割されたことにならないことに
なる。
For example, as shown in FIG. 1, when the maximum effective area is 16, the effective area is kept at 8 or more by the normalization processing. At this time, if 1.0000 is the carry boundary, the upper half area is truncated if the boundary is higher, and the lower 1/2 area is truncated if the boundary is lower. However, when the effective area width is an odd number, an error due to loss of digit due to lack of effective representation accuracy occurs. In the figure, since the effective area width = 9,
If it is simply set to 1 /, it becomes 4 (integer), and if it is set as the lower region width, the upper region width becomes 5. Therefore, if the upper region is truncated, the width of the lower region is doubled to 8; if the lower region is truncated, the width of the upper region is doubled to 10
And it is not strictly equally divided.

【0097】ここで、領域幅(Aレジスタ)31の1/
2を計算した後、正規化処理で少なくとも2倍に拡大さ
れることは確実である。よって、Aレジスタの1/2演
算で桁落ちするビットを後から補正する方法がある。ま
た、もう1つの方法は、領域幅(=9)は保ったまま、
まず下界値(Cレジスタ)30Aだけを2倍し、下位領
域を切り捨てるときその領域幅31=9を加えれば所望
の誤差のない座標を得ることができる。いずれにして
も、1/2領域切捨て方式によれば、1回適用につき必
ず1ビットの符号長が発生することになる。
Here, 1/1/3 of the area width (A register) 31
After calculating 2, it is certain that it will be at least doubled in the normalization process. Therefore, there is a method of correcting a bit that is lost by a 1/2 operation of the A register later. Another method is to keep the area width (= 9),
First, only the lower bound (C register) 30A is doubled, and when the lower region is discarded, a desired error-free coordinate can be obtained by adding the region width 31 = 9. In any case, according to the 1/2 area truncation method, a code length of 1 bit is always generated for one application.

【0098】本実施の形態1では、1/2領域切捨て方
式の算術符号化の符号器を符号部1C、その復号器を復
号部16Cとし、その符号器、復号器の概略構成を図
2、図3に示す。図2では、算術符号器13C、符号4
Cの置換えに伴う符号化部1Cが第2の従来例の図64
に対応して構成される。図3では、算術復号器17C、
符号4Cの置換えに伴う復号部16Cが第2の従来例の
図65に対して異なる。これらを置き換えたブロック間
のデータの流れ、また学習方法は従来例の図64と図6
5と同様とする。
In the first embodiment, a coder for arithmetic coding of the half area truncation method is a coder 1C and a decoder thereof is a decoder 16C, and the schematic configuration of the coder and the decoder is shown in FIG. As shown in FIG. In FIG. 2, the arithmetic encoder 13C, the code 4
The encoding unit 1C accompanying the replacement of C is the same as that of FIG.
It is configured corresponding to. In FIG. 3, the arithmetic decoder 17C,
The decoding unit 16C accompanying the replacement of the code 4C is different from FIG. 65 of the second conventional example. The data flow between the blocks in which these are replaced and the learning method are the same as those in the conventional example shown in FIGS.
Same as 5.

【0099】算術符号器13Cは、LSZ値9と2値シ
ンボル14の入力から、Cレジスタ30AとAレジスタ
31で符号化演算が進められ、CTカウンタ50でバイ
ト単位の符号出力タイミングを計り、符号出力時に同期
して領域内に桁上がり境界の有無をTレジスタ61、R
0レジスタ63から判定し、桁上がり境界があれば1/
2領域切捨て方式を適用してCレジスタ30A、Aレジ
スタ31を修正して桁上がりの有無を強制確定し、最大
BUFFER51までの桁上がり伝搬を行って確定した
符号出力を行い、符号4Cを出力する。
The arithmetic encoder 13C performs an encoding operation in the C register 30A and the A register 31 from the input of the LSZ value 9 and the binary symbol 14, and measures the code output timing in byte units by the CT counter 50, and calculates the code. T register 61, R
Judge from 0 register 63, and if there is a carry boundary, 1 /
By applying the two-region truncation method, the C register 30A and the A register 31 are corrected to forcibly determine the presence or absence of a carry, carry-carrying is performed up to a maximum of BUFFER 51, a fixed code is output, and a code 4C is output. .

【0100】また、算術復号器17Cは、LSZ値9と
符号4Cの入力から、CTカウンタ50でバイト単位の
符号入力タイミングを計り、符号入力時に同期して領域
内に桁上がり境界の有無を算術符号器13Cの符号レジ
スタ30Aを再現したDレジスタ64、Tレジスタ6
1、R0レジスタ63から判定し、桁上がり境界があれ
ば1/2領域切捨て方式を適用してCレジスタ30A、
Dレジスタ64、Aレジスタ31を修正して、BUFF
ER51を介して、Cレジスタ30Bと、Aレジスタ3
1、Dレジスタ64で復号演算が進められ、2値シンボ
ル14を出力する。
The arithmetic decoder 17C measures the code input timing in byte units by the CT counter 50 from the input of the LSZ value 9 and the code 4C, and arithmetically checks whether there is a carry boundary in the area at the time of code input. D register 64 and T register 6 reproducing the code register 30A of the encoder 13C
1. Judgment is made from the R0 register 63, and if there is a carry boundary, a half area truncation method is applied to the C register 30A,
Modify D register 64 and A register 31
Via the ER 51, the C register 30B and the A register 3
1. The decoding operation is advanced by the D register 64, and the binary symbol 14 is output.

【0101】図2と図3に示される構成ブロック内およ
びブロック間の詳細な処理動作は、説明済みの第1の従
来例の処理を説明するフロー図である図46から図4
9、図53、図54、図56、図57、図59と、同じ
く第2の従来例の処理を説明するフローチャートである
図67、図69から図74、図75、図76と、後述の
処理を説明するフロー図4から図7、またはその等価な
処理を説明するフローとして与えられる図4、図6、図
8から図11で説明する。
Detailed processing operations in and between the constituent blocks shown in FIGS. 2 and 3 are flow charts for explaining the processing of the first conventional example described above. FIGS.
9, FIG. 53, FIG. 54, FIG. 56, FIG. 57, and FIG. 59, and FIG. 67, FIG. 69 to FIG. 74, FIG. 4 to 7, or FIGS. 4, 6, and 8 to 11, which are given as flows describing the equivalent processes.

【0102】本実施の形態1では、第2の従来例におい
て桁上がりまたは非桁上がり領域領域の切捨て処理を行
っている図68(ROUNDDOWNE処理を説明する
フロー)、図74(ROUNDDOWND処理を説明す
るフロー)を次に示す図4、図6へ変更し、そこから呼
び出される図5(HALVINGE処理を説明するフロ
ー)、図7(HALVINGD処理を説明するフロー)
を追加することによって1/2領域切捨て方式を実現す
る方法を示す。
In the first embodiment, a description will be given of FIG. 68 (flow describing the ROUNDDOWN processing) in which the carry-out or non-carry-out area is cut off in the second conventional example, and FIG. 74 (ROUNDDOWN processing). 4 and 6 shown below, and FIG. 5 (flow describing HALVINGE processing) and FIG. 7 (flow describing HALVINGD processing) called therefrom.
Is a method for realizing the half area truncation method by adding.

【0103】図4は、1/2領域切捨て処理の適用を判
定するROUNDDOWNE処理を説明するフローチャ
ートである。図中、S301からS304、およびS3
01、S304の判定結果(いずれもNo)により処理
されるS311は図68と同じである。S304の判定
結果(Yes)によりS312で1/2領域切捨て処理
を行うHALVINGE処理を呼び出す。
FIG. 4 is a flowchart for explaining the ROUNDDOWN processing for determining the application of the 1/2 area truncation processing. In the figure, S301 to S304 and S3
01 and S311 to be processed based on the determination results in S304 (both are No) are the same as those in FIG. According to the determination result (Yes) in S304, the HALVING process for performing the half area truncation process is called in S312.

【0104】図5は、1/2領域切捨て処理を行うHA
LVINGE処理を説明するフローチャートである。S
341で非桁上がり領域幅R0の2倍がAレジスタ値3
1より小さければ(判定Yes)、下位1/2領域が桁
上がり境界を含み、小さくなければ(判定No)、情報
1/2領域が桁上がり領域を含むことになり、桁上がり
境界を含む1/2領域を切り捨てるものとする。下位1
/2領域を切り捨てる場合、S342でCレジスタ値
(有効領域下界値)30AをAレジスタ値(有効領域
幅)31の1/2だけ更新した後、S343でBYTE
OUT処理を呼び出す。領域切捨てに伴い、実際はAレ
ジスタ値31は1/2とするべきであるが、すぐに正規
化処理で2倍に拡大されるため更新していない。Cレジ
スタ30AとCTカウンタ値50に対して正規化処理に
相当するS344、S345を行う。S346でAレジ
スタ値31が奇数か否かを判定し、奇数であればAレジ
スタ値31の1/2倍で桁落ちした分をS347で補正
する。上位1/2領域を切り捨てる場合、Cレジスタ値
30Aは更新されず、S348でBYTEOUT処理を
呼び出す。Cレジスタ30AとCTカウンタ値50に対
して正規化処理に相当するS349、S350を行う。
FIG. 5 shows an HA for performing a half area truncation process.
It is a flowchart explaining a LVINGE process. S
At 341, the double of the non-carry area width R 0 is A register value 3
If it is smaller than 1 (judgment Yes), the lower half area includes a carry boundary, and if it is not smaller (decision No), the information 1/2 area includes a carry area and includes the carry boundary. The / 2 region is truncated. Lower 1
If the / 2 area is to be truncated, after updating the C register value (effective area lower limit value) 30A by 1 / of the A register value (effective area width) 31 in S342, BYTE is executed in S343.
Call OUT processing. Although the A register value 31 should be actually reduced to 1 / due to the region truncation, the A register value 31 is not updated because it is immediately doubled by the normalization processing. S344 and S345 corresponding to normalization processing are performed on the C register 30A and the CT counter value 50. At S346, it is determined whether or not the A register value 31 is an odd number. If the A register value 31 is an odd number, the value lost by 1/2 of the A register value 31 is corrected at S347. When the upper half area is truncated, the C register value 30A is not updated, and the BYTEOUT processing is called in S348. S349 and S350 corresponding to the normalization processing are performed on the C register 30A and the CT counter value 50.

【0105】図6は、1/2領域切捨て処理の適用を判
定するROUNDDOWND処理を説明するフローチャ
ートである。図中、S321からS324、およびS3
21、S324の判定結果(いずれもNo)により処理
されるS332は図74と同じである。S324の判定
結果(Yes)によりS333で1/2領域切捨て処理
を行うHALVINGD処理を呼び出す。
FIG. 6 is a flowchart for explaining the ROUNDDOWN processing for determining the application of the half area truncation processing. In the figure, S321 to S324 and S3
21 and S332 performed based on the determination results of S324 (both are No) are the same as those in FIG. Based on the determination result (Yes) in S324, the HALVINGD process for performing the half area truncation process is called in S333.

【0106】図7は、1/2領域切捨て処理を行うHA
LVINGD処理を説明するフローチャートである。図
5のROUNDDOWNE処理に対して、符号レジスタ
変数名C30AがD64に変更されており、S361か
らS370はS341からS350に対応し、復号器の
符号レジスタC30Bに符号器の符号レジスタ30A
(レジスタD64)に対応する1/2領域切捨て処理を
行うためのS371、S372、S373、S374を
追加している。また、最後に図68のBYTEOUT処
理(S311)の代わりにS331でBYTEIN処理
を呼び出す。
FIG. 7 shows an HA for performing a half area truncation process.
It is a flowchart explaining an LVINGD process. In the ROUNDDOWN processing of FIG. 5, the code register variable name C30A has been changed to D64, S361 to S370 correspond to S341 to S350, and the code register C30B of the decoder is replaced with the code register 30A of the encoder.
S371, S372, S373, and S374 for performing a half area truncation process corresponding to (register D64) are added. Finally, the BYTEIN process is called in S331 instead of the BYTEOUT process (S311) in FIG.

【0107】ここで、図5のHALVINGE処理を説
明するフロー、図7のHALVINGD処理を説明する
フローは、呼び出されるBYTEOUT処理を説明する
フロー(図69)、BYTEIN処理を説明するフロー
(図74)とともに、次に示す図8(HALVINGE
処理を説明するフロー)、図9(BYTEOUT7処理
を説明するフロー)、図10(HALVINGD処理を
説明するフロー)、図11(BYTEIN7処理を説明
するフロー)に置き換えることができる。BYTEOU
T7処理を説明するフロー、BYTEIN7処理を説明
するフローはAレジスタ値(領域幅)31を1/2にし
ないでCレジスタ30Bを先に2倍に拡大して桁落ちを
防止するため、バイトの入出力位置がBYTEOUT処
理を説明するフロー、BYTEIN処理を説明するフロ
ーチャートの正規の位置より上位に1ビットだけずれて
いる。特に、符号器では上位に1ビット余分に精度が保
証されていなければならない。
Here, the flow for explaining the HALVINGD process in FIG. 5, the flow for explaining the HALVINGD process in FIG. 7, the flow for explaining the called BYTEOUT process (FIG. 69), and the flow for explaining the BYTEIN process (FIG. 74) 8 (HALVINGE) shown below.
The processing can be replaced by a flow for explaining the processing, FIG. 9 (a flow for explaining the BYTEIN7 processing), FIG. 10 (a flow for explaining the HALVINGD processing), and FIG. 11 (a flow for explaining the BYTEIN7 processing). BYTEOU
The flow for explaining the T7 process and the flow for explaining the BYTEIN7 process are as follows. The C register 30B is doubled first without reducing the A register value (area width) 31 to 1 /, thereby preventing the loss of digits. The input / output position is shifted by one bit to a higher position than the normal position in the flow explaining the BYTEOUT process and the flowchart explaining the BYTEIN process. In particular, in the encoder, an extra bit of precision must be guaranteed in the higher order.

【0108】図8は、1/2領域切捨て処理を行うHA
LVINGE処理を説明するフローチャートである。S
381、S382でCレジスタ30A、非桁上がり領域
幅R063を2倍に拡大し、正規化に相当する処理を先
に行う。S307で非桁上がり領域幅R063がAレジ
スタ値31より小さければ(判定Yes)、下位1/2
領域が桁上がり境界を含み、小さくなければ(判定N
o)、上位1/2領域が桁上がり領域を含むことにな
る。下位1/2領域を切り捨てる場合(判定Yes)、
S384でCレジスタ値(有効領域下界値)30AをA
レジスタ値(有効領域幅)31だけ更新する。符号バイ
ト出力前に本来はBYTEOUT処理の直後に行われる
2倍の拡大(正規化処理)を先行しているため、S38
5では、BYTEOUT処理ではなく、BYTEOUT
7処理を呼び出す。
FIG. 8 shows an HA for performing a half area truncation process.
It is a flowchart explaining a LVINGE process. S
In steps 381 and S382, the C register 30A and the non-carry area width R063 are doubled, and processing equivalent to normalization is performed first. If the non-carry region width R063 is smaller than the A register value 31 in S307 (determination Yes), the lower half
If the area includes a carry boundary and is not small (judgment N
o), the upper half area includes the carry area. When the lower half area is truncated (determination Yes),
In S384, the C register value (effective area lower limit value) 30A is changed to A.
Only the register value (effective area width) 31 is updated. Before the output of the sign byte, the double enlargement (normalization process) which is performed immediately after the BYTEOUT process is originally performed.
In 5, the BYTEOUT processing is performed instead of the BYTEOUT processing.
7 processing is called.

【0109】図9は、BYTEOUT処理の詳細な処理
を説明するフローチャートである。このBYTEOUT
7処理の図69(BYTEOUT処理を説明するフロ
ー)に対する変更を示す。S151"、S157"の修正
は、符号出力位置が1ビット上位に移動していることに
よる。S158'の修正は、図8ですでに正規化に相当
する処理(S382)が行われていることによる。
FIG. 9 is a flowchart for explaining the detailed processing of the BYTEOUT processing. This BYTEOUT
70 shows a change of FIG. 69 (flow describing the BYTEOUT processing) of the 7 processing. The correction in S151 "and S157" is based on the fact that the code output position has been moved one bit higher. The correction in S158 'is based on the fact that the processing (S382) corresponding to the normalization has already been performed in FIG.

【0110】図10は、1/2領域切捨て処理を行うH
ALVINGD処理を説明するフローチャートである。
図8のROUNDDOWNE処理に対して、符号レジ
スタ変数名C30AがD64に変更されており、S39
1からS395はS381からS385に対応し、復号
器の符号レジスタC30Bに符号器の符号レジスタ30
A(レジスタD64)に対応する処理を行うためのS3
96、S397を追加している。また、最後に図8のB
YTEOUT7処理(S385)の代わりにS395で
BYTEIN7処理を呼び出す。
FIG. 10 is a diagram showing an example of H for performing a half area truncation process.
It is a flowchart explaining an ALVINGD process.
The code register variable name C30A has been changed to D64 in the ROUNDDOWN processing of FIG.
1 to S395 correspond to S381 to S385, and the code register 30 of the encoder is stored in the code register C30B of the decoder.
S3 for performing processing corresponding to A (register D64)
96 and S397. Finally, FIG.
The BYTEIN7 process is called in S395 instead of the YTEOUT7 process (S385).

【0111】図11は、BYTEIN7処理の詳細な処
理を説明するフローチャートである。このBYTEIN
7処理の図74(BYTEIN処理を説明するフロー)
に対する変更を示す。S273'、S276'の修正は、
符号入力位置が1ビット上位に移動していることによ
る。S274'の修正は、図10ですでに正規化に相当
する処理(S392、S396)が行われていることに
よる。
FIG. 11 is a flowchart for explaining the detailed processing of the BYTEIN7 processing. This BYTEIN
FIG. 74 of 7 processing (flow explaining BYTEIN processing)
Indicates a change to Modification of S273 'and S276'
This is due to the fact that the code input position has moved up by one bit. The correction in S274 ′ is based on the fact that the processing (S392, S396) corresponding to normalization has already been performed in FIG.

【0112】上述した実施の形態1によれば、桁上がり
境界が上位と下位の1/2領域のどちらに存在している
かのみ判定されればよいため、桁上がり領域幅R162
を計算する必要がない。
According to the above-described first embodiment, it is only necessary to determine whether the carry boundary exists in the upper half or the lower half area. Therefore, the carry area width R162
Does not need to be calculated.

【0113】実施の形態2.前述した第1の従来例に示
されるQM−Coderでは、出力済みであっても確定
していない符号を変数BUFFER51、SCカウンタ
52で待機させているが、符号器の仕様によっては符号
化中にSCカウンタ52の桁あふれが発生することがあ
り、結果として桁あふれ1回ごとにそのカウント最大数
だけ符号バイト(0xFFまたは0x00)が欠落し、
正確な符号を出力できないことになる。
Embodiment 2 In the QM-coder shown in the above-mentioned first conventional example, a code that has been output but has not been determined is made to wait in the variable BUFFER 51 and the SC counter 52. However, depending on the specifications of the encoder, during encoding, Overflow of the SC counter 52 may occur, and as a result, a code byte (0xFF or 0x00) is lost for each overflow in the maximum number of counts,
An accurate code cannot be output.

【0114】一般に、最終的な画像サイズは事前にわか
っているとは限らないが、有限のサイズで区切ったスト
ライプ(またはライン)単位で処理を行えばその最悪の
符号量を見積もることができる。算術符号化では最悪の
場合1ビットを若干超える程度となることが知られてい
るため、その区切ったストライプ(またはライン)構成
サイズ(バイト数)に対してほぼ用意すべきSCカウン
タ52の仕様が確定でき、その2倍の符号バイト0xF
Fのランを計数できれば十分である。本実施の形態2で
は、ストライプ終了ごとにそこまで出力を待機している
符号バイトを強制的に確定して掃き出していくことによ
って、最大確定遅延もストライプの符号化処理時間程度
に見積もれるようになる。この符号バイトの確定手法と
して1/2領域切捨て方式を適用するものとする。
In general, the final image size is not always known in advance, but if processing is performed in units of stripes (or lines) divided by a finite size, the worst code amount can be estimated. It is known that the worst case in arithmetic coding is a bit more than one bit. Therefore, the specification of the SC counter 52 that should be almost prepared for the divided stripe (or line) configuration size (the number of bytes) is as follows. Can be determined and its double sign byte 0xF
It is enough to be able to count the runs of F. In the second embodiment, each time a stripe is completed, the code bytes waiting to be output are forcibly determined and swept out, so that the maximum determination delay can be estimated to be about the stripe encoding processing time. Become. It is assumed that a half area truncation method is applied as a method for determining the code byte.

【0115】また、前述した第2の従来例に示される適
応領域切捨て方式では、1バイトの符号バイトのみ待機
させれば出力を逐次行っていくことが可能であるが、領
域切捨て処理による最小の符号長ロスで抑えるために有
効領域内の桁上がり境界の位置を厳密に計算しなければ
ならないこと、また、そのため、復号器では符号器の符
号レジスタ30Aの再現を行わなければ正確な復号がで
きない。さらに、適応領域切捨て処理の実行をCsレジ
スタ33の削除によって符号器、復号器のバイト入出力
のタイミングで同期させなければ他の専用同期手段を用
意する必要があり、その判定などによって符号化/復号
の負荷が増加する。例えば、Csレジスタ33を削除せ
ずに符号器と復号器を同期させるために、符号器には上
記専用同期手段として正規化シフト数のカウンタを設
け、8ビットごと(8の倍数時)に同期タイミングとみ
なすか、または復号のCTカウンタ50を再現すればよ
い。
In the adaptive area truncation method shown in the second conventional example described above, it is possible to sequentially perform output if only one code byte is put on standby. In order to suppress the code length loss, the position of the carry boundary in the effective area must be strictly calculated. Therefore, the decoder cannot perform accurate decoding unless the code register 30A of the encoder is reproduced. . Further, if the execution of the adaptive area truncation processing is not synchronized with the byte input / output timing of the encoder and the decoder by deleting the Cs register 33, it is necessary to prepare another dedicated synchronization means. The decoding load increases. For example, in order to synchronize the encoder and the decoder without deleting the Cs register 33, the encoder is provided with a counter of the number of normalized shifts as the dedicated synchronization means, and synchronizes every 8 bits (when a multiple of 8). What is necessary is just to consider it as timing or to reproduce the CT counter 50 for decoding.

【0116】本実施の形態2では、ストライプの終了の
タイミングで1/2領域切捨て処理を行うことによって
Csレジスタ33の有無による同期上の制約を解消でき
る。また、Cレジスタ30Aから出力される符号バイト
値に依存せず、かつ有効領域内に桁上がり境界がないと
きにも必ず1/2領域切捨て処理を行うことによって、
復号器では符号器の符号レジスタ30Aの再現すること
なく、また、桁上がり境界を厳密に計算せずに符号(C
レジスタ値)30Bが指し示さない上位または下位の1
/2領域を切り捨てることによって正確な復号を行うこ
とができる。
In the second embodiment, the restriction on the synchronization due to the presence or absence of the Cs register 33 can be eliminated by performing the half area truncation processing at the end timing of the stripe. Further, even when there is no carry boundary in the effective area without depending on the code byte value output from the C register 30A, the half area truncation processing is always performed,
In the decoder, the code (C) is used without reproducing the code register 30A of the encoder and without strictly calculating the carry boundary.
Register value) upper or lower 1 not indicated by 30B
Accurate decoding can be performed by truncating the / 2 region.

【0117】ここで、符号器は、上記のように切り捨て
るべき1/2領域を決定し、有効領域を更新するが、こ
れはダミーシンボルの符号化とみなせる。また、復号器
は、符号の指し示す1/2領域に有効領域を更新する
が、これはダミーシンボルの復号とみなすことができ、
有効領域が上位/下位のどちらに更新されてもシンボル
は無視してよい。
Here, the encoder determines the half area to be truncated as described above and updates the effective area, which can be regarded as dummy symbol encoding. Also, the decoder updates the effective area to the half area indicated by the code, which can be regarded as decoding a dummy symbol,
The symbol may be ignored regardless of whether the effective area is updated to upper or lower.

【0118】本実施の形態2の1/2領域切捨て方式で
は、ストライプの符号化処理で符号ビットが発生しなく
ても1/2領域切捨てによって1ビットの符号が発生す
る。このため、SCカウンタ52の桁あふれを抑えなが
ら、最悪8ストライプで1バイトの符号を出力させられ
ることになり、その所要時間を符号確定までの最大遅延
として見積もることができる。
In the half area truncation method according to the second embodiment, even if no code bit is generated in the stripe encoding process, a one-bit code is generated by the half area truncation. For this reason, a 1-byte code can be output in the worst 8 stripes while suppressing overflow of the SC counter 52, and the required time can be estimated as the maximum delay until the code is determined.

【0119】1/2領域切捨て方式の算術符号化の符号
器を符号部1C、その復号器を復号部16Cとし、その
符号器、復号器の概略構成を、図12、図13に示す。
図12では、算術符号器13D、符号4Dの置換えに伴
う符号化部1Dが第1の従来例の図39に対応して構成
される。図13では、算術復号器17D、符号4Dの置
換えに伴う復号部16Dが第1の従来例の図40に対し
て異なる。これらを置き換えたブロック間のデータの流
れ、また、学習方法は第1の従来例の図39と図40と
同様とする。
The encoder for arithmetic coding of the half-area truncation method is referred to as an encoder 1C, and the decoder thereof is referred to as a decoder 16C. FIGS. 12 and 13 show schematic configurations of the encoder and the decoder.
In FIG. 12, an encoding unit 1D associated with the replacement of the arithmetic encoder 13D and the code 4D is configured corresponding to FIG. 39 of the first conventional example. In FIG. 13, an arithmetic decoder 17D and a decoding unit 16D accompanying the replacement of the code 4D are different from FIG. 40 of the first conventional example. The data flow between the blocks in which these are replaced, and the learning method are the same as those in FIGS. 39 and 40 of the first conventional example.

【0120】算術符号器13Dは、LSZ値9と2値シ
ンボル14の入力から、Cレジスタ30AとAレジスタ
31で符号化演算が進められ、CTカウンタ50でバイ
ト単位の符号出力タイミングを計り、第1の従来例と同
様にBUFFER51とSCカウンタで桁上がりの伝搬
可能性のある未確定の符号出力待機と確定した符号出力
を行い、符号4Dを出力していく。そして、ライン終端
(あるいはストライプ終端)の検出に同期して領域内に
桁上がり境界の有無をTレジスタ65、CWレジスタ6
6から判定し、選択された上位または下位の1/2切捨
て領域を切り捨てる1/2領域切捨て方式を適用し、C
レジスタ30A、Aレジスタ31を修正して桁上がりの
有無を強制確定し、最大BUFFER51までの桁上が
り伝搬を行って確定した符号出力を行い、符号4Dを出
力する。
The arithmetic encoder 13D performs the encoding operation in the C register 30A and the A register 31 from the input of the LSZ value 9 and the binary symbol 14, and measures the code output timing in byte units by the CT counter 50. In the same manner as in the conventional example 1, the BUFFER 51 and the SC counter perform an undetermined code output standby with a possibility of carry propagation and a determined code output, and output a code 4D. Then, in synchronization with the detection of the end of the line (or the end of the stripe), the presence / absence of a carry boundary in the area is determined by the T register 65 and the CW register 6.
6 and apply a 1/2 area truncation method of truncating the selected upper or lower 1/2 truncated area,
The register 30A and the A register 31 are modified to forcibly determine the presence or absence of a carry, carry-carrying is performed up to a maximum of BUFFER 51, the determined code is output, and a code 4D is output.

【0121】また、算術復号器17Dは、LSZ値9と
符号4Dの入力から、CTカウンタ50でバイト単位の
符号入力タイミングを計り、BUFFER51を介し
て、Cレジスタ30Bと、Aレジスタ31で復号演算が
進められ、2値シンボル14を出力する。そして、ライ
ン終端(あるいはストライプ終端)の検出に同期してC
レジスタ30Bの指し示さない側の1/2切捨て領域を
切り捨てる1/2領域切捨て方式を適用し、Cレジスタ
30B、Aレジスタ31を修正する。
The arithmetic decoder 17D measures the code input timing in byte units by the CT counter 50 from the input of the LSZ value 9 and the code 4D, and performs the decoding operation by the C register 30B and the A register 31 via the BUFFER 51. And outputs a binary symbol 14. Then, C is synchronized with the detection of the line end (or the stripe end).
A half area truncation method of truncating a half truncated area on the side not pointed to by the register 30B is applied, and the C register 30B and the A register 31 are modified.

【0122】図12と図13に示される構成ブロック内
およびブロック間の詳細な処理動作は、説明済みの第1
の従来例の処理を説明するフローチャートである図47
から図55、図57から図62と、後述の処理を説明す
るフロー図14から図19で説明する。本実施の形態2
では、図14および図18により、ストライプの終了時
に1/2領域切捨て方式を適用する場合を示す。
Detailed processing operations in and between the constituent blocks shown in FIGS. 12 and 13 are described in the first section.
47 is a flowchart for explaining the processing of the conventional example of FIG.
55 to FIG. 57 and FIG. 57 to FIG. 62, and flowcharts 14 to 19 for explaining the processing described later. Embodiment 2
FIG. 14 and FIG. 18 show a case where the half area truncation method is applied at the end of a stripe.

【0123】本実施の形態2における1/2領域切捨て
方式の一例を、上記第1の従来例で説明したQM−Co
derの符号化/復号処理を説明するフローチャートに
必要な修正のみ加えて説明を行う。符号化/復号/領域
幅レジスタに関する図45、符号器に関する図47から
図55、復号器に関する図57から図62については、
上記第1の従来例の処理を説明するフローと同様であ
る。また、説明上、上記第1の従来例に追加導入される
変数は、有効領域の1/2領域境界値T65、変数CT
値50によって定義される桁上がり境界値CW66であ
る。
An example of the half area truncation method according to the second embodiment is the QM-Co method described in the first conventional example.
A description will be given by adding only necessary modifications to the flowchart for explaining the der encoding / decoding process. 45 for the encoding / decoding / region width register, FIGS. 47 to 55 for the encoder, and FIGS. 57 to 62 for the decoder,
This is the same as the flow describing the processing of the first conventional example. For the sake of explanation, the variables additionally introduced in the first conventional example are a half area boundary value T65 of the effective area, a variable CT
The carry boundary value CW66 defined by the value 50.

【0124】図14は、符号化処理の全体の流れを示す
ENCODER処理を説明するフローチャートである。
図46におけるストライプの終了判定(S104)と
画像の終了判定(S105)の間に1/2領域切捨て処
理を行うHALVINGE処理の呼出し(S107)を
追加する。
FIG. 14 is a flowchart for explaining the ENCODER process showing the entire flow of the encoding process.
A call (S107) of the HALVING process for performing the half area truncation process is added between the stripe end determination (S104) and the image end determination (S105) in FIG.

【0125】図15は、1/2領域切捨て処理を行うH
ALVINGE処理を説明するフローチャートである。
S501、S502は、Cレジスタ30A、CTカウン
タ50に対する正規化処理に相当し、Aレジスタ31は
そのまま保つ。S503、S504は、有効領域の1/
2領域境界値T65、CTカウンタ値50で定義される
桁上がり境界値CW66を設定する。S505で、1/
2領域境界値T65と桁上がり境界値CW66を比較判
定する。判定結果Yesならば桁上がり境界は上位1/
2領域以上に存在するため、桁上がり伝搬がない待機中
の符号バイトを出力し、下位1/2領域を有効領域とす
るCODELOWER処理を呼び出す(S506)。判
定結果Noならば桁上がり境界は下位1/2領域以下に
存在するため、桁上がり伝搬させた待機中の符号バイト
を出力し、上位1/2領域を有効領域とするCODEU
PPER処理を呼び出す(S507)。最後に、S50
8で変数CT50が0ならば、S509でBUFFER
51を書き出し、S510でCbレジスタ値34をBU
FFER51に設定し、S511でCcレジスタ部35
およびCbレジスタ部34をクリアし、S512でCT
カウンタ50に8を設定する。ここで、すでにS506
あるいはS507によって、桁上がり有無を確定し、桁
上がりがあれば伝搬処理もされ(伝搬後、Ccレジスタ
部35=0)、待機していた符号バイトの掃出しが完了
(掃出し後、変数SC値52=0)しており、S509
からS512はBYTEOUT処理(図51)において
冗長部を最大限省いたS161、S164(TEMP=
Cbレジスタ値)、S157、S158に相当する。S
510ではBUFFER51がバイト0xFFになって
も問題ない。
FIG. 15 is a diagram showing H for performing a half area truncation process.
It is a flowchart explaining an ALVINGE process.
Steps S501 and S502 correspond to normalization processing for the C register 30A and the CT counter 50, and the A register 31 is kept as it is. S503 and S504 are 1/1 of the effective area.
A carry boundary value CW66 defined by a two-region boundary value T65 and a CT counter value 50 is set. In S505, 1 /
A comparison is made between the two-region boundary value T65 and the carry boundary value CW66. If the determination result is Yes, the carry boundary is the upper 1 /
Since there are two or more areas, a code byte in standby without carry propagation is output, and a CODELOWER process in which the lower half area is an effective area is called (S506). If the determination result is No, since the carry boundary exists in the lower half area or less, the code byte in the standby state after the carry propagation is output, and the upper half area is set as the effective area.
The PPER process is called (S507). Finally, S50
If the variable CT50 is 0 in step 8, the buffer in step S509 is BUFFER.
51, and the Cb register value 34 is BUed in S510.
FFER 51 is set, and the Cc register unit 35 is set in S511.
And Cb register section 34 are cleared and CT is performed in S512.
8 is set in the counter 50. Here, already S506
Alternatively, in S507, the presence or absence of a carry is determined, and if there is a carry, a propagation process is also performed (the Cc register unit 35 = 0 after the propagation), and the waiting code byte is completed (after the variable SC value 52 is released). = 0), and S509
From S512, S161 and S164 (TEMP =
Cb register value), S157 and S158. S
In 510, there is no problem even if BUFFER 51 becomes byte 0xFF.

【0126】図16は、上位1/2領域を切り捨て、桁
上がりなしの出力待機符号の掃出し処理を行うCODE
LOWER処理を説明するフローチャートである。S5
21で変数SC値52が正ならば、S522でBUFF
ER51を書き出す。さらに、S523で変数SC値5
2が1より大きければ、S524で符号バイト0xFF
を(SC-1)回書き出す。S525で最後の待機符号
バイトである0xFFをBUFFER51に設定し、S
526で変数SC値52を0とする。
FIG. 16 shows a CODE in which the upper half area is truncated and the output standby code is cleared without carry.
It is a flowchart explaining a LOWER process. S5
If the variable SC value 52 is positive in S21, BUFF in S522
Write out ER51. Further, the variable SC value 5 in S523
If 2 is greater than 1, sign byte 0xFF in S524
Is written (SC-1) times. In S525, 0xFF which is the last standby code byte is set in BUFFER 51,
At 526, the variable SC value 52 is set to 0.

【0127】図17は、下位1/2領域を切り捨て、桁
上がりありの出力待機符号の掃出し処理を行うCODE
UPPER処理を説明するフローチャートである。S5
31でBUFFER51に桁上がりを伝搬させ、Cレジ
スタ30Aから桁上がり分(桁上がり境界値CW66)
をクリアする。S533で変数SC値52が正ならば、
S534でBUFFER51を書き出す。さらに、S5
35で変数SC値52が1より大きければ、S536で
符号バイト0x00を(SC-1)回書き出す。S53
7で最後の待機符号バイトである0x00をBUFFE
R51に設定し、S537で変数SC値52を0とす
る。
FIG. 17 shows a CODE in which the lower half area is truncated and the output standby code with carry is swept out.
It is a flowchart explaining an UPPER process. S5
At 31, the carry is propagated to the BUFFER 51, and the carry is carried out from the C register 30 A (carry boundary value CW66).
Clear If the variable SC value 52 is positive in S533,
In S534, BUFFER 51 is written out. Further, S5
If the variable SC value 52 is greater than 1 at 35, the code byte 0x00 is written out (SC-1) times at S536. S53
7. BUFFE 0x00 which is the last wait code byte
R51 is set, and the variable SC value 52 is set to 0 in S537.

【0128】図18は、復号処理の全体の流れを示すD
ECODER処理を説明するフローチャートである。図
56におけるストライプの終了判定(S214)と画像
の終了判定(S215)の間に1/2領域切捨て処理を
行うHALVINGD処理の呼出し(S216)を追加
する。
FIG. 18 is a diagram showing the overall flow of the decoding process.
It is a flowchart explaining an ECODER process. A call (S216) of the HALVINGD process for performing a half area truncation process is added between the stripe end determination (S214) and the image end determination (S215) in FIG.

【0129】図19は、1/2領域切捨て処理を行うH
ALVINGD処理を説明するフローチャートである。
S541、S542は、Cレジスタ30B、CTカウ
ンタ50に対する正規化処理に相当し、Aレジスタ31
はそのまま保つ。S545でCHIGHレジスタ値38
とAレジスタ値31を比較し、判定結果Yesであれば
下位1/2領域が切り捨てられたことになってS546
でCHIGHレジスタ値38からAレジスタ値31を減
じる。判定結果Noであれば下位1/2領域が切り捨て
られたことになる。最後に、S547で変数CT50が
0ならば、BYTEIN処理を呼び出す。
FIG. 19 shows H for performing half area truncation processing.
It is a flowchart explaining an ALVINGD process.
S541 and S542 correspond to normalization processing for the C register 30B and the CT counter 50, and the A register 31
Keep as it is. At S545, the CHIGH register value is 38.
Is compared with the A register value 31. If the determination result is Yes, the lower half area has been truncated and S546
Subtracts the A register value 31 from the CHIGH register value 38. If the determination result is No, it means that the lower half area has been truncated. Finally, if the variable CT50 is 0 in S547, the BYTEIN process is called.

【0130】ただし、桁上がり境界値CW66が1/2
領域境界T65と等しい場合は、上位、下位のどちらの
1/2部分領域をとってもよいが、例えば国際標準勧告
T.82では符号バイト0xFFの直後にはSTUFF
バイト(0x00)を挿入して伝送上の制御(マーカコ
ードの確保)を行うため、桁上がりを伝搬させた方が最
終的な符号長が短くなることがある。
However, the carry boundary value CW66 is 1 /.
When the area is equal to the area boundary T65, either the upper half or the lower half may be used. In 82, STUFF immediately after the code byte 0xFF
Since the transmission (control of the marker code) is performed by inserting the byte (0x00), the final code length may be shorter when the carry is propagated.

【0131】ここでは、画像を区切ったストライプ(ま
たはライン)構成サイズ(バイト数)に対して用意すべ
きSCカウンタ52の仕様が確定できるとしたが、逆に
SCカウンタ52の仕様が変更できないときには桁あふ
れしえないストライプ(またはライン)構成サイズを設
定すればよい。
Here, it is assumed that the specification of the SC counter 52 to be prepared can be determined for the stripe (or line) configuration size (the number of bytes) that divides the image. However, when the specification of the SC counter 52 cannot be changed, What is necessary is just to set the stripe (or line) configuration size that cannot overflow.

【0132】実施の形態3.上記実施の形態2の最大遅
延が8ストライプであったが、符号ビットが発生しない
ときは桁上がりの有無は解決されたままになっているた
め、1/2領域切捨て処理を行わなければ符号確定まで
の遅延は大きくなるが、SCカウンタ52の桁あふれを
抑えながら符号中に1/2領域切捨て処理に伴う余分な
符号ビットを生じさせないことも可能である。本実施の
形態3では、一例として上記実施の形態2で説明したE
NCODER処理を説明するフロー(図14)、DEC
ODER処理を説明するフロー(図18)を図20、図
21に置き換えたものとする。
Embodiment 3 Although the maximum delay in the second embodiment is eight stripes, when no code bit is generated, the presence or absence of a carry remains resolved. Therefore, if the half area truncation processing is not performed, the code is determined. However, it is also possible to suppress the overflow of the SC counter 52 while preventing the generation of an extra code bit in the code due to the half area truncation processing. In the third embodiment, as an example, E described in the second embodiment is used.
Flow for explaining NCODER processing (FIG. 14), DEC
It is assumed that the flow (FIG. 18) for explaining the ODER process is replaced with FIGS.

【0133】図20は、符号化処理の全体の流れを示す
ENCODER処理を説明するフローチャートである。
図14におけるストライプの終了判定(S104)と
1/2領域切捨て処理を行うHALVINGE処理の呼
出し(S107)の間にストライプの符号化処理中に正
規化処理が行われた(符号ビットが発生したか)どうか
の判定(S108)を追加し、行われた場合のみ1/2
領域切捨て処理を行う。
FIG. 20 is a flowchart for explaining the ENCODER process showing the entire flow of the encoding process.
In FIG. 14, normalization processing is performed during the stripe encoding processing between the stripe end determination (S104) and the HALVING processing call (S107) for performing 1/2 area truncation processing (whether a code bit is generated). ) Is added (S108), and only when it is performed,
Performs region truncation processing.

【0134】図21は、復号処理の全体の流れを示すD
ECODER処理を説明するフローチャートである。図
18におけるストライプの終了判定(S214)と1/
2領域切捨て処理を行うHALVINGD処理の呼出し
(S216)の間にストライプの復号処理中に正規化処
理が行われた(符号ビットが読み出された)かどうかの
判定(S217)を追加し、行われた場合のみ1/2領
域切捨て処理を行う。
FIG. 21 is a flowchart showing the overall flow of the decoding process.
It is a flowchart explaining an ECODER process. The stripe end determination (S214) in FIG.
During the calling of the HALVINGD process for performing the two-region truncation process (S216), a determination (S217) as to whether or not the normalization process was performed (the sign bit was read) during the stripe decoding process was added. Only when this is done, the half area truncation processing is performed.

【0135】ここで、符号レジスタC30Aの構成仕様
を上記実施の形態1と同様にすれば、符号器/復号器の
バイト入出力が同期可能なため、本実施の形態3におい
て正規化処理の有無による1/2領域切捨て処理実行を
ライン処理中の符号バイト入出力の有無(実行有無フラ
グを導入または符号ビット数の増加から検出するなど)
で行うことも可能である。この場合、バイト入出力まで
の数ビット未満の正規化処理が発生しても1/2領域切
捨て処理の実行が行われないことになり、それに伴う余
分な符号ビットを削減できる。
Here, if the configuration specification of the code register C30A is the same as that of the first embodiment, the byte input / output of the encoder / decoder can be synchronized. Of code byte input / output during line processing for the execution of half area truncation processing due to (eg, detection of the execution presence / absence flag or increase in the number of code bits)
It is also possible to carry out. In this case, even if a normalization process of less than several bits up to the byte input / output occurs, the half area truncation process is not performed, and an extra sign bit associated with it can be reduced.

【0136】実施の形態4.上記実施の形態2では、画
像をストライプに分割して符号化/復号する際に、1回
のみ符号器/復号器の初期化処理および後処理を行うも
のとして示した。本実施の形態4では、1/2領域切捨
て処理をラインの処理ごとに実行し、ストライプの処理
ごとに符号器/復号器の初期化処理および後処理を行う
ものとする。ここで、符号器の後処理(FLUSH処理
を説明するフロー)には、未確定の符号を確定して掃き
出す処理が行われるため、ストライプは複数ラインから
構成されるものとして、ライン終端ごとに1/2領域切
捨て処理を行うものとする。本実施の形態4では、一例
として上記実施の形態2で説明したENCODER処理
を説明するフロー(図14)、DECODER処理を説
明するフロー(図18)を図22、図23に置き換えた
ものとする。
Embodiment 4 In the second embodiment, when the image is divided into stripes and encoded / decoded, the initialization / post-processing of the encoder / decoder is performed only once. In the fourth embodiment, 領域 area truncation processing is performed for each line processing, and initialization processing and post-processing of an encoder / decoder are performed for each stripe processing. Here, in the post-processing of the encoder (flow for explaining the FLUSH processing), a processing of determining and sweeping out an undetermined code is performed. / 2 area truncation processing is performed. In the fourth embodiment, as an example, the flow for explaining the ENCODER process (FIG. 14) and the flow for explaining the DECODER process (FIG. 18) described in the second embodiment are replaced with FIGS. .

【0137】図22は、符号化処理の全体の流れを示す
ENCODER処理を説明するフローチャートである。
図14に対してラインの終了判定(S109)を追加
したことにより、ストライプの終了判定(S104)、
画像の終了判定(S105)を再構成することによっ
て、ラインごとに1/2領域切捨て処理(S107)を
実行し、ストライプごとに初期化処理(S101)、後
処理(S106)を実行している。
FIG. 22 is a flowchart for explaining the ENCODER process showing the entire flow of the encoding process.
By adding a line end determination (S109) to FIG. 14, the stripe end determination (S104)
By reconstructing the end judgment of the image (S105), the half area truncation processing (S107) is executed for each line, the initialization processing (S101), and the post-processing (S106) are executed for each stripe. .

【0138】図23は、復号処理の全体の流れを示すD
ECODER処理を説明するフローチャートである。図
18に対してラインの終了判定(S218)を追加した
ことにより、ストライプの終了判定(S214)、画像
の終了判定(S215)を再構成することによって、ラ
インごとに1/2領域切捨て処理(S216)を実行
し、ストライプごとに初期化処理(S211)を実行し
ている。
FIG. 23 is a diagram showing the overall flow of the decoding process.
It is a flowchart explaining an ECODER process. By adding the line end determination (S218) to FIG. 18, the stripe end determination (S214) and the image end determination (S215) are reconstructed, so that the half area truncation processing ( S216), and the initialization process (S211) is performed for each stripe.

【0139】このように、ラインごとに1/2領域切捨
て処理を行うことによって、上記実施の形態2と同様に
符号の確定遅延は最大8ラインとなり、かつ初期化処
理、後処理を行うことによって符号がストライプごとに
完結することになる。
As described above, by performing the 領域 region truncation processing for each line, the code definite delay becomes a maximum of 8 lines as in the second embodiment, and the initialization processing and post-processing are performed. The code will be completed for each stripe.

【0140】実施の形態5.上記実施の形態3では、画
像をストライプに分割して符号化/復号する際に、1回
のみ符号器/復号器の初期化処理および後処理を行うも
のとして示した。本実施の形態5では、1/2領域切捨
て処理をラインの処理ごとに実行し、ストライプの処理
ごとに符号器/復号器の初期化処理および後処理を行う
ものとする。本実施の形態5では、一例として上記実施
の形態2で説明したENCODER処理を説明するフロ
ー(図20)、DECODER処理を説明するフロー
(図21)を、図24、図25に置き換えたものとす
る。
Embodiment 5 FIG. In the third embodiment, when an image is divided into stripes and encoded / decoded, the initialization / post-processing of the encoder / decoder is performed only once. In the fifth embodiment, 1 / area truncation processing is performed for each line processing, and initialization processing and post-processing of an encoder / decoder are performed for each stripe processing. In the fifth embodiment, as an example, the flow for explaining the ENCODER process (FIG. 20) and the flow for explaining the DECODER process (FIG. 21) described in the second embodiment are replaced with FIGS. I do.

【0141】図24は、符号化処理の全体の流れを示す
ENCODER処理を説明するフローチャートである。
図20に対してラインの終了判定(S109)を追加
したことにより、ストライプの終了判定(S104)、
画像の終了判定(S105)を再構成することによっ
て、ラインごとに1/2領域切捨て処理(S107)を
実行し、ストライプごとに初期化処理(S101)、後
処理(S106)を実行している。
FIG. 24 is a flowchart for explaining the ENCODER process showing the entire flow of the encoding process.
By adding a line end determination (S109) to FIG. 20, stripe end determination (S104),
By reconstructing the end judgment of the image (S105), the half area truncation processing (S107) is executed for each line, the initialization processing (S101), and the post-processing (S106) are executed for each stripe. .

【0142】図25は、復号処理の全体の流れを示すD
ECODER処理を説明するフローチャートである。図
21に対してラインの終了判定(S218)を追加した
ことにより、ストライプの終了判定(S214)、画像
の終了判定(S215)を再構成することによって、ラ
インごとに1/2領域切捨て処理(S216)を実行
し、ストライプごとに初期化処理(S211)を実行し
ている。
FIG. 25 is a diagram showing the entire flow of the decoding process.
It is a flowchart explaining an ECODER process. By adding the line end determination (S218) to FIG. 21, the stripe end determination (S214) and the image end determination (S215) are reconstructed, so that the half area truncation processing ( S216), and the initialization process (S211) is performed for each stripe.

【0143】このように、ラインごとに1/2領域切捨
て処理を行うことによって、上記実施の形態3と同様に
符号の確定遅延は上記実施の形態4より大きくなるが、
SCカウンタ52の桁あふれを抑えながら符号中に余分
な符号ビットを生じさせないことになる。また、上記実
施の形態4と同様に初期化処理、後処理を行うことによ
って符号がストライプごとに完結することになる。
As described above, by performing the 領域 area truncation processing for each line, the code definite delay is larger than that in the fourth embodiment, as in the third embodiment.
An extra code bit is not generated in the code while suppressing the overflow of the SC counter 52. Further, by performing the initialization processing and the post-processing in the same manner as in the fourth embodiment, the code is completed for each stripe.

【0144】上記実施の形態2から上記実施の形態5
は、符号器と復号器における1/2領域切捨て処理の同
期をストライプ、ラインといった単位で行っているが、
例えばブロック、サブブロックといった他の何らかの同
期のとれる単位であっても構わない。また、データは必
ずしも画像でなくとも構わない。
Embodiment 2 to Embodiment 5
Performs the synchronization of the half area truncation processing in the encoder and the decoder in units of stripes and lines.
For example, it may be any other unit that can be synchronized, such as a block or a sub-block. Further, the data does not necessarily have to be an image.

【0145】実施の形態6.本実施の形態6では、例え
ばバイト単位で符号を出力する場合に、符号中に同じバ
イト値が連続するときそのバイト値の連続を、バイト値
およびその長さを意味する他のバイト群で置き換えるこ
とによって総符号長とその出力時間を短縮する方法を示
す。以下、ここで置き換えるバイト群をランレングスマ
ーカを呼び、所定の指示方法によって任意の長さに拡張
して数値を表現することができるものとする。
Embodiment 6 FIG. In the sixth embodiment, for example, when a code is output in byte units, when the same byte value is continuous in the code, the continuation of the byte value is replaced with another byte group indicating the byte value and its length. A method for reducing the total code length and the output time by the above will be described. Hereinafter, it is assumed that a byte group to be replaced here is called a run length marker, and can be extended to an arbitrary length by a predetermined instruction method to express a numerical value.

【0146】図26に示すように、例えば4つのバイト
0xFFの連続を、(1)ではエスケープコードESC
とそれに続く0xFFが4つ続くことを示すバイトMK
で置き換えることにより、ESCコードを確保するため
に挿入されたSTUFFバイトと併せて8バイトを2バ
イトとする例である。(2)ではバイトMKは0xFF
の置き換えであることのみ示し、その長さをバイトRL
の3バイトに置き換える例である。また、0x00が続
く場合も同様に0x00が続くことを示すバイトMKと
別途必要ならばバイトRLで置き換える例である。ここ
で、バイトMKはその置き換える対象のバイト値および
その長さを識別できる値が割り振られているものとす
る。
As shown in FIG. 26, for example, a sequence of four bytes 0xFF is used.
And byte MK indicating that four 0xFFs follow
In this example, 8 bytes are replaced with 2 bytes in addition to the STUFF bytes inserted to secure the ESC code. In (2), byte MK is 0xFF
And the length is specified in bytes RL
This is an example of replacing with 3 bytes. Also, in the case where 0x00 continues, the byte MK indicating that 0x00 continues is replaced with a byte RL if necessary. Here, it is assumed that the byte MK is assigned a value that can identify the byte value to be replaced and its length.

【0147】また、図27に示すように、7個のバイト
0xFFを置き換えたランレングスマーカは、一例とし
て、4個と3個の置換えを示す2つのランレングスマー
カ、または2個と3個と2個の置換えを示す2つのラン
レングスマーカとも等価であり、また他のラン長の合計
が等しくなる組合せであっても等価であるといえる。
As shown in FIG. 27, a run-length marker in which seven bytes 0xFF are replaced is, for example, two run-length markers indicating four and three replacements, or two and three run-length markers. Two run-length markers indicating two replacements are equivalent, and a combination in which the total of other run lengths is equal can be said to be equivalent.

【0148】ランレングスマーカは、例えば図28に示
すように、ESCコード(0xFF)とそれに続くバイ
トMKで示すとすれば、バイトMKは(8−N)ビット
の置換対象バイトの識別部とNビットのランレングス部
から構成される。この場合、置換対象バイトは2の(8
−N)乗種類を指定でき、また2のN乗までの置換対象
バイトのラン長を示すことができる。
If the run length marker is represented by an ESC code (0xFF) followed by a byte MK as shown in FIG. 28, for example, the byte MK is composed of (8-N) bits of the identification part of the replacement target byte and N It consists of a bit run length part. In this case, the replacement target byte is 2 (8
-N) A power type can be specified, and the run length of the replacement target byte up to 2 N can be indicated.

【0149】ただし、国際標準勧告T.82では他のマ
ーカセグメントが定義されているため、識別部で指定可
能なすべての値を使用できるわけではない。また、他の
国際標準勧告でも別途マーカセグメントが使用されてい
る可能性があるため、ここでランレングスマーカを使用
する際にはそれらのすべてのマーカセグメントと重複し
ないようにしなければならない。
However, according to International Standard Recommendation T. In 82, since other marker segments are defined, not all values that can be specified in the identification unit can be used. In addition, since marker segments may be separately used in other international standard recommendations, when the run-length markers are used here, it is necessary not to overlap with all the marker segments.

【0150】また、ランレングスマーカは、例えば図2
9に示すように、ESCコード(0xFF)とそれに続
くバイトMK、および所定のSバイトのランレングス部
RLで示すとすれば、バイトMKは8ビットすべてが置
換対象バイトの識別部となる。この場合、置換対象バイ
トは255種類(MK=STUFFを除く)を指定で
き、また2の(8×S)乗までの置換対象バイトのラン
長を示すことができる。
The run-length marker is, for example, as shown in FIG.
As shown in FIG. 9, if an ESC code (0xFF), a byte MK following the ESC code, and a run length portion RL of a predetermined S byte are used, all 8 bits of the byte MK become an identification portion of a replacement target byte. In this case, 255 types of bytes to be replaced (excluding MK = STUFF) can be designated, and the run length of the bytes to be replaced can be shown up to 2 (8 × S).

【0151】さらに、ランレングスマーカは、例えば図
30に示すように、ESCコード(0xFF)とそれに
続くバイトMK、およびSバイトのランレングス部RL
で示すとすれば、バイトMKは(8−N)ビットの置換
対象バイトの識別部とNビットのランレングス指示部か
ら構成される。この場合、置換対象バイトは2の(8−
N)乗種類を指定でき、また2のN乗バイトまでのラン
レングス部のバイト長を示すことができる。そして、2
の(8×S)乗までの置換対象バイトのラン長を示すこ
とができる。
Further, as shown in FIG. 30, for example, the run length marker is an ESC code (0xFF) followed by a byte MK and a run length portion RL of S bytes.
, The byte MK is composed of an (8-N) -bit replacement target byte identification unit and an N-bit run length instruction unit. In this case, the replacement target byte is 2 (8-
N) The type of the power can be specified, and the byte length of the run-length portion up to 2 N bytes can be indicated. And 2
To the (8 × S) power can be indicated.

【0152】図28から図30にランレングスマーカの
一例を示したが、バイトMKで置換対象バイトを指示で
きないとき、ESCおよびバイトMKでランレングスマ
ーカの開始を判定させ、固定長またはバイトMKで指定
した長さのランレングス部に、さらに置換対象バイトを
ランレングス部の前または後に置くことで直接指定する
方法もある。この方法によれば、他のマーカセグメント
に対して、ランレングスマーカであることだけをバイト
MKで認識させれば、置換対象バイトはその値によらず
すべてが使用できるようになる。
FIGS. 28 to 30 show examples of the run length marker. When the byte to be replaced cannot be indicated by the byte MK, the start of the run length marker is determined by the ESC and the byte MK, and the fixed length or the byte MK is used. There is also a method of directly specifying the replacement target byte by placing it before or after the run length part in the run length part of the specified length. According to this method, if only the run-length marker is recognized by the byte MK with respect to the other marker segments, all of the replacement target bytes can be used regardless of the value.

【0153】また、複数バイトの繰返しに対しても、例
えばバイトMKにその繰り返される置換対象パターンの
バイト長を示し、パターンのラン長(繰返し数)ととも
にパターンを直接指定する方法もある。
For a repetition of a plurality of bytes, for example, there is a method in which the byte MK indicates the byte length of the pattern to be replaced, and the pattern is directly specified together with the run length of the pattern (the number of repetitions).

【0154】一例を図31(a)に示すと、ESCコー
ド(0xFF)と識別部を含むマーカMK、複数バイト
から構成される置換対象パターン部PT、ランレングス
部RLから構成されるものとする。ここで、マーカMK
は、置換対象パターン部PTのフィールド長(値P)、
ランレングス部RLのフィールド長(値R)を指定する
とすればPバイトの置換対象パターンPTがRバイトで
表現されるRL回繰り返されることになる。
An example is shown in FIG. 31 (a), which is composed of a marker MK including an ESC code (0xFF) and an identification section, a replacement target pattern section PT composed of a plurality of bytes, and a run length section RL. . Here, the marker MK
Is the field length (value P) of the pattern portion PT to be replaced,
If the field length (value R) of the run-length part RL is specified, the P-byte replacement target pattern PT is repeated RL times represented by R bytes.

【0155】その具体例として、3回繰り返される2バ
イトのパターン0x01,0x23をランレングスマー
カに置き換えると、置換対象パターン部のフィールド長
Pが2、ランレングス部のフィールド長Rが1であるマ
ーカMKを使用して、図31(b)のように示される。
As a specific example, when the 2-byte patterns 0x01 and 0x23 repeated three times are replaced with run-length markers, a marker having a field length P of the pattern portion to be replaced is 2 and a field length R of the run-length portion is 1 Using MK, it is shown as in FIG.

【0156】マーカMKにおいて、ランレングスマーカ
識別部を除く上記2つのフィールド長部は、その識別部
を含むバイトと独立であっても構わない。また、置換対
象パターン部PTのフィールド長部とランレングス部R
Lのフィールド長部、さらに置換対象パターン部PTと
ランレングス部RLは、符号器と復号器の間で認識が一
致すれば上記一例に限らずそれぞれ自由に配置すること
ができる。
In the marker MK, the two field length parts other than the run-length marker identification part may be independent of the byte including the identification part. Also, the field length part and the run length part R of the pattern part PT to be replaced
The field length portion of L, the pattern portion to be replaced PT, and the run-length portion RL are not limited to the above example and can be freely arranged as long as the recognition is identical between the encoder and the decoder.

【0157】ランレングスマーカに指示される置換対象
バイトのラン長は0であることはないため、0が最大値
を表すか、または実際の(ラン長−1)を常にランレン
グス部に埋め込むかを取り決めておく必要がある。
Since the run length of the replacement target byte indicated by the run length marker is never 0, whether 0 represents the maximum value or whether the actual (run length-1) is always embedded in the run length portion It is necessary to arrange.

【0158】ここで、符号器における0xFFまたは0
x00の連続したSC回のバイト出力(BYTEOUT
処理を説明するフローチャートのS154、S162、
FINALWRITES処理を説明するフローチャート
のS204、S208、CODELOWER処理を説明
するフローチャートのS524、CODEUPPER処
理を説明するフローチャートのS536)については、
例えば図32に示すように、RUNLENMARK処理
を説明するフローチャートでランレングスマーカへの置
換え処理を容易に実行することができる。ここで、符号
器と復号器では、上記図28から図30のどの形式のラ
ンレングスマーカを使用するかということを予め取り決
めているものとする。その使用するランレングスマーカ
のランレングス部に示すことのできる最大値を定数MA
RKLEN80とする。例えば、図28において、N=
4であれば、定数MARKLEN80は16となる。
Here, 0xFF or 0
x00 consecutive SC byte output (BYTEOUT
S154, S162 of the flowchart for explaining the processing,
Regarding S204 and S208 in the flowchart describing the FINALWRITES process, S524 in the flowchart describing the CODELOWER process, and S536 in the flowchart describing the CODEUPPER process,
For example, as shown in FIG. 32, the process for replacing with a run-length marker can be easily executed in the flowchart describing the RUNLENMARK process. Here, it is assumed that the encoder and the decoder determine in advance which type of the run-length marker shown in FIGS. 28 to 30 is to be used. The maximum value that can be indicated in the run length part of the run length marker to be used is a constant MA
RKLEN80. For example, in FIG.
If it is 4, the constant MARKLEN80 will be 16.

【0159】図32において、RL81はSC個52の
バイトを置き換えるためのカウンタ変数である。S60
1では、変数SC値52を変数RL81に設定する。S
602で変数RL値81が定数MARKLEN80より
大きければ、S603で長さMARKLEN80に対す
る置換対象バイトを示すランレングス(RL)マーカを
書き出し、S604で変数RL81から定数MARKL
EN80を減じる。S602で変数RL値81が定数M
ARKLEN80より大きくなくなれば、最後にS60
5で残りの長さが変数RL値81の置換対象バイトを示
すランレングス(RL)マーカを書き出し、S606で
変数RL値81を0とする。
In FIG. 32, RL81 is a counter variable for replacing SC 52 bytes. S60
At 1, the variable SC value 52 is set to the variable RL81. S
If the variable RL value 81 is larger than the constant MARKLEN80 in 602, a run length (RL) marker indicating the replacement target byte for the length MARKLEN80 is written in S603, and the variable RL81 is converted from the variable RL81 to the constant MARKL in S604.
Reduce EN80. In step S602, the variable RL value 81 is a constant M
If it does not become larger than ARKLEN80, finally S60
In 5, a run length (RL) marker indicating the replacement target byte having the remaining length of the variable RL value 81 is written, and the variable RL value 81 is set to 0 in S 606.

【0160】この処理を説明するフローチャートによれ
ば、ランレングスマーカが分割されて連続出力されると
き最大長のものから出力され、最後に最大値未満のもの
が出力されることになるが、上記図27にも示したとお
りこの出力順によらなくてもよい。また、置換対象バイ
トは必ずしも0x00または0xFFである必要はな
く、符号出力を監視することによって任意の連続する符
号バイトを置き換えてもよい。
According to the flowchart for explaining this processing, when the run-length markers are divided and output continuously, the run-length markers are output from those having the maximum length, and finally those having a length less than the maximum value are output. As shown in FIG. 27, the output order does not have to be used. Also, the replacement target byte does not necessarily need to be 0x00 or 0xFF, and any continuous code byte may be replaced by monitoring the code output.

【0161】ランレングスマーカのランレングス部のビ
ット数が、SCカウンタ52のビット数以上であれば、
ラン長の指示についてただ1つのランレングスマーカで
指定することが可能である。
If the number of bits in the run length part of the run length marker is equal to or greater than the number of bits in the SC counter 52,
It is possible to specify the run length instruction with only one run length marker.

【0162】置換対象バイトは、必ずしもバイトである
ことはなく、例えばワード、ダブルワードといったマル
チバイト単位でもよく、置き換えるランレングスマーカ
を適正に選択することによって、1バイトであってもよ
いし、複数から構成されるパターンを対象とすることも
できる。
The replacement target byte is not necessarily a byte, but may be a multibyte unit such as a word or a double word, or may be a single byte or a plurality of bytes by appropriately selecting a run length marker to be replaced. Can be targeted.

【0163】実施の形態7.上記実施の形態6によれ
ば、ラン長が変数SC値52の置換対象バイトはすべて
ランレングスマーカで置き換えられることになる。本実
施の形態7では、図33において、一部のランレングス
分だけランレングスマーカで置き換えずに置換対象バイ
トをその長さだけそのまま出力できるものとする。ここ
で、ランレングスマーカの構成バイト数を定数MARK
LENMIN82とする。例えば、図28であれば定数
MARKLENMINは2となる。
Embodiment 7 FIG. According to the sixth embodiment, all the replacement target bytes whose run length is the variable SC value 52 are replaced by the run length marker. In Embodiment 7, in FIG. 33, it is assumed that the replacement target byte can be output as it is without replacing a part of the run length with the run length marker. Here, the number of bytes constituting the run length marker is set to a constant MARK.
LENMIN82. For example, in FIG. 28, the constant MARKLENMIN is 2.

【0164】図34は、ランレングスマーカの置換え処
理を行うRUNLENMARK処理を説明するフローチ
ャートである。図34において、S601からS604
およびS606は上記図32と同様の処理が行われる。
S607において変数RL値81が定数MARKLEN
MIN82以上であれば、S605で長さが変数RL値
81の置換対象バイトを示すランレングス(RL)マー
カを書き出し、定数MARKLENMIN82未満であ
ればS608で置換対象バイトを変数RL値81で示さ
れる個数だけ書き出す。
FIG. 34 is a flow chart for explaining a RUNLENMARK process for replacing a run-length marker. In FIG. 34, from S601 to S604
In S606, the same processing as in FIG. 32 is performed.
In step S607, the variable RL value 81 is set to the constant MARKLEN.
If the value is equal to or more than MIN82, a run length (RL) marker indicating the replacement target byte whose length is the variable RL value 81 is written in S605. Just write out.

【0165】このように、置換対象バイトのラン長がラ
ンレングスマーカの構成バイト数より少なければランレ
ングスマーカへ置き換えずに置換対象バイトをそのラン
の長さ分だけそのまま出力することによって符号長を短
くできる。どちらで出力しても長さが等しい場合には、
置き換えても置き換えなくてもよい。
As described above, if the run length of the replacement target byte is smaller than the number of bytes constituting the run length marker, the replacement target byte is output as it is by the length of the run without replacing the run length marker with the run length marker. Can be shortened. If the lengths are the same regardless of the output,
It may or may not be replaced.

【0166】ただし、置換対象バイトがバイト0xFF
である場合には、置き換えないときSTUFFバイトの
挿入が行われて符号長が2倍となるため、より短くなる
ように長さの判定を考慮すべきである。
However, the replacement target byte is byte 0xFF
In the case of, since the STUFF byte is inserted when not replaced and the code length is doubled, the length determination should be considered so as to be shorter.

【0167】実施の形態8.上記実施の形態6あるいは
上記実施の形態7において、ランレングスマーカを使用
する際には、図35に示すように、出力される符号中に
使用を通知する情報を含ませることができる。
Embodiment 8 FIG. In the sixth embodiment or the seventh embodiment, when the run-length marker is used, as shown in FIG. 35, information for notifying the use can be included in the output code.

【0168】常に使用する場合はランレングスマーカの
使用通知は行う必要はないが、例えば上記図28から図
30などのランレングスマーカの形式、置換対象バイト
の種別、ランレングス部の長さの制限などの一部または
すべてについて、符号器から復号器へ付加情報を予め通
知することによって動作モードの統一設定を図ることが
できる。
When used at all times, it is not necessary to notify the use of the run-length marker. For example, the format of the run-length marker, the type of the byte to be replaced, and the length of the run-length part shown in FIGS. For some or all of them, the operation mode can be unified by notifying the decoder of the additional information in advance from the encoder.

【0169】また、符号器は、符号化に先立って復号器
に実装される処理能力を確認し(ネゴシエーション)、
その結果から適用したモード情報を通知してもよい。復
号器の能力としては、例えばランレングスマーカを逆変
換するためのランレングス部のカウンタ桁数などの制限
値がある。
Further, the encoder confirms the processing capability implemented in the decoder prior to encoding (negotiation),
The applied mode information may be notified from the result. As the capability of the decoder, for example, there is a limit value such as the number of digits of a counter of a run-length unit for performing an inverse transform of a run-length marker.

【0170】さらに、この場合、復号器は、ランレング
スマーカ使用通知を含まない符号データに対しては、従
来の符号器の生成した符号としてみなすこともできる。
また、符号器は、復号器が従来の復号器であれば、ラン
レングスマーカ使用通知を符号に挿入せず、またランレ
ングスマーカを使用しなければよい。
Further, in this case, the decoder can regard code data not containing the run-length marker use notification as a code generated by a conventional encoder.
If the decoder is a conventional decoder, the encoder does not need to insert the run-length marker use notification into the code and does not need to use the run-length marker.

【0171】実施の形態9.上記実施の形態6あるいは
上記実施の形態7に示されたランレングスマーカを従来
の符号器および従来の復号器で使用するために、従来の
符号器と回線(通信路)の間、または回線(通信路)と
従来復号器の間にアダプタを挿入することによって相互
通信を可能とすることができる。
Embodiment 9 FIG. In order to use the run-length marker shown in the sixth embodiment or the seventh embodiment in a conventional encoder and a conventional decoder, the run-length marker is used between a conventional encoder and a line (communication path) or a line (communication path). Communication can be made possible by inserting an adapter between the communication channel) and the conventional decoder.

【0172】まず、図36に示すように、符号器側のア
ダプタ(ランレングスマーカ変換器)は、データから符
号を区別し、符号バイトを監視しながら同一バイト値が
連続する場合、そのラン長を改めてSCとすれば、図3
2または図34の処理を説明するフローチャートによっ
てランレングスマーカへ置き換える。また、復号器側の
アダプタ(ランレングスマーカ逆変換器)は、同様にデ
ータから符号を区別し、符号バイトを監視しながらラン
レングスマーカを検出した場合指示された置換対象バイ
トを検出されたラン長だけ連続して出力する。
First, as shown in FIG. 36, the adapter (run-length marker converter) on the encoder side distinguishes the code from the data, and monitors the code byte. Is changed to SC again.
The processing is replaced with a run-length marker according to the flowchart describing the processing of FIG. The adapter (run-length marker inverse transformer) on the decoder side also discriminates the code from the data in the same manner, and when the run-length marker is detected while monitoring the code byte, the specified replacement target byte is detected. Output continuously for a long time.

【0173】また、図37に示すように、復号器側にラ
ンレングスマーカ逆変換器がないとき、符号器はランレ
ングスマーカ変換器を実質的に使用せずにそのまま符号
を通過させ、図38に示すように、符号器側にランレン
グスマーカ変換器がないとき、復号器はランレングスマ
ーカ逆変換器を実質的に使用せずにそのまま符号を通過
させることによってランレングスマーカを使用できない
従来装置との互換性を保持することができる。
As shown in FIG. 37, when there is no run-length marker inverse transformer on the decoder side, the encoder passes the code as it is without substantially using the run-length marker transformer. As shown in (1), when there is no run-length marker converter on the encoder side, the decoder uses the run-length marker inverse transformer and practically does not use the run-length marker. Compatibility with can be maintained.

【0174】ここで、従来の符号器/復号器に接続され
るアダプタ(ランレングス変換器/逆変換器)は、外見
が符号器/復号器に対して独立構成であってもよいし、
一体構成であっても構わない。
Here, the adapter (run-length transformer / inverter) connected to the conventional encoder / decoder may have an appearance independent of the encoder / decoder.
It may be an integral configuration.

【0175】以上のように、符号化および復号処理は、
計算機または装置の内部でデータを蓄積したり、公衆回
線または専用回線による無線・有線による通信または記
憶媒体によって、外部とのデータの交換を行うファクシ
ミリ装置、スキャナ装置、プリンタ装置、コンピュー
タ、データベース装置、画像表示装置、画像蓄積装置、
データ蓄積装置、画像伝送装置、データ伝送装置等のハ
ードウェアに適用することができる。また、汎用の計算
機にソフトウェアと一部のハードウェアで上記各装置相
当の機能を実現することもでき、装置の外見が一体であ
っても複数に独立していても構わない。さらに、専用の
ハードウェア内部についても、これらの処理機能を搭載
したLSI(半導体チップ)やミドルウェアによる実装
形式には制限されるものではない。通信についても、電
気的または光学的無線や有線、また公衆回線や専用回
線、あるいはLAN、WAN、インターネット、イント
ラネットなどの通信形式に制限されるものではない。記
憶媒体への記録形式も磁気的、電気的、光学的あるいは
デジタル式やアナログ式といった記録形式に制限される
ものでもなく、また、記録媒体は装置に固定されるか分
離されてるかに制限されるものでもない。さらに、視認
可否に関わらずインク等での記録形式でも構わない。
As described above, the encoding and decoding processes are as follows.
A facsimile device, a scanner device, a printer device, a computer, a database device, which stores data inside a computer or a device, and exchanges data with the outside by wireless or wired communication or a storage medium via a public line or a dedicated line, Image display devices, image storage devices,
The present invention can be applied to hardware such as a data storage device, an image transmission device, and a data transmission device. Further, a function equivalent to each of the above-described devices can be realized by software and a part of hardware on a general-purpose computer, and the appearance of the devices may be integrated or may be independent of a plurality of devices. Furthermore, the inside of the dedicated hardware is not limited to a mounting form using an LSI (semiconductor chip) or middleware equipped with these processing functions. Communication is not limited to electrical or optical wireless or wired, public or private lines, or communication formats such as LAN, WAN, Internet, and intranet. The recording format on the storage medium is not limited to a magnetic, electrical, optical, digital or analog recording format, and the recording medium is limited to whether it is fixed to the device or separated. Not something. Further, a recording format using ink or the like may be used regardless of whether or not the visual permission is given.

【0176】なお、この発明において、ブロック図、フ
ロー図は画像符号化に適用するものとして説明を行った
が、一般的なデータの符号化にも用いることができるこ
とはいうまでもない。
In the present invention, the block diagram and the flow chart have been described as being applied to image coding. However, it goes without saying that the present invention can also be used for general data coding.

【0177】[0177]

【発明の効果】以上のように、この発明によれば、符号
が確定するまで待機する符号長を記憶するカウンタの桁
あふれをなくすことができ、適当な間隔で符号を強制的
に確定することにより桁上がりを制御して符号の確定遅
延時間を有限化して見積もることができる。また、符号
値が確定したときに所定のパターンへの置き換えによっ
て総符号長と符号の掃出し時間を短縮することができ
る。
As described above, according to the present invention, it is possible to eliminate the overflow of the counter for storing the code length which waits until the code is determined, and to forcibly determine the code at appropriate intervals. Thus, the carry can be controlled to make the code definite delay time finite and estimated. In addition, when the code value is determined, the total code length and code sweeping time can be reduced by replacing the code value with a predetermined pattern.

【0178】また、桁上がり境界を厳密に計算せずに桁
上がり制御を行うことができると共に、復号器で符号器
の符号レジスタを再現せずに桁上がり制御を行うことが
できるという効果が得られる。
In addition, the carry control can be performed without strictly calculating the carry boundary, and the carry control can be performed without reproducing the code register of the encoder by the decoder. Can be

【図面の簡単な説明】[Brief description of the drawings]

【図1】 この発明の概念に係る上方/下方1/2領域
切捨て方式の説明図である。
FIG. 1 is an explanatory diagram of an upper / lower half area truncation method according to the concept of the present invention.

【図2】 この発明の実施の形態1に係る符号化部の構
成を示すブロック図である。
FIG. 2 is a block diagram illustrating a configuration of an encoding unit according to Embodiment 1 of the present invention.

【図3】 この発明の実施の形態1に係る復号化部の構
成を示すブロック図である。
FIG. 3 is a block diagram showing a configuration of a decoding unit according to Embodiment 1 of the present invention.

【図4】 この発明の実施の形態1に係るROUNDD
OWNE処理を説明するフローチャートである。
FIG. 4 is a diagram showing a ROUNDD according to the first embodiment of the present invention;
It is a flowchart explaining an OWNE process.

【図5】 この発明の実施の形態1に係るHALVIN
GE処理を説明するフローチャートである。
FIG. 5 shows HALVIN according to Embodiment 1 of the present invention.
It is a flowchart explaining a GE process.

【図6】 この発明の実施の形態1に係るROUNDD
OWND処理を説明するフローチャートである。
FIG. 6 shows a ROUNDD according to the first embodiment of the present invention.
It is a flowchart explaining an OWND process.

【図7】 この発明の実施の形態1に係るHALVIN
GD処理を説明するフローチャートである。
FIG. 7 shows HALVIN according to Embodiment 1 of the present invention.
It is a flowchart explaining a GD process.

【図8】 この発明の実施の形態1に係るHALVIN
GE処理を説明するフローチャートである。
FIG. 8 shows HALVIN according to the first embodiment of the present invention.
It is a flowchart explaining a GE process.

【図9】 この発明の実施の形態1に係るBYTEOU
T7処理を説明するフローチャートである。
FIG. 9 shows a BYTEOU according to the first embodiment of the present invention.
It is a flowchart explaining a T7 process.

【図10】 この発明の実施の形態1に係るHALVI
NGD処理を説明するフローチャートである。
FIG. 10 shows a HALVI according to the first embodiment of the present invention.
It is a flowchart explaining an NGD process.

【図11】 この発明の実施の形態1に係るBYTEI
N7処理を説明するフローチャートである。
FIG. 11 shows a BYTEI according to the first embodiment of the present invention.
It is a flowchart explaining an N7 process.

【図12】 この発明の実施の形態2に係る符号化部の
構成を示すブロック図である。
FIG. 12 is a block diagram showing a configuration of an encoding unit according to Embodiment 2 of the present invention.

【図13】 この発明の実施の形態2に係る復号化部の
構成を示すブロック図である。
FIG. 13 is a block diagram showing a configuration of a decoding unit according to Embodiment 2 of the present invention.

【図14】 この発明の実施の形態2に係るENCOD
ER処理を説明するフローチャートである。
FIG. 14 is an ENCODE according to Embodiment 2 of the present invention;
It is a flowchart explaining an ER process.

【図15】 この発明の実施の形態2に係るHALVI
NGE処理を説明するフローチャートである。
FIG. 15 shows a HALVI according to the second embodiment of the present invention.
It is a flowchart explaining an NGE process.

【図16】 この発明の実施の形態2に係るCODEL
OWER処理を説明するフローチャートである。
FIG. 16 is a CODEL according to a second embodiment of the present invention.
It is a flowchart explaining an OWER process.

【図17】 この発明の実施の形態2に係るCODEU
PPER処理を説明するフローチャートである。
FIG. 17 is a CODEU according to Embodiment 2 of the present invention;
It is a flowchart explaining a PPER process.

【図18】 この発明の実施の形態2に係るDECOD
ER処理を説明するフローチャートである。
FIG. 18 shows a DECOD according to the second embodiment of the present invention.
It is a flowchart explaining an ER process.

【図19】 この発明の実施の形態2に係るHALVI
NGD処理を説明するフローチャートである。
FIG. 19 shows a HALVI according to the second embodiment of the present invention.
It is a flowchart explaining an NGD process.

【図20】 この発明の実施の形態3に係るENCOD
ER処理を説明するフローチャートである。
FIG. 20 shows ENCODE according to Embodiment 3 of the present invention;
It is a flowchart explaining an ER process.

【図21】 この発明の実施の形態3に係るDECOD
ER処理を説明するフローチャートである。
FIG. 21 is a DECOD according to the third embodiment of the present invention.
It is a flowchart explaining an ER process.

【図22】 この発明の実施の形態4に係るENCOD
ER処理を説明するフローチャートである。
FIG. 22 is an ENCODE according to Embodiment 4 of the present invention.
It is a flowchart explaining an ER process.

【図23】 この発明の実施の形態4に係るDECOD
ER処理を説明するフローチャートである。
FIG. 23 shows a DECOD according to a fourth embodiment of the present invention.
It is a flowchart explaining an ER process.

【図24】 この発明の実施の形態5に係るENCOD
ER処理を説明するフローチャートである。
FIG. 24 is an ENCODE according to Embodiment 5 of the present invention.
It is a flowchart explaining an ER process.

【図25】 この発明の実施の形態5に係るDECOD
ER処理を説明するフローチャートである。
FIG. 25 shows a DECOD according to the fifth embodiment of the present invention.
It is a flowchart explaining an ER process.

【図26】 この発明の実施の形態6に係るランレング
スマーカの説明図である。
FIG. 26 is an explanatory diagram of a run-length marker according to Embodiment 6 of the present invention.

【図27】 この発明の実施の形態6に係るランレング
スマーカ分割出力の説明図である。
FIG. 27 is an explanatory diagram of a run length marker divided output according to the sixth embodiment of the present invention.

【図28】 この発明の実施の形態6に係るランレング
スマーカの一例を示す構成図である。
FIG. 28 is a configuration diagram showing an example of a run-length marker according to Embodiment 6 of the present invention.

【図29】 この発明の実施の形態6に係るランレング
スマーカの一例を示す構成図である。
FIG. 29 is a configuration diagram showing an example of a run-length marker according to Embodiment 6 of the present invention.

【図30】 この発明の実施の形態6に係るランレング
スマーカの一例を示す構成図である。
FIG. 30 is a configuration diagram showing an example of a run-length marker according to Embodiment 6 of the present invention.

【図31】 この発明の実施の形態6に係るバイトMK
に置換対象パターンのバイト長を示し、パターンのラン
長とともにパターンを直接指定する方法の説明図であ
る。
FIG. 31 shows a byte MK according to Embodiment 6 of the present invention.
FIG. 4 is a diagram illustrating a byte length of a pattern to be replaced, and a method of directly specifying a pattern together with a run length of the pattern.

【図32】 この発明の実施の形態6に係るRUNLE
NMARK処理を説明するフローチャートである。
FIG. 32 shows a RUNLE according to Embodiment 6 of the present invention.
It is a flowchart explaining an NMARK process.

【図33】 この発明の実施の形態7に係るランレング
スマーカ符号長の比較に関する説明図である。
FIG. 33 is an explanatory diagram relating to a comparison of run-length marker code lengths according to Embodiment 7 of the present invention.

【図34】 この発明の実施の形態7に係るRUNLE
NMARK処理を説明するフローチャートである。
FIG. 34: RUNLE according to Embodiment 7 of the present invention;
It is a flowchart explaining an NMARK process.

【図35】 この発明の実施の形態8に係るランレング
スマーカ適用を通知する情報の説明図である。
FIG. 35 is an explanatory diagram of information for notifying the application of the run-length marker according to the eighth embodiment of the present invention.

【図36】 この発明の実施の形態9に係るランレング
スマーカを使用して符号器と復号器間の相互通信を行う
構成の一例を示すブロック図である。
FIG. 36 is a block diagram showing an example of a configuration for performing mutual communication between an encoder and a decoder using a run-length marker according to Embodiment 9 of the present invention.

【図37】 この発明の実施の形態9に係るランレング
スマーカを使用して符号器と復号器間の相互通信を行う
構成の一例を示すブロック図である。
FIG. 37 is a block diagram showing an example of a configuration for performing mutual communication between an encoder and a decoder using a run-length marker according to Embodiment 9 of the present invention.

【図38】 この発明の実施の形態9に係るランレング
スマーカを使用して符号器と復号器間の相互通信を行う
構成の一例を示すブロック図である。
FIG. 38 is a block diagram showing an example of a configuration for performing mutual communication between an encoder and a decoder using a run-length marker according to Embodiment 9 of the present invention.

【図39】 従来の算術符号化の概念を示す説明図であ
る。
FIG. 39 is an explanatory diagram showing the concept of conventional arithmetic coding.

【図40】 小数部を常に領域分割の精度に保ち、上位
桁を整数部に掃き出すための従来の正規化処理の説明図
である。
FIG. 40 is an explanatory diagram of a conventional normalization process for always keeping the decimal part at the accuracy of area division and sweeping out the upper digits to the integer part.

【図41】 第1の従来例に係る符号器の構成を示すブ
ロック図である。
FIG. 41 is a block diagram showing a configuration of an encoder according to a first conventional example.

【図42】 第1の従来例に係る復号器の構成を示すブ
ロック図である。
FIG. 42 is a block diagram illustrating a configuration of a decoder according to a first conventional example.

【図43】 標準モデルテンプレートの説明図である。FIG. 43 is an explanatory diagram of a standard model template.

【図44】 確率推定テーブルの説明図である。FIG. 44 is an explanatory diagram of a probability estimation table.

【図45】 符号化/復号/領域幅レジスタの構成図で
ある。
FIG. 45 is a configuration diagram of an encoding / decoding / region width register.

【図46】 第1の従来例に係るENCODER処理を
説明するフローチャートである。
FIG. 46 is a flowchart illustrating an ENCODER process according to a first conventional example.

【図47】 第1の従来例に係るENCODE処理を説
明するフローチャートである。
FIG. 47 is a flowchart illustrating an ENCODE process according to the first conventional example.

【図48】 第1の従来例に係るCODELPS処理を
説明するフローチャートである。
FIG. 48 is a flowchart illustrating a CODELPS process according to a first conventional example.

【図49】 第1の従来例に係るCODEMPS処理を
説明するフローチャートである。
FIG. 49 is a flowchart illustrating CODEMPS processing according to a first conventional example.

【図50】 第1の従来例に係るRENORME処理を
説明するフローチャートである。
FIG. 50 is a flowchart illustrating a RENOME process according to a first conventional example.

【図51】 第1の従来例に係るBYTEOUT処理を
説明するフローチャートである。
FIG. 51 is a flowchart illustrating BYTEOUT processing according to a first conventional example.

【図52】 第1の従来例に係るINITENC処理を
説明するフローチャートである。
FIG. 52 is a flowchart illustrating an INITENC process according to a first conventional example.

【図53】 第1の従来例に係るFLUSH処理を説明
するフローチャートである。
FIG. 53 is a flowchart illustrating a FLUSH process according to a first conventional example.

【図54】 第1の従来例に係るCLEARBITS処
理を説明するフローチャートである。
FIG. 54 is a flowchart illustrating a CLEARBITS process according to a first conventional example.

【図55】 第1の従来例に係るFINALWRITE
S処理を説明するフローチャートである。
FIG. 55: FINAL WRITE according to the first conventional example
It is a flowchart explaining S processing.

【図56】 第1の従来例に係るDECODER処理を
説明するフローチャートである。
FIG. 56 is a flowchart illustrating a DECODER process according to a first conventional example.

【図57】 第1の従来例に係るDECODE処理を説
明するフローチャートである。
FIG. 57 is a flowchart illustrating a DECODE process according to a first conventional example.

【図58】 第1の従来例に係るLPS_EXCHAN
GE処理を説明するフローチャートである。
FIG. 58: LPS_EXCHAN according to the first conventional example
It is a flowchart explaining a GE process.

【図59】 第1の従来例に係るMPS_EXCHAN
GE処理を説明するフローチャートである。
FIG. 59: MPS_EXCHAN according to the first conventional example
It is a flowchart explaining a GE process.

【図60】 第1の従来例に係るRENORMD処理を
説明するフローチャートである。
FIG. 60 is a flowchart illustrating a RENORMD process according to a first conventional example.

【図61】 第1の従来例に係るBYTEIN処理を説
明するフローチャートである。
FIG. 61 is a flowchart illustrating a BYTEIN process according to a first conventional example.

【図62】 第1の従来例に係るINITDEC処理を
説明するフローチャートである。
FIG. 62 is a flowchart illustrating an INITDEC process according to a first conventional example.

【図63】 第2の従来例に係る桁上がり/非桁上がり
領域切捨て処理の説明図である。
FIG. 63 is an explanatory diagram of a carry / non-carry area truncation process according to the second conventional example.

【図64】 第2の従来例に係る符号器の構成を示すブ
ロック図である。
FIG. 64 is a block diagram illustrating a configuration of an encoder according to a second conventional example.

【図65】 第2の従来例に係る復号器の構成を示すブ
ロック図である。
FIG. 65 is a block diagram showing a configuration of a decoder according to a second conventional example.

【図66】 第2の従来例に係る符号化/領域幅レジス
タの構成図である。
FIG. 66 is a configuration diagram of an encoding / region width register according to a second conventional example.

【図67】 第2の従来例に係るRENORME処理を
説明するフローチャートである。
FIG. 67 is a flowchart illustrating a RENOME process according to a second conventional example.

【図68】 第2の従来例に係るROUNDDOWNE
処理を説明するフローチャートである。
FIG. 68: ROUNDDOWN according to a second conventional example.
It is a flowchart explaining a process.

【図69】 第2の従来例に係るBYTEOUT処理を
説明するフローチャートである。
FIG. 69 is a flowchart illustrating BYTEOUT processing according to a second conventional example.

【図70】 第2の従来例に係るINITENC処理を
説明するフローチャートである。
FIG. 70 is a flowchart illustrating an INITENC process according to a second conventional example.

【図71】 第2の従来例に係るFINALWRITE
S処理を説明するフローチャートである。
FIG. 71: FINAL WRITE according to a second conventional example
It is a flowchart explaining S processing.

【図72】 第2の従来例に係るLPS_EXCHAN
GE処理を説明するフローチャートである。
FIG. 72 shows LPS_EXCHAN according to a second conventional example.
It is a flowchart explaining a GE process.

【図73】 第2の従来例に係るRENORMD処理を
説明するフローチャートである。
FIG. 73 is a flowchart illustrating a RENORMD process according to a second conventional example.

【図74】 第2の従来例に係るROUNDDOWND
処理を説明するフローチャートである。
FIG. 74: ROUNDDOWN according to a second conventional example
It is a flowchart explaining a process.

【図75】 第2の従来例に係るBYTEIN処理を説
明するフローチャートである。
FIG. 75 is a flowchart illustrating a BYTEIN process according to a second conventional example.

【図76】 第2の従来例に係るINITDEC処理を
説明するフローチャートである。
FIG. 76 is a flowchart illustrating INITDEC processing according to a second conventional example.

【符号の説明】[Explanation of symbols]

1A 符号部、1B 復号部、2 コンテクストCX、
3 画素PIX、4符号、5 データメモリ、6 画
像、7 予測値テーブルMPS、8 ステートテーブル
ST、9 LPS領域幅テーブルLSZ、10 MPS
状態遷移先テーブルNMPS、11 LPS状態遷移先
テーブルNLPS、12 予測値反転判定テーブルSW
TCH、13A 算術符号器、13B 算術復号器、1
4 シンボル、15A 画素シンボル変換器、15B
シンボル画素変換器、16 予測値更新処理器、17
ステート更新処理器、18 ステートテーブルSTAT
E、19 非予測値テーブルLPS、30A 符号化レ
ジスタ(下界値)C、30B 復号レジスタC、31
領域幅レジスタA、32 Cxレジスタ、33 Csレ
ジスタ、34 Cbレジスタ、35 Ccレジスタ、3
6 CLOWレジスタ、37 Cbレジスタ、38 C
HIGHレジスタ、39 Cxレジスタ、50 CTカ
ウンタ、51 符号バッファBUFFER、52 SC
カウンタ、53 出力判定バッファTEMP、60 上
界値U、61 桁上がり境界T、62 桁上がり領域幅
R1、63 非桁上がり領域幅R0、64 (復号器
の)符号レジスタD、65 1/2領域境界値T、66
桁上がり境界値CW、80 ランレングス部最大値M
ARKLEN、81 ランレングスカウンタRL、82
ランレングスマーカ長MARKLENMIN。
1A encoding unit, 1B decoding unit, 2 context CX,
3 pixel PIX, 4 codes, 5 data memory, 6 images, 7 predicted value table MPS, 8 state table ST, 9 LPS area width table LSZ, 10 MPS
State transition destination table NMPS, 11 LPS State transition destination table NLPS, 12 Predicted value inversion determination table SW
TCH, 13A arithmetic encoder, 13B arithmetic decoder, 1
4 symbols, 15A Pixel symbol converter, 15B
Symbol pixel converter, 16 predicted value update processor, 17
State update processor, 18 state table STAT
E, 19 Non-predicted value table LPS, 30A Encoding register (lower bound) C, 30B Decoding register C, 31
Area width register A, 32 Cx register, 33 Cs register, 34 Cb register, 35 Cc register, 3
6 CLOW register, 37 Cb register, 38 C
HIGH register, 39 Cx register, 50 CT counter, 51 code buffer BUFFER, 52 SC
Counter, 53 Output determination buffer TEMP, 60 Upper bound value U, 61 Carry boundary T, 62 Carry region width R1, 63 Non-carry region width R0, 64 Code register D (of decoder), 65 1/2 region Boundary value T, 66
Carry boundary value CW, maximum value of run length part 80 M
ARKLEN, 81 Run length counter RL, 82
Run length marker length MARKLENMIN.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 小野 文孝 東京都千代田区丸の内二丁目2番3号 三 菱電機株式会社内 Fターム(参考) 5C059 KK15 ME05 ME11 UA02 UA05 UA34 UA38 5C078 BA21 CA31 DA00 DA01 DA02 DA06 DA11 5J064 AA02 BA08 BA10 BB09 BB12 BC01 BC02 BC04 BC14 BC17 BC28 9A001 BB03 EE04 HH05 HH27 JJ71 KK54  ────────────────────────────────────────────────── ─── Continuing on the front page (72) Inventor Fumitaka Ono 2-3-2 Marunouchi, Chiyoda-ku, Tokyo F-term within Mitsubishi Electric Corporation (reference) 5C059 KK15 ME05 ME11 UA02 UA05 UA34 UA38 5C078 BA21 CA31 DA00 DA01 DA02 DA06 DA11 5J064 AA02 BA08 BA10 BB09 BB12 BC01 BC02 BC04 BC14 BC17 BC28 9A001 BB03 EE04 HH05 HH27 JJ71 KK54

Claims (29)

【特許請求の範囲】[Claims] 【請求項1】 情報源データを蓄積して符号化対象デー
タとその補助的なパラメータ(コンテクスト)を出力す
るデータメモリと、上記補助パラメータを基に指定され
る上記符号化対象データに関する学習データを蓄積し出
力する学習メモリと、上記学習データを基に指定される
符号化パラメータを出力する確率推定テーブルと、上記
符号化対象データと上記符号化パラメータを基に算術符
号化を行い符号を出力する符号器とを備える符号化装置
において、 所定の単位の情報源データの入力処理または符号の出力
を所定の間隔として計測して通知する同期検出器と、 上記所定の間隔で有効領域内の桁上がり境界値を検出す
ると共に、その検出結果に基づいて有効領域内の切り捨
て領域を指示する桁上がり境界検出器と を備え、上記符号器は、上記桁上がり検出器により指示
された上記有効領域を上位と下位に等分した部分領域の
一方を切り捨てて上記有効領域を更新することを特徴と
する符号化装置。
1. A data memory for storing information source data and outputting encoding target data and its auxiliary parameters (context), and learning data on the encoding target data specified based on the auxiliary parameters. A learning memory that accumulates and outputs, a probability estimation table that outputs an encoding parameter specified based on the learning data, and outputs a code by performing arithmetic encoding based on the encoding target data and the encoding parameter. A synchronization detector that measures and notifies the input processing of the information source data in a predetermined unit or the output of the code as a predetermined interval, and carries in the effective area at the predetermined interval. And a carry boundary detector that detects a boundary value and indicates a truncation region in the effective region based on the detection result. An encoding apparatus characterized in that the effective area is updated by cutting off one of partial areas obtained by equally dividing the effective area indicated by the carry detector into upper and lower parts.
【請求項2】 上記符号器は、上記桁上がり境界検出器
で桁上がり境界が検出されたとき、上記桁上がり境界検
出器により指示された上記有効領域を上位と下位に等分
した部分領域の一方を切り捨てて上記有効領域を更新す
ることを特徴とする請求項1に記載の符号化装置。
2. The encoder according to claim 1, wherein when the carry boundary is detected by the carry boundary detector, the valid area indicated by the carry boundary detector is divided into upper and lower equal regions. 2. The encoding apparatus according to claim 1, wherein one of the effective areas is updated by truncating one of them.
【請求項3】 上記桁上がり境界検出器は、検出された
桁上がり境界を含む部分領域を切り捨てるように指示す
ることを特徴とする請求項1または2に記載の符号化装
置。
3. The encoding apparatus according to claim 1, wherein the carry boundary detector instructs to cut off a partial region including the detected carry boundary.
【請求項4】 上記所定の間隔は、所定単位の符号化対
象データを符号化したときであることを特徴とする請求
項1または2に記載の符号化装置。
4. The encoding device according to claim 1, wherein the predetermined interval is when a predetermined unit of data to be encoded is encoded.
【請求項5】 上記所定の間隔は、符号値の確定まで待
機させる符号長の最大値を基準に設定されることを特徴
とする請求項4に記載の符号化装置。
5. The encoding apparatus according to claim 4, wherein the predetermined interval is set based on a maximum value of a code length for waiting until a code value is determined.
【請求項6】 上記符号器は、上記所定の間隔を基準に
符号値の確定まで待機させる符号長の最大値が設定され
ることを特徴とする請求項4に記載の符号化装置。
6. The encoding apparatus according to claim 4, wherein the encoder sets a maximum value of a code length to wait until a code value is determined based on the predetermined interval.
【請求項7】 上記所定の間隔は、所定単位の符号出力
が発生したときであることを特徴とする請求項1または
2に記載の符号化装置。
7. The encoding apparatus according to claim 1, wherein the predetermined interval is when a predetermined unit of code output is generated.
【請求項8】 上記所定の間隔は、所定単位の符号出力
が発生し、かつ符号出力値が所定値となるときであるこ
とを特徴とする請求項1または2に記載の符号化装置。
8. The encoding apparatus according to claim 1, wherein the predetermined interval is a time when a code output of a predetermined unit is generated and the code output value becomes a predetermined value.
【請求項9】 上記桁上がり境界検出器は、上記有効領
域内に桁上がり境界が検出されなくても上記有効領域を
上位と下位に等分した部分領域のどちらか一方の部分領
域を指示することを特徴とする請求項1に記載の符号化
装置。
9. The carry boundary detector indicates one of partial areas obtained by equally dividing the effective area into upper and lower parts even if no carry boundary is detected in the effective area. The encoding device according to claim 1, wherein:
【請求項10】 上記符号器は、確定した符号に同じ値
が連続するときにその値と長さを特定できるランレング
スマーカに置き換えるランレングスマーカ変換器を有す
ることを特徴とする請求項1または2に記載の符号化装
置。
10. The encoder according to claim 1, wherein the encoder has a run-length marker converter that replaces the determined code with a run-length marker capable of specifying a value and a length when the same value continues. 3. The encoding device according to 2.
【請求項11】 上記ランレングスマーカ変換器は、置
き換えずにそのまま出力した方が変換される上記ランレ
ングスマーカより符号出力が短いときには変換を行わな
いことを特徴とする請求項10に記載の符号化装置。
11. The code according to claim 10, wherein the run-length marker converter does not perform the conversion when the code output is shorter than the run-length marker to be converted without being replaced. Device.
【請求項12】 上記ランレングスマーカから抽出され
る連続長の最大値は、復号の際のランレングスマーカ逆
変換の結果に基づいて上記符号器が上記ランレングスマ
ーカ変換器に設定することを特徴とする請求項10に記
載の符号化装置。
12. The encoder according to claim 1, wherein the maximum value of the continuous length extracted from the run-length marker is set by the encoder to the run-length marker converter based on a result of inverse transform of the run-length marker at the time of decoding. The encoding device according to claim 10, wherein:
【請求項13】 復号対象データに対する補助的なパラ
メータ(コンテクスト)を出力し復号された上記復号対
象データを蓄積して情報源データとして出力するデータ
メモリと、上記補助パラメータを基に指定される上記復
号対象データに関する学習データを蓄積し出力する学習
メモリと、上記学習データを基に指定される復号パラメ
ータを出力する確率推定テーブルと、上記復号パラメー
タと符号を基に算術復号を行い上記復号対象データを出
力する復号器とを備える復号化装置において、 所定の単位の情報源データの出力処理または符号の入力
を所定の間隔として計測して通知する同期検出器と、 上記所定の間隔で有効領域内の桁上がり境界値を検出す
ると共に、その検出結果に基づいて有効領域内の切り捨
て領域を指示する桁上がり境界検出器とを備え、上記復
号器は、上記有効領域を上位と下位に等分した部分領域
の上記符号値を含まない一方を切り捨てて上記有効領域
を更新することを特徴とする復号化装置。
13. A data memory for outputting auxiliary parameters (context) for data to be decoded, storing the decoded data to be decoded, and outputting the data as information source data, and the data memory specified based on the auxiliary parameters. A learning memory that accumulates and outputs learning data relating to decoding target data, a probability estimation table that outputs a decoding parameter specified based on the learning data, and an arithmetic decoding based on the decoding parameter and code, and the decoding target data A synchronization detector for measuring and notifying the output processing of a predetermined unit of information source data or the input of a code as a predetermined interval, And a carry boundary indicating a truncated area in the effective area based on the detection result. And a detector, the decoder decoding apparatus characterized by truncated one that does not include the code value of the partial regions obtained by equally dividing the effective area to the upper and lower updating the effective region.
【請求項14】 上記復号器は、上記桁上がり境界検出
器で桁上がり境界が検出されたとき、上記有効領域を上
位と下位に等分した部分領域の上記符号値を含まない一
方を切り捨てて上記有効領域を更新することを特徴とす
る請求項13に記載の復号化装置。
14. The decoder, when a carry boundary is detected by the carry boundary detector, cuts off one of the partial areas, which does not include the code value, of the effective area into upper and lower equal parts. 14. The decoding device according to claim 13, wherein the valid area is updated.
【請求項15】 上記桁上がり境界検出器は、検出され
た桁上がり境界を含む部分領域を切り捨てるように指示
することを特徴とする請求項13または14に記載の復
号化装置。
15. The decoding apparatus according to claim 13, wherein the carry boundary detector instructs to cut off a partial region including the detected carry boundary.
【請求項16】 上記所定の間隔は、所定単位の復号対
象データを復号したときであることを特徴とする請求項
13または14に記載される復号化装置。
16. The decoding apparatus according to claim 13, wherein the predetermined interval is when a predetermined unit of data to be decoded is decoded.
【請求項17】 上記所定の間隔は、所定単位の符号入
力が発生したときであることを特徴とする請求項13ま
たは14に記載される復号化装置。
17. The decoding apparatus according to claim 13, wherein the predetermined interval is when a predetermined unit of code input occurs.
【請求項18】 上記所定の間隔は、所定単位の符号入
力が発生し、かつ復号と同時に再現される符号出力値が
所定値となるときであることを特徴とする請求項13に
記載の復号化装置。
18. The decoding according to claim 13, wherein the predetermined interval is when a code input of a predetermined unit occurs and a code output value reproduced at the same time as decoding becomes a predetermined value. Device.
【請求項19】 上記復号器は、ランレングスマーカを
検出すると、置き換えられた長さの元の符号値に逆変換
するランレングスマーカ逆変換器を有することを特徴と
する請求項13または14に記載される復号化装置。
19. The apparatus according to claim 13, wherein said decoder has a run-length marker inverse transformer for inversely transforming to an original code value having a replaced length when a run-length marker is detected. A decoding device as described.
【請求項20】 符号化装置として、情報源データを蓄
積して符号化対象データとその補助的なパラメータ(コ
ンテクスト)を出力するデータメモリと、上記補助パラ
メータを基に指定される上記符号化対象データに関する
学習データを蓄積し出力する学習メモリと、上記学習デ
ータを基に指定される符号化パラメータを出力する確率
推定テーブルと、上記符号化対象データと上記符号化パ
ラメータを基に算術符号化を行い符号を出力する符号器
と、所定の単位の情報源データの入力処理または符号の
出力を所定の間隔として計測して通知する同期検出器
と、上記所定の間隔で有効領域内の桁上がり境界値を検
出すると共に、その検出結果に基づいて有効領域内の切
り捨て領域を指示する桁上がり境界検出器とを備え、 上記符号器は、上記桁上がり検出器により指示された上
記有効領域を上位と下位に等分した部分領域の一方を切
り捨てて上記有効領域を更新すると共に、 復号化装置として、復号対象データに対する補助的なパ
ラメータ(コンテクスト)を出力し復号された上記復号
対象データを蓄積して情報源データとして出力するデー
タメモリと、上記補助パラメータを基に指定される上記
復号対象データに関する学習データを蓄積し出力する学
習メモリと、上記学習データを基に指定される復号パラ
メータを出力する確率推定テーブルと、上記復号パラメ
ータと符号を基に算術復号を行い上記復号対象データを
出力する復号器と、所定の単位の情報源データの出力処
理または符号の入力を所定の間隔として計測して通知す
る同期検出器と、上記所定の間隔で有効領域内の桁上が
り境界値を検出すると共に、その検出結果に基づいて有
効領域内の切り捨て領域を指示する桁上がり境界検出器
とを備え、 上記復号器は、上記有効領域を上位と下位に等分した部
分領域の上記符号値を含まない一方を切り捨てて上記有
効領域を更新することを特徴とする符号化復号化装置。
20. An encoding apparatus, comprising: a data memory for storing information source data and outputting encoding target data and auxiliary parameters (context) thereof; and an encoding target specified based on the auxiliary parameters. A learning memory that accumulates and outputs learning data relating to data, a probability estimation table that outputs an encoding parameter specified based on the learning data, and an arithmetic encoding based on the encoding target data and the encoding parameter. An encoder that outputs a performed code, a synchronization detector that measures and notifies the input processing of the information source data in a predetermined unit or the output of the code as a predetermined interval, and a carry boundary in the effective area at the predetermined interval. A carry boundary detector for detecting a value, and indicating a truncated area in the effective area based on the detection result. One of the partial areas obtained by equally dividing the effective area into upper and lower parts indicated by the beam detector is updated to update the effective area. In addition, as a decoding device, auxiliary parameters (context) for the decoding target data are set. A data memory for accumulating and outputting the decoded data to be decoded and outputting it as information source data, a learning memory for accumulating and outputting learning data relating to the data to be decoded specified based on the auxiliary parameter; A probability estimation table that outputs a decoding parameter specified based on data, a decoder that performs arithmetic decoding based on the decoding parameter and code and outputs the data to be decoded, and an output process of information source data in a predetermined unit Or a synchronization detector that measures and notifies the input of the code as a predetermined interval, and a digit in the effective area at the predetermined interval. And a carry boundary detector for indicating a truncated area in the effective area based on the detection result. The decoder includes: a partial area obtained by equally dividing the effective area into upper and lower parts. An encoding / decoding device characterized in that the effective area is updated by discarding one not including the code value.
【請求項21】 上記符号器は、上記桁上がり境界検出
器で桁上がり境界が検出されたとき、上記桁上がり境界
検出器により指示された上記有効領域を上位と下位に等
分した部分領域の一方を切り捨てて上記有効領域を更新
すると共に、上記復号器は、上記桁上がり境界検出器で
桁上がり境界が検出されたとき、上記有効領域を上位と
下位に等分した部分領域の上記符号値を含まない一方を
切り捨てて上記有効領域を更新することを特徴とする請
求項20に記載の符号化復号化装置。
21. The encoder, when a carry boundary is detected by the carry boundary detector, a partial area obtained by equally dividing the effective area designated by the carry boundary detector into upper and lower parts. When the carry boundary is detected by the carry boundary detector, the code value of a partial region obtained by equally dividing the effective region into upper and lower parts is detected when the carry boundary is detected by the carry boundary detector. 21. The encoding / decoding apparatus according to claim 20, wherein the valid area is updated by truncating one of the effective areas.
【請求項22】(a)情報源データを蓄積して符号化対
象データとその補助的なパラメータ(コンテクスト)を
出力するデータ蓄積ステップと、(b)上記補助パラメ
ータを基に指定される上記符号化対象データに関する学
習データを蓄積し出力する学習ステップと、(c)上記
学習データを基に指定される符号化パラメータを出力す
る確率推定ステップと、(d)上記符号化対象データと
上記符号化パラメータを基に算術符号化を行い符号を出
力する符号化ステップと、(e)所定の単位の情報源デ
ータの入力処理または符号の出力を所定の間隔として計
測して通知する同期検出ステップと、(f)上記所定の
間隔で有効領域内の桁上がり境界値を検出すると共に、
その検出結果に基づいて有効領域内の切り捨て領域を指
示する桁上がり境界検出ステップと、(g)上記桁上が
り境界検出ステップにより指示された上記有効領域を上
位と下位に等分した部分領域の一方を切り捨てて上記有
効領域を更新する符号化修正ステップとを有する符号化
方法。
22. (a) a data storage step of storing information source data to output data to be encoded and its auxiliary parameters (context); and (b) the code specified based on the auxiliary parameters. A learning step of accumulating and outputting learning data relating to the data to be encoded; (c) a probability estimating step of outputting an encoding parameter specified based on the learning data; An encoding step of performing arithmetic coding based on the parameter and outputting a code, and (e) a synchronization detecting step of inputting information source data in a predetermined unit or measuring and outputting a code output as a predetermined interval and notifying; (F) detecting a carry boundary value in the effective area at the predetermined interval;
(G) one of partial areas obtained by equally dividing the effective area specified by the carry boundary detection step into upper and lower parts, and (g) a carry boundary detection step for designating a truncated area in the effective area based on the detection result And a coding correction step of updating the effective area by truncating the data.
【請求項23】 上記符号化修正ステップは、上記桁上
がり境界検出ステップで桁上がり境界が検出されたと
き、上記桁上がり境界検出ステップで指示された上記有
効領域を上位と下位に等分した部分領域の一方を切り捨
てて上記有効領域を更新することを特徴とする請求項2
2に記載の符号化方法。
23. The encoding correction step, wherein when the carry boundary is detected in the carry boundary detection step, the effective area designated in the carry boundary detection step is equally divided into upper and lower parts. 3. The method according to claim 2, wherein the valid area is updated by truncating one of the areas.
3. The encoding method according to 2.
【請求項24】 上記符号化ステップおよび上記符号化
修正ステップは、確定した符号に同じ値が連続するとき
にその値と長さを特定できるランレングスマーカに置き
換える変換ステップを有することを特徴とする請求項2
2または23に記載の符号化方法。
24. The encoding step and the encoding correction step, further comprising a conversion step of, when the same value continues to the determined code, replacing the same with a run-length marker capable of specifying the value and length. Claim 2
24. The encoding method according to 2 or 23.
【請求項25】 上記変換ステップは、置き換えずにそ
のまま出力した方が変換される上記ランレングスマーカ
より符号出力が短いときには変換を行わないことを特徴
とする請求項24に記載の符号化方法。
25. The encoding method according to claim 24, wherein the conversion step does not perform the conversion when the code output is shorter than the run-length marker to be output without being replaced.
【請求項26】 上記ランレングスマーカから抽出され
る連続長の最大値は、復号の際、ランレングスマーカ逆
変換の結果に基づいて上記符号化ステップが上記変換ス
テップに設定することを特徴とする請求項24に記載の
符号化方法。
26. The decoding method according to claim 26, wherein the maximum value of the continuous length extracted from the run-length marker is set to the conversion step in the encoding step based on the result of the inverse transformation of the run-length marker during decoding. An encoding method according to claim 24.
【請求項27】(a)復号対象データに対する補助的な
パラメータ(コンテクスト)を出力し復号された上記復
号対象データを蓄積して情報源データとして出力するデ
ータ蓄積ステップと、(b)上記補助パラメータを基に
指定される上記復号対象データに関する学習データを蓄
積し出力する学習ステップと、(c)上記学習データを
基に指定される復号パラメータを出力する確率推定ステ
ップと、(d)上記復号パラメータと符号を基に算術復
号を行い上記復号対象データを出力する復号化ステップ
と、(e)所定の単位の情報源データの出力処理または
符号の入力を所定の間隔として計測して通知する同期検
出ステップと、(f)上記所定の間隔で有効領域内の桁
上がり境界値を検出すると共に、その検出結果に基づい
て有効領域内の切り捨て領域を指示する桁上がり境界検
出ステップと、(g)上記桁上がり境界検出ステップに
より指示された上記有効領域を上位と下位に等分した部
分領域の一方を切り捨てて上記有効領域を更新する復号
化修正ステップとを有する復号化方法。
27. A data storage step of: (a) outputting auxiliary parameters (context) for data to be decoded, storing the decoded data to be decoded, and outputting the data as information source data; (C) a probability estimating step of outputting decoding parameters specified based on the learning data, and (d) a probability estimating step of outputting decoding parameters specified based on the learning data. (E) output processing of information source data in a predetermined unit or synchronization detection for measuring and notifying input of a code at a predetermined interval, and outputting the decoding target data. And (f) detecting a carry boundary value in the effective area at the predetermined interval and cutting off the effective area based on the detection result. (G) decoding for updating the valid area by cutting off one of partial areas obtained by equally dividing the valid area specified by the carry boundary detecting step into upper and lower parts; A decoding correction step.
【請求項28】 上記復号化修正ステップは、上記桁上
がり境界検出ステップで桁上がり境界が検出されたと
き、上記桁上がり境界検出ステップで指示された上記有
効領域を上位と下位に等分した部分領域の一方を切り捨
てて上記有効領域を更新することを特徴とする請求項2
7に記載の復号化方法。
28. The decoding correction step, wherein when a carry boundary is detected in the carry boundary detection step, the effective area designated in the carry boundary detection step is equally divided into upper and lower parts. 3. The method according to claim 2, wherein the valid area is updated by truncating one of the areas.
8. The decoding method according to 7.
【請求項29】 上記復号化ステップは、ランレングス
マーカを検出すると、置き換えられた長さの元の符号値
に逆変換するランレングスマーカ逆変換ステップを有す
ることを特徴とする請求項27または28に記載の復号
化方法。
29. The decoding method according to claim 27, wherein the decoding step includes a run-length marker inverse transforming step of, when a run-length marker is detected, performing inverse transform to an original code value having a replaced length. 3. The decoding method according to item 1.
JP10416299A 1999-04-12 1999-04-12 Encoding device, decoding device, encoding method, and decoding method Expired - Fee Related JP3745160B2 (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP10416299A JP3745160B2 (en) 1999-04-12 1999-04-12 Encoding device, decoding device, encoding method, and decoding method
TW89104027A TW447196B (en) 1999-04-12 2000-03-07 Encoder, decoder, device for encoding and decoding, encoding method and decoding method
DE60000247T DE60000247T2 (en) 1999-04-12 2000-04-03 Arithmetic coding with avoidance of the carry ripple
EP20000107249 EP1045520B1 (en) 1999-04-12 2000-04-03 Arithmetic coding with prevention of carry over propagation
US09/547,136 US6373408B1 (en) 1999-04-12 2000-04-11 Encoding apparatus, decoding apparatus, encoding/decoding apparatus, encoding method and decoding method
KR1020000018886A KR100327688B1 (en) 1999-04-12 2000-04-11 Encoding apparatus, decoding apparatus, encoding/decoding apparatus, encoding method and decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10416299A JP3745160B2 (en) 1999-04-12 1999-04-12 Encoding device, decoding device, encoding method, and decoding method

Publications (2)

Publication Number Publication Date
JP2000299641A true JP2000299641A (en) 2000-10-24
JP3745160B2 JP3745160B2 (en) 2006-02-15

Family

ID=14373371

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10416299A Expired - Fee Related JP3745160B2 (en) 1999-04-12 1999-04-12 Encoding device, decoding device, encoding method, and decoding method

Country Status (6)

Country Link
US (1) US6373408B1 (en)
EP (1) EP1045520B1 (en)
JP (1) JP3745160B2 (en)
KR (1) KR100327688B1 (en)
DE (1) DE60000247T2 (en)
TW (1) TW447196B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003043345A1 (en) * 2001-11-16 2003-05-22 Ntt Docomo, Inc. Image encoding method, image decoding method, image encoder, image decode, program, computer data signal, and image transmission system
WO2005041420A1 (en) * 2003-10-29 2005-05-06 Nec Corporation Decoding apparatus or encoding apparatus wherein intermediate buffer is inserted between arithmetic sign decoder or encoder and debinarizer or binarizer

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7159000B2 (en) 2002-03-21 2007-01-02 Microsoft Corporation Methods and systems for repairing playlists
JP3853710B2 (en) * 2002-07-15 2006-12-06 Necアクセステクニカ株式会社 Digital image encoding apparatus and digital image encoding method
US6825782B2 (en) * 2002-09-20 2004-11-30 Ntt Docomo, Inc. Method and apparatus for arithmetic coding and termination
BR0306987A (en) * 2002-11-20 2004-12-14 Matsushita Electric Industrial Co Ltd Motion picture prediction method, motion picture coding method and apparatus and motion picture decoding method and apparatus
US7359004B2 (en) 2003-05-23 2008-04-15 Microsoft Corporation Bi-level and full-color video combination for video communication
US7286120B2 (en) * 2003-11-12 2007-10-23 Hewlett-Packard Development Company, L.P. Large area display and method of manufacturing same
US7627033B2 (en) * 2004-11-15 2009-12-01 Microsoft Corporation Video rate control
KR100829558B1 (en) * 2005-01-12 2008-05-14 삼성전자주식회사 Scalable audio data arithmetic decoding method and apparatus, and method for truncating audio data bitstream
CN100568741C (en) * 2005-01-12 2009-12-09 三星电子株式会社 Arithmetic decoding method and apparatus, and method and apparatus for truncating audio data bitstream
US7053803B1 (en) * 2005-01-31 2006-05-30 Hewlett Packard Development Company, L.P. Data compression
WO2008129883A1 (en) * 2007-04-18 2008-10-30 Mitsubishi Electric Corporation Encoder, decoder, code converter and program
US9425823B1 (en) 2015-03-23 2016-08-23 Avago Technologies General Ip (Singapore) Pte. Ltd. State-split based encoder and decoder with table compression

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4675652A (en) * 1986-04-11 1987-06-23 Quantum Corporation Integrated encoder decoder for variable length, zero run length limited codes
JPH0834432B2 (en) 1989-01-31 1996-03-29 三菱電機株式会社 Encoding device and encoding method
USRE35781E (en) 1989-01-31 1998-05-05 Mitsubishi Denki Kabushiki Kaisha Coding method of image information
JPH0834434B2 (en) 1990-02-26 1996-03-29 三菱電機株式会社 Encoding device and encoding method
KR950013404B1 (en) 1991-11-15 1995-11-08 미쯔비시덴끼 가부시끼가이샤 Coding transmittion and method
JP2755091B2 (en) 1992-06-22 1998-05-20 三菱電機株式会社 Encoding method and encoding method
JP2863052B2 (en) * 1993-03-15 1999-03-03 松下電器産業株式会社 Digital data encoding method, decoding method, encoding device, and decoding device
JPH10134519A (en) * 1996-10-31 1998-05-22 Sony Corp Modulating device and demodulating device and their methods
US6032284A (en) * 1997-03-12 2000-02-29 Cirrus Logic, Inc. Trellis coding system for disc storage systems
US5999110A (en) * 1998-02-17 1999-12-07 International Business Machines Corporation Defect tolerant binary synchronization mark

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003043345A1 (en) * 2001-11-16 2003-05-22 Ntt Docomo, Inc. Image encoding method, image decoding method, image encoder, image decode, program, computer data signal, and image transmission system
US7228001B2 (en) 2001-11-16 2007-06-05 Ntt Docomo, Inc. Image encoding method, image decoding method, image encoder, image decode, program, computer data signal, and image transmission system
CN100407791C (en) * 2001-11-16 2008-07-30 株式会社Ntt都科摩 Image encoding and decoding method, image encoding and decoding device, and image transmission system
WO2005041420A1 (en) * 2003-10-29 2005-05-06 Nec Corporation Decoding apparatus or encoding apparatus wherein intermediate buffer is inserted between arithmetic sign decoder or encoder and debinarizer or binarizer
JPWO2005041420A1 (en) * 2003-10-29 2007-10-04 日本電気株式会社 Decoding device or encoding device in which an intermediate buffer is inserted between an arithmetic code decoder or encoder and an inverse binarization converter or binarization converter
US7301485B2 (en) 2003-10-29 2007-11-27 Nec Corporation Decoding device or encoding device having intermediate buffer interposed between an arithmetic code decoder or encoder and a reverse binarization device or binarization device
KR100801364B1 (en) * 2003-10-29 2008-02-05 닛본 덴끼 가부시끼가이샤 Decoding device or encoding device in which an intermediate buffer is inserted between an arithmetic code decoder or encoder and an inverse binary converter or a binary converter
CN100566178C (en) * 2003-10-29 2009-12-02 日本电气株式会社 Binary arithmetic code decoder and encoder, arithmetic code decoder and encoder and method thereof
JP4677901B2 (en) * 2003-10-29 2011-04-27 日本電気株式会社 Decoding apparatus or encoding apparatus in which intermediate buffer is inserted between arithmetic code decoder or encoder and inverse binarization converter or binarization converter

Also Published As

Publication number Publication date
US6373408B1 (en) 2002-04-16
TW447196B (en) 2001-07-21
KR100327688B1 (en) 2002-03-09
JP3745160B2 (en) 2006-02-15
US20020006225A1 (en) 2002-01-17
EP1045520A1 (en) 2000-10-18
EP1045520B1 (en) 2002-07-03
DE60000247D1 (en) 2002-08-08
DE60000247T2 (en) 2003-03-13
KR20000077019A (en) 2000-12-26

Similar Documents

Publication Publication Date Title
JP2000299641A (en) Encoding device, decoding device, encoding / decoding device, encoding method, and decoding method
JP2000115783A (en) Decoding device and method
JP2000115781A (en) Encoding device
JPWO1998033322A1 (en) Encoding method, decoding method, encoding device, and decoding device
JP2001230935A (en) Arithmetic encoding / decoding method and arithmetic encoding / decoding device
JP4220369B2 (en) Image data set analysis method
JP3801501B2 (en) Encoding apparatus, decoding apparatus, encoding / decoding apparatus, encoding method, decoding method, encoding / decoding method, and program
JP2008022215A (en) Image encoding device, image encoding method, and storage medium therefor
JPH06164940A (en) Encoder
CN1983334A (en) Method and device for realizing arithmetic coding and decoding
JPH104557A (en) Image processing apparatus and method, and storage medium storing the method
JP4110558B2 (en) Encoding device, decoding device, encoding method, and decoding method
JP3235510B2 (en) Encoding method and encoding device, decoding method and decoding device
JP2005252337A (en) Image encoding apparatus, image encoding method, and storage medium thereof
JP2729165B2 (en) Image processing apparatus and processing method thereof
JP4526069B2 (en) Image information arithmetic coding apparatus and image information arithmetic decoding apparatus
JP3124890B2 (en) Binary image coding device
JPH10173544A (en) Encoding device, decoding device, image encoding processing device, and image decoding processing device
JP4694462B2 (en) Encoding apparatus, encoding method, program, and recording medium thereof
JP3302253B2 (en) Information encoding / decoding method and apparatus
JP2001196937A (en) Data encoding method, data decoding method, and computer-readable recording medium recording a program for causing a computer to execute the method
JPH11177828A (en) Image processing method and apparatus
JP3484900B2 (en) Image data encoding device
JP3078692B2 (en) Arithmetic encoder
CN119625087A (en) A JBIG arithmetic encoding and decoding method and system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050512

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050524

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050721

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050830

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051027

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051116

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20091202

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20101202

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20111202

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20111202

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20121202

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20121202

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20131202

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees