JP3870101B2 - Image forming apparatus and image forming method - Google Patents

Image forming apparatus and image forming method Download PDF

Info

Publication number
JP3870101B2
JP3870101B2 JP2002035978A JP2002035978A JP3870101B2 JP 3870101 B2 JP3870101 B2 JP 3870101B2 JP 2002035978 A JP2002035978 A JP 2002035978A JP 2002035978 A JP2002035978 A JP 2002035978A JP 3870101 B2 JP3870101 B2 JP 3870101B2
Authority
JP
Japan
Prior art keywords
code
bytes
value
addition
start position
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
JP2002035978A
Other languages
Japanese (ja)
Other versions
JP2003244350A (en
Inventor
学 羽田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2002035978A priority Critical patent/JP3870101B2/en
Publication of JP2003244350A publication Critical patent/JP2003244350A/en
Application granted granted Critical
Publication of JP3870101B2 publication Critical patent/JP3870101B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、画像形成装置および画像形成方法に関し、より具体的には、パックビッツ圧縮されたイメージデータ等の、圧縮によりエンコードされたオブジェクトデータに基づいて描画を行う画像形成装置および画像形成方法に関する。
【0002】
【従来の技術】
従来、プリンタにおけるメモリの容量不足に対処するため、あるいは、ホストコンピュータで作成されたデータのプリンタヘの送信量を少なくするために、種々のデータ圧縮の方式が用いられてきた。そのデータ圧縮の方式の1つとして、例えば所定数ビットを1単位としてデータ圧縮を行うパックビッツ(PackBits)圧縮が存在する。例えば、バイト単位で同種データ並びおよび異種データ並びの繰り返し回数をコード化してデータ圧縮を行うバイトランレングス符号化圧縮方法がこれに該当する。
【0003】
【発明が解決しようとする課題】
しかしながら、上記のパックビッツ圧縮されたオブジェクトデータを描画する際には、このオブジェクトデータを先頭から伸張していかなければならない。例えば、図2に示すように、伸張後の構造が256バイト×10ラインのイメージデータを描画する場合を考える。1CLK/1Byte処理のとき、同図に示すデータの3ライン目が描画開始位置である場合、このイメージデータを圧縮したオブジェクトデータに基づいて描画を行うとすれば、描画開始位置までデコードするのに256バイト×2ライン=512クロック必要となる。
【0004】
このように、圧縮されたオブジェクトデータの描画を行う際、描画開始までに時間がかかってしまうという問題があった。
【0005】
本発明は、このような問題に鑑みてなされたものであり、その目的とするところは、描画スキップを行うことにより、圧縮されたオブジェクトデータの描画の高速化を図ることが可能な画像形成装置および画像形成方法を提供することにある。
【0006】
【課題を解決するための手段】
上記目的を達成するために、本発明に係る画像形成装置は、オブジェクト幅と描画開始ライン位置とに基づき描画開始位置を算出する算出手段と、入力されるコードをバイト数に変換するコード変換手段と、オブジェクトデータのスタートアドレスに前記コード変換手段により変換された入力されたコードのバイト数を加算することにより加算値を求め、求められた加算値に前記コード変換手段により変換された次に入力されたコードのバイト数を加算することにより加算値を求める加算手段と、前記加算手段により求められた加算値と前記算出手段により算出された描画開始位置とを比較する比較手段と、前記比較手段による比較の結果、前記加算手段により求められた加算値が前記算出手段により算出された描画開始位置の値より大きい場合、前記コード変換手段に入力されたコードのアドレスと前記算出手段により算出された描画開始位置の値から前記コード変換手段に入力されたコードの一つ前のアドレスのコードまでの加算値を減算した残バイト数とをラッチし、ラッチされたアドレスからデコード処理を開始し、デコードされたデータの残バイト数目から描画データとして出力する出力手段とを有し、前記比較手段による比較の結果、前記加算手段により求められた加算値が前記算出手段により算出された描画開始位置の値より小さい場合、前記コード変換手段は次に入力されたコードをバイト数に変換し、前記加算手段は、求められた加算値に前記コード変換手段により変換された次に入力されたコードのバイト数を加算することにより加算値を求め、前記比較手段は、前記加算手段により求められた加算値と前記算出手段により算出された描画開始位置とを比較する。
【0007】
また、本発明に係る画像形成方法は、オブジェクト幅と描画開始ライン位置とに基づき描画開始位置を算出する算出手段と、入力されるコードをバイト数に変換するコード変換手段と、オブジェクトデータのスタートアドレスに前記コード変換手段により変換された入力されたコードのバイト数を加算することにより加算値を求め、求められた加算値に前記コード変換手段により変換された次に入力されたコードのバイト数を加算することにより加算値を求める加算手段と、前記加算手段により求められた加算値と前記算出手段により算出された描画開始位置とを比較する比較手段とを有する画像形成装置で実行される画像形成方法であって、前記比較手段による比較の結果、前記加算手段により求められた加算値が前記算出手段により算出された描画開始位置の値より大きい場合、前記コード変換手段に入力されたコードのアドレスと前記算出手段により算出された描画開始位置の値から前記コード変換手段に入力されたコードの一つ前のアドレスのコードまでの加算値を減算した残バイト数とをラッチし、ラッチされたアドレスからデコード処理を開始し、デコードされたデータの残バイト数目から描画データとして出力し、前記比較手段による比較の結果、前記加算手段により求められた加算値が前記算出手段により算出された描画開始位置の値より小さい場合、前記コード変換手段は、次に入力されたコードをバイト数に変換し、前記加算手段は、求められた加算値に前記コード変換手段により変換された次に入力されたコードのバイト数を加算することにより加算値を求め、前記比較手段は、前記加算手段により求められた加算値と前記算出手段により算出された描画開始位置とを比較する。
【0021】
本発明では、パックビッツ圧縮イメージデータオブジェクトのスタートアドレスを設定するオブジェクトスタートアドレス設定レジスタ101、オブジェクトの幅を設定するオブジェクト幅設定レジスタ102、スキップするライン数を設定するスキップライン数設定レジスタ103、上記設定された値からスキップするバイト数を算出する乗算器104、パックビッツコード部分のアドレスLTOPを出力する加算器121、およびパックビッツコードから算出したバイト数とスキップするバイト数とを比較するマグニチュードコンパレータ107を備えた構成とする。これにより、パックビッツ圧縮されたイメージデータのパックビッツコード部分のみを解析することにより無駄なデコード処理をなくすことができる。
【0022】
【発明の実施の形態】
以下、図面を参照し、本発明の実施の形態について詳細に説明する。
【0023】
図1は、本発明を適用した画像形成装置の機能構成の一例を概略的に示すブロック図であり、本出願の発明の特徴を最もよく表わすものである。同図において、オブジェクトスタートアドレス設定レジスタ101にはパックビッツ圧縮されたブジェクトデータのメモリ上でのスタートアドレスが設定される。オブジェクト幅設定レジスタ102には、デコード(伸張)後のオブジェクトデータの幅が設定される。スキップライン数設定レジスタ103には、スキップする伸張後のオブジェクトデータのライン数Offset Yが設定される。乗算器104は、オブジェクト幅と描画スキップライン数との乗算を行って、スキップするオブジェクトデータのバイト数を算出する。
【0024】
LTOP105は加算器121からの出力値である。このLOP105は、オブジェクトデータが圧縮されていないイメージデータである場合に、オブジェクト幅およびスキップライン数に基づいて、伸張後のオブジェクトデータ上の描画開始位置になるアドレスを算出したときの値である。
【0025】
コード変換器106は、パックビッツ圧縮されたオブジェクトデータに含まれている、コード並びの繰り返し数を示す制御コード(パックビッツコード)を、デコード時のバイト数(n)に変換する。マグニチュードコンパレータ(MCP)107は、LTOP105とバイト数(n)とを比較して、バイト数(n)が大きい場合に“H”を出力する。減算器108は、LTOP105からバイト数(n−1)を減算する。
【0026】
CODE(n)109は、パックビッツコードの入力を表している。ADR(n)110およびADR(n−1)111は、制御コード位置判別部122からの出力である。このうち、ADR(n)110はパックビッツコードの位置を示すアドレスであり、このアドレスに基づいて入力されて来るデータがCODE(n)109である。また、ADR(n−1)111はADR(n)110により示されるアドレスの前状態のアドレスである。残バイト数112は、減算器108により算出された値である。
【0027】
出力A113は、マグニチュードコンパレータ107から出力されるLTOP105とバイト数(n)とのコンパレート結果である。出力B114は、マグニチュードコンパレータ107から出力されるLTOP105とバイト数(n−1)とのコンパレート結果である。
【0028】
CODE変換器2 115は、パックビッツ圧縮されたオブジェクトデータ上のカレントパックビッツコードを基準として次のパックビッツコードの位置を算出する。このCODE変換器2 115からの算出値により、圧縮されたオブジェクト内で、カレントパックビッツコードから次のパックビッツコードへ遷移することが可能となる。パックビッツコードCODE(n)109として81h〜FFhが入力された場合、CODE変換器2 115は2を出力する。また、CODE(n)109として00h〜7Fhが入力された場合は、CODE(n)+2を出力する。
【0029】
図2は、パックビッツ圧縮されたオブジェクトデータのデコード後の構造の一例を概略的に示す図である。本実施形態において使用されるデータは、オブジェクト幅が256バイト、高さが10ラインのイメージデータである。
【0030】
同図における2ラインとは、スタートアドレスから前記描画開始位置までのライン数を表しており、LTOPとは描画を開始する位置を表している。従って、オブジェクトデータの先頭アドレスは40000hであり、描画開始位置のアドレスは40200hである。
【0031】
図3は、図2に示したパックビッツ圧縮されたオブジェクトデータの内容を表す図である。同図におけるデータ中、下線が引いてある部分は、パックビッツコードを示している。コードNoは、圧縮されたオブジェクトデータ中の何個目のパックビッツコードであるかを示している。ここで、コードNo.8およびNo.9の間の線は、9個目のパックビッツコードに対応するコードから有効描画範囲に入ることを表している。すなわち、コードNo.9のパックビッツコードにより指定されたバイト数分繰り返されるコード並びの中に、描画開始位置が含まれている。同図に示す例では、コードNo,9に対応するデータの94バイト目が描画開始位置である。
【0032】
図4は、本実施形態に係る画像形成装置が実行する画像形成処理のタイミングチャートである。同図において、縦線の区切り1つが1クロックに相当する。
【0033】
以下、図3に示すオブジェクトデータを描画する場合を例に挙げて説明する。パックビッツ圧縮されたオブジェクトデータのスタートアドレスは40000hであり、かつオブジェクト幅が256(100h)バイトである。また、高さは10ライン、描画開始ライン位置(Offset Y)は2ラインである。この場合、オブジェクトスタートアドレス設定レジスタ101にはオブジェクトスタートアドレスとして40000hが設定され、オブジェクト幅設定レジスタ102にはオブジェクト幅として100hが設定される。また、スキップライン数設定レジスタ103には、Offset Yとして2hが設定される。
【0034】
このようにして、圧縮されたオブジェクトデータのスタートアドレスを設定し、伸張後のオブジェクトデータの描画開始位置を設定する処理が実現される。また、描画開始位置を設定する際に、伸張後のオブジェクトデータのオブジェクト幅を設定し、スタートアドレスから描画開始位置までのライン数を設定する処理が実現される。
【0035】
従って、スキップするバイト数は256バイト×2ラインで計512(200h)バイトであるから、乗算器104からの出力は200hとなる。この値にオブジェクトスタートアドレス設定レジスタ101に設定されたオブジェクトスタートアドレスである40000hを加算することによりLTOP値となるので、加算器121からの出力であるLTOPは40200hとなる。このようにして、描画開始位置が、オブジェクト幅およびライン数に基づいて算出される。
【0036】
次に、描画がスタートされると、ADR(n)110が出力される。ここで出力される値は、オブジェクトスタートアドレス設定レジスタ101にオブジェクトスタートアドレスとして設定されたアドレス40000hである。これにより、CODE(n)109に図3のコードNo.1に対応するパックビッツコード「81h」が入力される。すると、CODE変換器106によるコード変換後の値Numは128(80h)となるので、バイト数(n)は40080hとなる。この値はLTOP値より小さいので、マグニチュードコンパレータ107からの出力Aは“LTOP”のままである。また、CODE変換器2 115から出力される、カレントパックビッツコードから次のパックビッツコードまでのバイト数Numは2となり、コード変換後のアドレスADR(n)110は40002hとなる。従って、次クロックにおいて、コードNo.2に対応する次のパックビッツコード「02h」がCODE変換器106およびCODE変換器2 115に入力されて来る。
【0037】
次いで、上記と同様の処理が行われ、バイト数(n)は40083hとなり、ADR(n)110は40006hとなる。
【0038】
以上のような処理が繰り返された後、コードNo.8まで処理が進むとADR(n)110が4001Dhとなり、バイト数(n)は401A3hとなる。次クロックにおいて、ADR(n)110にて指定されたコードNo.9に対応するパックビッツコード「81h」が入力されると、バイト数(n)が40223hとなり、LTOP値(=40200h)よりも大きくなる。このとき、出力Aが“H”、出力Bが“L”となり、このタイミングにてADR(n−1)111と残バイト数112をラッチしておく。
【0039】
このようにしてラッチされたADR(n−1)111のアドレスが、描画開始位置(LTOP)のデータを含んでいるパックビッツコードの位置である。従って、このラッチ処理により、設定されたスタートアドレスに基づいて、設定された描画開始位置に対応する、圧縮されたオブジェクトデータ内の制御コードの位置を判別する処理が実現される。
【0040】
また、残バイト数112は判別された制御コードの位置から描画開始位置までのバイト数を示し、そのパックビッツコードにより指定されたコート並びのうちの何バイト目からが有効な描画データであるかを示すポインタとなる。
【0041】
つまり、本実施形態において、パックビッツ圧縮されたオブジェクトデータを印刷する場合、図3の例に示すパックビッツコードのアドレス4001Dhからデコード処理を開始する。これにより、そのデコードされたバイト数の94バイト目から描画データとして出力されることになる。
【0042】
従って、従来はパックビッツ圧縮されたオブジェクトデータを描画開始位置までデコードするのに512クロックがかかっていたのに対し、本実施形態に係る画像形成方法によれば、同じデータについて94+9クロック程度で描画を開始することができる。結果として、より高速にイメージデータの印刷を行うことが可能となる。
【0043】
以上、本発明の好適な実施の形態について説明したが、本発明は上述の実施の形態に限定されず、他の種々の形態でも実施可能であることはいうまでもない。
【0044】
なお、本発明は、前述した各実施の形態の機能を実現するソフトウェアのプログラムコードを記憶した記憶媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。
【0045】
この場合、記憶媒体から読み出されたプログラムコード自体が本発明の新規な機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
【0046】
プログラムコードを供給するための記憶媒体としては、例えば、フロッピー(登録商標)ディスク、ハードディスク、光磁気ディスク、光ディスク、CD−ROM、CD−R、磁気テープ不揮発性のメモリカード、ROMなどを用いることができる。
【0047】
また、コンピュータが読み出したプログラムコードを実行することによって、前述した実施の形態の機能が実現される他、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOSなどが実際の処理の一部または全部を行い、その処理によっても前述した実施の形態の機能が実現され得る。
【0048】
さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によっても前述した実施の形態の機能が実現され得る。
【0049】
本発明は、前述した実施の形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体からそのプログラムをパソコン通信など通信ラインを介して要求者にそのプログラムを配信する場合にも適用できることは言うまでもない。
【0050】
【発明の効果】
以上説明したように本発明によれば、オブジェクト幅と描画開始ライン位置とに基づき描画開始位置を算出し、入力されるコードをバイト数に変換し、オブジェクトデータのスタートアドレスに変換された入力されたコードのバイト数を加算することにより加算値を求め、求められた加算値に変換された次に入力されたコードのバイト数を加算することにより加算値を求め、求められた加算値と算出された描画開始位置とを比較し、比較の結果、求められた加算値が算出された描画開始位置の値より大きい場合、入力されたコードのアドレスと算出された描画開始位置の値から入力されたコードの一つ前のアドレスのコードまでの加算値を減算した残バイト数とをラッチし、ラッチされたアドレスからデコード処理を開始し、デコードされたデータの残バイト数目から描画データとして出力し、求められた加算値が算出された描画開始位置の値より小さい場合、コード変換の際に次に入力されたコードをバイト数に変換し、加算の際に求められた加算値に変換された次に入力されたコードのバイト数を加算することにより加算値を求め、比較の際に求められた加算値と算出された描画開始位置とを比較するので、パックビッツ圧縮されたイメージデータのラインスキップを行う際に、スキップされるラインのデコード処理を行わずに済むことになる。結果として、高速な描画処理が可能となる。
【図面の簡単な説明】
【図1】本発明を適用した画像形成装置の機能構成の一例を概略的に示すブロック図である。
【図2】パックビッツ圧縮されたオブジェクトデータのデコード後の構造の一例を概略的に示す図である。
【図3】図2に示したパックビッツ圧縮されたオブジェクトデータの内容を表す図である。
【図4】本発明の実施形態に係る画像形成装置が実行する画像形成処理のタイミングチャートである。
【符号の説明】
101 オブジェクトスタートアドレス設定レジスタ
102 オブジェクト幅設定レジスタ
103 スキップライン数設定レジスタ(Offset Y)
104 乗算器(スキップバイト数計算)
105 LTOP
106 CODE変換器
107 コンパレータ
108 減算器
109 パックビッツコード
110 パックビッツコード位置アドレス(n)
111 パックビッツコード位置アドレス(n−1)
112 残バイト数
113 出力A
114 出力B
115 CODE変換器2
121 加算器
122 制御コード位置判別部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image forming apparatus and an image forming method , and more specifically, to an image forming apparatus and an image forming method for performing drawing based on object data encoded by compression such as image data compressed by packbits. .
[0002]
[Prior art]
Conventionally, various data compression methods have been used to cope with a memory shortage in a printer or to reduce the amount of data created by a host computer to the printer. As one of the data compression methods, for example, there is PackBits compression that performs data compression with a predetermined number of bits as one unit. For example, this corresponds to a byte run length encoding / compression method in which data is compressed by encoding the number of repetitions of the same type of data and different types of data in byte units.
[0003]
[Problems to be solved by the invention]
However, when drawing the object data compressed in the above-mentioned pack bits format, the object data must be expanded from the top. For example, as shown in FIG. 2, a case is considered in which image data having a structure after expansion of 256 bytes × 10 lines is drawn. In the case of 1CLK / 1 Byte processing, if the third line of the data shown in the figure is the drawing start position, if drawing is performed based on the compressed object data, the image data is decoded to the drawing start position. 256 bytes × 2 lines = 512 clocks are required.
[0004]
As described above, when drawing the compressed object data, it takes time to start drawing.
[0005]
The present invention has been made in view of such problems, and an object of the present invention is to provide an image forming apparatus capable of speeding up drawing of compressed object data by performing drawing skipping. And providing an image forming method .
[0006]
[Means for Solving the Problems]
In order to achieve the above object, an image forming apparatus according to the present invention includes a calculation unit that calculates a drawing start position based on an object width and a drawing start line position, and a code conversion unit that converts an input code into a number of bytes. And adding the number of bytes of the input code converted by the code conversion means to the start address of the object data to obtain an addition value, and then inputting the obtained addition value after being converted by the code conversion means Adding means for obtaining an added value by adding the number of bytes of the generated code, comparing means for comparing the added value obtained by the adding means with the drawing start position calculated by the calculating means, and the comparing means As a result of comparison, the addition value obtained by the addition means is larger than the value of the drawing start position calculated by the calculation means. In this case, the addition value from the address of the code input to the code conversion means and the value of the drawing start position calculated by the calculation means is subtracted from the code at the address immediately before the code input to the code conversion means. And output means for starting the decoding process from the latched address and outputting as drawing data from the number of remaining bytes of the decoded data, as a result of the comparison by the comparison means, When the added value obtained by the adding means is smaller than the drawing start position value calculated by the calculating means, the code converting means converts the next input code into the number of bytes, and the adding means The added value is obtained by adding the number of bytes of the next input code converted by the code converting means to the added value, and the comparing means , And compares the calculated drawing start position by the calculation means and the addition value obtained by said adding means.
[0007]
The image forming method according to the present invention includes a calculation unit that calculates a drawing start position based on an object width and a drawing start line position, a code conversion unit that converts an input code into the number of bytes, and a start of object data. The addition value is obtained by adding the number of bytes of the input code converted by the code conversion means to the address, and the number of bytes of the next input code converted by the code conversion means to the obtained addition value An image executed by an image forming apparatus including an adding unit that calculates an added value by adding, and a comparing unit that compares the added value calculated by the adding unit with the drawing start position calculated by the calculating unit In the forming method, as a result of comparison by the comparison means, an addition value obtained by the addition means is calculated by the calculation means If the value is larger than the value of the drawing start position, the code address input to the code conversion means and the value of the drawing start position calculated by the calculation means are one before the code input to the code conversion means. The number of remaining bytes obtained by subtracting the addition value up to the address code is latched, the decoding process is started from the latched address, and the drawing data is output from the remaining number of bytes of the decoded data. As a result, when the addition value obtained by the addition means is smaller than the value of the drawing start position calculated by the calculation means, the code conversion means converts the next input code into the number of bytes, and the addition means Is obtained by adding the number of bytes of the next input code converted by the code conversion means to the obtained addition value. , The comparing means compares the calculated drawing start position by the calculation means and the addition value obtained by said adding means.
[0021]
In the present invention, the object start address setting register 101 for setting the start address of the Packbits compressed image data object, the object width setting register 102 for setting the object width, the skip line number setting register 103 for setting the number of lines to be skipped, Multiplier 104 that calculates the number of bytes to be skipped from the set value, adder 121 that outputs the address LTOP of the Packbits code portion, and a magnitude comparator that compares the number of bytes calculated from the Packbits code with the number of bytes to be skipped 107 is provided. Accordingly, it is possible to eliminate useless decoding processing by analyzing only the pack bit code portion of the image data subjected to pack bit compression.
[0022]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0023]
FIG. 1 is a block diagram schematically showing an example of a functional configuration of an image forming apparatus to which the present invention is applied, and best represents the features of the invention of the present application. In the figure, the object start address setting register 101 is set with the start address on the memory of the object data compressed in pack bits. In the object width setting register 102, the width of the object data after decoding (decompression) is set. In the skip line number setting register 103, the line number Offset Y of the decompressed object data to be skipped is set. The multiplier 104 multiplies the object width and the number of drawing skip lines to calculate the number of bytes of object data to be skipped.
[0024]
LTOP 105 is an output value from the adder 121. The L T OP105, if the object data is image data that has not been compressed, based on the object width and the number of the skip line, in value when calculating the address to which the writing start position on the object data after decompression is there.
[0025]
The code converter 106 converts the control code (pack bits code) indicating the number of repetitions of the code sequence included in the object data compressed in pack bits into the number of bytes (n) at the time of decoding. The magnitude comparator (MCP) 107 compares the LTOP 105 with the number of bytes (n), and outputs “H” when the number of bytes (n) is large. The subtracter 108 subtracts the number of bytes (n−1) from the LTOP 105.
[0026]
CODE (n) 109 represents the input of a pack bits code. ADR (n) 110 and ADR (n−1) 111 are outputs from the control code position determination unit 122. Of these, ADR (n) 110 is an address indicating the position of the Packbits code, and data input based on this address is CODE (n) 109. ADR (n-1) 111 is an address in the previous state of the address indicated by ADR (n) 110. The remaining byte count 112 is a value calculated by the subtractor 108.
[0027]
The output A113 is a comparison result between the LTOP 105 output from the magnitude comparator 107 and the number of bytes (n). The output B114 is a comparison result between the LTOP 105 output from the magnitude comparator 107 and the number of bytes (n−1).
[0028]
The CODE converter 2 115 calculates the position of the next pack bits code with reference to the current pack bits code on the pack bits compressed object data. Based on the calculated value from the CODE converter 2 115, it is possible to transit from the current pack bits code to the next pack bits code within the compressed object. When 81h to FFh are input as the pack bits code CODE (n) 109, the CODE converter 2 115 outputs 2. When 00h to 7Fh is input as CODE (n) 109, CODE (n) +2 is output.
[0029]
FIG. 2 is a diagram schematically showing an example of a structure after decoding of object data subjected to packbits compression. Data used in the present embodiment is image data having an object width of 256 bytes and a height of 10 lines.
[0030]
In the figure, 2 lines represent the number of lines from the start address to the drawing start position, and LTOP represents the position at which drawing is started. Therefore, the top address of the object data is 40000h, and the address of the drawing start position is 40200h.
[0031]
FIG. 3 is a diagram showing the contents of the pack-bits compressed object data shown in FIG. In the data in the figure, an underlined portion indicates a pack bits code. The code No. indicates the number of pack bit codes in the compressed object data. Here, the code No. 8 and no. A line between 9 indicates that an effective drawing range is entered from a code corresponding to the ninth pack bits code. That is, the code No. The drawing start position is included in the code sequence repeated for the number of bytes specified by the 9 Packbits code. In the example shown in the figure, the 94th byte of data corresponding to code No. 9 is the drawing start position.
[0032]
FIG. 4 is a timing chart of image forming processing executed by the image forming apparatus according to the present embodiment. In the figure, one vertical line break corresponds to one clock.
[0033]
Hereinafter, a case where the object data shown in FIG. 3 is drawn will be described as an example. The start address of the packbits-compressed object data is 40000h, and the object width is 256 (100h) bytes. The height is 10 lines, and the drawing start line position (Offset Y) is 2 lines. In this case, 40000h is set as the object start address in the object start address setting register 101, and 100h is set as the object width in the object width setting register 102. Also, 2h is set as Offset Y in the skip line number setting register 103.
[0034]
In this way, the process of setting the start address of the compressed object data and setting the drawing start position of the decompressed object data is realized. Further, when setting the drawing start position, a process of setting the object width of the decompressed object data and setting the number of lines from the start address to the drawing start position is realized.
[0035]
Accordingly, the number of bytes to be skipped is 256 bytes × 2 lines, for a total of 512 (200 h) bytes, so the output from the multiplier 104 is 200 h. Since the LTOP value is obtained by adding 40000h, which is the object start address set in the object start address setting register 101, to this value, the LTOP output from the adder 121 is 40200h. In this way, the drawing start position is calculated based on the object width and the number of lines.
[0036]
Next, when drawing is started, ADR (n) 110 is output. The value output here is the address 40000h set as the object start address in the object start address setting register 101. As a result, the code No. A pack bits code “81h” corresponding to 1 is input. Then, since the value Num after code conversion by the CODE converter 106 is 128 (80h), the number of bytes (n) is 40080h. Since this value is smaller than the LTOP value, the output A from the magnitude comparator 107 remains “LTOP”. The number of bytes Num from the current pack bits code output from the CODE converter 2 115 to 2 is 2, and the address ADR (n) 110 after code conversion is 40002h. Therefore, at the next clock, the code No. The next Packbits code “02h” corresponding to 2 is input to the CODE converter 106 and the CODE converter 2 115.
[0037]
Next, the same processing as described above is performed, the number of bytes (n) becomes 40083h, and ADR (n) 110 becomes 40006h.
[0038]
After the above processing is repeated, the code No. When the process proceeds to 8, ADR (n) 110 becomes 4001Dh, and the number of bytes (n) becomes 401A3h. In the next clock, the code No. specified in ADR (n) 110 is set. When the pack bit code “81h” corresponding to 9 is input, the number of bytes (n) is 40223h, which is larger than the LTOP value (= 40200h). At this time, the output A becomes “H” and the output B becomes “L”, and the ADR (n−1) 111 and the remaining number of bytes 112 are latched at this timing.
[0039]
The address of the ADR (n−1) 111 latched in this way is the position of the pack bits code including the data of the drawing start position (LTOP). Accordingly, the latch process realizes a process for determining the position of the control code in the compressed object data corresponding to the set drawing start position based on the set start address.
[0040]
The number of remaining bytes 112 indicates the number of bytes from the position of the determined control code to the drawing start position, and from which byte in the code sequence specified by the Packbits code is valid drawing data Is a pointer indicating
[0041]
That is, in the present embodiment, when printing object data compressed in pack bits, the decoding process is started from the address 4001Dh of the pack bits code shown in the example of FIG. As a result, drawing data is output from the 94th byte of the decoded number of bytes.
[0042]
Therefore, in the past, it took 512 clocks to decode the packbits-compressed object data to the drawing start position, whereas according to the image forming method according to the present embodiment, the same data is drawn in about 94 + 9 clocks. Can start. As a result, image data can be printed at a higher speed.
[0043]
The preferred embodiment of the present invention has been described above, but the present invention is not limited to the above-described embodiment, and it is needless to say that the present invention can be implemented in various other forms.
[0044]
In the present invention, a storage medium storing software program codes for realizing the functions of the above-described embodiments is supplied to a system or apparatus, and a computer (or CPU or MPU) of the system or apparatus stores the storage medium. Needless to say, this can also be achieved by reading and executing the program code stored in.
[0045]
In this case, the program code itself read from the storage medium realizes the novel function of the present invention, and the storage medium storing the program code constitutes the present invention.
[0046]
As a storage medium for supplying the program code, for example, a floppy (registered trademark) disk, a hard disk, a magneto-optical disk, an optical disk, a CD-ROM, a CD-R, a magnetic tape nonvolatile memory card, a ROM, or the like is used. Can do.
[0047]
In addition, the functions of the above-described embodiments are realized by executing the program code read by the computer, and the OS running on the computer is one of the actual processes based on the instruction of the program code. The functions of the above-described embodiment can be realized by performing some or all of the processes.
[0048]
Further, after the program code read from the storage medium is written to a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. The CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments can be realized by the processing.
[0049]
It goes without saying that the present invention can also be applied to the case where the program is distributed to a requester via a communication line such as personal computer communication from a storage medium that records the program code of software that implements the functions of the above-described embodiments. Yes.
[0050]
【The invention's effect】
As described above, according to the present invention, the drawing start position is calculated based on the object width and the drawing start line position, the input code is converted into the number of bytes, and the input address converted into the start address of the object data is input. The added value is obtained by adding the number of bytes of the obtained code, and the added value is obtained by adding the number of bytes of the next input code converted into the obtained added value, and the obtained added value and calculation are calculated. If the calculated addition value is larger than the calculated drawing start position value, the input address of the input code and the calculated drawing start position value are input. The number of remaining bytes obtained by subtracting the added value up to the code at the address immediately before the code is latched, and decoding is started from the latched address. If the calculated addition value is smaller than the calculated drawing start position value, the next input code is converted to the number of bytes and added. The addition value is obtained by adding the number of bytes of the next input code converted to the addition value obtained at the time of comparison, and the addition value obtained at the time of comparison is compared with the calculated drawing start position. since, when performing the line skip image data packbit compressed, so that the need without decoding of lines to be skipped. As a result, high-speed drawing processing can be performed.
[Brief description of the drawings]
FIG. 1 is a block diagram schematically illustrating an example of a functional configuration of an image forming apparatus to which the present invention is applied.
FIG. 2 is a diagram schematically illustrating an example of a structure after decoding of pack-bits-compressed object data.
FIG. 3 is a diagram showing the contents of pack-bits-compressed object data shown in FIG.
FIG. 4 is a timing chart of image forming processing executed by the image forming apparatus according to the embodiment of the invention.
[Explanation of symbols]
101 Object start address setting register 102 Object width setting register 103 Skip line number setting register (Offset Y)
104 Multiplier (Skip byte number calculation)
105 LTOP
106 CODE Converter 107 Comparator 108 Subtractor 109 Pack Bits Code 110 Pack Bits Code Position Address (n)
111 Packbits code position address (n-1)
112 Number of remaining bytes 113 Output A
114 Output B
115 CODE converter 2
121 Adder 122 Control Code Position Discrimination Unit

Claims (2)

オブジェクト幅と描画開始ライン位置とに基づき描画開始位置を算出する算出手段と、Calculating means for calculating a drawing start position based on the object width and the drawing start line position;
入力されるコードをバイト数に変換するコード変換手段と、Code conversion means for converting the input code into the number of bytes;
オブジェクトデータのスタートアドレスに前記コード変換手段により変換された入力されたコードのバイト数を加算することにより加算値を求め、求められた加算値に前記コード変換手段により変換された次に入力されたコードのバイト数を加算することにより加算値を求める加算手段と、An addition value is obtained by adding the number of bytes of the input code converted by the code conversion means to the start address of the object data, and then input to the obtained addition value after being converted by the code conversion means. Adding means for obtaining an added value by adding the number of bytes of the code;
前記加算手段により求められた加算値と前記算出手段により算出された描画開始位置とを比較する比較手段と、Comparing means for comparing the addition value obtained by the adding means with the drawing start position calculated by the calculating means;
前記比較手段による比較の結果、前記加算手段により求められた加算値が前記算出手段により算出された描画開始位置の値より大きい場合、前記コード変換手段に入力されたコードのアドレスと、前記算出手段により算出された描画開始位置の値から前記コード変換手段に入力されたコードの一つ前のアドレスのコードまでの加算値を減算した残バイト数とをラッチし、ラッチされたアドレスからデコード処理を開始し、デコードされたデータの残バイト数目から描画データとして出力する出力手段とを有し、As a result of the comparison by the comparison means, when the addition value obtained by the addition means is larger than the value of the drawing start position calculated by the calculation means, the address of the code input to the code conversion means, and the calculation means The number of remaining bytes obtained by subtracting the addition value from the value of the drawing start position calculated by the code to the code of the address immediately before the code input to the code conversion means is latched, and decoding processing is performed from the latched address Output means for outputting as drawing data from the number of remaining bytes of the decoded data,
前記比較手段による比較の結果、前記加算手段により求められた加算値が前記算出手段により算出された描画開始位置の値より小さい場合、前記コード変換手段は次に入力されたコードをバイト数に変換し、前記加算手段は、求められた加算値に前記コード変換手段により変換された次に入力されたコードのバイト数を加算することにより加算値を求め、前記比較手段は、前記加算手段により求められた加算値と前記算出手段により算出された描画開始位置とを比較することを特徴とする画像形成装置。As a result of the comparison by the comparison means, if the addition value obtained by the addition means is smaller than the drawing start position value calculated by the calculation means, the code conversion means converts the next input code into the number of bytes. The adding means obtains an added value by adding the number of bytes of the next input code converted by the code converting means to the obtained added value, and the comparing means obtains the added value by the adding means. An image forming apparatus, wherein the added value is compared with the drawing start position calculated by the calculating means.
オブジェクト幅と描画開始ライン位置とに基づき描画開始位置を算出する算出手段と、入力されるコードをバイト数に変換するコード変換手段と、オブジェクトデータのスタートアドレスに前記コード変換手段により変換された入力されたコードのバイト数を加算することにより加算値を求め、求められた加算値に前記コード変換手段により変換された次に入力されたコードのバイト数を加算することにより加算値を求める加算手段と、前記加算手段により求められた加算値と前記算出手段により算出された描画開始位置とを比較する比較手段とを有する画像形成装置で実行される画像形成方法であって、Calculation means for calculating the drawing start position based on the object width and the drawing start line position, code conversion means for converting the input code into the number of bytes, and input converted by the code conversion means to the start address of the object data Adding means for obtaining an added value by adding the number of bytes of the code obtained, and adding the number of bytes of the next input code converted by the code converting means to the obtained added value And an image forming method executed by an image forming apparatus having a comparison unit that compares the addition value obtained by the addition unit with the drawing start position calculated by the calculation unit,
前記比較手段による比較の結果、前記加算手段により求められた加算値が前記算出手段により算出された描画開始位置の値より大きい場合、前記コード変換手段に入力されたコードのアドレスと前記算出手段により算出された描画開始位置の値から前記コード変換手段に入力されたコードの一つ前のアドレスのコードまでの加算値を減算した残バイト数とをラッチし、ラッチされたアドレスからデコード処理を開始し、デコードされたデータの残バイト数目から描画データとして出力し、As a result of the comparison by the comparison means, when the addition value obtained by the addition means is larger than the value of the drawing start position calculated by the calculation means, the code address input to the code conversion means and the calculation means The number of remaining bytes obtained by subtracting the added value from the calculated drawing start position value to the code at the previous address of the code input to the code conversion means is latched, and decoding is started from the latched address. And output as drawing data from the remaining bytes of the decoded data,
前記比較手段による比較の結果、前記加算手段により求められた加算値が前記算出手段により算出された描画開始位置の値より小さい場合、前記コード変換手段は、次に入力されたコードをバイト数に変換し、前記加算手段は、求められた加算値に前記コード変換手段により変換された次に入力されたコードのバイト数を加算することにより加算値を求め、前記比較手段は、前記加算手段により求められた加算値と前記算出手段により算出された描画開始位置とを比較することを特徴とする画像形成方法。As a result of the comparison by the comparison means, when the addition value obtained by the addition means is smaller than the drawing start position value calculated by the calculation means, the code conversion means converts the next input code into the number of bytes. The addition means obtains an addition value by adding the number of bytes of the next input code converted by the code conversion means to the obtained addition value, and the comparison means obtains the addition value by the addition means. An image forming method, comprising: comparing the obtained addition value with a drawing start position calculated by the calculating unit.
JP2002035978A 2002-02-13 2002-02-13 Image forming apparatus and image forming method Expired - Fee Related JP3870101B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002035978A JP3870101B2 (en) 2002-02-13 2002-02-13 Image forming apparatus and image forming method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002035978A JP3870101B2 (en) 2002-02-13 2002-02-13 Image forming apparatus and image forming method

Publications (2)

Publication Number Publication Date
JP2003244350A JP2003244350A (en) 2003-08-29
JP3870101B2 true JP3870101B2 (en) 2007-01-17

Family

ID=27778012

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002035978A Expired - Fee Related JP3870101B2 (en) 2002-02-13 2002-02-13 Image forming apparatus and image forming method

Country Status (1)

Country Link
JP (1) JP3870101B2 (en)

Also Published As

Publication number Publication date
JP2003244350A (en) 2003-08-29

Similar Documents

Publication Publication Date Title
US6785424B1 (en) Encoding method and apparatus for compressing a data structure having two or more dimensions, decoding method, and storage medium
US7570822B2 (en) Image processing apparatus, printer and control method of the image processing
JP3870101B2 (en) Image forming apparatus and image forming method
USRE45300E1 (en) Context-adaptive variable length coder with simultaneous storage of incoming data and generation of syntax elements
JP4136825B2 (en) Image processing apparatus, image processing method, computer-readable storage medium storing program, and program
JP3842914B2 (en) Data encoding method / decoding method, data encoding device / decoding device, and image data recording system using the data encoding method / decoding method
JP3317954B2 (en) Image data compression method, JBIG coding processing method and apparatus
JP3342380B2 (en) Encoding and decoding apparatus and image processing apparatus to which the same is applied
JP3673630B2 (en) Encoding method
JP2003189108A (en) Image compression method
JPH1063833A (en) Processor and method for image processing
JP2891818B2 (en) Encoding device
KR102568052B1 (en) Image decompressing apparatus, control method thereof, and computer program
JPS6122499B2 (en)
KR100644655B1 (en) Emulation controlling method and apparatus in image forming apparatus
JP3943747B2 (en) Image processing apparatus and multi-value processing method
JP2684887B2 (en) Encoding / decoding device
JP6142552B2 (en) Image processing apparatus, image processing method, and image processing program
JPH11259636A (en) Image converting method
KR100636201B1 (en) Selective-printing controlling method and apparatus in image forming apparatus
JP2006215709A (en) Data re-storage device and re-storage method
JP2005073123A (en) Image coding apparatus, method, and storage medium having recorded program
JP2010220131A (en) Apparatus and method for encoding image
JP2002127512A (en) Imaging apparatus and imaging method
JP2008021189A (en) Division device and division method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041203

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060628

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060704

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060904

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061016

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20101020

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20101020

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111020

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20111020

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121020

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20131020

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees