[go: up one dir, main page]

JP4941254B2 - Image compression apparatus, printer, and multifunction machine - Google Patents

Image compression apparatus, printer, and multifunction machine Download PDF

Info

Publication number
JP4941254B2
JP4941254B2 JP2007306958A JP2007306958A JP4941254B2 JP 4941254 B2 JP4941254 B2 JP 4941254B2 JP 2007306958 A JP2007306958 A JP 2007306958A JP 2007306958 A JP2007306958 A JP 2007306958A JP 4941254 B2 JP4941254 B2 JP 4941254B2
Authority
JP
Japan
Prior art keywords
data
circuit
output
pixel density
density data
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
JP2007306958A
Other languages
Japanese (ja)
Other versions
JP2009130889A (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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2007306958A priority Critical patent/JP4941254B2/en
Publication of JP2009130889A publication Critical patent/JP2009130889A/en
Application granted granted Critical
Publication of JP4941254B2 publication Critical patent/JP4941254B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、画像圧縮装置、プリンタ、及び複合機に関する。   The present invention relates to an image compression apparatus, a printer, and a multifunction peripheral.

プリンタなどにおいて、データを圧縮する技術として、ランレングス圧縮方式やハフマン符号化方式が知られている。ランレングス圧縮方式では、元のデータを、データ値と、連続する回数(長さ)との情報に変換し、データ量を削減する。また、ハフマン符号化方式は、データ値の出現確立に応じて符号の長さを変えて、平均符号長を短くする方式である。具体的には、出現確立が高いデータ値に対して短い符号を、出現確立が低いデータ値に対して長い符号を割り当てることで、全体の圧縮コード量を削減する。   As a technique for compressing data in a printer or the like, a run length compression method or a Huffman coding method is known. In the run-length compression method, original data is converted into information of a data value and the number of consecutive times (length) to reduce the data amount. The Huffman coding method is a method of shortening the average code length by changing the code length according to the establishment of the appearance of the data value. Specifically, the entire compression code amount is reduced by assigning a short code to a data value having a high occurrence probability and assigning a long code to a data value having a low occurrence probability.

例えば、一次元ラスタ画像が「AAABBBBCCDD・・・」である場合、「A」が3回、「B」が4回、「C」が2回、「D」が2回・・・と数え、
「画素濃度Aに相当するコード」+「回数3に相当するコード」、
「画素濃度Bに相当するコード」+「回数4に相当するコード」、
「画素濃度Cに相当するコード」+「回数2に相当するコード」、
「画素濃度Dに相当するコード」+「回数2に相当するコード」、・・・
と符号化した後、ビット結合シフトレジスタによりビット単位で結合することで、圧縮データを得ることができる。
For example, when the one-dimensional raster image is “AAABBBBCCDD...”, “A” is counted 3 times, “B” is 4 times, “C” is 2 times, “D” is 2 times,
“Code corresponding to pixel density A” + “Code corresponding to number of times 3”,
“Code corresponding to pixel density B” + “code corresponding to number of times 4”,
“Code corresponding to pixel density C” + “code corresponding to number of times 2”,
“Code corresponding to pixel density D” + “Code corresponding to number of times 2”,...
, And then combined in bit units by a bit combination shift register, compressed data can be obtained.

画像圧縮装置では、画素濃度を示すデータ(画素濃度データ)と、回数を示すデータ(回数データ)とを、それぞれ別個のFIFO回路に書き込み保持する。そして、それぞれのFIFO回路にデータが保持されると、コード化要求を送り、データを読み出し、コード化し、出力する。ここで、画素濃度データの読み出しと、回数データの読み出しは、2つのクロックに分けて読み出される。   In the image compression apparatus, data indicating pixel density (pixel density data) and data indicating the number of times (number of times data) are written and held in separate FIFO circuits. Then, when data is held in each FIFO circuit, an encoding request is sent, the data is read, encoded, and output. Here, the reading of the pixel density data and the reading of the frequency data are read in two clocks.

特開平8−195681号公報JP-A-8-195681

従来の方法では、ラスタ画像に「AAABBBBCDDE」の「C」ように、連続しない画素濃度が現れた場合に問題が生じる。   In the conventional method, a problem occurs when non-continuous pixel density appears in the raster image, such as “AAABBBBCDDE” “C”.

具体的には、上述のように、FIFO回路からの画素濃度データの読み出しと、回数データの読み出しとは、同時に実行されないため、回数が「1」の場合、FIFO回路からデータが読み出される前に、次のデータが入力されることになり、データが溢れてしまう。そのため、制御回路は、データ供給部にデータの供給を禁止することとなり、その結果、処理パフォーマンスが低下する。   Specifically, as described above, the reading of the pixel density data from the FIFO circuit and the reading of the number of times data are not performed at the same time. Therefore, when the number of times is “1”, before the data is read from the FIFO circuit. Then, the next data is input, and the data overflows. Therefore, the control circuit prohibits data supply to the data supply unit, and as a result, the processing performance decreases.

また、ハフマン符号化によると、8ビットのデータの符号化後のビット数は、最大13ビットとなる。したがって、画素濃度データのコードと、回数データのコードとを結合すると、最大26ビットのコードが生成される可能性がある。一方、ビット結合シフトレジスタに入力可能なビット数は、出力バス幅と同じであり、例えば、16ビットである。ビット結合シフトレジスタは、出力バス幅を超えるビット数のコードを処理することができないため、16ビットを超えるデータは溢れてしまう。解決策として、出力バス幅を広げる方法も考えられるが、適用可能なシステムが限定されてしまう。   Further, according to Huffman coding, the number of bits after coding of 8-bit data is 13 bits at maximum. Therefore, when the code of the pixel density data and the code of the frequency data are combined, there is a possibility that a code of a maximum of 26 bits is generated. On the other hand, the number of bits that can be input to the bit combination shift register is the same as the output bus width, for example, 16 bits. Since the bit combination shift register cannot process a code having a number of bits exceeding the output bus width, data exceeding 16 bits overflows. As a solution, a method of widening the output bus width can be considered, but applicable systems are limited.

そこで、本発明の目的は、ランレングス圧縮方式を用いるデータ圧縮において、処理パフォーマンスを低下させず、かつ汎用性のある技術を提供することにある。   SUMMARY OF THE INVENTION An object of the present invention is to provide a versatile technique that does not reduce processing performance in data compression using a run-length compression method.

上記の目的を達成するため、本願発明の第1の態様は、画素濃度を示す画素濃度データと、同一濃度の画素の連続回数を示す回数データと、を用いて、一次元ラスタ画像圧縮される画像圧縮装置であって、前記画素濃度データ保持される画素濃度データ保持回路と、前記回数データ保持される回数データ保持回路と、前記画素濃度データ保持回路に保持された前記画素濃度データが符号化される第1の符号化回路と、前記回数データ保持回路に保持された前記回数データが符号化される第2の符号化回路と、前記符号化された画素濃度データと前記符号化された回数データとに基づき、前記一次元ラスタ画像の圧縮データが生成される出力回路と、前記同一濃度の画素が連続しない場合に、前記符号化された画素濃度データに、前記圧縮データのビット数が前記出力回路の出力バス幅以下となるように予め定められた符号化された回数データが組み合わされるデータ組合回路と、を備える。
To achieve the above object, a first aspect of the present invention, by using the pixel density data of a pixel density, the number of times data indicating the number of continuous pixels of the same concentration, the one-dimensional raster image is compressed that an image compression apparatus, the pixel density data holding circuit in which the pixel density data is held, the number of times the data holding circuit in which the number of data is held, the pixel density data held in the pixel density data holding circuit A first encoding circuit in which the number of times data held in the number of times data holding circuit is encoded, a second encoding circuit in which the number of times data held in the number of times data holding circuit is encoded, the encoded pixel density data and the encoding based on the number of times data, and an output circuit for compressing data of said one-dimensional raster image is generated, when the pixels of the same concentration is not continuous, in the encoded pixel density data, the pressure The number of bits of data and a data unions circuit predetermined coded count data are combined so that the output becomes the bus width following said output circuit.

また、本発明の第2の態様は、画素濃度を示す画素濃度データと、同一濃度の画素の連続回数を示す回数データと、を用いて、一次元ラスタ画像を圧縮する画像圧縮装置であって、前記画素濃度データを書き込み保持する画素濃度データ保持回路と、前記回数データを書き込み保持する回数データ保持回路と、前記画素濃度データ保持回路に前記画素濃度データが保持された場合に、当該画素濃度データを読み込んで符号化し、符号化された画素濃度データを出力する第1の符号化回路と、前記回数データ保持回路に前記回数データが保持された場合に、当該回数データを読み込んで符号化し、符号化された回数データを出力する第2の符号化回路と、前記符号化された画素濃度データと、前記符号化された回数データと、を結合して、前記一次元ラスタ画像の圧縮データを生成し出力する出力回路と、を備える。そして、同一濃度の画素の連続回数が1であることを示す符号化された回数データは、そのビット数が、前記出力回路の出力バス幅から前記符号化された画素濃度データのビット数の最大値を引いて求まるビット数以下となるように定められている。   According to a second aspect of the present invention, there is provided an image compression apparatus that compresses a one-dimensional raster image by using pixel density data indicating pixel density and frequency data indicating the number of consecutive pixels having the same density. A pixel density data holding circuit for writing and holding the pixel density data; a frequency data holding circuit for writing and holding the number of times data; and the pixel density data when the pixel density data is held in the pixel density data holding circuit. A first encoding circuit that reads and encodes data, and outputs encoded pixel density data; and when the number of times data is held in the number of times data holding circuit, reads and encodes the number of times data, A second encoding circuit that outputs encoded number data, the encoded pixel density data, and the encoded number data are combined, And an output circuit which generates compressed data of the dimensional raster image output, a. The encoded number data indicating that the continuous number of pixels having the same density is 1, the number of bits is the maximum of the number of bits of the encoded pixel density data from the output bus width of the output circuit. It is determined to be less than the number of bits obtained by subtracting the value.

また、本発明の第3の態様は、画素濃度を示す画素濃度データと、同一濃度の画素の連続回数を示す回数データと、を用いて、一次元ラスタ画像を圧縮する画像圧縮装置であって、前記画素濃度データを書き込み保持する画素濃度データ保持回路と、前記回数データを書き込み保持する回数データ保持回路と、前記画素濃度データを符号化する第1の符号化回路と、前記回数データを符号化する第2の符号化回路と、前記第1の符号化回路から出力された符号化された画素濃度データに、連続回数が1であることを示す符号化された回数データを組み合わせるデータ組合回路と、前記第1の符号化回路、前記第2の符号化回路、及び前記データ組合回路から出力されるデータを入力し、選択して出力する選択回路と、前記画素濃度データ保持回路、前記回数データ保持回路、及び前記データ選択回路を制御する制御回路と、前記選択回路から出力されたデータを出力する所定の出力バス幅を備えた出力回路と、を備える。そして、前記連続回数が1であることを示す符号化された回数データは、そのビット数が、前記出力回路の出力バス幅から前記符号化された画素濃度データのビット数の最大値を引いて求まるビット数以下となるように定められている。また、前記制御回路は、前記画素濃度データ保持回路に前記画素濃度データが保持された場合、当該画素濃度データ保持回路に対して、当該画素濃度データを前記第1の符号化回路に出力するように制御し、前記回数データ保持回路に前記回数データが保持された場合、当該回数データ保持回路に対して、当該回数データを前記第2の符号化回路に出力するように制御し、前記回数データ保持回路の回数データが1以外を示す場合、前記選択回路に対して、前記第1の符号化回路から出力される符号化された画素濃度データ、及び前記第2の符号化回路から出力される符号化された回数データのうち入力されたデータを、前記出力回路に出力するように制御し、前記回数データ保持回路の回数データが1を示す場合、前記選択回路に対して、前記データ組合回路から出力されたデータを前記出力回路に出力するように制御する。   According to a third aspect of the present invention, there is provided an image compression apparatus for compressing a one-dimensional raster image using pixel density data indicating pixel density and frequency data indicating the number of consecutive pixels having the same density. A pixel density data holding circuit for writing and holding the pixel density data; a number data holding circuit for writing and holding the number of times data; a first encoding circuit for encoding the pixel density data; and encoding the number of times data And a data combination circuit for combining the encoded pixel density data output from the first encoding circuit with the encoded number data indicating that the number of consecutive times is one A selection circuit for inputting, selecting and outputting data output from the first encoding circuit, the second encoding circuit, and the data combination circuit, and the pixel density data holding Comprising road, the number of data holding circuits, and a control circuit for controlling the data selection circuit, an output circuit having a predetermined output bus width for outputting the data output from the selecting circuit. The encoded number data indicating that the continuous number is 1 is obtained by subtracting the maximum value of the number of bits of the encoded pixel density data from the output bus width of the output circuit. It is determined to be less than the number of bits to be obtained. In addition, when the pixel density data is held in the pixel density data holding circuit, the control circuit outputs the pixel density data to the first encoding circuit to the pixel density data holding circuit. When the number data is held in the number data holding circuit, the number data holding circuit is controlled to output the number data to the second encoding circuit. When the count data of the holding circuit indicates other than 1, the encoded pixel density data output from the first encoding circuit and the second encoding circuit are output to the selection circuit. If the number of times data stored in the number of times data holding circuit indicates 1 when the number of times data stored in the number of times data holding circuit is 1, the control is performed so that the input data among the encoded number of times data is output to the output circuit. The data output from the serial data combinational circuit controls so as to output to the output circuit.

本発明によれば、ランレングス圧縮方式を用いるデータ圧縮において、処理パフォーマンスを低下させず、かつ汎用性のある技術を提供できる。   ADVANTAGE OF THE INVENTION According to this invention, in the data compression using a run length compression system, a versatile technique can be provided without deteriorating processing performance.

以下、本発明の一実施形態について説明する。まず、本発明の理解容易のため、従来技術の問題点について詳述する。   Hereinafter, an embodiment of the present invention will be described. First, for easy understanding of the present invention, problems of the prior art will be described in detail.

図4は、従来のプリンタにおける、画像圧縮装置200の概略構成を示す図である。   FIG. 4 is a diagram showing a schematic configuration of an image compression apparatus 200 in a conventional printer.

画像圧縮装置200は、図示するように、第1のFF(フリップフロップ)回路101と、第2のFF回路102と、第3のFF回路103と、第1の比較器111と、第2の比較器112と、画素濃度データFIFO(先入れ先出し)回路121と、回数データFIFO回路122と、カウンタ130と、第1の符号化回路141と、第2の符号化回路142と、制御回路150と、マルチプレクサ160と、ビット結合シフトレジスタ170と、を備えている。   As illustrated, the image compression apparatus 200 includes a first FF (flip-flop) circuit 101, a second FF circuit 102, a third FF circuit 103, a first comparator 111, and a second comparator. A comparator 112, a pixel density data FIFO (first-in first-out) circuit 121, a frequency data FIFO circuit 122, a counter 130, a first encoding circuit 141, a second encoding circuit 142, a control circuit 150, A multiplexer 160 and a bit combination shift register 170 are provided.

第1のFF回路101は、クロックに同期して、データ供給部(不図示)から出力された一次元ラスタ画像データの1画素分のデータを順次入力し、第1の比較器111と、第2のFF回路102とに順次出力する。   The first FF circuit 101 sequentially inputs data for one pixel of one-dimensional raster image data output from a data supply unit (not shown) in synchronization with the clock, and the first comparator 111, Sequentially output to the second FF circuit 102.

第2のFF回路102は、クロックに同期して、第1のFF回路101から出力されたデータを1画素ずつ順次入力し、画素濃度データFIFO121と、第3のFF回路103とに順次出力する。   The second FF circuit 102 sequentially inputs the data output from the first FF circuit 101 one pixel at a time in synchronization with the clock and sequentially outputs the data to the pixel density data FIFO 121 and the third FF circuit 103. .

第3のFF回路103は、クロックに同期して、第2のFF回路102から出力されたデータを1画素ずつ順次入力し、第2の比較器112に順次出力する。   The third FF circuit 103 sequentially inputs the data output from the second FF circuit 102 pixel by pixel in synchronization with the clock, and sequentially outputs the data to the second comparator 112.

このように、3つのFF回路101、102、103からなる3段のパイプラインを構成することで、画像圧縮装置200は、一次元ラスタ画像において、左右の画素状態を知ることができる。   In this way, by configuring a three-stage pipeline including the three FF circuits 101, 102, and 103, the image compression apparatus 200 can know the left and right pixel states in the one-dimensional raster image.

第1の比較器111は、第1のFF回路101から出力されたデータと、第2のFF回路102から出力されたデータとを比較し、等しくない場合に、回数データFIFO122に対して、カウンタ130から出力されるカウンタ値のライト信号(書き込み要求信号)を出力する。かかる場合、ライト信号は、カウンタリセット信号として、カウンタ130にも出力される。   The first comparator 111 compares the data output from the first FF circuit 101 with the data output from the second FF circuit 102. If they are not equal, the first comparator 111 counts the count data FIFO 122 with a counter. A counter value write signal (write request signal) output from 130 is output. In such a case, the write signal is also output to the counter 130 as a counter reset signal.

第2の比較器112は、第2のFF回路102から出力されたデータと、第3のFF回路103から出力されたデータとを比較し、等しくない場合に、画素濃度データFIFO121に対して、第2のFF回路102から出力されるデータのライト信号(書き込み要求信号)を出力する。   The second comparator 112 compares the data output from the second FF circuit 102 with the data output from the third FF circuit 103, and if not equal to the pixel density data FIFO 121, A write signal (write request signal) of data output from the second FF circuit 102 is output.

画素濃度データFIFO121は、第2のFF回路102から出力される画素濃度データを、第2の比較器112から出力されるライト信号に従って、書き込み保持する。また、制御回路150からのリード信号(読み出し要求信号)に従って、保持していた画素濃度データを、第1の符号化回路141に出力する。   The pixel density data FIFO 121 writes and holds the pixel density data output from the second FF circuit 102 in accordance with the write signal output from the second comparator 112. Further, in accordance with a read signal (read request signal) from the control circuit 150, the held pixel density data is output to the first encoding circuit 141.

回数データFIFO122は、カウンタ130から出力されるカウンタ値を、回数データとして、第1の比較器111から出力されるライト信号に従って、書き込み保持する。また、制御回路150からのリード信号(読み出し要求信号)に従って、保持していた回数データを、第2の符号化回路142に出力する。   The count data FIFO 122 writes and holds the counter value output from the counter 130 as the count data in accordance with the write signal output from the first comparator 111. Further, in accordance with the read signal (read request signal) from the control circuit 150, the held number of times data is output to the second encoding circuit 142.

第1の符号化回路141は、画素濃度データFIFO121から出力された画素濃度データを、ハフマン符号化し、符号化された画素濃度データ(画素濃度データのコード)を生成し、マルチプレクサ160に出力する。なお、第1の符号化回路141は、予め、画素濃度データ値とコード値とを対応つけたテーブルをレジスタ内に保持しており、かかるテーブルを用いて、入力された画素濃度データ値を、対応するコード値に変換し、ハフマン符号化を行う。   The first encoding circuit 141 performs Huffman encoding on the pixel density data output from the pixel density data FIFO 121, generates encoded pixel density data (pixel density data code), and outputs the encoded pixel density data to the multiplexer 160. The first encoding circuit 141 holds a table in which pixel density data values and code values are associated with each other in advance in the register, and the input pixel density data values are converted using the table. Convert to the corresponding code value and perform Huffman coding.

第2の符号化回路142は、回数データFIFO122から出力された回数データを、ハフマン符号化し、符号化された回数データ(回数データのコード)を生成し、マルチプレクサ160に出力する。なお、第2の符号化回路142は、予め、回数データ値とコード値とを対応つけたテーブルをレジスタ内に保持しており、かかるテーブルを用いて、入力された回数データ値を、対応するコード値に変換し、ハフマン符号化を行う。   The second encoding circuit 142 performs Huffman coding on the frequency data output from the frequency data FIFO 122, generates encoded frequency data (code of the frequency data), and outputs the generated data to the multiplexer 160. The second encoding circuit 142 holds a table in which the number data value and the code value are associated in advance in the register, and the input number data value is associated with the table using the table. Convert to code value and perform Huffman coding.

制御回路150は、画像圧縮装置200を制御する回路である。具体的には、制御回路150は、画素濃度データFIFO121に対するデータの入力を監視し、データが入力されたことを検知すると、リード信号(読み出し要求信号)を画素濃度データFIFO121に送る。また、制御回路150は、回数データFIFO122に対するデータの入力を監視し、データが入力されたことを検知すると、リード信号(読み出し要求信号)を回数データFIFO122に送る。   The control circuit 150 is a circuit that controls the image compression apparatus 200. Specifically, the control circuit 150 monitors the input of data to the pixel density data FIFO 121 and, when detecting that data has been input, sends a read signal (read request signal) to the pixel density data FIFO 121. In addition, the control circuit 150 monitors the input of data to the number-of-times data FIFO 122 and, when detecting that data has been input, sends a read signal (read request signal) to the number-of-times data FIFO 122.

また、制御回路150は、マルチプレクサ160に対して、ビット結合シフトレジスタ170に対して出力すべきデータを選択させるため、選択制御信号を出力する。具体的には、制御回路150は、画素濃度データFIFO121に対してリード信号を出力した場合には、マルチプレクサ160に対して、第1の符号化回路141から出力されたデータ(画素濃度データのコード)をビット結合シフトレジスタ170に出力するように、選択制御信号を出力する。一方、制御回路150は、回数データFIFO122に対してリード信号を出力した場合には、マルチプレクサ160に対して、第2の符号化回路142から出力されたデータ(回数データのコード)をビット結合シフトレジスタ170に出力するように、選択制御信号を出力する。   In addition, the control circuit 150 outputs a selection control signal to cause the multiplexer 160 to select data to be output to the bit combination shift register 170. Specifically, when the control circuit 150 outputs a read signal to the pixel density data FIFO 121, the control circuit 150 outputs data (pixel density data code) output from the first encoding circuit 141 to the multiplexer 160. ) Is output to the bit combination shift register 170. On the other hand, when the control circuit 150 outputs a read signal to the number-of-times data FIFO 122, the data (number-of-times data code) output from the second encoding circuit 142 is bit-coupled to the multiplexer 160. A selection control signal is output so as to be output to the register 170.

マルチプレクサ160は、制御回路150からの選択制御命令に従って、第1の符号化回路141からのデータ、及び第2の符号化回路142からのデータ、のうちのいずれかを、ビット結合シフトレジスタ170に出力する。   The multiplexer 160 transfers either the data from the first encoding circuit 141 or the data from the second encoding circuit 142 to the bit combination shift register 170 in accordance with the selection control command from the control circuit 150. Output.

ビット結合シフトレジスタ170は、画像圧縮装置200の外部へ、一次元ラスタ画像の圧縮データを出力する回路である。ビット結合シフトレジスタ170は、マルチプレクサ160から出力されたデータを、順次結合し、外部の装置(例えば、画像メモリ)に出力する。   The bit combination shift register 170 is a circuit that outputs compressed data of a one-dimensional raster image to the outside of the image compression apparatus 200. The bit combination shift register 170 sequentially combines the data output from the multiplexer 160 and outputs the combined data to an external device (for example, an image memory).

なお、画素濃度データ、及び回数データは、最大8ビットである。また、第1の符号化回路141、又は第2の符号化回路142でハフマン符号化されたデータのコードの最大ビット数は、13ビットである。   The pixel density data and the number of times data are 8 bits at maximum. Further, the maximum number of bits of the code of the Huffman-encoded data by the first encoding circuit 141 or the second encoding circuit 142 is 13 bits.

また、ビット結合シフトレジスタ170に入力可能な最大ビット数は、出力バス幅と同じ16ビットである。   The maximum number of bits that can be input to the bit combination shift register 170 is 16 bits, which is the same as the output bus width.

図5は、かかる構成の画像圧縮装置200において、一次元ラスタ画像「AAABBBCCDD・・・」が入力された場合のタイミングチャートである。   FIG. 5 is a timing chart when a one-dimensional raster image “AAABBCCDDD...” Is input to the image compression apparatus 200 having such a configuration.

図示するように、第2のFF回路(Pipe1)102の画素濃度データ値と、第2のFF回路(Pipe2)103の画素濃度データ値と、が比較され、等しくない場合に、ライト信号が出力され、第2のFF回路(Pipe1)102の画素濃度データ値が、画素濃度データFIFO回路121に入力される。   As shown in the figure, the pixel density data value of the second FF circuit (Pipe1) 102 and the pixel density data value of the second FF circuit (Pipe2) 103 are compared, and if they are not equal, a write signal is output. Then, the pixel density data value of the second FF circuit (Pipe1) 102 is input to the pixel density data FIFO circuit 121.

また、第1のFF回路(Pipe0)101の画素濃度データ値と、第2のFF回路(Pipe1)102の画素濃度データ値と、が比較され、等しくない場合に、ライト信号が出力され、カウンタ130のカウンタ値が、回数データFIFO回路122に入力される。   Also, the pixel density data value of the first FF circuit (Pipe0) 101 and the pixel density data value of the second FF circuit (Pipe1) 102 are compared, and if they are not equal, a write signal is output and the counter A counter value of 130 is input to the count data FIFO circuit 122.

この動作により、入力された一次元ラスタ画像データから、画素濃度と、同一画素濃度の連続回数とが、順次特定される。   By this operation, the pixel density and the continuous number of times of the same pixel density are sequentially specified from the input one-dimensional raster image data.

このように、一次元ラスタ画像が「AAABBBBCCDD・・・」というように、連続回数が「1」となる部分がない場合、問題は発生しない。しかし、「AAABBBBCDDE・・・」の「C」のように、回数が「1」である部分を含む場合、問題が発生する。   Thus, when the one-dimensional raster image does not have a portion where the number of consecutive times is “1” such as “AAABBBBCCD...”, No problem occurs. However, a problem occurs when a portion where the number of times is “1”, such as “C” of “AAABBBBBCDDE.

図6は、一次元ラスタ画像「AAABBBBCDDE・・・」が入力された場合のタイミングチャートである。   FIG. 6 is a timing chart when a one-dimensional raster image “AAABBBBCDDE...” Is input.

図示するように、回数が「1」のデータ値「C」が、第2のFF回路(Pipe1)102に入力されたとき、1クロック中で、画素濃度データFIFO141及び回数データFIFO142のそれぞれに、データが入力されることになる。そして、コード化要求が2つ発生することになる。一方、制御回路150は、画素濃度データと回数データを、順に2クロックに分けて読み出すように制御するため、「ABCDE」のように、画素濃度が不連続のデータが続く場合、FIFO回路にデータが溢れてしまう。これを回避するため、制御回路150は、データが溢れてしまう前に、データの供給元へ、データ供給の禁止要求を送ることになる。その結果、処理パフォーマンス低下する。   As shown in the figure, when the data value “C” having the number of times “1” is input to the second FF circuit (Pipe1) 102, each of the pixel density data FIFO 141 and the number of times data FIFO 142 is set in one clock. Data will be entered. Then, two encoding requests are generated. On the other hand, since the control circuit 150 controls the pixel density data and the frequency data to be read out in two clocks in order, when data with discontinuous pixel density such as “ABCDE” continues, data is sent to the FIFO circuit. Overflows. In order to avoid this, the control circuit 150 sends a data supply prohibition request to the data supply source before the data overflows. As a result, processing performance decreases.

また、FIFO回路から同時にデータを読み出すようにしても、符号化したデータのコードの最大ビット数は、13ビットであるため、画素濃度データのコード(最大13ビット)と、回数データのコード(最大13ビット)との合計が、ビット結合シフトレジスタの入力可能なビット数(最大16ビット)を超えてしまうおそれがある。だからといって、出力バス幅を増加させるのは、適用可能なシステムを制限するため好ましくない。   Further, even when data is read simultaneously from the FIFO circuit, the maximum number of bits of the encoded data code is 13 bits, so the pixel density data code (maximum 13 bits) and the number data code (maximum) 13 bits) may exceed the number of bits (maximum 16 bits) that can be input to the bit combination shift register. However, increasing the output bus width is not desirable because it limits the applicable systems.

本発明は、かかる事情に配慮すべくなされたものである。以下、本発明の一実施形態について、詳細に説明する。   The present invention has been made in consideration of such circumstances. Hereinafter, an embodiment of the present invention will be described in detail.

図1は、本発明の一実施形態が適用された画像圧縮装置100の概略構成を示す図である。かかる画像圧縮装置100は、プリンタの内部に搭載される。なお、プリンタを構成するその他の構成要素については説明を省略する。また、図4の画像圧縮装置200と同一又は類似する構成要素は、同一符号で示している。   FIG. 1 is a diagram showing a schematic configuration of an image compression apparatus 100 to which an embodiment of the present invention is applied. Such an image compression apparatus 100 is mounted inside a printer. Note that description of other components constituting the printer is omitted. Also, the same or similar components as those of the image compression apparatus 200 in FIG. 4 are denoted by the same reference numerals.

画像圧縮装置100は、図示するように、第1のFF(フリップフロップ)回路101と、第2のFF回路102と、第3のFF回路103と、第1の比較器111と、第2の比較器112と、画素濃度データFIFO(先入れ先出し)回路121と、回数データFIFO回路122と、カウンタ130と、第1の符号化回路141と、第2の符号化回路142と、データ組合回路143と、制御回路150と、マルチプレクサ160と、ビット結合シフトレジスタ150と、を備えている。   As illustrated, the image compression apparatus 100 includes a first FF (flip-flop) circuit 101, a second FF circuit 102, a third FF circuit 103, a first comparator 111, and a second comparator. Comparator 112, pixel density data FIFO (first-in first-out) circuit 121, number-of-times data FIFO circuit 122, counter 130, first encoding circuit 141, second encoding circuit 142, and data combination circuit 143 A control circuit 150, a multiplexer 160, and a bit combination shift register 150.

第1のFF回路101は、クロックに同期して、データ供給部(不図示)から出力された一次元ラスタ画像データの1画素分のデータを順次入力し、第1の比較器111と、第2のFF回路102とに順次出力する。   The first FF circuit 101 sequentially inputs data for one pixel of one-dimensional raster image data output from a data supply unit (not shown) in synchronization with the clock, and the first comparator 111, Sequentially output to the second FF circuit 102.

第2のFF回路102は、クロックに同期して、第1のFF回路101から出力されたデータを1画素ずつ順次入力し、画素濃度データFIFO121と、第3のFF回路103とに順次出力する。   The second FF circuit 102 sequentially inputs the data output from the first FF circuit 101 one pixel at a time in synchronization with the clock and sequentially outputs the data to the pixel density data FIFO 121 and the third FF circuit 103. .

第3のFF回路103は、クロックに同期して、第2のFF回路102から出力されたデータを1画素ずつ順次入力し、第2の比較器112に順次出力する。   The third FF circuit 103 sequentially inputs the data output from the second FF circuit 102 pixel by pixel in synchronization with the clock, and sequentially outputs the data to the second comparator 112.

このように、3つのFF回路101、102、103からなる3段のパイプラインを構成することで、画像圧縮装置200は、一次元ラスタ画像において、左右の画素状態を知ることができる。   In this way, by configuring a three-stage pipeline including the three FF circuits 101, 102, and 103, the image compression apparatus 200 can know the left and right pixel states in the one-dimensional raster image.

第1の比較器111は、第1のFF回路101から出力されたデータと、第2のFF回路102から出力されたデータとを比較する。そして、等しくない場合に、回数データFIFO122に対して、カウンタ130から出力されるカウンタ値のライト信号(書き込み要求信号)を出力する。また、同時に、カウンタ130に対して、カウンタリセット信号を出力する。   The first comparator 111 compares the data output from the first FF circuit 101 with the data output from the second FF circuit 102. If they are not equal, the counter value write signal (write request signal) output from the counter 130 is output to the count data FIFO 122. At the same time, a counter reset signal is output to the counter 130.

第2の比較器112は、第2のFF回路102から出力されたデータと、第3のFF回路103から出力されたデータとを比較し、等しくない場合に、画素濃度データFIFO121に対して、第2のFF回路102から出力されるデータのライト信号(書き込み要求信号)を出力する。   The second comparator 112 compares the data output from the second FF circuit 102 with the data output from the third FF circuit 103, and if not equal to the pixel density data FIFO 121, A write signal (write request signal) of data output from the second FF circuit 102 is output.

画素濃度データFIFO121は、第2のFF回路102から出力される画素濃度データを、第2の比較器112から出力されるライト信号に従って、書き込み保持する。また、制御回路150からのリード信号(読み出し要求信号)に従って、保持していた画素濃度データを、第1の符号化回路141に出力する。   The pixel density data FIFO 121 writes and holds the pixel density data output from the second FF circuit 102 in accordance with the write signal output from the second comparator 112. Further, in accordance with a read signal (read request signal) from the control circuit 150, the held pixel density data is output to the first encoding circuit 141.

回数データFIFO122は、カウンタ130から出力されるカウンタ値を、回数データとして、第1の比較器111から出力されるライト信号に従って、書き込み保持する。また、制御回路150からのリード信号(読み出し要求信号)に従って、保持していた回数データを、第2の符号化回路142に出力する。   The count data FIFO 122 writes and holds the counter value output from the counter 130 as the count data in accordance with the write signal output from the first comparator 111. Further, in accordance with the read signal (read request signal) from the control circuit 150, the held number of times data is output to the second encoding circuit 142.

第1の符号化回路141は、画素濃度データFIFO121から出力された画素濃度データを、ハフマン符号化し、符号化された画素濃度データ(画素濃度データのコード)を生成し、マルチプレクサ160に出力する。なお、第1の符号化回路141は、予め、画素濃度データ値とコード値とを対応つけたテーブル(濃度データ変換テーブル)をレジスタ内に保持しており、かかるテーブルを用いて、入力された画素濃度データ値を、対応するコード値に変換し、ハフマン符号化を行う。   The first encoding circuit 141 performs Huffman encoding on the pixel density data output from the pixel density data FIFO 121, generates encoded pixel density data (pixel density data code), and outputs the encoded pixel density data to the multiplexer 160. Note that the first encoding circuit 141 holds a table (density data conversion table) in which pixel density data values and code values are associated with each other in advance, and is input using the table. The pixel density data value is converted into a corresponding code value, and Huffman coding is performed.

図2(A)は、濃度データ変換テーブル210の構成を示す図である。濃度データ変換テーブル210には、画素濃度データ値(濃度値)211に対応する、出現確立を考慮したハフマン符号化データ(コード)212が格納されている。ハフマン符号化データ212は、出現確立が高いデータ値に対して短い符号が、出現確立が低いデータ値に対して長い符号が、それぞれ割り当てられている。   FIG. 2A is a diagram showing the configuration of the density data conversion table 210. The density data conversion table 210 stores Huffman encoded data (code) 212 corresponding to the pixel density data value (density value) 211 in consideration of appearance establishment. In the Huffman encoded data 212, a short code is assigned to a data value having a high probability of occurrence, and a long code is assigned to a data value having a low probability of occurrence.

ハフマン符号化データ212は、一般的な画像の画素濃度の出現頻度の統計値から求められたものであってもよいし、画像圧縮処理に先立って、処理対象の画像データを一旦読み込んで、画素濃度の出現頻度から予め生成されたものであってもよい。   The Huffman encoded data 212 may be obtained from a statistical value of the appearance frequency of the pixel density of a general image. Prior to the image compression process, the Huffman encoded data 212 is read once to process the image data. It may be generated in advance from the appearance frequency of the concentration.

第2の符号化回路142は、回数データFIFO122から出力された回数データを、ハフマン符号化し、符号化された回数データ(回数データのコード)を生成し、マルチプレクサ160に出力する。なお、第2の符号化回路142は、予め、回数データ値とコード値とを対応つけたテーブル(回数データ変換テーブル)をレジスタ内に保持しており、かかるテーブルを用いて、入力された回数データ値を、対応するコード値に変換し、ハフマン符号化を行う。   The second encoding circuit 142 performs Huffman coding on the frequency data output from the frequency data FIFO 122, generates encoded frequency data (code of the frequency data), and outputs the generated data to the multiplexer 160. The second encoding circuit 142 holds a table (number data conversion table) in which the number data value and the code value are associated with each other in advance in the register, and the number of times input by using this table. The data value is converted into a corresponding code value and Huffman coding is performed.

図2(B)は、回数データ変換テーブル220の構成を示す図である。回数データ変換テーブル220には、回数データ値(同一濃度の画素の連続回数)221に対応する、出現確立を考慮したハフマン符号化データ(コード)222が格納されている。ハフマン符号化データ222は、出現確立が高いデータ値に対して短い符号が、出現確立が低いデータ値に対して長い符号が、それぞれ割り当てられている。   FIG. 2B is a diagram showing the configuration of the number data conversion table 220. The number-of-times data conversion table 220 stores Huffman encoded data (code) 222 corresponding to the number-of-times data value (the number of consecutive pixels having the same density) 221 in consideration of appearance establishment. In the Huffman encoded data 222, a short code is assigned to a data value having a high occurrence probability, and a long code is assigned to a data value having a low occurrence probability.

ハフマン符号化データ222は、一般的な画像における同一濃度の画素の「連続回数」の出現頻度の統計値から求められたものであってもよいし、画像圧縮処理に先立って、処理対象の画像データを一旦読み込んで、「連続回数」の出現頻度から予め生成されたものであってもよい。   The Huffman encoded data 222 may be obtained from a statistical value of the appearance frequency of the “continuous number” of pixels having the same density in a general image, or the image to be processed prior to the image compression process. Data may be read once and generated in advance from the appearance frequency of “continuous number of times”.

データ組合回路143は、第1の符号化回路141から出力された画素濃度データのコードに、回数「1」を示すコードを付加して、マルチプレクサ160に出力する。ここで、画素濃度データのコードのビット数と、回数「1」を示すコードのビット数との合計は、ビット結合シフトレジスタ170の入力可能ビット数以下となる必要がある。すなわち、回数「1」を示すコードのビット数は、ビット結合シフトレジスタ170の入力可能ビット数(出バス幅と同じ)から、画素濃度データのコードの最大ビット数を引いて求まる値以下である。   The data combination circuit 143 adds a code indicating the number of times “1” to the code of the pixel density data output from the first encoding circuit 141 and outputs the code to the multiplexer 160. Here, the sum of the number of bits of the pixel density data code and the number of bits of the code indicating the number of times “1” needs to be equal to or less than the number of bits that can be input to the bit combination shift register 170. That is, the number of bits of the code indicating the number of times “1” is equal to or less than a value obtained by subtracting the maximum number of bits of the pixel density data code from the number of bits that can be input to the bit combination shift register 170 (same as the output bus width). .

8ビットの画素濃度データのハフマン符号化データの最大ビット数は13ビットであり、ビット結合シフトレジスタ170の出力バス幅が16ビットであることから、回数「1」を示すコードは、例えば、「101」のように、3ビットで規定されている。   Since the maximum bit number of Huffman encoded data of 8-bit pixel density data is 13 bits and the output bus width of the bit combination shift register 170 is 16 bits, the code indicating the number of times “1” is, for example, “ 101 "is defined by 3 bits.

制御回路150は、画像圧縮装置100を制御する回路である。具体的には、制御回路150は、画素濃度データFIFO121に対するデータの入力を監視し、データが入力されたことを検知すると、リード信号(読み出し要求信号)を画素濃度データFIFO121に送る。また、制御回路150は、回数データFIFO122に対するデータの入力を監視し、データが入力されたことを検知すると、リード信号(読み出し要求信号)を回数データFIFO122に送る。   The control circuit 150 is a circuit that controls the image compression apparatus 100. Specifically, the control circuit 150 monitors the input of data to the pixel density data FIFO 121 and, when detecting that data has been input, sends a read signal (read request signal) to the pixel density data FIFO 121. In addition, the control circuit 150 monitors the input of data to the number-of-times data FIFO 122 and, when detecting that data has been input, sends a read signal (read request signal) to the number-of-times data FIFO 122.

また、制御回路150は、マルチプレクサ160に対して、ビット結合シフトレジスタ170に対して出力すべきデータを選択させるため、選択制御信号を出力する。具体的には、制御回路150は、画素濃度データFIFO121に対してリード信号を出力した場合には、マルチプレクサ160に対して、第1の符号化回路141から出力されたデータ(画素濃度データのコード)をビット結合シフトレジスタ170に出力するように、選択制御信号を出力する。一方、制御回路150は、回数データFIFO122に対してリード信号を出力した場合には、マルチプレクサ160に対して、第2の符号化回路142から出力されたデータ(回数データのコード)をビット結合シフトレジスタ170に出力するように、選択制御信号を出力する。   In addition, the control circuit 150 outputs a selection control signal to cause the multiplexer 160 to select data to be output to the bit combination shift register 170. Specifically, when the control circuit 150 outputs a read signal to the pixel density data FIFO 121, the control circuit 150 outputs data (pixel density data code) output from the first encoding circuit 141 to the multiplexer 160. ) Is output to the bit combination shift register 170. On the other hand, when the control circuit 150 outputs a read signal to the number-of-times data FIFO 122, the data (number-of-times data code) output from the second encoding circuit 142 is bit-coupled to the multiplexer 160. A selection control signal is output so as to be output to the register 170.

ただし、制御回路150は、回数データFIFO回路122に入力された回数データが「1」を示す場合、画素濃度データFIFO121及び回数データFIFO122に対して、同時に、リード信号を送る。また、同時に、マルチプレクサ160に対して、データ組合回路143から出力されたデータ(画素濃度データのコード+「1回」を示すコード)を、ビット結合シフトレジスタ170に出力するように、選択制御信号を出力する。   However, when the count data input to the count data FIFO circuit 122 indicates “1”, the control circuit 150 simultaneously sends a read signal to the pixel density data FIFO 121 and the count data FIFO 122. At the same time, the selection control signal is output so that the data output from the data combination circuit 143 (the code of the pixel density data + the code indicating “once”) is output to the bit combination shift register 170 to the multiplexer 160. Is output.

マルチプレクサ160は、制御回路150からの選択制御命令に従って、第1の符号化回路141からのデータ、及び第2の符号化回路142からのデータ、のうちのいずれかを、ビット結合シフトレジスタ170に出力する。   The multiplexer 160 transfers either the data from the first encoding circuit 141 or the data from the second encoding circuit 142 to the bit combination shift register 170 in accordance with the selection control command from the control circuit 150. Output.

ビット結合シフトレジスタ170は、画像圧縮装置200の外部へ、一次元ラスタ画像の圧縮データを出力する回路である。ビット結合シフトレジスタ170は、マルチプレクサ160から出力されたデータを、順次結合し、外部の装置(例えば、画像メモリ)に出力する。   The bit combination shift register 170 is a circuit that outputs compressed data of a one-dimensional raster image to the outside of the image compression apparatus 200. The bit combination shift register 170 sequentially combines the data output from the multiplexer 160 and outputs the combined data to an external device (for example, an image memory).

以上、画像圧縮装置100の概略構成について説明した。   The schematic configuration of the image compression apparatus 100 has been described above.

図3は、かかる画像圧縮装置100の動作の流れを示すフローチャートである。   FIG. 3 is a flowchart showing an operation flow of the image compression apparatus 100.

制御回路150は、画素濃度データFIFO121にデータがあるか否か監視し(S11)、データがある場合(S11でY)、回数データFIFO122に、回数「1」を示すデータがあるか否か判定する(S12)。   The control circuit 150 monitors whether there is data in the pixel density data FIFO 121 (S11). If there is data (Y in S11), the control circuit 150 determines whether there is data indicating the number of times “1” in the number of times data FIFO 122. (S12).

回数「1」を示すデータがない場合(S12でN)、制御回路150は、画素濃度データFIFO121にリード信号を送り、マルチプレクサ160に、第1の符号化回路141から出力された画素濃度データのコードを出力するように選択制御信号を送る(S13)。これにより、マルチプレクサ160は、画素濃度データのコードを選択し、ビット結合シフトレジスタ170に出力する。その後、制御回路150は、回数データFIFO122に、回数データが格納されるのを待機し(S14)、データが格納されると(S14でY)、回数データFIFO121にリード信号を送り、マルチプレクサ160に、第2の符号化回路142から出力された回数データのコードを出力するように選択制御信号を送る(S15)。これにより、マルチプレクサ160は、回数データのコードを選択し、ビット結合シフトレジスタ170に出力する。その後、制御回路150は、S11に戻り、制御を継続する。   When there is no data indicating the number of times “1” (N in S12), the control circuit 150 sends a read signal to the pixel density data FIFO 121, and the multiplexer 160 receives the pixel density data output from the first encoding circuit 141. A selection control signal is sent to output a code (S13). As a result, the multiplexer 160 selects the code of the pixel density data and outputs it to the bit combination shift register 170. Thereafter, the control circuit 150 waits for the count data to be stored in the count data FIFO 122 (S14). When the data is stored (Y in S14), the control circuit 150 sends a read signal to the count data FIFO 121 to the multiplexer 160. The selection control signal is sent so as to output the code of the number-of-times data output from the second encoding circuit 142 (S15). As a result, the multiplexer 160 selects the code of the number data and outputs it to the bit combination shift register 170. Thereafter, the control circuit 150 returns to S11 and continues control.

一方、回数「1」を示すデータがある場合(S12でY)、制御回路150は、画素濃度データFIFO121及び回数データFIFO122の両方に同時にリード信号を送る。また同時に、マルチプレクサ160に、データ組合回路143から出力されたコード(画素濃度データのコード+回数「1」を示すコード)を選択して、ビット結合シフトレジスタ170に出力するように選択制御信号を送る(S16)。これにより、画素濃度データFIFO121及び回数データFIFO122からデータが読み出されるとともに、マルチプレクサ160は、データ組合回路143からのコードを選択し、ビット結合シフトレジスタ170に出力する。その後、制御回路150は、S11に戻り、制御を継続する。   On the other hand, when there is data indicating the number of times “1” (Y in S12), the control circuit 150 simultaneously sends a read signal to both the pixel density data FIFO 121 and the number of times data FIFO 122. At the same time, the multiplexer 160 selects the code output from the data combination circuit 143 (the pixel density data code + the code indicating the number of times “1”) and outputs a selection control signal to the bit combination shift register 170. Send (S16). As a result, data is read from the pixel density data FIFO 121 and the number-of-times data FIFO 122, and the multiplexer 160 selects the code from the data combination circuit 143 and outputs it to the bit combination shift register 170. Thereafter, the control circuit 150 returns to S11 and continues control.

上記実施形態によれば、同一画素が連続しない場合、画素濃度データFIFO121及び回数データFIFO122のデータは同時に読み出されるので、データが溢れることがない。   According to the above embodiment, when the same pixel is not continuous, the data of the pixel density data FIFO 121 and the number-of-times data FIFO 122 are read at the same time, so that the data does not overflow.

また、「同一濃度の画素が1回である」ことを示すコードを3ビット以内とするので、画像濃度データのコードが最大ビット数(13ビット)であったとしても、ビット結合シフトレジスタ170の入力可能ビット数(13ビット)を超えることがない。したがって、上述した従来の画像圧縮装置200で生じる問題が発生しない。   In addition, since the code indicating that “the pixel of the same density is once” is within 3 bits, even if the code of the image density data is the maximum number of bits (13 bits), the bit combination shift register 170 The number of inputtable bits (13 bits) is not exceeded. Therefore, the problem that occurs in the above-described conventional image compression apparatus 200 does not occur.

本発明の画像圧縮装置は、上記実施形態に制限されない。本発明の技術的思想の範囲内で様々な変形が可能である。   The image compression apparatus of the present invention is not limited to the above embodiment. Various modifications are possible within the scope of the technical idea of the present invention.

また、プリンタだけでなく、プリンタ機能、スキャナ機能、コピー機能、及びファクシミリ機能などの少なくとも2つの機能を備えた複合機の画像圧縮回路として適用することができる。   Further, the present invention can be applied as an image compression circuit of a multifunction machine having at least two functions such as a printer function, a scanner function, a copy function, and a facsimile function as well as a printer.

画像圧縮装置の構成を示すブロック図。1 is a block diagram illustrating a configuration of an image compression device. データ変換テーブルの構成例を示す図。The figure which shows the structural example of a data conversion table. 画像圧縮装置の動作のフロー図。The flowchart of operation | movement of an image compression apparatus. 従来の画像圧縮装置の構成を示すブロック図。The block diagram which shows the structure of the conventional image compression apparatus. 従来の画像圧縮装置の問題点を説明するための図。The figure for demonstrating the problem of the conventional image compression apparatus. 従来の画像圧縮装置の問題点を説明するための図。The figure for demonstrating the problem of the conventional image compression apparatus.

符号の説明Explanation of symbols

100…画像圧縮装置、101…第1のFF回路、102…第2のFF回路、103…第3のFF回路、111…第1の比較器、112…第2の比較器、121…画像濃度データFIFO回路、122…回数データFIFO回路、130…カウンタ、140…制御回路、141…第1の符号化回路、142…第2の符号化回路、143…データ組合回路、150…制御回路、160…マルチプレクサ、170…ビット結合シフトレジスタ、200…画像圧縮装置 DESCRIPTION OF SYMBOLS 100 ... Image compression apparatus, 101 ... 1st FF circuit, 102 ... 2nd FF circuit, 103 ... 3rd FF circuit, 111 ... 1st comparator, 112 ... 2nd comparator, 121 ... Image density Data FIFO circuit, 122 ... Count data FIFO circuit, 130 ... Counter, 140 ... Control circuit, 141 ... First encoding circuit, 142 ... Second encoding circuit, 143 ... Data combination circuit, 150 ... Control circuit, 160 ... Multiplexer, 170 ... Bit combination shift register, 200 ... Image compression apparatus

Claims (6)

画素濃度を示す画素濃度データと、同一濃度の画素の連続回数を示す回数データと、を用いて、一次元ラスタ画像圧縮される画像圧縮装置であって、
前記画素濃度データ保持される画素濃度データ保持回路と、
前記回数データ保持される回数データ保持回路と、
前記画素濃度データ保持回路に保持された前記画素濃度データが符号化される第1の符号化回路と、
前記回数データ保持回路に保持された前記回数データが符号化される第2の符号化回路と、
前記符号化された画素濃度データと前記符号化された回数データとに基づき、前記一次元ラスタ画像の圧縮データが生成される出力回路と、
前記同一濃度の画素が連続しない場合に、前記符号化された画素濃度データに、前記圧縮データのビット数が前記出力回路の出力バス幅以下となるように予め定められた符号化された回数データが組み合わされるデータ組合回路と、を備える
ことを特徴とする画像圧縮装置。
By using the pixel density data of a pixel density, the number of times data indicating the number of continuous pixels of the same density, and an image compression apparatus one-dimensional raster image is compressed,
And pixel density data holding circuit the pixel density data is held,
The number of times the data holding circuit the number of times data is held,
A first encoding circuit in which the pixel density data held in the pixel density data holding circuit is encoded,
A second encoding circuit in which the number of times data held in the count data holding circuit is encoded,
An output circuit for generating compressed data of the one-dimensional raster image based on the encoded pixel density data and the encoded number of times data;
When the pixels having the same density are not consecutive , the encoded number of times data that is determined in advance so that the number of bits of the compressed data is less than or equal to the output bus width of the output circuit is included in the encoded pixel density data. And a data combination circuit combined with each other .
請求項1に記載の画像圧縮装置であって、
前記同一濃度の画素の連続回数が1であることを示す符号化された回数データは、そのビット数が、前記出力回路の出力バス幅から前記符号化された画素濃度データのビット数の最大値を引いて求まるビット数以下となるように定められている
ことを特徴とする画像圧縮装置。
The image compression apparatus according to claim 1,
The encoded number data indicating that the number of consecutive pixels of the same density is 1, the number of bits is the maximum value of the number of bits of the encoded pixel density data from the output bus width of the output circuit. An image compression apparatus characterized by being set to be equal to or less than the number of bits obtained by subtracting.
画素濃度を示す画素濃度データと、同一濃度の画素の連続回数を示す回数データと、を用いて、一次元ラスタ画像を圧縮する画像圧縮装置であって、
前記画素濃度データを書き込み保持する画素濃度データ保持回路と、
前記回数データを書き込み保持する回数データ保持回路と、
前記画素濃度データを符号化する第1の符号化回路と、
前記回数データを符号化する第2の符号化回路と、
前記第1の符号化回路から出力された符号化された画素濃度データに、連続回数が1であることを示す符号化された回数データを組み合わせるデータ組合回路と、
前記第1の符号化回路、前記第2の符号化回路、及び前記データ組合回路から出力されるデータを入力し、選択して出力する選択回路と、
前記画素濃度データ保持回路、前記回数データ保持回路、及び前記データ選択回路を制御する制御回路と、
前記選択回路から出力されたデータを出力する所定の出力バス幅を備えた出力回路と、
を備え、
前記連続回数が1であることを示す符号化された回数データは、
そのビット数が、前記出力回路の出力バス幅から前記符号化された画素濃度データのビット数の最大値を引いて求まるビット数以下となるように定められており、
前記制御回路は、
前記画素濃度データ保持回路に前記画素濃度データが保持された場合、当該画素濃度データ保持回路に対して、当該画素濃度データを前記第1の符号化回路に出力するように制御し、
前記回数データ保持回路に前記回数データが保持された場合、当該回数データ保持回路に対して、当該回数データを前記第2の符号化回路に出力するように制御し、
前記回数データ保持回路の回数データが1以外を示す場合、前記選択回路に対して、前記第1の符号化回路から出力される符号化された画素濃度データ、及び前記第2の符号化回路から出力される符号化された回数データのうち入力されたデータを、前記出力回路に出力するように制御し、
前記回数データ保持回路の回数データが1を示す場合、前記選択回路に対して、前記データ組合回路から出力されたデータを前記出力回路に出力するように制御する、
ことを特徴とする画像圧縮装置。
An image compression apparatus that compresses a one-dimensional raster image using pixel density data indicating pixel density and frequency data indicating the number of consecutive times of pixels having the same density,
A pixel density data holding circuit for writing and holding the pixel density data;
A frequency data holding circuit for writing and holding the frequency data;
A first encoding circuit for encoding the pixel density data;
A second encoding circuit for encoding the count data;
A data combination circuit that combines encoded pixel density data output from the first encoding circuit with encoded number data indicating that the number of consecutive times is one;
A selection circuit for inputting, selecting and outputting data output from the first encoding circuit, the second encoding circuit, and the data combination circuit;
A control circuit for controlling the pixel density data holding circuit, the number-of-times data holding circuit, and the data selection circuit;
An output circuit having a predetermined output bus width for outputting data output from the selection circuit;
With
The encoded number data indicating that the continuous number is 1,
The number of bits is determined to be equal to or less than the number of bits obtained by subtracting the maximum value of the number of bits of the encoded pixel density data from the output bus width of the output circuit,
The control circuit includes:
When the pixel density data is held in the pixel density data holding circuit, the pixel density data holding circuit is controlled to output the pixel density data to the first encoding circuit,
When the number data holding circuit holds the number data, the number data holding circuit is controlled to output the number data to the second encoding circuit,
When the number data of the number data holding circuit indicates other than 1, the encoded pixel density data output from the first encoding circuit and the second encoding circuit are output to the selection circuit. Control the input data out of the encoded number of times output to be output to the output circuit,
When the number data of the number data holding circuit indicates 1, the selection circuit is controlled to output the data output from the data combination circuit to the output circuit.
An image compression apparatus.
請求項1〜3のいずれか一項に記載の画像圧縮装置であって、
所定の周期で前記画素濃度データを入力し順に出力する第1のフリップフロップ回路と、
前記所定の周期で前記第1のフリップフロップ回路から出力された画素濃度データを入力し順に出力する第2のフリップフロップ回路と、
前記所定の周期で前記第2のフリップフロップ回路から出力された画素濃度データを入力し順に出力する第3のフリップフロップ回路と、
前記第1のフリップフロップ回路から出力された画素濃度データと、前記第2のフリップフロップ回路から出力された画素濃度データと、を比較し、等しくない場合に、回数データ書き込み信号を出力する第1の比較回路と、
前記第2のフリップフロップ回路から出力される画素濃度データと、前記第3のフリップフロップ回路の出力する画素濃度データと、を比較し、等しくない場合に、画素濃度データ書き込み信号を出力する第2の比較回路と、
前記所定の周期でカウント値を増加させるとともに、前記回数データ書込み信号が出力された場合に、前記カウンタ値をリセットするカウンタ回路と、を備え、
前記画素濃度データ保持回路は、
FIFO回路で構成され、
前記画素濃度データ書込み信号が出力された場合に、前記第2のフリップフロップ回路から出力された画素濃度データを書き込み保持し、
前記回数データ保持回路は、
FIFO回路で構成され、
前記回数データ書込み信号が出力された場合に、前記カウンタ回路から出力されたカウンタ値を回数データとして書き込み保持する、
ことを特徴とする画像圧縮装置。
The image compression apparatus according to any one of claims 1 to 3,
A first flip-flop circuit that inputs and outputs the pixel density data in a predetermined cycle in order;
A second flip-flop circuit that inputs pixel density data output from the first flip-flop circuit at the predetermined cycle and sequentially outputs the pixel density data;
A third flip-flop circuit that inputs pixel density data output from the second flip-flop circuit at the predetermined cycle and sequentially outputs the pixel density data;
The pixel density data output from the first flip-flop circuit and the pixel density data output from the second flip-flop circuit are compared. If they are not equal, a first data write signal is output. A comparison circuit of
The pixel density data output from the second flip-flop circuit and the pixel density data output from the third flip-flop circuit are compared. If they are not equal, a second pixel density data write signal is output. A comparison circuit of
A counter circuit that increments the count value at the predetermined period and resets the counter value when the count data write signal is output,
The pixel density data holding circuit includes:
It consists of a FIFO circuit,
When the pixel density data write signal is output, the pixel density data output from the second flip-flop circuit is written and held,
The number of times data holding circuit is
It consists of a FIFO circuit,
When the count data write signal is output, the counter value output from the counter circuit is written and held as count data.
An image compression apparatus.
請求項1〜4のいずれか一項に記載の画像圧縮装置を備えたプリンタ。   The printer provided with the image compression apparatus as described in any one of Claims 1-4. 請求項1〜5のいずれか一項に記載の画像圧縮装置を備え、かつ、
プリンタ機能、スキャナ機能、コピー機能、及びファクシミリ機能のうち少なくとも2つの機能を備えた複合機。
Comprising the image compression apparatus according to any one of claims 1 to 5, and
A multifunction machine having at least two functions of a printer function, a scanner function, a copy function, and a facsimile function.
JP2007306958A 2007-11-28 2007-11-28 Image compression apparatus, printer, and multifunction machine Expired - Fee Related JP4941254B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007306958A JP4941254B2 (en) 2007-11-28 2007-11-28 Image compression apparatus, printer, and multifunction machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007306958A JP4941254B2 (en) 2007-11-28 2007-11-28 Image compression apparatus, printer, and multifunction machine

Publications (2)

Publication Number Publication Date
JP2009130889A JP2009130889A (en) 2009-06-11
JP4941254B2 true JP4941254B2 (en) 2012-05-30

Family

ID=40821316

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007306958A Expired - Fee Related JP4941254B2 (en) 2007-11-28 2007-11-28 Image compression apparatus, printer, and multifunction machine

Country Status (1)

Country Link
JP (1) JP4941254B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5278499B2 (en) 2011-06-03 2013-09-04 株式会社デンソー Gas sensor element and gas sensor using the same

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2924964B2 (en) * 1988-09-02 1999-07-26 富士ゼロックス株式会社 Image information encoding device, image information decoding device, and image information encoding / decoding device

Also Published As

Publication number Publication date
JP2009130889A (en) 2009-06-11

Similar Documents

Publication Publication Date Title
US6014095A (en) Variable length encoding system
US6798833B2 (en) Video frame compression/decompression hardware system
JP3022784B2 (en) High-speed variable-length decoding device
EP2648411A1 (en) Image encoding device, and image encoding method
JPH11266460A (en) Video information processing circuit
JPH08251586A (en) Run length decoder
US5752266A (en) Method controlling memory access operations by changing respective priorities thereof, based on a situation of the memory, and a system and an integrated circuit implementing the method
JP2014155170A (en) Image processing device
US7929777B2 (en) Variable length decoding device, variable length decoding method and image capturing system
JP4941254B2 (en) Image compression apparatus, printer, and multifunction machine
EP0229379A2 (en) Digital picture signal coding/decoding circuit
JP3406550B2 (en) Arithmetic encoding device and arithmetic decoding device
CN101729714B (en) Encoding device, decoding device, image forming device and method
JP5845202B2 (en) Image compression apparatus and image processing system
JP2009239852A (en) Image processing apparatus and image processing method
KR0176537B1 (en) Memory interface method and circuit for variable length decoder
CN101064515B (en) Methods to Improve Decoding Performance
JP4095454B2 (en) Data decoding apparatus and data decoding method
JPH05244438A (en) Compression expansion circuit
JP3224127B2 (en) Image data conversion processor
JP3772557B2 (en) Variable length code decoding method and apparatus capable of bidirectional decoding
JP2007235851A (en) Image processing device, image processing method, program, and recording medium
JPS5883473A (en) Picture signal encoding system
JPS60251763A (en) Magnifying and reducing circuit of facsimile information
JP4461859B2 (en) Run-length code decoding apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100901

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110628

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110809

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111220

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120105

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120131

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120213

R150 Certificate of patent or registration of utility model

Ref document number: 4941254

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150309

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees