JP2011040001A - Image processing apparatus, image processing method and program - Google Patents

Image processing apparatus, image processing method and program Download PDF

Info

Publication number
JP2011040001A
JP2011040001A JP2009189473A JP2009189473A JP2011040001A JP 2011040001 A JP2011040001 A JP 2011040001A JP 2009189473 A JP2009189473 A JP 2009189473A JP 2009189473 A JP2009189473 A JP 2009189473A JP 2011040001 A JP2011040001 A JP 2011040001A
Authority
JP
Japan
Prior art keywords
flag
group
image data
copying
luminance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2009189473A
Other languages
Japanese (ja)
Inventor
Keisuke Ina
圭介 伊奈
Yuji Furuta
勇次 古田
Masao Shimada
昌生 嶋田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Embedded Products Ltd
Original Assignee
NEC Embedded Products Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Embedded Products Ltd filed Critical NEC Embedded Products Ltd
Priority to JP2009189473A priority Critical patent/JP2011040001A/en
Publication of JP2011040001A publication Critical patent/JP2011040001A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus, method and a program, which copies image data without deteriorating reproducibility of an image. <P>SOLUTION: The image processing apparatus has: a storage means that stores image data composed of a plurality of groups; a flag saving means that saves a flag corresponding to each of the plurality of groups; and a copy means that copies a part of the image data stored in the storage means into a different storage location. In copying a part of the image data stored in the storage means into the storage location that is away in a horizontal direction by an odd number of pixels, the copy means copies each of the groups, based on the flag corresponding to each of the groups contained in a part of the copied image data. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、画像データのコピーを行う画像処理装置、画像処理方法及びプログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and a program for copying image data.

ネットワークの発達により、あらゆる場所でネットワークに接続できる環境が整ってきている。このため、クライアント装置をあらゆる場所で使用できるように、機能を落とし、できる限り軽量化し、クライアント装置に入力された操作に対する処理は、ネットワークを介し接続したサーバ装置が行うようなクライアントサーバシステムが実用的になってきている。   With the development of the network, an environment that can connect to the network everywhere has been established. For this reason, a client server system is practically used in which a server device connected via a network performs processing for operations input to the client device by reducing functions and reducing the weight as much as possible so that the client device can be used everywhere. It ’s becoming a reality.

このようなクライアントサーバシステムにおいて、クライアント装置に入力された操作情報は、サーバ装置にネットワークを介し送信され、サーバ装置は、この操作情報を受信し、操作情報に基づき処理を行う。処理の結果の画面画像データなどは、サーバ装置からクライアント装置にネットワークを介し送信され、クライアント装置は、この画面画像データをクライアント装置に接続された映像出力装置により出力する。   In such a client server system, the operation information input to the client device is transmitted to the server device via the network, and the server device receives the operation information and performs processing based on the operation information. Screen image data as a result of the processing is transmitted from the server device to the client device via the network, and the client device outputs this screen image data by a video output device connected to the client device.

このとき、画面画像データのデータサイズやネットワークの混雑具合によっては、クライアント装置に操作情報が入力されてから、この操作情報を反映した画面が出力されるまでに、遅延が生じることがある。   At this time, depending on the data size of the screen image data and the degree of network congestion, there may be a delay between the time when the operation information is input to the client apparatus and the time when the screen reflecting the operation information is output.

そこで、この遅延を小さくするためには、サーバ装置からクライアント装置に送信される画面画像データのデータサイズはできる限り小さい方が良い。そこで、送信される画面画像データのデータサイズを小さくする方法がいろいろ取り入れられてきている。例えば、前回生成された画面画像データから変化した部分だけを送信する、差分伝送などの方法が使われている。さらに、送信するデータを圧縮することでデータサイズを小さくすることも行われている。   Therefore, in order to reduce this delay, the data size of the screen image data transmitted from the server device to the client device should be as small as possible. Therefore, various methods for reducing the data size of transmitted screen image data have been adopted. For example, a method such as differential transmission is used in which only the portion changed from the previously generated screen image data is transmitted. Furthermore, the data size is reduced by compressing the data to be transmitted.

データサイズを小さくするために、例えば、サーバ装置において、RGB形式のデータをYUV422形式のデータに変換されてから送信する方法が用いられている。RGB形式のデータは、R、G、Bの各色が1画素あたり8ビットで表現されるため、1画素あたり合計8+8+8=24ビットのデータサイズが必要になる。これに対して、YUV422形式のデータは、色を輝度Yと2つの色差U、Vに分解し、輝度Yは1つの画素に1つのデータが用意され、色差U、Vは水平方向の2つの画素に1つのデータが用意される。このため、1画素あたりのデータサイズが8+4+4=16ビットになる。つまり、RGB形式のデータをYUV422形式のデータに変換することにより、データサイズは、16/24=2/3倍に圧縮されることになる。   In order to reduce the data size, for example, a method of transmitting RGB format data after converting it to YUV422 format data is used in the server device. In the RGB format data, each color of R, G, and B is expressed by 8 bits per pixel, so that a total data size of 8 + 8 + 8 = 24 bits per pixel is required. On the other hand, the data in the YUV422 format separates the color into luminance Y and two color differences U and V, and the luminance Y has one data for each pixel, and the color differences U and V are two in the horizontal direction. One data is prepared for each pixel. Therefore, the data size per pixel is 8 + 4 + 4 = 16 bits. That is, by converting RGB format data into YUV422 format data, the data size is compressed to 16/24 = 2/3 times.

そこで、例えば、特許文献1では、RGB形式のデータをYUV形式のデータに変換してから表示装置に送信し、表示装置において、YUV形式のデータをRGB形式のデータに変換し直し、表示を行う方法が開示されている。このようにすることにより、画像データの転送速度を速くすることを可能にし、低消費電力の実現を可能にしている。   Thus, for example, in Patent Document 1, RGB format data is converted to YUV format data and then transmitted to the display device. In the display device, YUV format data is converted back to RGB format data and displayed. A method is disclosed. By doing so, it is possible to increase the transfer rate of image data and to realize low power consumption.

特開2004−361498号公報JP 2004-361498 A

差分伝送の方法では、通常、図1に示すような画面上でのウィンドウ部分の移動の場合、図2に示すように、画面の変化した領域、つまり、移動前のウィンドウ部分と移動後のウィンドウ部分を含む領域の差分データをサーバ装置からクライアント装置に送信することになる。しかし、移動するウィンドウ部分の画像が変化しない場合は、移動前のウィンドウ部分と移動後のウィンドウ部分を含む領域全体の差分データを送る必要はない。   In the differential transmission method, in general, when the window portion is moved on the screen as shown in FIG. 1, as shown in FIG. 2, the area on the screen is changed, that is, the window portion before the movement and the window after the movement. The difference data of the area including the part is transmitted from the server device to the client device. However, if the image of the moving window part does not change, it is not necessary to send the difference data for the entire area including the window part before moving and the window part after moving.

ウィンドウ部分の画像は変化しないのであれば、移動後のウィンドウ部分の画像として、すでにクライアント装置に格納されている、移動前のウィンドウ部分の画像を使用すれば良い。つまり、移動後のウィンドウ部分に対しては、クライアント装置に格納された画面画像データ上において、移動後のウィンドウ部分の格納位置に、移動前のウィンドウ部分の画像データをコピーすれば良い。そして、移動前のウィンドウ部分の差分データだけをサーバ装置から送信し、クライアント装置に格納された画面画像データ上において、移動前のウィンドウ部分をこの差分データに書き換えれば、ウィンドウ部分が移動した後の画像を生成することができる。図3に示すように、ウィンドウ部分の移動前の位置情報とウィンドウの移動先についての情報と、移動前のウィンドウ部分の位置における差分データを送信するだけで、ウィンドウ部分が移動した後の画面画像データをクライアント装置側で生成することができる。   If the image of the window portion does not change, the image of the window portion before movement that is already stored in the client device may be used as the image of the window portion after movement. That is, for the window part after the movement, the image data of the window part before the movement may be copied to the storage position of the window part after the movement on the screen image data stored in the client device. Then, only the difference data of the window part before movement is transmitted from the server device, and the window part before movement is rewritten to this difference data on the screen image data stored in the client apparatus. An image can be generated. As shown in FIG. 3, the screen image after the window portion is moved simply by transmitting the position information before the movement of the window portion, the information about the destination of the window, and the difference data at the position of the window portion before the movement. Data can be generated on the client device side.

ここで、ウィンドウ部分の移動前の位置情報としては、ウィンドウ部分の左上端点の座標と右下端点の座標の組み合わせでも良いし、左上端点の座標とウィンドウ部分のサイズ(ウィンドウ部分の水平方向の長さと垂直方向の長さ)の組み合わせでも良い。つまり、ウィンドウ部分の移動前の情報としては、4つの数値データを送信するだけで良い。また、ウィンドウ部分の移動先の情報としては、例えば、移動前のウィンドウ部分の左上端点の座標と移動後のウィンドウ部分の左上端点の座標とを結ぶベクトル、つまり、移動ベクトルを送信すれば良い。つまり、ウィンドウ部分の移動先の情報としては、移動ベクトルの座標値である2つの数値データを送信するだけで良い。   Here, the position information before the movement of the window portion may be a combination of the coordinates of the upper left end point and the coordinates of the lower right end point of the window portion, or the coordinates of the upper left end point and the size of the window portion (the length of the window portion in the horizontal direction). And the length in the vertical direction). That is, it is only necessary to transmit four numerical data as information before the window portion is moved. As the information on the movement destination of the window portion, for example, a vector connecting the coordinates of the upper left end point of the window portion before the movement and the coordinates of the upper left end point of the window portion after the movement, that is, a movement vector may be transmitted. That is, as the information on the movement destination of the window portion, it is only necessary to transmit two numerical data that are coordinate values of the movement vector.

よって、移動後のウィンドウ部分の位置における差分データを送信する代わりに、6つの数値データを送信すれば良いことになり、送信するデータのデータサイズがかなり小さくすることができる。   Therefore, instead of transmitting the difference data at the position of the window portion after movement, it is only necessary to transmit six numerical data, and the data size of the data to be transmitted can be considerably reduced.

しかし、クライアント装置の格納されている画面画像データがYUV422形式であるときには、画面画像データのコピーを行う際に問題が生じる場合がある。YUV422形式のデータは、色差U、Vのデータが水平方向の2画素に対して1つだけである。このため、図4に示すように、YUV422形式の画像データは、水平方向の2画素で1つのグループを形成している。つまり、図4において、輝度Y1に対応する画素は、この輝度Y1と色差U12、V12により再現され、輝度Y2に対応する画素は、この輝度Y2と色差U12、V12により再現されるため、輝度Y1、Y2と色差U12、V12は1つのグループとして、図4に示すような並び順のままでコピーされないと、画像を再現することができない。ここで、図4は、YUV422形式のデータのある水平成分が格納されている様子の一例を示す図である。輝度Yと色差U、Vの格納の順番としては、図4に示すような順番以外にもいろいろと考えられる。   However, when the screen image data stored in the client device is in the YUV422 format, a problem may occur when copying the screen image data. The YUV422 format data includes only one color difference U and V data for two horizontal pixels. For this reason, as shown in FIG. 4, YUV422 format image data forms one group of two horizontal pixels. That is, in FIG. 4, the pixel corresponding to the luminance Y1 is reproduced by the luminance Y1 and the color differences U12 and V12, and the pixel corresponding to the luminance Y2 is reproduced by the luminance Y2 and the color differences U12 and V12. , Y2 and color differences U12 and V12 cannot be reproduced unless they are copied as one group in the arrangement order as shown in FIG. Here, FIG. 4 is a diagram illustrating an example of a state in which a horizontal component having data in the YUV422 format is stored. There are various possible orders for storing the luminance Y and the color differences U and V other than the order shown in FIG.

データの構造が水平方向に2画素で1つのグループになっているため、データを水平方向に偶数画素分だけ離れた位置にコピーするときには問題がないが、データを水平方向に奇数画素分だけ離れた位置にコピーするときに問題が生じる。例えば、図5は、1画素だけ右の画素にコピーした場合を示す図である。このとき、図4に示したデータ構造の場合は、図5に示すように、それぞれのデータが2つとなりの格納領域に書き込まれることになる。Y3はY4が格納されていた箇所に、V34はU34が格納されていた箇所に、Y4はY5が格納されていた箇所に、U34はV56が格納されていた箇所に書き込まれる。   Since the data structure is a group of 2 pixels in the horizontal direction, there is no problem when copying the data to a position separated by an even number of pixels in the horizontal direction, but the data is separated by an odd number of pixels in the horizontal direction. Problems occur when copying to a different location. For example, FIG. 5 is a diagram illustrating a case where only one pixel is copied to the right pixel. At this time, in the case of the data structure shown in FIG. 4, as shown in FIG. 5, each piece of data is written in two storage areas. Y3 is written in the location where Y4 was stored, V34 was written in the location where U34 was stored, Y4 was written in the location where Y5 was stored, and U34 was written in the location where V56 was stored.

格納された画像データを画面表示する際は、格納された画像データを読み出し、RGB形式に変換し直すが、図5のようにコピーされた場合、RGB形式に変換する際に、2つの問題がある。1つの問題は、色差Vが格納されるべき箇所に色差Uが格納され、色差Uが格納されるべき箇所に色差Vが格納されていることである。また、もう1つの問題は、1つのグループに属する色差Uと色差Vがそれぞれ違う画素の情報に基づいて生成されものであることである。よって、図5のようにコピーされた画像データを読み出した場合、再現される画像は、移動前の画像とはかなり異なる、かなり再現性の悪い画像になってしまう。   When the stored image data is displayed on the screen, the stored image data is read out and converted back to the RGB format, but when copied as shown in FIG. 5, there are two problems when converting to the RGB format. is there. One problem is that the color difference U is stored at a location where the color difference V is to be stored, and the color difference V is stored at a location where the color difference U is to be stored. Another problem is that the color difference U and color difference V belonging to one group are generated based on different pixel information. Therefore, when the copied image data is read out as shown in FIG. 5, the reproduced image becomes an image having a considerably poor reproducibility that is considerably different from the image before the movement.

図5は、コピー領域が偶数画素から始まる場合、つまり、グループの最初の画素から始まる場合を示している。しかし、図6に示すように、コピー領域が奇数画素から始まる場合もある。このときも、図6に示すように、奇数画素分だけ離れた位置にコピーする際に上記と同じ問題が生じる。問題が生じるケースを次の表にまとめる。   FIG. 5 shows a case where the copy area starts with an even number of pixels, that is, a case where the copy area starts with the first pixel of the group. However, as shown in FIG. 6, the copy area may start from an odd number of pixels. At this time, as shown in FIG. 6, the same problem as described above occurs when copying to a position separated by an odd number of pixels. Cases where problems occur are summarized in the following table.

Figure 2011040001
Figure 2011040001

奇数画素から始まるコピー領域を偶数画素分だけ離れた場所にコピーするときは、コピー領域の端のグループにおいて、上記とはまた別の問題が生じる。このときは、例えば、差分データなどで書き換えるようにすると良い。   When copying a copy area starting from an odd pixel to a place separated by an even number of pixels, another problem arises in the end group of the copy area. In this case, for example, it may be rewritten with difference data or the like.

このように、ウィンドウ部分の位置情報と移動情報を送信し、移動後のウィンドウ部分の画像データとして、YUV422形式で格納されている移動前のウィンドウ部分の画像データを使用する場合、水平方向のウィンドウ部分の移動が奇数画素分であるときには問題が生じることになる。   As described above, when the position information and the movement information of the window part are transmitted and the image data of the window part before movement stored in the YUV422 format is used as the image data of the window part after movement, the horizontal window A problem arises when the movement of the portion is an odd number of pixels.

しかしながら、特許文献1では、このように、ウィンドウ部分の位置情報と移動情報を送信し、移動後のウィンドウ部分の画像データとして、移動前のウィンドウ部分の画像データを使用する方法に対しては考慮をしていない。   However, in Patent Document 1, consideration is given to a method of transmitting the position information and movement information of the window part and using the image data of the window part before movement as the image data of the window part after movement. Not doing.

そこで本発明は、上記問題点に鑑みてなされたもので、画像の再現性を損なうことなく画像データのコピーを行う画像処理装置、画像処理方法及びプログラムを提供することを目的とする。   SUMMARY An advantage of some aspects of the invention is that it provides an image processing apparatus, an image processing method, and a program for copying image data without impairing image reproducibility.

上記課題を解決するため、本発明における画像処理装置は、複数のグループにより構成される画像データを格納する格納手段と、前記複数のグループそれぞれに対するフラグを保存するフラグ保存手段と、前記格納手段に格納された画像データの一部分を異なる格納位置にコピーするコピー手段と、を有し、前記コピー手段は、前記格納手段により格納された画像データの一部分を水平方向に奇数画素だけ離れた格納位置にコピーする際に、当該コピーされる画像データの一部分に含まれるグループそれぞれに対するフラグに基づき、当該グループそれぞれのコピーを行うことを特徴とする。   In order to solve the above problems, an image processing apparatus according to the present invention includes a storage unit that stores image data including a plurality of groups, a flag storage unit that stores a flag for each of the plurality of groups, and a storage unit. Copy means for copying a part of the stored image data to a different storage position, and the copy means at a storage position separated by an odd number of pixels in the horizontal direction from a part of the image data stored by the storage means. When copying, each group is copied based on a flag for each group included in a part of the image data to be copied.

また、本発明における画像処理方法は、複数のグループにより構成される画像データを格納する格納ステップと、前記複数のグループそれぞれに対するフラグを保存するフラグ保存ステップと、前記格納ステップに格納された画像データの一部分を異なる格納位置にコピーするコピーステップと、を有し、前記コピーステップは、前記格納ステップにより格納された画像データの一部分を水平方向に奇数画素だけ離れた格納位置にコピーする際に、当該コピーされる画像データの一部分に含まれるグループそれぞれに対するフラグに基づき、当該グループそれぞれのコピーを行うことを特徴とする。   The image processing method according to the present invention includes a storage step of storing image data composed of a plurality of groups, a flag storage step of storing a flag for each of the plurality of groups, and the image data stored in the storage step A copy step of copying a portion of the image data to a different storage location, wherein the copy step copies a portion of the image data stored by the storage step to a storage location separated by an odd number of pixels in the horizontal direction. Each group is copied based on a flag for each group included in a part of the image data to be copied.

また、本発明におけるプログラムは、画像処理装置を、複数のグループにより構成される画像データを格納する格納手段と、前記複数のグループそれぞれに対するフラグを保存するフラグ保存手段と、前記格納手段に格納された画像データの一部分を異なる格納位置にコピーするコピー手段として機能させ、前記コピー手段は、前記格納手段により格納された画像データの一部分を水平方向に奇数画素だけ離れた格納位置にコピーする際に、当該コピーされる画像データの一部分に含まれるグループそれぞれに対するフラグに基づき、当該グループそれぞれのコピーを行うことを特徴とする。   The program according to the present invention is stored in the image processing apparatus in storage means for storing image data composed of a plurality of groups, flag storage means for storing a flag for each of the plurality of groups, and the storage means. A copy unit that copies a part of the image data to a different storage position, and the copy unit copies a part of the image data stored by the storage unit to a storage position that is separated by an odd number of pixels in the horizontal direction. Further, each group is copied based on a flag for each group included in a part of the image data to be copied.

本発明により、画像の再現性を損なうことなく画像データのコピーを行うことができる。   According to the present invention, image data can be copied without impairing image reproducibility.

ウィンドウ部分の移動を説明する図である。It is a figure explaining the movement of a window part. ウィンドウ部分の移動の際の差分データの領域を示す図である。It is a figure which shows the area | region of the difference data at the time of the movement of a window part. ウィンドウ部分の移動において、移動ベクトルを使用する際の差分データの領域を示す図である。It is a figure which shows the area | region of the difference data at the time of using a movement vector in the movement of a window part. YUV422形式のデータの水平方向の並び順を示す図である。It is a figure which shows the arrangement order of the horizontal direction of the data of a YUV422 format. YUV422形式のデータを1画素だけとなりにコピーする処理を説明する図である。It is a figure explaining the process which copies the data of a YUV422 format only to 1 pixel. YUV422形式のデータを1画素だけとなりにコピーする処理を説明する図である。It is a figure explaining the process which copies the data of a YUV422 format only to 1 pixel. 本発明の実施形態に係る画像処理装置の構成を示す図である。It is a figure which shows the structure of the image processing apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る画像処理装置における処理動作を説明する図である。It is a figure explaining the processing operation in the image processing apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る画像処理装置における処理動作を説明する図である。It is a figure explaining the processing operation in the image processing apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る画像処理装置における処理を説明する図である。It is a figure explaining the process in the image processing apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る画像処理装置における処理動作を説明する図である。It is a figure explaining the processing operation in the image processing apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る画像処理装置における処理動作を説明する図である。It is a figure explaining the processing operation in the image processing apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る画像処理装置における処理動作を説明する図である。It is a figure explaining the processing operation in the image processing apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る画像処理装置における処理動作を説明する図である。It is a figure explaining the processing operation in the image processing apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る画像処理装置における処理動作を説明する図である。It is a figure explaining the processing operation in the image processing apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る画像処理装置における処理動作を説明する図である。It is a figure explaining the processing operation in the image processing apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る画像処理装置における処理動作を説明する図である。It is a figure explaining the processing operation in the image processing apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る画像処理装置における処理を説明する図である。It is a figure explaining the process in the image processing apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る画像処理装置における処理を説明する図である。It is a figure explaining the process in the image processing apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る画像処理装置における処理を説明する図である。It is a figure explaining the process in the image processing apparatus which concerns on embodiment of this invention.

次に、本発明を実施するための形態について図面を参照して詳細に説明する。   Next, embodiments for carrying out the present invention will be described in detail with reference to the drawings.

図7は、本発明の実施形態に係る画像処理装置の構成を示す図である。制御部1とフレームバッファ2とフラグメモリ3により構成される。上記のクライアントサーバシステムにおけるクライアント装置は、このような画像処理装置を備えているとする。   FIG. 7 is a diagram showing the configuration of the image processing apparatus according to the embodiment of the present invention. The controller 1, the frame buffer 2, and the flag memory 3 are configured. It is assumed that the client device in the client server system includes such an image processing device.

フレームバッファ2は、画像データを格納している。つまり、フレームバッファ2は、画像データを格納する格納手段として機能する。例えば、図4に示すように、YUV422形式の画像データが格納している。上記のクライアントサーバシステムにおけるクライアント装置の場合は、サーバ装置から送信されてきた画像データをこのフレームバッファ2に格納している。   The frame buffer 2 stores image data. That is, the frame buffer 2 functions as a storage unit that stores image data. For example, as shown in FIG. 4, image data in the YUV422 format is stored. In the case of the client device in the client server system, image data transmitted from the server device is stored in the frame buffer 2.

制御部1は、このフレームバッファ2に格納された画像データのコピーなどの処理を実行する。つまり、制御部1は、画像データのコピーを行うコピー手段として機能する。フラグメモリ3は、制御部1が画像データのコピーの処理を行う際に、参照するフラグを保存している。つまり、フラグを保存するフラグ保存手段として機能する。このフラグは、フレームバッファ2に格納されたYUV422形式の画像データを構成する2画素のグループそれぞれに用意されている。制御部1は、フレームバッファ2に格納されたYUV422形式の画像データをコピーする際に、コピーを行うグループに対するフラグを確認し、確認されたフラグに対応したルールに従い、コピーの処理を行う。   The control unit 1 executes processing such as copying of image data stored in the frame buffer 2. That is, the control unit 1 functions as a copy unit that copies image data. The flag memory 3 stores a flag to be referred to when the control unit 1 performs image data copy processing. That is, it functions as a flag storage unit that stores a flag. This flag is prepared for each group of two pixels constituting the image data in the YUV422 format stored in the frame buffer 2. When copying the image data in the YUV422 format stored in the frame buffer 2, the control unit 1 checks the flag for the group to be copied, and performs the copy process according to the rule corresponding to the checked flag.

フラグメモリ3が保存するフラグの種類としては、いろいろと考えられるが、ここでは、まず、フラグは2種類である場合を考える。つまり、フラグメモリ3に保存されるフラグが1ビットである場合を考える。このとき、フラグメモリ3には、0bか1bかを示すフラグを保存される。   There are various types of flags stored in the flag memory 3. Here, first, consider the case where there are two types of flags. That is, consider a case where the flag stored in the flag memory 3 is 1 bit. At this time, the flag memory 3 stores a flag indicating 0b or 1b.

ここで、図4に示すように、正しい順番で並んでいるグループに対するフラグは0bであるようにする。   Here, as shown in FIG. 4, the flag for the groups arranged in the correct order is set to 0b.

次に、フラグメモリ3に保存されたフラグが0bであるときに対応したルールを決める。ここでは、例えば、フラグメモリ3に保存されたフラグが0bであるグループのデータを奇数画素分だけ離れた位置にコピーするときは、常に、グループの左側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行うことにする。   Next, a rule corresponding to when the flag stored in the flag memory 3 is 0b is determined. Here, for example, when copying the data of the group whose flag is stored in the flag memory 3 to a position separated by an odd number of pixels, the luminance Y on the left side of the group and the pixel corresponding to the luminance Y are always obtained. The data is copied so that the color differences U and V related to the same group are included.

図8は、フラグが0bであるグループ、つまり、正しい順番に並んだグループを、右に1画素だけとなりにコピーを行った場合を示しており、図9は、フラグが0bであるグループ、つまり、正しい順番に並んだデータを、左に1画素だけとなりにコピーを行った場合を示している。   FIG. 8 shows a case where a group whose flag is 0b, that is, a group arranged in the correct order, is copied with only one pixel on the right, and FIG. 9 is a group whose flag is 0b, This shows a case where data arranged in the correct order is copied with only one pixel on the left.

例えば、図8では、フラグが0bであるグループ1〜4のデータが右に1画素だけとなりにコピーされている。このとき、各グループの左側の輝度Yは、各グループの右側の輝度Yの位置にコピーされる。つまり、右に1画素だけとなりにコピーする際は、グループの左側の輝度Yは、コピー後も属するグループが変わらない。このため、上記のルールに従い、コピーの処理を行う場合は、U、Vは特に書き換える必要はない。つまり、図7に示すように、色差V12の位置には、コピー後も、そのまま色差V12が格納される。   For example, in FIG. 8, the data of groups 1 to 4 whose flag is 0b is copied to the right by only one pixel. At this time, the luminance Y on the left side of each group is copied to the position of the luminance Y on the right side of each group. That is, when copying with only one pixel to the right, the luminance Y on the left side of the group does not change even after copying. Therefore, U and V do not need to be rewritten when copying is performed according to the above rules. That is, as shown in FIG. 7, the color difference V12 is stored at the position of the color difference V12 as it is after copying.

図8に示すように、フラグが0bであるグループ1〜4のデータを右に1画素だけとなりにコピーすると、グループ1〜5において、データが正しい順番でなくなる。しかし、図5に示した場合と異なり、コピー後も、色差Uは色差Uの格納されるべき位置に格納され、色差Vは色差Vの格納されるべき位置に格納され、1つのグループに属する色差Uと色差Vが同じ画素の情報に基づいて生成されものになるようにコピーが行われている。このため、図5のようにコピーした場合に生じる2つの問題は解消している。   As shown in FIG. 8, when the data of groups 1 to 4 whose flag is 0b is copied to the right by only one pixel, the data is not in the correct order in groups 1 to 5. However, unlike the case shown in FIG. 5, even after copying, the color difference U is stored in the position where the color difference U should be stored, and the color difference V is stored in the position where the color difference V should be stored, and belongs to one group. Copying is performed so that the color difference U and the color difference V are generated based on the same pixel information. For this reason, two problems that occur when copying as shown in FIG. 5 are solved.

コピー後のグループ2〜4では、左側の輝度Yに対応する画素と色差U、Vの関係する画素が異なるという問題は残る。しかし、YUV422形式では、画像を再現する際に、輝度Yが一番重要である。色差U、Vに関しては、色差Uと色差Vがそれぞれの格納されるべき位置に格納されており、1つのグループに属する色差Uと色差Vが同じ画素の情報に基づいて生成されものになっていれば、画像の再現の際にそれほど問題にはならない。このため、グループ2〜4に関しては、データの並び順が画像の再現性の高い並び順になっている。ただし、正しい順番にはなっていないことを示すために、グループ2〜4のフラグは0bから1bに書き換えることにする。   In the groups 2 to 4 after copying, there remains a problem that the pixels corresponding to the luminance Y on the left side and the pixels related to the color differences U and V are different. However, in the YUV422 format, the luminance Y is the most important when reproducing an image. Regarding the color differences U and V, the color difference U and the color difference V are stored in the respective storage positions, and the color difference U and the color difference V belonging to one group are generated based on the information of the same pixel. If so, it will not be a problem when reproducing the image. For this reason, with respect to groups 2 to 4, the data arrangement order is an arrangement order with high image reproducibility. However, in order to show that the order is not correct, the flags of groups 2 to 4 are rewritten from 0b to 1b.

コピー後のコピー領域の両端にあたるグループ1とグループ5では、輝度Yの順番が正しくなくなってしまっているため、元の画像とかなり異なったものになってしまう可能性が高い。このため、コピー領域の両端においては、例えば、両端に対する差分データをサーバ装置から送信するようにして、この差分データにより書き換えるようにする。図10は、コピー領域の両端のグループのデータを差分データにより書き換えたときのデータを示す図である。このとき、コピー領域の両端に関しては、書き換えられたデータは正しい順番で並んでいるため、フラグは0bのままにしておくことにする。   In Group 1 and Group 5 corresponding to both ends of the copy area after copying, the order of the luminance Y is not correct, so there is a high possibility that it will be quite different from the original image. Therefore, at both ends of the copy area, for example, difference data for both ends is transmitted from the server device, and rewritten by this difference data. FIG. 10 is a diagram illustrating data when the data of the groups at both ends of the copy area is rewritten with the difference data. At this time, since the rewritten data is arranged in the correct order at both ends of the copy area, the flag is set to 0b.

図9では、フラグが0bであるグループ2〜5のデータが左に1画素だけとなりにコピーされている。このとき、グループ2の左側の輝度Y3は、グループ1の右側の輝度Y2の位置にコピーされる。つまり、左に1画素だけとなりにコピーする際は、グループの左側の輝度Yがコピーされるグループが変わる。このため、上記のルールに従い、コピーの処理を行う場合は、U、Vはそれぞれ一つ左のグループにコピーされることになる。   In FIG. 9, the data of groups 2 to 5 whose flag is 0b are copied to the left with only one pixel. At this time, the luminance Y3 on the left side of the group 2 is copied to the position of the luminance Y2 on the right side of the group 1. That is, when copying with only one pixel on the left, the group to which the luminance Y on the left side of the group is copied changes. Therefore, when copying is performed according to the above rules, U and V are each copied to the left group.

図9においても、図8と同様に、コピー領域のうち、両端のグループ以外のグループは、データの並び順が画像の再現性の高い並び順になっている。そこで、図8と同様に、コピー領域のうち、両端のグループ以外のグループに対するフラグは0bから1bに書き換える。また、図9においても、コピー領域の両端のグループはデータの並び順が再現性の悪い並び順になっているため、例えば、差分データなどで書き換えることにし、フラグを0bのままにしておくことにする。   Also in FIG. 9, as in FIG. 8, in the copy area, groups other than the groups at both ends have the data arranged in an order of high image reproducibility. Therefore, as in FIG. 8, the flags for the groups other than the groups at both ends in the copy area are rewritten from 0b to 1b. Also in FIG. 9, since the groups at both ends of the copy area are in a data reordering order with poor reproducibility, for example, rewriting with difference data or the like is performed and the flag is left at 0b. To do.

3以上の奇数画素分だけ離れた位置へのコピーは、図8、9に示したように、1画素だけとなりの画素にコピーした後に、さらに、偶数画素分だけ離れた位置にコピーすることにより行うことができる。偶数画素分だけ離れた位置にコピーする際は、グループがそのままコピーされるため、グループ内でのデータの並び順はコピー前後で変化がしない。よって、フラグが0bであるグループを3以上の奇数画素分だけ離れた位置にコピーした場合も、コピー領域のうち、両端のグループ以外のグループは、図8、9におけるグループ2〜3と同じ並び順になる。そして、コピー領域の両端のグループのデータの並び順は、再現性の悪い並び順になる。そこで、図8、9の場合と同様に、コピー領域のうち、両端のグループ以外のグループに対するフラグは0bから1bに書き換え、コピー領域の両端のグループは、例えば、差分データなどで書き換えることにし、フラグを0bにすることにする。   As shown in FIGS. 8 and 9, copying to a position separated by an odd pixel of 3 or more is performed by copying to a pixel that is only one pixel and then copying to a position separated by an even number of pixels as shown in FIGS. It can be carried out. When copying to a position separated by an even number of pixels, the group is copied as it is, so the data arrangement order in the group does not change before and after copying. Therefore, even when the group having the flag 0b is copied to a position separated by an odd pixel of 3 or more, the groups other than the groups at both ends in the copy area are the same as the groups 2 to 3 in FIGS. In order. Then, the arrangement order of the data of the groups at both ends of the copy area is an arrangement order with poor reproducibility. Therefore, as in FIGS. 8 and 9, the flags for the groups other than the groups at both ends in the copy area are rewritten from 0b to 1b, and the groups at both ends of the copy area are rewritten with, for example, difference data, The flag is set to 0b.

図8、9に示すように、フラグが1bに書き換えられたグループに属する色差U、Vは、右側の輝度Yに対応する画素に関係する色差である。この並び順であるグループが奇数画素分だけ離れた位置にコピーされると、グループの右側の輝度Yは、グループの左側の位置にコピーされる。よって、このコピーの際に、グループの右側の輝度Yとこの輝度Yに対応する画素に関係する色差が同じグループになるようにコピーすることにすると、正しい順番に戻るはずである。   As shown in FIGS. 8 and 9, the color differences U and V belonging to the group whose flag is rewritten to 1b are color differences related to the pixel corresponding to the luminance Y on the right side. When the group in the arrangement order is copied to a position separated by an odd number of pixels, the luminance Y on the right side of the group is copied to the left side of the group. Therefore, when copying is performed so that the luminance Y on the right side of the group and the color difference related to the pixel corresponding to the luminance Y are in the same group, the order should return to the correct order.

そこで、フラグメモリ3に保存されたフラグが1bであるグループのデータを、奇数画素分だけ離れた位置にコピーするときは、常に、グループの右側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行うことにする。   Therefore, when copying the data of the group whose flag is 1b stored in the flag memory 3 to a position separated by an odd number of pixels, there is always a relationship between the luminance Y on the right side of the group and the pixel corresponding to this luminance Y. The data is copied so that the color differences U and V to be in the same group.

例えば、図11は、図9の状態にあるデータを、右に1画素だけとなりにコピーした場合と、左に1画素だけとなりにコピーした場合を示している。図11に示すように、コピー領域のうち、両端のグループ以外のグループは、正しい順番でデータが並んでいる。また、コピー領域の両端のグループのデータの並び順は再現性の悪い並び順になっている。よって、コピー領域のうち、両端のグループ以外のグループに対するフラグは、1bから0bに書き換え、コピー領域の両端のグループは、例えば、差分データなどで書き換えることにし、フラグを0bにすることにする。   For example, FIG. 11 shows a case where data in the state of FIG. 9 is copied with only one pixel on the right and a case where data is copied with only one pixel on the left. As shown in FIG. 11, in the copy area, data other than the groups at both ends are arranged in the correct order. In addition, the arrangement order of the data of the groups at both ends of the copy area is an arrangement order with poor reproducibility. Therefore, the flags for the groups other than the groups at both ends in the copy area are rewritten from 1b to 0b, and the groups at both ends of the copy area are rewritten with, for example, difference data, and the flag is set to 0b.

図9の状態にあるデータの、3以上の奇数画素分だけ離れた位置へのコピーは、図11に示したように、1画素だけとなりの画素にコピーした後に、さらに、偶数画素分だけ離れた位置にコピーすることにより行うことができる。偶数画素分だけ離れた位置にコピーする際は、グループがそのままコピーされるため、グループ内でのデータの並び順はコピー前後で変化がしない。よって、図9の状態にあるデータを、3以上の奇数画素分だけ離れた位置にコピーした場合も、コピー領域のうち、両端のグループ以外のグループのデータが正しい並び順になり、コピー領域の両端のグループのデータの並び順は再現性の悪い並び順になる。よって、このときも、コピー領域のうち、両端のグループ以外のグループに対するフラグは、1bから0bに書き換え、コピー領域の両端のグループは、例えば、差分データなどで書き換えることにし、フラグを0bにすることにする。   Copying the data in the state of FIG. 9 to a position separated by an odd pixel of 3 or more is copied to a pixel that is only one pixel as shown in FIG. This can be done by copying to a different location. When copying to a position separated by an even number of pixels, the group is copied as it is, so the data arrangement order in the group does not change before and after copying. Therefore, even when the data in the state of FIG. 9 is copied to a position separated by an odd number of pixels of 3 or more, the data of the groups other than the groups at both ends in the copy area are in the correct order, and both ends of the copy area The arrangement order of the data of the group is an order of poor reproducibility. Therefore, also in this case, the flags for the groups other than the groups at both ends in the copy area are rewritten from 1b to 0b, and the groups at both ends of the copy area are rewritten with, for example, difference data, and the flag is set to 0b. I will decide.

このように、グループの並び順を示すフラグを2種類用意し、(1)フラグが0bであるグループのデータを奇数画素分だけ離れた位置にコピーするときは、常に、グループの左側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行い、フラグを0bから1bに書き換え、(2)フラグが1bであるグループのデータを奇数画素分だけ離れた位置にコピーするときは、常に、グループの右側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行い、フラグを1bから0bに書き換えることにより、正しい順番に並んだデータを、奇数画素分だけ離れた位置にコピーしたときも、画像の再現性の高いまま、画像データのコピーを行うことができる。また、正しい順番に並んだデータを、奇数画素分だけ離れた位置にコピーする処理を2回行うと、データが正しい並び順に戻るので、コピー処理を何度か繰り返しても画質が劣化することがなくなる。   In this way, two types of flags indicating the arrangement order of groups are prepared. (1) When copying data of a group whose flag is 0b to a position separated by an odd number of pixels, the luminance Y on the left side of the group is always set. And copy the data so that the color differences U and V related to the pixel corresponding to the luminance Y are in the same group, rewrite the flag from 0b to 1b, and (2) change the data of the group whose flag is 1b to odd pixels When copying to a position separated by an amount, the data is always copied so that the luminance Y on the right side of the group and the color differences U and V related to the pixels corresponding to this luminance Y are in the same group, and the flag is set to 1b. By rewriting from 0 to 0b, image data can be copied with high image reproducibility even when data arranged in the correct order is copied to a position separated by an odd number of pixels. It is possible. In addition, if the data arranged in the correct order is copied twice to a position separated by an odd number of pixels, the data returns to the correct order, so that the image quality may deteriorate even if the copy process is repeated several times. Disappear.

なお、(1)フラグが0bであるグループのデータを奇数画素分だけ離れた位置にコピーするときは、常に、グループの右側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行い、フラグを0bから1bに書き換え、(2)フラグが1bであるグループのデータを奇数画素分だけ離れた位置にコピーするときは、常に、グループの左側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行い、フラグを1bから0bに書き換えるようにしても良い。   It should be noted that (1) when copying the data of the group whose flag is 0b to a position separated by an odd number of pixels, always the luminance Y on the right side of the group and the color differences U and V related to the pixel corresponding to this luminance Y Are copied so that they become the same group, the flag is rewritten from 0b to 1b, and (2) when copying the data of the group whose flag is 1b to a position separated by an odd number of pixels, always Data may be copied so that the left luminance Y and the color differences U and V related to the pixel corresponding to the luminance Y are in the same group, and the flag may be rewritten from 1b to 0b.

次に、フラグは3種類である場合を考える。つまり、フラグメモリ3に保存されるフラグが2ビットである場合を考える。このとき、フラグメモリ3には、例えば、00bか01bか10bかを示すフラグを保存されるようにすると良い。   Next, consider a case where there are three types of flags. That is, consider a case where the flag stored in the flag memory 3 is 2 bits. At this time, for example, a flag indicating 00b, 01b, or 10b may be stored in the flag memory 3.

ここで、図4に示すように、正しい順番で並んでいるグループに対するフラグは00bであるようにする。   Here, as shown in FIG. 4, the flag for the groups arranged in the correct order is set to 00b.

フラグメモリ3に保存されたフラグが00bであるグループを、右に奇数画素分だけ離れた位置にコピーするときは、常に、グループの右側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行うことにする。例えば、図12は、正しい順番に並んだデータを、右に1画素だけとなりにコピーを行った場合を示している。図12では、フラグが2種類のときと同様に、コピー領域のうち、両端のグループ以外のグループのデータが画像の再現性の良い並び順になり、コピー領域の両端のグループのデータの並び順は再現性の悪い並び順になる。しかし、コピー領域のうち、両端のグループ以外のグループのデータも正しい順番には並んでいなので、フラグを00bから01bに書き換えることにする。また、コピー領域の両端のグループは、このときも、例えば、差分データなどで書き換えることにし、フラグを00bのままにしておくことにする。   When copying a group having the flag 00b stored in the flag memory 3 to the right by an odd number of pixels, the difference between the luminance Y on the right side of the group and the pixel corresponding to the luminance Y is always obtained. Data is copied so that U and V are in the same group. For example, FIG. 12 shows a case where data arranged in the correct order is copied with only one pixel on the right. In FIG. 12, as in the case of the two types of flags, the data of the groups other than the groups at both ends in the copy area are arranged in order of good image reproducibility, and the order of the data of the groups at both ends of the copy area is The order is poorly reproducible. However, since data in groups other than the groups at both ends in the copy area are not arranged in the correct order, the flag is rewritten from 00b to 01b. Also, at this time, the groups at both ends of the copy area are rewritten with, for example, difference data, and the flag is left at 00b.

右に3以上の奇数画素分だけ離れた位置へのコピーは、図12に示したように、右に1画素だけとなりの画素にコピーした後に、さらに、右に偶数画素分だけ離れた位置にコピーすることにより行うことができる。偶数画素分だけ離れた位置にコピーする際は、グループがそのままコピーされるため、グループ内でのデータの並び順はコピー前後で変化がしない。よって、フラグが00bであるグループを右に3以上の奇数画素分だけ離れた位置にコピーした場合も、コピー領域のうち、両端のグループ以外のグループのデータが画像の再現性の良い並び順になり、コピー領域の両端のグループのデータの並び順は再現性の悪い並び順になる。よって、図12の場合と同様に、コピー領域のうち、両端のグループ以外のグループのフラグを00bから01bに書き換え、コピー領域の両端のグループは、このときも、例えば、差分データなどで書き換えることにし、フラグを00bにすることにする。   As shown in FIG. 12, the copy to the position separated by an odd number of pixels of 3 or more on the right is performed after copying to a pixel that is only one pixel on the right, and further to the position separated by an even number of pixels on the right. This can be done by copying. When copying to a position separated by an even number of pixels, the group is copied as it is, so the data arrangement order in the group does not change before and after copying. Therefore, even when a group with the flag 00b is copied to the right by an odd number of pixels of 3 or more, the data in groups other than the groups at both ends in the copy area are arranged in a sequence with good image reproducibility. The arrangement order of the data of the groups at both ends of the copy area is an order of poor reproducibility. Accordingly, as in the case of FIG. 12, the flags of the groups other than the groups at both ends in the copy area are rewritten from 00b to 01b, and the groups at both ends of the copy area are also rewritten with, for example, difference data, etc. And the flag is set to 00b.

フラグメモリ3に保存されたフラグが00bであるグループを、左に奇数画素分だけ離れた位置にコピーするときは、常に、グループの左側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行うことにする。例えば、図13は、正しい順番に並んだデータを、左に1画素だけとなりにコピーを行った場合を示している。図13でも、フラグが2種類のときと同様に、コピー領域のうち、両端のグループ以外のグループのデータが画像の再現性の良い並び順になり、コピー領域の両端のグループのデータの並び順は再現性の悪い並び順になる。しかし、コピー領域のうち、両端のグループ以外のグループのデータも正しい順番には並んでいない。また、図12におけるコピー領域のうち、両端のグループ以外のグループのデータの並び順とも違う。よって、このときは、コピー領域のうち、両端のグループ以外のグループのフラグを00bから10bに書き換えることにする。また、コピー領域の両端のグループは、このときも、例えば、差分データなどで書き換えることにし、フラグを00bのままにしておくことにする。   When copying a group in which the flag stored in the flag memory 3 is 00b to a position left by an odd number of pixels to the left, the color difference relating to the luminance Y on the left side of the group and the pixel corresponding to the luminance Y is always obtained. Data is copied so that U and V are in the same group. For example, FIG. 13 shows a case where data arranged in the correct order is copied with only one pixel on the left. In FIG. 13, as in the case of the two types of flags, the data in the groups other than the groups at both ends in the copy area is in an order in which image reproducibility is good, and the data in the groups at both ends in the copy area is The order is poorly reproducible. However, data in groups other than the groups at both ends in the copy area are not arranged in the correct order. Also, the arrangement order of data of groups other than the groups at both ends in the copy area in FIG. 12 is different. Therefore, at this time, the flags of the groups other than the groups at both ends in the copy area are rewritten from 00b to 10b. Also, at this time, the groups at both ends of the copy area are rewritten with, for example, difference data, and the flag is left at 00b.

左に3以上の奇数画素分だけ離れた位置へのコピーは、図13に示したように、左に1画素だけとなりの画素にコピーした後に、さらに、左に偶数画素分だけ離れた位置にコピーすることにより行うことができる。偶数画素分だけ離れた位置にコピーする際は、グループがそのままコピーされるため、グループ内でのデータの並び順はコピー前後で変化がしない。よって、フラグが00bであるグループを左に3以上の奇数画素分だけ離れた位置にコピーした場合も、コピー領域のうち、両端のグループ以外のグループのデータが画像の再現性の良い並び順になり、コピー領域の両端のグループのデータの並び順は再現性の悪い並び順になる。よって、図13の場合と同様に、コピー領域のうち、両端のグループ以外のグループのフラグを00bから10bに書き換え、コピー領域の両端のグループは、このときも、例えば、差分データなどで書き換えることにし、フラグを00bにすることにする。   As shown in FIG. 13, the copy to the position left by an odd pixel of 3 or more on the left is performed after copying to the pixel that is only one pixel on the left, and further to the position separated by an even pixel on the left. This can be done by copying. When copying to a position separated by an even number of pixels, the group is copied as it is, so the data arrangement order in the group does not change before and after copying. Therefore, even when a group with the flag 00b is copied to the left by a distance of 3 or more odd pixels, the data of the groups other than the groups at both ends in the copy area are arranged in order of good image reproducibility. The arrangement order of the data of the groups at both ends of the copy area is an order of poor reproducibility. Therefore, as in the case of FIG. 13, the flags of the groups other than the groups at both ends in the copy area are rewritten from 00b to 10b, and the groups at both ends of the copy area are also rewritten with, for example, difference data, etc. And the flag is set to 00b.

図12に示すように、フラグが01bに書き換えられたグループに属する色差U、Vは、左側の輝度Yに対応する画素に関係する色差である。この並び順であるグループが奇数画素分だけ離れた位置にコピーされると、グループの左側の輝度Yは、グループの右側の位置にコピーされる。そこで、このときに、グループの左側の輝度Yとこの輝度Yに対応する画素に関係する色差が同じグループになるようにコピーすることにすると、正しい順番に戻るはずである。   As shown in FIG. 12, the color differences U and V belonging to the group whose flag is rewritten to 01b are color differences related to the pixel corresponding to the luminance Y on the left side. When the group in the arrangement order is copied to a position separated by an odd number of pixels, the luminance Y on the left side of the group is copied to the right side of the group. Therefore, if copying is performed so that the luminance Y on the left side of the group and the color difference related to the pixel corresponding to the luminance Y are in the same group, the order should return to the correct order.

そこで、フラグメモリ3に保存されたフラグが01bであるグループを、奇数画素分だけ離れた位置にコピーするときは、常に、グループの左側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行うことにする。   Therefore, when a group having the flag 01b stored in the flag memory 3 is copied to a position separated by an odd number of pixels, the luminance Y on the left side of the group and the color difference related to the pixel corresponding to the luminance Y are always obtained. Data is copied so that U and V are in the same group.

例えば、図14は、フラグが01bであるグループを、右に1画素だけとなりにコピーを行った場合を示しており、図15は、フラグが01bであるグループを、左に1画素だけとなりにコピーを行った場合を示している。図14、15により示すように、コピー領域のうち、両端のグループ以外のグループは、正しい順番でデータが並んでいる。また、コピー領域の両端のグループのデータの並び順は再現性の悪い並び順になっている。よって、コピー領域のうち、両端のグループ以外のグループに対するフラグは、01bから00bに書き換え、コピー領域の両端のグループは、例えば、差分データなどで書き換えることにし、フラグを00bのままにしておくことにする。   For example, FIG. 14 shows a case in which a group having a flag of 01b is copied with only one pixel on the right, and FIG. 15 is a group having a flag of 01b with only one pixel on the left. The case where copying was performed is shown. As shown in FIGS. 14 and 15, in the copy area, data other than the groups at both ends are arranged in the correct order. In addition, the arrangement order of the data of the groups at both ends of the copy area is an arrangement order with poor reproducibility. Therefore, the flags for the groups other than the groups at both ends in the copy area are rewritten from 01b to 00b, and the groups at both ends of the copy area are rewritten with, for example, difference data, and the flag is left as 00b. To.

3以上の奇数画素分だけ離れた位置へのコピーは、図14、15に示したように、1画素だけとなりの画素にコピーした後に、さらに、偶数画素分だけ離れた位置にコピーすることにより行うことができる。偶数画素分だけ離れた位置にコピーする際は、グループがそのままコピーされるため、グループ内でのデータの並び順はコピー前後で変化がしない。よって、フラグが01bであるグループを3以上の奇数画素分だけ離れた位置にコピーした場合も、コピー領域のうち、両端のグループ以外のグループのデータが正しい並び順になり、コピー領域の両端のグループのデータの並び順は再現性の悪い並び順になる。よって、図14、15の場合と同様に、コピー領域のうち、両端のグループ以外のグループのフラグを01bから00bに書き換え、コピー領域の両端のグループは、このときも、例えば、差分データなどで書き換えることにし、フラグを00bにすることにする。   As shown in FIGS. 14 and 15, copying to a position separated by an odd pixel of 3 or more is performed by copying to a pixel that is only one pixel and then copying to a position separated by an even number of pixels. It can be carried out. When copying to a position separated by an even number of pixels, the group is copied as it is, so the data arrangement order in the group does not change before and after copying. Therefore, even when a group whose flag is 01b is copied to a position separated by an odd number of pixels equal to or greater than 3, the data of the groups other than the groups at both ends in the copy area are in the correct arrangement order, and the groups at both ends of the copy area The data is arranged in a poorly reproducible order. Therefore, as in the case of FIGS. 14 and 15, the flags of the groups other than the groups at both ends in the copy area are rewritten from 01b to 00b. The flag is changed to 00b.

図13に示すように、フラグが10bに書き換えられたグループに属する色差U、Vは、右側の輝度Yに対応する画素に関係する色差である。この並び順であるグループが奇数画素分だけ離れた位置にコピーされると、グループの右側の輝度Yは、グループの左側の位置にコピーされる。そこで、このときに、グループの右側の輝度Yとこの輝度Yに対応する画素に関係する色差が同じグループになるようにコピーすることにすると、正しい順番に戻るはずである。   As shown in FIG. 13, the color differences U and V belonging to the group whose flag is rewritten to 10b are color differences related to the pixel corresponding to the right luminance Y. When the group in the arrangement order is copied to a position separated by an odd number of pixels, the luminance Y on the right side of the group is copied to the left side of the group. Therefore, if copying is performed so that the luminance Y on the right side of the group and the color difference related to the pixel corresponding to the luminance Y are in the same group, the order should return to the correct order.

そこで、フラグメモリ3に保存されたフラグが10bであるグループを、奇数画素分だけ離れた位置にコピーするときは、常に、グループの右側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行うことにする。   Therefore, when a group having the flag 10b stored in the flag memory 3 is copied to a position separated by an odd number of pixels, the luminance Y on the right side of the group and the color difference related to the pixel corresponding to the luminance Y are always obtained. Data is copied so that U and V are in the same group.

例えば、図16は、フラグが10bであるグループを、右に1画素だけとなりにコピーを行った場合を示しており、図17は、フラグが10bであるグループを、左に1画素だけとなりにコピーを行った場合を示している。図16、17により示すように、コピー領域のうち、両端のグループ以外のグループは、正しい順番でデータが並んでいる。また、コピー領域の両端のグループのデータの並び順は画像の再現性の悪い並び順になっている。よって、コピー領域のうち、両端のグループ以外のグループに対するフラグは、10bから00bに書き換え、コピー領域の両端のグループは、例えば、差分データなどで書き換えることにし、フラグを00bのままにしておくことにする。   For example, FIG. 16 shows a case in which a group with a flag of 10b is copied to the right with only one pixel, and FIG. 17 shows a group with a flag of 10b to have only one pixel on the left. The case where copying was performed is shown. As shown in FIGS. 16 and 17, in the copy area, data other than the groups at both ends are arranged in the correct order. Also, the arrangement order of the data of the groups at both ends of the copy area is an arrangement order with poor image reproducibility. Therefore, the flags for the groups other than the groups at both ends in the copy area are rewritten from 10b to 00b, and the groups at both ends of the copy area are rewritten with, for example, difference data, and the flag is left as 00b. To.

3以上の奇数画素分だけ離れた位置へのコピーは、図16、17に示したように、1画素だけとなりの画素にコピーした後に、さらに、偶数画素分だけ離れた位置にコピーすることにより行うことができる。偶数画素分だけ離れた位置にコピーする際は、グループがそのままコピーされるため、グループ内でのデータの並び順はコピー前後で変化がしない。よって、フラグが10bであるグループを3以上の奇数画素分だけ離れた位置にコピーした場合も、コピー領域のうち、両端のグループ以外のグループのデータが正しい並び順になり、コピー領域の両端のグループのデータの並び順は再現性の悪い並び順になる。よって、図16、17の場合と同様に、コピー領域のうち、両端のグループ以外のグループのフラグを10bから00bに書き換え、コピー領域の両端のグループは、このときも、例えば、差分データなどで書き換えることにし、フラグを00bにすることにする。   As shown in FIGS. 16 and 17, copying to a position separated by an odd pixel of 3 or more is performed by copying to a pixel that is only one pixel and then copying to a position separated by an even number of pixels. It can be carried out. When copying to a position separated by an even number of pixels, the group is copied as it is, so the data arrangement order in the group does not change before and after copying. Therefore, even when a group with the flag 10b is copied to a position separated by an odd number of pixels of 3 or more, the data in the groups other than the groups at both ends in the copy area are in the correct order, and the groups at both ends of the copy area The data is arranged in a poorly reproducible order. Therefore, as in the case of FIGS. 16 and 17, the flags of the groups other than the groups at both ends in the copy area are rewritten from 10b to 00b. The flag is changed to 00b.

このように、グループの並び順を示すフラグを3種類用意し、(1)フラグが00bであるときに、右に奇数画素分だけ離れた位置にコピーするときは、常に、グループの右側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行い、フラグを00bから01bに書き換え、(2)フラグが00bであるときに、左に奇数画素分だけ離れた位置にコピーするときは、常に、グループの左側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行い、フラグを00bから10bに書き換え、(3)フラグが01bであるグループを、奇数画素分だけ離れた位置にコピーするときは、常に、グループの左側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行い、フラグを01bから00bに書き換え、(4)フラグが10bであるグループを、奇数画素分だけ離れた位置にコピーするときは、常に、グループの右側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行い、フラグを10bから00bに書き換えることにより、正しい順番に並んだデータを、奇数画素分だけ離れた位置にコピーしたときも、画像の再現性の高いまま、画像データのコピーを行うことができる。また、正しい順番に並んだデータを、奇数画素分だけ離れた位置にコピーする処理を2回行うと、データが正しい並び順に戻るので、コピー処理を何度か繰り返しても画質が劣化することがなくなる。   In this way, three types of flags indicating the arrangement order of the groups are prepared. (1) When the flag is 00b, when copying to the right by an odd number of pixels, always copy the luminance on the right side of the group Data is copied so that the color differences U and V related to the pixel corresponding to Y and the luminance Y are in the same group, and the flag is rewritten from 00b to 01b. (2) When the flag is 00b, When copying to a position separated by an odd number of pixels, the data is always copied so that the luminance Y on the left side of the group and the color differences U and V related to the pixels corresponding to the luminance Y are in the same group, and the flag Is changed from 00b to 10b, and (3) when a group whose flag is 01b is copied to a position separated by an odd number of pixels, the luminance Y on the left side of the group always corresponds to this luminance Y. Data is copied so that the color differences U and V related to the pixels are in the same group, the flag is rewritten from 01b to 00b, and (4) the group whose flag is 10b is copied to a position separated by an odd number of pixels. Is always correct by copying the data so that the luminance Y on the right side of the group and the color differences U and V related to the pixel corresponding to this luminance Y are in the same group, and rewriting the flag from 10b to 00b. Even when the data arranged in order is copied to a position separated by an odd number of pixels, the image data can be copied with high image reproducibility. In addition, if the data arranged in the correct order is copied twice to a position separated by an odd number of pixels, the data returns to the correct order, so that the image quality may deteriorate even if the copy process is repeated several times. Disappear.

なお、(1)フラグが00bであるときに、右に奇数画素分だけ離れた位置にコピーするときは、常に、グループの左側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行い、フラグを00bから01bに書き換え、(2)フラグが00bであるときに、左に奇数画素分だけ離れた位置にコピーするときは、常に、グループの右側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行い、フラグを00bから10bに書き換え、(3)フラグが01bであるグループを、奇数画素分だけ離れた位置にコピーするときは、常に、グループの右側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行い、フラグを01bから00bに書き換え、(4)フラグが10bであるグループを、奇数画素分だけ離れた位置にコピーするときは、常に、グループの左側の輝度Yとこの輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにデータのコピーを行い、フラグを10bから00bに書き換えるようにしても良い。   (1) When the flag is 00b, when copying to a position separated by an odd number of pixels to the right, the luminance Y on the left side of the group and the color difference U related to the pixel corresponding to this luminance Y are always When data is copied so that V is in the same group, the flag is rewritten from 00b to 01b, and (2) when the flag is 00b, when copying to the left position by an odd number of pixels, always The data is copied so that the luminance Y on the right side of the group and the color differences U and V related to the pixel corresponding to the luminance Y are in the same group, the flag is rewritten from 00b to 10b, and (3) the flag is 01b When copying a group to a position separated by an odd number of pixels, the luminance Y on the right side of the group and the color differences U and V related to the pixel corresponding to the luminance Y are always in the same group. When the data is copied, the flag is rewritten from 01b to 00b, and (4) when the group whose flag is 10b is copied to a position separated by an odd number of pixels, always the luminance Y on the left side of the group and this luminance Y The data may be copied so that the color differences U and V related to the pixels corresponding to 1 are in the same group, and the flag may be rewritten from 10b to 00b.

上述したように、奇数画素分だけ離れた位置へのコピーを行うと、コピー領域の両端のグループのデータの並び順は画像の再現性の悪い並び順になってしまう。よって、コピー領域にはなるべく端となるグループのないようなデータの並び順になっているのが良い。つまり、フラグが同じであるグループがなるべく連続して分布するようになっていると良い。そこで、フラグが0bまたは00bでないグループ、つまり、データが正しい並び順になっていないグループを別の画像データで書き換える際に、次のように行うと良い。   As described above, when copying is performed to a position separated by an odd number of pixels, the arrangement order of the data of the groups at both ends of the copy area becomes an arrangement order with poor image reproducibility. Therefore, it is preferable that the data is arranged in the copy area so that there is no end group as much as possible. That is, it is preferable that the groups having the same flag are distributed as continuously as possible. Therefore, when a group whose flag is not 0b or 00b, that is, a group whose data is not in the correct order, is rewritten with another image data, the following is performed.

例えば、図18に示すように、グループ1、2、3、4、5のフラグが1bであったとする。このときに、図18のグループ3、4のデータを、図19に示すような、グループ3、4、5に対応する差分データにより置き換える。このとき、図20に示すように、差分データを1bのフラグに対応する並び順になるようにしてから置き換える。   For example, as shown in FIG. 18, it is assumed that the flags of groups 1, 2, 3, 4, and 5 are 1b. At this time, the data of the groups 3 and 4 in FIG. 18 are replaced with the difference data corresponding to the groups 3, 4 and 5 as shown in FIG. At this time, as shown in FIG. 20, the difference data is replaced after being arranged in the order corresponding to the flag 1b.

上記のように、差分データを並び換えることなく、対応するグループ3、4、5にそのまま書き込んだ場合は、グループ2とグループ3の間でフラグが1bから0bに変化する。このとき、このグループ1〜5を含む領域を奇数画素分だけ離れた位置にコピーした場合、グループ2、3もコピー領域の端と同様に画像の再現性の悪い並び順になってしまう。しかし、上記のようにすることにより、フラグが同じであるグループをなるべく連続させたまま、新たな差分データへの置き換えを行うことができ、コピーする際に問題になるコピー領域の端となるグループを増やすことを防ぐことができる。   As described above, when the difference data is written in the corresponding groups 3, 4, and 5 without being rearranged, the flag changes from 1 b to 0 b between the group 2 and the group 3. At this time, when the area including the groups 1 to 5 is copied to a position separated by an odd number of pixels, the groups 2 and 3 are also arranged in a poorly reproducible order as in the end of the copy area. However, by doing the above, the group with the same flag can be replaced with new differential data while continuing as much as possible, and the group that becomes the end of the copy area that causes a problem when copying Can be prevented.

(この下は、図20の図として、図20のカッコ内の図にしたときのバージョンです。)
上述したように、奇数画素分だけ離れた位置へのコピーを行うと、コピー領域の両端のグループのデータの並び順は画像の再現性の悪い並び順になってしまう。よって、コピー領域にはなるべく端となるグループのないようなデータの並び順になっているのが良い。つまり、フラグが同じであるグループがなるべく連続して分布するようになっていると良い。そこで、フラグが0bまたは00bでないグループ、つまり、データが正しい並び順になっていないグループを別の画像データで書き換える際に、次のように行うと良い。
(Below this is the version of the figure in parentheses in Figure 20 as the figure in Figure 20.)
As described above, when copying is performed to a position separated by an odd number of pixels, the arrangement order of the data of the groups at both ends of the copy area becomes an arrangement order with poor image reproducibility. Therefore, it is preferable that the data is arranged in the copy area so that there is no end group as much as possible. That is, it is preferable that the groups having the same flag are distributed as continuously as possible. Therefore, when a group whose flag is not 0b or 00b, that is, a group whose data is not in the correct order, is rewritten with another image data, the following is performed.

例えば、図18に示すように、グループ1、2、3、4、5のフラグが1bであったとする。このときに、図18のグループ2、3、4、5のデータを、図19に示すような、グループ3、4、5に対応する差分データにより置き換える。このとき、図20に示すように、差分データを1bのフラグに対応する並び順になるようにしてから置き換える。   For example, as shown in FIG. 18, it is assumed that the flags of groups 1, 2, 3, 4, and 5 are 1b. At this time, the data of groups 2, 3, 4, and 5 in FIG. 18 are replaced with difference data corresponding to groups 3, 4, and 5 as shown in FIG. At this time, as shown in FIG. 20, the difference data is replaced after being arranged in the order corresponding to the flag 1b.

上記のように、差分データを並び換えることなく、対応するグループ3、4、5にそのまま書き込んだ場合は、グループ2とグループ3の間でフラグが1bから0bに変化する。このとき、このグループ1〜5を含む領域を奇数画素分だけ離れた位置にコピーした場合、グループ2、3もコピー領域の端と同様に画像の再現性の悪い並び順になってしまう。しかし、上記のようにすることにより、フラグが同じであるグループをなるべく連続させたまま、新たな差分データへの置き換えを行うことができ、コピーする際に問題になるコピー領域の端となるグループを増やすことを防ぐことができる。
(図20の図として、図20のカッコ内の図にしたときのバージョンの終わりです。)
As described above, when the difference data is written in the corresponding groups 3, 4, and 5 without being rearranged, the flag changes from 1 b to 0 b between the group 2 and the group 3. At this time, when the area including the groups 1 to 5 is copied to a position separated by an odd number of pixels, the groups 2 and 3 are also arranged in a poorly reproducible order as in the end of the copy area. However, by doing the above, the group with the same flag can be replaced with new differential data while continuing as much as possible, and the group that becomes the end of the copy area that causes a problem when copying Can be prevented.
(This is the end of the version shown in the parenthesis in Fig. 20 as the diagram in Fig. 20.)

以上、本発明の好適な実施の形態により本発明を説明した。ここでは特定の具体例を示して本発明を説明したが、特許請求の範囲に定義された本発明の広範囲な趣旨および範囲から逸脱することなく、これら具体例に様々な修正および変更が可能である。   The present invention has been described above by the preferred embodiments of the present invention. While the invention has been described with reference to specific embodiments thereof, various modifications and changes can be made to these embodiments without departing from the broader spirit and scope of the invention as defined in the claims. is there.

例えば、上述した実施形態における処理動作は、ハードウェア、または、ソフトウェア、あるいは、両者の複合構成によって実行することも可能である。   For example, the processing operation in the above-described embodiment can be executed by hardware, software, or a combined configuration of both.

なお、ソフトウェアによる処理を実行する場合には、処理シーケンスを記録したプログラムが格納されているROM(Read Only Memory)から、専用のハードウェアに組み込まれているコンピュータ内のメモリ(RAM)にプログラムを読み込んで実行させるか、あるいは、各種処理が実行可能な汎用コンピュータにプログラムをインストールして実行させることが可能である。   When processing by software is executed, the program is loaded from a ROM (Read Only Memory) storing a program recording a processing sequence to a memory (RAM) in a computer incorporated in dedicated hardware. The program can be read and executed, or the program can be installed and executed on a general-purpose computer capable of executing various processes.

例えば、プログラムは、記録媒体としてのハードディスクやROMに予め記録しておくことが可能である。あるいは、プログラムは、フロッピー(登録商標)ディスク等の磁気ディスク、CD(Compact Disc)、DVD(Digital Versatile Disc)等の光ディスク、MO(Magneto Optical)ディスク等の光磁気ディスクなどのリムーバブル記録媒体に、一時的、あるいは、永続的に格納(記録)しておくことが可能である。   For example, the program can be recorded in advance on a hard disk or ROM as a recording medium. Alternatively, the program is stored on a removable recording medium such as a magnetic disk such as a floppy (registered trademark) disk, an optical disk such as a CD (Compact Disc) or DVD (Digital Versatile Disc), or a magneto-optical disk such as an MO (Magneto Optical) disk. It is possible to store (record) temporarily or permanently.

このようなリムーバブル記録媒体は、いわゆるパッケージソフトウェアとして提供することが可能である。   Such a removable recording medium can be provided as so-called package software.

なお、プログラムは、上述したようなリムーバブル記録媒体からコンピュータにインストールする他、ダウンロードサイトから、コンピュータに無線転送したり、LAN(Local Area Network)、インターネットといったネットワークを介して、コンピュータに有線で転送したりし、コンピュータでは、転送されてきたプログラムを受信し、内蔵するハードディスク等の記録媒体にインストールすることが可能である。   The program is installed on the computer from the above-described removable recording medium, transferred wirelessly from the download site to the computer, or transferred to the computer via a network such as a LAN (Local Area Network) or the Internet. On the other hand, the computer can receive the transferred program and install it on a recording medium such as a built-in hard disk.

また、上記実施形態で説明した処理動作に従って時系列的に実行されるのみならず、処理を実行する装置の処理能力、あるいは、必要に応じて並列的にあるいは個別に実行するように構築することも可能である。   In addition to being executed in time series in accordance with the processing operations described in the above embodiment, the processing capability of the apparatus that executes the processing, or a configuration to execute in parallel or individually as necessary Is also possible.

また、本発明における画像処理装置は、前記フラグ保存手段により保存されるフラグには、第1のフラグ状態と第2のフラグ状態の2種類のフラグ状態があるようにしても良い。   In the image processing apparatus according to the present invention, the flag stored by the flag storage unit may include two types of flag states, a first flag state and a second flag state.

また、本発明における画像処理装置は、前記格納手段により格納された画像データはYUV422形式のデータであり、前記複数のグループそれぞれは、それぞれの色差U、Vの関係する2画素により構成されており、前記コピー手段は、前記格納手段により格納された画像データの一部分を水平方向に奇数画素だけ離れた格納位置にコピーする際に、当該コピーされる画像データの一部分に含まれるグループに対するフラグが前記第1のフラグ状態のときは、当該グループの左側の輝度Yと当該輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにコピーを行い、当該コピー後に当該輝度Yの属するグループに対するフラグを前記第2のフラグ状態に書き換え、当該コピーされる画像データの一部分に含まれるグループに対するフラグが前記第2のフラグ状態のときは、当該グループの右側の輝度Yと当該輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにコピーを行い、当該コピー後に当該輝度Yの属するグループに対するフラグを前記第1のフラグ状態に書き換えるようにしても良い。   In the image processing apparatus according to the present invention, the image data stored by the storage means is data in the YUV422 format, and each of the plurality of groups includes two pixels related to the respective color differences U and V. When the copy means copies a part of the image data stored by the storage means to a storage position separated by an odd number of pixels in the horizontal direction, the flag for the group included in the part of the image data to be copied is In the first flag state, copying is performed so that the luminance Y on the left side of the group and the color differences U and V related to the pixels corresponding to the luminance Y are in the same group, and the luminance Y belongs after the copying A group included in a part of the image data to be copied by rewriting the flag for the group to the second flag state When the corresponding flag is in the second flag state, copying is performed so that the luminance Y on the right side of the group and the color differences U and V related to the pixels corresponding to the luminance Y are in the same group, and after the copying, The flag for the group to which the luminance Y belongs may be rewritten to the first flag state.

また、本発明における画像処理装置は、前記フラグ保存手段により保存されるフラグには、第1のフラグ状態と第2のフラグ状態と第3のフラグ状態の3種類のフラグ状態があるようにしても良い。   In the image processing apparatus according to the present invention, the flag stored by the flag storage unit may include three types of flag states: a first flag state, a second flag state, and a third flag state. Also good.

また、本発明における画像処理装置は、前記画像データはYUV422形式のデータであり、前記複数のグループそれぞれは、それぞれの色差U、Vの関係する2画素により構成されており、前記コピー手段は、前記格納手段により格納された画像データの一部分を右に水平方向に奇数画素だけ離れた格納位置にコピーする際に、当該コピーされる画像データの一部分に含まれるグループに対するフラグが前記第1のフラグ状態のときは、当該グループの右側の輝度Yと当該輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにコピーを行い、当該コピー後に当該輝度Yの属するグループに対するフラグを前記第2のフラグ状態に書き換え、当該コピーされる画像データの一部分に含まれるグループに対するフラグが前記第2のフラグ状態のときは、当該グループの左側の輝度Yと当該輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにコピーを行い、当該コピー後に当該輝度Yの属するグループに対するフラグを前記第1のフラグ状態に書き換え、当該コピーされる画像データの一部分に含まれるグループに対するフラグが前記第3のフラグ状態のときは、当該グループの右側の輝度Yと当該輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにコピーを行い、当該コピー後に当該輝度Yの属するグループに対するフラグを前記第1のフラグ状態に書き換え、前記格納手段により格納された画像データの一部分を左に水平方向に奇数画素だけ離れた格納位置にコピーする際に、当該コピーされる画像データの一部分に含まれるグループに対するフラグが前記第1のフラグ状態のときは、当該グループの左側の輝度Yと当該輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにコピーを行い、当該コピー後に当該輝度Yの属するグループに対するフラグを前記第3のフラグ状態に書き換え、当該コピーされる画像データの一部分に含まれるグループに対するフラグが前記第2のフラグ状態のときは、当該グループの左側の輝度Yと当該輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにコピーを行い、当該コピー後に当該輝度Yの属するグループに対するフラグを前記第1のフラグ状態に書き換え、当該コピーされる画像データの一部分に含まれるグループに対するフラグが前記第3のフラグ状態のときは、当該グループの右側の輝度Yと当該輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにコピーを行い、当該コピー後に当該輝度Yの属するグループに対するフラグを前記第1のフラグ状態に書き換えるようにしても良い。   In the image processing apparatus according to the present invention, the image data is data in the YUV422 format, each of the plurality of groups is configured by two pixels related to the respective color differences U and V, and the copying unit includes: When a part of the image data stored by the storage means is copied to the storage position separated by an odd number of pixels in the horizontal direction to the right, a flag for the group included in the part of the image data to be copied is the first flag. In the state, copying is performed so that the luminance Y on the right side of the group and the color differences U and V related to the pixels corresponding to the luminance Y are in the same group, and a flag for the group to which the luminance Y belongs after the copying. The flag for a group included in a part of the image data to be copied is changed to the second flag state. When the flag state is 2, copying is performed so that the luminance Y on the left side of the group and the color differences U and V related to the pixels corresponding to the luminance Y are the same group, and the group to which the luminance Y belongs after the copying When the flag for the group included in a part of the image data to be copied is in the third flag state, the flag Y on the right side of the group corresponds to the luminance Y and the luminance Y. Copying is performed so that the color differences U and V related to the pixels to be included are in the same group, and after the copying, the flag for the group to which the luminance Y belongs is rewritten to the first flag state, and the image data stored by the storage means When copying a part of the image data to the storage position left by an odd number of pixels in the horizontal direction, When the flag for the group to be turned is in the first flag state, copying is performed so that the luminance Y on the left side of the group and the color differences U and V related to the pixels corresponding to the luminance Y are in the same group, After copying, the flag for the group to which the luminance Y belongs is rewritten to the third flag state, and when the flag for the group included in a part of the image data to be copied is the second flag state, Copying is performed so that the luminance difference Y and the color differences U and V related to the pixels corresponding to the luminance Y are in the same group, and after the copying, the flag for the group to which the luminance Y belongs is rewritten to the first flag state, When the flag for the group included in a part of the image data to be copied is in the third flag state, the group Copying is performed so that the color difference U and V related to the pixel corresponding to the luminance Y are in the same group, and the flag for the group to which the luminance Y belongs is set to the first flag state after the copying. You may make it rewrite to.

また、本発明における画像処理装置は、前記コピー手段は、前記格納手段により格納された画像データの一部分を水平方向に奇数画素だけ離れた格納位置にコピーした後、当該コピーされた画像データの水平方向の端のグループのデータを前記第1のフラグ状態に対応する並び順に並んだデータで書き換えるようにしても良い。   In the image processing apparatus according to the present invention, the copy unit copies a part of the image data stored by the storage unit to a storage position separated by an odd number of pixels in the horizontal direction, and then horizontally copies the copied image data. Data in the end group in the direction may be rewritten with data arranged in the order corresponding to the first flag state.

また、本発明における画像処理装置は、前記コピー手段は、前記格納手段により格納された画像データの一部分を新たな画像データで書き換える際、前記画像データの一部分がフラグのフラグ状態が同じである領域の一部分であるときは、当該新たな画像データが当該フラグ状態に対応する並び順になるように書き換えるようにしても良い。   In the image processing apparatus according to the present invention, when the copy unit rewrites a part of the image data stored in the storage unit with new image data, the part of the image data has the same flag flag state. May be rewritten so that the new image data is arranged in the order corresponding to the flag state.

1 制御部
2 フレームバッファ
3 フラグメモリ
1 Control unit 2 Frame buffer 3 Flag memory

Claims (9)

複数のグループにより構成される画像データを格納する格納手段と、
前記複数のグループそれぞれに対するフラグを保存するフラグ保存手段と、
前記格納手段に格納された画像データの一部分を異なる格納位置にコピーするコピー手段と、を有し、
前記コピー手段は、前記格納手段により格納された画像データの一部分を水平方向に奇数画素だけ離れた格納位置にコピーする際に、当該コピーされる画像データの一部分に含まれるグループそれぞれに対するフラグに基づき、当該グループそれぞれのコピーを行うことを特徴とする画像処理装置。
Storage means for storing image data composed of a plurality of groups;
Flag storage means for storing a flag for each of the plurality of groups;
Copy means for copying a part of the image data stored in the storage means to a different storage position;
The copy means, when copying a part of the image data stored by the storage means to a storage position separated by an odd number of pixels in the horizontal direction, based on a flag for each group included in the part of the image data to be copied. An image processing apparatus for copying each of the groups.
前記フラグ保存手段により保存されるフラグには、第1のフラグ状態と第2のフラグ状態の2種類のフラグ状態があることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the flag stored by the flag storage unit includes two types of flag states, a first flag state and a second flag state. 前記格納手段により格納された画像データはYUV422形式のデータであり、
前記複数のグループそれぞれは、それぞれの色差U、Vの関係する2画素により構成されており、
前記コピー手段は、前記格納手段により格納された画像データの一部分を水平方向に奇数画素だけ離れた格納位置にコピーする際に、当該コピーされる画像データの一部分に含まれるグループに対するフラグが前記第1のフラグ状態のときは、当該グループの左側の輝度Yと当該輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにコピーを行い、当該コピー後に当該輝度Yの属するグループに対するフラグを前記第2のフラグ状態に書き換え、当該コピーされる画像データの一部分に含まれるグループに対するフラグが前記第2のフラグ状態のときは、当該グループの右側の輝度Yと当該輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにコピーを行い、当該コピー後に当該輝度Yの属するグループに対するフラグを前記第1のフラグ状態に書き換えることを特徴とする請求項2に記載の画像処理装置。
The image data stored by the storage means is YUV422 format data,
Each of the plurality of groups includes two pixels related to the respective color differences U and V,
When the copy means copies a part of the image data stored by the storage means to a storage position separated by an odd number of pixels in the horizontal direction, a flag for the group included in the part of the image data to be copied is When the flag state is 1, copying is performed so that the luminance Y on the left side of the group and the color differences U and V related to the pixels corresponding to the luminance Y are the same group, and the group to which the luminance Y belongs after the copying When the flag for the group included in a part of the image data to be copied is in the second flag state, the flag Y on the right side of the group corresponds to the luminance Y and the luminance Y. Copying is performed so that the color differences U and V related to the pixels to be grouped are in the same group, and after the copying, the group to which the luminance Y belongs The image processing apparatus according to claim 2, wherein the rewriting in the first flag state flag for.
前記フラグ保存手段により保存されるフラグには、第1のフラグ状態と第2のフラグ状態と第3のフラグ状態の3種類のフラグ状態があることを特徴とする請求項1に記載の画像処理装置。   2. The image processing according to claim 1, wherein the flag stored by the flag storage means includes three types of flag states: a first flag state, a second flag state, and a third flag state. apparatus. 前記画像データはYUV422形式のデータであり、
前記複数のグループそれぞれは、それぞれの色差U、Vの関係する2画素により構成されており、
前記コピー手段は、
前記格納手段により格納された画像データの一部分を右に水平方向に奇数画素だけ離れた格納位置にコピーする際に、当該コピーされる画像データの一部分に含まれるグループに対するフラグが前記第1のフラグ状態のときは、当該グループの右側の輝度Yと当該輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにコピーを行い、当該コピー後に当該輝度Yの属するグループに対するフラグを前記第2のフラグ状態に書き換え、当該コピーされる画像データの一部分に含まれるグループに対するフラグが前記第2のフラグ状態のときは、当該グループの左側の輝度Yと当該輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにコピーを行い、当該コピー後に当該輝度Yの属するグループに対するフラグを前記第1のフラグ状態に書き換え、当該コピーされる画像データの一部分に含まれるグループに対するフラグが前記第3のフラグ状態のときは、当該グループの右側の輝度Yと当該輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにコピーを行い、当該コピー後に当該輝度Yの属するグループに対するフラグを前記第1のフラグ状態に書き換え、
前記格納手段により格納された画像データの一部分を左に水平方向に奇数画素だけ離れた格納位置にコピーする際に、当該コピーされる画像データの一部分に含まれるグループに対するフラグが前記第1のフラグ状態のときは、当該グループの左側の輝度Yと当該輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにコピーを行い、当該コピー後に当該輝度Yの属するグループに対するフラグを前記第3のフラグ状態に書き換え、当該コピーされる画像データの一部分に含まれるグループに対するフラグが前記第2のフラグ状態のときは、当該グループの左側の輝度Yと当該輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにコピーを行い、当該コピー後に当該輝度Yの属するグループに対するフラグを前記第1のフラグ状態に書き換え、当該コピーされる画像データの一部分に含まれるグループに対するフラグが前記第3のフラグ状態のときは、当該グループの右側の輝度Yと当該輝度Yに対応する画素に関係する色差U、Vが同じグループになるようにコピーを行い、当該コピー後に当該輝度Yの属するグループに対するフラグを前記第1のフラグ状態に書き換えることを特徴とする請求項4に記載の画像処理装置。
The image data is YUV422 format data,
Each of the plurality of groups includes two pixels related to the respective color differences U and V,
The copying means includes
When a part of the image data stored by the storage means is copied to the storage position separated by an odd number of pixels in the horizontal direction to the right, a flag for the group included in the part of the image data to be copied is the first flag. In the state, copying is performed so that the luminance Y on the right side of the group and the color differences U and V related to the pixels corresponding to the luminance Y are in the same group, and a flag for the group to which the luminance Y belongs is copied after the copying. When the flag for a group included in a part of the copied image data is rewritten to the second flag state and the flag corresponding to the luminance Y on the left side of the group is set to the pixel corresponding to the luminance Y. Copying is performed so that the related color differences U and V are in the same group, and after the copying, the flag for the group to which the luminance Y belongs is copied. To the first flag state, and when the flag for the group included in a part of the image data to be copied is the third flag state, the right side luminance Y of the group and the pixel corresponding to the luminance Y Are copied so that the color differences U and V related to the same group become the same group, and after the copying, the flag for the group to which the luminance Y belongs is rewritten to the first flag state,
When a part of the image data stored by the storage means is copied to the storage position left by an odd number of pixels in the horizontal direction to the left, a flag for a group included in the part of the image data to be copied is the first flag. In the state, copying is performed so that the luminance Y on the left side of the group and the color differences U and V related to the pixels corresponding to the luminance Y are in the same group, and after the copying, a flag for the group to which the luminance Y belongs is set. When the flag for the group included in a part of the copied image data is rewritten to the third flag state and the second flag state, the luminance Y on the left side of the group and the pixel corresponding to the luminance Y are set. Copying is performed so that the related color differences U and V are in the same group, and the flag for the group to which the luminance Y belongs is copied after the copying. To the first flag state, and when the flag for the group included in a part of the image data to be copied is the third flag state, the right side luminance Y of the group and the pixel corresponding to the luminance Y 5. The image according to claim 4, wherein copying is performed so that the color differences U and V relating to the same group are in the same group, and the flag for the group to which the luminance Y belongs is rewritten to the first flag state after the copying. Processing equipment.
前記コピー手段は、前記格納手段により格納された画像データの一部分を水平方向に奇数画素だけ離れた格納位置にコピーした後、当該コピーされた画像データの水平方向の端のグループのデータを前記第1のフラグ状態に対応する並び順に並んだデータで書き換えることを特徴とする請求項2から5のいずれか1項に記載の画像処理装置。   The copy means copies a part of the image data stored by the storage means to a storage position separated by an odd number of pixels in the horizontal direction, and then transfers the data of the end group in the horizontal direction of the copied image data to the first position. 6. The image processing apparatus according to claim 2, wherein the image processing apparatus is rewritten with data arranged in an arrangement order corresponding to one flag state. 前記コピー手段は、前記格納手段により格納された画像データの一部分を新たな画像データで書き換える際、前記画像データの一部分がフラグのフラグ状態が同じである領域の一部分であるときは、当該新たな画像データが当該フラグ状態に対応する並び順になるように書き換えることを特徴とする請求項1から6のいずれか1項に記載の画像処理装置。   When the copy means rewrites a part of the image data stored by the storage means with new image data, if the part of the image data is a part of an area having the same flag flag state, the copy means The image processing apparatus according to any one of claims 1 to 6, wherein the image data is rewritten so as to be in an arrangement order corresponding to the flag state. 複数のグループにより構成される画像データを格納する格納ステップと、
前記複数のグループそれぞれに対するフラグを保存するフラグ保存ステップと、
前記格納ステップに格納された画像データの一部分を異なる格納位置にコピーするコピーステップと、を有し、
前記コピーステップは、前記格納ステップにより格納された画像データの一部分を水平方向に奇数画素だけ離れた格納位置にコピーする際に、当該コピーされる画像データの一部分に含まれるグループそれぞれに対するフラグに基づき、当該グループそれぞれのコピーを行うことを特徴とする画像処理方法。
A storing step for storing image data composed of a plurality of groups;
A flag storing step for storing a flag for each of the plurality of groups;
A copy step of copying a portion of the image data stored in the storage step to a different storage location;
The copy step is based on a flag for each group included in a part of the image data to be copied when copying a part of the image data stored in the storage step to a storage position separated by an odd number of pixels in the horizontal direction. And an image processing method for copying each of the groups.
画像処理装置を、
複数のグループにより構成される画像データを格納する格納手段と、
前記複数のグループそれぞれに対するフラグを保存するフラグ保存手段と、
前記格納手段に格納された画像データの一部分を異なる格納位置にコピーするコピー手段として機能させ、
前記コピー手段は、前記格納手段により格納された画像データの一部分を水平方向に奇数画素だけ離れた格納位置にコピーする際に、当該コピーされる画像データの一部分に含まれるグループそれぞれに対するフラグに基づき、当該グループそれぞれのコピーを行うことを特徴とするプログラム。
The image processing device
Storage means for storing image data composed of a plurality of groups;
Flag storage means for storing a flag for each of the plurality of groups;
Function as copy means for copying a portion of the image data stored in the storage means to a different storage location;
The copy means, when copying a part of the image data stored by the storage means to a storage position separated by an odd number of pixels in the horizontal direction, based on a flag for each group included in the part of the image data to be copied. A program for copying each group.
JP2009189473A 2009-08-18 2009-08-18 Image processing apparatus, image processing method and program Withdrawn JP2011040001A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009189473A JP2011040001A (en) 2009-08-18 2009-08-18 Image processing apparatus, image processing method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009189473A JP2011040001A (en) 2009-08-18 2009-08-18 Image processing apparatus, image processing method and program

Publications (1)

Publication Number Publication Date
JP2011040001A true JP2011040001A (en) 2011-02-24

Family

ID=43767669

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009189473A Withdrawn JP2011040001A (en) 2009-08-18 2009-08-18 Image processing apparatus, image processing method and program

Country Status (1)

Country Link
JP (1) JP2011040001A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016537929A (en) * 2013-10-14 2016-12-01 クゥアルコム・インコーポレイテッドQualcomm Incorporated 3D look-up table based color gamut scalability in multi-layer video coding

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016537929A (en) * 2013-10-14 2016-12-01 クゥアルコム・インコーポレイテッドQualcomm Incorporated 3D look-up table based color gamut scalability in multi-layer video coding

Similar Documents

Publication Publication Date Title
CN103026386B (en) The data structure of image processing apparatus, image display device, image processing method and image file
JP2618101B2 (en) Image layout processing method
JP4971442B2 (en) Image processing apparatus and method for pixel data conversion
JP4701598B2 (en) Still image generating apparatus, still image generating method, still image generating program, and recording medium on which still image generating program is recorded
JP4623207B2 (en) Display control apparatus, display control method, and program
WO2019041264A1 (en) Image processing apparatus and method, and related circuit
JP2017156365A (en) Liquid crystal display device
JP2011040001A (en) Image processing apparatus, image processing method and program
JP2009060168A (en) Image processing apparatus, image processing method, and image processing program
KR100472464B1 (en) Apparatus and method for serial scaling
JP3110041B2 (en) Image information processing device
JP4166207B2 (en) Animation playback device and animation playback program
JP5549431B2 (en) Server apparatus, moving vector detection method and program
JP2011141341A (en) Image signal distribution apparatus and control method thereof, and program
WO2012035632A1 (en) Image generating device
JP2012044546A (en) Server device, difference data generation method and program
JP2002196744A (en) Picture display device
TWI484472B (en) Method and apparatus for displaying images
JP2005326701A (en) Display device
JP2015185941A (en) Imaging apparatus and control method of the same
JP2021082158A (en) Information processing device
JP2011192077A (en) Server device, method of detecting area of movement, and program
JP2011081199A (en) Display device and method of controlling the same
JP2001184798A (en) Moving picture reproducing device
JP2001202495A (en) Image processor and method for image processing and recording medium with program of image processing recorded thereon

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20110513

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20110920

A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20121106