Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3862969B2 - Image compression processing apparatus, image compression processing method, and program for causing computer to execute the method - Google Patents
[go: Go Back, main page]

JP3862969B2 - Image compression processing apparatus, image compression processing method, and program for causing computer to execute the method - Google Patents

Image compression processing apparatus, image compression processing method, and program for causing computer to execute the method Download PDF

Info

Publication number
JP3862969B2
JP3862969B2 JP2001139298A JP2001139298A JP3862969B2 JP 3862969 B2 JP3862969 B2 JP 3862969B2 JP 2001139298 A JP2001139298 A JP 2001139298A JP 2001139298 A JP2001139298 A JP 2001139298A JP 3862969 B2 JP3862969 B2 JP 3862969B2
Authority
JP
Japan
Prior art keywords
word data
code amount
data
encoding
run
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
JP2001139298A
Other languages
Japanese (ja)
Other versions
JP2002335408A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2001139298A priority Critical patent/JP3862969B2/en
Publication of JP2002335408A publication Critical patent/JP2002335408A/en
Application granted granted Critical
Publication of JP3862969B2 publication Critical patent/JP3862969B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は、画像圧縮処理装置、画像圧縮処理方法およびその方法をコンピュータに実行させるためのプログラムに関する。
【0002】
【従来の技術】
現在、ディジタルデータの処理にかかるハードウェア量や時間を軽減するため、データを圧縮する技術が普及している。一般的にデータ量が多いことで知られる画像データにとって、画像データを圧縮する技術(画像圧縮)は、特に重要な技術となっている。
【0003】
2値で表される画像を圧縮する画像圧縮技術として、1次元圧縮のランレングス画像圧縮、ファクシミリに使用されるMH符号が知られている。また、近年では、画像データのランレングス処理(画像データのランレングスを求める処理)後、さらに繰り返し処理することによって画像データの圧縮率をより高めることも提唱されている。ただし、このような技術は、いずれも処理の対象となる画像データによっては、画像データ圧縮後に却ってデータ量が多くなること(圧縮後の膨張)が起こり得る。
【0004】
画像データに圧縮後の膨張が起こり得る場合、画像データを圧縮する画像圧縮処理装置は、画像圧縮処理装置において圧縮した画像データが取り得る最大量のデータを蓄積できるメモリを備えなければならない。このため、画像圧縮処理装置が高コスト化する、あるいはメモリアクセスの回数が多くなって処理速度が低下するという欠点があった。
【0005】
上記した欠点の解決するため、特開平5−183760号公報、特開平7−264417号公報に記載された発明は、ラインごとに画像データを符号化し、符号化された画像データのデータ量が元データ(符号化以前の画像データ)の量よりも多くなった場合、圧縮後の膨張が起ったことを示すフラグをたてて元データを格納する。特開平5−183760号公報、特開平7−264417号公報に記載された発明によれば、符号化後の画像データ全体のデータ量が元データ全体のデータ量よりも大きくなることがなく、圧縮後の膨張が起ることがない。
【0006】
また、特開平9−248943号公報、特開平10−117289号公報に記載された発明は、画像データをラインごとに符号化するのではなく、ブロック(ライン方向およびラインと直行する方向にそれぞれ複数配列された画素)単位で符号化し、圧縮後に膨張したブロックの画像データについてはフラグをたてて元データを格納している。
【0007】
【発明が解決しようとする課題】
しかしながら、上記した、画像データをラインごとに、あるいはブロックごとに符号化する技術は、1ライン分、あるいは1ブロック分の元データと符号化された画像データとを格納しておくラインメモリあるいはブロックメモリを必要とする。ラインメモリやブロックメモリを画像圧縮処理装置に追加した場合、画像圧縮処理装置のコストが上昇することが考えられる。
【0008】
また、画像データをラインごとに、あるいはブロックごとに符号化する技術は、画像をラインまたはブロックで区切って符号化する。このため、画像が数ラインあるいは数ブロックにわたって空白であってもこの領域を符号化することになる。このため、圧縮率を高める充分な効果が得られないときがある。
【0009】
本発明は上述の問題点を解決するために成されたものであり、符号化されたデータや元データを保存しておく構成を最小限に抑え、より低コスト、かつ、高速処理が可能な画像圧縮処理装置、画像圧縮処理方法およびその方法をコンピュータに実行させるためのプログラムを提供することを第1の目的とする。
【0010】
また、本発明は、数ラインあるいは数ブロックにわたって空白である画像をも効率的に圧縮し、より圧縮率の高い画像圧縮処理装置、画像圧縮処理方法およびその方法をコンピュータに実行させるためのプログラムを提供することを第2の目的とする。
【0011】
【課題を解決するための手段】
上記した課題を解決し、目的を達成するため、請求項1に記載の発明にかかる画像圧縮処理装置は、画像データを、所定の数のビットごとに切り出したワードデータとして圧縮する画像圧縮処理装置であって、前記切り出された連続する複数のワードデータのうち、一のワードデータを、該ワードデータに続く次のワードデータの先頭ビットに基づいてランレングス法により符号化する符号化手段と、前記切り出された複数のワードデータのうち、一のワードデータと、該ワードデータに続く次のワードデータとの符号量を測定する符号量測定手段と、前記符号量測定手段によって測定された符号量を、予め設定された符号量のしきい値と比較して前記ワードデータの符号量が前記しきい値よりも大きいか否かを判断する符号量比較手段と、を備え、前記符号量比較手段により、前記ワードデータのうちの一つである第1ワードデータの次に符号化される第2ワードデータの符号量が、前記しきい値よりも大きいと判断された場合、前記符号化手段は、前記第1ワードデータを符号化する際に前記第1のワードデータと前記第2のワードデータとにわたるランレングスをカットすることを特徴とする。
【0012】
この請求項1に記載の発明によれば、第2のワードデータの符号量がしきい値よりも大きいと判断された場合、第1ワードデータを符号化する際に第1ワードデータと第2ワードデータとにわたるワンレングスをカットすることができる。
【0013】
請求項2に記載の発明にかかる画像圧縮処理装置は、前記符号化手段によって符号化された符号ワードデータと、前記符号化手段によって符号化される以前の前記ワードデータである元ワードデータとを保持し、前記符号量比較手段がワードデータの符号量を前記しきい値よりも小さいと判断した場合には符号ワードデータを出力する一方、前記符号量比較手段がワードデータの符号量を前記しきい値よりも大きいと判断した場合には元ワードデータを出力するワードデータ選択出力手段を備えることを特徴とする。
【0014】
この請求項2に記載の発明によれば、画像データの符号量をワードデータごとにしきい値と比較し、ワードデータの符号量がしきい値よりも小さいと判断された場合には符号化されたワードデータを出力する一方、ワードデータの符号量がしきい値よりも大きいと判断された場合には符号化される以前の元ワードデータを出力することができる。
【0015】
請求項3に記載の発明にかかる画像圧縮処理装置は、前記符号化手段は、前記画像データにおいてランレングスが繰り返し出現する回数である繰り返し数を求めると共に該繰り返し数に基づいて前記ワードデータを符号化することを特徴とする。
【0016】
この請求項3に記載の発明によれば、画像データにおいてランレングスが繰り返し出現する回数である繰り返し数を求めると共にこの繰り返し数に基づいて画像データをワードデータごとに符号化する構成において、画像データの符号量をワードデータごとにしきい値と比較し、ワードデータの符号量がしきい値よりも小さいと判断された場合には符号化されたワードデータを出力する一方、ワードデータの符号量がしきい値よりも大きいと判断された場合には符号化される以前の元ワードデータを出力することができる。
【0019】
請求項に記載の発明にかかる画像圧縮方法は、画像データを、所定の数のビットごとに切り出したワードデータとして圧縮する画像圧縮処理方法であって、前記切り出された連続する複数のワードデータのうち、一のワードデータを、該ワードデータに続く次のワードデータの先頭ビットに基づいてランレングス法により符号化する符号化工程と、前記符号化工程において符号化されたワードデータと同様のワードデータを符号化以前の状態で保持する保持工程と、前記切り出された複数のワードデータのうち、一のワードデータと、該ワードデータに続く次のワードデータとの符号量を測定する符号量測定工程と、前記符号量測定工程において測定された符号量を、予め設定された符号量のしきい値と比較して前記ワードデータの符号量が前記しきい値よりも大きいか否かを判断する符号量比較工程と、を含み、前記符号量比較工程により、前記ワードデータのうちの一つである第1ワードデータの次に符号化される第2ワードデータの符号量が、前記しきい値よりも大きいと判断された場合、前記符号化工程は、前記第1ワードデータを符号化する際に前記第1のワードデータと前記第2のワードデータとにわたるランレングスをカットすることを特徴とする。
【0020】
この請求項に記載の発明によれば、第2のワードデータの符号量がしきい値よりも大きいと判断された場合、第1ワードデータを符号化する際に第1ワードデータと第2ワードデータとにわたるワンレングスをカットすることができる。
【0021】
請求項に記載の発明にかかるプログラムは、画像データを、所定の数のビットごとに切り出したワードデータとして圧縮する画像圧縮処理方法をコンピュータに実行させるためのプログラムであって、コンピュータに、前記切り出された連続する複数のワードデータのうち、一のワードデータを、該ワードデータに続く次のワードデータの先頭ビットに基づいてランレングス法により符号化させる符号化手順と、前記切り出された複数のワードデータのうち、一のワードデータと、該ワードデータに続く次のワードデータとの符号量を測定させる符号量測定手順と、前記符号量測定手順によって測定された符号量を、予め設定された符号量のしきい値と比較して前記ワードデータの符号量が前記しきい値よりも大きいか否かを判断させる符号量比較手順と、を含み、前記符号量比較手順により、前記ワードデータのうちの一つである第1ワードデータの次に符号化される第2ワードデータの符号量が、前記しきい値よりも大きいと判断された場合、前記符号化手順は、前記第1ワードデータを符号化する際に前記第1のワードデータと前記第2のワードデータとにわたるランレングスをカットすることを特徴とする。
【0022】
この請求項に記載の発明によれば、第2のワードデータの符号量がしきい値よりも大きいと判断された場合、第1ワードデータを符号化する際に第1ワードデータと第2ワードデータとにわたるワンレングスをカットすることができる。
【0023】
【発明の実施の形態】
以下に添付図面を参照して、この発明にかかる画像圧縮処理装置の好適な実施の形態である実施の形態1、実施の形態2を詳細に説明する。図1は、実施の形態1の画像圧縮処理装置の全体的な構成を説明するためのブロック図である。
【0024】
(実施の形態1)
実施の形態1の画像圧縮処理装置は、例えば、画像データなどのデータを所定のビットごとに切り出して作成されるワードデータを入力し、ワードデータごとに圧縮処理する。ワードデータについて、図2を用いて説明する。図2(a)は、ワードデータに切り出される以前のデータを示す図である。(a)のうち、上段は切り出される以前のデータのアドレスを示し、下段は各アドレスに格納されたデータを示している。図2(b)は、(a)に示したデータを、P1,P2で示す位置で切り出した8ビットのワードデータDを示す図である。
【0025】
実施の形態1の画像圧縮処理装置は、ワードデータを順次入力し、並列に処理する。このため、図示した画像圧縮処理装置は、例えばワードデータDを「今のワードデータ」として入力するとき、データDの直後に配置されるワードデータを「次のワードデータ」として入力する。
【0026】
図1の画像圧縮処理装置は、ランレングス符号化処理装置101、符号量測定装置102a,102b、PASS符号ヘッダ作成装置103を備えている。ランレングス符号化処理装置101は、ワードデータ、次のワードデータを並列に圧縮する。符号量測定装置102aは、各ワードデータがランレングス符号器によって符号化された際の符号量を測定し、符号量測定装置102bは、次のワードデータの符号量を測定する。また、PASS符号ヘッダ作成装置103は、ワードデータにヘッダとして付与されるPASS符号を作成する。
【0027】
さらに、図1の画像圧縮処理装置は、ランレングス符号化処理装置101によって符号化されたワードデータを符号として格納するレジスタ105、PASS符号ヘッダ作成装置103によって作成されたPASS符号を圧縮以前のワードデータ(元データ)と共に格納するレジスタ106、予め設定されているしきい値thと符号量測定装置102aが測定したワードデータの符号量とを比較する比較器104a、しきい値thと符号量測定装置102bが測定した次のワードデータの符号量とを比較する比較器104b、符号量としきい値thとの比較の結果に基づいて符号化されたワードデータ、PASS符号のいずれかを符号データとして出力するMUX(Multiplexer)107とを備えている。
【0028】
図3は、上記した画像圧縮処理装置において取り扱われる符号を説明するための図であって、(a)は、ワードデータをランレングス符号器によって符号化する際のフォーマットを示し、(b)は、PASS符号のフォーマットを示している。
【0029】
次に、以上述べた構成で行われる処理の概略を、図4のフローチャートを参照しながら説明する。先ず、実施の形態1の画像圧縮処理装置は、次のワードデータを、符号量測定装置102bに入力し、このワードデータの符号量を測定する(ステップS401)。測定された符号量は、比較器104bでしきい値thと比較される(ステップS402)。比較の結果は、ランレングス符号化処理装置101に出力される。
【0030】
また、次のワードデータの直前に配置されるワードデータ(以降単にワードデータという)は、符号量測定装置102a、ランレングス符号化処理装置101、PASS符号ヘッダ作成装置103に入力する。ランレングス符号化処理装置101は、ワードデータと次のワードデータとのMSB(Most Significant Bit(or Byte))を受け取り、入力したワードデータを符号化する(ステップS403)。このとき、符号量測定装置102bによって測定された符号量としきい値thとが比較器104bにおいて比較され、符号量がしきい値thを超えているか否かを示す信号をランレングス符号化処理装置101に入力する。
【0031】
入力した信号が、次のワードデータの符号量がしきい値thを超えていることを示す場合、次のデータがPASS符号化されるため、ワードデータのランレングスが次のワードデータにわたっている場合にもワードのバウンダリでワードデータを切り出して符号化する。また、次のワードデータの符号量がしきい値を超えていない場合、閉じたランレングス(次のバウンダリにわたるランレングスを含まない部分)についてのみ符号化する。ランレングス符号化処理装置101によって符号化されたワードデータは、レジスタ105に格納される(ステップS404)。
【0032】
次に、PASS符号ヘッダ作成装置103は、PASS符号以降のランレングスのスタートの0、1を明確にするため、PASS符号化されるデータの0ビット目が1であるか、あるいは0であるか調べる。そして、0ビット目の1または0によってPASS符号の設定を選択する(ステップS405)。
【0033】
図5(a)、(b)は、ステップS405を、より具体的に説明するための図である。(a)、(b)は、それぞれワードデータのPASS符号化の例を示し、(a)、(b)中の(II)は、本実施の形態の符号化を示す図である。また、(I)は、一般的に行われる符号化を比較のために示す図である。(a)、(b)、(I)、(II)の最上段は画素データを示し、次段は各画素データを8ビットのワードデータに切り出した際のランレングスを示している。また、ランレングスの下段は各ワードデータの符号量を、最下段は各符号量に割り当てられる符号を示している。実施の形態1は、PASS符号化のしきい値thを符号量3とし、符号量が3より大なるワードデータをPASS符号化している。
【0034】
(a)に示した例では、Dp1のデータが符号量6であり、3以上の符号量を持つ。このため、Dp1は、図(a)の(II)のように、PASS符号化される。なお、PASS符号化するか否かの判断は、PASS符号化されるワードデータの前後にあるワードデータ間にわたるランレングスを切り取った後のワードデータにおいてなされる。
【0035】
また、PASS符号は、切り出されたワードデータが0で始まるものか、あるいは1で始まるものかを区別するため、8または9の符号を使っている。(a)の例ではDp1が1から始まっているためにPASS符号に9を用いている(9D2)。
【0036】
(b)に示した例では、Dp2のデータが符号量5であり、3以上の符号量を持つ。このため、Dp2は、(II)のように、PASS符号化される。(b)の例ではDp2が0から始まっているためにPASS符号に8を用いている(2D)。
【0037】
PASS符号ヘッダ作成装置103によって作成されたPASS符号は、元データにヘッダとして付され、元データと共にレジスタ106に格納される(ステップS406)。また、符号量測定装置102aは、ワードデータの符号量を測定する(ステップS407)。測定された符号量は、比較器104aに入力し、比較器104aでしきい値thと比較される。比較の結果(符号量がしきい値thより大きいか否か)は、MUX107に入力する(ステップS408)。
【0038】
比較器104aの比較の結果、ランレングス符号化処理装置101により符号化されたワードデータ、PASS符号は、MUX107に入力する。MUX107は、比較器104aの比較の結果に基づいて、符号量がしきい値thよりも大きいときにはPASS符号が付された元データを符号データとして出力する。また、符号量がしきい値thよりも小さいときには符号化されたワードデータを符号データとして出力する(ステップS409)。
【0039】
次に、図1に示した構成を、より詳細に説明する。
▲1▼ランレングス符号化処理装置
図6は、ランレングス符号化処理装置101を説明するためのブロック図である。ランレングス符号化処理装置101は、ランレングス処理装置601、符号化処理装置602を備えている。ランレングス処理装置601は、ワードデータのランレングスを並列に求める構成である。実施の形態1のワードデータは8ビットであるので、ランレングス処理装置601は最大8個のランレングスを並列に求めることになる。また、符号化処理装置602は、ランレングス処理装置601が求めたランレングスを、図3で示したフォーマットに基づいて符号化する。
【0040】
図7は、ランレングス処理装置601の構成を説明するための図である。図示したように、ランレングス処理装置601は、ランカウンタ701a、701b、Leftラン値生成装置702、Rightラン値生成装置703、ラン値合成装置705、累積加算処理装置708、レジスタ709を備えている。累積加算処理装置708は、加算器706、加算器707を備えている。以下、ランレングス符号化処理装置の各構成について説明する。
【0041】
(ランカウンタ)
ランカウンタ701a、701bは、スキャナなどの画像読込装置(図示せず)から入力される8ビットのワードデータ(IDOT)、次のワードデータの先頭にあるビット(NDOT)から、IDOTの上位4ビット(IDOT[7:4])、NDOTとしてIDOT[3]を処理するランカウント、IDOTの下位4ビット(IDOT[3:0])と、NDOTを処理するランカウンタにより各部での閉じた複数のランレングス、そのランレングスが有効であるか否かを示す信号(マスク値)、次に繰り越されるランレングス(RUNX)をそれぞれ求める。
【0042】
すなわち、ランカウンタ701a、701bは、例えば画像データを切り出して生成された8ビットのワードデータの上位4ビットのデータと次のワードデータの先頭ビットのデータを受け取り、最大4個のランレングスを出力する。図示したRUN3〜LUN0(LRUNはLeftラン値生成装置によって生成されるラン値、RRUNはRightラン値生成装置によって生成されるラン値)はランレングスを示している。DMASK3〜DMASK0は、RUN3〜LUN0のラン長が有効か否かを示すフラグである。ランカウンタ701a、701bにおいてなされるランカウントの処理を、図8〜11にフローチャートとして示す。
【0043】
(Leftラン値生成装置)
Leftラン値生成装置702は、ランカウンタ701aから最大4個のランレングスとマスク値(LDMASK3−0)を、またランカウンタ701bからマスク値(RDMASK3−0)を入力し、8ビット長の最大8個のランレングスを求める。Leftラン値生成装置702による処理を、図12に示す。
【0044】
(Rightラン値生成装置)
Rightラン値生成装置703は、ランカウンタ701bから最大4個のランレングスとマスク値(RDMASK3−0)を、またランカウンタ701aからマスク値(LDMASK3−0)を入力し、8ビット長の最大8個のランレングスを求める。Rightラン値生成装置703による処理を、図13に示す。
【0045】
(マスク値合成装置)
マスク値合成装置704は、ランカウンタ701a、ランカウンタ701bからマスク値を入力し、各マスク値を合成することによって8ビット長の8個のマスク値を求める。マスク値合成装置704でなされる処理を、図14〜16に示す。
【0046】
(ラン値合成装置)
ラン値合成装置705は、Leftラン値生成装置702、Rightラン値生成装置703からそれぞれ最大8個のランレングスを入力し、両者を合成して最大8個のランレングスを生成する(ステップS1401)。ラン値合成装置705によってなされる処理を、図17に示す。なお、図中のRUNXは次に繰り越されるランレングスであり、AFLは4ビットのすべてが0または1であり、かつNDOT(次のデータの先頭のビット)が同じ値である場合に1となるフラグである。
【0047】
(累積加算処理装置)
累積加算処理装置708は、加算器706、707を備えている。加算器706は、ワードデータのAFLが1である場合、ラン値合成装置705で求められた繰り越しランレングスとレジスタ709に格納されている繰り越しランレングスとの合計(RBRUN7)を加算し、再度繰り越しランレングスの合計(RBRUN7)として設定する。加算器707は、最初に入力するRUN7と繰り越しランレングスの合計とを加算し、今までに繰り越されたランレングスを考慮したランレングスを求める。
【0048】
(符号化処理装置)
図18は、符号化処理装置602を説明するための図である。符号化処理装置602は、RRUN7〜0のデータ、DMASK7〜0、クロック(CLK)信号などをレジスタ709から入力し、符号化されたワードデータ(CODE)を出力する。図19、図20に、符号化処理装置602によってなされる符号化の処理を示すフローチャートを示す。なお、図19、図20のフローチャートで示した処理は、図3に示したフォーマットにしたがってワードデータを符号化するものである。
【0049】
▲2▼符号量測定装置
図21は、符号量測定装置102a(符号量測定装置102b)を説明するためのブロック図である。符号量測定装置102aは、ランレングス処理装置1801、符号量測定処理装置1802を備えている。なお、符号量測定装置102a、符号量測定装置102bは同様の構成を備えると共に同様に動作する。このため、本明細書では符号量測定装置102aについてのみ説明し、符号量測定装置102bの説明を省くものとする。
【0050】
(ランレングス処理装置)
図22は、ランレングス処理装置1801を説明するためのブロック図である。ランレングス処理装置1801は、図7に示したランレングス処理装置601と同様の構成である、ランカウンタ701a、701b、Leftラン値生成装置702、Rightラン値生成装置703、マスク値合成装置704、ラン値合成装置705、レジスタ709を備えている。ただし、ランレングス処理装置1801は、累積加算処理装置708を備えていない点、ランカウンタ701bの直前にワードデータのLSBを反転させたものを入力し、ワードデータのランレングスが必ず閉じるようにしている点でランレングス処理装置601と相違している。
【0051】
図23は、図21に示した符号量測定処理装置1802を説明するためのブロック図である。符号量測定処理装置1802は、図18に示した符号化処理装置602と同様に、RRUN7〜0のデータ、DMASK7〜0、クロック(CLK)信号などをレジスタ709から入力し、符号化されたワードデータ(CODE)を出力する。符号量測定処理装置1802によってなされる符号量測定の処理を、図24(a)、(b)に示す。
【0052】
▲3▼PASS符号ヘッダ作成装置
図25は、PASS符号ヘッダ作成装置103の処理を説明するためのフローチャートである。図示するように、PASS符号ヘッダ作成装置103は、ワードデータの最初のビットが0であるか否か判断し(ステップS2201)、最初のビットが0であった場合には(ステップS2201:Yes)、PASS符号としてのヘッダを9とする(ステップS2202)。また、ステップS2201の判断の結果、最初のビットが0でない(つまり1)場合(ステップS2201:No)、ヘッダを8とする(ステップS2203)。
【0053】
(実施の形態2)
次に、本発明の実施の形態2について説明する。
図26は、本発明の実施の形態2の画像圧縮処理装置を説明するためのブロック図である。なお、実施の形態2の画像圧縮処理装置は、実施の形態1の画像圧縮処理装置と同様の構成を備えるものであり、同様の構成については同様の符号を付して示し、説明を一部略すものとする。
【0054】
図26の画像圧縮処理装置は、ランレングス・繰り返し符号化処理装置2301、符号量測定装置2302a,2302b、PASS符号ヘッダ作成装置103を備えている。ランレングス・繰り返し符号化処理装置2301は、ワードデータ、次のワードデータを並列に圧縮するものである。ただし、実施の形態2のワードデータは、実施の形態1のワードデータと異なりワードデータ間でバンダリーをわたるランレングスで切り取られたものである。このため、ランレングス・繰り返し符号化処理装置2301は、ワードデータ間をわたる繰り返し処理に対応できる構成となっている。
【0055】
符号量測定装置2302aは、実施の形態2のワードデータがランレングス符号器によって符号化された際の符号量を測定し、符号量測定装置2302bは、実施の形態2の次のワードデータの符号量を測定する。また、PASS符号ヘッダ作成装置103は、ワードデータにヘッダとして付与されるPASS符号を作成する。
【0056】
さらに、図26の画像圧縮処理装置は、実施の形態1と同様の比較器104a、104b、レジスタ105、106、MUX107を備えている。比較器104aは、しきい値thと符号量測定装置2302aが測定したワードデータの符号量とを比較する。また、比較器104bは、しきい値thと符号量測定装置2302bが測定した次のワードデータの符号量とを比較する。レジスタ105は符号化されたワードデータを符号として格納し、レジスタ106はPASS符号が付された符号化以前のワードデータ(元データ)を格納する。MUXは、符号量としきい値thとの比較の結果に基づいて、符号化されたワードデータ、元データのいずれかを符号データとして出力する。
【0057】
図27は、上記した画像圧縮処理装置において取り扱われる符号を説明するための図であって、(a)は、ワードデータをランレングス符号器によって符号化する際のフォーマットを示し、(b)は反復符号のフォーマットを、また、(c)は、PASS符号のフォーマットを示している。
【0058】
次に、以上述べた構成で行われる処理の概略を、図28のフローチャートを参照しながら説明する。先ず、実施の形態2の画像圧縮処理装置は、次のワードデータを、符号量測定装置2302bに入力し、このワードデータの符号量を測定する(ステップS2501)。測定された符号量は、比較器104bでしきい値thと比較される(ステップS2502)。比較の結果は、ランレングス・繰り返し符号化処理装置2301に出力される。
【0059】
また、ワードデータは、符号量測定装置2302a、ランレングス・繰り返し符号化処理装置2301、PASS符号ヘッダ作成装置103に入力する。ランレングス・繰り返し符号化処理装置2301は、入力したワードデータと次のワードデータとのMSBを受け取り、入力データを符号化する(ステップS2503)。このとき、符号量測定装置2302bによって測定された符号量としきい値thとが比較器104bにおいて比較され、符号量がしきい値thを超えているか否かを示す信号をランレングス・繰り返し符号化処理装置2301に入力する。
【0060】
入力した信号が、次のワードデータの符号量がしきい値thを超えていることを示す場合、次のデータがPASS符号化されるため、ワードデータのランレングスが次のワードデータにわたっている場合にもワードのバウンダリでワードデータを切り出して符号化する。また、次のワードデータの符号量がしきい値を超えていない場合、閉じたランレングス(次のバウンダリにわたるランレングスを含まない部分)についてのみ符号化する。ランレングス符号化処理装置101によって符号化されたワードデータは、レジスタ105に格納される(ステップS2504)。
【0061】
次に、PASS符号ヘッダ作成装置103は、PASS符号以降のランレングスのスタートの0、1を明確にするため、PASS符号化されるデータの0ビット目が1であるか、あるいは0であるか調べる。そして、0ビット目の1または0によってPASS符号の設定を選択する(ステップS2505)。
【0062】
図29は、ステップS2505を、より具体的に説明するための図であり、ワードデータのPASS符号化の例を示している。また、(II)は、実施の形態2の符号化を示す図であり、(I)は、一般的に行われる符号化を比較のために示す図である。(I)、(II)の最上段は画素データを示し、次段は各画素データを8ビットのワードデータに切り出した際のランレングスを示している。また、ランレングスの下段は各ワードデータの符号量を、最下段は各符号量に割り当てられる符号を示している。実施の形態2においても、PASS符号化のしきい値thを符号量3とし、符号量が3以上のワードデータをPASS符号化している。
【0063】
図示したように、実施の形態2では、PASS符号化されるワードの直後に配置されるワードデータ間にわたるランレングスを切り取っている。また、図29に示した例では、PASS符号化されるワードの直前のワードデータに繰り返し処理を追加している。なお、PASS符号化されるワードデータの前後にあるワードデータ間にわたるランレングスは、実施の形態2においても切り取るものとする。
【0064】
PASS符号ヘッダ作成装置103によって作成されたPASS符号は、符号化されていないデータにヘッダとして付されてデータと共にレジスタ106に格納される(ステップS2506)。また、符号量測定装置2302aは、ワードデータの符号量を測定する(ステップS2507)。測定された符号量は、比較器104aに入力し、比較器104aでしきい値thと比較される。比較の結果(符号量がしきい値thより大きいか否か)は、MUX107に入力する(ステップS2508)。
【0065】
比較器104aの比較の結果、ランレングス繰り返し・符号化処理装置2301により符号化されたワードデータ、PASS符号は、MUX107に入力する。MUX107は、比較器104aの比較の結果に基づいて、符号量がしきい値thよりも大きいときにはPASS符号がヘッダとして付された元データを符号データとして出力する。また、符号量がしきい値thよりも小さいときには符号化されたワードデータを符号データとして出力する(ステップS2509)。
【0066】
次に、図26に示した構成を、より詳細に説明する。
▲1▼ランレングス繰り返し・符号化処理装置
図30は、ランレングス・繰り返し符号化処理装置2301を説明するためのブロック図である。ランレングス・繰り返し符号化処理装置2301は、ランレングス処理装置2701、繰り返し処理装置2702、符号化処理装置2703を備えている。ランレングス処理装置2701は、ワードデータのランレングスを並列に求める構成である。実施の形態1のワードデータは8ビットであるので、ランレングス処理装置2701は最大8個のランレングスを並列に求めることになる。また、繰り返し処理装置2702は、ランレングス処理装置2701でのランレングスの繰り返し数を求める。符号化処理装置2703は、ランレングス処理装置2701が求めたランレングスおよび繰り返し処理装置2702が求めた繰り返し数を、図27で示したフォーマットに基づいて符号化する。
【0067】
図31は、繰り返し処理装置2702の構成を説明するための図である。図示したように、繰り返し処理装置2702は、繰り返しフラグ生成装置2801、繰り返し数生成装置2802、レジスタ2803、NEXTランレングス生成装置2804、レジスタ2805を備えている。繰り返し処理装置2702は、ランレングス処理装置2701で求められた複数のランレングスが、各ランレングスの2つ前のランレングスと等しいか否か判断し、判断の結果に基づいて繰り返しフラグ(RFL7〜0)を生成する。そして、繰り返しフラグ(RFL7〜0)のパターンと現在までに入力した繰り返し数(REP)とから、現在までの繰り返し数(WREP7〜0)と、次のパターンへの繰り返し数(WREP)とを求める。以下、繰り返し処理装置2702の各構成について説明する。
【0068】
(繰り返しフラグ生成装置)
繰り返しフラグ生成装置2801は、ランレングス処理装置2701から、複数のランレングス、複数のランレングスのマスク値、2つ前のパターンのランレングスおよび1つ前のパターンのランレングスを入力し、ランレングス処理装置2701から入力した各ランレングスが2つ前に入力したランレングスと一致するか否か判断する。そして、判断の結果に基づいて繰り返しフラグRFL7〜0を出力する。繰り返しフラグ生成装置2801によってなされる以上の処理を、図32にフローチャートとして示す。
【0069】
図32に示したように、繰り返しフラグ生成装置2801は、マスク値をチェックする(ステップS2901)。そして、この値が0である場合には(ステップS2901:No)、対応するランレングスがないために繰り返しフラグRFL7に2を設定する(ステップS2903)。また、ステップS2901においてマスク値が1であると判断された場合には(ステップS2901:Yes)、RUN7と前パターンの後から2番目のランレングスRF2とを比較する(ステップS2902)。
【0070】
この結果、RUN7とRF2とが一致しなかった場合(ステップS2902:No)、繰り返しフラグRFL7に0を設定する(ステップS2904)。また、ステップS902においてRUN7とRF2とが一致したと判断された場合(ステップS2902:Yes)、繰り返しフラグRFL7に1を設定する(ステップS2905)。繰り返しフラグ生成装置2801は、以上の処理を、すべてのビットの値DMASK7〜0について実行する。
【0071】
(繰り返し数生成装置)
繰り返し数生成装置2802は、繰り返しフラグ生成装置2801から入力した繰り返しフラグRF7〜0、現在までの繰り返し数(REP)を入力し、複数の繰り返し数(WREP7〜0)を生成し、レジスタ2803に出力する。繰り返し数生成装置2802の繰り返しフラグ数から繰り返し数を求める処理を、図33〜35にフローチャートとして示す。
【0072】
図33〜35に示したように、繰り返し数生成装置2802は、複数の繰り返し数WREP7〜0を求める。なお、繰り返し数とは、繰り返しが途絶えた時点で発生する数値である。繰り返し数生成装置2802は、先ず、7ビット目の繰り返し数WREP7を求める。
【0073】
すなわち、繰り返し数生成装置2802は、繰り返し数RF7が0であるか否か判断し(ステップS3001)、0である場合(ステップS3001:Yes)、繰り返しフラグ生成装置2801における比較の結果と一致しないため、現在までの繰り返し数を清算して繰り返し数WREP7に現在までの繰り返し数REPを代入する(ステップS3003)。また、繰り返し数RF7が0でない場合(ステップS3001:No)、繰り返しが継続しているものとして繰り返し数WREP7を0に設定する(ステップS3002)。
【0074】
繰り返し数の6ビット目の値WREP6は、ステップS3004〜3006によって求められる。すなわち、繰り返しフラグRFL7が1であって、かつ、RFL6が0であれば(ステップS3004:Yes)、繰り返し数WREP6に今までの繰り返し数REPに今回の繰り返し数である1(RFL=1)を加算してWREP6に代入する(ステップS3006)。また、繰り返しフラグRFL7が1でなく、かつ、RFL6が0でない場合(ステップS3004:No)、繰り返し数WREP6に0を代入する(ステップS3005)。以下、以上述べた処理と同様に、5ビット目ないし0ビット目の繰り返し数が求められる。
【0075】
また、図36〜40に、繰り返し数生成装置2802の次パターンに継続する繰り返し数(REP)を求める処理をフローチャートにして示す。図36〜40のように、繰り返し数生成装置2802は、繰り返しフラグRFL7が2である場合(ステップS3101:Yes)、優先順位が最も高いランレングスの値が決定できないため、現時点の繰り返し数REPを保存する(ステップS3105)。繰り返しフラグRFL7が2でない場合(ステップS3101:No)、繰り返しフラグRFL7が0、かつRFL6が2となるか否か判断する(ステップS3102)。判断の結果、繰り返しフラグRFL7が0、かつRFL6が2となる場合(ステップS3102:Yes)、最も優先順位の高いランレングスは繰り返しでなく、以降にランレングスが存在しないために繰り返し数WREPを0に設定する(ステップS3106)。
【0076】
ステップS3102において繰り返しフラグRFL7が0、かつRFL6が2でないと判断された場合(ステップS3102:No)、繰り返しフラグRFL7が1、かつRFL6が2であるか否か判断する(ステップS3103)。この結果、繰り返しフラグRFL7が1、かつRFL6が2であれば(ステップS3103:Yes)、最も優先順位の高いランレングスが繰り返しであり、以降にランレングスがないため、現時点での繰り返し数REPに今回求めた繰り返し数1を加算し、WREPに代入する(ステップS3107)。
【0077】
次に、繰り返し数生成装置2802は、繰り返しフラグRFL6が0、かつRFL5が2であるか否か判断する(ステップS3104)。判断の結果、繰り返しフラグRFL6が0、かつRFL5が2である場合(ステップS3104:Yes)、有効な終端(ここではRFL5が2であるためにRFL5が終端)が0である場合、繰り返し数WREPはRFL7の値によらず0になる(ステップS3108)。繰り返し数生成装置2802は、以降、繰り返しフラグのすべての組み合わせについて以上の処理を実行する。
【0078】
(NEXTランレングス生成装置)
NEXTランレングス生成装置2804は、次のパターンの繰り返しフラグを生成するために前のパターンの最後から数えて2番目のランレングスと最後のランレングスとを求める構成である。NEXTランレングス生成装置2804によって実行される処理を、図41に示す。
【0079】
図41に示したように、NEXTランレングス生成装置2804は、優先順位の最も高いマスク(DMASK7)が1であるか否か判断する(ステップS3401)。そして、DMASK7が1でなければ(ステップS3401:No)、DMASK7が0であり、このパターンに閉じたランレングスがないとして前パターンの最後から2番目の値および最後の値を保存する(ステップS3405)。
【0080】
また、NEXTランレングス生成装置2804は、DMASK7が0でない場合(ステップS3401:Yes)、DMASK6が1であるか否か判断する(ステップS3402)。そして、DMASK6が1でない、つまり0であれば(ステップS3402:No)、ランレングスが1つだけ存在する。このため、前パターンの最後から数えて1つ目のランレングスWREF1にRUN7の値を代入する。また、前パターンの最後から数えて2つ目のランレングスWREF2にWREF1の値を代入する(ステップS3406)。
【0081】
また、NEXTランレングス生成装置2804は、DMASK5が1であるか否か判断する(ステップS3403)。DMASK5が1でなければ(ステップS3403:No)、DMASK5が0であり、このパターンに閉じたランレングスが2つだけ存在するとする。そして、前パターンの最後から数えて1つ目のランレングスWREF1にRUN6の値を代入する。また、前パターンの最後から数えて2つ目のランレングスWREF2にRUN7の値を代入する(ステップS3407)。
【0082】
さらに、NEXTランレングス生成装置2804は、DMASK4が1であるか否か判断する(ステップS3404)。DMASK4が1でなければ(ステップS3404:No)、DMASK4が0であり、このパターンに閉じたランレングスが3つだけ存在するとする。そして、前パターンの最後から数えて1つ目のランレングスWREF1にRUN5の値を代入する。また、前パターンの最後から数えて2つ目のランレングスWREF2にRUN6の値を代入する(ステップS3408)。
【0083】
(符号化処理装置)
図42は、図30に示した符号化処理装置2703の構成を示すブロック図である。符号化処理装置2703は、最大8個のランレングス(ORUN7〜0)および繰り返し数(OREP7〜0)、さらにそのマスク値(図示せず)を入力する。そして、図27に示した4ビットごとに符号化されたデータを出力する。ただし、符号化処理装置2703は、データを4ビットごとに符号化するものに限定されるものでなく、何ビットごとに符号化するフォーマットを用いるものでもよい。
【0084】
図43〜45は、符号化処理装置2703によってなされる処理を説明するためのフローチャートである。図43に示したフローチャートは符号化処理装置によってなされる処理を示したもので、図44および45は、図43中の符号化処理を説明するためのフローチャートである。符号化処理装置2703は、マスク値DMASK7〜0の値に基づいてランレングスを求め、符号化する。
【0085】
つまり、符号化処理装置2703は、先ず、DMASK7の値が1であるか否か判断する(ステップS3601)。そして、DMASK7の値が1であった場合(ステップS3601:Yes)、ランレングス(ラン長)をRUN7に設定し、繰り返し数REPをREP7に設定してランレングスを符号化する(ステップS3602)。
【0086】
符号化を行う際、符号化処理装置2703は、図44、45に示したように、先ず、入力したランレングスが0であるか否か判断する(ステップS3701)。この判断の結果、ランレングスが0でなかった場合(ステップS3701:No)、ランレングスが10以下であるか否か判断する(ステップS3702)。ランレングスが10以下であった場合には(ステップS3702:Yes)、ランレングスをそのまま符号とする(ステップS3703)。
【0087】
また、ランレングスの値が10以上であった場合(ステップS3702:No)、ランレングスが43以下であるか否か判断する(ステップS3704)。判断の結果、ランレングスの値が43以下であった場合には(ステップS3704:Yes)、さらに、ランレングスの値が27以下であるか否か判断する(ステップS3705)。
【0088】
ステップS3705の判断の結果、ランレングスの値が27以下であった場合(ステップS3705:Yes)、ヘッダとして4ビットの1010を付加した上、ランレングスから11を減算した値を符号とする(ステップS3708)。一方、ランレングスの値が27以上であった場合(ステップS3705:No)、ヘッダとして4ビットの1011を付加した上、ランレングスから11を減算した値を符号とする(ステップS3707)。
【0089】
また、符号化処理装置2703は、ランレングスの値が43以上であった場合(ステップS3704:No)、ヘッダとして4ビットの1100を付加し、ステップS3709〜S3716によりヘッダの4ビット目を終端フラグとすることで符号長を少ないデータ数で表現する。
【0090】
さらに、ステップS3701の判断で、ランレングスが0であると判断された場合(ステップS3701:Yes)、繰り返し数REPが1か否か判断する(ステップS3717)。判断の結果、符号を13に設定する(ステップS3718)。繰り返し数REPが1でない場合(ステップS3717:No)、繰り返し数REPが2であるか否か判断する(ステップS3719)。繰り返し数が2である場合(ステップS3719:Yes)、符号を14に設定する(ステップS3720)。
【0091】
繰り返し数REPが2でない場合(ステップS3719:No)、符号化処理装置2703は、繰り返し数REPが3であるか否か判断する(ステップS3721)。そして、繰り返し数REPが3であった場合(ステップS3721:Yes)、符号を13,14に設定する(ステップS3722)。繰り返し数REPが3でない場合(ステップS3721:No)、符号化処理装置2703は、繰り返し数REPが4であるか否か判断する(ステップS3723)。そして、繰り返し数REPが4であった場合(ステップS3723:Yes)、符号を14,14に設定する(ステップS3724)。
【0092】
繰り返し数が4以上の場合(ステップS3723:No)、ヘッダとして4ビットの1111を付加し、ステップS3726〜S3733によりヘッダの4ビット目を終端フラグとすることで符号長を少ないデータ数で表現する。
【0093】
▲2▼符号量測定装置
図46は、符号量測定装置2302a(2302b)を説明するためのブロック図である。符号量測定装置2302aは、ランレングス処理装置1801、繰り返し処理装置2702、符号量測定処理装置3801を備えている。ランレングス処理装置1801、繰り返し処理装置2702は、前述した構成と同様のものである。このため、同様の符号を付して示し、説明を省くものとする。また、符号量測定装置2302a、符号量測定装置2302bは同様の構成を備えると共に同様に動作する。このため、本明細書では符号量測定装置2302aについてのみ説明し、符号量測定装置2302bの説明を省くものとする。
【0094】
(符号量測定処理装置)
符号量測定処理装置3801は、ランレングス処理装置1801によって求められたランレングス、繰り返し処理装置2702によって求められ繰り返し数、さらに図27に示したフォーマットに基づいてワードデータの符号量を測定する構成である。図47、図48に、符号量測定処理装置3801で行われる処理のフローチャートを示す。
【0095】
【発明の効果】
以上説明したように、請求項1に記載の発明は、第1ワードデータを符号化する際に第1ワードデータと第2ワードデータとにわたるランレングスをカットすることができる。このため、いっそう高い圧縮率が得られ、より低コスト、かつ、高速処理が可能な画像圧縮処理装置を提供することができるという効果を奏する。
【0096】
請求項2に記載の発明は、画像データの符号量をワードデータごとにしきい値と比較し、比較の結果に基づいて符号化されたワードデータまたは元ワードデータを出力する。このため、符号化されたデータや元データを保存しておく構成を最小限に抑え、より低コスト、かつ、高速処理が可能な画像圧縮処理装置を提供することができるという効果を奏する。
【0097】
請求項に記載の発明は、画像データの繰り返し数に基づいて画像データをワードデータごとに符号化する構成において、画像データの符号量をワードデータごとにしきい値と比較し、比較の結果に基づいて符号化されたワードデータまたは元ワードデータを出力する。このため、符号化されたデータや元データを保存しておく構成を最小限に抑え、より低コスト、かつ、高速処理が可能な画像圧縮処理装置を提供することができるという効果を奏する。また、画像をも効率的に圧縮し、より圧縮率の高い画像圧縮処理装置を提供することができるという効果を奏する。
【0099】
請求項に記載の発明は、第1ワードデータを符号化する際に第1ワードデータと第2ワードデータとにわたるランレングスをカットすることができる。このため、いっそう高い圧縮率が得られ、より低コスト、かつ、高速処理が可能な画像圧縮処理装置を提供することができるという効果を奏する。
【0100】
請求項に記載の発明は、第1ワードデータを符号化する際に第1ワードデータと第2ワードデータとにわたるランレングスをカットすることができる。このため、いっそう高い圧縮率が得られ、より低コスト、かつ、高速処理が可能な画像圧縮処理装置を提供することができるという効果を奏する。
【図面の簡単な説明】
【図1】本発明の実施の形態1の画像圧縮処理装置の全体的な構成を説明するためのブロック図である。
【図2】本発明の実施の形態1のワードデータについて説明するための図である。
【図3】本発明の実施の形態1のワードデータを符号化する際のフォーマットを示す図である。
【図4】本発明の実施の形態1で行われる処理の概要を説明するためのフローチャートである。
【図5】本発明の実施の形態1のPASS符号を説明するための図である。
【図6】図1に示したランレングス符号化処理装置を説明するためのブロック図である。
【図7】図6に示したランレングス処理装置の構成を説明するための図である。
【図8】図7に示したランカウンタにおいてなされるランカウントの処理を示すフローチャートである。
【図9】図7に示したランカウンタにおいてなされるランカウントの処理を示す他のフローチャートである。
【図10】図7に示したランカウンタにおいてなされるランカウントの処理を示すフローチャートである。
【図11】図7に示したランカウンタにおいてなされるランカウントの処理を示すフローチャートである。
【図12】図7に示したLeftラン値生成装置の処理を示すフローチャートである。
【図13】図7に示したRightラン値生成装置の処理を示すフローチャートである。
【図14】図7に示したマスク値合成装置の処理を示すフローチャートである。
【図15】図7に示したマスク値合成装置の処理を示す他のフローチャートである。
【図16】図7に示したマスク値合成装置の処理を示す他のフローチャートである。
【図17】図7に示したラン値合成装置の処理を示す他のフローチャートである。
【図18】図6に示した符号化処理装置を説明するための図である。
【図19】符号化処理装置の処理を示すフローチャートである。
【図20】符号化処理装置の処理を示す他のフローチャートである。
【図21】図1に示した符号量測定装置を説明するためのブロック図である。
【図22】図21に示したランレングス処理装置を説明するためのブロック図である。
【図23】図21に示した符号量測定処理装置を説明するためのブロック図である。
【図24】符号量測定処理装置によってなされる符号量測定の処理を示すフローチャートである。
【図25】図1に示したPASS符号ヘッダ作成装置の処理を説明するためのフローチャートである。
【図26】本発明の実施の形態2の画像圧縮処理装置を説明するためのブロック図である。
【図27】本発明の実施の形態2のワードデータを符号化する際のフォーマットを示す図である。
【図28】本発明の実施の形態2で行われる処理の概要を説明するためのフローチャートである。
【図29】本発明の実施の形態2のPASS符号を説明するための図である。
【図30】図26に示したランレングス・繰り返し符号化処理装置を説明するためのブロック図である。
【図31】図30に示した繰り返し処理装置の構成を説明するための図である。
【図32】図31に示した繰り返しフラグ生成装置によってなされる処理を示すフローチャートである。
【図33】繰り返し数生成装置によってなされる処理を示すフローチャートである。
【図34】繰り返し数生成装置によってなされる処理を示す他のフローチャートである。
【図35】繰り返し数生成装置によってなされる処理を示す他のフローチャートである。
【図36】繰り返し数生成装置によってなされる次パターンに継続する繰り返し数を求める処理を示すフローチャートである。
【図37】繰り返し数生成装置によってなされる次パターンに継続する繰り返し数を求める処理を示す他のフローチャートである。
【図38】繰り返し数生成装置によってなされる次パターンに継続する繰り返し数を求める処理を示す他のフローチャートである。
【図39】繰り返し数生成装置によってなされる次パターンに継続する繰り返し数を求める処理を示す他のフローチャートである。
【図40】繰り返し数生成装置によってなされる次パターンに継続する繰り返し数を求める処理を示す他のフローチャートである。
【図41】図31に示したNEXTランレングス生成装置によって実行される処理を示す図である。
【図42】図30に示した符号化処理装置の構成を示すブロック図である。
【図43】図30に示した符号化処理装置によってなされる処理を示すフローチャートである。
【図44】符号化処理装置によってなされる処理を示す他のフローチャートである。
【図45】符号化処理装置によってなされる処理を示す他のフローチャートである。
【図46】図26に示した符号量測定装置を説明するためのブロック図である。
【図47】符号量測定装置によってなされる処理を示すフローチャートである。
【図48】符号量測定装置によってなされる処理を示す他のフローチャートである。
【符号の説明】
101 ランレングス符号化処理装置
102a,102b 符号量測定装置
103 PASS符号ヘッダ作成装置
104a,104b 比較器
105,106,709,2803,2805 レジスタ
601,1801,2701 ランレングス処理装置
602,2703 符号化処理装置
701a,701b ランカウンタ
702 Leftラン値生成装置
703 Rightラン値生成装置
704 マスク値合成装置
705 ラン値合成装置
706,707 加算器
708 累積加算処理装置
1802 符号化測定処理装置
2301 ランレングス・繰り返し符号化処理装置
2302a,2302b 符号量測定装置
2702 繰り返し処理装置
2801 繰り返しフラグ生成装置
2802 繰り返し数生成装置
2804 NEXTランレングス生成装置
3801 符号量測定処理装置
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image compression processing apparatus, an image compression processing method, and a program for causing a computer to execute the method.
[0002]
[Prior art]
Currently, in order to reduce the amount of hardware and time required for processing digital data, a technique for compressing data has become widespread. A technique for compressing image data (image compression) is a particularly important technique for image data that is generally known to have a large amount of data.
[0003]
As an image compression technique for compressing a binary image, a one-dimensional compression run length image compression and an MH code used for a facsimile are known. In recent years, it has also been proposed to further increase the compression rate of image data by further repeating the processing after the run length processing of image data (processing for obtaining the run length of image data). However, in any of these techniques, depending on the image data to be processed, the data amount may increase after the image data compression (expansion after compression).
[0004]
When expansion after compression can occur in image data, an image compression processing apparatus that compresses image data must include a memory that can store the maximum amount of data that can be taken by the image data compressed in the image compression processing apparatus. For this reason, there has been a drawback that the cost of the image compression processing apparatus is increased, or the processing speed is lowered due to an increase in the number of memory accesses.
[0005]
In order to solve the above-described drawbacks, the inventions described in JP-A-5-183760 and JP-A-7-264417 encode image data line by line, and the amount of encoded image data is the original. When the amount exceeds the amount of data (image data before encoding), the original data is stored with a flag indicating that expansion after compression has occurred. According to the inventions described in JP-A-5-183760 and JP-A-7-264417, the data amount of the entire image data after encoding does not become larger than the data amount of the entire original data, and compression is performed. Later expansion does not occur.
[0006]
The inventions described in Japanese Patent Application Laid-Open Nos. 9-248943 and 10-117289 do not encode image data line by line, but instead have a plurality of blocks (line direction and direction orthogonal to the line). The original data is stored by setting a flag for the image data of the block that has been encoded in units of (arranged pixels) and expanded after compression.
[0007]
[Problems to be solved by the invention]
However, the above-described technology for encoding image data line by line or block by block is a line memory or block for storing original data for one line or one block and encoded image data. Requires memory. When a line memory or a block memory is added to the image compression processing apparatus, the cost of the image compression processing apparatus may increase.
[0008]
In the technique of encoding image data for each line or for each block, the image is encoded by dividing the image into lines or blocks. For this reason, even if the image is blank over several lines or several blocks, this region is encoded. For this reason, a sufficient effect of increasing the compression rate may not be obtained.
[0009]
The present invention has been made to solve the above-described problems, and minimizes the configuration for storing encoded data and original data, enabling lower cost and higher speed processing. It is a first object of the present invention to provide an image compression processing apparatus, an image compression processing method, and a program for causing a computer to execute the method.
[0010]
The present invention also efficiently compresses an image that is blank over several lines or blocks, and provides an image compression processing apparatus, an image compression processing method, and a program for causing a computer to execute the method with a higher compression rate. The second purpose is to provide it.
[0011]
[Means for Solving the Problems]
  In order to solve the above-described problems and achieve the object, an image compression processing device according to claim 1 compresses image data as word data cut out every predetermined number of bits. BecauseOf the plurality of continuous word data thus cut out, one word data is obtained by a run length method based on the first bit of the next word data following the word data.Encoding means for encoding;The code amount of one word data and the next word data following the word data among the plurality of extracted word data is measured.Whether the code amount of the word data is larger than the threshold value by comparing the code amount measured by the code amount measurement unit and the code amount measured by the code amount measurement unit with a preset code amount threshold value Code amount comparison means for determiningAnd the code amount comparing means determines that the code amount of the second word data encoded next to the first word data which is one of the word data is larger than the threshold value. In this case, the encoding means cuts a run length extending between the first word data and the second word data when encoding the first word data.It is characterized by that.
[0012]
  According to the invention described in claim 1,When it is determined that the code amount of the second word data is larger than the threshold value, the one length over the first word data and the second word data can be cut when the first word data is encoded. .
[0013]
  An image compression processing device according to the invention of claim 2 is provided.The code word data encoded by the encoding means and the original word data that is the word data before being encoded by the encoding means are held, and the code amount comparison means determines the code amount of the word data. If it is determined that the code amount is smaller than the threshold value, the code word data is output. On the other hand, if the code amount comparison unit determines that the code amount of the word data is larger than the threshold value, the original word data is output. Comprising word data selection output means for outputtingFeatures.
[0014]
  According to the invention described in claim 2,The code amount of the image data is compared with a threshold value for each word data, and if it is determined that the code amount of the word data is smaller than the threshold value, the encoded word data is output, while the code of the word data If it is determined that the amount is larger than the threshold value, the original word data before encoding can be output.
[0015]
  An image compression processing device according to the invention of claim 3 is provided.The encoding means obtains a repetition number that is the number of times the run length appears repeatedly in the image data and encodes the word data based on the repetition number.It is characterized by that.
[0016]
  According to the third aspect of the present invention, the number of repetitions, which is the number of times the run length appears repeatedly in the image data, is obtained, and the image data is obtained based on the number of repetitions.For each word dataIn the encoding configuration, the code amount of the image data is compared with a threshold value for each word data, and if it is determined that the code amount of the word data is smaller than the threshold value, the encoded word data is output. On the other hand, when it is determined that the code amount of the word data is larger than the threshold value, the original word data before encoding can be output.
[0019]
  Claim4The image compression method according to the invention described inAn image compression processing method for compressing image data as word data cut out for each predetermined number of bits, wherein one word data of the cut out continuous word data is continued to the word data An encoding step of encoding by the run length method based on the first bit of the next word data, and a holding step of holding the same word data as the word data encoded in the encoding step in a state before encoding A code amount measuring step of measuring a code amount of one word data and the next word data following the word data among the plurality of extracted word data, and the code measured in the code amount measuring step The amount is compared with a preset code amount threshold value to determine whether the code amount of the word data is larger than the threshold value. An amount comparison step, wherein the amount of code of the second word data encoded next to the first word data which is one of the word data by the code amount comparison step is greater than the threshold value. The encoding step cuts a run length over the first word data and the second word data when encoding the first word data. .
[0020]
  This claim4According to the invention described inWhen it is determined that the code amount of the second word data is larger than the threshold value, the one length over the first word data and the second word data can be cut when the first word data is encoded. .
[0021]
  Claim5The program according to the invention described inA program for causing a computer to execute an image compression processing method for compressing image data as word data cut out for each predetermined number of bits, wherein the computer includes a plurality of pieces of the extracted continuous word data, An encoding procedure for encoding one word data by a run length method based on the first bit of the next word data following the word data, one word data among the plurality of extracted word data, The code amount measurement procedure for measuring the code amount of the next word data following the word data, and the code amount measured by the code amount measurement procedure is compared with a preset code amount threshold value. A code amount comparison procedure for determining whether or not the code amount of word data is larger than the threshold value, the code amount comparison procedure Accordingly, when it is determined that the code amount of the second word data encoded next to the first word data which is one of the word data is larger than the threshold value, the encoding procedure is In addition, when the first word data is encoded, a run length extending between the first word data and the second word data is cut.
[0022]
  This claim5According to the invention described inWhen it is determined that the code amount of the second word data is larger than the threshold value, the one length over the first word data and the second word data can be cut when the first word data is encoded. .
[0023]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments 1 and 2, which are preferred embodiments of an image compression processing apparatus according to the present invention, will be described below in detail with reference to the accompanying drawings. FIG. 1 is a block diagram for explaining the overall configuration of the image compression processing apparatus according to the first embodiment.
[0024]
(Embodiment 1)
The image compression processing apparatus according to the first embodiment, for example, receives word data created by cutting out data such as image data for each predetermined bit, and performs compression processing for each word data. The word data will be described with reference to FIG. FIG. 2A is a diagram showing data before being cut out into word data. In (a), the upper part shows the address of the data before being cut out, and the lower part shows the data stored in each address. FIG. 2B is a diagram showing 8-bit word data D obtained by cutting out the data shown in FIG. 2A at the positions indicated by P1 and P2.
[0025]
The image compression processing apparatus according to the first embodiment sequentially inputs word data and processes them in parallel. For this reason, for example, when the illustrated image compression processing apparatus inputs the word data D as “current word data”, the word data arranged immediately after the data D is input as “next word data”.
[0026]
The image compression processing apparatus in FIG. 1 includes a run-length encoding processing apparatus 101, code amount measurement apparatuses 102a and 102b, and a PASS code header creation apparatus 103. The run-length encoding processing apparatus 101 compresses word data and next word data in parallel. The code amount measuring device 102a measures the code amount when each word data is encoded by the run length encoder, and the code amount measuring device 102b measures the code amount of the next word data. Further, the PASS code header creation device 103 creates a PASS code that is added to the word data as a header.
[0027]
Further, the image compression processing apparatus in FIG. 1 stores the word data encoded by the run-length encoding processing apparatus 101 as a code, a register 105 that stores the PASS code generated by the PASS code header generation apparatus 103 as a word before compression. A register 106 that stores data (original data), a comparator 104a that compares a preset threshold th with a code amount of word data measured by the code amount measuring apparatus 102a, and a threshold th and code amount measurement Comparator 104b that compares the code amount of the next word data measured by apparatus 102b, word data encoded based on the result of comparison between the code amount and threshold th, and PASS code as code data And a MUX (Multiplexer) 107 for outputting.
[0028]
FIG. 3 is a diagram for explaining codes handled in the above-described image compression processing device. FIG. 3A shows a format when word data is encoded by a run-length encoder, and FIG. , Shows the format of the PASS code.
[0029]
Next, an outline of processing performed in the above-described configuration will be described with reference to the flowchart of FIG. First, the image compression processing apparatus of the first embodiment inputs the next word data to the code amount measuring device 102b and measures the code amount of this word data (step S401). The measured code amount is compared with the threshold value th by the comparator 104b (step S402). The comparison result is output to the run-length encoding processing apparatus 101.
[0030]
Further, word data (hereinafter simply referred to as word data) arranged immediately before the next word data is input to the code amount measuring device 102a, the run-length encoding processing device 101, and the PASS code header creating device 103. The run-length encoding processing apparatus 101 receives the MSB (Most Significant Bit (or Byte)) of the word data and the next word data, and encodes the input word data (step S403). At this time, the code amount measured by the code amount measuring apparatus 102b is compared with the threshold value th in the comparator 104b, and a signal indicating whether or not the code amount exceeds the threshold value th is displayed as a run-length encoding processing apparatus. 101.
[0031]
When the input signal indicates that the code amount of the next word data exceeds the threshold th, the next data is PASS-encoded, so the run length of the word data extends over the next word data In addition, the word data is cut out and encoded by the word boundary. If the code amount of the next word data does not exceed the threshold value, only the closed run length (the portion not including the run length over the next boundary) is encoded. The word data encoded by the run-length encoding processing apparatus 101 is stored in the register 105 (step S404).
[0032]
Next, the PASS code header creation device 103 determines whether the 0th bit of the data to be PASS encoded is 1 or 0 in order to clarify 0 and 1 of the start of the run length after the PASS code. Investigate. Then, the setting of the PASS code is selected by 1 or 0 of the 0th bit (step S405).
[0033]
  FIGS. 5A and 5B are diagrams for more specifically describing step S405. (A), (b) shows the example of the PASS encoding of word data, respectively, (II) in (a), (b) is a figure which shows the encoding of this Embodiment. Moreover, (I) is a figure which shows the encoding generally performed for a comparison. The top row of (a), (b), (I), and (II) shows the pixel data, and the next row shows the run length when each pixel data is cut into 8-bit word data. Further, the lower part of the run length indicates the code amount of each word data, and the lowermost part indicates the code assigned to each code amount. In the first embodiment, the threshold value th of PASS encoding is set to a code amount 3, and the code amount isGreater than 3Word data is PASS encoded.
[0034]
In the example shown in (a), the data of Dp1 has a code amount of 6, and has a code amount of 3 or more. For this reason, Dp1 is PASS encoded as shown in (II) of FIG. Whether or not to perform PASS encoding is determined in the word data after cutting away the run length between the word data before and after the word data to be PASS encoded.
[0035]
Further, the PASS code uses a code of 8 or 9 to distinguish whether the extracted word data starts with 0 or 1. In the example of (a), since Dp1 starts from 1, 9 is used for the PASS code (9D2).
[0036]
  In the example shown in (b), the data of Dp2 has a code amount of 5, and has a code amount of 3 or more. For this reason, Dp2 is PASS-encoded as in (II). In the example of (b), since Dp2 starts from 0, 8 is used for the PASS code (82D).
[0037]
The PASS code created by the PASS code header creation device 103 is attached to the original data as a header, and is stored in the register 106 together with the original data (step S406). The code amount measuring apparatus 102a measures the code amount of the word data (step S407). The measured code amount is input to the comparator 104a, and is compared with the threshold value th by the comparator 104a. The comparison result (whether or not the code amount is larger than the threshold th) is input to the MUX 107 (step S408).
[0038]
As a result of the comparison by the comparator 104a, the word data and the PASS code encoded by the run-length encoding processing apparatus 101 are input to the MUX 107. Based on the comparison result of the comparator 104a, the MUX 107 outputs the original data to which the PASS code is added as code data when the code amount is larger than the threshold value th. When the code amount is smaller than the threshold value th, the encoded word data is output as code data (step S409).
[0039]
Next, the configuration shown in FIG. 1 will be described in more detail.
(1) Run-length encoding processing device
FIG. 6 is a block diagram for explaining the run-length encoding processing apparatus 101. The run-length encoding processing apparatus 101 includes a run-length processing apparatus 601 and an encoding processing apparatus 602. The run-length processing device 601 is configured to obtain the run length of word data in parallel. Since the word data in the first embodiment is 8 bits, the run length processing device 601 obtains a maximum of 8 run lengths in parallel. Also, the encoding processing device 602 encodes the run length obtained by the run length processing device 601 based on the format shown in FIG.
[0040]
FIG. 7 is a diagram for explaining the configuration of the run length processing apparatus 601. As illustrated, the run length processing device 601 includes run counters 701 a and 701 b, a Left run value generation device 702, a Right run value generation device 703, a run value synthesis device 705, a cumulative addition processing device 708, and a register 709. . The cumulative addition processing device 708 includes an adder 706 and an adder 707. Hereinafter, each configuration of the run-length encoding processing device will be described.
[0041]
(Run counter)
The run counters 701a and 701b are 8-bit word data (IDOT) input from an image reading device (not shown) such as a scanner, and the upper 4 bits of IDOT from the bit (NDOT) at the head of the next word data. (IDOT [7: 4]), run count for processing IDOT [3] as NDOT, lower 4 bits of IDOT (IDOT [3: 0]), and run counter for processing NDOT A run length, a signal (mask value) indicating whether or not the run length is valid, and a run length (RUNX) to be carried over next are obtained.
[0042]
That is, the run counters 701a and 701b receive, for example, the upper 4 bits of 8-bit word data generated by cutting out image data and the first bit data of the next word data, and output a maximum of 4 run lengths. To do. The illustrated RUN3 to LUN0 (LRUN is a run value generated by the Left run value generation device, and RRUN is a run value generated by the Right run value generation device) indicate run lengths. DMASK3 to DMASK0 are flags indicating whether or not the run lengths of RUN3 to LUN0 are valid. The run count processing performed in the run counters 701a and 701b is shown as flowcharts in FIGS.
[0043]
(Left run value generator)
The Left run value generation device 702 receives a maximum of four run lengths and mask values (LDMASK3-0) from the run counter 701a, and a mask value (RDMASK3-0) from the run counter 701b, and has a maximum 8 bits of 8 bits. Find the run length. The processing by the Left run value generation device 702 is shown in FIG.
[0044]
(Right run value generator)
The right run value generation device 703 receives a maximum of four run lengths and mask values (RDMASK3-0) from the run counter 701b, and a mask value (LDMASK3-0) from the run counter 701a, and has a maximum of 8 bits and a maximum of 8 bits. Find the run length. The processing performed by the Right run value generation device 703 is shown in FIG.
[0045]
(Mask value synthesizer)
The mask value synthesizing device 704 receives mask values from the run counter 701a and the run counter 701b, and synthesizes the mask values to obtain eight mask values of 8 bits. Processes performed by the mask value synthesis apparatus 704 are shown in FIGS.
[0046]
(Run value synthesizer)
The run value synthesizer 705 receives a maximum of 8 run lengths from the Left run value generator 702 and the Right run value generator 703, respectively, and combines them to generate a maximum of 8 run lengths (step S1401). . The processing performed by the run value synthesis device 705 is shown in FIG. RUNX in the figure is the run length to be carried over next, AFL is 1 when all 4 bits are 0 or 1, and NDOT (the first bit of the next data) is the same value. Flag.
[0047]
(Cumulative addition processing device)
The cumulative addition processing device 708 includes adders 706 and 707. When the AFL of the word data is 1, the adder 706 adds the carry-over run length obtained by the run value synthesizer 705 and the carry-over run length stored in the register 709 (RBRUN7), and carries over again. Set as the total run length (RBRUN7). The adder 707 adds the RUN 7 input first and the total carry-over run length, and obtains a run length considering the run length carried over so far.
[0048]
(Encoding processing device)
FIG. 18 is a diagram for explaining the encoding processing device 602. The encoding processing device 602 receives RRUN 7 to 0 data, DMASK 7 to 0, a clock (CLK) signal, and the like from the register 709, and outputs encoded word data (CODE). 19 and 20 are flowcharts showing the encoding process performed by the encoding processing device 602. Note that the processing shown in the flowcharts of FIGS. 19 and 20 encodes word data according to the format shown in FIG.
[0049]
(2) Code amount measuring device
FIG. 21 is a block diagram for explaining the code amount measuring apparatus 102a (code amount measuring apparatus 102b). The code amount measuring device 102a includes a run length processing device 1801 and a code amount measuring processing device 1802. The code amount measuring apparatus 102a and the code amount measuring apparatus 102b have the same configuration and operate in the same manner. Therefore, in this specification, only the code amount measuring apparatus 102a will be described, and the description of the code amount measuring apparatus 102b will be omitted.
[0050]
(Run length processing equipment)
FIG. 22 is a block diagram for explaining the run-length processing device 1801. The run-length processing device 1801 has the same configuration as the run-length processing device 601 shown in FIG. 7, and includes run counters 701a and 701b, a left run value generation device 702, a right run value generation device 703, a mask value synthesis device 704, A run value synthesis device 705 and a register 709 are provided. However, the run-length processing device 1801 does not include the cumulative addition processing device 708, and inputs the inverted LSB of the word data immediately before the run counter 701b so that the run length of the word data is always closed. This is different from the run-length processing apparatus 601.
[0051]
FIG. 23 is a block diagram for explaining the code amount measurement processing device 1802 shown in FIG. Similarly to the encoding processing device 602 shown in FIG. 18, the code amount measurement processing device 1802 receives RRUN 7 to 0 data, DMASK 7 to 0, a clock (CLK) signal, and the like from the register 709 and encodes the encoded word. Data (CODE) is output. The code amount measurement processing performed by the code amount measurement processing device 1802 is shown in FIGS.
[0052]
(3) PASS code header creation device
FIG. 25 is a flowchart for explaining processing of the PASS code header creation device 103. As shown in the figure, the PASS code header creation device 103 determines whether or not the first bit of the word data is 0 (step S2201), and when the first bit is 0 (step S2201: Yes). The header as the PASS code is set to 9 (step S2202). If the result of determination in step S2201 is that the first bit is not 0 (that is, 1) (step S2201: No), the header is set to 8 (step S2203).
[0053]
(Embodiment 2)
Next, a second embodiment of the present invention will be described.
FIG. 26 is a block diagram for explaining an image compression processing apparatus according to the second embodiment of the present invention. Note that the image compression processing apparatus according to the second embodiment has the same configuration as the image compression processing apparatus according to the first embodiment. It shall be omitted.
[0054]
The image compression processing device in FIG. 26 includes a run length / repetitive coding processing device 2301, code amount measurement devices 2302a and 2302b, and a PASS code header creation device 103. The run-length / repetitive encoding processing device 2301 compresses word data and next word data in parallel. However, unlike the word data of the first embodiment, the word data of the second embodiment is cut out with a run length that crosses the boundary between the word data. For this reason, the run-length / repetitive encoding processing device 2301 is configured to be able to cope with repetitive processing across word data.
[0055]
The code amount measuring device 2302a measures the code amount when the word data of the second embodiment is encoded by the run length encoder, and the code amount measuring device 2302b is the code of the next word data of the second embodiment. Measure the amount. Further, the PASS code header creation device 103 creates a PASS code that is added to the word data as a header.
[0056]
Further, the image compression processing apparatus of FIG. 26 includes comparators 104a and 104b, registers 105 and 106, and a MUX 107 similar to those in the first embodiment. The comparator 104a compares the threshold th with the code amount of the word data measured by the code amount measuring device 2302a. The comparator 104b compares the threshold th with the code amount of the next word data measured by the code amount measuring device 2302b. The register 105 stores the encoded word data as a code, and the register 106 stores the pre-encoded word data (original data) attached with the PASS code. The MUX outputs either encoded word data or original data as code data based on the result of comparison between the code amount and the threshold value th.
[0057]
FIG. 27 is a diagram for explaining codes handled in the above-described image compression processing apparatus. FIG. 27A shows a format when word data is encoded by a run-length encoder, and FIG. The format of the repetitive code is shown, and (c) shows the format of the PASS code.
[0058]
Next, an outline of processing performed in the above-described configuration will be described with reference to the flowchart of FIG. First, the image compression processing apparatus of the second embodiment inputs the next word data to the code amount measuring device 2302b and measures the code amount of this word data (step S2501). The measured code amount is compared with the threshold value th by the comparator 104b (step S2502). The comparison result is output to the run-length / repetitive encoding processing device 2301.
[0059]
The word data is input to the code amount measuring device 2302a, the run-length / repetitive encoding processing device 2301, and the PASS code header creating device 103. The run-length / repetitive encoding processing device 2301 receives the MSB of the input word data and the next word data, and encodes the input data (step S2503). At this time, the code amount measured by the code amount measuring device 2302b is compared with the threshold value th in the comparator 104b, and a signal indicating whether the code amount exceeds the threshold value th is run-length / repetitively encoded. Input to the processor 2301.
[0060]
When the input signal indicates that the code amount of the next word data exceeds the threshold th, the next data is PASS-encoded, so the run length of the word data extends over the next word data In addition, the word data is cut out and encoded by the word boundary. If the code amount of the next word data does not exceed the threshold value, only the closed run length (the portion not including the run length over the next boundary) is encoded. The word data encoded by the run-length encoding processing apparatus 101 is stored in the register 105 (step S2504).
[0061]
Next, the PASS code header creation device 103 determines whether the 0th bit of the data to be PASS encoded is 1 or 0 in order to clarify 0 and 1 of the start of the run length after the PASS code. Investigate. Then, the setting of the PASS code is selected by 1 or 0 of the 0th bit (step S2505).
[0062]
FIG. 29 is a diagram for explaining step S2505 more specifically, and shows an example of PASS encoding of word data. Moreover, (II) is a figure which shows the encoding of Embodiment 2, (I) is a figure which shows the encoding generally performed for a comparison. The top row of (I) and (II) shows pixel data, and the next row shows the run length when each pixel data is cut into 8-bit word data. Further, the lower part of the run length indicates the code amount of each word data, and the lowermost part indicates the code assigned to each code amount. Also in the second embodiment, the threshold value th for PASS encoding is set to code amount 3, and word data having a code amount of 3 or more is PASS encoded.
[0063]
As shown in the figure, in the second embodiment, the run length over the word data arranged immediately after the PASS-encoded word is cut off. In the example shown in FIG. 29, the iterative process is added to the word data immediately before the word to be PASS encoded. Note that the run length between the word data before and after the PASS-encoded word data is also cut off in the second embodiment.
[0064]
The PASS code created by the PASS code header creation device 103 is attached to unencoded data as a header and stored in the register 106 together with the data (step S2506). The code amount measuring apparatus 2302a measures the code amount of word data (step S2507). The measured code amount is input to the comparator 104a, and is compared with the threshold value th by the comparator 104a. The comparison result (whether or not the code amount is larger than the threshold th) is input to the MUX 107 (step S2508).
[0065]
As a result of the comparison by the comparator 104a, the word data and the PASS code encoded by the run-length repetition / encoding processing device 2301 are input to the MUX 107. Based on the comparison result of the comparator 104a, the MUX 107 outputs the original data with the PASS code added as a header as code data when the code amount is larger than the threshold th. When the code amount is smaller than the threshold value th, the encoded word data is output as code data (step S2509).
[0066]
Next, the configuration shown in FIG. 26 will be described in more detail.
(1) Run-length repetition / encoding processing device
FIG. 30 is a block diagram for explaining the run-length / repetitive encoding processing device 2301. The run-length / repetitive encoding processing device 2301 includes a run-length processing device 2701, an iterative processing device 2702, and an encoding processing device 2703. The run length processing device 2701 is configured to obtain the run length of word data in parallel. Since the word data in the first embodiment is 8 bits, the run length processing device 2701 obtains a maximum of 8 run lengths in parallel. In addition, the iterative processing device 2702 obtains the number of repetitions of the run length in the run length processing device 2701. The encoding processing device 2703 encodes the run length obtained by the run length processing device 2701 and the number of repetitions obtained by the repetition processing device 2702 based on the format shown in FIG.
[0067]
FIG. 31 is a diagram for explaining the configuration of the iterative processing device 2702. As illustrated, the iterative processing device 2702 includes an iterative flag generator 2801, an iterative number generator 2802, a register 2803, a NEXT run length generator 2804, and a register 2805. The iterative processing device 2702 determines whether or not the plurality of run lengths obtained by the run length processing device 2701 are equal to the run length two previous to each run length, and the repetitive flag (RFL7˜ 0) is generated. Then, from the pattern of the repetition flag (RFL7 to 0) and the number of repetitions (REP) input so far, the number of repetitions to date (WREP7 to 0) and the number of repetitions to the next pattern (WREP) are obtained. . Hereinafter, each configuration of the iterative processing device 2702 will be described.
[0068]
(Repetition flag generator)
The repetitive flag generation device 2801 inputs a plurality of run lengths, a plurality of run length mask values, a run length of the previous pattern, and a run length of the previous pattern from the run length processing device 2701, It is determined whether each run length input from the processing device 2701 matches the run length input two times before. Based on the result of the determination, repeat flags RFL7-0 are output. The above processing performed by the repetition flag generation device 2801 is shown as a flowchart in FIG.
[0069]
As shown in FIG. 32, the repetition flag generator 2801 checks the mask value (step S2901). If this value is 0 (step S2901: NO), 2 is set in the repeat flag RFL7 because there is no corresponding run length (step S2903). If it is determined in step S2901 that the mask value is 1 (step S2901: YES), RUN7 is compared with the second run length RF2 after the previous pattern (step S2902).
[0070]
As a result, when RUN7 and RF2 do not match (step S2902: No), 0 is set to the repetition flag RFL7 (step S2904). If it is determined in step S902 that RUN7 and RF2 match (step S2902: Yes), 1 is set in the repeat flag RFL7 (step S2905). The repetition flag generation device 2801 executes the above processing for all bit values DMASK7-0.
[0071]
(Repetition number generator)
The repetition number generation device 2802 receives the repetition flags RF7 to 0 input from the repetition flag generation device 2801 and the current repetition number (REP), generates a plurality of repetition numbers (WREP7 to 0), and outputs them to the register 2803 To do. Processing for obtaining the number of repetitions from the number of repetition flags of the repetition number generation device 2802 is shown as a flowchart in FIGS.
[0072]
As illustrated in FIGS. 33 to 35, the repetition number generation device 2802 obtains a plurality of repetition numbers WREP7 to 0. The number of repetitions is a numerical value that occurs when the repetition stops. The repetition number generation device 2802 first obtains the seventh-bit repetition number WREP7.
[0073]
That is, the iteration number generation device 2802 determines whether or not the iteration number RF7 is 0 (step S3001). If it is 0 (step S3001: Yes), the result of the comparison by the iteration flag generation device 2801 does not match. The number of repetitions up to the present is settled, and the number of repetitions REP up to the present is substituted into the number of repetitions WREP7 (step S3003). If the repetition number RF7 is not 0 (step S3001: No), the repetition number WREP7 is set to 0 (step S3002) assuming that the repetition continues.
[0074]
The value WREP6 of the sixth bit of the repetition number is obtained in steps S3004 to S3006. That is, if the repetition flag RFL7 is 1 and RFL6 is 0 (step S3004: Yes), the repetition number WREP6 is set to 1 (RFL = 1) that is the current repetition number in the repetition number REP thus far. Add and substitute into WREP6 (step S3006). If the repetition flag RFL7 is not 1 and RFL6 is not 0 (step S3004: No), 0 is substituted for the repetition number WREP6 (step S3005). Hereinafter, as in the processing described above, the number of repetitions of the fifth bit to the zeroth bit is obtained.
[0075]
In addition, FIGS. 36 to 40 are flowcharts showing processing for obtaining the number of repetitions (REP) to be continued in the next pattern of the repetition number generation device 2802. As shown in FIGS. 36 to 40, when the repetition flag RFL7 is 2 (step S3101: Yes), the repetition number generation device 2802 cannot determine the run length value with the highest priority, and therefore sets the current repetition number REP. Save (step S3105). If the repetition flag RFL7 is not 2 (step S3101: No), it is determined whether the repetition flag RFL7 is 0 and RFL6 is 2 (step S3102). As a result of the determination, if the repetition flag RFL7 is 0 and RFL6 is 2 (step S3102: Yes), the run length with the highest priority is not a repetition, and since there is no run length thereafter, the repetition number WREP is 0. (Step S3106).
[0076]
If it is determined in step S3102 that the repeat flag RFL7 is 0 and RFL6 is not 2 (step S3102: No), it is determined whether the repeat flag RFL7 is 1 and RFL6 is 2 (step S3103). As a result, if the repeat flag RFL7 is 1 and RFL6 is 2 (step S3103: Yes), the run length with the highest priority is repeat, and there is no run length thereafter, so the repeat number REP at the present time is set. The number of repetitions 1 obtained this time is added and substituted into WREP (step S3107).
[0077]
Next, the repetition number generation device 2802 determines whether or not the repetition flag RFL6 is 0 and RFL5 is 2 (step S3104). As a result of the determination, if the repetition flag RFL6 is 0 and RFL5 is 2 (step S3104: Yes), if the effective termination (here, RFL5 is 2 because RFL5 is 2), the number of repetitions WREP Becomes 0 regardless of the value of RFL7 (step S3108). Thereafter, the repetition number generation device 2802 performs the above processing for all combinations of repetition flags.
[0078]
(NEXT run length generator)
The NEXT run length generation device 2804 is configured to obtain the second run length and the last run length counted from the end of the previous pattern in order to generate the next pattern repetition flag. The processing executed by the NEXT run length generating device 2804 is shown in FIG.
[0079]
As illustrated in FIG. 41, the NEXT run length generation device 2804 determines whether or not the mask (DMASK7) having the highest priority is 1 (step S3401). If DMASK7 is not 1 (step S3401: NO), DMASK7 is 0, and the last value and the last value of the previous pattern are stored assuming that there is no closed run length in this pattern (step S3405). ).
[0080]
Further, when DMASK7 is not 0 (step S3401: YES), the NEXT run length generation device 2804 determines whether DMASK6 is 1 (step S3402). If DMASK6 is not 1, that is, 0 (step S3402: No), there is only one run length. Therefore, the value of RUN7 is substituted into the first run length WREF1 counted from the end of the previous pattern. Further, the value of WREF1 is substituted into the second run length WREF2 counted from the end of the previous pattern (step S3406).
[0081]
Further, the NEXT run length generation device 2804 determines whether DMASK5 is 1 (step S3403). If DMASK5 is not 1 (step S3403: No), it is assumed that DMASK5 is 0 and there are only two closed run lengths in this pattern. Then, the value of RUN6 is substituted into the first run length WREF1 counted from the end of the previous pattern. Further, the value of RUN7 is substituted for the second run length WREF2 counted from the end of the previous pattern (step S3407).
[0082]
Further, the NEXT run length generation device 2804 determines whether DMASK4 is 1 (step S3404). If DMASK4 is not 1 (step S3404: NO), it is assumed that DMASK4 is 0 and there are only three closed run lengths in this pattern. Then, the value of RUN5 is substituted into the first run length WREF1 counted from the end of the previous pattern. Also, the value of RUN6 is substituted into the second run length WREF2 counted from the end of the previous pattern (step S3408).
[0083]
(Encoding processor)
FIG. 42 is a block diagram showing the configuration of the encoding processing device 2703 shown in FIG. The encoding processing device 2703 receives a maximum of 8 run lengths (ORUN7 to 0), the number of repetitions (OREP7 to 0), and a mask value (not shown). Then, the data encoded every 4 bits shown in FIG. 27 is output. However, the encoding processing device 2703 is not limited to the one that encodes data every 4 bits, and may use a format that encodes every bit.
[0084]
43 to 45 are flowcharts for explaining processing performed by the encoding processing device 2703. The flowchart shown in FIG. 43 shows the process performed by the encoding processing apparatus, and FIGS. 44 and 45 are flowcharts for explaining the encoding process in FIG. The encoding processing device 2703 obtains a run length based on the mask values DMASK7 to 0 and encodes it.
[0085]
That is, the encoding processing device 2703 first determines whether or not the value of DMASK7 is 1 (step S3601). If the value of DMASK7 is 1 (step S3601: YES), the run length (run length) is set to RUN7, the repetition number REP is set to REP7, and the run length is encoded (step S3602).
[0086]
When performing encoding, the encoding processing device 2703 first determines whether or not the input run length is 0, as shown in FIGS. 44 and 45 (step S3701). As a result of the determination, if the run length is not 0 (step S3701: NO), it is determined whether the run length is 10 or less (step S3702). If the run length is 10 or less (step S3702: YES), the run length is directly used as a code (step S3703).
[0087]
If the run length value is 10 or more (step S3702: NO), it is determined whether the run length is 43 or less (step S3704). As a result of the determination, if the run length value is 43 or less (step S3704: Yes), it is further determined whether or not the run length value is 27 or less (step S3705).
[0088]
As a result of the determination in step S3705, when the run length value is 27 or less (step S3705: Yes), a 4-bit 1010 is added as a header, and a value obtained by subtracting 11 from the run length is used as a sign (step) S3708). On the other hand, when the run length value is 27 or more (step S3705: No), 4 bits 1011 are added as a header, and a value obtained by subtracting 11 from the run length is used as a code (step S3707).
[0089]
Also, when the run length value is 43 or more (step S3704: NO), the encoding processing device 2703 adds 4 bits of 1100 as a header, and ends the fourth bit of the header through steps S3709 to S3716. Thus, the code length is expressed by a small number of data.
[0090]
Further, if it is determined in step S3701 that the run length is 0 (step S3701: YES), it is determined whether the repeat number REP is 1 (step S3717). As a result of the determination, the code is set to 13 (step S3718). If the repetition number REP is not 1 (step S3717: No), it is determined whether the repetition number REP is 2 (step S3719). If the number of repetitions is 2 (step S3719: Yes), the code is set to 14 (step S3720).
[0091]
If the repetition number REP is not 2 (step S3719: No), the encoding processing device 2703 determines whether the repetition number REP is 3 (step S3721). If the repetition number REP is 3 (step S3721: YES), the code is set to 13 and 14 (step S3722). When the repetition number REP is not 3 (step S3721: No), the encoding processing device 2703 determines whether the repetition number REP is 4 (step S3723). If the repetition number REP is 4 (step S3723: YES), the code is set to 14 and 14 (step S3724).
[0092]
When the number of repetitions is 4 or more (step S3723: No), 4-bit 1111 is added as a header, and the code length is expressed by a small number of data by using the fourth bit of the header as a termination flag in steps S3726 to S3733. .
[0093]
(2) Code amount measuring device
FIG. 46 is a block diagram for explaining the code amount measuring apparatus 2302a (2302b). The code amount measuring device 2302a includes a run length processing device 1801, an iterative processing device 2702, and a code amount measuring processing device 3801. The run-length processing device 1801 and the iterative processing device 2702 are the same as those described above. For this reason, the same code | symbol is attached | subjected and shown and description shall be abbreviate | omitted. The code amount measuring device 2302a and the code amount measuring device 2302b have the same configuration and operate in the same manner. Therefore, in this specification, only the code amount measuring device 2302a will be described, and the description of the code amount measuring device 2302b will be omitted.
[0094]
(Code amount measurement processing device)
The code amount measurement processing device 3801 measures the code length of the word data based on the run length obtained by the run length processing device 1801, the number of repetitions obtained by the repetition processing device 2702, and the format shown in FIG. is there. 47 and 48 show flowcharts of processing performed by the code amount measurement processing device 3801. FIG.
[0095]
【The invention's effect】
  As described above, the invention described in claim 1When the first word data is encoded, the run length over the first word data and the second word data can be cut. Therefore, it is possible to provide an image compression processing apparatus that can obtain a higher compression rate, can be manufactured at lower cost, and can be processed at high speed.
[0096]
  The invention described in claim 2The code amount of image data is compared with a threshold value for each word data, and word data or original word data encoded based on the comparison result is output. For this reason, it is possible to provide an image compression processing apparatus capable of minimizing the configuration for storing the encoded data and the original data and capable of processing at a lower cost and at a higher speed.
[0097]
  Claim3In the invention described in the above, the image data is obtained based on the number of repetitions of the image data.For each word dataIn the encoding configuration, the code amount of the image data is compared with a threshold value for each word data, and word data or original word data encoded based on the comparison result is output. For this reason, it is possible to provide an image compression processing apparatus capable of minimizing the configuration for storing the encoded data and the original data and capable of processing at a lower cost and at a higher speed. In addition, there is an effect that it is possible to efficiently compress an image and to provide an image compression processing device with a higher compression rate.
[0099]
  Claim4The invention described inWhen the first word data is encoded, the run length over the first word data and the second word data can be cut. Therefore, it is possible to provide an image compression processing apparatus that can obtain a higher compression rate, can be manufactured at lower cost, and can be processed at high speed.
[0100]
  Claim5The invention described inWhen the first word data is encoded, the run length over the first word data and the second word data can be cut. Therefore, it is possible to provide an image compression processing apparatus that can obtain a higher compression rate, can be manufactured at lower cost, and can be processed at high speed.
[Brief description of the drawings]
FIG. 1 is a block diagram for explaining an overall configuration of an image compression processing apparatus according to a first embodiment of the present invention.
FIG. 2 is a diagram for explaining word data according to the first embodiment of the present invention.
FIG. 3 is a diagram showing a format when encoding word data according to the first embodiment of the present invention.
FIG. 4 is a flowchart for explaining an outline of processing performed in Embodiment 1 of the present invention;
FIG. 5 is a diagram for explaining a PASS code according to the first embodiment of the present invention.
6 is a block diagram for explaining the run-length encoding processing apparatus shown in FIG. 1; FIG.
7 is a diagram for explaining the configuration of the run-length processing apparatus shown in FIG. 6;
8 is a flowchart showing a run count process performed in the run counter shown in FIG. 7;
FIG. 9 is another flowchart showing a run count process performed in the run counter shown in FIG. 7;
10 is a flowchart showing a run count process performed in the run counter shown in FIG. 7;
11 is a flowchart showing a run count process performed in the run counter shown in FIG. 7;
12 is a flowchart showing processing of the Left run value generation device shown in FIG.
FIG. 13 is a flowchart showing processing of the Right run value generation device shown in FIG. 7;
14 is a flowchart showing processing of the mask value synthesizing apparatus shown in FIG. 7;
15 is another flowchart showing processing of the mask value synthesizing apparatus shown in FIG.
16 is another flowchart showing processing of the mask value synthesizing apparatus shown in FIG. 7;
FIG. 17 is another flowchart showing the process of the run value synthesis apparatus shown in FIG. 7;
18 is a diagram for explaining the encoding processing apparatus illustrated in FIG. 6; FIG.
FIG. 19 is a flowchart showing processing of the encoding processing device.
FIG. 20 is another flowchart showing processing of the encoding processing device.
FIG. 21 is a block diagram for explaining the code amount measuring apparatus shown in FIG. 1;
22 is a block diagram for explaining the run length processing apparatus shown in FIG. 21; FIG.
FIG. 23 is a block diagram for explaining the code amount measurement processing apparatus shown in FIG. 21;
FIG. 24 is a flowchart illustrating a code amount measurement process performed by a code amount measurement processing apparatus.
25 is a flowchart for explaining processing of the PASS code header creation device shown in FIG. 1; FIG.
FIG. 26 is a block diagram for explaining an image compression processing apparatus according to the second embodiment of the present invention;
FIG. 27 is a diagram illustrating a format when encoding word data according to the second embodiment of the present invention.
FIG. 28 is a flowchart for explaining an overview of processing performed in Embodiment 2 of the present invention;
FIG. 29 is a diagram for explaining a PASS code according to the second embodiment of the present invention.
30 is a block diagram for explaining the run-length / repetitive coding processing apparatus shown in FIG. 26;
31 is a diagram for explaining the configuration of the iterative processing apparatus shown in FIG. 30;
32 is a flowchart showing processing performed by the repetition flag generation device shown in FIG. 31. FIG.
FIG. 33 is a flowchart showing processing performed by the repetition number generation device.
FIG. 34 is another flowchart showing processing performed by the repetition number generation device.
FIG. 35 is another flowchart showing processing performed by the repetition number generation device.
FIG. 36 is a flowchart showing a process for obtaining the number of repetitions to be continued in the next pattern performed by the repetition number generation device.
FIG. 37 is another flowchart showing a process for obtaining the number of repetitions continued in the next pattern made by the repetition number generation device.
FIG. 38 is another flowchart showing a process for obtaining the number of repetitions continued in the next pattern made by the repetition number generation device.
FIG. 39 is another flowchart showing a process for obtaining the number of repetitions continued in the next pattern made by the repetition number generation device.
FIG. 40 is another flowchart showing a process for obtaining the number of repetitions continued in the next pattern made by the repetition number generation device.
41 is a diagram showing processing executed by the NEXT run length generation device shown in FIG. 31; FIG.
42 is a block diagram showing a configuration of the encoding processing device shown in FIG. 30. FIG.
43 is a flowchart showing processing performed by the encoding processing device shown in FIG. 30. FIG.
FIG. 44 is another flowchart showing the processing performed by the encoding processing device.
FIG. 45 is another flowchart showing processing performed by the encoding processing device.
46 is a block diagram for explaining the code amount measuring apparatus shown in FIG. 26; FIG.
FIG. 47 is a flowchart showing processing performed by the code amount measuring apparatus.
FIG. 48 is another flowchart showing processing performed by the code amount measuring apparatus.
[Explanation of symbols]
101 Run-length encoding processing apparatus
102a, 102b code amount measuring apparatus
103 PASS Code Header Creation Device
104a, 104b comparator
105, 106, 709, 2803, 2805 registers
601, 1801, 2701 Run length processing apparatus
602, 2703 encoding processing apparatus
701a, 701b Run counter
702 Left run value generator
703 Right run value generator
704 Mask value synthesis apparatus
705 Run value synthesizer
706,707 adder
708 Cumulative addition processing device
1802 Encoding measurement processing device
2301 Run-length / repetitive encoding processing apparatus
2302a, 2302b Code amount measuring apparatus
2702 Repeat processing equipment
2801 Repeat flag generator
2802 Repeat number generator
2804 NEXT run-length generator
3801 Code amount measurement processing apparatus

Claims (5)

画像データを、所定の数のビットごとに切り出したワードデータとして圧縮する画像圧縮処理装置であって、
前記切り出された連続する複数のワードデータのうち、一のワードデータを、該ワードデータに続く次のワードデータの先頭ビットに基づいてランレングス法により符号化する符号化手段と、
前記切り出された複数のワードデータのうち、一のワードデータと、該ワードデータに続く次のワードデータとの符号量を測定する符号量測定手段と、
前記符号量測定手段によって測定された符号量を、予め設定された符号量のしきい値と比較して前記ワードデータの符号量が前記しきい値よりも大きいか否かを判断する符号量比較手段と、
を備え、
前記符号量比較手段により、前記ワードデータのうちの一つである第1ワードデータの次に符号化される第2ワードデータの符号量が、前記しきい値よりも大きいと判断された場合、前記符号化手段は、前記第1ワードデータを符号化する際に前記第1のワードデータと前記第2のワードデータとにわたるランレングスをカットすることを特徴とする画像圧縮処理装置。
An image compression processing apparatus that compresses image data as word data cut out for each predetermined number of bits,
Encoding means for encoding one word data among a plurality of consecutive extracted word data by a run length method based on the first bit of the next word data following the word data ;
Code amount measuring means for measuring the code amount of one word data and the next word data following the word data among the plurality of extracted word data ;
A code amount comparison for determining whether or not the code amount of the word data is larger than the threshold value by comparing the code amount measured by the code amount measuring means with a threshold value of a predetermined code amount Means,
With
When it is determined by the code amount comparison means that the code amount of the second word data encoded next to the first word data that is one of the word data is larger than the threshold value, The image compression processing apparatus , wherein the encoding means cuts a run length over the first word data and the second word data when the first word data is encoded .
前記符号化手段によって符号化された符号ワードデータと、前記符号化手段によって符号化される以前の前記ワードデータである元ワードデータとを保持し、前記符号量比較手段がワードデータの符号量を前記しきい値よりも小さいと判断した場合には符号ワードデータを出力する一方、前記符号量比較手段がワードデータの符号量を前記しきい値よりも大きいと判断した場合には元ワードデータを出力するワードデータ選択出力手段を備えることを特徴とする請求項1に記載の画像圧縮処理装置。 The code word data encoded by the encoding means and the original word data that is the word data before being encoded by the encoding means are held, and the code amount comparison means determines the code amount of the word data. If it is determined that the code amount is smaller than the threshold value, the code word data is output. On the other hand, if the code amount comparison unit determines that the code amount of the word data is larger than the threshold value, the original word data is output. 2. The image compression processing apparatus according to claim 1, further comprising word data selection output means for outputting . 前記符号化手段は、前記画像データにおいてランレングスが繰り返し出現する回数である繰り返し数を求めると共に該繰り返し数に基づいて前記ワードデータを符号化することを特徴とする請求項1又は2に記載の画像圧縮処理装置。 3. The encoding device according to claim 1, wherein the encoding unit obtains a repetition number that is the number of times the run length repeatedly appears in the image data, and encodes the word data based on the repetition number. 4. Image compression processing device. 画像データを、所定の数のビットごとに切り出したワードデータとして圧縮する画像圧縮処理方法であって、
前記切り出された連続する複数のワードデータのうち、一のワードデータを、該ワードデータに続く次のワードデータの先頭ビットに基づいてランレングス法により符号化する符号化工程と、
前記符号化工程において符号化されたワードデータと同様のワードデータを符号化以前の状態で保持する保持工程と、
前記切り出された複数のワードデータのうち、一のワードデータと、該ワードデータに続く次のワードデータとの符号量を測定する符号量測定工程と、
前記符号量測定工程において測定された符号量を、予め設定された符号量のしきい値と比較して前記ワードデータの符号量が前記しきい値よりも大きいか否かを判断する符号量比較工程と、
を含み、
前記符号量比較工程により、前記ワードデータのうちの一つである第1ワードデータの次に符号化される第2ワードデータの符号量が、前記しきい値よりも大きいと判断された場合、前記符号化工程は、前記第1ワードデータを符号化する際に前記第1のワードデータと前記第2のワードデータとにわたるランレングスをカットすることを特徴とする画像圧縮処理方法
An image compression processing method for compressing image data as word data cut out for each predetermined number of bits,
An encoding step of encoding one word data out of the plurality of extracted word data by a run length method based on the first bit of the next word data following the word data;
A holding step of holding word data similar to the word data encoded in the encoding step in a state before encoding;
A code amount measuring step of measuring a code amount of one word data and the next word data following the word data among the plurality of extracted word data;
A code amount comparison for comparing the code amount measured in the code amount measuring step with a preset code amount threshold value to determine whether or not the code amount of the word data is larger than the threshold value Process,
Including
When the code amount comparison step determines that the code amount of the second word data encoded next to the first word data that is one of the word data is larger than the threshold value, In the image compression processing method, the encoding step cuts a run length extending between the first word data and the second word data when the first word data is encoded .
画像データを、所定の数のビットごとに切り出したワードデータとして圧縮する画像圧縮処理方法をコンピュータに実行させるためのプログラムであって、A program for causing a computer to execute an image compression processing method for compressing image data as word data cut out for each predetermined number of bits,
コンピュータに、  On the computer,
前記切り出された連続する複数のワードデータのうち、一のワードデータを、該ワードデータに続く次のワードデータの先頭ビットに基づいてランレングス法により符号化させる符号化手順と、  An encoding procedure for encoding one word data out of the plurality of continuous word data extracted by the run length method based on the first bit of the next word data following the word data;
前記切り出された複数のワードデータのうち、一のワードデータと、該ワードデータに続く次のワードデータとの符号量を測定させる符号量測定手順と、  A code amount measurement procedure for measuring the code amount of one word data and the next word data following the word data among the plurality of extracted word data;
前記符号量測定手順によって測定された符号量を、予め設定された符号量のしきい値と比較して前記ワードデータの符号量が前記しきい値よりも大きいか否かを判断させる符号量比較手順と、  A code amount comparison for comparing the code amount measured by the code amount measurement procedure with a preset code amount threshold value to determine whether or not the code amount of the word data is larger than the threshold value. Procedure and
を含み、  Including
前記符号量比較手順により、前記ワードデータのうちの一つである第1ワードデータの次に符号化される第2ワードデータの符号量が、前記しきい値よりも大きいと判断された場合、前記符号化手順は、前記第1ワードデータを符号化する際に前記第1のワードデータと前記第2のワードデータとにわたるランレングスをカットすることを特徴とするプログラム。  When it is determined by the code amount comparison procedure that the code amount of the second word data encoded next to the first word data which is one of the word data is larger than the threshold value, The encoding procedure is characterized in that a run length over the first word data and the second word data is cut when the first word data is encoded.
JP2001139298A 2001-05-09 2001-05-09 Image compression processing apparatus, image compression processing method, and program for causing computer to execute the method Expired - Fee Related JP3862969B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001139298A JP3862969B2 (en) 2001-05-09 2001-05-09 Image compression processing apparatus, image compression processing method, and program for causing computer to execute the method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001139298A JP3862969B2 (en) 2001-05-09 2001-05-09 Image compression processing apparatus, image compression processing method, and program for causing computer to execute the method

Publications (2)

Publication Number Publication Date
JP2002335408A JP2002335408A (en) 2002-11-22
JP3862969B2 true JP3862969B2 (en) 2006-12-27

Family

ID=18986088

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001139298A Expired - Fee Related JP3862969B2 (en) 2001-05-09 2001-05-09 Image compression processing apparatus, image compression processing method, and program for causing computer to execute the method

Country Status (1)

Country Link
JP (1) JP3862969B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8150152B2 (en) 2007-08-31 2012-04-03 Ricoh Company, Ltd. Device and method for encoding image data

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021175049A (en) 2020-04-22 2021-11-01 株式会社リコー Information processing equipment, information processing methods, and programs

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8150152B2 (en) 2007-08-31 2012-04-03 Ricoh Company, Ltd. Device and method for encoding image data

Also Published As

Publication number Publication date
JP2002335408A (en) 2002-11-22

Similar Documents

Publication Publication Date Title
US5073940A (en) Method for protecting multi-pulse coders from fading and random pattern bit errors
US7428667B2 (en) Method and device for interleaving and method and device for de-interleaving
EP0448802A2 (en) Dynamic model selection during data compression
JP3076201B2 (en) Image data expansion method
JP3862969B2 (en) Image compression processing apparatus, image compression processing method, and program for causing computer to execute the method
US5049880A (en) Bit-wise run-length encoding for data compression
AU756985B2 (en) Error protecting method and error protective device
EP0477377B1 (en) Error detecting system
EP0608848A2 (en) Cyclic coding and cyclic redundancy code check processor
EP0647034B1 (en) A variable word length code decoding method, and a decoder for performing the same
US7024615B2 (en) Arithmetic operation method for cyclic redundancy check and arithmetic operation circuit for cyclic redundancy check
EP0797307A2 (en) Depuncturing circuit
CN115765756A (en) Lossless data compression method, system and device for high-speed transparent transmission
US6115424A (en) Coding method of dividing information block serving as conversion unit into a plurality of sub-blocks to perform coding for each sub-block, and coding apparatus
JP2956636B2 (en) Wave processing device
KR20000076730A (en) Coupled error code protection for multi-mode vocoders
EP3119005A1 (en) Design support method, design support program, design support device and storage medium
JP2934425B1 (en) Image data compression device and image data decompression device
JPH0936749A (en) Encoding / decoding apparatus and encoding method used therefor
CA2600569C (en) Interleaving system
US20050002522A1 (en) Data processing apparatus, method thereof, program thereof, linear conversion circuit and encryption circuit
CN1111324C (en) Digit and speech sound mixed data interlacing method
JP3277305B2 (en) Variable interleave circuit
JP2002185962A (en) Image compression device
JPH0548906A (en) Multidimensional orthogonal conversion encoder for image signal

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060306

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060620

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060821

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: 20060926

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060927

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20101006

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111006

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121006

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20131006

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees