JPH0685684A - Binary arithmetic encoder - Google Patents
Binary arithmetic encoderInfo
- Publication number
- JPH0685684A JPH0685684A JP3303568A JP30356891A JPH0685684A JP H0685684 A JPH0685684 A JP H0685684A JP 3303568 A JP3303568 A JP 3303568A JP 30356891 A JP30356891 A JP 30356891A JP H0685684 A JPH0685684 A JP H0685684A
- Authority
- JP
- Japan
- Prior art keywords
- register
- bit
- output
- bits
- 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.)
- Granted
Links
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
【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 distortion-free 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 The 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 prediction bit ('0' or '1') for predicting whether the next input bit is '0' or '1' and a probability (2 -k form) that the prediction bit does not appear. A table that stores a set of values (K),
12 is a register that stores output bits, 13 is a register that represents the main part of the appearance probability value of the input sequence up to the encoding point,
Reference numeral 14 is a processor that controls the central operation of encoding for performing subtraction and shift in the register 12 and addition and shift in the register 3, and 15 is a controller for controlling the 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のように
なる。In order to encode the next input bit, it is determined from the past input bit string which set in the table 11 is to be used. Based on the result of comparing the expected bit and the actual input bit, the processor 14 adds "1" to the lower digit of the register 12 according to K or shifts it by K, and outputs K to the register 13. Decrease the digit from "1" by "1" or reset. Register 13
When the highest-order bit of the register 13 becomes "0" as a result of subtraction, the register 13 is shifted by 1 bit so that the highest-order bit becomes "1". At this time, the register 12 is also shifted by 1 bit. To do. If necessary, the expected bit or probability value (K) in the subsequent table 1 is rewritten. The above flow is shown in a flow chart in FIG.
【0004】制御器15はレジスタ12からバッファ1
6への出力を制御するのであるが、例えばバイト単位で
出力するとすると、出力するバイトにはレジスタ12へ
の加算による桁上がりの影響が及ばないようにすること
が必要となる。すると、レジスタ12に’1’が延々と
続く場合、いつまでもバッファ16へ出力ができず、レ
ジスタ12の長さを無限にとらなければならず、また、
符号化時間の遅延も甚だしくなる。それを回避するた
め、レジスタ12を先頭からバイト区切り毎にみて、各
バイト中のビットがすべて’1’であるかを調べ、もし
そうであったらその1バイト分の’1’の並びの後に’
0’を何ビットか挿入することにより桁上がりの伝搬を
そこでとめられるようにしてすべてが’1’のバイトを
レジスタ2からバッファ6へ出力していた。The controller 15 moves from the register 12 to the buffer 1
Although the output to 6 is controlled, if output is performed in byte units, for example, it is necessary to prevent the output byte from being affected by carry due to addition to the register 12. Then, when '1' continues in the register 12 endlessly, the output to the buffer 16 cannot be made forever, and the length of the register 12 must be infinite.
The delay in the coding time becomes great. To avoid this, check the register 12 for each byte delimiter from the beginning to see if all the bits in each byte are '1', and if so, after the 1 byte sequence of '1''
By inserting a few bits of 0 ', carry propagation can be stopped there, and a byte of all'1's was output from register 2 to buffer 6.
【0005】[0005]
【発明が解決しようとする課題】今までビットシリアル
で2進算術符号化していたものを何ビットかパラレルで
符号化を行うことにより高速化を図る場合、パラレルの
場合の出力は、以前から行われているビットシリアルの
場合に完全に一致して、互換性があることが望まれる。
そのとき問題になるのは、”従来の方法”の節の最後に
述べた、図3におけるレジスタ13に’1’の並びが現
れたら、’0’を挿入するというところである。つま
り、パラレルで符号化している、その何ビット目かで本
来ビットシリアルで符号化していれば’0’を挿入しな
ければならないところで、パラレルでは放っておくた
め、ビットシリアルの場合では起こらない長い桁上がり
が起こってしまう可能性があり、この場合は出力結果が
異なるものとなってしまう。かといって、各入力ビット
毎に’1’の並びを検出していたのでは、せっかくパラ
レル化しても符号化速度を上げることができない。In order to increase the speed by encoding binary arithmetic encoding with bit serial up to now by parallel encoding several bits, the output in the case of parallel has been output from before. It is hoped that it will be an exact match and compatible with the case of the known bit serial.
At that time, the problem is that when the sequence of '1' appears in the register 13 in FIG. 3, which is described at the end of the section "Conventional method", "0" is inserted. In other words, if you are encoding in parallel, you should insert "0" if you originally encoded in bit serial depending on the number of the bit, but since it is left in parallel, it does not occur in the case of bit serial. Carrying may occur, resulting in different output results. However, if the arrangement of '1's is detected for each input bit, the encoding speed cannot be increased even if parallelization is carried out.
【0006】[0006]
【課題を解決するための手段】本発明の2進算術符号器
は、無歪データ圧縮装置である2進算術符号器におい
て、前記符号器の一部であるところの符号化した結果出
力されるビットを蓄えるレジスタに、一定数のビットを
符号化する内に一定長の1の並びが現れる可能性の有無
を、前記レジスタの現在の状態から判断して前記レジス
タからの出力を制御する機能を備えることを特徴とす
る。The binary arithmetic encoder of 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 for 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 1s of a constant length may appear in a register that stores bits in a certain number of bits. It is characterized by being provided.
【0007】[0007]
【作用】一定数の入力ビットを符号化する間に’1’の
並びが現れる可能性があるか事前に判断することによ
り、可能性がある場合だけその間1ビット符号化する度
に出力ビットを蓄えるレジスタに’1’の並びが現れた
かどうか観察し、そうでない場合にはその間は1の並び
を検出をしなくてすませることができる。こうして、レ
ジスタの’1’の並びを検出する工程が削減されれば、
符号化速度の高速化が望める。特にパラレル処理にした
場合には、高速性を保ったまま、出力データをビットシ
リアルで処理した場合と一致させることができる。By pre-determining whether a sequence of '1's may appear while encoding a fixed number of input bits, the output bit is encoded each time 1 bit is encoded only when there is a possibility. It is possible to observe whether the sequence of '1' appears in the register to be stored, and if not, skip the sequence of 1's during that time. Thus, if the process of detecting the sequence of '1's in the register is reduced,
Higher coding speed can be expected. Particularly, when the parallel processing is performed, the output data can be matched with the case where the output data is processed by bit serial while maintaining high speed.
【0008】[0008]
【実施例】図1はこのような発明を実現するための例
で、4ビットパラレルで符号化する場合を表している。
テーブル7には次の4ビットを符号化する過程において
レジスタ3の先頭からバイト単位見た場合にその1バイ
ト中がすべて’1’となる可能性がある場合のレジスタ
3のビット列のパターンを保持しておき、レジスタ3中
のビット列とマッチングをとり、次の4ビットを符号化
する過程において’1’の並びの検出を行うかどうか判
断する。レジスタ2からバッファ6への出力は、桁上が
りの影響がないよう、レジスタ2に20ビット以上貯ま
ったら、バイト単位で行うとする。DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is an example for realizing such an invention, and shows a case of encoding in 4-bit parallel.
The table 7 holds the pattern of the bit string of the register 3 when there is a possibility that all of the 1 byte in the byte unit from the beginning of the register 3 may become "1" in the process of encoding the next 4 bits. Then, by matching with the bit string in the register 3, it is determined whether or not to detect the arrangement of '1's in the process of encoding the next 4 bits. It is assumed that the output from the register 2 to the buffer 6 is performed in byte unit when 20 bits or more are stored in the register 2 so that there is no carry carry effect.
【0009】例えば、次の状況を考える。入力ビットと
予想ビットが等しい場合には、レジスタ3の最下位の桁
から4桁上までのいずれかの桁に1を加算し、それに合
わせてレジスタ2からは1を減算し、一方入力ビットと
予想ビットが等しくない場合には、レジスタ3は確率値
に合わせてシフトし、レジスタ2は最高位の桁が1、残
りの桁は0になるようにリセットをする場合を考える。
レジスタ2は5ビットでとればよい。テーブル7には図
4に表すように、レジスタ2に現在あるビット数nに応
じたパターンを登録しておく。For example, consider the following situation. If the input bit and the expected bit are equal, 1 is added to any digit from the least significant digit to the upper 4 digits of register 3, and 1 is subtracted from register 2 accordingly, while If the expected bits are not equal, the register 3 is shifted according to the probability value, and the register 2 is reset so that the highest digit is 1 and the remaining digits are 0.
Register 2 may be 5 bits. As shown in FIG. 4, a pattern corresponding to the number n of bits currently in the register 2 is registered in the table 7.
【0010】4ビット符号化し終わる度にレジスタ2と
図4のパターンを照合する。図4の**以外の部分とレ
ジスタ2のビットパターンを比較するのであるが、2進
数とみてレジスタ2のビットパターンが図4のパターン
より小さかったら、1の並びの検出は行わなくてよく、
4ビットパラレルで一気に符号化できる。もし、図4の
パターンより大きかったら、このときは本質的にビット
シリアルで符号化した場合と同じで、4ビット中の各ビ
ットを符号化する度に’1’の並びの検出を行い、もし
1バイト分の’1’の並びが現れたら、レジスタ2から
バッファ6への出力を行い、レジスタ2の先頭には’
0’を挿入する。この出力制御の過程を図5のフローチ
ャートで表す。The register 2 and the pattern of FIG. 4 are collated each time 4-bit encoding is completed. The bit pattern of register 2 is compared with the part other than ** in FIG. 4, but if the bit pattern of register 2 is smaller than the pattern of FIG.
It can be coded at once in 4-bit parallel. If it is larger than the pattern of FIG. 4, this time is essentially the same as the case of encoding by bit serial, and every time when encoding each bit in 4 bits, the sequence of '1' is detected, When a sequence of 1's for 1 byte appears, output from register 2 to buffer 6 and at the beginning of register 2 '
Insert 0 '. The process of this output control 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. 1 (in many cases, this can often be the case), the sequence of 1s is detected. You have to do it once every 10 times. In other words, with the conventional method, it was necessary to check 1 sequence of 1s in the register 12 40 times when encoding in 4-bit parallel 10 times, but in the method proposed this time, it is 14 times to check the register 2. Only about 30% of the conventional number of times is required.
【図1】本発明の2進算術符号器の一実施例の構成を示
すブロック図FIG. 1 is a block diagram showing the configuration of an embodiment of a binary arithmetic encoder of the present invention.
【図2】2進算術符号のアルゴリズムを表すフローチャ
ートFIG. 2 is a flowchart showing an algorithm of binary arithmetic code.
【図3】従来の2進算術符号器の一実施例の構成を示す
ブロック図FIG. 3 is a block diagram showing a configuration of an embodiment of a conventional binary arithmetic encoder.
【図4】出力ビット用レジスタ2と照合するビットパタ
ーンを保持するテーブルの内容FIG. 4 is a content of a table holding a bit pattern to be matched with the output bit register 2
【図5】図4のテーブルを用いた、4ビットパラレル符
号化時の出力制御の過程を表すフローチャート5 is a flowchart showing a process of output control at the time of 4-bit parallel encoding using the table of FIG.
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 Table holding a pair of prediction bit and probability value (K) 2, 12 Register for storing output bit 3, 13 Register representing the main part of the probability value of the previous part of the input sequence 4, 14 Register 3, 13, a processor 2,15 which controls the operations to the registers 2 and 12 and the tables 1 and 11 A controller 7 which controls the output from the registers 2 and 12 to the buffers 6 and 16 A bit pattern for matching with the bit string of the register 2 Holding table 8 serial-parallel converter
Claims (1)
器において、前記符号器の一部であるところの符号化し
た結果出力されるビットを蓄えるレジスタに、一定数の
ビットを符号化する内に一定長の1の並びが現れる可能
性の有無を、前記レジスタの現在の状態から判断して前
記レジスタからの出力を制御する機能を備えることを特
徴とする2進算術符号器。1. A binary arithmetic encoder which is a distortionless data compression apparatus, wherein a register, which is a part of the encoder, stores a bit output as a result of encoding, and encodes a fixed number of bits. A binary arithmetic encoder having 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 1's of a certain length will appear in the register.
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 true JPH0685684A (en) | 1994-03-25 |
JP3087394B2 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) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20220002260A (en) | 2019-02-12 | 2022-01-06 | 메구미 타나카 | Food for infants, a method for improving the intestinal environment of infants and toddlers, and a method for enhancing immunity of infants and young children |
CN114142863A (en) * | 2020-09-03 | 2022-03-04 | 中国电信股份有限公司 | Method, apparatus, and storage medium for encoding and decoding capabilities of CPE |
-
1991
- 1991-11-19 JP JP03303568A patent/JP3087394B2/en not_active Expired - Fee Related
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20220002260A (en) | 2019-02-12 | 2022-01-06 | 메구미 타나카 | Food for infants, a method for improving the intestinal environment of infants and toddlers, and a method for enhancing immunity of infants and young children |
CN114142863A (en) * | 2020-09-03 | 2022-03-04 | 中国电信股份有限公司 | Method, apparatus, and storage medium for encoding and decoding capabilities of CPE |
CN114142863B (en) * | 2020-09-03 | 2024-12-20 | 中国电信股份有限公司 | Method, device, and storage medium for encoding and decoding capabilities of CPE |
Also Published As
Publication number | Publication date |
---|---|
JP3087394B2 (en) | 2000-09-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4467317A (en) | High-speed arithmetic compression coding using concurrent value updating | |
US5710562A (en) | Method and apparatus for compressing arbitrary data | |
JP2713327B2 (en) | Encoding method and system | |
JPS60140981A (en) | Method and device for decoding digital coded word of coded word system | |
EP0658982B1 (en) | System for bi-level symbol coding-decoding with saved storage and method for the same | |
EP0660226A2 (en) | Limiter circuit | |
JPH0685684A (en) | Binary arithmetic encoder | |
US6441757B1 (en) | Decoding apparatus and decoding method for variable length codes | |
JPH05145770A (en) | Encoding/decoding device | |
US5654806A (en) | Code manipulation for a high speed JPEG decoder | |
Andra et al. | A multi-bit binary arithmetic coding technique | |
JP2003249857A (en) | Device for encoding and decoding entropy | |
JPH1070469A (en) | Run length encoder | |
JP2715871B2 (en) | Variable length coding method | |
JPS61173527A (en) | Compression system for image data | |
JP3317079B2 (en) | Variable length code decoding device | |
JP3653226B2 (en) | Data compression method and apparatus using embedded run length coding | |
JP2561854B2 (en) | Encoder | |
JP3221252B2 (en) | Huffman decoder | |
JPH04332035A (en) | Data compressing device | |
EP0079333B1 (en) | High-speed arithmetic compression coding using concurrent value updating | |
JP3108243B2 (en) | Encoding and decoding device | |
JPH04277933A (en) | Data compression and decompression methods | |
JPH05268096A (en) | Coder/encoder using adaptive delta modulation system | |
JP3482820B2 (en) | Data encoding method, data encoding device, data decoding method, and data decoding device |
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 |