JP3219571B2 - Image coding apparatus and method - Google Patents

Image coding apparatus and method

Info

Publication number
JP3219571B2
JP3219571B2 JP27693793A JP27693793A JP3219571B2 JP 3219571 B2 JP3219571 B2 JP 3219571B2 JP 27693793 A JP27693793 A JP 27693793A JP 27693793 A JP27693793 A JP 27693793A JP 3219571 B2 JP3219571 B2 JP 3219571B2
Authority
JP
Japan
Prior art keywords
data
code
carry
latch
output
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
JP27693793A
Other languages
Japanese (ja)
Other versions
JPH06225158A (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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP27693793A priority Critical patent/JP3219571B2/en
Publication of JPH06225158A publication Critical patent/JPH06225158A/en
Application granted granted Critical
Publication of JP3219571B2 publication Critical patent/JP3219571B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は画像データを圧縮符号化
する画像符号装置に関し、特に算術符号(Arithm
etic code)を用いて画像データを符号化する
画像符号化装置及び方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image coding apparatus for compressing and coding image data, and more particularly, to an arithmetic code (Arithm).
TECHNICAL FIELD The present invention relates to an image encoding apparatus and an image encoding method for encoding image data using an image code.

【0002】[0002]

【従来の技術】算術符号は、ISO/IEC(Cmmi
ttee Draft 11544等)に記載されてい
る様に、適応予測による画像圧縮等に使用されている。
2. Description of the Related Art Arithmetic codes are ISO / IEC (Cmmi).
, etc.) is used for image compression by adaptive prediction.

【0003】図1に算術符号を用いた符号化回路の構成
例を示す。
FIG. 1 shows a configuration example of an encoding circuit using arithmetic codes.

【0004】符号化すべき着目画素の2値データIは、
排他的ORゲート904に入力される。また、着目画素
の近傍の複数の参照画素の2値データXは予測状態メモ
リ901に入力される。予測状態メモリ901は参照画
素データの状態に応じて0又は1を予測画素データとし
て排他的ORゲート904に入力する。排他的ORゲー
ト904では、着目画素データIと予測状態メモリ90
1からの予測画素データとの一致/不一致を調べ、その
結果を算術符号器903へ入力する。
The binary data I of the pixel of interest to be encoded is
Input to exclusive OR gate 904. Further, binary data X of a plurality of reference pixels near the target pixel is input to the prediction state memory 901. The prediction state memory 901 inputs 0 or 1 to the exclusive OR gate 904 as prediction pixel data according to the state of the reference pixel data. In the exclusive OR gate 904, the pixel data I of interest and the prediction state memory 90
A match / mismatch with the predicted pixel data from 1 is checked, and the result is input to the arithmetic encoder 903.

【0005】算術符号器903には、current
coding intervalを示すinterva
l size register(Aレジスタ)及びc
ode register(Cレジスタ)が設けられ、
これらAレジスタ及びCレジスタを排他的ORゲート9
04の出力値に応じてシフトする。そして、Cレジスタ
の特定位置の連続した8ビットの値が符号データとして
出力される。
The arithmetic encoder 903 has a current
interva indicating coding interval
l size register (A register) and c
mode register (C register) is provided,
These A register and C register are exclusive OR gate 9
The shift is performed according to the output value of “04”. Then, a continuous 8-bit value at a specific position of the C register is output as code data.

【0006】予測状態メモリ901の内容は、算術符号
器903のAレジスタの値を含む符号化結果を取り込む
予測状態更新部902の指示に従って更新される。従っ
て、予測状態メモリ901からは実行中の符号化動作に
適応的に予測画素データを排他的ORゲート904に出
力する。
The contents of the prediction state memory 901 are updated in accordance with an instruction from the prediction state update unit 902 which takes in the coding result including the value of the A register of the arithmetic encoder 903. Accordingly, the prediction state memory 901 outputs the prediction pixel data to the exclusive OR gate 904 adaptively to the encoding operation being performed.

【0007】図2は符号化器903の符号化動作を示す
フローチャート図である。
FIG. 2 is a flowchart showing the encoding operation of the encoder 903.

【0008】尚、符号化器903内のAレジスタは32
ビット、Cレジスタは32ビットとする。区間Aを0
(0000H)〜0.5(8000H)〜1.0(10
000H)と定義する。ここにおいて、Hは16進数で
あることを表わす。
The A register in the encoder 903 has 32 registers.
The bit and the C register are 32 bits. Section A is 0
(0000H) to 0.5 (8000H) to 1.0 (10
000H). Here, H represents a hexadecimal number.

【0009】排他的ORゲート904による着目画素デ
ータと予測画素データとの比較がなされ、着目画素デー
タと予測画素データが一致か否かを判定し(S20
1)、一致していれば、図4に示す再正規化処理を実行
し、一方、不一致ならば、図5に示す再正規化処理を実
行する。図3に再正規化処理の手順を示す。
The exclusive OR gate 904 compares the pixel data of interest with the predicted pixel data, and determines whether the pixel data of interest matches the predicted pixel data (S20).
1) If they match, the re-normalization processing shown in FIG. 4 is executed, while if they do not match, the re-normalization processing shown in FIG. 5 is executed. FIG. 3 shows the procedure of the renormalization process.

【0010】図3に示す再正規化処理は、着目画素デー
タと予測画素データが不一致の場合、及び、両データが
一致していて、且つ、Aレジスタの値Aが0.5(80
00H)未満の場合に実行される。
The re-normalization process shown in FIG. 3 is performed when the target pixel data and the predicted pixel data do not match, and when both data match and the value A of the A register is 0.5 (80
00H).

【0011】まず、Aレジスタ及びCレジスタの夫々の
内容を2倍するためにAレジスタ及びCレジスタを夫々
MSB方向へ1ビットシフトし、また、シフト回数をカ
ウントするCTカウンタから1減算する(S301)。
尚、本例では符号化データを8ビットパラレルデータと
して取扱う様に、Cレジスタが8回シフトする毎にCレ
ジスタ内の特定位置データを符号化データとして取り出
す。従って、CTカウンタには「8」を初期セットし、
Aレジスタの1ビットシフト毎にCTカウンタを減算
し、CTカウンタの値が「0」となったときに、8ビッ
トの符号化データが揃ったことになる。
First, in order to double the contents of each of the A register and the C register, the A register and the C register are each shifted by one bit in the MSB direction, and 1 is subtracted from the CT counter which counts the number of shifts (S301). ).
In this example, every time the C register shifts eight times, specific position data in the C register is extracted as encoded data so that the encoded data is handled as 8-bit parallel data. Therefore, "8" is initially set in the CT counter,
The CT counter is subtracted every bit shift of the A register, and when the value of the CT counter becomes “0”, the encoded data of 8 bits is complete.

【0012】即ち、CTカウンタの値が「0」か否かを
判定し(S302)、「0」であればCレジスタから8
ビットの符号化データを取り出して出力し(S30
3)、「0」でなければ符号化データの出力は行なわな
い。
That is, it is determined whether or not the value of the CT counter is "0" (S302).
The bit coded data is extracted and output (S30).
3) If not "0", no encoded data is output.

【0013】次に、1ビットシフトのなされたAレジス
タの値Aが0.5(8000H)未満か否かを判定し
(S304)、未満でなければ再正規化処理を終了す
る。一方、Aレジスタの値Aが0.5(8000H)未
満であれば、ステップS301に戻り、再度、Aレジス
タ及びCレジスタの1ビットシフト及びCTカウンタの
1減算を実行する。そして、Aレジスタの値Aが0.5
(8000H)未満でなくなる迄、このシフト動作を実
行する。
Next, it is determined whether the value A of the A register shifted by 1 bit is less than 0.5 (8000H) (S304), and if not, the re-normalization process is terminated. On the other hand, if the value A of the A register is less than 0.5 (8000H), the process returns to step S301, where the A register and the C register are shifted by 1 bit and the CT counter is decremented by 1. Then, the value A of the A register is 0.5
This shift operation is performed until the shift is no less than (8000H).

【0014】図4及び図5の例を用いて、再正規化処理
におけるAレジスタの状態繊遷移を説明する。
The state transition of the A register in the renormalization process will be described with reference to the examples shown in FIGS.

【0015】即ち、着目画素データが予測画素データと
一致していれば、Aレジスタの値Aから定数LSZ(l
east significant coding i
nterval)が減算される(S202)。次にAレ
ジスタの値Aが0.5(8000H)より小か否かを判
定し(S203)、値Aが0.5(8000H)より小
でない場合は、path2を通り、符号化動作を終了す
る(図4のphase1,2)。
That is, if the pixel data of interest coincides with the predicted pixel data, the value A of the A register is converted into a constant LSZ (l
east significant coding i
(interval) is subtracted (S202). Next, it is determined whether or not the value A of the A register is smaller than 0.5 (8000H) (S203). If the value A is not smaller than 0.5 (8000H), the value passes through path2 and the encoding operation is completed. (Phases 1 and 2 in FIG. 4).

【0016】また、Aレジスタの値Aが0.5(800
0H)より小の場合は、path1を通り、Cレジスタ
の値CにAレジスタの値Aを加算する(S204)。そ
して、0.5(8000H)未満となった値Aを0.5
(8000H)以上とする様に、図3に示す再正規化処
理を実行する。即ち、Aレジスタをシフト動作すること
により更新し、また、同様のシフト動作をCレジスタに
対しても実行する(S205)。これにより、Aレジス
タ及びCレジスタの更新がなされる(図4のphase
3)。また、このとき、Aレジスタのシフト回数をカウ
ントするCTカウンタの値が「0」となり、このとき
に、Cレジスタの上位バイトを符号化データとして出力
する。
If the value A of the A register is 0.5 (800
If the value is smaller than 0H), the value passes through path1 and the value A of the A register is added to the value C of the C register (S204). Then, the value A, which is less than 0.5 (8000H), is 0.5
(8000H) or more, the re-normalization processing shown in FIG. 3 is executed. That is, the A register is updated by performing a shift operation, and the same shift operation is performed on the C register (S205). Thereby, the A register and the C register are updated (phase in FIG. 4).
3). At this time, the value of the CT counter that counts the number of shifts of the A register becomes “0”, and at this time, the upper byte of the C register is output as encoded data.

【0017】一方、着目画素データと予測画素データと
が不一致のときは、path3を通り、Aレジスタの値
Aを定数LSZとし(S206)、更に、Aレジスタの
値Aが0.5(8000H)以上となる迄、図3に示す
再正規化処理を実行し、Aレジスタをシフト動作する
(図5のphase1,2,3,4)。図5の例ではA
レジスタは3回シフト動作される。これにより、Aレジ
スタの更新がなされる。また、Aレジスタに対しても同
様のシフト動作がなされる。尚、図5の例では、1回目
のシフトでCTカウンタの値が「0」となり、このとき
に、Cレジスタの上位バイトが符号化データとして出力
され、また、その出力後、CTカウンタの値は「8」に
セットされる。
On the other hand, when the pixel data of interest and the predicted pixel data do not match, the value A of the A register is set to a constant LSZ through path3 (S206), and the value A of the A register is 0.5 (8000H). Until the above, the re-normalization processing shown in FIG. 3 is executed, and the A register is shifted (phases 1, 2, 3, and 4 in FIG. 5). In the example of FIG.
The register is shifted three times. As a result, the A register is updated. The same shift operation is performed on the A register. In the example of FIG. 5, the value of the CT counter becomes “0” in the first shift, and at this time, the upper byte of the C register is output as encoded data. Is set to "8".

【0018】以上説明した算術符号を用いた符号化回路
においては、符号化データとしてCレジスタ内をシフト
された値Cが8ビット単位で出力される。この値Cは図
2のステップS204に示す如く、値Aとの加算が行な
われる。従って、ある値Cにある値Aを加算したとき
に、その加算結果がFFHを超えてしまう可能性があ
る。この場合、その桁上りは少なくとも先の8ビットの
符号化データに影響を与える。従って、Cレジスタから
出力された8ビットデータを符号化データとして直ちに
伝送路等へ出力していたのでは、桁上りに対処できな
い。そこで、値Cと値Aとの加算結果が、FFHを超
え、桁上りの発生する可能性のある場合には、その桁上
りを何らかの手法で吸収する必要がある。
In the coding circuit using the arithmetic code described above, the value C shifted in the C register is output in 8-bit units as coded data. This value C is added to the value A as shown in step S204 of FIG. Therefore, when the value A is added to the value C, the result of the addition may exceed FFH. In this case, the carry affects at least the preceding 8-bit encoded data. Therefore, if 8-bit data output from the C register is immediately output as encoded data to a transmission path or the like, it is not possible to deal with carry. Therefore, if the addition result of the value C and the value A exceeds FFH and a carry may occur, it is necessary to absorb the carry by some method.

【0019】その手法の1つとして、符号化レジスタか
ら既に出力された系列に桁上りの可能性があるとき、符
号ビット系列を伝送せず記憶するといういわゆる桁上り
待機方式がある。
As one of the methods, there is a so-called carry-standby method of storing a code bit sequence without transmitting it when there is a possibility that a sequence already output from the encoding register may carry.

【0020】以下、その桁上り待機方式を一例にとり説
明を行う。
Hereinafter, the carry-waiting system will be described as an example.

【0021】図6は桁上り待機処理を行う回路構成図で
ある。以下、その動作について説明する。算術符号器9
03において、再正規化が起こると、その出力aはTE
MPレジスタ302に格納される。出力aは桁上りを含
む9ビットデータである。TEMPレジスタ302の出
力bは桁上りビットであり、cは桁上りビットを含まな
い8ビットデータである。bは桁上り判定回路303に
入力され、る。桁上り判定回路303は桁上りがある場
合には、出力jにH(High)レベルを出力し、桁上
りがない場合にはL(Low)レベルを出力するものと
する。cは、cがFFHと等しいかどうかを判定するF
F判定回路304と、cの値を格納するBUFFERレ
ジスタ305に入力される。FF判定回路304は、c
がFFHと等しい場合に、SCカウンタ306を1つイ
ンクメントするクロックdを出力するとともに、cがF
FHと等しくなかった場合に、cをBUFFERレジス
タ305に格納するためのクロックeを出力するものと
する。
FIG. 6 is a circuit diagram showing a carry-on standby process. Hereinafter, the operation will be described. Arithmetic encoder 9
03, when renormalization occurs, its output a is TE
It is stored in the MP register 302. Output a is 9-bit data including carry. The output b of the TEMP register 302 is a carry bit, and c is 8-bit data not including a carry bit. b is input to the carry determination circuit 303. The carry determination circuit 303 outputs an H (High) level as an output j when there is a carry, and outputs an L (Low) level when there is no carry. c is F to determine if c is equal to FFH
The signal is input to the F determination circuit 304 and the BUFFER register 305 that stores the value of c. The FF determination circuit 304 calculates c
Is equal to FFH, a clock d for incrementing the SC counter 306 by one is output, and c is set to F
If it is not equal to FH, a clock e for storing c in the BUFFER register 305 is output.

【0022】以下説明を簡単にする為に一例をもって説
明を行う。
An example will be described below for simplicity.

【0023】SCカウンタ306がリセットされた後で
あり、その出力kは0であるとし、BUFFERレジス
タ305にc3Hが格納されているとする。次に再正規
化が行われると、算術符号器903の出力がTEMPレ
ジスタ302に格納される。今、その格納される値をB
AHとする。BAHが格納された場合には、桁上りビッ
トを含まないので、bは0であり、cはBAHである。
したがって、桁上り判定回路303の出力は“L”であ
り、FF判定回路304からは、SCカウンタ306を
インクリメントするクロックdが出力されず、BUFF
ERレジスタ305にcを格納するクロックeが出力さ
れる。
It is assumed that after the SC counter 306 has been reset, its output k is 0, and c3H is stored in the BUFFER register 305. Next, when renormalization is performed, the output of the arithmetic encoder 903 is stored in the TEMP register 302. Now, the stored value is B
AH. When BAH is stored, b is 0 and c is BAH because no carry bit is included.
Therefore, the output of the carry determination circuit 303 is “L”, and the clock d for incrementing the SC counter 306 is not output from the FF determination circuit 304.
A clock e for storing c is output to the ER register 305.

【0024】307は加算器であって、S=A+Bを実
現する論理回路である。再正規化が行われる前は、BU
FFERレジスタ305にはC3Hが格納されており、
再正規化後に、桁上り判定回路303の出力jはLなの
で、スイッチ308はL側に倒れており、307のB入
力には00Hが入力されることになる。したがって加算
器307の出力gはC3Hとなる。
An adder 307 is a logic circuit for realizing S = A + B. Before renormalization is performed, BU
C3H is stored in the FFER register 305,
After the renormalization, the output j of the carry determination circuit 303 is L, so that the switch 308 is tilted to the L side, and 00H is input to the B input of 307. Therefore, the output g of the adder 307 is C3H.

【0025】制御回路309はj、kの論理値によっ
て、スイッチ310、及び311の動作を決定する制御
信号h、iを出力する回路である。j=L、k=00H
の場合には、信号iはLであり、スイッチ311はL側
に倒れているので、出力oにはC3Hが出力されること
となる。
The control circuit 309 outputs control signals h and i for determining the operation of the switches 310 and 311 according to the logical values of j and k. j = L, k = 00H
In the case of, the signal i is L and the switch 311 is tilted to the L side, so that C3H is output as the output o.

【0026】次に別のケースについて説明を行う。先の
動作説明で、BUFFERにC3Hが格納され、再正規
化が再び行われたところから説明を続ける。今回は、B
AHではなく、FFHが、TEMPレジスタ302に格
納されるとする。桁上りがないので、bは0であり、c
はFFHである。cがFFHなので、FF判定回路30
4は、SCカウンタ306を一回インクリメントするク
ロックdを出力する。また、TEMPレジスタ302の
値をBUFFERレジスタ305に格納するクロックe
は出力されない。したがってBUFFERレジスタ30
5の出力fは依然としてC3Hである。次回の再正規化
により、算術符号器903の出力が再びFFHだとする
と、SCカウンタ306は、さらに一回インクリメント
し、BUFFERレジスタ305にはC3Hが格納され
たままである。このFFHが、再正規化のたびに、n回
連続したとすると、SCカウンタ306の出力kはnと
なり、BUFFERレジスタ305の出力fは、C3H
のままである。この状態で、次の再正規化で、TEMP
レジスタ302に、C3Hが格納されたとする。桁上り
もなく、FFHに等しくないので、まずC3Hが出力o
に出力される。制御回路309により、信号hはLで、
信号iはHとなる。出力oには、FFHがn回分出力さ
れる。そして、SCカウンタ306はリセットされ、B
UFFERレジスタ305には3EHが格納される。
尚、このFFHのn回出力の間は新たな符号データの取
込みができず、従って、前段の符号化処理は一時停止す
る。
Next, another case will be described. In the above description of the operation, C3H is stored in BUFFER and re-normalization is performed again. This time, B
It is assumed that FFH is stored in the TEMP register 302 instead of AH. Since there is no carry, b is 0 and c
Is FFH. Since c is FFH, the FF determination circuit 30
4 outputs a clock d for incrementing the SC counter 306 once. A clock e for storing the value of the TEMP register 302 in the BUFFER register 305
Is not output. Therefore, BUFFER register 30
The output f of 5 is still C3H. Assuming that the output of the arithmetic encoder 903 is again FFH by the next renormalization, the SC counter 306 is incremented once more, and C3H is still stored in the BUFFER register 305. Assuming that this FFH is repeated n times each time the renormalization is performed, the output k of the SC counter 306 becomes n, and the output f of the BUFFER register 305 becomes C3H
Remains. In this state, in the next renormalization, TEMP
It is assumed that C3H is stored in the register 302. Since there is no carry and it is not equal to FFH, first C3H is output o
Is output to According to the control circuit 309, the signal h is L,
The signal i becomes H. FFH is output n times to the output o. Then, the SC counter 306 is reset, and B
3EH is stored in the UFFER register 305.
It should be noted that new code data cannot be fetched during the n-th output of the FFH, so that the preceding encoding process is temporarily stopped.

【0027】さらに、別のケースについて説明する。B
UFFERレジスタ305にC3Hが格納され、SCカ
ウンタ306の出力がnであるところから説明を続け
る。次の再正規化で、TEMPレジスタ302に13E
Hが格納されたとする。TEMPレジスタ302の出力
bは1となり、桁上り判定回路303により、桁上りが
あると判定され、jはHとなる。これにより、スイッチ
308はH側に倒れ、01Hが加算器307に入力さ
れ、加算器307の出力gはC4Hとなり、出力oより
出力される。その後制御回路309により、信号hは
H、信号iもHとなり、00HがSCカウンタ306の
カウント値に従ってn回出力される。BUFFERレジ
スタ302の値は3EHとなり、SCカウンタ306は
リセットされる。
Further, another case will be described. B
The description is continued from the place where C3H is stored in the UFFER register 305 and the output of the SC counter 306 is n. In the next renormalization, 13E is stored in the TEMP register 302.
Assume that H is stored. The output b of the TEMP register 302 becomes 1, the carry determination circuit 303 determines that there is a carry, and j becomes H. As a result, the switch 308 falls to the H side, 01H is input to the adder 307, the output g of the adder 307 becomes C4H, and is output from the output o. Thereafter, the control circuit 309 changes the signal h to H and the signal i to H, and outputs 00H n times in accordance with the count value of the SC counter 306. The value of the BUFFER register 302 becomes 3EH, and the SC counter 306 is reset.

【0028】尚、この00Hのn回出力時にも、新たな
符号データの取込みはできず、従って、前段の符号化処
理は一時停止する。
It should be noted that new code data cannot be fetched even when the 00H is output n times, so that the preceding encoding process is temporarily stopped.

【0029】以上、SCカウンタ306の値をnとして
説明したが、nは0以上の値であって、nがそのいずれ
の値であっても同様にして説明することができる。
In the above, the value of the SC counter 306 has been described as n. However, n is a value equal to or greater than 0, and the description can be similarly applied to any value of n.

【0030】図7は桁上り待機方式の処理を示すフロー
チャートである。
FIG. 7 is a flowchart showing the process of the carry-standby method.

【0031】A(Augent:区間)レジスタの再正
規化(re−normalize)に同期して(S
2)、C(Code:符号)レジスタのデータを8bi
t(1バイト)ごと、または、(桁上りbit+8bi
t)ごとに出力し、TEMPレジスタに格納する(S
3)。TEMPレジスタの値がFFHよりも小さい場合
には(S4)、BUFFERレジスタにTEMPレジス
タの値を格納する。Cレジスタから出力される次回のデ
ータが桁上りをする可能性があるので、BUFFERレ
ジスタの値を出力せず、待機状態となる(S6)。Cレ
ジスタから出力されTEMPレジスタに格納された次回
のデータがFFHより小さい場合には、BUFFERレ
ジスタに対して桁上りする可能性がなくなるので、BU
FFERレジスタの値が符号として出力され、TEMP
レジスタの値がBUFFERレジスタに新たに取り込ま
れる(S6)。
In synchronization with the re-normalization of the A (Augment: section) register (S
2), the data of the C (Code: code) register is 8 bi
every t (1 byte) or (carry bit + 8bi
t) and stored in the TEMP register (S
3). When the value of the TEMP register is smaller than FFH (S4), the value of the TEMP register is stored in the BUFFER register. Since there is a possibility that the next data output from the C register may carry up, the value of the BUFFER register is not output, and a standby state is set (S6). If the next data output from the C register and stored in the TEMP register is smaller than FFH, there is no possibility of carry-over to the BUFFER register.
The value of the FFER register is output as a sign, and TEMP
The value of the register is newly taken into the BUFFER register (S6).

【0032】次にTEMPレジスタの値がFFHの場合
には(S5)、Cレジスタから出力される次回のデータ
に桁上りが発生する可能性があるので、BUFFERレ
ジスタの値を出力することができず、引き続き待機状態
となる(S7)。この時、TEMPレジスタにFFHが
何回格納されたかをカウントするSCカウンタの値を一
回カウントアップする。符号レジスタから出力されたデ
ータが、連続してFFHの場合には、BUFFERレジ
スタの出力は待機され、FFHがTEMPレジスタに格
納された回数分、SCカウンタは計数する。この状態
で、TEMPレジスタの値がFFHより小さい場合に
は、桁上りが発生しないので、BUFFERレジスタの
値を出力し、FFHをSCカウンタに計数された回数だ
け出力し、TEMPレジスタの値を新たにBUFFER
レジスタに格納するとともにSCカウンタをクリアす
る。TEMPレジスタの値がFFHよりも大きく、桁上
りが発生した場合には(S4)、BUFFERレジスタ
に対して桁上りが伝搬するので、BUFFERレジスタ
の値+1を出力し、00HをSCカウンタに計数された
回数だけ出力する。BUFFERレジスタには、桁上り
ビットを除いたTEMPレジスタの値を格納するととも
にSCカウンタをクリアする(S8)。
Next, when the value of the TEMP register is FFH (S5), the carry-over may occur in the next data output from the C register, so that the value of the BUFFER register can be output. Then, it is in a standby state (S7). At this time, the value of the SC counter for counting how many times FFH is stored in the TEMP register is counted up once. If the data output from the code register is continuously FFH, the output of the BUFFER register is on standby, and the SC counter counts the number of times FFH is stored in the TEMP register. In this state, if the value of the TEMP register is smaller than FFH, no carry occurs, so the value of the BUFFER register is output, FFH is output to the SC counter the number of times counted, and the value of the TEMP register is newly updated. BUFFER
Store in the register and clear the SC counter. When the value of the TEMP register is larger than FFH and a carry occurs (S4), since the carry is propagated to the BUFFER register, the value of the BUFFER register + 1 is output, and 00H is counted by the SC counter. Output as many times as possible. The value of the TEMP register excluding the carry bit is stored in the BUFFER register, and the SC counter is cleared (S8).

【0033】この図7の手順においても明らかな様に、
ステップS6におけるFFHのSC回出力時及びステッ
プS8における00HのSC回出力時のいずれの場合に
も、FFH又は00HのSC回出力が完了した後に、次
の符号化処理に進む。従って、FFH又は00HのSC
回出力中は、符号化処理が一時停止することになる。
As is clear from the procedure shown in FIG.
In both the case of outputting the FFH SC times in step S6 and the case of outputting the 00H SC times in step S8, the process proceeds to the next encoding process after the output of the FFH or 00H SC times is completed. Therefore, SC of FFH or 00H
During the round output, the encoding process is temporarily stopped.

【0034】[0034]

【発明が解決しようとしている課題】以上の桁上り待機
方式の符号器においては、出力する符号データに対し
て、桁上りが伝搬した場合に、符号化を中断し、符号を
出力していたので、リアルタイム処理(例えばFAX等
でセンサーで原稿を読み取りながら、何らかの手段で2
値化されたデータをそのまま符号器で符号化するこ
と。)ができず、原稿読み取りを中断するか、2値化さ
れたデータをメモリーに格納した後、符号化を行う必要
が生じるという欠点があった。そのため、符号化に時間
がかかったり、2値化されたデータを格納するためのメ
モリーが必要となっていた。
In the encoder of the carry-standby system described above, when carry is propagated to the output code data, the encoding is interrupted and the code is output. , Real-time processing (for example, while reading an original with a sensor by facsimile, etc.,
Encode the valued data as it is with the encoder. ) Cannot be performed, and it is necessary to interrupt reading of the original or to store the binarized data in the memory and then perform encoding. For this reason, encoding takes a long time, and a memory for storing binarized data is required.

【0035】本発明は、かかる事情に鑑みてなされたも
のであり、算術符号化におけるリアルタイム処理を可能
にした画像符号化装置及び方法を提供することを目的と
する。
The present invention has been made in view of such circumstances, and an object of the present invention is to provide an image encoding apparatus and method capable of real-time processing in arithmetic encoding.

【0036】また、本発明は算術符号を用いた符号化処
理における桁上り処理を、前段の符号化処理側に影響を
与えることなく、迅速、且つ、効率良く実行可能な画像
符号化装置及び方法を提供することを目的とする。
Further, the present invention provides an image encoding apparatus and method capable of performing a carry-up process in an encoding process using an arithmetic code quickly and efficiently without affecting a preceding encoding process side. The purpose is to provide.

【0037】また、本発明は前述の桁上り処理を、前段
の符号化処理の一時停止なしに、実行可能な画像符号化
装置及び方法を提供することを目的とする。
Another object of the present invention is to provide an image encoding apparatus and method capable of performing the above-mentioned carry processing without temporarily stopping the preceding encoding processing.

【0038】[0038]

【課題を解決するための手段】以上の目的を達成するた
めに、本発明による画像符号化装置は、算術符号に基づ
いて画像データを符号化し、値「0」及び「1」で構成
される符号データを出力する符号化手段と、符号データ
を所定ビット数毎にパラレルに出力し、且つ、桁上がり
があるか否かを示す1ビットの桁上がりデータを出力す
る出力手段と、前記出力手段から出力された所定ビット
の符号データの全ビットが値「1」であるかを判定し、
全ビットが値「1」であるか否かを示す1ビットの判定
データを出力する判定手段と、前記出力手段から出力さ
れた所定ビット数の符号データをパラレルにシフトする
ための直列接続された複数の符号ラッチからなる第1の
シフト手段手段と、前記出力手段から出力された桁上が
りデータを前記第1のシフト手段による符号データのパ
ラレルシフトに同期してシフトするための直列接続され
た複数のデータラッチからなる第2のシフト手段と、前
記判定手段から出力された判定データを前記第1のシフ
ト手段による符号データのパラレルシフトに同期してシ
フトするための直列接続された複数のデータラッチから
なる第3のシフト手段と、前記第2のシフト手段の各デ
ータラッチにラッチされた桁上がりデータおよび前記第
3のシフト手段の各データラッチにラッチされた判定デ
ータとに基づいて、前記第1のシフト手段の各符号ラッ
チにラッチされた符号データに桁上がり処理を行う桁上
がり処理手段と、前記第1のシフト手段によりシフトさ
れた符号データと前記第2のシフト手段によりシフトさ
れた桁上がりデータとを加算し、加算結果を確定された
符号データとして出力する加算手段とを有し、また、本
発明の画像符号化方法は、算術符号に基づいて画像デー
タを符号化し、値「0」及び「1」で構成される符号デ
ータを出力する符号化ステップと、符号データを所定ビ
ット数毎にパラレルに出力し、且つ、桁上がりがあるか
否かを示す1ビットの桁上がりデータを出力する出力ス
テップと、所定ビットの符号データの全ビットが値
「1」であるかを判定し、全ビットが値「1」であるか
否かを示す1ビットの判定データを出力する判定ステッ
プと、直列接続された複数の符号ラッチにより、所定ビ
ット数の符号データをパラレルにシフトする第1のシフ
トステップと、直列接続された複数の桁上がりラッチに
より、桁上がりデータを符 号データのパラレルシフトに
同期してシフトする第2のシフトステップと、直列接続
された複数の判定ラッチにより、判定データを符号デー
タのパラレルシフトに同期してシフトする第3のシフト
ステップと、各桁上がりラッチにラッチされた桁上がり
データおよび各判定ラッチにラッチされた判定データと
に基づいて、各符号ラッチにラッチされた符号データに
桁上がり処理を行う処理ステップと、前記複数の符号ラ
ッチによりシフトされた符号データと前記複数の桁上が
りラッチによりシフトされた桁上がりデータとを加算
し、加算結果を確定された符号データとして出力する加
算ステップとを有する。
In order to achieve the above object, an image coding apparatus according to the present invention is based on an arithmetic code.
And encodes image data, and consists of values "0" and "1"
Encoding means for outputting encoded data to be encoded, and encoded data
Is output in parallel for each predetermined number of bits, and carry
1-bit carry data indicating whether or not there is
Output means, and predetermined bits output from the output means.
It is determined whether all the bits of the sign data of the value is “1”,
1-bit determination indicating whether all bits have the value "1"
Determining means for outputting data; and
The encoded data of the specified number of bits in parallel
A plurality of code latches connected in series for
Shift means means, and the carry outputted from the output means is
The first shift means transfers the encoded data
Connected in series to shift in synchronization with the barrel shift
A second shift means comprising a plurality of data latches;
The determination data output from the determination means is stored in the first shift
In synchronization with the parallel shift of the code data by the
From multiple data latches connected in series to
And the respective data of the second shift means.
Data latched by the data latch and the
The determination data latched by each data latch of the shift means 3
Data of each code of the first shift means based on the
Carry out carry processing on code data latched
Shift processing means and the first shift means
And the shifted data by the second shifting means.
The added carry data, and the addition result is confirmed.
Adding means for outputting as coded data.
The image encoding method according to the present invention provides an image encoding method based on an arithmetic code.
And encodes the code data consisting of the values "0" and "1".
Encoding step for outputting data, and
Output in parallel for each number of bits and whether there is a carry
Output switch that outputs 1-bit carry data
Step and all bits of the code data of the specified bit are values
Judge whether it is "1" and check if all bits have the value "1"
Determination step for outputting 1-bit determination data indicating
And a plurality of code latches connected in series.
1st shift which shifts the code data of the number of bits in parallel.
Step and multiple carry latches connected in series.
More, a carry data to the parallel shift of the sign-data
A second shift step that shifts synchronously, and a series connection
The decision data is encoded by the plurality of decision latches
Third shift in synchronization with the parallel shift of the data
Step and carry latched by each carry latch
Data and the judgment data latched by each judgment latch
Based on the code data latched by each code latch.
A processing step of performing carry processing;
Code data shifted by the switch and the plurality of digits
Add with carry data shifted by latch
And outputs the addition result as fixed code data.
Calculation step.

【0039】[0039]

【実施例】以下に、本発明を好ましい実施例に基づいて
説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below based on preferred embodiments.

【0040】図8は本発明を適用した符号化器の構成図
である。この図8の符号化器を図1の符号器903に用
い、算術符号による画像符号化装置を構成する。
FIG. 8 is a block diagram of an encoder to which the present invention is applied. The encoder shown in FIG. 8 is used as the encoder 903 shown in FIG. 1 to constitute an image encoding apparatus using arithmetic codes.

【0041】201は16ビットのCレジスタ、202
は画像データの符号化に用いるパラメータの1つである
Current coding intervalを示
すデータを格納する16ビットのAレジスタであり、2
03、204は夫々Cレジスタ201、Aレジスタ20
2のビットシフトのためのバレルシフタである。205
はCT値を保持するためのCTレジスタであり、図8の
構成ではカウンタを用い減算動作を行っているが、本実
施例では入力されたCT値を保持するレジスタを用い
る。
201 is a 16-bit C register, 202
Is a 16-bit A register that stores data indicating Current coding interval, which is one of parameters used for encoding image data.
03 and 204 are C register 201 and A register 20 respectively.
This is a barrel shifter for shifting two bits. 205
Is a CT register for holding a CT value. In the configuration of FIG. 8, a subtraction operation is performed using a counter. In this embodiment, a register for holding an input CT value is used.

【0042】プライオリティエンコーダ206はAレジ
スタ202及びCTレジスタ205の出力を入力とし、
バレルシフタ203、204のシフト量を制御し、ま
た、CTアップデータ・ロジック211を制御してCT
レジスタ205の値を更新する。また、更に、ハイバイ
トレジスタ207、ローバイトレジスタ208を制御し
て、Cレジスタ201の格納しているデータの上位、下
位各1バイトの出力制御を行なう。209は桁上がり制
御回路である。
The priority encoder 206 receives the outputs of the A register 202 and the CT register 205 as inputs,
The shift amounts of the barrel shifters 203 and 204 are controlled, and the CT updater logic 211 is controlled to
The value of the register 205 is updated. Further, it controls the high byte register 207 and the low byte register 208 to control the output of the upper byte and the lower byte of the data stored in the C register 201. 209 is a carry control circuit.

【0043】Aレジスタ202の値は減算器212にお
いてLSZ発生器213からのLSZが減算され、その
減算結果はセレクタ214に入力される。また、セレク
タ214の他の入力としてLSZ発生器213からのL
SZが与えられる。セレクタ214は、着目画素と予測
画素の一致/不一致を表わす排他的ORゲート904の
出力に従って、2入力の一方を選択する。即ち、着目画
素と予測画素の一致時には減算器214からの出力(A
−LSZ)を選択し、また、不一致の時にはLSZ発生
器214からのLSZを選択し、Aレジスタ202に入
力され、Aレジスタの値が更新される。
The value of the A register 202 is subtracted from the LSZ from the LSZ generator 213 by a subtractor 212, and the result of the subtraction is input to a selector 214. Further, as another input of the selector 214, L from the LSZ generator 213 is used.
SZ is provided. The selector 214 selects one of the two inputs according to the output of the exclusive OR gate 904 indicating the match / mismatch between the target pixel and the prediction pixel. That is, when the target pixel and the predicted pixel match, the output from the subtractor 214 (A
-LSZ), and if they do not match, the LSZ from the LSZ generator 214 is selected, input to the A register 202, and the value of the A register is updated.

【0044】また、Cレジスタ201の値は加算器21
5において減算器212の出力(A−LSZ)と加算さ
れ、ゲート216に入力される。ゲート216は着目画
素と予測画素が不一致であったことを示す排他的ORゲ
ート904の出力に応じて、加算器215の出力をCレ
ジスタ201に入力する。これにより、Cレジスタの値
が更新される。
The value of the C register 201 is added to the value of the adder 21.
At 5, the sum is added to the output (A-LSZ) of the subtractor 212 and input to the gate 216. The gate 216 inputs the output of the adder 215 to the C register 201 according to the output of the exclusive OR gate 904 indicating that the target pixel and the prediction pixel do not match. As a result, the value of the C register is updated.

【0045】ところで、再正規化実行時におけるAレジ
スタの値Aは、1≦A≦7FFFHであるから、図10
に示すごとく、各Aの範囲に応じてシフトするビット数
は一意的に定まる。これは、「Aレジスタの各ビットで
最もMSB側に近いビット位置にある1を見つける」こ
とに帰結できる。従って、図9のようなプライオリティ
エンコーダ206を構成することによって、上記のビッ
ト位置を検出することができる。
By the way, the value A of the A register at the time of renormalization execution is 1 ≦ A ≦ 7FFFFH.
, The number of bits to be shifted according to the range of each A is uniquely determined. This can be attributed to "finding a 1 at a bit position closest to the MSB side in each bit of the A register". Therefore, by configuring the priority encoder 206 as shown in FIG. 9, the above-described bit position can be detected.

【0046】図9において、プライオリティエンコーダ
206は論理回路部509と16→4エンコーダ508
からなる。Aレジスタ202の各格納ビットはパラレル
にビット毎に取り出されインバータ502,504,5
06・・・及びアンドゲート503,505,506・
・・により構成される論理回路部509に入力される。
論理回路部509は、Aレジスタ202に格納されてい
る1のうちMSBに最も近いビット位置のものに対応し
たアンドゲート503,505,507・・・のみが、
ハイレベル出力を行なう様に構成されている。従って、
Aレジスタ202に「0101・・・」なるデータが格
納されている場合は、Aレジスタ202の2ビット目の
出力MSB−1に対応したアンドゲート503のみがハ
イレベル出力を行なう。各アンドゲート503,50
5,507・・・の出力は16→4エンコーダ508に
入力され、エンコーダ508からはビット位置を示す4
ビットデータが出力される。
In FIG. 9, the priority encoder 206 includes a logic circuit unit 509 and a 16 → 4 encoder 508.
Consists of Each stored bit of the A register 202 is taken out bit by bit in parallel and the inverters 502, 504, 5
06 and AND gates 503, 505, 506
Are input to the logic circuit unit 509 composed of.
The logic circuit unit 509 includes only AND gates 503, 505, 507,... Corresponding to the bit position closest to the MSB among the 1s stored in the A register 202,
It is configured to output high level. Therefore,
When the data “0101...” Is stored in the A register 202, only the AND gate 503 corresponding to the second bit output MSB-1 of the A register 202 outputs the high level. Each AND gate 503, 50
The output of 5,507... Is input to the 16 → 4 encoder 508, and the encoder 508 outputs 4 indicating the bit position.
Bit data is output.

【0047】図10に、再正規化時のAレジスタの値
と、Aレジスタ202をシフトする回数の対応を示す。
FIG. 10 shows the correspondence between the value of the A register at the time of renormalization and the number of times the A register 202 is shifted.

【0048】プライオリティエンコーダ206からのシ
フト数はバレルシフタ203、204に入力され、バレ
ルシフタ203、204はそのシフト数に従って、Cレ
ジスタ201、Aレジスタ202の内容を一度に1〜1
5ビット数分のシフトを実行する。
The number of shifts from the priority encoder 206 is input to the barrel shifters 203 and 204, and the barrel shifters 203 and 204 change the contents of the C register 201 and the A register 202 one to one at a time according to the shift numbers.
Execute a shift by 5 bits.

【0049】図11にバレルシフタ204とAレジスタ
202の構成を示す。尚、バレルシフタ203とCレジ
スタ201も同一構成である。
FIG. 11 shows the configuration of the barrel shifter 204 and the A register 202. The barrel shifter 203 and the C register 201 have the same configuration.

【0050】Aレジスタ202の格納している16ビッ
トデータはパラレルにバレルシフタ204に入力され
る。バレルシフタ204の下位15ビットには「0」が
入力されている。
The 16-bit data stored in the A register 202 is input to the barrel shifter 204 in parallel. “0” is input to the lower 15 bits of the barrel shifter 204.

【0051】プライオリティエンコーダ206からのシ
フト数はバレルシフタ204に入力され、バレルシフタ
204は、そのシフト数に応じて31ビット入力の内の
任意の連続した16ビットデータを選択し、出力する。
即ち、例えば、プライオリティエンコーダ206よりシ
フト数として「3」が入力されているとすると、バレル
シフタ204は31ビット入力の内、入力N27,N26
25・・・N12を選択し、その16ビットデータを出力
15〜S0にパラレル出力する。
The shift number from the priority encoder 206 is input to the barrel shifter 204, and the barrel shifter 204 selects and outputs any continuous 16-bit data from the 31-bit input according to the shift number.
That is, for example, if "3" is input as the shift number from the priority encoder 206, the barrel shifter 204 outputs the input N 27 , N 26 ,
Select N 25 ··· N 12, to parallel outputs the 16-bit data to the output S 15 to S 0.

【0052】バレルシフタ204からパラレル出力され
た16ビットデータは、Aレジスタ202にパラレルに
入力され、保持される。
The 16-bit data output in parallel from the barrel shifter 204 is input to the A register 202 in parallel and held.

【0053】従って、プライオリティエンコーダ206
からのシフト数に応じたビット数分のシフトが一度に実
行可能である。
Therefore, the priority encoder 206
The shift of the number of bits corresponding to the number of shifts from is possible at a time.

【0054】アップデイトロジック211は、プライオ
リティエンコーダ206からのシフト数、再正規化前の
CT値を入力し、出力バイト数および再正規化後のCT
値を出力する。
The update logic 211 receives the number of shifts from the priority encoder 206, the CT value before renormalization, the number of output bytes, and the CT value after renormalization.
Output the value.

【0055】図12に、アップデイトロジック211に
設けられた対応表を示す。シフト数(1〜15)、CT
値(1〜8)により、出力バイト数は0〜2となること
がわかる。この値は、図8の出力制御部210におい
て、0のときは出力しない、1のときはHIGHレジス
タ207の符号を出力、2のときはHIGHレジスタ2
07およびLOWレジスタ208の2バイトを出力する
ような制御を使用される。
FIG. 12 shows a correspondence table provided in the update logic 211. Shift number (1 to 15), CT
It can be seen that the number of output bytes is 0 to 2 depending on the value (1 to 8). This value is not output when the value is 0, output the sign of the HIGH register 207 when the value is 1, and output the HIGH register 2 when the value is 2 in the output control unit 210 of FIG.
Controls are used to output two bytes of 07 and LOW register 208.

【0056】また、アップデイトロジック211からC
Tレジスタ205に新CT値が出力され、CTレジスタ
205はその値を保持する。
Also, from the update logic 211 to C
The new CT value is output to the T register 205, and the CT register 205 holds that value.

【0057】この様にAレジスタ202内の複数ビット
の各ビット値をパラレルにモニタし、再正規化に際して
は、Aレジスタ202及びCレジスタ201の複数ビッ
トのシフトを一度に実行する。これにより、符号化すべ
き着目画素データと予測画素データとの一致/不一致、
及び、そのときのAレジスタの内容に拘らず、再正規化
処理に要する時間を一定とすることができ、従って、符
号化すべき着目画素データの入力リアルタイムな同期的
符号化が実行可能となる。
As described above, the bit values of the plurality of bits in the A register 202 are monitored in parallel, and when renormalization is performed, the plurality of bits of the A register 202 and the C register 201 are shifted at a time. Thereby, coincidence / mismatch between the target pixel data to be encoded and the prediction pixel data,
Also, regardless of the contents of the A register at that time, the time required for the re-normalization processing can be made constant, so that the input real-time synchronous encoding of the target pixel data to be encoded can be executed.

【0058】図13は図8における桁上り制御回路20
9の構成を示す図面であり、100〜104、110〜
114、120〜124、129はフリップ・フロップ
であり、105〜109、115〜118、125〜1
28はマルチプレクサまたはスイッチであり、131、
133、134、136、137、139、140、1
42、143はAND回路であり、132、135、1
38、141、144はインバータであり、130は図
8におけるハイバイトレジスタ207及びローバイトレ
ジスタ208に対応するレジスタであり、150は加算
器であり、160はFF判定回路である。点線で示され
る部分は、同様の回路が繰り返されていることを示す。
即ち、一点鎖線で囲った回路構成170が、必要に応じ
た数、直列に接続される。
FIG. 13 shows the carry control circuit 20 in FIG.
9 is a drawing showing the configuration of No. 9;
Reference numerals 114, 120 to 124, and 129 denote flip flops, and 105 to 109, 115 to 118, and 125 to 1
28 is a multiplexer or switch, 131,
133, 134, 136, 137, 139, 140, 1
42, 143 are AND circuits;
Reference numerals 38, 141, and 144 are inverters, 130 is a register corresponding to the high byte register 207 and the low byte register 208 in FIG. 8, 150 is an adder, and 160 is an FF determination circuit. A portion shown by a dotted line indicates that a similar circuit is repeated.
That is, as many circuit configurations 170 as are surrounded by alternate long and short dash lines are connected in series as needed.

【0059】上記構成において、その動作を以下順を追
って説明する。レジスタ130からは前述した符号化手
順に従って再正規化に同期して符号系列が出力される。
aが桁上りデータであり、bが桁上りを除く1ビット以
上のデータである。以下前述の説明と同様にbを8bi
tのデータとして説明を行う。
The operation of the above configuration will be described below in order. The register 130 outputs a code sequence in synchronization with the renormalization in accordance with the above-described coding procedure.
a is carry data, and b is one or more bits of data excluding carry. Hereinafter, b is set to 8 bi in the same manner as described above.
Description will be given as data of t.

【0060】フリップ・フロップ(F/F)100〜1
04、110〜114、120〜124、129は、再
正規化のタイミングに同期して、入力データをラッチす
る。したがって、再正規化のたびに、図面上、左から右
にデータがシフトされることになる。尚、回路構成17
0の繰り返し回数は、説明を簡略化する為に、5回とす
る。つまり、総シフト段数を5段として説明する。
Flip flop (F / F) 100-1
04, 110 to 114, 120 to 124, and 129 latch input data in synchronization with the renormalization timing. Therefore, each time re-normalization is performed, data is shifted from left to right on the drawing. The circuit configuration 17
The number of repetitions of 0 is set to 5 in order to simplify the description. That is, a description will be given assuming that the total number of shift stages is five.

【0061】また、再正規化のたびにレジスタ130か
ら出力される符号化系列をC3H,BAH,FFH,F
FH,1AEH,……として説明を行う。
The encoded sequence output from the register 130 every time the re-normalization is performed is represented by C3H, BAH, FFH, F
FH, 1AEH,...

【0062】符号化に先立ち、まずフリップ・フロップ
(F/F)100^104をリセットする。
Prior to encoding, first, flip-flop (F / F) 100 ^ 104 is reset.

【0063】第1回目の再正規化により、レジスタ13
0の出力はC3Hであり、桁上りがないために、出力a
は0であり、また出力bはC3Hとなる。出力bの値は
F/F120にラッチされる。出力bの値がFFHと等
しいかどうかを判定するFF判定回路160には、C3
Hが入力されているので、FF判定回路160出力は0
となり、その値がF/F100にラッチされる。また出
力aが0であるので、AND回路131の出力は0とな
り、スイッチ109はL側に倒れ、値0がF/F110
にラッチされる。
By the first renormalization, the register 13
Since the output of 0 is C3H and there is no carry, the output a
Is 0, and the output b is C3H. The value of the output b is latched by the F / F 120. The FF determination circuit 160 that determines whether the value of the output b is equal to FFH has C3
Since H is input, the output of the FF determination circuit 160 is 0
And the value is latched by the F / F 100. Further, since the output a is 0, the output of the AND circuit 131 becomes 0, the switch 109 is tilted to the L side, and the value 0 becomes the F / F 110
Latched.

【0064】第2回目の再正規化により、レジスタ13
0の出力はBAHとなり、従って、出力aは0、出力b
はBAHとなる。第1回目と同様の動作によって、F/
F100の出力は0、F/F110の出力は0、F/F
120の出力はBAHとなる。またシフト動作により、
F/F101の出力は0、F/F111の出力は0、F
/F121の出力はC3Hとなる。
By the second renormalization, the register 13
The output of 0 is BAH, so output a is 0, output b
Becomes BAH. By the same operation as the first time, F /
The output of F100 is 0, the output of F / F110 is 0, F / F
The output of 120 is BAH. Also, by the shift operation,
The output of the F / F 101 is 0, the output of the F / F 111 is 0,
The output of / F121 is C3H.

【0065】第3回目の再正規化により、レジスタ13
0の出力はFFHとなり、従って、出力aは0、出力b
はFFHとなる。出力bがFFHなので、FF判定回路
160でFFHと等しいと判定され、FF判定回路16
0の出力は1となり、その値がF/F100にラッチさ
れる。各出力は以下の様になる。F/F100の出力は
1、F/F110の出力は0、F/F120の出力はF
FHとなる。また、F/F101の出力は0、F/F1
11の出力は0、F/F121の出力はHAH、そして
F/F102の出力は0、F/F112の出力は0、F
/F122の出力はC3Hとなる。
By the third renormalization, the register 13
The output of 0 is FFH, so output a is 0, output b
Becomes FFH. Since the output b is FFH, the FF determination circuit 160 determines that the output b is equal to FFH.
The output of 0 becomes 1 and its value is latched by the F / F 100. Each output is as follows. The output of the F / F 100 is 1, the output of the F / F 110 is 0, and the output of the F / F 120 is F
FH. The output of the F / F 101 is 0, and the F / F 1
The output of 11 is 0, the output of F / F 121 is HAH, the output of F / F 102 is 0, the output of F / F 112 is 0, F
The output of / F122 is C3H.

【0066】第4回目の再正規化により、レジスタ13
0の出力はFFHとなり、従って、出力aは0、出力b
はFFHとなる。同様にして各出力は以下の様になる。
F/F100の出力は1、F/F110の出力は0、F
/F120の出力はFFHとなる。また、F/F101
の出力は1、F/F111の出力は0、F/F121の
出力はFFH、また、F/F102の出力は0、F/F
112の出力は0、F/F122の出力はBAH、そし
て、F/F103の出力は0、F/F113の出力は
0、F/F123の出力はC3Hとなる。
By the fourth renormalization, the register 13
The output of 0 is FFH, so output a is 0, output b
Becomes FFH. Similarly, each output is as follows.
The output of the F / F 100 is 1, the output of the F / F 110 is 0,
The output of / F120 is FFH. Also, F / F101
Is 1, the output of the F / F 111 is 0, the output of the F / F 121 is FFH, the output of the F / F 102 is 0, the F / F
The output of 112 is 0, the output of F / F 122 is BAH, the output of F / F 103 is 0, the output of F / F 113 is 0, and the output of F / F 123 is C3H.

【0067】第5回目の再正規化により、レジスタ13
0からは1AEHが出力される。即ち、桁上りが発生し
たので、レジスタ130の出力aは1、出力bはAEH
となる。このときF/F100、101の出力はそれぞ
れ1であるので、AND回路131、134の出力は0
となり、F/F110、111に0がラッチされる。ま
た、F/F100、101の出力は1であり、F/F1
02の出力は0であるので、レジスタ130からの桁上
り信号aがAND回路133、136、137を通して
伝搬し、スイッチ116はH側に倒れ、F/F112に
1がラッチされる。また、AND回路133、136の
出力は1であるので、スイッチ105、106はH側に
倒れ、F/F101、102は0をラッチする。同様に
スイッチ125、126はH側に倒れ、F/F121、
122は00Hをラッチする。従って、各出力は以下の
様になる。F/F100の出力は0、F/F110の出
力は0、F/F120の出力はAEH、F/F101の
出力は0、F/F111の出力は0、F/F121の出
力は00H、F/F102の出力は0、F/F112の
出力は1、F/F122の出力は00H、F/F103
の出力は0、F/F113の出力は0、F/F123の
出力はBAH、F/F104の出力は0、F/F114
の出力は0、F/F124の出力はC3H。
In the fifth renormalization, the register 13
From 0, 1AEH is output. That is, since a carry has occurred, the output a of the register 130 is 1 and the output b is AEH
Becomes At this time, since the outputs of the F / Fs 100 and 101 are each 1, the outputs of the AND circuits 131 and 134 are 0.
And 0 is latched in the F / Fs 110 and 111. The outputs of the F / Fs 100 and 101 are 1, and the F / F 1
Since the output of 02 is 0, the carry signal a from the register 130 propagates through the AND circuits 133, 136, and 137, the switch 116 falls to the H side, and 1 is latched by the F / F 112. Since the outputs of the AND circuits 133 and 136 are 1, the switches 105 and 106 fall to the H side, and the F / Fs 101 and 102 latch 0. Similarly, the switches 125 and 126 fall to the H side, and the F / F 121,
122 latches 00H. Therefore, each output is as follows. The output of the F / F 100 is 0, the output of the F / F 110 is 0, the output of the F / F 120 is AEH, the output of the F / F 101 is 0, the output of the F / F 111 is 0, the output of the F / F 121 is 00H, The output of F102 is 0, the output of F / F112 is 1, the output of F / F122 is 00H, and F / F103.
Is 0, the output of the F / F 113 is 0, the output of the F / F 123 is BAH, the output of the F / F 104 is 0, and the F / F 114
Is 0 and the output of F / F 124 is C3H.

【0068】次の再正規化により、F/F129の出力
はC3H、F/F114の出力は0となり、桁上りがな
いので、加算器150の出力は、C3Hとなり、確定し
た符号出力として出力される。次の再正規化により、F
/F129の出力はBAH、F/F114の出力は1と
なり、桁上りがあるので、加算器150の出力は、BB
Hとなり、確定した符号出力として出力される。次の再
正規化により、F/F129出力は00H、F/F11
4の出力は0となり、桁上りがないので、加算器150
の出力は、00Hとなり、確定した符号出力として出力
される。次の再正規化により、F/F129の出力は0
0H、F/F114の出力は0となり、桁上りがないの
で、加算器150の出力は、D0Hとなり、確定した符
号出力として出力される。
By the next re-normalization, the output of the F / F 129 becomes C3H and the output of the F / F 114 becomes 0, and there is no carry. Therefore, the output of the adder 150 becomes C3H and is output as a fixed code output. You. By the following renormalization, F
The output of / F129 is BAH, the output of F / F114 is 1 and there is a carry, so the output of adder 150 is BB
H, which is output as a fixed code output. By the next renormalization, the output of the F / F 129 becomes 00H, and the F / F 11
4 is 0 and there is no carry, so the adder 150
Is 00H and is output as a fixed code output. By the next renormalization, the output of F / F 129 becomes 0
Since the outputs of 0H and the F / F 114 are 0 and there is no carry, the output of the adder 150 is D0H and is output as a fixed code output.

【0069】以下同様にして動作を行い、確定した符号
出力を出力する。
Thereafter, the operation is performed in the same manner, and the determined code output is output.

【0070】図13の実施例において、算術符号器の出
力を正論理として説明を行ったが、負論理であっても同
様の目的が達せられることはいうまでもない。また、マ
ルチプレクサ(スイッチ)、AND、INVERTER
より構成される論理回路も、図13の構成に限らず、他
の論理回路によって同一の機能を実現できる。
In the embodiment of FIG. 13, the output of the arithmetic encoder has been described as positive logic, but it is needless to say that the same purpose can be achieved even with negative logic. Multiplexer (switch), AND, INVERTER
The logic circuit configured is not limited to the configuration in FIG. 13, and the same function can be realized by another logic circuit.

【0071】以上説明した如く、所定ビット数(本例で
は8ビット)に区切って順次発生される符号データを複
数保持しておき、もし、桁上りが生じた場合には、保持
されている複数の符号データによって、その桁上りを即
座に吸収するものである。従って、桁上りの処理が、特
別な休止動作等を必要とせずに、迅速に実行できる。よ
って、この様な桁上り処理を採用することにより、前段
の符号化処理が桁上り処理に影響されずに、効率良く実
行可能となる。
As described above, a plurality of code data sequentially generated in a predetermined number of bits (8 bits in this example) are stored, and if a carry occurs, the stored plurality of code data is stored. , The carry is immediately absorbed. Therefore, carry-up processing can be performed quickly without requiring any special pause operation or the like. Therefore, by adopting such a carry process, the preceding encoding process can be executed efficiently without being affected by the carry process.

【0072】また、以上の実施例により、算術符号器出
力における待機処理を行う場合において、FFHの符号
データの発生回数をカウントするSCカウンタを不要に
することができる。
Further, according to the above embodiment, when performing the standby process at the output of the arithmetic encoder, the SC counter for counting the number of occurrences of the FFH code data can be eliminated.

【0073】(他の実施例)図14に桁上り処理回路2
09の他の実施例を示す。410〜414、420〜4
24、429はフリップ・フロップであり、409、4
15〜418、425〜428はマルチプレクサまたは
スイッチであり、431、433、434、436、4
37、439、440、441、443、444はAN
Dであり、432、435、438、442、445は
INVERTERであり、430は図8におけるハイバ
イトレジスタ207及びローバイトレジスタ208に対
応するレジスタであり、450は加算器であり、460
〜464はFF判定回路である。図中点線で示される部
分は、同様の回路が繰り返されていることを示す。即
ち、一点鎖線で囲った回路構成470が必要に応じた
数、直列に接続される。
(Other Embodiment) FIG. 14 shows a carry processing circuit 2
09 shows another embodiment. 410-414, 420-4
24, 429 are flip-flops, and 409, 4
15 to 418, 425 to 428 are multiplexers or switches, and 431, 433, 434, 436, 4
37, 439, 440, 441, 443 and 444 are AN
D, 432, 435, 438, 442, and 445 are INVERTER, 430 is a register corresponding to the high byte register 207 and the low byte register 208 in FIG. 8, 450 is an adder, 460
Reference numerals 464 to 464 denote FF determination circuits. The portion indicated by the dotted line in the figure indicates that the same circuit is repeated. That is, the required number of circuit configurations 470 surrounded by a chain line are connected in series.

【0074】図13の実施例との相違は、レジスタ43
0の出力データがFFHであるか否か判定するFF判定
回路を、各フリップフロップ421〜424の符号デー
タ出力に設けたことにあるが、図13の説明で使用した
前提と手順を用いて説明を行うことによって、その相違
を明らかにしていく。
The difference from the embodiment of FIG.
An FF determination circuit for determining whether the output data of 0 is FFH is provided in the code data output of each of the flip-flops 421 to 424. The description will be made using the premise and procedure used in the description of FIG. To make the difference clear.

【0075】第1回目の再正規化により、レジスタ43
0の出力はC3Hであり、従って、レジスタ430の出
力aは、桁上りがないために0、出力bはC3Hとな
る。出力bの値はF/F420にラッチされる。AND
回路431出力は0なので、スイッチ409はL側に倒
れ、F/F410には0がラッチされる。
The first re-normalization causes the register 43
The output of 0 is C3H, so the output a of the register 430 is 0 because there is no carry, and the output b is C3H. The value of the output b is latched by the F / F 420. AND
Since the output of the circuit 431 is 0, the switch 409 falls to the L side, and 0 is latched in the F / F 410.

【0076】第2回目の再正規化により、レジスタ43
0の出力はBAHとなり、従って出力aは0、出力bは
BAHとなる。第1回目と同様の動作によって、F/F
410の出力は0、F/F420の出力はBAHとな
る。またシフト動作により、F/F411の出力は0、
F/F421の出力はC3Hとなる。
The register 43 is re-normalized by the second renormalization.
An output of 0 is BAH, so output a is 0 and output b is BAH. By the same operation as the first time, F / F
The output of 410 is 0, and the output of F / F 420 is BAH. Also, the output of the F / F 411 becomes 0 due to the shift operation,
The output of the F / F 421 is C3H.

【0077】第3回目の再正規化により、レジスタ43
0の出力はFFHとなり、従って、出力aは0、出力b
はFFHとなる。各出力は以下のようになる。F/F4
10の出力は0、F/F420の出力はFFH、F/F
411の出力は0、F/F421の出力はBAH、F/
F412の出力は0、F/F422の出力はC3H。
In the third renormalization, the register 43
The output of 0 is FFH, so output a is 0, output b
Becomes FFH. Each output is as follows. F / F4
Output of 10 is 0, output of F / F420 is FFH, F / F
The output of 411 is 0, the output of F / F 421 is BAH,
The output of F412 is 0, and the output of F / F422 is C3H.

【0078】第4回目の再正規化により、レジスタ43
0の出力はFFHとなり、従って、出力aは0、出力b
はFFHとなる。各出力は以下のようになる。F/F4
10の出力は0、F/F420の出力はFFH、F/F
411の出力は0、F/F421の出力はFFH、F/
F412の出力は0、F/F422の出力はBAH、F
/F413の出力は0、F/F423の出力はC3H。
In the fourth renormalization, the register 43
The output of 0 is FFH, so output a is 0, output b
Becomes FFH. Each output is as follows. F / F4
Output of 10 is 0, output of F / F420 is FFH, F / F
The output of 411 is 0, the output of F / F 421 is FFH,
The output of F412 is 0, the output of F / F422 is BAH,
The output of / F413 is 0, and the output of F / F423 is C3H.

【0079】第5回目の再正規化により、レジスタ43
0からは1AEHが出力される。即ち、桁上りが発生し
たので、レジスタ430出力aは1、出力bはAEHと
なる。このとき、F/F420、421の出力はFFH
となっているので、F/F420、421の出力が夫々
FFHと等しいかどうかを判定するFF判定回路46
0、461の出力は1となる。また、出力aが1である
ので、AND回路433、436の出力も1となり、ス
イッチ425、426はH側に接続され、F/F42
1、422には0がラッチされる。また、F/F422
にはBAHがラッチされていたので、FF判定回路46
2の出力は0となり、従って、AND回路437の出力
は1となり、1がF/F412にラッチされる。従っ
て、各出力は以下のようになる。F/F410の出力は
0、F/F420の出力はAEH、F/F411の出力
は0、F/F421の出力は00H、F/F412の出
力は1、F/F422の出力は00H、F/F413の
出力は0、F/F423の出力はBAH、F/F414
の出力は0、F/F424の出力はC3H。
In the fifth renormalization, the register 43
From 0, 1AEH is output. That is, since the carry has occurred, the output a of the register 430 becomes 1 and the output b becomes AEH. At this time, the outputs of the F / Fs 420 and 421 are FFH
Therefore, the FF determination circuit 46 that determines whether the outputs of the F / Fs 420 and 421 are equal to FFH, respectively.
The outputs of 0 and 461 become 1. Also, since the output a is 1, the outputs of the AND circuits 433 and 436 also become 1, and the switches 425 and 426 are connected to the H side, and the F / F 42
0 is latched in 1,422. Also, F / F422
Since the BAH is latched in the
The output of 2 becomes 0, and the output of the AND circuit 437 becomes 1, and 1 is latched by the F / F 412. Therefore, each output is as follows. The output of the F / F 410 is 0, the output of the F / F 420 is AEH, the output of the F / F 411 is 0, the output of the F / F 421 is 00H, the output of the F / F 412 is 1, the output of the F / F 422 is 00H, and the F / F The output of F413 is 0, the output of F / F423 is BAH, and the output of F / F414.
Is 0 and the output of F / F 424 is C3H.

【0080】次の再正規化により、F/F429の出力
はC3H、F/F414出力は0となり、桁上りがない
ので、加算器450の出力は、C3Hとなり、確定した
符号出力として出力される。次の再正規化により、F/
F429の出力はBAH、F/F414の出力は1とな
り、桁上りがあるので、加算器450の出力はBBHと
なり、確定した符号出力として出力される。
By the next re-normalization, the output of the F / F 429 becomes C3H and the output of the F / F 414 becomes 0, and there is no carry. Therefore, the output of the adder 450 becomes C3H and is output as a fixed code output. . By the following renormalization, F /
The output of F429 is BAH, the output of F / F414 is 1, and there is a carry, so the output of adder 450 is BBH, and is output as a fixed code output.

【0081】次の再正規化により、F/F429の出力
は00H、F/F414の出力は0となり、桁上りがな
いので、加算器450出力は00Hとなり確定した符号
出力として出力される。次の再正規化により、F/F4
29の出力は00H、F/F414の出力は0となり、
桁上りがないので、加算器の450の出力は00Hとな
り、確定した符号出力として出力される。
By the next re-normalization, the output of the F / F 429 becomes 00H and the output of the F / F 414 becomes 0. Since there is no carry, the output of the adder 450 becomes 00H and is output as a fixed code output. By the following renormalization, F / F4
The output of 29 is 00H, the output of F / F 414 is 0,
Since there is no carry, the output of the adder 450 becomes 00H and is output as a fixed code output.

【0082】以下同様にして、動作を行い、確定した符
号出力を出力する。
Thereafter, the operation is performed in the same manner, and the determined code output is output.

【0083】以上の様に、算術符号により出力された符
号データ系列をシフトレジスタにより複数段遅延させ、
遅延された各符号データ系列により桁上り情報と更新用
符号データを生成する手段を設けることによって、桁上
りを遅延されている符号データ系列によって吸収するの
で桁上り処理を待ち時間なしに実行でき、従って、リア
ルタイムで算術符号化を実行することができる。
As described above, the code data sequence output by the arithmetic code is delayed by a plurality of stages by the shift register.
By providing a means for generating carry information and update code data by each delayed code data sequence, the carry is absorbed by the delayed code data sequence, so that carry processing can be performed without waiting time, Therefore, arithmetic coding can be performed in real time.

【0084】そして、符号データ系列中のFFHをカウ
ントするSCカウンタが不要になったので、算術符号器
を止めることなく、桁上り処理が行われた符号系列を得
ることができる。従って、算術符号器を止める必要がな
くなったので、算術符号器に入力されるデータ(例えば
2値画像データ)をリアルタイムで符号化することがで
きる。
Since the SC counter for counting the FFH in the code data sequence is not required, a code sequence on which carry processing has been performed can be obtained without stopping the arithmetic coder. Therefore, since it is not necessary to stop the arithmetic encoder, data (for example, binary image data) input to the arithmetic encoder can be encoded in real time.

【0085】また、算術符号器を入力データに同期する
回路構成で実現できるので、算術符号器の設計が容易
に、かつ、簡略化できる。
Further, since the arithmetic encoder can be realized by a circuit configuration synchronized with the input data, the design of the arithmetic encoder can be easily and simplified.

【0086】以上本発明を好ましい実施例構成を用いて
説明したが、本発明はこの実施例構成に限定されるもの
ではなく、クレームの記載の範囲内で種々の変形、変更
が可能であることは言う迄もない。
Although the present invention has been described using the preferred embodiment, the present invention is not limited to this embodiment, and various modifications and changes can be made within the scope of the claims. Needless to say.

【0087】[0087]

【発明の効果】以上説明した様に本発明によると、算術
符号に基づいて符号化され、所定ビット毎に順次出力さ
れる複数の符号データを複数のラッチによりシフトし、
ラッチされている複数の符号データに対して桁上がり処
理を行うので、桁上がり処理時にそれ迄待機していた複
数の符号データを出力する如くの処理が不要となるの
で、その出力処理時に前段の符号化処理を一時停止する
必要もなくなり、従って、符号データの順次出力にリア
ルタイムに桁上がり処理が実行でき、結果として、算術
符号に基づく符号化動作を高速に実行可能となる。
As described above, according to the present invention, a plurality of code data coded based on arithmetic codes and sequentially output for each predetermined bit are shifted by a plurality of latches.
Since carry processing is performed on a plurality of latched code data, it is not necessary to output a plurality of code data that had been waiting up to the time of carry processing. There is no need to temporarily stop the encoding process. Therefore, carry-out processing can be executed in real time for sequential output of encoded data, and as a result, an encoding operation based on an arithmetic code can be executed at high speed.

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

【図1】算術符号を用いた符号化回路の構成例を示す
図、
FIG. 1 is a diagram showing a configuration example of an encoding circuit using an arithmetic code;

【図2】算術符号による符号化手順を示すフローチャー
ト図、
FIG. 2 is a flowchart showing an encoding procedure using an arithmetic code;

【図3】算術符号における再正規化の手順を示すフロー
チャート図、
FIG. 3 is a flowchart showing a procedure of renormalization in an arithmetic code;

【図4】再正規化の動作を示す図、FIG. 4 is a diagram showing an operation of renormalization.

【図5】再正規化の動作を示す図、FIG. 5 is a diagram showing an operation of renormalization.

【図6】算術符号における桁上り処理のための構成例を
示す図、
FIG. 6 is a diagram showing a configuration example for carry processing in an arithmetic code;

【図7】桁上り処理の手順を示すフローチャート図、FIG. 7 is a flowchart showing the procedure of carry processing;

【図8】本発明が適用された算術符号回路の構成例を示
す図、
FIG. 8 is a diagram showing a configuration example of an arithmetic coding circuit to which the present invention is applied;

【図9】プライオリティエンコーダの構成例を示す図、FIG. 9 is a diagram showing a configuration example of a priority encoder;

【図10】再正規化のためのシフト数を示す図、FIG. 10 is a diagram showing shift numbers for renormalization;

【図11】パレルシフタとAレジスタの構成を示す図、FIG. 11 is a diagram showing a configuration of a parallel shifter and an A register.

【図12】CTレジスタに保持される値を示す図、FIG. 12 is a diagram showing values held in a CT register;

【図13】本発明による桁上り制御回路の構成例を示す
図、
FIG. 13 is a diagram showing a configuration example of a carry control circuit according to the present invention;

【図14】本発明による桁上り制御回路の他の構成例を
示す図。
FIG. 14 is a diagram showing another configuration example of the carry control circuit according to the present invention.

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

130 レジスタ 120 フリップフロップ 150 加算器 160 FF判定回路 130 register 120 flip-flop 150 adder 160 FF decision circuit

フロントページの続き (58)調査した分野(Int.Cl.7,DB名) H04N 1/41 - 1/419 H03M 7/40 H04N 7/24 Continuation of the front page (58) Field surveyed (Int.Cl. 7 , DB name) H04N 1/41-1/419 H03M 7/40 H04N 7/24

Claims (16)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】算術符号に基づいて画像データを符号化
し、値「0」及び「1」で構成される符号データを出力
する符号化手段と、 符号データを所定ビット数毎にパラレルに出力し、且
つ、桁上がりがあるか否かを示す1ビットの桁上がりデ
ータを出力する出力手段と、 前記出力手段から出力された所定ビットの符号データの
全ビットが値「1」であるかを判定し、全ビットが値
「1」であるか否かを示す1ビットの判定データを出力
する判定手段と、 前記出力手段から出力された所定ビット数の符号データ
をパラレルにシフトするための直列接続された複数の符
号ラッチからなる第1のシフト手段手段と、 前記出力手段から出力された桁上がりデータを前記第1
のシフト手段による符号データのパラレルシフトに同期
してシフトするための直列接続された複数のデータラッ
チからなる第2のシフト手段と、 前記判定手段から出力された判定データを前記第1のシ
フト手段による符号データのパラレルシフトに同期して
シフトするための直列接続された複数のデータラッチか
らなる第3のシフト手段と、 前記第2のシフト手段の各データラッチにラッチされた
桁上がりデータおよび前記第3のシフト手段の各データ
ラッチにラッチされた判定データとに基づいて、前記第
1のシフト手段の各符号ラッチにラッチされた符号デー
タに桁上がり処理を行う桁上がり処理手段と、 前記第1のシフト手段によりシフトされた符号データと
前記第2のシフト手段によりシフトされた桁上がりデー
タとを加算し、加算結果を確定された符号データとして
出力する加算手段とを有することを特徴とする画像符号
化装置。
An image data is encoded based on an arithmetic code.
And outputs code data composed of values “0” and “1”
Encoding means for outputting encoded data in parallel for each predetermined number of bits, and
One-bit carry data indicating whether there is a carry
Output means for outputting data, and code data of predetermined bits output from the output means.
It is determined whether all bits have the value “1”, and all bits have the value
Outputs 1-bit judgment data indicating whether it is "1"
Determining means for performing the determination, and code data of a predetermined number of bits output from the output means.
Characters connected in series to shift
A first shift means comprising a signal latch; and a carry data outputted from the output means.
Synchronized with the parallel shift of the code data by the shift means
Multiple data latches connected in series for
A second shift means comprising a switch and the determination data outputted from the determination means.
In synchronization with the parallel shift of the code data by the shift means.
Multiple data latches connected in series to shift
A third shift means, and a data latch of each of the second shift means.
Carry data and each data of the third shift means
Based on the determination data latched by the latch,
Code data latched in each code latch of the first shift means.
Carry processing means for performing carry processing on the data, and code data shifted by the first shift means.
The carry data shifted by the second shift means.
And add the result to the fixed code data.
Image code having output adding means
Device.
【請求項2】 請求項1に記載の画像符号化装置におい
て、前記桁上がり処理手段は、前記第1のシフト手段の各符
号ラッチにラッチされている全ビットが値「1」である
符号データに桁上がり処理を行うことを特徴とする画像
符号化装置。
2. The image encoding apparatus according to claim 1, wherein said carry processing means includes a code for each code of said first shift means.
All bits latched in the signal latch have the value "1".
Image characterized by performing carry processing on coded data
Encoding device.
【請求項3】 請求項に記載の画像符号化装置におい
て、前記第1のシフト手段の1段目の符号ラッチに全ビット
が値「1」の符号データ がラッチされた後に、前記出力
手段から桁上がりがあることを示す桁上がりデータが出
力された場合、前記桁上がり処理手段は、前記第1のシ
フト手段の2段目の符号ラッチに全ビットが値「0」の
符号データをラッチせしめ、且つ、2段目の符号ラッチ
に対応する前記第2のシフト手段のデータラッチに桁上
がりがあることを示す桁上がりデータをラッチせしめる
ことを特徴とする画像符号化装置。
3. The image encoding apparatus according to claim 2 , wherein all bits are stored in a first-stage code latch of said first shift means.
After the sign data having the value “1” is latched,
Means carry data indicating that there is carry
When the force is applied, the carry processing means performs the first
All bits of the value “0” are stored in the second-stage code latch of the shift means.
Code data is latched and the second-stage code latch
In the data latch of the second shift means corresponding to
Latch carry data indicating that there is a bite
An image encoding device, characterized in that:
【請求項4】 請求項に記載の画像符号化装置におい
て、全ビットが値「1」の符号データがラッチされた前記第
1のシフト手段の符号ラッチの前段の符号ラッチに対応
する前記第2のシフト手段のデータラッチに桁上がりデ
ータがラッチされた場合、前記桁上がり処理手段は、全
ビットが値「1」の符号データがラッチされた前記第1
のシフト手段の符号ラッチに全ビットが値「0」の符号
データをラッチせしめ、且つ、対応する前記第2のシフ
ト手段のデータラッチに桁上がりがあることを示す桁上
がりデータをラッチせしめることを特徴とする画像符号
化装置。
4. The image encoding apparatus according to claim 2 , wherein the code data in which all the bits have a value of “1” are latched.
Corresponds to the code latch preceding the code latch of the 1 shift means
The carry latch into the data latch of the second shift means.
When the data is latched, the carry processing means
The first bit in which the sign data having the bit value “1” is latched;
Sign of all bits in the sign latch of the shift means
Latching data and corresponding to the second shift
Carry indicating that there is a carry in the data latch of the port means
Image code characterized by latching data
Device.
【請求項5】算術符号に基づいて画像データを符号化
し、値「0」及び「1」で構成される符号データを出力
する符号化手段と、 符号データを所定ビット数毎にパラレルに出力し、且
つ、桁上がりがあるか否かを示す1ビットの桁上がりデ
ータを出力する出力手段と、 前記出力手段から出力された所定ビット数の符号データ
をパラレルにシフトするための直列接続された複数の符
号ラッチからなる第1のシフト手段手段と、 前記出力手段から出力された桁上がりデータを前記第1
のシフト手段による符号データのパラレルシフトに同期
してシフトするための直列接続された複数のデータラッ
チからなる第2のシフト手段と、 前記第1のシフト手段の複数の符号ラッチの夫々にラッ
チされた所定ビットの符号データの全ビットが値「1」
であるかを判定する複数の判定手段と、 前記第2のシフト手段の各データラッチにラッチされた
桁上がりデータおよび前記複数の判定手段の判定結果と
に基づいて、前記第1のシフト手段の各符号ラッチにラ
ッチされた符号データに桁上がり処理を行う桁上がり処
理手段と、 前記第1のシフト手段によりシフトされた符号データと
前記第2のシフト手段によりシフトされた桁上がりデー
タとを加算し、加算結果を確定された符号データ として
出力する加算手段とを有することを特徴とする画像符号
化装置。
5. Encoding image data based on an arithmetic code
And outputs code data composed of values “0” and “1”
Encoding means for outputting encoded data in parallel for each predetermined number of bits, and
One-bit carry data indicating whether there is a carry
Output means for outputting data, and code data of a predetermined number of bits output from the output means.
Characters connected in series to shift
A first shift means comprising a signal latch; and a carry data outputted from the output means.
Synchronized with the parallel shift of the code data by the shift means
Multiple data latches connected in series for
A second shift means comprising a latch and a plurality of code latches of the first shift means.
All the bits of the code data of the specified bits are “1”.
And a plurality of determination means for determining whether or not the data is latched by each data latch of the second shift means.
Carry data and the determination results of the plurality of determination means;
On the basis of the above, each code latch of the first shift means is latched.
Carry processing that performs carry processing on touched code data
And code data shifted by the first shift means.
The carry data shifted by the second shift means.
Adding the data, as determined code data addition result
Image code having output adding means
Device.
【請求項6】 請求項5に記載の画像符号化装置におい6. The image coding apparatus according to claim 5, wherein
て、hand, 前記桁上がり処理手段は、前記第1のシフト手段の各符The carry processing means is provided with each symbol of the first shift means.
号ラッチにラッチされている全ビットが値「1」であるAll bits latched in the signal latch have the value "1".
符号データに桁上がり処理を行うことを特徴とする画像Image characterized by performing carry processing on coded data
符号化装置。Encoding device.
【請求項7】 請求項6に記載の画像符号化装置におい7. The image coding apparatus according to claim 6, wherein
て、hand, 前記第1のシフト手段の1段目の符号ラッチに全ビットAll bits are stored in the first stage code latch of the first shift means.
が値「1」の符号データがラッチされた後に、前記出力After the sign data having the value “1” is latched,
手段から桁上がりがあることを示す桁上がりデータが出Means carry data indicating that there is carry
力された場合、前記桁上がり処理手段は、前記第1のシWhen the force is applied, the carry processing means performs the first
フト手段の2段目の符号ラッチに全ビットが値「0」のAll bits of the value “0” are stored in the second-stage code latch of the shift means.
符号データをラッチせしめることを特徴とする画像符号Image code characterized by latching code data
化装置。Device.
【請求項8】 請求項6に記載の画像符号化装置におい8. An image encoding apparatus according to claim 6, wherein
て、hand, 全ビットが値「1」の符号データがラッチされた前記第The code data in which all the bits have the value “1” are latched.
1のシフト手段の符号ラッチの前段の符号ラッチに対応Corresponds to the code latch preceding the code latch of the 1 shift means
する前記第2のシフト手段のデータラッチに桁上がりデThe carry latch into the data latch of the second shift means.
ータがラッチされた場合、前記桁上がり処理手段は、全When the data is latched, the carry processing means
ビットが値「1」の符号データがラッチされた前記第1The first bit in which the sign data having the bit value “1” is latched;
のシフト手段の符号ラッチに全ビットが値「0」の符号Sign of all bits in the sign latch of the shift means
データをラッチせしめることを特徴とする画像符号化装Image coding apparatus characterized by latching data
置。Place.
【請求項9】 算術符号に基づいて画像データを符号化9. Encoding image data based on an arithmetic code
し、値「0」及び「1」で構成される符号データを出力And outputs code data composed of values “0” and “1”
する符号化ステップと、Encoding step; 符号データを所定ビット数毎にパラレルに出力し、且Outputting coded data in parallel for each predetermined number of bits;
つ、桁上がりがあるか否かを示す1ビットの桁上がりデOne-bit carry data indicating whether there is a carry
ータを出力する出力ステップと、An output step for outputting data; 所定ビットの符号データの全ビットが値「1」であるかWhether all the bits of the code data of the predetermined bit are value “1”
を判定し、全ビットが値「1」であるか否かを示す1ビTo determine whether all bits have the value “1” or not.
ットの判定データを出力する判定ステップと、A judging step of outputting judgment data of the set; 直列接続された複数の符号ラッチにより、所定ビット数Predetermined number of bits by multiple serially connected code latches
の符号データをパラレルにシフトする第1のシフトステA first shift stage for shifting the code data of
ップと、And 直列接続された複数の桁上がりラッチにより、桁上がりCarry by multiple carry latches connected in series
データを符号データのパラレルシフトに同期してシフトShift data in synchronization with parallel shift of code data
する第2のシフトステップと、A second shift step, 直列接続された複数の判定ラッチにより、判定データをJudgment data is stored by a plurality of judgment latches connected in series.
符号データのパラレルシフトに同期してシフトする第3Third shift in synchronization with parallel shift of code data
のシフトステップと、Shift step and 各桁上がりラッチにラッチされた桁上がりデータおよびCarry data latched by each carry latch and
各判定ラッチにラッチされた判定データとに基づいて、Based on the judgment data latched by each judgment latch,
各符号ラッチにラッチされた符号データに桁上がり処理Carry processing on code data latched by each code latch
を行う処理ステップと、Processing steps, 前記複数の符号ラッチによりシフトされた符号データとCode data shifted by the plurality of code latches;
前記複数の桁上がりラッチによりシフトされた桁上がりThe carry shifted by the plurality of carry latches
データとを加算し、加算結果を確定された符号データとData, and adds the result of the addition to the determined code data.
して出力する加算ステップとを有することを特徴とするAnd an adding step of outputting
画像符号化方法。Image coding method.
【請求項10】 請求項9に記載の画像符号化方法にお10. The image encoding method according to claim 9, wherein
いて、And 前記処理ステップは、各符号ラッチにラッチされているThe processing step is latched by each code latch.
全ビットが値「1」である符号データに桁上がり処理をCarry-out processing is performed on code data in which all bits have the value "1".
行うことを特徴とする画像符号化方法。An image coding method characterized by performing the following.
【請求項11】 請求項10に記載の画像符号化方法に11. The image encoding method according to claim 10, wherein
おいて、And 1段目の符号ラッチに全ビットが値「1」の符号データCode data with all bits of value "1" in the first-stage code latch
がラッチされた後に、桁上がりがあることを示す桁上がIs latched, the carry indicating that there is a carry
りデータが出力された場合、前記処理ステップは、2段If the data is output, the processing step includes two steps.
目の符号ラッチに全ビットが値「0」の符号データをラIn the first code latch, code data with all bits of value "0"
ッチせしめ、且つ、2段目の符号ラッチに対応する桁上On the digit corresponding to the second stage code latch
がりラッチに桁上がりがあることを示す桁上がりデータCarry data indicating that the carry latch has a carry
をラッチせしめることを特徴とする画像符号化方法。An image encoding method characterized by latching
【請求項12】 請求項10に記載の画像符号化方法に12. The image encoding method according to claim 10, wherein
おいて、And 全ビットが値「1」の符号データがラッチされた符号ラA code latch in which code data with all bits of the value “1” is latched
ッチの前段の符号ラッチに対応する桁上がりラッチに桁Digit in the carry latch corresponding to the sign latch preceding the
上がりデータがラッチされた場合、前記処理ステップIf the rising data is latched,
は、全ビットが値「1」の符号データがラッチされた符Is a code in which the sign data in which all the bits are “1” are latched.
号ラッチに全ビットが値「0」の符号データをラッチせLatch the sign data of which all bits have the value "0"
しめ、且つ、対応する桁上がりラッチに桁上がりがあるAnd the corresponding carry latch has carry
ことを示す桁上がりデータをラッチせしめることを特徴It is characterized by latching carry data indicating that
とする画像符号化方法。Image encoding method.
【請求項13】 算術符号に基づいて画像データを符号13. Code image data based on an arithmetic code
化し、値「0」及び「1」で構成される符号データを出And outputs coded data composed of values “0” and “1”.
力する符号化ステップと、Encoding step 符号データを所定ビット数毎にパラレルに出力し、且Outputting coded data in parallel for each predetermined number of bits;
つ、桁上がりがあるか否かを示す1ビットの桁上がりデOne-bit carry data indicating whether there is a carry
ータを出力する出力ステップと、An output step for outputting data; 直列接続された複数の符号ラッチにより、所定ビット数Predetermined number of bits by multiple serially connected code latches
の符号データをパラレルにシフトする第1のシフトステA first shift stage for shifting the code data of
ップと、And 直列接続された複数のデータラッチにより、桁上がりデMultiple data latches connected in series provide carry data.
ータを符号データのパラData to the code data parameter. レルシフトに同期してシフトすShift in synchronization with the rel shift
る第2のシフトステップと、A second shift step, 複数の符号ラッチの夫々にラッチされた所定ビットの符A predetermined bit code latched in each of the plurality of code latches.
号データの全ビットが値「1」であるかを判定する判定To determine whether all bits of the signal data have the value "1"
ステップと、Steps and 各データラッチにラッチされた桁上がりデータおよび前Carry data latched in each data latch and previous
記判定ステップによる判定結果とに基づいて、各符号ラBased on the result of the determination step
ッチにラッチされた符号データに桁上がり処理を行う処That carries out carry processing on the code data latched by the switch.
理ステップと、Management steps, 前記複数の符号ラッチによりシフトされた符号データとCode data shifted by the plurality of code latches;
前記複数のデータラッチによりシフトされた桁上がりデThe carry data shifted by the plurality of data latches
ータとを加算し、加算結果を確定された符号データとしData, and the result of addition is determined as fixed code data.
て出力する加算ステップとを有することを特徴とする画And an adding step of outputting
像符号化方法。Image coding method.
【請求項14】 請求項13に記載の画像符号化方法に14. The image encoding method according to claim 13,
おいて、And 前記処理ステップは、各符号ラッチにラッチされているThe processing step is latched by each code latch.
全ビットが値「1」である符号データに桁上がり処理をCarry-out processing is performed on code data in which all bits have the value "1".
行うことを特徴とする画像符号化方法。An image coding method characterized by performing the following.
【請求項15】 請求項13に記載の画像符号化装置に15. The image encoding apparatus according to claim 13,
おいて、And 1段目の符号ラッチに全ビットが値「1」の符号データCode data with all bits of value "1" in the first-stage code latch
がラッチされた後に、桁上がりがあることを示す桁上がIs latched, the carry indicating that there is a carry
りデータが出力された場合、前記処理ステップは、2段If the data is output, the processing step includes two steps.
目の符号ラッチに全ビットが値「0」の符号データをラIn the first code latch, code data with all bits of value "0"
ッチせしめることを特徴とする画像符号化装置。An image encoding device characterized by being touched.
【請求項16】 請求項13に記載の画像符号化方法に16. The image encoding method according to claim 13,
おいて、And 全ビットが値「1」の符号データがラッチされた符号ラA code latch in which code data with all bits of the value “1” is latched
ッチの前段の符号ラッチに対応するデータラッチに桁上Carry to the data latch corresponding to the sign latch preceding the switch.
がりデータがラッチされた場合、前記処理ステップは、When the data is latched, the processing step includes:
全ビットが値「1」の符号データがラッチされた符号ラA code latch in which code data with all bits of the value “1” is latched
ッチに全ビットが値「0」の符号データをラッチせしめLatches the sign data of which all bits have the value "0".
ることを特徴とする画像符号化方法。An image encoding method characterized by:
JP27693793A 1992-11-13 1993-11-05 Image coding apparatus and method Expired - Fee Related JP3219571B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27693793A JP3219571B2 (en) 1992-11-13 1993-11-05 Image coding apparatus and method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP30393292 1992-11-13
JP4-303932 1992-11-13
JP27693793A JP3219571B2 (en) 1992-11-13 1993-11-05 Image coding apparatus and method

Publications (2)

Publication Number Publication Date
JPH06225158A JPH06225158A (en) 1994-08-12
JP3219571B2 true JP3219571B2 (en) 2001-10-15

Family

ID=26552171

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27693793A Expired - Fee Related JP3219571B2 (en) 1992-11-13 1993-11-05 Image coding apparatus and method

Country Status (1)

Country Link
JP (1) JP3219571B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3185769B2 (en) 1998-10-26 2001-07-11 日本電気株式会社 Image signal processing device

Also Published As

Publication number Publication date
JPH06225158A (en) 1994-08-12

Similar Documents

Publication Publication Date Title
US4463342A (en) Method and means for carry-over control in the high order to low order pairwise combining of digits of a decodable set of relatively shifted finite number strings
US4467317A (en) High-speed arithmetic compression coding using concurrent value updating
US4286256A (en) Method and means for arithmetic coding utilizing a reduced number of operations
US7262722B1 (en) Hardware-based CABAC decoder with parallel binary arithmetic decoding
EP0649224B1 (en) Variable length coder and variable length decoder
JP3227292B2 (en) Encoding device, encoding method, decoding device, decoding method, encoding / decoding device, and encoding / decoding method
US4295125A (en) Method and means for pipeline decoding of the high to low order pairwise combined digits of a decodable set of relatively shifted finite number of strings
JPS63123232A (en) Method of detecting single bit error and arithmetic decoder employing the same
JP3684128B2 (en) Arithmetic encoding / decoding method and arithmetic encoding / decoding device
US6408102B1 (en) Encoding/decoding device
EP0581571B1 (en) Imaging coding device and method
US5784497A (en) Arithmetic encoding with carry over processing
EP0416869A2 (en) Digital adder/accumulator
US5181184A (en) Apparatus for multiplying real-time 2's complement code in a digital signal processing system and a method for the same
JP3219571B2 (en) Image coding apparatus and method
JP3184670B2 (en) Image coding device
CN107277553B (en) Binary arithmetic coder
US5532949A (en) Barrel shifter
JPH11103257A (en) Arithmetic encoding/decoding device
JP2755091B2 (en) Encoding method and encoding method
JP2002064715A (en) Data processing unit and its method
JP3595659B2 (en) Packing circuit
KR960013230B1 (en) Data packing circuit for digital video encoder
KR100567643B1 (en) Zero determination signal generating circuit
JP3225763B2 (en) Encoding device and 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: 20010710

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

Free format text: PAYMENT UNTIL: 20070810

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20080810

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees