JP4351903B2 - Video encoding device - Google Patents
Video encoding device Download PDFInfo
- Publication number
- JP4351903B2 JP4351903B2 JP2003427718A JP2003427718A JP4351903B2 JP 4351903 B2 JP4351903 B2 JP 4351903B2 JP 2003427718 A JP2003427718 A JP 2003427718A JP 2003427718 A JP2003427718 A JP 2003427718A JP 4351903 B2 JP4351903 B2 JP 4351903B2
- Authority
- JP
- Japan
- Prior art keywords
- processing
- processor
- stage
- encoding
- processing unit
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Description
本発明は、複数のプロセッシングユニットを用いて、動画像を符号化する動画像符号化装置に関するものである。 The present invention uses a plurality of processing units, but about the video encoding KaSo location for coding a moving picture.
コンピュータ技術の進化に伴い、MPEG−2/MPEG−4に代表される動画像符号化および復号化をソフトウェアベースで行う技術が一般化してきている。この技術を利用して、パーソナルコンピュータ上でソフトウェアによりテレビ放送の画像符号化復号化を行い、パーソナルコンピュータをハードディスクレコーダとして使用するような利用形態が知られている。 With the advancement of computer technology, a technology for performing video coding and decoding represented by MPEG-2 / MPEG-4 on a software basis has become common. Utilizing this technology, there is known a utilization form in which a personal computer is used as a hard disk recorder by performing image coding / decoding of a television broadcast by software on the personal computer.
一方、次世代のゲーム機やホームサーバ、デジタルテレビジョンなどに搭載されるCPUとして、高速なSIMD(Single Instruction Multiple Data)プロセッサを複数用意し、それらが協調して処理を実行するモデルが提案されている。 On the other hand, a model has been proposed in which a plurality of high-speed SIMD (Single Instruction Multiple Data) processors are prepared as CPUs installed in next-generation game machines, home servers, digital televisions, etc., and they execute processing in cooperation with each other. ing.
例えば、同一のISA(Instruction Set Architecture)を持つ8個の付加処理ユニット(APU)が共用ダイナミックランダムアクセスメモリ(DRAM)を用いてリアルタイムに通信を行い、処理を行う装置がある(特許文献1参照)。 For example, there is an apparatus in which eight additional processing units (APUs) having the same ISA (Instruction Set Architecture) communicate and process in real time using a shared dynamic random access memory (DRAM) (see Patent Document 1). ).
これによれば、1つのプロセッサエレメント(PE)は、処理ユニット(PU)、ダイレクトメモリアクセスコントローラ(DMAC)、および8個のAPUから構成される。PUは、処理のスケジュール管理と装置の全般的管理を行う。そして、APUはスケジュールに従って並列的に処理を実行する。 According to this, one processor element (PE) is composed of a processing unit (PU), a direct memory access controller (DMAC), and eight APUs. The PU performs processing schedule management and general management of devices. And APU performs a process in parallel according to a schedule.
本装置は、TCP/IPネットワークからパケット化されたMPEGデータを取得し、当該データを復号化する一連の処理を行う。この一連の処理のうちMPEGデータの抽出およびMPEGデータの復号化はAPUにより行われる。このように、長時間を要する処理をAPUに行わせることにより、処理の高速化を図っている。 This apparatus obtains packetized MPEG data from a TCP / IP network and performs a series of processes for decoding the data. In this series of processing, extraction of MPEG data and decoding of MPEG data are performed by APU. In this way, the processing speed is increased by causing the APU to perform processing that requires a long time.
以上のように、複数のAPUの協働により処理の高速化を図る技術が知られているが、各APUが有するローカルメモリのメモリ容量は非常に小さい。従って、メモリを大量に消費する演算や、大量のデータを利用する演算を行う場合には、APUとDRAMの間での情報の授受が必要となる。そして、このようなAPUからDRAMへのアクセスは処理の遅延の主な要因となる。 As described above, a technique for speeding up processing by cooperation of a plurality of APUs is known, but the memory capacity of a local memory included in each APU is very small. Therefore, when performing calculations that consume a large amount of memory or operations that use a large amount of data, it is necessary to exchange information between the APU and the DRAM. Such access from the APU to the DRAM is a major factor in processing delay.
本発明は、上記に鑑みてなされたものであって、上述のような処理の遅延を抑制し、高
速に符号化処理を行うことのできる動画像符号化装置を提供することを
目的とする。
The present invention was made in view of the above, to suppress the delay in processing as described above, and an object thereof is to provide a moving picture coding KaSo location capable of performing encoding processing at high speed.
上述した課題を解決し、目的を達成するために、本発明は、動画像を符号化する動画像符号化装置であって、前記符号化の処理を指示し、かつ前記符号化に関する処理を行う第1プロセッサと、前記第1プロセッサからの指示に基づいて、前記符号化に関する処理を行う第2プロセッサと、前記符号化に関する情報を保持するメインメモリと、前記メインメモリと前記第1プロセッサの間、および前記メインメモリと前記第2プロセッサとの間のデータの授受を制御するメインメモリ制御手段と、前記第2プロセッサから直接アクセス可能なローカルメモリとを備え、前記第1プロセッサは、前記メインメモリ制御手段を介して前記メインメモリに保持される情報を参照し、前記符号化に関する処理として、前処理、動き検出処理、動き補償処理、DCT処理、逆離散コサイン変換処理、量子化処理、可変長符号化処理及びシンタックス生成処理の少なくとも1つのうち全部又は一部の処理であって且つ処理にかかる演算量が予め定められた演算量よりも小さい第1処理を行い、前記第2プロセッサは、前記ローカルメモリに保持される情報を参照して、前記第1プロセッサからの指示に基づいて、前記符号化に関する処理として、前処理、動き検出処理、動き補償処理、DCT処理、逆離散コサイン変換処理、量子化処理、可変長符号化処理及びシンタックス生成処理のうち少なくとも1つのうち全部又は一部の処理であって且つ処理にかかる演算量が予め定められた演算量よりも大きい第2処理を行い、前記第2プロセッサが行う前記第2処理全体は、複数のステージに分割され、前記メインメモリは、各ステージにおいて用いられる情報をさらに保持し、前記ローカルメモリは、前記第2プロセッサが一の前記ステージにおいて前記第2処理を実行するときに、前記メインメモリ制御手段を介して前記メインメモリから当該ステージにおいて用いられる情報を取得し、当該ステージにおいて用いられる情報を保持することを特徴とする。 In order to solve the above-described problems and achieve the object, the present invention is a moving picture coding apparatus for coding a moving picture, instructing the coding process and performing the process related to the coding. A first processor; a second processor that performs processing relating to the encoding based on an instruction from the first processor; a main memory that holds information relating to the encoding; and between the main memory and the first processor And a main memory control means for controlling data exchange between the main memory and the second processor, and a local memory that can be directly accessed from the second processor, wherein the first processor controls the main memory control. The information stored in the main memory is referred to via the means, and the processing related to the encoding includes preprocessing, motion detection processing, motion compensation Management, DCT processing, inverse discrete cosine transform process, a quantization process, the amount of calculation and according to the process and at least one of whole or a part process of variable length coding and syntax generation processing predetermined The second processor performs a first process smaller than the amount of computation, and the second processor refers to the information held in the local memory and, based on an instruction from the first processor, All or part of at least one of processing, motion detection processing, motion compensation processing, DCT processing, inverse discrete cosine transform processing, quantization processing, variable length coding processing, and syntax generation processing, and A second process in which the amount of calculation required for the process is larger than a predetermined amount of calculation is performed, and the entire second process performed by the second processor is divided into a plurality of stages. The main memory further holds information used in each stage, and the local memory is connected via the main memory control means when the second processor executes the second process in one stage. Information used in the stage is acquired from the main memory, and information used in the stage is held.
本発明にかかる動画像符号化装置は、符号化の処理のうち比較的大きな演算量の処理を、メインメモリに直接アクセス可能な第1プロセッサに担当させ、符号化の処理のうち比較的小さな演算量の処理を、メインメモリには直接アクセスできないが、ローカルメモリに直接アクセス可能な第2プロセッサに担当させる。このように、符号化に含まれる複数の処理を第1プロセッサおよび第2プロセッサに分担させることにより、処理の高速化を図ることができるという効果を奏する。また、複数のステージに分割される第2処理の一のステージにおいて処理を第2プロセッサが実行するときに、ローカルメモリがメインメモリ制御手段を介してメインメモリから当該ステージにおいて用いられる情報を取得し、当該ステージにおいて用いられる情報を保持することにより、処理の高速化と共に、ローカルメモリのメモリ量を低減させることができるという効果を奏する。 The moving picture encoding apparatus according to the present invention causes a first processor that can directly access a main memory to perform a process with a relatively large amount of calculation in the encoding process, and a relatively small amount of calculation in the encoding process. This processing is assigned to the second processor that cannot directly access the main memory but can directly access the local memory. As described above, by causing the first processor and the second processor to share a plurality of processes included in the encoding, there is an effect that the processing can be speeded up. Further, when the second processor executes the process in one stage of the second process divided into a plurality of stages, the local memory acquires information used in the stage from the main memory via the main memory control means. By holding the information used in the stage, it is possible to increase the processing speed and reduce the amount of local memory.
以下に、本発明にかかる動画像符号化装置の実施例を図面に基づいて詳細に説明する。なお、この実施例によりこの発明が限定されるものではない。 It will be described below in detail with reference to examples of video coding KaSo location according to the present invention with reference to the accompanying drawings. Note that the present invention is not limited to the embodiments.
図1は、本発明の動画像符号化装置10のハードウェア構成を示すブロック図である。動画像符号化装置10は、プロセッサエレメント100とDRAM(Dynamic Random Access Memory)110とを有している。さらにプロセッサエレメント100は、処理ユニット102と、DMAC(Direct Memory Access Controller)104と、複数の付加処理ユニット、すなわち第1付加処理ユニット106a,第2付加処理ユニット106b・・・とを有している。
FIG. 1 is a block diagram showing a hardware configuration of a moving image encoding
なお、ここで、本実施の形態にかかる処理ユニット102および付加処理ユニット106は、それぞれ本発明の第1プロセッサおよび第2プロセッサを構成する。また、本実施の形態のDRAM110およびDMAC104は、それぞれ本発明のメインメモリおよびメインメモリ制御手段を構成する。
Here, the
処理ユニット102は、動画像符号化装置10の全体を統括する。DRAM110は、処理対象となる動画像データおよび動画像データに対する符号化処理にかかるプログラム等を保持している。DMAC104は、DRAM110から取得した情報を処理ユニット102または付加処理ユニット106に送る。さらに処理ユニット102および付加処理ユニット106から取得した情報をDRAM110に送る。このように、DMAC104は、DRAM110とプロセッサエレメント100の間のインターフェースとして機能する。また、各付加処理ユニット106は、処理ユニット102からの指示により、符号化に関する処理を行う。
The
図2は、図1に示す第1付加処理ユニット106aの詳細な構成を示すブロック図である。付加処理ユニット106aは、ローカルメモリ1060と、レジスタ1062と、第1浮動少数点演算ユニット1064a,第2浮動小数点演算ユニット1064b,・・・と、第1整数演算ユニット1066a,第2整数演算ユニット1066b・・・とを有している。
FIG. 2 is a block diagram showing a detailed configuration of the first
第1付加処理ユニット106aは、複数の浮動小数点演算ユニットおよび複数の整数演算ユニットを有している。第1付加処理ユニット106aは、これらの協働により高速演算を行うことができる。
The first
ローカルメモリ1060は、128キロバイト程度の比較的小さいSRAM(Static Random Access Memory)で構成されている。付加処理ユニット106は、ローカルメモリ1060が保持するプログラムおよびデータを利用して動作する。また、DMAC104に対してDRAM110と付加処理ユニット106の間のデータ転送要求を行う。付加処理ユニット106は、DMAC104に接続されたDRAM110を直接アクセスすることはできない。
The
付加処理ユニット106がプログラムを実行する場合、処理ユニット102がDMAC104を制御し、DRAM110から付加処理ユニット106のローカルメモリ1060にオブジェクトプログラムと関連するスタックフレームが転送される。次いで、処理ユニット102が付加処理ユニット106にプログラムを実行させる旨のコマンドを発行する。そして、付加処理ユニット106は、処理ユニット102から発行されたコマンドに基づいて、プログラムの実行を開始する。付加処理ユニット106はまた、プログラムの結果をDMAC104を介してDRAM110に転送する。付加処理ユニット106は、処理が完了すると処理ユニット102に対し、処理が完了したことを示す割り込みを発生させるように指示する。
When the additional processing unit 106 executes the program, the
なお、図2を参照しつつ第1付加処理ユニット106aの詳細な構成について説明したが、第2付加処理ユニット106b等の詳細な構成は、第1付加処理ユニット106aの詳細な構成と同様である。
Although the detailed configuration of the first
図3は、プロセッサエレメント100における符号化処理を示すフローチャートである。まず、付加処理ユニット106は、DMAC104を介して動画像データを取得し、符号化効率を高めるための前処理を行う (ステップS100)。次に、前方向動き検出(ステップS102)および後方向動き検出(ステップS104)を順に行う。次に、動き補償を行う(ステップS106)。次に、動き補償により得られた残差信号に対して離散コサイン変換を行う(ステップS108)。次に、量子化を行い(ステップS110)、続いて可変長符号化を行う(ステップS112)。
FIG. 3 is a flowchart showing an encoding process in the
一方、動き検出および動き補償を行うために、量子化(ステップS110)を行った後、逆量子化を行い(ステップS120)、続いて逆離散コサイン変換を行う(ステップS122)。以上の処理は、全て付加処理ユニット106により行われる。 On the other hand, in order to perform motion detection and motion compensation, after performing quantization (step S110), inverse quantization is performed (step S120), and then inverse discrete cosine transform is performed (step S12 2 ). All of the above processing is performed by the additional processing unit 106.
以上のように、付加処理ユニット106にピクチャー層以下のマクロブロック単位の処理を割り当てるのが望ましい。ピクチャー層以下の処理は、処理に要するメモリ量が比較的小さくて済むので、付加処理ユニット106による処理に適している。 As described above, it is desirable to assign processing in units of macroblocks below the picture layer to the additional processing unit 106. The processing below the picture layer is suitable for processing by the additional processing unit 106 because the amount of memory required for processing is relatively small.
動き検出(ステップS102,ステップS104)、動き補償(ステップS106)およびDCT処理(ステップS108)において必要な演算量は非常に大きい。このように、演算量、すなわち演算負荷が大きい処理は、付加処理ユニット106に割り当てるのが望ましい。付加処理ユニット106は、図2において説明したように、複数の浮動少数点演算ユニット1064および複数の整数演算ユニット1066により、高速に処理を行うことができるので、処理ユニット102が処理する場合に比べてより高速に処理を行うことができる。
The amount of computation required for motion detection (step S102, step S104), motion compensation (step S106), and DCT processing (step S108) is very large. As described above, it is desirable to assign a process with a large calculation amount, that is, a calculation load to the additional processing unit 106. As described with reference to FIG. 2, the additional processing unit 106 can perform processing at a high speed by the plurality of floating point arithmetic units 1064 and the plurality of integer arithmetic units 1066, so that the
なお、演算負荷の大小を判断するための閾値を予め定めておいてもよい。この場合は、当該閾値と演算量とを比較することにより、処理ユニット102および付加処理ユニット106のいずれに割り当てるかを判断する。
Note that a threshold value for determining the magnitude of the calculation load may be determined in advance. In this case, it is determined which of the
このように、所定の演算量を閾値として、閾値を基準に付加処理ユニット106に分担させる処理および処理ユニット102に分担させる処理を定めることにより、全体として処理の高速化を図ることができる。
As described above, the processing speed can be increased as a whole by defining the processing to be assigned to the additional processing unit 106 and the processing to be assigned to the
また、ピクチャー層以下の処理は、繰り返し処理が多い。このように繰り返し処理が多い場合も、高速な処理が可能な付加処理ユニット106による処理に適している。このように、各機能に適した処理を割り当てることにより、全体として処理の効率化を図ることができる。 In addition, the processing below the picture layer is often repeated. Thus, even when there are many repetitive processes, it is suitable for processing by the additional processing unit 106 capable of high-speed processing. In this way, by assigning processes suitable for each function, it is possible to improve the efficiency of the process as a whole.
また、上述の付加処理ユニット106による処理とは別に、シンタックスの生成が行われる(ステップS130)。シンタックス処理(ステップS130)は、処理ユニット102が行う。
In addition to the processing performed by the additional processing unit 106, syntax generation is performed (step S130). The syntax processing (step S130) is performed by the
シンタックス処理にかかる演算負荷は小さい。しかし、処理において大量のテーブルを使用する。そこで、メモリ容量の大きなDRAM110との協働により処理を行うことにより、処理の効率化を図るのが望ましい。具体的には、処理ユニット102は、DMAC104を介してDRAM110に直接アクセスし、DRAM110に保持されているテーブルを参照しつつシンタックス処理を行う。このように、処理ユニット102には、ピクチャー層よりも上位のシンタックス生成を割り当てるのが望ましい。
The calculation load for syntax processing is small. However, a large number of tables are used in processing. Therefore, it is desirable to improve processing efficiency by performing processing in cooperation with the
以上で、符号化処理が完了する。以上のように、符号化処理を処理ユニット102および付加処理ユニット106に分担することにより、効率的かつ高速に処理を行うことができる。
Thus, the encoding process is completed. As described above, the encoding process is shared between the
なお、プロセッサエレメント100における符号化処理は一般的なMPEGによる符号化処理と同様である。
The encoding process in the
図3を参照しつつ説明した付加処理ユニット106の処理は、複数のステージに分割されている。本実施の形態においては、付加処理ユニット106の処理は5つのステージに分割されている。すなわち、動画像符号化処理は、前処理(ステップS100)を行う第1ステージと、前方向動き検出(ステップS102)を行う第2ステージと、後方向動き検出(ステップS104)を行う第3ステージと、動き補償(ステップS106)およびDCT処理(ステップS108)を行う第4ステージと、量子化(ステップS110)、可変長符号化(ステップS112)、逆量子化(ステップS120)および逆離散コサイン変換(ステップS122)を行う第5ステージを有している。 The processing of the additional processing unit 106 described with reference to FIG. 3 is divided into a plurality of stages. In the present embodiment, the processing of the additional processing unit 106 is divided into five stages. That is, the moving image encoding process includes a first stage that performs pre-processing (step S100), a second stage that performs forward motion detection (step S102), and a third stage that performs backward motion detection (step S104). A fourth stage for performing motion compensation (step S106) and DCT processing (step S108), quantization (step S110), variable length coding (step S112), inverse quantization (step S120), and inverse discrete cosine transform A fifth stage for performing (Step S122) is provided.
付加処理ユニット106による第1ステージの処理の実行中は、ローカルメモリ1060は、第1ステージにおいて実行されるプログラム、第1ステージにおける処理の対象となる動画像データおよび参照されるデータ等を保持している。そして、第1ステージにおける処理が完了すると、第1ステージにおいて実行されるプログラム等がDMAC104を介して付加処理ユニット106からDRAM110に退避される。
During the execution of the first stage processing by the additional processing unit 106, the
そして、第2ステージにおいて実効されるプログラム等がDMAC104を介してDRAM110から付加処理ユニット106に書き込まれる。このように、DRAM110へのアクセスは、第1ステージから第2ステージへの切り替り、第2ステージから第2ステージへの切り替りなど、各ステージの切り替りのタイミングにおいてのみ行われる。
Then, a program executed in the second stage is written from the
各ステージに含める処理は、付加処理ユニット106のローカルメモリ1060の大きさ、および付加処理ユニット106における演算速度等に基づいて定められている。すなわち、ローカルメモリ1060のメモリ容量において保持可能な最大限のデータ量の処理を1つのステージとしている。
The processing included in each stage is determined based on the size of the
符号化処理は、いくつもの複雑な処理を含む。従って、これらの処理をソフトウェアで実現するためのプログラムのデータ量は大きい。また、動き検出や動き補償は、参照画像、対象画像および動き補償画像などデータ量の多いデータを対象とするため大量にメモリを必要とする。また、可変長符号化は可変長符号化テーブルを保持して処理を行うため大量のメモリを必要とする。 The encoding process includes a number of complicated processes. Therefore, the data amount of the program for realizing these processes by software is large. In addition, since motion detection and motion compensation target data with a large amount of data such as a reference image, a target image, and a motion compensation image, a large amount of memory is required. Also, variable length coding requires a large amount of memory to perform processing while holding a variable length coding table.
これに対して、ローカルメモリ1060のメモリ容量は小さいので、符号化処理に利用すべきプログラムおよびデータを一度にローカルメモリ1060に保持させることはできない。従って、付加処理ユニット106は、必要に応じてプログラムやデータをダイナミックにDRAM110から取得し、さらにDRAM110に書き込む必要が生じる。
On the other hand, since the memory capacity of the
しかし、DRAM110へのアクセスを含む処理は長時間を要し、全体として処理の遅延を招く主な要因となる。そこで、上述のように、DRAM110にアクセスする頻度を最小限に留めることにより、DRAM110へのアクセスに起因する処理の遅延を避けることができる。
However, processing including access to the
以下、図4から図7を参照しつつ、各ステージにおけるデータの授受について説明する。 Hereinafter, data exchange in each stage will be described with reference to FIGS.
図4は、第1ステージにおける動画像データの流れを示す図である。第1ステージにおいては、まず、DMAC104は、DRAM110から動画像データを取得する。そして、DMAC104は、処理ユニット102からの指示に基づいて、動画像データをスライスを最少単位として各付加処理ユニット106に分配する。ここで、スライスとは、動画像を構成する静止画の横方向の1ライン分のことである。なお、動画像データの分配については後述する。
FIG. 4 is a diagram showing a flow of moving image data in the first stage. In the first stage, first, the
各付加処理ユニット106は、DMAC104から受け取った動画像データに対して前処理(ステップS200)を行う。そして、前処理が施された動画像データは、DMAC104を介してDRAM110に書き戻される。
Each additional processing unit 106 performs preprocessing (step S200) on the moving image data received from the
前処理(ステップS100)としては、様々な種類の処理が想定される。具体的には、例えば、4:2:2→4:2:0変換、3:2プルダウン検出、ノイズ除去などがある。各処理にかかるプログラムの容量やデータ容量は、処理毎に異なる。そこで、これを1つのステージとしている。 Various types of processing are assumed as the preprocessing (step S100). Specifically, there are 4: 2: 2 → 4: 2: 0 conversion, 3: 2 pull-down detection, noise removal, and the like. The program capacity and data capacity for each process differ from one process to another. Therefore, this is one stage.
第1ステージにおいては、上述のように、前処理のみで1つのステージとしている。従って、前処理がメモリを多く必要とする場合であっても、第1ステージにかかる処理の途中でDRAM110とのデータの授受を行わずに済み、効率的な処理を行うことができる。
In the first stage, as described above, only one stage is used for preprocessing. Therefore, even when the preprocessing requires a large amount of memory, it is not necessary to exchange data with the
図5は、第2ステージにおける動画像データの流れを示す図である。第2ステージにおいて各付加処理ユニット106は、DMAC104を介してDRAM110から動画像データのローカルデコードを取得する。そして、前方向動き検出(ステップS102)を行う。そして、前方向動き検出(ステップS102)によって得られた動きベクトルは、DMAC104を介してDRAM110に書き戻される。
FIG. 5 is a diagram showing a flow of moving image data in the second stage. In the second stage, each additional processing unit 106 acquires local decoding of moving image data from the
第3ステージにおける処理は、図7を参照しつつ説明した第2ステージにおける動画像データの流れと同様である。 The processing in the third stage is the same as the flow of moving image data in the second stage described with reference to FIG.
図6は、第4ステージにおける動画像データの流れを示す図である。第4ステージにおいては、各付加処理ユニット106は、DMAC104を介してDRAM110から動画像データおよびローカルデコード画像、および動きベクトルを取得する。付加処理ユニット106は、取得した動画像データに対して動き補償を行い、ローカルメモリ1060は、動き補償により得られた残差信号を保持する。さらに、ローカルメモリ1060が保持する残差信号に対してDCT処理(ステップS108)を行う。DCT処理により得られた結果、すなわちDCT係数をDRAM110に書き戻す。
FIG. 6 is a diagram showing a flow of moving image data in the fourth stage. In the fourth stage, each additional processing unit 106 acquires moving image data, a locally decoded image, and a motion vector from the
動き補償(S106)においては、動画像データ、ローカルデコード画像、動きベクトル、および残差信号を対象とする。これらの処理対象のデータのデータ容量は大きく、ローカルメモリ1060の容量の多くを占有する。一方、DCT処理(ステップS108)は動き補償(S106)において確保されたデータ領域をDCT処理(ステップS108)の後のDCT係数の保存先としても利用することができる。また、DCT処理(ステップS108)のプログラム自体は小さい。そこでこれらの処理をまとめて1つのステージとしている。
In the motion compensation (S106), moving image data, a local decoded image, a motion vector, and a residual signal are targeted. The data capacity of the data to be processed is large and occupies most of the capacity of the
図7は、第5ステージにおける動画像データの流れを示す図である。第5ステージにおいては、各付加処理ユニット106は、DMAC104を介してDRAM110からDCT係数を取得する。付加処理ユニット106は、取得したDCT係数に対して、量子化(ステップS110)を行う。ローカルメモリ1060は、量子化後のDCT係数を保持する。
FIG. 7 is a diagram showing a flow of moving image data in the fifth stage. In the fifth stage, each additional processing unit 106 acquires a DCT coefficient from the
また、各付加処理ユニット106は、DMAC104を介してDRAM110から動きベクトルを取得する。そして、付加処理ユニット106は、動きベクトルとローカルメモリ1060が保持する量子化後のDCT係数とに対して、それぞれ可変長符号化(ステップS112)を行う。
Further, each additional processing unit 106 acquires a motion vector from the
また、ローカルメモリ1060から量子化後のDCT係数を読み出し、逆量子化(ステップS120)を行う。そして、ローカルメモリ1060は、その結果を保持する。さらに、付加処理ユニット106は、ローカルメモリ1060に保持されている逆量子化後のDCT係数に対して逆離散コサイン変換(ステップS122)を行い、ローカルデコード画像を作成する。そして、ローカルデコード画像および可変長符号化されたデータをDRAM110に書き込む。
Also, the quantized DCT coefficient is read from the
量子化(ステップS110)、可変長符号化(ステップS112)、逆量子化(ステップS120)、および逆離散コサイン変換(ステップS122)は、いずれもプログラム量、データ容量とも小さい。ただし、可変長符号化(ステップS112)において利用されるテーブルのデータ量が比較的大きい。そこで、これら処理をまとめて1つのステージとする。 Quantization (step S110), variable-length coding (step S112), inverse quantization (step S120), and inverse discrete cosine transform (step S122) all have a small program amount and data capacity. However, the data amount of the table used in variable length coding (step S112) is relatively large. Therefore, these processes are combined into one stage.
図8は、各付加処理ユニット106への処理の割り当てを説明するための図である。図8に示すように、付加処理ユニット106にはタイミングを制御するタイムバジェットが設定されている。そして、各付加処理ユニット106は、同一のタイムバジェットにおいて異なるスライスに対して同一の処理を施す。ここで、スライスとは、動画像を構成する静止画の横方向の1ライン分のことである。 FIG. 8 is a diagram for explaining the assignment of processing to each additional processing unit 106. As shown in FIG. 8, the additional processing unit 106 is set with a time budget for controlling the timing. Each additional processing unit 106 performs the same processing on different slices in the same time budget. Here, the slice refers to one line in the horizontal direction of the still image constituting the moving image.
例えば、第1付加処理ユニット106aには、スライス1に対する処理が割り当てられている、また、第2付加処理ユニット106bには、スライス2に対する処理が割り当てられている。このように、複数の付加処理ユニット106が1つの動画像データに対する処理を分担することにより並列処理を行う。
For example, the process for slice 1 is assigned to the first
例えば第1ステージでは、第1付加処理ユニット106aは、スライス1に対して前処理を行う。そして、前処理が行われた後のスライス1をDRAM110に書き戻す。また、第2付加処理ユニット106bは、スライス2に対して前処理を行う。そして、前処理が行われた後のスライス2をDRAM110に書き戻す。同様に、各付加処理ユニット106が前処理を行い、その結果をそれぞれDRAM110に書き戻す。
For example, in the first stage, the first
以上のように、複数の付加処理ユニット106がスライス単位で処理を分担することにより、処理の高速化を図ることができる。 As described above, the plurality of additional processing units 106 share processing in units of slices, so that processing speed can be increased.
また、スライスの数が付加処理ユニット106の数よりも多い場合には、1つの付加処理ユニットに複数のスライスを割り当ててもよい。例えば、第1付加処理ユニット106aにスライス1〜スライス3が割り当てられ、第2付加処理ユニット106bにスライス4〜スライス6が割り当てられる。
When the number of slices is larger than the number of additional processing units 106, a plurality of slices may be assigned to one additional processing unit. For example, slices 1 to 3 are assigned to the first
さらに、第1付加処理ユニット106aが第1ステージの処理を完了したときに、第2付加処理ユニット106bが第1ステージの処理を完了していない場合がある。例えば、第1付加処理ユニット106aが第1ステージの処理を完了したときに、第2付加処理ユニット106bがスライス4に対する処理を行っている場合がある。例えば、同一のスライスであっても、処理に要する演算量が異なる場合などである。
Furthermore, when the first
この場合には、第2付加処理ユニット106bがスライス4を処理する間に、第1付加処理ユニット106aは、スライス6に対する処理を行う。これにより、第2付加処理ユニット106bがスライス4〜スライス6に対する処理を行う場合に比べて、処理を高速化することができる。このように、各付加処理ユニット106における処理速度が異なる場合には、スライスを再配分することにより、さらなる処理の高速化を図ることができる。
In this case, the first
なお、本実施の形態においては、スライス単位で動画像データが各付加処理ユニット106に割り当てられているが、各付加処理ユニット106への動画像データの割り当ての単位はこれに限定されるものではなく、これ以外の単位でもよい。例えば、スライスを構成するさらに細かい単位であるマクロブロック単位で、動画像データが各付加処理ユニット106に割り当てられてもよい。 In the present embodiment, moving image data is allocated to each additional processing unit 106 in slice units, but the unit of moving image data allocation to each additional processing unit 106 is not limited to this. There may be other units. For example, moving image data may be allocated to each additional processing unit 106 in units of macro blocks that are finer units constituting a slice.
図9は、付加処理ユニット106がそれぞれ異なる処理を担当する場合の各付加処理ユニット106の処理を説明するための図である。図9に示すように各付加処理ユニット106がそれぞれ異なる処理を担当することとすると、第1付加処理ユニット106aがスライス1に対し第1ステージの処理を行っている間は、第2付加処理ユニット106bは、スライス1に対し第2ステージの処理を行えず、スタンバイ状態となる。このように、複数の付加処理ユニット106が異なる処理を行うこととすると、一の付加処理ユニット106における処理が完了するまで他の付加処理ユニット106は処理を開始できない場合があり効率が悪い。複数の付加処理ユニット106が異なる処理を担当することとすると、複数の付加処理ユニット106による並列処理を行っているにもかかわらず、十分な処理の効率化を図ることができない。
FIG. 9 is a diagram for explaining the processing of each additional processing unit 106 when the additional processing unit 106 is in charge of different processing. As shown in FIG. 9, if each additional processing unit 106 is in charge of different processing, the second
そこで、図8を参照しつつ説明したように、各付加処理ユニット106は、それぞれ異なるスライスに対して同一の処理を行うこととした。これにより、図9を参照しつつ説明したような各付加処理ユニット106におけるスタンバイ状態の頻出を避けることができ、処理の効率化を図ることができる。 Therefore, as described with reference to FIG. 8, each additional processing unit 106 performs the same processing on different slices. As a result, frequent occurrence of the standby state in each additional processing unit 106 as described with reference to FIG. 9 can be avoided, and processing efficiency can be improved.
以上のように、本発明にかかる動画像符号化装置および符号化方法は、動画像データの符号化に有用であり、特に、複数のプロセッシングユニットを用いた動画像データの符号化に有用である。 As described above, the moving image encoding apparatus and the encoding method according to the present invention are useful for encoding moving image data, and particularly useful for encoding moving image data using a plurality of processing units. .
10 動画像符号化装置
100 プロセッサエレメント
102 処理ユニット
106 付加処理ユニット
1060 ローカルメモリ
1062 レジスタ
1064 浮動少数点演算ユニット
1066 整数演算ユニット
DESCRIPTION OF
Claims (5)
前記符号化の処理を指示し、かつ前記符号化に関する処理を行う第1プロセッサと、
前記第1プロセッサからの指示に基づいて、前記符号化に関する処理を行う第2プロセッサと、
前記符号化に関する情報を保持するメインメモリと、
前記メインメモリと前記第1プロセッサの間、および前記メインメモリと前記第2プロセッサとの間のデータの授受を制御するメインメモリ制御手段と、
前記第2プロセッサから直接アクセス可能なローカルメモリとを備え、
前記第1プロセッサは、前記メインメモリ制御手段を介して前記メインメモリに保持される情報を参照し、前記符号化に関する処理として、前処理、動き検出処理、動き補償処理、DCT処理、逆離散コサイン変換処理、量子化処理、可変長符号化処理及びシンタックス生成処理の少なくとも1つのうち全部又は一部の処理であって且つ処理にかかる演算量が予め定められた演算量よりも小さい第1処理を行い、
前記第2プロセッサは、前記ローカルメモリに保持される情報を参照して、前記第1プロセッサからの指示に基づいて、前記符号化に関する処理として、前処理、動き検出処理、動き補償処理、DCT処理、逆離散コサイン変換処理、量子化処理、可変長符号化処理及びシンタックス生成処理のうち少なくとも1つのうち全部又は一部の処理であって且つ処理にかかる演算量が予め定められた演算量よりも大きい第2処理を行い、
前記第2プロセッサが行う前記第2処理全体は、複数のステージに分割され、
前記メインメモリは、各ステージにおいて用いられる情報をさらに保持し、
前記ローカルメモリは、前記第2プロセッサが一の前記ステージにおいて前記第2処理を実行するときに、前記メインメモリ制御手段を介して前記メインメモリから当該ステージにおいて用いられる情報を取得し、当該ステージにおいて用いられる情報を保持する
ことを特徴とする動画像符号化装置。 A moving image encoding device for encoding a moving image,
A first processor for instructing the encoding process and performing the encoding process;
A second processor that performs processing related to the encoding based on an instruction from the first processor;
A main memory holding information about the encoding;
Main memory control means for controlling data exchange between the main memory and the first processor and between the main memory and the second processor;
A local memory directly accessible from the second processor,
The first processor refers to information held in the main memory via the main memory control means, and as processing related to the encoding, preprocessing, motion detection processing, motion compensation processing, DCT processing, inverse discrete cosine, A first process that is all or a part of at least one of a conversion process, a quantization process, a variable-length encoding process, and a syntax generation process, and the amount of calculation for the process is smaller than a predetermined amount of calculation And
The second processor refers to the information held in the local memory and, based on an instruction from the first processor, performs processing related to the encoding as preprocessing, motion detection processing, motion compensation processing, and DCT processing. , An inverse discrete cosine transform process, a quantization process, a variable length encoding process, and a syntax generation process. The second process is also large,
The entire second process performed by the second processor is divided into a plurality of stages,
The main memory further holds information used in each stage,
The local memory acquires information used in the stage from the main memory via the main memory control means when the second processor executes the second process in the one stage. A moving picture coding apparatus characterized by holding information to be used.
前記第1プロセッサは、前記動画像を複数の部分データに分割し、前記部分データ単位で前記動画像を前記複数の第2プロセッサに配分し、 The first processor divides the moving image into a plurality of partial data, distributes the moving image to the plurality of second processors in units of the partial data,
前記複数の第2プロセッサは、前記第1プロセッサから受け取った前記部分データに対してそれぞれ第2処理を行うことを特徴とする請求項1から3のいずれか一項に記載の動画像符号化装置。 4. The moving picture coding apparatus according to claim 1, wherein the plurality of second processors perform second processing on the partial data received from the first processor. 5. .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003427718A JP4351903B2 (en) | 2003-12-24 | 2003-12-24 | Video encoding device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003427718A JP4351903B2 (en) | 2003-12-24 | 2003-12-24 | Video encoding device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005191689A JP2005191689A (en) | 2005-07-14 |
JP4351903B2 true JP4351903B2 (en) | 2009-10-28 |
Family
ID=34786912
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003427718A Expired - Fee Related JP4351903B2 (en) | 2003-12-24 | 2003-12-24 | Video encoding device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4351903B2 (en) |
-
2003
- 2003-12-24 JP JP2003427718A patent/JP4351903B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2005191689A (en) | 2005-07-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8675739B2 (en) | Method and apparatus for video decoding based on a multi-core processor | |
US9329871B2 (en) | Video decoding system supporting multiple standards | |
US20080284788A1 (en) | Method and apparatus for processing information | |
JP5379122B2 (en) | Multiprocessor | |
Toyokura et al. | A video DSP with a macroblock-level-pipeline and a SIMD type vector-pipeline architecture for MPEG2 CODEC | |
US8532196B2 (en) | Decoding device, recording medium, and decoding method for coded data | |
US8281314B2 (en) | Information processing device and method | |
JP4807320B2 (en) | Decoding device, encoding device, decoding method, encoding method, and program for decoding and encoding video | |
KR20090065398A (en) | Method and apparatus for video decoding based on a multi-core processor | |
JP3544524B2 (en) | Image processing device | |
US20110191782A1 (en) | Apparatus and method for processing data | |
CN112714319B (en) | Computer readable storage medium, video encoding and decoding method and apparatus using multiple execution units | |
KR20090020460A (en) | Method and apparatus for video decoding | |
JP4398717B2 (en) | Video decoding device | |
Seitner et al. | Evaluation of data-parallel H. 264 decoding approaches for strongly resource-restricted architectures | |
JP4351903B2 (en) | Video encoding device | |
JP3123496B2 (en) | Motion compensation processing method and system, and recording medium recording the processing program | |
JP2004507957A (en) | Algorithm execution method and scalable programmable processing device | |
US20060061497A1 (en) | Bit rate conversion apparatus and method | |
JP2000175201A (en) | Image processing unit, its method and providing medium | |
JP2005189975A (en) | Image processor, image processing method, and program | |
JPH11239348A (en) | Video/audio signal processing unit | |
US20090141807A1 (en) | Arrangements for processing video | |
JP2011160077A (en) | Decoding apparatus and method | |
Li et al. | An efficient video decoder design for MPEG-2 MP@ ML |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070412 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070501 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070629 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080902 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20081031 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090303 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090401 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20090630 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20090727 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120731 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |