JP2009159631A - Image processor, image processing method, computer program, and recording medium - Google Patents

Image processor, image processing method, computer program, and recording medium Download PDF

Info

Publication number
JP2009159631A
JP2009159631A JP2009096447A JP2009096447A JP2009159631A JP 2009159631 A JP2009159631 A JP 2009159631A JP 2009096447 A JP2009096447 A JP 2009096447A JP 2009096447 A JP2009096447 A JP 2009096447A JP 2009159631 A JP2009159631 A JP 2009159631A
Authority
JP
Japan
Prior art keywords
block
image processing
pixel
image data
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2009096447A
Other languages
Japanese (ja)
Other versions
JP4777447B2 (en
Inventor
Takashi Ishikawa
尚 石川
Ryoko Mise
良子 三瀬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2009096447A priority Critical patent/JP4777447B2/en
Publication of JP2009159631A publication Critical patent/JP2009159631A/en
Application granted granted Critical
Publication of JP4777447B2 publication Critical patent/JP4777447B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Input (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processor and an image processing method that attain speeding-up of an image processing speed with respect to the whole blocked image data while reducing a memory capacity required for image processing. <P>SOLUTION: The image processor includes a block image processing means for executing image processing in block units to image data input in block units, a conversion means for converting the image data processed in block units into a raster shape, and a pixel image processing means that uses the image data converted into the raster shape so as to execute image processing in one-pixel unit. Image processing applied to the input data is executed in two stages of the block image processing means and the pixel image processing means. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、ブロック化された画像データに対し、クリッピング処理や解像度変換、回転処理等の画像処理を実施するのに好適な画像処理装置及び画像処理方法に関する。   The present invention relates to an image processing apparatus and an image processing method suitable for performing image processing such as clipping processing, resolution conversion, and rotation processing on block image data.

従来、ブロック化された画像データに対して、クリッピング処理、解像度変換処理及び回転処理のような画像処理を行って所望のデータを生成する画像処理装置においては、入力されたブロック状の画像データをラスタ化した後、それぞれの画像処理が行われていた。   Conventionally, in an image processing apparatus that generates desired data by performing image processing such as clipping processing, resolution conversion processing, and rotation processing on block image data, input block-shaped image data is Each image processing was performed after rasterization.

しかしながら、従来の画像処理方法では、一旦ラスタ化した後に画像処理が行われるために、全体の画像処理に要する時間が長くなるだけでなく、画像処理の際に必要となる処理用のメモリを画像処理装置に多く搭載する必要があるという問題があった。また、画像の回転等の並び替え処理を行う場合、従来の方法では並び替え処理のためのバッファが必要であった。また、並び替え処理のためのバッファを削減するために、書き込みアドレスにおいて並び替えを実行した場合は、連続したアドレスにならないため、バーストモードを使用できず、アクセスに時間がかかるという問題もあった。   However, in the conventional image processing method, since the image processing is performed after rasterization, not only the time required for the entire image processing is lengthened, but also the processing memory required for the image processing is stored in the image. There was a problem that it was necessary to mount many in a processing apparatus. Also, when performing rearrangement processing such as image rotation, the conventional method requires a buffer for rearrangement processing. In addition, in order to reduce the buffer for the rearrangement process, when rearrangement is executed at the write address, the burst address cannot be used because access is not continuous, and there is a problem that access takes time. .

本発明は、このような事情を考慮してなされたものであり、ブロック化された画像データに対して画像処理を実施するに際し、画像データ全体に対する画像処理速度を高速化するとともに、画像処理に必要とされるメモリの容量を小さくすることができる画像処理装置及び画像処理方法を提供することを目的とする。   The present invention has been made in consideration of such circumstances. When image processing is performed on blocked image data, the image processing speed for the entire image data is increased, and image processing is performed. An object of the present invention is to provide an image processing apparatus and an image processing method capable of reducing the required memory capacity.

上記目的を達成するため、本発明によれば、ブロック単位に入力された画像データに対して、該ブロック単位に画像処理を実行するブロック画像処理手段と、
前記ブロック単位に処理された前記画像データをラスタ状に変換する変換手段と、
ラスタ状に変換された前記画像データを用いて、1画素単位の画像処理を実行する画素画像処理手段とを備え、
入力された画像データに施す画像処理を前記ブロック画像処理手段と前記画素画像処理手段の2段階にて行うことを特徴とする画像処理装置が提供される。
In order to achieve the above object, according to the present invention, block image processing means for executing image processing in block units on image data input in block units,
Conversion means for converting the image data processed in block units into a raster shape;
Pixel image processing means for performing image processing in units of one pixel using the image data converted into a raster shape,
There is provided an image processing apparatus characterized in that image processing to be performed on input image data is performed in two stages of the block image processing means and the pixel image processing means.

以上説明したように、本発明によれば、画像データに対して処理に必要な範囲を一定のブロック単位で指定して必要な範囲にだけ画像処理を実施し、その後の画像処理より詳細な画像処理を行うので、画像データ全体に対する画像処理速度を高速化するとともに、画像処理に必要とされるメモリも小さくすることができる。また、メモリアクセスの連続性を向上させ、メモリ使用効率を向上することができる。   As described above, according to the present invention, a range required for processing is specified for image data in a certain block unit, image processing is performed only on the required range, and a more detailed image than the subsequent image processing is performed. Since the processing is performed, the image processing speed for the entire image data can be increased, and the memory required for the image processing can be reduced. In addition, the continuity of memory access can be improved and the memory use efficiency can be improved.

本発明の第1の実施形態による画像処理装置の概要を説明するためのブロック図である。It is a block diagram for demonstrating the outline | summary of the image processing apparatus by the 1st Embodiment of this invention. 図1における前段画像処理部21の細部構成を説明するためのブロック図である。It is a block diagram for demonstrating the detailed structure of the front | former stage image process part 21 in FIG. クリッピング処理部211で実施されるクリッピング処理について説明するための概略図である。It is the schematic for demonstrating the clipping process implemented in the clipping process part 211. FIG. 並び替え処理部213で行われる回転処理を説明するための概略図である。It is the schematic for demonstrating the rotation process performed in the rearrangement process part. 第1の実施形態における並び替え処理部213の処理動作の具体例を説明するための図である。It is a figure for demonstrating the specific example of the processing operation of the rearrangement process part 213 in 1st Embodiment. クリッピング処理以降の解像度変換処理と並び替え処理を詳細に説明するための図である。It is a figure for demonstrating in detail the resolution conversion process and rearrangement process after a clipping process. 図15に示したそれぞれのサンプリングポイントの場合における補間係数を示す図である。It is a figure which shows the interpolation coefficient in the case of each sampling point shown in FIG. 第1の実施形態による画像処理装置の動作手順を説明するためのフローチャートである。5 is a flowchart for explaining an operation procedure of the image processing apparatus according to the first embodiment. ステップS82でのクリッピング処理手順を詳細に説明するためのフローチャートである。It is a flowchart for demonstrating in detail the clipping process procedure in step S82. ステップS83で行われる解像度変換処理の詳細を説明するためのフローチャートである。It is a flowchart for demonstrating the detail of the resolution conversion process performed by step S83. 本発明の第2の実施形態に係る画像処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image processing apparatus which concerns on the 2nd Embodiment of this invention. 第2の実施形態に係る画像処理装置による画像処理の具体例を説明するための図である。It is a figure for demonstrating the specific example of the image processing by the image processing apparatus which concerns on 2nd Embodiment. MCU縮小回路112の細部構成を示すブロック図である。3 is a block diagram showing a detailed configuration of an MCU reduction circuit 112. FIG. 横サイズ縮小回路131又は縦サイズ縮小回路132の具体的な構成を示すブロック図である。3 is a block diagram showing a specific configuration of a horizontal size reduction circuit 131 or a vertical size reduction circuit 132. FIG. MCU縮小後のサンプリングポイントを具体的に示す図である。It is a figure which shows the sampling point after MCU reduction concretely. 図12の具体例における輝度信号データがYブロックバッファに格納される様子を示した図である。It is the figure which showed a mode that the luminance signal data in the specific example of FIG. 12 was stored in a Y block buffer. 図12の具体例における色差信号データがCrブロックバッファ及びCbブロックバッファに格納される様子を示した図である。It is the figure which showed a mode that the color difference signal data in the specific example of FIG. 12 was stored in Cr block buffer and Cb block buffer. 回転モードとYブロックバッファの読み出し位置との関係を示す図である。It is a figure which shows the relationship between rotation mode and the reading position of a Y block buffer. 書き込み時にブロック内回転した時の輝度信号データがYブロックバッファに格納される様子を示す図である。It is a figure which shows a mode that the luminance signal data at the time of in-block rotation at the time of writing are stored in a Y block buffer. 書き込み時にブロック内回転した時の色差信号データがCrブロックバッファ及びCbブロックバッファに格納される様子を示す図である。It is a figure which shows a mode that the color difference signal data at the time of in-block rotation at the time of writing are stored in Cr block buffer and Cb block buffer.

以下に本願発明の実施形態を示す。もちろん以下の実施形態は、本願発明の技術分野における当業者による実施を容易にするために開示を提供するものであり、特許請求の範囲によって確定される本願発明の技術的範囲に含まれるほんの一部の実施形態にすぎない。従って、本願明細書に直接的に記載されていない実施形態であっても、技術思想が共通する限り本願発明の技術的範囲に包含されることは当業者にとって自明であろう。   Embodiments of the present invention are shown below. Of course, the following embodiments are provided for facilitating implementation by those skilled in the art of the present invention, and are only included in the technical scope of the present invention defined by the claims. It is only an embodiment of the part. Therefore, it will be apparent to those skilled in the art that even embodiments that are not directly described in the present specification are included in the technical scope of the present invention as long as they share the same technical idea.

なお、以下には便宜上複数の実施形態を記載するが、これらは個別に発明として成立するだけでなく、もちろん、複数の実施形態を適宜組み合わせることでも発明が成立することは、当業者であれば容易に理解できよう。   In addition, although several embodiment is described below for convenience, these are not only materialized as an invention separately, but of course, it will be understood by those skilled in the art that the invention can also be achieved by appropriately combining a plurality of embodiments. Easy to understand.

[第1の実施形態]
以下、図面を参照して、本発明の第1の実施形態による画像処理装置について説明する。
[First Embodiment]
Hereinafter, an image processing apparatus according to a first embodiment of the present invention will be described with reference to the drawings.

図1は、本発明の第1の実施形態による画像処理装置の概要を説明するためのブロック図である。図1において、入力部1から入力される画像データとして、一定サイズ(例えば8×8画素など)にブロック状にスキャンされた画像データが入力される。このようなデータはJPEGのようにブロック符号化した画像データ(符号化データ)を復号化(ブロック復号化)した際(ブロック復号化手順の実行の際)に生成される。   FIG. 1 is a block diagram for explaining the outline of the image processing apparatus according to the first embodiment of the present invention. In FIG. 1, as image data input from the input unit 1, image data scanned in a block shape with a certain size (for example, 8 × 8 pixels) is input. Such data is generated when image data (encoded data) block-encoded as in JPEG is decoded (block decoding) (when the block decoding procedure is executed).

画像処理部2は入力部1に接続し、ブロック化された画像データに各種画像処理をブロック符号化時の処理ブロック単位に行った後(ブロック画像処理手順)、ラスタ化した画像データ(ラスタ状の画像データ)に変換する(変換手順を実行する)前段画像処理部21と、ラスタ変換された画像データに対して画素単位の画像処理(画素画像処理手順)が行われる後段画像処理部22とから構成される。また、出力部3は画像処理部2に接続され、画像処理部2で処理された画像データを外部に出力する、或いは記憶装置等に記憶するための出力装置である。尚、画像処理部2内における画像処理部は上述した2つに限定されるものではなく、1つであっても3つ以上であってもよい。すなわち、本発明は、画像処理後の画像データに対して、所定ブロックごとに画像処理を実行する第1の画像処理手段(前段画像処理部21)を備えることを特徴とする。また、本発明は、第2の画像処理手段(後段画像処理部22)が、1画素単位で画像データを画像処理することを特徴とする。   The image processing unit 2 is connected to the input unit 1, performs various image processing on the block image data in units of processing blocks at the time of block encoding (block image processing procedure), and then rasterizes the image data (raster-like data). The former image processing unit 21 for performing conversion processing (execution of the conversion procedure), and the subsequent image processing unit 22 for performing image processing (pixel image processing procedure) in units of pixels on the raster-converted image data. Consists of The output unit 3 is connected to the image processing unit 2 and is an output device for outputting image data processed by the image processing unit 2 to the outside or storing it in a storage device or the like. The number of image processing units in the image processing unit 2 is not limited to the two described above, and may be one or three or more. That is, the present invention is characterized by including first image processing means (previous image processing unit 21) that performs image processing for each predetermined block on image data after image processing. Further, the present invention is characterized in that the second image processing means (the subsequent image processing unit 22) performs image processing on the image data in units of one pixel.

図2は、図1における前段画像処理部21の細部構成を説明するためのブロック図である。図2に示すように、本実施形態における前段画像処理部21は、入力された画像データの範囲から処理範囲(指定範囲)を指定(抽出処理)するクリッピング処理部211と、画像データの解像度を変換する解像度変換処理部212と、画像データの並び替えを行う並び替え処理部213と、ラスタ化のためのバンドバッファとして使用するSDRAM214とから構成される。   FIG. 2 is a block diagram for explaining a detailed configuration of the pre-stage image processing unit 21 in FIG. As shown in FIG. 2, the pre-stage image processing unit 21 in this embodiment includes a clipping processing unit 211 that specifies (extracts) a processing range (specified range) from the range of input image data, and the resolution of the image data. It comprises a resolution conversion processing unit 212 for converting, a rearrangement processing unit 213 for rearranging image data, and an SDRAM 214 used as a band buffer for rasterization.

尚、図2において、最初の処理部であるクリッピング処理部211へ入力される画像データをData_in、また、各処理部から出力される画像データをDataで示す。そして、説明のために出力される画像データである「Data」の前には、その処理を表す名称を付与している。さらに、最初の処理部であるクリッピング処理部211へ入力された画像データに関する有効信号をValid_in、各処理部で処理される画像データに関する有効信号をValidとする。このValidの前にも、その処理を表す名称を付与している。本実施形態による前段画像処理部21は、入力される画像データData_inと、入力される画像データに関する有効信号Valid_inを用いて、入力された画像データが有効である場合(有効信号Valid_in=Hが入力された場合)についてのみ、入力された画像データを取り込んでそれぞれの処理を行うようにしている。   In FIG. 2, image data input to the clipping processing unit 211, which is the first processing unit, is indicated by Data_in, and image data output from each processing unit is indicated by Data. A name representing the process is given before “Data” which is image data output for explanation. Further, Valid_in is a valid signal related to image data input to the clipping processing unit 211 as the first processing unit, and Valid is a valid signal related to image data processed by each processing unit. A name indicating the processing is also given before this Valid. The pre-stage image processing unit 21 according to the present embodiment uses the input image data Data_in and the valid signal Valid_in related to the input image data when the input image data is valid (the valid signal Valid_in = H is input). Only when the input image data is taken in, the respective processes are performed.

まず、図1に示す入力部1から前段画像処理部21のクリッピング処理部211に対して、画像データData_inと有効信号Valid_inが入力される。上述したように本実施形態では、入力される画像データはブロック化された画像であるとする。例えばクリッピング処理部211には、ブロック符号化する際に用いられた8×8画素のブロックごとの画像データが画像データData_inとして入力され、同時に、入力された画像データが有効データであれば有効信号Valid_in=Hが入力される。なお、無効データの場合はValid_in=Lが入力される。   First, the image data Data_in and the valid signal Valid_in are input from the input unit 1 illustrated in FIG. 1 to the clipping processing unit 211 of the pre-stage image processing unit 21. As described above, in the present embodiment, it is assumed that input image data is a blocked image. For example, image data for each block of 8 × 8 pixels used for block coding is input to the clipping processing unit 211 as image data Data_in, and at the same time, if the input image data is valid data, a valid signal Valid_in = H is input. In the case of invalid data, Valid_in = L is input.

クリッピング処理部211では、入力された画像データがクリッピングされる範囲(クリッピング有効範囲)であるかどうかの判定をブロック単位で行う。その結果、入力された画像データが有効データで、かつ、クリッピング有効範囲内の画像データであると判定された場合は、有効信号(Crip_Valid=H)が出力される。また、当該画像データがクリッピング有効範囲以外あるいは無効データの場合は、有効信号を出力しない(Crip_Valid=L)。あるいは当該画像データがクリッピング有効範囲以外の場合に他の無効信号を出力してもよい。クリッピング処理部211におけるこの動作によって、クリッピング処理部211に接続された解像度変換処理部212では、クリッピング処理部211が有効であると判定したブロックのみについて解像度変換処理を実施することが可能となる。   The clipping processing unit 211 determines whether or not the input image data is within a clipping range (clipping effective range) in units of blocks. As a result, when it is determined that the input image data is valid data and is within the clipping valid range, a valid signal (Crip_Valid = H) is output. If the image data is outside the clipping valid range or invalid data, no valid signal is output (Crip_Valid = L). Alternatively, when the image data is outside the clipping effective range, another invalid signal may be output. By this operation in the clipping processing unit 211, the resolution conversion processing unit 212 connected to the clipping processing unit 211 can perform the resolution conversion processing only for the blocks that are determined to be valid by the clipping processing unit 211.

図3は、クリッピング処理部211で実施されるクリッピング処理について説明するための概略図である。図3(a)に示すように、画像データの横方向をX、縦方向をYとする。このとき、ブロック単位でクリッピングする範囲を次のようにして指定する。すなわち、クリッピング範囲を矩形領域(矩形状の範囲)として、まず領域の左上の頂点をStart_Pointとして、その座標(XS,YS)が指定される。同様に、矩形領域の右下の頂点をEnd_Pointとして、その座標(XE,YE)が指定される。この2点で図3に示すようにして定義することができる矩形領域の範囲で囲まれた部分を本実施形態ではクリッピングし、当該範囲内のブロックについて有効信号Crip_Validを出力する。なお、クリッピング範囲の指定方法は、上記に限らず始点(または終点)とサイズ(幅、高さ)を用いても良い。また、画素単位のクリッピングパラメータからブロック単位のクリッピングパラメータを生成しても良い。   FIG. 3 is a schematic diagram for describing clipping processing performed by the clipping processing unit 211. As shown in FIG. 3A, the horizontal direction of the image data is X and the vertical direction is Y. At this time, the clipping range in block units is designated as follows. That is, the clipping range is set as a rectangular area (rectangular range), and the coordinates (XS, YS) are designated with the top left vertex of the area as Start_Point. Similarly, the coordinate (XE, YE) is designated with End_Point being the lower right vertex of the rectangular area. In this embodiment, a portion surrounded by a rectangular area range that can be defined as shown in FIG. 3 at these two points is clipped, and a valid signal Crip_Valid is output for the blocks in the range. Note that the clipping range designation method is not limited to the above, and the start point (or end point) and size (width, height) may be used. Further, a block unit clipping parameter may be generated from a pixel unit clipping parameter.

尚、本実施形態においてクリッピング処理の際に用いられるブロック形状は、図3(a)に示すような正方形だけに限定せず、図3(b)に示す例のように横長形状のブロックや、図3(c)に示す例のような縦長形状のブロックであってもよい。即ち、任意のブロック形状に適用できる。   Note that the block shape used in the clipping process in the present embodiment is not limited to a square as shown in FIG. 3A, but a horizontally long block as in the example shown in FIG. It may be a vertically long block like the example shown in FIG. That is, it can be applied to any block shape.

上述したように、JPEG画像におけるDCTブロック(8×8画素)単位のように、ブロック化された画像データについては、第1のクリッピング処理にてブロック単位のクリッピングを行うことでブロック単位の出力画素の削減を行い、また、その後の画像処理にて第2クリッピング処理を行うことで画素単位のクリッピングが可能である。そして、このクリッピング処理部211にてブロック単位で画像データを有効データ又は無効データの判定を行い、有効データのみを後段の処理部で処理するようにすることによって、その後の処理において無駄な処理を削減でき、画像処理全体の負荷の軽減を図ることが可能となる。   As described above, for block image data such as a DCT block (8 × 8 pixels) unit in a JPEG image, block-unit output pixels are obtained by performing block unit clipping in the first clipping process. In addition, it is possible to perform clipping in pixel units by performing the second clipping process in the subsequent image processing. Then, the clipping processing unit 211 determines whether the image data is valid data or invalid data in units of blocks, and only the valid data is processed in the subsequent processing unit, thereby performing unnecessary processing in the subsequent processing. It is possible to reduce the load on the entire image processing.

特に、前段画像処理部21の出力をバッファに格納する場合は、バッファ容量の削減も可能である。なお、ブロック単位のクリッピングであるので、ブロック内の画素数などのパラメータは全てのブロックで同一となり、後段の処理も含めてクリッピングのために増加する処理はない。また、上述したようにクリッピング処理は有効信号の操作により行うので、後段処理のインタフェース(I/F)も変更不要である。なお、本実施形態では、以降の処理へクリッピング終了信号(Crip_Finish)を各処理におけるレイテンシ(latency)を補償して伝播することにより、以降の処理を適切なタイミングで終了させるようにしている。この構成により、最終段の処理にて最終画素のタイミングを検出でき、最終処理の終了を割込み信号等によってCPU等へ通知することで無駄な処理(時間)の削減が可能である。   In particular, when the output of the pre-stage image processing unit 21 is stored in a buffer, the buffer capacity can be reduced. Since clipping is performed in units of blocks, parameters such as the number of pixels in the block are the same for all blocks, and there is no processing that increases due to clipping, including subsequent processing. Further, as described above, since the clipping process is performed by operating the valid signal, it is not necessary to change the interface (I / F) of the subsequent process. In this embodiment, the subsequent processing is terminated at an appropriate timing by propagating the clipping end signal (Crip_Finish) to the subsequent processing while compensating for the latency in each processing. With this configuration, the timing of the final pixel can be detected in the final stage processing, and wasteful processing (time) can be reduced by notifying the CPU or the like of the end of the final processing by an interrupt signal or the like.

解像度変換処理部212では、有効信号Crip_Validに対応したブロックに対して解像度変換(Resize)処理が行われる。本実施形態では、解像度変換処理部212はブロックサイズ(Bx×By)の縮小を実行する。例えば、8×8画素のブロックを4×4画素のブロックに変更する。即ち、ブロックサイズの縮小にて出力画素の削減を行うのである。解像度変換処理をブロック内で行うことにより、単純な解像度変換を可能にしている。例えば、入力画像が8×8画素の大きさのブロック状に入力される場合、解像度変換後のブロックサイズは、8×8、7×7、6×6、5×5、4×4、3×3、2×2、1×1の8通りしかなく、係数の生成が容易である。また、横方向・縦方向に同じ縮小回路を用いることができるだけでなく、ラインメモリも不要となる。但し、線形補間の場合は横方向の縮小回路と縦方向の縮小回路との間にブロックの横方向画素分のレジスタが必要となる。   The resolution conversion processing unit 212 performs resolution conversion (Resize) processing on the block corresponding to the valid signal Crip_Valid. In the present embodiment, the resolution conversion processing unit 212 performs block size (Bx × By) reduction. For example, an 8 × 8 pixel block is changed to a 4 × 4 pixel block. That is, output pixels are reduced by reducing the block size. By performing the resolution conversion process within the block, simple resolution conversion is enabled. For example, when an input image is input in a block shape having a size of 8 × 8 pixels, the block size after resolution conversion is 8 × 8, 7 × 7, 6 × 6, 5 × 5, 4 × 4, 3 There are only 8 types of × 3, 2 × 2, and 1 × 1, and the coefficient generation is easy. Further, not only the same reduction circuit can be used in the horizontal direction and the vertical direction, but also a line memory becomes unnecessary. However, in the case of linear interpolation, a register corresponding to the horizontal pixel of the block is required between the horizontal reduction circuit and the vertical reduction circuit.

尚、7×7画素以下に縮小する場合は、適切なタイミングで有効信号出力を無効(Resize_Valid=L)とすることで解像度変換処理部をパイプライン化できる。即ち、パイプライン化した場合、所定のタイミングで不要信号が発生するが、有効信号出力を無効(Resize_Valid=L)とするだけで間引き処理を容易に実行できる。この操作により、縮小率による制御は係数の切り替えと有効信号出力の切り替えのみで良く、処理が簡略化できる。   In the case of reduction to 7 × 7 pixels or less, the resolution conversion processing unit can be pipelined by invalidating the valid signal output (Resize_Valid = L) at an appropriate timing. That is, in the case of pipelining, an unnecessary signal is generated at a predetermined timing, but the thinning-out process can be easily executed only by invalidating the valid signal output (Resize_Valid = L). By this operation, the control based on the reduction ratio is only required to switch the coefficient and the effective signal output, and the processing can be simplified.

このように、入力される画像データのブロックサイズにあわせてブロック内で解像度変換処理を行うことにより、簡単に画像データの解像度変換が実現できる。もちろん、さらに細かな解像度変換を後段画像処理部22等で行うことも可能である。そして、解像度変換されたブロックが、有効画像データの場合は同様にして、解像度変換された画像データResize_Data_outと当該画像データに関する有効信号Resize_validを出力することにより、次に行われる並び替え処理の処理対象をさらに削減することが可能となる。なお、拡大方向の解像度変換は、出力画素数が増加するので、ここでは実行しない。
本実施形態では、ブロック単位の解像度変換処理が横方向と縦方向とで独立して行われる。また、本実施形態では、解像度変換処理における横方向の縮小率をRx、縦方向の縮小率をRyとするとき、ブロック単位の解像度変換処理における画像データの出力サイズが、
n/Bx≦Rx<(n+1)/Bx、但しnは1からBxまでの整数、
m/By≦Ry<(m+1)/By、但しmは1からByまでの整数、
を満たすn×mである。また、本実施形態では、横方向及び縦方向の解像度変換処理が、入力された画像データのブロック上の位置に応じて補間係数を切り替え、補間点以外のデータを無効データとする。また、横方向の解像度変換処理ではブロック右端の画素演算時を無効データとし、縦方向の解像度変換処理ではブロック下端の画素演算時を無効データとする。また、本実施形態では、横方向及び縦方向の解像度変換処理は、補間係数が設定可能な最大値の場合、該最大値となる係数が乗算される画素を補間出力とする。また、本実施形態では、ブロック画像処理手段による横方向及び縦方向の解像度変換処理は、補間係数が0の場合、0の係数が乗算される画素に対応する画素であって0が乗算されない方の画素を補間出力とする。
Thus, by performing resolution conversion processing within a block in accordance with the block size of input image data, it is possible to easily realize resolution conversion of image data. Of course, further fine resolution conversion can be performed by the post-stage image processing unit 22 or the like. Similarly, when the resolution-converted block is valid image data, by outputting the resolution-converted image data Resize_Data_out and the valid signal Resize_valid related to the image data, the processing target of the next rearrangement process is performed. Can be further reduced. Note that resolution conversion in the enlargement direction is not performed here because the number of output pixels increases.
In the present embodiment, resolution conversion processing in units of blocks is performed independently in the horizontal direction and the vertical direction. In this embodiment, when the horizontal reduction rate in the resolution conversion process is Rx and the vertical reduction rate is Ry, the output size of the image data in the block-unit resolution conversion process is
n / Bx ≦ Rx <(n + 1) / Bx, where n is an integer from 1 to Bx,
m / By ≦ Ry <(m + 1) / By, where m is an integer from 1 to By,
N × m satisfying In the present embodiment, the horizontal and vertical resolution conversion processing switches the interpolation coefficient according to the position on the block of the input image data, and sets data other than the interpolation point as invalid data. Also, in the horizontal resolution conversion process, the pixel calculation at the right end of the block is invalid data, and in the vertical resolution conversion process, the pixel calculation at the bottom end of the block is invalid data. In the present embodiment, in the horizontal and vertical resolution conversion processing, when the interpolation coefficient is a maximum value that can be set, a pixel multiplied by the coefficient that is the maximum value is set as an interpolation output. In the present embodiment, the horizontal and vertical resolution conversion processing by the block image processing means is a pixel corresponding to a pixel to be multiplied by a coefficient of 0 and not multiplied by 0 when the interpolation coefficient is 0. This pixel is the interpolation output.

並び替え処理部213における並び替え処理では、YCrCb信号の同時化(点順次化)及び回転、ラスタ化の処理が行われる。通常、ブロック符号化においては符号化効率向上のため、輝度データYと色差データCrCbに変換されて符号化される。従って、本実施形態の並び替え処理部213には輝度データYと色差データCrCbがブロック順に入力される。よって、後段でYCrCbデータをRGBデータに変換するにはYCrCbデータの同時化が必要になる。本実施形態では、このYCrCbデータの同時化のためのバッファを用いてYCrCbデータの同時化及びブロック内回転、ブロック内ラスタ化の処理を同時に実行する。   In the rearrangement process in the rearrangement processing unit 213, YCrCb signal synchronization (dot sequential), rotation, and rasterization are performed. Usually, in block coding, in order to improve coding efficiency, it is converted into luminance data Y and color difference data CrCb and coded. Therefore, the luminance data Y and the color difference data CrCb are input to the rearrangement processing unit 213 of the present embodiment in block order. Therefore, in order to convert YCrCb data to RGB data in the subsequent stage, it is necessary to synchronize the YCrCb data. In the present embodiment, the YCrCb data synchronization, intra-block rotation, and intra-block rasterization processes are simultaneously executed using the YCrCb data synchronization buffer.

まず、Yブロックデータが入力されているときはYブロックバッファ(不図示)に格納し、Crブロックデータが入力されているときはCrブロックバッファ(不図示)に格納し、Cbブロックデータが入力されているときはCbブロックバッファ(不図示)に格納する。次に、Yブロックバッファ、Crブロックバッファ、Cbブロックバッファの画素位置を合せて同時に読み出すことで同時化する。輝度データYと色差データCrCbのサンプリングレートが異なる場合は、サンプリングレートの低い方(通常は、色差データ)のデータを補間して出力する。また、複数ブロックで構成されている場合は、複数ブロックを結合した状態でラスタ化して出力する。   First, when Y block data is input, it is stored in a Y block buffer (not shown). When Cr block data is input, it is stored in a Cr block buffer (not shown), and Cb block data is input. Stored in a Cb block buffer (not shown). Next, the pixel positions of the Y block buffer, Cr block buffer, and Cb block buffer are simultaneously read and synchronized. If the sampling rates of the luminance data Y and the color difference data CrCb are different, the data with the lower sampling rate (usually color difference data) is interpolated and output. In the case of a plurality of blocks, the data is rasterized and output in a state where the plurality of blocks are combined.

画像全体のラスタ化はバンドバッファ(SDRAM214上に構成)に対する格納時に行われる。なお、ここでは上記YCrCbの点順次データをRGBデータに変換した後、上記バンドバッファに格納するものとする。上記ブロック内ラスタ化及びYCrCb同時化(点順次化)された画像データは上記バンドバッファの該当位置にブロック状に格納される。その結果、上記バンドバッファにはクリッピング範囲内のラスタ化された画像が格納される。   Rasterization of the entire image is performed when stored in a band buffer (configured on the SDRAM 214). Here, it is assumed that the YCrCb dot sequential data is converted into RGB data and then stored in the band buffer. The image data subjected to the intra-block rasterization and YCrCb synchronization (dot sequential) is stored in blocks at the corresponding positions of the band buffer. As a result, rasterized images within the clipping range are stored in the band buffer.

また、ラスタ変換の実行と同時に、画像データの回転処理を行う場合には、ブロック内の回転を上記ブロックバッファにて実行した後、回転モードに合せてブロックの先頭アドレスを変更しながらデータをバンドバッファに保存すればよい。予めブロック内の回転を上記ブロックバッファにて実行しておくことで、回転モードによるバンドバッファへの書き込みシーケンスの違いは、ブロックの先頭アドレスの設定のみに集約される。よって、後段画像処理部22等では、ラスタ変換及び回転処理がされたRGB点順次画像データを用いて画像処理を実施することができる。   In addition, when image data is rotated simultaneously with the execution of raster conversion, after the rotation within the block is executed in the block buffer, the data is banded while changing the block start address according to the rotation mode. Save it to the buffer. By executing the rotation in the block in the block buffer in advance, the difference in the write sequence to the band buffer depending on the rotation mode is concentrated only on the setting of the head address of the block. Therefore, the post-stage image processing unit 22 or the like can perform image processing using RGB point sequential image data that has undergone raster conversion and rotation processing.

図4は、並び替え処理部213で行われる回転処理を説明するための概略図である。図4において、回転処理の例として画像データの0度(0°)、90度(90°)、180(180°)度及び270度(270°)の4つの角度(90°単位の回転角)での回転例が示されている。この例で用いられている画像データは、横成分が4ブロック、縦成分が3ブロックの4×3ブロックの画像である。この例に示すように、画素単位での並び替え(回転)処理と、ブロック単位(ブロック自身)での並び替え(回転)処理は同様にして実施することができる。   FIG. 4 is a schematic diagram for explaining the rotation processing performed in the rearrangement processing unit 213. In FIG. 4, as an example of the rotation process, four angles (rotation angles in units of 90 °) of 0 ° (0 °), 90 ° (90 °), 180 (180 °), and 270 ° (270 °) of the image data. ) Example of rotation is shown. The image data used in this example is a 4 × 3 block image with 4 horizontal components and 3 vertical components. As shown in this example, rearrangement (rotation) processing in units of pixels and rearrangement (rotation) processing in units of blocks (blocks themselves) can be performed in the same manner.

図4に示すように、並び替え(回転)処理の対象となる画像40において、画像内の各ブロックには番号が付与されている。この番号は右側の数字が画像のX成分、左側の数字が画像のY成分としている。すなわち、X=0、Y=0のブロックは、「00」で表され、X方向に1ずれた、すなわちブロック00の右隣のブロックは「01」で表現されている。   As shown in FIG. 4, in an image 40 that is the target of the rearrangement (rotation) process, a number is assigned to each block in the image. In this number, the number on the right is the X component of the image, and the number on the left is the Y component of the image. That is, a block with X = 0 and Y = 0 is represented by “00”, and a block shifted by 1 in the X direction, that is, a block immediately adjacent to the block 00 is represented by “01”.

画像40に対して回転角0度の並び替え処理を実施した場合、画像40と同じ配置の画像41が例えばSDRAM214に記憶される。   When rearrangement processing with a rotation angle of 0 degrees is performed on the image 40, an image 41 having the same arrangement as the image 40 is stored in, for example, the SDRAM 214.

回転角180度の並び替えをした場合、画像43に示すように、画像40において左上に位置したブロック00を右下へ移動しなければならない。このように、ブロック00からブロック23までのすべてのブロックを移動する。また、回転角90度、270度の場合も同様の処理をブロック単位で行うことにより、それぞれ画像42、44に示すような結果となる。なお、90度及び270度の場合は縦横のサイズが逆になる。   When rearrangement is performed at a rotation angle of 180 degrees, as shown in the image 43, the block 00 located at the upper left in the image 40 must be moved to the lower right. In this way, all blocks from block 00 to block 23 are moved. In addition, when the rotation angle is 90 degrees and 270 degrees, the same processing is performed in units of blocks, resulting in the results shown in images 42 and 44, respectively. In the case of 90 degrees and 270 degrees, the vertical and horizontal sizes are reversed.

さらに、並び替え処理部213における処理について説明する。図5は、第1の実施形態における並び替え処理部213の処理動作の具体例を説明するための図である。図5を用いて、画像データのアドレスの連続性を増加させることと、転送効率を向上させる効果が得られる理由について説明する。ここでは並び替え処理部213で、4×4画素のブロックで構成される画像50を180度に回転する処理を行って画像51が生成されるものとする。従来の処理では、入力画素順に画像51の位置に対応するアドレスを生成する処理を行っていたので、画像データがSDRAM214に記録されるような場合、アドレスは減少する方向になるのでバーストモードが使用できず、SDRAM214へのアクセスは1画素ごとになり、転送効率が非常に悪くなっていた。   Furthermore, the process in the rearrangement process part 213 is demonstrated. FIG. 5 is a diagram for explaining a specific example of the processing operation of the rearrangement processing unit 213 according to the first embodiment. The reason why the continuity of the address of the image data is increased and the effect of improving the transfer efficiency is obtained will be described with reference to FIG. Here, it is assumed that the rearrangement processing unit 213 performs processing to rotate the image 50 configured by 4 × 4 pixel blocks by 180 degrees to generate the image 51. In the conventional process, since the address corresponding to the position of the image 51 is generated in the order of the input pixels, when the image data is recorded in the SDRAM 214, the address is in a decreasing direction, so the burst mode is used. It was not possible to access the SDRAM 214 every pixel, and the transfer efficiency was very poor.

しかし、本実施形態では、回転処理を行った後の画像データを、一旦、ブロックバッファ52へ保存する。これによって、アドレスが増加する方向に連続した複数のデータ(図5においては4つのデータ)を一度にSDRAM214へ記録させることが可能になる。すなわち、従来1ブロック16回のアクセスが必要であったのを4回のアクセスで済むようになった。つまり、ブロック内の並び替え処理を行うことによって、アドレスの連続性が増加し、これによって転送効率を向上させることが可能になったのである。   However, in this embodiment, the image data after the rotation process is temporarily stored in the block buffer 52. As a result, a plurality of data (four data in FIG. 5) continuous in the direction of increasing addresses can be recorded in the SDRAM 214 at a time. In other words, it was possible to access four times instead of the conventional 16 times required for one block. In other words, by performing the rearrangement process in the block, the continuity of the address is increased, thereby making it possible to improve the transfer efficiency.

図6は、クリッピング処理以降の解像度変換処理と並び替え処理を詳細に説明するための図である。ここでは、解像度変換部212に対して1ブロックが8×8画素で構成された画像データが入力され、解像度変換によって解像度が4×4画素のブロックに変換されるものとする。そして、並び替え処理部213において、180度回転の並び替え処理が行われるものとする。   FIG. 6 is a diagram for explaining in detail the resolution conversion process and the rearrangement process after the clipping process. Here, it is assumed that image data in which one block is configured by 8 × 8 pixels is input to the resolution conversion unit 212 and is converted into a block having a resolution of 4 × 4 pixels by resolution conversion. Then, it is assumed that the rearrangement processing unit 213 performs a 180-degree rotation rearrangement process.

まず、1ブロック8×8画素(0〜63)のデータが、輝度信号Yの0番目のデータから順番に有効信号Crip_Validと同時に、解像度変換部212に入力される。そして、解像度変換部212において解像度変換処理が行われ、1ブロック4×4画素の画像データに変換される。そして、変換された画像データは上述したような並び替え処理が行われ、一旦、Yブロックバッファ60、Crブロックバッファ61、Cbブロックバッファ62にそれぞれ格納される。1ブロック分のYCrCbデータが格納されると、Yブロックバッファ60、Crブロックバッファ61、Cbブロックバッファ62のそれぞれの先頭より順番に読み出され、RGBデータに変換されてバンドバッファの該当アドレスに格納されて並び替えが完了する。   First, data of one block 8 × 8 pixels (0 to 63) is input to the resolution conversion unit 212 simultaneously with the valid signal Crip_Valid in order from the 0th data of the luminance signal Y. Then, resolution conversion processing is performed in the resolution conversion unit 212 and converted into image data of 1 block 4 × 4 pixels. The converted image data is subjected to the rearrangement process as described above, and is temporarily stored in the Y block buffer 60, the Cr block buffer 61, and the Cb block buffer 62, respectively. When YCrCb data for one block is stored, it is sequentially read from the heads of the Y block buffer 60, Cr block buffer 61, and Cb block buffer 62, converted into RGB data, and stored at the corresponding address of the band buffer. The sorting is completed.

なお、上述したような画像処理部2における各処理の順番は任意である。さらに、何れかの処理が欠落していてもよい。さらにまた、各処理において入力信号をそのまま出力するモード(スルーモード)を設け、各処理の実行を任意に選択することができるようにしてもよい。   Note that the order of the processes in the image processing unit 2 as described above is arbitrary. Furthermore, any processing may be missing. Furthermore, a mode (through mode) in which an input signal is output as it is in each process may be provided so that execution of each process can be arbitrarily selected.

また、上述した実施形態では、ブロック符号化のようにブロック化された画像を例としてSDRAM等の記憶装置を用いた装置による説明を行ったが、これは、ソフトウェア処理で行ってもよい。   In the above-described embodiment, an image using a storage device such as SDRAM is described as an example of a block image such as block coding. However, this may be performed by software processing.

上述したように、本発明は、画像データに対して所定ブロックごとに画像処理を実行する画像処理手段を備える画像処理装置であって、ブロックごとに画像データを画像処理するか否かを判定する判定手段を備え、画像処理手段が、画像処理を実行すると判定されたブロックの画像データについて画像処理を行うことを特徴とする。   As described above, the present invention is an image processing apparatus including an image processing unit that performs image processing on image data for each predetermined block, and determines whether or not image data is to be image processed for each block. A determination unit is provided, and the image processing unit performs image processing on the image data of the block determined to execute the image processing.

また、本発明は、画像データに対して画像処理を実行する範囲を指定する指定手段(クリッピング処理部211)を備えることを特徴とする。さらに、本発明は、画像データを所定解像度に変換する解像度変換手段(解像度変換処理部212)を備えることを特徴とする。さらにまた、本発明は、画像データを構成するブロックの位置を所定位置に並び替える並び替え手段(並び替え処理部213)を備えることを特徴とする。   In addition, the present invention is characterized by comprising designation means (clipping processing unit 211) for designating a range for performing image processing on image data. Furthermore, the present invention is characterized by comprising resolution conversion means (resolution conversion processing unit 212) for converting image data to a predetermined resolution. Furthermore, the present invention is characterized by comprising rearrangement means (rearrangement processing unit 213) for rearranging the positions of blocks constituting image data to predetermined positions.

さらに、本発明は、入力画像データがラスタ化される前のJPEG復号化データであって、画像処理に用いられるブロックが、JPEG復号化が行われた際に用いられたブロック(8×8画素またはMCU)であることを特徴とする。さらにまた、本発明は、画像データがラスタ化される前のMPEG復号化データであって、画像処理に用いられるブロックが、MPEG復号化が行われた際に用いられたブロック(8×8画素またはMB)であることを特徴とする。   Furthermore, the present invention provides JPEG decoded data before input image data is rasterized, and a block used for image processing is a block (8 × 8 pixels) used when JPEG decoding is performed. Or MCU). Furthermore, the present invention provides MPEG decoded data before the image data is rasterized, and a block used for image processing is a block (8 × 8 pixels) used when MPEG decoding is performed. Or MB).

次に、上述した構成による画像処理装置の処理動作について説明する。図8は、第1の実施形態による前段画像処理部21の動作手順を説明するためのフローチャートである。   Next, the processing operation of the image processing apparatus configured as described above will be described. FIG. 8 is a flowchart for explaining the operation procedure of the pre-stage image processing unit 21 according to the first embodiment.

まず、画像処理装置の入力部1から処理対象となる画像データを入力するとともに、不図示の操作部等を用いて上述した各画像処理に必要なパラメータ設定が行われる(ステップS81)。ここで、画像処理におけるパラメータとは、画像をクリッピング処理する範囲の指定、解像度変換処理のサイズ、並び替え処理に必要な回転モード、サンプリングモード(JPEGでの4:4:4、4:2:2:、4:2:0等)、出力バンドバッファの領域等のことである。   First, image data to be processed is input from the input unit 1 of the image processing apparatus, and parameter settings necessary for the above-described image processing are performed using an operation unit (not shown) (step S81). Here, the parameters in the image processing are: designation of a range for clipping an image, resolution conversion processing size, rotation mode necessary for rearrangement processing, sampling mode (JPEG 4: 4: 4, 4: 2: 2: 4: 2: 0, etc.), an output band buffer area, and the like.

次に、入力された画像データに対して、クリッピング処理部211においてクリッピング処理が行われる(ステップS82)。図9は、ステップS82でのクリッピング処理手順を詳細に説明するためのフローチャートである。   Next, clipping processing is performed on the input image data in the clipping processing unit 211 (step S82). FIG. 9 is a flowchart for explaining in detail the clipping processing procedure in step S82.

ここでは、図3に示したように、クリッピングの範囲始点を(XS,YS)とし、終点を(XE,YE)として指定した場合を例に挙げる。上述したように、本発明においては、あるブロック単位でのクリッピングが行われる。尚、より細かいクリッピングを後段処理部で行うことが可能である。このブロック単位とは、例えばJPEGデータであれば、DCTブロックである8×8画素単位、あるいはY,Cr、CbをひとつにまとめたMCUを単位としてもよい。このようなブロック単位でのクリッピング処理を行うことにより、バンドバッファに格納されるデータ量を削減する。これにより後段画像処理部22での処理に要する負荷を軽減することができるだけでなく、画像処理装置全体の処理速度も速くなる。   Here, as shown in FIG. 3, a case where the clipping range start point is designated as (XS, YS) and the end point is designated as (XE, YE) is taken as an example. As described above, in the present invention, clipping is performed in units of a certain block. It should be noted that finer clipping can be performed by the subsequent processing unit. For example, in the case of JPEG data, this block unit may be an 8 × 8 pixel unit that is a DCT block, or an MCU that combines Y, Cr, and Cb into one unit. By performing such block-based clipping processing, the amount of data stored in the band buffer is reduced. This not only reduces the load required for processing in the subsequent image processing unit 22, but also increases the processing speed of the entire image processing apparatus.

ステップS91では、クリッピング処理が終了したか否かの判定が行われる。即ち、クリッピング範囲の指定を始点(XS,YS)と終点(XE,YE)で示される矩形領域とした場合、入力画像ブロックの座標X,YがXE、YEの範囲を共に越えている場合(YES)、すでにクリッピングしたい範囲を越えていることを示すので、ここで終了処理を行う(ステップS93)。この終了処理により、後段画像処理部22に対して終了したことを示す指示(これにより、後段画像処理部22が起動する)や、終了信号(Crip_Finish)の伝播により、前段画像処理部21におけるその後の処理を終了させることも可能である。   In step S91, it is determined whether or not the clipping process has been completed. That is, when the clipping range is designated as a rectangular area indicated by the start point (XS, YS) and the end point (XE, YE), the coordinates X, Y of the input image block exceed both the XE and YE ranges ( YES), since it indicates that the range to be clipped has already been exceeded, an end process is performed here (step S93). By this termination processing, the subsequent image processing unit 22 receives an instruction indicating that the subsequent image processing unit 22 has terminated (thereby, the subsequent image processing unit 22 is activated), or the completion signal (Crip_Finish) is propagated. It is also possible to end the process.

一方、ステップS91においてクリッピング処理が終了していない場合(NO側)、指定した範囲がクリッピング範囲内かの判定が行われる(ステップS92)。その結果、クリッピング範囲内の場合(YES側)、有効データ処理を行って後続する画像処理部(ここでは解像度変換処理ステップS83)に対して有効なデータであることを示す(ステップS94)。一方、ステップS92において有効範囲でないと判定された場合(NO側)、無効データであることを示す(ステップS95)。なお、後続する画像処理部に信号等を出力しないことによって、無効データ処理とすることも可能である。入力ブロックに対する有効データ処理ステップS94及び無効データ処理ステップS95が終了すると、次のブロックの判定のため、終了判定ステップS91に戻り、上記操作を繰り返す。   On the other hand, if the clipping process has not ended in step S91 (NO side), it is determined whether the designated range is within the clipping range (step S92). As a result, if it is within the clipping range (YES side), effective data processing is performed to indicate that the data is valid for the subsequent image processing unit (here, resolution conversion processing step S83) (step S94). On the other hand, if it is determined in step S92 that it is not in the valid range (NO side), it indicates invalid data (step S95). It should be noted that invalid data processing can be performed by not outputting a signal or the like to the subsequent image processing unit. When the valid data processing step S94 and the invalid data processing step S95 for the input block are completed, the process returns to the termination determination step S91 to determine the next block, and the above operation is repeated.

ステップS82においてクリッピング処理にて有効と判断されたブロックには、解像度変換処理が行われる(ステップS83)。図10は、ステップS83で行われる解像度変換処理の詳細を説明するためのフローチャートである。解像度変換処理部212では、まず解像度変換があるか否かの判定が行われる(ステップS101)。その結果、解像度変換がないと判定された場合(NO側)、解像度変換処理を行うことなく終了し、後続する画像処理部に入力された画像データをそのまま渡す。一方、解像度変換があると判定された場合(YES側)、解像度変換のパラメータ設定が行われる(ステップS102)。そして、設定されたパラメータに従い解像度変換処理が行われ、所望のサイズになるように間引き処理や線形補間処理等の処理が行われる(ステップS103)。なお、図8のパラメータ設定ステップS81にて設定された解像度変換処理後のサイズより、解像度変換処理判定ステップS101を行い、パラメータ設定ステップS102を省略することも可能である。例えば、入力画像のブロックの横サイズが8で、解像度変換後の横サイズが8未満の場合、解像度変換を行う。この時、解像度変換後の横サイズが解像度変換のパラメータになっており、たとえは4に設定されている場合、解像度変換によって8×8画素のブロックが4×4のブロックに縮小される。   A resolution conversion process is performed on the block determined to be valid in the clipping process in step S82 (step S83). FIG. 10 is a flowchart for explaining details of the resolution conversion processing performed in step S83. The resolution conversion processing unit 212 first determines whether or not there is resolution conversion (step S101). As a result, when it is determined that there is no resolution conversion (NO side), the process ends without performing the resolution conversion process, and the image data input to the subsequent image processing unit is passed as it is. On the other hand, when it is determined that there is resolution conversion (YES side), resolution conversion parameter setting is performed (step S102). Then, resolution conversion processing is performed according to the set parameters, and processing such as thinning processing and linear interpolation processing is performed so as to obtain a desired size (step S103). Note that the resolution conversion process determination step S101 can be performed based on the size after the resolution conversion process set in the parameter setting step S81 of FIG. 8, and the parameter setting step S102 can be omitted. For example, when the horizontal size of the block of the input image is 8 and the horizontal size after resolution conversion is less than 8, resolution conversion is performed. At this time, the horizontal size after resolution conversion is a parameter for resolution conversion, and if it is set to 4, for example, a block of 8 × 8 pixels is reduced to a 4 × 4 block by resolution conversion.

ステップS83で解像度変換処理が行われた後、並び替え処理部213において、ブロック内の並び替え(回転等)処理が行われる(ステップS84)。そして、処理された画像データがSDRAM214に保存される(ステップS85)。ステップS84において、並び替え処理が実行されることによって保存時にアドレス生成が簡単になるだけでなく、従来の1画素ごとの保存(シングルライト)ではなく、複数個単位の保存(バーストライト)が可能となり、1画素あたりのアクセス速度を早くすることができる。   After the resolution conversion processing is performed in step S83, the rearrangement processing unit 213 performs rearrangement (rotation, etc.) processing within the block (step S84). The processed image data is stored in the SDRAM 214 (step S85). In step S84, the rearrangement process is executed, so that not only address generation is simplified at the time of storage, but also storage of a plurality of units (burst write) is possible instead of conventional pixel-by-pixel storage (single write). Thus, the access speed per pixel can be increased.

すなわち、保存先がSDRAMとすると、SDRAMへの書き込みアドレスの連続性を増加させて、転送効率を上げることが可能となる。さらに、保存先が組み込み機器のメインメモリのように、多くのバスマスタからのアクセスが生じるような場合においては、アクセス効率をあげることによって後段画像処理部22の画像処理だけでなく、他の処理への影響も少なくすることができる。   That is, when the storage destination is SDRAM, it is possible to increase the continuity of the write address to the SDRAM and increase the transfer efficiency. Further, in the case where access from many bus masters occurs, such as the main memory of the embedded device, the storage destination is not only the image processing of the post-stage image processing unit 22 but also other processing by increasing the access efficiency. The influence of can be reduced.

さらにまた、JPEG画像を例にあげて説明すると、クリッピング処理において本実施形態のようにブロック単位で大まかな切り抜きを行い、その後、切り抜いたブロックに対して解像度変換を行い、ラスタ化されたRGB点順次データとして保存することにより、後段処理部における画素単位のクリッピングや、より詳細な解像度変換等の処理をより簡単に行うことができる。   Further, a JPEG image will be described as an example. In clipping processing, rough clipping is performed in units of blocks as in the present embodiment, and then resolution conversion is performed on the extracted blocks, and rasterized RGB points. By storing the data sequentially, it is possible to more easily perform processing such as pixel-by-pixel clipping and more detailed resolution conversion in the subsequent processing unit.

すなわち、本発明に係る画像処理装置は、画像データを画像処理するための条件を設定する条件設定手段と、画像データに対して画像処理を実行する範囲を指定する指定手段と、画像データを所定解像度に変換する解像度変換手段と、画像データを構成するブロック内での順番を並び替える並び替え手段と、並び替えたブロックを記録デバイスの所定位置に記録する記録手段とを備えることを特徴とする。   That is, an image processing apparatus according to the present invention includes a condition setting unit that sets conditions for image processing of image data, a specifying unit that specifies a range for performing image processing on image data, and predetermined image data. The image processing apparatus includes: a resolution conversion unit that converts to a resolution; a rearrangement unit that rearranges the order of blocks in the image data; and a recording unit that records the rearranged block at a predetermined position of the recording device. .

上述したように、ブロック単位でクリッピング処理、解像度変換処理、並び替え処理を行うことにより、処理動作そのものが簡単になるだけでなく、後段処理部への負荷を軽減できるといえる。また、各処理の途中で画像データを保存する場合、その保存に必要な容量も少なくすることが可能となる。   As described above, by performing clipping processing, resolution conversion processing, and rearrangement processing in units of blocks, it can be said that not only the processing operation itself is simplified, but also the load on the subsequent processing unit can be reduced. Further, when image data is stored in the middle of each process, the capacity required for the storage can be reduced.

また、ブロック単位ですでに並び替えを行っているので保存先等へのアドレス生成が簡単になり、また並び替えを行っているので、連続データとして一度に複数のデータを格納することが可能となり、転送効率が良くなる。   In addition, since sorting has already been performed in units of blocks, it is easy to generate addresses to the storage location, etc., and since sorting is performed, it is possible to store multiple data at once as continuous data. , Transfer efficiency is improved.

[第2の実施形態]
図11は、本発明の第2の実施形態に係る画像処理装置の構成を示すブロック図である。図中、110はJPEG復号化回路、111はMCUクリッピング回路、112はMCU縮小回路、113はブロック内回転回路、114はブロックバッファ、115は点順次化回路、116はRGB変換回路、117はページバッファ、118は画素クリッピング回路、119はリサイズ回路である。以下、第1の実施形態と異なる部分のみ説明する。
[Second Embodiment]
FIG. 11 is a block diagram showing a configuration of an image processing apparatus according to the second embodiment of the present invention. In the figure, 110 is a JPEG decoding circuit, 111 is an MCU clipping circuit, 112 is an MCU reduction circuit, 113 is an intra-block rotation circuit, 114 is a block buffer, 115 is a dot sequential circuit, 116 is an RGB conversion circuit, and 117 is a page. A buffer 118 is a pixel clipping circuit, and 119 is a resizing circuit. Only the parts different from the first embodiment will be described below.

入力部1よりJPEG圧縮画像がJPEG復号化回路110に入力され、復号化されてMCU単位に出力される。MCUクリッピング回路111はMCU単位に有効・無効を判定し、有効MCUはMCU縮小回路112で所望のサイズに縮小され、ブロック内回転回路113のアドレス生成によりブロックバッファ114の回転後の所定位置に格納される。MCU1つ分のデータがブロックバッファに格納されると、点順次化回路115はブロックバッファ114よりY、Cr、Cbのデータを同時に読み出しRGB回路116にてRGBデータに変換する。なお、Cr、Cbデータがサブサンプリングされている場合は、点順次化時に補間して出力する。変換されたRGBデータはページバッファ117にMCU単位で回転モードに対応したアドレスに格納される。   A JPEG compressed image is input from the input unit 1 to the JPEG decoding circuit 110, decoded, and output in units of MCU. The MCU clipping circuit 111 determines validity / invalidity for each MCU. The valid MCU is reduced to a desired size by the MCU reduction circuit 112 and stored in a predetermined position after the rotation of the block buffer 114 by the address generation of the intra-block rotation circuit 113. Is done. When the data for one MCU is stored in the block buffer, the dot sequential circuit 115 simultaneously reads Y, Cr, and Cb data from the block buffer 114 and converts them into RGB data by the RGB circuit 116. In addition, when Cr and Cb data are subsampled, they are interpolated and output during dot sequentialization. The converted RGB data is stored in the page buffer 117 at an address corresponding to the rotation mode in MCU units.

1ページ分のデータがページバッファ117に格納されると、不図示のプリントエンジンの同期信号に従ってページバッファ117のページ先頭よりRGBデータが読み出される。画素クリッピング回路118は上記MCUクリッピング回路111でクリッピングされなかった画素をクリップしリサイズ回路119にて所望のサイズに変換した後、出力部よりプリントエンジンに出力される。   When data for one page is stored in the page buffer 117, RGB data is read from the top of the page of the page buffer 117 according to a synchronization signal of a print engine (not shown). The pixel clipping circuit 118 clips the pixels that have not been clipped by the MCU clipping circuit 111, converts them to a desired size by the resizing circuit 119, and then outputs them to the print engine from the output unit.

次に、具体的な動作について説明する。   Next, a specific operation will be described.

図12は、第2の実施形態に係る画像処理装置による画像処理の具体例を説明するための図である。図2に示すように、本実施形態では2272×1704画素、サンプリングモードを4:2:2のJPEG画像から1600×1200画素をトリミングして1ページが680×480画素のプリンタにて出力するものとする。なお、トリミング範囲は左上の頂点を(0,0)としたとき、始点(300,300)と終点(1899,1499)で囲まれる矩形範囲(境界含む)とする。   FIG. 12 is a diagram for explaining a specific example of image processing by the image processing apparatus according to the second embodiment. As shown in FIG. 2, in this embodiment, 2272 × 1704 pixels, sampling mode is 4: 2: 2 from a JPEG image, and 1600 × 1200 pixels are trimmed, and one page is output by a printer having 680 × 480 pixels. And The trimming range is a rectangular range (including the boundary) surrounded by the start point (300, 300) and the end point (1899, 1499), where the upper left vertex is (0, 0).

サンプリングモードは4:2:2であるので、MCUサイズは16×8となる。従って横方向のMCU数は2272/16=142、縦方向のMCU数は1704/8=213(いずれも8ビットで良い)となり、MCUクリッピング回路111の横方向MCUカウンタは142進にセットされる。また、トリミングの始点座標は(300,300)、終点座標は(1899,1499)であるから、MCU有効範囲は(XS,YS)=(18,37)、終点座標は(XE,YE)=(119,187)となる。なお、トリミング領域が必ずしもMCU境界と一致するとは限らないので、始点(XS,YS)は画像データの始点座標及び終点座標をブロックサイズで除したときの小数点以下の数値の切り捨てとなり、終点(XE,YE)は小数点以下の数値の切り上げとなる。具体的には、XSは右4ビットシフトした値、YSは右3ビットシフトした値、XEは右4ビットシフトした値にシフト前の下位4ビットをORした結果(0または1)を加算した値、YEは右3ビットシフトした値にシフト前の下位3ビットをORした結果を加算した値となる。   Since the sampling mode is 4: 2: 2, the MCU size is 16 × 8. Accordingly, the number of MCUs in the horizontal direction is 2272/16 = 142, the number of MCUs in the vertical direction is 1704/8 = 213 (both may be 8 bits), and the horizontal direction MCU counter of the MCU clipping circuit 111 is set to 142 base. . Since the trimming start point coordinates are (300, 300) and the end point coordinates are (1899, 1499), the MCU effective range is (XS, YS) = (18, 37), and the end point coordinates are (XE, YE) =. (119, 187). Since the trimming area does not necessarily coincide with the MCU boundary, the start point (XS, YS) is a value that is rounded down to the end point (XE) when the start point and end point coordinates of the image data are divided by the block size. , YE) rounds up the value after the decimal point. Specifically, XS is the value shifted 4 bits to the right, YS is the value shifted 3 bits to the right, and XE is the value shifted 4 bits to the right, and the result of ORing the lower 4 bits before the shift (0 or 1) is added. The value YE is a value obtained by adding the result of ORing the lower 3 bits before the shift to the value shifted 3 bits to the right.

MCUクリッピング回路111は上記(XS,YS)=(18,37)及び(XE,YE)=(119,187)をMCUカウンタの値と比較し、有効範囲のMCUのときのみ、前述した有効信号Crip_Validを"H"にする。   The MCU clipping circuit 111 compares the above (XS, YS) = (18, 37) and (XE, YE) = (119, 187) with the value of the MCU counter. Set Crip_Valid to “H”.

MCU縮小回路112は有効範囲内のMCUサイズを所定サイズに縮小する。図13は、MCU縮小回路112の細部構成を示すブロック図である。同図に示したように、MCU縮小回路112は、横サイズ縮小回路131と縦サイズ縮小回路132の2つの縮小回路、有効信号生成回路133にて構成される。   The MCU reduction circuit 112 reduces the MCU size within the effective range to a predetermined size. FIG. 13 is a block diagram showing a detailed configuration of the MCU reduction circuit 112. As shown in the figure, the MCU reduction circuit 112 includes two reduction circuits, a horizontal size reduction circuit 131 and a vertical size reduction circuit 132, and an effective signal generation circuit 133.

有効信号生成回路133は入力される上記有効信号Crip_Validに従い、内部の横カウンタ、縦カウンタをインクリメントする。この2つのカウンタにより、ブロック内での画素位置を把握する。本実施形態ではブロックサイズは8×8画素なので、横カウンタ、縦カウンタは共に3ビットで、横カウンタのキャリーで縦カウンタがインクリメントされる。横カウンタの値xは横サイズ縮小回路131に、縦カウンタの値yは縦サイズ縮小回路132に供給され、各々補間係数の選択に使用される。また、横カウンタの値x及び縦カウンタの値yは各々有効信号テーブルに入力され、有効信号に変換される。有効信号テーブルは縮小サイズ別に8ビットの出力を持ち、各カウンタの値より1ビットを選択する。なお、ここでは説明の簡略化ため、テーブル構成としているが、後述するようにカウンタ値より有効信号を直接生成しても良い。生成された縦、横の有効信号は、入力された有効信号Crip_Validにタイミングを合せてANDし、MCU縮小回路有効信号Resize_Validとして出力する。   The valid signal generation circuit 133 increments the internal horizontal counter and vertical counter in accordance with the input valid signal Crip_Valid. By these two counters, the pixel position in the block is grasped. In this embodiment, since the block size is 8 × 8 pixels, the horizontal counter and the vertical counter are both 3 bits, and the vertical counter is incremented by the carry of the horizontal counter. The value x of the horizontal counter is supplied to the horizontal size reduction circuit 131, and the value y of the vertical counter is supplied to the vertical size reduction circuit 132, which is used for selecting an interpolation coefficient. Further, the horizontal counter value x and the vertical counter value y are respectively input to the valid signal table and converted into valid signals. The valid signal table has an 8-bit output for each reduced size, and selects 1 bit from the value of each counter. Here, for simplicity of explanation, a table configuration is used. However, as described later, a valid signal may be directly generated from a counter value. The generated vertical and horizontal valid signals are ANDed with the input valid signal Crip_Valid at the same timing, and output as an MCU reduction circuit valid signal Resize_Valid.

図14は、横サイズ縮小回路131又は縦サイズ縮小回路132の具体的な構成を示すブロック図である。横サイズ縮小回路と縦サイズ縮小回路との違いは、バッファ144の遅延量で、横サイズ縮小回路の場合は1画素分で、縦サイズ縮小回路の場合は1ライン(8画素)分である。ここでは隣接する画素と補間画素との位置より線形補間で求める。例えば、縮小後のサンプリングポイントが画素Aと画素Bの間で、サンプリングポイントから画素Bまでの距離とサンプリングポイントから画素Aまでの距離の比がα:(1−α)のとき、補間ポイントの値Pは、
P=αA+(1−α)B (1)
となる。
FIG. 14 is a block diagram showing a specific configuration of the horizontal size reduction circuit 131 or the vertical size reduction circuit 132. The difference between the horizontal size reduction circuit and the vertical size reduction circuit is the delay amount of the buffer 144, which is one pixel in the case of the horizontal size reduction circuit and one line (8 pixels) in the case of the vertical size reduction circuit. Here, it is obtained by linear interpolation from the positions of adjacent pixels and interpolation pixels. For example, when the reduced sampling point is between the pixel A and the pixel B and the ratio of the distance from the sampling point to the pixel B and the distance from the sampling point to the pixel A is α: (1−α), The value P is
P = αA + (1−α) B (1)
It becomes.

図15は、MCU縮小後のサンプリングポイントを具体的に示す図である。網点がかかっている丸が縮小後のサンプリングポイントを表している。図15において、(a)は7×7画素、(b)は6×6画素、(c)は5×5画素、(d)は4×4画素、(e)は3×3画素、(f)は2×2画素に縮小した場合を示している。なお、1×1画素に縮小した場合は縮小前の(x,y)=(3,3)の位置に一致する。図から明らかなように、縦方向、横方向共に8画素周期の繰返しになっている。つまり、ブロック内で縮小は完結している。なお、折り返しノイズ除去のため、JPEG復号化回路110ではQテーブルを操作し、折り返しノイズとなる高周波成分を排除してから逆DCTするものとし、1×1画素、2×2画素、4×4画素では補間せずに該当する位置のデータがそのまま出てくるものとする。また、図中の円で囲まれた数字は、有効となるタイミングを示している。   FIG. 15 is a diagram specifically showing sampling points after MCU reduction. Circles with halftone dots represent sampling points after reduction. 15, (a) is 7 × 7 pixels, (b) is 6 × 6 pixels, (c) is 5 × 5 pixels, (d) is 4 × 4 pixels, (e) is 3 × 3 pixels, ( f) shows a case where the image is reduced to 2 × 2 pixels. When the image is reduced to 1 × 1 pixel, it matches the position (x, y) = (3, 3) before the reduction. As is apparent from the figure, the cycle is 8 pixel cycles in both the vertical and horizontal directions. That is, the reduction is completed within the block. In order to remove aliasing noise, the JPEG decoding circuit 110 operates the Q table to eliminate high-frequency components that cause aliasing noise, and then performs inverse DCT. 1 × 1 pixel, 2 × 2 pixel, 4 × 4 It is assumed that the data of the corresponding position comes out as it is without interpolation in the pixel. In addition, the numbers surrounded by circles in the figure indicate the effective timing.

図7は、図15に示したそれぞれのサンプリングポイントの場合における補間係数(256倍して整数化した値)を示す図である。ここでα=256は縮小後のサンプリングポイントと入力画素の位置が一致している場合を表し、この場合は補間せずに入力画素データをそのまま出力する。また、上述したように、横サイズ縮小回路と縦サイズ縮小回路の補間回路は同じであるので、補間係数も同一となる。従って、縦サイズ縮小回路132においては、図7におけるxはyに置き換わる。   FIG. 7 is a diagram showing interpolation coefficients (values obtained by multiplying by 256 to an integer) in the case of each sampling point shown in FIG. Here, α = 256 represents a case where the position of the input pixel coincides with the reduced sampling point. In this case, the input pixel data is output as it is without interpolation. As described above, since the interpolation circuit of the horizontal size reduction circuit and the vertical size reduction circuit are the same, the interpolation coefficient is also the same. Accordingly, in the vertical size reduction circuit 132, x in FIG. 7 is replaced with y.

なお、図7で背景がドットになっている欄は無効データを示しており、このタイミングのときの有効信号は"L"(無効)となる。従って、補間係数はどのような値を設定してもかまわない。ここでは、回路の簡略化のため、無効データのときの補間係数も規定している。例えば、全ての係数はx≧4で出現順が逆転(αと(1−α)も入れ替え)するようになっている。また、縮小後のサイズWが6の時と3の時の係数を同一にしている。例えばW=7の時の係数テーブルは(255,219,183,146,110,73,37,0)に設定し、αは左から(1−α)は右から読み出せばよい。なお、係数テーブルのビット数を削減するため、係数が255の時は補間せずに入力データをそのまま出力する(スルーモード)。   In FIG. 7, a column with a background dot indicates invalid data, and the valid signal at this timing is “L” (invalid). Therefore, any value may be set for the interpolation coefficient. Here, in order to simplify the circuit, an interpolation coefficient for invalid data is also defined. For example, all the coefficients are x ≧ 4 and the appearance order is reversed (α and (1-α) are also switched). Further, the coefficients when the size W after reduction is 6 and 3 are the same. For example, the coefficient table when W = 7 is set to (255, 219, 183, 146, 110, 73, 37, 0), and α is read from the left and (1-α) is read from the right. In order to reduce the number of bits in the coefficient table, when the coefficient is 255, the input data is output as it is without interpolation (through mode).

また、縮小後のサイズWが2のべき乗の時は、全てスルーモードとしているので、係数は不要である。さらに、(1−α)はαの2の補数となるので、αのビット反転+1より生成しても良い。この場合、例えば上記W=7の時の係数テーブルは(0,37,73,110)の4つの係数のみで良い。αは(1−α)のビット反転+1より生成し、x≧4では逆順に読み出した値をαに、読み出した値のビット反転+1を(1−α)にセットする。   Further, when the reduced size W is a power of 2, all are set to the through mode, and therefore no coefficient is required. Furthermore, since (1−α) is a 2's complement of α, it may be generated from bit inversion of α + 1. In this case, for example, the coefficient table at the time of W = 7 needs only four coefficients (0, 37, 73, 110). α is generated from bit inversion +1 of (1−α), and when x ≧ 4, the value read in reverse order is set to α, and the bit inversion +1 of the read value is set to (1−α).

なお、x=7(またはy=7)の時、無効データとしているのは、バッファ144による遅延を補償するためである。通常、横サイズ縮小回路では1画素分、縦サイズ縮小回路では8画素分のレイテンシ(遅延)が発生する。このため、MCU縮小回路112の補間出力は9画素分のレイテンシ(遅延)で出力され、入力有効信号及び横サイズ縮小の有効信号は、縦サイズ縮小の有効信号とタイミングを合せてからANDをしなければならない。しかし、上述のようにx=7(またはy=7)の時、無効データとすることで、内部の動作タイミングを入力有効信号に同期化することができ、上記タイミング調整は不要になる。但し、上記横サイズ縮小回路、縦サイズ縮小回路の出力をラッチする場合は、2画素分のレイテンシ補償が必要である。さらに、x=0(またはy=0)のデータも可能な限り使用しないようにしている。これは、DCTの高周波成分削減による歪の影響は周辺部に大きく現れるので、周辺部の画素の使用を避けて上記歪の影響を少なくするためである。   Note that when x = 7 (or y = 7), the invalid data is used to compensate for the delay caused by the buffer 144. Normally, a latency (delay) is generated for one pixel in the horizontal size reduction circuit and for eight pixels in the vertical size reduction circuit. Therefore, the interpolation output of the MCU reduction circuit 112 is output with a latency (delay) of 9 pixels, and the input valid signal and the horizontal size reduction valid signal are ANDed after matching the timing with the vertical size reduction valid signal. There must be. However, as described above, when x = 7 (or y = 7), the invalid operation data can be used to synchronize the internal operation timing with the input valid signal, and the timing adjustment is not necessary. However, when latching the outputs of the horizontal size reduction circuit and the vertical size reduction circuit, latency compensation for two pixels is necessary. Further, data of x = 0 (or y = 0) is not used as much as possible. This is because the influence of distortion due to the reduction of the high-frequency component of the DCT appears greatly in the peripheral part, so that the influence of the distortion is reduced by avoiding the use of pixels in the peripheral part.

上記縮小回路の有効信号は簡単に生成できる。即ち、
W=1の時はx=3で"H"、
W=2の時はxの下位2ビット=01で"H"、
W=3の時はx=1,4,6で"H"、
W=4の時はxのLSB=0で"H"、
W=5の時はx=(2,5,7)以外で"H"、
W=6の時はx=(3,7)以外で"H"、
W=7の時はx=(7)以外で"H"、
となる。
The effective signal of the reduction circuit can be easily generated. That is,
When W = 1, x = 3 and "H"
When W = 2, the lower 2 bits of x = 01 and "H"
When W = 3, x = 1, 4, 6 and “H”,
When W = 4, LSB of x = 0 and "H"
When W = 5, "H" other than x = (2, 5, 7)
When W = 6, “H” except x = (3, 7),
When W = 7, “H” except x = (7),
It becomes.

x=7で常に有効信号を"L"とすれば、さらに簡略化できる。例えば、W=7では判定は不要になり、W=6はW=1の反転で良い。また、W=5はW=3に+1したものの反転であり、2と5(W=3においては1と6)は1の補数の関係にあるので、xのMSBと下位の2ビットそれぞれをEXORすることによって判定すればよい。   Further simplification can be achieved if x = 7 and the effective signal is always "L". For example, when W = 7, the determination is not necessary, and W = 6 may be an inversion of W = 1. Also, W = 5 is an inversion of W = 3 + 1, and 2 and 5 (1 and 6 when W = 3) have a one's complement relationship, so the MSB of x and the lower 2 bits are respectively It may be determined by performing EXOR.

上述したように、ブロックバッファ114ではブロック内の回転及び点順次化が実行される。JPEGの場合、サンプリングモードが4:2:0のときMCUの画素サイズが最大となる。このとき、JPEG復号化回路110からはMCUとして輝度信号が4ブロック(Y0,Y1,Y2,Y3)、色差信号が各1ブロック(Cr、Cb)の6ブロックが8×8画素のブロック毎に順次入力される。ブロックバッファ114には3つのブロックバッファ(Yブロックバッファ、Crブロックバッファ、Cbブロックバッファ)があり、各々個別のRAMより構成されている(但し、CrブロックバッファとCbブロックバッファのアドレスは共通化できるので、データバスの上位・下位に分離して格納することで同一RAM上に構成しても良い)。   As described above, the block buffer 114 performs rotation and dot sequentialization within the block. In the case of JPEG, the MCU pixel size is maximum when the sampling mode is 4: 2: 0. At this time, the JPEG decoding circuit 110 has a luminance signal of 4 blocks (Y0, Y1, Y2, Y3) and a color difference signal of 1 block (Cr, Cb) for each 8 × 8 pixel block as an MCU. Input sequentially. The block buffer 114 has three block buffers (Y block buffer, Cr block buffer, and Cb block buffer), each of which is composed of individual RAMs (however, the addresses of the Cr block buffer and the Cb block buffer can be shared). Therefore, it may be configured on the same RAM by storing the data bus separately on the upper and lower sides of the data bus).

ブロック内回転回路113には入力される上記有効信号Resize_Validに従い、内部の書き込み用横カウンタ、縦カウンタ、ブロックカウンタをインクリメントする。上記縦・横2つのカウンタにより、ブロック内での画素位置を把握し、ブロックカウンタにてブロックの位置を把握する。本実施形態ではブロックサイズは最大8×8画素なので、横カウンタ、縦カウンタは共に3ビットとなる。また、MCU縮小回路112でサイズが変更されている場合は、横カウンタ、縦カウンタはサイズ分のカウンタとなる。即ち、縮小後のサイズをWとすると、カウンタがW−1の時にキャリーが発生し、0に戻る(W進カウンタ)。なお、縦カウンタは、横カウンタのキャリーでインクリメントされる。また、MCU内のYブロックの数は最大4なので、ブロックカウンタは2ビットとなり、横カウンタのキャリーと縦カウンタのキャリーのANDでインクリメントされる。   The internal write horizontal counter, vertical counter, and block counter are incremented in accordance with the valid signal Resize_Valid input to the intra-block rotation circuit 113. The vertical and horizontal counters are used to grasp the pixel position in the block, and the block counter is used to grasp the block position. In this embodiment, since the block size is 8 × 8 pixels at the maximum, both the horizontal counter and the vertical counter are 3 bits. When the size is changed by the MCU reduction circuit 112, the horizontal counter and the vertical counter become counters for the size. That is, assuming that the size after reduction is W, a carry occurs when the counter is W-1, and returns to 0 (W base counter). The vertical counter is incremented by the carry of the horizontal counter. Since the maximum number of Y blocks in the MCU is 4, the block counter has 2 bits and is incremented by AND of the carry of the horizontal counter and the carry of the vertical counter.

書き込み用横カウンタの値をXw、縦カウンタの値をYw、ブロックカウンタの値をBwとすると、Yブロックバッファへの書き込みアドレスは(Bw,Yw,Xw)となる(ここで","はビット結合を示す)。同様にCrブロックバッファとCbブロックバッファの書き込みアドレスは(Yw,Xw)となる。   If the horizontal counter value for writing is Xw, the vertical counter value is Yw, and the block counter value is Bw, the write address to the Y block buffer is (Bw, Yw, Xw) (where "," are bits Indicates binding). Similarly, the write addresses of the Cr block buffer and the Cb block buffer are (Yw, Xw).

図16は、図12の具体例における輝度信号データがYブロックバッファに格納される様子を示した図である。なお、四角の中の番号は格納されるタイミングを示している。本実施形態では、MCU縮小した場合においても、並び替えせずに縮小前の8×8画素単位に格納している。これにより、格納時のアドレスが回転モードに依存しなくなり、アドレス生成が容易になる(アドレス生成部での制御は、Y,Cr,Cbのブロックシーケンス及び縮小後のサイズWによるキャリー制御のみとなる)。   FIG. 16 is a diagram showing how the luminance signal data in the specific example of FIG. 12 is stored in the Y block buffer. The numbers in the squares indicate the storage timing. In this embodiment, even when the MCU is reduced, the data is stored in units of 8 × 8 pixels before reduction without being rearranged. As a result, the address at the time of storage does not depend on the rotation mode, and address generation is facilitated (the control in the address generation unit is only carry control based on the Y, Cr, Cb block sequence and the size W after reduction). ).

図17は、図12の具体例における色差信号データがCrブロックバッファ及びCbブロックバッファ(Crブロックバッファ及びCbブロックバッファは同一のメモリ上に構成しても良い。)に格納される様子を示した図である。なお、四角の中の番号は格納されるタイミングを示している。図中に示したように本実施形態では、MCU縮小にて1/2以下(W≦4)に縮小した場合、サブサンプリングされている方向の縮小後の画素サイズを2倍にする。即ち、輝度信号の縮小後の画素サイズをWとした時、サブサンプリングされている方向の画素データの縮小後のサイズは2Wとなる。この構成により、縮小による色差信号の解像度の劣化を最小にする。   FIG. 17 shows how the color difference signal data in the specific example of FIG. 12 is stored in the Cr block buffer and the Cb block buffer (the Cr block buffer and the Cb block buffer may be configured on the same memory). FIG. The numbers in the squares indicate the storage timing. As shown in the figure, in this embodiment, when the MCU is reduced to ½ or less (W ≦ 4) by MCU reduction, the pixel size after reduction in the sub-sampled direction is doubled. That is, when the pixel size after reduction of the luminance signal is W, the size after reduction of the pixel data in the sub-sampled direction is 2W. With this configuration, the degradation of the resolution of the color difference signal due to the reduction is minimized.

一方、読み出し時は、読み出し用の横カウンタ、縦カウンタ及びブロックカウンタによってアドレスを生成する。上記カウンタの構成はサンプリングモード及び回転モードにより異なる。ここでは、各サンプリングモードに対応するため、Yブロックバッファ用は横カウンタを3ビット、縦カウンタを4ビット、ブロックカウンタを1ビットにて構成し、C(Cr,Cb共通)ブロックバッファ用は横カウンタを4ビット、縦カウンタを3ビットにて構成する。   On the other hand, at the time of reading, an address is generated by a horizontal counter, a vertical counter, and a block counter for reading. The configuration of the counter differs depending on the sampling mode and the rotation mode. Here, in order to correspond to each sampling mode, the horizontal counter for the Y block buffer is composed of 3 bits, the vertical counter is composed of 4 bits, and the block counter is composed of 1 bit, and the C (Cr, Cb common) block buffer is composed of the horizontal counter. The counter is composed of 4 bits and the vertical counter is composed of 3 bits.

例えば、Yブロックバッファ用カウンタの場合、4:4:4モードでは横カウンタ、縦カウンタ共にW進アップダウンカウンタ(3ビット)として動作し、4:2:2モードでは、横カウンタはW進アップダウンカウンタ、縦カウンタは2W進のアップダウンカウンタ(0°、180°)またはW進のアップダウンカウンタ+1ビットのブロックカウンタ(90°、270°)として動作し、4:2:0モードでは、横カウンタはW進アップダウンカウンタ、縦カウンタは2W進のアップダウンカウンタ+1ビットのブロックカウンタとして動作する。上記カウンタ構成の切り替えはキャリー(ボロー)の生成方法によって行う。なお、ダウンカウント時の初期値はW−1(W進)または2W−1(2W進)である。   For example, in the case of a Y block buffer counter, in the 4: 4: 4 mode, both the horizontal counter and the vertical counter operate as a W up / down counter (3 bits), and in the 4: 2: 2 mode, the horizontal counter is up W. The down counter and the vertical counter operate as a 2W base up / down counter (0 °, 180 °) or a W base up / down counter + 1 bit block counter (90 °, 270 °), and in 4: 2: 0 mode, The horizontal counter operates as a W base up / down counter, and the vertical counter operates as a 2W base up / down counter + 1 bit block counter. The counter configuration is switched by a carry (borrow) generation method. Note that the initial value at the time of down-counting is W-1 (W base) or 2W-1 (2W base).

図18は、回転モードとYブロックバッファの読み出し位置との関係を示す図である。図中の四角は8×8画素のブロックを、四角中の数字はブロックの入力順を、小さな四角は縮小後のブロック位置を示している。また、矢印はデータの読み出される方向を示している。また、ドットで示されているブロックは4:2:2モードの時の対象ブロックを示している。   FIG. 18 is a diagram showing the relationship between the rotation mode and the reading position of the Y block buffer. In the figure, squares indicate blocks of 8 × 8 pixels, numbers in the squares indicate the input order of blocks, and small squares indicate block positions after reduction. An arrow indicates the direction in which data is read. A block indicated by a dot indicates a target block in the 4: 2: 2 mode.

Yブロックバッファの読み出し用横カウンタの値をXr、縦カウンタの値をYr(またはYr')、ブロックカウンタの値をBrとし、また、C(Cr,Cb)ブロックバッファの読み出し用横カウンタの値をXcr(またはXcr')、縦カウンタの値をYcr(またはYcr')、とすると、図18より、各ブロックバッファの読み出しアドレスは下記の式で表される。尚、以下では、","はビット結合を、"!"はダウンカウントを示すものとする。
(1)サンプリングモード=4:4:4の時(Y、Cr、Cb共通)
0°のとき: Yr,Xr
90°のとき:!Xr,Yr
180°のとき:!Yr,!Xr
270°のとき: Xr,!Yr
(2)サンプリングモード=4:2:2の時
[Yブロックアドレス]、(Yr'は2W進)
0°のとき:Yr'[0],Yr'[3..1],Xr
90°のとき:Br,!Xr,Yr
180°のとき:!Yr'[0],!Yr'[3..1],!Xr
270°のとき:!Br,Xr,!Yr
[Cr,Cbブロックアドレス](W>4の時、Xcr'、Ycr'は2W進)
0°のとき:Ycr,Xcr'[3..1]
90°のとき:!Xcr,Ycr'[3..1]
180°のとき:!Ycr,!Xcr'[3..1]
270°のとき:Xcr,!Ycr'[3..1]
[Cr,Cbブロックアドレス](W≦4の時、Xcr'、Ycr'は2W進)
0°のとき:Ycr,Xcr'
90°のとき:!Xcr,Ycr'
180°のとき:!Ycr,!Xcr'
270°のとき:Xcr,!Ycr'
(3)サンプリングモード=4:2:0の時
[Yブロックアドレス](Yr'は2W進)
0°のとき:Br,Yr'[0],Yr'[3..1],Xr
90°のとき:!Yr'[0],Br,!Xr,Yr'[3..1]
180°のとき:!Br,!Yr'[0],!Yr'[3..1],!Xr
270°のとき:Yr'[0],!Br,Xr,!Yr'[3..1]
[Cr,Cbブロックアドレス](W>4の時、Xcr'、Ycr'は2W進)
0°のとき:Ycr'[3..1],Xcr'[3..1]
90°のとき:!Xcr'[3..1],Ycr'[3..1]
180°のとき:!Ycr'[3..1],!Xcr'[3..1]
270°のとき:Xcr'[3..1],!Ycr'[3..1]
[Cr,Cbブロックアドレス](W≦4の時、Xcr'、Ycr'は2W進)
0°のとき:Ycr'[3..1],Xcr'
90°のとき:!Xcr'[3..1],Ycr'
180°のとき:!Ycr'[3..1],!Xcr'
270°のとき:Xcr'[3..1],!Ycr'
なお、上記カウンタの内、所定カウンタの機能(アップカウントとダウンカウント)を逆転させることで、縦及び横の任意の鏡像を得ることができる。
The value of the horizontal counter for reading of the Y block buffer is Xr, the value of the vertical counter is Yr (or Yr '), the value of the block counter is Br, and the value of the horizontal counter for reading of the C (Cr, Cb) block buffer Is Xcr (or Xcr ′), and the value of the vertical counter is Ycr (or Ycr ′), the read address of each block buffer is expressed by the following equation from FIG. In the following description, “,” indicates a bit combination, and “!” Indicates a downcount.
(1) When the sampling mode is 4: 4: 4 (common to Y, Cr, Cb)
When 0 °: Yr, Xr
At 90 °! Xr, Yr
At 180 ° :! Yr! Xr
At 270 °: Xr! Yr
(2) Sampling mode = 4: 2: 2 [Y block address], (Yr 'is 2W base)
When 0 °: Yr ′ [0], Yr ′ [3..1], Xr
At 90 °: Br! Xr, Yr
At 180 ° :! Yr '[0] ,! Yr '[3..1] ,! Xr
At 270 ° :! Br, Xr ,! Yr
[Cr, Cb block address] (When W> 4, Xcr ′ and Ycr ′ are in 2W base)
At 0 °: Ycr, Xcr ′ [3..1]
At 90 °! Xcr, Ycr '[3..1]
At 180 ° :! Ycr ,! Xcr '[3..1]
At 270 °: Xcr! Ycr '[3..1]
[Cr, Cb block address] (When W ≦ 4, Xcr ′ and Ycr ′ are in 2W base)
When 0 °: Ycr, Xcr ′
At 90 °! Xcr, Ycr '
At 180 ° :! Ycr ,! Xcr '
At 270 °: Xcr! Ycr '
(3) Sampling mode = 4: 2: 0 [Y block address] (Yr 'is 2W base)
At 0 °: Br, Yr ′ [0], Yr ′ [3..1], Xr
At 90 °! Yr '[0], Br ,! Xr, Yr '[3..1]
At 180 ° :! Br ,! Yr '[0] ,! Yr '[3..1] ,! Xr
At 270 °: Yr ′ [0] ,! Br, Xr ,! Yr '[3..1]
[Cr, Cb block address] (When W> 4, Xcr ′ and Ycr ′ are in 2W base)
At 0 °: Ycr '[3..1], Xcr' [3..1]
At 90 °! Xcr '[3..1], Ycr' [3..1]
At 180 ° :! Ycr '[3..1] ,! Xcr '[3..1]
At 270 °: Xcr '[3..1]! Ycr '[3..1]
[Cr, Cb block address] (When W ≦ 4, Xcr ′ and Ycr ′ are in 2W base)
At 0 °: Ycr ′ [3..1], Xcr ′
At 90 °! Xcr '[3..1], Ycr'
At 180 ° :! Ycr '[3..1] ,! Xcr '
At 270 °: Xcr '[3..1]! Ycr '
Note that, by reversing the function of the predetermined counter (up-counting and down-counting) among the above counters, arbitrary vertical and horizontal mirror images can be obtained.

また、有効信号を操作することにより、各ブロックバッファのカウンタを共通にすることも可能である。この場合、読み出し用の横カウンタ、縦カウンタ及びブロックカウンタは各々3ビット、4ビット、1ビットのバイナリカウンタでよく、Yブロックバッファの読み出しアドレスは、
0°のとき:Br,Yr[0],Yr[3..1],Xr
90°のとき:!Yr[0],Br,!Xr,Yr[3..1]
180°のとき:!Br,!Yr[0],!Yr[3..1],!Xr
270°のとき:Yr[0],!Br,Xr,!Yr[3..1]
のようになる。但し、","はビット結合を、"!"はビット反転を示すものとする(以下同じ)。
Further, it is possible to make the counters of the respective block buffers common by manipulating the valid signal. In this case, the horizontal counter, vertical counter and block counter for reading may be 3-bit, 4-bit and 1-bit binary counters, respectively, and the read address of the Y block buffer is
When 0 °: Br, Yr [0], Yr [3..1], Xr
At 90 °:! Yr [0], Br,! Xr, Yr [3..1]
When 180 °:! Br,! Yr [0],! Yr [3..1],! Xr
When 270 °: Yr [0],! Br, Xr,! Yr [3..1]
become that way. However, “,” indicates bit combination, and “!” Indicates bit inversion (the same applies hereinafter).

また、C(Cr,Cb)ブロックバッファの読み出しアドレスは、
4:2:2モードでW>4の時、
0°のとき:Yr[3..1],Yr[0],Xr[2..1]
90°のとき:!Yr[0],!Xr[2..1],Yr[3..1]
180°のとき:!Yr[3..1],!Yr[0],!Xr[2..1]
270°のとき:Yr[0],Xr[2..1],!Yr[3..1]
4:2:0モードでW>4の時、
0°のとき:Br,Yr[3..2],Yr[0],Xr[2..1]
90°のとき:!Yr[0],!Xr[2..1],Br,Yr[3..2]
180°のとき:!Br,!Yr[3..2],!Yr[0],!Xr[2..1]
270°のとき:Yr[0],Xr[2..1],!Br,!Yr[3..2]
4:2:2モードでW≦4の時、
0°のとき:Yr[3..1],Yr[0],Xr[1..0]
90°のとき:!Xr,Br,Yr[2..1]
180°のとき:!Yr[3..1],!Yr[0],!Xr[1..0]
270°のとき:Xr,!Br,!Yr[2..1]
4:2:0モードでW≦4の時、
0°のとき:Br,Yr[2..1],Yr[0],Xr[1..0]
90°のとき:!Yr[0],!Xr[1..0],Br,Yr[2..1]
180°のとき:!Br,!Yr[2..1],!Yr[0],!Xr[1..0]
270°のとき:Yr[0],Xr[1..0],!Br,!Yr[2..1]
となる。
Also, the read address of the C (Cr, Cb) block buffer is
When W> 4 in 4: 2: 2 mode,
When 0 °: Yr [3..1], Yr [0], Xr [2..1]
At 90 °:! Yr [0],! Xr [2..1], Yr [3..1]
When 180 °:! Yr [3..1],! Yr [0],! Xr [2..1]
When 270 °: Yr [0], Xr [2..1],! Yr [3..1]
When W> 4 in 4: 2: 0 mode,
At 0 °: Br, Yr [3..2], Yr [0], Xr [2..1]
At 90 °:! Yr [0],! Xr [2..1], Br, Yr [3..2]
When 180 °:! Br,! Yr [3..2],! Yr [0],! Xr [2..1]
At 270 °: Yr [0], Xr [2..1],! Br,! Yr [3..2]
When W ≦ 4 in 4: 2: 2 mode,
When 0 °: Yr [3..1], Yr [0], Xr [1..0]
At 90 °:! Xr, Br, Yr [2..1]
When 180 °:! Yr [3..1],! Yr [0],! Xr [1..0]
At 270 °: Xr,! Br,! Yr [2..1]
When W ≦ 4 in 4: 2: 0 mode,
At 0 °: Br, Yr [2..1], Yr [0], Xr [1..0]
At 90 °:! Yr [0],! Xr [1..0], Br, Yr [2..1]
When 180 °:! Br,! Yr [2..1],! Yr [0],! Xr [1..0]
At 270 °: Yr [0], Xr [1..0],! Br,! Yr [2..1]
It becomes.

また、横方向のアドレス(図18のX方向)を反転するだけで横方向の鏡像を、縦方向のアドレス(図18のY方向)を反転するだけで縦方向の鏡像を出力させることができる。   Further, it is possible to output a mirror image in the horizontal direction only by reversing the address in the horizontal direction (X direction in FIG. 18), and a mirror image in the vertical direction only by reversing the address in the vertical direction (Y direction in FIG. 18). .

なお、この場合の有効信号は、
0°のとき:Xr<WかつYr<Wのとき有効
90°のとき:!Xr<WかつYr<Wのとき有効
180°のとき:!Xr<Wかつ!Yr<Wのとき有効
270°のとき:Xr<Wかつ!Yr<Wのとき有効
となる。
In this case, the valid signal is
When 0 °: Valid when Xr <W and Yr <W
When 90 °: Valid when Xr <W and Yr <W When 180 °: Valid when! Xr <W and! Yr <W When 270 °: Valid when Xr <W and! Yr <W Become.

さらに、4:2:2モードで、無効なブロックの読み出しを削減するため、Yブロックバッファの読み出しアドレスを、
0°のとき:0,Yr[0],Yr[3..1],Xr
90°のとき:0,Yr[3],!Xr,Yr[2..0]
180°のとき:0,!Yr[0],!Yr[3..1],!Xr
270°のとき:0,!Yr[3],Xr,!Yr[2..0]
C(Cr,Cb)ブロックバッファの読み出しアドレスをW>4の時、
0°のとき:Yr[3..1],Yr[0],Xr[2..1]
90°のとき:!Xr,Yr[3..1]
180°のとき:!Yr[3..1],!Yr[0],!Xr[2..1]
270°のとき:Xr,!Yr[3..1]
C(Cr,Cb)ブロックバッファの読み出しアドレスをW≦4の時、
0°のとき:Yr[3..1],Yr[0],Xr[1..0]
90°のとき:!Xr,Yr[3],Yr[1..0]
180°のとき:!Yr[3..1],!Yr[0],!Xr[1..0]
270°のとき:Xr,!Yr[3],!Yr[1..0]
に設定するようにしても良い。この場合は図18の灰色のブロックのみ読み出される。
Furthermore, in 4: 2: 2 mode, in order to reduce reading of invalid blocks, the Y block buffer read address is
When 0 °: 0, Yr [0], Yr [3..1], Xr
At 90 °: 0, Yr [3],! Xr, Yr [2..0]
When 180 °: 0,! Yr [0],! Yr [3..1],! Xr
At 270 °: 0,! Yr [3], Xr,! Yr [2..0]
When the read address of the C (Cr, Cb) block buffer is W> 4,
When 0 °: Yr [3..1], Yr [0], Xr [2..1]
At 90 °:! Xr, Yr [3..1]
When 180 °:! Yr [3..1],! Yr [0],! Xr [2..1]
At 270 °: Xr,! Yr [3..1]
When the read address of the C (Cr, Cb) block buffer is W ≦ 4,
When 0 °: Yr [3..1], Yr [0], Xr [1..0]
At 90 °:! Xr, Yr [3], Yr [1..0]
When 180 °:! Yr [3..1],! Yr [0],! Xr [1..0]
At 270 °: Xr,! Yr [3],! Yr [1..0]
You may make it set to. In this case, only the gray block in FIG. 18 is read out.

なお、本実施形態では、ブロックバッファの読み出し時にブロック内回転を行う構成としたが、図19及び図20に示すようにブロックバッファへのデータ書き込み時にブロック内回転した位置へデータを格納するようにしても良い。すなわち、図19は、書き込み時にブロック内回転した時の輝度信号データがYブロックバッファに格納される様子を示す図である。また、図20は、書き込み時にブロック内回転した時の色差信号データがCrブロックバッファ及びCbブロックバッファに格納される様子を示す図である。   In this embodiment, the internal rotation is performed at the time of reading the block buffer. However, as shown in FIGS. 19 and 20, the data is stored at the position rotated within the block at the time of data writing to the block buffer. May be. That is, FIG. 19 is a diagram showing a state in which the luminance signal data when rotating in the block at the time of writing is stored in the Y block buffer. FIG. 20 is a diagram illustrating a state in which the color difference signal data when rotated in the block at the time of writing is stored in the Cr block buffer and the Cb block buffer.

また、本実施形態では、読み出し時に8×8画素単位の識別が可能であるので、読み出し時の有効信号を操作することにより、8×8画素単位のクリッピングを行うことも可能である。この場合、MCU単位、DCTブロック(8×8画素)単位、画素単位の3段階のクリッピングになる。あるいはMCU単位のクリッピングを省略して、DCTブロック(8×8画素)単位、画素単位の2段階のクリッピングとしても良い。   Further, in this embodiment, since it is possible to identify in units of 8 × 8 pixels at the time of reading, it is possible to perform clipping in units of 8 × 8 pixels by manipulating the effective signal at the time of reading. In this case, the clipping is performed in three stages of MCU units, DCT block (8 × 8 pixels) units, and pixel units. Alternatively, clipping in MCU units may be omitted, and two-stage clipping in units of DCT blocks (8 × 8 pixels) and pixels may be used.

さらに、点順次化されたYCrCbデータはRGB変換回路116にてRGBデータに変換され、ページバッファ117に格納される。   Further, the dot-sequential YCrCb data is converted into RGB data by the RGB conversion circuit 116 and stored in the page buffer 117.

さらにまた、ページバッファ117への格納は、上記MCU単位で行われる。   Furthermore, storage in the page buffer 117 is performed in units of the MCU.

MCUの先頭アドレスは、上記ブロック内の並び替えと同様に、横方向のMCUカウンタ及び縦方向のMCUカウンタより生成できる。但し、この場合、複数の乗算が必要となり、アドレス生成が複雑になる。そこで、現画素のアドレスに差分アドレスを加算して次画素のアドレスを求める方法(以下、「差分アドレッシング法」と記す)によりページバッファの格納アドレスを生成する。即ち、直前画素(原画素)のアドレスをA(n−1)、差分アドレス(アドレス差分値)をDとしたとき、現画素のアドレスA(n)を、
A(n)=A(n−1)+D (2)
とする。すなわち、A(n)で示されるバッファのアドレスに次画素データを格納して、ブロック内の画素の並び替え処理が行われる。
The head address of the MCU can be generated from the horizontal MCU counter and the vertical MCU counter in the same manner as the rearrangement in the block. However, in this case, a plurality of multiplications are required, and address generation becomes complicated. Therefore, the storage address of the page buffer is generated by a method of obtaining the address of the next pixel by adding the differential address to the address of the current pixel (hereinafter referred to as “differential addressing method”). That is, when the address of the immediately preceding pixel (original pixel) is A (n-1) and the difference address (address difference value) is D, the address A (n) of the current pixel is
A (n) = A (n-1) + D (2)
And That is, the next pixel data is stored at the buffer address indicated by A (n), and the pixel rearrangement process is performed.

差分アドレスDは、回転やサンプリングモードにより下記に示すシーケンスにて切り替わる。ここで、MCUラインエンド(右端のMCUの最終画素)における差分アドレスをDl、MCUラインエンド以外のMCUエンド(MCUの最終画素)における差分アドレスをDm、MCUエンド以外のブロック内ラインエンド(MCU内の右端画素)における差分アドレスをDbとする。また、MCU内の横方向カウンタの値をx、MCU内の縦方向カウンタの値をy、横方向のMCUカウンタの値をMx、縦方向のMCUカウンタの値をMy、回転後のMCUサイズをWx×Wy、横方向のMCU数をWm、縦方向のMCU数をHmとする。この時の各差分アドレスの切り替えタイミングを下記に示す。   The difference address D is switched in the sequence shown below depending on the rotation and sampling mode. Here, the differential address at the MCU line end (the last pixel of the rightmost MCU) is D1, the differential address at the MCU end (MCU last pixel) other than the MCU line end is Dm, and the intra-block line end other than the MCU end (within the MCU) Let Db be the difference address in the rightmost pixel). Also, the horizontal counter value in the MCU is x, the vertical counter value in the MCU is y, the horizontal MCU counter value is Mx, the vertical MCU counter value is My, and the rotated MCU size is Wx × Wy, the number of MCUs in the horizontal direction is Wm, and the number of MCUs in the vertical direction is Hm. The switching timing of each differential address at this time is shown below.

D=Dl:x=Wx−1、y=Wy−1、z=m−1の時
D=Dm:x=Wx−1、y=Wy−1、z≠m−1の時
D=Db:x=Wx−1、y≠Wy−1の時
D=1 :上記以外
ここで、z=Mx、m=Wm:0°、180°回転時、
z=My、m=Hm:90°、270°回転時である。
D = Dl: When x = Wx−1, y = Wy−1, z = m−1 D = Dm: When x = Wx−1, y = Wy−1, z ≠ m−1 D = Db: When x = Wx-1, y ≠ Wy-1, D = 1: Other than the above, where z = Mx, m = Wm: 0 °, when rotated 180 °,
z = My, m = Hm: 90 ° and 270 °.

また、各差分アドレス及びアドレスの初期値A(0)は、ページバッファの先頭アドレスをAsとすると、
Db=Wm×Wx−Wx+1:各回転モード共通
[0°回転]
A(0)=As
Dl=1
Dm=−Wm×Wx×(Wy−1)+1
[90°回転]
A(0)=As+(Wm−1)×Wx
Dl=−Wm×Wx×(Hm×Wy−1)−2Wx+1
Dm=Wm×Wx−Wx+1
[180°回転]
A(0)=As+Wm×Wx×(Hm−1)×Wy+(Wm−1)×Wx
Dl=−Wm×Wx×(2Wy−1)+(Wm−2)×Wx+1
Dm=−Wm×Wx×(Wy−1)−2Wx+1
[270°回転]
A(0)=As+Wm×Wx×(Hm−1)×Wy
Dl=Wm×Wx×((Hm−2)×Wy+1)+1
Dm=−Wm×Wx×(2Wy−1)−Wx+1
となる。
Also, each difference address and the initial value A (0) of the address is assumed to be As when the top address of the page buffer is As
Db = Wm × Wx−Wx + 1: common to each rotation mode [0 ° rotation]
A (0) = As
Dl = 1
Dm = −Wm × Wx × (Wy−1) +1
[90 ° rotation]
A (0) = As + (Wm−1) × Wx
Dl = −Wm × Wx × (Hm × Wy−1) −2Wx + 1
Dm = Wm × Wx−Wx + 1
[180 ° rotation]
A (0) = As + Wm × Wx × (Hm−1) × Wy + (Wm−1) × Wx
Dl = −Wm × Wx × (2Wy−1) + (Wm−2) × Wx + 1
Dm = −Wm × Wx × (Wy−1) −2Wx + 1
[Rotate 270 °]
A (0) = As + Wm × Wx × (Hm−1) × Wy
Dl = Wm × Wx × ((Hm−2) × Wy + 1) +1
Dm = −Wm × Wx × (2Wy−1) −Wx + 1
It becomes.

例えば、図12の例では、MCUクリッピング回路により101×151MCUの画像になり、MCU縮小回路にて16×8画素のMCUは6×3画素のMCUサイズに縮小され、ブロック内回転回路にて90°回転されて出力される。従って、MCU縮小回転後のMCUサイズは3×6となる。即ち、Wx=3、Wy=6、Wm=151、Hm=101である。よって、ページバッファの先頭アドレスAs=0とおくと、A(0)=450、Dl=−274070、Dm=Db=451となる。MCU内の横方向カウンタxは3進カウンタで、このカウンタのキャリーでMCU内の縦方向カウンタyがカウントアップする。MCU内の縦方向カウンタyは6進カウンタで、このカウンタのキャリーでMCUカウンタMyがカウントアップする。MCUカウンタMyは101進カウンタで、0から100までカウントアップし、0に戻る。なお、横方向のMCUカウンタは不要である。   For example, in the example of FIG. 12, an image of 101 × 151 MCU is obtained by the MCU clipping circuit, an MCU of 16 × 8 pixels is reduced to an MCU size of 6 × 3 pixels by the MCU reduction circuit, and 90 × by the intra-block rotation circuit. ° Rotated and output. Therefore, the MCU size after the MCU reduction rotation is 3 × 6. That is, Wx = 3, Wy = 6, Wm = 151, and Hm = 101. Thus, if the page buffer start address As = 0, then A (0) = 450, Dl = −274070, and Dm = Db = 451. The horizontal counter x in the MCU is a ternary counter, and the vertical counter y in the MCU counts up by the carry of this counter. The vertical counter y in the MCU is a hexadecimal counter, and the MCU counter My counts up with the carry of this counter. The MCU counter My is a 101-ary counter that counts up from 0 to 100 and returns to 0. Note that a horizontal MCU counter is not required.

差分アドレスDは、1,1,451、1、1,451,…,1,1,−274070,…のように、3回に1回451に、1818回(101×6×3回)に1回−274070に切り替わる。即ち、上記カウンタのキャリーに同期して切り替わる。   The differential address D is 1,451,1,451-1,..., 1,1, -274070,... Once in 451, 1818 times (101 × 6 × 3 times). Once switched to -274070. That is, switching is performed in synchronization with the carry of the counter.

上述のように、回転モード、MCU縮小回転後のMCUサイズ、画像の縦及び横のMCU数によって上記パラメータWx、Wy、Wm、Hmが決定され、MCU内の横方向カウンタ、MCU内の縦方向カウンタ、MCUカウンタの構成が決まる。また、上記差分アドレスDl、Dm、Dbは上記パラメータで一意に決まり、パラメータに変更がない限り一定である。したがって、上記差分アドレスDl、Dm、Db及びアドレスの初期値A(0)をレジスタに格納することにより、複雑な演算なしにアドレス生成が可能である。また、上述したように、通常はD=1となる(アドレスが増加する方向に連続する)ので、バーストライトによるメモリの使用効率の向上が可能である。   As described above, the parameters Wx, Wy, Wm, and Hm are determined by the rotation mode, the MCU size after MCU reduction and rotation, and the number of vertical and horizontal MCUs of the image, and the horizontal counter in the MCU and the vertical direction in the MCU. The configuration of the counter and MCU counter is determined. The differential addresses Dl, Dm, and Db are uniquely determined by the parameters and are constant as long as the parameters are not changed. Therefore, by storing the differential addresses Dl, Dm, Db and the initial value A (0) of the address in the register, it is possible to generate an address without complicated calculations. Further, as described above, since D = 1 is normally set (continues in the direction in which the address increases), it is possible to improve the memory usage efficiency by burst write.

ページバッファ上には回転された状態で格納されているので、ページバッファ117からの読み出しは、モードに関係なくページバッファの先頭アドレスAsより順次(連続して)行われる。読み出された画像データは、上記MCUクリッピング回路111でクリッピングされなかった画素を画素クリッピング回路118にてクリップし、リサイズ回路119にて所望のサイズに変換した後、出力部よりプリントエンジンに出力される。例えば、図12の例では、ページバッファ上に453×606画素のサイズで格納されている。これをユーザ設定領域である450×600画素(1200×1600の3/8倍)にクリップして、さらに、出力画像サイズである480×640画素に拡大(16/15倍)して出力部より出力する。   Since it is stored in a rotated state on the page buffer, reading from the page buffer 117 is performed sequentially (continuously) from the top address As of the page buffer regardless of the mode. The read image data is output from the output unit to the print engine after the pixels not clipped by the MCU clipping circuit 111 are clipped by the pixel clipping circuit 118 and converted to a desired size by the resizing circuit 119. The For example, in the example of FIG. 12, it is stored in the page buffer with a size of 453 × 606 pixels. This is clipped to 450x600 pixels (3/8 times 1200x1600), which is the user setting area, and further enlarged (16/15 times) to 480x640 pixels, which is the output image size. Output.

本実施形態ではMCU縮小回路にて目的のサイズ付近にまで縮小する。図12の例では1200×1600画素を480×640画素にしたいので、縮小率は480/1200=0.4となる。この値は1/8(=0.125)単位の縮小率の中では3/8(=0.375)が最も近い。従って、MCU縮小回路にて3/8に縮小し、後段のリサイズ回路で16/15倍することで、3/8×16/15=0.4を実現する。   In this embodiment, the size is reduced to the vicinity of the target size by the MCU reduction circuit. In the example of FIG. 12, since 1200 × 1600 pixels are desired to be 480 × 640 pixels, the reduction ratio is 480/1200 = 0.4. This value is closest to 3/8 (= 0.375) among the reduction ratios of 1/8 (= 0.125) units. Therefore, 3/8 × 16/15 = 0.4 is realized by reducing to 3/8 by the MCU reduction circuit and 16/15 times by the resizing circuit in the subsequent stage.

上述したプリントエンジンの同期信号に従って画像信号を出力するような場合、1/2以下の縮小を1度で実行すると縮小後のサンプリングポイントが離れてしまうので、補間に用いる画素の読み出しは不連続になってしまう。従って、ページバッファをDRAM上に構成した場合は、メモリの使用効率が下がる。一方、本実施形態では1/16以上の縮小率においては、リサイズ回路119での縮小率は1/2以上となり、連続読み出しにて対応可能となる(リサイズ回路119にラインメモリを装備した場合は先頭より画像データを読み出すだけでよい)。即ち、メモリアクセスの連続性が向上し、メモリ使用効率が向上する。また、JPEG復号化回路のQテーブルを操作し、折り返しノイズとなる高周波成分を排除してから逆DCTする構成により、折り返しノイズ除去のためのプリフィルタが不要となる。また、縮小率が1/2以下においては色差信号のサブサンプリングによる補間を行わないようにしたので、色差信号の解像度の劣化が抑えられる。   In the case of outputting an image signal in accordance with the above-described print engine synchronization signal, if the reduction of 1/2 or less is executed at a time, the sampling points after the reduction are separated, so that the readout of pixels used for interpolation is discontinuous. turn into. Therefore, when the page buffer is configured on the DRAM, the memory use efficiency is lowered. On the other hand, in this embodiment, when the reduction ratio is 1/16 or more, the reduction ratio of the resizing circuit 119 becomes 1/2 or more, and it can be handled by continuous reading (when the resizing circuit 119 is equipped with a line memory). Just read the image data from the top). That is, the continuity of memory access is improved and the memory usage efficiency is improved. In addition, the configuration in which the Q table of the JPEG decoding circuit is operated to eliminate high-frequency components that are aliasing noise and then inverse DCT is performed, thereby eliminating the need for a prefilter for aliasing noise removal. In addition, when the reduction ratio is 1/2 or less, interpolation by the sub-sampling of the color difference signal is not performed, so that deterioration of the resolution of the color difference signal can be suppressed.

なお、上記説明ではページバッファにて並び替えを行っているが、これに限らず、バンドバッファ(ページバッファの一部)でも良い。上記のように、本実施形態では、バッファに格納されるブロックラインの最終ブロックのブロック終端画素と次画素とのアドレス差分値をDl、ブロックのブロック終端画素と次画素とのアドレス差分値をDm、ブロックのブロック右端画素と次画素とのアドレス差分値をDbとした時、アドレス差分値Dが、
ブロックライン上の最終ブロックのブロック終端画素の場合はD=Dl、
D=Dlでなく、ブロックライン上の最終ブロックのブロック終端画素の場合はD=Dm、
D=Dl、D=Dmのいずれでもなく、ブロックライン上の最終ブロックのそれ以外でブロック右端画素の場合はD=Db、
その他の場合はD=1
である。
In the above description, rearrangement is performed in the page buffer, but not limited to this, a band buffer (a part of the page buffer) may be used. As described above, in this embodiment, the address difference value between the block end pixel and the next pixel of the last block of the block line stored in the buffer is D1, and the address difference value between the block end pixel and the next pixel of the block is Dm. When the address difference value between the rightmost pixel of the block and the next pixel is Db, the address difference value D is
D = Dl for the block end pixel of the last block on the block line,
D = Dm if D = Dl and not the block end pixel of the last block on the block line,
Neither D = Dl nor D = Dm, and D = Db in the case of the rightmost pixel of the block other than the last block on the block line,
In other cases, D = 1
It is.

以上、本発明の実施形態を説明したが、これに限らず本発明は、複数の機器(例えば、ホストコンピュータ、インタフェース機器、リーダ、プリンタ等)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置等)に適用してもよい。   Although the embodiments of the present invention have been described above, the present invention is not limited to this, and the present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.). You may apply to the apparatus (for example, a copying machine, a facsimile machine, etc.) which consists of apparatus.

また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコード(コンピュータプログラム)を記録したコンピュータ読み取り可能な記録媒体(または記憶媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記録媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記録媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記録した記録媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   Another object of the present invention is to supply a computer-readable recording medium (or storage medium) that records a program code (computer program) of software that implements the functions of the above-described embodiments to a system or apparatus, and the system. Needless to say, this can also be achieved by reading and executing the program code stored in the recording medium by the computer (or CPU or MPU) of the apparatus. In this case, the program code itself read from the recording medium realizes the functions of the above-described embodiment, and the recording medium on which the program code is recorded constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.

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

本発明を上記記録媒体に適用する場合、その記録媒体には、先に説明したフローチャートに対応するプログラムコードが格納されることになる。   When the present invention is applied to the recording medium, program code corresponding to the flowchart described above is stored in the recording medium.

Claims (22)

ブロック単位に入力された画像データに対して、該ブロック単位に画像処理を実行するブロック画像処理手段と、
前記ブロック単位に処理された前記画像データをラスタ状に変換する変換手段と、
ラスタ状に変換された前記画像データを用いて、1画素単位の画像処理を実行する画素画像処理手段とを備え、
入力された画像データに施す画像処理を前記ブロック画像処理手段と前記画素画像処理手段の2段階にて行うことを特徴とする画像処理装置。
Block image processing means for executing image processing in units of blocks for image data input in units of blocks;
Conversion means for converting the image data processed in block units into a raster shape;
Pixel image processing means for performing image processing in units of one pixel using the image data converted into a raster shape,
An image processing apparatus characterized in that image processing to be performed on input image data is performed in two stages of the block image processing means and the pixel image processing means.
前記ブロック画像処理手段が、入力された画像データから指定範囲の画像データを抽出することを特徴とする請求項1記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the block image processing means extracts image data in a specified range from the input image data. 前記ブロック画像処理手段が、前記画像データの解像度を変換することを特徴とする請求項1記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the block image processing unit converts a resolution of the image data. 前記変換手段が、前記ブロック単位にラスタ状に変換された前記画像データに対するそれぞれのブロック内の画素の並び替え処理と、
前記ブロック自身の並び替え処理との2段階で変換処理を行うことを特徴とする請求項1記載の画像処理装置。
The conversion means is a pixel rearrangement process in each block for the image data converted into a raster shape for each block;
The image processing apparatus according to claim 1, wherein the conversion processing is performed in two stages including rearrangement processing of the blocks themselves.
前記変換手段が、前記ブロック及び前記画素を90°単位の回転角で並び替えることを特徴とする請求項4記載の画像処理装置。   The image processing apparatus according to claim 4, wherein the conversion unit rearranges the block and the pixel at a rotation angle of 90 °. 前記指定範囲の前記画像データを始点座標と終点座標を定めることによって決定される矩形状の範囲として前記画像データから抽出する場合、矩形状の前記指定範囲の画像データをブロック単位で抽出する場合のそれぞれのブロックの始点座標及び終点座標は、前記画像データの前記始点座標及び前記終点座標を該ブロックのブロックサイズで除したときの小数点以下の数値を切り上げた数値に基づく座標であることを特徴とする請求項2記載の画像処理装置。   When extracting the image data of the specified range from the image data as a rectangular range determined by determining start point coordinates and end point coordinates, when extracting the rectangular image data of the specified range in block units The start point coordinates and end point coordinates of each block are coordinates based on values obtained by rounding up the numerical values after the decimal point when the start point coordinates and the end point coordinates of the image data are divided by the block size of the block. The image processing apparatus according to claim 2. 前記ブロック画像処理手段による前記指定範囲の画像データを抽出する抽出処理が、入力された画像データに関する有効信号の制御によって行われることを特徴とする請求項2記載の画像処理装置。   3. The image processing apparatus according to claim 2, wherein the extraction processing for extracting the image data in the specified range by the block image processing means is performed by controlling an effective signal related to the input image data. 前記ブロックのサイズをBx×Byとした場合、前記ブロック画像処理手段による前記ブロック単位の解像度変換後の横方向のサイズが1からBxまでのいずれかの整数、解像度変換後の縦方向のサイズが1からByまでのいずれかの整数であることを特徴とする請求項3記載の画像処理装置。   When the block size is Bx × By, the horizontal size after the resolution conversion of the block unit by the block image processing means is an integer from 1 to Bx, and the vertical size after the resolution conversion is The image processing apparatus according to claim 3, wherein the image processing apparatus is any integer from 1 to By. 前記ブロック画像処理手段による前記ブロック単位の解像度変換処理が横方向と縦方向とで独立して行われることを特徴とする請求項8記載の画像処理装置。   9. The image processing apparatus according to claim 8, wherein the resolution conversion processing in units of blocks by the block image processing means is performed independently in a horizontal direction and a vertical direction. 前記解像度変換処理における横方向の縮小率をRx、縦方向の縮小率をRyとするとき、前記ブロック単位の解像度変換処理における画像データの出力サイズが、
n/Bx≦Rx<(n+1)/Bx、但しnは1からBxまでの整数、
m/By≦Ry<(m+1)/By、但しmは1からByまでの整数、
を満たすn×mであることを特徴とする請求項8記載の画像処理装置。
When the horizontal reduction ratio in the resolution conversion process is Rx and the vertical reduction ratio is Ry, the output size of the image data in the block-unit resolution conversion process is:
n / Bx ≦ Rx <(n + 1) / Bx, where n is an integer from 1 to Bx,
m / By ≦ Ry <(m + 1) / By, where m is an integer from 1 to By,
The image processing apparatus according to claim 8, wherein n × m satisfies the following condition.
前記ブロック画像処理手段による前記横方向及び前記縦方向の解像度変換処理が、入力された前記画像データのブロック上の位置に応じて補間係数を切り替え、補間点以外のデータを無効データとすることを特徴とする請求項9記載の画像処理装置。   The horizontal and vertical resolution conversion processing by the block image processing means switches the interpolation coefficient according to the position on the block of the input image data, and sets data other than the interpolation point as invalid data. The image processing apparatus according to claim 9. 前記ブロック画像処理手段が、前記横方向の解像度変換処理ではブロック右端の画素演算時を無効データとし、前記縦方向の解像度変換処理ではブロック下端の画素演算時を無効データとすることを特徴とする請求項11記載の画像処理装置。   The block image processing means uses invalid data at the time of pixel calculation at the right end of the block in the horizontal resolution conversion processing, and invalid data at the time of pixel calculation at the bottom end of the block in the vertical resolution conversion processing. The image processing apparatus according to claim 11. 前記ブロック画像処理手段による前記横方向及び前記縦方向の解像度変換処理は、補間係数が設定可能な最大値の場合、該最大値となる係数が乗算される画素を補間出力とすることを特徴とする請求項11又は12に記載の画像処理装置。   In the horizontal and vertical resolution conversion processing by the block image processing means, when the interpolation coefficient is a maximum value that can be set, a pixel multiplied by the coefficient that becomes the maximum value is used as an interpolation output. The image processing apparatus according to claim 11 or 12. 前記ブロック画像処理手段による前記横方向及び前記縦方向の解像度変換処理は、補間係数が0の場合、0の係数が乗算される画素に対応する画素であって0が乗算されない方の画素を補間出力とすることを特徴とする請求項11又は12に記載の画像処理装置。   In the horizontal and vertical resolution conversion processing by the block image processing means, when the interpolation coefficient is 0, a pixel corresponding to a pixel to be multiplied by a coefficient of 0 and not multiplied by 0 is interpolated The image processing apparatus according to claim 11, wherein the image processing apparatus is an output. 前記変換手段による前記ブロック内の画素の並び替え処理が、原画素のアドレスをA(n−1)、予め決められたシーケンスで選択されるアドレス差分値をD、次画素のアドレスをA(n)とする場合、
A(n)=A(n−1)+D
で示されるバッファのアドレスに次画素データを格納することで行われることを特徴とする請求項4又は5に記載の画像処理装置。
The rearrangement processing of the pixels in the block by the conversion means is performed such that the address of the original pixel is A (n−1), the address difference value selected in a predetermined sequence is D, and the address of the next pixel is A (n )
A (n) = A (n-1) + D
The image processing apparatus according to claim 4, wherein the next pixel data is stored at an address of a buffer indicated by
前記バッファに格納されるブロックラインの最終ブロックのブロック終端画素と次画素とのアドレス差分値をDl、前記ブロックのブロック終端画素と次画素とのアドレス差分値をDm、前記ブロックのブロック右端画素と次画素とのアドレス差分値をDbとした時、前記アドレス差分値Dが、
ブロックライン上の最終ブロックのブロック終端画素の場合はD=Dl、
D=Dlでなく、ブロックライン上の最終ブロックのブロック終端画素の場合はD=Dm、
D=Dl、D=Dmのいずれでもなく、ブロックライン上の最終ブロックのそれ以外でブロック右端画素の場合はD=Db、
その他の場合はD=1
であることを特徴とする請求項15記載の画像処理装置。
The address difference value between the block end pixel and the next pixel of the last block of the block line stored in the buffer is D1, the address difference value between the block end pixel and the next pixel of the block is Dm, and the block right end pixel of the block When the address difference value with the next pixel is Db, the address difference value D is
D = Dl for the block end pixel of the last block on the block line,
D = Dm if D = Dl and not the block end pixel of the last block on the block line,
Neither D = Dl nor D = Dm, and D = Db in the case of the rightmost pixel of the block other than the last block on the block line,
In other cases, D = 1
The image processing apparatus according to claim 15, wherein:
ブロック毎に符号化された符号化データから画像データを復号化するブロック復号化手段と、
復号化された前記画像データを前記符号化時の処理ブロック単位に画像処理するブロック画像処理手段と、
前記処理ブロック単位に画像処理された前記画像データをラスタ状に変換する変換手段と、
ラスタ状に変換された前記画像データを用いて1画素単位の画像処理を実行する画素画像処理手段とを備え、
入力された画像データに施す画像処理を前記ブロック画像処理手段と前記画素画像処理手段の2段階にて行うことを特徴とする画像処理装置。
Block decoding means for decoding image data from encoded data encoded for each block;
Block image processing means for image-processing the decoded image data in units of processing blocks at the time of encoding;
Conversion means for converting the image data subjected to image processing in units of the processing blocks into a raster shape;
Pixel image processing means for executing image processing in units of one pixel using the image data converted into a raster shape,
An image processing apparatus characterized in that image processing to be performed on input image data is performed in two stages of the block image processing means and the pixel image processing means.
ブロック単位に入力された画像データに対して、該ブロック単位に画像処理を実行するブロック画像処理工程と、
前記ブロック単位に処理された前記画像データをラスタ状に変換する変換工程と、
ラスタ状に変換された前記画像データを用いて、1画素単位の画像処理を実行する画素画像処理工程とを有し、
入力された画像データに施す画像処理を前記ブロック画像処理工程と前記画素画像処理工程との2段階にて行うことを特徴とする画像処理方法。
A block image processing step for executing image processing in units of blocks for image data input in units of blocks;
A conversion step of converting the image data processed in block units into a raster shape;
A pixel image processing step of performing image processing in units of one pixel using the image data converted into a raster shape,
An image processing method characterized in that image processing to be applied to input image data is performed in two stages, the block image processing step and the pixel image processing step.
ブロック符号化された符号化データから画像データを復号化するブロック復号化工程と、
符号化された前記画像データを前記ブロック符号化時の処理ブロック単位に画像処理するブロック画像処理工程と、
前記処理ブロック単位に画像処理された前記画像データをラスタ状に変換する変換工程と、
ラスタ状に変換された前記画像データを用いて1画素単位の画像処理を実行する画素画像処理工程とを有し、
入力された画像データに対して施す画像処理を前記ブロック画像処理工程と前記画素画像処理工程の2段階にて行うことを特徴とする画像処理方法。
A block decoding step of decoding image data from block-coded encoded data;
A block image processing step of image-processing the encoded image data in units of processing blocks at the time of block encoding;
A conversion step of converting the image data subjected to image processing in units of the processing blocks into a raster shape;
A pixel image processing step of performing image processing in units of one pixel using the image data converted into a raster shape,
An image processing method, wherein image processing to be performed on input image data is performed in two stages, the block image processing step and the pixel image processing step.
コンピュータにて、
ブロック単位に入力された画像データに対して、該ブロック単位に画像処理を実行するブロック画像処理手順と、
前記ブロック単位に処理された前記画像データをラスタ状に変換する変換手順と、
ラスタ状に変換された前記画像データを用いて、1画素単位の画像処理を実行する画素画像処理手順とを有し、
入力された画像データに施す画像処理を前記ブロック画像処理手順と前記画素画像処理手順の2段階で実行するためのコンピュータプログラム。
At the computer
A block image processing procedure for executing image processing in units of blocks for image data input in units of blocks;
A conversion procedure for converting the image data processed in units of blocks into a raster shape;
A pixel image processing procedure for performing image processing in units of one pixel using the image data converted into a raster shape,
A computer program for executing image processing to be applied to input image data in two stages of the block image processing procedure and the pixel image processing procedure.
コンピュータにて、
ブロック符号化された符号化データから画像データを復号化するブロック復号化手順と、
復号化された前記画像データを前記ブロック符号化時の処理ブロック単位に画像処理を実行するブロック画像処理手順と、
前記処理ブロック単位に画像処理された前記画像データをラスタ状に変換する変換手順と、
ラスタ状に変換された前記画像データを用いて1画素単位の画像処理を実行する画素画像処理手順とを有し、
入力された画像データに施す画像処理を前記ブロック画像処理手順と前記画素画像処理手順の2段階で実行するためのコンピュータプログラム。
At the computer
A block decoding procedure for decoding image data from block encoded data;
A block image processing procedure for performing image processing on the decoded image data in units of processing blocks at the time of block encoding;
A conversion procedure for converting the image data subjected to image processing in units of the processing blocks into a raster shape;
A pixel image processing procedure for performing image processing in units of one pixel using the image data converted into a raster shape,
A computer program for executing image processing to be applied to input image data in two stages of the block image processing procedure and the pixel image processing procedure.
請求項20又は21に記載のコンピュータプログラムを格納したことを特徴とするコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium storing the computer program according to claim 20 or 21.
JP2009096447A 2002-02-13 2009-04-10 Image processing apparatus, image processing method, computer program, and recording medium Expired - Fee Related JP4777447B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009096447A JP4777447B2 (en) 2002-02-13 2009-04-10 Image processing apparatus, image processing method, computer program, and recording medium

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2002035434 2002-02-13
JP2002035434 2002-02-13
JP2009096447A JP4777447B2 (en) 2002-02-13 2009-04-10 Image processing apparatus, image processing method, computer program, and recording medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2003004947A Division JP4662325B2 (en) 2002-02-13 2003-01-10 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2009159631A true JP2009159631A (en) 2009-07-16
JP4777447B2 JP4777447B2 (en) 2011-09-21

Family

ID=40963047

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009096447A Expired - Fee Related JP4777447B2 (en) 2002-02-13 2009-04-10 Image processing apparatus, image processing method, computer program, and recording medium

Country Status (1)

Country Link
JP (1) JP4777447B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014082707A (en) * 2012-10-18 2014-05-08 Mega Chips Corp Image processor
WO2023188110A1 (en) * 2022-03-30 2023-10-05 株式会社ジェイエイアイコーポレーション Image processing apparatus, image capturing apparatus, and image processing method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10304184A (en) * 1997-05-02 1998-11-13 Fuji Xerox Co Ltd Image processor and image processing method
JPH11168610A (en) * 1997-09-30 1999-06-22 Ricoh Co Ltd Image processor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10304184A (en) * 1997-05-02 1998-11-13 Fuji Xerox Co Ltd Image processor and image processing method
JPH11168610A (en) * 1997-09-30 1999-06-22 Ricoh Co Ltd Image processor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014082707A (en) * 2012-10-18 2014-05-08 Mega Chips Corp Image processor
US10475158B2 (en) 2012-10-18 2019-11-12 Megachips Corporation Image processing device
WO2023188110A1 (en) * 2022-03-30 2023-10-05 株式会社ジェイエイアイコーポレーション Image processing apparatus, image capturing apparatus, and image processing method

Also Published As

Publication number Publication date
JP4777447B2 (en) 2011-09-21

Similar Documents

Publication Publication Date Title
US9361664B2 (en) Data processing apparatus, image processing apparatus, and method therefor
JP3748489B2 (en) Image processing apparatus, image processing method, and computer-readable storage medium
US6798927B2 (en) Conversion of pixel data for interpolation or image reduction, using a small memory
US20070263939A1 (en) Variable length decoding device, variable length decoding method and image capturing system
JP4777447B2 (en) Image processing apparatus, image processing method, computer program, and recording medium
JP4662325B2 (en) Image processing apparatus and image processing method
JP4380740B2 (en) Image processing device
JP3599413B2 (en) Resolution conversion device and resolution conversion method
JPH07118002B2 (en) Image processing device
JP2653781B2 (en) Image editing processing method
JP4137097B2 (en) Image processing apparatus, image processing method, and computer-readable storage medium
JP2744229B2 (en) Image processing device
JP2575641B2 (en) Image editing processing method
JP2744231B2 (en) Image processing device
JP2000322566A (en) Image display device and its controlling method
JP2744230B2 (en) Image processing device
JPH11168610A (en) Image processor
JP3576575B2 (en) Image processing apparatus and image processing method
JP2974596B2 (en) Color image processing equipment
JPS62140549A (en) Image editing processor
JPS62140176A (en) Image editing processor
JPS63164574A (en) Decoding system
JPH0812691B2 (en) How to convert a compressed image to a decompressed gray level reduced image
JPH09179972A (en) Color image processing method
JP2003153022A (en) Method and apparatus for processing image, image forming apparatus, program and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090410

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110404

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110603

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110629

R150 Certificate of patent or registration of utility model

Ref document number: 4777447

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140708

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees