JP2010081429A - Image processing apparatus and control method thereof - Google Patents

Image processing apparatus and control method thereof Download PDF

Info

Publication number
JP2010081429A
JP2010081429A JP2008249131A JP2008249131A JP2010081429A JP 2010081429 A JP2010081429 A JP 2010081429A JP 2008249131 A JP2008249131 A JP 2008249131A JP 2008249131 A JP2008249131 A JP 2008249131A JP 2010081429 A JP2010081429 A JP 2010081429A
Authority
JP
Japan
Prior art keywords
data
image processing
pixel
cache
image
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.)
Withdrawn
Application number
JP2008249131A
Other languages
Japanese (ja)
Inventor
Jun Nishiyama
淳 西山
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 JP2008249131A priority Critical patent/JP2010081429A/en
Publication of JP2010081429A publication Critical patent/JP2010081429A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To solve the problem that, in the prior arts, there was high risk that a processing speed might be decelerated without cache hit. <P>SOLUTION: Transformed data corresponding to pixel data included in inputted image data are stored in a DRAM, a pixel value having a high appearance frequency included in the image data is specified and the transformed data corresponding to the pixel value are preferentially cached (S46). In a case where the transformed data corresponding to the pixel data included in the image data are cached, transformation is performed using the cached transformed data (S48, S47) and in the case where the transformed data corresponding to the pixel data included in the image data are not cached, transformation is performed using the transformed data corresponding to the pixel data and stored in the DRAM (S48, S49, S47). <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、画像データを変換する画像処理を行う画像処理装置及びその制御方法に関するものである。   The present invention relates to an image processing apparatus that performs image processing for converting image data and a control method thereof.

データを一時的に記憶しておく記憶装置において、その記憶容量(サイズ)とアクセス速度が反比例することが知られている。つまり高速にアクセスできる記憶装置は、記憶容量を増やすのが物理的、コスト的に困難であり、記憶容量を多く取れる記憶装置はアクセス速度を高速にするのが困難である。   In a storage device that temporarily stores data, it is known that the storage capacity (size) and the access speed are inversely proportional. In other words, it is physically and costly difficult to increase the storage capacity of a storage device that can be accessed at high speed, and it is difficult to increase the access speed of a storage device that can take a large storage capacity.

そこでCPUアーキテクチャでは、高速にアクセスできるが、その記憶容量が制限されるキャッシュをCPUの近くに配置し、キャッシュに比べるとアクセス速度は遅いが記憶容量を確保し易い大容量のDRAMをキャッシュの先に配置している。この構成では、CPUは常にキャッシュに対してデータの読み書き要求を出し、キャッシュがDRAMとの間の仲介役を果たしている。この場合、CPUからの要求をキャッシュで処理できる場合はキャッシュヒットと呼び、キャッシュでは処理できずにDRAMとの間でデータのやりとりが生じる場合をキャッシュミスと呼ぶ。当然、キャッシュミスが発生した場合には処理時間が大幅に長くなり、CPUの処理速度が低下するためキャッシュヒットする確立を高めることが重要となる。   Therefore, in the CPU architecture, a cache that can be accessed at a high speed, but whose storage capacity is limited is arranged near the CPU, and a large-capacity DRAM that has a slower access speed than the cache but is easy to secure a storage capacity is located ahead of the cache. Is arranged. In this configuration, the CPU always issues a data read / write request to the cache, and the cache acts as an intermediary with the DRAM. In this case, when a request from the CPU can be processed by the cache, it is called a cache hit, and when a request cannot be processed by the cache and data is exchanged with the DRAM, it is called a cache miss. Naturally, when a cache miss occurs, the processing time becomes significantly longer, and the processing speed of the CPU decreases, so it is important to increase the probability of a cache hit.

この分野ではさまざまな研究がなされており、一般的な方法としてDRAMとキャッシュの間でのデータの送受信は、キャッシュブロックと呼ばれる一定サイズのブロックで行っている。そして過去の実績に基づいて、使用頻度の高いブロックが優先的にキャッシュ内に留まるような制御方法が提案されている。   Various studies have been made in this field. As a general method, data transmission / reception between a DRAM and a cache is performed in blocks of a certain size called cache blocks. Based on the past results, a control method has been proposed in which a frequently used block preferentially stays in the cache.

また画像処理の中には、輝度画像(RGB)から濃度画像(CMY)に変換する色空間変換と呼ばれる画像処理のように非線形の処理が必要な処理が存在することが知られている。このような処理では、各入力値に対応した出力値をテーブルとして備え、入力データに応じて対応する出力値をテーブルから読み出すことにより、画像データを変換することが行われている。このような非線形のテーブル変換を伴う処理では、入力データの組み合わせが多くなるとテーブルサイズが大きくなるという問題がある。従来は、処理速度を優先するために、高速にアクセスできる小容量の記憶装置(高速SRAM)でテーブルを構成しているため、このSRAMの容量がASICのコストを上げる一因となっていた。   Further, it is known that image processing includes processing that requires nonlinear processing, such as image processing called color space conversion for converting a luminance image (RGB) to a density image (CMY). In such a process, output data corresponding to each input value is provided as a table, and image data is converted by reading out the output value corresponding to the input data from the table. In such a process involving nonlinear table conversion, there is a problem that the table size increases as the number of combinations of input data increases. Conventionally, in order to prioritize the processing speed, the table is composed of a small-capacity storage device (high-speed SRAM) that can be accessed at high speed, and this capacity of the SRAM is one factor that increases the cost of the ASIC.

この問題を解決するために、テーブルのデータの持ち方をCPUアーキテクチャで採用されている階層記憶構造にすることが提案されている(特許文献1参照)。この提案では、CPUアーキテクチャと同じ手法を用いて、過去の実績から使用頻度の高いブロック(テーブルデータ)が優先的にキャッシュ内に留まるようにキャッシュを制御している。
特開2007−158968号公報
In order to solve this problem, it has been proposed to use a hierarchical storage structure adopted in the CPU architecture as a way of holding table data (see Patent Document 1). In this proposal, using the same method as the CPU architecture, the cache is controlled so that a block (table data) that is frequently used from the past results preferentially stays in the cache.
JP 2007-158968 A

しかしながら、上述した方法では、キャッシュヒットせずに処理速度が遅くなってしまう懸念が大きい。例えば、印刷装置において、ラスタ画像を印刷に適したハーフトンデータに変換する画像処理を実行することを想定する。この場合、キャッシュのヒット率が低いと画像処理に要する時間が長くなり、印刷速度が低下する。そのため、ヒット率が高い場合には目標となる印刷速度を達成できるが、ヒット率が低下すると目標性能を達成できないことが起こり得る。   However, with the method described above, there is a great concern that the processing speed will be slowed down without a cache hit. For example, assume that the printing apparatus executes image processing for converting a raster image into halftone data suitable for printing. In this case, if the cache hit rate is low, the time required for image processing becomes long, and the printing speed decreases. Therefore, when the hit rate is high, the target printing speed can be achieved, but when the hit rate decreases, the target performance may not be achieved.

本発明の目的は、上述した従来技術の問題点を解決することにある。   An object of the present invention is to solve the problems of the prior art described above.

本願発明の特徴は、入力した画像データをテーブルを参照して変換する画像処理装置及びその制御方法において、少ないキャッシュ容量であっても、そのキャッシュのヒット率を上昇できる技術を提案することにある。   A feature of the present invention is to propose a technique capable of increasing the cache hit rate even in a small cache capacity in an image processing apparatus that converts input image data with reference to a table and a control method thereof. .

上記目的を達成するために本発明の一態様に係る画像処理装置は以下のような構成を備える。即ち、
入力した画像データをテーブルを参照して変換する画像処理装置であって、
画像データに含まれる画素データに対応する変換後データを記憶する記憶手段と、
前記画像データに含まれる出現頻度の高い画素値を特定し、当該画素値に対応する変換後データを優先的にキャッシュするキャッシュ手段と、
前記画像データに含まれる画素データに対応する変換後データが前記キャッシュ手段によりキャッシュされている場合は当該キャッシュ手段にキャッシュされている前記変換後データを用いて変換し、前記画像データに含まれる画素データに対応する変換後データが前記キャッシュ手段によりキャッシュされていない場合は前記記憶手段に記憶されている前記画素データに対応する変換後データを用いて変換する画像処理手段と、
を有することを特徴とする。
In order to achieve the above object, an image processing apparatus according to an aspect of the present invention has the following arrangement. That is,
An image processing apparatus that converts input image data by referring to a table,
Storage means for storing post-conversion data corresponding to pixel data included in the image data;
A cache unit for specifying a pixel value having a high appearance frequency included in the image data and preferentially caching the converted data corresponding to the pixel value;
When the converted data corresponding to the pixel data included in the image data is cached by the cache means, the converted data cached in the cache means is used for conversion, and the pixels included in the image data are converted. An image processing means for converting using converted data corresponding to the pixel data stored in the storage means when the converted data corresponding to the data is not cached by the cache means;
It is characterized by having.

上記目的を達成するために本発明の一態様に係る画像処理装置の制御方法は以下のような工程を備える。即ち、
画像データに含まれる画素データに対応する変換後データを記憶するテーブルを有し、入力した画像データをテーブルを参照して変換する画像処理装置の制御方法であって、
前記画像データに含まれる出現頻度の高い画素値を特定し、当該画素値に対応する変換後データを優先的にキャッシュするキャッシュ工程と、
前記画像データに含まれる画素データに対応する変換後データがキャッシュされている場合は当該キャッシュされている前記変換後データを用いて変換し、前記画像データに含まれる画素データに対応する変換後データがキャッシュされていない場合は前記テーブルに記憶されている前記画素データに対応する変換後データを用いて変換する画像処理工程と、を有することを特徴とする。
In order to achieve the above object, a method for controlling an image processing apparatus according to an aspect of the present invention includes the following steps. That is,
A control method for an image processing apparatus having a table for storing post-conversion data corresponding to pixel data included in image data, and converting input image data with reference to the table,
A cache step of specifying a pixel value having a high appearance frequency included in the image data and preferentially caching the converted data corresponding to the pixel value;
If the converted data corresponding to the pixel data included in the image data is cached, the converted data corresponding to the pixel data included in the image data is converted using the cached converted data. An image processing step of converting the data using post-conversion data corresponding to the pixel data stored in the table when the data is not cached.

本発明によれば、入力した画像データをテーブルを参照して変換する画像処理装置及びその制御方法において、少ないキャッシュ容量であっても、そのキャッシュのヒット率を上昇できるという効果がある。   According to the present invention, an image processing apparatus that converts input image data with reference to a table and a control method thereof have an effect that the hit rate of the cache can be increased even with a small cache capacity.

以下、添付図面を参照して本発明の好適な実施形態を詳しく説明する。尚、以下の実施形態は特許請求の範囲に係る本発明を限定するものでなく、また本実施形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. The following embodiments do not limit the present invention according to the claims, and all combinations of features described in the embodiments are not necessarily essential to the solution means of the present invention. .

図1は、本発明の実施形態に係る画像形成装置と、それを含むネットワークシステムの構成を示す図である。尚、本実施形態では、複合機などの画像形成装置を例にして説明するが本発明はこれに限定されるものでなく、入力画像データに対して画像処理を行う画像処理装置やその制御方法にも適用できる。   FIG. 1 is a diagram illustrating a configuration of an image forming apparatus according to an embodiment of the present invention and a network system including the image forming apparatus. In this embodiment, an image forming apparatus such as a multifunction peripheral will be described as an example. However, the present invention is not limited to this, and an image processing apparatus that performs image processing on input image data and a control method thereof It can also be applied to.

ここでは画像形成装置100は、ネットワーク120を介してPC130と接続されている。PC130は一般的なパーソナルコンピュータ等であり、ネットワーク120を介して画像形成装置100にPDLデータを送信する。そのPDLデータは、画像形成装置100のネットワークコントローラ106により受信される。ネットワークコントローラ106は、その受信したPDLデータをメモリコントローラ102を介してDRAM103に記憶する。その後、CPU101は、そのスプールされたPDLデータをDRAM103から読み出し、ディスプレイリストに変換して再度DRAM103にスプールする。そして、レンダリング部104が、そのディスプレイリストをDRAM103から読み出し、描画してラスタ画像に展開しDRAM103に再度記憶する。   Here, the image forming apparatus 100 is connected to the PC 130 via the network 120. The PC 130 is a general personal computer or the like, and transmits PDL data to the image forming apparatus 100 via the network 120. The PDL data is received by the network controller 106 of the image forming apparatus 100. The network controller 106 stores the received PDL data in the DRAM 103 via the memory controller 102. Thereafter, the CPU 101 reads the spooled PDL data from the DRAM 103, converts it into a display list, and spools it again in the DRAM 103. Then, the rendering unit 104 reads the display list from the DRAM 103, draws it, develops it into a raster image, and stores it again in the DRAM 103.

次にCPU101は、これから印刷を開始するジョブに関する情報をプリンタ部114とやり取りし、画像処理ブロックの各モジュールDMAC107、画像処理部108、画像処理部109、画像処理部110、DMAC111のレジスタに適切な値を設定する。CPU101はそれと同時に、各画像処理部が必要とするテーブルデータをDRAM112に書き込む。それが済むとCPU101は、DMAC107,DMAC111を起動する。これによりDMAC107は、ラスタ画像をDRAM103から読み出して画像処理部108に送り出す。画像処理部108,109はそれぞれ入力データを処理すると、後段の画像処理部に渡す。そして最後にDMAC111が、プリンタ部114に渡すための画像処理済みの画像データを画像処理部110から受け取ってDRAM112にページ単位で記憶する。メモリコントローラ113は、画像処理部108〜110,DMAC111とDRAM112との間のデータのやり取りを制御する。115は、図9を参照して後述するキャッシュコントローラ(903)である。   Next, the CPU 101 exchanges information related to the job to be printed with the printer unit 114, and appropriate information is stored in the registers of each module DMAC 107, image processing unit 108, image processing unit 109, image processing unit 110, and DMAC 111 of the image processing block. Set the value. At the same time, the CPU 101 writes table data required by each image processing unit to the DRAM 112. After that, the CPU 101 activates the DMAC 107 and the DMAC 111. As a result, the DMAC 107 reads out the raster image from the DRAM 103 and sends it out to the image processing unit 108. When each of the image processing units 108 and 109 processes the input data, it passes it to the subsequent image processing unit. Finally, the DMAC 111 receives image processed image data to be transferred to the printer unit 114 from the image processing unit 110 and stores it in the DRAM 112 in units of pages. The memory controller 113 controls data exchange between the image processing units 108 to 110 and the DMAC 111 and the DRAM 112. Reference numeral 115 denotes a cache controller (903) which will be described later with reference to FIG.

そしてCPU101が、DRAM112にデータが準備できたことをプリンタ部114に通知すると、プリンタ部114がDMAC111にデータ要求信号をアサートする。それに従ってDMAC111は、DRAM112に記憶している画像データを読み出してプリンタ部114に送信する。そしてプリンタ部114が、その画像データに基づいて記録媒体であるシートに印刷する。尚、バススイッチ(SW)105は、CPU101が、画像データに対して画像処理を行う必要がある場合に、DMAC107によりDRAM103から画像処理部108に画像データを転送するように切り替える。またDRAM103の画像データを直接、プリンタ部114に転送して印刷させるようにも切り替えることができる。   When the CPU 101 notifies the printer unit 114 that data has been prepared in the DRAM 112, the printer unit 114 asserts a data request signal to the DMAC 111. Accordingly, the DMAC 111 reads out the image data stored in the DRAM 112 and transmits it to the printer unit 114. Then, the printer unit 114 prints on a sheet as a recording medium based on the image data. The bus switch (SW) 105 switches the image data to be transferred from the DRAM 103 to the image processing unit 108 by the DMAC 107 when the CPU 101 needs to perform image processing on the image data. Further, the image data in the DRAM 103 can be directly transferred to the printer unit 114 for printing.

図2は、本実施形態に係る画像形成装置による印刷処理を説明するフローチャートである。   FIG. 2 is a flowchart for explaining print processing by the image forming apparatus according to the present embodiment.

この処理はネットワーク120を介してPDLデータを受信することにより開始され、まずステップS1で、受信したPDLデータをメモリコントローラ102を介してDRAM103にスプールする。その後、そのスプールされたPDLデータをDRAM103から読み出し、ディスプレイリストに変換して再度DRAM103にスプールする。そして、レンダリング部104により、ディスプレイリストをラスタ画像に展開してDRAM103に記憶する。次にステップS2に進み、後述する代表画素(Typical Pixel)を抽出する。次にステップS3に進み、画像処理ブロックの各モジュールであるDMAC107、画像処理部108、画像処理部109、画像処理部110、DMAC111のレジスタに適切な値を設定してプリントを開始するための準備を行う。次にステップS4に進み、DMAC107を起動してDRAM103に記憶されたラスタ画像データを読み出してDMAで画像処理部108に送る。こうしてステップS5〜S7で、各画像処理部による画像処理を実行させる。こうして画像処理が終了するとステップS8に進み、その処理済みのデータをDRAM112に記憶する。こうして印刷の準備ができるとステップS9に進み、DMAC111によりDRAM112からプリンタ部114に画像データを出力して印刷させる。   This process is started by receiving PDL data via the network 120. First, in step S1, the received PDL data is spooled to the DRAM 103 via the memory controller 102. Thereafter, the spooled PDL data is read from the DRAM 103, converted into a display list, and spooled again in the DRAM 103. The rendering unit 104 develops the display list into a raster image and stores it in the DRAM 103. In step S2, a representative pixel (Typical Pixel) described later is extracted. Next, proceeding to step S3, preparation for starting printing by setting appropriate values in the registers of the DMAC 107, the image processing unit 108, the image processing unit 109, the image processing unit 110, and the DMAC 111, which are modules of the image processing block. I do. In step S4, the DMAC 107 is activated to read the raster image data stored in the DRAM 103 and send it to the image processing unit 108 by DMA. Thus, in steps S5 to S7, image processing by each image processing unit is executed. When the image processing is completed in this way, the process proceeds to step S8, and the processed data is stored in the DRAM 112. When printing is ready in this way, the process proceeds to step S9, where the DMAC 111 outputs image data from the DRAM 112 to the printer unit 114 for printing.

次にレンダリング部104の動作について詳しく説明する。   Next, the operation of the rendering unit 104 will be described in detail.

レンダリング部104はCPU101によって制御され、CPU101によって作成されたディスプレイリストをラスタ画像データに変換する機能を有する。レンダリング部104の処理単位は、CPU101によるレジスタ設定とCPU101が作成するディスプレイリストの内容によって決まる。この処理単位には、ページ単位、バンド単位、矩形単位、オブジェクト単位がある。   The rendering unit 104 is controlled by the CPU 101 and has a function of converting a display list created by the CPU 101 into raster image data. The processing unit of the rendering unit 104 is determined by the register setting by the CPU 101 and the contents of the display list created by the CPU 101. This processing unit includes a page unit, a band unit, a rectangle unit, and an object unit.

図3(A)(B)は、1ページを3バンドに分割して、各バンド単位で処理する例を説明する図である。図3(A)は、1ページの画像データを3つのバンドに分割した例を示し、図3(B)は、バンド単位の処理を説明するフローチャートである。   FIGS. 3A and 3B are diagrams illustrating an example in which one page is divided into three bands and processing is performed for each band. FIG. 3A shows an example in which image data of one page is divided into three bands, and FIG. 3B is a flowchart for explaining processing in units of bands.

CPU101は、図3(A)に示す各バンドに対応するディスプレイリストを作成する。そしてレンダリング部104が、バンド単位でディスプレイリストをラスタ画像データに展開し、DRAM103に格納する(ステップS11)。   The CPU 101 creates a display list corresponding to each band shown in FIG. Then, the rendering unit 104 expands the display list into raster image data for each band, and stores the raster list in the DRAM 103 (step S11).

図3(A)に示す例では、ステップS11で、バンド1に相当するラスタ画像データを作成する。次にステップS12で、図4に示すような出現頻度テーブルを作成する。   In the example shown in FIG. 3A, raster image data corresponding to band 1 is created in step S11. Next, in step S12, an appearance frequency table as shown in FIG. 4 is created.

このようにレンダリング部104は、ラスタデータを作成すると同時に、図4に示すような出現頻度テーブルを作成する。この出現頻度テーブルは、画素値とその画素値が出現した回数を記録する。   In this way, the rendering unit 104 creates raster data and at the same time creates an appearance frequency table as shown in FIG. This appearance frequency table records a pixel value and the number of times the pixel value has appeared.

図4は、本実施形態に係る出現頻度テーブルの一例を示す図である。   FIG. 4 is a diagram illustrating an example of an appearance frequency table according to the present embodiment.

図4に示す例では、画像データはRGBデータであり、画素値「R=11,G=22,B=33」の画素が55画素あり、一番出現頻度が高くなっている。次に画素値「R=22,G=33,B=11」の画素が30画素あり、2番目に出現頻度が高くなっている。また画素値「R=255,G=255,B=255」の画素が15画素あり、その画素は3番目に出現頻度が高くなっている。このように図4では、RGBの各値の組み合わせで定義される画素データの各画素が出現する回数が、その画素値に対応付けてDRAM103に記憶されている。   In the example shown in FIG. 4, the image data is RGB data, and there are 55 pixels with pixel values “R = 11, G = 22, B = 33”, and the appearance frequency is the highest. Next, there are 30 pixels with pixel values “R = 22, G = 33, B = 11”, and the frequency of appearance is the second highest. In addition, there are 15 pixels having pixel values “R = 255, G = 255, B = 255”, and the frequency of appearance of these pixels is the third highest. As described above, in FIG. 4, the number of times each pixel of the pixel data defined by the combination of RGB values appears is stored in the DRAM 103 in association with the pixel value.

次にステップS13で、レンダリング部104は、この出現頻度テーブルを基に、代表画素(Typical Pixel)を求める。そして図5に示すようなメモリイメージを作成する。そしてステップS14で、これらステップS11〜S13の処理を、バンド数分(図3では3回)繰り返して全バンド処理し終えたと判断すると、この処理を終了する。従って、図5に示すメモリイメージも各バンドに対応して3つ作成される。   Next, in step S13, the rendering unit 104 obtains a representative pixel (Typical Pixel) based on the appearance frequency table. Then, a memory image as shown in FIG. 5 is created. If it is determined in step S14 that the processes in steps S11 to S13 have been repeated for the number of bands (three times in FIG. 3) and all the bands have been processed, the process ends. Accordingly, three memory images shown in FIG. 5 are also created corresponding to each band.

図5は、1つのバンドのメモリイメージのデータ構成例を示す図である。   FIG. 5 is a diagram illustrating a data configuration example of a memory image of one band.

ここでTypical Pixel 0は、このバンドで最も出現頻度が高い画素値を有する画素を示している。以下、Typical Pixel 1〜Typical Pixel mの順に、出願頻度が高い画素値を有する画素を示している。そして画素データ(pixel 0 〜pixel n)は、このバンドの実際の画像データ(画素データ)を示している。   Here, Typical Pixel 0 indicates a pixel having a pixel value having the highest appearance frequency in this band. Hereinafter, pixels having a pixel value with a high application frequency are shown in the order of Typical Pixel 1 to Typical Pixel m. Pixel data (pixel 0 to pixel n) indicates actual image data (pixel data) of this band.

図6は、この出現頻度テーブルの作成手順を説明するフローチャートである。   FIG. 6 is a flowchart for explaining the procedure for creating the appearance frequency table.

この出現頻度テーブルを作成する初期状態では、DRAM103に記憶される出現頻度テーブルの内容は空である。まずステップS21で、レンダリング部104が1画素を描画すると、ステップS22以降の処理で出現頻度テーブルの内容を以下の手順で更新する。ステップS22で、レンダリング部104が描画した画素値が、出現頻度テーブルに既に登録されているかどうかを判定する。ここで未登録であると判定されるとステップS23に進み、その画素値を出現頻度テーブルに登録し、対応する出現回数を「1」に設定する。一方、ステップS22で登録済みであると判定されるとステップS24に進み、その画素値に対応する出現回数をインクリメントする(+1する)。こうしてステップS23或いはステップS24を実行するとステップS25に進み、最終画素であるかを判断し、そうでないときはステップS21に戻って前述の処理を繰り返す。こうしてステップS25で最終画素であると判定するとステップS26に進み、各画素値に対応する出現頻度が特定されて生成された出現頻度テーブルのエントリーを、各画素値の出現回数に基づいてソーティング(並び替え)し、この処理を終了する。   In the initial state of creating this appearance frequency table, the contents of the appearance frequency table stored in the DRAM 103 are empty. First, in step S21, when the rendering unit 104 renders one pixel, the contents of the appearance frequency table are updated in the following procedure in the processing after step S22. In step S22, it is determined whether or not the pixel value drawn by the rendering unit 104 is already registered in the appearance frequency table. If it is determined that it has not been registered, the process proceeds to step S23, where the pixel value is registered in the appearance frequency table, and the corresponding number of appearances is set to “1”. On the other hand, if it is determined in step S22 that the image has been registered, the process proceeds to step S24, and the number of appearances corresponding to the pixel value is incremented (+1). When step S23 or step S24 is executed in this way, the process proceeds to step S25, where it is determined whether it is the last pixel, and if not, the process returns to step S21 to repeat the above-described processing. When it is determined in step S25 that the pixel is the final pixel, the process proceeds to step S26, and the appearance frequency table entry generated by specifying the appearance frequency corresponding to each pixel value is sorted (arranged) based on the number of appearances of each pixel value. This process is terminated.

この出現頻度テーブルを基にレンダリング部104は、図5に示すようにラスタデータをメモリ(DRAM103)に書き込む。ここで、代表画素(Typical Pixel 0)は、処理単位内(図3の例ではバンド単位)で出現頻度が一番高かった画素値を示し、図4の出現頻度テーブルの場合は「R=11,G=22,B=33」の画素値となる。同様に、代表画素(Typical Pixel 1)は、処理単位内で出現頻度が2番目に高かった画素値であり図4の例では、「R=22,G=33,B=11」の画素値である。また同様に、代表画素(Typical Pixel 2)は処理単位内で出現頻度が3番目に高かった画素値で、図4の例では「R=255,G=255,B=255」の画素値となる。その後のデータ、画素0(pixel 0)〜画素n(pixel n)が実際の画像データ(画素データ)を示している。   Based on the appearance frequency table, the rendering unit 104 writes raster data in the memory (DRAM 103) as shown in FIG. Here, the representative pixel (Typical Pixel 0) indicates the pixel value having the highest appearance frequency within the processing unit (band unit in the example of FIG. 3), and “R = 11” in the appearance frequency table of FIG. , G = 22, B = 33 ”. Similarly, the representative pixel (Typical Pixel 1) is the pixel value having the second highest appearance frequency in the processing unit, and in the example of FIG. 4, the pixel value of “R = 22, G = 33, B = 11”. It is. Similarly, the representative pixel (Typical Pixel 2) is the pixel value having the third highest appearance frequency in the processing unit. In the example of FIG. 4, the pixel value “R = 255, G = 255, B = 255” Become. Subsequent data, pixel 0 (pixel 0) to pixel n (pixel n) represent actual image data (pixel data).

図7は、各画素データを説明する図である。   FIG. 7 is a diagram illustrating each pixel data.

ここでは画素値に対して属性データ701と呼ばれる、データの属性を示す付加情報を付け加えた形で保存する。   In this case, the pixel value is stored in a form added with additional information called attribute data 701 indicating the attribute of the data.

図8は、この属性データのデータ構成を説明する図である。   FIG. 8 is a diagram for explaining the data structure of the attribute data.

この属性データ701の1ビットをダミーフラグ801と定義し、ダミーフラグ801が「1」であれば代表画素であることを示す。逆に、このダミーフラグ801が「0」であれば、実際の画素データであることを示す。よって、レンダリング部104は、代表画素のデータをDRAM103に書き込む場合にはダミーフラグ801を「1」に設定し、実際の画素データをDRAM103に書き込むときは、ダミーフラグ801を「0」にする。レンダリング部104が、このDRAM103に書き込んだデータを入力する他の処理モジュールは、このダミーフラグ801を参照することにより、そのデータが代表画素のデータか、実際の画素データであるかを識別できる。   One bit of the attribute data 701 is defined as a dummy flag 801. If the dummy flag 801 is “1”, it represents a representative pixel. Conversely, if this dummy flag 801 is “0”, it indicates that the pixel data is actual. Therefore, the rendering unit 104 sets the dummy flag 801 to “1” when the representative pixel data is written to the DRAM 103, and sets the dummy flag 801 to “0” when the actual pixel data is written to the DRAM 103. By referring to the dummy flag 801, another processing module that inputs data written to the DRAM 103 by the rendering unit 104 can identify whether the data is representative pixel data or actual pixel data.

こうして図5に示すようなラスタ画像データがDRAM103上に準備されてプリントする際の動作について説明する。   An operation when the raster image data as shown in FIG. 5 is prepared on the DRAM 103 and printed will be described.

CPU101は、レンダリング部104から終了割り込みを受け取ることによりラスタデータが準備できたことを認識する。そしてCPU101は、プリンタ部114と通信を行って、これから印刷する用紙サイズ等を通達する。そして印刷に必要なモジュール、DMAC107,111、画像処理部108〜110のレジスタを設定する。   The CPU 101 recognizes that raster data has been prepared by receiving an end interrupt from the rendering unit 104. The CPU 101 communicates with the printer unit 114 to notify the paper size to be printed. Then, modules necessary for printing, DMACs 107 and 111, and registers of the image processing units 108 to 110 are set.

画像処理が開始されるとDMAC107は、図5に示すメモリイメージをDRAM103から読み出し、画像処理部108に対して1画素(図9に示すデータ901の単位)単位で送信する。そのために、DMAC107は以下の情報を指定するレジスタを有する。即ち、DRAM103における読み出すデータの先頭アドレス、読み出すデータのサイズ、1画素のデータサイズを各レジスタにセットする。これらレジスタを設定してからDMAC107を起動することによりDMAC107が動作を開始する。これによりDMAC107は、DRAM103からデータを先頭から順番に取り出して図5に示す順番で画像処理部108に送り出す。このため画像処理部108は、代表画素データ0,1,...、代表画素データm、そして実際の画素データ0,...,画素データnの順番で画像データを受信する。   When image processing is started, the DMAC 107 reads the memory image shown in FIG. 5 from the DRAM 103 and transmits it to the image processing unit 108 in units of one pixel (unit of data 901 shown in FIG. 9). For this purpose, the DMAC 107 has a register for designating the following information. That is, the start address of the data to be read in the DRAM 103, the size of the data to be read, and the data size of one pixel are set in each register. By starting the DMAC 107 after setting these registers, the DMAC 107 starts its operation. As a result, the DMAC 107 extracts data from the DRAM 103 in order from the top and sends it to the image processing unit 108 in the order shown in FIG. Therefore, the image processing unit 108 receives the image data in the order of representative pixel data 0, 1,..., Representative pixel data m, and actual pixel data 0,.

図9は、本実施形態に係る各画像処理部とDRAM112との間のデータやり取りを説明する図である。図9に関する説明は後述する。   FIG. 9 is a diagram illustrating data exchange between each image processing unit and the DRAM 112 according to the present embodiment. The description regarding FIG. 9 will be described later.

図10は、本実施形態1に係る画像処理部の基本構成を示す図である。尚、ここで画像処理部108〜110は、それぞれが有する演算部が実行する演算処理の内容が異なる点を除き、いずれも同じ構成とする。   FIG. 10 is a diagram illustrating a basic configuration of the image processing unit according to the first embodiment. Here, the image processing units 108 to 110 have the same configuration except that the contents of the arithmetic processing executed by the arithmetic units included therein are different.

アドレス生成部1101は、入力データとレジスタ1102に設定されたパラメータとを基に、キャッシュ1110のテーブルデータを読み出すためのアドレスを計算する。演算部1103は、読み出されたテーブルデータと、レジスタ1102に設定されたパラメータとを基に計算して出力データを出力する。各パラメータはページによって異なるのでCPU101は、プリント前に適切な値を、各画像処理部のレジスタ1102に設定する。上述のように画像処理部108〜110はいずれも同じ構成であるが、アドレス生成部1101、演算部1103の演算式、それに伴うレジスタ1102で設定するパラメータが異なる。基本的な構成としてはハードウェアの構成は画像処理部108,109,110の全てにおいて共通で、レジスタ1102に設定する値と、キャッシュ1110のテーブルデータのみが異なる構成が考えられる。   The address generation unit 1101 calculates an address for reading the table data of the cache 1110 based on the input data and the parameters set in the register 1102. The arithmetic unit 1103 calculates based on the read table data and the parameters set in the register 1102 and outputs output data. Since each parameter differs depending on the page, the CPU 101 sets an appropriate value in the register 1102 of each image processing unit before printing. As described above, the image processing units 108 to 110 have the same configuration, but the calculation formulas of the address generation unit 1101 and the calculation unit 1103 and the parameters set in the register 1102 associated therewith are different. As a basic configuration, a hardware configuration is common to all of the image processing units 108, 109, and 110, and a configuration in which only a value set in the register 1102 and only table data of the cache 1110 are different can be considered.

図11(A)(B)は、テーブル変換を含む8ビットから10ビットへの変換の一例を説明する図である。   FIGS. 11A and 11B are diagrams illustrating an example of conversion from 8 bits to 10 bits including table conversion.

図11(A)において、入力データRは、範囲が0〜255の8ビットデータである。その入力データを、範囲が0〜1023の10ビットデータに変化するためのテーブルの例を示す。図11(B)は、そのテーブルの内容の具体例を示す。図11(B)に示すように、8ビットのアドレス空間で、各アドレスには10ビットの変換後データが記憶されている。図11(A)と図11(B)は、同じテーブルの別の表現方法で示したものである。   In FIG. 11A, input data R is 8-bit data with a range of 0-255. An example of a table for changing the input data to 10-bit data in the range of 0 to 1023 is shown. FIG. 11B shows a specific example of the contents of the table. As shown in FIG. 11B, 10-bit converted data is stored in each address in an 8-bit address space. FIG. 11A and FIG. 11B show different representation methods for the same table.

次に図11の例を参照して、図10に示す画像処理部の動作例を図12のフローチャートに従って説明する。   Next, an example of the operation of the image processing unit shown in FIG. 10 will be described with reference to the flowchart of FIG.

図12は、実施形態1に係る画像処理部を使用した処理を説明するフローチャートである。   FIG. 12 is a flowchart illustrating processing using the image processing unit according to the first embodiment.

まずステップS31で、CPU101が、図11(B)に示すテーブルデータを、DRAM112のアドレス「0x1000_0000」番地を先頭に書き込む。次にステップS32に進み、CPU101は、その先頭アドレスをレジスタ1102に書き込む。次にステップS33で、画像処理部がデータ(例えば、R=9)を受け取るとステップS34に進む。ステップS34では、アドレス生成部1101は、(テーブルの先頭アドレス「0x1000_0000」)にオフセット値(「9」)を足し込む。そしてキャッシュ1110にアクセスするアドレス1104を「0x1000_0009」に設定する。それと同時にアドレス生成部1101は、入力データの属性データに含まれるダミーフラグ801の値を信号ダミーフラグ1105に設定する。そしてステップS35に進み、画像処理部からキャッシュ1110にデータを要求する。これによりキャッシュ1110は、アドレス「0x1000_0009」に対応するデータ(図11の例では、データ「28」)をデータ1106として演算部103に返す。そしてステップS37で、演算部1103は、その読み出したテーブル値と、入力値とを基に必要であれば演算を行い、その値を出力データとして出力する。単純なテーブル変換では、演算部1103は、単純に読み出したテーブル値を出力する。以上の処理をステップS38で、ページの最終画素を検出するまで繰り返し、このページの全ての画素に対する処理が終了すると、この処理を終了する。   First, in step S31, the CPU 101 writes the table data shown in FIG. 11B at the address “0x1000_0000” of the DRAM 112 at the head. In step S32, the CPU 101 writes the start address in the register 1102. Next, when the image processing unit receives data (for example, R = 9) in step S33, the process proceeds to step S34. In step S34, the address generation unit 1101 adds the offset value (“9”) to (the head address of the table “0x1000_0000”). Then, the address 1104 for accessing the cache 1110 is set to “0x1000_0009”. At the same time, the address generation unit 1101 sets the value of the dummy flag 801 included in the attribute data of the input data in the signal dummy flag 1105. In step S35, the image processing unit requests data from the cache 1110. As a result, the cache 1110 returns the data corresponding to the address “0x1000_0009” (data “28” in the example of FIG. 11) as the data 1106 to the calculation unit 103. In step S37, the calculation unit 1103 performs calculation if necessary based on the read table value and the input value, and outputs the value as output data. In simple table conversion, the calculation unit 1103 outputs a table value that is simply read. The above processing is repeated until the last pixel of the page is detected in step S38, and when the processing for all the pixels on this page is completed, this processing ends.

ここでキャッシュ1110は、画像処理部から要求されたデータをキャッシュしているかを調べ、キャッシュしている場合(キャッシュヒット)は、そのキャッシュしているデータを返す。また画像処理部から要求されたデータをキャッシュしていないときは(キャッシュミス)は、その要求されたデータをDRAM112から取得してキャッシュするとともに、そのデータを返す。   Here, the cache 1110 checks whether or not the data requested by the image processing unit is cached. If it is cached (cache hit), the cached data is returned. When the data requested by the image processing unit is not cached (cache miss), the requested data is acquired from the DRAM 112 and cached, and the data is returned.

次に本実施形態1に係る画像処理部の動作を図9及び図13を参照して説明する。尚、画像処理部108〜110の基本動作は同じであるので、ここでは画像処理部108の例をキャッシュ制御に着目して説明する。尚、図9のキャッシュ902は、図10のキャッシュ1110に相当している。   Next, the operation of the image processing unit according to the first embodiment will be described with reference to FIGS. Since the basic operations of the image processing units 108 to 110 are the same, an example of the image processing unit 108 will be described here focusing on cache control. Note that the cache 902 in FIG. 9 corresponds to the cache 1110 in FIG.

図9は、本実施形態1に係る画像処理部におけるキャッシュ制御を説明するためのブロック図である。   FIG. 9 is a block diagram for explaining cache control in the image processing unit according to the first embodiment.

ここでは画像処理部108は、データ901を入力し、そのデータ901を変換するために、そのデータに基づくアドレスと、そのダミーフラグをキャッシュコントローラ903に出力する。これによりキャッシュコントローラ903は、ダミーフラグが「0」で通常の画像データであれば、その要求されたデータがキャッシュされているかどうかを判断し、キャッシュされているとそのデータを画像処理部108に返す。一方キャッシュされていないときは、DRAM112にアクセスして、その要求されたデータをDRAM112から取得して画像処理部108に返す。またダミーフラグが「1」であれば、DRAM112にアクセスして、その要求されたデータをDRAM112から取得して画像処理部108に返すとともに、キャッシュ902の空きエリアに、そのデータを保存する。   Here, the image processing unit 108 inputs the data 901 and outputs an address based on the data and the dummy flag to the cache controller 903 in order to convert the data 901. As a result, if the dummy flag is “0” and the image data is normal image data, the cache controller 903 determines whether the requested data is cached, and if it is cached, the cache controller 903 sends the data to the image processing unit 108. return. On the other hand, when it is not cached, the DRAM 112 is accessed, and the requested data is acquired from the DRAM 112 and returned to the image processing unit 108. If the dummy flag is “1”, the DRAM 112 is accessed, the requested data is acquired from the DRAM 112 and returned to the image processing unit 108, and the data is stored in a free area of the cache 902.

画像処理部109は、画像処理部108で処理されたデータ910を受取り、画像処理部108の場合と同様にしてキャッシュを使用して画像処理を行う。以下、図13のフローチャートに従って詳しく説明する。   The image processing unit 109 receives the data 910 processed by the image processing unit 108 and performs image processing using a cache in the same manner as in the case of the image processing unit 108. Hereinafter, it will be described in detail according to the flowchart of FIG.

図13は、本実施形態1に係る画像処理部によるキャッシュ処理を説明するフローチャートである。   FIG. 13 is a flowchart illustrating cache processing by the image processing unit according to the first embodiment.

キャッシュ902は各画像処理部ごとに存在し、各キャッシュはプリントを開始する前にCPU101によって初期化される(ステップS41)。次にステップS42に進み、画像処理部108がデータ901を受け取ると、画像処理部108はテーブル変換に必要なデータをキャッシュコントローラ903に要求する。その際に画像処理部108は、受信したデータ901の属性データ701に含まれるダミーフラグ801の値もキャッシュコントローラ903に送信する。キャッシュコントローラ903は、データ要求を受けるとステップS43で、ダミーフラグ801が「1」かどうかを判定する。このダミーフラグ801が「1」、即ち、データ901が代表画素であると認識するとステップS44に進み、キャッシュコントローラ903は、画像処理部108から要求されたデータをDRAM112から取得する。次にステップS45に進み、ステップS44で取得したデータをキャッシュ内部の代表画素データを保存しておくtypデータ904(図9)に書き込むかどうかを判定する。このtypデータ904は複数存在し、各typデータ904はフラグ905とセットになっており、フラグ905はtypデータ904が有効であるかどうかを示す。前述のステップS41でキャッシュを初期化する際には、このフラグ905を全て「0」(無効)にクリアする。このステップS45では、フラグ905をスキャンし、空き領域(フラグ905が「0」)を探す。そしてステップS45で、空き領域が見つかった場合はステップS46に進み、その空き領域に、DRAM112から読み出したデータを保存し、フラグ905を「1」にセットする。そしてステップS47で、DRAM112から読み出したデータを画像処理部108に返す。一方ステップS45で空き領域が見つからなかった場合はキャッシュ内のデータ更新は行わずにステップS47に進み、DRAM112から読み出したデータを画像処理部108に返す。例えば図11に示す例で、画像処理部からのデータ要求がアドレス「0x1000_0009」でダミーフラグが「1」である場合は、キャッシュコントローラ903は、DRAM112からアドレス「0x1000_0009」のデータ「28」のみを読み出す。   A cache 902 exists for each image processing unit, and each cache is initialized by the CPU 101 before printing is started (step S41). In step S42, when the image processing unit 108 receives the data 901, the image processing unit 108 requests the cache controller 903 for data necessary for table conversion. At that time, the image processing unit 108 also transmits the value of the dummy flag 801 included in the attribute data 701 of the received data 901 to the cache controller 903. Upon receiving the data request, the cache controller 903 determines whether or not the dummy flag 801 is “1” in step S43. When the dummy flag 801 is “1”, that is, when the data 901 is recognized as a representative pixel, the process proceeds to step S44, and the cache controller 903 acquires the data requested from the image processing unit 108 from the DRAM 112. In step S45, it is determined whether or not the data acquired in step S44 is to be written in typ data 904 (FIG. 9) that stores representative pixel data in the cache. There are a plurality of typ data 904. Each typ data 904 is set with a flag 905. The flag 905 indicates whether the typ data 904 is valid. When the cache is initialized in step S41, all the flags 905 are cleared to “0” (invalid). In step S45, the flag 905 is scanned to search for a free area (flag 905 is “0”). If a free area is found in step S45, the process proceeds to step S46, the data read from the DRAM 112 is stored in the free area, and the flag 905 is set to “1”. In step S 47, the data read from the DRAM 112 is returned to the image processing unit 108. On the other hand, if no free area is found in step S45, the process proceeds to step S47 without updating the data in the cache, and the data read from the DRAM 112 is returned to the image processing unit. For example, in the example shown in FIG. 11, when the data request from the image processing unit is the address “0x1000_0009” and the dummy flag is “1”, the cache controller 903 sends only the data “28” of the address “0x1000_0009” from the DRAM 112. read out.

尚、ステップS46では、図5に示すように、DRAM112からキャッシュ902に出現頻度の高い画素データから順に送られてくるため、キャッシュ902のtypデータ904には、その出現頻度の高い代表画素の順に記憶されることになる。   In step S46, as shown in FIG. 5, since the pixel data having the highest appearance frequency is sequentially sent from the DRAM 112 to the cache 902, the typical data 904 in the cache 902 is displayed in the order of the representative pixels having the highest appearance frequency. Will be remembered.

一方、ステップS43で、ダミーフラグが「0」で、実際の画素データであると認識するとステップS48に進む。ステップS48では、画像処理部108から要求されたデータがキャッシュ902のtypデータ904或はライン906に存在するか(キャッシュヒットするか)を判定する。ここで存在するとすると判断するとステップS47に進み、そのキャッシュされている値を画像処理部108に返す。一方ステップS48で、要求されたデータがキャッシュ902に存在しない(キャッシュミス)場合はステップS49に進み、DRAM112から必要なデータを取得する。その際には通常のCPUにおけるキャッシュ制御と同じように、ライン単位でDRAM112からデータを取得し、Tag907で管理する。次にステップS50に進み、Tag907を基に、ライン906を入れ替えるかどうか等の制御を行う。本実施形態では、ステップS50における制御方法に関しては特に定めることはなく、汎用的な方法を採用する。   On the other hand, if the dummy flag is “0” in step S43 and the pixel data is recognized as actual pixel data, the process proceeds to step S48. In step S48, it is determined whether the data requested by the image processing unit 108 exists in the typ data 904 or the line 906 of the cache 902 (whether the cache hits). If it is determined that it exists here, the process proceeds to step S 47, and the cached value is returned to the image processing unit 108. On the other hand, if the requested data does not exist in the cache 902 (cache miss) in step S48, the process proceeds to step S49, and necessary data is acquired from the DRAM 112. At that time, data is acquired from the DRAM 112 in units of lines and managed by the Tag 907 as in the case of cache control in a normal CPU. Next, the process proceeds to step S50, and control such as whether to replace the line 906 is performed based on the Tag 907. In the present embodiment, the control method in step S50 is not particularly defined, and a general-purpose method is adopted.

例えば、図11に示す例において、画像処理部108からのデータ要求がアドレス「0x1000_0009」でダミーフラグが「0」、キャッシュのライン906のサイズが128バイトである場合を考える。この場合、キャッシュコントローラ903はDRAM112からからアドレス「0x1000_0009」のデータ「28」のみを読み出す。そしてステップS50で、ラインを置き換える場合には、アドレス「0x1000_0000」から「0x1000_007F」までの128バイトのデータをDRAM112から読み出してライン906に書き込む。   For example, in the example shown in FIG. 11, consider a case where the data request from the image processing unit 108 is address “0x1000_0009”, the dummy flag is “0”, and the size of the cache line 906 is 128 bytes. In this case, the cache controller 903 reads only the data “28” at the address “0x1000_0009” from the DRAM 112. In step S50, when replacing the line, 128-byte data from addresses “0x1000_0000” to “0x1000_007F” is read from the DRAM 112 and written to the line 906.

以上が一つのデータに対する処理で、複数のデータを受信した場合はこの処理をステップS42から繰り返す。このフローチャートにおいては、代表画素の数がキャッシュ902のtypデータ904の領域の数を超えた場合には、それ以降の代表画素はキャッシュ902に保存されない。しかし図4及び図5に示すように、出現頻度の高い代表画素から順番に並べており、DMAC107も先頭から順番に読み出して画像処理部108に送信するため、出現頻度の高い代表画素が優先的にキャッシュ902に保存されることになる。   The above is the process for one data, and when a plurality of data is received, this process is repeated from step S42. In this flowchart, when the number of representative pixels exceeds the number of areas of typ data 904 in the cache 902, the subsequent representative pixels are not stored in the cache 902. However, as shown in FIG. 4 and FIG. 5, the representative pixels having the highest appearance frequency are arranged in order, and the DMAC 107 is also read in order from the top and transmitted to the image processing unit 108. It is stored in the cache 902.

尚、ステップS46で、一度typデータ904に保存されたデータはフラグ905をセットすることにより保護され、ステップS41で、フラグ905がクリアされない限り上書きされることは無い。そのため、ステップS51で処理ブロックの最終画素を検出する度に、即ち、レンダリングの単位(ページ単位、バンド単位、矩形単位、オブジェクト単位)ごとに、ステップS41のキャッシュの初期化を実行する。   Note that the data once saved in the typ data 904 in step S46 is protected by setting the flag 905, and is not overwritten unless the flag 905 is cleared in step S41. Therefore, every time the last pixel of the processing block is detected in step S51, that is, for each rendering unit (page unit, band unit, rectangular unit, object unit), the cache initialization in step S41 is executed.

こうしてステップS47で、画像処理部108に、要求されたデータを送信するとステップS51に進み、処理対象ブロックの最終画素かどうかを判断する。ここで最終画素でないと判断するとステップS41に戻って前述の処理を繰り返す。そして最終画素と判断するとステップS51からステップS52に進み、ページの最終画素かどうかを判断する。ページの最終画素でないと判断するとステップS41に戻って前述の処理を繰り返す。そしてページの最終画素と判断すると、この処理を終了する。   In this way, when the requested data is transmitted to the image processing unit 108 in step S47, the process proceeds to step S51, and it is determined whether it is the last pixel of the processing target block. If it is determined that the pixel is not the final pixel, the process returns to step S41 and the above-described processing is repeated. If it is determined that the pixel is the last pixel, the process proceeds from step S51 to step S52 to determine whether the pixel is the final pixel of the page. If it is determined that it is not the last pixel of the page, the process returns to step S41 and the above-described processing is repeated. When it is determined that the pixel is the last pixel of the page, this process is terminated.

画像処理部109の基本動作は画像処理部108と同じである。   The basic operation of the image processing unit 109 is the same as that of the image processing unit 108.

図9では、画像処理部108で処理されたデータ910が画像処理部109に入力される。このデータ910の属性データ701は、画像処理部108に入力されたデータ901の場合と同じでありダミーフラグ801も同じ値である。そのため代表画素であれば、後段の画像処理部でも代表画素と認識される。それに対して画素値、例えばR,G,Bは、各画像処理部でテーブル変換を含む処理の結果得られた値に置き換わる。つまり、代表画素であるという属性は変化せずに、その画素値だけが画像処理部で処理されるたびに変化していく。   In FIG. 9, data 910 processed by the image processing unit 108 is input to the image processing unit 109. The attribute data 701 of the data 910 is the same as that of the data 901 input to the image processing unit 108, and the dummy flag 801 has the same value. Therefore, if it is a representative pixel, it will be recognized as a representative pixel in the image processing unit in the subsequent stage. On the other hand, pixel values such as R, G, and B are replaced with values obtained as a result of processing including table conversion in each image processing unit. That is, the attribute of being a representative pixel does not change, and changes only each time the pixel value is processed by the image processing unit.

画像処理部109において一番出現頻度の高い画素データの値は、画像処理部108において一番出現頻度の高い画素データの値を、テーブル変換を含む処理の結果得られた画素値である。そのため、テーブルデータの値を含む画像処理部108での処理内容に依存する。テーブルデータの値はプリントを開始する前にCPU101がプリンタ部114と通信行って決まっており、レンダリング時に決められるものではない。   The value of the pixel data having the highest appearance frequency in the image processing unit 109 is a pixel value obtained as a result of processing including table conversion of the value of the pixel data having the highest appearance frequency in the image processing unit 108. Therefore, it depends on the processing contents in the image processing unit 108 including the values of the table data. The value of the table data is determined by the CPU 101 communicating with the printer unit 114 before starting printing, and is not determined at the time of rendering.

本実施形態では、代表画素であるという属性を変化させることなく、画素値のみを各画像処理部でのテーブル変換を含む処理によって変化させて伝播していく。これにより、各画像処理部に対して、テーブルデータの値によらず常に出現頻度の高いデータを代表画素として送信でき、各画像処理部で出現頻度の高いデータを優先的にキャッシュに留めておくことができる。その結果、キャッシュのヒット率を高めることができる。   In this embodiment, without changing the attribute of being a representative pixel, only the pixel value is changed and propagated by processing including table conversion in each image processing unit. As a result, data with a high appearance frequency can always be transmitted as a representative pixel to each image processing unit regardless of the value of the table data, and the data with a high appearance frequency is preferentially kept in the cache in each image processing unit. be able to. As a result, the cache hit rate can be increased.

実際のデータを処理する場合には、キャッシュヒットした場合には、DRAMからデータを取得する処理(ステップS49)が必要ないので高速に処理できる。通常、DRAMからデータを取得するには、キャッシュ内部で処理を終える場合と比べて10倍以上の時間を要するため、キャッシュヒットの確立を向上することにより全体の処理パフォーマンスを向上させることができる。   When processing actual data, if a cache hit occurs, processing for acquiring data from the DRAM (step S49) is not necessary, and processing can be performed at high speed. Usually, acquiring data from a DRAM requires 10 times or more time compared with the case where processing is completed in the cache, so that the overall processing performance can be improved by improving the establishment of cache hits.

以上の点に基づいて再度図2を参照して概略動作を説明する。   Based on the above points, the general operation will be described again with reference to FIG.

画像処理部での処理が終了した画像データはDMAC111に送られる。DMAC111では、その受信したデータから、実際の画素の画像データのみを取り出しDRAM112に保存する。その際に、代表画素或は実際の画素データかを示す属性データ701は、DMAC111が読み捨ててDRAM112には保存しない。DMAC111は、受信した実際の画素データを画素ブロックに送信する順番に並び替えてDRAM112にスプールする機能を有する。DMAC111は、レンダリングの単位がページ、バンド単位であれば、受信した実際の画素データをそのままの順番でDRAM112に保存する。それに対して、レンダリングの単位がブロック、オブジェクト単位であれば、受信した実際の画素をラスタ順(ページ単位のレンダリングと同じ並び)に並びかえる(ステップS8)。   The image data that has been processed by the image processing unit is sent to the DMAC 111. The DMAC 111 extracts only the actual pixel image data from the received data and stores it in the DRAM 112. At that time, the attribute data 701 indicating the representative pixel or the actual pixel data is discarded by the DMAC 111 and is not stored in the DRAM 112. The DMAC 111 has a function of rearranging the received actual pixel data in the order of transmission to the pixel block and spooling it in the DRAM 112. If the rendering unit is a page or band unit, the DMAC 111 stores the received actual pixel data in the DRAM 112 in the same order. On the other hand, if the rendering unit is a block or object unit, the received actual pixels are rearranged in the raster order (the same order as the rendering in page units) (step S8).

DMAC111が、DRAM112に1ページ分のデータをスプールし終えると、プリンタ部114に対してプリンタ部114からのデータ要求信号に同期してデータを送信し、プリンタ部114によるプリントを実行させる(ステップS9)。   When the DMAC 111 finishes spooling one page of data in the DRAM 112, the data is transmitted to the printer unit 114 in synchronization with the data request signal from the printer unit 114, and printing by the printer unit 114 is executed (step S9). ).

以上の処理をまとめたのが図2のフローチャートである。   The above processing is summarized in the flowchart of FIG.

以上説明したように本実施形態1によれば、各処理ブロック毎に出現頻度の高い画素データを優先的にキャッシュに保存するため、そのブロックの処理中におけるキャッシュヒット率が高められるという効果がある。またこれにより、ブロック単位のデータの処理効率が良くなるという効果がある。   As described above, according to the first embodiment, pixel data having a high appearance frequency is preferentially stored in the cache for each processing block, so that the cache hit rate during processing of the block can be increased. . This also has the effect of improving the processing efficiency of data in block units.

(他の実施形態)
以上、本発明の実施形態について詳述したが、本発明は、複数の機器から構成されるシステムに適用しても良いし、また一つの機器からなる装置に適用しても良い。
(Other embodiments)
Although the embodiments of the present invention have been described in detail above, the present invention may be applied to a system constituted by a plurality of devices or may be applied to an apparatus constituted by one device.

なお、本発明は、前述した実施形態の機能を実現するソフトウェアのプログラムを、システム或いは装置に直接或いは遠隔から供給し、そのシステム或いは装置のコンピュータが該供給されたプログラムを読み出して実行することによっても達成され得る。その場合、プログラムの機能を有していれば、形態は、プログラムである必要はない。   In the present invention, a software program that implements the functions of the above-described embodiments is supplied directly or remotely to a system or apparatus, and the computer of the system or apparatus reads and executes the supplied program. Can also be achieved. In that case, as long as it has the function of a program, the form does not need to be a program.

従って、本発明の機能処理をコンピュータで実現するために、該コンピュータにインストールされるプログラムコード自体も本発明を実現するものである。つまり、本発明のクレームでは、本発明の機能処理を実現するためのコンピュータプログラム自体も含まれる。その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等、プログラムの形態を問わない。   Accordingly, since the functions of the present invention are implemented by computer, the program code installed in the computer also implements the present invention. That is, the claims of the present invention include the computer program itself for realizing the functional processing of the present invention. In this case, the program may be in any form as long as it has a program function, such as an object code, a program executed by an interpreter, or script data supplied to the OS.

プログラムを供給するための記録媒体としては、様々なものが使用できる。例えば、フロッピー(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、MO、CD−ROM、CD−R、CD−RW、磁気テープ、不揮発性のメモリカード、ROM、DVD(DVD−ROM,DVD−R)などである。   Various recording media for supplying the program can be used. For example, floppy (registered trademark) disk, hard disk, optical disk, magneto-optical disk, MO, CD-ROM, CD-R, CD-RW, magnetic tape, nonvolatile memory card, ROM, DVD (DVD-ROM, DVD- R).

その他、プログラムの供給方法としては、クライアントコンピュータのブラウザを用いてインターネットのホームページに接続し、該ホームページからハードディスク等の記録媒体にダウンロードすることによっても供給できる。その場合、ダウンロードされるのは、本発明のコンピュータプログラムそのもの、もしくは圧縮され自動インストール機能を含むファイルであってもよい。また、本発明のプログラムを構成するプログラムコードを複数のファイルに分割し、それぞれのファイルを異なるホームページからダウンロードすることによっても実現可能である。つまり、本発明の機能処理をコンピュータで実現するためのプログラムファイルを複数のユーザに対してダウンロードさせるWWWサーバも、本発明のクレームに含まれるものである。   As another program supply method, the program can be supplied by connecting to a home page on the Internet using a browser of a client computer and downloading the program from the home page to a recording medium such as a hard disk. In this case, the computer program itself of the present invention or a compressed file including an automatic installation function may be downloaded. It can also be realized by dividing the program code constituting the program of the present invention into a plurality of files and downloading each file from a different homepage. That is, a WWW server that allows a plurality of users to download a program file for realizing the functional processing of the present invention on a computer is also included in the claims of the present invention.

また、本発明のプログラムを暗号化してCD−ROM等の記憶媒体に格納してユーザに配布する形態としても良い。その場合、所定の条件をクリアしたユーザに対し、インターネットを介してホームページから暗号化を解く鍵情報をダウンロードさせ、その鍵情報を使用することにより暗号化されたプログラムが実行可能な形式でコンピュータにインストールされるようにする。   Further, the program of the present invention may be encrypted, stored in a storage medium such as a CD-ROM, and distributed to users. In that case, a user who has cleared a predetermined condition is allowed to download key information to be decrypted from a homepage via the Internet, and using the key information, the encrypted program can be executed on a computer in a format that can be executed. To be installed.

また、コンピュータが、読み出したプログラムを実行することによって、前述した実施形態の機能が実現される形態以外の形態でも実現可能である。例えば、そのプログラムの指示に基づき、コンピュータ上で稼動しているOSなどが、実際の処理の一部または全部を行ない、その処理によっても前述した実施形態の機能が実現され得る。   Further, the present invention can be realized in a form other than the form in which the functions of the above-described embodiments are realized by the computer executing the read program. For example, based on the instructions of the program, an OS or the like running on the computer performs part or all of the actual processing, and the functions of the above-described embodiments can also be realized by the processing.

更に、記録媒体から読み出されたプログラムが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれるようにしてもよい。この場合、その後で、そのプログラムの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行ない、その処理によって前述した実施形態の機能が実現される。   Furthermore, the program read from the recording medium may be written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. In this case, thereafter, based on the instructions of the program, the CPU or the like provided in the function expansion board or function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing. .

以上説明したように本実施形態によれば、入力データが画像データであることに着目し、処理を行う前に入力データの解析を行って、事前に出現頻度の高い入力データの値を推定してキャッシュ制御に利用する。具体的には、出現頻度の高い入力データの値が入力された場合には必ずキャッシュヒットするように保障し、かつ出現頻度の高い入力データに対応するテーブルデータの値が必ずキャッシュ内に留まるように制御できる。   As described above, according to the present embodiment, focusing on the fact that the input data is image data, the input data is analyzed before processing, and the value of input data having a high appearance frequency is estimated in advance. Used for cache control. Specifically, when a value of input data with a high appearance frequency is input, a cache hit is guaranteed to be ensured, and a value of table data corresponding to the input data with a high appearance frequency always remains in the cache. Can be controlled.

本発明の実施形態に係る画像形成装置と、それを含むネットワークシステムの構成を示す図である。1 is a diagram illustrating a configuration of an image forming apparatus according to an embodiment of the present invention and a network system including the image forming apparatus. 本実施形態に係る画像形成装置による印刷処理を説明するフローチャートである。6 is a flowchart for describing printing processing by the image forming apparatus according to the embodiment. 1ページを3バンドに分割して、各バンド単位で処理する例を説明する図である。It is a figure explaining the example which divides | segments 1 page into 3 bands and processes it by each band unit. 本実施形態に係る出現頻度テーブルの一例を示す図である。It is a figure which shows an example of the appearance frequency table which concerns on this embodiment. 1つのバンドのメモリイメージのデータ構成例を示す図である。It is a figure which shows the example of a data structure of the memory image of one band. 本実施形態に係る出現頻度テーブルの作成手順を説明するフローチャートである。It is a flowchart explaining the creation procedure of the appearance frequency table which concerns on this embodiment. 本実施形態に係る各画素データを説明する図である。It is a figure explaining each pixel data concerning this embodiment. 本実施形態に係る属性データのデータ構成を説明する図である。It is a figure explaining the data structure of attribute data concerning this embodiment. 本実施形態1に係る画像処理部におけるキャッシュ制御を説明するためのブロック図である。It is a block diagram for demonstrating the cache control in the image processing part which concerns on this Embodiment 1. FIG. 本発明の実施形態1に係る画像処理部の基本構成を示す図である。It is a figure which shows the basic composition of the image processing part which concerns on Embodiment 1 of this invention. 本実施形態に係るテーブル変換を含む8ビットから10ビットへの変換の一例を説明する図である。It is a figure explaining an example of conversion from 8 bits to 10 bits including table conversion concerning this embodiment. 本実施形態1に係る画像処理部を使用した処理を説明するフローチャートである。6 is a flowchart illustrating processing using an image processing unit according to the first embodiment. 本実施形態1に係る画像処理部によるキャッシュ処理を説明するフローチャートである。4 is a flowchart for explaining cache processing by an image processing unit according to the first embodiment.

Claims (9)

入力した画像データをテーブルを参照して変換する画像処理装置であって、
画像データに含まれる画素データに対応する変換後データを記憶する記憶手段と、
前記画像データに含まれる出現頻度の高い画素値を特定し、当該画素値に対応する変換後データを優先的にキャッシュするキャッシュ手段と、
前記画像データに含まれる画素データに対応する変換後データが前記キャッシュ手段によりキャッシュされている場合は当該キャッシュ手段にキャッシュされている前記変換後データを用いて変換し、前記画像データに含まれる画素データに対応する変換後データが前記キャッシュ手段によりキャッシュされていない場合は前記記憶手段に記憶されている前記画素データに対応する変換後データを用いて変換する画像処理手段と、
を有することを特徴とする画像処理装置。
An image processing apparatus that converts input image data by referring to a table,
Storage means for storing post-conversion data corresponding to pixel data included in the image data;
A cache unit for specifying a pixel value having a high appearance frequency included in the image data and preferentially caching the converted data corresponding to the pixel value;
When the converted data corresponding to the pixel data included in the image data is cached by the cache means, the converted data cached in the cache means is used for conversion, and the pixels included in the image data are converted. An image processing means for converting using converted data corresponding to the pixel data stored in the storage means when the converted data corresponding to the data is not cached by the cache means;
An image processing apparatus comprising:
前記画像処理手段は、前記画像データに含まれる画素データに対応する変換後データが前記キャッシュ手段によりキャッシュされていない場合は、前記記憶手段に記憶されている前記画素データに対応する変換後データを前記キャッシュ手段にキャッシュすることを特徴とする請求項1に記載の画像処理装置。   If the converted data corresponding to the pixel data included in the image data is not cached by the cache means, the image processing means outputs the converted data corresponding to the pixel data stored in the storage means. The image processing apparatus according to claim 1, wherein the image is cached in the cache unit. 前記キャッシュ手段は、前記出現頻度の高い画素値を出現頻度の高い順にキャッシュすることを特徴とする請求項1又は2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the cache unit caches the pixel values having a high appearance frequency in descending order of the appearance frequency. 前記画像処理手段は、順番に接続された複数の画像処理部を有し、
前記複数の画像処理部のそれぞれは、各画像処理部に対応する前記キャッシュ手段を備えていることを特徴とする請求項1乃至3のいずれか1項に記載の画像処理装置。
The image processing means includes a plurality of image processing units connected in order,
4. The image processing apparatus according to claim 1, wherein each of the plurality of image processing units includes the cache unit corresponding to each image processing unit. 5.
前記記憶手段は大容量のDRAMを有し、前記キャッシュ手段は、小容量の高速SRAMを有することを特徴とする請求項1乃至4のいずれか1項に記載の画像処理装置。   5. The image processing apparatus according to claim 1, wherein the storage unit includes a large capacity DRAM, and the cache unit includes a small capacity high speed SRAM. 画像データに含まれる画素データに対応する変換後データを記憶するテーブルを有し、入力した画像データをテーブルを参照して変換する画像処理装置の制御方法であって、
前記画像データに含まれる出現頻度の高い画素値を特定し、当該画素値に対応する変換後データを優先的にキャッシュするキャッシュ工程と、
前記画像データに含まれる画素データに対応する変換後データがキャッシュされている場合は当該キャッシュされている前記変換後データを用いて変換し、前記画像データに含まれる画素データに対応する変換後データがキャッシュされていない場合は前記テーブルに記憶されている前記画素データに対応する変換後データを用いて変換する画像処理工程と、
を有することを特徴とする画像処理装置の制御方法。
A control method for an image processing apparatus having a table for storing post-conversion data corresponding to pixel data included in image data, and converting input image data with reference to the table,
A cache step of specifying a pixel value having a high appearance frequency included in the image data and preferentially caching the converted data corresponding to the pixel value;
If the converted data corresponding to the pixel data included in the image data is cached, the converted data corresponding to the pixel data included in the image data is converted using the cached converted data. Is not cached, an image processing step of converting using converted data corresponding to the pixel data stored in the table;
A control method for an image processing apparatus, comprising:
前記画像処理工程は、前記画像データに含まれる画素データに対応する変換後データがキャッシュされていない場合は、前記記憶手段に記憶されている前記画素データに対応する変換後データを前記キャッシュ工程でキャッシュさせることを特徴とする請求項6に記載の画像処理装置の制御方法。   In the image processing step, when the converted data corresponding to the pixel data included in the image data is not cached, the converted data corresponding to the pixel data stored in the storage unit is stored in the cache step. The method according to claim 6, wherein the image processing apparatus is cached. 前記キャッシュ工程は、前記出現頻度の高い画素値を出現頻度の高い順にキャッシュすることを特徴とする請求項6又は7に記載の画像処理装置の制御方法。   8. The method of controlling an image processing apparatus according to claim 6, wherein the cache step caches the pixel values having a high appearance frequency in descending order of the appearance frequency. 前記画像処理工程は、複数の画像処理工程を有し、前記複数の画像処理工程のそれぞれは、各対応する前記キャッシュ工程を実施することを特徴とする請求項6乃至8のいずれか1項に記載の画像処理装置の制御方法。   9. The image processing process according to claim 6, wherein the image processing process includes a plurality of image processing processes, and each of the plurality of image processing processes implements the corresponding cache process. A control method of the image processing apparatus described.
JP2008249131A 2008-09-26 2008-09-26 Image processing apparatus and control method thereof Withdrawn JP2010081429A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008249131A JP2010081429A (en) 2008-09-26 2008-09-26 Image processing apparatus and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008249131A JP2010081429A (en) 2008-09-26 2008-09-26 Image processing apparatus and control method thereof

Publications (1)

Publication Number Publication Date
JP2010081429A true JP2010081429A (en) 2010-04-08

Family

ID=42211331

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008249131A Withdrawn JP2010081429A (en) 2008-09-26 2008-09-26 Image processing apparatus and control method thereof

Country Status (1)

Country Link
JP (1) JP2010081429A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015197897A (en) * 2014-04-03 2015-11-09 キヤノン株式会社 Image processor, and image processing method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015197897A (en) * 2014-04-03 2015-11-09 キヤノン株式会社 Image processor, and image processing method

Similar Documents

Publication Publication Date Title
US20080273218A1 (en) Image Processing Apparatus, Control Method Thereof, and Program
JP6205742B2 (en) Image processing apparatus, image processing method, and image processing program
JP2015114820A (en) Print service provision apparatus and printing system
JP2005537542A (en) Image compression, storage and retrieval system and method
JP2005537542A5 (en)
JP3862605B2 (en) Image processing device
JP2008090377A (en) Rasterizing device, program and method
JP2010081429A (en) Image processing apparatus and control method thereof
JP2005169861A (en) Printing device and data processing method
JP3854790B2 (en) Image processing apparatus and method, and storage medium
JP4136825B2 (en) Image processing apparatus, image processing method, computer-readable storage medium storing program, and program
JP4915465B2 (en) Scanner device
JP2009282964A (en) System and method for rendering print data, and computer readable medium
JP5223492B2 (en) Print control apparatus and print control program
JP5929126B2 (en) Print data receiving apparatus, image processing apparatus, and program
JPH0644013A (en) Method for compressing printing data
JP2007034488A (en) Dma controller and method
JP4350470B2 (en) Image processing apparatus, image processing method, and program
JP4323885B2 (en) Printing apparatus, printing control method, storage medium, and program
JP2009284508A (en) Image processor, its control method and program
JP3741183B2 (en) Image data interpolation apparatus, image data interpolation method, and medium on which image data interpolation program is recorded
JP4038887B2 (en) Image processing apparatus and printer apparatus
JP2006236006A (en) Printer, program and recording medium
JP2004023741A (en) Image processing apparatus and color processing method
JP4325339B2 (en) Printing system, host computer and printer driver

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20111206