JP2010141771A - Image processing apparatus and method - Google Patents
Image processing apparatus and method Download PDFInfo
- Publication number
- JP2010141771A JP2010141771A JP2008318037A JP2008318037A JP2010141771A JP 2010141771 A JP2010141771 A JP 2010141771A JP 2008318037 A JP2008318037 A JP 2008318037A JP 2008318037 A JP2008318037 A JP 2008318037A JP 2010141771 A JP2010141771 A JP 2010141771A
- Authority
- JP
- Japan
- Prior art keywords
- data
- image
- line
- read
- difference 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.)
- Granted
Links
Landscapes
- Image Processing (AREA)
- Storing Facsimile Image Data (AREA)
- Editing Of Facsimile Originals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Abstract
【課題】画面内の任意の位置へのアクセスが発生する画像処理装置において、メモリバス帯域を削減することのできる画像処理装置を提供する。
【解決手段】画像のライトリクエストが発行されると、画像を間引き等により縮小し、縮小画像をメモリに格納する。また、縮小画像を線形補完等により拡大して、元画像との差分データを得る。この差分データをライン単位と矩形単位で、圧縮し、メモリに格納する。画像のリードリクエストは、ライン単位あるいは矩形単位で行われ、リードリクエストのあるラインあるいは矩形を含むライン単位あるいは矩形単位の差分データと、リクエストのあるラインあるいは矩形を含む圧縮が画像を読出し、拡大、展開して、加算し、要求された画像データを得る。
【選択図】図4An image processing apparatus capable of reducing a memory bus band in an image processing apparatus in which access to an arbitrary position in a screen occurs.
When an image write request is issued, the image is reduced by thinning or the like, and the reduced image is stored in a memory. Further, the reduced image is enlarged by linear interpolation or the like to obtain difference data from the original image. The difference data is compressed in units of lines and rectangles and stored in the memory. An image read request is performed in units of lines or rectangles. The difference data in units of lines or rectangles including the lines or rectangles with read requests and the compression including lines or rectangles in requests are read out and enlarged. Expand and add to obtain the requested image data.
[Selection] Figure 4
Description
本発明は、画像処理装置及びその方法に関する。 The present invention relates to an image processing apparatus and method.
ハイビジョン放送、大容量光ディスクなどの普及により、画像処理LSI の扱う画像は大画面化が進み、機能も益々高度になってきている。大画面化、高機能化が進むにつれて、画像処理LSI が使用するメモリ容量およびメモリバス帯域は増加の一途を辿っている。 With the widespread use of high-definition broadcasting and large-capacity optical discs, the images handled by image processing LSIs are becoming larger and their functions are becoming increasingly sophisticated. As screens and functions increase, the memory capacity and memory bus bandwidth used by image processing LSIs continue to increase.
小容量のメモリで大画面の画像データを処理するための従来技術として、縮小画像と圧縮差分データでメモリへの格納を行う手法(特許文献1)がある。縮小画像は、元画像を間引いて作成し、差分データは、縮小画像を再び拡大した画像と元画像の差分をとったものとする。元画像から縮小画像を生成し、これを再び拡大すると、元画像に比べ情報量が落ちるので、画質が落ちてしまう。そこで、縮小画像で落ちた情報を差分データとしてとっておき、画像を復元する場合に、縮小画像を拡大したものと、差分データとを合成するようにすることにより、画像の情報量が落ちるのを防ぐようにしている。なお、差分データは、格納する場合には、圧縮して圧縮差分データとしておくことにより、格納領域の節約を行う。本従来技術は、プリンタ等の用途のため、1 画面分の画像データを決まった順序で処理することを想定しており、画面内の任意の位置に対してアクセスするような用途には向いていない。 As a conventional technique for processing large-screen image data with a small-capacity memory, there is a technique (Patent Document 1) that stores a reduced image and compressed difference data in a memory. The reduced image is created by thinning out the original image, and the difference data is obtained by taking the difference between the image obtained by enlarging the reduced image again and the original image. If a reduced image is generated from the original image and enlarged again, the amount of information is lower than that of the original image, resulting in a reduction in image quality. Therefore, information that has dropped in the reduced image is stored as difference data, and when the image is restored, the reduced data is combined with the difference data to prevent the information amount of the image from dropping. I am doing so. When storing the difference data, the storage area is saved by compressing the difference data into compressed difference data. This conventional technology assumes that image data for one screen is processed in a fixed order for use in printers, etc., and is suitable for applications that access any position in the screen. Absent.
例えば、MPEG デコーダにおいては、参照画アクセスのために、画面内の任意の位置の矩形領域を読み出す可能性があるが、本従来技術においてはこのようなアクセスは想定しておらず、効率的なアクセスはできない。特に圧縮差分データについては、画面分のデータをまとめて可変長符号化してしまうと、画面内の指定位置のデータを特定することは困難なため、圧縮差分データの最初から順に展開処理を行っていく必要がある。よって、参照画アクセスのような任意位置の読み出しの場合では、実際には使用しない不要な圧縮差分データを読み出すことになり、かえってメモリアクセス量が増える結果となる。以上のような理由から、メモリバス帯域の観点では、従来技術はMPEG デコータのような画面内の任意位置のアクセスを行うような装置には適用できなかった。
本発明の課題は、画面内の任意の位置へのアクセスが発生する画像処理装置において、メモリバス帯域を削減することのできる画像処理装置を提供することである。 An object of the present invention is to provide an image processing apparatus capable of reducing a memory bus band in an image processing apparatus in which access to an arbitrary position in a screen occurs.
本発明の画像処理装置は、メモリと、画像データを縮小して縮小画像データを生成し、前記メモリに格納するともに、前記縮小画像データを拡大して拡大画像データを生成し、前記画像データと前記拡大画像データとの差分データを異なる複数の単位で圧縮し、複数の圧縮差分データを生成して前記メモリに格納する画像データ圧縮部と、リクエスト要求が指示する単位で前記圧縮差分データを読み出すとともに、前記縮小画像データを読み出し、前記圧縮差分データと前記縮小画像データとに基づいて伸長された画像データを生成する画像データ伸長部とを備える。 The image processing apparatus of the present invention generates a reduced image data by reducing the image data by reducing the image data, stores the reduced image data in the memory, generates an enlarged image data by expanding the reduced image data, and the image data The difference data from the enlarged image data is compressed in a plurality of different units, an image data compression unit that generates a plurality of compressed difference data and stores it in the memory, and reads out the compressed difference data in a unit indicated by the request request And an image data decompression unit that reads the reduced image data and generates decompressed image data based on the compressed difference data and the reduced image data.
本発明によれば、画面内の任意の位置へのアクセスが発生する画像処理装置において、
メモリバス帯域を削減することのできる画像処理装置を提供することができる。
According to the present invention, in an image processing apparatus in which access to an arbitrary position in a screen occurs,
An image processing apparatus that can reduce the memory bus bandwidth can be provided.
本発明の実施形態では、MPEG やH.264 などのデコーダおよびエンコーダ装置など、高いメモリバス帯域を要求する装置において、メモリバスの使用帯域を削減する手法及び構成を提供する。 The embodiment of the present invention provides a technique and configuration for reducing the use bandwidth of a memory bus in a device that requires a high memory bus bandwidth, such as a decoder and an encoder device such as MPEG and H.264.
特に、本実施形態では、画像処理装置において、メモリへの書き込み時には、画像データを一旦縮小して、縮小した画像データを再度拡大し、元画像との差分データを作成する。その後、作成された差分データを複数の異なる画面内領域単位で圧縮して、縮小画像と複数の圧縮差分データをメモリに格納する。読み出し時には、縮小画像といずれかの圧縮差分データを読み出し、それぞれ拡大、展開したのち、加算して元画像を復元する。 In particular, in the present embodiment, when writing to the memory, the image processing apparatus temporarily reduces the image data, enlarges the reduced image data again, and creates difference data from the original image. Thereafter, the created difference data is compressed in units of a plurality of different in-screen areas, and the reduced image and the plurality of compressed difference data are stored in the memory. At the time of reading, the reduced image and one of the compressed difference data are read out, enlarged and developed, and then added to restore the original image.
また、画像処理装置において、メモリへの書き込み時には、画像データを一旦縮小して、縮小した画像データを再度拡大し、元画像との差分データを作成する。その後、作成された差分データを複数の異なる画面内領域単位で圧縮して、縮小画像と複数の圧縮差分データをメモリに格納する。読み出し時には、縮小画像のみを読み出して拡大画像を作成する方法と、縮小画像といずれかの圧縮差分データを読み出し、それぞれ拡大、展開したのち、加算して元画像を復元する。 In the image processing apparatus, when writing to the memory, the image data is temporarily reduced, the reduced image data is enlarged again, and difference data from the original image is created. Thereafter, the created difference data is compressed in units of a plurality of different in-screen areas, and the reduced image and the plurality of compressed difference data are stored in the memory. At the time of reading, a method for reading only a reduced image to create an enlarged image and a reduced image and any one of the compressed difference data are read out, enlarged and developed, and added to restore the original image.
差分データを圧縮する画面内領域単位は、一つは、ライン単位であり、一つは画面を指定の矩形サイズで分割した矩形の単位である。その単位ごとに指定のメモリ領域に圧縮差分データを格納する。 One of the in-screen area units for compressing the difference data is a line unit, and one is a rectangular unit obtained by dividing the screen by a specified rectangular size. The compressed difference data is stored in a designated memory area for each unit.
図1に縮小画像と圧縮差分データのメモリ格納イメージを示す。
図1は、縦1/2、横1/2 の間引きで縮小画生成した場合の例であり、差分データは、ラインの単位での圧縮と、16x16 矩形の単位で圧縮した形式である。
FIG. 1 shows an image stored in a memory of reduced images and compressed differential data.
FIG. 1 shows an example in which a reduced image is generated by thinning out the length 1/2 and width 1/2, and the difference data has a format compressed in units of lines and compressed in units of 16 × 16 rectangles.
図1(a)は、元画像を示しており、丸は画素を示している。図1(a)の元画像から縦横方向に2行に1行を間引くことにより、縦横1/2圧縮された縮小画像が得られる。その縮小画像が図1(b)である。縮小画像においては、図1(a)の太い丸で表された画素のみが残ることになる。縮小画像は、全体の画像が、図1(c)の左に示されるように、縮小画像として格納領域に格納される。一方圧縮差分データは、図1(c)の真ん中あるいは右に示されているように、差分データをライン単位、あるいは、所定サイズの矩形単位に分割し、ラインごと、あるいは、矩形ごとに圧縮する。圧縮されたラインデータ、あるいは、圧縮された矩形データは、それぞれ、格納領域内における先頭位置のアドレスが与えられ、ライン単位、あるいは、矩形単位で格納される。したがって、特定のラインデータ、あるいは、特定の矩形データを読み出したいときには、その先頭位置のアドレスを指定することにより、容易に読み出すことが出来るように、格納領域に格納される。 FIG. 1A shows an original image, and circles indicate pixels. By thinning one line out of the original image in FIG. 1A in two lines in the vertical and horizontal directions, a reduced image compressed in half in the vertical and horizontal directions is obtained. The reduced image is shown in FIG. In the reduced image, only the pixels represented by the thick circles in FIG. 1A remain. The reduced image is stored in the storage area as a reduced image as shown in the left part of FIG. On the other hand, as shown in the middle or right of FIG. 1C, the compressed difference data is divided into line units or rectangular units of a predetermined size and compressed for each line or each rectangle. . The compressed line data or the compressed rectangular data is given the address of the head position in the storage area, and stored in line units or rectangular units. Therefore, when it is desired to read specific line data or specific rectangular data, it is stored in the storage area so that it can be easily read by designating the address of the head position.
図2は、差分データ圧縮処理順の例を示す。
図2(a)は、ライン単位で圧縮差分データを生成する場合の処理順序であり、差分データの行0から横方向に1920画素分のデータを読み込み圧縮する。行0が終わったら、行1というように、順次行0から縦方向に向かって処理を行っていく。ライン単位の圧縮では、ライン番号を識別子とする。識別子と格納領域の先頭アドレスとを対応付けておくことにより、読み出したいラインを先頭アドレスを指定することで読み出せるようになる。なお、必ずしも1ライン全てのデータを1単位とする必要はなく、1ラインを複数の領域に分割したライン領域を1単位としても良い。図2(b)は、矩形単位で圧縮差分データを生成する場合の処理順序である。図2(b)に示されるように、横1920画素、縦1088画素からなる差分データを16画素×16画素の矩形に分割し、それぞれの矩形に識別子を付けておく。左上端の矩形ならば、(0,0)を識別子とし、行方向に行くに従い、(1,0)、・・・(119,0)と、行方向の座標値を大きくし、列方向に行くに従い、(0,1)、・・・(0,67)と、列方向の座標値を大きくする。そして、16画素×16画素のブロック単位で、圧縮を行い、格納領域に格納する。識別子と格納領域の先頭アドレスとを対応付けておくことにより、読み出したい矩形領域を先頭アドレスを指定することで読み出せるようになる。なお、矩形の大きさは、必ずしも16画素×16画素である必要は無い。
FIG. 2 shows an example of the order of differential data compression processing.
FIG. 2A shows a processing order in the case where compressed differential data is generated in units of lines. Data for 1920 pixels is read and compressed from the row 0 of the differential data in the horizontal direction. When line 0 ends, processing is sequentially performed from line 0 in the vertical direction, such as line 1. In line-by-line compression, the line number is used as an identifier. By associating the identifier with the head address of the storage area, the line to be read can be read by specifying the head address. Note that it is not always necessary to set all the data of one line as one unit, and a line area obtained by dividing one line into a plurality of areas may be set as one unit. FIG. 2B shows the processing order when generating compressed differential data in units of rectangles. As shown in FIG. 2B, the difference data composed of 1920 pixels in the horizontal direction and 1088 pixels in the vertical direction is divided into rectangles of 16 pixels × 16 pixels, and an identifier is attached to each rectangle. If it is a rectangle at the upper left corner, (0, 0) is used as an identifier, and as it goes in the row direction, the coordinate value in the row direction is increased to (1, 0),. As it goes, the coordinate value in the column direction is increased to (0, 1),... (0, 67). Then, compression is performed in units of blocks of 16 pixels × 16 pixels and stored in the storage area. By associating the identifier with the head address of the storage area, the rectangular area to be read can be read by designating the head address. Note that the size of the rectangle is not necessarily 16 pixels × 16 pixels.
また、差分データを圧縮する画面内領域単位毎(ライン毎、矩形毎)の圧縮差分データサイズを算出および記録するようにする。記録手段としては、圧縮差分データの先頭に圧縮差分データのサイズを書き込んでおいても良いし、別途テーブルとして記録しておいても良い。サイズは必ずしも厳密な値である必要はなく、リード時のメモリアクセスサイズの単位で記録されていれば良い。 In addition, the compression difference data size is calculated and recorded for each in-screen area unit (for each line, for each rectangle) in which the difference data is compressed. As a recording means, the size of the compressed differential data may be written at the head of the compressed differential data, or may be recorded as a separate table. The size does not necessarily have to be a strict value, and may be recorded in units of the memory access size at the time of reading.
読出し要求が矩形読み出しの場合は、元画像の矩形領域に対応する縮小画像内の矩形領域と、元画像の矩形領域に対応する領域を含む矩形単位で圧縮された差分データを読み出す。そして、それぞれ拡大、展開した後、要求の矩形領域以外のデータは破棄し、要求の矩形領域内の縮小画像からの拡大画像データと圧縮差分データからの展開データを加算して元画像を復元する。 When the reading request is rectangular reading, the difference data compressed in units of rectangles including the rectangular area in the reduced image corresponding to the rectangular area of the original image and the area corresponding to the rectangular area of the original image is read. Then, after each expansion and expansion, the data other than the requested rectangular area is discarded, and the original image is restored by adding the expanded image data from the reduced image in the requested rectangular area and the expanded data from the compressed difference data. .
読出し要求がライン読み出しの場合は、元画像のラインに対応する縮小画像内のラインと、元画像のラインに対応するライン単位で圧縮された差分データを読み出す。そして、それぞれ拡大、展開した後、要求の領域以外のデータは破棄し、要求の縮小画像からの拡大画像データと圧縮差分データからの展開データを加算して元画像を復元する。 When the read request is line read, the line in the reduced image corresponding to the line of the original image and the difference data compressed in line units corresponding to the line of the original image are read. After each enlargement and expansion, the data other than the requested area is discarded, and the original image is restored by adding the enlarged image data from the requested reduced image and the expanded data from the compressed difference data.
また、本実施形態では、画像処理装置おいて、過去に読み出した差分データを格納する内蔵メモリを設ける。2回目以降の読み出し要求で指示された領域に、内蔵メモリに格納されている差分データの領域が含まれている場合には、該当する圧縮差分データは読み出さずに、内蔵メモリの差分データを使用して元画像を復元する。内蔵メモリは、矩形単位の差分データを格納する内蔵メモリと、ライン単位での差分データを格納する内蔵メモリを個別に設ける。矩形読み出しに対しては、矩形用の内蔵メモリを使用し、ライン読み出しに対しては、ライン用の内蔵メモリを使用する。 In this embodiment, the image processing apparatus is provided with a built-in memory for storing differential data read in the past. If the area indicated by the second and subsequent read requests includes the area of differential data stored in the internal memory, the corresponding compressed differential data is not read and the internal memory differential data is used. To restore the original image. The built-in memory is provided with a built-in memory for storing difference data in units of rectangles and a built-in memory for storing difference data in units of lines. A rectangular built-in memory is used for rectangular reading, and a line built-in memory is used for line reading.
画像データを矩形アクセスするモジュールとラインアクセスするモジュールが接続されたメモリコントローラを考える。矩形アクセスするモジュールからのリクエストに対しては、縮小画像と矩形アクセス用の圧縮差分データを読み出し、ラインアクセスするモジュールからのリクエストに関しては、縮小画像とラインアクセス用の圧縮差分データを読み出す。これにより、メモリへの1回のアクセスあたりのデータアクセス量を削減することが可能である。 Consider a memory controller in which a module for rectangular access to image data and a module for line access are connected. In response to a request from the module accessing the rectangle, the reduced image and the compressed difference data for rectangular access are read out, and in response to a request from the module accessing the line, the reduced image and the compressed difference data for line access are read out. As a result, it is possible to reduce the data access amount per access to the memory.
図3は、メモリへのデータアクセス量の削減の様子を説明する図である。
例えば、元画像サイズで画面内の256 画素(ライン読み出し時256x1、矩形読み出し時16x16)を読み出す場合を考える。図3(a)、(b)に示すように、縮小画像の作成方法は縦1/1(間引きなし)、横1/4 間引き、縮小画像から拡大画像の作成方法は、線形補間とする。また、差分データは、元画像サイズの画面領域の256 画素単位(ライン用256x1 領域、矩形用16x16 領域)で圧縮するものとし、差分データの圧縮率は元画像の1/8 とする。なお、ここでは縮小方式が間引きであるため、縮小画像に書き込まれた画素の値と元画像の対応する画素の値間の差分値は常にゼロとなるため、該当画素に関しては差分データとしては書き込まない。したがって、差分データは、元画像の3/4の画素を保持することになる。以下の3つの方式でメモリへのデータアクセス量を比較する。以下の表および計算では、一回のアクセスで必要となるデータアクセス量を画素数で示している。
方式1:元画像をそのままメモリに格納
方式2:縮小画像とライン用の圧縮差分データのみをメモリに格納
方式3:縮小画像とライン用/矩形用両方の圧縮差分データをメモリに格納
For example, consider the case of reading 256 pixels (256x1 when reading a line, 16x16 when reading a rectangle) in the screen with the original image size. As shown in FIGS. 3 (a) and 3 (b), the reduced image creation method is vertical 1/1 (no thinning), horizontal 1/4 thinning, and the creation method of the enlarged image from the reduced image is linear interpolation. The difference data is compressed in 256 pixel units (256x1 area for lines, 16x16 area for rectangles) of the screen area of the original image size, and the compression rate of the difference data is 1/8 of the original image. Here, since the reduction method is thinning, the difference value between the value of the pixel written in the reduced image and the value of the corresponding pixel in the original image is always zero, so that the corresponding pixel is written as difference data. Absent. Therefore, the difference data holds 3/4 pixels of the original image. The data access amount to the memory is compared by the following three methods. In the following table and calculation, the data access amount required for one access is shown by the number of pixels.
Method 1: Store original image directly in memory Method 2: Store only reduced differential data and compressed differential data for lines in memory Method 3: Store compressed differential data for both reduced images and lines / rectangular in memory
アクセス量計算
Write
方式1 16x16(元画像)=256
方式2 4x16(縮小画像) + 256x3/4x1/8(圧縮差分データ) = 88
方式3 4x16(縮小画像) + 256x3/4x1/8x2(圧縮差分データ2種) = 112
Access volume calculation
Write
Method 1 16x16 (original image) = 256
Method 2 4x16 (reduced image) + 256x3 / 4x1 / 8 (compressed difference data) = 88
Method 3 4x16 (reduced image) + 256x3 / 4x1 / 8x2 (2 types of compressed differential data) = 112
方式1では、元画像をそのままメモリに格納するので、1回のアクセスで256画素の容量を必要とする。一方、方式2では、縮小画像は、横方向に1/4間引きされた縮小画像と圧縮差分データを書き込むことになる。圧縮差分データは、256画素×1ライン画素ずつのアクセスとなる。圧縮差分データは、元画像の3/4の画素を持っており、圧縮率が1/8であるので、上記のようになる。方式3は、縮小画像については、方式2と同じである。圧縮差分データは、16画素×16画素ブロック単位と、256画素×1ライン単位で書き込むことになる。このとき、圧縮差分データは、元画像の3/4画素を有しており、1/8の圧縮率である。そして、方式3では、ライン単位の圧縮と矩形単位の圧縮を行うので、2が掛かっている。 In method 1, since the original image is stored in the memory as it is, a capacity of 256 pixels is required for one access. On the other hand, in the method 2, the reduced image is written with the reduced image thinned by 1/4 in the horizontal direction and the compressed difference data. The compressed difference data is accessed every 256 pixels × 1 line pixel. The compressed difference data has 3/4 pixels of the original image, and the compression rate is 1/8, so that it is as described above. Method 3 is the same as Method 2 for reduced images. The compressed difference data is written in units of 16 pixels × 16 pixels and in units of 256 pixels × 1 line. At this time, the compression difference data has 3/4 pixels of the original image and has a compression rate of 1/8. In the method 3, since compression is performed in units of lines and in units of rectangles, 2 is applied.
ラインRead
方式1 256x1(元画像)=256
方式2 65x1(縮小画像) + 256x3/4x1/8x1(圧縮差分データ1領域) = 89(Min)
66x1(縮小画像) + 256x3/4x1/8x2(圧縮差分データ2領域) = 114(Max)
方式3 65x1(縮小画像) + 256x3/4x1/8 (圧縮差分データ1領域) = 89(Min)
66x1(縮小画像) + 256x3/4x1/8x2(圧縮差分データ2領域) = 114(Max)
Line Read
Method 1 256x1 (original image) = 256
Method 2 65x1 (reduced image) + 256x3 / 4x1 / 8x1 (compressed differential data 1 area) = 89 (Min)
66x1 (reduced image) + 256x3 / 4x1 / 8x2 (compressed differential data 2 area) = 114 (Max)
Method 3 65x1 (reduced image) + 256x3 / 4x1 / 8 (compressed differential data 1 area) = 89 (Min)
66x1 (reduced image) + 256x3 / 4x1 / 8x2 (compressed differential data 2 area) = 114 (Max)
方式1では、256画素の1ラインをそのまま読む。方式2では、行方向に256画素分読むので、縮小画像は、横に1/4になった縮小画像中の対応するラインを、4個横方向に読む必要がある。このとき、縮小画像の画素を●とし、線形補完された画素を○と表すと、●○○○●○○○となる場合がある。この場合には、左のほうの○を線形補完によって求めるためには、右端にもう一つ縮小画像の画素●が必要となる。また、○○○●○○○●○○○となる場合もあり、この場合には、両端に縮小画像の画素●が必要となる。したがって、どの部分のラインを読み出すかによって、16画素×4+1(または、+2)=65(または、66)の縮小画像の画素を読み込む必要が生じる。圧縮差分データについては、読出しラインが1つのアクセス単位だけが必要な場合と、2つのアクセス単位のラインをまたいでいる場合がある。そのため、最大では2つのアクセス単位のラインを読み込む必要がある。方式3は、矩形単位で圧縮差分データを保持しているが、ライン単位でも保持しているので、ライン単位での読出しのときは、ライン単位で保持しているデータを読み込むようにする。したがって、方式2の場合と同様となる。 In method 1, one line of 256 pixels is read as it is. In method 2, since 256 pixels are read in the row direction, it is necessary for the reduced image to read four corresponding lines in the reduced image that has become 1/4 in the horizontal direction. At this time, if the pixel of the reduced image is represented by ● and the pixel that has been linearly complemented is represented by ○, there is a case where ● ○○○ ● ○○○. In this case, in order to obtain the left circle by linear interpolation, another pixel ● of the reduced image is required at the right end. Further, there is a case where it becomes XXXXXXXX. In this case, pixels ● of the reduced image are required at both ends. Therefore, it is necessary to read pixels of the reduced image of 16 pixels × 4 + 1 (or +2) = 65 (or 66) depending on which part of the line is read. For compressed differential data, there are cases where the read line requires only one access unit, and may straddle two access unit lines. For this reason, it is necessary to read a line of two access units at the maximum. In method 3, compression difference data is held in units of rectangles, but is also held in units of lines. Therefore, when reading is performed in units of lines, data held in units of lines is read. Therefore, it is the same as in the case of method 2.
矩形Read
方式1 16x16(元画像)=256
方式2 5x16(縮小画像) + 256x3/4x1/8x16(圧縮差分データ16領域) = 464(Min)
6x16(縮小画像) + 256x3/4x1/8x32(圧縮差分データ32領域) = 864(Max)
Rectangle Read
Method 1 16x16 (original image) = 256
Method 2 5x16 (reduced image) + 256x3 / 4x1 / 8x16 (compressed differential data 16 areas) = 464 (Min)
6x16 (reduced image) + 256x3 / 4x1 / 8x32 (compressed differential data 32 areas) = 864 (Max)
方式2において、16×16ブロックを読み出す場合、縮小画像は、ライン読み込みの場合の方式2の場合と同じように、線形補完の関係で、読出しブロックの位置により、(4+1)×16行だけ読み出すか、(4+2)×16行だけ読み出すかが変わる。また、圧縮差分データの読み出しラインが水平方向に1つのアクセス単位だけが必要な場合と、2つのアクセス単位のラインをまたいでいる場合がある。16行読み出す場合、矩形が2つのアクセス単位をまたぐ場合には、2単位×16行、すなわち32アクセス単位を読み込むことが必要となってくる。すなわち、圧縮単位はライン単位であるが、処理単位はマクロブロックの16画素×16画素なので、16行ずつのアクセスになっているとしている。 In method 2, when reading 16 × 16 blocks, the reduced image is read out only (4 + 1) × 16 rows depending on the position of the read block due to the linear interpolation as in the case of method 2 in the case of line reading. Or (4 + 2) × 16 rows are read out. Further, there are cases where the compressed differential data read line requires only one access unit in the horizontal direction and may cross over two access unit lines. In the case of reading 16 rows, if the rectangle crosses two access units, it is necessary to read 2 units × 16 rows, that is, 32 access units. In other words, although the compression unit is a line unit, the processing unit is 16 pixels × 16 pixels of a macroblock, and therefore, it is assumed that access is performed by 16 rows.
方式3 5x16(縮小画像) + 256x3/4x1/8(圧縮差分データ1領域) = 104(Min)
6x16(縮小画像) + 256x3/4x1/8x4(圧縮差分データ4領域) = 192(Max)
Method 3 5x16 (reduced image) + 256x3 / 4x1 / 8 (compressed differential data 1 area) = 104 (Min)
6x16 (reduced image) + 256x3 / 4x1 / 8x4 (compressed difference data 4 areas) = 192 (Max)
方式3においては、縮小画像については、方式2と同じであるが、矩形単位でも圧縮差分データを保持しているので、矩形Readの場合は矩形単位の圧縮差分データを読み出すようにする。圧縮差分データについては、読出し矩形領域が、1つの保持単位ブロックに含まれるか、2つの単位ブロックにまたがるか、4つの単位ブロックにまたがるかによって、読出しデータ量が異なってくる。 In the method 3, the reduced image is the same as the method 2, but since the compressed differential data is held in the rectangular unit, the compressed differential data in the rectangular unit is read in the case of the rectangular read. For compressed differential data, the amount of read data differs depending on whether the read rectangular area is included in one holding unit block, spans two unit blocks, or spans four unit blocks.
上記アクセス量の比較結果から、本実施形態の方式3を用いることにより、矩形アクセス、ラインアクセスの両方においてメモリアクセス量を削減することが可能である。 From the comparison result of the access amount, it is possible to reduce the memory access amount in both rectangular access and line access by using the method 3 of the present embodiment.
表示サイズが元画サイズよりも十分小さい場合など、画像データの用途によっては、元画像を完全に復元しなくても、画質的に問題がないケースもある。このような用途の場合は、縮小画像のみを読み出すことにより、圧縮差分データのアクセスを省略して更にメモリアクセス量を削減することが可能である。リクエスト発行元の要求に応じて、縮小画像データは、拡大してから送出する方法もあるし、縮小画像のまま送出する方法もある。 Depending on the application of the image data, such as when the display size is sufficiently smaller than the original image size, there may be no problem in image quality even if the original image is not completely restored. In such an application, it is possible to further reduce the memory access amount by reading out only the reduced image and omitting the access to the compressed differential data. Depending on the request from the request issuer, there is a method of transmitting the reduced image data after enlarging it, or a method of transmitting the reduced image as it is.
圧縮差分データは、圧縮単位で圧縮後のサイズが可変となるため、サイズが分からないと無駄なメモリアクセスをしなければならない可能性がある。そこで、圧縮処理後、格納前にサイズを計算し記憶しておくと、必要なサイズが分かるようになり、無駄なメモリアクセスを避けることができる。 Since the compressed differential data has a variable size after compression in units of compression, there is a possibility that useless memory access may be required if the size is unknown. Therefore, if the size is calculated and stored after the compression processing and before storage, the necessary size can be known and unnecessary memory access can be avoided.
差分データを可変長符号で圧縮してメモリに格納した場合、リクエスト発行元が要求する画面内の指定領域に対応する差分データの格納位置を完全に特定することはできない。また、通常の可変長符号の場合、符号化単位の最初から展開処理を行う必要があるため、実際には使用しない領域のデータも読み出して、展開処理を行う必要がある。リクエスト発行元の読み出し方式に応じて、必要な領域を含む圧縮差分データの読み出しを行い、展開後、不要な部分を廃棄することにより、必要な領域のみの元画像を復元することができる。 When the difference data is compressed with a variable length code and stored in the memory, the storage position of the difference data corresponding to the designated area in the screen requested by the request issuer cannot be completely specified. In the case of a normal variable length code, since it is necessary to perform expansion processing from the beginning of the encoding unit, it is necessary to read out data in a region that is not actually used and perform expansion processing. According to the read method of the request issuer, the compressed differential data including the necessary area is read, and after decompression, the unnecessary part is discarded, so that the original image of only the necessary area can be restored.
通常、画像データ処理は画面内で決まった順序で行われることが多く、あるモジュールからの連続する読み出しリクエストにおいては、画面内の近傍の領域をアクセスする場合が多い。一つのリクエストで読み出される圧縮差分データは、圧縮する単位でまとまったデータであり、そのリクエストでは使用しない不要な部分を含む場合があるが、次のリクエストで必要なデータであることも多い。そこで、内蔵メモリにこの差分データを格納しておき、次のリクエストで内蔵メモリ内の差分データの領域への要求があった場合には、外のメモリへのアクセスは行わずに、その分のメモリアクセス量を削減することができる。 In general, image data processing is often performed in a predetermined order within a screen, and a continuous read request from a certain module often accesses a nearby region in the screen. The compressed differential data read in one request is data collected in a unit to be compressed, and may include an unnecessary part that is not used in the request, but is often necessary data in the next request. Therefore, if this difference data is stored in the built-in memory and there is a request for the difference data area in the built-in memory in the next request, access to the outside memory is not performed and the corresponding data is stored. The amount of memory access can be reduced.
差分データを格納する内蔵メモリは、読み出し要求元毎に複数持っても良い。例えば、MPEGデコーダなどでは、参照画読み出し用の差分データ格納用内蔵メモリと、表示読み出し用の差分データ格納用内蔵メモリがあると効率的である。 A plurality of built-in memories for storing the difference data may be provided for each read request source. For example, in an MPEG decoder or the like, it is efficient to have a differential data storage built-in memory for reading a reference image and a differential data storage built-in memory for display reading.
なお、内蔵メモリへの差分データの格納方法としては、展開後の差分データでもよいし、展開前の圧縮差分データでも良い。展開後の差分データ形式で格納していれば、次のアクセスで展開処理を行わずに処理することができるし、展開前の圧縮差分データの形式で格納していれば、その分、内蔵メモリの容量を削減することができる。 As a method for storing the difference data in the built-in memory, the difference data after expansion or the compressed difference data before expansion may be used. If it is stored in the differential data format after decompression, it can be processed without performing the decompression process in the next access, and if it is stored in the format of compressed differential data before decompression, the corresponding amount of internal memory The capacity of can be reduced.
図4は、本発明の第1の実施形態を適用したMPEG デコーダLSI のブロック構成図である。
本LSI9は、MPEG デコーダ部10、表示制御部11、メモリコントローラ部12の3つのブロックで構成され、デコード結果の画像等を格納するための外部メモリ(SDRAM)13が接続される。MPEG デコーダ部10は、入力されたMPEG ストリームの復号処理を行い、デコード画像を生成するブロックである。結果のデコード画像は、メモリコントローラ部12を介してSDRAM13 へ書き込まれる。デコード処理中、必要に応じて、過去のデコード画像を参照画像として読み出して使用する。表示制御部11はMPEG デコーダ部が生成したデコード結果画像をメモリコントローラ部12経由で読み出して表示装置へ出力するブロックである。メモリコントローラ部12は、MPEG デコーダ部10および表示制御部11からの要求に応じて、SDRAM13へのアクセスを管理するブロックである。
FIG. 4 is a block diagram of an MPEG decoder LSI to which the first embodiment of the present invention is applied.
The LSI 9 is composed of three blocks, an MPEG decoder unit 10, a display control unit 11, and a memory controller unit 12, and is connected to an external memory (SDRAM) 13 for storing a decoding result image and the like. The MPEG decoder unit 10 is a block that decodes an input MPEG stream and generates a decoded image. The resulting decoded image is written to the SDRAM 13 via the memory controller unit 12. During the decoding process, a past decoded image is read as a reference image and used as necessary. The display control unit 11 is a block that reads out the decoding result image generated by the MPEG decoder unit via the memory controller unit 12 and outputs it to the display device. The memory controller unit 12 is a block that manages access to the SDRAM 13 in response to requests from the MPEG decoder unit 10 and the display control unit 11.
メモリコントローラ部12には、MPEGデコーダ部10や表示制御部11からのリクエストを受け付けるリクエスト制御部15が設けられている。リクエスト制御部15は、リクエストを受け付けると、リクエスト変換部19にリクエストを送り、画像データ圧縮部16や矩形画像データ展開部17、ライン画像データ展開部18への制御信号を生成させる。 The memory controller unit 12 is provided with a request control unit 15 that receives requests from the MPEG decoder unit 10 and the display control unit 11. When receiving the request, the request control unit 15 sends a request to the request conversion unit 19 to generate control signals to the image data compression unit 16, the rectangular image data expansion unit 17, and the line image data expansion unit 18.
MPEGデコーダ部10からライトリクエストが発行されると、画像データ圧縮部16は、画像格納メモリ20において、ライトデータを受け取り、画像縮小回路21にデータを入力する。画像縮小回路21は、画像を縮小し、SDRAMアクセス制御部37を介して、SDRAM13に縮小画像を書き込む。また、縮小画像は、画像拡大回路22において、拡大され、減算器23において、元画像との差分が取られる。差分データは、差分データ格納メモリ24に格納され、矩形用差分データ圧縮回路25とライン用差分データ圧縮回路26に入力される。矩形用差分データ圧縮回路25とライン用差分データ圧縮回路26では、差分データが、矩形単位の圧縮差分データと、ライン単位の圧縮差分データに変換され、SDRAMアクセス制御部37を介して、SDRAM13に書き込まれる。 When a write request is issued from the MPEG decoder unit 10, the image data compression unit 16 receives the write data in the image storage memory 20 and inputs the data to the image reduction circuit 21. The image reduction circuit 21 reduces the image and writes the reduced image to the SDRAM 13 via the SDRAM access control unit 37. The reduced image is enlarged by the image enlargement circuit 22 and the difference from the original image is taken by the subtractor 23. The difference data is stored in the difference data storage memory 24 and input to the rectangular difference data compression circuit 25 and the line difference data compression circuit 26. In the rectangular difference data compression circuit 25 and the line difference data compression circuit 26, the difference data is converted into compression difference data in units of rectangles and compression difference data in units of lines, and is transferred to the SDRAM 13 via the SDRAM access control unit 37. Written.
MPEGデコーダ部10から、矩形リードリクエストが発行されると、矩形画像データ展開部17は、SDRAMアクセス制御部37を介して、SDRAM13から縮小画像データと矩形用圧縮差分データを読み取る。縮小画像データは、縮小画像格納メモリ27に格納された後、矩形用画像拡大回路29において拡大される。矩形用圧縮差分データは、差分データ格納
メモリ28に格納された後、矩形用差分データ展開回路30において、展開される。拡大された縮小画像と展開された矩形用差分データは、加算器35において、加算され、矩形リードデータとして、MPEGデコーダ部10に送られる。
When a rectangular read request is issued from the MPEG decoder unit 10, the rectangular image data expansion unit 17 reads reduced image data and rectangular compression difference data from the SDRAM 13 via the SDRAM access control unit 37. The reduced image data is stored in the reduced image storage memory 27 and then enlarged in the rectangular image enlargement circuit 29. The rectangular compressed differential data is stored in the differential data storage memory 28 and then expanded in the rectangular differential data expansion circuit 30. The enlarged reduced image and the developed rectangular difference data are added by the adder 35 and sent to the MPEG decoder unit 10 as rectangular read data.
表示制御部11からラインリードリクエストが発行されると、ライン画像データ展開部18は、SDRAMアクセス制御部37を介して、SDRAM13から縮小画像とライン用圧縮差分データを読み込む。縮小画像データは、縮小画像格納メモリ31に格納された後、ライン用画像拡大回路33において拡大される。ライン用圧縮差分データは、差分データ格納メモリ32に格納された後、ライン用差分データ展開回路34によって展開される。拡大された縮小画像と展開されたライン用圧縮差分データは、加算器36において加算され、ラインリードデータとして、表示制御部11に渡される。 When a line read request is issued from the display control unit 11, the line image data expansion unit 18 reads the reduced image and the line compression difference data from the SDRAM 13 via the SDRAM access control unit 37. The reduced image data is stored in the reduced image storage memory 31 and then enlarged in the line image enlargement circuit 33. The line compressed differential data is stored in the differential data storage memory 32 and then expanded by the line differential data expansion circuit 34. The enlarged reduced image and the developed line compression difference data are added by the adder 36 and passed to the display control unit 11 as line read data.
また、矩形リードリクエストは、MPEGデコーダ部10から、ラインリードリクエストは、表示制御部11から発行されているが、これは、MPEGによる処理をする場合は、参照画像を矩形単位で参照し、表示画像を生成する場合には、ライン単位で画像を参照するからである。しかし、一般に、デコーダがラインリードアクセスしても良いし、表示制御部が矩形リードアクセスしても良い。
また、図4は、デコーダの構成であるが、メモリコントローラ部12の構成は、エンコーダでも同様である。
In addition, the rectangular read request is issued from the MPEG decoder unit 10 and the line read request is issued from the display control unit 11. This is done by referring to the reference image in units of rectangles when displaying by the MPEG. This is because when an image is generated, the image is referred to in units of lines. However, in general, the decoder may perform line read access, or the display control unit may perform rectangular read access.
FIG. 4 shows the configuration of the decoder, but the configuration of the memory controller unit 12 is the same in the encoder.
図5に、本発明の第1の実施形態のメモリコントローラの処理フローを示す。
まず、ステップS10において、各ブロックからのリクエストを受信する。ステップS11において、複数のリクエストがあるか否かを判断する。複数のリクエストを受信した場合には、ステップS12において、リクエストの調停を行い、処理を行う一つのリクエストを選択する。ステップS13において、選択したリクエストの内容を解析し、ライトリクエスト、矩形リードリクエスト、ラインリードリクエストのいずれかを判断し、それぞれに対する処理を行う。
FIG. 5 shows a processing flow of the memory controller according to the first embodiment of the present invention.
First, in step S10, a request from each block is received. In step S11, it is determined whether there are a plurality of requests. If a plurality of requests are received, in step S12, the request is arbitrated and one request to be processed is selected. In step S13, the contents of the selected request are analyzed, and any one of a write request, a rectangular read request, and a line read request is determined, and processing for each is performed.
ステップS14において、ライトリクエストか否かを判断し、ライトリクエストでない場合には、ステップS26に進む。ライトリクエストの場合には、ステップS15において、まずリクエスト要求元からライトデータ(元画像データ)を取得する。次に、ステップS16において、元画像の縮小画像を生成し、ステップS17において、その縮小画像の拡大画を生成する。その後、ステップS18において、元画像と生成した縮小後拡大画の間で差分を取り、差分データを作成する。ステップS19とステップS20において、差分データは、矩形用の圧縮とライン用の圧縮の2 種類の圧縮が行われる。ステップS21において、生成された、縮小画、矩形用圧縮差分データ、ライン用圧縮差分データは、それぞれ、SDRAM に書き込まれる。ただし、圧縮差分データに関しては、圧縮する単位によって、一つのライトリクエストのデータだけで圧縮が完結するとは限らないため、圧縮する単位のデータがまとまった時点で書き込みが行われる。すなわち、ステップS22において、矩形用差分データ書込み単位分のデータがたまったか否かを判断し、たまった場合には、ステップS23で矩形用圧縮差分データをSDRAMへ書き込む。また、ステップS24において、ライン用差分データ書込み単位分だけデータがたまったか否かを判断し、たまった場合には、ステップS25において、ライン用圧縮差分データをSDRAMに書込み、処理を終了する。 In step S14, it is determined whether or not the request is a write request. If the request is not a write request, the process proceeds to step S26. In the case of a write request, in step S15, first, write data (original image data) is acquired from the request request source. Next, in step S16, a reduced image of the original image is generated, and in step S17, an enlarged image of the reduced image is generated. Thereafter, in step S18, a difference is taken between the original image and the generated enlarged image after reduction, and difference data is created. In step S19 and step S20, the difference data is subjected to two types of compression: rectangular compression and line compression. In step S21, the generated reduced image, rectangular compression difference data, and line compression difference data are respectively written in the SDRAM. However, since the compression difference data is not necessarily completed with only one write request data depending on the unit to be compressed, writing is performed when the data of the unit to be compressed is collected. That is, in step S22, it is determined whether or not data for the rectangular difference data writing unit has been accumulated. If accumulated, the rectangular compressed difference data is written to the SDRAM in step S23. In step S24, it is determined whether or not data has accumulated for the unit for writing differential data for lines. If so, the compressed differential data for lines is written to SDRAM in step S25, and the process ends.
ステップS26では、矩形リードリクエストか否かを判断する。矩形リードリクエストで無い場合には、ステップS33に進む。矩形リードリクエストの場合には、ステップS27およびステップS28において、リクエスト内容からSDRAM からリードすべき、縮小画領域と矩形用圧縮差分データ領域を判断して、SDRAM から必要データをリードする。縮
小画像は1 矩形領域となるが、矩形用圧縮差分データは複数領域にまたがる可能性があるために、複数のリクエストに分かれる場合がある。次に、ステップS29、S30において、リードした縮小画像を拡大、矩形用圧縮差分データは展開し、ステップS31において、両者を加算して元画像を復元する。このとき、リードした矩形用圧縮差分データには、リクエスト元からの要求の矩形領域外のデータが含まれている場合があるので、展開後、必要領域のみ切り出して使用する必要がある。ステップS32最後に復元された元画像をリクエスト要求元に送信する。
In step S26, it is determined whether the request is a rectangular read request. If it is not a rectangular read request, the process proceeds to step S33. In the case of the rectangular read request, in step S27 and step S28, the reduced image area and the rectangular compressed difference data area to be read from the SDRAM are determined from the request contents, and necessary data is read from the SDRAM. The reduced image is one rectangular area, but the compression difference data for the rectangle may be spread over a plurality of areas, and may be divided into a plurality of requests. Next, in steps S29 and S30, the read reduced image is enlarged, and the rectangular compression difference data is expanded, and in step S31, both are added to restore the original image. At this time, since the read rectangular compression difference data may include data outside the requested rectangular area from the request source, it is necessary to cut out and use only the necessary area after expansion. Step S32: The original image restored last is transmitted to the request request source.
ラインリードリクエストの場合には、ステップS33で、縮小画像をSDRAMから読み、ステップS34において、ライン用圧縮差分データをSDRAMから読む。ステップS35において、縮小画像を拡大し、ステップS36において、ライン用圧縮差分データを展開する。ステップS37において、拡大画像と展開された差分データとを加算し、元画像を復元する。復元された元画像は、リクエスト元へ送信される。 In the case of a line read request, the reduced image is read from the SDRAM in step S33, and the line compression difference data is read from the SDRAM in step S34. In step S35, the reduced image is enlarged, and in step S36, the line compression difference data is expanded. In step S37, the enlarged image and the developed difference data are added to restore the original image. The restored original image is transmitted to the request source.
なお、圧縮差分データのリードに関しては、圧縮後のデータサイズが分からないと読み出しサイズを確定できないが、無駄なメモリアクセスを避ける方法としては、ライト時にデータサイズ計算し、読み出したデータの先頭にサイズを書き込んでおく方法や、別途、圧縮後のデータサイズを記したテーブルを持っておく方法などがある。 Regarding the read of compressed difference data, the read size cannot be determined unless the data size after compression is known. However, as a method of avoiding unnecessary memory access, the data size is calculated at the time of writing, and the size at the beginning of the read data is set. There are a method of writing the data, and a method of separately holding a table in which the data size after compression is written.
ラインリードリクエストの場合にも、リクエスト内容からSDRAM からリードすべき、縮小画領域とライン用圧縮差分データ領域を判断して、SDRAM から必要データをリードする。縮小画像は1 ライン領域となるが、ライン用圧縮差分データは複数領域にまたがる可能性があるために、複数のリクエストに分かれる場合がある。次に、リードした縮小画像を拡大、ライン用圧縮差分データは展開し、両者を加算して元画像を復元する。このとき、リードしたライン用圧縮差分データには、リクエスト元からの要求のライン領域外のデータが含まれている場合があるので、展開後、必要領域のみ切り出して使用する必要がある。最後に復元された元画像をリクエスト要求元に送信する。 Also in the case of a line read request, the reduced data area and the compressed data area for lines to be read from the SDRAM are determined from the request contents, and the necessary data is read from the SDRAM. A reduced image is a one-line area, but the line compression difference data may be spread over a plurality of areas, and may be divided into a plurality of requests. Next, the read reduced image is enlarged, the line compression difference data is expanded, and both are added to restore the original image. At this time, since the read line compression difference data may include data outside the requested line area from the request source, it is necessary to cut out and use only the necessary area after expansion. The last restored original image is transmitted to the request request source.
縮小画の生成方法としては、サブサンプリング、平均処理、縮小フィルタ処理などが考えられる。また、拡大画の生成方法としては、画素コピー、平均処理、拡大フィルタ処理などが考えられるがいずれを使用してよい。また、矩形境界の処理方法についても、ライト時の1 リクエストの矩形サイズ内のデータで拡大処理を行う方法と、矩形サイズ外の周辺画素を使用する方法が考えられる。MPEG デコーダでは通常、マクロブロック(16 画素x16 画素)の単位でライト処理が行われるので、その矩形内のデータだけで縮小画生成処理と拡大画生成処理を行う方法が一つである。 As a reduced image generation method, subsampling, averaging processing, reduction filter processing, and the like are conceivable. In addition, as a method for generating an enlarged image, pixel copy, averaging processing, enlargement filter processing, and the like can be considered, and any of them may be used. In addition, as for the processing method of the rectangular boundary, there are a method of performing enlargement processing with data within the rectangular size of one request at the time of writing and a method of using peripheral pixels outside the rectangular size. Since an MPEG decoder normally performs write processing in units of macroblocks (16 pixels × 16 pixels), there is one method for performing reduced image generation processing and enlarged image generation processing using only data within the rectangle.
図6に、拡大画生成時の矩形境界領域の取り扱い方法の一例を示す。
縮小画像生成方法は、水平1/4 のサブサンプリング(垂直方向の縮小なし)、拡大画像生成方法は線形補間とする。線形補間で拡大画像を生成する際、水平位置13,14,15 の画素を生成するためには、水平位置16 の画素が必要であるが、これは、該当マクロブロックに含まれない画素であるために、ここでは水平位置12 のコピーとして扱う。すなわち、線形補間では、水平位置13,14,15 の画素値は、水平位置12 の画素値と等しくなる。別の方法は、次マクロブロックの画素値を使用する方法である。
FIG. 6 shows an example of a method of handling a rectangular boundary area when generating an enlarged image.
The reduced image generation method is horizontal subsampling (no vertical reduction), and the enlarged image generation method is linear interpolation. When generating an enlarged image by linear interpolation, a pixel at horizontal position 16 is required to generate pixels at horizontal positions 13, 14, and 15. This is a pixel that is not included in the corresponding macroblock. For this reason, it is treated as a copy of horizontal position 12 here. That is, in linear interpolation, the pixel values at the horizontal positions 13, 14, and 15 are equal to the pixel value at the horizontal position 12. Another method is to use the pixel value of the next macroblock.
この手法では、拡大画を作成する際に、次のマクロブロックのデータ入力を待つ必要があるために、該当マクロブロックの処理では、水平位置13,14,15 の差分データが生成できないことに注意が必要である。 In this method, when creating an enlarged image, it is necessary to wait for the data input of the next macroblock, so it is not possible to generate difference data at horizontal positions 13, 14, and 15 by processing the corresponding macroblock. is required.
図7は、矩形リードアクセス時の画像復元イメージを示す図である。
図7(a)に示されるように、矩形リードのリクエスト領域が、マクロブロック(0,
0)と(1,0)にまたがっていたとする。まず、リクエスト領域を含む縮小画像と差分圧縮データを読み込み、それぞれ拡大化及び展開を行う。そして、リクエスト領域の部分のみを切り出して加算し、復元画像を得る。ここで、リクエスト領域部分を切り出すのは、復元画像を得てからか、その前か両方あるが、いずれでもよい。ただし、切り出すのは、加算処理によって復元画像を得る前のほうが、加算処理の処理量が減って好ましい。
FIG. 7 is a diagram showing an image restoration image at the time of rectangular read access.
As shown in FIG. 7A, a rectangular read request area is a macroblock (0, 0,
0) and (1, 0). First, a reduced image including a request area and differentially compressed data are read, and enlarged and expanded, respectively. Then, only the part of the request area is cut out and added to obtain a restored image. Here, the request area part is cut out after obtaining the restored image or before or after the restoration image, but either may be used. However, it is preferable to cut out before the restoration image is obtained by the addition processing because the processing amount of the addition processing is reduced.
図8に、アクセス要求元からの一つのリクエストに対して、メモリコントローラが生成するリクエストの処理フローを示す。
なお、本フローでは、縮小画生成方法は、縦1/1(縮小なし)、横1/4 の間引き処理、拡大画生成方法は線形補間、矩形用圧縮差分データ領域単位は16 画素x16 画素領域、ライン用圧縮差分データ領域単位は、ライン方向256 画素単位とする。なお、本フローの処理は、図4のブロック図中のリクエスト変換部19で実行されるが、画像の縮小/拡大処理および差分データの圧縮処理等のデータ処理は、それぞれ、画像データ圧縮部16、矩形画像データ展開部17、ライン画像データ展開部18にて処理される。
FIG. 8 shows a processing flow of a request generated by the memory controller for one request from the access request source.
In this flow, the reduced image generation method is vertical 1/1 (no reduction), horizontal 1/4 thinning, the enlarged image generation method is linear interpolation, and the rectangular compression difference data area unit is 16 pixels x 16 pixel area The unit of the line compression difference data area is a unit of 256 pixels in the line direction. The processing of this flow is executed by the request conversion unit 19 in the block diagram of FIG. 4, but data processing such as image reduction / enlargement processing and differential data compression processing is performed by the image data compression unit 16, respectively. The rectangular image data developing unit 17 and the line image data developing unit 18 perform processing.
ステップS40において、ライトリクエストか否かが判断される。MPEG デコーダのライト処理を想定し、ライトリクエストは常にマクロブロック(16x16 画素)単位で行われ、リクエスト発行順序もマクロブロック処理順になっているものとする。ステップS41において、ライトリクエストのパラメータとして、左上座標(16n,16m)、矩形サイズ(16,16)を受け取った場合、縮小画空間での座標、サイズは、水平方向に1/4 としたものとなるので、ステップS42において、左上座標(4n,16m)、矩形サイズ(4,16)を取得する。メモリコントローラは、縮小画像空間の座標、サイズを新たなパラメータとして縮小画のライト処理を行う。次に、矩形用圧縮差分データの書き込みに関しては、16x16 画素単位なので、基本的に1 マクロブロックに1領域分書き込みが行われるが、差分データ作成時に、拡大画像生成のために右隣接マクロブロックの画素値が必要となるため、画面左端マクロブロックではライト処理は行われず、1 マクロブロックずれた形でライト処理が行われる。したがって、ステップS43において、現マクロブロックが、画面左端マクロブロックであるか否かが判断される。そして、左端マクロブロックで無い場合には、ステップS44において、矩形用圧縮差分データ(n-1,m)がSDRAMに書き込まれる。なお、画面右端のマクロブロックでは、2 領域分のライト処理が行われる。したがって、ステップS45においては、現マクロブロックが画面右端のマクロブロックか否かが判断される。右端マクロブロックの場合には、ステップS46において、矩形用圧縮差分データ(n,m)をSDRAMに書き込む。 In step S40, it is determined whether or not the request is a write request. Assuming MPEG decoder write processing, it is assumed that a write request is always made in units of macroblocks (16 × 16 pixels), and the request issuance order is also in macroblock processing order. When the upper left coordinates (16n, 16m) and the rectangular size (16, 16) are received as the write request parameters in step S41, the coordinates and size in the reduced image space are set to 1/4 in the horizontal direction. Therefore, in step S42, the upper left coordinates (4n, 16m) and the rectangular size (4, 16) are acquired. The memory controller performs a reduced image write process using the coordinates and size of the reduced image space as new parameters. Next, since the rectangular compressed difference data is written in units of 16x16 pixels, basically one area is written in one macroblock, but when creating difference data, the right adjacent macroblock Since the pixel value is required, the write processing is not performed on the leftmost macroblock on the screen, but is performed with a shift of 1 macroblock. Therefore, in step S43, it is determined whether or not the current macroblock is the leftmost macroblock on the screen. If it is not the leftmost macroblock, the rectangular compression difference data (n−1, m) is written to the SDRAM in step S44. In the macro block at the right end of the screen, write processing for two areas is performed. Therefore, in step S45, it is determined whether or not the current macroblock is the rightmost macroblock on the screen. In the case of the rightmost macroblock, rectangular compression difference data (n, m) is written to the SDRAM in step S46.
次に、ライン用圧縮差分データについては、ライン方向の256 画素単位で圧縮する形なので、16 マクロブロック毎に16ライン分の圧縮差分データがライトされる。ここでは、差分データ作成時に拡大画生成で右隣接マクロブロックの画素が必要なので、1 マクロブロックずれた形で書き込み処理が行われる(例えば、0〜15 マクロブロックの差分データのライト処理は、マクロブロック16 の処理時に行われる)。したがって、ステップS47において、現在のマクロブロックが、右端のマクロブロックあるいは、nが16の倍数か否かが判断される。ステップS47の判断がYesの場合には、ステップS48のループに入り、iが0から15まで1刻みで変わる間に、ステップS49で、ライン用圧縮差分データ(n/16、16m+i)をSDRAMに書き込む。 Next, since the compressed differential data for lines is compressed in units of 256 pixels in the line direction, the compressed differential data for 16 lines is written for every 16 macroblocks. Here, since the pixel of the right adjacent macroblock is required for enlarged image generation when creating the differential data, the writing process is performed with a shift of 1 macroblock (for example, the writing process of the differential data of 0 to 15 macroblocks (Done during block 16 processing). Therefore, in step S47, it is determined whether the current macroblock is the rightmost macroblock or n is a multiple of 16. If the determination in step S47 is Yes, the process enters the loop of step S48, and the line compression difference data (n / 16, 16m + i) is obtained in step S49 while i changes from 0 to 15 in increments of 1. Write to SDRAM.
ステップS50において、リクエストが矩形リードリクエストか否かが判断される。矩形リードリクエストの場合は、任意の座標、サイズのリクエストがあると仮定する。ステップS51において、矩形リードリクエストのパラメータとして、左上座標(X0,Y0)、矩形サイズ(SX,SY)を受け取った場合、縮小画像空間での座標、サイズを計算する。矩形領域の左上座標と右下座標から、縮小画空間での必要画像領域を計算する。ステップS52において、右下座標(X1,Y1)を、X1=X0+SX-1、Y1=Y0+SY-1として計算する。ステップS
53において、縮小画像における矩形の左上座標(X0',Y0')と、右下座標(X1',Y1')を計算する。計算式は以下の通りである。
X0'=X0/4
Y0'=Y0
X1'=(X1+3)/4
Y1'=Y1
In step S50, it is determined whether or not the request is a rectangular read request. In the case of a rectangular read request, it is assumed that there is a request with an arbitrary coordinate and size. In step S51, when the upper left coordinates (X0, Y0) and the rectangular size (SX, SY) are received as the parameters of the rectangular read request, the coordinates and size in the reduced image space are calculated. The necessary image area in the reduced image space is calculated from the upper left coordinates and lower right coordinates of the rectangular area. In step S52, the lower right coordinates (X1, Y1) are calculated as X1 = X0 + SX-1 and Y1 = Y0 + SY-1. Step S
In 53, the upper left coordinates (X0 ′, Y0 ′) and lower right coordinates (X1 ′, Y1 ′) of the rectangle in the reduced image are calculated. The calculation formula is as follows.
X0 '= X0 / 4
Y0 '= Y0
X1 '= (X1 + 3) / 4
Y1 '= Y1
次に、ステップS54において、左上画素を含む圧縮単位の差分データの矩形領域座標(RX0,RY0)を計算する。計算式は、以下の通りである。
RX0=X0/16
RY0=Y0/16
Next, in step S54, the rectangular area coordinates (RX0, RY0) of the difference data of the compression unit including the upper left pixel are calculated. The calculation formula is as follows.
RX0 = X0 / 16
RY0 = Y0 / 16
次に、ステップS55において、右下画素を含む圧縮単位の差分データの矩形領域座標(RX1,RY1)を計算する。計算式は、以下の通りである。
RX1=X1/16
RY1=Y1/16
Next, in step S55, the rectangular area coordinates (RX1, RY1) of the difference data in the compression unit including the lower right pixel are calculated. The calculation formula is as follows.
RX1 = X1 / 16
RY1 = Y1 / 16
ステップS56において、左上座標(X0',Y0')、サイズ(X1'-X0'+1,Y1'-Y0'+1)の縮小画像を読み込む。ステップS57は、iをRX0からRX1まで1刻みで変化させるループである。ステップS58は、jをRY0からRY1まで1刻みで変化させるループである。ステップS57とS58のループの中で、ステップS59において、矩形用圧縮差分データ(i,j)を読み込む。 In step S56, a reduced image having upper left coordinates (X0 ', Y0') and size (X1'-X0 '+ 1, Y1'-Y0' + 1) is read. Step S57 is a loop for changing i from RX0 to RX1 in increments of 1. Step S58 is a loop that changes j from RY0 to RY1 in increments of 1. In the loop of steps S57 and S58, the rectangular compression difference data (i, j) is read in step S59.
元画像において、矩形の左端座標が4の倍数でなかった場合、線形補間のために縮小画像における左端座標の左側の画素から必要であり、同様に右端座標が4 の倍数でなかった場合、縮小画像で、右端座標の右側の画素から必要になる。よって、縮小画空間でのリクエストパラメータは、左上座標(X0/4,Y0)、サイズ( (X0+SX+2)/4 - X0/4 + 1,SY)となる。矩形用圧縮差分データについてどの矩形領域のデータをリードするかについては、左上画素が含まれる矩形領域と右下画素が含まれる矩形領域から算出され、必要な数の矩形用圧縮差分データのリード処理を行う。 In the original image, if the left end coordinate of the rectangle is not a multiple of 4, it is necessary from the pixel on the left side of the left end coordinate in the reduced image for linear interpolation. Similarly, if the right end coordinate is not a multiple of 4, it is reduced. In the image, it is necessary from the pixel on the right side of the right end coordinate. Therefore, the request parameters in the reduced image space are the upper left coordinates (X0 / 4, Y0) and the size ((X0 + SX + 2) / 4−X0 / 4 + 1, SY). Which rectangular area data is read from the rectangular compression difference data is calculated from the rectangular area including the upper left pixel and the rectangular area including the lower right pixel, and the read processing of the necessary number of rectangular compression difference data is performed. I do.
ラインリードリクエストの場合も、任意の座標、サイズのリクエストがあると仮定する。ステップS60において、ラインリードリクエストのパラメータとして、左端座標(X0,Y0)、サイズSXを受け取った場合の縮小画像空間での座標、サイズを計算する。矩形リードと同じ考え方で、左端座標と右端座標から、縮小画空間での必要画像領域を計算すると、縮小画像上でのリクエストパラメータは、左端座標(X0/4,Y0)、サイズ (X0+SX+2)/4 - X0/4+ 1 となる。ライン用圧縮差分データについてどのライン領域のデータをリードするかについては、左端画素が含まれるライン領域と右端画素が含まれるライン領域から算出され、必要な数のライン用圧縮差分データのリード処理を行う。 In the case of a line read request, it is assumed that there is a request with an arbitrary coordinate and size. In step S60, the coordinates and size in the reduced image space when the left end coordinates (X0, Y0) and size SX are received as parameters of the line read request are calculated. If the required image area in the reduced image space is calculated from the left and right end coordinates in the same way as the rectangular lead, the request parameters on the reduced image are the left end coordinates (X0 / 4, Y0), size (X0 + SX +2) / 4-X0 / 4 + 1. The line area data to be read with respect to the line compression difference data is calculated from the line area including the left end pixel and the line area including the right end pixel, and the read processing of the required number of line compression difference data is performed. Do.
ステップS61において、元画像上での右端座標(X1,Y1)を以下の式に基づいて算出する。
X1=X0+SX-1
Y1=Y0
In step S61, the right end coordinate (X1, Y1) on the original image is calculated based on the following equation.
X1 = X0 + SX-1
Y1 = Y0
ステップS62において、縮小画像上でのライン左端座標(X0',Y0')とライン右端座標(X1',Y1')を以下の式にしたがって計算する。
X0'=X0/4
Y0'=Y0
X1'=(X1+3)/4
Y1'=Y1
In step S62, the line left end coordinates (X0 ′, Y0 ′) and the line right end coordinates (X1 ′, Y1 ′) on the reduced image are calculated according to the following equations.
X0 '= X0 / 4
Y0 '= Y0
X1 '= (X1 + 3) / 4
Y1 '= Y1
ステップS63において、左端画素を含む圧縮単位のライン領域の座標(LX0,LY0)を以下の式に基づいて算出する。
LX0=X0/256
LY0=Y0
In step S63, the coordinates (LX0, LY0) of the line area of the compression unit including the leftmost pixel are calculated based on the following formula.
LX0 = X0 / 256
LY0 = Y0
ステップS64において、右端画素を含む圧縮単位のライン領域の座標(LX1,LY1)を以下の式にしたがって算出する。
LX1=X1/256
LY1=Y1
In step S64, the coordinates (LX1, LY1) of the line area of the compression unit including the right end pixel are calculated according to the following formula.
LX1 = X1 / 256
LY1 = Y1
ステップS65において、左端座標(X0',Y0')、サイズX1'-X0'+1の縮小画像を読み込む。ステップS66は、kをLX0からLX1まで、1刻みで変化させるループである。ステップS66のループの中で、ステップS67において、ライン用圧縮差分データ(k,LY0)を読み込む。 In step S65, a reduced image having the left end coordinates (X0 ′, Y0 ′) and size X1′−X0 ′ + 1 is read. Step S66 is a loop that changes k from LX0 to LX1 in increments of 1. In the loop of step S66, line compression difference data (k, LY0) is read in step S67.
以上のような機能を搭載したメモリコントローラを適用することにより、SDRAM へのメモリアクセス量を削減することが可能である。 By applying a memory controller with the above functions, it is possible to reduce the amount of memory access to SDRAM.
以下に、リードアクセス時に、縮小画像のみを用いて拡大画を作成するモードを追加した第2の実施形態を示す。ブロック構成は基本的に上述の実施形態と同様であるが、第2の実施形態では、矩形リードリクエストとラインリードリクエストの際に、リクエスト発行元が、リクエスト発行時に縮小画像と差分データ両方を使用するか、縮小画像のみを使用するかをパラメータとして渡す方式とする。例えば、表示制御部は表示画像が大きい場合には、縮小画像と差分データ両方を使用するモードのリクエストを発行するが、表示画像が小さい場合には、縮小画像のみのモードのリクエストを発行する。MPEG デコーダ部は、将来参照画として使用されるP ピクチャ処理時には、縮小画像と差分データ両方を使用するモードのリクエストを発行するが、将来参照画として使用されないB ピクチャ処理時には、誤差の累積が起こらないので、縮小画像のみのモードのリクエストを発行する。 A second embodiment in which a mode for creating an enlarged image using only a reduced image at the time of read access will be described below. The block configuration is basically the same as in the above embodiment, but in the second embodiment, the request issuer uses both the reduced image and the difference data when issuing the request in the rectangular read request and the line read request. Or a method for passing as a parameter whether to use only a reduced image. For example, if the display image is large, the display control unit issues a request for a mode that uses both the reduced image and the difference data. If the display image is small, the display control unit issues a request for a mode for only the reduced image. The MPEG decoder unit issues a request for a mode that uses both reduced image and difference data when processing a P picture that will be used as a reference picture in the future, but error accumulation may occur when processing a B picture that is not used as a reference picture in the future. Since there is no request, a request for a reduced image only mode is issued.
図9に、第2の実施形態のメモリコントローラの処理フローを示す。
図9において、図5と同じステップには、同じ参照符号を付して、説明を省略する。
矩形ライトリクエスト、差分データありの矩形リードリクエストとラインリードリクエストは、第1の実施形態と同様のフローである。差分データなし(縮小画のみ)の矩形リードリクエストとラインリードリクエストに関しては、差分データをSDRAM から読み出す必要がないため、縮小画をSDRAM からリードした後、拡大画像を生成し、リクエスト発行元にデータを送信する。
FIG. 9 shows a processing flow of the memory controller of the second embodiment.
In FIG. 9, the same steps as those in FIG.
The rectangular write request, the rectangular read request with difference data, and the line read request are the same flow as in the first embodiment. For rectangular read requests and line read requests without differential data (only reduced images), it is not necessary to read the differential data from SDRAM, so after reading the reduced images from SDRAM, an enlarged image is generated and data is sent to the request issuer. Send.
図9においては、ステップS26で、リクエストが矩形リードリクエストであると判断された場合には、ステップS70において、差分データを含めて読み込むか否かを判断が行われる。ステップS70において、差分データを含めるとなった場合には、ステップS27以降、図5と同じ処理となる。差分データを含めないとなった場合には、ステップS71において、縮小画像をSDRAMから読み込み、ステップS72において、縮小画像を拡大し、ステップS73において、リクエスト元にリードデータを送信する。 In FIG. 9, if it is determined in step S26 that the request is a rectangular read request, it is determined in step S70 whether or not to include the difference data. If difference data is included in step S70, the same processing as in FIG. 5 is performed after step S27. If the difference data is not included, the reduced image is read from the SDRAM in step S71, the reduced image is enlarged in step S72, and the read data is transmitted to the request source in step S73.
また、ステップS26において、矩形リードリクエストでないと判断された場合にも、ステップS74において、差分データを含めた読み込みか否かが判断される。ステップS74で、差分データを含めた読み込みであると判断された場合には、ステップS33以降、図5と同じ処理となる。差分データを含めない読み込みであると判断された場合には、ステップS75において、縮小画像をSDRAMから読み込み、ステップS76において、縮小画像を拡大し、ステップS77において、リクエスト元にリードデータを送信する。 Also, if it is determined in step S26 that the request is not a rectangular read request, it is determined in step S74 whether or not the reading includes difference data. If it is determined in step S74 that the reading includes difference data, the same processing as in FIG. 5 is performed after step S33. If it is determined that the reading does not include the difference data, the reduced image is read from the SDRAM in step S75, the reduced image is enlarged in step S76, and the read data is transmitted to the request source in step S77.
以上のような機能を搭載したメモリコントローラを使用することにより、表示画像サイズ等に合わせて誤差が目立たない範囲で、更にDRAM へのメモリアクセス量を削減することが可能となる。 By using a memory controller equipped with the above functions, it is possible to further reduce the memory access amount to the DRAM within a range in which the error is not conspicuous in accordance with the display image size or the like.
図10は、本発明の第3の実施形態を適用したMPEG エンコーダLSI のブロック構成図
である。
本LSI は、画像取り込み部40、MPEG エンコーダ部41、表示制御部42、メモリコントローラ部43の4 つのブロックで構成され、エンコード処理に必要な画像等を格納するための外部メモリ(SDRAM)44が接続される。画像取り込み部40は入力画像を取り込み、メモリコントローラ部43を介して、画像をSDRAM44 へ書き込む。画像入力はラスタスキャン順で行われ、SDRAM44への書き込み処理は、ライン単位とする。
FIG. 10 is a block diagram of an MPEG encoder LSI to which the third embodiment of the present invention is applied.
This LSI is composed of four blocks, an image capturing unit 40, an MPEG encoder unit 41, a display control unit 42, and a memory controller unit 43. An external memory (SDRAM) 44 for storing images necessary for encoding processing is provided. Connected. The image capturing unit 40 captures an input image and writes the image to the SDRAM 44 via the memory controller unit 43. Image input is performed in raster scan order, and writing processing to the SDRAM 44 is in line units.
MPEGエンコーダ部41は、取り込まれた入力画像をメモリコントローラ部43を介して読み出し、MPEG に従った符号化処理を行い、MPEG ストリームを生成するブロックである。符号化処理中、必要に応じて、過去のローカルデコード画像を参照画像として読み出して使用する。 The MPEG encoder unit 41 is a block that reads the captured input image through the memory controller unit 43, performs an encoding process according to MPEG, and generates an MPEG stream. During the encoding process, a past local decoded image is read as a reference image and used as necessary.
表示制御部42は、MPEG エンコーダ部41が生成したローカルデコード画像あるいは、画像取り込み部が取り込んだ入力画像をメモリコントローラ部43経由で読み出して表示装置へ出力するブロックである。 The display control unit 42 is a block that reads a local decoded image generated by the MPEG encoder unit 41 or an input image captured by the image capturing unit via the memory controller unit 43 and outputs the read image to the display device.
メモリコントローラ部43は、画像取り込み部40、MPEG エンコーダ部41および表示制御部42からの要求に応じて、SDRAM44へのアクセスを管理するブロックである。
第3の実施形態では、回路の共有化を行っている点と、過去の差分データをバッファに格納し、再利用している点が第1の実施形態と異なる。なお、画像の縮小、拡大方法は、第1の実施形態と同様とする。
The memory controller unit 43 is a block that manages access to the SDRAM 44 in response to requests from the image capturing unit 40, the MPEG encoder unit 41, and the display control unit 42.
The third embodiment is different from the first embodiment in that the circuit is shared and the past difference data is stored in the buffer and reused. The image reduction and enlargement method is the same as that in the first embodiment.
メモリコントローラ部43には、画像取り込み部40やMPEGエンコーダ部41、表示制御部42からのリクエストを受け付けるリクエスト制御部45が設けられている。リクエスト制御部45は、リクエストを受け付けると、リクエスト変換部46にリクエストを送り、画像データ圧縮部47や画像データ展開部48への制御信号を生成させる。 The memory controller unit 43 is provided with a request control unit 45 that receives requests from the image capturing unit 40, the MPEG encoder unit 41, and the display control unit 42. When receiving the request, the request control unit 45 sends a request to the request conversion unit 46 to generate a control signal to the image data compression unit 47 and the image data expansion unit 48.
画像取り込み部40あるいはMPEGエンコーダ部41からラインライトリクエストあるいは矩形ライトリクエストが発行されると、画像データ圧縮部47のセレクタ50によって、ラインライトデータか矩形ライトデータのいずれかが選択される。画像格納メモリ51において、ラインライトデータあるいは矩形ライトデータを受け取り、画像縮小回路52にデータを入力する。画像縮小回路52は、画像を縮小し、SDRAMアクセス制御部65を介して、SDRAM44に縮小画像を書き込む。また、縮小画像は、画像拡大回路53において、拡大され、減算器54において、元画像との差分が取られる。差分データは、差分データ格納メモリ55に格納され、差分データ圧縮回路56に入力される。差分データ圧縮回路56では、リクエストがラインライトリクエストでも矩形ライトリクエストでも、差分データが、ライン単位の圧縮差分データおよび矩形単位の圧縮差分データの両方に変換され、SDRAMアクセス制御部65を介して、SDRAM44に書き込まれる。 When a line write request or a rectangular write request is issued from the image capturing unit 40 or the MPEG encoder unit 41, either the line write data or the rectangular write data is selected by the selector 50 of the image data compression unit 47. The image storage memory 51 receives line write data or rectangular write data and inputs the data to the image reduction circuit 52. The image reduction circuit 52 reduces the image and writes the reduced image in the SDRAM 44 via the SDRAM access control unit 65. The reduced image is enlarged by the image enlargement circuit 53, and the difference from the original image is taken by the subtractor 54. The difference data is stored in the difference data storage memory 55 and input to the difference data compression circuit 56. In the difference data compression circuit 56, regardless of whether the request is a line write request or a rectangular write request, the difference data is converted into both line-by-line compressed difference data and rectangular-unit compressed difference data, and the SDRAM access control unit 65 It is written in the SDRAM 44.
MPEGエンコーダ部41から、矩形リードリクエストが発行されると、画像データ展開部48は、SDRAMアクセス制御部65を介して、SDRAM44から縮小画像データと矩形用圧縮差分データを読み取る。縮小画像データは、縮小画像格納メモリ57に格納された後、画像拡大回路59において拡大される。画像拡大回路59は、ライン用と矩形用のいずれにも対応したハードウェアであり、リクエスト変換部46からの制御により、いずれかの処理を行う。矩形用圧縮差分データは、差分データ格納メモリ58に格納された後、差分データ展開回路60において、展開される。差分データ展開回路60は、ライン用と矩形用のいずれにも対応したハードウェアであり、リクエスト変換部46からの制御により、いずれかの処理を行う。展開された矩形用差分データは、矩形用とライン用を兼用する過去差分データバッファ61に格納されると共に、セレクタ62に入力される。展開された矩形用差分データあるいは過去差分データバッファ61に格納された過去の差分データのいずれかがセレクタ62により選択され、拡大された縮小画像と加算器35において、加算され、矩形リードデータとして、スイッチ64を介して、MPEGエンコーダ部41に送られる。 When a rectangular read request is issued from the MPEG encoder unit 41, the image data expansion unit 48 reads the reduced image data and the rectangular compressed difference data from the SDRAM 44 via the SDRAM access control unit 65. The reduced image data is stored in the reduced image storage memory 57 and then enlarged in the image enlargement circuit 59. The image enlargement circuit 59 is hardware that supports both lines and rectangles, and performs either processing under the control of the request conversion unit 46. The rectangular compressed differential data is stored in the differential data storage memory 58 and then expanded in the differential data expansion circuit 60. The differential data expansion circuit 60 is hardware that supports both lines and rectangles, and performs either process under the control of the request conversion unit 46. The developed rectangular difference data is stored in the past difference data buffer 61 that is used for both the rectangle and the line, and is input to the selector 62. Either the expanded rectangular difference data or the past difference data stored in the past difference data buffer 61 is selected by the selector 62, and is added to the enlarged reduced image by the adder 35 to obtain the rectangular read data. The data is sent to the MPEG encoder 41 via the switch 64.
表示制御部42からラインリードリクエストが発行された場合は、MPEGエンコーダ部41から矩形リードリクエストが発行された場合と同様である。
第3の実施形態においては、差分データ圧縮回路56、縮小画像格納メモリ57、差分データ格納メモリ58、画像拡大回路59、差分データ展開回路60が、矩形用とライン用の両方を処理可能なハードウェアとして構成されている。
The case where the line read request is issued from the display control unit 42 is the same as the case where the rectangular read request is issued from the MPEG encoder unit 41.
In the third embodiment, the difference data compression circuit 56, the reduced image storage memory 57, the difference data storage memory 58, the image enlargement circuit 59, and the difference data expansion circuit 60 are hardware capable of processing both rectangular and line. It is configured as wear.
なお、図10はエンコーダの構成図であるが、メモリコントローラ部43の構成は、デコーダの場合でも同様である。 Although FIG. 10 is a configuration diagram of the encoder, the configuration of the memory controller unit 43 is the same even in the case of the decoder.
図11に、本発明の第3の実施形態のメモリコントローラの処理フローを示す。
図11において、図5と同じステップには、同じ参照符号を付し、簡単な説明をするのみにとどめる。
まず、ステップS10において、各機能ブロックからのリクエストを受信する。複数のリクエストを受信した場合には(ステップS11)、リクエストの調停を行い(ステップS12)、処理を行う一つのリクエストを選択する。選択したリクエストの内容を解析し(ステップS13)、矩形ライトリクエスト、ラインライトリクエスト、矩形リードリクエスト、ラインリードリクエストのいずれかを判断し、それぞれに対して処理を行う。
FIG. 11 shows a processing flow of the memory controller according to the third embodiment of the present invention.
In FIG. 11, the same steps as those in FIG. 5 are denoted by the same reference numerals, and only a brief description will be given.
First, in step S10, a request from each functional block is received. When a plurality of requests are received (step S11), request arbitration is performed (step S12), and one request to be processed is selected. The contents of the selected request are analyzed (step S13), and one of a rectangular write request, a line write request, a rectangular read request, and a line read request is determined, and processing is performed on each of them.
ラインライトリクエスト、矩形ライトリクエストに対する処理の流れは同じであるので、図11では、ライトリクエストの場合として、1つのフローとしている。まず、リクエスト要求元からライトデータ(元画像データ)を取得する(ステップS15)。次に、元画像の縮小画像を生成し(ステップS16)、その縮小画像の拡大画を生成する(ステップS17)。その後、元画像と生成した縮小後拡大画の間で差分を取り、差分データを作成する(ステップS18)。差分データは、矩形用の圧縮とライン用の圧縮の2 種類の圧縮が行われる(ステップS19、S20)。生成された、縮小画、矩形用圧縮差分データ、ライン用圧縮差分データは、それぞれ、SDRAM にライトされる(ステップS21)。ただし、圧縮差分データに関しては、圧縮する単位によって、一つのライトリクエストのデータだけで圧縮が完結するとは限らないため、圧縮する単位のデータがまとまった時点で書き込みが行われる(ステップS22〜ステップS25)。第3の実施形態では、各格納メモリ、画像縮小/拡大回路、差分データ圧縮回路などの回路はライン用と矩形用で共用されている。ライン用と矩形用の差分データ圧縮回路は一つのライトリクエストに対して時分割で使用される。 Since the processing flow for the line write request and the rectangular write request is the same, in FIG. 11, a single flow is shown as the case of the write request. First, write data (original image data) is acquired from the request request source (step S15). Next, a reduced image of the original image is generated (step S16), and an enlarged image of the reduced image is generated (step S17). Thereafter, a difference is taken between the original image and the generated enlarged image after reduction to create difference data (step S18). The difference data is subjected to two types of compression: rectangular compression and line compression (steps S19 and S20). The generated reduced image, rectangular compression difference data, and line compression difference data are each written to the SDRAM (step S21). However, with respect to the compressed differential data, the compression is not necessarily completed with only one write request data depending on the unit to be compressed, and thus writing is performed when the data of the unit to be compressed is collected (steps S22 to S25). ). In the third embodiment, circuits such as each storage memory, an image reduction / enlargement circuit, and a differential data compression circuit are shared for lines and rectangles. The differential data compression circuit for line and rectangle is used in a time division manner for one write request.
ラインリードリクエストと、矩形リードリクエストに対する基本的な処理の流れは同じである。まず、リクエスト内容からSDRAMからリードすべき、縮小画領域と矩形用またはライン用圧縮差分データ領域を判断して、SDRAMから必要データをリードする(ステップS27、S33)。縮小画像は矩形またはラインの1 領域をリードする必要があるが、矩形用またはライン用の圧縮差分データに関しては、第3の実施形態では、過去の差分データをバッファに格納する機能を持つため、必ずしもリードアクセスが発生するとは限らない。過去差分データバッファに必要な差分データが格納されている場合には(ステップS80、S84)、SDRAM への差分データリードアクセスは行わずに、縮小画像のみ読み出して、拡大処理し、過去差分データバッファ内の対応する差分データとの加算を行って元画を復元する。そして、その復元画像をリクエスト要求元に復元画像を送信する。必要な差分データが格納されていない場合には(ステップS80、S84)、縮小画像および、圧縮差分データを読み出して(ステップS81、S85)、それぞれ拡大、展開処理し(ステップS82、S86)、両者を加算して元画像を復元した後(ステップS31、S37)、リクエスト要求元に復元画像を送信する(ステップS32、S38)。なお、展開した差分データは将来のリードリクエストのために、過去差分データバッファに格納しておく(ステップS83、S87)。第3の実施形態では、各格納メモリ、画像縮小/拡大回路、差分データ展開回路などの回路はライン用と矩形用で共用されている。また、過去差分データバッファには、ライン用と矩形用の差分データを別々の領域に格納し、それぞれのライン、矩形、それぞれのリクエストに対して、過去の差分データを使用することが可能なようになっている。 The basic processing flow for a line read request and a rectangular read request is the same. First, the reduced image area and the rectangular or line compression difference data area to be read from the SDRAM are determined from the request contents, and necessary data is read from the SDRAM (steps S27 and S33). The reduced image needs to read one area of a rectangle or a line, but the compressed difference data for a rectangle or line has a function of storing past difference data in a buffer in the third embodiment. Read access does not always occur. When necessary difference data is stored in the past difference data buffer (steps S80 and S84), only the reduced image is read and enlarged without performing the difference data read access to the SDRAM, and the past difference data buffer is read out. The original image is restored by adding the corresponding difference data. Then, the restored image is transmitted to the request request source. If the necessary difference data is not stored (steps S80 and S84), the reduced image and the compressed difference data are read (steps S81 and S85), and are enlarged and expanded (steps S82 and S86). Is added to restore the original image (steps S31 and S37), and the restored image is transmitted to the request request source (steps S32 and S38). The developed difference data is stored in the past difference data buffer for future read requests (steps S83 and S87). In the third embodiment, circuits such as each storage memory, an image reduction / enlargement circuit, and a difference data expansion circuit are shared for lines and rectangles. Also, the difference data for lines and rectangles are stored in separate areas in the past difference data buffer so that past difference data can be used for each line, rectangle, and request. It has become.
以上のような機能を搭載したメモリコントローラを使用することにより、過去にリードした差分データを再利用して、差分データのリード量を削減することができるので、SDRAM へのメモリアクセス量をより削減することが可能である。 By using a memory controller equipped with the above functions, the difference data read in the past can be reused to reduce the amount of difference data read, thus reducing the amount of memory access to SDRAM. Is possible.
本発明の第4の実施形態として、第3の実施形態 の構成に対して別の縮小、拡大方法を用いた例を示す。ブロック構成は基本的に第3の実施形態と同様であるが、第4の実施形態では、縮小画生成方法は、縦1/2、横1/2 の間引き処理、拡大画生成方法は線形補間、矩形用圧縮差分データ領域単位は16 画素x16 画素領域、ライン用圧縮差分データ領域単位は、ライン方向256 画素単位とする。 As a fourth embodiment of the present invention, an example in which another reduction / enlargement method is used for the configuration of the third embodiment will be described. The block configuration is basically the same as in the third embodiment, but in the fourth embodiment, the reduced image generation method is thinning out the vertical 1/2 and horizontal 1/2, and the enlarged image generation method is linear interpolation. The rectangular compression difference data area unit is 16 pixels × 16 pixel area, and the line compression difference data area unit is 256 pixels in the line direction.
図12に、第4の実施形態における元画像から縮小画像への間引き方法を示す。
図12(a)は、元画像における間引かれる画素と残される画素を示した図であり、図12(b)は、縮小後の縮小画像の画素の様子を示す。第4の実施形態では、横方向の間引きのほかに、縦方向の間引きを行い、線形補間で拡大処理を行う。そのため、元画像の奇数ラインのラインリードにおいて、上下に隣接する2ラインのデータが必要となる。通常、表示装置への画像データは、画面の上側のラインから、下側のラインへ順番に出力する形式となるため、過去ラインをバッファに保存しておくことにより、縮小画のラインリードアクセス量を削減することが可能である。第4の実施形態では、画面の上端(ライン0)から順番にリードアクセスが行われるものとする。
FIG. 12 shows a thinning method from the original image to the reduced image in the fourth embodiment.
FIG. 12A is a diagram showing the pixels to be thinned out and the pixels that remain in the original image, and FIG. 12B shows the state of the pixels of the reduced image after reduction. In the fourth embodiment, in addition to thinning in the horizontal direction, thinning in the vertical direction is performed, and enlargement processing is performed by linear interpolation. For this reason, in the line read of the odd lines of the original image, data of two lines adjacent vertically are necessary. Normally, the image data to the display device is output in order from the upper line on the screen to the lower line, so the line read access amount of the reduced image can be saved by storing the past line in the buffer. Can be reduced. In the fourth embodiment, it is assumed that read access is performed in order from the upper end (line 0) of the screen.
図13に、第4の実施形態のラインリードリクエスト処理の手順を示す。
まず、ラインnのラインリードリクエストを受け取り(ステップS90)、ラインnが画面の先頭ライン(元画像でのライン0)の場合は(ステップS91)、縮小画像の先頭ライン(ライン0)を読み出す(ステップS92)。元画像のライン0 は、縮小画のライン0 に対応するラインであるので、拡大処理で元画空間のライン0 を生成し(ステップS93)、縮小画ライン0 は、バッファに格納する(ステップS94)。なお、第4の実施形態では、このバッファは、縮小画像格納メモリ内に、1 リクエスト分のバッファ領域とは別に過去ラインを保持しておくだけの領域を確保し、ラインデータを保持しておくものとする。ステップS102において、ラインn(現在処理しているライン)を水平方向に拡大処理し、以降の圧縮差分データのリード、展開、加算の処理(ステップS103〜ステップS108)は第3の実施形態 と同様である(図11のステップS80〜S32及びステップS84〜S38までの処理と同様)。次にライン1 のリードリクエストを受け取った際には、奇数ラインのフローへ移行する(ステップS95)。奇数ラインの場合は、縮小画として対応するラインが格納されていないので、上下に隣接するラインから線形補間でデータを作成する必要がある。上隣接ライン(この場合、縮小画像のライン0)は、既に過去ラインバッファ領域に格納されているので、SDRAM へのリード処理は行わず、下隣接ライン(この場合、縮小画像のライン1)をリードして、元画像の奇数ライン(この場合、元画像のライン1)を生成する。新たにリードされた下隣接のラインは、過去ラインバッファ領域に格納され、次ラインの処理の際に使用される。ライン2 のラインリードリクエストを受け取った際には、偶数ラインのフローに移行する。先頭ライン以外の偶数ラインの場合、対応する縮小空間のラインは、既に前の奇数ライン処理時に過去ラインバッファ領域に格納されているため、SDRAM へのリードアクセスは行わずに、バッファ内データのみで対応するラインを復元することが可能である。
FIG. 13 shows a procedure of line read request processing according to the fourth embodiment.
First, a line read request for line n is received (step S90). If line n is the first line on the screen (line 0 in the original image) (step S91), the first line (line 0) in the reduced image is read (step S91). Step S92). Since line 0 of the original image is a line corresponding to line 0 of the reduced image, line 0 of the original image space is generated by enlargement processing (step S93), and the reduced image line 0 is stored in the buffer (step S94). ). In the fourth embodiment, this buffer secures an area for holding a past line in the reduced image storage memory separately from the buffer area for one request, and holds line data. Shall. In step S102, the line n (the currently processed line) is expanded in the horizontal direction, and the subsequent processes of reading, expanding, and adding the compressed difference data (steps S103 to S108) are the same as in the third embodiment. (Similar to the processing from steps S80 to S32 and steps S84 to S38 in FIG. 11). Next, when a read request for line 1 is received, the flow proceeds to the flow of odd lines (step S95). In the case of an odd-numbered line, the corresponding line is not stored as a reduced image, so it is necessary to create data by linear interpolation from vertically adjacent lines. Since the upper adjacent line (in this case, line 0 of the reduced image) has already been stored in the past line buffer area, the read processing to SDRAM is not performed, and the lower adjacent line (in this case, line 1 of the reduced image) is changed. Read to generate an odd line of the original image (in this case, line 1 of the original image). The newly read lower adjacent line is stored in the past line buffer area, and is used when processing the next line. When the line read request for line 2 is received, the flow moves to the even line flow. For even lines other than the first line, the corresponding reduced space line is already stored in the past line buffer area during the previous odd line processing, so read access to the SDRAM is not performed and only the data in the buffer is used. It is possible to restore the corresponding line.
すなわち、ステップS95で、現在のラインが奇数ラインであると判断された場合には、ステップS96において、縮小画像の(n+1)/2のラインをリードし、ステップS97において、過去ラインバッファからライン(n-1)/2を取得する。そして、ステップS98において、縮小画像ライン(n-1)/2と(n+1)/2から元画像ラインnを生成する。ステップS99において、過去ラインバッファにライン(n+1)/2を格納して、ステップS102に進む。ステップS95で、現在のラインが奇数ラインでないと判断された場合には、ステップS100において、過去ラインバッファからラインn/2を取得し、ステップS102において、縮小画像ラインn/2から元画像ラインnを生成し、ステップS102に進む。 That is, if it is determined in step S95 that the current line is an odd line, the line (n + 1) / 2 of the reduced image is read in step S96, and the previous line buffer is read in step S97. Get line (n-1) / 2. In step S98, the original image line n is generated from the reduced image lines (n-1) / 2 and (n + 1) / 2. In step S99, the line (n + 1) / 2 is stored in the past line buffer, and the process proceeds to step S102. If it is determined in step S95 that the current line is not an odd line, line n / 2 is acquired from the past line buffer in step S100, and the original image line n is reduced from the reduced image line n / 2 in step S102. And proceeds to step S102.
上記のようなフローで過去ラインバッファ領域に過去ラインデータを保持しておくことにより、縦間引きがある場合の奇数ラインリードリクエスト時の縮小画読み出し量を削減することが可能である。 By holding the past line data in the past line buffer area in the flow as described above, it is possible to reduce the amount of reduced image read at the time of an odd line read request when there is vertical thinning.
本発明の実施形態を使用することにより、大画面のMPEG デコード・エンコードなど、高いメモリバス帯域が要求される装置において、実際に使用するメモリバス帯域を低減することが可能である。本発明の実施形態は、MPEG デコード、エンコード処理に使用される矩形リードアクセス、表示制御に使用されるラインリードアクセスの双方でメモリバス帯域を削減しているため、メモリバス帯域削減効果は高く、様々な装置への適用が可能である。本発明の実施形態の適用により使用するメモリバス帯域が半減すると、メモリ周波数は半分、あるいは、メモリ個数を半減することが可能である。また、同じメモリバス帯域を使用するなら、より大画面の処理を行うことが可能である。メモリバス帯域を半減すると、2倍の画面サイズ、あるいは、2倍のフレームレートの処理を実現することが可能となる。 By using the embodiment of the present invention, it is possible to reduce the memory bus bandwidth that is actually used in an apparatus that requires a high memory bus bandwidth, such as large-screen MPEG decoding / encoding. In the embodiment of the present invention, the memory bus bandwidth is reduced in both the MPEG read, the rectangular read access used for encoding processing, and the line read access used for display control, so the memory bus bandwidth reduction effect is high. Application to various devices is possible. When the memory bus band to be used is halved by applying the embodiment of the present invention, the memory frequency can be halved or the number of memories can be halved. If the same memory bus bandwidth is used, a larger screen can be processed. If the memory bus bandwidth is halved, it is possible to realize processing with twice the screen size or twice the frame rate.
上記実施形態に加え、以下の付記を開示する。
(付記1)
メモリと、
画像データを縮小して縮小画像データを生成し、前記メモリに格納するともに、前記縮小画像データを拡大して拡大画像データを生成し、前記画像データと前記拡大画像データとの差分データを異なる複数の単位で圧縮し、複数の圧縮差分データを生成して前記メモリに格納する画像データ圧縮部と、
リクエスト要求が指示する内容に応じて前記圧縮差分データを読み出すとともに、前記縮小画像データを読み出し、前記圧縮差分データと前記縮小画像データとに基づいて伸長された画像データを生成する画像データ伸長部と、
を備えることを特徴とする画像処理装置。
(付記2)
前記複数の単位は、矩形単位とライン単位とを含むことを特徴とする付記1に記載の画像処理装置。
(付記3)
前記画像データから前記縮小画像データを生成する方法は、間引きによることを特徴とする付記1に記載の画像処理装置。
(付記4)
前記縮小画像の拡大方法は、線形補完によることを特徴とする付記1に記載の画像処理装置。
(付記5)
以前に読み出された前記縮小画像データと前記圧縮差分データとを格納するバッファを更に有し、
前記画像データ伸長部は、読み出すべき前記縮小画像データあるいは前記圧縮差分デー
タが既に前記バッファに格納されている場合には、前記メモリにアクセスせず、読み出すべき前記縮小画像データあるいは前記圧縮差分データを前記バッファより読み出すことを特徴とする付記1に記載の画像処理装置。
(付記6)
前記圧縮差分データの圧縮方法は、可変長符号化によることを特徴とする付記1に記載の画像処理装置。
(付記7)
前記圧縮差分データの前記メモリへの格納は、前記圧縮の単位で指定の領域へ格納することを特徴とする付記1に記載の画像処理装置。
(付記8)
前記圧縮差分データの前記メモリへの格納において、前記圧縮の単位でのデータサイズを算出および記録する手段を備えることを特徴とする付記1に記載の画像処理装置
(付記9)
前記圧縮差分データの前記メモリへの格納は、前記圧縮の単位とは異なる単位で行われることを特徴とする付記1に記載の画像処理装置。
(付記10)
前記圧縮の単位と異なる単位は、マクロブロック単位であることを特徴とする付記9に記載の画像処理装置。
(付記11)
前記圧縮差分データを読み出すとともに、前記縮小画像データを読み出し、前記圧縮差分データと前記縮小画像データとに基づいて伸長された画像データを生成するか、前記縮小画像データのみを読み出し、前記縮小画像データ基づいて伸長された画像データを生成するか、を選択可能な画像データ伸長部を備えることを特徴とする付記1に記載の画像処理装置。
(付記12)
画像データを縮小して縮小画像データを生成し、
前記縮小画像データを拡大して拡大画像データを生成し、
前記画像データと前記拡大画像データとの差分データを第1の単位で圧縮して第1圧縮差分データを生成し、
前記画像データと前記拡大画像データとの差分データを第2の単位で圧縮して第2圧縮差分データを生成し、
リクエスト要求に基づいて、前記第1圧縮差分データ又は前記第2圧縮差分データの何れかを選択し、
前記選択された圧縮差分データと前記縮小画像データとに基づいて伸長された画像データを生成すること
を特徴とする画像処理方法。
In addition to the above embodiment, the following supplementary notes are disclosed.
(Appendix 1)
Memory,
Reduced image data is generated to generate reduced image data, and is stored in the memory, and the reduced image data is enlarged to generate enlarged image data, and a plurality of different difference data between the image data and the enlarged image data are set. An image data compression unit that generates a plurality of compressed differential data and stores them in the memory;
An image data decompression unit that reads out the compressed difference data according to the content indicated by the request request, reads out the reduced image data, and generates image data decompressed based on the compressed difference data and the reduced image data; ,
An image processing apparatus comprising:
(Appendix 2)
The image processing apparatus according to appendix 1, wherein the plurality of units include a rectangular unit and a line unit.
(Appendix 3)
The image processing apparatus according to appendix 1, wherein a method of generating the reduced image data from the image data is based on thinning.
(Appendix 4)
The image processing apparatus according to attachment 1, wherein the method for enlarging the reduced image is based on linear interpolation.
(Appendix 5)
A buffer for storing the reduced image data and the compressed differential data read out before;
When the reduced image data or the compressed difference data to be read is already stored in the buffer, the image data decompression unit does not access the memory and stores the reduced image data or the compressed difference data to be read. The image processing apparatus according to appendix 1, wherein the image processing apparatus is read from the buffer.
(Appendix 6)
The image processing apparatus according to appendix 1, wherein the compression method of the compressed difference data is based on variable length coding.
(Appendix 7)
The image processing apparatus according to appendix 1, wherein the compressed differential data is stored in the memory in a designated area in units of compression.
(Appendix 8)
The image processing apparatus according to appendix 1, further comprising means for calculating and recording a data size in the unit of compression in storing the compressed differential data in the memory (appendix 9)
The image processing apparatus according to claim 1, wherein the compressed differential data is stored in the memory in a unit different from the unit of compression.
(Appendix 10)
The image processing apparatus according to appendix 9, wherein the unit different from the unit of compression is a macroblock unit.
(Appendix 11)
The compressed difference data is read out, the reduced image data is read out, and expanded image data is generated based on the compressed difference data and the reduced image data, or only the reduced image data is read out, and the reduced image data is read out The image processing apparatus according to appendix 1, further comprising an image data expansion unit that can select whether to generate image data expanded based on the image data.
(Appendix 12)
Reduce the image data to generate reduced image data,
Enlarging the reduced image data to generate enlarged image data,
Compressing difference data between the image data and the enlarged image data in a first unit to generate first compressed difference data;
Compressing difference data between the image data and the enlarged image data in a second unit to generate second compressed difference data;
Based on the request request, select either the first compressed differential data or the second compressed differential data,
An image processing method, wherein decompressed image data is generated based on the selected compressed difference data and the reduced image data.
10、41 MPEGデコーダ部
11、42 表示制御部
12、43 メモリコントローラ部
13、44 SDRAM
15、45 リクエスト制御部
16、47 画像データ圧縮部
17 矩形画像データ展開部
18 ライン画像データ展開部
19、46 リクエスト変換部
20、51 画像メモリ
21、52 画像縮小回路
22、53 画像拡大回路
23、54 減算器
24、55 差分データ格納メモリ
25 差分データ圧縮回路(矩形用)
26 差分データ圧縮回路(ライン用)
27、31、57 縮小画像格納メモリ
28、32、58 差分データ格納メモリ
29 画像拡大回路(矩形用)
30 差分データ展開回路(矩形用)
33 画像拡大回路(ライン用)
34 差分データ展開回路(ライン用)
35、36、63 加算器
37 SDRAMアクセス制御部
40 画像取り込み部
48 画像データ展開部
50 セレクタ
56 差分データ圧縮回路(矩形用/ライン用)
59 画像拡大回路(矩形用/ライン用)
60 差分データ展開回路(矩形用/ライン用)
61 過去差分データバッファ(矩形用/ライン用)
62 セレクタ
64 スイッチ
10, 41 MPEG decoder unit 11, 42 Display control unit 12, 43 Memory controller unit 13, 44 SDRAM
15, 45 Request control unit 16, 47 Image data compression unit 17 Rectangular image data development unit 18 Line image data development unit 19, 46 Request conversion unit 20, 51 Image memory 21, 52 Image reduction circuit 22, 53 Image enlargement circuit 23, 54 Subtractors 24 and 55 Difference data storage memory 25 Difference data compression circuit (for rectangle)
26 Differential data compression circuit (for line)
27, 31, 57 Reduced image storage memory 28, 32, 58 Difference data storage memory 29 Image enlargement circuit (for rectangle)
30 Differential data expansion circuit (for rectangle)
33 Image enlargement circuit (for line)
34 Differential data expansion circuit (for line)
35, 36, 63 Adder 37 SDRAM access control unit 40 Image capture unit 48 Image data development unit 50 Selector 56 Differential data compression circuit (for rectangle / line)
59 Image enlargement circuit (for rectangle / line)
60 Differential data expansion circuit (for rectangle / line)
61 Past difference data buffer (rectangular / line)
62 selector 64 switch
Claims (5)
画像データを縮小して縮小画像データを生成し、前記メモリに格納するともに、前記縮小画像データを拡大して拡大画像データを生成し、前記画像データと前記拡大画像データとの差分データを異なる複数の単位で圧縮し、複数の圧縮差分データを生成して前記メモリに格納する画像データ圧縮部と、
リクエスト要求が指示する単位で前記圧縮差分データを読み出すとともに、前記縮小画像データを読み出し、前記圧縮差分データと前記縮小画像データとに基づいて伸長された画像データを生成する画像データ伸長部と、
を備えることを特徴とする画像処理装置。 Memory,
Reduced image data is generated to generate reduced image data, and is stored in the memory, and the reduced image data is enlarged to generate enlarged image data, and a plurality of different difference data between the image data and the enlarged image data are set. An image data compression unit that generates a plurality of compressed differential data and stores them in the memory;
An image data decompression unit that reads out the compressed difference data in units indicated by a request request, reads out the reduced image data, and generates image data decompressed based on the compressed difference data and the reduced image data;
An image processing apparatus comprising:
前記画像データ伸長部は、読み出すべき前記縮小画像データあるいは前記圧縮差分データが既に前記バッファに格納されている場合には、前記メモリにアクセスせず、読み出すべき前記縮小画像データあるいは前記圧縮差分データを前記バッファより読み出すことを特徴とする請求項1に記載の画像処理装置。 A buffer for storing the reduced image data and the compressed differential data read out before;
When the reduced image data or the compressed difference data to be read is already stored in the buffer, the image data decompression unit does not access the memory and stores the reduced image data or the compressed difference data to be read. The image processing apparatus according to claim 1, wherein the image processing apparatus is read from the buffer.
前記縮小画像データを拡大して拡大画像データを生成し、
前記画像データと前記拡大画像データとの差分データを第1の単位で圧縮して第1圧縮差分データを生成し、
前記画像データと前記拡大画像データとの差分データを第2の単位で圧縮して第2圧縮差分データを生成し、
リクエスト要求に基づいて、前記第1圧縮差分データ又は前記第2圧縮差分データの何れかを選択し、
前記選択された圧縮差分データと前記縮小画像データとに基づいて伸長された画像データを生成すること
を特徴とする画像処理方法。 Reduce the image data to generate reduced image data,
Enlarging the reduced image data to generate enlarged image data,
Compressing difference data between the image data and the enlarged image data in a first unit to generate first compressed difference data;
Compressing difference data between the image data and the enlarged image data in a second unit to generate second compressed difference data;
Based on the request request, select either the first compressed differential data or the second compressed differential data,
An image processing method, wherein decompressed image data is generated based on the selected compressed difference data and the reduced image data.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008318037A JP5245794B2 (en) | 2008-12-15 | 2008-12-15 | Image processing apparatus and method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008318037A JP5245794B2 (en) | 2008-12-15 | 2008-12-15 | Image processing apparatus and method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2010141771A true JP2010141771A (en) | 2010-06-24 |
| JP5245794B2 JP5245794B2 (en) | 2013-07-24 |
Family
ID=42351467
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2008318037A Expired - Fee Related JP5245794B2 (en) | 2008-12-15 | 2008-12-15 | Image processing apparatus and method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5245794B2 (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013132056A (en) * | 2011-12-21 | 2013-07-04 | Intel Corp | Dram compression scheme to reduce power consumption in motion compensation and display refresh |
| US9635370B2 (en) | 2014-03-07 | 2017-04-25 | Sony Corporation | Image processing apparatus and image processing method, image encoding apparatus and image encoding method, and image decoding apparatus and image decoding method |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH05227444A (en) * | 1992-02-10 | 1993-09-03 | Canon Inc | Image processing method and apparatus thereof |
| JP2001045482A (en) * | 1999-07-27 | 2001-02-16 | Canon Inc | Image processing apparatus and method |
-
2008
- 2008-12-15 JP JP2008318037A patent/JP5245794B2/en not_active Expired - Fee Related
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH05227444A (en) * | 1992-02-10 | 1993-09-03 | Canon Inc | Image processing method and apparatus thereof |
| JP2001045482A (en) * | 1999-07-27 | 2001-02-16 | Canon Inc | Image processing apparatus and method |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013132056A (en) * | 2011-12-21 | 2013-07-04 | Intel Corp | Dram compression scheme to reduce power consumption in motion compensation and display refresh |
| US9268723B2 (en) | 2011-12-21 | 2016-02-23 | Intel Corporation | Dram compression scheme to reduce power consumption in motion compensation and display refresh |
| KR101605047B1 (en) * | 2011-12-21 | 2016-03-21 | 인텔 코포레이션 | Dram compression scheme to reduce power consumption in motion compensation and display refresh |
| US9635370B2 (en) | 2014-03-07 | 2017-04-25 | Sony Corporation | Image processing apparatus and image processing method, image encoding apparatus and image encoding method, and image decoding apparatus and image decoding method |
Also Published As
| Publication number | Publication date |
|---|---|
| JP5245794B2 (en) | 2013-07-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4919978B2 (en) | Distortion correction device | |
| CN102598651B (en) | Moving image processing device and method, imaging device equipped with moving image processing device | |
| JP2009192949A (en) | Image processing apparatus, image processing method, and image processing system | |
| JP4384607B2 (en) | Image processing device | |
| JP4346591B2 (en) | Video processing apparatus, video processing method, and program | |
| JP6300651B2 (en) | Movie recording / playback device | |
| JP5245794B2 (en) | Image processing apparatus and method | |
| JP5526641B2 (en) | Memory controller | |
| JP4024649B2 (en) | Image processing apparatus and image processing method | |
| Li et al. | A flexible display module for DVD and set-top box applications | |
| JP5585885B2 (en) | Image processing apparatus and image processing method | |
| JPH1155676A (en) | Moving picture data coding device using synchronous memory | |
| KR20050006063A (en) | Image expansion and display method, image expansion and display device, and program for image expansion and display | |
| JP2011040004A (en) | Image processing apparatus and image processing method | |
| US9990900B2 (en) | Image processing device and method thereof | |
| CN104581175A (en) | Image processing device and method | |
| JP4109151B2 (en) | Image processing device | |
| JP4987800B2 (en) | Imaging device | |
| US7787700B2 (en) | Signal processing method, signal processing apparatus, computer-readable medium and a data recording medium | |
| CN115767176A (en) | Image processing device and playing control method for display wall system | |
| US7389004B2 (en) | Image processing apparatus | |
| JP4321484B2 (en) | Spatial scalable encoding method, spatial scalable encoding device, spatial scalable encoding program, spatial scalable decoding method, spatial scalable decoding device, and spatial scalable decoding program | |
| JP2007094391A (en) | Video display device | |
| JPWO2020022101A1 (en) | Image processing device and image processing method | |
| JP2004120027A (en) | Image processing device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110907 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20121004 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20121009 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20121204 |
|
| 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: 20130312 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130325 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160419 Year of fee payment: 3 |
|
| LAPS | Cancellation because of no payment of annual fees |