JP2006211323A - Image processor - Google Patents

Image processor Download PDF

Info

Publication number
JP2006211323A
JP2006211323A JP2005021104A JP2005021104A JP2006211323A JP 2006211323 A JP2006211323 A JP 2006211323A JP 2005021104 A JP2005021104 A JP 2005021104A JP 2005021104 A JP2005021104 A JP 2005021104A JP 2006211323 A JP2006211323 A JP 2006211323A
Authority
JP
Japan
Prior art keywords
code amount
image
memory
encoded data
image data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2005021104A
Other languages
Japanese (ja)
Inventor
Koki Hasebe
弘毅 長谷部
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.)
Olympus Corp
Original Assignee
Olympus Corp
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 Olympus Corp filed Critical Olympus Corp
Priority to JP2005021104A priority Critical patent/JP2006211323A/en
Publication of JP2006211323A publication Critical patent/JP2006211323A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processor which is used for a digital still camera, can be prevented from increasing in circuit scale and development cost by restraining the amount of memories arranged in an LSI from increasing, and is capable of coping flexibly with an increase in the number of pixels of an image. <P>SOLUTION: Image data from a camera are introduced into a large-scale memory 11, the image data of one frame of the large-scale memory 11 are considered as the image data where M small frames are arranged in a horizontal direction, and the image data are read out by the small frame and subjected to image processing. The encoded data of each small frame are written in the large-scale memory 11 and read out from the large-scale memory 11. The capacity of a line memory used for interpolation processing and block conversion processing inside an image processing device is set corresponding to the lines of the small frames, so that the amount of the memories used can be restrained from increasing. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、ディジタルスチルカメラ等に用いて好適な画像処理装置に関し、特に、画像の画素数の増加した場合のハードウェア規模の縮小及び開発コストの低減に係わる。   The present invention relates to an image processing apparatus suitable for use in a digital still camera or the like, and more particularly to reduction in hardware scale and development cost when the number of pixels of an image increases.

従来、画像データを効率的に符号化する可変長符号化方式として、例えば、JPEG(Joint Photographic Experts Group)規格に基づく符号化、復号化方式が知られている。この方式においては、画像データを符号化する場合と、復号化する場合の何れの場合においても、(8×8)画素のブロックを入出力の単位としている。   2. Description of the Related Art Conventionally, for example, an encoding / decoding method based on the JPEG (Joint Photographic Experts Group) standard is known as a variable-length encoding method for efficiently encoding image data. In this system, a block of (8 × 8) pixels is used as an input / output unit in both cases where image data is encoded and decoded.

例えば、この方式を備えた画像処理装置により画像データの符号化を行う場合、画像データを(8×8)画素のブロック単位でJPEGの符号化部に入力し、符号化を行う。そして符号化された画像データは、順次、記録媒体に格納される。また、この画像処理装置により画像データの復号化を行う場合、記録媒体に格納された画像データを読み出し、JPEGの復号部により復号化を行い、画像データを(8×8)画素のブロック単位で出力している。   For example, when image data is encoded by an image processing apparatus equipped with this method, the image data is input to a JPEG encoding unit in units of (8 × 8) pixel blocks and encoded. The encoded image data is sequentially stored in a recording medium. When image data is decoded by this image processing apparatus, the image data stored in the recording medium is read out, decoded by the JPEG decoding unit, and the image data is divided into blocks of (8 × 8) pixels. Output.

これに対して、カメラのような画像入力装置やディスプレイのような画像出力装置には、ラスタ単位で画像データが入出力される装置が多い。ラスタ走査では、左から右に走査し、1ラインの走査が終了したら、下のラインに移り、左から右に走査していき、以下、左から右、上から下の順に繰り返し走査が行われる。ラスタ単位の画像データは、ラスタ走査の順に画像データが入出力される。   On the other hand, many image input devices such as cameras and image output devices such as displays input and output image data in raster units. In raster scanning, scanning is performed from left to right. When scanning of one line is completed, the scanning proceeds to the lower line, and scanning is performed from left to right. Thereafter, scanning is repeatedly performed in order from left to right and from top to bottom. . The raster unit image data is input / output in the order of raster scanning.

したがって、このような処理単位がラスタ単位である装置と、JPEG規格に基づく画像処理のような処理単位がブロック単位である装置との間でデータの送受信を行う場合、特許文献1に示されるように、ラスタ単位(又はブロック単位)のデータをメモリに一旦格納し、ブロック単位(又はラスタ単位)でメモリから出力するデータ転送単位の変換(以下、ラスタ−ブロック変換と称する)を行う必要がある。   Therefore, when data is transmitted / received between a device in which such a processing unit is a raster unit and a device in which a processing unit such as image processing based on the JPEG standard is a block unit, as shown in Patent Document 1 In addition, it is necessary to temporarily store data in raster units (or block units) in a memory and perform conversion in data transfer units (hereinafter referred to as raster-block conversion) to be output from the memory in block units (or raster units). .

図24は、従来の画像処理装置100の一例を示すものである。図24において、図示していないカメラなどの画像データ入力装置により、画像データが入力される。入力される画像データは、ベイヤー配列に並んだ単一色(R(赤)、G(緑)、又はB(青))の画像データであり、1フレームの画像は例えば(2564(水平方向)×1924(垂直方向))画素である。入力された画像データは、バス110を介して、大容量メモリ101に格納される。入力された画像データは、大容量メモリ101に、ラスタ走査順に書き込まれる。   FIG. 24 shows an example of a conventional image processing apparatus 100. In FIG. 24, image data is input by an image data input device such as a camera (not shown). The input image data is image data of a single color (R (red), G (green), or B (blue)) arranged in a Bayer array, and an image of one frame is, for example, (2564 (horizontal direction) × 1924 (vertical direction) pixels. The input image data is stored in the large capacity memory 101 via the bus 110. The input image data is written into the large capacity memory 101 in the order of raster scanning.

大容量メモリ101に一旦蓄積された画像データは、書き込み時と同様に、ラスタ走査の順に読み出され、バス110を介して、データ読出部103に読み出される。データ読出部103により読み出された画像データは、前処理部104に送られる。前処理部104では、色補間処理や輪郭強調処理など、好適な画像を生成するための画像処理が行われる。前処理部104により、単一色の画像データが補間処理によりRGBの画像データに変換され、更に、RGBの画像データがYUV(輝度信号Y及び色差信号U、V)の画像データに変換される。   The image data once stored in the large-capacity memory 101 is read in the order of raster scanning as in the writing, and is read to the data reading unit 103 via the bus 110. The image data read by the data reading unit 103 is sent to the preprocessing unit 104. The preprocessing unit 104 performs image processing for generating a suitable image, such as color interpolation processing and contour enhancement processing. The pre-processing unit 104 converts single-color image data into RGB image data by interpolation processing, and further converts RGB image data into YUV (luminance signal Y and color difference signals U and V) image data.

前処理部104からのYUVの画像データは、ブロック変換部105に送られる。ブロック変換部105では、ラスタ単位の画像データ形式をブロック単位のデータ形式に変換する処理(ラスタ−ブロック変換)が行われる。例えば、前処理部104からラスタ単位で出力されるY,U,Vそれぞれの画像データは、ブロック変換メモリに8ライン分格納され、後段に対して(8×8)画素のブロック単位毎に出力される。   The YUV image data from the preprocessing unit 104 is sent to the block conversion unit 105. The block conversion unit 105 performs processing (raster-block conversion) for converting the image data format in raster units into the data format in block units. For example, Y, U, and V image data output in raster units from the pre-processing unit 104 are stored in the block conversion memory for 8 lines and output in units of (8 × 8) pixel blocks for the subsequent stage. Is done.

ブロック変換部105でブロック変換された画像データは、符号化部106に送られる。符号化部106で、ブロック変換部105から入力されるブロック単位の画像データが符号化される。例えばJPEG方式で圧縮符号化を行う場合には、ブロック毎にDCT(Discrete Cosine Transform)演算が行われ、時間領域のデータから周波数領域のデータに変換される。DCT変換により周波数領域に変換されたデータは、量子化器で量子化され、ハフマン符号により可変長符号化される。符号化部106からの符号化データは、符号化データ書込部108により、大容量メモリ101に送られる。大容量メモリ101には、符号化データが蓄積される。大容量メモリ101に蓄積された符号化データは、符号化データ読出部109により読み出され、後段に出力される。
特開平11−41503号公報
The image data block-converted by the block converter 105 is sent to the encoder 106. The encoding unit 106 encodes the block unit image data input from the block conversion unit 105. For example, when compression encoding is performed by the JPEG method, DCT (Discrete Cosine Transform) calculation is performed for each block, and the data in the time domain is converted into the data in the frequency domain. Data converted to the frequency domain by DCT transform is quantized by a quantizer and is variable-length encoded by a Huffman code. The encoded data from the encoding unit 106 is sent to the large capacity memory 101 by the encoded data writing unit 108. Encoded data is stored in the large-capacity memory 101. The encoded data stored in the large-capacity memory 101 is read by the encoded data reading unit 109 and output to the subsequent stage.
Japanese Patent Laid-Open No. 11-41503

上述のような画像処理装置100がディジタルスチルカメラに搭載される場合、画像処理装置100の電装系ユニットはLSI(Large Scale Integration)により実現されることが多い。また、画像処理装置100の大容量メモリ101としては例えばSDRAM(Synchronous Dynamic Random Access Memory)が用いられ、この大容量メモリ101は、LSI外部に配置することが一般的である。   When the image processing apparatus 100 as described above is mounted on a digital still camera, the electrical unit of the image processing apparatus 100 is often realized by LSI (Large Scale Integration). For example, an SDRAM (Synchronous Dynamic Random Access Memory) is used as the large capacity memory 101 of the image processing apparatus 100, and this large capacity memory 101 is generally arranged outside the LSI.

これに対して、前処理部104の色補間処理やブロック変換部105において使用されるメモリは、画像処理過程の途中に配置される場合が多いことや、LSI外部に配置すると処理速度の低下やLSIの端子数の増加を招くことから、一般的に、LSI内部に備えられる。   In contrast, the color interpolation processing of the preprocessing unit 104 and the memory used in the block conversion unit 105 are often arranged in the middle of the image processing process. Since the number of terminals of the LSI is increased, it is generally provided inside the LSI.

前処理部104やブロック変換部105において使用されるメモリとしては、以下のようなメモリ量が必要とされる。   As the memory used in the preprocessing unit 104 and the block conversion unit 105, the following memory amount is required.

前処理部104では、補間処理により、各画素の単色の画像データから、各画素がR,G,Bの3種類の色情報を有する画像データへの変換が行われる。補間処理には、例えば、着目画素に存在しない色を、着目画素の近傍の画素より補間する例えば(5×5)のフィルタが用いられる。(5×5)のフィルタ処理を行うためには、4個のラインモリ量が必要である。   In the pre-processing unit 104, the single-color image data of each pixel is converted into image data in which each pixel has three types of color information of R, G, and B by interpolation processing. For example, for example, a (5 × 5) filter that interpolates a color that does not exist in the target pixel from pixels near the target pixel is used. In order to perform the (5 × 5) filter processing, four line memory amounts are required.

ブロック変換部105においては、例えば、符号化部106に搭載しているJPEG符号化処理がYUV(4:2:0)を要求している場合、色差の画像データU及びVは1ラインあたりの画素数が半分になるため、輝度の画像データY用として8個のラインメモリが必要であり、色差の画像データU及びV用としてそれぞれ4ライン分のラインメモリが必要である。さらに、これらのブロック変換メモリはスループットを低下させないように書き込み用と読み出し用にその2倍のメモリ量が必要とされる。したがって、画像処理装置100においては、大容量メモリ101以外に、36個のラインメモリが必要である。   In the block conversion unit 105, for example, when the JPEG encoding process installed in the encoding unit 106 requires YUV (4: 2: 0), the color difference image data U and V are per line. Since the number of pixels is halved, eight line memories are required for the luminance image data Y, and four line memories are required for the color difference image data U and V, respectively. Furthermore, these block conversion memories require twice as much memory for writing and reading so as not to reduce the throughput. Accordingly, the image processing apparatus 100 requires 36 line memories in addition to the large capacity memory 101.

しかしながら、画像の画素数の増大に伴い、1ラインあたりの画素数が数千画素を越える画像が増加している。このため、このような多数のラインメモリをLSI内部に備えると、LSIの回路規模や開発コストが増大するという問題がある。   However, with an increase in the number of pixels of an image, an image in which the number of pixels per line exceeds several thousand pixels is increasing. For this reason, if such a large number of line memories are provided inside the LSI, there is a problem that the circuit scale and development cost of the LSI increase.

また、従来の画像処理装置100では、LSI内部に備えられたラインメモリが1ラインあたりの画素数に依存しているため、ラインメモリに格納できる画素数を越える画像に対応できず、画素数が変わると、設計変更が必要である。   Further, in the conventional image processing apparatus 100, since the line memory provided in the LSI depends on the number of pixels per line, the image exceeding the number of pixels that can be stored in the line memory cannot be handled, and the number of pixels is small. If it changes, a design change is necessary.

本発明は、上述の課題を鑑み、LSI内部に配置されるメモリの使用量を抑えることにより回路規模や開発コストを抑えると共に、画像の画素数の増加に対して柔軟に対応できるようにした画像処理装置を提供することを目的とする。   In view of the above-described problems, the present invention reduces the circuit size and development cost by suppressing the amount of memory used in an LSI, and can flexibly cope with an increase in the number of pixels of an image. An object is to provide a processing apparatus.

上述の課題を解決するために、請求項1に係わる本発明の画像処理装置は、画像データを格納するメモリと、メモリに格納された1フレーム分の画像データを水平方向にM個(Mは正の整数)の小フレームが並んだ画像データとみなし、小フレームをそれぞれラスタ走査順に読み出すデータ読出部と、データ読出部により読み出された画像データを、所定のライン数を処理ラインとして符号化する符号化部と、符号化部から出力される符号化データの符号量を順次格納する符号量記憶部と、符号量記憶部に記憶された各小フレームの対応する処理ラインに係る符号量に基づき、メモリに符号化データを格納するためのアドレスを算定し、メモリのその算定されたアドレスに符号化データを格納する符号化データ書込部と、符号量記憶部に記憶された各小フレームの対応する処理ラインに係る符号量に基づき、メモリに格納された符号化データを読み出すためのアドレスを算定し、メモリのその算定されたアドレスから符号化データを読み出す符号化データ読出部とを備えることを特徴とする。   In order to solve the above problem, an image processing apparatus according to a first aspect of the present invention includes a memory for storing image data, and M pieces of image data for one frame stored in the memory in a horizontal direction (M is It is regarded as image data in which small frames of (positive integers) are arranged, and the data reading unit for reading the small frames in raster scanning order and the image data read by the data reading unit are encoded with a predetermined number of lines as processing lines. An encoding unit, a code amount storage unit that sequentially stores a code amount of encoded data output from the encoding unit, and a code amount related to a processing line corresponding to each small frame stored in the code amount storage unit Based on this, an address for storing the encoded data in the memory is calculated, and the encoded data writing unit for storing the encoded data in the calculated address of the memory and the code amount storage unit are stored. Encoded data for calculating an address for reading out the encoded data stored in the memory based on the code amount associated with the corresponding processing line of each small frame, and reading out the encoded data from the calculated address in the memory And a reading unit.

請求項2に係る本発明の画像処理装置は、請求項1の発明において、符号量記憶部は、各小フレームの対応する処理ラインに係る符号量を加算した符号量を、処理ライン毎に格納することを特徴とする。   According to a second aspect of the present invention, in the first aspect of the present invention, the code amount storage unit stores, for each processing line, a code amount obtained by adding the code amount related to the processing line corresponding to each small frame. It is characterized by doing.

請求項3に係る本発明の画像処理装置は、請求項1の発明において、符号量記憶部は、各小フレームの処理ライン毎に符号量を格納することを特徴とする。   According to a third aspect of the present invention, in the image processing apparatus according to the first aspect, the code amount storage unit stores the code amount for each processing line of each small frame.

請求項1に係る本発明の画像処理装置によれば、1フレームの画像データを水平方向にM個の小フレームが並んだ画像データとみなし、小フレーム毎に画像処理を実行することにより、画像処理装置内のメモリの使用量を抑えることできる。そのため、画像処理装置の規模や開発コストを削減することができる。また、画像の画素数が増大しても小フレームの数を調整することにより、画像処理装置内部のメモリ構成に大きな影響を与えることなく対応することができる。したがって、画像の画素数の増大に対して柔軟に対応可能な画像処理装置を提供することができる。   According to the image processing apparatus of the present invention according to claim 1, image data of one frame is regarded as image data in which M small frames are arranged in the horizontal direction, and image processing is performed for each small frame. The amount of memory used in the processing device can be reduced. Therefore, the scale and development cost of the image processing apparatus can be reduced. Further, even if the number of pixels of the image increases, it is possible to cope with the problem by adjusting the number of small frames without greatly affecting the memory configuration inside the image processing apparatus. Therefore, it is possible to provide an image processing apparatus that can flexibly cope with an increase in the number of pixels of an image.

また、請求項2に係る本発明の画像処理装置によれば、各小フレームの対応する処理ラインに係る符号量を加算した符号量を、処理ライン毎に格納することにより、各処理ラインの符号化データを連続して読み出すことができる。   According to the image processing apparatus of the present invention according to claim 2, the code amount obtained by adding the code amount related to the processing line corresponding to each small frame is stored for each processing line, so that the code of each processing line is stored. Data can be read continuously.

また、請求項3に係る本発明の画像処理装置によれば、1フレーム分の符号量を小フレーム内の処理ライン毎に記憶する符号量メモリを備えることにより、画像1フレーム分の符号化データを復号せずに、画像の一部分を抽出して符号化データを保存することと、画像の一部分をのみを高速に表示することが可能になる。   In addition, according to the image processing apparatus of the present invention according to claim 3, by including a code amount memory for storing a code amount for one frame for each processing line in a small frame, encoded data for one frame of the image. It is possible to extract a part of an image and store the encoded data without decoding the image, and to display only a part of the image at high speed.

以下、本発明の実施の形態について図面を参照しながら説明する。図1は、本発明が適用された画像処理装置の一例の主要部を示すブロック図である。図1に示すように、本発明が適用された画像処理装置1は、大容量メモリ11と、アドレス記憶部12と、データ読出部13と、前処理部14と、ブロック変換部15と、符号化部16と、符号量記憶部17と、符号化データ書込部18と、符号化データ読出部19とを備える。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a main part of an example of an image processing apparatus to which the present invention is applied. As shown in FIG. 1, an image processing apparatus 1 to which the present invention is applied includes a large-capacity memory 11, an address storage unit 12, a data reading unit 13, a preprocessing unit 14, a block conversion unit 15, a code The encoding unit 16, the code amount storage unit 17, the encoded data writing unit 18, and the encoded data reading unit 19 are provided.

大容量メモリ11は、入力画像データを一時的に蓄積すると共に、符号化データを一時的に蓄積する。大容量メモリ11は、入力画像データを蓄積するための入力画像格納領域21と、符号化データを蓄積するための符号化データ格納領域22とを有している。   The large-capacity memory 11 temporarily stores input image data and temporarily stores encoded data. The large-capacity memory 11 has an input image storage area 21 for storing input image data and an encoded data storage area 22 for storing encoded data.

大容量メモリ11の入力画像格納領域21は、少なくとも1フレーム分の画像領域を有する。大容量メモリ11の入力画像格納領域21に画像データを書き込む際には、ラスタ走査の順に書き込みが行われる。大容量メモリ11から画像データを読み出す際には、大容量メモリ11の1フレームの画像データを水平方向にM個の小フレームが並んだ画像データとみなし、各小フレーム毎にラスタ走査順に読み出しを行う。   The input image storage area 21 of the large-capacity memory 11 has an image area for at least one frame. When writing image data into the input image storage area 21 of the large capacity memory 11, writing is performed in the order of raster scanning. When reading image data from the large-capacity memory 11, the image data of one frame of the large-capacity memory 11 is regarded as image data in which M small frames are arranged in the horizontal direction, and reading is performed in raster scanning order for each small frame. Do.

アドレス記憶部12は、大容量メモリ11に記憶される符号化データのアドレスを記憶するレジスタを備える。このレジスタはメモリで実現しても構わない。また、アドレス記憶部12そのものを画像処理装置1の外部に備えても良い。   The address storage unit 12 includes a register that stores an address of encoded data stored in the large-capacity memory 11. This register may be realized by a memory. Further, the address storage unit 12 itself may be provided outside the image processing apparatus 1.

データ読出部13は、大容量メモリ11の入力画像格納領域21に格納された1フレームの画像データを、水平方向にM個(Mは正の整数)の小フレームが並んだ画像データとみなし、大容量メモリ11から、各小フレーム毎に画像データをラスタ走査順に読み出す。このとき、大容量メモリ11の入力画像格納領域21に格納された画像データを読み出すためのアドレスは、アドレス記憶部12に記憶された該当レジスタ値に基づいて算出される。   The data reading unit 13 regards one frame of image data stored in the input image storage area 21 of the large-capacity memory 11 as image data in which M (M is a positive integer) small frames are arranged in the horizontal direction. Image data is read from the large-capacity memory 11 in the order of raster scanning for each small frame. At this time, an address for reading the image data stored in the input image storage area 21 of the large-capacity memory 11 is calculated based on the corresponding register value stored in the address storage unit 12.

前処理部14は、色補間処理や輪郭強調処理など、好適な画像を生成するための画像処理を行う。前処理部14により、単一色(R、G、又はB)の画像データは、補間処理によりRGBの画像データに変換され、更に、YUVの画像データに変換される。   The preprocessing unit 14 performs image processing for generating a suitable image, such as color interpolation processing and contour enhancement processing. The pre-processing unit 14 converts single-color (R, G, or B) image data into RGB image data through interpolation processing, and further converts into YUV image data.

ブロック変換部15は、ラスタ−ブロック変換を行うためのブロック変換メモリを備え、前段から入力されるラスタ単位の画像データ形式をブロック単位のデータ形式に変換して後段に出力する。例えば、JPEG符号化処理を行う画像処理装置1では、前処理部14からラスタ単位で出力されるY,U,Vそれぞれの画像データをブロック変換メモリに8ライン分格納し、後段に対して(8×8)画素のブロック単位毎にYUVの画像データを出力する。また、ブロック変換部15は、ラスタ−ブロック変換によるスループットの低下を発生させないように、書き込み用と読み出し用の2通りのブロック変換メモリを備える。   The block conversion unit 15 includes a block conversion memory for performing raster-block conversion, converts the raster-unit image data format input from the previous stage into a block-unit data format, and outputs it to the subsequent stage. For example, in the image processing apparatus 1 that performs JPEG encoding processing, image data for each of Y, U, and V output from the preprocessing unit 14 in units of rasters is stored in the block conversion memory for eight lines, and ( YUV image data is output for each block unit of 8 × 8) pixels. The block conversion unit 15 includes two types of block conversion memories for writing and reading so as not to cause a decrease in throughput due to raster-block conversion.

符号化部16は、ブロック変換部15から入力されるブロック単位の画像データを例えばJPEG方式で符号化し、符号化データを後段に出力する。JPEG方式の符号化では、画像データをブロック単位でDCT変換し、時間領域の画像データを周波数領域に変換する。そして、DCT変換された画像データを量子化し、ハフマン符号により可変長符号化する。   The encoding unit 16 encodes the block-unit image data input from the block conversion unit 15 using, for example, the JPEG method, and outputs the encoded data to the subsequent stage. In JPEG encoding, image data is subjected to DCT conversion in units of blocks, and time-domain image data is converted to a frequency domain. Then, the DCT-converted image data is quantized and subjected to variable length coding using a Huffman code.

符号量記憶部17は符号量メモリ31を備えており、符号化部16で画像データを符号化する際に、符号化部16から符号量を取得し、符号量記憶部17の符号量メモリ31に、各処理ライン毎の符号量を記憶する。   The code amount storage unit 17 includes a code amount memory 31. When the encoding unit 16 encodes image data, the code amount storage unit 17 acquires the code amount from the encoding unit 16, and the code amount memory 31 of the code amount storage unit 17. Further, the code amount for each processing line is stored.

符号化データ書込部18は、符号化部16で符号化された画像データを大容量メモリ11に送り、大容量メモリ11の符号化データ格納領域22に記憶させる。大容量メモリ11の符号化データ格納領域22は処理ライン毎に記憶領域が区切られており、符号化された画像データは、大容量メモリ11の符号化データ格納領域22に、処理ライン毎に格納されていく。このとき、大容量メモリ11の符号化データ格納領域22に符号化データを格納するためのアドレスは、アドレス記憶部12に記憶されたアドレスと、符号量記憶部17に記憶された符号量に基づいて算出される。   The encoded data writing unit 18 sends the image data encoded by the encoding unit 16 to the large capacity memory 11 and stores it in the encoded data storage area 22 of the large capacity memory 11. The encoded data storage area 22 of the large capacity memory 11 is divided into storage areas for each processing line, and the encoded image data is stored in the encoded data storage area 22 of the large capacity memory 11 for each processing line. It will be done. At this time, the address for storing the encoded data in the encoded data storage area 22 of the large-capacity memory 11 is based on the address stored in the address storage unit 12 and the code amount stored in the code amount storage unit 17. Is calculated.

符号化データ読出部19は、大容量メモリ11の符号化データ格納領域22に格納された符号化データを、処理ライン毎に連続して、各処理ラインの有効な符号化データを読み出し、後段に出力する。このとき、大容量メモリ11の符号化データ格納領域22から符号化データを読み出すためのアドレスは、アドレス記憶部12に記憶されたアドレスと、符号量記憶部17に記憶された符号量に基づいて算出される。   The encoded data reading unit 19 reads the encoded data stored in the encoded data storage area 22 of the large-capacity memory 11 continuously for each processing line, reads the effective encoded data of each processing line, Output. At this time, the address for reading the encoded data from the encoded data storage area 22 of the large capacity memory 11 is based on the address stored in the address storage unit 12 and the code amount stored in the code amount storage unit 17. Calculated.

次に、上述のように構成される画像処理装置の動作について説明する。図1において、図示していないカメラなどの画像データ入力装置により、画像データが入力される。入力された画像データは、バス10を介して、大容量メモリ11に送られる。入力画像データは、大容量メモリ11の入力画像格納領域21に、ラスタ走査順に書き込まれる。画像データは、図2に示すように、R,G,Bの画素がベイヤー配列で並んだ単一色の画像データであり、1フレームの画素数は、例えば(2564(水平方向)×1924(垂直方向))である。   Next, the operation of the image processing apparatus configured as described above will be described. In FIG. 1, image data is input by an image data input device such as a camera (not shown). The input image data is sent to the large-capacity memory 11 via the bus 10. The input image data is written in the input image storage area 21 of the large capacity memory 11 in the order of raster scanning. As shown in FIG. 2, the image data is single-color image data in which R, G, and B pixels are arranged in a Bayer array. The number of pixels in one frame is, for example, (2564 (horizontal direction) × 1924 (vertical). Direction)).

大容量メモリ11の入力画像格納領域21に一旦蓄積された画像データは、バス10を介して、データ読出部13に読み出される。このとき、大容量メモリ11の入力画像格納領域21に格納された1フレームの画像データは、水平方向にM個の小フレームが並んだ画像データとみなされ、各小フレーム毎にラスタ走査順に画像データが読み出される。   The image data once accumulated in the input image storage area 21 of the large capacity memory 11 is read out to the data reading unit 13 via the bus 10. At this time, one frame of image data stored in the input image storage area 21 of the large-capacity memory 11 is regarded as image data in which M small frames are arranged in the horizontal direction. Data is read out.

つまり、図3及び図4は、大容量メモリ11の入力画像格納領域21からのデータの転送を説明するものである。図3に示すように、大容量メモリ11の入力画像格納領域21には、ラスタ走査の順に、(2564画素×1924画素)の画像データが書き込まれる。   That is, FIG. 3 and FIG. 4 illustrate the transfer of data from the input image storage area 21 of the large capacity memory 11. As shown in FIG. 3, image data of (2564 pixels × 1924 pixels) is written in the input image storage area 21 of the large capacity memory 11 in the order of raster scanning.

すなわち、1フレームの最上のライン「1」の画像データが水平方向に2564画素分、左から右に書き込まれる。以下、ライン「1」からライン「1924」まで、各ライン毎に、ラスタ走査の順に画像データが書き込まれる。   That is, the image data of the uppermost line “1” of one frame is written in the horizontal direction for 2564 pixels from left to right. Thereafter, image data is written in the order of raster scanning from line “1” to line “1924” for each line.

大容量メモリ11の入力画像格納領域21から画像データを読み出す際には、図4に示すように、1フレームがM個の小フレームに分割される。この例では、1フレームが4つの小フレームA、B、C、Dに分割される。そして、各小フレームA〜D毎に、ラスタ走査の順に、画像データが読み出される。   When image data is read from the input image storage area 21 of the large-capacity memory 11, one frame is divided into M small frames as shown in FIG. In this example, one frame is divided into four small frames A, B, C, and D. Then, image data is read out in the order of raster scanning for each of the small frames A to D.

すなわち、先ず、小フレームAのライン「1」の画像データが水平方向に644画素分、左から右に読み出される。以下、ライン「1」からライン「1924」まで、各ライン毎に、ラスタ走査の順に画像データが読み出される。   That is, first, the image data of the line “1” of the small frame A is read from the left to the right for 644 pixels in the horizontal direction. Hereinafter, image data is read out in the order of raster scanning for each line from line “1” to line “1924”.

小フレームAの読み出しが終了したら、次に、小フレームBの画像データがライン「1」からライン「1924」までラスタ走査の順に読み出される。小フレームBの読み出しが終了したら、次に、小フレームCの画像データがライン「1」からライン「1924」までラスタ走査の順に読み出され、小フレームCの読み出しが終了したら、小フレームDの画像データがライン「1」からライン「1924」までラスタ走査の順に読み出される。   When the reading of the small frame A is completed, the image data of the small frame B is then read from the line “1” to the line “1924” in the order of raster scanning. When the reading of the small frame B is completed, the image data of the small frame C is then read in the order of raster scanning from the line “1” to the line “1924”, and when the reading of the small frame C is completed, the small frame D is read. Image data is read from line “1” to line “1924” in the order of raster scanning.

このとき、大容量メモリ11の入力画像格納領域21に格納された画像データを読み出すためのアドレスは、アドレス記憶部12に記憶された該当レジスタ値に基づいて算出される。   At this time, an address for reading the image data stored in the input image storage area 21 of the large-capacity memory 11 is calculated based on the corresponding register value stored in the address storage unit 12.

なお、このように画像を読み出す際、図4に示すように、隣り合う小フレームに重複して読み出される画素の部分Pa〜Pcが存在する。このように、重複して読み出される画素の部分Pa〜Pcが存在する理由については、後に説明する。   When the image is read out in this way, as shown in FIG. 4, there are pixel portions Pa to Pc that are read out redundantly in adjacent small frames. The reason why there are pixel portions Pa to Pc that are redundantly read out will be described later.

また、この例では、1フレームを等分に分割し、全ての小フレームA〜Dの水平方向の画素数を644画素としているが、その画素数は小フレーム毎に異なっていても良い。また、ここでは、1フレームを4個の小フレームに分割しているが、これに限られるものではない。   In this example, one frame is divided equally and the number of pixels in the horizontal direction of all the small frames A to D is 644 pixels. However, the number of pixels may be different for each small frame. Here, one frame is divided into four small frames, but the present invention is not limited to this.

図1において、データ読出部13により、小フレームA〜Dの順に読み出された画像データは、前処理部14に送られる。前処理部14では、色補間処理や輪郭強調処理など、好適な画像を生成するための画像処理が行われる。色補間処理を施された画像データは、1画素がR、G、又はBの単一色の画像データから、1画素がR,G,Bの3種類の色情報を有する画像データになる。補間処理には、例えば、着目画素に存在しない色を、着目画素の近傍の画素より補間する例えば(5×5)の補間フィルタが用いられる。補間処理により各画素毎にRGBの情報を持った画素データは、マトリクス演算により、Y,U,Vの3種類の画像データに変換される。   In FIG. 1, the image data read by the data reading unit 13 in the order of small frames A to D is sent to the preprocessing unit 14. The preprocessing unit 14 performs image processing for generating a suitable image, such as color interpolation processing and contour enhancement processing. The image data subjected to the color interpolation processing is changed from image data of a single color with one pixel being R, G, or B to image data having three types of color information with one pixel being R, G, B. For example, for example, a (5 × 5) interpolation filter that interpolates a color that does not exist in the pixel of interest from pixels in the vicinity of the pixel of interest is used. Pixel data having RGB information for each pixel by interpolation processing is converted into three types of image data of Y, U, and V by matrix calculation.

このような補間処理を行うときのフィルタ処理では、フィルタ処理後の画像サイズがフィルタ処理前の画像サイズより小さくなるという性質がある。なぜなら、図5(A)に示すように、着目画素Pxの周辺に有効な参照画素のデータがある場合には、着目画素Pxの周辺の画像データを用いて、フィルタ演算が行えるが、図5(B)に示すように、フィルタ演算を行う着目画素Pyが画像の端部付近の場合は、(5×5)フィルタの参照画素に有効ではない画像データが含まれるため、その画素の演算結果が無効なデータとなるためである。   The filter process when performing such an interpolation process has a property that the image size after the filter process is smaller than the image size before the filter process. This is because, as shown in FIG. 5A, when there is valid reference pixel data around the pixel of interest Px, filter calculation can be performed using image data around the pixel of interest Px. As shown in (B), when the pixel of interest Py to be subjected to the filter calculation is near the edge of the image, the reference pixel of the (5 × 5) filter includes image data that is not valid, and the calculation result of that pixel Is invalid data.

例えば、本実施の形態のように(644画素×1924画素)の画像サイズの小フレームに対して(5×5)のフィルタ処理を施すと、フィルタ処理後の有効画像サイズは(640画素×1920画素)となる。そのため、フィルタ処理により減少する画像サイズを考慮して、小フレームの画像サイズを決定しなければならない。また、このことが、図4に示したように、隣り合う小フレームに重複して読み出される画素の部分Pa〜Pcが存在する理由である。   For example, when (5 × 5) filter processing is performed on a small frame having an image size of (644 pixels × 1924 pixels) as in the present embodiment, the effective image size after the filter processing is (640 pixels × 1920). Pixel). Therefore, it is necessary to determine the image size of the small frame in consideration of the image size that is reduced by the filtering process. This is also the reason why there are pixel portions Pa to Pc that are read out redundantly in adjacent small frames, as shown in FIG.

図1において、前処理部14からのYUVの画像データは、ブロック変換部15に送られる。ブロック変換部15では、ラスタ単位の画像データ形式をブロック単位のデータ形式に変換する処理が行われる。例えば、JPEG符号化処理を行う場合には、前処理部14からラスタ単位で出力されるY,U,Vそれぞれの画像データは、ブロック変換メモリに8ライン分格納され、後段に対して(8×8)画素のブロック単位毎に出力される。   In FIG. 1, the YUV image data from the preprocessing unit 14 is sent to the block conversion unit 15. The block conversion unit 15 performs processing for converting the raster-unit image data format into the block-unit data format. For example, when JPEG encoding processing is performed, 8 lines of Y, U, and V image data output from the preprocessing unit 14 in units of rasters are stored in the block conversion memory, and (8 X8) Output for each block of pixels.

ブロック変換部15でブロック変換された画像データは、符号化部16に送られる。符号化部16で、ブロック変換部15から入力されるブロック単位の画像データが符号化される。例えばJPEG方式で圧縮符号化を行う場合には、ブロック毎にDCT演算が行われ、時間領域のデータから周波数領域のデータに変換される。DCT変換により周波数領域に変換されたデータは、量子化器で量子化され、ハフマン符号を用いて可変長符号化される。   The image data block-converted by the block converter 15 is sent to the encoder 16. The encoding unit 16 encodes the block-unit image data input from the block conversion unit 15. For example, when compression encoding is performed by the JPEG method, DCT calculation is performed for each block, and data from the time domain is converted to data in the frequency domain. The data transformed into the frequency domain by DCT transformation is quantized by a quantizer and variable-length coded using a Huffman code.

符号化部16で符号化された符号化データの符号量は、符号量記憶部17で取得される。符号量記憶部17には、各処理ライン毎の符号量を記憶する符号量メモリ31が設けられている。符号量メモリ31には、図6に示すように、処理ライン毎の符号量を格納するための領域ARA_M1〜ARA_M240が設けられている。   The code amount of the encoded data encoded by the encoding unit 16 is acquired by the code amount storage unit 17. The code amount storage unit 17 is provided with a code amount memory 31 for storing a code amount for each processing line. As shown in FIG. 6, the code amount memory 31 is provided with areas ARA_M1 to ARA_M240 for storing the code amount for each processing line.

符号量記憶部17では、符号化部16により符号化された小フレームが画像左端を含む場合は、小フレーム内の処理ライン(以下、ドメインと称する)の符号量が各処理ラインの毎に符号量メモリ31の領域ARA_M1〜ARA_M240にそれぞれ記憶される。符号化部16により符号化された小フレームが画像左端を含まない場合は、該当ドメインの符号量と、符号量メモリ31の領域ARA_M1〜ARA_M240に既に格納されている該当処理ラインの符号量とが加算され、加算結果が新たな該当処理ラインの符号量として、各処理ライン毎に符号量メモリ31の領域ARA_M1〜ARA_M240にそれぞれ格納される。これにより、符号量記憶部17の符号量メモリ31の領域ARA_M1〜ARA_M240には、各処理ライン毎の符号量がそれぞれ記憶される。   In the code amount storage unit 17, when the small frame encoded by the encoding unit 16 includes the left end of the image, the code amount of the processing line (hereinafter referred to as a domain) in the small frame is encoded for each processing line. They are stored in areas ARA_M1 to ARA_M240 of the quantity memory 31, respectively. When the small frame encoded by the encoding unit 16 does not include the left end of the image, the code amount of the corresponding domain and the code amount of the corresponding processing line already stored in the areas ARA_M1 to ARA_M240 of the code amount memory 31 are obtained. The addition result is stored in the areas ARA_M1 to ARA_M240 of the code amount memory 31 for each processing line as the code amount of the new corresponding processing line. As a result, the code amount for each processing line is stored in the areas ARA_M1 to ARA_M240 of the code amount memory 31 of the code amount storage unit 17, respectively.

この例では、可変長符号であるJPEG方式で符号化を行っているため、このような符号量記憶部17が必要になるが、符号化部16における符号化処理が固定長符号化処理の場合は、符号量を予め見積もることができるため、符号量記憶部17を備える必要はない。また、符号量を記憶する代わりに、大容量メモリ11におけるアドレスのステップ幅、又はアドレスそのものを符号量から算出して符号量記憶部17に記憶しても構わない。   In this example, since encoding is performed using the JPEG method, which is a variable-length code, such a code amount storage unit 17 is required, but the encoding process in the encoding unit 16 is a fixed-length encoding process. Since the code amount can be estimated in advance, it is not necessary to include the code amount storage unit 17. Further, instead of storing the code amount, the step width of the address in the large-capacity memory 11 or the address itself may be calculated from the code amount and stored in the code amount storage unit 17.

なお、符号量記憶部17に格納する符号量は、大容量メモリ11に格納された符号化データが不必要になるまで、例えば、後述する符号化データ読出部19により大容量メモリ11から符号化データが読み出され外部記憶媒体(図示せず)に保存されるまで、記憶しておけば良い。また、本実施の形態において複数フレームの画像処理を連続的に実行して、大容量メモリ11に複数フレーム分の符号化データを格納する場合は、そのフレーム数と同数の符号量メモリ31を備えれば良い。この符号量記憶部17の詳細な説明は、以下の符号化データ書込部18の説明と共に行う。   The code amount stored in the code amount storage unit 17 is encoded from the large-capacity memory 11 by, for example, the encoded data reading unit 19 described later until the encoded data stored in the large-capacity memory 11 becomes unnecessary. The data may be stored until it is read and stored in an external storage medium (not shown). Further, in the present embodiment, when image processing for a plurality of frames is continuously executed and encoded data for a plurality of frames is stored in the large-capacity memory 11, a code amount memory 31 having the same number as the number of frames is provided. Just do it. The detailed description of the code amount storage unit 17 will be made together with the description of the encoded data writing unit 18 below.

図1において、符号化部16からの符号化データは、符号化データ書込部18により、大容量メモリ11に送られる。大容量メモリ11の符号化データ格納領域22は、図7に示すように、各処理ライン毎の格納領域に区切られており、処理ライン毎のメモリ領域ARA_N1〜ARA_N240を備えている。符号化データ書込部18により、小フレームを構成する少なくとも1つ以上のドメインの符号化データは、そのドメインが属する処理ラインのメモリ領域ARA_N1〜ARA_N240にそれぞれ格納される。   In FIG. 1, the encoded data from the encoding unit 16 is sent to the large capacity memory 11 by the encoded data writing unit 18. As shown in FIG. 7, the encoded data storage area 22 of the large-capacity memory 11 is divided into storage areas for each processing line, and includes memory areas ARA_N1 to ARA_N240 for each processing line. The encoded data writing unit 18 stores the encoded data of at least one domain constituting the small frame in the memory areas ARA_N1 to ARA_N240 of the processing line to which the domain belongs.

このとき、格納される符号化データに対応するドメインが画像左端を含む場合は、該当ドメインが属する処理ラインのメモリ領域ARA_N1〜ARA_N240の先頭から、その符号化データが格納される。一方、格納される符号化データに対応するドメインが画像左端を含まない場合は、各メモリ領域ARA_N1〜ARA_N240において、直前に符号量を格納した小フレームの同一処理ラインに対応する符号化データの直後から、符号化データが格納される。   At this time, if the domain corresponding to the stored encoded data includes the left end of the image, the encoded data is stored from the top of the memory areas ARA_N1 to ARA_N240 of the processing line to which the corresponding domain belongs. On the other hand, when the domain corresponding to the stored encoded data does not include the left end of the image, in each memory area ARA_N1 to ARA_N240, immediately after the encoded data corresponding to the same processing line of the small frame storing the code amount immediately before From this, the encoded data is stored.

すなわち、アドレス記憶部12には、メモリ領域ARA_N1〜ARA_N240の先頭アドレスADDR1〜ADDR240が記憶されている。格納される符号化データに対応するドメインが画像左端を含む場合は、アドレス記憶部12に記憶されている先頭アドレスADDR1〜ADDR240を参照して、各メモリ領域ARA_N1〜ARA_N240の先頭から符号化データが格納される。   That is, the address storage unit 12 stores the top addresses ADDR1 to ADDR240 of the memory areas ARA_N1 to ARA_N240. When the domain corresponding to the stored encoded data includes the left end of the image, the encoded data is referred to from the top of each of the memory areas ARA_N1 to ARA_N240 with reference to the start addresses ADDR1 to ADDR240 stored in the address storage unit 12. Stored.

また、符号化データ書込部18の符号量メモリ31には、それまで格納した同一処理ラインの符号化データの符号量が記憶されている。格納される符号化データに対応するドメインが画像左端を含まない場合は、メモリ領域ARA_N1〜ARA_N240の先頭アドレスADDR1〜ADDR240に、符号化データ書込部18の符号量メモリ31からの符号量に相当するアドレスを加算する。このようにして算定されたアドレスから符号化データを格納することで、各メモリ領域ARA_N1〜ARA_N240において、直前に符号量を格納した小フレームの同一処理ラインに対応する符号化データの直後から、符号化データが格納される。   Further, the code amount memory 31 of the encoded data writing unit 18 stores the code amount of the encoded data of the same processing line stored so far. When the domain corresponding to the encoded data to be stored does not include the left end of the image, the start address ADDR1 to ADDR240 of the memory area ARA_N1 to ARA_N240 corresponds to the code amount from the code amount memory 31 of the encoded data writing unit 18. Add the addresses to be used. By storing the encoded data from the address calculated in this way, in each of the memory areas ARA_N1 to ARA_N240, the code is encoded immediately after the encoded data corresponding to the same processing line of the small frame in which the code amount is stored immediately before. Stored data.

図8は、符号化処理を行う際の小フレーム、処理ライン及びドメインの構成を説明するものである。符号化部16で符号化処理を行う際には、図8において、先ず、小フレームAの処理ライン「1」(ドメインA1)の符号化処理が行われる。なお、(8×8)のブロック化を行った場合、処理ラインは、8ライン分の画素データに相当する。次に、小フレームAの処理ライン「2」(ドメインA2)の符号化処理が行われ、小フレームAの処理ライン「3」(ドメインA3)の符号化処理が行われ、以下、小フレームAの処理ライン「240」(ドメインA240)まで、順に、符号化処理が行われる。   FIG. 8 illustrates the configuration of a small frame, a processing line, and a domain when performing an encoding process. When the encoding unit 16 performs the encoding process, in FIG. 8, first, the encoding process of the processing line “1” (domain A1) of the small frame A is performed. When (8 × 8) blocking is performed, the processing line corresponds to pixel data for 8 lines. Next, the encoding process of the processing line “2” (domain A2) of the small frame A is performed, and the encoding process of the processing line “3” (domain A3) of the small frame A is performed. The encoding process is sequentially performed up to the process line “240” (domain A240).

図7に示したように、大容量メモリ11の符号化データ格納領域22は、各ライン毎のメモリ領域ARA_N1〜ARA_N240に区切られており、各ドメインの符号化データは、そのドメインが属する処理ラインのメモリ領域ARA_N1〜ARA_N240にそれぞれ格納される。このとき、格納される符号化データに対応するドメインが画像左端を含む場合は、該当ドメインが属する処理ラインのメモリ領域ARA_N1〜ARA_N240の先頭から、その符号化データが格納される。小フレームAの画像は左端を含んでいるので、各ドメインA1〜A240の符号化データENC_A1〜ENC_A240は、そのドメインが属する処理ラインのメモリ領域ARA_N1〜ARA_N240の先頭から格納される。メモリ領域ARA_N1〜ARA_N240の先頭アドレスADDR1〜ADDR240は、アドレス記憶部12から参照される。   As shown in FIG. 7, the encoded data storage area 22 of the large-capacity memory 11 is divided into memory areas ARA_N1 to ARA_N240 for each line, and the encoded data of each domain is the processing line to which that domain belongs. Are stored in the memory areas ARA_N1 to ARA_N240, respectively. At this time, if the domain corresponding to the stored encoded data includes the left end of the image, the encoded data is stored from the top of the memory areas ARA_N1 to ARA_N240 of the processing line to which the corresponding domain belongs. Since the image of the small frame A includes the left end, the encoded data ENC_A1 to ENC_A240 of each domain A1 to A240 is stored from the top of the memory areas ARA_N1 to ARA_N240 of the processing line to which the domain belongs. The start addresses ADDR1 to ADDR240 of the memory areas ARA_N1 to ARA_N240 are referred to from the address storage unit 12.

このように、小フレームAの各処理ライン「1」、「2」、「3」、…、「240」(ドメインA1、A2、A3、…、A240)の符号化を行っていく際に、その符号量が符号量記憶部17で取得される。前述したように、符号量記憶部17では、符号化部16により符号化された小フレームが画像左端を含む場合は、小フレーム内の処理ライン(ドメイン)の符号量が各処理ラインの領域毎に符号量メモリ31に記憶される。小フレームAの画像は左端を含んでいるので、小フレームA内の各処理ライン(ドメイン)の符号量は、各処理ラインの領域毎に、符号量記憶部17の符号量メモリ31に記憶される。   Thus, when encoding each processing line “1”, “2”, “3”,..., “240” (domains A1, A2, A3,..., A240) of the small frame A, The code amount is acquired by the code amount storage unit 17. As described above, in the code amount storage unit 17, when the small frame encoded by the encoding unit 16 includes the left end of the image, the code amount of the processing line (domain) in the small frame is set for each region of each processing line. Is stored in the code amount memory 31. Since the image of the small frame A includes the left end, the code amount of each processing line (domain) in the small frame A is stored in the code amount memory 31 of the code amount storage unit 17 for each region of each processing line. The

すなわち、符号化部16で符号化されたドメインA1の符号化データENC_A1は、図9に示すように、符号化データ格納領域22のメモリ領域ARA_N1の先頭から記憶される。ドメインA1の符号化が終了すると、ドメインA1の符号量AMT_A1が符号量記憶部17で取得される。この符号量AMT_A1は、図10に示すように、処理ライン「1」の符号量SUM1(SUM1=AMT_A1)として、符号量メモリ31の領域ARA_M1に記憶される。   That is, the encoded data ENC_A1 of the domain A1 encoded by the encoding unit 16 is stored from the beginning of the memory area ARA_N1 of the encoded data storage area 22, as shown in FIG. When the encoding of the domain A1 is completed, the code amount AMT_A1 of the domain A1 is acquired by the code amount storage unit 17. As shown in FIG. 10, the code amount AMT_A1 is stored in the area ARA_M1 of the code amount memory 31 as the code amount SUM1 (SUM1 = AMT_A1) of the processing line “1”.

次に、ドメインA2の符号化データENC_A2は、図9に示すように、符号化データ格納領域22のメモリ領域ARA_N2の先頭から記憶される。ドメインA2の符号化が終了すると、ドメインA2の符号量AMT_A2が符号量記憶部17で取得される。この符号量AMT_A2は、図10に示すように、処理ライン「2」の符号量SUM2(SUM2=AMT_A2)として、符号量メモリ31の領域ARA_M2に記憶される。   Next, the encoded data ENC_A2 of the domain A2 is stored from the beginning of the memory area ARA_N2 of the encoded data storage area 22, as shown in FIG. When the encoding of the domain A2 is completed, the code amount AMT_A2 of the domain A2 is acquired by the code amount storage unit 17. The code amount AMT_A2 is stored in the area ARA_M2 of the code amount memory 31 as the code amount SUM2 (SUM2 = AMT_A2) of the processing line “2” as shown in FIG.

以下、小フレームAの各ドメインA1〜A240の符号化データENC_A1〜ENC_A240は、図9に示すように、符号化データ格納領域22のメモリ領域ARA_N1〜ARA_N240の先頭からそれぞれ記憶される。小フレームAの各ドメインA1〜A240の符号化が終了すると、そのドメインの符号量AMT_A1〜AMT_A240が符号量記憶部17で取得され、この符号量AMT_A1〜AMT_A240が各処理ラインの符号量として、図10に示すように、符号量メモリ31の領域ARA_M1〜ARA_M240にそれぞれ記憶される。   Hereinafter, the encoded data ENC_A1 to ENC_A240 of the domains A1 to A240 of the small frame A are respectively stored from the top of the memory areas ARA_N1 to ARA_N240 of the encoded data storage area 22, as shown in FIG. When the encoding of the domains A1 to A240 of the small frame A is completed, the code amounts AMT_A1 to AMT_A240 of the domains are acquired by the code amount storage unit 17, and the code amounts AMT_A1 to AMT_A240 are used as the code amounts of the respective processing lines. As shown in FIG. 10, the data is stored in areas ARA_M <b> 1 to ARA_M <b> 240 of the code amount memory 31.

小フレームAの符号化が終了すると、次に、小フレームBの処理ライン「1」(ドメインB1)の符号化処理が行われ、以下、小フレームBの処理ライン「240」(ドメインB240)まで、順に、符号化処理が行われる。小フレームBの画像は左端を含んでいないので、各ドメインの符号化データは、各メモリ領域ARA_N1〜ARA_N240において、直前に符号量を格納した小フレームの同一処理ラインに対応する符号化データの直後から、符号化データが格納される。このときのアドレスは、アドレス記憶部12に記憶されているメモリ領域ARA_N1〜ARA_N240の先頭アドレスADDR1〜ADDR240に、符号量記憶部17の符号量メモリ31の各処理ライン毎の符号量SUM1〜SUM240を加算することにより求めることができる。   When the encoding of the small frame A is completed, the encoding process of the processing line “1” (domain B1) of the small frame B is performed, and then the processing line “240” (domain B240) of the small frame B is performed. In order, the encoding process is performed. Since the image of the small frame B does not include the left end, the encoded data of each domain is immediately after the encoded data corresponding to the same processing line of the small frame storing the code amount immediately before in each memory area ARA_N1 to ARA_N240. From this, the encoded data is stored. At this time, the code amount SUM1 to SUM240 for each processing line of the code amount memory 31 of the code amount storage unit 17 is added to the top addresses ADDR1 to ADDR240 of the memory areas ARA_N1 to ARA_N240 stored in the address storage unit 12. It can be obtained by adding.

このように、小フレームBの各処理ライン「1」、「2」、「3」、…、「240」(ドメインB1、B2、B3、…、B240)で符号化を行っていく際に、その符号量が符号量記憶部17で取得される。小フレームBは画像左端を含まないので、該当ドメインの符号量と、符号量メモリ31に既に格納されている該当処理ラインの符号量とが加算され、加算結果が新たな該当処理ラインの符号量として各処理ライン毎に符号量メモリ31に格納される。   In this way, when encoding is performed on each processing line “1”, “2”, “3”,..., “240” (domains B1, B2, B3,..., B240) of the small frame B, The code amount is acquired by the code amount storage unit 17. Since the small frame B does not include the left end of the image, the code amount of the corresponding domain and the code amount of the corresponding processing line already stored in the code amount memory 31 are added, and the addition result is a new code amount of the corresponding processing line. Is stored in the code amount memory 31 for each processing line.

すなわち、符号化部16で符号化されたドメインB1の符号化データENC_B1は、図11に示すように、符号化データ格納領域22のメモリ領域ARA_N1において、符号化データENC_A1に続いて記憶される。ドメインB1の符号化が終了すると、ドメインB1の符号量AMT_B1が符号量記憶部17で取得される。この符号量AMT_B1が処理ライン「1」のそれまでの符号量SUM1に加算され、加算結果が処理ライン「1」の新たな符号量として、図12に示すように、符号量メモリ31の領域ARA_M1に記憶される(SUM1=SUM1+AMT_B1)。なお、領域ARA_M1には、それまで、ドメインA1での符号量AMT_A1が記憶されているので、処理ライン「1」の符号量SUM1は、(SUM1=AMT_A1+AMT_B1)となる。   That is, the encoded data ENC_B1 of the domain B1 encoded by the encoding unit 16 is stored subsequent to the encoded data ENC_A1 in the memory area ARA_N1 of the encoded data storage area 22, as shown in FIG. When the encoding of the domain B1 is completed, the code amount AMT_B1 of the domain B1 is acquired by the code amount storage unit 17. This code amount AMT_B1 is added to the previous code amount SUM1 of the processing line “1”, and the addition result is a new code amount of the processing line “1”, as shown in FIG. 12, in the area ARA_M1 of the code amount memory 31. (SUM1 = SUM1 + AMT_B1). Since the area ARA_M1 stores the code amount AMT_A1 in the domain A1 so far, the code amount SUM1 of the processing line “1” is (SUM1 = AMT_A1 + AMT_B1).

符号化部16で符号化されたドメインB2の符号化データENC_B2は、図11に示すように、符号化データ格納領域22のメモリ領域ARA_N2において、符号化データENC_A2に続いて記憶される。ドメインB2の符号化が終了すると、ドメインB2の符号量AMT_B2が符号量記憶部17で取得される。この符号量AMT_B2が処理ライン「2」のそれまでの符号量SUM2に加算され、加算結果が処理ライン「2」の新たな符号量として、図12に示すように、符号量メモリ31の領域ARA_M2に記憶される(SUM2=SUM2+AMT_B2)。なお、領域ARA_M2には、それまで、ドメインA2での符号量AMT_A2が記憶されているので、処理ライン「2」の符号量SUM2は、(SUM2=AMT_A2+AMT_B2)となる。   The encoded data ENC_B2 of the domain B2 encoded by the encoding unit 16 is stored subsequent to the encoded data ENC_A2 in the memory area ARA_N2 of the encoded data storage area 22, as shown in FIG. When the encoding of the domain B2 is completed, the code amount AMT_B2 of the domain B2 is acquired by the code amount storage unit 17. This code amount AMT_B2 is added to the previous code amount SUM2 of the processing line “2”, and the addition result is a new code amount of the processing line “2”, as shown in FIG. 12, in the area ARA_M2 of the code amount memory 31. (SUM2 = SUM2 + AMT_B2). Since the code amount AMT_A2 in the domain A2 is stored in the area ARA_M2 until then, the code amount SUM2 of the processing line “2” is (SUM2 = AMT_A2 + AMT_B2).

以下、小フレームBの各ドメインB1〜B240の符号化データENC_B1〜ENC_B240は、図11に示すように、符号化データ格納領域22のメモリ領域ARA_N1〜ARA_N240に、符号化データENC_A1〜ENC_A240に続いてそれぞれ記憶される。小フレームBの各ドメインB1〜B240の符号化が終了すると、そのドメインの符号量AMT_B1〜AMT_B240が符号量記憶部17で取得され、この符号量AMT_B1〜AMT_B240が各処理ラインの符号量として、図12に示すように、符号量メモリ31の領域ARA_M1〜ARA_M240にそれぞれ記憶される。   Hereinafter, the encoded data ENC_B1 to ENC_B240 of each of the domains B1 to B240 of the small frame B follow the encoded data ENC_A1 to ENC_A240, following the memory areas ARA_N1 to ARA_N240 of the encoded data storage area 22, as shown in FIG. Each is remembered. When the encoding of the domains B1 to B240 of the small frame B is completed, the code amounts AMT_B1 to AMT_B240 of the domains are acquired by the code amount storage unit 17, and the code amounts AMT_B1 to AMT_B240 are used as the code amounts of the respective processing lines. 12, the data is stored in areas ARA_M1 to ARA_M240 of the code amount memory 31, respectively.

小フレームBの符号化が終了すると、次に、小フレームCの符号化処理が行われる。小フレームCの各ドメインC1〜C240の符号化データENC_C1〜ENC_C240は、図13に示すように、符号化データ格納領域22のメモリ領域ARA_N1〜ARA_N240に、符号化データENC_B1〜ENC_B240に続いてそれぞれ記憶される。小フレームCの各ドメインC1〜C240の符号化が終了すると、そのドメインの符号量AMT_C1〜AMT_C240が符号量記憶部17で取得され、この符号量AMT_C1〜AMT_C240が各処理ラインの符号量として、図14に示すように、符号量メモリ31の領域ARA_C1〜ARA_C240にそれぞれ記憶される。   When the encoding of the small frame B is completed, the encoding process of the small frame C is performed next. As shown in FIG. 13, the encoded data ENC_C1 to ENC_C240 of the domains C1 to C240 of the small frame C are stored in the memory areas ARA_N1 to ARA_N240 of the encoded data storage area 22 and the encoded data ENC_B1 to ENC_B240, respectively. Is done. When the encoding of the domains C1 to C240 of the small frame C is completed, the code amounts AMT_C1 to AMT_C240 of the domains are acquired by the code amount storage unit 17, and the code amounts AMT_C1 to AMT_C240 are used as the code amounts of the respective processing lines. 14, the data is stored in the areas ARA_C1 to ARA_C240 of the code amount memory 31, respectively.

小フレームCの符号化が終了すると、次に、小フレームDの符号化処理が行われる。小フレームDの各ドメインD1〜D240の符号化データENC_D1〜ENC_D240は、図15に示すように、符号化データ格納領域22のメモリ領域ARA_N1〜ARA_N240に、符号化データENC_C1〜ENC_C240に続いて記憶される。小フレームDの各ドメインD1〜D240の符号化が終了すると、そのドメインの符号量AMT_D1〜AMT_D240が符号量記憶部17で取得され、この符号量AMT_D1〜AMT_D240が各処理ラインの符号量として、図16に示すように、符号量メモリ31の領域ARA_C1〜ARA_C240にそれぞれ記憶される。   When the encoding of the small frame C is completed, the encoding process of the small frame D is performed next. The encoded data ENC_D1 to ENC_D240 of the domains D1 to D240 of the small frame D are stored in the memory areas ARA_N1 to ARA_N240 of the encoded data storage area 22 after the encoded data ENC_C1 to ENC_C240, as shown in FIG. The When encoding of the domains D1 to D240 of the small frame D is completed, the code amounts AMT_D1 to AMT_D240 of the domains are acquired by the code amount storage unit 17, and the code amounts AMT_D1 to AMT_D240 are used as the code amounts of the respective processing lines. As shown in FIG. 16, it is stored in the areas ARA_C1 to ARA_C240 of the code amount memory 31, respectively.

以上のようにして、小フレームAからDまでの符号化処理が完了すると、図15に示すように、大容量メモリ11の符号化データ格納領域22の領域ARA_N1〜ARA_N240には、各処理ライン毎の符号化データENC_A1〜ENC_D1、ENC_A2〜ENC_D2、…、ENC_A240〜ENC_D240がそれぞれ格納される。また、符号量記憶部17には、図16に示すように、各処理ライン毎の符号量SUM1〜SUM240が記憶される。   When the encoding process from the small frames A to D is completed as described above, the areas ARA_N1 to ARA_N240 of the encoded data storage area 22 of the large-capacity memory 11 are set for each processing line as shown in FIG. Encoded data ENC_A1 to ENC_D1, ENC_A2 to ENC_D2,..., ENC_A240 to ENC_D240 are stored. Further, as shown in FIG. 16, the code amount storage unit 17 stores code amounts SUM1 to SUM240 for each processing line.

図1において、上述のようにして大容量メモリ11の符号化データ格納領域22に一旦格納された符号化データは、符号化データ読出部19により、処理ライン毎に読み出される。このとき符号化データ読出部19が大容量メモリ11に対して発行するアドレスは、アドレス記憶部12に記憶された各処理ラインのメモリ領域ARA_N1〜ARA_N240の先頭アドレスと、符号量記憶部17に記憶された各処理ラインの符号量SUM1〜SUM240とから算出される。   In FIG. 1, the encoded data once stored in the encoded data storage area 22 of the large-capacity memory 11 as described above is read out for each processing line by the encoded data reading unit 19. At this time, the address that the encoded data reading unit 19 issues to the large-capacity memory 11 is stored in the start address of the memory areas ARA_N1 to ARA_N240 of each processing line stored in the address storage unit 12 and the code amount storage unit 17. It is calculated from the code amount SUM1 to SUM240 of each processed line.

つまり、先ず、図15における大容量メモリ11のメモリ空間における処理ライン「1」のメモリ領域ARA_N1の先頭アドレスADDR1がアドレス記憶部12より参照され、そのアドレスADDR1を用いて、処理ライン「1」の符号化データの符号化データの読み出し開始位置が設定される。そして、図16における符号量記憶部17の領域ARA_M1から処理ライン「1」の符号量SUM1が参照され、アドレスADDR1から、符号量SUM1に相当する符号量に相当するアドレスが算出され、算出されたアドレスの分だけ、データが読み出される。これにより、大容量メモリ11の符号化データ格納領域22のメモリ領域ARA_N1から、処理ライン「1」の符号化データ(ENC_A1、ENC_B1、ENC_C1、ENC_D1)が読み出され、読み出された符号化データが後段に出力される。   That is, first, the start address ADDR1 of the memory area ARA_N1 of the processing line “1” in the memory space of the large capacity memory 11 in FIG. 15 is referred from the address storage unit 12, and the processing line “1” of the processing line “1” is used by using the address ADDR1. The read start position of the encoded data of the encoded data is set. Then, the code amount SUM1 of the processing line “1” is referred from the area ARA_M1 of the code amount storage unit 17 in FIG. 16, and an address corresponding to the code amount corresponding to the code amount SUM1 is calculated and calculated from the address ADDR1. Data is read by the address. As a result, the encoded data (ENC_A1, ENC_B1, ENC_C1, ENC_D1) of the processing line “1” is read from the memory area ARA_N1 of the encoded data storage area 22 of the large capacity memory 11, and the read encoded data is read. Is output to the subsequent stage.

処理ライン「1」の符号化データの読み出しが終了したら、連続的に、処理ライン「2」の符号化データの読み出しが行われ、読み出された符号化データが後段に出力される。処理ライン「2」の符号化データの読み出しは、処理ライン「1」と同様に行われる。   When the reading of the encoded data of the processing line “1” is completed, the encoded data of the processing line “2” is continuously read, and the read encoded data is output to the subsequent stage. Reading of the encoded data of the processing line “2” is performed in the same manner as the processing line “1”.

このようにして、処理ライン「240」まで、大容量メモリ11の符号化データ格納領域22のメモリ領域ARA_N1〜ARA_N240から、符号化データの読み出しと、後段への符号化データの出力とが繰り返し行われる。   In this way, until the processing line “240”, the reading of the encoded data and the output of the encoded data to the subsequent stage are repeatedly performed from the memory areas ARA_N1 to ARA_N240 of the encoded data storage area 22 of the large capacity memory 11. Is called.

なお、本実施の形態では符号化データ読出部19において、先頭の処理ラインから符号化データを読み出したが、これに限らず、任意の処理ラインからデータを読み出すことも可能である。   In the present embodiment, the encoded data reading unit 19 reads the encoded data from the first processing line. However, the present invention is not limited to this, and data can be read from any processing line.

以上のようにして、図17に示すように、符号化データ読出部19からは、各処理ライン「1」、「2」、「3」、…の符号化データが連続して出力される。符号化データ読出部19から出力される符号化データは、一般的なJPEG符号化処理により生成された符号化データの順序と差異がない。そのため、符号化データの復号にあたって特殊な復号化方法は必要なく、一般的なJPEG復号化方法で符号化データを復号することができる。   As described above, as shown in FIG. 17, the encoded data reading unit 19 continuously outputs the encoded data of the processing lines “1”, “2”, “3”,. The encoded data output from the encoded data reading unit 19 is not different from the order of the encoded data generated by the general JPEG encoding process. Therefore, no special decoding method is required for decoding the encoded data, and the encoded data can be decoded by a general JPEG decoding method.

なお、復号する符号化データの転送を本発明の画像処理装置において実行する場合においては、必ずしも図17のようにデータを隙間なく転送する必要はない。この場合、転送された符号化データを復号するために再度転送する際、各処理ラインの符号量を参照して、復号化装置にデータを隙間なく転送すれば良い。そのため、この場合は各処理ラインの符号量は符号化データを復号するまで保持しておくか、符号化データと共に符号量を転送しておく必要がある。   Note that when the encoded data to be decoded is transferred in the image processing apparatus of the present invention, it is not always necessary to transfer the data without gaps as shown in FIG. In this case, when the transferred encoded data is transferred again for decoding, the code amount of each processing line is referred to and the data may be transferred to the decoding device without any gap. Therefore, in this case, it is necessary to hold the code amount of each processing line until the encoded data is decoded or to transfer the code amount together with the encoded data.

また、符号化データ読出部19の後段に備えられる装置としては、例えば、外部記憶装置や通信装置が考えられるが、これに限られるものではない。また、これらの装置は符号化データ読出部19を排他的に使用するように備えても良いし、複数の符号化データ読出部19を備えることにより並列に備えても構わない。   Further, as a device provided in the subsequent stage of the encoded data reading unit 19, for example, an external storage device or a communication device can be considered, but the device is not limited to this. In addition, these devices may be provided so as to use the encoded data reading unit 19 exclusively, or may be provided in parallel by including a plurality of encoded data reading units 19.

なお、上述の実施形態では、符号化方式としてJPEGを用いたが、本発明はJPEG方式に限定されず、他の符号化方式の場合でも同様に適用できる。また、上述の例では、画素数を(2564×1924)画素としているが、本発明は、どのような画素数の場合でも、適用できる。   In the above-described embodiment, JPEG is used as the encoding method. However, the present invention is not limited to the JPEG method, and can be similarly applied to other encoding methods. In the above example, the number of pixels is (2564 × 1924), but the present invention can be applied to any number of pixels.

本発明は、上述した実施形態に限定されるものではなく、この発明の要旨を逸脱しない範囲内で様々な変形や応用が可能である。   The present invention is not limited to the above-described embodiments, and various modifications and applications can be made without departing from the gist of the present invention.

例えば、上述の実施の形態では、図6に示したように、符号量記憶部17に1フレームの処理ライン毎の符号量を記憶させるようにしているが、図18に示すように、ドメイン毎の符号量を記憶させるようにしても良い。すなわち、符号量記憶部17において、1フレーム分の符号量をドメイン毎に記憶する符号量メモリを備え、各ドメインの符号量を符号量メモリの対応する領域に格納するように構成する。この場合、大容量メモリ11、符号化データ書込部18及び符号化データ読出部19を、以下のように変形する。   For example, in the above-described embodiment, as shown in FIG. 6, the code amount storage unit 17 stores the code amount for each processing line of one frame. However, as shown in FIG. May be stored. That is, the code amount storage unit 17 includes a code amount memory that stores the code amount of one frame for each domain, and is configured to store the code amount of each domain in a corresponding area of the code amount memory. In this case, the large-capacity memory 11, the encoded data writing unit 18, and the encoded data reading unit 19 are modified as follows.

大容量メモリ11では、少なくとも1フレーム分の符号化データ格納領域を、1フレームを構成するドメイン数に分割する。   In the large-capacity memory 11, the encoded data storage area for at least one frame is divided into the number of domains constituting one frame.

符号化データ書込部18では、各ドメインの符号化データを、大容量メモリ11における対応するメモリ領域毎に格納する。このとき、符号化データ書込部18が大容量メモリ11に対して発行するアドレスは、アドレス記憶部12に記憶された各ドメインのメモリ領域の先頭アドレスと、符号量記憶部17に記憶された各ブロックの符号量とから算出する。   The encoded data writing unit 18 stores the encoded data of each domain for each corresponding memory area in the large capacity memory 11. At this time, the address that the encoded data writing unit 18 issues to the large-capacity memory 11 is stored in the start address of the memory area of each domain stored in the address storage unit 12 and the code amount storage unit 17. It is calculated from the code amount of each block.

例えば、前述の実施の形態のように、1フレームを4つの小フレームに分割し、処理ラインの単位を8ラインとした場合、符号量記憶部17においては、図18のように各ドメイン毎に符号量を格納し、また、符号化データ書込部18は、図19に示すように、大容量メモリ11の符号化データ格納領域22に各ドメイン毎に符号化データを格納する。   For example, as in the above-described embodiment, when one frame is divided into four small frames and the unit of the processing line is 8 lines, the code amount storage unit 17 performs each domain as shown in FIG. The encoded data is stored, and the encoded data writing unit 18 stores the encoded data for each domain in the encoded data storage area 22 of the large capacity memory 11 as shown in FIG.

符号化データ読出部19では、大容量メモリ11に格納された符号化データをドメイン毎に連続的に読み出し、各ドメインの有効な符号化データのみを後段に出力する。このとき、符号化データ読出部19が大容量メモリ11に対して発行するアドレスは、アドレス記憶部12に記憶された各ドメインのメモリ領域の先頭アドレスと、符号量記憶部17に記憶された各ドメインの符号量とから算出する。なお、符号化データの転送方法は変形前の転送方法と同様である。   The encoded data reading unit 19 continuously reads the encoded data stored in the large capacity memory 11 for each domain, and outputs only the effective encoded data of each domain to the subsequent stage. At this time, the address that the encoded data reading unit 19 issues to the large-capacity memory 11 is the start address of the memory area of each domain stored in the address storage unit 12 and each address stored in the code amount storage unit 17. Calculated from the code amount of the domain. Note that the encoded data transfer method is the same as the transfer method before the transformation.

このような変形例では、例えば、画像1フレーム分の符号化データを復号せずに、画像の一部分を抽出して符号化データを保存することと、画像の一部分をのみを高速に表示することが可能になる。   In such a modification, for example, a part of the image is extracted and stored without decoding the encoded data for one frame of the image, and only a part of the image is displayed at high speed. Is possible.

以上に説明したように、本発明の実施の形態によれば、1フレームの画像データを水平方向にM個の小フレームが並んだ画像データとみなし、小フレーム毎に画像処理を実行するようにしている。これにより、画像処理装置のLSI内のメモリの使用量を抑えることでき、画像処理装置のハードウェア規模や開発コストを削減することができる。このことについて詳述する。   As described above, according to the embodiment of the present invention, one frame of image data is regarded as image data in which M small frames are arranged in the horizontal direction, and image processing is executed for each small frame. ing. As a result, the amount of memory used in the LSI of the image processing apparatus can be suppressed, and the hardware scale and development cost of the image processing apparatus can be reduced. This will be described in detail.

前述したように、図1における前処理部14では、補間フィルタを用いて、着目画素に存在しない色を、着目画素近傍の画素により補間している。補間には、例えば(5×5)の補間フィルタが用いられるが、ここでは、説明を簡単にするために、(3×3)の補間フィルタを用いて説明する。   As described above, the preprocessing unit 14 in FIG. 1 uses an interpolation filter to interpolate colors that do not exist in the pixel of interest with pixels near the pixel of interest. For example, an interpolation filter of (5 × 5) is used for the interpolation. Here, in order to simplify the explanation, the interpolation filter of (3 × 3) will be used.

例えば、図20において、画素P5が着目画素であるとすると、着目画素P5の画像データは、Bの色情報のみを持っており、Rの色情報やGの色情報は持っていない。このため、着目画素P5の周辺の画素を用いて、Rの色情報とGの色情報を補間により形成する。   For example, in FIG. 20, if the pixel P5 is the target pixel, the image data of the target pixel P5 has only the B color information, and does not have the R color information or the G color information. For this reason, R color information and G color information are formed by interpolation using pixels around the pixel of interest P5.

すなわち、着目画素P5のRの色情報は、着目画素P5の周辺の画素Rの画素P1、P3、P7、P9により、
H1×P1+H2×P3+H3×P7+H4×P9
なるフィルタ演算で求められる。また、着目画素P5のGの色情報は、着目画素P5の周辺の画素Gの画素P2、P4、P6、P8により、
H1×P2+H2×P4+H3×P6+H4×P8
なるフィルタ演算で求められる。但しH1〜H4はフィルタ係数である。
That is, the R color information of the target pixel P5 is obtained by the pixels P1, P3, P7, and P9 of the pixel R around the target pixel P5.
H1 × P1 + H2 × P3 + H3 × P7 + H4 × P9
It is calculated | required by the filter calculation. The G color information of the target pixel P5 is obtained by the pixels P2, P4, P6, and P8 of the pixels G around the target pixel P5.
H1 × P2 + H2 × P4 + H3 × P6 + H4 × P8
It is calculated | required by the filter calculation. However, H1-H4 are filter coefficients.

上述のフィルタ演算を行う補間フィルタは、一般的には、図21に示すように、各タップの出力を得るための1サンプル遅延回路51a〜51f及び1ライン遅延回路52a及び52bと、フィルタ係数を乗じるための乗算器53a〜53iと、加算器54とから構成できる。なお、図21において、不要なタップの出力は、乗算器53a〜53iに係数「0」を与えれば良い。   As shown in FIG. 21, the interpolation filter that performs the above-described filter calculation generally has 1-sample delay circuits 51a to 51f and 1-line delay circuits 52a and 52b for obtaining the output of each tap, and filter coefficients. Multipliers 53a to 53i for multiplication and an adder 54 can be used. In FIG. 21, an unnecessary tap output may be obtained by giving a coefficient “0” to the multipliers 53a to 53i.

ここで、1ライン遅延回路52a及び52bは、ラインメモリから構成される。従来では、ラスタ走査に従って画像データを処理していたため、画素数が(2564×1924)の場合、1ライン遅延回路52a及び52bを構成するラインメモリとして、図22(A)に示すように、2564画素分の容量が必要になる。これに対して、本発明の実施形態では、1フレームの画像データを水平方向に例えば4個の小フレームが並んだ画像データとみなし、小フレーム毎に画像データを処理している。このため、1ライン遅延回路52a及び52bを構成するラインメモリとして、図22(B)に示すように、640画素分の容量があれば良い。したがって、前処理部14の色補間処理におけるメモリの容量は、従来に比べて、約1/4に削減することが可能になる。   Here, the one-line delay circuits 52a and 52b are composed of line memories. Conventionally, since image data is processed according to raster scanning, when the number of pixels is (2564 × 1924), as a line memory constituting the one-line delay circuits 52a and 52b, as shown in FIG. A capacity for pixels is required. On the other hand, in the embodiment of the present invention, one frame of image data is regarded as image data in which, for example, four small frames are arranged in the horizontal direction, and the image data is processed for each small frame. For this reason, as the line memory that constitutes the one-line delay circuits 52a and 52b, a capacity of 640 pixels is sufficient as shown in FIG. Therefore, the memory capacity in the color interpolation processing of the preprocessing unit 14 can be reduced to about ¼ compared with the conventional case.

また、図1におけるブロック変換部15では、ラスタ−ブロック変換により、(8×8)画素のブロックデータを形成しているが、ここでは、説明を簡単とするために、(4×4)のブロックを形成する場合について説明する。   Further, in the block conversion unit 15 in FIG. 1, the block data of (8 × 8) pixels is formed by raster-block conversion, but here, for the sake of simplicity of description, (4 × 4) A case where a block is formed will be described.

ラスタ走査の順の画像データから、(4×4)のブロックデータへの変換は、図23に示すように、4個のラインメモリ61a〜61dにより構成できる。   The conversion from image data in the order of raster scanning into (4 × 4) block data can be configured by four line memories 61a to 61d as shown in FIG.

ここで、従来では、ラスタ走査に従って画像データを処理していたため、画素数が(2564×1924)の場合、ラインメモリ61a〜61dとして、図22(A)に示すように、2564画素分の容量が必要になる。これに対して、本発明の実施形態では、1フレームの画像データを水平方向に例えば4個の小フレームが並んだ画像データとみなし、小フレーム毎に画像データを処理している。このため、ラインメモリ61a〜61dとして、図22(B)に示すように、640画素分の容量があれば良い。したがって、ブロック変換部15におけるメモリの容量は、従来に比べて、約1/4に削減することが可能になる。   Here, conventionally, since image data is processed according to raster scanning, when the number of pixels is (2564 × 1924), the line memories 61a to 61d have capacity of 2564 pixels as shown in FIG. Is required. On the other hand, in the embodiment of the present invention, one frame of image data is regarded as image data in which, for example, four small frames are arranged in the horizontal direction, and the image data is processed for each small frame. Therefore, the line memories 61a to 61d only need to have a capacity of 640 pixels as shown in FIG. Therefore, the memory capacity in the block converter 15 can be reduced to about ¼ compared to the conventional case.

また、本発明の実施形態では、画像の画素数が増大しても、小フレームの数を調整することにより、画像処理装置内部のメモリ構成に大きな影響を与えることなく対応することができる。したがって、画像の画素数の増大に対して柔軟に対応可能な画像処理装置を提供することができる。   Further, in the embodiment of the present invention, even if the number of pixels of an image increases, it is possible to cope with the problem by adjusting the number of small frames without greatly affecting the memory configuration inside the image processing apparatus. Therefore, it is possible to provide an image processing apparatus that can flexibly cope with an increase in the number of pixels of an image.

さらに、本実施の形態を変形させ、1フレーム分の符号量を小フレーム内の処理ライン毎に記憶する符号量メモリを備えることにより、画像1フレーム分の符号化データを復号せずに、画像の一部分を抽出して符号化データを保存することと、画像の一部分をのみを高速に表示することが可能になる。   Further, the present embodiment is modified to include a code amount memory for storing the code amount for one frame for each processing line in the small frame, so that the encoded data for one frame of the image is not decoded. It is possible to extract a part of the image and save the encoded data, and to display only a part of the image at high speed.

本発明は、ディジタルスチルカメラ等、ラスタ単位の画像データをブロック単位の画像データに変換して処理する、又は、ブロック単位の画像データをラスタ単位の画像データに変換して処理する画像処理装置に用いることができる。   The present invention relates to an image processing apparatus such as a digital still camera that converts raster unit image data to block unit image data or processes block unit image data to raster unit image data. Can be used.

本発明が適用された画像処理装置の一例の主要部を示したブロック図である。1 is a block diagram illustrating a main part of an example of an image processing apparatus to which the present invention is applied. ベイヤー配列の画像データの説明図である。It is explanatory drawing of the image data of a Bayer arrangement. 本発明が適用された画像処理装置における画像データの転送の説明図である。It is explanatory drawing of transfer of the image data in the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置における画像データの転送の説明図である。It is explanatory drawing of transfer of the image data in the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置におけるフィルタ処理の説明図である。It is explanatory drawing of the filter process in the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置における符号量記憶部の説明図である。It is explanatory drawing of the code amount memory | storage part in the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置における大容量メモリの符号化データ格納領域の説明図である。It is explanatory drawing of the encoding data storage area | region of the large capacity memory in the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置における小フレーム、処理ライン及びドメインの説明図である。It is explanatory drawing of the small frame in the image processing apparatus to which this invention was applied, a processing line, and a domain. 本発明が適用された画像処理装置の動作説明図である。It is operation | movement explanatory drawing of the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置の動作説明図である。It is operation | movement explanatory drawing of the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置の動作説明図である。It is operation | movement explanatory drawing of the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置の動作説明図である。It is operation | movement explanatory drawing of the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置の動作説明図である。It is operation | movement explanatory drawing of the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置の動作説明図である。It is operation | movement explanatory drawing of the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置の動作説明図である。It is operation | movement explanatory drawing of the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置の動作説明図である。It is operation | movement explanatory drawing of the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置におけるデータ転送の説明図である。It is explanatory drawing of the data transfer in the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置の変形例の説明図である。It is explanatory drawing of the modification of the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置の変形例の説明図である。It is explanatory drawing of the modification of the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置における前処理部の補間処理の説明図である。It is explanatory drawing of the interpolation process of the pre-processing part in the image processing apparatus to which this invention was applied. 本発明が適用された画像処理装置におけるメモリの削減の説明に用いるブロック図である。It is a block diagram used for description of memory reduction in the image processing apparatus to which the present invention is applied. 本発明が適用された画像処理装置におけるメモリの削減の説明に用いるブロック図である。It is a block diagram used for description of memory reduction in the image processing apparatus to which the present invention is applied. 本発明が適用された画像処理装置におけるブロック変換部の説明図である。It is explanatory drawing of the block conversion part in the image processing apparatus to which this invention was applied. 従来の画像処理装置の一例のブロック図である。It is a block diagram of an example of the conventional image processing apparatus.

符号の説明Explanation of symbols

1 画像処理装置
10 バス
11 大容量メモリ
12 アドレス記憶部
13 データ読出部
14 前処理部
15 ブロック変換部
16 符号化部
17 符号量記憶部
18 符号化データ書込部
19 符号化データ読出部

DESCRIPTION OF SYMBOLS 1 Image processing apparatus 10 Bus 11 Large capacity memory 12 Address storage part 13 Data reading part 14 Preprocessing part 15 Block conversion part 16 Encoding part 17 Code amount storage part 18 Encoded data writing part 19 Encoded data reading part

Claims (3)

画像データを格納するメモリと、
前記メモリに格納された1フレーム分の画像データを水平方向にM個(Mは正の整数)の小フレームが並んだ画像データとみなし、前記小フレームをそれぞれラスタ走査順に読み出すデータ読出部と、
前記データ読出部により読み出された画像データを、所定のライン数を処理ラインとして符号化する符号化部と、
前記符号化部から出力される符号化データの符号量を順次格納する符号量記憶部と、
前記符号量記憶部に記憶された各小フレームの対応する処理ラインに係る符号量に基づき、前記メモリに前記符号化データを格納するためのアドレスを算定し、前記メモリのその算定されたアドレスに前記符号化データを格納する符号化データ書込部と、
前記符号量記憶部に記憶された各小フレームの対応する処理ラインに係る符号量に基づき、前記メモリに格納された符号化データを読み出すためのアドレスを算定し、前記メモリのその算定されたアドレスから符号化データを読み出す符号化データ読出部と
を備えることを特徴とする画像処理装置。
A memory for storing image data;
A data reading unit that regards image data for one frame stored in the memory as image data in which M small frames (M is a positive integer) are arranged in a horizontal direction, and reads the small frames in raster scanning order;
An encoding unit that encodes the image data read by the data reading unit using a predetermined number of lines as processing lines;
A code amount storage unit for sequentially storing code amounts of encoded data output from the encoding unit;
Based on the code amount relating to the processing line corresponding to each small frame stored in the code amount storage unit, the address for storing the encoded data in the memory is calculated, and the calculated address in the memory is calculated. An encoded data writing unit for storing the encoded data;
Based on the code amount related to the processing line corresponding to each small frame stored in the code amount storage unit, the address for reading the encoded data stored in the memory is calculated, and the calculated address of the memory An image processing apparatus comprising: an encoded data reading unit that reads encoded data from the image data.
前記符号量記憶部は、各小フレームの対応する前記処理ラインに係る符号量を加算した符号量を、前記処理ライン毎に格納することを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the code amount storage unit stores, for each processing line, a code amount obtained by adding a code amount related to the processing line corresponding to each small frame. 前記符号量記憶部は、各小フレームの前記処理ライン毎に前記符号量を格納することを特徴とする請求項1に記載の画像処理装置。

The image processing apparatus according to claim 1, wherein the code amount storage unit stores the code amount for each processing line of each small frame.

JP2005021104A 2005-01-28 2005-01-28 Image processor Withdrawn JP2006211323A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005021104A JP2006211323A (en) 2005-01-28 2005-01-28 Image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005021104A JP2006211323A (en) 2005-01-28 2005-01-28 Image processor

Publications (1)

Publication Number Publication Date
JP2006211323A true JP2006211323A (en) 2006-08-10

Family

ID=36967683

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005021104A Withdrawn JP2006211323A (en) 2005-01-28 2005-01-28 Image processor

Country Status (1)

Country Link
JP (1) JP2006211323A (en)

Similar Documents

Publication Publication Date Title
JP4151684B2 (en) Encoding apparatus, encoding method, encoding program, and imaging apparatus
WO2009087783A1 (en) Data generator for coding, method of generating data for coding, decoder and decoding method
US6563946B2 (en) Image processing apparatus and method
JP2010098352A (en) Image information encoder
CN113068026B (en) Coding prediction method, device and computer storage medium
US10798419B2 (en) Embedded codec circuitry for sub-block based encoding of quantized prediction residual levels
JP2007258882A (en) Image decoder
JPH1175183A (en) Image signal processing method and device and storage medium
US7787700B2 (en) Signal processing method, signal processing apparatus, computer-readable medium and a data recording medium
JP4092830B2 (en) Image data compression method
WO2010021153A1 (en) Motion detection device
JP2006211323A (en) Image processor
JP2776284B2 (en) Image coding device
US6681051B1 (en) Arrangement for transforming picture data
JP4988623B2 (en) Image encoding apparatus and image decoding apparatus
JP3709106B2 (en) Image compression and decompression device
JP2004165733A (en) Image converter, image conversion method, and recording medium
JP4720494B2 (en) Imaging apparatus, imaging method and program, and recording medium
JP5175796B2 (en) Encoding / preprocessing device, decoding / postprocessing device, encoding device, decoding device, and program
JP3193285B2 (en) Coding noise reduction filter circuit
JP2005348176A (en) Image processor
JP3781012B2 (en) Image data compression method, image data expansion method, and image data expansion circuit
JP2006211197A (en) Image processing method
JPH1117955A (en) Image processing unit
JP2000175061A (en) Color transformation processing method and device

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20080401