JP2010220127A - Image processing apparatus and method, and program - Google Patents

Image processing apparatus and method, and program Download PDF

Info

Publication number
JP2010220127A
JP2010220127A JP2009067092A JP2009067092A JP2010220127A JP 2010220127 A JP2010220127 A JP 2010220127A JP 2009067092 A JP2009067092 A JP 2009067092A JP 2009067092 A JP2009067092 A JP 2009067092A JP 2010220127 A JP2010220127 A JP 2010220127A
Authority
JP
Japan
Prior art keywords
code
data
pixel
attribute
value
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.)
Granted
Application number
JP2009067092A
Other languages
Japanese (ja)
Other versions
JP5201040B2 (en
Inventor
Naohito Shiraishi
尚人 白石
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2009067092A priority Critical patent/JP5201040B2/en
Publication of JP2010220127A publication Critical patent/JP2010220127A/en
Application granted granted Critical
Publication of JP5201040B2 publication Critical patent/JP5201040B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To efficiently compress and encode image data having attribute information for every pixel. <P>SOLUTION: Encoding of image data is performed using predictive encoding and run-length encoding. In generating run length, the change of attribute data corresponding to the image data is detected, a run-length value of the image data is terminated at a change point of the attribute data to encode the run-length value, and the encoded run-length value and a code representing the attribute data are output to a code string of 1. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、画像データを圧縮符号化し、また、当該圧縮符号化された画像データを復号する画像処理装置、画像処理方法およびプログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and a program for compressing and encoding image data and decoding the compression-encoded image data.

プリンタ装置などの画像形成装置では、入力された画像データを一時的にメモリに記憶し、このメモリに記憶された画像データを所定のタイミングで読み出して、印刷動作を行う。この場合、画像データをそのままメモリに格納しようとすると、大容量のメモリが必要になり装置のコストが嵩んでしまう。そのため、一般的には、入力された画像データを、圧縮符号化してメモリに格納するようにしている。   In an image forming apparatus such as a printer, input image data is temporarily stored in a memory, and the image data stored in the memory is read at a predetermined timing to perform a printing operation. In this case, if the image data is stored in the memory as it is, a large-capacity memory is required and the cost of the apparatus increases. Therefore, generally, input image data is compression-encoded and stored in a memory.

ところで、プリンタ装置で画質が良好なカラー画像を出力するためには、写真画像などの自然画像(イメージ)、コンピュータにより生成されたグラフィックや線画(細線)、文字など画像の種類によって異なる色処理や中間調処理が必要になる。すなわち、異なる種類の画像が混在する画像を出力するためには、画像の種類毎に最適な画像処理を施す手段が必要になる。そのため、画素が表現する画像の種類を示す属性情報を、CMYK各版による画像データに付加してプリンタ装置に供給することが、従来から行われている。   By the way, in order to output a color image with good image quality by a printer device, a color image or a natural image (image) such as a photographic image, a graphic or a line drawing (thin line) generated by a computer, a character that varies depending on the type of image, Halftone processing is required. That is, in order to output an image in which different types of images are mixed, a means for performing optimum image processing for each type of image is required. Therefore, conventionally, attribute information indicating the type of image represented by a pixel is added to the image data of each CMYK plate and supplied to the printer apparatus.

この属性情報の処理については、従来から様々な方法が提案されている。特許文献1には、画素に属性値を付加した拡張画像を読み込み、画素と属性情報を統合した1つのデータ単位に1つの符号に符号化する技術が開示されている。特許文献2には、RGB画素の圧縮時にRGB画素値の一部の色成分(例えばR成分)の下位ビットに属性情報を埋め込み、RGB画素を属性値に応じて異なる圧縮方式で圧縮する技術が開示されている。   Various methods have been proposed for processing this attribute information. Patent Document 1 discloses a technique for reading an extended image in which an attribute value is added to a pixel and encoding it into one code in one data unit in which the pixel and the attribute information are integrated. Patent Document 2 discloses a technique for embedding attribute information in lower bits of a part of color components (for example, R component) of RGB pixel values when compressing RGB pixels, and compressing the RGB pixels by different compression methods according to the attribute values. It is disclosed.

特許文献3には、画像データを属性値に基づき分離して複数の画像を生成し、生成されたそれぞれの画像を異なる符号化装置で圧縮することにより、属性値を圧縮しないでよいようにした技術が開示されている。   In Patent Document 3, image data is separated based on attribute values to generate a plurality of images, and the generated images are compressed by different encoding devices so that the attribute values need not be compressed. Technology is disclosed.

特許文献4には、属性情報を複数画素単位でパックすることにより、属性情報を高圧縮率で圧縮符号化する技術が開示されている。また、この特許文献4には、描画された多値プレーンデータを圧縮部でCMYK各版毎に符号化すると共に、描画された属性データを他の圧縮部で符号化し、画像形成時に、CMYL各版毎の多値プレーン画像の符号と属性値の符号とを順次復号する点が記載されている。   Patent Document 4 discloses a technology for compressing and encoding attribute information at a high compression rate by packing the attribute information in units of a plurality of pixels. Further, in this Patent Document 4, the drawn multi-value plane data is encoded for each CMYK plate by the compression unit, and the drawn attribute data is encoded by another compression unit. The point that the code | symbol of the multi-value plane image for every version and the code | symbol of an attribute value are decoded sequentially is described.

また、特許文献5には、画像形成時に、CMYK各版のエンジンに同期して版毎の復号装置により各版の符号を復号させることで印刷を行う点が記載されている。   Patent Document 5 describes that printing is performed by decoding a code of each plate by a decoding device for each plate in synchronism with the engine of each plate of CMYK during image formation.

一方、特許文献6には、画像データをランレングス符号化を用いて圧縮する技術が記載されている。特許文献6によれば、例えば図21−1に例示されるような、文字、グラフィックおよび写真画像といった異なる種類の画像が混在して配置されたプリント画像に対して、図21−2に例示されるように、画像の種類を示す属性値をランレングス符号化する。   On the other hand, Patent Document 6 describes a technique for compressing image data using run-length encoding. According to Patent Document 6, for example, FIG. 21-2 illustrates a print image in which different types of images such as characters, graphics, and photographic images are mixedly disposed as illustrated in FIG. As shown, the attribute value indicating the image type is run-length encoded.

図22を用いて、特許文献6による属性情報の符号化について、より詳細に説明する。属性情報は、図22−1にC版を代表して例示されるように、画素毎に対応付けられる。図22−1の例では、属性情報を示す属性値が0〜3で、その画素が下地属性、グラフィクス属性、文字属性および写真属性の何れであるかをそれぞれ示している。図22−2は、属性情報をランレングスを用いて符号化した例を示す。この例では、属性情報の符号データは、属性値の開始位置を示す属性ヘッダと、属性値と、その属性値のランレングス値とが繰り返して配置されて構成される。   The attribute information encoding according to Patent Document 6 will be described in more detail with reference to FIG. The attribute information is associated with each pixel as exemplified by the C version in FIG. In the example of FIG. 22-1, the attribute value indicating the attribute information is 0 to 3 and indicates whether the pixel is a background attribute, a graphics attribute, a character attribute, or a photograph attribute. FIG. 22-2 illustrates an example in which attribute information is encoded using a run length. In this example, the code data of the attribute information is configured by repeatedly arranging an attribute header indicating the start position of the attribute value, the attribute value, and a run length value of the attribute value.

上述した特許文献4および特許文献5によれば、描画された多値のプレーンデータをCMYK各版毎に符号化し、復号時にCMYK各版のプリントエンジンに同期して印字を行う。CMYK各版のプリントエンジンは、順次、所定に遅延されて動作する。そのため、CMYK各版毎に、同じ属性データをその都度メモリから読み込む必要がある。   According to Patent Document 4 and Patent Document 5 described above, rendered multi-value plane data is encoded for each CMYK plate, and printing is performed in synchronization with the print engine of each CMYK plate at the time of decoding. The print engines for each of the CMYK plates sequentially operate with a predetermined delay. Therefore, it is necessary to read the same attribute data from the memory for each version of CMYK.

したがって、特許文献4および特許文献5では、属性符号をCMYK各版毎にメモリから読み込むための4個のDMAC(Direct Memory Access Controller)と、画像符号をCMYK各版毎にメモリから読み込むための4個のDMACの、計8個のDMACが必要となり、装置規模やコストの増大を招くことになるという問題点があった、   Therefore, in Patent Document 4 and Patent Document 5, four DMACs (Direct Memory Access Controllers) for reading attribute codes from the memory for each version of CMYK and 4 for reading image codes from the memory for each version of CMYK. A total of 8 DMACs of the DMACs are required, and there is a problem that the apparatus scale and cost increase.

また、特許文献4および特許文献5では、属性符号を復号する復号装置と画像符号を復号する復号装置とがそれぞれCMYK各版毎に必要となる。すなわち、特許文献4および特許文献5によれば、合計で8個の復号装置を用意する必要があり、この点でも、装置規模やコストの増大を招くことになるという問題点があった。   In Patent Documents 4 and 5, a decoding device that decodes attribute codes and a decoding device that decodes image codes are required for each version of CMYK. That is, according to Patent Document 4 and Patent Document 5, it is necessary to prepare a total of eight decoding apparatuses, and this also causes a problem that the apparatus scale and cost increase.

さらに、特許文献4および特許文献5によれば、印字時における復号の際には、同一の属性符号がCMYK各版の印字タイミング毎にバスに転送されるため、バス転送に無駄が生じる嫌いがあるという問題点があった。特に、印字時には、CMYK各版の多値プレーンデータの転送がプリンタエンジンの処理速度に確実に追い付かなければならないため、印字時における復号の際のバス転送の無駄は、極力少なくしなければならない。   Furthermore, according to Patent Document 4 and Patent Document 5, when decoding at the time of printing, the same attribute code is transferred to the bus at each printing timing of each CMYK plate, so that the bus transfer is wasted. There was a problem that there was. In particular, at the time of printing, since the transfer of multi-value plane data of each version of CMYK must reliably catch up with the processing speed of the printer engine, the waste of bus transfer at the time of decoding at the time of printing must be minimized.

さらにまた、特許文献2によれば、RGB画素の圧縮時に、RGB画素値のうち一部の色成分の下位ビットに属性情報を埋め込むため、埋め込まれた属性情報がノイズとなり、画質の低下を起こしてしまうという問題点があった。また、RGB画素と属性値とを異なる圧縮方式で圧縮するため、上述の特許文献4および特許文献5と同様に、多数のDMACや復号装置を用意する必要があり、装置規模やコストの増大を招いてしまうという問題点があった。   Furthermore, according to Patent Document 2, since attribute information is embedded in the lower bits of some color components of the RGB pixel values when compressing RGB pixels, the embedded attribute information becomes noise and causes a reduction in image quality. There was a problem that it was. In addition, since the RGB pixels and the attribute values are compressed by different compression methods, it is necessary to prepare a large number of DMACs and decoding devices as in the above-mentioned Patent Literature 4 and Patent Literature 5, which increases the device scale and cost. There was a problem of being invited.

一方、特許文献3によれば、画像データを属性値により分離して生成した複数の画像を、それぞれ異なる符号化装置で圧縮することにより、属性値の圧縮を不要としている。しかしながら、特許文献3の方法では、属性値の種類数に対応する数だけ復号装置がCMYK各版毎に必要となり、装置規模やコストの増大を招いてしまうという問題点があった。例えば、属性値が4種類ある場合には、CMYK各版毎に4個の復号装置が必要となり、装置全体では16個の復号装置を用意する必要がある。   On the other hand, according to Patent Document 3, compression of attribute values is unnecessary by compressing a plurality of images generated by separating image data by attribute values using different encoding devices. However, the method of Patent Document 3 has a problem in that the number of decoding devices corresponding to the number of types of attribute values is required for each version of CMYK, resulting in an increase in device size and cost. For example, when there are four types of attribute values, four decoding devices are required for each version of CMYK, and it is necessary to prepare 16 decoding devices for the entire device.

また、複数に分離した画像それぞれを符号化した合計の符号量は、当該画像を分離せずに1の画像として符号化した場合の符号量よりも多くなることが予想される。そのため、圧縮符号化した画像データを格納するメモリも、大容量のものが必要となり、装置のコストの増大を招くことになる。   In addition, the total code amount obtained by encoding each of the plurality of separated images is expected to be larger than the code amount when the image is encoded as one image without being separated. Therefore, a large-capacity memory is also required for storing the compression-encoded image data, which increases the cost of the apparatus.

特許文献1では、属性情報と画像情報とを1つの情報として符号化するため、上述の特許文献4および特許文献5の場合のように、必要とされるDMACの個数が多くなり装置規模が増大するといった問題は生じない。しかしながら、この属性値を付加するための画素情報のビット幅を拡大した拡張画像を符号化するため、この特許文献1では、圧縮符号化処理そのものが困難になってしまうという問題点があった。   In Patent Document 1, since attribute information and image information are encoded as one piece of information, the number of DMACs required is increased and the apparatus scale is increased as in the case of Patent Document 4 and Patent Document 5 described above. The problem of doing does not occur. However, since the extended image in which the bit width of the pixel information for adding the attribute value is expanded is encoded, this Patent Document 1 has a problem that the compression encoding process itself becomes difficult.

すなわち、例えば8ビットのビット幅を持つ画像情報に対し、2ビットのビット幅を持つ属性情報が付加されると、拡張画像のビット幅が10ビットとなる。ところが、一般的なハードウェアなどは、8ビットや16ビットといった、8ビットを単位として処理を行うことを前提に設計されているため、10ビットなど8ビットの倍数ではないビット幅のデータを効率的に扱うためには、工夫が必要となる。   That is, for example, when attribute information having a bit width of 2 bits is added to image information having a bit width of 8 bits, the bit width of the extended image becomes 10 bits. However, since general hardware is designed on the assumption that processing is performed in units of 8 bits such as 8 bits and 16 bits, data having a bit width that is not a multiple of 8 bits such as 10 bits is efficiently used. In order to handle it efficiently, a device is required.

また、画像情報に属性情報を付加した拡張画像を扱う場合、特に、予測符号化を行う場合に問題が発生するおそれがある。すなわち、属性情報のビットを画素データの下位ビットに対して付加した場合、なだらかな画像であっても、画像の属性が変わらない限り当該画素データにおける属性情報部分である下位ビットの値は変わらないことになる。そのため、当該画素データの変化が最低でも2ビット単位の変化となり、平面予測方式などの予測がうまく機能しないことが想定される。   Further, when an extended image in which attribute information is added to image information is handled, a problem may occur particularly when predictive encoding is performed. That is, when bits of attribute information are added to lower bits of pixel data, even if the image is gentle, the value of the lower bits that are the attribute information part in the pixel data does not change unless the attributes of the image change. It will be. Therefore, it is assumed that the change of the pixel data is a change of 2 bits at least, and prediction such as the planar prediction method does not work well.

一方、属性情報のビットを画素データの上位ビットに付加することも考えられる。この場合、画像の属性値が変化しなければ、平面予測方式などの予測がうまく機能すると考えられる。しかしながら、画像の属性値が変化した場合は、画素データが、画素データ分の例えば8ビット単位で変化することになり、この場合においても、平面予測方式などの予測がうまく機能しないことが想定される。そのため、基本的に圧縮率を上げることが難しいと考えられる。   On the other hand, it is also conceivable to add a bit of attribute information to the upper bits of pixel data. In this case, if the attribute value of the image does not change, it is considered that prediction such as the plane prediction method works well. However, when the attribute value of the image changes, the pixel data changes, for example, in units of 8 bits corresponding to the pixel data. Even in this case, it is assumed that the prediction using the planar prediction method does not function well. The Therefore, it is considered difficult to increase the compression rate basically.

本発明は、上記に鑑みてなされたものであって、画素毎に属性情報を持つ画像データを効率的に圧縮符号化できる画像処理装置、画像処理方法およびプログラムを提供することにある。   The present invention has been made in view of the above, and it is an object of the present invention to provide an image processing apparatus, an image processing method, and a program that can efficiently compress and encode image data having attribute information for each pixel.

上述した課題を解決し、目的を達成するために、第1の発明は、画素データと画素データに対応する属性データとを符号化する画像処理装置であって、画素データに基づきランレングスを生成するランレングス生成手段と、ランレングス生成手段で生成されたランレングスと、属性データとを符号化する符号化手段と、画素データに対応する属性データの変化を検出する検出手段とを有し、符号化手段は、検出手段で属性データの変化が検出された場合に、ランレングス生成手段により生成されたランレングスを符号化すると共にランレングスの初期化を行い、変化後の属性データを示す符号と符号化されたランレングスとを1の符号列で出力することを特徴とする。   In order to solve the above-described problems and achieve the object, the first invention is an image processing apparatus that encodes pixel data and attribute data corresponding to the pixel data, and generates a run length based on the pixel data. A run length generating means, an encoding means for encoding the run length generated by the run length generating means, and attribute data; and a detecting means for detecting a change in attribute data corresponding to the pixel data, The encoding unit encodes the run length generated by the run length generation unit and initializes the run length when a change in the attribute data is detected by the detection unit, and encodes the attribute data after the change. And the encoded run length are output as one code string.

また、第2の発明は、画素データと画素データに対応する属性データとを符号化する画像処理方法であって、画素データに基づきランレングスを生成するランレングス生成ステップと、ランレングス生成ステップにより生成されたランレングスと、属性データとを符号化する符号化ステップと、画素データに対応する属性データの変化を検出する検出ステップとを有し、符号化ステップは、検出ステップにより属性データの変化が検出された場合に、ランレングス生成ステップにより生成されたランレングスを符号化すると共にランレングスの初期化を行い、変化後の属性データを示す符号と符号化されたランレングスとを1の符号列で出力することを特徴とする。   The second invention is an image processing method for encoding pixel data and attribute data corresponding to the pixel data, and includes a run length generation step for generating a run length based on the pixel data, and a run length generation step. An encoding step for encoding the generated run length and attribute data; and a detection step for detecting a change in attribute data corresponding to the pixel data. The encoding step includes a change in attribute data by the detection step. Is detected, the run length generated in the run length generation step is encoded and the run length is initialized, and the code indicating the changed attribute data and the encoded run length are set as one code. It is characterized by outputting in columns.

また、第3の発明は、画素データに基づき生成され、画素データに対応する属性データの変化に応じて符号化されたランレングスと、変化後の属性データを示す符号とが1の符号列に含まれる符号データを復号する画像処理装置であって、符号データに基づき画素データとランレングスと属性データとをそれぞれ求める符号処理手段と、符号処理手段で求められたランレングスが示す長さだけ、符号処理手段で求められた画素データを出力する画素データ出力手段と、符号処理手段で求められたランレングスが示す長さだけ、画素データ出力手段と同期的に、符号処理手段で求められた属性データを出力する属性データ出力手段とを有することを特徴とする。   In the third invention, a run length generated based on pixel data and encoded in accordance with a change in attribute data corresponding to the pixel data, and a code indicating the changed attribute data in one code string An image processing apparatus that decodes included code data, a code processing unit that obtains pixel data, a run length, and attribute data based on the code data, and a length indicated by a run length obtained by the code processing unit, The pixel data output means for outputting the pixel data obtained by the code processing means and the attribute obtained by the code processing means synchronously with the pixel data output means for the length indicated by the run length obtained by the code processing means. And attribute data output means for outputting data.

また、第4の発明は、画素データに基づき生成され、画素データに対応する属性データの変化に応じて符号化されたランレングスと、変化後の属性データを示す符号とが1の符号列に含まれる符号データを復号する画像処理方法であって、符号データに基づき画素データとランレングスと属性データとをそれぞれ求める符号処理ステップと、符号処理ステップにより求められたランレングスが示す長さだけ、符号処理手段で求められた画素データを出力する画素データ出力ステップと、符号処理ステップにより求められたランレングスが示す長さだけ、画素データ出力ステップによる画素データの出力と同期的に、符号処理ステップにより求められた属性データを出力する属性データ出力ステップとを有することを特徴とする。   According to a fourth aspect of the present invention, a run length generated based on pixel data and encoded in accordance with a change in attribute data corresponding to the pixel data, and a code indicating the changed attribute data in one code string An image processing method for decoding the included code data, a code processing step for obtaining pixel data, run length, and attribute data based on the code data, and a length indicated by the run length obtained by the code processing step, A pixel data output step for outputting pixel data obtained by the code processing means, and a code processing step in synchronism with the output of the pixel data by the pixel data output step by the length indicated by the run length obtained by the code processing step. And an attribute data output step for outputting the attribute data obtained by the above.

第1および第2の発明によれば、画素データに基づきランレングスを生成したランレングスと、画素データに対応する属性データとを符号化する際に、画素データに対応する属性データの変化が検出された場合に、生成されたランレングスを符号化すると共にランレングスの初期化を行い、変化後の属性データを示す符号と符号化されたランレングスとを1の符号列で出力するようにしているため、画素毎に属性情報を持つ画像データを効率的に圧縮符号化することができるという効果を奏する。   According to the first and second aspects of the present invention, when the run length generated based on the pixel data and the attribute data corresponding to the pixel data are encoded, a change in the attribute data corresponding to the pixel data is detected. If the generated run length is encoded, the run length is initialized and the code indicating the changed attribute data and the encoded run length are output as one code string. Therefore, the image data having attribute information for each pixel can be efficiently compressed and encoded.

第3および第4の発明によれば、符号データに基づき画素データとランレングスと属性データとをそれぞれ求め、ランレングスが示す長さだけ、画素データを出力すると共に、ランレングスが示す長さだけ、画素データの出力と同期的に、属性データを出力するようにしているため、画素データに基づき生成され、画素データに対応する属性データの変化に応じて符号化されたランレングスと、変化後の属性データを示す符号とが1の符号列に含まれる符号データを復号することができるという効果を奏する。   According to the third and fourth aspects, the pixel data, the run length, and the attribute data are obtained based on the code data, and the pixel data is output for the length indicated by the run length, and the length indicated by the run length is determined. Since the attribute data is output synchronously with the output of the pixel data, the run length generated based on the pixel data and encoded in accordance with the change of the attribute data corresponding to the pixel data, and the post-change There is an effect that it is possible to decode the code data included in the code string having one code indicating the attribute data.

図1は、この発明の実施形態による画像処理装置を適用可能な画像形成装置の機構部の構成例を示す略線図である。FIG. 1 is a schematic diagram illustrating a configuration example of a mechanism unit of an image forming apparatus to which an image processing apparatus according to an embodiment of the present invention can be applied. 図2は、伝送・制御装置の一例の構成を示すブロック図である。FIG. 2 is a block diagram illustrating an exemplary configuration of the transmission / control apparatus. 図3−1は、メインメモリにおけるCMYKAバンドデータ領域の一例のフォーマットを示す略線図である。FIG. 3A is a schematic diagram illustrating an exemplary format of the CMYKA band data area in the main memory. 図3−2は、メインメモリにおけるCMYKAバンドデータ領域の一例のフォーマットを示す略線図である。FIG. 3B is a schematic diagram illustrating an exemplary format of the CMYKA band data area in the main memory. 図4−1は、CMYK各版によるCMYK画像と属性情報とについてより具体的に説明するための略線図である。FIG. 4A is a schematic diagram for specifically explaining the CMYK image and attribute information of each version of CMYK. 図4−2は、CMYK各版によるCMYK画像と属性情報とについてより具体的に説明するための略線図である。FIG. 4B is a schematic diagram for specifically explaining the CMYK image and attribute information of each version of CMYK. 図4−3は、CMYK各版によるCMYK画像と属性情報とについてより具体的に説明するための略線図である。FIG. 4C is a schematic diagram for specifically explaining the CMYK image and the attribute information according to each version of CMYK. 図4−4は、CMYK各版によるCMYK画像と属性情報とについてより具体的に説明するための略線図である。FIG. 4-4 is a schematic diagram for specifically explaining the CMYK image and attribute information of each version of CMYK. 図4−5は、CMYK各版によるCMYK画像と属性情報とについてより具体的に説明するための略線図である。FIG. 4-5 is a schematic diagram for specifically explaining the CMYK image and attribute information of each version of CMYK. 図5は、上述した構成を有するカラープリンタにおける画像処理を概略的に示す一例のフローチャートである。FIG. 5 is a flowchart of an example schematically showing image processing in the color printer having the above-described configuration. 図6は、上述した構成を有するカラープリンタにおける符号化処理に関するデータフローの例を示す略線図である。FIG. 6 is a schematic diagram illustrating an example of a data flow related to encoding processing in the color printer having the above-described configuration. 図7は、上述した構成を有するカラープリンタにおける復号および印字処理に関するデータフローの例を示略線図である。FIG. 7 is a schematic diagram illustrating an example of a data flow regarding decoding and printing processing in the color printer having the above-described configuration. 図8は、バンドデータの符号化をCMYK各版毎に属性Aのバンドデータを織り込みながら行うことを説明するためのフローチャートである。FIG. 8 is a flowchart for explaining that band data encoding is performed while incorporating band data of attribute A for each version of CMYK. 図9は、1版分の復号および印字処理の例を示すフローチャートである。FIG. 9 is a flowchart illustrating an example of decoding and printing processing for one plate. 図10は、本発明の実施形態によるCMYK+A符号化部の動作を説明するための一例の機能ブロック図である。FIG. 10 is a functional block diagram illustrating an example of the operation of the CMYK + A encoding unit according to the embodiment of the present invention. 図11は、平面予測で用いる画素を説明するための略線図である。FIG. 11 is a schematic diagram for explaining pixels used in planar prediction. 図12−1は、符号フォーマット生成処理部で生成される符号の一例のフォーマットを示す略線図である。FIG. 12A is a schematic diagram illustrating a format of an example of a code generated by the code format generation processing unit. 図12−2は、符号フォーマット生成処理部で生成される符号の一例のフォーマットを示す略線図である。FIG. 12-2 is a schematic diagram illustrating a format of an example of a code generated by the code format generation processing unit. 図13−1は、予測誤差符号、PASS符号、属性符号およびランレングス符号の構成例を示す略線図である。FIG. 13A is a schematic diagram illustrating a configuration example of a prediction error code, a PASS code, an attribute code, and a run-length code. 図13−2は、予測誤差符号、PASS符号、属性符号およびランレングス符号の構成例を示す略線図である。FIG. 13-2 is a schematic diagram illustrating a configuration example of a prediction error code, a PASS code, an attribute code, and a run-length code. 図14は、CMYKA符号化部で行われる、本実施形態による符号化処理を示す一例のフローチャートである。FIG. 14 is a flowchart illustrating an example of encoding processing according to the present embodiment, which is performed by the CMYKA encoding unit. 図15−1は、本発明の実施形態による符号化処理の例について、より具体的に説明するための略線図である。FIG. 15A is a schematic diagram for specifically explaining an example of the encoding process according to the embodiment of the present invention. 図15−2は、本発明の実施形態による符号化処理の例について、より具体的に説明するための略線図である。FIG. 15-2 is a schematic diagram for specifically explaining an example of the encoding process according to the embodiment of the present invention. 図16−1は、本発明の実施形態による符号化処理の他の例について説明するための略線図である。FIG. 16A is a schematic diagram for explaining another example of the encoding process according to the embodiment of the present invention. 図16−2は、本発明の実施形態による符号化処理の他の例について説明するための略線図である。FIG. 16B is a schematic diagram for explaining another example of the encoding process according to the embodiment of the present invention. 図17は、本実施形態によるCMYKA符号化部の一例の構成を示すブロック図である。FIG. 17 is a block diagram illustrating an exemplary configuration of a CMYKA encoding unit according to the present embodiment. 図18は、本発明の実施形態によるC+A復号部7の動作を説明するための一例の機能ブロック図である。FIG. 18 is a functional block diagram illustrating an example of the operation of the C + A decoding unit 7 according to the embodiment of the present invention. 図19は、C+A復号部7で行われる、本実施形態の符号化処理により符号化された符号データに対する復号処理を示す一例のフローチャートである。FIG. 19 is a flowchart illustrating an example of a decoding process performed on the code data encoded by the encoding process according to the present embodiment, which is performed by the C + A decoding unit 7. 図20は、本発明の実施形態によるC+A復号部7の一例の構成を示すブロック図である。FIG. 20 is a block diagram showing an example of the configuration of the C + A decoding unit 7 according to the embodiment of the present invention. 図21−1は、従来技術による属性値の符号化を説明するための略線図である。FIG. 21A is a schematic diagram for explaining encoding of attribute values according to the conventional technique. 図21−2は、従来技術による属性値の符号化を説明するための略線図である。FIG. 21B is a schematic diagram for explaining encoding of attribute values according to the conventional technique. 図22−1は、従来技術による属性値の符号化を説明するための略線図である。FIG. 22-1 is a schematic diagram for explaining encoding of attribute values according to the prior art. 図22−2は、従来技術による属性値の符号化を説明するための略線図である。FIG. 22-2 is a schematic diagram for explaining encoding of attribute values according to the prior art.

以下に添付図面を参照して、本発明に係る画像処理装置の最良な実施形態を詳細に説明する。先ず、本発明による画像処理を概念的に説明する。本発明では、画素データの符号化を、予測符号化とランレングス符号化とを用いて行う。ランレングスの生成の際に、属性データの変化を検出し、属性データの変化点で画素データのランレングス値を終端させてランレングス値を符号化し、符号化されたランレングス値と属性データを示す符号とを1の符号列に対して出力する。画素データと属性データとを1本の符号列で構成でき、復号時に用いるDMACがCMYK各版それぞれに付き1個で済む。また、属性データのランレングス符号が不要なので、より高い圧縮効率が期待できる。   Exemplary embodiments of an image processing apparatus according to the present invention will be described below in detail with reference to the accompanying drawings. First, the image processing according to the present invention will be conceptually described. In the present invention, encoding of pixel data is performed using predictive encoding and run-length encoding. When the run length is generated, a change in the attribute data is detected, the run length value of the pixel data is terminated at the change point of the attribute data, the run length value is encoded, and the encoded run length value and the attribute data are encoded. Are output for one code string. Pixel data and attribute data can be composed of one code string, and only one DMAC for decoding is required for each version of CMYK. In addition, since the run-length code of attribute data is unnecessary, higher compression efficiency can be expected.

<本実施形態に適用可能な画像処理装置の構成>
次に、この発明に係る画像処理装置の最良な実施形態を詳細に説明する。図1は、この発明の実施形態による画像処理装置を適用可能な画像形成装置(カラープリンタとする)の機構部の構成例を示す。なお、本実施形態では、本発明に係る画像処理装置および画像処理方法をカラープリンタである画像形成装置に適用した例について説明するが、文字画像を含む画像に画像処理を施すものであれば、これに限定するものではない。例えば、本発明は、複写機、ファクシミリ、複合機などの画像処理装置にも適用することができる。
<Configuration of image processing apparatus applicable to this embodiment>
Next, the best embodiment of the image processing apparatus according to the present invention will be described in detail. FIG. 1 shows an example of the structure of a mechanism part of an image forming apparatus (referred to as a color printer) to which an image processing apparatus according to an embodiment of the present invention can be applied. In this embodiment, an example in which the image processing apparatus and the image processing method according to the present invention are applied to an image forming apparatus that is a color printer will be described. However, as long as image processing is performed on an image including a character image, However, the present invention is not limited to this. For example, the present invention can be applied to an image processing apparatus such as a copying machine, a facsimile machine, and a multifunction machine.

図1に例示されるカラープリンタ100は、4色(Y、M、C、K)の画像をそれぞれ独立の作像系1Y、1M、1C、1Kで形成し、この4色の画像を合成する4ドラムタンデムエンジンタイプの画像形成装置である。各作像系1Y、1M、1C、1Kは、像担持体としての感光体、例えば小径のOPC(有機感光体)ドラム2Y、2M、2C、2Kを有し、このOPCドラム2Y、2M、2C、2Kを取り囲むように作像の上流側から帯電手段としての帯電ローラ3Y、3M、3C、3Kと、OPCドラム2Y、2M、2C、2K上の静電潜像をそれぞれ現像剤で現像してY、M、C、K各色のトナー像とする現像装置4Y、4M、4C、4Kと、クリーニング装置5Y、5M、5C、5Kと、除電装置6Y、6M、6C、6Kなどが配置されている。   A color printer 100 illustrated in FIG. 1 forms images of four colors (Y, M, C, K) by independent image forming systems 1Y, 1M, 1C, and 1K, and synthesizes these four color images. This is a 4-drum tandem engine type image forming apparatus. Each of the image forming systems 1Y, 1M, 1C, and 1K includes a photoconductor as an image carrier, for example, small-diameter OPC (organic photoconductor) drums 2Y, 2M, 2C, and 2K, and the OPC drums 2Y, 2M, and 2C. The electrostatic latent images on the charging rollers 3Y, 3M, 3C, and 3K as charging means and the OPC drums 2Y, 2M, 2C, and 2K are developed with a developer from the upstream side of image formation so as to surround 2K. Developing devices 4Y, 4M, 4C, and 4K that generate toner images of Y, M, C, and K colors, cleaning devices 5Y, 5M, 5C, and 5K, and static eliminating devices 6Y, 6M, 6C, and 6K are arranged. .

各現像装置4Y、4M、4C、4Kの脇には、Yトナー、Mトナー、Cトナー、Kトナーをそれぞれ現像装置4Y、4M、4C、4Kへ補給するトナーボトルユニット7Y、7M、7C、7K(が配置されている。また、各作像系1Y、1M、1C、1Kは各々独立な光書き込み装置8Y、8M、8C、8Kが配置され、この光書き込み装置8Y、8M、8C、8Kはレーザ光源としてのレーザダイオード(LD)光源9Y、9M、9C、9Kや、コリメートレンズ10Y、10M、10C、10K、fθレンズ11Y、11M、11C、11K、といった光学部品、偏向走査手段としてのポリゴンミラー12Y、12M、12C、12K、折り返しミラー13Y、13M、13C、13K、14Y、14M、14C、14Kなどを有する。   Beside each developing device 4Y, 4M, 4C, 4K, toner bottle units 7Y, 7M, 7C, 7K for supplying Y toner, M toner, C toner, K toner to the developing devices 4Y, 4M, 4C, 4K, respectively. (The image forming systems 1Y, 1M, 1C, and 1K are respectively provided with independent optical writing devices 8Y, 8M, 8C, and 8K. The optical writing devices 8Y, 8M, 8C, and 8K are Optical components such as laser diode (LD) light sources 9Y, 9M, 9C, and 9K as laser light sources, collimating lenses 10Y, 10M, 10C, and 10K, fθ lenses 11Y, 11M, 11C, and 11K, and polygon mirrors as deflection scanning means 12Y, 12M, 12C, and 12K, and folding mirrors 13Y, 13M, 13C, 13K, 14Y, 14M, 14C, and 14K.

各作像系1Y、1M、1C、1Kは垂直に配列され、その右側には転写ベルトユニット15がOPCドラム2Y、2M、2C、2Kに接する形で配置される。転写ベルトユニット15は、転写ベルト16がローラ17〜20に張架されて図示しない駆動源により回転駆動される。装置下側には転写材としての転写紙が収納された給紙トレイ21が配置され、装置上部に定着装置22、排紙ローラ23及び排紙トレイ24が配設される。   The image forming systems 1Y, 1M, 1C, and 1K are arranged vertically, and the transfer belt unit 15 is arranged on the right side so as to be in contact with the OPC drums 2Y, 2M, 2C, and 2K. The transfer belt unit 15 is rotationally driven by a drive source (not shown) with the transfer belt 16 stretched around rollers 17 to 20. A paper feed tray 21 storing transfer paper as a transfer material is disposed on the lower side of the apparatus, and a fixing device 22, a paper discharge roller 23, and a paper discharge tray 24 are disposed at the top of the apparatus.

作像時には、各作像系1Y、1M、1C、1Kにおいて、それぞれ、OPCドラム2Y、2M、2C、2Kが図示しない駆動源により回転駆動され、帯電ローラ3Y、3M、3C、3KによりOPCドラム2Y、2M、2C、2Kが一様に帯電されて光書き込み装置8Y、8M、8C、8Kが各色の画像データに基づきOPCドラム2Y、2M、2C、2Kに光書込みを行うことによって、OPCドラム2Y、2M、2C、2K上に静電潜像が形成される。   At the time of image formation, in each image forming system 1Y, 1M, 1C, 1K, the OPC drums 2Y, 2M, 2C, 2K are rotationally driven by a driving source (not shown), and the OPC drums by the charging rollers 3Y, 3M, 3C, 3K. The 2Y, 2M, 2C, and 2K are uniformly charged, and the optical writing devices 8Y, 8M, 8C, and 8K perform optical writing on the OPC drums 2Y, 2M, 2C, and 2K based on the image data of each color, so that the OPC drum Electrostatic latent images are formed on 2Y, 2M, 2C, and 2K.

このOPCドラム2Y、2M、2C、2K上の静電潜像はそれぞれ現像装置4Y、4M、4C、4Kにより現像されてY、M、C、K各色のトナー像となり、一方、給紙トレイ21から給紙ローラ25により転写紙が水平方向に給紙されて搬送系により作像系1Y、1M、1C、1K方向へ垂直に搬送される。この転写紙は、転写ベルト16に静電的に吸着保持されて転写ベルト16により搬送され、図示しない転写バイアス印加手段により転写バイアスが印加されてOPCドラム2Y、2M、2C、2K上のY、M、C、K各色のトナー像が順次に重ねて転写されることでフルカラー画像が形成される。このフルカラー画像が形成された転写紙は、定着装置22によりフルカラー画像が定着されて排紙ローラ23により排紙トレイ24へ排出される。   The electrostatic latent images on the OPC drums 2Y, 2M, 2C, and 2K are developed by developing devices 4Y, 4M, 4C, and 4K, respectively, to become toner images of colors Y, M, C, and K, while the paper feed tray 21 Then, the transfer paper is fed in the horizontal direction from the paper feed roller 25 and is conveyed vertically in the image forming systems 1Y, 1M, 1C and 1K by the transport system. This transfer paper is electrostatically held by the transfer belt 16 and conveyed by the transfer belt 16, and a transfer bias is applied by a transfer bias applying means (not shown), and Y on the OPC drums 2Y, 2M, 2C, 2K, A full color image is formed by sequentially superimposing and transferring toner images of M, C, and K colors. The transfer sheet on which the full-color image is formed is fixed to the full-color image by the fixing device 22 and is discharged to the discharge tray 24 by the discharge roller 23.

上述した、カラープリンタ100における各部の制御は、電装・制御装置26により行われる。   The control of each part in the color printer 100 described above is performed by the electrical / control device 26.

図2は、伝送・制御装置26の一例の構成を示すブロック図である。伝送・制御装置26は、制御部750、メインメモリ751、画像処理部752およびパネルコントロール部753を有する。   FIG. 2 is a block diagram illustrating an exemplary configuration of the transmission / control apparatus 26. The transmission / control apparatus 26 includes a control unit 750, a main memory 751, an image processing unit 752, and a panel control unit 753.

制御部750は、CPU701、CPU I/F702、メモリアービタ(ARB)703、メモリコントローラ704、DMAC(Direct Memory Access Controller)705、バスコントローラ706および通信コントローラ707を有する。メモリアービタ703に対して、CPU701がCPU I/F702を介して、バス734がバスコントローラ706を介して、また、メインメモリ751がメモリコントローラ704を介してそれぞれ接続される。メモリコントローラ704は、メインメモリ751に対するアクセスの制御を行う。さらに、メモリアービタ703に対して、DMAC705、通信コントローラ707およびROM(Read Only Memory)731が接続される。メモリアービタ703は、CPU701、DMAC705、通信コントローラ707およびバス734の、メインメモリ751に対するアクセスを調停する。   The control unit 750 includes a CPU 701, a CPU I / F 702, a memory arbiter (ARB) 703, a memory controller 704, a DMAC (Direct Memory Access Controller) 705, a bus controller 706, and a communication controller 707. The CPU 701 is connected to the memory arbiter 703 via the CPU I / F 702, the bus 734 is connected via the bus controller 706, and the main memory 751 is connected via the memory controller 704. The memory controller 704 controls access to the main memory 751. Further, a DMAC 705, a communication controller 707, and a ROM (Read Only Memory) 731 are connected to the memory arbiter 703. The memory arbiter 703 arbitrates access to the main memory 751 by the CPU 701, DMAC 705, communication controller 707, and bus 734.

CPU701は、CPU I/F702およびメモリアービタ703を介してROM731にアクセスし、ROM731に予め記憶されたプログラムを読み出して実行し、このカラープリンタ100の全体の動作を制御する。なお、ROM731は、CPU701に実行される各種のプログラムの他に、文字などのフォント情報が予め記憶される。   The CPU 701 accesses the ROM 731 via the CPU I / F 702 and the memory arbiter 703, reads and executes a program stored in advance in the ROM 731, and controls the overall operation of the color printer 100. The ROM 731 stores font information such as characters in advance in addition to various programs executed by the CPU 701.

通信コントローラ707は、ネットワーク761を介して行われる通信を制御する。例えば、コンピュータ760から出力されたPDL(Page Description Language)データは、ネットワーク761を介して通信コントローラ707により受信される。通信コントローラ707は、受信したPDLデータを、メモリアービタ703およびメモリコントローラ704を介してメインメモリ751に転送する。   The communication controller 707 controls communication performed via the network 761. For example, PDL (Page Description Language) data output from the computer 760 is received by the communication controller 707 via the network 761. The communication controller 707 transfers the received PDL data to the main memory 751 via the memory arbiter 703 and the memory controller 704.

なお、ネットワーク761は、LAN(Local Area Network)などの所定の範囲内で通信を行うものでもよいし、インターネットなどより広範囲に通信可能なものでもよい。また、ネットワーク761は、有線通信に限らず無線通信を用いたものでもよいし、USB(Universal Serial Bus)やIEEE(Institute Electrical and Electronics Engineers)1394といったシリアル通信を行うものでもよい。   Note that the network 761 may perform communication within a predetermined range such as a LAN (Local Area Network), or may be capable of communicating over a wider range than the Internet. The network 761 is not limited to wired communication but may be wireless communication, or serial communication such as USB (Universal Serial Bus) or IEEE (Institute Electrical and Electronics Engineers) 1394.

メインメモリ751は、CMYKAバンドデータ格納領域751Aとページ符号格納領域751Bとを有する。CMYKAバンドデータ格納領域751Aは、CMYK各版のバンドデータと、属性Aのバンドデータとが格納される。また、ページ符号格納領域751Bは、CMYK各版それぞれのバンドデータが属性Aのバンドデータを織り込まれて画素単位で符号化されたページ符号が格納される。   The main memory 751 has a CMYKA band data storage area 751A and a page code storage area 751B. The CMYKA band data storage area 751A stores CMYK version band data and attribute A band data. Further, the page code storage area 751B stores a page code obtained by encoding the band data of each version of CMYK into the band data of the attribute A and coding in pixel units.

また、図示は省略するが、メインメモリ751は、例えばコンピュータ760から供給されたPDL(Page Description Language)データを格納するPDLデータ格納領域をさらに有する。   Although not shown, the main memory 751 further has a PDL data storage area for storing PDL (Page Description Language) data supplied from the computer 760, for example.

例えば、CPU701は、コンピュータ760から供給されたPDLデータに基づき描画を行いCMYK版それぞれの多値バンドデータを生成すると共に、属性Aのバンドデータを生成する。生成されたCMYK版それぞれの多値バンドデータと、属性Aのバンドデータは、メモリアービタ4を介してメインメモリ751のCMYKAバンドデータ格納領域751Aに格納される。   For example, the CPU 701 performs drawing based on the PDL data supplied from the computer 760 to generate multi-value band data for each of the CMYK versions and also generate attribute A band data. The generated multi-value band data of each CMYK version and the band data of attribute A are stored in the CMYKA band data storage area 751A of the main memory 751 via the memory arbiter 4.

バスコントローラ706は、バス734に接続される各部の、バス734に対するアクセスの調停を行う。バス734に対して、制御部750が接続されると共に、画像処理部752およびパネルコントロール部753が接続される。   The bus controller 706 arbitrates access to the bus 734 by each unit connected to the bus 734. A control unit 750 is connected to the bus 734, and an image processing unit 752 and a panel control unit 753 are connected.

パネルコントロール部753は、例えばASIC(Application Specific Integrated Circuit)からなり、バスI/F729およびパネルコントロール部730を有する。パネルコントロール部730に対して、様々な操作子や表示素子が設けられた操作パネル737が接続される。パネルコントロール部730は、バスI/F729およびバス734を介して制御部750と通信を行い、操作パネル737に対してなされたユーザ操作に応じた制御信号を制御部750に送信したり、CPU701により生成され制御部750より送信された表示制御信号に基づき操作パネル737に設けられた表示素子の駆動を行う。   The panel control unit 753 is made of, for example, an ASIC (Application Specific Integrated Circuit), and includes a bus I / F 729 and a panel control unit 730. An operation panel 737 provided with various operators and display elements is connected to the panel control unit 730. The panel control unit 730 communicates with the control unit 750 via the bus I / F 729 and the bus 734, and transmits a control signal corresponding to a user operation performed on the operation panel 737 to the control unit 750, or by the CPU 701. Based on the display control signal generated and transmitted from the control unit 750, the display element provided in the operation panel 737 is driven.

画像処理部752は、例えばASICからなり、C版プリンタエンジン738、M版プリンタエンジン739、Y版プリンタエンジン740およびK版プリンタエンジン741に印字させる画像の画像処理を行う。   The image processing unit 752 is made of, for example, an ASIC, and performs image processing of an image to be printed by the C plate printer engine 738, the M plate printer engine 739, the Y plate printer engine 740, and the K plate printer engine 741.

画像処理部752において、バスアービタ708は、C+A版符号DMAC713、M+A版符号DMAC714、Y+A版符号DMAC715、K+A版符号DMAC716、CMYK版画像DMAC709、属性DMAC710およびCMYK+A版符号DMAC712が接続され、接続されたこれら各部のバス734に対する通信を調停する。   In the image processing unit 752, the bus arbiter 708 is connected to the C + A version code DMAC 713, the M + A version code DMAC 714, the Y + A version code DMAC 715, the K + A version code DMAC 716, the CMYK version image DMAC 709, the attribute DMAC 710, and the CMYK + A version code DMAC 712. The communication with the bus 734 of each unit is arbitrated.

CMYK版画像DMAC709は、バス734および制御部750を介してメインメモリ2のCMYKAバンドデータ格納領域751AからC版、M版、Y版およびK版のうち1つの版(C版とする)のバンドデータを読み出し、CMYK+A符号化部711に転送する。同様に、属性DMAC710は、バス734および制御部750を介してメインメモリ751のCMYKAバンドデータ格納領域751Aから属性Aのバンドデータを読み出し、CMYK+A符号化部711に転送する。   The CMYK image DMAC 709 is a band of one of the C, M, Y, and K plates (referred to as the C plate) from the CMYKA band data storage area 751A of the main memory 2 via the bus 734 and the control unit 750. Data is read and transferred to the CMYK + A encoding unit 711. Similarly, the attribute DMAC 710 reads the band data of attribute A from the CMYKA band data storage area 751A of the main memory 751 via the bus 734 and the control unit 750, and transfers it to the CMYK + A encoding unit 711.

CMYK+A符号化部711は、CMYK版画像DMAC709から転送された例えばC版のバンドデータと、属性DMAC710から転送された属性Aのバンドデータとを、後述する方法に従い符号化して1本の符号列を生成する。CMYK+A符号化部711で生成されたこの符号は、CMYK+A版符号DMAC712により、バス734および制御部750を介してメインメモリ751のページ符号格納領域751Bに格納される。   The CMYK + A encoding unit 711 encodes, for example, the band data of the C version transferred from the CMYK version image DMAC 709 and the band data of the attribute A transferred from the attribute DMAC 710 according to a method to be described later to form one code string. Generate. This code generated by the CMYK + A encoding unit 711 is stored in the page code storage area 751B of the main memory 751 by the CMYK + A version code DMAC 712 via the bus 734 and the control unit 750.

なお、以下では、C版のバンドデータと属性Aのバンドデータとから生成された符号を、C+A版バンド符号と呼ぶ。M版、Y版およびK版のバンドデータに関しても、同様にして、それぞれM+A版バンド符号、Y+A版バンド符号、K+A版バンド符号と呼ぶ。また、以下では、煩雑さを避けるため、特に説明のない限り、C版、M版、Y版およびK版それぞれについての処理を、C版の処理に代表させて説明する。   In the following description, a code generated from the C version band data and the attribute A band data is referred to as a C + A version band code. Similarly, the band data of the M, Y, and K plates are also referred to as the M + A plate band code, the Y + A plate band code, and the K + A plate band code, respectively. In the following, in order to avoid complications, the processing for each of the C plate, the M plate, the Y plate, and the K plate will be described as a representative of the processing of the C plate unless otherwise specified.

C+A版符号DMAC713は、バス734および制御部750を介してメインメモリ751のページ符号格納領域751BからC+A版バンド符号を読み出し、C+A復号部717に転送する。C+A復号部717は、転送されたC+A版バンド符号から、後述する方法によりC版の画像データと属性値とを復号し、C版階調処理部721に供給する。C版階調処理部721は、供給されたC版の画像データと属性値とに基づき、C版の画像データに対して階調処理を施してC版エンジンコントローラ725に供給する。C版エンジンコントローラ725は、供給されたC版画像データに基づきC版プリンタエンジン738を制御する。   The C + A version code DMAC 713 reads the C + A version band code from the page code storage area 751 </ b> B of the main memory 751 via the bus 734 and the control unit 750, and transfers it to the C + A decoding unit 717. The C + A decoding unit 717 decodes the C plane image data and the attribute value from the transferred C + A plane band code by a method described later, and supplies the decoded data to the C plane gradation processing unit 721. The C plane gradation processing unit 721 performs gradation processing on the C plane image data based on the supplied C plane image data and attribute values, and supplies the processed data to the C plane engine controller 725. The C plane engine controller 725 controls the C plane printer engine 738 based on the supplied C plane image data.

M+A版バンド符号、Y+A版バンド符号およびK+A版バンド符号についても、上述のC+A版バンド符号と同様の処理がなされる。すなわち、M+A版符号DMAC714は、メインメモリ751のページ符号格納領域751BからM+A版バンド符号を読み出し、M+A復号部718に転送する。M+A復号部718は、転送されたM+A版バンド符号からM版の画像データと属性値とを復号し、M版階調処理部722に供給する。M版階調処理部722は、供給されたM版の画像データと属性値とに基づき、M版の画像データに対して階調処理を施してM版エンジンコントローラ726に供給する。M版エンジンコントローラ726は、供給されたM版画像データに基づきM版プリンタエンジン739を制御する。   For the M + A version band code, the Y + A version band code, and the K + A version band code, the same processing as that of the C + A version band code is performed. That is, the M + A version code DMAC 714 reads the M + A version band code from the page code storage area 751 B of the main memory 751 and transfers it to the M + A decoding unit 718. The M + A decoding unit 718 decodes the M plate image data and the attribute value from the transferred M + A plate band code, and supplies the decoded image data to the M plate gradation processing unit 722. The M plate gradation processing unit 722 performs gradation processing on the M plate image data based on the supplied M plate image data and attribute values, and supplies the processed image data to the M plate engine controller 726. The M plane engine controller 726 controls the M plane printer engine 739 based on the supplied M plane image data.

Y+A版符号DMAC715は、メインメモリ751のページ符号格納領域751BからY+A版バンド符号を読み出し、Y+A復号部719に転送する。Y+A復号部719は、転送されたY+A版バンド符号からY版の画像データと属性値とを復号し、Y版階調処理部723に供給する。Y版階調処理部723は、供給されたY版の画像データと属性値とに基づき、Y版の画像データに対して階調処理を施してY版エンジンコントローラ727に供給する。Y版エンジンコントローラ727は、供給されたY版画像データに基づきY版プリンタエンジン740を制御する。   The Y + A version code DMAC 715 reads the Y + A version band code from the page code storage area 751B of the main memory 751 and transfers it to the Y + A decoding unit 719. The Y + A decoding unit 719 decodes the Y plane image data and attribute values from the transferred Y + A plane band code, and supplies the decoded data to the Y plane gradation processing unit 723. The Y plane gradation processing unit 723 performs gradation processing on the Y plane image data based on the supplied Y plane image data and attribute values, and supplies the processed data to the Y plane engine controller 727. The Y plane engine controller 727 controls the Y plane printer engine 740 based on the supplied Y plane image data.

K+A版符号DMAC716は、メインメモリ751のページ符号格納領域751BからK+A版バンド符号を読み出し、K+A復号部720に転送する。K+A復号部720は、転送されたK+A版バンド符号からK版の画像データと属性値とを復号し、K版階調処理部724に供給する。K版階調処理部724は、供給されたK版の画像データと属性値とに基づき、K版の画像データに対して階調処理を施してK版エンジンコントローラ728に供給する。K版エンジンコントローラ728は、供給されたK版画像データに基づきK版プリンタエンジン741を制御する。   The K + A version code DMAC 716 reads the K + A version band code from the page code storage area 751B of the main memory 751 and transfers it to the K + A decoding unit 720. The K + A decoding unit 720 decodes the K plate image data and the attribute value from the transferred K + A plate band code, and supplies the decoded data to the K plate gradation processing unit 724. The K plate gradation processing unit 724 performs gradation processing on the K plate image data based on the supplied K plate image data and attribute values, and supplies the processed data to the K plate engine controller 728. The K plate engine controller 728 controls the K plate printer engine 741 based on the supplied K plate image data.

図3は、メインメモリ751におけるCMYKAバンドデータ格納領域751Aの一例のフォーマットを示す。図3−1に例示されるように、CMYKAバンドデータ格納領域751Aは、C版、M版、Y版およびK版の各版毎のプレーン構成とされ、各画素に対してそれぞれ8ビットが割り当てられる。すなわち、CMYKバンドデータは、各画素がそれぞれ8ビットのビット深度を持つ多値プレーン画像となっている。   FIG. 3 shows an exemplary format of the CMYKA band data storage area 751A in the main memory 751. As illustrated in FIG. 3-1, the CMYKA band data storage area 751A has a plane configuration for each of the C, M, Y, and K plates, and 8 bits are allocated to each pixel. It is done. That is, the CMYK band data is a multi-value plane image in which each pixel has a bit depth of 8 bits.

また、属性Aは、図3−2に例示されるように、8ビットのうち2ビットを用いて、C版、M版、Y版およびK版に共通の属性を示す属性情報が画素毎に対応付けられて格納される。図3−2の例では、属性情報を示す2ビットの値(属性値と呼ぶ)が「00」で、対応する画素が下地属性を有することが示される。同様に、属性値が「01」、「10」および「11」で、対応する画素がそれぞれグラフィクス属性、文字属性および写真属性を持っていることが示される。   As shown in FIG. 3-2, the attribute A uses 2 bits out of 8 bits, and attribute information indicating attributes common to the C, M, Y, and K plates is displayed for each pixel. Stored in association. In the example of FIG. 3B, a 2-bit value (referred to as an attribute value) indicating attribute information is “00”, indicating that the corresponding pixel has a background attribute. Similarly, the attribute values “01”, “10”, and “11” indicate that the corresponding pixels have a graphics attribute, a character attribute, and a photo attribute, respectively.

図4を用いて、CMYK各版によるCMYK画像と属性情報とについてより具体的に説明する。図4−1は、CMYK画像データによるCMYK画像の例を示す。この例では、CMYK画像は、写真画像と、文字と、グラフィクス画像とが混在して配置されている。図4−2は、図4−1に示したCMYK画像における写真画像の属性を持った領域を示す。図4−3は、図4−1に示したCMYK画像における文字の属性を持った領域を示す。また、図4−4は、図4−1に示したCMYK画像におけるグラフィクス画像の属性を持った領域を示す。一方、図4−5は、図4−1のCMYK画像に対応する属性情報の例を概念的に示す。属性情報は、図4−2〜図4−4に例示した各属性による領域について、例えば互いに排他的に設定される。   The CMYK image and attribute information of each CMYK plate will be described more specifically with reference to FIG. FIG. 4A illustrates an example of a CMYK image based on CMYK image data. In this example, the CMYK image is a mixture of photographic images, characters, and graphics images. FIG. 4B illustrates an area having the attribute of a photographic image in the CMYK image illustrated in FIG. FIG. 4C illustrates an area having character attributes in the CMYK image illustrated in FIG. FIG. 4-4 illustrates an area having graphics image attributes in the CMYK image illustrated in FIG. 4-5 conceptually shows an example of attribute information corresponding to the CMYK image of FIG. 4-1. The attribute information is set, for example, exclusively for the areas based on the attributes exemplified in FIGS. 4-2 to 4-4.

<本実施形態に適用可能な画像処理の概略>
図5は、上述した構成を有するカラープリンタ100における画像処理を概略的に示す一例のフローチャートである。また、図6は、図5のフローチャートにおける符号化処理に関するデータフローの例を示す。同様に、図7は、図5のフローチャートにおける復号および印字処理に関するデータフローの例を示す。
<Outline of image processing applicable to this embodiment>
FIG. 5 is a flowchart of an example schematically illustrating image processing in the color printer 100 having the above-described configuration. FIG. 6 shows an example of a data flow related to the encoding process in the flowchart of FIG. Similarly, FIG. 7 shows an example of a data flow related to the decoding and printing processing in the flowchart of FIG.

例えばコンピュータ760で生成されたPDLデータがネットワーク761を介して通信コントローラ707に受信され、メインメモリ751のPDLデータ格納領域(図示しない)に記憶される(ステップS1)。CPU701は、メインメモリ751のPDLデータ格納領域からPDLデータを読み出し、PDLを解析して(ステップS2)、解析結果に基づきCMYK各版および属性Aのバンド画像をプレーン単位で描画する(ステップS3)。   For example, PDL data generated by the computer 760 is received by the communication controller 707 via the network 761 and stored in a PDL data storage area (not shown) of the main memory 751 (step S1). The CPU 701 reads PDL data from the PDL data storage area of the main memory 751, analyzes the PDL (step S2), and draws CMYK plates and attribute A band images in units of planes based on the analysis result (step S3). .

描画されたCMYK各版および属性Aのバンド画像によるCMYKAバンドデータは、次のステップS4で、メモリアービタ703を介してメモリコントローラ704に転送され、メモリコントローラ704の制御により、メインメモリ751のCMYKバンドデータ格納領域751Aに格納される(図6の経路A)。このCMYKAバンドデータは、上述したように、各画素が8ビットのビット深度を持つ多値プレーン画像データと、8ビットのうち2ビットを用いた各画素に対応した属性情報とからなる。   The drawn CMYKA band data based on the drawn CMYK plates and the band image of attribute A is transferred to the memory controller 704 via the memory arbiter 703 in the next step S4, and controlled by the memory controller 704, the CMYK band of the main memory 751. It is stored in the data storage area 751A (path A in FIG. 6). As described above, the CMYKA band data includes multi-value plane image data in which each pixel has a bit depth of 8 bits, and attribute information corresponding to each pixel using 2 bits out of 8 bits.

CMYK版画像DMAC709は、バス734を介してCMYKAバンドデータ格納領域751AからCMYKバンドデータを読み出して、CMYK+A符号化部711に転送する(図6の経路B)。なお、詳細は後述するが、CMYK版画像DMAC709は、CMYKAバンドデータ格納領域751Aから1つの版のバンドデータ(図6の例ではC版)を読み出して、CMYKA符号化部11に転送する。また、属性DMAC710は、バス734を介してCMYKAバンドデータ格納領域751Aから属性Aのバンドデータを読み出して、CMYKA符号化部11に転送する(図6の経路C)。CMYK+A符号化部711は、転送されたCMYKバンドデータと、属性Aのバンドデータとを本発明による符号化方法に従い符号化する(ステップS5)。   The CMYK version image DMAC 709 reads the CMYK band data from the CMYKA band data storage area 751A via the bus 734, and transfers the data to the CMYK + A encoding unit 711 (path B in FIG. 6). Although details will be described later, the CMYK version image DMAC 709 reads one version of band data (C version in the example of FIG. 6) from the CMYKA band data storage area 751A and transfers it to the CMYKA encoding unit 11. Further, the attribute DMAC 710 reads the band data of attribute A from the CMYKA band data storage area 751A via the bus 734, and transfers it to the CMYKA encoding unit 11 (path C in FIG. 6). The CMYK + A encoding unit 711 encodes the transferred CMYK band data and attribute A band data according to the encoding method of the present invention (step S5).

CMYKバンドデータと属性Aのバンドデータとが符号化された符号データは、次のステップS6で、バス734を介してメインメモリ751に供給され、メモリコントローラ704の制御によりページ符号格納領域751BにCMYK各版毎に格納される(図6の経路D)。   Code data obtained by encoding the CMYK band data and the attribute A band data is supplied to the main memory 751 via the bus 734 in the next step S6, and is controlled by the memory controller 704 in the page code storage area 751B. Stored for each version (path D in FIG. 6).

以下、復号時の処理について、C版のデータについて説明を行う。なお、M版、Y版およびK版の各データについても、以下に説明するC版のデータと同様の処理が、当該C版のデータに対する処理に続けて順次、行われる。   Hereinafter, the C version data will be described for the decryption process. For each of the M, Y, and K data, the same processing as the C data described below is sequentially performed following the processing for the C data.

C+A版符号DMAC713は、バス734を介してページ符号格納領域751BからC+A版バンド符号を読み出して、C+A復号部717に転送する(図7の経路E)。C+A復号部717は、転送されたC+A版バンド符号をC版の画像データと属性値とに復号し、図7の経路Fに従いC版階調処理部721に転送する(ステップS7)。C版階調処理部721は、C+A復号部717から転送されたC版の画像データと属性値とに基づきC版の画像データに対して階調処理を施す(ステップS8)。階調処理されたC版の画像データは、図7の経路Gに従いC版エンジンコントローラ725に供給される(ステップS9)。C版プリンタエンジン738は、経路Hにより供給されたC版の画像データに基づき印字を行う。   The C + A version code DMAC 713 reads the C + A version band code from the page code storage area 751B via the bus 734, and transfers it to the C + A decoding unit 717 (path E in FIG. 7). The C + A decoding unit 717 decodes the transferred C + A plane band code into C plane image data and attribute values, and transfers them to the C plane gradation processing unit 721 according to the path F in FIG. 7 (step S7). The C plate gradation processing unit 721 performs gradation processing on the C plate image data based on the C plate image data and the attribute value transferred from the C + A decoding unit 717 (step S8). The gradation-processed C plane image data is supplied to the C plane engine controller 725 along the path G in FIG. 7 (step S9). The C plate printer engine 738 performs printing based on the C plate image data supplied through the path H.

上述したように、CMYKAバンドデータ格納領域751Aに格納されたバンドデータの符号化は、CMYK各版毎に属性Aのバンドデータを織り込みながら行う。この点について、図8のフローチャートを用いて説明する。先ず、ステップS10で、CPU701によりCMYKバンドデータおよび属性Aのバンドデータがプレーン単位で描画される。描画されたCMYKバンドデータおよび属性Aのバンドデータは、メインメモリ751のCMYKバンドデータ格納領域751Aに格納される。   As described above, the encoding of the band data stored in the CMYKA band data storage area 751A is performed while incorporating the band data of the attribute A for each version of CMYK. This point will be described with reference to the flowchart of FIG. First, in step S10, the CPU 701 draws CMYK band data and attribute A band data in units of planes. The drawn CMYK band data and attribute A band data are stored in the CMYK band data storage area 751A of the main memory 751.

次のステップS11で、CMYK版画像DMAC709は、CMYKAバンドデータ格納領域751Aから、C版のバンドデータと属性Aのバンドデータとを読み出し、CMYK+A符号部711に転送する。CMYK+A符号部711は、転送されたC版のバンドデータと属性Aのバンドデータとを符号化する。C版のバンドデータと属性Aのバンドデータとが符号化されたC+A版バンド符号は、メインメモリ751のページ符号格納領域751Bに格納される。   In the next step S <b> 11, the CMYK plane image DMAC 709 reads the C plane band data and the attribute A band data from the CMYKA band data storage area 751 </ b> A and transfers them to the CMYK + A encoding unit 711. The CMYK + A encoding unit 711 encodes the transferred C band data and attribute A band data. The C + A version band code obtained by encoding the C version band data and the attribute A band data is stored in the page code storage area 751B of the main memory 751.

以降、ステップS12〜ステップS14で、M版〜K版のバンドデータと属性Aのバンドデータとがそれぞれ同様にして符号化される。すなわち、ステップS12で、M版のバンドデータと属性Aのバンドデータとが、CMYKAバンドデータ格納領域751AからCMYK版画像DMAC709により読み出され、CMYK+A符号部711に転送されて符号化される。M版のバンドデータと属性Aのバンドデータとが符号化されたM+A版バンド符号は、メインメモリ751のページ符号格納領域751Bに格納される。   Thereafter, in steps S12 to S14, the band data of M plate to K plate and the band data of attribute A are encoded in the same manner. That is, in step S12, the M plane band data and the attribute A band data are read from the CMYKA band data storage area 751A by the CMYK plane image DMAC 709, transferred to the CMYK + A encoding unit 711, and encoded. The M + A version band code obtained by encoding the M version band data and the attribute A band data is stored in the page code storage area 751B of the main memory 751.

同様に、次のステップS13で、Y版のバンドデータと属性Aのバンドデータとが、CMYKAバンドデータ格納領域751AからCMYK版画像DMAC709により読み出され、CMYK+A符号部711に転送されて符号化される。Y版のバンドデータと属性Aのバンドデータとが符号化されたY+A版バンド符号は、メインメモリ751のページ符号格納領域751Bに格納される。   Similarly, in the next step S13, the Y plane band data and the attribute A band data are read from the CMYKA band data storage area 751A by the CMYK plane image DMAC 709, transferred to the CMYK + A encoding unit 711, and encoded. The The Y + A version band code obtained by encoding the Y version band data and the attribute A band data is stored in the page code storage area 751B of the main memory 751.

さらに、次のステップS14で、K版のバンドデータと属性Aのバンドデータとが、CMYKAバンドデータ格納領域751AからCMYK版画像DMAC709により読み出され、CMYK+A符号部711に転送されて符号化される。K版のバンドデータと属性Aのバンドデータとが符号化されたK+A版バンド符号は、メインメモリ751のページ符号格納領域751Bに格納される。   Further, in the next step S14, the band data of the K plate and the band data of the attribute A are read from the CMYKA band data storage area 751A by the CMYK plate image DMAC 709, transferred to the CMYK + A encoding unit 711, and encoded. . The K + A version band code obtained by encoding the K version band data and the attribute A band data is stored in the page code storage area 751B of the main memory 751.

図9は、1版分(この例ではC版)の復号および印字処理の例を示すフローチャートである。ステップS20で、C+A版符号DMAC713は、C版のプリンタエンジン738と同期してページ符号格納領域751BからC+A版バンド符号を1つ読み出して、C+A復号部717に転送する。次のステップS21で、C+A復号部717は、C+A版符号DMAC713から転送されたC+A版バンド符号を復号してC版の画像データと属性値とを画素単位で得る。このC版の画像データおよび属性値は、C版階調処理部721に転送される。   FIG. 9 is a flowchart showing an example of decoding and printing processing for one plate (C plate in this example). In step S20, the C + A version code DMAC 713 reads one C + A version band code from the page code storage area 751B in synchronization with the C version printer engine 738, and transfers it to the C + A decoding unit 717. In the next step S21, the C + A decoding unit 717 decodes the C + A version band code transferred from the C + A version code DMAC 713 to obtain C version image data and attribute values in units of pixels. The C plane image data and attribute values are transferred to the C plane gradation processing unit 721.

C版階調処理部721は、C+A復号部717から転送されたC版の画像データに対して所定に階調処理を施す。このとき、C版階調処理部721は、C+A復号部717からC版の画像データと共に転送された属性値に応じて階調処理を切り替える。C版階調処理部721で階調処理されたC版の画像データは、C版エンジンコントローラ725に供給される。C版エンジンコントローラ725は、供給されたC版の画像データに応じてC版プリンタエンジン738を制御して、C版の印字を行う(ステップS23)。   The C plate gradation processing unit 721 performs predetermined gradation processing on the C plate image data transferred from the C + A decoding unit 717. At this time, the C plane gradation processing unit 721 switches gradation processing according to the attribute value transferred from the C + A decoding unit 717 together with the C plane image data. The C plane image data subjected to gradation processing by the C plane gradation processing unit 721 is supplied to the C plane engine controller 725. The C plate engine controller 725 controls the C plate printer engine 738 according to the supplied C plate image data to print the C plate (step S23).

次のステップS24で、C版の1バンド分の処理が終了したか否かが判定され、若し、終了していないと判定されたら、処理がステップS20に戻され、次の符号について同様の処理が繰り返される。一方、ステップS24で、C版の1バンド分の処理が終了したと判定されたら、一連の処理が終了され、次の版(例えばM版)の処理が、C版の場合と同様にして所定のタイミングで開始される。   In the next step S24, it is determined whether or not the processing for one band of the C plate has been completed. If it is determined that the processing has not been completed, the process returns to step S20, and the same processing is performed for the next code. The process is repeated. On the other hand, if it is determined in step S24 that the processing for one band of the C plate has been completed, a series of processing is ended, and the processing of the next plate (for example, the M plate) is performed in the same manner as in the case of the C plate. It starts at the timing of

このように、復号処理では、1つ符号を読み込み、版の画像データと属性値とを復号し、階調処理装置へ転送する。   In this way, in the decoding process, one code is read, the plate image data and the attribute value are decoded, and transferred to the gradation processing device.

<本発明の実施形態による符号化処理の概略>
図10は、本発明の実施形態によるCMYK+A符号化部711の動作を説明するための一例の機能ブロック図である。画像読み込み処理部200は、メインメモリ751のCMYKAバンドデータ格納領域751Aから、CMYKバンドデータを読み出す。この画像読み込み処理部200によるCMYKバンドデータの読み出しは、CMYK各版のそれぞれについて、スキャンライン毎に画素単位で行われる。画像読み込み処理部200は、読み出したバンドデータをラインメモリ制御処理部201に転送する。
<Outline of Encoding Processing According to Embodiment of the Present Invention>
FIG. 10 is a functional block diagram illustrating an example of the operation of the CMYK + A encoding unit 711 according to the embodiment of the present invention. The image reading processing unit 200 reads CMYK band data from the CMYKA band data storage area 751A of the main memory 751. The reading of the CMYK band data by the image reading processing unit 200 is performed in units of pixels for each scan line for each of the CMYK plates. The image reading processing unit 200 transfers the read band data to the line memory control processing unit 201.

ラインメモリ制御処理部201は、画像読み込み処理部200から転送されたバンドデータをラインメモリ202に格納する。ラインメモリ202は、少なくとも2ライン分のバンドデータを格納可能とされており、今回供給されたデータを格納すると共に、直前に格納した1ライン分のデータを保持するように、ラインメモリ制御部201に制御される。   The line memory control processing unit 201 stores the band data transferred from the image reading processing unit 200 in the line memory 202. The line memory 202 can store band data for at least two lines, stores the data supplied this time, and holds the data for one line stored immediately before. To be controlled.

例えば、ラインメモリ202は、それぞれ1ライン分の画素を格納可能な第1および第2の領域を有する。ラインメモリ制御処理部201は、例えば、1ライン分の画素データの符号化が終了する度に、符号化が終了した画素データを書き込み領域を第1および第2の領域間で切り替えるように、ラインメモリ202に対するアクセスを制御する。   For example, the line memory 202 has first and second areas each capable of storing pixels for one line. For example, the line memory control processing unit 201 sets the line so that the pixel data for which encoding has been completed is switched between the first and second areas every time encoding of pixel data for one line is completed. Controls access to the memory 202.

ラインメモリ制御処理部201は、ラインメモリ202から、符号化対象の画素(以下、注目画素と呼ぶ)の画素データと、注目画素の周辺3画素の画素データとを読み出す。ここで、ラインメモリ202から画素データが読み出される周辺3画素は、図11に例示されるように、注目画素のスキャン順で直前の画素a、ならびに、当該注目画素が属する現ラインに対してスキャン順で直前の前ライン(当該注目画素が属するラインの直上のライン)において当該注目画素の直上に位置する画素bおよび画素bのスキャン順で直前の画素cである。   The line memory control processing unit 201 reads out pixel data of a pixel to be encoded (hereinafter referred to as a target pixel) and pixel data of three pixels around the target pixel from the line memory 202. Here, the three neighboring pixels from which pixel data is read from the line memory 202 are scanned with respect to the immediately preceding pixel a in the scan order of the target pixel and the current line to which the target pixel belongs, as illustrated in FIG. The pixel b located immediately above the pixel of interest and the pixel c just before in the scan order of the pixel of interest in the immediately preceding previous line (the line immediately above the line to which the pixel of interest belongs).

ラインメモリ202から読み出された注目画素の周辺3画素a、bおよびcの画素データは、予測処理部203に転送される。また、ラインメモリ202から読み出された注目画素の画素データは、予測誤差処理部204に転送される。   Pixel data of the surrounding three pixels a, b, and c of the pixel of interest read from the line memory 202 is transferred to the prediction processing unit 203. The pixel data of the target pixel read from the line memory 202 is transferred to the prediction error processing unit 204.

予測処理部203は、ラインメモリ制御処理部201から転送された周辺画素の画素値に基づき、下記の式(1)に従い平面予測により予測値Pを算出し、注目画素の画素値を予測する。算出された予測値Pを示すデータは、予測誤差処理部204に転送される。
P=a+b−c …(1)
The prediction processing unit 203 calculates a predicted value P by plane prediction according to the following formula (1) based on the pixel values of the peripheral pixels transferred from the line memory control processing unit 201, and predicts the pixel value of the target pixel. Data indicating the calculated predicted value P is transferred to the prediction error processing unit 204.
P = a + b-c (1)

予測誤差処理部204は、予測処理部203から転送された予測値Pを示すデータと、ラインメモリ制御処理部201から転送された注目画素の画素データとに基づき、注目画素の画素値に対する予測値Pの誤差である予測誤差値を求める。この予測誤差値を示す予測誤差データは、注目画素の画素値を示す画素データと共にランレングス生成処理部205に転送される。   The prediction error processing unit 204 is based on the data indicating the prediction value P transferred from the prediction processing unit 203 and the pixel data of the target pixel transferred from the line memory control processing unit 201, and the predicted value for the pixel value of the target pixel A prediction error value that is an error of P is obtained. The prediction error data indicating the prediction error value is transferred to the run length generation processing unit 205 together with the pixel data indicating the pixel value of the target pixel.

一方、属性読み込み処理部206は、メインメモリ751のCMYKAバンドデータ格納領域751Aから、属性Aのバンドデータ(以下、属性データと呼ぶ)を読み出し、属性変化検出処理部207に転送する。この属性読み込み処理部206による属性データの読み出しは、上述の画像読み込み処理部200によるCMYKバンドデータの読み出しと画素単位で同期して行われる。   On the other hand, the attribute read processing unit 206 reads the attribute A band data (hereinafter referred to as attribute data) from the CMYKA band data storage area 751 A of the main memory 751 and transfers it to the attribute change detection processing unit 207. The reading of attribute data by the attribute reading processing unit 206 is performed in synchronism with the reading of CMYK band data by the image reading processing unit 200 described above in units of pixels.

属性変化検出処理部207は、属性読み込み処理部206から転送された属性データに示される属性値の変化を検出する。属性変化検出処理部207は、属性値の変化が検出されると、変化後の属性値を示す属性データをランレングス生成処理部205に転送する。   The attribute change detection processing unit 207 detects a change in the attribute value indicated in the attribute data transferred from the attribute read processing unit 206. When a change in the attribute value is detected, the attribute change detection processing unit 207 transfers attribute data indicating the attribute value after the change to the run length generation processing unit 205.

ランレングス生成処理部205は、予測誤差処理部204から転送された予測誤差データと、属性変化検出処理部207から転送された属性データとに基づきランレングスを生成する。より具体的には、ランレングス生成処理部205は、予測誤差データが示す予測誤差値が「0」である場合に、ランレングス値を1だけ増加させて予測誤差値が「0」の長さを計数することで、ランレングス値を生成する。一方、ランレングス生成処理部205は、予測誤差値が「0」以外の場合、予測誤差値を示す予測誤差データと、ランレングス値を示すランレングスデータとを、注目画素の画素値を示す画素データと共に符号フォーマット生成処理部208に転送する。   The run length generation processing unit 205 generates a run length based on the prediction error data transferred from the prediction error processing unit 204 and the attribute data transferred from the attribute change detection processing unit 207. More specifically, when the prediction error value indicated by the prediction error data is “0”, the run length generation processing unit 205 increases the run length value by 1 to increase the length of the prediction error value to “0”. The run length value is generated by counting. On the other hand, when the prediction error value is other than “0”, the run length generation processing unit 205 converts the prediction error data indicating the prediction error value and the run length data indicating the run length value into a pixel indicating the pixel value of the target pixel. The data is transferred to the code format generation processing unit 208 together with the data.

また、ランレングス生成処理部205は、予測誤差値が「0」であっても、属性値の変化があった場合、すなわち、属性変化検出処理部207から属性データが転送された場合は、ランレングスの生成を中止する。そして、属性データと、予測誤差値を示す予測誤差データと、ランレングス値を示すランレングスデータとを、注目画素の画素値を示す画素データと共に符号フォーマット生成処理部208に転送する。   In addition, the run length generation processing unit 205 executes the run when there is a change in the attribute value even when the prediction error value is “0”, that is, when the attribute data is transferred from the attribute change detection processing unit 207. Stop length generation. Then, the attribute data, the prediction error data indicating the prediction error value, and the run length data indicating the run length value are transferred to the code format generation processing unit 208 together with the pixel data indicating the pixel value of the target pixel.

符号フォーマット生成処理部208は、ランレングス生成処理部205から転送されたランレングスデータ、予測誤差データ、属性データおよび注目画素の画素データに基づき符号化を行い、符号データを生成する。生成された符号データは、符号書き込み部209に転送される。   The code format generation processing unit 208 performs encoding based on the run length data, prediction error data, attribute data, and pixel data of the target pixel transferred from the run length generation processing unit 205 to generate code data. The generated code data is transferred to the code writing unit 209.

より詳細には、符号フォーマット生成処理部208は、ランレングス生成処理部205から転送されたランレングスデータが示すランレングス値を、図12−2を用いて後述するランレングス符号のフォーマットに従い符号化する。また、ランレングス生成処理部205から転送された予測誤差データが示す予測誤差値が所定範囲内の値であれば、図12−1を用いて後述する予測誤差符号のフォーマットに従い符号化する。また、予測誤差値が所定範囲外の値の場合には、対応する画素の画素値そのものを符号として用いる。さらに、属性値が変化した場合、すなわち、ランレングス生成処理部205から属性データが転送された場合は、属性データが示す属性値を、図12−1を用いて後述する属性符号のフォーマットに従い符号化する。   More specifically, the code format generation processing unit 208 encodes the run length value indicated by the run length data transferred from the run length generation processing unit 205 according to the format of the run length code described later with reference to FIG. To do. Also, if the prediction error value indicated by the prediction error data transferred from the run length generation processing unit 205 is a value within a predetermined range, encoding is performed according to the format of a prediction error code described later with reference to FIG. If the prediction error value is outside the predetermined range, the pixel value of the corresponding pixel is used as a code. Furthermore, when the attribute value changes, that is, when the attribute data is transferred from the run length generation processing unit 205, the attribute value indicated by the attribute data is encoded according to the attribute code format described later with reference to FIG. Turn into.

なお、符号フォーマット生成処理部208によりランレングス値が符号化された後、ランレングス生成処理部205においてランレングス値が初期化される。   Note that after the run length value is encoded by the code format generation processing unit 208, the run length value is initialized by the run length generation processing unit 205.

符号フォーマット生成処理部208は、生成した符号データを符号書き込み部209に転送する。符号書き込み部209は、転送されたこの符号データを、メインメモリ751のページ符号格納領域751Bに対して書き込む。   The code format generation processing unit 208 transfers the generated code data to the code writing unit 209. The code writing unit 209 writes the transferred code data in the page code storage area 751B of the main memory 751.

<符号フォーマット>
図12は、符号フォーマット生成処理部208で生成される符号の一例のフォーマットを示す。本実施形態では、予測誤差値、ランレングス値および属性値をそれぞれハフマン符号化して予測誤差符号、ランレングス符号および属性符号を生成すると共に、予測誤差値が所定範囲外の値の場合に画素値そのものを符号として用いたPASS符号を生成する。PASS符号は、予測誤差値をハフマン符号化した場合に、符号長が予測誤差値に適用される符号長を超える長さになる場合に生成される。
<Code format>
FIG. 12 shows an exemplary format of a code generated by the code format generation processing unit 208. In the present embodiment, the prediction error value, the run length value, and the attribute value are Huffman-coded to generate a prediction error code, a run length code, and an attribute code, and the pixel value when the prediction error value is outside the predetermined range. A PASS code using the code itself as a code is generated. The PASS code is generated when the prediction error value is Huffman encoded and the code length exceeds the code length applied to the prediction error value.

図12−1は、予測誤差符号、属性符号およびPASS符号の符号フォーマットの例を示す。各符号は、符号のそれぞれを識別するためのヘッダと、符号の本体である数値が格納される数値部分からなる。   FIG. 12A illustrates an example of the code format of the prediction error code, the attribute code, and the PASS code. Each code includes a header for identifying each of the codes and a numerical value portion in which a numerical value that is a main body of the code is stored.

予測誤差値は、値が大きいほど頻度が低くなるものとしてハフマン符号化される。このとき、予測誤差値を、段階的に設定された範囲により分類し、範囲毎に異なる符号長が割り当てられるように符号化を行う。分類された範囲は、符号の先頭から所定ビット(本実施形態では3ビット)を用いた誤差ヘッダにより、それぞれ識別される。この誤差ヘッダに対して、数値部分として符号化された予測誤差値が付加されて、1つの予測誤差符号が生成される。   The prediction error value is Huffman encoded so that the greater the value, the lower the frequency. At this time, the prediction error values are classified according to ranges set in stages, and encoding is performed so that different code lengths are assigned to the respective ranges. The classified ranges are identified by error headers using predetermined bits (3 bits in the present embodiment) from the top of the code. A prediction error value encoded as a numerical part is added to the error header to generate one prediction error code.

本実施形態では、予測誤差値Peに対して例えば次のように6の範囲を設定する。
予測誤差範囲#1:Pe=1,Pe=−1
予測誤差範囲#2:Pe=−3,Pe=−2,Pe=2,Pe=3
予測誤差範囲#3:−7≦Pe≦−4,4≦Pe≦7
予測誤差範囲#4:−15≦Pe≦−8,8≦Pe≦15
予測誤差範囲#5:−31≦Pe≦−16,16≦Pe≦31
予測誤差範囲#6:−63≦Pe≦−32,32≦Pe≦63
In the present embodiment, for example, a range of 6 is set for the prediction error value Pe as follows.
Prediction error range # 1: Pe = 1, Pe = −1
Prediction error range # 2: Pe = -3, Pe = -2, Pe = 2, Pe = 3
Prediction error range # 3: −7 ≦ Pe ≦ −4, 4 ≦ Pe ≦ 7
Prediction error range # 4: −15 ≦ Pe ≦ −8, 8 ≦ Pe ≦ 15
Prediction error range # 5: −31 ≦ Pe ≦ −16, 16 ≦ Pe ≦ 31
Prediction error range # 6: −63 ≦ Pe ≦ −32, 32 ≦ Pe ≦ 63

また、各グループのグループ識別ビットと、付加ビットのビット長とを、例えば次のように設定する。
予測誤差範囲#1:誤差ヘッダ=「000」,付加される符号長=1ビット
予測誤差範囲#2:誤差ヘッダ=「001」,付加される符号長=2ビット
予測誤差範囲#3:誤差ヘッダ=「010」,付加される符号長=3ビット
予測誤差範囲#4:誤差ヘッダ=「011」,付加される符号長=4ビット
予測誤差範囲#5:誤差ヘッダ=「100」,付加される符号長=5ビット
予測誤差範囲#6:誤差ヘッダ=「101」,付加される符号長=6ビット
Further, the group identification bits and the bit lengths of the additional bits of each group are set as follows, for example.
Prediction error range # 1: error header = “000”, added code length = 1 bit prediction error range # 2: error header = “001”, added code length = 2 bit prediction error range # 3: error header = “010”, added code length = 3-bit prediction error range # 4: error header = “011”, added code length = 4-bit prediction error range # 5: error header = “100”, added Code length = 5 bits prediction error range # 6: error header = “101”, added code length = 6 bits

PASS符号は、ヘッダ(PASSヘッダと呼ぶ)として例えば値「110」が用いられ、8ビットのビット深度を有する画素データそのものがPASSヘッダに対して数値部分として付加されて生成される。   For example, the value “110” is used as a header (referred to as a PASS header), and the PASS code is generated by adding pixel data itself having a bit depth of 8 bits as a numerical value part to the PASS header.

属性符号は、ヘッダ(属性ヘッダと呼ぶ)として例えば値「111」が用いられ、属性値が2ビットの符号長を持つ符号に符号化されて、数値部分として属性ヘッダに対して付加されて生成される。   For example, the value “111” is used as the header (referred to as the attribute header), and the attribute code is generated by encoding the attribute value into a code having a code length of 2 bits and adding it as a numerical part to the attribute header. Is done.

図12−2は、ランレングス値が符号化されたランレングス符号の一例の符号フォーマットを示す。本実施形態では、ランレングス値は、値が小さいほど短い符号長が割り当てられるようにハフマン符号化され、ランレングス値が1で1ビットの符号長が割り当てられ、符号「0」に符号化される。   FIG. 12-2 illustrates a code format of an example of the run length code in which the run length value is encoded. In the present embodiment, the run length value is Huffman encoded so that a shorter code length is assigned as the value is smaller, a run length value is 1 and a 1 bit code length is assigned, and the run length value is encoded into a code “0”. The

以下、図12−2に例示されるように、ランレングス値が2の場合には、2ビットの符号長が割り当てられ、符号「10」に符号化される。また、ランレングス値が3〜5の場合は、4ビットの符号長が割り当てられ、それぞれ符号「1100」、「1101」および「1110」に符号化される。   Hereinafter, as illustrated in FIG. 12B, when the run length value is 2, a code length of 2 bits is assigned and encoded to a code “10”. When the run length value is 3 to 5, a 4-bit code length is assigned and encoded to codes “1100”, “1101”, and “1110”, respectively.

ランレングス値が6以上の場合、4ビットの符号長を持つ符号「1111」の後ろに所定符号長の数値部を接続した形式に符号化される。数値部は、図12−2の下段に示されるように、例えば先頭に1ビットのフレームヘッダを含む4ビットの符号長を有する、1または複数のフレームからなる。ランレングス値を示す符号が3ビット毎に区切られ、各フレームのヘッダを除く3ビットに対し、上述の符号「1111」側がMSBとなるように詰め込まれる。図12−2の例では、フレームは、最大数が7個に制限され、ランレングス値が1048576まで表現可能とされている。ランレングス値が5の場合は、フレームを省略することができる。   When the run length value is 6 or more, encoding is performed in a format in which a numerical value part having a predetermined code length is connected after a code “1111” having a code length of 4 bits. As shown in the lower part of FIG. 12-2, the numerical value part is composed of one or a plurality of frames having a code length of 4 bits including a 1-bit frame header at the head, for example. The code indicating the run length value is divided every 3 bits, and the 3 bits excluding the header of each frame are packed so that the above-mentioned code “1111” side is the MSB. In the example of FIG. 12B, the maximum number of frames is limited to 7, and the run length value can be expressed up to 1048576. If the run length value is 5, the frame can be omitted.

なお、フレームヘッダは、あるフレームに次のフレームが続くか否かを示す。例えば、フレームヘッダの値が「0」で次のフレームがあることを示し、フレームヘッダの値が「1」でそのフレームで終了することを示す。   The frame header indicates whether or not the next frame follows a certain frame. For example, a frame header value “0” indicates that there is a next frame, and a frame header value “1” indicates that the frame ends.

図13は、上述した予測誤差符号、PASS符号、属性符号およびランレングス符号の構成例を示す。図13−1に例示されるように、予測誤差符号とランレングス符号とで1の符号が構成される。また、PASS符号とランレングス符号とで1の符号が構成される。一方、属性符号は、単独で1の符号として構成される。   FIG. 13 shows a configuration example of the above-described prediction error code, PASS code, attribute code, and run-length code. As illustrated in FIG. 13A, a prediction error code and a run-length code constitute one code. The PASS code and the run length code constitute one code. On the other hand, the attribute code is configured as a single code.

符号データ全体としては、図13−2に例示されるように、それぞれの符号が符号化された順に連続的に配置されて構成される。それぞれの符号は、先頭の3ビットのヘッダを読み込むことで、予測誤差符号とランレングス符号とで構成された符号であるか、PASS符号とランレングス符号とで構成された符号であるか、若しくは、属性符号単独で構成された符号であるかを判別することができる。   As illustrated in FIG. 13B, the entire code data is configured by sequentially arranging the codes in the order in which the codes are encoded. Each code is a code composed of a prediction error code and a run-length code by reading the head 3-bit header, or a code composed of a PASS code and a run-length code, or It is possible to determine whether the code is composed of the attribute code alone.

<符号化処理の詳細>
図14は、CMYKA符号化部11で行われる、本実施形態による符号化処理を示す一例のフローチャートである。なお、この図14のフローチャートの処理に先んじて、ランレングス値が予め初期値である1に設定されているものとする。
<Details of encoding process>
FIG. 14 is a flowchart illustrating an example of encoding processing according to the present embodiment, which is performed by the CMYKA encoding unit 11. Prior to the processing of the flowchart of FIG. 14, it is assumed that the run length value is set to 1 which is an initial value in advance.

先ず、ステップS30で、初期化フラグの値を1にセットする。次に、ステップS31で、画像読み込み部200により、メインメモリ751のCMYKAバンドデータ格納領域751Aから処理対象の1画素(注目画素GDATA)が読み出される。読み出された注目画素GDATAは、ラインメモリ制御処理部201の制御により、ラインメモリ202の、符号化対象のラインである現ラインの画素データが格納される領域に書き込まれる(ステップS32)。 First, in step S30, the value of the initialization flag is set to 1. Next, in step S31, the image reading unit 200 reads one pixel to be processed (target pixel G DATA ) from the CMYKA band data storage area 751A of the main memory 751. The read target pixel G DATA is written in an area of the line memory 202 in which pixel data of the current line, which is a line to be encoded, is stored under the control of the line memory control processing unit 201 (step S32).

次のステップS33で、予測処理部203により、ラインメモリ202から注目画素GDATAの周辺3画素a、bおよびc(図11参照)の画素データが読み出される。そして、これら画素a、bおよびcの画素値を用いて、上述した式(1)に従い、注目画素GDATAの画素値が平面予測より予測され、平面予測値が求められる。次のステップS34で、予測誤差処理部204により、注目画素GDATAの画素値から、ステップS33で求められた平面予測値が減じられて、注目画素GDATAに対する平面予測値の誤差(予測誤差値)が求められる。そして、処理はステップS35に移行される。 In the next step S <b> 33, the prediction processing unit 203 reads out pixel data of the three neighboring pixels a, b, and c (see FIG. 11) of the target pixel G DATA from the line memory 202. Then, using the pixel values of these pixels a, b and c, the pixel value of the target pixel G DATA is predicted by plane prediction according to the above-described equation (1), and the plane prediction value is obtained. In the next step S34, the prediction by the error processing unit 204, from the pixel value of the target pixel G DATA, and plane prediction value is subtracted determined in step S33, the error of the plane prediction value for the target pixel G DATA (prediction error value ) Is required. Then, the process proceeds to step S35.

ステップS35では、属性読み込み部206により、メインメモリ751のCMYKAバンドデータ格納領域751Aから、注目画素GDATAに対応する属性データが読み出される。 In step S35, the attribute reading unit 206, the CMYKA band data storage area 751A of the main memory 751, the attribute data corresponding to the target pixel G DATA is read out.

次のステップS36で、ランレングス生成処理部205により、注目画素GDATAが下記の(1)〜(3)の各条件のうち少なくとも1を満たしているか否かが判定される。
(1)ステップS34で求められた予測誤差値が0以外の値である。
(2)ステップS35で読み出された属性データが示す属性値が1回前の処理で得られた属性値と異なっている。
(3)注目画素GDATAがラインの最終画素である。
In the next step S36, the run length generation processing unit 205 determines whether or not the target pixel G DATA satisfies at least one of the following conditions (1) to (3).
(1) The prediction error value obtained in step S34 is a value other than zero.
(2) The attribute value indicated by the attribute data read in step S35 is different from the attribute value obtained in the previous process.
(3) The target pixel G DATA is the last pixel of the line.

若し、注目画素GDATAが上述の(1)〜(3)の各条件の何れも満たしていないと判定されたら、処理はステップS37に移行される。これは、すなわち、予測誤差値が0であって、且つ、対応する属性値が1回前の処理で得られた属性値と同一で、且つ、現ラインの最終画素ではない場合である。ステップS37では、ランレングス値を1だけ増加させる。そして、処理はステップS31に戻され、スキャン順で次の画素を新たな注目画素GDATAとして、処理が繰り返される。 If it is determined that the target pixel G DATA does not satisfy any of the above conditions (1) to (3), the process proceeds to step S37. In other words, this is a case where the prediction error value is 0, the corresponding attribute value is the same as the attribute value obtained in the previous processing, and is not the last pixel of the current line. In step S37, the run length value is increased by one. Then, the process returns to step S31, and the process is repeated with the next pixel in the scan order as the new target pixel GDATA .

一方、上述のステップS36において、注目画素GDATAが上述の(1)〜(3)の何れか1を満たしていると判定されたら、処理はステップS38に移行される。ステップS38では、初期化フラグの値が1であるか否かが判定される。若し、1であると判定されたら、処理はステップS40に移行される。一方、初期化フラグが1ではないと判定されたら、処理はステップS39に移行される。 On the other hand, in step S36 described above, attention pixel G DATA is if it is determined that meets any one of the above (1) to (3), the process proceeds to step S38. In step S38, it is determined whether or not the value of the initialization flag is 1. If it is determined that the number is 1, the process proceeds to step S40. On the other hand, if it is determined that the initialization flag is not 1, the process proceeds to step S39.

ステップS39では、符号フォーマット生成処理部208により、図12−2を用いて説明した符号フォーマットに従い、ランレングス値を符号化してランレングス符号を生成する。そして、処理はステップS40に移行され、初期化フラグの値が0とされる。   In step S39, the code format generation processing unit 208 encodes the run length value according to the code format described with reference to FIG. 12-2 to generate a run length code. Then, the process proceeds to step S40, and the value of the initialization flag is set to 0.

処理はステップS41に移行され、注目画素GDATAに対応する属性値が1つ前の画素に対応する属性値と異なっているか否かが判定される。若し、注目画素GDATAに対応する属性値が1つ前の画素に対応する属性値と同一であると判定されたら、処理はステップS45に移行される。 The process proceeds to step S41, whether the attribute values corresponding to the pixel of interest G DATA is different from the attribute values corresponding to the previous pixel is determined. If it is determined that the attribute value corresponding to the target pixel G DATA is the same as the attribute value corresponding to the previous pixel, the process proceeds to step S45.

ステップS405では、予測誤差値が0でないか否かが判定される。若し、予測誤差値が0であると判定されたら、処理はステップS51に移行される。一方、予測誤差値が0ではないと判定されたら、処理はステップS46に移行される。   In step S405, it is determined whether the prediction error value is not zero. If it is determined that the prediction error value is 0, the process proceeds to step S51. On the other hand, if it is determined that the prediction error value is not 0, the process proceeds to step S46.

ステップS46では、予測誤差値が所定の範囲外の値であるか否かが判定される。より具体的には、ステップS46では、図12−1に示される予測誤差範囲外、すなわち−63〜63の範囲外の値であるか否かが判定される。   In step S46, it is determined whether or not the prediction error value is outside a predetermined range. More specifically, in step S46, it is determined whether or not the value is outside the prediction error range shown in FIG. 12A, that is, outside the range of −63 to 63.

若し、予測誤差値が所定範囲内、すなわち、予測誤差値が−63以上且つ63以下の値であれば、処理はステップS47に移行される。ステップS47で、ランレングス生成処理部205は、予測誤差値が図12−1に示される範囲#1〜#6のうちどの範囲に属するかを判定し、判定結果に基づき予測誤差ヘッダの符号化を行う。予測誤差ヘッダの符号化が行われると、処理はステップS48に移行され、図12−1を用いて説明した符号フォーマットに従い予測誤差値が符号化され、予測誤差ヘッダに付加されて予測誤差符号が生成される。そして、処理はステップS51に移行される。   If the prediction error value is within the predetermined range, that is, if the prediction error value is −63 or more and 63 or less, the process proceeds to step S47. In step S47, the run length generation processing unit 205 determines which range of the range # 1 to # 6 shown in FIG. 12A the prediction error value belongs to, and encodes the prediction error header based on the determination result. I do. When the prediction error header is encoded, the process proceeds to step S48, where the prediction error value is encoded according to the code format described with reference to FIG. Generated. Then, the process proceeds to step S51.

一方、ステップS46で、予測誤差値が所定範囲外、すなわち、予測誤差値が−63未満若しくは63を超える値であると判定されたら、処理はステップS49に移行される。ステップS49で、ランレングス生成処理部205において、図12−1を用いて説明した符号フォーマットに従いPASSヘッダの符号化が行われる。PASSヘッダの符号化が行われると、処理はステップS50に移行され、注目画素GDATAの画素データそのものが符号としてPASSヘッダに付加されてPASS符号が生成される。そして、処理はステップS51に移行される。 On the other hand, if it is determined in step S46 that the prediction error value is outside the predetermined range, that is, the prediction error value is less than −63 or greater than 63, the process proceeds to step S49. In step S49, the run-length generation processing unit 205 encodes the PASS header according to the code format described with reference to FIG. When the PASS header is encoded, the process proceeds to step S50, and the pixel data of the pixel of interest G DATA itself is added as a code to the PASS header to generate a PASS code. Then, the process proceeds to step S51.

ステップS51では、注目画素GDATAが現ラインの最終画素であるか否かが判定される。若し、注目画素GDATAが現ラインの最終画素ではないと判定されたら、処理はステップS52に移行され、ランレングス値が1とされ初期値にリセットされる。そして、処理はステップS31に戻され、スキャン順で次の画素を新たな注目画素GDATAとして、処理が繰り返される。 In step S51, it is determined whether or not the target pixel GDATA is the last pixel of the current line. If it is determined that the target pixel G DATA is not the final pixel of the current line, the process proceeds to step S52, the run length value is set to 1, and the initial value is reset. Then, the process returns to step S31, and the process is repeated with the next pixel in the scan order as the new target pixel GDATA .

一方、ステップS51で、注目画素GDATAが現ラインの最終画素であると判定されたら、処理はステップS53に移行される。ステップS53では、ラインメモリ制御処理部201によって、ラインメモリ202の書き込み領域の切り替えが行われる。すなわち、当該注目画素GDATAの属する現ラインを符号化済みの前ラインとしてラインメモリ202の一方の領域にそのまま保持し、ラインメモリ202の他方の領域を、次に符号化を行うラインの画素データが格納される領域とする。そして、処理はステップS54に移行され、全てのラインについて処理が終了したか否かが判定される。若し、終了したと判定されたら、一連の符号化処理が終了される。 On the other hand, if it is determined in step S51 that the target pixel GDATA is the last pixel of the current line, the process proceeds to step S53. In step S53, the line memory control processing unit 201 switches the writing area of the line memory 202. That is, the current line to which the target pixel G DATA belongs is held as it is in one area of the line memory 202 as an encoded previous line, and the other area of the line memory 202 is stored as pixel data of the line to be encoded next Is an area in which is stored. Then, the process proceeds to step S54 to determine whether or not the process has been completed for all lines. If it is determined that the processing has been completed, a series of encoding processing is ended.

一方、ステップS54で全てのラインについて処理が終了していないと判定されたら、処理はステップS31に戻され、次のラインの先頭画素を注目画素GDATAとして、処理が繰り返される。 On the other hand, if it is determined in step S54 that the process has not been completed for all lines, the process returns to step S31, and the process is repeated with the first pixel of the next line as the target pixel GDATA .

上述のステップS41で、注目画素GDATAに対応する属性値が1つ前の画素に対応する属性値と異なっていると判定されたら、処理はステップS42に移行される。 If it is determined in step S41 described above that the attribute value corresponding to the target pixel GDATA is different from the attribute value corresponding to the previous pixel, the process proceeds to step S42.

ステップS42では、ランレングス生成処理部205において、図12−1を用いて説明した符号フォーマットに従い属性ヘッダの符号化が行われる。属性ヘッダの符号化が行われると、処理はステップS43に移行され、図12−1を用いて説明した符号フォーマットに従い属性値が符号化され、属性ヘッダに付加されて属性符号が生成される。   In step S42, the run length generation processing unit 205 encodes the attribute header according to the code format described with reference to FIG. When the attribute header is encoded, the process proceeds to step S43, where the attribute value is encoded in accordance with the code format described with reference to FIG. 12A, and is added to the attribute header to generate the attribute code.

ステップS43で属性符号が生成されると、処理はステップS44に移行され、ステップS34で求められた予測誤差値が0以外の値であるか否かが判定される。若し、予測誤差値が0以外の値であると判定されたら、処理は上述したステップS46に移行される。一方、予測誤差値が0であると判定されたら、処理は上述したステップS49に移行される。   When the attribute code is generated in step S43, the process proceeds to step S44, and it is determined whether or not the prediction error value obtained in step S34 is a value other than zero. If it is determined that the prediction error value is a value other than 0, the process proceeds to step S46 described above. On the other hand, if it is determined that the prediction error value is 0, the process proceeds to step S49 described above.

図15を用いて、本発明の実施形態による符号化処理の例について、より具体的に説明する。図15−1は、上述した図14のフローチャートに従い符号化を行った場合の各値のより具体的な例を、画素単位で示す。また、図15−2は、図15−1に例示される画素および属性データを上述の図14のフローチャートに従い符号化して生成される符号データ(符号列)の例を概略的に示す。   An example of the encoding process according to the embodiment of the present invention will be described more specifically with reference to FIG. FIG. 15A illustrates a more specific example of each value when encoding is performed according to the flowchart of FIG. 14 described above, in units of pixels. FIG. 15B schematically illustrates an example of code data (code string) generated by encoding the pixel and attribute data illustrated in FIG. 15A according to the flowchart of FIG. 14 described above.

なお、図15−1では、C版バンドデータに対して符号化を行った例を示す。C版バンドデータおよび属性データにおいて、番号#0の画素が先頭画素であって、図の左側から右側に向けて符号化処理がなされるものとする。符号は、図15−1に縦方向のならびとして例示されるように、属性値、予測誤差値、PASS値およびランレングス値の順で適宜、符号化される。   FIG. 15A shows an example in which the C version band data is encoded. In the C version band data and attribute data, the pixel of number # 0 is the first pixel, and the encoding process is performed from the left side to the right side of the figure. The codes are appropriately encoded in the order of the attribute value, the prediction error value, the PASS value, and the run length value, as exemplified by the vertical direction in FIG.

図15の例では、C版バンドデータにおいて、番号#2、番号#7、番号#10、番号#12および番号#15の画素で、それぞれ画素値が直前の画素に対して変化しているものとする。また、番号#2、番号#7、番号#10および番号#15の画素で、それぞれ属性値が直前の画素に対して変化しているものとする。   In the example of FIG. 15, in the C version band data, the pixel values of the number # 2, number # 7, number # 10, number # 12, and number # 15 are changed with respect to the immediately preceding pixel. And In addition, it is assumed that the attribute values of the pixels of number # 2, number # 7, number # 10, and number # 15 have changed with respect to the immediately preceding pixel.

注目画素GDATAがラインの先頭画素(番号#0の画素)の場合、予測誤差値が0であって、且つ、属性値が変化した直後であるものと見做して、属性値と画素値(PASS値)の初期値を与える。すなわち、ステップS38で初期化フラグが1であると判定されて、ランレングス値の符号化を行わずにステップS40で初期化フラグが0とされる。初期化フラグは、以降、0から変化しない。そして、ステップS41で、1つ前の画素の属性値が注目画素GDATAの属性値と異なっていると判定され、ステップS42でステップS42およびステップS43で属性符号600が生成される。予測誤差値が0とされているので、ステップS44の判定により処理がステップS49に移行され、ステップS49およびステップS50によりPASS符号601が生成される。 When the target pixel G DATA is the first pixel of the line (pixel # 0), it is assumed that the prediction error value is 0 and that the attribute value has just changed, and the attribute value and the pixel value The initial value of (PASS value) is given. That is, it is determined in step S38 that the initialization flag is 1, and the initialization flag is set to 0 in step S40 without encoding the run length value. Thereafter, the initialization flag does not change from 0. Then, in step S41, it is determined that the attribute value of the previous pixel is different from the attribute value of the target pixel GDATA, and an attribute code 600 is generated in step S42 and step S43. Since the prediction error value is 0, the process proceeds to step S49 based on the determination in step S44, and a PASS code 601 is generated in steps S49 and S50.

注目画素GDATAはラインの最終画素ではないので、ステップS51の判定により処理がステップS52に移行されてランレングス値が1にリセットされて次の画素(番号#1の画素)が注目画素GDATAとされ、ステップS31からの処理が行われる。番号#1の画素は属性値が番号#0と同一なので、ステップS36の判定により処理がステップS37に移行されランレングス値に1が加算されて値が2とされ、ステップS31で次の画素(番号#2の画素)が注目画素GDATAとされる。 Since the target pixel G DATA is not the last pixel of the line, the process proceeds to step S52 based on the determination in step S51, the run length value is reset to 1, and the next pixel (pixel # 1) is the target pixel G DATA. The process from step S31 is performed. Since the attribute value of the pixel of number # 1 is the same as that of number # 0, the process proceeds to step S37 based on the determination in step S36, 1 is added to the run length value to set the value to 2, and the next pixel ( Pixel # 2) is the target pixel GDATA .

番号#2の画素は、1つ前の番号#1の画素と属性値が異なるので、ステップS36の判定により処理がステップS38に移行される。符号化フラグが0であるので、ステップS38の判定により処理がステップS39に移行されてランレングス値「2」が符号化され、ランレングス符号602が生成される。   Since the pixel of number # 2 has a different attribute value from the previous pixel of number # 1, the process proceeds to step S38 based on the determination in step S36. Since the encoding flag is 0, the process proceeds to step S39 according to the determination in step S38, the run length value “2” is encoded, and the run length code 602 is generated.

番号#2の画素は、1つ前の番号#1の画素と属性値が異なるので、ステップS41の判定により、ステップS42およびステップS43により属性符号603が生成され、さらに予測誤差値が0ではなく且つ−63〜63の範囲内の値なので、ステップS44およびステップS45の判定により、ステップS47およびステップS48で予測誤差符号604が生成される。   Since the pixel # 2 has an attribute value different from that of the previous pixel # 1, the attribute code 603 is generated in steps S42 and S43 by the determination in step S41, and the prediction error value is not 0. Since the value is in the range of −63 to 63, the prediction error code 604 is generated in steps S47 and S48 based on the determinations in steps S44 and S45.

ステップS52でランレングス値が1にリセットされて処理がステップS31に戻され、次の画素(番号#3の画素)が注目画素GDATAとされる。番号#2の画素から番号#6の画素までは、属性値が変化しないと共に予測誤差値が0であり、さらに、画素がラインの最終画素でもないので、ステップS36の判定により処理がステップS37に移行されて順次、ランレングス値に1が加算される。番号#6の画素の処理が行われた時点でのランレングス値は、5となる。 In step S52, the run length value is reset to 1, the process returns to step S31, and the next pixel (pixel # 3) is set as the target pixel GDATA . From the pixel # 2 to the pixel # 6, the attribute value does not change and the prediction error value is 0. Further, since the pixel is not the last pixel of the line, the process proceeds to step S37 according to the determination in step S36. After the transition, 1 is added to the run length value sequentially. The run length value at the time when the pixel # 6 is processed is 5.

番号#6の画素の処理が終了すると、番号#7の画素が注目画素GDATAとされる。番号#7の画素は、1つ前の番号#6の画素と属性値が異なるので、ステップS36処理がステップS38に移行される。符号化フラグが0であるので、ステップS38の判定により処理がステップS39に移行されてランレングス値「5」が符号化され、ランレングス符号605が生成される。 When the processing of the pixel # 6 is completed, the pixel # 7 is set as the target pixel GDATA . Since the pixel of number # 7 has a different attribute value from the previous pixel of number # 6, the process of step S36 proceeds to step S38. Since the encoding flag is 0, the process proceeds to step S39 based on the determination in step S38, the run length value “5” is encoded, and the run length code 605 is generated.

番号#7の画素は、1つ前の番号#6の画素と属性値が異なるので、ステップS41の判定により、ステップS42およびステップS43により属性符号606が生成され、さらに予測誤差値が0ではなく且つ−63〜63の範囲内の値なので、ステップS44およびステップS45の判定により、ステップS47およびステップS48で予測誤差符号607が生成される。   Since the pixel # 7 has an attribute value different from that of the previous pixel # 6, the attribute code 606 is generated in steps S42 and S43 by the determination in step S41, and the prediction error value is not 0. Since the value is in the range of −63 to 63, the prediction error code 607 is generated in steps S47 and S48 based on the determinations in steps S44 and S45.

ステップS52でランレングス値が1にリセットされて処理がステップS31に戻され、次の画素(番号#8の画素)が注目画素GDATAとされる。番号#7の画素から番号#9の画素までは、属性値が変化しないと共に予測誤差値が0であり、さらに、画素がラインの最終画素でもないので、ステップS36の判定により処理がステップS37に移行されて順次、ランレングス値に1が加算される。番号#9の画素の処理が行われた時点でのランレングス値は、3となる。 In step S52, the run length value is reset to 1, the process returns to step S31, and the next pixel (pixel # 8) is set as the target pixel GDATA . From the pixel # 7 to the pixel # 9, the attribute value does not change and the prediction error value is 0. Further, since the pixel is not the last pixel of the line, the process proceeds to step S37 according to the determination in step S36. After the transition, 1 is added to the run length value sequentially. The run length value at the time when the pixel # 9 is processed is 3.

番号#9の画素の処理が終了すると、番号#10の画素が注目画素GDATAとされる。番号#10の画素は、1つ前の番号#9の画素と属性値が異なるので、ステップS36処理の判定により処理がステップS38に移行される。符号化フラグが0であるので、ステップS38の判定により処理がステップS39に移行されてランレングス値「3」が符号化され、ランレングス符号608が生成される。 When the processing of the pixel # 9 is completed, the pixel # 10 is set as the target pixel GDATA . Since the pixel of number # 10 has a different attribute value from the previous pixel of number # 9, the process proceeds to step S38 based on the determination in step S36. Since the encoding flag is 0, the process proceeds to step S39 according to the determination in step S38, the run length value “3” is encoded, and the run length code 608 is generated.

番号#10の画素は、1つ前の番号#9の画素と属性値が異なるので、ステップS41の判定により、ステップS42およびステップS43により属性符号609が生成され、さらに予測誤差値が0ではなく且つ−63〜63の範囲外の値なので、ステップS44およびステップS45の判定により、ステップS49およびステップS50で、番号#10の画素の画素値そのものを用いてPASS符号610が生成される。   Since the pixel # 10 has an attribute value different from that of the previous pixel # 9, the attribute code 609 is generated in steps S42 and S43 by the determination in step S41, and the prediction error value is not 0. Since the value is outside the range of −63 to 63, the PASS code 610 is generated using the pixel value itself of the pixel of number # 10 in step S49 and step S50 by the determination in step S44 and step S45.

ステップS52でランレングス値が1にリセットされて処理がステップS31に戻され、次の画素(番号#11の画素)が注目画素GDATAとされる。番号#11の画素は属性値が番号#10と同一なので、ステップS36の判定により処理がステップS37に移行されランレングス値に1が加算されて値が2とされ、ステップS31で次の画素(番号#12の画素)が注目画素GDATAとされる。 In step S52, the run length value is reset to 1, the process returns to step S31, and the next pixel (the pixel of number # 11) is set as the target pixel GDATA . Since the attribute value of the pixel of number # 11 is the same as that of number # 10, the process proceeds to step S37 according to the determination in step S36, and 1 is added to the run length value to set the value to 2, and the next pixel ( Pixel # 12) is the target pixel GDATA .

番号#12の画素は、属性値が1つ前の番号#10の画素と同一である。一方、番号#12の画素は、予測誤差値が0ではないため、ステップS36の判定により処理がステップS38に移行される。初期化フラグが0であるので、ステップS38の判定により処理がステップS39に移行されてランレングス値「2」が符号化され、ランレングス符号611が生成される。   The pixel of number # 12 is the same as the pixel of number # 10 with the previous attribute value. On the other hand, since the prediction error value of the pixel # 12 is not 0, the process proceeds to step S38 based on the determination in step S36. Since the initialization flag is 0, the process proceeds to step S39 based on the determination in step S38, the run length value “2” is encoded, and the run length code 611 is generated.

番号#12の画素は、属性値が1つ前の番号#10の画素と同一であるので、ステップS41の判定により処理がステップS45に移行される。番号#12の画素は、予測誤差値が0ではなく、且つ、−63〜63の範囲内の値であるため、ステップS47およびステップS48で予測誤差符号612が生成される。   Since the pixel with the number # 12 has the same attribute value as the pixel with the number # 10, the process proceeds to step S45 based on the determination in step S41. The prediction error code 612 is generated in step S47 and step S48 because the prediction error value of the pixel of number # 12 is not 0 and is a value in the range of −63 to 63.

以降、図14のフローチャートに従い処理が繰り返され、ランレングス符号613、属性符号614、予測誤差符号615およびランレングス符号616が順次、生成され、符号データが形成される。   Thereafter, the processing is repeated according to the flowchart of FIG. 14, and a run-length code 613, an attribute code 614, a prediction error code 615, and a run-length code 616 are sequentially generated to form code data.

図16を用いて、本発明の実施形態による符号化処理の他の例について説明する。ここでは、予測誤差値が0の状態が続く途中で、属性値が変化した場合について説明する。   Another example of the encoding process according to the embodiment of the present invention will be described with reference to FIG. Here, a case will be described in which the attribute value changes while the state where the prediction error value is 0 continues.

なお、この図16の例は、上述の図15に示したC版バンドデータに対応するM版の例であり、図15の例と属性データが共通し、番号#2、番号#7、番号#10および番号#15の画素で、それぞれ属性値が直前の画素に対して変化している。また、図16の例において、画素値が番号#2、番号#4、番号#12および番号#15の画素でそれぞれ直前の画素に対して変化している一方で、予測処理による予測が良く的中し、予測誤差値が画素#2〜画素#14まで0となっている。   The example of FIG. 16 is an example of the M version corresponding to the C version band data shown in FIG. 15 described above, and has the same attribute data as the example of FIG. In the pixels # 10 and # 15, the attribute values have changed with respect to the immediately preceding pixel. In the example of FIG. 16, the pixel values of the pixels of number # 2, number # 4, number # 12, and number # 15 change with respect to the immediately preceding pixel, but prediction by the prediction process is appropriate. The prediction error value is 0 from pixel # 2 to pixel # 14.

図15を用いて説明した例と同様にして、番号#6の画素まで処理が終了し、次の画素(番号#7の画素)の処理を行う場合ついて説明する。このとき、ランレングス値は、画素#2〜画素#6までの加算により値が5となっている。   Similarly to the example described with reference to FIG. 15, a case will be described in which processing is completed up to the pixel of number # 6 and processing of the next pixel (pixel of number # 7) is performed. At this time, the run length value is 5 by the addition from pixel # 2 to pixel # 6.

番号#7の画素は、1つ前の番号#6の画素と属性値が異なるので、ステップS36処理の判定により処理がステップS38に移行される。符号化フラグが0であるので、ステップS38の判定により処理がステップS39に移行されてランレングス値「5」が符号化され、ランレングス符号620が生成される。   Since the pixel of number # 7 has a different attribute value from the previous pixel of number # 6, the process proceeds to step S38 based on the determination in step S36. Since the encoding flag is 0, the process proceeds to step S39 according to the determination in step S38, the run length value “5” is encoded, and the run length code 620 is generated.

番号#10の画素は、1つ前の番号#6の画素と属性値が異なるので、ステップS41の判定により、ステップS42およびステップS43にて属性符号621が生成される。   Since the pixel # 10 has an attribute value different from that of the previous pixel # 6, the attribute code 621 is generated in steps S42 and S43 based on the determination in step S41.

さらに、番号#10の画素は予測誤差値が0なので、ステップS44の判定により、ステップS49およびステップS50にて番号#10の画素の画素値そのものを用いてPASS符号622が生成される。番号#10の画素はラインの最終画素ではないので、ステップS51の判定により処理がステップS52に移行されてランレングス値が1にリセットされる。   Further, since the prediction error value of the pixel of number # 10 is 0, the PASS code 622 is generated using the pixel value itself of the pixel of number # 10 in steps S49 and S50 by the determination in step S44. Since the pixel of number # 10 is not the final pixel of the line, the process proceeds to step S52 based on the determination in step S51, and the run length value is reset to 1.

このように、予測誤差値が0であっても、属性値の変化に伴いランレングス値を初期化するため、属性値の変化点において、属性値が変化した画素の画素値をPASS符号として符号データに含める必要がある。こうすることで、復号時に、このPASS符号およびランレングス符号をそれぞれ復号して得られる画素値およびランレングス値に基づき、画素データを生成することができる。   In this way, even when the prediction error value is 0, the run-length value is initialized with the change in the attribute value, so that the pixel value of the pixel whose attribute value has changed is encoded as the PASS code at the change point of the attribute value. Must be included in the data. By doing so, it is possible to generate pixel data based on the pixel value and the run length value obtained by decoding the PASS code and the run length code, respectively, at the time of decoding.

<符号化装置>
図17は、本実施形態によるCMYK+A符号化部711の一例の構成を示すブロック図である。バスアービタI/F320は、バスアービタ708に対するインターフェイスである。バスアービタI/F320は、CMYK版画像DMAC709、属性DMAC710およびCMYKA符号DMAC12を介してバスアービタ708と通信を行うことで、バス734を介してのメインメモリ751に対する書き込み/読み出し要求やデータの読み書きなどを行う。
<Encoding device>
FIG. 17 is a block diagram illustrating an exemplary configuration of the CMYK + A encoding unit 711 according to the present embodiment. The bus arbiter I / F 320 is an interface to the bus arbiter 708. The bus arbiter I / F 320 communicates with the bus arbiter 708 via the CMYK version image DMAC 709, the attribute DMAC 710, and the CMYKA code DMAC 12, thereby performing a write / read request to the main memory 751 via the bus 734, data read / write, and the like. .

バンド画像読み込み部300は、バンドデータアドレス生成部301で生成されたアドレス情報に基づきバスアービタI/F320に対してメモリアドレスを送信する。バスアービタI/F320は、このメモリアドレスをCMYK版画像DMAC709を介してバスアービタ708に送信し、バス734を介してメインメモリ751のCMYKAバンドデータ格納領域751AからCMYKバンドデータをCMYK各版毎に読み出す。バンド画像読み込み部300は、読み出したバンドデータをラインメモリ制御部302に転送する。   The band image reading unit 300 transmits a memory address to the bus arbiter I / F 320 based on the address information generated by the band data address generation unit 301. The bus arbiter I / F 320 transmits this memory address to the bus arbiter 708 via the CMYK version image DMAC 709, and reads the CMYK band data from the CMYKA band data storage area 751A of the main memory 751 for each version of CMYK via the bus 734. The band image reading unit 300 transfers the read band data to the line memory control unit 302.

ラインメモリ制御部302に対して、第1のラインメモリ303および第2のラインメモリ304が接続される。これら第1のラインメモリ303および第2のラインメモリ304は、同一のメモリの異なる領域であってもよい。ラインメモリ制御部302は、第1のラインメモリ303および第2のラインメモリ304の何れか一方を符号化ラインを格納するメモリとして割り当て、他方を参照ラインを格納するメモリとして割り当てる。そして、符号化ラインの符号化が終了したら、メモリの割り当てを切り替える。   A first line memory 303 and a second line memory 304 are connected to the line memory control unit 302. The first line memory 303 and the second line memory 304 may be different areas of the same memory. The line memory control unit 302 assigns one of the first line memory 303 and the second line memory 304 as a memory for storing an encoded line, and assigns the other as a memory for storing a reference line. When the encoding of the encoding line is completed, the memory allocation is switched.

ラインメモリ制御部302は、バンド画像読み込み部300から供給された画素データを、第1のラインメモリ303および第2のラインメモリ304のうち、符号化ラインを格納するメモリとして割り当てられた方(例えば第1のラインメモリ303とする)に書き込む。それと共に、この画素データは、ラインメモリ制御部302により注目画素の画素データとして予測処理部305に転送される。また、ラインメモリ制御部302は、第1のラインメモリ303および第2のラインメモリ304から、当該注目画素の周辺3画素a、bおよびcの画素データを読み出し、予測処理部305に転送する。   The line memory control unit 302 assigns the pixel data supplied from the band image reading unit 300 as a memory for storing an encoded line among the first line memory 303 and the second line memory 304 (for example, To the first line memory 303). At the same time, this pixel data is transferred to the prediction processing unit 305 as pixel data of the target pixel by the line memory control unit 302. In addition, the line memory control unit 302 reads out pixel data of the three neighboring pixels a, b, and c of the target pixel from the first line memory 303 and the second line memory 304 and transfers them to the prediction processing unit 305.

予測処理部305は、ラインメモリ制御部302から転送された画素a、bおよびcの画素データを用いて、上述した式(1)に従い平面予測により注目画素の画素値を予測する。注目画素の平面予測値を示すデータは、注目画素の画素データと共に、予測誤差処理部306に転送される。予測誤差処理部306は、予測処理部305から転送された平面予測値の注目画素の画素データによる画素値に対する誤差を求め、予測誤差データとして、注目画素の画素データと共にランレングス生成処理部310に転送する。   The prediction processing unit 305 uses the pixel data of the pixels a, b, and c transferred from the line memory control unit 302 to predict the pixel value of the pixel of interest by plane prediction according to the above equation (1). Data indicating the planar predicted value of the target pixel is transferred to the prediction error processing unit 306 together with the pixel data of the target pixel. The prediction error processing unit 306 obtains an error with respect to the pixel value of the pixel data of the target pixel of the target pixel of the plane predicted value transferred from the prediction processing unit 305, and sends it to the run length generation processing unit 310 together with the pixel data of the target pixel as prediction error data. Forward.

バンド属性読み込み部307は、バンド属性アドレス生成部308で生成されたアドレス情報に基づきバスアービタI/F320に対してメモリアドレスを送信する。バスアービタI/F320は、このメモリアドレスを属性DMAC710を介してバスアービタ708に送信し、バス734を介してメインメモリ751のCMYKAバンドデータ格納領域751Aから属性Aのバンドデータ(属性データ)を読み出す。バンド属性読み込み部307は、読み出した属性データを属性変化検出処理部309に転送する。   The band attribute reading unit 307 transmits a memory address to the bus arbiter I / F 320 based on the address information generated by the band attribute address generation unit 308. The bus arbiter I / F 320 transmits this memory address to the bus arbiter 708 via the attribute DMAC 710, and reads the band data (attribute data) of the attribute A from the CMYKA band data storage area 751A of the main memory 751 via the bus 734. The band attribute reading unit 307 transfers the read attribute data to the attribute change detection processing unit 309.

属性変化検出処理部309は、バンド属性読み込み部307から転送された属性データに示される属性値の変化を検出する。属性変化検出処理部309は、属性値の変化が検出されると、変化後の属性値を示す属性データをランレングス生成処理部310に転送する。   The attribute change detection processing unit 309 detects a change in the attribute value indicated in the attribute data transferred from the band attribute reading unit 307. When a change in the attribute value is detected, the attribute change detection processing unit 309 transfers attribute data indicating the attribute value after the change to the run length generation processing unit 310.

ランレングス生成処理部310は、予測誤差処理部306から転送された予測誤差データと、属性変化検出処理部309から転送された属性データとに基づきランレングスを生成する。より具体的には、ランレングス生成処理部310は、予測誤差データが示す予測誤差値が「0」である場合に、ランレングス値を1だけ増加させて予測誤差値が「0」の長さを計数することで、ランレングス値を生成する。一方、ランレングス生成処理部310は、予測誤差値が「0」以外の場合、予測誤差値を示す予測誤差データと、ランレングス値を示すランレングスデータとを、注目画素の画素値を示す画素データと共に符号フォーマット生成処理部311に転送する。   The run length generation processing unit 310 generates a run length based on the prediction error data transferred from the prediction error processing unit 306 and the attribute data transferred from the attribute change detection processing unit 309. More specifically, when the prediction error value indicated by the prediction error data is “0”, the run length generation processing unit 310 increases the run length value by 1 and sets the length of the prediction error value to “0”. The run length value is generated by counting. On the other hand, when the prediction error value is other than “0”, the run length generation processing unit 310 converts the prediction error data indicating the prediction error value and the run length data indicating the run length value into a pixel indicating the pixel value of the target pixel. The data is transferred to the code format generation processing unit 311 together with the data.

また、ランレングス生成処理部310は、予測誤差値が「0」であっても、属性値の変化があった場合、すなわち、属性変化検出処理部309から属性データが転送された場合は、ランレングスの生成を中止する。そして、属性データと、予測誤差値を示す予測誤差データと、ランレングス値を示すランレングスデータとを、注目画素の画素値を示す画素データと共に符号フォーマット生成処理部311に転送する。   Also, the run length generation processing unit 310 executes the run when the attribute value has changed even when the prediction error value is “0”, that is, when the attribute data is transferred from the attribute change detection processing unit 309. Stop length generation. Then, the attribute data, the prediction error data indicating the prediction error value, and the run length data indicating the run length value are transferred to the code format generation processing unit 311 together with the pixel data indicating the pixel value of the target pixel.

符号フォーマット生成処理部311は、ランレングス生成処理部310から転送されたランレングスデータ、予測誤差データ、属性データおよび注目画素の画素データに基づき図12−1および図12−2を用いて説明したようにして符号化を行い、符号データを生成する。生成された符号データは、符号書き込み部312に転送される。   The code format generation processing unit 311 has been described with reference to FIGS. 12A and 12B based on the run length data, the prediction error data, the attribute data, and the pixel data of the target pixel transferred from the run length generation processing unit 310. Thus, encoding is performed to generate code data. The generated code data is transferred to the code writing unit 312.

すなわち、符号フォーマット生成処理部311は、ランレングス生成処理部310から転送されたランレングスデータが示すランレングス値を符号化してランレングス符号を生成する。また、ランレングス生成処理部310から転送された予測誤差データが示す予測誤差値が所定範囲内の値であれば、予測誤差ヘッダおよび予測誤差値を符号化して予測誤差符号を生成する。また、予測誤差値が所定範囲外の値の場合には、PASSヘッダを符号化すると共に注目画素の画素値そのものを符号として用いてPASS符号を生成する。さらに、属性値が変化しランレングス生成処理部310から属性データが転送された場合は、属性ヘッダを符号化して属性符号を生成する。   That is, the code format generation processing unit 311 encodes the run length value indicated by the run length data transferred from the run length generation processing unit 310 to generate a run length code. If the prediction error value indicated by the prediction error data transferred from the run length generation processing unit 310 is a value within a predetermined range, the prediction error header and the prediction error value are encoded to generate a prediction error code. If the prediction error value is a value outside the predetermined range, the PASS header is encoded and the PASS code is generated using the pixel value of the target pixel as the code. Furthermore, when the attribute value changes and attribute data is transferred from the run length generation processing unit 310, the attribute header is encoded to generate an attribute code.

なお、符号フォーマット生成処理部311でランレングス値が符号化された後、ランレングス生成処理部310においてランレングス値が初期化される。   Note that after the run length value is encoded by the code format generation processing unit 311, the run length value is initialized by the run length generation processing unit 310.

符号フォーマット生成処理部311は、生成した各符号をバンド符号書き込み部312に転送する。バンド符号書き込み部312は、バンド符号アドレス生成部313で生成されたアドレス情報に基づき、符号フォーマット生成処理部311から転送された各符号データをメインメモリ751のページ符号格納領域751Bに書き込むためのアドレスを生成する。生成されたこのアドレスは、符号フォーマット生成処理部311から転送された各符号データと共に、バンド符号書き込み部312からバスアービタI/F320に転送される。バスアービタI/F320は、バンド符号書き込み部312から転送されたアドレスに基づき、各符号データをメインメモリ751のページ符号格納領域751Bに書き込むように、バスI/F34に要求する。   The code format generation processing unit 311 transfers each generated code to the band code writing unit 312. The band code writing unit 312 is an address for writing each code data transferred from the code format generation processing unit 311 to the page code storage area 751B of the main memory 751 based on the address information generated by the band code address generation unit 313. Is generated. The generated address is transferred from the band code writing unit 312 to the bus arbiter I / F 320 together with the code data transferred from the code format generation processing unit 311. The bus arbiter I / F 320 requests the bus I / F 34 to write each code data to the page code storage area 751B of the main memory 751 based on the address transferred from the band code writing unit 312.

<復号処理の概略>
図18は、本発明の実施形態によるC+A復号部717の動作を説明するための一例の機能ブロック図である。なお、M+A復号部718、Y+A復号19およびK+A復号部720は、このC+A復号部717と同様の構成で実現できるので、ここではC+A復号部717でこれらを代表させて説明を行う。
<Outline of decryption processing>
FIG. 18 is a functional block diagram illustrating an example of the operation of the C + A decoding unit 717 according to the embodiment of the present invention. Note that the M + A decoding unit 718, the Y + A decoding unit 19 and the K + A decoding unit 720 can be realized with the same configuration as the C + A decoding unit 717, and therefore, here, the C + A decoding unit 717 will be representatively described.

C+A復号部717において、符号読み込み部400は、メインメモリ751のページ符号格納領域751BからC+A版バンド符号データを読み出し、符号フォーマット解析部401に転送する。符号フォーマット解析部401は、転送された符号データのヘッダに基づき、当該符号データが属性符号、予測誤差符号およびPASS符号のうち何れであるかを解析する。そして、当該符号データが属性符号であれば、図12−1を用いて説明した符号フォーマットに基づき属性値を復号し、属性データとして属性値生成処理部407に転送する。   In the C + A decoding unit 717, the code reading unit 400 reads the C + A version band code data from the page code storage area 751B of the main memory 751 and transfers it to the code format analysis unit 401. Based on the header of the transferred code data, the code format analysis unit 401 analyzes whether the code data is an attribute code, a prediction error code, or a PASS code. If the code data is an attribute code, the attribute value is decoded based on the code format described with reference to FIG. 12A and transferred to the attribute value generation processing unit 407 as attribute data.

一方、符号フォーマット解析部401は、転送された符号データが予測誤差符号またはPASS符号であれば、図12−1を用いて説明した符号フォーマットに基づき予測誤差値または画素値を復号する。そして、復号した予測誤差値または画素値を、予測誤差データまたは画素データとして、予測符号ヘッダまたはPASSヘッダと共に誤差処理部403に転送する。   On the other hand, if the transferred code data is a prediction error code or a PASS code, the code format analysis unit 401 decodes the prediction error value or the pixel value based on the code format described with reference to FIG. Then, the decoded prediction error value or pixel value is transferred to the error processing unit 403 together with the prediction code header or the PASS header as prediction error data or pixel data.

さらに、符号フォーマット解析部401は、転送された符号データが予測誤差符号またはPASS符号の場合に、予測誤差符号またはPASS符号に続けて配置されるランレングス符号を取り出す。そして、図12−2を用いて説明した符号フォーマットに基づきランレングス符号をランレングス値に復号し、復号されたランレングス値をランレングスデータとしてランレングス処理部402および属性値生成処理部407に転送する。   Furthermore, when the transferred code data is a prediction error code or a PASS code, the code format analysis unit 401 extracts a run-length code arranged after the prediction error code or the PASS code. Then, the run-length code is decoded into the run-length value based on the code format described with reference to FIG. 12-2, and the decoded run-length value is used as run-length data in the run-length processing unit 402 and the attribute value generation processing unit 407. Forward.

誤差処理部403において、画素値生成処理部414は、符号フォーマット解析部401から転送されたヘッダが予測誤差ヘッダおよびPASSヘッダの何れであるかを判定する。若し、ヘッダがPASSヘッダであると判定されたら、符号フォーマット解析部401からヘッダと共に転送されたデータが画素データそのものであるので、当該画素データをラインメモリ制御処理部404に転送する。   In the error processing unit 403, the pixel value generation processing unit 414 determines whether the header transferred from the code format analysis unit 401 is a prediction error header or a PASS header. If it is determined that the header is a PASS header, since the data transferred from the code format analysis unit 401 together with the header is pixel data itself, the pixel data is transferred to the line memory control processing unit 404.

一方、符号フォーマット解析部401から転送されたヘッダが予測誤差ヘッダであると判定されたら、予測処理部413により、ラインメモリ制御処理部404によりラインメモリ405から読み出された、注目画素の周辺3画素の復号済みの画素a、bおよびcの画素データに基づき、復号を行う注目画素の画素値を、平面予測により予測する。画素値生成処理部414は、符号フォーマット解析部401から転送された予測誤差データによる予測誤差値と、予測処理部620で予測された予測値とを加算して、注目画素の画素値を生成する。生成された画素値による画素データは、ラインメモリ制御処理部404に転送される。   On the other hand, if it is determined that the header transferred from the code format analysis unit 401 is a prediction error header, the prediction processing unit 413 reads the periphery 3 of the target pixel read from the line memory 405 by the line memory control processing unit 404. Based on the pixel data of the decoded pixels a, b, and c, the pixel value of the target pixel to be decoded is predicted by plane prediction. The pixel value generation processing unit 414 adds the prediction error value based on the prediction error data transferred from the code format analysis unit 401 and the prediction value predicted by the prediction processing unit 620 to generate the pixel value of the target pixel. . Pixel data based on the generated pixel value is transferred to the line memory control processing unit 404.

ランレングス処理部402において、予測処理部410は、ラインメモリ制御処理部404から供給される、注目画素の周辺3画素の復号済みの画素a、bおよびcの画素データに基づき、上述の予測処理部413と同様にして注目画素の画素値を予測して、予測値を画素値生成処理部411に転送する。画素値生成処理部411は、予測処理部410から転送された予測値に基づき画素値を生成する。生成された画素値の画素データは、ランレングス処理制御部412の制御により、符号フォーマット解析部401から転送されたランレングスデータによるランレングス値で示される長さだけ出力される。ランレングス処理部402から出力された画素データは、ラインメモリ制御処理部404に転送される。   In the run length processing unit 402, the prediction processing unit 410 is based on the pixel data of the decoded pixels a, b, and c of the surrounding three pixels of the pixel of interest supplied from the line memory control processing unit 404. Similarly to the unit 413, the pixel value of the target pixel is predicted, and the predicted value is transferred to the pixel value generation processing unit 411. The pixel value generation processing unit 411 generates a pixel value based on the prediction value transferred from the prediction processing unit 410. The generated pixel data of the pixel value is output by the length indicated by the run length value based on the run length data transferred from the code format analysis unit 401 under the control of the run length processing control unit 412. The pixel data output from the run length processing unit 402 is transferred to the line memory control processing unit 404.

ラインメモリ制御処理部404は、ランレングス処理部402および誤差処理部403から転送された画素データをラインメモリ405に書き込むと共に、画像出力部406を介してC+A復号部717から出力する。   The line memory control processing unit 404 writes the pixel data transferred from the run length processing unit 402 and the error processing unit 403 to the line memory 405 and outputs from the C + A decoding unit 717 via the image output unit 406.

なお、ラインメモリ405は、復号を行っている現ラインと、直前に復号が終了した前ラインとの2ライン分の画素データを格納可能とされている。ラインメモリ制御処理部404は、ラインメモリ405に対する画素データの読み書きを制御する。例えば、ラインメモリ制御処理部604は、注目画素の周辺3画素a、bおよびcをラインメモリ405から読み出して、上述の誤差処理部402およびランレングス処理部403にそれぞれ供給する。   Note that the line memory 405 can store pixel data for two lines, a current line that is being decoded and a previous line that has just been decoded. The line memory control processing unit 404 controls reading / writing of pixel data with respect to the line memory 405. For example, the line memory control processing unit 604 reads the peripheral three pixels a, b, and c of the target pixel from the line memory 405 and supplies them to the error processing unit 402 and the run length processing unit 403 described above.

属性値生成処理部407は、符号フォーマット解析部401から転送された属性データを、符号フォーマット解析部401から転送されたランレングスデータによるランレングス値に示される長さだけ出力する。属性値生成処理部407から出力された属性データは、属性出力部408を介してC+A復号部717から出力される。ここで、属性データの出力は、上述した画像出力部406からの画素データの出力と、画素単位で同期的に行われる。   The attribute value generation processing unit 407 outputs the attribute data transferred from the code format analysis unit 401 by the length indicated by the run length value based on the run length data transferred from the code format analysis unit 401. The attribute data output from the attribute value generation processing unit 407 is output from the C + A decoding unit 717 via the attribute output unit 408. Here, the output of the attribute data is performed in synchronism with the output of the pixel data from the image output unit 406 described above in units of pixels.

<復号処理の詳細>
図19は、C+A復号部717で行われる、本実施形態の符号化処理により符号化された符号データに対する復号処理を示す一例のフローチャートである。なお、M+A復号部718、Y+A復号部719およびK+A復号部720での処理は、このC+A復号部717での処理と同一なので、C+A復号部717での処理でCMYK各版の復号処理を代表させて説明する。
<Details of decryption processing>
FIG. 19 is a flowchart illustrating an example of a decoding process performed on the code data encoded by the encoding process according to the present embodiment, which is performed by the C + A decoding unit 717. Note that the processing in the M + A decoding unit 718, the Y + A decoding unit 719, and the K + A decoding unit 720 is the same as the processing in the C + A decoding unit 717. Therefore, the processing in the C + A decoding unit 717 represents the decoding processing of each version of CMYK. I will explain.

ステップS60で、符号読み込み部400によりメインメモリ751のページ符号格納領域751BからC+A版バンド符号が読み込まれる。符号フォーマット解析部401は、符号読み込み部400に読み込まれたC+A版バンド符号の先頭3ビットのヘッダを読み込んで解析し、符号が予測誤差符号、PASS符号および属性符号の何れであるかを判定する(ステップS61およびステップS65)。   In step S60, the code reading unit 400 reads the C + A version band code from the page code storage area 751B of the main memory 751. The code format analysis unit 401 reads and analyzes the header of the first 3 bits of the C + A version band code read by the code reading unit 400, and determines whether the code is a prediction error code, a PASS code, or an attribute code. (Step S61 and Step S65).

すなわち、符号フォーマット解析部401は、先ずステップS61で、ヘッダが予測誤差ヘッダであるか否かを判定する。若し、ヘッダが予測誤差ヘッダではないと判定されたら、処理はステップS65に移行され、当該ヘッダがPASSヘッダであるか否かが判定される。ここで当該ヘッダがPASSヘッダではないと判定されたら、当該ヘッダが属性ヘッダであるため、符号が属性符号に確定される。この場合、処理がステップS67に移行され、ヘッダに続く数値部分が読み込まれ、図12−1を用いて説明した符号フォーマットに従い属性値が求められる。ステップS67で属性値が得られたら、処理は後述するステップS77に移行される。   That is, the code format analysis unit 401 first determines in step S61 whether the header is a prediction error header. If it is determined that the header is not a prediction error header, the process proceeds to step S65 to determine whether the header is a PASS header. If it is determined that the header is not a PASS header, the code is determined to be an attribute code because the header is an attribute header. In this case, the process proceeds to step S67, the numerical part following the header is read, and the attribute value is obtained according to the code format described with reference to FIG. If the attribute value is obtained in step S67, the process proceeds to step S77 described later.

符号フォーマット解析部401により、ステップS61でヘッダが予測誤差ヘッダであると判定されたら、符号が予測誤差符号であるとされ、処理はステップS62に移行される。そして、ヘッダに続く数値部分が読み込まれ、図12−1を用いて説明した符号フォーマットに従い予測誤差値が求められる。次のステップS63で、誤差処理部403内の予測処理部413で、ラインメモリ405から読み出された、復号を行う注目画素GDATAの周辺3画素a、bおよびcの画素値に基づき、上述の式(1)に従い注目画素GDATAの画素値を平面予測により予測する。 If the code format analysis unit 401 determines in step S61 that the header is a prediction error header, the code is determined to be a prediction error code, and the process proceeds to step S62. Then, the numerical part following the header is read, and the prediction error value is obtained according to the code format described with reference to FIG. In the next step S63, based on the pixel values of the surrounding three pixels a, b, and c of the target pixel G DATA to be decoded, read from the line memory 405 by the prediction processing unit 413 in the error processing unit 403. The pixel value of the target pixel G DATA is predicted by plane prediction according to the equation (1).

次のステップS64で、画素値生成処理部414により、ステップS62で求められた予測誤差値とステップS63で求められた予測値とが加算されて、注目画素GDATAの画素値が生成される。そして、処理がステップS68に移行される。 In the next step S64, the pixel value generation processing unit 414 adds the prediction error value obtained in step S62 and the prediction value obtained in step S63 to generate the pixel value of the target pixel GDATA . Then, the process proceeds to step S68.

一方、上述のステップS61でヘッダが予測誤差ヘッダでないと判定され、次のステップS65でヘッダがPASSヘッダであると判定されたら、符号がPASS符号であるとされ、処理はステップS66に移行される。ステップS66では、ヘッダに続く数値部分が読み込まれ、図12−1を用いて説明した符号フォーマットに従いPASS符号から画素値が取り出され、これが注目画素GDATAの画素値とされる。そして、処理がステップS68に移行される。 On the other hand, if it is determined in step S61 described above that the header is not a prediction error header and it is determined in next step S65 that the header is a PASS header, the code is determined to be a PASS code, and the process proceeds to step S66. . In step S66, the numerical value portion following the header is read, and the pixel value is extracted from the PASS code in accordance with the code format described with reference to FIG. 12A, and this is set as the pixel value of the target pixel GDATA . Then, the process proceeds to step S68.

ステップS68では、上述のステップS61の判定処理またはステップS65の判定処理で確定された予測誤差符号またはPASS符号に続けて配置されるランレングス符号が、符号フォーマット解析部401に読み込まれる。そして、次のステップS68で、図12−2を用いて説明した符号フォーマットに従いランレングス符号をランレングス値に復号する。   In step S <b> 68, a run length code arranged subsequent to the prediction error code or the PASS code determined in the determination process in step S <b> 61 or the determination process in step S <b> 65 is read into the code format analysis unit 401. In the next step S68, the run-length code is decoded into the run-length value according to the code format described with reference to FIG.

次のステップS70では、上述のステップS64またはステップS66で求められた注目画素GDATAの画素値が、ラインメモリ405の現ラインの領域に書き込まれる。この注目画素GDATAの画素値は、次のステップS71で、画像出力部406により出力される。また、ステップS71では、上述のステップS67で前回の処理の際に求められ、属性出力部408に保持された属性値も、注目画素GDATAの画素値と同期的に出力される。 In the next step S70, the pixel value of the target pixel GDATA obtained in step S64 or step S66 described above is written in the area of the current line in the line memory 405. The pixel value of the target pixel G DATA is output by the image output unit 406 in the next step S71. In step S71, the attribute value obtained in the previous processing in step S67 and held in the attribute output unit 408 is also output in synchronization with the pixel value of the target pixel GDATA .

ステップS71で画素値および属性値が出力されると、処理はステップS72に移行され、ステップS69で求められたランレングス値が1であるか否かが判定される。若し、ランレングス値が1であると判定されたら、処理は後述するステップS77に移行される。   When the pixel value and the attribute value are output in step S71, the process proceeds to step S72, and it is determined whether or not the run length value obtained in step S69 is 1. If it is determined that the run length value is 1, the process proceeds to step S77 described later.

一方、ランレングス値が1ではないと判定されたら、処理はステップS73に移行される。ステップS73では、ランレングス処理部402内の予測処理部410において、ラインメモリ405から読み出された、復号を行う注目画素の周辺3画素a、bおよびcの画素値に基づき、上述の式(1)に従い注目画素の画素値が平面予測により予測される。そして、この予測により得られた予測値が、注目画素GDATAの画素値とされる。 On the other hand, if it is determined that the run length value is not 1, the process proceeds to step S73. In step S73, the prediction processing unit 410 in the run length processing unit 402 reads out from the line memory 405, based on the pixel values of the three surrounding pixels a, b, and c of the target pixel to be decoded (the above formula ( According to 1), the pixel value of the target pixel is predicted by plane prediction. The predicted value obtained by this prediction is used as the pixel value of the target pixel G DATA .

ステップS73で得られた注目画素GDATAの画素値は、次のステップS74で、ラインメモリ405の現ラインの領域に書き込まれる。この注目画素GDATAの画素値は、次のステップS75で、画像出力部406により出力される。また、ステップS75では、上述のステップS67で前回の処理の際に求められ、属性出力部408に保持された属性値も、注目画素GDATAの画素値と同期的に出力される。 The pixel value of the target pixel G DATA obtained in step S73 is written in the current line area of the line memory 405 in the next step S74. The pixel value of the target pixel G DATA is output by the image output unit 406 in the next step S75. In step S75, the attribute value obtained in the previous process in step S67 and held in the attribute output unit 408 is also output in synchronization with the pixel value of the target pixel GDATA .

次のステップS76では、ステップS69で求められたランレングス値から1を減じた回数だけ、ステップS73〜ステップS75の処理が繰り返されたか否かが判定される。若し、ランレングス値から1を減じた回数だけ処理を行っていないと判定されたら、処理はステップS73に戻される。   In the next step S76, it is determined whether or not the processing in steps S73 to S75 has been repeated by the number of times obtained by subtracting 1 from the run length value obtained in step S69. If it is determined that the process has not been performed the number of times obtained by subtracting 1 from the run length value, the process returns to step S73.

一方、ステップS76で、ランレングス値から1を減じた回数だけ処理を行ったと判定されら、処理はステップS77に移行される。ステップS77では、注目画素GDATAすなわち直前に出力された画素がラインの最終画素であるか否かが判定される。若し、最終画素であると判定されたら、処理はステップS78に移行され、ラインメモリ405において前ラインの領域と現ラインの領域とが切り替えられる。例えば、直前に出力された画素の属する現ラインを復号済みの前ラインとしてラインメモリ405の一方の領域にそのまま保持し、ラインメモリ405の他方の領域を、次に復号を現ラインの画素が格納される領域とする。そして、処理はステップS79に移行される。 On the other hand, if it is determined in step S76 that the process has been performed the number of times obtained by subtracting 1 from the run length value, the process proceeds to step S77. In step S77, it is determined whether or not the target pixel G DATA, that is, the pixel output immediately before is the last pixel of the line. If it is determined that the pixel is the last pixel, the process proceeds to step S78, and the area of the previous line and the area of the current line are switched in the line memory 405. For example, the current line to which the pixel output immediately before belongs is held as it is in the one area of the line memory 405 as a decoded previous line, and the other area of the line memory 405 is stored in the pixel of the current line next. Area. Then, the process proceeds to step S79.

ステップS79では、全ての画素について処理が終了したか否かが判定される。若し、終了したと判定されたら、一連の復号処理が終了される。一方、ステップS79で、全ての画素について処理が終了していないと判定されたら、処理はステップS60に戻され、次の符号について処理が行われる。   In step S79, it is determined whether or not processing has been completed for all pixels. If it is determined that the process has been completed, a series of decoding processes are completed. On the other hand, if it is determined in step S79 that the process has not been completed for all pixels, the process returns to step S60, and the process for the next code is performed.

<復号装置>
図20は、本発明の実施形態によるC+A復号部717の一例の構成を示すブロック図である。なお、M+A復号部718、Y+A復号19およびK+A復号部720は、このC+A復号部717と同様の構成で実現できるので、ここではC+A復号部717でこれらを代表させて説明を行う。
<Decoding device>
FIG. 20 is a block diagram illustrating a configuration example of the C + A decoding unit 717 according to the embodiment of the present invention. Note that the M + A decoding unit 718, the Y + A decoding unit 19 and the K + A decoding unit 720 can be realized with the same configuration as the C + A decoding unit 717, and therefore, here, the C + A decoding unit 717 will be representatively described.

バスアービタI/F500は、バスアービタ708に対するインターフェイスである。バスアービタI/F500は、C+A版符号DMAC713を介してバスアービタ708と通信を行うことで、バス734を介してのメインメモリ751に対する読み出し要求やメインメモリ751からのデータの読み出しを行う。   The bus arbiter I / F 500 is an interface to the bus arbiter 708. The bus arbiter I / F 500 communicates with the bus arbiter 708 via the C + A version code DMAC 713, thereby reading data from the main memory 751 and reading data from the main memory 751 via the bus 734.

バンド符号読み込み部501は、バンド符号アドレス生成部502で生成されたアドレス情報に基づきバスアービタI/F500に対してメモリアドレスを送信する。バスアービタI/F500は、このメモリアドレスをC+A版符号DMAC713を介してバスアービタ708に送信し、バス734を介してメインメモリ751のページ符号格納領域751BからC+A版バンド符号を読み出す。バンド符号読み込み部501は、読み出したC+A版の符号データを、符号フォーマット解析部503に転送する。   The band code reading unit 501 transmits a memory address to the bus arbiter I / F 500 based on the address information generated by the band code address generation unit 502. The bus arbiter I / F 500 transmits this memory address to the bus arbiter 708 via the C + A version code DMAC 713 and reads the C + A version band code from the page code storage area 751B of the main memory 751 via the bus 734. The band code reading unit 501 transfers the read C + A version code data to the code format analysis unit 503.

符号フォーマット解析部503は、転送された符号データのヘッダに基づき、当該符号データが属性符号、予測誤差符号およびPASS符号のうち何れであるかを解析する。そして、当該符号データが属性符号であれば、図12−1を用いて説明した符号フォーマットに基づき属性値を復号し、属性データとして属性値生成処理部510に転送する。   Based on the header of the transferred code data, the code format analysis unit 503 analyzes whether the code data is an attribute code, a prediction error code, or a PASS code. If the code data is an attribute code, the attribute value is decoded based on the code format described with reference to FIG. 12A and transferred to the attribute value generation processing unit 510 as attribute data.

一方、符号フォーマット解析部503は、転送された符号データが予測誤差符号またはPASS符号であれば、図12−1を用いて説明した符号フォーマットに基づき予測誤差値または画素値を復号する。そして、復号した予測誤差値または画素値を、予測誤差データまたは画素データとして、予測誤差ヘッダまたはPASSヘッダと共に誤差処理部505に転送する。   On the other hand, if the transferred code data is a prediction error code or a PASS code, the code format analysis unit 503 decodes the prediction error value or the pixel value based on the code format described with reference to FIG. Then, the decoded prediction error value or pixel value is transferred to the error processing unit 505 together with the prediction error header or the PASS header as prediction error data or pixel data.

さらに、符号フォーマット解析部503は、転送された符号データが予測誤差符号またはPASS符号の場合に、予測誤差符号またはPASS符号からランレングス符号を取り出す。そして、図12−2を用いて説明した符号フォーマットに基づきランレングス符号をランレングス値に復号し、復号されたランレングス値をランレングスデータとしてランレングス処理部504および属性値生成処理部510に転送する。   Furthermore, when the transferred code data is a prediction error code or a PASS code, the code format analysis unit 503 extracts a run-length code from the prediction error code or the PASS code. Then, the run-length code is decoded into the run-length value based on the code format described with reference to FIG. 12-2, and the decoded run-length value is used as run-length data in the run-length processing unit 504 and the attribute value generation processing unit 510. Forward.

誤差処理部505において、予測処理部530は、ラインメモリ制御部7506により第1のラインメモリ507および第2のラインメモリ508からそれぞれ読み出された、注目画素の周辺3画素a、bおよびcの画素データに基づき、復号を行う注目画素の画素値を、平面予測により予測する。予測値を示す予測値データは、画素値生成処理部531に転送される。   In the error processing unit 505, the prediction processing unit 530 reads out the three neighboring pixels a, b, and c of the pixel of interest read from the first line memory 507 and the second line memory 508 by the line memory control unit 7506, respectively. Based on the pixel data, the pixel value of the target pixel to be decoded is predicted by plane prediction. Predicted value data indicating the predicted value is transferred to the pixel value generation processing unit 531.

画素値生成処理部531は、符号フォーマット解析部503から転送されたヘッダが予測誤差ヘッダおよびPASSヘッダの何れであるかを判定する。若し、ヘッダがPASSヘッダであると判定されたら、符号フォーマット解析部401からヘッダと共に転送されたデータが画素データそのものであるので、当該画素データをラインメモリ制御処理部506に転送する。   The pixel value generation processing unit 531 determines whether the header transferred from the code format analysis unit 503 is a prediction error header or a PASS header. If it is determined that the header is a PASS header, since the data transferred from the code format analysis unit 401 together with the header is pixel data itself, the pixel data is transferred to the line memory control processing unit 506.

一方、画素値生成処理部531は、符号フォーマット解析部503から転送されたヘッダが予測誤差ヘッダであると判定されたら、予測処理部530から転送された予測値データが示す予測値と、符号フォーマット解析部503から転送された予測誤差データによる予測誤差値を加算して、注目画素の画素値を生成する。生成された画素値による画素データは、ラインメモリ制御処理部506に転送される。   On the other hand, when the pixel value generation processing unit 531 determines that the header transferred from the code format analysis unit 503 is a prediction error header, the pixel value generation processing unit 531 indicates the prediction value indicated by the prediction value data transferred from the prediction processing unit 530 and the code format. The prediction error value based on the prediction error data transferred from the analysis unit 503 is added to generate a pixel value of the target pixel. Pixel data based on the generated pixel value is transferred to the line memory control processing unit 506.

ランレングス処理部504において、予測処理部510は、予測処理部530は、ラインメモリ制御部7506により第1のラインメモリ507および第2のラインメモリ508からそれぞれ読み出された、注目画素の周辺3画素a、bおよびcの画素データに基づき、上述の予測処理部530と同様にして注目画素の画素値を予測する。予測値を示す予測値データは、画素値生成処理部521に転送される。   In the run-length processing unit 504, the prediction processing unit 510, the prediction processing unit 530, and the peripheral 3 of the target pixel read from the first line memory 507 and the second line memory 508 by the line memory control unit 7506, respectively. Based on the pixel data of the pixels a, b, and c, the pixel value of the target pixel is predicted in the same manner as the prediction processing unit 530 described above. Predicted value data indicating the predicted value is transferred to the pixel value generation processing unit 521.

画素値生成処理部521は、予測処理部620から転送された予測値データに基づき画素値を生成する。生成された画素値の画素データは、ランレングス画素値生成制御処理部522の制御により、符号フォーマット解析部503から転送されたランレングスデータによるランレングス値で示される長さだけ出力される。ランレングス処理部504から出力された画素データは、ラインメモリ制御処理部506に転送される。   The pixel value generation processing unit 521 generates a pixel value based on the prediction value data transferred from the prediction processing unit 620. The pixel data of the generated pixel value is output by the length indicated by the run length value based on the run length data transferred from the code format analysis unit 503 under the control of the run length pixel value generation control processing unit 522. The pixel data output from the run length processing unit 504 is transferred to the line memory control processing unit 506.

ラインメモリ制御処理部506は、ランレングス処理部504および誤差処理部505から転送された画素データを、第1のラインメモリ507および第2のラインメモリ508のうち現ラインのデータが格納される方に書き込むと共に、画像処理部I/F509に転送する。   The line memory control processing unit 506 stores the pixel data transferred from the run length processing unit 504 and the error processing unit 505 and stores the data of the current line in the first line memory 507 and the second line memory 508. Are transferred to the image processing unit I / F 509.

なお、ラインメモリ制御処理部506に対して接続される第1のラインメモリ507および第2のラインメモリ508は、同一のメモリの異なる領域であってもよい。ラインメモリ制御部7506は、第1のラインメモリ507および第2のラインメモリ508の何れか一方を現ラインを格納するメモリとして割り当て、他方を前ラインを格納するメモリとして割り当てる。そして、符号化ラインの符号化が終了したら、メモリの割り当てを切り替える。   Note that the first line memory 507 and the second line memory 508 connected to the line memory control processing unit 506 may be different areas of the same memory. The line memory control unit 7506 assigns one of the first line memory 507 and the second line memory 508 as a memory for storing the current line, and assigns the other as a memory for storing the previous line. When the encoding of the encoding line is completed, the memory allocation is switched.

属性値生成処理部510は、符号フォーマット解析部503から転送された属性データを、符号フォーマット解析部503から転送されたランレングスデータによるランレングス値に示される長さだけ順次、出力する。属性生成処理部510から出力された属性データは、画像処理部I/F509に転送される。   The attribute value generation processing unit 510 sequentially outputs the attribute data transferred from the code format analysis unit 503 by the length indicated by the run length value by the run length data transferred from the code format analysis unit 503. The attribute data output from the attribute generation processing unit 510 is transferred to the image processing unit I / F 509.

画像処理部I/F509は、ラインメモリ制御部7506から転送された画素データと、属性値生成処理部510から転送された属性データを、互いに同期的に出力し、C版階調処理部721に転送する。   The image processing unit I / F 509 outputs the pixel data transferred from the line memory control unit 7506 and the attribute data transferred from the attribute value generation processing unit 510 in synchronization with each other, and outputs them to the C plane gradation processing unit 721. Forward.

<効果>
上述したように、本発明では、画像データと属性データとをランレングス符号化により符号化する際に、画像データのランレングス値を属性データの変化点で終端とさせて、この変化点に属性データの符号を織り込むようにしている。そのため、画像データと属性データとを1の符号に符号化することができ、1の復号装置で画像データと属性データの復号を行うことができ、印字時のバス転送の無駄を省くことが可能である。
<Effect>
As described above, in the present invention, when image data and attribute data are encoded by run-length encoding, the run-length value of the image data is terminated at the change point of the attribute data, and the attribute is assigned to the change point. The sign of the data is incorporated. Therefore, the image data and the attribute data can be encoded into one code, the image data and the attribute data can be decoded by one decoding device, and the waste of bus transfer at the time of printing can be eliminated. It is.

また、画像データの符号化と属性データの符号化とが一体的に行われるので、1の符号化装置で画像データおよび属性データの符号化を行うことができ、装置規模を低減させることができる。   In addition, since the encoding of the image data and the encoding of the attribute data are performed integrally, the image data and the attribute data can be encoded with one encoding device, and the device scale can be reduced. .

さらに、上述した図15および図16に示されるように、ランレングス符号を属性データおよび画像データのそれぞれで持つ必要が無く、符号量の低減が図れる。   Furthermore, as shown in FIGS. 15 and 16 described above, it is not necessary to have run-length codes for attribute data and image data, respectively, and the amount of codes can be reduced.

<他の実施形態>
なお、上述では、本発明の実施形態によるCMYK+A符号化部711、ならびに、C+A復号部717(およびM+A復号部718、Y+A復号部719、K+A復号部720(以下、C+A復号部717で代表させる))を構成する各部がハードウェア的に構成されるように説明したが、これはこの例に限定されない。すなわち、本発明に実施形態に適用な可能な画像処理装置におけるCMYK+A符号化部711およびC+A復号部717は、画像処理装置に組み込まれたCPU(図示しない)上で動作するプログラムとして、それぞれ実現可能である。
<Other embodiments>
In the above description, the CMYK + A encoding unit 711 and the C + A decoding unit 717 (and the M + A decoding unit 718, the Y + A decoding unit 719, and the K + A decoding unit 720 (hereinafter, represented by the C + A decoding unit 717) according to the embodiment of the present invention). However, the present invention is not limited to this example. That is, the CMYK + A encoding unit 711 and the C + A decoding unit 717 in the image processing apparatus applicable to the embodiment of the present invention can be realized as programs that operate on a CPU (not shown) incorporated in the image processing apparatus. It is.

この場合、CPU上でCMYK+A符号化部711として実行されるプログラムは、例えば図10を用いて説明したCMYK+A符号化部711の各機能部(画像読み込み部200、ラインメモリ制御処理部201、予測処理部203、予測誤差処理部204、ランレングス生成処理部205、属性読み込み処理部206、属性変化検出処理部207、符号フォーマット生成処理部4208および符号書き込み部209)を含むモジュール構成となっている。同様に、CPU上でC+A復号部717として実行されるプログラムは、図18を用いて説明したC+A復号部717の各機能部(符号読み込み部400、符号フォーマット解析部401、ランレングス処理部402、予測誤差処理部403、ラインメモリ制御処理部404、画像出力部406、属性値生成処理部407および属性出力部408)を含むモジュール構成となっている。   In this case, the program executed as the CMYK + A encoding unit 711 on the CPU is, for example, each functional unit (image reading unit 200, line memory control processing unit 201, prediction process) of the CMYK + A encoding unit 711 described with reference to FIG. Unit 203, prediction error processing unit 204, run length generation processing unit 205, attribute reading processing unit 206, attribute change detection processing unit 207, code format generation processing unit 4208, and code writing unit 209). Similarly, the program executed as the C + A decoding unit 717 on the CPU is the functional units of the C + A decoding unit 717 described with reference to FIG. 18 (code reading unit 400, code format analysis unit 401, run length processing unit 402, The module configuration includes a prediction error processing unit 403, a line memory control processing unit 404, an image output unit 406, an attribute value generation processing unit 407, and an attribute output unit 408).

これらのプログラムは、ンストール可能な形式又は実行可能な形式のファイルでCD(Compact Disk)、フレキシブルディスク(FD)、DVD(Digital Versatile Disk)などのコンピュータで読み取り可能な記録媒体に記録されて提供される。これに限らず、プログラムは、CPUに接続されるROM(図示しない)に予め記憶させておいてもよい。さらに、プログラムは、インターネットなどのネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよい。また、このプログラムを、インターネットなどのネットワーク経由で提供または配布するように構成してもよい。   These programs are recorded in a computer-readable recording medium such as a CD (Compact Disk), a flexible disk (FD), and a DVD (Digital Versatile Disk) in a format that can be installed or executed. The The program is not limited to this, and the program may be stored in advance in a ROM (not shown) connected to the CPU. Furthermore, the program may be stored on a computer connected to a network such as the Internet and provided by being downloaded via the network. The program may be configured to be provided or distributed via a network such as the Internet.

実際のハードウェアとしては、CPUが、例えば上述した記録媒体から符号化部204や復号部205として機能するプログラムを読み出して実行することにより、上述した各部が主記憶装置(図示しない)上にロードされる。そして、例えばCMYK+A符号化部711を実行するプログラムの場合、画像読み込み部200、ラインメモリ制御処理部201、予測処理部203、予測誤差処理部204、ランレングス生成処理部205、属性読み込み処理部206、属性変化検出処理部207、符号フォーマット生成処理部4208および符号書き込み部209が主記憶装置上に生成されるようになっている。   As actual hardware, the CPU loads, for example, each unit described above onto a main storage device (not shown) by reading and executing a program that functions as the encoding unit 204 or the decoding unit 205 from the recording medium described above, for example. Is done. For example, in the case of a program that executes the CMYK + A encoding unit 711, the image reading unit 200, the line memory control processing unit 201, the prediction processing unit 203, the prediction error processing unit 204, the run length generation processing unit 205, and the attribute reading processing unit 206. The attribute change detection processing unit 207, the code format generation processing unit 4208, and the code writing unit 209 are generated on the main storage device.

1 CPU
3 メモリアービタ
4 メモリコントローラ
6 バスコントローラ
8 バスアービタ
711 CMYK+A符号化部
17 C+A復号部7
18 M+A復号部7
19 Y+A復号部7
20 K+A復号部7
51 メインメモリ
51A CMYKAバンドデータ領域
51B ページ符号格納領域
200 画像読み込み処理部
201 ラインメモリ制御処理部
202 ラインメモリ
203 予測処理部
204 予測誤差処理部
205 ランレングス生成処理部
206 属性読み込み処理部
207 属性変化検出処理部
208 符号フォーマット生成処理部
400 符号読み込み部
401 符号フォーマット解析部
402 ランレングス処理部
403 誤差処理部
404 ラインメモリ制御処理部
405 ラインメモリ
407 属性値生成処理部
1 CPU
3 Memory Arbiter 4 Memory Controller 6 Bus Controller 8 Bus Arbiter 711 CMYK + A Encoding Unit 17 C + A Decoding Unit 7
18 M + A decoding unit 7
19 Y + A decoding unit 7
20 K + A decoding unit 7
51 Main Memory 51A CMYKA Band Data Area 51B Page Code Storage Area 200 Image Reading Processing Unit 201 Line Memory Control Processing Unit 202 Line Memory 203 Prediction Processing Unit 204 Prediction Error Processing Unit 205 Run Length Generation Processing Unit 206 Attribute Reading Processing Unit 207 Attribute Change Detection processing unit 208 Code format generation processing unit 400 Code reading unit 401 Code format analysis unit 402 Run length processing unit 403 Error processing unit 404 Line memory control processing unit 405 Line memory 407 Attribute value generation processing unit

特許第3750367号公報Japanese Patent No. 3750367 特開2001−169120号公報JP 2001-169120 A 特開2002−152518号公報JP 2002-152518 A 特開平11−185024号公報Japanese Patent Laid-Open No. 11-185024 特開2005−309865号公報JP 2005-309865 A 特許第3676078号公報Japanese Patent No. 3676078

Claims (11)

画素データと該画素データに対応する属性データとを符号化する画像処理装置であって、
画素データに基づきランレングスを生成するランレングス生成手段と、
前記ランレングス生成手段で生成された前記ランレングスと、前記属性データとを符号化する符号化手段と、
前記画素データに対応する属性データの変化を検出する検出手段と
を有し、
前記符号化手段は、
前記検出手段で前記属性データの変化が検出された場合に、前記ランレングス生成手段により生成された前記ランレングスを符号化すると共に該ランレングスの初期化を行い、該変化後の該属性データを示す符号と符号化された該ランレングスとを1の符号列で出力する
ことを特徴とする画像処理装置。
An image processing apparatus that encodes pixel data and attribute data corresponding to the pixel data,
Run length generating means for generating a run length based on pixel data;
Encoding means for encoding the run length generated by the run length generation means and the attribute data;
Detecting means for detecting a change in attribute data corresponding to the pixel data;
The encoding means includes
When a change in the attribute data is detected by the detection means, the run length generated by the run length generation means is encoded and the run length is initialized, and the attribute data after the change is An image processing apparatus that outputs the indicated code and the encoded run length as one code string.
注目画素の画素データによる画素値を予測する予測手段と、
前記予測手段で前記注目画素の画素値を予測した予測値の、該注目画素の画素値に対する誤差を算出する予測誤差算出手段と
をさらに有し、
前記ランレングス生成手段は、
前記予測誤差算出手段で算出された前記誤差が0の前記ランレングスを生成する
ことを特徴とする請求項1に記載の画像処理装置。
A prediction means for predicting a pixel value based on pixel data of a target pixel;
Prediction error calculation means for calculating an error of the prediction value obtained by predicting the pixel value of the target pixel by the prediction means with respect to the pixel value of the target pixel;
The run length generating means includes:
The image processing apparatus according to claim 1, wherein the run length in which the error calculated by the prediction error calculation unit is zero is generated.
前記符号化手段は、
前記検出手段で前記属性データの変化が検出され、且つ、前記予測誤差手段で算出された前記誤差が0の場合に、該属性データに対応する画素データによる画素値そのものを示す符号を前記1の符号列に対してさらに出力する
ことを特徴とする請求項2に記載の画像処理装置。
The encoding means includes
When the change of the attribute data is detected by the detection means and the error calculated by the prediction error means is 0, a code indicating the pixel value itself by the pixel data corresponding to the attribute data is The image processing apparatus according to claim 2, further outputting the code string.
前記符号化手段は、
前記ランレングスの符号化をハフマン符号化を用いて行う
ことを特徴とする請求項1乃至請求項3の何れか1項に記載の画像処理装置。
The encoding means includes
The image processing apparatus according to claim 1, wherein the run-length encoding is performed using Huffman encoding.
画素データと該画素データに対応する属性データとを符号化する画像処理方法であって、
画素データに基づきランレングスを生成するランレングス生成ステップと、
前記ランレングス生成ステップにより生成された前記ランレングスと、前記属性データとを符号化する符号化ステップと、
前記画素データに対応する属性データの変化を検出する検出ステップと
を有し、
前記符号化ステップは、
前記検出ステップにより前記属性データの変化が検出された場合に、前記ランレングス生成ステップにより生成された前記ランレングスを符号化すると共に該ランレングスの初期化を行い、該変化後の該属性データを示す符号と符号化された該ランレングスとを1の符号列で出力する
ことを特徴とする画像処理方法。
An image processing method for encoding pixel data and attribute data corresponding to the pixel data,
A run length generating step for generating a run length based on the pixel data;
An encoding step for encoding the run length generated by the run length generation step and the attribute data;
Detecting a change in attribute data corresponding to the pixel data,
The encoding step includes:
When a change in the attribute data is detected in the detection step, the run length generated in the run length generation step is encoded and the run length is initialized, and the attribute data after the change is An image processing method characterized by outputting the indicated code and the encoded run length in one code string.
コンピュータを請求項1乃至請求項4の何れか1項に記載の画像処理装置として機能させるためのプログラム。   A program for causing a computer to function as the image processing apparatus according to any one of claims 1 to 4. 画素データに基づき生成され、該画素データに対応する属性データの変化に応じて符号化されたランレングスと、変化後の該属性データを示す符号とが1の符号列に含まれる符号データを復号する画像処理装置であって、
前記符号データに基づき前記画素データと前記ランレングスと前記属性データとをそれぞれ求める符号処理手段と、
前記符号処理手段で求められた前記ランレングスが示す長さだけ、前記符号処理手段で求められた前記画素データを出力する画素データ出力手段と、
前記符号処理手段で求められた前記ランレングスが示す長さだけ、前記画素データ出力手段と同期的に、前記符号処理手段で求められた前記属性データを出力する属性データ出力手段と
を有する
ことを特徴とする画像処理装置。
Decodes code data including a run length generated based on pixel data and encoded in accordance with a change in attribute data corresponding to the pixel data and a code string including the code indicating the attribute data after the change. An image processing apparatus that
Code processing means for obtaining the pixel data, the run length, and the attribute data, respectively, based on the code data;
Pixel data output means for outputting the pixel data obtained by the code processing means for the length indicated by the run length obtained by the code processing means;
And attribute data output means for outputting the attribute data obtained by the code processing means in synchronization with the pixel data output means for the length indicated by the run length obtained by the code processing means. A featured image processing apparatus.
前記符号データは、注目画素の画素値を符号化済みの画素値に基づき予測した予測値の該注目画素に対する誤差を示す符号をさらに含み、
前記ランレングスは、前記誤差が0の長さを示す値であって、
復号済みの画素データを蓄積的に記憶する記憶手段と、
前記記憶手段に記憶された前記復号済みの画素データに基づき復号対象の画素の画素値を予測する予測手段と
をさらに有し、
前記符号処理手段は、前記符号データに基づき前記誤差をさらに求め、
前記ランレングスが1以外の値の場合、前記予測手段で予測された予測値を画素値として前記画素データを求め、
前記ランレングスが1の場合、前記予測手段で予測された予測値と前記誤差とを加算することで前記画素データを求める
ことを特徴とする請求項7に記載の画像処理装置。
The code data further includes a code indicating an error with respect to the target pixel of a predicted value obtained by predicting the pixel value of the target pixel based on the encoded pixel value;
The run length is a value indicating a length where the error is 0,
Storage means for accumulatively storing the decoded pixel data;
Prediction means for predicting a pixel value of a pixel to be decoded based on the decoded pixel data stored in the storage means;
The code processing means further determines the error based on the code data,
When the run length is a value other than 1, the pixel data is obtained using the prediction value predicted by the prediction means as a pixel value,
The image processing apparatus according to claim 7, wherein when the run length is 1, the pixel data is obtained by adding a prediction value predicted by the prediction unit and the error.
前記符号データは、注目画素の画素値そのものを示す符号をさらに含み、
前記符号処理手段は、前記符号データから前記画素値そのものを示す符号が求められたら、該画素値に基づき前記画素データを求める
ことを特徴とする請求項7または請求項8に記載の画像処理装置。
The code data further includes a code indicating the pixel value itself of the target pixel,
9. The image processing apparatus according to claim 7, wherein when the code indicating the pixel value itself is obtained from the code data, the code processing unit obtains the pixel data based on the pixel value. .
画素データに基づき生成され、該画素データに対応する属性データの変化に応じて符号化されたランレングスと、変化後の該属性データを示す符号とが1の符号列に含まれる符号データを復号する画像処理方法であって、
前記符号データに基づき前記画素データと前記ランレングスと前記属性データとをそれぞれ求める符号処理ステップと、
前記符号処理ステップにより求められた前記ランレングスが示す長さだけ、前記符号処理手段で求められた前記画素データを出力する画素データ出力ステップと、
前記符号処理ステップにより求められた前記ランレングスが示す長さだけ、前記画素データ出力ステップによる前記画素データの出力と同期的に、前記符号処理ステップにより求められた前記属性データを出力する属性データ出力ステップと
を有する
ことを特徴とする画像処理方法。
Decodes code data including a run length generated based on pixel data and encoded in accordance with a change in attribute data corresponding to the pixel data and a code string including the code indicating the attribute data after the change. An image processing method for
A code processing step for determining the pixel data, the run length, and the attribute data based on the code data;
A pixel data output step for outputting the pixel data obtained by the code processing means for the length indicated by the run length obtained by the code processing step;
Attribute data output for outputting the attribute data obtained by the code processing step in synchronization with the output of the pixel data by the pixel data output step by the length indicated by the run length obtained by the code processing step. And an image processing method.
コンピュータを請求項7乃至請求項9の何れか1項に記載の画像処理装置として機能させるためのプログラム。   A program for causing a computer to function as the image processing apparatus according to any one of claims 7 to 9.
JP2009067092A 2009-03-18 2009-03-18 Image processing apparatus, image processing method, and program Expired - Fee Related JP5201040B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009067092A JP5201040B2 (en) 2009-03-18 2009-03-18 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009067092A JP5201040B2 (en) 2009-03-18 2009-03-18 Image processing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2010220127A true JP2010220127A (en) 2010-09-30
JP5201040B2 JP5201040B2 (en) 2013-06-05

Family

ID=42978434

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009067092A Expired - Fee Related JP5201040B2 (en) 2009-03-18 2009-03-18 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP5201040B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014150381A (en) * 2013-01-31 2014-08-21 Ricoh Co Ltd Image processing apparatus, image processing method, and image processing program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006050196A (en) * 2004-08-04 2006-02-16 Fuji Xerox Co Ltd Image coding apparatus, image coding method and program therefor
JP2007036471A (en) * 2005-07-25 2007-02-08 Fuji Xerox Co Ltd Image processing method and image processing apparatus
JP2008301029A (en) * 2007-05-30 2008-12-11 Fuji Xerox Co Ltd Image processing apparatus and program
JP2008311792A (en) * 2007-06-12 2008-12-25 Canon Inc Device for encoding image and control method therefor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006050196A (en) * 2004-08-04 2006-02-16 Fuji Xerox Co Ltd Image coding apparatus, image coding method and program therefor
JP2007036471A (en) * 2005-07-25 2007-02-08 Fuji Xerox Co Ltd Image processing method and image processing apparatus
JP2008301029A (en) * 2007-05-30 2008-12-11 Fuji Xerox Co Ltd Image processing apparatus and program
JP2008311792A (en) * 2007-06-12 2008-12-25 Canon Inc Device for encoding image and control method therefor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014150381A (en) * 2013-01-31 2014-08-21 Ricoh Co Ltd Image processing apparatus, image processing method, and image processing program

Also Published As

Publication number Publication date
JP5201040B2 (en) 2013-06-05

Similar Documents

Publication Publication Date Title
JP5369982B2 (en) Image processing apparatus and image processing method
JP2005309865A (en) Image processing apparatus and method, and computer readable recording medium for recording program for causing computer to implement this method
US8712174B2 (en) Image processing apparatus and image processing method
JP5201040B2 (en) Image processing apparatus, image processing method, and program
JP4568685B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium storing a program for causing a computer to execute the image processing method
JP5218332B2 (en) Image processing apparatus and image processing method
JP4490783B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium storing a program for causing a computer to execute the image processing method
US10656584B2 (en) Image forming apparatus and control method
JP2011019096A (en) Image processor and image processing method
JP2010219777A (en) Apparatus and method for processing image, and program
JP2008023959A (en) Image processor, image processing method and program
JP2019134286A (en) Encoding apparatus, encoding method, and encoding program
JP2011019095A (en) Image processor and image processing method
JP6451221B2 (en) Image processing apparatus and image processing method
JP2010219776A (en) Image processing apparatus and method, and program
JP4229744B2 (en) Image processing apparatus, image processing method, and color image forming apparatus
JP2004236042A (en) Image processor and image processing method
JP2005305873A (en) Image processor, method of processing image, and computer readable recording medium containing program for allowing computer to execute the method
JP2005260872A (en) Image processor and image processing method, and computer-readable recording medium with program for allowing computer to execute image processing method recorded thereon
US9224079B2 (en) Image processing apparatus configured to perform pixel dithering based on dithering table and pass information
JP4450651B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium storing a program for causing a computer to execute the image processing method
JP2005252573A (en) Image processor and picture processing method
JP2004289203A (en) Image processing apparatus, image processing method, and program
JP2008044236A (en) Image processor, image processing method, and program for being executed by computer
JP2005258650A (en) Image processor and image processing method and computer-readable recording medium for recording program for making computer perform image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120228

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120621

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121227

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130128

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

Free format text: PAYMENT UNTIL: 20160222

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees