JPH06332667A - Encoding device - Google Patents

Encoding device

Info

Publication number
JPH06332667A
JPH06332667A JP12398093A JP12398093A JPH06332667A JP H06332667 A JPH06332667 A JP H06332667A JP 12398093 A JP12398093 A JP 12398093A JP 12398093 A JP12398093 A JP 12398093A JP H06332667 A JPH06332667 A JP H06332667A
Authority
JP
Japan
Prior art keywords
encoder
encoding
encoded
data
counter
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
JP12398093A
Other languages
Japanese (ja)
Inventor
Yuji Minami
裕治 南
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 JP12398093A priority Critical patent/JPH06332667A/en
Publication of JPH06332667A publication Critical patent/JPH06332667A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To always execute optimal encoding for input data. CONSTITUTION:This device is provided with a first encoder 1 for encoding input data, a first memory 2 for storing encoded data in a prescribed encoding interval from a first encoder 1, a first counter 3 for counting the encoded data quantity encoded by a first encoder 1, a second encoder 4 for executing encoding which is different from first encoding for the input data, a second memory 5 for storing the encoded data in the prescribed encoding interval from a second encoder 4, a second counter 6 for counting the encoded data quantity encoded by a second encoder 4, and a selector 8 for comparing count values of a first and a second counters at every prescribed encoding interval and fetching the encoded data responding to a smaller count value from one of two memories 2, 5.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は符号化装置に関する。FIELD OF THE INVENTION The present invention relates to a coding device.

【0002】[0002]

【従来の技術】例えば電子ファイル等の画像データの圧
縮に符号化装置が使用される。このような符号化装置に
おいては、図5に示すように単に、1系統の符号化器5
0により符号化が行われていた。
2. Description of the Related Art Encoding devices are used to compress image data such as electronic files. In such an encoding device, as shown in FIG.
It was encoded by 0.

【0003】[0003]

【発明が解決しようとする課題】上述のように従来例で
は、入力データに対し、単に1系統の符号化を行ってい
た。したがって、入力データに対し、必ずしも符号化の
最適化が行われず、符号長が長くなることがあった。例
えばMR符号化を選択した場合、従来ではkパラメータ
を設定しているため、本来前走査ラインに対し、2次元
符号化を行った方が符号長が短くなる場合でも一次元符
号化が行われ、逆に前走査ラインとの相関がなく一次元
符号化を行うべきラインでも二次元符号化が行われ、符
号長が長くなってしまっていた。
As described above, in the conventional example, the input data is simply encoded by one system. Therefore, the input data is not necessarily optimized for encoding, and the code length sometimes becomes long. For example, when MR coding is selected, since the k parameter is conventionally set, one-dimensional coding is originally performed even when the code length of the previous scan line is shorter when the two-dimensional coding is performed. On the contrary, two-dimensional encoding is performed even on a line that should be subjected to one-dimensional encoding and has no correlation with the previous scanning line, resulting in a long code length.

【0004】MR符号化の例ににおいては、相関のなく
なったラインにおいては二次元拡張モードがあり、特殊
符号の付加により以降のコードを一次元コード的に取扱
うモードも存在するが、あくまで拡張コードであり、デ
コード処理用のLSIまたはソフトウェアにおいて対応
していないものもあり、復号できない場合があった。
In the example of MR encoding, there is a two-dimensional extension mode in the line where the correlation is lost, and there is also a mode in which the subsequent code is treated as a one-dimensional code by the addition of the special code. However, some LSIs or software for decoding processing are not compatible, and there are cases where decoding is not possible.

【0005】本発明の目的は以上のような問題を解消し
た符号化装置を提供することにある。
An object of the present invention is to provide an encoding device that solves the above problems.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
本発明は入力データを符号化する第1の符号化器と、該
第1の符号化器からの所定符号化区間内の符号化データ
を記憶する第1のメモリと、前記第1の符号化器で符号
化された符号化データ量をカウントする第1のカウンタ
と、入力データに対して前記第1の符号化と異なる符号
化を行う第2の符号化器と、該第2の符号化器からの所
定符号化区間内の符号化データを記憶する第2のメモリ
と、前記第2の符号化器で符号化された符号化データ量
をカウントする第2のカウンタと、所定符号化区間毎に
前記第1および第2のカウンタのカウント値を比較し
て、少ないカウント値に応答する符号化データを前記2
つのメモリのいずれかから取り出す手段とを具えたこと
を特徴とする。
In order to achieve the above object, the present invention provides a first encoder for encoding input data, and encoded data within a predetermined encoding section from the first encoder. For storing input data, a first counter for counting the amount of encoded data encoded by the first encoder, and an encoding different from the first encoding for input data. A second encoder for performing, a second memory for storing encoded data in a predetermined encoding section from the second encoder, and an encoding encoded by the second encoder The second counter that counts the amount of data is compared with the count values of the first and second counters for each predetermined encoding interval, and the encoded data that responds to the smaller count value is compared with the second counter.
And a means for taking out from any one of the two memories.

【0007】[0007]

【作用】本発明によれば、例えば入力データとしての各
走査ラインの符号化を2系統の異なる符号化で行い、そ
の各々を走査ライン毎にメモリを設けて一時保存すると
同時にこの走査ライン毎の符号化データ量を各カウンタ
で係数し、1走査ライン終了毎に、この2つの係数値を
比較し、少ない系数値の方の符号化を選択して、前記メ
モリより読み出し、符号化の最適化を行う。さらに、M
R符号化においては、kパラメータを固定することなく
前記符号化の最適化により、kパラメータを1より無限
大まで適時可変させることにより最適化する。
According to the present invention, for example, each scan line as input data is encoded by two different encoding systems, and each of them is provided with a memory for each scan line and temporarily stored, and at the same time, each scan line is encoded. The coded data amount is coefficientd by each counter, the two coefficient values are compared at the end of each scanning line, the coding with the smaller system numerical value is selected, and the coded data is read from the memory to optimize the coding. I do. Furthermore, M
In the R coding, the k parameter is not fixed and the k parameter is optimized by timely varying the k parameter from 1 to infinity.

【0008】[0008]

【実施例】以下、図面を参照して本発明の実施例を詳細
に説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0009】図1は、本発明の特徴を最もよく表わす図
面であり、同図において、1は第1の符号化器、2は第
1の符号化器1を走査ライン毎に一時記憶するメモリ、
3は符号化器1の符号化結果を走査ライン毎にカウント
するカウンタ、4は符号化器1と異なる符号化を行う第
2の符号化器、5は符号化器4の符号化結果を走査ライ
ン毎に一時記憶するメモリ、6は符号化器4の出力結果
を走査ライン毎にカウントするカウンタ、7はカウンタ
3とカウンタ6のカウント結果を比較し、出力数の少な
い符号化結果を選択する信号を発生する比較器、8は比
較器7の出力によりメモリ2またはメモリ5の出力を選
択するセレクタである。
FIG. 1 is a drawing best showing the features of the present invention. In FIG. 1, 1 is a first encoder and 2 is a memory for temporarily storing the first encoder 1 for each scanning line. ,
Reference numeral 3 is a counter for counting the encoding result of the encoder 1 for each scanning line, 4 is a second encoder for performing encoding different from that of the encoder 1, and 5 is a scanning result of the encoder 4 A memory for temporarily storing for each line, 6 a counter for counting the output result of the encoder 4 for each scanning line, 7 for comparing the count results of the counter 3 and the counter 6, and selecting an encoding result with a small number of outputs. A comparator for generating a signal and a selector 8 for selecting the output of the memory 2 or the memory 5 by the output of the comparator 7.

【0010】図2は図1で示す本実施例をさらに詳細に
したものであり、9はカウンタ、10はライン毎のカウ
ンタ9の出力を保持するラッチであって、これらはカウ
ンタ3を構成する。11はカウンタ、12はカウンタ1
1の出力を保持するラッチであって、これらはカウンタ
6を構成する。13は前記ラッチ10,12を選択する
セレクタ、14は1ラインデータの読み出し用ダウンカ
ウンタである。
FIG. 2 shows the embodiment shown in FIG. 1 in more detail. Reference numeral 9 is a counter, 10 is a latch for holding the output of the counter 9 for each line, and these constitute the counter 3. . 11 is a counter, 12 is a counter 1
Latches which hold the output of 1 and which form a counter 6. Reference numeral 13 is a selector for selecting the latches 10 and 12, and 14 is a down counter for reading 1 line data.

【0011】入力されたデータは、符号化器1および符
号化器4へ与えられ、それぞれの符号化が行われる。符
号化器1の出力はメモリ2およびカウンタ9に与えら
れ、符号化器4の出力は、メモリ5およびカウンタ11
に与えられる。メモリ2およびメモリ5にFIFO(フ
ァーストインファーストアウト)メモリを使用すれば回
路は簡略化される。
The input data is given to the encoder 1 and the encoder 4, and the respective data are encoded. The output of the encoder 1 is given to the memory 2 and the counter 9, and the output of the encoder 4 is the memory 5 and the counter 11.
Given to. If FIFO (first in first out) memories are used for the memories 2 and 5, the circuit is simplified.

【0012】メモリ2およびメモリ5へは各符号化器の
出力が1ライン分保持されると同時にカウンタ9および
カウンタ11により1ライン分の符号化データ量が計数
される。1ライン終了時、この計数量はそれぞれラッチ
10およびラッチ12へ保持され、比較器7により比較
され、データ量の少ない符号化のメモリがセレクタ8に
より選択されると同時にデータ量もセレクタ13を介し
てカウンタ14へ与えられる。
The outputs of the encoders are held in the memories 2 and 5 for one line, and at the same time, the encoded data amount for one line is counted by the counter 9 and the counter 11. At the end of one line, the count amounts are held in the latches 10 and 12, respectively, and are compared by the comparator 7, and the encoding memory having a small data amount is selected by the selector 8 and the data amount is also transmitted through the selector 13. Are given to the counter 14.

【0013】次ライン入力が開始されると同時にデータ
量はカウンタ14にラッチされる。同時にカウンタ9お
よびカウンタ11の値はクリアされ、またメモリ2,5
のうち、使用されないメモリはクリアされ、次ラインデ
ータは前述の動作を繰り返す。
At the same time when the next line input is started, the data amount is latched in the counter 14. At the same time, the values of the counter 9 and the counter 11 are cleared, and the memories 2, 5
Among them, the unused memory is cleared and the next line data repeats the above operation.

【0014】使用すべきメモリは、カウンタ14の値分
だけ読み出され、これ以降の処理へ渡されることにな
る。
The memory to be used is read by the value of the counter 14 and passed to the subsequent processing.

【0015】符号化器1にMR符号化の一次元符号化を
符号化器4にMR符号化の二次元符号化を選べば、常に
一次元符号化と二次元符号化によるデータ量の少ない符
号化を選択することになり、データ量に適合した最適な
可変kパラメータ方式のMR符号化が行われることにな
る。
If one-dimensional encoding of MR encoding is selected for the encoder 1 and two-dimensional encoding of MR encoding is selected for the encoder 4, a code with a small amount of data due to one-dimensional encoding and two-dimensional encoding is always available. Therefore, the MR coding of the optimum variable k parameter system suitable for the data amount is performed.

【0016】(他の実施例)図3は本発明の他の実施例
を示す図面であり、図4はそのタイミング図である。図
3において、15は入力データの一時保存用メモリ、1
6は入力データと一時保存用メモリ15からの出力を符
号化タイミング信号により切り換えるセレクタである。
他の構成は図1と同様である。
(Other Embodiment) FIG. 3 is a view showing another embodiment of the present invention, and FIG. 4 is a timing chart thereof. In FIG. 3, 15 is a memory for temporarily storing input data, 1
Reference numeral 6 is a selector for switching between the input data and the output from the temporary storage memory 15 according to an encoding timing signal.
Other configurations are the same as those in FIG.

【0017】入力データは最初セレクタ16を介し符号
化器1および符号化器4に与えられ、各々の符号化器の
出力はライン毎にカウンタ3,6により計数され、符号
化タイミング信号の立ち上がりエッジでラッチされ、比
較器7へ送られる。比較器7によって比較され最適な符
号化器がセレクタ8により選択されるとともにセレクタ
16によってメモリ15からの出力が選択され、符号化
される。
The input data is first supplied to the encoder 1 and the encoder 4 via the selector 16, and the output of each encoder is counted by the counters 3 and 6 for each line, and the rising edge of the encoding timing signal. Latched by and sent to the comparator 7. The comparator 7 compares and the optimum encoder is selected by the selector 8 and the output from the memory 15 is selected by the selector 16 and encoded.

【0018】従って、本構成によればセレクタ16を介
してメモリ15を2つの符号化器の前に置くので第1の
実施例に比較してメモリを1系統分少なくすることがで
きる。
Therefore, according to this structure, since the memory 15 is placed in front of the two encoders via the selector 16, the memory can be reduced by one system as compared with the first embodiment.

【0019】以上のように二つの符号化を行いこの生成
データの少ない方を各々の符号化の1ライン毎のカウン
ト数を比較し、順次選択することによりライン毎の符号
化の最適化が計られ、符号化長を短くすることができ
る。さらに、符号化にMR符号化の一次元符号化と二次
元符号化を選択することにより、可変kパラメータによ
る最適な符号化が可能になり、かつ復号時にはEOL符
号の次ビットが一次元,二次元符号の区別になるだけな
ので、従来のMR復号LSI,ソフトウェアが使用でき
MMR符号化よりも効率の良い符号化が可能になる。
As described above, the two codings are performed, and the smaller one of the generated data is compared with the count number for each line of each coding and sequentially selected to optimize the coding for each line. Therefore, the coding length can be shortened. Furthermore, by selecting one-dimensional encoding and two-dimensional encoding of MR encoding as the encoding, it is possible to perform optimal encoding with a variable k parameter, and at the time of decoding, the next bit of the EOL code is one-dimensional or two-dimensional. Since only the dimensional codes are distinguished, conventional MR decoding LSI and software can be used, and more efficient encoding than MMR encoding becomes possible.

【0020】また第1の実施例の構成は、一度の符号化
でメモリに保持されるため、ほぼリアルタイム性をもっ
た高速の最適な符号化が可能になる。
Further, since the configuration of the first embodiment is held in the memory by one-time encoding, it is possible to perform high-speed optimal encoding with almost real-time property.

【0021】[0021]

【発明の効果】以上説明したように本発明によれば、入
力データに対して常に最適符号化が行える。
As described above, according to the present invention, optimum coding can always be performed on input data.

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

【図1】本発明の実施例のブロック図である。FIG. 1 is a block diagram of an embodiment of the present invention.

【図2】同実施例の詳細ブロック図である。FIG. 2 is a detailed block diagram of the embodiment.

【図3】他の実施例のブロック図である。FIG. 3 is a block diagram of another embodiment.

【図4】同実施例のタイミング図である。FIG. 4 is a timing diagram of the embodiment.

【図5】従来例を示す図である。FIG. 5 is a diagram showing a conventional example.

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

1,4 符号化器 2,5,15 メモリ 3,6,9,11,14 カウンタ 8,13,16 セレクタ 10,12 ラッチ 1,4 Encoder 2,5,15 Memory 3,6,9,11,14 Counter 8,13,16 Selector 10,12 Latch

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 入力データを符号化する第1の符号化器
と、該第1の符号化器からの所定符号化区間内の符号化
データを記憶する第1のメモリと、前記第1の符号化器
で符号化された符号化データ量をカウントする第1のカ
ウンタと、入力データに対して前記第1の符号化と異な
る符号化を行う第2の符号化器と、該第2の符号化器か
らの所定符号化区間内の符号化データを記憶する第2の
メモリと、前記第2の符号化器で符号化された符号化デ
ータ量をカウントする第2のカウンタと、所定符号化区
間毎に前記第1および第2のカウンタのカウント値を比
較して、少ないカウント値に応答する符号化データを前
記2つのメモリのいずれかから取り出す手段とを具えた
ことを特徴とする符号化装置。
1. A first encoder for encoding input data, a first memory for storing encoded data in a predetermined encoding section from the first encoder, and the first encoder. A first counter that counts the amount of encoded data encoded by the encoder, a second encoder that encodes the input data different from the first encoding, and the second encoder. A second memory for storing coded data in a predetermined coding section from the encoder, a second counter for counting the amount of coded data encoded by the second encoder, and a predetermined code A code for comparing the count values of the first and second counters for each of the coded intervals and taking out the coded data corresponding to the small count value from either of the two memories. Device.
【請求項2】 請求項1において、前記第1の符号化器
によってMR一次元符号化を行い、前記第2の符号化器
によってMR符号化を行い、入力データのうちの第1の
走査ラインのみ前記第1の符号化器によってMR一次元
符号化を行い、他の走査ラインについては前記第2の符
号化器におけるMR符号のkパラメータを∞に設定して
符号化を行い、前記第1の符号化を選択した場合のEO
LデータはEOL+“1”とし、前記第2の符号化を選
択した場合はEOL+“0”として、入力データに対し
て可変kパラメータ化MR符号化を行うことを特徴とす
る符号化装置。
2. The first scan line of the input data according to claim 1, wherein MR one-dimensional encoding is performed by the first encoder, MR encoding is performed by the second encoder. MR one-dimensional encoding is performed by the first encoder only, and the other scan lines are encoded by setting the k parameter of the MR code in the second encoder to ∞ and performing the first encoding. EO when encoding is selected
An encoding device, wherein L data is EOL + “1”, and when the second encoding is selected, it is EOL + “0”, and variable k parameterized MR encoding is performed on the input data.
【請求項3】 請求項2において、前記第1の符号化器
を前記第2の符号化器の一次元符号化部と共有したこと
を特徴とする符号化装置。
3. The encoding device according to claim 2, wherein the first encoder is shared with a one-dimensional encoding unit of the second encoder.
JP12398093A 1993-05-26 1993-05-26 Encoding device Pending JPH06332667A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12398093A JPH06332667A (en) 1993-05-26 1993-05-26 Encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12398093A JPH06332667A (en) 1993-05-26 1993-05-26 Encoding device

Publications (1)

Publication Number Publication Date
JPH06332667A true JPH06332667A (en) 1994-12-02

Family

ID=14874072

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12398093A Pending JPH06332667A (en) 1993-05-26 1993-05-26 Encoding device

Country Status (1)

Country Link
JP (1) JPH06332667A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001017230A1 (en) * 1999-08-27 2001-03-08 Sharp Kabushiki Kaisha Image encoding device and method therefor, image decoding method and method therefor, and computer-readable recorded medium on which image encoding program and image decoding program are recorded
WO2003081898A1 (en) * 2002-03-22 2003-10-02 Sipec Corporation Image data compression device, image data compression method, recording medium, and program
WO2003084243A1 (en) * 2002-03-28 2003-10-09 Sony Corporation Image compression/encoding device, method, and program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001017230A1 (en) * 1999-08-27 2001-03-08 Sharp Kabushiki Kaisha Image encoding device and method therefor, image decoding method and method therefor, and computer-readable recorded medium on which image encoding program and image decoding program are recorded
US7031531B1 (en) 1999-08-27 2006-04-18 Sharp Kabushiki Kaisha Image encoding device and method therefor, image decoding apparatus and method therefor, and computer-readable recorded medium on which image encoding program and image decoding program are recorded
WO2003081898A1 (en) * 2002-03-22 2003-10-02 Sipec Corporation Image data compression device, image data compression method, recording medium, and program
WO2003084243A1 (en) * 2002-03-28 2003-10-09 Sony Corporation Image compression/encoding device, method, and program
US7424162B2 (en) 2002-03-28 2008-09-09 Sony Corporation Image compression system with coding quantity control
US8345744B2 (en) 2002-03-28 2013-01-01 Sony Corporation Image compression system with coding quantity control

Similar Documents

Publication Publication Date Title
KR970005575B1 (en) Bitrate reduction method and circuitry
US5627917A (en) Variable length coding system having a zig-zag FIFO for selectively storing each data coefficient and zero-run count
KR0138971B1 (en) Huffman code decoder
KR970057910A (en) Digital information coding apparatus, digital information decoding apparatus, digital information coding and decoding apparatus, digital information coding method, and digital information decoding method
US4893187A (en) Image processing apparatus
EP0658982B1 (en) System for bi-level symbol coding-decoding with saved storage and method for the same
JPS5854695B2 (en) Signal control method
KR940008389A (en) Image signal processing device and information transmitting / receiving device using the same
US5345316A (en) Image data encoding/decoding apparatus for concurrent processing of multiple image data streams
JPH06332667A (en) Encoding device
US6771273B2 (en) Image display apparatus
US5091977A (en) Image data compression method using a run prediction technique
Marks A JBIG-ABIC compression engine for digital document processing
JPS5673974A (en) Compression system of picture data
JP2002237754A (en) Variable length decoding device and its method
JPH0149072B2 (en)
KR100255062B1 (en) Circuit for zero-run developing run/level sets and method for zero-run developing the same
RU2093957C1 (en) Device for data compression
JP3005384B2 (en) Huffman decoding circuit
JPS62239771A (en) Run length encoding device
JPH05316355A (en) Picture data coding and decoding device
JP2503988B2 (en) Image coding device
KR950005817B1 (en) Error process apparatus of vlc
KR900008807B1 (en) Picture segment changing circuit
JPS60206374A (en) Binary-coding information compressing and encoding system