JP3087394B2 - Binary arithmetic encoder - Google Patents

Binary arithmetic encoder

Info

Publication number
JP3087394B2
JP3087394B2 JP03303568A JP30356891A JP3087394B2 JP 3087394 B2 JP3087394 B2 JP 3087394B2 JP 03303568 A JP03303568 A JP 03303568A JP 30356891 A JP30356891 A JP 30356891A JP 3087394 B2 JP3087394 B2 JP 3087394B2
Authority
JP
Japan
Prior art keywords
register
bit
bits
output
encoding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP03303568A
Other languages
Japanese (ja)
Other versions
JPH0685684A (en
Inventor
利彦 岡村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP03303568A priority Critical patent/JP3087394B2/en
Publication of JPH0685684A publication Critical patent/JPH0685684A/en
Application granted granted Critical
Publication of JP3087394B2 publication Critical patent/JP3087394B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は無歪データ圧縮技術であ
る2進算術符号の符号化時における2進算術符号器に関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a binary arithmetic encoder for encoding a binary arithmetic code which is a distortionless data compression technique.

【0002】[0002]

【従来の技術】ラングドンにより提案された2進算術符
号器を図3に示す(アイビーエム、ジャーナルオブリサ
ーチアンドディベロップメント、28(2)、135−
149、1984)。図3において、11は次に入力さ
れるビットが’0’か’1’かを予想する予想ビッ
ト(’0’または’1’)と予想ビットが現れない確率
(2- k の形)の値(K)の組を保存するテーブルで、
12は出力ビットを蓄えるレジスタ、13は符号化時点
までの入力系列の出現確率値の主要部を表すレジスタ、
14はレジスタ12に減算やシフトを施したり、レジス
タ3に加算やシフトを施すための符号化の中心操作を司
る処理器、15はレジスタ12からバッファ16への出
力を制御するための制御器である。
2. Description of the Related Art A binary arithmetic encoder proposed by Langdon is shown in FIG. 3 (IBM, Journal of Research and Development, 28 (2), 135-).
149, 1984). In FIG. 3, reference numeral 11 denotes a predicted bit (`0` or` 1`) for predicting whether the next input bit is `0` or` 1` and a probability (2 −k ) that the predicted bit does not appear. A table that stores sets of values (K),
12 is a register for storing output bits, 13 is a register indicating a main part of the appearance probability value of the input sequence up to the encoding time,
Reference numeral 14 denotes a processor which performs central operations of encoding for performing subtraction and shift on the register 12 and addition and shift on the register 3, and 15 a controller for controlling output from the register 12 to the buffer 16. is there.

【0003】次の入力ビットを符号化するために、過去
の入力ビット列から、テーブル11のどの組を使用する
のかを決定する。その予想ビットと実際の入力ビットを
比較した結果から、処理器14は、レジスタ12にKに
応じた下位の桁に’1’加算を施すかまたはKシフト
し、レジスタ13に対してはKに応じた桁から’1’か
ら’1’だけ減ずるか、リセットを行う。レジスタ13
に減算を施した結果、レジスタ13の最高位のビット
が’0’になったら、最高位のビットが’1’になるよ
うにレジスタ13を1ビットシフトし、このときレジス
タ12も1ビットシフトする。必要があればその後のテ
ーブル1の予想ビットまたは確率値(K)を書き換え
る。以上の流れをフローチャートに表すと図2のように
なる。
[0003] In order to encode the next input bit, it is determined from the past input bit sequence which set of the table 11 is to be used. Based on the result of comparison between the expected bit and the actual input bit, the processor 14 adds “1” to the lower digit corresponding to K or shifts the register 12 by K or shifts the register 13 to K. Either reduce the digit by '1' from '1' or reset. Register 13
When the most significant bit of the register 13 becomes "0" as a result of the subtraction, the register 13 is shifted by one bit so that the most significant bit becomes "1". At this time, the register 12 is also shifted by one bit. I do. If necessary, the expected bit or probability value (K) in Table 1 is rewritten. FIG. 2 shows the above flow in a flowchart.

【0004】制御器15はレジスタ12からバッファ1
6への出力を制御するのであるが、例えばバイト単位で
出力するとすると、出力するバイトにはレジスタ12へ
の加算による桁上がりの影響が及ばないようにすること
が必要となる。すると、レジスタ12に’1’が延々と
続く場合、いつまでもバッファ16へ出力ができず、レ
ジスタ12の長さを無限にとらなければならず、また、
符号化時間の遅延も甚だしくなる。それを回避するた
め、レジスタ12を先頭からバイト区切り毎にみて、各
バイト中のビットがすべて’1’であるかを調べ、もし
そうであったらその1バイト分の’1’の並びの後に’
0’を何ビットか挿入することにより桁上がりの伝搬を
そこでとめられるようにしてすべてが’1’のバイトを
レジスタ2からバッファ6へ出力していた。
[0004] The controller 15 stores the buffer 1 from the register 12.
6 is controlled. For example, if the output is performed in byte units, it is necessary to prevent the output byte from being affected by the carry due to the addition to the register 12. Then, when '1' continues for a long time in the register 12, output to the buffer 16 cannot be performed forever, and the length of the register 12 must be set to infinity.
Encoding time delays are also significant. To avoid this, look at the register 12 at each byte break from the beginning and check if all the bits in each byte are '1', and if so, after the 1 byte's sequence of '1's '
By inserting a few bits of 0's, the carry of the carry was stopped there, and all the bytes of '1' were output from the register 2 to the buffer 6.

【0005】[0005]

【発明が解決しようとする課題】今までビットシリアル
で2進算術符号化していたものを何ビットかパラレルで
符号化を行うことにより高速化を図る場合、パラレルの
場合の出力は、以前から行われているビットシリアルの
場合に完全に一致して、互換性があることが望まれる。
そのとき問題になるのは、”従来の方法”の節の最後に
述べた、図3におけるレジスタ13に’1’の並びが現
れたら、’0’を挿入するというところである。つま
り、パラレルで符号化している、その何ビット目かで本
来ビットシリアルで符号化していれば’0’を挿入しな
ければならないところで、パラレルでは放っておくた
め、ビットシリアルの場合では起こらない長い桁上がり
が起こってしまう可能性があり、この場合は出力結果が
異なるものとなってしまう。かといって、各入力ビット
毎に’1’の並びを検出していたのでは、せっかくパラ
レル化しても符号化速度を上げることができない。
In order to speed up binary arithmetic coding by bit-serial by coding several bits in parallel, the output in the case of parallel has been previously used. It is desirable to be completely compatible and compatible with the case of bit serials.
The problem at that time is that, as described at the end of the section of the "conventional method", when a sequence of "1" appears in the register 13 in FIG. 3, "0" is inserted. In other words, if encoding is performed in parallel, and at what bit number the bit encoding is originally performed by bit serial, '0' must be inserted. Carry-over may occur, in which case the output result will be different. However, if the arrangement of '1's is detected for each input bit, the encoding speed cannot be increased even if the parallel processing is performed.

【0006】[0006]

【課題を解決するための手段】本発明の2進算術符号器
は、無歪データ圧縮装置である2進算術符号器におい
て、前記符号器の一部であるところの符号化した結果出
力されるビットを蓄えるレジスタに、一定数のビットを
符号化する内に一定長の1の並びが現れる可能性の有無
を、前記レジスタの現在の状態から判断して前記レジス
タからの出力を制御する機能を備えることを特徴とす
る。
SUMMARY OF THE INVENTION A binary arithmetic encoder according to the present invention is a binary arithmetic encoder which is a distortion-free data compression device, and is output as a result of encoding which is a part of the encoder. A function of controlling the output from the register by judging from the current state of the register whether or not there is a possibility that a sequence of ones of a certain length may appear in the register for storing bits while encoding a certain number of bits. It is characterized by having.

【0007】[0007]

【作用】一定数の入力ビットを符号化する間に’1’の
並びが現れる可能性があるか事前に判断することによ
り、可能性がある場合だけその間1ビット符号化する度
に出力ビットを蓄えるレジスタに’1’の並びが現れた
かどうか観察し、そうでない場合にはその間は1の並び
を検出をしなくてすませることができる。こうして、レ
ジスタの’1’の並びを検出する工程が削減されれば、
符号化速度の高速化が望める。特にパラレル処理にした
場合には、高速性を保ったまま、出力データをビットシ
リアルで処理した場合と一致させることができる。
By judging in advance whether there is a possibility that a sequence of '1's will appear during the encoding of a fixed number of input bits, the output bits are converted every time one bit is encoded during the period when there is a possibility. It is observed whether or not a sequence of "1" appears in the register to be stored, and if not, it is not necessary to detect the sequence of "1" during that time. In this way, if the process of detecting the arrangement of “1” in the register is reduced,
Higher coding speed can be expected. In particular, in the case of parallel processing, it is possible to match the output data with that of bit serial processing while maintaining high speed.

【0008】[0008]

【実施例】図1はこのような発明を実現するための例
で、4ビットパラレルで符号化する場合を表している。
テーブル7には次の4ビットを符号化する過程において
レジスタ3の先頭からバイト単位見た場合にその1バイ
ト中がすべて’1’となる可能性がある場合のレジスタ
3のビット列のパターンを保持しておき、レジスタ3中
のビット列とマッチングをとり、次の4ビットを符号化
する過程において’1’の並びの検出を行うかどうか判
断する。レジスタ2からバッファ6への出力は、桁上が
りの影響がないよう、レジスタ2に20ビット以上貯ま
ったら、バイト単位で行うとする。
FIG. 1 shows an example for realizing such an invention, in which encoding is performed in 4-bit parallel.
Table 7 holds the pattern of the bit string of the register 3 in the case where all 1 byte may be "1" when the byte is viewed from the beginning of the register 3 in the process of encoding the next 4 bits. In advance, it is determined whether or not to detect the arrangement of “1” in the process of encoding the next 4 bits by matching the bit string in the register 3. The output from the register 2 to the buffer 6 is performed in byte units when 20 bits or more are stored in the register 2 so as not to be affected by carry.

【0009】例えば、次の状況を考える。入力ビットと
予想ビットが等しい場合には、レジスタ3の最下位の桁
から4桁上までのいずれかの桁に1を加算し、それに合
わせてレジスタ2からは1を減算し、一方入力ビットと
予想ビットが等しくない場合には、レジスタ3は確率値
に合わせてシフトし、レジスタ2は最高位の桁が1、残
りの桁は0になるようにリセットをする場合を考える。
レジスタ2は5ビットでとればよい。テーブル7には図
4に表すように、レジスタ2に現在あるビット数nに応
じたパターンを登録しておく。
For example, consider the following situation. When the input bit and the expected bit are equal, 1 is added to any of the least significant digits to four digits higher in the register 3, and 1 is subtracted from the register 2 accordingly. If the expected bits are not equal, consider the case where register 3 is shifted to the probability value and register 2 is reset so that the highest digit is 1 and the remaining digits are 0.
Register 2 may have 5 bits. In the table 7, as shown in FIG. 4, a pattern corresponding to the current bit number n in the register 2 is registered.

【0010】4ビット符号化し終わる度にレジスタ2と
図4のパターンを照合する。図4の**以外の部分とレ
ジスタ2のビットパターンを比較するのであるが、2進
数とみてレジスタ2のビットパターンが図4のパターン
より小さかったら、1の並びの検出は行わなくてよく、
4ビットパラレルで一気に符号化できる。もし、図4の
パターンより大きかったら、このときは本質的にビット
シリアルで符号化した場合と同じで、4ビット中の各ビ
ットを符号化する度に’1’の並びの検出を行い、もし
1バイト分の’1’の並びが現れたら、レジスタ2から
バッファ6への出力を行い、レジスタ2の先頭には’
0’を挿入する。この出力制御の過程を図5のフローチ
ャートで表す。
Each time the 4-bit encoding is completed, the register 2 is compared with the pattern shown in FIG. The bit pattern of the register 2 is compared with the portion other than ** in FIG. 4. If the bit pattern of the register 2 is smaller than the pattern of FIG.
Encoding can be performed at a stretch in 4-bit parallel. If the pattern is larger than the pattern shown in FIG. 4, this is essentially the same as in the case of bit-serial encoding, and the sequence of '1's is detected each time each of the four bits is encoded. When a sequence of “1” s for one byte appears, the output from the register 2 to the buffer 6 is performed.
Insert 0 '. This output control process is shown in the flowchart of FIG.

【0011】[0011]

【発明の効果】実施例において、図1のレジスタ2にお
いては’0’と’1’がランダムに現れるとみなした場
合(実際、こうみなせる場合は多い)には、1の並びの
検出を行わなければならないのは10回に1回の割合に
なる。つまり、従来の方法であると、10回4ビットパ
ラレルで符号化するとき40回レジスタ12の1の並び
チェックを行わなければならなかったが、今回提案した
方式では14回のレジスタ2のチェックですみ、従来の
3割5分程度の回数で済む。
In the embodiment, when it is considered that "0" and "1" appear at random in the register 2 of FIG. You only have to do it once every 10 times. In other words, according to the conventional method, when the encoding is performed 10 times in 4-bit parallel, the arrangement of the register 12 must be checked 40 times, but in the method proposed this time, the register 2 is checked 14 times. In this case, the number of times is about 30% and 5 minutes in the related art.

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

【図1】本発明の2進算術符号器の一実施例の構成を示
すブロック図
FIG. 1 is a block diagram showing the configuration of an embodiment of a binary arithmetic encoder according to the present invention.

【図2】2進算術符号のアルゴリズムを表すフローチャ
ート
FIG. 2 is a flowchart showing an algorithm of a binary arithmetic code.

【図3】従来の2進算術符号器の一実施例の構成を示す
ブロック図
FIG. 3 is a block diagram showing a configuration of one embodiment of a conventional binary arithmetic encoder.

【図4】出力ビット用レジスタ2と照合するビットパタ
ーンを保持するテーブルの内容
FIG. 4 is a table for holding a bit pattern to be compared with an output bit register 2;

【図5】図4のテーブルを用いた、4ビットパラレル符
号化時の出力制御の過程を表すフローチャート
FIG. 5 is a flowchart showing a process of output control at the time of 4-bit parallel encoding using the table of FIG. 4;

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

1,11 予測ビットと確率値(K)の組を保持するテ
ーブル 2,12 出力ビットを蓄えるレジスタ 3,13 入力系列の今までの部分の確率値の主要部を
表すレジスタ 4,14 レジスタ3,13、レジスタ2,12及びテ
ーブル1,11への操作を司る処理器 5,15 レジスタ2,12からバッファ6,16への
出力を制御する制御器 7 レジスタ2のビット列と照合するためのビットパタ
ーンを保持するテーブル 8 シリアルパラレル変換器
1,11 A table holding a set of predicted bits and a probability value (K) 2,12 A register storing output bits 3,13 A register indicating a main part of a probability value of the input sequence so far 4,14 Register 3, 13, a processor for controlling the operations on the registers 2, 12 and the tables 1, 11, 5, 15 a controller for controlling the output from the registers 2, 12 to the buffers 6, 16 7 a bit pattern for collating with the bit string of the register 2 Table that holds the data 8 Serial-parallel converter

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】入力ビット列を複数ビットパラレルで無歪
みデータ圧縮する2進算術符号器において、入力ビットに対応する確率値を用いて算術演算で符号化
を行うレジスタ(3)の現在のビット列および符号化し
た結果出力されるビットを蓄えるレジスタ(2)の現在
のビット列に対し、該ビット列と予めテーブル(7)に
登録しておいたビット列とを照合することによってその
時点から一定数の入力ビットを符号化する間に前記 符号
化した結果出力されるビットを蓄えるレジスタ(3)に
一定長の1の並びが現れる可能性の有無を判断し前記
符号化した結果出力されるビットを蓄えるレジスタ
(2)からの出力を制御する機能を備えることを特徴と
する2進算術符号器。
1. An input bit sequence is a plurality of bits parallel and distortion-free.
A binary arithmetic encoder that compresses only data and encodes it by an arithmetic operation using the probability value corresponding to the input bit.
The current bit string and the encoding of the register (3)
Of the register (2) that stores the bits output as a result of the
For the bit string of the above, the bit string and the table (7) are stored in advance.
By comparing with the registered bit string,
Results a fixed number of input bits from the time to determine the presence or absence of possibility appears arrangement of the first fixed length to the encoded result output by storing the bit register (3) during the encoding, and the encoded Register for storing output bits
(2) A binary arithmetic encoder having a function of controlling an output from (2) .
JP03303568A 1991-11-19 1991-11-19 Binary arithmetic encoder Expired - Fee Related JP3087394B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03303568A JP3087394B2 (en) 1991-11-19 1991-11-19 Binary arithmetic encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03303568A JP3087394B2 (en) 1991-11-19 1991-11-19 Binary arithmetic encoder

Publications (2)

Publication Number Publication Date
JPH0685684A JPH0685684A (en) 1994-03-25
JP3087394B2 true JP3087394B2 (en) 2000-09-11

Family

ID=17922577

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03303568A Expired - Fee Related JP3087394B2 (en) 1991-11-19 1991-11-19 Binary arithmetic encoder

Country Status (1)

Country Link
JP (1) JP3087394B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2020166527A1 (en) 2019-02-12 2021-12-16 めぐみ 田中 Food and drink for infants, methods for improving the intestinal environment of infants, and methods for enhancing immunity of infants

Also Published As

Publication number Publication date
JPH0685684A (en) 1994-03-25

Similar Documents

Publication Publication Date Title
US4467317A (en) High-speed arithmetic compression coding using concurrent value updating
JP3332619B2 (en) Decoding device and method thereof
US5918252A (en) Apparatus and method for generating a modulo address
US5032838A (en) Variable length code parallel decoding apparatus and method
US5745722A (en) Apparatus for decoding instruction immediate data to produce a string having a single bit different from other bit thereof
US20090058693A1 (en) System and method for huffman decoding within a compression engine
JPH08274649A (en) Data compression equipment using lempel-ziv type algorithm
GB2305089A (en) Method and apparatus for compressing arbitrary data
JPS60140981A (en) Method and device for decoding digital coded word of coded word system
JP3274284B2 (en) Encoding device and method
EP0660226A2 (en) Limiter circuit
JPS632370B2 (en)
JP2968112B2 (en) Code conversion method
US6281816B1 (en) Method and apparatus for reducing data expansion during data compression
JP3087394B2 (en) Binary arithmetic encoder
US6895119B2 (en) Method and apparatus for decoding compressed image data and capable of preventing error propagation
EP0485081B1 (en) Data compression dictionary access minimization logic
US6271775B1 (en) Method for reducing data expansion during data compression
US7683809B2 (en) Advanced lossless bit coding
US5654806A (en) Code manipulation for a high speed JPEG decoder
US8537038B1 (en) Efficient compression method for sorted data representations
Andra et al. A multi-bit binary arithmetic coding technique
EP0843253A1 (en) A method for reducing the number of bits needed for the representation of constant values in a data processing device
US6581083B1 (en) Syndrome generator and method for generating syndromes in a video/audio processing system
JP3281439B2 (en) Decoder and decoding method

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20000613

LAPS Cancellation because of no payment of annual fees