JP2005218055A - Apparatus, method and program for processing image - Google Patents
Apparatus, method and program for processing image Download PDFInfo
- Publication number
- JP2005218055A JP2005218055A JP2004025897A JP2004025897A JP2005218055A JP 2005218055 A JP2005218055 A JP 2005218055A JP 2004025897 A JP2004025897 A JP 2004025897A JP 2004025897 A JP2004025897 A JP 2004025897A JP 2005218055 A JP2005218055 A JP 2005218055A
- Authority
- JP
- Japan
- Prior art keywords
- pixels
- pixel data
- image
- processing
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Images
Landscapes
- Image Processing (AREA)
- Color Television Systems (AREA)
Abstract
Description
本発明は、予め定められたアドレス位置でメモリに対する読み書き処理を行うSIMD(Single Instruction Multiple Data)型並列処理プロセッサによって、画像データに対する画像処理を行う画像処理装置、画像処理方法および画像処理プログラムに関するものである。 The present invention relates to an image processing apparatus, an image processing method, and an image processing program for performing image processing on image data by a SIMD (Single Instruction Multiple Data) type parallel processing processor that performs read / write processing on a memory at a predetermined address position. It is.
近年、MPEG−1、MPEG−2、MPEG−4などの動画データの画像符号化および復号化をソフトウェアで処理することが一般的に行われている。ここで、動き補償処理とは、復号画像をマクロブロックという矩形ブロックに分割し、そのマクロブロックごとに過去に復号した参照画像から、動きベクトル(映像の中の各マクロブロックが、どの方向へどのくらい動いているかという情報)だけずれた位置にあるマクロブロックをコピーする処理である(例えば、特許文献1参照)。 In recent years, image encoding and decoding of moving image data such as MPEG-1, MPEG-2, and MPEG-4 are generally performed by software. Here, the motion compensation process divides a decoded image into rectangular blocks called macroblocks, and from the reference image decoded in the past for each macroblock, a motion vector (how much each macroblock in the video is in which direction and how much This is a process of copying a macroblock at a position shifted by (information on whether it is moving) (see, for example, Patent Document 1).
一般的なMPEGの復号化処理では、画像データは、フレームまたはフィールドごとに輝度成分(Y)、色差成分(Cb/Cr)をひとまとまりとして配置する面順次フォーマットで格納される。そして、マクロブロックのサイズは輝度成分に対しては16×16画素、色差成分に対しては8×8画素のサイズが採用されている。 In a general MPEG decoding process, image data is stored in a frame sequential format in which a luminance component (Y) and a color difference component (Cb / Cr) are arranged as a group for each frame or field. The macroblock size is 16 × 16 pixels for the luminance component and 8 × 8 pixels for the color difference component.
ここで、Intel社製のプロセッサには、SIMD(Single Instruction Multiple Data)という命令セットが準備されている。この命令セットに含まれるSIMD命令は1命令で複数のデータに共通の処理を行う命令であり、MPEGのように複数の画素に対して同様の処理を行う場合にこのSIMD命令を用いて同時に処理することにより、処理を高速化することが可能となっている。 Here, an instruction set called SIMD (Single Instruction Multiple Data) is prepared for an Intel processor. The SIMD instruction included in this instruction set is an instruction that performs processing common to a plurality of data with one instruction. When similar processing is performed on a plurality of pixels as in MPEG, simultaneous processing is performed using this SIMD instruction. By doing so, it is possible to speed up the processing.
また、Intel社製のプロセッサには、MMX/SSE(Streaming SIMD Extension)という64ビットレジスタを用いたSIMD命令とSSE2という128ビットレジスタを用いたSIMD命令が命令セットに含まれている。1画素のデータは8ビットで表現されるので、輝度成分に対してはSSE2を使用し、マクロブロックの水平方向の16画素を同時に処理することができるようになっている。また、色差成分に対しては、MMX/SSEを用い、ブロックの8画素を同時に処理することができるようになっている。 The Intel processor includes an SIMD instruction using a 64-bit register called MMX / SSE (Streaming SIMD Extension) and a SIMD instruction using a 128-bit register called SSE2. Since 1-pixel data is expressed by 8 bits, SSE2 is used for the luminance component, and 16 pixels in the horizontal direction of the macroblock can be processed simultaneously. For color difference components, MMX / SSE can be used to simultaneously process 8 pixels of the block.
一方、次世代のゲーム機やホームサーバ、デジタルテレビジョンなどに搭載されるCPUとして、128ビットのSIMD命令のみを持つRISCプロセッサが搭載される可能性がある.例えば、Power PCプロセッサにおけるAltiVec命令セットなどがこのようなプロセッサの代表である。このようなRISCプロセッサで利用できるSIMD命令は、128ビットすなわち16バイトを複数のワード(8bit、16bit、32bit)に分割した個々のデータを対象としている。また、今後将来的に、プロセッサによって同時処理可能なデータ量は増える傾向にあり、256ビット(32バイト)を同時に処理できるようなSIMD命令を備えたRISCプロセッサが登場する可能性もある。 On the other hand, there is a possibility that a RISC processor having only a 128-bit SIMD instruction may be mounted as a CPU mounted on a next-generation game machine, a home server, a digital television, or the like. For example, the AltiVec instruction set in the Power PC processor is representative of such a processor. The SIMD instruction that can be used in such a RISC processor targets individual data obtained by dividing 128 bits, that is, 16 bytes into a plurality of words (8 bits, 16 bits, 32 bits). In the future, the amount of data that can be simultaneously processed by the processor tends to increase, and there is a possibility that a RISC processor equipped with a SIMD instruction capable of simultaneously processing 256 bits (32 bytes) may appear.
しかしながら、このような128ビットSIMD命令セットを有するRISCプロセッサによりMPEGの復号化処理の中の動き補償処理を実行する場合、SIMD命令が128ビット単位の処理しか実行することができない。このため、このようなRISCプロセッサを使用した場合に、マクロブロックが16×16画素である輝度成分の動き補償処理については128ビットを有効に使用した処理が行えるが、マクロブロックが8×8画素の色差成分の動き補償処理の場合には、128ビットのうち64ビットしか使用されず、残りの64ビットは有効に利用されない。すなわち、動き補償を行う色差成分(Cb/Cr)のマクロブロックの面積は、輝度成分のマクロブロックの1/2となってるが、128ビットのSIMD命令セットを使用した場合、色差成分についてはSIMD命令の並列性を十分に生かしきれず、結果として輝度成分の動き補償処理と同程度の処理負荷がかかってしまい、RISCプロセッサによる並列処理の効率を向上させることができないという問題がある。 However, when the motion compensation process in the MPEG decoding process is executed by the RISC processor having such a 128-bit SIMD instruction set, the SIMD instruction can execute only a process of 128 bits. For this reason, when such a RISC processor is used, the motion compensation processing of the luminance component whose macroblock is 16 × 16 pixels can be performed using 128 bits effectively, but the macroblock has 8 × 8 pixels. In the case of the motion compensation processing of the color difference component, only 64 bits out of 128 bits are used, and the remaining 64 bits are not used effectively. That is, the area of the chrominance component (Cb / Cr) macroblock for performing motion compensation is ½ of the luminance component macroblock, but when the 128-bit SIMD instruction set is used, the chrominance component is SIMD. There is a problem that the parallelism of the instructions cannot be fully utilized, and as a result, the processing load on the same level as the motion compensation processing of the luminance component is applied, and the efficiency of the parallel processing by the RISC processor cannot be improved.
また、一般的なRISCプロセッサでは、メモリのアドレッシングはプロセッサの処理単位にアラインメントされたアドレスからしか行えず、自由にアドレッシングを行えるIntel社製プロセッサと異なっている。このため、メモリからデータを読み出す場合には、その読み出しアドレスは16×n(nは整数)となる。 Further, in a general RISC processor, memory addressing can be performed only from addresses aligned in the processing unit of the processor, and is different from an Intel processor that can perform addressing freely. Therefore, when data is read from the memory, the read address is 16 × n (n is an integer).
このため、このようなRISCプロセッサによってMPEGの復号化処理を行う場合、MPEG−2のSDTV解像度(一般的には水平720×垂直480画素)では、色差成分の水平方向の画素数が16の倍数ではないため、Intel社製のCPUのように自由なアドレスからデータを取得することができるプロセッサを用いて動き補償を行う場合と異なり、16バイトアライメント右端の8画素を処理する際に次のラインの左端の画素に悪影響を与えるという問題がある。 Therefore, when MPEG decoding is performed by such a RISC processor, the number of pixels in the horizontal direction of the color difference component is a multiple of 16 at the MPEG-2 SDTV resolution (generally horizontal 720 × vertical 480 pixels). Therefore, unlike the case where motion compensation is performed using a processor that can acquire data from a free address such as an Intel CPU, the next line is used when processing the 8 pixels at the right end of the 16-byte alignment. There is a problem of adversely affecting the leftmost pixel.
本発明は、上記の点に鑑みてなされたものであって、並列処理命令が同時に処理可能な画素数よりも少ない画素数の画像処理を行う際に、プロセッサの並列処理性能を有効に利用するとともに、隣接する画素の処理に与える悪影響を防止することができる画像処理装置、画像処理方法および画像処理プログラムを提供することを目的とする。 The present invention has been made in view of the above points, and effectively uses the parallel processing performance of a processor when performing image processing with a number of pixels smaller than the number of pixels that can be processed simultaneously by a parallel processing instruction. In addition, an object is to provide an image processing apparatus, an image processing method, and an image processing program that can prevent adverse effects on processing of adjacent pixels.
上述した課題を解決し、目的を達成するために、本発明は、一命令で複数のデータを処理するとともに予め定められたアドレス位置でメモリに対する読み書き処理を行うSIMD(Single Instruction Multiple Data)型並列処理プロセッサによって、画像データに対する画像処理を行う画像処理方法であって、前記画像データの異なる色成分であって前記SIMD型プロセッサの並列処理命令が同時に処理可能な画素数Nよりも少ない複数の画素データを同時に処理する場合に、前記複数の画素データをN/M(M:整数)画素ごとに各成分の画素データが交互になるように配置変換する変換ステップと、前記変換ステップによって配置変換された複数の画素データを、N画素を単位として2N画素分読み出す読み出しステップと、前記SIMD型プロセッサで提供されるバイトシャッフル命令を実行して前記読み出しステップによって読み出された2N画素の画素データから、画像処理対象のN/M画素の画素データを抽出し、抽出されたN/M画素の画素データに対して画像処理を施す画像処理ステップと、を含むことを特徴とする。 In order to solve the above-described problems and achieve the object, the present invention processes SIMD (Single Instruction Multiple Data) parallel processing that processes a plurality of data with one instruction and performs read / write processing on a memory at a predetermined address position. An image processing method for performing image processing on image data by a processing processor, wherein a plurality of pixels that are different color components of the image data and are smaller than the number N of pixels that can be simultaneously processed by the parallel processing command of the SIMD type processor In the case of processing data simultaneously, the plurality of pixel data are arranged and converted by the conversion step for arranging and converting the pixel data of each component alternately for each N / M (M: integer) pixel. Read multiple pixel data for 2N pixels in units of N pixels A read step and a byte shuffle instruction provided by the SIMD type processor to extract pixel data of N / M pixels to be image-processed from pixel data of 2N pixels read by the read step; And an image processing step for performing image processing on the extracted pixel data of N / M pixels.
また、本発明は、一命令で複数のデータを処理するとともに予め定められたアドレス位置で画像メモリに対する読み書き処理を行うSIMD(Single Instruction Multiple Data)型並列処理プロセッサと、プログラムを記憶し、前記SIMD型並列処理プロセッサがアクセス可能なメモリと、画像データを記憶し、前記SIMD型並列処理プロセッサがアクセス可能な画像メモリと、を備え、前記プログラムは、前記SIMD型並列処理プロセッサを、前記画像データの異なる色成分であって前記SIMD型プロセッサの並列処理命令が同時に処理可能な画素数Nよりも少ない複数の画素データを同時に処理する場合に、前記複数の画素データをN/M(M:整数)画素ごとに各成分の画素データが交互になるように配置変換する変換手段と、前記変換手段によって配置変換された複数の画素データを、N画素を単位として2N画素分読み出す読み出し手段と、前記SIMD型プロセッサで提供されるバイトシャッフル命令を実行して前記読み出しステップによって読み出された2N画素の画素データから、画像処理対象のN/M画素の画素データを抽出し、抽出されたN/M画素の画素データに対して画像処理を施す画像処理手段として機能させることを特徴とする。 The present invention also stores a SIMD (Single Instruction Multiple Data) type parallel processing processor that processes a plurality of data with a single instruction and performs read / write processing on an image memory at a predetermined address position, and stores the program. A memory accessible by the type parallel processor, and an image memory storing the image data and accessible by the SIMD type parallel processor, wherein the program includes the SIMD type parallel processor. When simultaneously processing a plurality of pixel data having different color components and smaller than the number N of pixels that can be processed simultaneously by the parallel processing instruction of the SIMD type processor, the plurality of pixel data is converted into N / M (M: integer). The pixel data of each component alternates for each pixel A conversion unit that performs layout conversion in such a manner, a reading unit that reads a plurality of pixel data that has been converted by the conversion unit for 2N pixels in units of N pixels, and a byte shuffle instruction provided by the SIMD processor Then, the pixel data of N / M pixels to be image-processed is extracted from the pixel data of 2N pixels read out by the reading step, and the image processing is performed on the extracted pixel data of N / M pixels. It functions as a processing means.
また、本発明は、命令で複数のデータを処理するとともに予め定められたアドレス位置でメモリに対する読み書き処理を行うSIMD(Single Instruction Multiple Data)型並列処理プロセッサによって、画像データに対する画像処理を行う画像処理プログラムであって、前記画像データの異なる色成分であって前記SIMD型プロセッサの並列処理命令が同時に処理可能な画素数Nよりも少ない複数の画素データを同時に処理する場合に、前記複数の画素データをN/M(M:整数)画素ごとに各成分の画素データが交互になるように配置変換する変換手順と、前記変換ステップによって配置変換された複数の画素データを、N画素を単位として2N画素分読み出す読み出し手順と、前記SIMD型プロセッサで提供されるバイトシャッフル命令を実行して前記読み出しステップによって読み出された2N画素の画素データから、画像処理対象のN/M画素の画素データを抽出し、抽出されたN/M画素の画素データに対して画像処理を施す画像処理手順とをコンピュータに実行させる画像処理プログラムにかかるものである。 The present invention also provides image processing for performing image processing on image data by a SIMD (Single Instruction Multiple Data) type parallel processing processor that processes a plurality of data with instructions and performs read / write processing on a memory at a predetermined address position. The plurality of pixel data when the program simultaneously processes a plurality of pixel data having different color components of the image data and having a parallel processing instruction of the SIMD processor smaller than the number N of pixels that can be processed simultaneously. For each N / M (M: integer) pixel, the conversion procedure for converting the pixel data of each component alternately, and a plurality of pixel data subjected to the conversion by the conversion step are converted into 2N in units of N pixels. A readout procedure for reading out pixels, and the SIMD type The N / M pixel extracted from the pixel data of the 2N pixels read out by the read step by executing the byte shuffle instruction provided by the image processor is extracted. And an image processing program for causing a computer to execute an image processing procedure for performing image processing on the pixel data.
本発明によれば、画像データの異なる色成分であってSIMD型プロセッサの並列処理命令が同時に処理可能な画素数Nよりも少ない複数の画素データを同時に処理する場合に、複数の画素データをN/M(M:整数)画素ごとに各成分の画素データが交互になるように配置変換し、配置変換された複数の画素データを、N画素を単位として2N画素分読み出し、バイトシャッフル命令を実行して、読み出された2N画素の画素データから、画像処理対象のN/M画素の画素データを抽出し、抽出されたN/M画素の画素データに対して画像処理を施すことで、異なる成分の画像データに対する画像処理を、無駄な領域を発生させずに同時に行うことができ、SIMD型プロセッサの並列処理を効果的に使用して動き補償処理を行うことができるという効果を奏する。 According to the present invention, when a plurality of pieces of pixel data that are different color components of image data and are less than the number N of pixels that can be processed simultaneously by a parallel processing instruction of the SIMD processor, / M (M: integer) The pixel is converted so that the pixel data of each component is alternated, and a plurality of pixel data subjected to the conversion are read for 2N pixels in units of N pixels, and a byte shuffle instruction is executed. Then, pixel data of N / M pixels to be image-processed is extracted from the read pixel data of 2N pixels, and the image processing is performed on the extracted pixel data of N / M pixels. Image processing of component image data can be performed simultaneously without generating a useless area, and motion compensation processing can be performed effectively using parallel processing of SIMD type processors. There is an effect that that.
また、本実施の形態の画像復号化装置では、複数の画素データをN/M(M:整数)画素ごとに各成分の画素データが交互になるように配置変換しているので、自由なアドレスからメモリに対するアクセスが不可能なプロセッサを用いた場合でも、右端の画素データを処理する際に他の領域の画素データに対して悪影響を与えずに画像処理を行うことができるという効果を奏する。 In the image decoding apparatus according to the present embodiment, a plurality of pieces of pixel data are arranged and converted so that the pixel data of each component is alternated for each N / M (M: integer) pixel. Thus, even when a processor that cannot access the memory is used, it is possible to perform image processing without adversely affecting the pixel data in other regions when processing the pixel data on the right end.
以下に添付図面を参照して、この発明にかかる画像処理装置、画像処理方法および画像処理プログラムの最良な実施の形態を詳細に説明する。本実施の形態は本発明の画像処理装置、画像処理方法および画像処理プログラムを、MPEGの復号化処理を行う画像復号化方法、画像復号化装置および画像復号化プログラムに適用したものである。 Exemplary embodiments of an image processing apparatus, an image processing method, and an image processing program according to the present invention are explained in detail below with reference to the accompanying drawings. In the present embodiment, the image processing apparatus, the image processing method, and the image processing program of the present invention are applied to an image decoding method, an image decoding apparatus, and an image decoding program that perform MPEG decoding.
図1は、本発明の実施の形態にかかる画像復号化装置の機能的構成を示すブロック図である。画像復号化装置は、図1に示すように、ストリームバッファ120と、ストリームバッファ制御部130と、デコーダ制御部110と、デコーダ100と、画像メモリ140とを主に備えている。
FIG. 1 is a block diagram showing a functional configuration of an image decoding apparatus according to an embodiment of the present invention. As shown in FIG. 1, the image decoding apparatus mainly includes a
また、デコーダ100は、図1に示すように、可変長復号化部101と、逆量子化部102と、逆スキャン部103と、逆DCT部104と、動き補償部105とを備えている。
As shown in FIG. 1, the
ストリームバッファ120は、DVDなどの記録媒体やインターネットなどのネットワーク、衛星などの放送電波を介して、装置外部から入力された符号化ストリーム(MPEG2ビットストリーム)を蓄積するDRAM(Dynamic Random Access Memory)などのメモリである。
The
ストリームバッファ制御部130は、デコーダ制御部110の指示に基づいて、符号化ストリームの入力時刻のばらつきを均一化して、デコーダ100に符号化ストリームを入力する処理部である。
The stream
デコーダ制御部110は、ストリームバッファ制御部130を介して、ストリームバッファ120から符号化ストリームをデコーダ100に出力する処理部である。
The decoder control unit 110 is a processing unit that outputs an encoded stream from the
デコーダ100は、概略的に、ストリームバッファ制御部130から入力された符号化ストリームをデコーダ制御部110の指示に基づいて復号して、画像メモリ140に出力する処理部である。この復号処理は、可変長復号化部101、逆量子化部102、逆スキャン部103、逆DCT部104および動き補償部108の各処理部による処理を経ておこなわれる。以下に、デコーダ100の各処理部の処理を説明する。
The
可変長復号化部101は、符号化ストリームに含まれる可変長符号化データを復号して量子化DCT係数を復元する処理部である。具体的には、ストリームバッファ制御部130から入力された符号化ストリームをデコーダ制御部110の指示に従い、マクロブロックを分離し、各マクロブロックの量子化DCT係数を復号し、復号した量子化DCT係数を逆量子化部102に出力する。
The variable
また、可変長復号化部101、予測モードや予測ベクトルなどのパラメータの復号もおこない、復号した予測モードおよび予測ベクトルを動き補償部105に出力する。
The variable
逆量子化部102は、可変長復号化部101から入力された量子化DCT係数を逆量子化してDCT係数を復号し、復号したDCT係数を逆スキャン部103に出力する処理部である。
The
逆スキャン部103は、逆量子化部102から入力されたDCT係数を逆スキャンし、逆スキャンしたDCT係数を逆DCT部104に出力する処理部である。なお、図1においては、逆量子化処理をおこなった後に逆スキャン処理をおこなう場合の構成を示しているが、必ずしもこの順序にしたがう必要はなく、逆スキャン処理をおこなった後に逆量子化処理をおこなう構成でもよい。
The
逆DCT部104は、逆スキャン部103から入力されたDCT係数を逆DCT変換して符号化前の実画像成分である画像データ(画素値を持つデータ)を復号し、復号した画像データを動き補償部108に出力する処理部である。
The
動き補償部108は、逆DCT部104から入力された画像データと、可変長復号化部101から入力された予測モードおよび予測ベクトルとに基づいて、動き補償をおこない、動き補償をおこなった画像データを画像メモリ140に書き込む処理部であり、機能概念的に、変換部105と、書き込み制御部106と読み出し制御部107とから構成される。ここで、変換部105は本発明における変換手段を、書き込み制御部106は本発明における画像処理手段を、読み出し制御部107は本発明における読み出し手段を構成する。
The motion compensation unit 108 performs motion compensation based on the image data input from the
動き補償部108における変換部105は、色差成分CbおよびCrの画素データを、各成分8画素ごとに交互に配置してフレームメモリ(Cb/Cr)144に配置するものである。
The
動き補償部108における読み出し制御部107は、複数の画像データを画像メモリから読み出すものである。具体的には、読み出し制御部107は、画像メモリ140のフレームメモリ(Y)141から輝度成分Yの画素データを16画素分読み出し、またフレームメモリ(Cb/Cr)144から色差成分Cb,Crが8画素ごとに交互に配置された画素データを16画素分読み出す処理を行う。
The
動き補償部108における書き込み制御部106は、読み出し制御部107から読み出された輝度成分の16画素分の画素データからバイトシャッフル命令を実行して、動き補償処理に必要な画素を抽出する。また、書き込み制御部106は、読み出し制御部107から読み出された色差成分Cb/Crの16画素分の画素データからバイトシャッフル命令を実行して、動き補償処理に必要な画素を抽出する。
The
画像メモリ140は、動き補償処理の対象となる画像データを格納するものである。画像メモリ140には、輝度成分Yの画素データを保存する領域であるフレームメモリ(Y)141、色差成分Cbの画素データと色差成分Crの画素データとを交互に配置した画像データを保存する領域であるフレームメモリ(Cb/Cr)144がそれぞれ確保されている。なお、フレームメモリ(y)141、フレームメモリ(Cb/Cr)144は、図中はそれぞれ一つであるが、実際には、動き補償処理を行うために、参照画像のフレームメモリと復号画像のフレームメモリがフレームメモリ(y)141、フレームメモリ(Cb/Cr)144のそれぞれ確保されている。
The
本実施形態の画像復号化装置は、16バイトアライメントでメモリに対する読み書き処理を行うRISCのSIMD(Single Instruction Multiple Data)型並列処理プロセッと、ハードディスク装置(HDD)などの記録装置と、画像メモリ140、RAM(Random Access Memory)、ROM(Read Only Memory))等の記憶装置とを有する動画再生装置あるいはコンピュータを利用した構成である。
The image decoding apparatus according to the present embodiment includes a RISC SIMD (Single Instruction Multiple Data) parallel processing processor that performs read / write processing on a memory with 16-byte alignment, a recording device such as a hard disk device (HDD), an
本実施形態の画像復号化装置で実行される画像復号化プログラムは、本実施形態の画像復号化装置が動画再生装置の場合にはROMに組み込まれた形態で提供される。また、本実施形態の画像復号化装置がコンピュータを利用した構成の場合には、、画像復号化プログラムは、インストール可能な形式又は実行可能な形式のファイルでCD−ROM、フレキシブルディスク(FD)、CD−R、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録されて提供される。 The image decoding program executed by the image decoding apparatus according to the present embodiment is provided in a form incorporated in a ROM when the image decoding apparatus according to the present embodiment is a moving image reproduction apparatus. When the image decoding apparatus according to the present embodiment is configured using a computer, the image decoding program is a file in an installable format or an executable format, such as a CD-ROM, a flexible disk (FD), The program is recorded on a computer-readable recording medium such as a CD-R or a DVD (Digital Versatile Disk).
また、本実施形態の画像復号化装置で実行される画像復号化プログラムを、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成しても良い。また、本実施形態の画像復号化装置で実行される画像復号化プログラムをインターネット等のネットワーク経由で提供または配布するように構成しても良い。 The image decoding program executed by the image decoding apparatus according to the present embodiment may be provided by being stored on a computer connected to a network such as the Internet and downloaded via the network. . The image decoding program executed by the image decoding apparatus according to the present embodiment may be provided or distributed via a network such as the Internet.
本実施形態の画像復号化装置で実行される画像復号化プログラムは、ROMあるいは上記記憶媒体から読み出して実行することにより主記憶装置上にロードされ、上述した動き補償部108、可変長復号化部101、逆量子化部102、逆スキャン部103、逆DCT部が主記憶装置上に生成されるようになっている。また、動き補償部108、可変長復号化部101、逆量子化部102、逆スキャン部103、逆DCT部104の一部または全てをハードウェアで構成してもよい。
The image decoding program executed by the image decoding apparatus according to the present embodiment is loaded on the main storage device by being read from the ROM or the storage medium and executed, and the motion compensation unit 108 and the variable length decoding unit described above are loaded. 101, an
次に、以上のように構成された本実施の形態の画像復号化装置による各種について説明する。本実施の形態に係る画像復号化装置は、デコーダ100の可変長復号化部101による可変長復号化処理、逆量子化部102による逆量子化処理、逆スキャン部103による逆スキャン処理および逆DCT部104による逆DCT変換処理を受けて動き補償部108による動き補償処理を実行する。
Next, various types of the image decoding apparatus according to the present embodiment configured as described above will be described. The image decoding apparatus according to the present embodiment includes a variable length decoding process by the variable
本実施の形態の画像復号化装置では、動き補償部108によって、動き補償処理が実行される。本実施の形態では、変換部105によって、フレームメモリにおける画像データのフォーマットが色差成分Cb/Crを8画素(8バイト)ごとに交互に配置されたフォーマットとなっている。図2は、通常の面順次フォーマットを示す説明図である。図3に示すように、面順次フォーマットでは、フレームまたはフィールドごとに輝度成分(y)、色差成分(Cb/Cr)の画素をひとまとまりとして配置している。一方、図3は、本実施の形態の画像復号化装置で使用する画像データのフォーマットを示す説明図である。図3に示すように、フレームメモリ(Y)142の輝度成分のフォーマットは図2に示す面順次と同様であるが、フレームメモリ(Cb/Cr)144には、色差成分CbとCrの画素が8バイトごとに交互に配置されている。通常,MPEGにおける色差成分の復号化処理は8×8画素の単位のマクロブロックごとに行われる。このため、図3に示すフォーマットで色差成分の画素データを格納することによる処理のオーバーヘッドはない。
In the image decoding apparatus according to the present embodiment, motion compensation processing is executed by the motion compensation unit 108. In the present embodiment, the
本実施の形態の画像復号化装置では、まず輝度信号(Y)についての動き補償処理を行い、次いで色差信号(Cb/Cr)についての動き補償処理を行う。輝度信号(Y)についての動き補償処理については後述し、まず色差信号(Cb/Cr)についての動き補償処理について説明する。図4は、色差信号(Cb/Cr)についての動き補償処理の手順を示すフローチャートである。 In the image decoding apparatus according to the present embodiment, first, motion compensation processing is performed on the luminance signal (Y), and then motion compensation processing is performed on the color difference signal (Cb / Cr). The motion compensation process for the luminance signal (Y) will be described later. First, the motion compensation process for the color difference signal (Cb / Cr) will be described. FIG. 4 is a flowchart showing the procedure of the motion compensation process for the color difference signal (Cb / Cr).
まず、読み出し制御部107は、参照画像のフレームメモリ(Cb/Cr)144の参照ブロックの左上端のアドレスradrを数1式のように算出する(ステップS401)。
First, the
ここで、(x,y)は復号ブロックの左上端の座標、(mvx,mvy)は動きベクトル、widthは輝度成分の画像の幅(SDTVでは720画素)を示している。また、mvx’は動きベクトルの水平方向成分mvxから数2式で求められる。 Here, (x, y) represents the coordinates of the upper left corner of the decoded block, (mvx, mvy) represents the motion vector, and width represents the width of the luminance component image (720 pixels in SDTV). In addition, mvx ′ is obtained from the horizontal direction component mvx of the motion vector by Equation (2).
また、offset(ref,c)は、参照画像の色差成分(Color)のフレームメモリの左上端のアドレスを示す。ここでoffset(ref,c)は必ず16バイトアラインされたアドレスとなる。色差成分Cb/Crに対しては8画素単位に処理が行われるので、xは必ず16の倍数となる。通常、動きベクトルは0.5画素単位の精度を有するが、ここでは簡単のため1画素精度とする。このため,上式により算出されたアドレスradrは一般的には16バイトアラインされていないことになる。 Further, offset (ref, c) indicates the address of the upper left corner of the frame memory of the color difference component (Color) of the reference image. Here, offset (ref, c) is always a 16-byte aligned address. Since the color difference component Cb / Cr is processed in units of 8 pixels, x is always a multiple of 16. Normally, the motion vector has an accuracy of 0.5 pixel unit, but here it is assumed to be 1 pixel accuracy for simplicity. For this reason, the address radr calculated by the above equation is generally not 16-byte aligned.
次に、読み出し制御部105は、復号画像のフレームメモリ(Cb/Cr)144の復号ブロックの左上端のアドレスwadrを数3式のように算出する(ステップS402)。
Next, the
ここで、offset(cur,c)は、復号画像(CURrent)の色差成分のフレームメモリ(Cb/Cr)144の左上端のアドレスを示す。算出されたwadrは必ず16バイトにアラインメントされている。 Here, offset (cur, c) indicates the address of the upper left corner of the frame memory (Cb / Cr) 144 of the color difference component of the decoded image (CURrent). The calculated waddr is always aligned to 16 bytes.
次に、読み出し制御部105によって、参照ブロックの左上端アドレスradrの下位4ビットを0としたアドレス((radr/16)*16)から16バイト(128ビット)の画像データを読み出し、レジスタR0にロードする(ステップS403)。
Next, the
ここで、アドレスradrの下位4ビットを0としたアドレスを求めているのは、ステップS401で算出されたアドレスradrが16バイトアライメントされた位置のアドレスではないため、画像データのレジスタR0へロード処理が行えるように、アドレスradrの直前の16バイトアライメントされた位置のアドレスを求めているものである。 Here, since the address radr calculated in step S401 is not the address at the position aligned by 16 bytes, the address in which the lower 4 bits of the address radr are set to 0 is loaded into the register R0 of the image data. The address of the 16 byte aligned position immediately before the address radr is obtained.
次に、読み出し制御部105によって、参照ブロックの左上端アドレスradrの下位4ビットを0としたアドレスから16バイト隔てて隣接するアドレス((radr/16)*16+16)から16バイト(128ビット)の画像データを読み出し、レジスタR1にロードする(ステップS404)。
Next, the
そして、次に書き込み制御部106によって、制御テーブルから(radr&0x07)番目のバイトシャッフル制御ワードを読み出してレジスタR2にロードする(ステップS405)。ここで、バイトシャッフル制御ワードは、次ステップで実行するSIMD型命令セットで提供されるバイトシャッフル命令において、動き補償処理のためにR0およびR1にロードされた画素から抽出する画素を定めたものである。このバイトシャッフル制御ワードは、参照ブロックのアドレスradrと16バイトアライメントの位置のアドレス差ごとに、レジスタR0にロードした画素データ(8画素)とレジスタR1にロードした画素データ(8画素)の32画素から抽出する16画素のレジスタR0とR1とを連結した状態での位置を予め制御テーブルに登録されている。
Then, the
ここで、参照ブロックのアドレスradrと16バイトアライメントの位置のアドレス差はradr&0x07で算出する。なお、この制御テーブルは、本実施の形態ではメモリ中に保持する他、画像復号化プログラムに保持するように構成してもよい。 Here, the address difference between the address radr of the reference block and the position of the 16-byte alignment is calculated by radr & 0x07. In this embodiment, the control table may be held in the image decoding program in addition to being held in the memory.
図5は、制御テーブルの内容を示す説明図である。radr&0x07の値は、radrの下位4ビットを0にしたアドレス、すなわち参照ブロックのアドレスradrと16バイトアライメントの位置のアドレス差である。 FIG. 5 is an explanatory diagram showing the contents of the control table. The value of radr & 0x07 is an address obtained by setting the lower 4 bits of radr to 0, that is, the address difference between the address radr of the reference block and the position of 16 byte alignment.
また、制御ワードの16個の数値は、レジスタR0とR1とを連結した場合の、先頭位置からのバイト数を示している。 The 16 numerical values of the control word indicate the number of bytes from the head position when the registers R0 and R1 are concatenated.
次に、書き込み制御部106は、バイトシャッフル命令(例えば、bshuffle命令)を実行し、レジスタR2の制御ワードに従って、レジスタR0とR1に格納された画素から動き補償に必要な画素を16個抽出し、その実行結果、すなわち抽出された16個の画素をレジスタR3に格納する(ステップS406)。
Next, the
ここで、バイトシャッフル命令について説明する。バイトシャッフル命令とは、SIMD命令を備えたRISCプロセッサにおいて,2つのレジスタの中から,各バイトごとに2つのレジスタの任意のバイトを取り出す命令である。このバイトシャッフル命令は、16バイトアライメントの位置のアドレスでしかメモリにアクセスできない場合に、メモリの任意のアドレスからデータを読み出しまたはデータの書き込みを行うために設けられた命令である。このようなバイトシャッフル命令としては、例えば,Sun Microsystem(R)社のUltraSPARC−IIIに実装されているSIMD命令であるVIS命令セットで提供されるbshuffle命令や、PowerPCアーキテクチャにおけるAltiVec命令セットのvperm命令も同様の命令が該当する。 Here, the byte shuffle instruction will be described. The byte shuffle instruction is an instruction for extracting an arbitrary byte of two registers for each byte from two registers in a RISC processor having a SIMD instruction. This byte shuffle instruction is an instruction provided to read data from or write data to an arbitrary address in the memory when the memory can be accessed only at an address at a 16-byte alignment position. As such a byte shuffle instruction, for example, a bshuffle instruction provided in the VIS instruction set that is a SIMD instruction implemented in the Ultra SPARC-III of Sun Microsystems (R), or a vperm instruction in the AltVec instruction set in the PowerPC architecture. The same command applies to.
図6は、バイトシャッフル命令の動作を説明するための説明図である。例えば、図6に示すように、レジスタRA(16バイト)にA0からAFの各1バイトの値が格納され、レジスタRB(16バイト)にB0からBFの各1バイトの値が格納されている場合を考える。ここで、レジスタRAとRBとを連結した状態を考え、先頭から1バイトごとに00〜1fまでの番号を振る。制御ワードでかかる番号を指定したデータがバイトシャッフル命令の実行結果として出力される。 FIG. 6 is an explanatory diagram for explaining the operation of the byte shuffle instruction. For example, as shown in FIG. 6, a value of 1 byte of each of A0 to AF is stored in the register RA (16 bytes), and a value of 1 byte of each of B0 to BF is stored in the register RB (16 bytes). Think about the case. Here, considering a state in which the registers RA and RB are connected, numbers from 00 to 1f are assigned for each byte from the top. Data specifying such a number in the control word is output as the execution result of the byte shuffle instruction.
図6の例では、制御ワードに0x0f00030e0018061a051a1b061203080cが設定されているため、バイトシャッフル命令を実行すると、レジスタRA、RBの「0f」、「00」、「03」、「0e」、「00」、「18」、「06」、「1a」、「05」、「1a」、「1b」、「06」、「12」、「03」、「08」、「0c」の位置の各データが図6のバイトシャッフル命令実行後のように抽出されることになる。 In the example of FIG. 6, since 0x0f000030e0018061a051a051a061302080c is set in the control word, when a byte shuffle instruction is executed, “0f”, “00”, “03”, “0e”, “00”, “00” of the registers RA and RB are executed. The data at the positions of “18”, “06”, “1a”, “05”, “1a”, “1b”, “06”, “12”, “03”, “08”, “0c” are shown in FIG. This is extracted after the execution of the byte shuffle instruction.
ここで、上記処理を具体例をあげて説明する。図7は、radrの下位4ビットが4であった場合、すなわちradrが16バイトアライメントのアドレスから4バイトずれていた場合におけるステップ403、S404を実行後のレジスタR0、R1の値、およびステップS406のバイトシャッフル命令実行後のレジスタR3の値の一例を示す説明図である。 Here, the above process will be described with a specific example. FIG. 7 shows the values of the registers R0 and R1 after executing steps 403 and S404 when the lower 4 bits of radr are 4, that is, when radr is shifted by 4 bytes from the 16-byte alignment address, and step S406. It is explanatory drawing which shows an example of the value of the register | resistor R3 after this byte shuffle instruction execution.
radrの下位4ビットが4であった場合には、図5から制御ワードがradr&0x07が4の列「04 05 06 07 10 11 12 13 0c 0d 0e 0f 18 19 1a 1b」となる。このため、図7に示すように、バイトシャッフル命令を実行するとR3に、Cbの画素としてレジスタR0から04、05、06、07の画素と、レジスタR1から10、11、12、13の画素が抽出される。また、Crの画素としてレジスタR0から0c、0d、0e、0fの画素と、レジスタR1から18、19、1a、1bの画素が抽出される。
When the lower 4 bits of radr are 4, the control word becomes the sequence “04 05 06 07 10 11 12 13 0c 0d 0e 0f 18 19
また、図8は、radrの下位4ビットが6であった場合、すなわちradrが16バイトアライメントのアドレスから6バイトずれていた場合におけるステップ503、S504を実行後のレジスタR0、R1の値、およびステップS506のバイトシャッフル命令実行後のレジスタR3の値の一例を示す説明図である。 FIG. 8 shows the values of the registers R0 and R1 after executing step 503 and S504 when the lower 4 bits of radr are 6, that is, when radr is shifted by 6 bytes from the 16-byte alignment address, and It is explanatory drawing which shows an example of the value of the register | resistor R3 after the byte shuffle instruction execution of step S506.
radrの下位4ビットが6であった場合には、図5から制御ワードがradr&0x07が4の列「06 07 10 11 12 13 1415 0e 0f 18 19 1a 1b 1c 1d」となる。このため、図8に示すように、バイトシャッフル命令を実行するとR3に、Cbの画素としてレジスタR0から06、07の画素と、レジスタR1から10、11、12、13、14,15の画素が抽出される。また、Crの画素としてレジスタR0から0e、0fの画素と、レジスタR1から18、19、1a、1b、1c、1dの画素が抽出される。これにより,動き補償に必要なCb/Cr成分を同時に取得することができる。
When the lower 4 bits of radr are 6, the control word becomes the column “06 07 10 11 12 13 1415 0e 0f 18 19
バイトシャッフル命令の実行後、書き込み制御部106は、レジスタR3の内容を復号ブロックの左上端のアドレスwadrから書き込む(ステップS407)。そして、読み出し制御部105は、参照ブロックの次のラインの先頭アドレスを取得してradrに格納し(ステップS408)、さらに復号ブロックの次のラインの先頭アドレスを取得してwadrに格納する(ステップS409)。そして、ステップS403からS409までの処理を8回繰り返し、マクロブロック全ての画素、すなわち8×8画素について上記処理を行う。これにより色差成分の動き補償処理が完了する。
After execution of the byte shuffle instruction, the
次に、色差信号の動き補償処理の前に実行される輝度信号の動き補償処理について説明する。図9は、輝度成分の動き補償処理の手順を示すフローチャートである。なお、画像データの輝度成分については、図2に示すように従来と同様、面順次フォーマットでフレームメモリ(Y)に格納されている。 Next, the luminance signal motion compensation processing executed before the color difference signal motion compensation processing will be described. FIG. 9 is a flowchart showing a procedure of luminance component motion compensation processing. As shown in FIG. 2, the luminance component of the image data is stored in the frame memory (Y) in the frame sequential format as in the conventional case.
まず、読み出し制御部107は、参照画像のフレームメモリ(Y)141の参照ブロックの左上端のアドレスradrを次式のように算出する(ステップS901)。
First, the
ここで、(x,y)は復号ブロックの左上端の座標、(mvx,mvy)は動きベクトル、widthは輝度成分の画像の幅(SDTVでは720画素)を示している。 Here, (x, y) represents the coordinates of the upper left corner of the decoded block, (mvx, mvy) represents the motion vector, and width represents the width of the luminance component image (720 pixels in SDTV).
また、offset(ref,Y)は、参照画像(REFerence)の輝度成分のフレームメモリの左上端のアドレスを示す。なお、offset(ref,Y)は必ず16バイトアラインされたアドレスとなる。 Further, offset (ref, Y) indicates the address of the upper left corner of the frame memory of the luminance component of the reference image (REFerence). Note that offset (ref, Y) is always a 16-byte aligned address.
次に、読み出し制御部105は、復号画像のフレームメモリ(Y)141の復号ブロックの左上端のアドレスwadrを数5式のように算出する(ステップS902)。
Next, the
ここで、offset(cur,Y)は、復号画像(CURrent)の輝度成分のフレームメモリ(Y)141の左上端のアドレスを示す。算出されたwadrは必ず16バイトにアラインメントされている。 Here, offset (cur, Y) indicates the address of the upper left corner of the frame memory (Y) 141 of the luminance component of the decoded image (CURrent). The calculated waddr is always aligned to 16 bytes.
次に、読み出し制御部105によって、参照ブロックの左上端アドレスradrの下位4ビットを0としたアドレスから16バイト(128ビット)の画像データを読み出し、レジスタR0にロードする(ステップS903)。
Next, the
次に、読み出し制御部105によって、参照ブロックの左上端アドレスradrの下位4ビットを0としたアドレスから16バイト隔てて隣接するアドレスから16バイト(128ビット)の画像データを読み出し、レジスタR1にロードする(ステップS904)。
Next, the
そして、次に書き込み制御部106によって、制御テーブルからバイトシャッフル制御ワードを読み出してレジスタR2にロードする(ステップS905)。ここで、輝度成分の動き補償処理で使用する制御テーブルは、図5で示した色差成分の動き補償処理で使用する制御テーブルと異なるものである。
Then, the
次に、書き込み制御部106は、バイトシャッフル命令(例えば、bshuffle命令)を実行し、レジスタR2の制御ワードに従って、レジスタR0とR1に格納された画素から動き補償に必要な画素を16個抽出し、その実行結果、すなわち抽出された16個の画素をレジスタR3に格納する(ステップS906)。
Next, the
バイトシャッフル命令の実行後、書き込み制御部106は、レジスタR3の内容を復号ブロックの左上端のアドレスwadrから書き込む(ステップS907)。そして、読み出し制御部105は、参照ブロックの次のラインの先頭アドレスを取得してradrに格納し(ステップS908)、さらに復号ブロックの次のラインの先頭アドレスを取得してwadrに格納する(ステップS909)。そして、ステップS903からS909までの処理を16回繰り返し、マクロブロック全ての画素、すなわち16×16画素について上記処理を行う。これにより輝度成分の動き補償処理が完了する。
After execution of the byte shuffle instruction, the
なお、ステップS904からS906におけるバイトシャッフル命令に関する処理は、色差成分の動き補償処理と同様に行われる。 Note that the processing related to the byte shuffle instruction in steps S904 to S906 is performed in the same manner as the motion compensation processing for the color difference component.
このように本実施の形態の画像復号化装置では、動き補償処理部108の読み出し制御部106によって、色差成分Cb,Crを8画素ごとに交互に配置変換した画像データから、16画素を単位としてレジスタR0、R1にロードして、書き込み制御部107によって、バイトシャッフル明細によって動き補償処理の対象となる16画素のデータを、予め定められたバイトシャッフル制御ワードに従って抽出しているため、16バイトの容量の一つのレジスタに色差成分CbとCrをそれぞれ8画素ずつ配置して混在させ、CbとCrに対する動き補償処理を、レジスタの無駄な領域を発生させずに同時に行うことができる。色差成分に対する動き補償処理は、CbとCrとで全く共通の処理であるため、その後の動き補償に必要な処理はCbとCrとを独立に処理した場合の半分の時間で行うことができ、SIMD型プロセッサの並列処理を効果的に使用して動き補償処理を行うことができる。これにより、従来の輝度成分と色差成分の動き補償の処理ループ数が同等であるため処理効率の向上が望めなかった従来の画像復号化装置に比べ、色差成分の処理ループ数が輝度成分に対する動き補償処理の処理ループの半分となり、動き補償処理全体として25%程度の処理速度向上を図ることができる。
As described above, in the image decoding apparatus according to the present embodiment, the
また、本実施の形態の画像復号化装置では、面順次フォーマットの色差成分CbとCrの画素データを、16画素ごとに交互になるように配置して1ラインの中に混在させているので、1ライン中の合計の画素数が16の倍数となり、この結果、16バイトアライメントでの画像メモリへのアクセスしか行えないSIMD型プロセッサにおいても、右端の画素データを処理する際に他の領域の画素データに対して悪影響を与えずに動き補償処理を行うことができる。 Further, in the image decoding apparatus of the present embodiment, the pixel data of the color difference components Cb and Cr in the frame sequential format are alternately arranged every 16 pixels and mixed in one line. The total number of pixels in one line is a multiple of 16, and as a result, even in SIMD type processors that can only access the image memory with 16-byte alignment, pixels in other regions are processed when processing the rightmost pixel data. Motion compensation processing can be performed without adversely affecting data.
なお、本実施の形態の画像復号化装置では、面順次フォーマットの画像データを色差成分毎に交互に配置しているが、色差成分を1画素毎に配置した点順次フォーマットの画像データについても上述した動き補償処理を適用することができる。 In the image decoding apparatus according to the present embodiment, the image data in the frame sequential format is alternately arranged for each color difference component. However, the image data in the dot sequential format in which the color difference component is arranged for each pixel is also described above. Applied motion compensation processing.
また、本実施の形態の画像復号化装置では、本発明の画像処理をMPEGの色差成分に対する動き補償処理に適用しているが、同時に異なる成分の画像データに対する画像処理を行うものであれば、他の画像処理についても本発明を適用することができる。 In the image decoding apparatus of the present embodiment, the image processing of the present invention is applied to motion compensation processing for MPEG color difference components. However, if image processing is performed on image data of different components at the same time, The present invention can also be applied to other image processing.
以上のように、本発明にかかる画像処理装置、画像処理方法および画像処理プログラムは、画像データの画像処理に有用であり、特に、色差成分Cb,Crに対する動き補償処理を行う画像復号化装置に適している。 As described above, the image processing apparatus, the image processing method, and the image processing program according to the present invention are useful for image processing of image data, and in particular, for an image decoding apparatus that performs motion compensation processing on color difference components Cb and Cr. Are suitable.
100 デコーダ
101 可変長復号化部
102 逆量子化部
103 逆スキャン部
104 逆DCT部
105 変換部
106 読み出し制御部
107 書き込み制御部
108 動き補償部
110 デコーダ制御部
120 ストリームバッファ
130 ストリームバッファ制御部
140 画像メモリ
141 フレームメモリ(Y)
144 フレームメモリ(Cb/Cr)
DESCRIPTION OF
144 Frame memory (Cb / Cr)
Claims (11)
前記画像データの異なる色成分であって前記SIMD型プロセッサの並列処理命令が同時に処理可能な画素数Nよりも少ない複数の画素データを同時に処理する場合に、N/M(M:整数)画素ごとに各成分の画素データが交互になるように配置変換する変換ステップと、
前記変換ステップにより配置変換された複数の画素データを、N画素を単位として2N画素分読み出す読み出しステップと、
前記SIMD型プロセッサで提供されるバイトシャッフル命令を実行して前記読み出しステップによって読み出された2N画素の画素データから、画像処理対象のN/M画素の画素データを抽出し、抽出されたN/M画素の画素データに対して画像処理を施す画像処理ステップと、
を含むことを特徴とする画像処理方法。 An image processing method for performing image processing on image data by a single instruction multiple data (SIMD) type parallel processing processor that processes a plurality of data with one instruction and performs read / write processing on a memory at a predetermined address position,
Every N / M (M: integer) pixels when simultaneously processing a plurality of pixel data having different color components of the image data and smaller than the number N of pixels that can be processed simultaneously by the parallel processing command of the SIMD processor A conversion step for converting the arrangement so that the pixel data of each component are alternately arranged;
A reading step of reading a plurality of pixel data arranged and converted in the conversion step by 2N pixels in units of N pixels;
By executing a byte shuffle instruction provided by the SIMD type processor, pixel data of N / M pixels to be image-processed is extracted from the pixel data of 2N pixels read by the reading step, and the extracted N / M An image processing step for performing image processing on pixel data of M pixels;
An image processing method comprising:
前記画像処理ステップは、前記バイトシャッフル命令を実行して前記読み出しステップによって読み出された2N画素の画素データから、動き補償処理対象のN/2画素の画素データを抽出し、抽出されたN/2画素の画素データに対して動き補償処理を施すことを特徴とする請求項4に記載の画像処理方法。 In the conversion step, when a plurality of pixel data which are different color difference components of the image data and are smaller than the number of pixels N are processed simultaneously, the plurality of pixel data is processed for every N / 2 (M: integer) pixels. Change the arrangement so that the pixel data of each component alternate,
In the image processing step, pixel data of N / 2 pixels to be subjected to motion compensation processing is extracted from the pixel data of 2N pixels read out by the reading step by executing the byte shuffle instruction, and the extracted N / 5. The image processing method according to claim 4, wherein motion compensation processing is performed on pixel data of two pixels.
プログラムを記憶し、前記SIMD型並列処理プロセッサがアクセス可能なメモリと、
画像データを記憶し、前記SIMD型並列処理プロセッサがアクセス可能な画像メモリと、を備え、
前記プログラムは、前記SIMD型並列処理プロセッサを、
前記画像データの異なる色成分であって前記SIMD型プロセッサの並列処理命令が同時に処理可能な画素数Nよりも少ない複数の画素データを同時に処理する場合に、前記複数の画素データをN/M(M:整数)画素ごとに各成分の画素データが交互になるように配置変換する変換手段と、
前記変換手段によって配置変換された複数の画素データを、N画素を単位として2N画素分読み出す読み出し手段と、
前記SIMD型プロセッサで提供されるバイトシャッフル命令を実行して前記読み出し手段によって読み出された2N画素の画素データから、画像処理対象のN/M画素の画素データを抽出し、抽出されたN/M画素の画素データに対して画像処理を施す画像処理手段
として機能させることを特徴とする画像処理装置。 A SIMD (Single Instruction Multiple Data) type parallel processing processor that processes a plurality of data with a single instruction and performs read / write processing on the image memory at a predetermined address position;
A memory for storing a program and accessible by the SIMD type parallel processing processor;
An image memory for storing image data and accessible by the SIMD type parallel processing processor,
The program includes the SIMD type parallel processing processor,
When processing a plurality of pieces of pixel data which are different color components of the image data and are less than the number N of pixels which can be processed simultaneously by the SIMD processor parallel processing instructions, the plurality of pieces of pixel data are converted to N / M ( M: integer) conversion means for converting the arrangement so that pixel data of each component is alternated for each pixel;
Reading means for reading a plurality of pixel data arranged and converted by the converting means for 2N pixels in units of N pixels;
By executing a byte shuffle instruction provided by the SIMD type processor, pixel data of N / M pixels to be image-processed is extracted from pixel data of 2N pixels read by the reading unit, and the extracted N / M An image processing apparatus that functions as an image processing unit that performs image processing on pixel data of M pixels.
前記画像処理手段は、前記バイトシャッフル命令を実行して前記読み出し手段によって読み出された2N画素の画素データから、動き補償処理対象のN/2画素の画素データを抽出し、抽出されたN/2画素の画素データに対して動き補償処理を施すことを特徴とする請求項9に記載の画像処理装置。 The conversion means processes the plurality of pixel data for each N / 2 (M: integer) pixels when simultaneously processing a plurality of pixel data that are different color difference components of the image data and are smaller than the number N of pixels. Change the arrangement so that the pixel data of each component alternate,
The image processing means extracts the pixel data of N / 2 pixels subject to motion compensation processing from the pixel data of 2N pixels read by the reading means by executing the byte shuffle instruction, and extracts the extracted N / N The image processing apparatus according to claim 9, wherein motion compensation processing is performed on pixel data of two pixels.
前記画像データの異なる色成分であって前記SIMD型プロセッサの並列処理命令が同時に処理可能な画素数Nよりも少ない複数の画素データを同時に処理する場合に、前記複数の画素データをN/M(M:整数)画素ごとに各成分の画素データが交互になるように配置変換する変換手順と、
前記変換手順によって配置変換された複数の画素データを、N画素を単位として2N画素分読み出す読み出し手順と、
前記SIMD型プロセッサで提供されるバイトシャッフル命令を実行して前記読み出し手順によって読み出された2N画素の画素データから、画像処理対象のN/M画素の画素データを抽出し、抽出されたN/M画素の画素データに対して画像処理を施す画像処理手順と、
をコンピュータに実行させる画像処理プログラム。 An image processing program that performs image processing on image data by a SIMD (Single Instruction Multiple Data) type parallel processing processor that processes a plurality of data with one instruction and performs read / write processing on a memory at a predetermined address position,
When processing a plurality of pieces of pixel data which are different color components of the image data and are less than the number N of pixels which can be processed simultaneously by the SIMD processor parallel processing instructions, the plurality of pieces of pixel data are converted to N / M ( M: integer) a conversion procedure for converting the arrangement so that pixel data of each component is alternated for each pixel;
A reading procedure for reading out a plurality of pixel data arranged and converted by the conversion procedure for 2N pixels in units of N pixels,
The N / M pixel data to be image-processed is extracted from the 2N pixel pixel data read out by the readout procedure by executing the byte shuffle instruction provided by the SIMD type processor, and the extracted N / M An image processing procedure for performing image processing on pixel data of M pixels;
An image processing program for causing a computer to execute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004025897A JP2005218055A (en) | 2004-02-02 | 2004-02-02 | Apparatus, method and program for processing image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004025897A JP2005218055A (en) | 2004-02-02 | 2004-02-02 | Apparatus, method and program for processing image |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005218055A true JP2005218055A (en) | 2005-08-11 |
Family
ID=34908133
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004025897A Withdrawn JP2005218055A (en) | 2004-02-02 | 2004-02-02 | Apparatus, method and program for processing image |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005218055A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100863515B1 (en) | 2006-10-13 | 2008-10-15 | 연세대학교 산학협력단 | Method and Apparatus for decoding video signal |
JP2010097591A (en) * | 2008-10-15 | 2010-04-30 | Samsung Electronics Co Ltd | Data processor and method |
JP2012511870A (en) * | 2008-12-09 | 2012-05-24 | マイクロソフト コーポレーション | Remote desktop protocol compression acceleration using single instruction multiple patch instructions |
JP2017529601A (en) * | 2014-09-25 | 2017-10-05 | インテル・コーポレーション | Bit shuffle processor, method, system, and instructions |
CN114647467A (en) * | 2020-12-21 | 2022-06-21 | 深信服科技股份有限公司 | Watermark updating method, device, system and storage medium |
-
2004
- 2004-02-02 JP JP2004025897A patent/JP2005218055A/en not_active Withdrawn
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100863515B1 (en) | 2006-10-13 | 2008-10-15 | 연세대학교 산학협력단 | Method and Apparatus for decoding video signal |
JP2010097591A (en) * | 2008-10-15 | 2010-04-30 | Samsung Electronics Co Ltd | Data processor and method |
KR101610194B1 (en) * | 2008-10-15 | 2016-04-07 | 삼성전자주식회사 | Data Processing Apparatus and Method for Image Processing |
JP2012511870A (en) * | 2008-12-09 | 2012-05-24 | マイクロソフト コーポレーション | Remote desktop protocol compression acceleration using single instruction multiple patch instructions |
JP2017529601A (en) * | 2014-09-25 | 2017-10-05 | インテル・コーポレーション | Bit shuffle processor, method, system, and instructions |
US10713044B2 (en) | 2014-09-25 | 2020-07-14 | Intel Corporation | Bit shuffle processors, methods, systems, and instructions |
CN114647467A (en) * | 2020-12-21 | 2022-06-21 | 深信服科技股份有限公司 | Watermark updating method, device, system and storage medium |
CN114647467B (en) * | 2020-12-21 | 2024-05-28 | 深信服科技股份有限公司 | Watermark updating method, device, system and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101985004B1 (en) | Coding apparatus, decoding apparatus, coding method, decoding method, and computer-readable storage medium | |
JP5115498B2 (en) | Image coding apparatus, image coding control method, and program | |
JPWO2010052837A1 (en) | Image decoding apparatus, image decoding method, integrated circuit, and program | |
JP2010119084A (en) | High-speed motion search apparatus and method | |
JP2004336451A (en) | Image decoding unit, image encoder and encoding method employing it, and image decoder and decoding method | |
JP3940672B2 (en) | Image processing apparatus and image processing method | |
TW525391B (en) | Method and apparatus for performing motion compensation in a texture mapping engine | |
JP4675383B2 (en) | Image decoding apparatus and method, and image encoding apparatus | |
JP2006279574A (en) | Decoder and decoding method | |
US20050047502A1 (en) | Method and apparatus for the efficient representation of interpolated video frames for motion-compensated coding | |
JP2005218055A (en) | Apparatus, method and program for processing image | |
US9918079B2 (en) | Electronic device and motion compensation method | |
US8644380B2 (en) | Integer pixel motion estimation system, motion estimation system for quarter-pixel luminance, motion estimation system for quarter-pixel chrominance, motion estimation system for combined luminance, motion estimation system for combined luminance and chrominance, and motion estimation system for quarter-pixel luminance and chrominance | |
JP4419608B2 (en) | Video encoding device | |
JP4779977B2 (en) | Image encoding / decoding device | |
JP2009130599A (en) | Moving picture decoder | |
KR20030057690A (en) | Apparatus for video decoding | |
JP2002374537A (en) | Decoder and its method | |
JP6679777B2 (en) | Image coding device, image coding method and program, image decoding device, image decoding method and program | |
JP2009272948A (en) | Moving image decoding apparatus and moving image decoding method | |
US20050025247A1 (en) | Apparatus for parallel calculation of prediction bits in a spatially predicted coded block pattern and method thereof | |
JP2005260639A (en) | Signal processor and signal processing method | |
KR100836534B1 (en) | A low power sub-pixel interpolator architecture | |
JP2007295333A (en) | Image decoding processing circuit, method, and program, and semiconductor integrated circuit | |
JP2010041353A (en) | Moving image decoding method, decoding device and decoding program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A761 | Written withdrawal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A761 Effective date: 20070621 |