JPH0338969A - Changed point detecting circuit - Google Patents

Changed point detecting circuit

Info

Publication number
JPH0338969A
JPH0338969A JP17461689A JP17461689A JPH0338969A JP H0338969 A JPH0338969 A JP H0338969A JP 17461689 A JP17461689 A JP 17461689A JP 17461689 A JP17461689 A JP 17461689A JP H0338969 A JPH0338969 A JP H0338969A
Authority
JP
Japan
Prior art keywords
change point
logic
bits
input data
bit
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.)
Pending
Application number
JP17461689A
Other languages
Japanese (ja)
Inventor
Hidekazu Kowashi
英一 小鷲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP17461689A priority Critical patent/JPH0338969A/en
Publication of JPH0338969A publication Critical patent/JPH0338969A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

PURPOSE:To execute the detection of a changed point in bit boundary processing only with simple initial set to a shift number accumulator at high speed samely as the detection by word boundary processing by accumulating the outputs of combinational logic and applying the number of bits to be shifted to a barrel shifter. CONSTITUTION:Barrel shifters 102a and 102b are provided to shift input data by the prescribed number of bits and inversional logic is provided to invert the outputs of the barrel shifters 102a and 102b corresponding to color under processing. The combinational logic is provided to detect the bit position of the least significant changed point in the output of the inversional logic and a shift number accumulator 107, which can be initially set to an arbitrary value, is provided to accumulate a shift number to be outputted by the combinational logic and to apply the number of bits to be shifted to the barrel shifters 102a and 102b. Then, before the detection of the changed point, the shift number accumulator 107 is initially set to the desired number of bits. Thus, the changed point is detected from the arbitrary bit position of the input data and time is shortened for detecting the changed point in the bit boundary processing.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は変化点検出回路、特に、入力データ中の任意の
ビット境界内の変化点を検出する変化点検出回路に関す
る。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a change point detection circuit, and particularly to a change point detection circuit that detects a change point within an arbitrary bit boundary in input data.

〔従来の技術〕[Conventional technology]

近年、社会の高度情報化にともない、情報をより速く、
より大量に伝送する必要性かたかまってきている。この
ような中で、二値画像を伝送するファクシミリの分野に
おいては、画像を効率的に伝送するために、画像を圧縮
・符号化したり、逆に符号を伸張・復号化したりする方
式としてMH。
In recent years, with the advancement of information technology in society, information can be transmitted faster and faster.
There is a growing need to transmit data in larger quantities. Under these circumstances, in the field of facsimile that transmits binary images, MH is used as a method for compressing and encoding images, and conversely expanding and decoding codes, in order to transmit images efficiently.

MRおよびMMR符号化方式が国際基準に定められてい
る。
MR and MMR encoding methods are defined by international standards.

これらの符号化方式を用いて画像を符号化したり、復号
化したりする際には、各走査線上の画像の色が白から黒
、もしくは黒から白に変化する点(変化点)の位置を知
ることが必要となる。この目的で従来、第7図に示す変
化点検出回路が用いられている。
When encoding or decoding an image using these encoding methods, it is necessary to know the position of the point (change point) where the image color changes from white to black or from black to white on each scanning line. This is necessary. Conventionally, a change point detection circuit shown in FIG. 7 has been used for this purpose.

従来の変化点検出回路は入力データをラッチする入力レ
ジスト7011人カレジスト701のデータ中の隣接す
るビットの排他的論理和をとるXOR論理702、X0
R702の出力のLSB側から指定されたビット幅のビ
ットを0にマスクするマスク論理703、マスク論理7
03の出力を記憶保持するラッチ704、ラッチ704
の出力中、LSB側で最初の1のビット位置を出力する
プライオリティ論理回路705、それにプライオリティ
論理回路705の出力を累算するシフト数累算器706
から構成されている。
A conventional change point detection circuit uses an input register 7011 that latches input data, and an XOR logic 702 that takes the exclusive OR of adjacent bits in the data of the input register 701,
Mask logic 703, mask logic 7 that masks bits of a specified bit width from the LSB side of the output of R702 to 0
A latch 704 that stores and holds the output of 03, a latch 704
During output, a priority logic circuit 705 outputs the first bit position of 1 on the LSB side, and a shift number accumulator 706 accumulates the output of the priority logic circuit 705.
It consists of

次に従来の変化点検出回路の動作を説明する。Next, the operation of the conventional change point detection circuit will be explained.

変化点検出を行う対象となる入力データの例を第4図に
示す、第4図において、0は白(W)、1は黒(B)を
表す。また、W6とは白が6ビツト続いている様子、B
4とは黒が4ビツト続いている様子をそれぞれ表す。こ
の入力データ中の変化点を従来の変化点検出回路によっ
て検出する様子を第8図に示す。
An example of input data to be subjected to change point detection is shown in FIG. 4. In FIG. 4, 0 represents white (W) and 1 represents black (B). Also, W6 means 6 consecutive bits of white, B
4 represents four consecutive bits of black. FIG. 8 shows how a change point in this input data is detected by a conventional change point detection circuit.

ここで、シフト数累算器が1回の累算を行うのに要する
時間を1サイクルと呼ぶ。シフト数累算器は処理に先立
って0にリセットされる。サイクルlにおいて、入力レ
ジスト701は最初のデータをラッチする。入力レジス
ト701の値はXOR論理702によって排他的論理和
をとられ、マスク論理703によってシフト数累算器7
06の示すシフト数だけマスクされた後、ラッチ704
に記憶される。プライオリティ論理回路705はラッチ
704の出力中でlが立っているビット位置をLSB側
から検索し、6ビツト目にあるlを検出して変化点位置
6を出力する。これを受けてシフト数累算器706は累
算値に6を加算し、6ビツト目の変化点を出力するとと
もに、マスク論理703のマスク・ビット数を6とする
。次に、プライオリティ論理回路705は変化点位置l
Oを検出して出力する。以下同様の処理を行う(第8図
)。
Here, the time required for the shift number accumulator to perform one accumulation is called one cycle. The shift number accumulator is reset to zero prior to processing. In cycle l, input register 701 latches the first data. The values of the input register 701 are exclusive-ORed by the XOR logic 702 and are added to the shift number accumulator 7 by the mask logic 703.
After being masked by the number of shifts indicated by 06, the latch 704
is memorized. The priority logic circuit 705 searches the bit position where l is set in the output of the latch 704 from the LSB side, detects l at the 6th bit, and outputs the change point position 6. In response to this, the shift number accumulator 706 adds 6 to the accumulated value, outputs the 6th bit change point, and sets the mask bit number of the mask logic 703 to 6. Next, the priority logic circuit 705 determines the change point position l.
Detects and outputs O. Similar processing is performed thereafter (FIG. 8).

ところで、最近は入力データ中の任意のビット境界内の
データを処理する必要性かたかまっている。これをビッ
ト・バウンダリ処理と呼ぶ。これに対して、従来の複数
ビット(ワード)単位の処理をワード・バウンダリ処理
と呼ぶ。ビット・バウンダリ処理とは、入力データを画
像として考えた場合、処理を行なう画素の境界を従来の
ようにある特定の複数画素単位ではなく、1画素単位で
設定することができる処理のことをいう。ビット・バウ
ンダリ処理を用いれば、ワード・バウンダリ処理に比べ
て、よりきめ細かい処理を行うことができる。
Incidentally, recently there has been a growing need to process data within arbitrary bit boundaries in input data. This is called bit boundary processing. On the other hand, conventional processing in units of multiple bits (words) is called word boundary processing. Bit boundary processing, when considering input data as an image, is a process that allows the boundaries of pixels to be processed to be set in units of one pixel, rather than in units of specific multiple pixels as in the past. . Bit boundary processing allows more detailed processing than word boundary processing.

従来例の変化点検出回路において、ビット・バウンダリ
処理を行うためには、変化点検出を行った結果に対して
第9図に示すような後処理を行う必要がある。
In the conventional change point detection circuit, in order to perform bit boundary processing, it is necessary to perform post-processing as shown in FIG. 9 on the result of change point detection.

第9図において、ビット・バウンダリ処理を行うビット
数をbtとする。まず、変化点位がbtより小さい時は
その変化点を廃棄して次の変化点を検索する。変化点が
bt以上であったら、その変化点からbtを減算する。
In FIG. 9, the number of bits on which bit boundary processing is performed is defined as bt. First, when the change point position is smaller than bt, that change point is discarded and the next change point is searched. If the change point is greater than or equal to bt, bt is subtracted from the change point.

次に、bt以上の最初の変化点の色が黒ならば白の変化
点Oを出力する。
Next, if the color of the first change point equal to or greater than bt is black, a white change point O is output.

最後に求められた変化点を出力する。たとえば入力デー
タの7ビツト目を開始位置(b t)として、第4図に
示した入力データの変化点検出を行う場合は、6ビツト
目の変化点は熊視し、次の変化点は黒だから白0を出力
し、それ以降の変化点については7を減算することによ
り、変化点位置の補正を行う。
Output the finally determined change point. For example, when detecting the change point of the input data shown in Figure 4 using the 7th bit of the input data as the starting position (b t), the change point of the 6th bit is marked as a black mark, and the next change point is marked as a black mark. Therefore, the change point position is corrected by outputting white 0 and subtracting 7 for the subsequent change points.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

しかしながら、従来の変化点検出回路ではビット・バウ
ンダリ処理において減算処理が必要となる。この処理を
ソフトウェアで行うと処理時間が長くかかる。一方、こ
の処理をハードウェアで行うと減算器が必要になる。ま
た、この時、減算のためにワード・バウンダリ処理の場
合の2倍の処理時間がかかる。このように、従来の方式
でビット・バウンダリ処理を青うと回路規模と処理時間
の面で問題がある。
However, the conventional change point detection circuit requires subtraction processing in bit boundary processing. If this process is performed using software, it will take a long time. On the other hand, if this processing is performed in hardware, a subtracter will be required. Furthermore, at this time, the processing time required for subtraction is twice that of word boundary processing. As described above, if bit boundary processing is performed using the conventional method, there are problems in terms of circuit scale and processing time.

従来、符号の伝送や符号化、復号化の他の部分にかかる
時間が、変化点検出にかかる時間に比べて長かった時は
、変化点検出に時間がかかることは、あまり問題になら
なかった。しかし、伝送。
In the past, when the time required for code transmission, encoding, and other parts of decoding was longer than the time required to detect a change point, the time it took to detect a change point was not much of a problem. . But the transmission.

符号化、および復号化にかかる時間が技術の進歩によっ
て高速化し、また、走査の高解像化によって取り扱う画
像のデータ量が増加してくると、ビット・バウンダリ処
理の変化点検出に時間がかかることは問題になってきた
As the time required for encoding and decoding becomes faster due to advances in technology, and as the amount of image data handled increases due to higher resolution scanning, it takes time to detect changing points in bit boundary processing. This has become a problem.

〔課題を解決するための手段〕[Means to solve the problem]

本発明の変化点検出回路は、入力データを所定のヒツト
数シフトするバレル・シフタと、処理中の色に応じて、
前記バレル・シフタの出力を反転する反転論理と、前記
反転論理の出力中の最も低位の変化点のビット位置を検
出する組合せ論理と、任意の値に初期設定でき、前記組
合せ論理の出力するシフト数を累算し、前記バレル・シ
フタに対してシフトするビット数を与えるシフト数累算
器を具備し、変化点検出に先立って前記シフト数累算器
を所望のビット数に初期設定することにより、入力デー
タの任意のビット位置からの変化点検出を行う。
The change point detection circuit of the present invention includes a barrel shifter that shifts input data by a predetermined number of hits, and a barrel shifter that shifts input data by a predetermined number of hits, and
an inversion logic that inverts the output of the barrel shifter; a combinational logic that detects the bit position of the lowest change point in the output of the inversion logic; and a shift output of the combinational logic that can be initialized to an arbitrary value. a shift number accumulator that accumulates a number and provides a number of bits to shift to the barrel shifter, and initializes the shift number accumulator to a desired number of bits prior to detecting a change point; Detects a change point from an arbitrary bit position of input data.

〔実施例1〕 次に、本発明の一実施例について図面を参照して説明す
る。
[Example 1] Next, an example of the present invention will be described with reference to the drawings.

第1図は本発明の第1の実施例を示すブロック図である
FIG. 1 is a block diagram showing a first embodiment of the present invention.

第1の実施例の変化点検出回路は、入カレジス) 10
1.バレル・シフタ102、OR論理103、ラッチ1
04、色基準レジスタ105、プライオリティ論理回路
106、および、シフト数累算器107から構成されて
いる。
The change point detection circuit of the first embodiment is an input register) 10
1. Barrel shifter 102, OR logic 103, latch 1
04, a color reference register 105, a priority logic circuit 106, and a shift number accumulator 107.

バレル・シフタ102a、bとOR論理103の真理表
を示す図を第2図に示す。
A diagram illustrating the truth table of barrel shifters 102a, b and OR logic 103 is shown in FIG.

プライオリティ論理回路106は反転論理106aと組
合せ論理106bから構成される。プライオリティ論理
回路の基本回路と真理表を示す図を第3図(a)、 (
b)に示す。第1の実施例の構成を用いて変化点検出を
行う対象となる入力データを第4図に示す。ここでは、
ビット・バウンダリ処理を行うビット数を7とする。
Priority logic circuit 106 is comprised of inverting logic 106a and combinational logic 106b. Figure 3(a) shows the basic circuit and truth table of the priority logic circuit.
Shown in b). FIG. 4 shows input data on which change point detection is performed using the configuration of the first embodiment. here,
Assume that the number of bits to perform bit boundary processing is 7.

次に、動作について説明する。Next, the operation will be explained.

第4図の入力データを処理する様子を第5に示す。入力
シフト数累算器107はあらかじめ、ビット・バウンダ
リ処理を行うビット数7に初期設定されている。入力信
号の最初の2ワードはlワード長の入カレジスl−10
1a、bによって次々とラッチされる。ラッチされた入
力信号はバレル・シフタ102a、bによってシフ)!
累算器107の示す値だけシフトされた後、論理和10
3によって1ワードにまとめられた後、ラッチ104に
ラッチされる。色レジスタ105は変化点検出の処理前
に白、すなわちOにリセットされている。
5 shows how the input data shown in FIG. 4 is processed. The input shift number accumulator 107 is initialized in advance to the number of bits 7 for performing bit boundary processing. The first two words of the input signal are input registers l-10 with l word length.
1a and 1b are latched one after another. The latched input signal is shifted by barrel shifters 102a,b)!
After being shifted by the value indicated by the accumulator 107, the logical sum 10
3 into one word and then latched into the latch 104. The color register 105 is reset to white, ie O, before the change point detection process.

次にプライオリティ論理回路106はラッチ104と色
レジスタ105の値を入力して、LSB側で最初に色が
異なる点のビット位置を出力する。第4図の例ではLS
Eで既に色が異なっているので、プライオリティ論理回
路106は0を出力する。シフト数累算器107はプラ
イオリティ論理回路106からの変化点位置を累算して
、変化点があれば出力するとともに、色レジスタ105
の内容を反転する。以下同様にして変化点検出を行う(
第5図)。
Next, the priority logic circuit 106 inputs the values of the latch 104 and the color register 105, and outputs the bit position of the first different color point on the LSB side. In the example in Figure 4, LS
Since the colors are already different in E, the priority logic circuit 106 outputs 0. The shift number accumulator 107 accumulates the change point positions from the priority logic circuit 106 and outputs the change point if there is a change point.
Reverse the contents of . Change points are detected in the same manner as below (
Figure 5).

〔実施例2〕 第6図は本発明の第2の実施例を示すブロック図である
[Embodiment 2] FIG. 6 is a block diagram showing a second embodiment of the present invention.

第2の実施例は本発明の入力部を二組の入力レジストと
二組のマルチプレクサ、2ワードから1ワードを取り出
すバレル・シフタで構成した例である。
The second embodiment is an example in which the input section of the present invention is configured with two sets of input resists, two sets of multiplexers, and a barrel shifter that takes out one word from two words.

第2の実施例は入カレジス)101a、b、マルチプレ
クサ602a、b、バレル・シフタ603、ラッチ10
4、色レジスタ105、第3図(a)。
In the second embodiment, input registers 101a, b, multiplexers 602a, b, barrel shifter 603, latch 10
4. Color register 105, FIG. 3(a).

(b)の構成と真理表を示す図によるプライオリティ論
理回路106、および、シフト数累算器107とから構
成されている。
It is comprised of a priority logic circuit 106 and a shift number accumulator 107, as shown in the figure showing the configuration and truth table in FIG.

第2の実施例の動作は、第1の実施例のそれと同様であ
る。
The operation of the second embodiment is similar to that of the first embodiment.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明の変化点検出回路は、シフ
ト数累算器に対する簡単な初期設定のみでビット・バウ
ンダリ処理における変化点検出をワード・バウンダリ処
理によう場合と同様に高速に行なうことができる。しか
も、減算器を必要としないため、回路構成が簡単になる
という効果がある。
As explained above, the changing point detection circuit of the present invention can detect changing points in bit boundary processing as quickly as in word boundary processing with only simple initial settings for the shift number accumulator. I can do it. Furthermore, since no subtracter is required, the circuit configuration is simplified.

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

第1図は本発明の第1の実施例のブロック図、第2図は
第1の実施例におけるバレル・シフタ102a、bとO
R論理103の真理表を示す図、第3図(a)、 (b
)は第1の実施例におけるプライオリティ論理回路10
6を示すブロック図および真理表を示す図、第4図は変
化点検出の対象となる入力データの例を示す図、第5図
は第1の実施例の構成を用いて第4図のデータ中の変化
点を検出した際の動作を示す図、第6図は本発明の第2
の実施例のブロック図、第7図は従来の一例を示すブロ
ック図、第8図は従来例を用いて第4図に示す入力デー
タ中の変化点を検出した例を示す図、第9図は従来例の
構成を用いてビット・バウンダリ処理を行う際に必要と
なる後処理を示す流れ図である。 101a、b・・・・・・入力レジスト、102a。 b・・・・・・バレル・シフタ、103・・・・・・R
○論理、104・・・・・・ラッチ、105・・・・・
・色レジスト、106・・・・・・プライオリティ論理
回路、106a・・・・・・反転論理、106b・・・
・・・組合せ論理、107・・・・・・シフト数累算器
、602a、b・・・・・・マルチプレクサ、603・
・・・・・バレル・シフタ、701・・・・・・入カレ
シスタ、702・・・・・・XOR論理、703・・・
・・・マスク論理、704・・・・・・ラッチ、705
・・・・・・プライオリティ論理回路、706・・・・
・・シフト数累算器。
FIG. 1 is a block diagram of a first embodiment of the present invention, and FIG. 2 shows barrel shifters 102a, b and O in the first embodiment.
Diagrams showing the truth table of R logic 103, Figure 3 (a), (b
) is the priority logic circuit 10 in the first embodiment.
6 is a block diagram showing a truth table, FIG. 4 is a diagram showing an example of input data that is subject to change point detection, and FIG. FIG. 6 is a diagram showing the operation when detecting a change point in the middle of the second embodiment of the present invention.
7 is a block diagram showing a conventional example, FIG. 8 is a diagram showing an example of detecting a change point in the input data shown in FIG. 4 using the conventional example, and FIG. 9 is a block diagram showing an example of the conventional example. 1 is a flowchart showing post-processing required when bit boundary processing is performed using a conventional configuration. 101a, b... Input register, 102a. b...Barrel shifter, 103...R
○Logic, 104...Latch, 105...
- Color resist, 106...Priority logic circuit, 106a...Inversion logic, 106b...
... Combinational logic, 107... Shift number accumulator, 602a, b... Multiplexer, 603.
... Barrel shifter, 701 ... Input register register, 702 ... XOR logic, 703 ...
... Mask logic, 704 ... Latch, 705
...Priority logic circuit, 706...
...Shift number accumulator.

Claims (1)

【特許請求の範囲】[Claims] 入力データ中のビットが0から1、もしくは1から0に
変化する点である変化点のビット位置を検出する変化点
検出回路において、入力データを所定のビット数シフト
するバレル・シフタと、処理中の色に応じて前記バレル
・シフタの出力を反転する反転論理と、前記反転論理の
出力中の最も低位の変化点のビット位置を検出する組合
せ論理と、任意の値に初期設定でき、前記組合せ論理の
出力を累算し、前記バレル・シフタに対してシフトする
ビット数を与えるシフト数累算器とを備えることを特徴
とする変化点検出回路。
In a change point detection circuit that detects the bit position of a change point, which is a point where a bit in input data changes from 0 to 1 or from 1 to 0, there is a barrel shifter that shifts input data by a predetermined number of bits, and a barrel shifter that shifts input data by a predetermined number of bits. an inverting logic that inverts the output of the barrel shifter according to the color of the barrel shifter; and a combinational logic that detects the bit position of the lowest change point in the output of the inverting logic; and a shift number accumulator that accumulates the output of the logic and provides the number of bits to be shifted to the barrel shifter.
JP17461689A 1989-07-05 1989-07-05 Changed point detecting circuit Pending JPH0338969A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17461689A JPH0338969A (en) 1989-07-05 1989-07-05 Changed point detecting circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17461689A JPH0338969A (en) 1989-07-05 1989-07-05 Changed point detecting circuit

Publications (1)

Publication Number Publication Date
JPH0338969A true JPH0338969A (en) 1991-02-20

Family

ID=15981706

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17461689A Pending JPH0338969A (en) 1989-07-05 1989-07-05 Changed point detecting circuit

Country Status (1)

Country Link
JP (1) JPH0338969A (en)

Similar Documents

Publication Publication Date Title
US4107648A (en) Scan encoding of two dimensional pictorial entities
JP3684128B2 (en) Arithmetic encoding / decoding method and arithmetic encoding / decoding device
JPS63123232A (en) Method of detecting single bit error and arithmetic decoder employing the same
JPH0338969A (en) Changed point detecting circuit
JP3645298B2 (en) Shift and round circuit and method thereof
JP2833112B2 (en) Change point detection circuit
JP3184670B2 (en) Image coding device
JPH0322676A (en) Change point detection circuit
JP2877236B2 (en) Encoding device
JPS646589B2 (en)
JPH03270379A (en) Variation point detecting circuit
JP2590840B2 (en) Run-length encoding device
JPH0654210A (en) Method and device for inverse conversion of pattern run length
JPS6316069B2 (en)
JPS59149556A (en) Parallel processing circuit of picture data
JPH03123981A (en) Image filter circuit
JP3231263B2 (en) Code converter, variable-length code decoding device and decoding method
JP2606336B2 (en) EOL code search circuit
JP2697923B2 (en) Image coding device
JPS63238767A (en) Binary data compression processor
KR19990038709U (en) Error Detection Device Using Parit Bits
JP2001196937A (en) Data coding method, data decoding method, and computer- readable recording medium recording program to allow computer to execute the method
JPH0524538B2 (en)
JPH01251178A (en) Image expansion processor
JPS5986965A (en) Picture processing system