JP2007274224A - Image processor - Google Patents

Image processor Download PDF

Info

Publication number
JP2007274224A
JP2007274224A JP2006095952A JP2006095952A JP2007274224A JP 2007274224 A JP2007274224 A JP 2007274224A JP 2006095952 A JP2006095952 A JP 2006095952A JP 2006095952 A JP2006095952 A JP 2006095952A JP 2007274224 A JP2007274224 A JP 2007274224A
Authority
JP
Japan
Prior art keywords
memory
transfer
macroblock
memory area
information
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
JP2006095952A
Other languages
Japanese (ja)
Inventor
Toshikazu Senuki
俊和 瀬貫
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2006095952A priority Critical patent/JP2007274224A/en
Publication of JP2007274224A publication Critical patent/JP2007274224A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processor which reduces the access time to a memory and suitably distributes the accesses to process images speedily in a little circuit scale. <P>SOLUTION: A first memory 11 stores macroblock information of already processed macroblocks, a second memory 12 is a simple port memory including acquiring memory areas 12a and saving memory areas 12b, a transfer request decider 13c outputs a saving memory area transfer request A for transferring the macroblock information to the saving memory area 12b and a hold memory fetch transfer request B for transferring the macroblock information in the acquiring memory area 12a to a hold memory 13a, a memory transfer controller 14 outputs a first memory transfer request C for transferring the macroblock information from the saving memory area 12b to a first memory 11 and a second memory transfer request D for transferring the macroblock information from the first memory 11 to the acquiring memory area 12a, an a memory access mediator 15 for controlling the mediation of the port access to the second memory 12. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は画像処理装置に関し、特に画像信号をマクロブロック単位に符号化/復号化処理する画像処理装置に関する。   The present invention relates to an image processing apparatus, and more particularly to an image processing apparatus that encodes / decodes an image signal in units of macroblocks.

近年、画像符号化/復号化方式は、PVR(Personal Video Recorder)やカムコーダなどに応用され、これらディジタル家電の市場は拡大を続けている。市場が要求する高解像度かつ低コストな製品を実現するためには、LSIやFPGA(Field Programmable Gate Array)などのハードウェアによる実現が不可欠であるが、動画像の符号化/復号化は多大な処理量を必要とし、消費電力が大きくなるため、消費電力を低減できるよう、回路規模の削減や適切な信号制御などが求められる。   In recent years, image encoding / decoding systems have been applied to PVRs (Personal Video Recorders), camcorders, etc., and the market for these digital home appliances continues to expand. In order to realize a high-resolution and low-cost product required by the market, it is indispensable to use hardware such as LSI and FPGA (Field Programmable Gate Array), but the encoding / decoding of moving images is enormous. Since a processing amount is required and power consumption is increased, circuit scale reduction and appropriate signal control are required so that power consumption can be reduced.

一方、画像符号化方式では、一般に空間的な相関性を用いて情報量圧縮を行うため、符号化対象のマクロブロックに隣接する、すでに符号化済みのマクロブロックのマクロブロック情報を参照して符号化する方式が多用されている。マクロブロック情報としては、符号化のモード、Inter予測の際の動きベクトル値、DCT(Discrete Cosine Transform)後の有効係数個数などがあげられる。   On the other hand, in the image coding method, since the amount of information is generally compressed using spatial correlation, the coding is performed by referring to the macroblock information of an already coded macroblock adjacent to the macroblock to be coded. Many methods are used. Examples of the macroblock information include a coding mode, a motion vector value in inter prediction, and the number of effective coefficients after DCT (Discrete Cosine Transform).

マクロブロック情報の量は画面サイズに比例して大きくなるが、特に高精細テレビジョン等の大画面を備える装置で、マクロブロック情報をSRAM(Static Random Access Memory)のような高速メモリのみで保持しようとすると、回路規模が増加することになる。そこで、通常は、SRAMと比べると低速ではあるが大容量のDRAM(Dynamic RAM)も併用して、マクロブロック情報を保持することが一般的に行われている。   The amount of macroblock information increases in proportion to the screen size. In particular, in a device with a large screen such as a high-definition television, keep the macroblock information only with a high-speed memory such as SRAM (Static Random Access Memory). Then, the circuit scale increases. Therefore, in general, macroblock information is generally held by using a large-capacity DRAM (Dynamic RAM) together with a slower speed than an SRAM.

図14はDRAMとSRAMを含む画像処理装置の概略構成を示す図である。画像処理装置100は、符号化/復号化回路101、DP(dual port)−SRAM102a、102b、転送回路103、DRAM104から構成される。DP−SRAM102a、102bは、デュアルポートを有して、書き出しと読み込みとを独立に行えるSRAMである。   FIG. 14 is a diagram showing a schematic configuration of an image processing apparatus including a DRAM and an SRAM. The image processing apparatus 100 includes an encoding / decoding circuit 101, DP (dual port) -SRAMs 102a and 102b, a transfer circuit 103, and a DRAM 104. The DP-SRAMs 102a and 102b are SRAMs that have dual ports and can independently perform writing and reading.

符号化/復号化回路101は、マクロブロックの符号化処理または復号化処理を行う度に、処理の結果得られたマクロブロック情報をDP−SRAM102aに出力する。また、必要に応じてDP−SRAM102bから、処理済のマクロブロックのマクロブロック情報を取り出し、マクロブロックの符号化/復号化処理に用いる。   The encoding / decoding circuit 101 outputs the macroblock information obtained as a result of the processing to the DP-SRAM 102a every time the macroblock is encoded or decoded. Further, the macroblock information of the processed macroblock is extracted from the DP-SRAM 102b as necessary, and used for the encoding / decoding processing of the macroblock.

転送回路103は、DP−SRAM102aがオーバーフローせず、かつDP−SRAM102bに、符号化/復号化処理に必要となる隣接のマクロブロック情報が常時存在しているように、マクロブロック情報をDP−SRAM102aからDRAM104へ、DRAM104からDP−SRAM102bへと、FIFO(First-In/First-Out)形式で適宜転送する。   The transfer circuit 103 transfers the macro block information to the DP-SRAM 102a so that the DP-SRAM 102a does not overflow and the adjacent macro block information necessary for the encoding / decoding process is always present in the DP-SRAM 102b. From the DRAM 104 to the DP-SRAM 102b in the FIFO (First-In / First-Out) format as appropriate.

このように、画像処理装置100のメモリ周辺構成としては、主記憶にはDRAM104等の低速メモリを使い、レイテンシ(遅延時間)隠蔽のために、符号化/復号化回路101とのインターフェース部分のみDP−SRAM102a、102bの高速メモリを用いるのが一般的な構成である。   As described above, as the memory peripheral configuration of the image processing apparatus 100, a low-speed memory such as the DRAM 104 is used as the main memory, and only the interface portion with the encoding / decoding circuit 101 is used for latency (delay time) concealment. A general configuration is to use high-speed memories such as SRAMs 102a and 102b.

なお、画像処理のメモリ容量の低減化を図った従来の技術としては、1つのマクロブロックを4つのサブブロックに分割して処理することによって、多重ランダムアクセス可能な共有メモリシステムを使用しなくても並列処理を行う技術が提案されている(例えば、特許文献1)。
特開平8−9389号公報(段落番号〔0010〕〜〔0020〕、第1図)
As a conventional technique for reducing the memory capacity of image processing, it is possible to divide one macroblock into four sub-blocks and process it, without using a shared memory system capable of multiple random access. A technique for performing parallel processing has also been proposed (for example, Patent Document 1).
JP-A-8-9389 (paragraph numbers [0010] to [0020], FIG. 1)

図14に示す従来の画像処理装置100の構成では、処理速度を優先するために2個のデュアルポートのSRAMが用いられているが、低消費電力化のためには、SRAMの個数を削減し、シングルポートSRAMを採択した方が望ましい。   In the configuration of the conventional image processing apparatus 100 shown in FIG. 14, two dual-port SRAMs are used to prioritize the processing speed. However, in order to reduce power consumption, the number of SRAMs is reduced. It is desirable to adopt a single port SRAM.

このとき、1つのシングルポートのSRAMを使用して、図14と同じような動作を実現する装置を構成しようとした場合、SRAMの1つのポートに対するアクセスを、時分割によって調停制御する装置構成が考えられる。   At this time, if one single-port SRAM is used to configure a device that realizes the same operation as in FIG. 14, the device configuration that controls arbitration by time division of access to one port of the SRAM is as follows. Conceivable.

図15はシングルポートSRAMを用いた構成を示す図である。画像処理装置110は、符号化/復号化回路111、SRAM112、転送回路113、DRAM114、調停回路115から構成される。   FIG. 15 is a diagram showing a configuration using a single port SRAM. The image processing apparatus 110 includes an encoding / decoding circuit 111, an SRAM 112, a transfer circuit 113, a DRAM 114, and an arbitration circuit 115.

調停回路115は、SRAM112に対する4つのアクセスを調停する。4つのアクセスとは、符号化/復号化回路111からSRAM112への書き込みアクセス、SRAM112から符号化/復号化回路111への読み出しアクセス、転送回路113を介してのDRAM114からSRAM112への書き込みアクセス、転送回路113を介してのSRAM112からDRAM114への読み出しアクセスの4つである。調停回路115は、これらのアクセスに対して、SRAM112の1つのポートを時分割で、符号化/復号化回路111及び転送回路113で利用させるように調停制御を行う。   The arbitration circuit 115 arbitrates four accesses to the SRAM 112. The four accesses are the write access from the encoding / decoding circuit 111 to the SRAM 112, the read access from the SRAM 112 to the encoding / decoding circuit 111, the write access from the DRAM 114 to the SRAM 112 via the transfer circuit 113, and the transfer. Read access from the SRAM 112 to the DRAM 114 via the circuit 113. The arbitration circuit 115 performs arbitration control for these accesses so that one port of the SRAM 112 is used by the encoding / decoding circuit 111 and the transfer circuit 113 in a time division manner.

一方、リアルタイム処理を実現するにあたり、1マクロブロックあたりの処理時間は画面サイズ、フレームレートにより制約される。H.264ではマクロブロックは16×16画素のサイズであるので、フルハイビジョン(1080画素)では約2μsしか1マクロブロックの処理に充てられないことになる。   On the other hand, when realizing real-time processing, the processing time per macroblock is limited by the screen size and the frame rate. H. In H.264, the size of a macroblock is 16 × 16 pixels, and in full high-definition (1080 pixels), only about 2 μs can be used for processing of one macroblock.

したがって、図15のように、シングルポートSRAMを用いて、単に時分割によるアクセス調停を行う構成に変更しただけでは、アクセスが競合したときの調停待ち時間が頻繁に発生することになるので、図14で示した4ポート独立のメモリ構成に比べて、その調停待ち時間の分だけ処理時間の増加を招いてしまうといった問題があった。   Therefore, as shown in FIG. 15, by simply changing to a configuration that performs access arbitration by time division using a single-port SRAM, arbitration waiting time when access conflicts frequently occurs. Compared to the 4-port independent memory configuration shown in FIG. 14, there is a problem that the processing time is increased by the arbitration waiting time.

また、符号化/復号化回路111は、その処理内容によってはマクロブロック毎の圧縮率の違い等によって処理時間も変動する。図15のように、時分割処理によりポートを利用する構成では、ごく短時間で符号化/復号化処理が終わっても、転送回路113がポートを使用中であれば符号化/復号化回路111は、ポートが空くのを待たねばならない。このポートの空き待ち時間は、そのまま全体の処理時間の増加を招くことになる。   In addition, the encoding / decoding circuit 111 also varies in processing time depending on the processing content due to a difference in compression rate for each macroblock. As shown in FIG. 15, in the configuration in which a port is used by time division processing, the encoding / decoding circuit 111 is used if the transfer circuit 113 is using the port even if the encoding / decoding processing is completed in a very short time. Have to wait for the port to be free. This idle waiting time of the port causes an increase in the entire processing time as it is.

本発明はこのような点に鑑みてなされたものであり、メモリへのアクセス時間を低減し、かつ高速メモリまたは低速メモリに対して、適切なアクセス分配を行って、少ない回路規模で高速な画像処理を行う画像処理装置を提供することを目的とする。   The present invention has been made in view of these points, and reduces the access time to the memory, and performs appropriate access distribution to the high-speed memory or the low-speed memory, so that a high-speed image can be obtained with a small circuit scale. An object of the present invention is to provide an image processing apparatus that performs processing.

本発明では上記課題を解決するために、図1に示すような、画像信号を符号化/復号化処理する画像処理装置10において、処理済みのマクロブロックのマクロブロック情報を格納する第1のメモリ11と、第1のメモリ11から転送されたマクロブロック情報を格納しておく取得用メモリ領域12aと、第1のメモリ11へ転送して第1のメモリ11に格納させるべきマクロブロック情報を格納しておく退避用メモリ領域12bとでメモリ領域が2つに分割されたシングルポートの第2のメモリ12と、マクロブロック情報を格納する保持メモリ13aと、保持メモリ13aからマクロブロック情報を読み出して参照して、処理対象のマクロブロックの符号化/復号化処理を行い、処理完了後に得られたマクロブロック情報を保持メモリ13aに格納する符号化/復号化処理部13bと、符号化/復号化処理が完了した際に、保持メモリ13aにあるマクロブロック情報を、退避用メモリ領域12bへ転送するための退避用メモリ領域転送要求Aを出力し、符号化/復号化処理を開始する際に、取得用メモリ領域12aにあるマクロブロック情報を保持メモリ13aへ転送するための保持メモリ取り込み転送要求Bを出力する転送要求判定部13cと、退避用メモリ領域転送要求Aまたは保持メモリ取り込み転送要求Bに対する許可応答があれば、マクロブロック情報の転送制御を行うマクロブロック情報転送部13dと、から構成される画像処理部13と、第1のメモリ11の占有量を監視し、第1のメモリ11に空きがあれば、退避用メモリ領域12bから第1のメモリ11へマクロブロック情報の転送を行うための第1のメモリ転送要求Cを出力し、第1のメモリ11にマクロブロック情報が格納されている場合は、第1のメモリ11から取得用メモリ領域12aへマクロブロック情報の転送を行う取得用メモリ領域転送要求Dを出力し、第1のメモリ転送要求Cまたは取得用メモリ領域転送要求Dに対する許可応答があれば、マクロブロック情報の転送制御を行うメモリ転送制御部14と、退避用メモリ領域転送要求A、保持メモリ取り込み転送要求B、第1のメモリ転送要求C、取得用メモリ領域転送要求Dを受信して、転送可能な場合は許可応答を出力して、第2のメモリ12のポートアクセスの調停制御を行い、調停制御を行う際は、画像処理部13からの退避用メモリ領域転送要求A及び保持メモリ取り込み転送要求Bを最優先とし、退避用メモリ領域12bと取得用メモリ領域12aのオーバーフロー/アンダーフローを発生させないように、メモリ転送制御部14からの第1のメモリ転送要求C及び取得用メモリ領域転送要求Dを次に優先させるメモリアクセス調停部15と、を有することを特徴とする画像処理装置10が提供される。   In the present invention, in order to solve the above-described problem, a first memory for storing macroblock information of a processed macroblock in an image processing apparatus 10 for encoding / decoding an image signal as shown in FIG. 11, an acquisition memory area 12 a for storing macroblock information transferred from the first memory 11, and macroblock information to be transferred to the first memory 11 and stored in the first memory 11 A single-port second memory 12 having a memory area divided into two by a save memory area 12b, a holding memory 13a for storing macroblock information, and reading macroblock information from the holding memory 13a Referring to the processing target macroblock encoding / decoding process, the macroblock information obtained after the processing is completed is stored in memory 1 an encoding / decoding processing unit 13b stored in a, and a save memory area for transferring macroblock information in the holding memory 13a to the save memory area 12b when the encoding / decoding process is completed Transfer request determination that outputs a transfer request A and outputs a holding memory fetch transfer request B for transferring the macroblock information in the acquisition memory area 12a to the holding memory 13a when encoding / decoding processing is started. An image processing unit 13 comprising: a unit 13c; and a macroblock information transfer unit 13d that controls transfer of macroblock information if there is a permission response to the save memory area transfer request A or the retained memory capture transfer request B. The occupancy of the first memory 11 is monitored, and if there is an empty space in the first memory 11, the first memory 11 is saved from the save memory area 12b. When the first memory transfer request C for transferring the macroblock information is output and the macroblock information is stored in the first memory 11, the macro is transferred from the first memory 11 to the acquisition memory area 12a. Memory transfer control that outputs a memory area transfer request D for transferring block information and performs transfer control of macroblock information if there is a permission response to the first memory transfer request C or the memory area transfer request D for acquisition Unit 14 and the save memory area transfer request A, the holding memory fetch transfer request B, the first memory transfer request C, and the acquisition memory area transfer request D are received, and if the transfer is possible, a permission response is output. When the arbitration control of the port access of the second memory 12 is performed and the arbitration control is performed, the save memory area transfer request A from the image processing unit 13 and the holding memory acquisition are performed. The first memory transfer request C and the acquisition memory area from the memory transfer control unit 14 so as to prevent the overflow / underflow of the save memory area 12b and the acquisition memory area 12a. There is provided an image processing apparatus 10 including a memory access arbitration unit 15 that gives priority to the transfer request D next.

ここで、第1のメモリ11は、処理済みのマクロブロックのマクロブロック情報を格納する。第2のメモリ12は、第1のメモリ11から転送されたマクロブロック情報を格納しておく取得用メモリ領域12aと、第1のメモリ11へ転送して格納させるべきマクロブロック情報を格納しておく退避用メモリ領域12bとでメモリ領域が分割されたシングルポートのメモリである。保持メモリ13aは、マクロブロック情報を格納する。符号化/復号化処理部13bは、保持メモリ13aからマクロブロック情報を読み出して参照して、処理対象のマクロブロックの符号化/復号化処理を行い、処理完了後のマクロブロック情報を保持メモリ13aに格納する。転送要求判定部13cは、符号化/復号化処理が完了した際に、保持メモリ13aにあるマクロブロック情報を、退避用メモリ領域12bへ転送するための退避用メモリ領域転送要求Aを出力し、符号化/復号化処理を開始する際に、取得用メモリ領域12aにあるマクロブロック情報を保持メモリ13aへ転送するための保持メモリ取り込み転送要求Bを出力する。マクロブロック情報転送部13dは、退避用メモリ領域転送要求Aまたは保持メモリ取り込み転送要求Bに対する許可応答があれば、マクロブロック情報の転送制御を行う。メモリ転送制御部14は、第1のメモリ11の占有量を監視し、第1のメモリ11に空きがあれば、退避用メモリ領域12bから第1のメモリ11へマクロブロック情報の転送を行うための第1のメモリ転送要求Cを出力し、第1のメモリ11にマクロブロック情報が格納されている場合は、第1のメモリ11から取得用メモリ領域12aへマクロブロック情報の転送を行う取得用メモリ領域転送要求Dを出力し、第1のメモリ転送要求Cまたは取得用メモリ領域転送要求Dに対する許可応答があれば、マクロブロック情報の転送制御を行う。メモリアクセス調停部15は、退避用メモリ領域転送要求A、保持メモリ取り込み転送要求B、第1のメモリ転送要求C、取得用メモリ領域転送要求Dを受信して、転送可能な場合は許可応答を出力して、第2のメモリ12に対するポートアクセスの調停制御を行い、調停制御を行う際は、画像処理部13からの退避用メモリ領域転送要求A及び保持メモリ取り込み転送要求Bを最優先とし、退避用メモリ領域12bと取得用メモリ領域12aのオーバーフロー/アンダーフローを発生させないように、メモリ転送制御部14からの第1のメモリ転送要求C及び取得用メモリ領域転送要求Dを次に優先させる。   Here, the first memory 11 stores macroblock information of processed macroblocks. The second memory 12 stores the acquisition memory area 12a for storing the macroblock information transferred from the first memory 11, and the macroblock information to be transferred to the first memory 11 for storage. This is a single port memory in which the memory area is divided by the save memory area 12b. The holding memory 13a stores macroblock information. The encoding / decoding processing unit 13b reads out and refers to the macroblock information from the holding memory 13a, performs encoding / decoding processing of the processing target macroblock, and stores the macroblock information after the processing is completed in the holding memory 13a. To store. When the encoding / decoding process is completed, the transfer request determination unit 13c outputs a save memory area transfer request A for transferring the macroblock information in the holding memory 13a to the save memory area 12b. When the encoding / decoding process is started, a holding memory capture transfer request B for transferring the macroblock information in the acquisition memory area 12a to the holding memory 13a is output. If there is a permission response to the save memory area transfer request A or the retained memory fetch transfer request B, the macroblock information transfer unit 13d performs macroblock information transfer control. The memory transfer control unit 14 monitors the occupation amount of the first memory 11, and transfers macroblock information from the save memory area 12 b to the first memory 11 if the first memory 11 is free. When the first memory transfer request C is output and the macro block information is stored in the first memory 11, the macro block information is transferred from the first memory 11 to the acquisition memory area 12a. If the memory area transfer request D is output and there is an authorization response to the first memory transfer request C or the acquisition memory area transfer request D, transfer control of the macroblock information is performed. The memory access arbitration unit 15 receives the save memory area transfer request A, the holding memory capture transfer request B, the first memory transfer request C, and the acquisition memory area transfer request D, and if it can be transferred, sends a permission response. Output, perform arbitration control of port access to the second memory 12, and when performing arbitration control, give priority to the save memory area transfer request A and the hold memory capture transfer request B from the image processing unit 13, The first memory transfer request C and the acquisition memory area transfer request D from the memory transfer control unit 14 are prioritized next so as not to cause overflow / underflow of the save memory area 12b and the acquisition memory area 12a.

本発明の画像処理装置は、第1のメモリと、取得用メモリ領域と退避用メモリ領域とでメモリ領域が2つに分割されたシングルポートの第2のメモリと、保持メモリとを有し、保持メモリからマクロブロック情報を退避用メモリ領域へ転送するための退避用メモリ領域転送要求、取得用メモリ領域にあるマクロブロック情報を保持メモリへ転送するための保持メモリ取り込み転送要求、退避用メモリ領域から第1のメモリへマクロブロック情報の転送を行うための第1のメモリ転送要求、第1のメモリから取得用メモリ領域へマクロブロック情報の転送を行う取得用メモリ領域転送要求を生成して、退避用メモリ領域転送要求及び保持メモリ取り込み転送要求を最優先とし、第1のメモリ転送要求及び取得用メモリ領域転送要求を次に優先させて調停制御を行う構成とした。これにより、メモリへのアクセス時間を低減し、かつ高速メモリまたは低速メモリに対して、適切なアクセス分配を行って、少ない回路規模で高速な画像処理を行うことが可能になる。   An image processing apparatus according to the present invention includes a first memory, a single-port second memory in which a memory area is divided into two parts by an acquisition memory area and a save memory area, and a holding memory. Save memory area transfer request to transfer macroblock information from the holding memory to the save memory area, hold memory capture transfer request to transfer macroblock information in the acquisition memory area to the hold memory, save memory area Generating a first memory transfer request for transferring the macroblock information from the first memory to the first memory, and an acquisition memory area transfer request for transferring the macroblock information from the first memory to the acquisition memory area, The evacuation memory area transfer request and the retention memory fetch transfer request are given top priority, and the first memory transfer request and acquisition memory area transfer request are given priority next. It was configured to perform the arbitration control Te. Thereby, it is possible to reduce the access time to the memory and perform high-speed image processing with a small circuit scale by performing appropriate access distribution to the high-speed memory or the low-speed memory.

以下、本発明の実施の形態を図面を参照して説明する。図1は画像処理装置の原理図である。第1の実施の形態の画像処理装置10は、第1のメモリ11、第2のメモリ12、画像処理部13、メモリ転送制御部14、メモリアクセス調停部15から構成される。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a principle diagram of an image processing apparatus. The image processing apparatus 10 according to the first embodiment includes a first memory 11, a second memory 12, an image processing unit 13, a memory transfer control unit 14, and a memory access arbitration unit 15.

画像処理装置10は、MPEG4、H.264などの画像符号化/復号化処理をハードウェアでリアルタイムに行う際に、処理対象のマクロブロックに隣接する、すでに符号化/復号化済みのマクロブロックのマクロブロック情報を参照して、符号化/復号化処理を行う装置である。   The image processing apparatus 10 is compatible with MPEG4, H.264. When performing image encoding / decoding processing such as H.264 in hardware in real time, encoding is performed by referring to macroblock information of a macroblock that has already been encoded / decoded adjacent to the macroblock to be processed. / A device that performs a decoding process.

マクロブロック情報とは、例えば、符号化のモード、Inter予測の際の動きベクトル値、DCT後の有効係数個数等を含み、画像信号をマクロブロック単位で符号化した際の符号化処理結果の情報、または画像信号をマクロブロック単位で復号化した際の復号化処理結果の情報のことであり、このマクロブロック情報は、次に符号化/復号化処理される処理対象のマクロブロックの参照情報として用いられるものである。   The macroblock information includes, for example, an encoding mode, a motion vector value at the time of Inter prediction, the number of effective coefficients after DCT, and the like, and information on an encoding process result when an image signal is encoded in units of macroblocks. Or the decoding process result information when the image signal is decoded in units of macroblocks. This macroblock information is used as reference information for a processing target macroblock to be encoded / decoded next. It is used.

第1のメモリ11は、低速メモリであるDRAMに該当し、処理(符号化/復号化処理)済みのマクロブロックのマクロブロック情報を格納する。以下、第1のメモリ11をDRAM11と呼ぶ。   The first memory 11 corresponds to a DRAM that is a low-speed memory, and stores macroblock information of a macroblock that has been processed (encoded / decoded). Hereinafter, the first memory 11 is referred to as a DRAM 11.

第2のメモリ12は、高速メモリであるSRAMに該当し、DRAM11から転送されたマクロブロック情報を格納しておく取得用メモリ領域12aと、DRAM11へ転送して格納させるべきマクロブロック情報を一旦格納しておく退避用メモリ領域12bとでメモリ領域が分割されたシングルポートのメモリである。以下、第2のメモリ12をSRAM12と呼ぶ。   The second memory 12 corresponds to an SRAM, which is a high-speed memory, and temporarily stores an acquisition memory area 12a for storing macroblock information transferred from the DRAM 11 and macroblock information to be transferred to the DRAM 11 for storage. This is a single port memory in which the memory area is divided by the save memory area 12b. Hereinafter, the second memory 12 is referred to as an SRAM 12.

画像処理部13は、保持メモリ13a(以下、保持メモリは保持FFと呼ぶ)、符号化/復号化処理部13b、転送要求判定部13c、マクロブロック情報転送部13dから構成される。保持FF13aは、マクロブロック情報を一時格納するメモリである。   The image processing unit 13 includes a holding memory 13a (hereinafter, the holding memory is referred to as holding FF), an encoding / decoding processing unit 13b, a transfer request determination unit 13c, and a macroblock information transfer unit 13d. The holding FF 13a is a memory that temporarily stores macroblock information.

符号化/復号化処理部13bは、保持FF13aからマクロブロック情報を読み出して参照して、処理対象のマクロブロックの符号化/復号化処理を行い、処理完了後のマクロブロック情報を保持FF13aに格納する。   The encoding / decoding processing unit 13b reads and refers to the macroblock information from the holding FF 13a, performs encoding / decoding processing of the macroblock to be processed, and stores the macroblock information after the processing is completed in the holding FF 13a. To do.

転送要求判定部13cは、符号化/復号化処理が完了した際に、保持FF13aにあるマクロブロック情報を、退避用メモリ領域12bへ転送するための退避用メモリ領域転送要求Aを出力する。   When the encoding / decoding process is completed, the transfer request determination unit 13c outputs a save memory area transfer request A for transferring the macroblock information in the holding FF 13a to the save memory area 12b.

また、符号化/復号化処理を開始する際には、取得用メモリ領域12aにあるマクロブロック情報を保持FF13aへ転送して取り込むための保持FF取り込み転送要求Bを出力する。   When the encoding / decoding process is started, a holding FF fetch transfer request B for transferring and fetching macroblock information in the acquisition memory area 12a to the holding FF 13a is output.

マクロブロック情報転送部13dは、退避用メモリ領域転送要求Aまたは保持FF取り込み転送要求Bによる許可応答にもとづき、保持FF13a内のマクロブロック情報を退避用メモリ領域12bに転送したり、取得用メモリ領域12a内のマクロブロック情報を保持FF13aに転送したりする。   The macroblock information transfer unit 13d transfers the macroblock information in the holding FF 13a to the saving memory area 12b based on the permission response by the saving memory area transfer request A or the holding FF fetch transfer request B, or obtains the acquisition memory area. The macro block information in 12a is transferred to the holding FF 13a.

メモリ転送制御部14は、DRAM11の占有量を監視し、DRAM11に空きがあれば、退避用メモリ領域12bからDRAM11へマクロブロック情報の転送を行うための第1のメモリ転送要求C(以下、DRAM転送要求Cと呼ぶ)を出力する。また、DRAM11にマクロブロック情報が格納されている場合は、DRAM11から取得用メモリ領域12aへマクロブロック情報の転送を行う取得用メモリ領域転送要求Dを出力する。さらにDRAM転送要求Cまたは取得用メモリ領域転送要求Dに対する許可応答があれば、マクロブロック情報の転送制御を行う。   The memory transfer control unit 14 monitors the occupation amount of the DRAM 11, and if there is an empty space in the DRAM 11, a first memory transfer request C (hereinafter referred to as DRAM) for transferring macroblock information from the save memory area 12 b to the DRAM 11. (Referred to as transfer request C). When macroblock information is stored in the DRAM 11, an acquisition memory area transfer request D for transferring macroblock information from the DRAM 11 to the acquisition memory area 12a is output. Further, if there is a permission response to the DRAM transfer request C or the acquisition memory area transfer request D, transfer control of the macroblock information is performed.

メモリアクセス調停部15は、退避用メモリ領域転送要求A、保持FF取り込み転送要求B、第1のメモリ転送要求C、取得用メモリ領域転送要求Dを受信して、転送可能な場合は許可応答を出力して、SRAM12に対するポートアクセスの調停制御を行う。この場合、画像処理部13からの退避用メモリ領域転送要求A及び保持FF取り込み転送要求Bを最優先とし、退避用メモリ領域12bと取得用メモリ領域12aのオーバーフロー/アンダーフローを発生させないように、メモリ転送制御部14からのDRAM転送要求C及び取得用メモリ領域転送要求Dを次に優先させて、調停制御を行う。   The memory access arbitration unit 15 receives the save memory area transfer request A, the holding FF fetch transfer request B, the first memory transfer request C, and the acquisition memory area transfer request D, and sends a permission response if transfer is possible. Output and perform arbitration control of port access to the SRAM 12. In this case, the save memory area transfer request A and the holding FF fetch transfer request B from the image processing unit 13 are given top priority, and an overflow / underflow of the save memory area 12b and the acquisition memory area 12a is not generated. Arbitration control is performed by prioritizing the DRAM transfer request C and the acquisition memory area transfer request D from the memory transfer control unit 14 next.

ここで、処理対象のマクロブロックに対して、どのマクロブロックのマクロブロック情報をメモリに格納するかに関するメモリ格納処理について説明する。図2はマクロブロック情報を取得する際の隣接マクロブロックを示す図である。符号化処理時、画面内のマクロブロックをラスタ順(図の点線矢印方向)に処理していくが、現在の処理対象のマクロブロックをマクロブロックMB0とすると、マクロブロックMB0周辺の符号化済み隣接マクロブロックは、マクロブロックMB0の1ライン左上、1ライン真上、1ライン右上、同一ライン左横に位置するマクロブロックMBr1〜MBr4の4つとなる。   Here, a memory storing process related to which macroblock information of a macroblock to be stored in the memory for the macroblock to be processed will be described. FIG. 2 is a diagram illustrating adjacent macroblocks when macroblock information is acquired. During the encoding process, the macroblocks in the screen are processed in the raster order (in the direction of the dotted arrow in the figure). If the current macroblock to be processed is the macroblock MB0, the encoded neighboring areas around the macroblock MB0 are encoded. There are four macro blocks, macro blocks MBr1 to MBr4, which are located on the upper left of the macro block MB0, on the upper left of the line, on the upper right of the line, on the upper right of the line, and on the left of the same line.

したがって、マクロブロックMB0の符号化を行う場合は、これらマクロブロックMBr1〜MBr4それぞれからの符号化情報を用いることになる。また、この場合、マクロブロックMBr3以降からマクロブロックMBr4の左手前に位置するマクロブロック(図の点線枠で示すマクロブロックグループg1)までのマクロブロック情報は、マクロブロックMB0以降で処理するマクロブロック情報として、今後の処理のために用いられるものなので、マクロブロックグループg1のマクロブロック情報は、マクロブロックMB0を処理する時点で保持しておく必要がある。すなわち、現時点で参照しているマクロブロックMBr1〜MBr4のマクロブロック情報の分と合わせて、図の点線枠で示す各マクロブロックのマクロブロック情報も、メモリに保持しておくことになる。   Therefore, when encoding macroblock MB0, the encoding information from each of these macroblocks MBr1-MBr4 is used. In this case, the macroblock information from the macroblock MBr3 onward to the macroblock located in front of the macroblock MBr4 (the macroblock group g1 indicated by the dotted frame in the figure) is the macroblock information processed after the macroblock MB0. Therefore, the macroblock information of the macroblock group g1 needs to be held at the time of processing the macroblock MB0 because it is used for future processing. That is, together with the macro block information of the macro blocks MBr1 to MBr4 referenced at the present time, the macro block information of each macro block indicated by the dotted frame in the figure is also held in the memory.

マクロブロックMB0の処理後は、次はマクロブロックMB1が処理対象となり、このとき、マクロブロックMBr2、MBr3、MBr5、MB0のそれぞれのマクロブロック情報が参照されることになる。   After the processing of the macro block MB0, the macro block MB1 is the next processing target, and at this time, the macro block information of the macro blocks MBr2, MBr3, MBr5, and MB0 is referred to.

図2を使って、画像処理装置10におけるマクロブロック情報の流れの一例について説明すると、符号化/復号化処理部13bでマクロブロックMB0の符号化/復号化処理の開始時には、保持FF13aは、最低でもマクロブロックMBr1〜MBr4のそれぞれのマクロブロック情報を保持していることになる。   An example of the flow of macroblock information in the image processing apparatus 10 will be described with reference to FIG. 2. When the encoding / decoding processing unit 13b starts the encoding / decoding processing of the macroblock MB0, the holding FF 13a However, the macroblock information of the macroblocks MBr1 to MBr4 is held.

保持FF13aが、マクロブロックMBr1〜MBr4のそれぞれのマクロブロック情報を保持していると仮定すると、マクロブロックMB0の処理が終了した後、マクロブロックMB0のマクロブロック情報は、保持FF13aに格納される。また、マクロブロックMBr4のマクロブロック情報は、退避用メモリ領域12bに転送され(退避用メモリ領域転送要求Aの許可応答があった場合)、その後、DRAM11へ転送されて格納される。さらに、次のマクロブロックMB1の処理に備えて、取得用メモリ領域12aからはマクロブロックMBr5のマクロブロック情報が、保持FF13aに転送されて(保持FF取り込み転送要求Bの許可応答があった場合)格納されることになる(マクロブロックMBr5のマクロブロック情報だけでなく、マクロブロックグループg1の中のより多くのマクロブロック情報を保持FF13aに転送しておいてもよい)。なお、メモリ間のマクロブロック情報の流れ及びメモリ調停の詳細については図4〜図7で後述する。   Assuming that the holding FF 13a holds the respective macroblock information of the macroblocks MBr1 to MBr4, after the processing of the macroblock MB0 is completed, the macroblock information of the macroblock MB0 is stored in the holding FF 13a. Further, the macroblock information of the macroblock MBr4 is transferred to the save memory area 12b (when there is a permission response of the save memory area transfer request A), and then transferred to the DRAM 11 and stored therein. Further, in preparation for processing of the next macro block MB1, the macro block information of the macro block MBr5 is transferred from the acquisition memory area 12a to the holding FF 13a (when there is a permission response of the holding FF fetch transfer request B). (In addition to the macro block information of the macro block MBr5, more macro block information in the macro block group g1 may be transferred to the holding FF 13a). The flow of macroblock information between memories and details of memory arbitration will be described later with reference to FIGS.

次に第1の実施の形態の画像処理装置10の構成及び動作について詳しく説明する。図3は画像処理装置10の構成を示す図である。第1の実施の形態の画像処理装置10は、DRAM11、SRAM12、画像処理部13、DRAM転送制御部14(図1のメモリ転送制御部14に該当)、メモリアクセス調停部15から構成され、メモリアクセス調停部15において、SRAM12のポートアクセスの優先度判定を行う装置である。   Next, the configuration and operation of the image processing apparatus 10 according to the first embodiment will be described in detail. FIG. 3 is a diagram illustrating the configuration of the image processing apparatus 10. The image processing apparatus 10 according to the first embodiment includes a DRAM 11, an SRAM 12, an image processing unit 13, a DRAM transfer control unit 14 (corresponding to the memory transfer control unit 14 in FIG. 1), and a memory access arbitration unit 15. The access arbitration unit 15 is a device that determines port access priority of the SRAM 12.

なお、図1で上述した構成要素の説明は省略する。また、退避用メモリ領域転送要求A、保持FF取り込み転送要求B、DRAM転送要求C、取得用メモリ領域転送要求Dのそれぞれを、以降では単に転送要求A、B、C、Dとも表記する。   The description of the components described above with reference to FIG. In addition, each of the save memory area transfer request A, the holding FF fetch transfer request B, the DRAM transfer request C, and the acquisition memory area transfer request D is hereinafter also simply referred to as transfer requests A, B, C, and D.

画像処理部13は、保持FF13a、符号化/復号化処理部13b、転送要求判定部13c、転送回路13d−1、13d−2を含む。転送回路13d−1、13d−2は、図1のマクロブロック情報転送部13dに含まれる。   The image processing unit 13 includes a holding FF 13a, an encoding / decoding processing unit 13b, a transfer request determining unit 13c, and transfer circuits 13d-1 and 13d-2. The transfer circuits 13d-1 and 13d-2 are included in the macroblock information transfer unit 13d in FIG.

転送要求判定部13cは、メモリアクセス調停部15から送信される、退避用メモリ領域転送要求Aの許可応答を受信すると、転送指示を転送回路13d−1に与える。転送回路13d−1は、転送指示にもとづき、保持FF13a上のマクロブロック情報を、SRAM12の退避用メモリ領域12bへ転送し、SRAM12は、退避用メモリ領域12b内に、そのマクロブロック情報を格納する。   When the transfer request determination unit 13c receives the permission response of the save memory area transfer request A transmitted from the memory access arbitration unit 15, the transfer request determination unit 13c gives a transfer instruction to the transfer circuit 13d-1. Based on the transfer instruction, the transfer circuit 13d-1 transfers the macroblock information on the holding FF 13a to the save memory area 12b of the SRAM 12, and the SRAM 12 stores the macroblock information in the save memory area 12b. .

また、転送要求判定部13cは、メモリアクセス調停部15から送信される、保持FF取り込み転送要求Bの許可応答を受信すると、転送指示を転送回路13d−2に与える。転送回路13d−2は、転送指示にもとづき、SRAM12の取得用メモリ領域12aに格納されているマクロブロック情報を読み出して、保持FF13aへ転送し、保持FF13aは、そのマクロブロック情報を格納する。   When the transfer request determination unit 13c receives the permission response of the retained FF fetch transfer request B transmitted from the memory access arbitration unit 15, the transfer request determination unit 13c gives a transfer instruction to the transfer circuit 13d-2. Based on the transfer instruction, the transfer circuit 13d-2 reads the macroblock information stored in the acquisition memory area 12a of the SRAM 12 and transfers it to the holding FF 13a. The holding FF 13a stores the macroblock information.

DRAM転送制御部14は、転送要求判定部14a、占有量監視回路14b、転送回路14c−1、14c−2を含む。占有量監視回路14bは、DRAM11のメモリ占有量を監視して、監視結果を転送要求判定部14aへ送信する。転送要求判定部14aは、図1で上述したように、占有量の状態にもとづいて、DRAM転送要求Cまたは取得用メモリ領域転送要求Dを送信する。   The DRAM transfer control unit 14 includes a transfer request determination unit 14a, an occupation amount monitoring circuit 14b, and transfer circuits 14c-1 and 14c-2. The occupation amount monitoring circuit 14b monitors the memory occupation amount of the DRAM 11 and transmits the monitoring result to the transfer request determination unit 14a. As described above with reference to FIG. 1, the transfer request determination unit 14a transmits the DRAM transfer request C or the acquisition memory area transfer request D based on the state of the occupation amount.

転送要求判定部14aは、メモリアクセス調停部15から送信される、DRAM転送要求Cの許可応答を受信すると、転送指示を転送回路14c−2に与える。転送回路14c−2は、転送指示にもとづき、SRAM12の退避用メモリ領域12bに格納されているマクロブロック情報を読み出して、DRAM11(DRAM11内の退避用メモリ領域)へ転送し、DRAM11は、そのマクロブロック情報を格納する。   When the transfer request determination unit 14a receives the permission response of the DRAM transfer request C transmitted from the memory access arbitration unit 15, the transfer request determination unit 14a gives a transfer instruction to the transfer circuit 14c-2. Based on the transfer instruction, the transfer circuit 14c-2 reads the macroblock information stored in the save memory area 12b of the SRAM 12 and transfers it to the DRAM 11 (save memory area in the DRAM 11). Stores block information.

また、転送要求判定部14aは、メモリアクセス調停部15から送信される、取得用メモリ領域転送要求Dの許可応答を受信すると、転送指示を転送回路14c−1に与える。転送回路14c−1は、転送指示にもとづき、DRAM11上のマクロブロック情報を、SRAM12の取得用メモリ領域12aへ転送し、SRAM12は、取得用メモリ領域12a内に、そのマクロブロック情報を格納する。   When the transfer request determination unit 14a receives the permission response of the acquisition memory area transfer request D transmitted from the memory access arbitration unit 15, the transfer request determination unit 14a gives a transfer instruction to the transfer circuit 14c-1. The transfer circuit 14c-1 transfers the macroblock information on the DRAM 11 to the acquisition memory area 12a of the SRAM 12 based on the transfer instruction, and the SRAM 12 stores the macroblock information in the acquisition memory area 12a.

メモリアクセス調停部15は、調停制御部15a、占有量監視回路15b−1、15c−1を含む。占有量監視回路15b−1は、退避用メモリ領域12bのメモリ占有量を監視して、監視結果である占有量通知b1を出力し、占有量監視回路15c−1は、取得用メモリ領域12aのメモリ占有量を監視して、監視結果である占有量通知c1を出力する。   The memory access arbitration unit 15 includes an arbitration control unit 15a and occupation amount monitoring circuits 15b-1 and 15c-1. The occupancy monitoring circuit 15b-1 monitors the memory occupancy of the save memory area 12b and outputs an occupancy notification b1 as a monitoring result. The occupancy monitoring circuit 15c-1 outputs the occupancy monitoring circuit 15c-1 of the acquisition memory area 12a. The memory occupation amount is monitored, and an occupation amount notification c1 as a monitoring result is output.

調停制御部15aは、占有量通知b1から退避用メモリ領域12bに空きがあることを認識し、かつ退避用メモリ領域転送要求Aを受信した場合には、退避用メモリ領域転送要求Aに対する許可応答を画像処理部13へ送信する。   When the arbitration control unit 15a recognizes from the occupation amount notification b1 that the save memory area 12b is free and receives the save memory area transfer request A, the arbitration control unit 15a receives a permission response to the save memory area transfer request A. Is transmitted to the image processing unit 13.

また、占有量通知c1から取得用メモリ領域12aにマクロブロック情報が格納されていることを認識し、かつ保持FF取り込み転送要求Bを受信した場合には、保持FF取り込み転送要求Bに対する許可応答を画像処理部13へ送信する。   Further, when it is recognized from the occupation amount notification c1 that the macro block information is stored in the acquisition memory area 12a and the holding FF fetch transfer request B is received, an authorization response to the hold FF fetch transfer request B is sent. The image is transmitted to the image processing unit 13.

さらに、調停制御部15aは、占有量通知b1から退避用メモリ領域12bにマクロブロック情報が格納されていることを認識し、かつDRAM転送要求Cを受信した場合には、DRAM転送要求Cに対する許可応答をDRAM転送制御部14へ送信する。   Further, the arbitration control unit 15a recognizes that the macroblock information is stored in the save memory area 12b from the occupation amount notification b1 and receives the DRAM transfer request C, permits the DRAM transfer request C. The response is transmitted to the DRAM transfer control unit 14.

さらにまた、占有量通知c1から取得用メモリ領域12aに空きがあることを認識し、かつ取得用メモリ領域転送要求Dを受信した場合には、取得用メモリ領域転送要求Dに対する許可応答をDRAM転送制御部14へ送信する。   Furthermore, when it is recognized from the occupation amount notification c1 that the acquisition memory area 12a is empty and the acquisition memory area transfer request D is received, an authorization response to the acquisition memory area transfer request D is transferred to the DRAM. It transmits to the control part 14.

調停制御部15aでは、上記の4つのアクセス要求に対し、基本はラウンドロビンによる処理(アクセス要求を巡回させての処理)を行うが、画像処理部13からの要求があった場合にはこれを最優先とし、また、取得用メモリ領域12aと退避用メモリ領域12bの各領域のoverflow/underflowを発生させないようにアクセス要求を処理することを2番目に高い優先度として調停制御を行うものである。   The arbitration control unit 15a basically performs round robin processing (processing by circulating access requests) for the above four access requests. However, if there is a request from the image processing unit 13, this is processed. Arbitration control is performed with the highest priority given to processing access requests so that overflow / underflow does not occur in each of the acquisition memory area 12a and the save memory area 12b. .

次に第1の実施の形態の画像処理装置10の具体的な調停動作についてタイムチャートを用いて説明する。図4は画像処理装置10の調停動作を示すタイムチャートである。画像処理装置10の動作例として、符号化/復号化処理が短い場合をタイムチャートで示したものである。要求信号のネゲートは、応答信号をアサートすることで生じるのではなく、転送処理完了にてネゲートされるプロトコルとする。   Next, a specific arbitration operation of the image processing apparatus 10 according to the first embodiment will be described using a time chart. FIG. 4 is a time chart showing the arbitration operation of the image processing apparatus 10. As an example of the operation of the image processing apparatus 10, a case where the encoding / decoding process is short is shown in a time chart. The negation of the request signal is not caused by asserting the response signal, but is a protocol negated upon completion of the transfer process.

なお、図4に示す各サイクルの状態がわかりやすいように、図5〜図7に各サイクルの状態を表す状態遷移図を示す(実際にはメモリアクセス調停部15、DRAM転送制御部14を介して調停制御が行われるが図では省略している)。図5〜図7中の実線矢印は、転送要求A〜Dが許可されることによりマクロブロック情報が流れる様子を示し、点線矢印は、転送要求A〜Dのアサート状態(アサートしているだけでマクロブロック情報は流れていない状態)を示す。   In order to make the state of each cycle shown in FIG. 4 easy to understand, FIGS. 5 to 7 show state transition diagrams showing the state of each cycle (in practice, via the memory access arbitration unit 15 and the DRAM transfer control unit 14). Mediation control is performed, but is omitted in the figure). The solid line arrows in FIGS. 5 to 7 indicate that the macroblock information flows when the transfer requests A to D are permitted, and the dotted line arrows indicate the assertion states (only asserted) of the transfer requests A to D. Macro block information is not flowing).

〔CYC1〕
(初期状態)符号化/復号化処理部13bは、1マクロブロックの符号化/復号化処理が完了した直後とする。その処理結果のマクロブロック情報が保持FF13a上にあり、それを退避するために転送要求A(保持FF13a→退避用メモリ領域12b)を調停制御部15aにアサートする。この状態では、退避用メモリ領域12bは空であり、取得用メモリ領域12aは満杯であるとする。DRAM転送制御部14は、退避/取得共に制御は不要な状態であるので何も転送要求は発しない。
[CYC1]
(Initial state) The encoding / decoding processing unit 13b is immediately after the encoding / decoding processing of one macroblock is completed. The macro block information of the processing result is on the holding FF 13a, and in order to save it, the transfer request A (holding FF 13a → saving memory area 12b) is asserted to the arbitration control unit 15a. In this state, it is assumed that the save memory area 12b is empty and the acquisition memory area 12a is full. Since the DRAM transfer control unit 14 is in a state where neither saving nor acquisition is required, no transfer request is issued.

(展開)調停制御部15aは、転送要求Aを受信して転送を許可する。符号化/復号化処理部13bは、保持FF13aから退避用メモリ領域12bへマクロブロック情報を転送する。転送完了により、転送要求Aはネゲートされる。   (Development) The arbitration control unit 15a receives the transfer request A and permits the transfer. The encoding / decoding processing unit 13b transfers the macroblock information from the holding FF 13a to the save memory area 12b. Upon completion of transfer, transfer request A is negated.

〔CYC2〕
(初期状態)符号化/復号化処理部13bは、次マクロブロックの符号化/復号化処理を行うために転送要求B(取得用メモリ領域12a→保持FF13a)を調停制御部15aにアサートする。退避用メモリ領域12bはCYC1での転送により空ではなくなっている。DRAM転送制御部14は、退避用メモリ領域12b内のマクロブロック情報のDRAM11退避のために転送要求C(退避用メモリ領域12b→DRAM11)をアサートする(DRAM11上の退避用領域が満杯ではない状況を想定)。
[CYC2]
(Initial state) The encoding / decoding processing unit 13b asserts a transfer request B (acquisition memory area 12a → holding FF 13a) to the arbitration control unit 15a in order to perform encoding / decoding processing of the next macroblock. The save memory area 12b is not empty due to the transfer by CYC1. The DRAM transfer control unit 14 asserts a transfer request C (saving memory area 12b → DRAM 11) to save the macroblock information in the saving memory area 12b in the DRAM 11 (the saving area on the DRAM 11 is not full). Suppose).

(展開)調停制御部15aは、優先度の高い転送要求Bを受信し、その転送を許可する。符号化/復号化処理部13bは、取得用メモリ領域12aから保持FF13aへの転送を行う。転送完了により、転送要求Bはネゲートされる。   (Development) The arbitration control unit 15a receives the transfer request B having a high priority and permits the transfer. The encoding / decoding processing unit 13b performs transfer from the acquisition memory area 12a to the holding FF 13a. Upon completion of transfer, transfer request B is negated.

〔CYC3〕
(初期状態)符号化/復号化処理部13bは、CYC2で取得用メモリ領域12aから転送されたマクロブロック情報を用いて符号化/復号化処理を行う。処理中であるので、転送要求は発生しない。また、DRAM転送制御部14からの転送要求Cはアサートされたままである。加えて、CYC2での取得用メモリ領域12a→保持FF13aへの転送により、取得用メモリ領域12aは満杯ではなくなっているので、その空き領域に新たなDRAM11上のマクロブロック情報を取り込むための転送要求D(DRAM11→取得用メモリ領域12a)をアサートする(DRAM11上の退避用メモリ領域が空ではない状況を想定)。
[CYC3]
(Initial state) The encoding / decoding processing unit 13b performs encoding / decoding processing using the macroblock information transferred from the acquisition memory area 12a in CYC2. Since processing is in progress, no transfer request is generated. Further, the transfer request C from the DRAM transfer control unit 14 remains asserted. In addition, since the acquisition memory area 12a is not full due to the transfer from the acquisition memory area 12a to the holding FF 13a in the CYC2, a transfer request for taking in new macroblock information on the DRAM 11 in the empty area D (DRAM 11 → acquisition memory area 12a) is asserted (assuming that the save memory area on the DRAM 11 is not empty).

(展開)調停制御部15aは、ラウンドロビンにより転送要求Cを受信し、その転送を許可する。これにより、DRAM転送制御部14は、退避用メモリ領域12bからDRAM11への転送を行う。   (Development) The arbitration control unit 15a receives the transfer request C by round robin and permits the transfer. Accordingly, the DRAM transfer control unit 14 performs transfer from the save memory area 12b to the DRAM 11.

〔CYC4〕
(初期状態)符号化/復号化処理部13bは、1マクロブロックの符号化/復号化処理が完了し、転送要求A(保持FF13a→退避用メモリ領域12b)をアサートする。DRAM転送制御部14による、退避用メモリ領域12bからDRAM11への転送はCYC3から続いている。転送要求C、Dはアサートされたままである。
[CYC4]
(Initial state) The encoding / decoding processing unit 13b completes the encoding / decoding processing of one macroblock, and asserts the transfer request A (holding FF 13a → saving memory area 12b). The transfer from the save memory area 12b to the DRAM 11 by the DRAM transfer control unit 14 continues from CYC3. Transfer requests C and D remain asserted.

(展開)CYC3からの退避用メモリ領域12bからDRAM11への転送が引き続き行われているので、調停制御部15aは転送要求A(保持FF13a→退避用メモリ領域12b)、転送要求D(DRAM11→取得用メモリ領域12a)共に放置したままとする。転送完了により、転送要求Cはネゲートされる。   (Development) Since the transfer from the save memory area 12b from the CYC 3 to the DRAM 11 continues, the arbitration control unit 15a transfers the transfer request A (holding FF 13a → the save memory area 12b) and transfer request D (DRAM 11 → acquisition). The memory area 12a) is left unattended. Upon completion of transfer, transfer request C is negated.

〔CYC5〕
(初期状態)符号化/復号化処理部13bは、引き続き転送要求Aをアサートしており、DRAM転送制御部14は、引き続き転送要求Dをアサートしている。CYC3、4の転送により退避用メモリ領域12bは空になっているので、転送要求Cは発生しない。
[CYC5]
(Initial state) The encoding / decoding processing unit 13b continues to assert the transfer request A, and the DRAM transfer control unit 14 continues to assert the transfer request D. Since the save memory area 12b is emptied by the transfer of CYC3 and CYC4, the transfer request C is not generated.

(展開)調停制御部15aは、優先度の高い転送要求Aを受信し、その転送を許可する。符号化/復号化処理部13bは、保持FF13aから退避用メモリ領域12bへの転送を行う。転送完了により、転送要求Aはネゲートされる。   (Development) The arbitration control unit 15a receives the transfer request A having a high priority and permits the transfer. The encoding / decoding processing unit 13b performs transfer from the holding FF 13a to the save memory area 12b. Upon completion of transfer, transfer request A is negated.

〔CYC6〕
(初期状態)符号化/復号化処理部13bは、次マクロブロックの符号化/復号化処理を行うために転送要求Bをアサートする。DRAM転送制御部14は、引き続き転送要求Dをアサートしている。加えて、退避用メモリ領域12bはCYC5での転送により空ではなくなっており、退避用メモリ領域12bに格納されているマクロブロック情報のDRAM11退避のために転送要求Cをアサートする。
[CYC6]
(Initial state) The encoding / decoding processor 13b asserts the transfer request B in order to perform encoding / decoding processing of the next macroblock. The DRAM transfer control unit 14 continues to assert the transfer request D. In addition, the save memory area 12b is not empty due to the transfer in CYC5, and the transfer request C is asserted for saving the DRAM 11 of the macroblock information stored in the save memory area 12b.

(展開)調停制御部15aは、優先度の高い転送要求Bを受信し、その転送を許可する。符号化/復号化処理部13bは、取得用メモリ領域12aから保持FF13aへの転送を行う。転送完了により、転送要求Bはネゲートされる。   (Development) The arbitration control unit 15a receives the transfer request B having a high priority and permits the transfer. The encoding / decoding processing unit 13b performs transfer from the acquisition memory area 12a to the holding FF 13a. Upon completion of transfer, transfer request B is negated.

〔CYC7〕
(初期状態)符号化/復号化処理部13bは、CYC6で取得用メモリ領域12aから保持FF13aへ転送したマクロブロック情報を用いて符号化/復号化処理を行う。処理中であるので、転送要求は発生しない。DRAM転送制御部14は、引き続き転送要求C、Dをアサートしている。
[CYC7]
(Initial state) The encoding / decoding processing unit 13b performs encoding / decoding processing using the macroblock information transferred from the acquisition memory area 12a to the holding FF 13a in CYC6. Since processing is in progress, no transfer request is generated. The DRAM transfer control unit 14 continues to assert transfer requests C and D.

(展開)調停制御部15aは、ラウンドロビンにより転送要求Dを受信し、その転送を許可する。DRAM転送制御部14は、DRAM11から取得用メモリ領域12aへの転送を行う。   (Development) The arbitration control unit 15a receives the transfer request D by round robin and permits the transfer. The DRAM transfer control unit 14 performs transfer from the DRAM 11 to the acquisition memory area 12a.

〔CYC8〕
(初期状態)符号化/復号化処理部13bは、1マクロブロックの符号化/復号化処理が完了し、転送要求Aをアサートする。DRAM転送制御部14によるDRAM11から取得用メモリ領域12aへの転送はCYC7から続いている。転送要求C、Dはアサートされたままである。
[CYC8]
(Initial state) The encoding / decoding processor 13b completes the encoding / decoding processing of one macroblock and asserts the transfer request A. Transfer from the DRAM 11 to the acquisition memory area 12a by the DRAM transfer control unit 14 continues from CYC7. Transfer requests C and D remain asserted.

(展開)CYC7からの転送が引き続き行われているので、調停制御部15aは転送要求A、C共に放置したままとする。転送完了により、転送要求Dはネゲートされる。
〔CYC9〕
(初期状態)符号化/復号化処理部13bは、引き続き、転送要求Aをアサートしている。DRAM転送制御部14は、引き続き、転送要求Cをアサートしている。加えて、CYC2にて発生した取得用メモリ領域12aの空の分しかCYC7、8では転送(DRAM11から取得用メモリ領域12aへの転送)されておらず、CYC6で発生した分の空き(取得用メモリ領域12aから保持FF13aへ転送した際にできた取得用メモリ領域12a上の空き)に、新たなDRAM11上のマクロブロック情報を取り込むための転送要求Dを再度アサートする。
(Development) Since the transfer from the CYC 7 continues, the arbitration control unit 15a leaves both the transfer requests A and C unattended. Upon completion of the transfer, the transfer request D is negated.
[CYC9]
(Initial state) The encoding / decoding processing unit 13b continues to assert the transfer request A. The DRAM transfer control unit 14 continues to assert the transfer request C. In addition, only the empty space in the acquisition memory area 12a generated in CYC2 is transferred in CYC7 and 8 (transfer from the DRAM 11 to the acquisition memory area 12a), and the empty space (acquisition for acquisition) in CYC6. The transfer request D for taking in the macroblock information on the new DRAM 11 is reasserted in the empty space on the acquisition memory area 12a created when the memory area 12a is transferred to the holding FF 13a.

(展開)調停制御部15aは、優先度の高い転送要求Aを受信し、その転送を許可する。符号化/復号化処理部13bは、保持FF13aから退避用メモリ領域12bへの転送を行う。転送完了により、転送要求Aはネゲートされる。   (Development) The arbitration control unit 15a receives the transfer request A having a high priority and permits the transfer. The encoding / decoding processing unit 13b performs transfer from the holding FF 13a to the save memory area 12b. Upon completion of transfer, transfer request A is negated.

〔CYC10〕
(初期状態)符号化/復号化処理部13bは、次マクロブロックの符号化/復号化処理を行うために転送要求Bをアサートする。DRAM転送制御部14は、引き続き、転送要求C、Dをアサートしている。
[CYC10]
(Initial state) The encoding / decoding processor 13b asserts the transfer request B in order to perform encoding / decoding processing of the next macroblock. The DRAM transfer control unit 14 continues to assert transfer requests C and D.

(展開)調停制御部15aは、優先度の高い転送要求Bを受信し、その転送を許可する。符号化/復号化処理部13bは、取得用メモリ領域12aから保持FF13aへの転送を行う。転送完了により、転送要求Bはネゲートされる。   (Development) The arbitration control unit 15a receives the transfer request B having a high priority and permits the transfer. The encoding / decoding processing unit 13b performs transfer from the acquisition memory area 12a to the holding FF 13a. Upon completion of transfer, transfer request B is negated.

上記の制御の結果、符号化/復号化処理部13bのマクロブロック処理時間がある程度の長さで、DRAM11への退避に要する時間と、DRAM11からの取得に要する時間の和と同程度である状況であれば、マクロブロック処理期間にSRAM12とDRAM11の間の転送が行われるという最も安定した状態となる。   As a result of the above control, the macroblock processing time of the encoding / decoding processing unit 13b is a certain length, and is the same as the sum of the time required for saving to the DRAM 11 and the time required for acquisition from the DRAM 11 If so, the most stable state in which transfer between the SRAM 12 and the DRAM 11 is performed during the macroblock processing period.

反対に、符号化/復号化処理部13bのマクロブロック処理時間が極端に短い場合は、SRAM12上の退避用メモリ領域12bと取得用メモリ領域12aの各領域が破綻しない限り、マクロブロック処理期間にはSRAM12とDRAM11の間の転送は退避か取得かどちらかのみが許可される。   On the other hand, if the macroblock processing time of the encoding / decoding processing unit 13b is extremely short, the macroblock processing period is not changed unless the save memory area 12b and the acquisition memory area 12a on the SRAM 12 fail. The transfer between the SRAM 12 and the DRAM 11 is only allowed to be saved or acquired.

以上説明したように、第1の実施の形態の構成によれば、符号化/復号化処理部13bから出力されるマクロブロック情報は、マクロブロック処理期間中は適宜、保持FF13aに書き込まれていき、全てが確定した時点でSRAM12への書き込みを行う。また、符号化/復号化処理部13bが使用するマクロブロック情報は、マクロブロック処理開始前にSRAM12から保持FF13aに一括して読み込まれ、符号化/復号化処理部13bはマクロブロック処理期間中にはその保持FF13a上の値を適宜参照して処理を行うこととした。このような構成にすることにより、符号化/復号化処理部13b側からのSRAM12のポートへのアクセス時間を短縮することが可能になる。   As described above, according to the configuration of the first embodiment, the macroblock information output from the encoding / decoding processing unit 13b is written to the holding FF 13a as appropriate during the macroblock processing period. When all of them are confirmed, writing to the SRAM 12 is performed. Also, the macroblock information used by the encoding / decoding processing unit 13b is collectively read from the SRAM 12 into the holding FF 13a before the macroblock processing starts, and the encoding / decoding processing unit 13b performs the macroblock processing period. The processing is performed by appropriately referring to the value on the holding FF 13a. With this configuration, it is possible to shorten the access time to the port of the SRAM 12 from the encoding / decoding processing unit 13b side.

次に第2の実施の形態の画像処理装置について説明する。第2の実施の形態は、画像処理部とDRAM転送制御部とでポート使用権をやりとりしながら、SRAMへのポートアクセスを行うものである。   Next, an image processing apparatus according to a second embodiment will be described. In the second embodiment, port access to the SRAM is performed while exchanging port usage rights between the image processing unit and the DRAM transfer control unit.

図8は画像処理装置の原理図である。画像処理装置20は、DRAM(第1のメモリ)21、SRAM(第2のメモリ)22、画像処理部23、メモリ転送制御部24から構成される。   FIG. 8 is a principle diagram of the image processing apparatus. The image processing apparatus 20 includes a DRAM (first memory) 21, an SRAM (second memory) 22, an image processing unit 23, and a memory transfer control unit 24.

DRAM21は、処理(符号化/復号化処理)済みのマクロブロックのマクロブロック情報を格納する。SRAM22は、DRAM21から転送されたマクロブロック情報を格納しておく取得用メモリ領域22aと、DRAM21へ転送して、DRAM21に格納させるべきマクロブロック情報を格納しておく退避用メモリ領域22bとでメモリ領域が2つに分割されたシングルポートのメモリである。   The DRAM 21 stores macroblock information of a macroblock that has been processed (encoded / decoded). The SRAM 22 includes an acquisition memory area 22 a for storing macroblock information transferred from the DRAM 21 and a save memory area 22 b for storing macroblock information to be transferred to the DRAM 21 and stored in the DRAM 21. This is a single-port memory in which the area is divided into two.

画像処理部23は、保持FF(保持メモリ)23a、符号化/復号化処理部23b、画像処理側ポート使用権管理部23c、画像処理側マクロブロック情報転送部23dから構成される。   The image processing unit 23 includes a holding FF (holding memory) 23a, an encoding / decoding processing unit 23b, an image processing side port usage right management unit 23c, and an image processing side macroblock information transfer unit 23d.

保持FF23aは、マクロブロック情報を一時格納するメモリである。符号化/復号化処理部23bは、保持FF23aからマクロブロック情報を読み出して参照して、処理対象のマクロブロックの符号化/復号化処理を行う。また、処理完了後に得られたマクロブロック情報を保持FF23aに格納する。   The holding FF 23a is a memory that temporarily stores macroblock information. The encoding / decoding processor 23b reads out and refers to the macroblock information from the holding FF 23a, and performs encoding / decoding processing of the macroblock to be processed. Further, the macro block information obtained after the processing is completed is stored in the holding FF 23a.

画像処理側マクロブロック情報転送部23dは、メモリ側ポート使用権譲渡通知Bが与えられていて(画像処理側ポート使用権管理部23cがメモリ側ポート使用権譲渡通知Bを受信して)、画像処理部23がSRAM22へアクセス可能なポート使用権を有する場合であって、符号化/復号化処理部23bの符号化/復号化処理が完了した際には、保持FF23aにあるマクロブロック情報を、退避用メモリ領域22bへ転送し、符号化/復号化処理部23bが符号化/復号化処理を開始する際には、取得用メモリ領域22aにあるマクロブロック情報を保持FF23aへ転送する。   The image processing side macroblock information transfer unit 23d is given a memory side port usage right transfer notification B (when the image processing side port usage right management unit 23c receives the memory side port usage right transfer notification B), When the processing unit 23 has a right to use the port that can access the SRAM 22, and when the encoding / decoding processing of the encoding / decoding processing unit 23b is completed, the macroblock information in the holding FF 23a is When the data is transferred to the save memory area 22b and the encoding / decoding processor 23b starts the encoding / decoding process, the macroblock information in the acquisition memory area 22a is transferred to the holding FF 23a.

画像処理側ポート使用権管理部23cは、取得用メモリ領域22aから保持FF23aへのマクロブロック情報の転送完了時に、ポート使用権を相手先(メモリ転送制御部24)へ譲渡するための画像処理側ポート使用権譲渡通知Aを出力する。また、符号化/復号化処理の完了時に、ポート使用権が画像処理部23側にない場合は、ポート使用権を強制的に要求するためのポート使用権要求通知Cを出力する。   The image processing side port usage right management unit 23c transfers the port usage right to the other party (memory transfer control unit 24) when the transfer of the macroblock information from the acquisition memory area 22a to the holding FF 23a is completed. A port usage right transfer notice A is output. When the encoding / decoding process is completed, if the port usage right is not on the image processing unit 23 side, a port usage right request notification C for forcibly requesting the port usage right is output.

メモリ転送制御部24は、メモリ側ポート使用権管理部24aとメモリ側マクロブロック情報転送部24cから構成される。メモリ側マクロブロック情報転送部24cは、画像処理側ポート使用権譲渡通知Aが与えられて(メモリ側ポート使用権管理部24aが画像処理側ポート使用権譲渡通知Aを受信して)、メモリ転送制御部24がポート使用権を有する場合であって、退避用メモリ領域22bからDRAM21へマクロブロック情報の転送を行い、DRAM21から取得用メモリ領域22aへマクロブロック情報の転送を行う。   The memory transfer control unit 24 includes a memory side port usage right management unit 24a and a memory side macroblock information transfer unit 24c. The memory-side macroblock information transfer unit 24c receives the image processing-side port usage right transfer notification A (when the memory-side port usage right management unit 24a receives the image processing-side port usage right transfer notification A) and transfers the memory. When the control unit 24 has the right to use the port, the macro block information is transferred from the save memory area 22b to the DRAM 21, and the macro block information is transferred from the DRAM 21 to the acquisition memory area 22a.

メモリ側ポート使用権管理部24aは、DRAM21から取得用メモリ領域22aへのマクロブロック情報の転送完了時、またはポート使用権要求通知Cを受信した場合には、メモリ側ポート使用権譲渡通知Bを出力して、ポート使用権を画像処理部23へ譲渡する。   The memory-side port usage right management unit 24a sends a memory-side port usage right transfer notification B when the transfer of macroblock information from the DRAM 21 to the acquisition memory area 22a is completed or when a port usage right request notification C is received. Output the port usage right to the image processing unit 23.

図9は画像処理装置20の構成を示す図である。なお、図8で上述した構成要素と同じ構成要素の説明は省略する。また、画像処理側ポート使用権譲渡通知A、メモリ側ポート使用権譲渡通知B、ポート使用権要求通知Cのそれぞれは、以下単に、譲渡通知A、譲渡通知B、要求通知Cとも表記する。   FIG. 9 is a diagram showing the configuration of the image processing apparatus 20. In addition, description of the same component as the component mentioned above in FIG. 8 is abbreviate | omitted. Further, the image processing side port usage right transfer notification A, the memory side port usage right transfer notification B, and the port usage right request notification C are also simply referred to as transfer notification A, transfer notification B, and request notification C, respectively.

画像処理部23は、保持FF23a、符号化/復号化処理部23b、使用権管理部23c(図8の画像処理側ポート使用権管理部23cに該当)、転送回路23d−1、23d−2を含む。転送回路23d−1、23d−2は、図8の画像処理側マクロブロック情報転送部23dに含まれる。   The image processing unit 23 includes a holding FF 23a, an encoding / decoding processing unit 23b, a usage right management unit 23c (corresponding to the image processing side port usage right management unit 23c in FIG. 8), and transfer circuits 23d-1 and 23d-2. Including. The transfer circuits 23d-1 and 23d-2 are included in the image processing side macroblock information transfer unit 23d in FIG.

使用権管理部23cは、メモリ側ポート使用権譲渡通知Bを受信すると、ポート使用権を取得する。このとき、符号化/復号化処理部23bの符号化/復号化処理が完了した場合には、転送指示を転送回路23d−1に与える。転送回路23d−1は、転送指示にもとづき、保持FF23a上のマクロブロック情報を、SRAM22の退避用メモリ領域22bへ転送し、SRAM22は、退避用メモリ領域22b内に、そのマクロブロック情報を格納する。   When the usage right management unit 23c receives the memory side port usage right transfer notification B, the usage right management unit 23c acquires the port usage right. At this time, when the encoding / decoding process of the encoding / decoding processing unit 23b is completed, a transfer instruction is given to the transfer circuit 23d-1. Based on the transfer instruction, the transfer circuit 23d-1 transfers the macroblock information on the holding FF 23a to the save memory area 22b of the SRAM 22, and the SRAM 22 stores the macroblock information in the save memory area 22b. .

また、符号化/復号化処理部23bが符号化/復号化処理を開始する場合には、転送指示を転送回路23d−2に与える。転送回路23d−2は、転送指示にもとづき、SRAM22の取得用メモリ領域22aに格納されているマクロブロック情報を読み出して、保持FF23aへ転送し、保持FF23aは、そのマクロブロック情報を格納する。   When the encoding / decoding processing unit 23b starts the encoding / decoding process, a transfer instruction is given to the transfer circuit 23d-2. Based on the transfer instruction, the transfer circuit 23d-2 reads the macroblock information stored in the acquisition memory area 22a of the SRAM 22 and transfers it to the holding FF 23a. The holding FF 23a stores the macroblock information.

一方、DRAM転送制御部24(図8のメモリ転送制御部24に該当)は、使用権管理部24a−1、転送判定部24a−2、転送回路24c−1、24c−2、占有量監視回路24b−1〜24b−3から構成される。使用権管理部24a−1と転送判定部24a−2は、図8のメモリ側ポート使用権管理部24aに含まれ、転送回路24c−1、24c−2は、図8のメモリ側マクロブロック情報転送部24cに含まれる。   On the other hand, the DRAM transfer control unit 24 (corresponding to the memory transfer control unit 24 in FIG. 8) includes a usage right management unit 24a-1, a transfer determination unit 24a-2, transfer circuits 24c-1 and 24c-2, and an occupation amount monitoring circuit. 24b-1 to 24b-3. The usage right management unit 24a-1 and the transfer determination unit 24a-2 are included in the memory side port usage right management unit 24a of FIG. 8, and the transfer circuits 24c-1 and 24c-2 are memory side macroblock information of FIG. It is included in the transfer unit 24c.

占有量監視回路24b−1は、DRAM21のメモリ占有量を監視して、監視結果b1を転送判定部24a−2へ送信する。占有量監視回路24b−2は、取得用メモリ領域22aのメモリ占有量を監視して、監視結果b2を転送判定部24a−2へ送信する。占有量監視回路24b−3は、退避用メモリ領域22bのメモリ占有量を監視して、監視結果b3を転送判定部24a−2へ送信する。   The occupation amount monitoring circuit 24b-1 monitors the memory occupation amount of the DRAM 21, and transmits the monitoring result b1 to the transfer determination unit 24a-2. The occupation amount monitoring circuit 24b-2 monitors the memory occupation amount of the acquisition memory area 22a, and transmits the monitoring result b2 to the transfer determination unit 24a-2. The occupation amount monitoring circuit 24b-3 monitors the memory occupation amount of the save memory area 22b and transmits the monitoring result b3 to the transfer determination unit 24a-2.

使用権管理部24a−1は、画像処理側ポート使用権譲渡通知Aを受信すると、ポート使用権を取得したことを転送判定部24a−2へ通知する。このとき、転送判定部24a−2は、監視結果b1からDRAM21にマクロブロック情報があり、監視結果b2から取得用メモリ領域22aに空きがあることを認識した場合には、転送指示を転送回路24c−1へ送信する。転送回路24c−1は、転送指示にもとづいて、DRAM21上のマクロブロック情報を、SRAM22の取得用メモリ領域22aへ転送し、SRAM22は、取得用メモリ領域22a内に、そのマクロブロック情報を格納する。   When the usage right management unit 24a-1 receives the image processing side port usage right transfer notification A, the usage right management unit 24a-1 notifies the transfer determination unit 24a-2 that the port usage right has been acquired. At this time, if the transfer determination unit 24a-2 recognizes that there is macroblock information in the DRAM 21 from the monitoring result b1 and that the acquisition memory area 22a is free from the monitoring result b2, the transfer determination unit 24a-2 issues a transfer instruction to the transfer circuit 24c. -1. The transfer circuit 24c-1 transfers the macroblock information on the DRAM 21 to the acquisition memory area 22a of the SRAM 22 based on the transfer instruction, and the SRAM 22 stores the macroblock information in the acquisition memory area 22a. .

また、転送判定部24a−2は、監視結果b1からDRAM21に空きがあり、監視結果b3から退避用メモリ領域22bにマクロブロック情報があることを認識した場合には、転送指示を転送回路24c−2へ送信する。転送回路24c−2は、転送指示にもとづいて、退避用メモリ領域22b上のマクロブロック情報を、DRAM21へ転送し、DRAM21はそのマクロブロック情報を格納する。   When the transfer determination unit 24a-2 recognizes that the DRAM 21 is vacant from the monitoring result b1 and the macroblock information exists in the save memory area 22b from the monitoring result b3, the transfer determination unit 24a-2 issues a transfer instruction to the transfer circuit 24c- 2 to send. The transfer circuit 24c-2 transfers the macroblock information on the save memory area 22b to the DRAM 21 based on the transfer instruction, and the DRAM 21 stores the macroblock information.

ここで、SRAM22のポートの使用権は、画像処理部23とDRAM転送制御部24との間で交互に受け渡されるが、DRAM転送制御部24がSRAM22とDRAM21間でのマクロブロック情報の転送を行うか否かは、占有量監視回路24b−1〜24b−3で監視を行ったDRAM21、取得用メモリ領域22a、退避用メモリ領域22bのメモリ格納状態に依存する。   Here, the right to use the port of the SRAM 22 is alternately transferred between the image processing unit 23 and the DRAM transfer control unit 24, but the DRAM transfer control unit 24 transfers the macroblock information between the SRAM 22 and the DRAM 21. Whether or not to do so depends on the memory storage states of the DRAM 21, the acquisition memory area 22a, and the save memory area 22b monitored by the occupation amount monitoring circuits 24b-1 to 24b-3.

画像処理部23においては、マクロブロック処理開始前に、「取得用メモリ領域22aの隣接マクロブロック情報の保持FF23aへの取り込み(隣接マクロブロックが存在する場合のみ)」を行い、マクロブロック処理を開始する。そして、取得用メモリ領域22aから保持FF23aへのマクロブロック情報の転送完了時に(マクロブロック処理開始時と同様)、画像処理側ポート使用権譲渡通知Aを出力して、ポート使用権をDRAM転送制御部24に渡す。   The image processing unit 23 performs “capture of adjacent macroblock information in the acquisition memory area 22a into the holding FF 23a (only when there is an adjacent macroblock)” before starting the macroblock processing, and starts the macroblock processing. To do. When the transfer of the macroblock information from the acquisition memory area 22a to the holding FF 23a is completed (similar to the start of the macroblock processing), the image processing side port usage right transfer notice A is output, and the port usage right is controlled by DRAM transfer control. Pass to part 24.

画像処理部23では、その後、ポート使用権がDRAM転送制御部24から戻ってくるのを待って(メモリ側ポート使用権譲渡通知Bが送信されるのを待って)、ポート使用権を得ると、「マクロブロック処理完了時点の保持FF23a上の現マクロブロック情報を退避用メモリ領域22bへの書き出し」を行う。   After that, the image processing unit 23 waits for the port usage right to return from the DRAM transfer control unit 24 (waits for the memory-side port usage right transfer notification B to be transmitted) and obtains the port usage right. , “Writes the current macroblock information on the holding FF 23a when the macroblock processing is completed to the save memory area 22b”.

一方、DRAM転送制御部24においては、ポート使用権を取得すると、退避用メモリ領域22bに適切な量のマクロブロック情報があり、かつDRAM21に空きがあれば「退避用メモリ領域22bからDRAM21への転送」を行う。続いて、DRAM21が空でなく、かつ取得用メモリ領域22aに空きがあれば「DRAM21から取得用メモリ領域22aへの転送」が行われる。   On the other hand, when the DRAM transfer control unit 24 obtains the port usage right, if there is an appropriate amount of macroblock information in the save memory area 22b and the DRAM 21 has a free space, the "transfer memory area 22b to the DRAM 21" Transfer ". Subsequently, if the DRAM 21 is not empty and the acquisition memory area 22a is empty, "transfer from the DRAM 21 to the acquisition memory area 22a" is performed.

これらの動作の後、メモリ側ポート使用権譲渡通知Bを出力して、ポート使用権を画像処理部23に渡す。なお、例外として、メモリ側ポート使用権譲渡通知Bを出力する以前に、画像処理部23でマクロブロックの符号化/復号化処理が終わっている場合には、画像処理部23は、ポート使用権要求通知Cを出力する。   After these operations, the memory side port usage right transfer notice B is output, and the port usage right is transferred to the image processing unit 23. As an exception, if the macroblock encoding / decoding process is completed in the image processing unit 23 before the memory side port usage right transfer notice B is output, the image processing unit 23 Request notification C is output.

この場合、DRAM転送制御部24によるSRAM22からDRAM21への転送が完了した時点で、取得用メモリ領域22aに次のマクロブロック処理のために必要なマクロブロック情報が存在しているのであれば、画像処理部23内の符号化/復号化処理部23bの処理待ち状態を解消するべく、DRAM転送制御部24は、DRAM21からSRAM22への転送は行わずに、メモリ側ポート使用権譲渡通知Bを出力して、ポート使用権を画像処理部23に渡す。   In this case, when the transfer from the SRAM 22 to the DRAM 21 by the DRAM transfer control unit 24 is completed, if the macro block information necessary for the next macro block processing exists in the acquisition memory area 22a, the image is displayed. In order to cancel the processing waiting state of the encoding / decoding processing unit 23b in the processing unit 23, the DRAM transfer control unit 24 outputs a memory-side port usage right transfer notification B without performing transfer from the DRAM 21 to the SRAM 22. Then, the port usage right is transferred to the image processing unit 23.

ここで、図2を使って、画像処理装置20におけるマクロブロック情報の流れの一例について説明すると、符号化/復号化処理部23bでマクロブロックMB0の符号化/復号化処理の開始時には、保持FF23aは、最低でもマクロブロックMBr1〜MBr4のそれぞれのマクロブロック情報を保持していることになる。   Here, an example of the flow of macroblock information in the image processing apparatus 20 will be described with reference to FIG. 2. When the encoding / decoding processing unit 23b starts the encoding / decoding processing of the macroblock MB0, the holding FF 23a Holds at least the macroblock information of each of the macroblocks MBr1 to MBr4.

保持FF23aが、マクロブロックMBr1〜MBr4のそれぞれのマクロブロック情報を保持していると仮定すると、マクロブロックMB0の処理が終了した後、マクロブロックMB0のマクロブロック情報は、保持FF23aに格納される。また、マクロブロックMBr4のマクロブロック情報は、退避用メモリ領域22bに転送され(ポート使用権がある場合)、その後、DRAM21へ転送されて格納される。さらに、次のマクロブロックMB1の処理に備えて、取得用メモリ領域22aからはマクロブロックMBr5のマクロブロック情報が、保持FF23aに転送されて(ポート使用権がある場合)格納されることになる(マクロブロックMBr5のマクロブロック情報だけでなく、マクロブロックグループg1の中のより多くのマクロブロック情報を保持FF23aに転送しておいてもよい)。なお、メモリ間のマクロブロック情報の流れ及びメモリ調停の詳細については以降の図10〜図13で後述する。   Assuming that the holding FF 23a holds the macroblock information of the macroblocks MBr1 to MBr4, after the processing of the macroblock MB0 is completed, the macroblock information of the macroblock MB0 is stored in the holding FF 23a. Further, the macroblock information of the macroblock MBr4 is transferred to the save memory area 22b (when there is a port use right), and then transferred to the DRAM 21 and stored therein. Further, in preparation for processing of the next macroblock MB1, the macroblock information of the macroblock MBr5 is transferred from the acquisition memory area 22a to the holding FF 23a (when there is a right to use the port) and is stored ( Not only the macroblock information of the macroblock MBr5 but also more macroblock information in the macroblock group g1 may be transferred to the holding FF 23a). The flow of macroblock information between memories and details of memory arbitration will be described later with reference to FIGS.

次に第2の実施の形態の画像処理装置20の動作をタイムチャートを用いて説明する。図10は画像処理装置20の調停動作を示すタイムチャートである。なお、図10に示す各サイクルの状態がわかりやすいように、図11〜図13に各サイクルの状態を表す状態遷移図を示す(実際にはDRAM転送制御部24を介して調停制御が行われるが図では省略している)。実線矢印はマクロブロック情報の流れ、点線矢印は譲渡通知Aまたは譲渡通知Bを表し、図13の太線矢印は要求通知Cを表す。   Next, the operation of the image processing apparatus 20 according to the second embodiment will be described using a time chart. FIG. 10 is a time chart showing the arbitration operation of the image processing apparatus 20. In order to make the state of each cycle shown in FIG. 10 easy to understand, FIGS. 11 to 13 show state transition diagrams showing the state of each cycle (actually, arbitration control is performed via the DRAM transfer control unit 24). (Omitted in the figure). A solid line arrow represents the flow of macroblock information, a dotted line arrow represents transfer notification A or transfer notification B, and a thick line arrow in FIG.

〔CYC1〕
(ポート使用権)画像処理部23
(展開)画像処理部23は、1マクロブロックの符号化/復号化処理が完了した直後とする。その処理結果のマクロブロック情報が保持FF23a上にあり、それを退避するために保持FF23aから退避用メモリ領域22bへの転送を行う。
[CYC1]
(Port usage right) Image processing unit 23
(Development) The image processing unit 23 is immediately after the encoding / decoding processing of one macroblock is completed. The macro block information as a result of the processing is on the holding FF 23a, and transfer is performed from the holding FF 23a to the saving memory area 22b in order to save it.

〔CYC2〕
(ポート使用権)画像処理部23
(展開)画像処理部23は、次マクロブロックの符号化/復号化処理を行うために、取得用メモリ領域22aから保持FF23aへの転送を行う。転送完了時点で、画像処理側ポート使用権譲渡通知Aをアサートする。
[CYC2]
(Port usage right) Image processing unit 23
(Development) The image processing unit 23 performs transfer from the acquisition memory area 22a to the holding FF 23a in order to perform encoding / decoding processing of the next macroblock. When the transfer is completed, the image processing side port usage right transfer notice A is asserted.

〔CYC3〕
(ポート使用権)DRAM転送制御部24
(展開)CYC1での転送で、退避用メモリ領域22bは空ではなくなっているので、DRAM転送制御部24は退避用メモリ領域22bからDRAM21への転送を行う(DRAM21上の退避用領域が満杯ではない状況を想定)。
[CYC3]
(Port usage right) DRAM transfer control unit 24
(Development) Since the saving memory area 22b is no longer empty by the transfer in CYC1, the DRAM transfer control unit 24 performs the transfer from the saving memory area 22b to the DRAM 21 (when the saving area on the DRAM 21 is full). Assuming no situation).

〔CYC4〕
(ポート使用権)DRAM転送制御部24
(展開)CYC2での転送で、取得用メモリ領域22aは満杯ではなくなっているので、DRAM転送制御部24はDRAM21から取得用メモリ領域22aへの転送を行う(DRAM21上の退避用領域が空ではない状況を想定)。転送完了時点で、メモリ側ポート使用権譲渡通知Bをアサートする。
[CYC4]
(Port usage right) DRAM transfer control unit 24
(Development) Since the acquisition memory area 22a is not full due to the transfer in CYC2, the DRAM transfer control unit 24 performs transfer from the DRAM 21 to the acquisition memory area 22a (if the save area on the DRAM 21 is empty) Assuming no situation). When the transfer is completed, the memory side port right transfer notice B is asserted.

〔CYC5〕
(ポート使用権)画像処理部23
(展開)画像処理部23は、マクロブロックの符号化/復号化処理を行っている状態であり、何も転送は行われない。
[CYC5]
(Port usage right) Image processing unit 23
(Development) The image processing unit 23 is in a state of performing macroblock encoding / decoding processing, and nothing is transferred.

〔CYC6〕
(ポート使用権)画像処理部23
(展開)画像処理部23は、1マクロブロックの符号化/復号化処理が完了し、保持FF23aから退避用メモリ領域22bへの転送を行う。
[CYC6]
(Port usage right) Image processing unit 23
(Development) The image processing unit 23 completes the encoding / decoding processing of one macroblock, and transfers the data from the holding FF 23a to the save memory area 22b.

〔CYC7〕
(ポート使用権)画像処理部23
(展開)画像処理部23は、次マクロブロックの符号化/復号化処理を行うために取得用メモリ領域22aから保持FF23aへの転送を行う。転送完了時点で、画像処理側ポート使用権譲渡通知Aをアサートする。
[CYC7]
(Port usage right) Image processing unit 23
(Development) The image processing unit 23 performs transfer from the acquisition memory area 22a to the holding FF 23a in order to perform encoding / decoding processing of the next macroblock. When the transfer is completed, the image processing side port usage right transfer notice A is asserted.

〔CYC8〕
(ポート使用権)DRAM転送制御部24
(展開)CYC6での転送で、退避用メモリ領域22bは空ではなくなっているので、DRAM転送制御部24は退避用メモリ領域22bからDRAM21への転送を行う。その途中で、画像処理部23の1マクロブロックの符号化/復号化処理が完了し、ポート使用権要求通知Cがアサートされる。DRAM転送制御部24は、退避用メモリ領域22bからDRAM21への転送が完了した時点で、取得用メモリ領域22aの残データ量が次マクロブロック処理に必要な量存在するかを判定する。必要量存在すると判定されると、DRAM21から取得用メモリ領域22aへの転送が可能か否かに関わらず、その転送は実行せずに、メモリ側ポート使用権譲渡通知Bをアサートする。
[CYC8]
(Port usage right) DRAM transfer control unit 24
(Development) Since the saving memory area 22b is not empty in the transfer in CYC6, the DRAM transfer control unit 24 transfers the saving memory area 22b to the DRAM 21. On the way, the encoding / decoding process for one macroblock of the image processing unit 23 is completed, and the port usage right request notification C is asserted. The DRAM transfer control unit 24 determines whether the remaining data amount in the acquisition memory region 22a is necessary for the next macroblock process when the transfer from the save memory region 22b to the DRAM 21 is completed. If it is determined that the necessary amount exists, the memory-side port usage right transfer notification B is asserted without executing the transfer regardless of whether the transfer from the DRAM 21 to the acquisition memory area 22a is possible.

〔CYC9〕
(ポート使用権)画像処理部23
(展開)画像処理部23は、1マクロブロックの符号化/復号化処理が完了し、保持FF23aから退避用メモリ領域22bへの転送を行う。
[CYC9]
(Port usage right) Image processing unit 23
(Development) The image processing unit 23 completes the encoding / decoding processing of one macroblock, and transfers the data from the holding FF 23a to the save memory area 22b.

〔CYC10〕
(ポート使用権)画像処理部23
(展開)画像処理部23は、次マクロブロックの符号化/復号化処理を行うために取得用メモリ領域22aから保持FF13aへの転送を行う。転送完了時点で、ポート使用権譲渡通知Aをアサートする。
[CYC10]
(Port usage right) Image processing unit 23
(Development) The image processing unit 23 performs transfer from the acquisition memory area 22a to the holding FF 13a in order to perform encoding / decoding processing of the next macroblock. When the transfer is completed, the port use right transfer notice A is asserted.

以上説明したように、第2の実施の形態では、符号化/復号化処理がごく短時間で完了した場合、SRAM22からDRAM21への書き出し及びDRAM21からSRAM22への読み込みが必須でない状況であれば、DRAM21とSRAM22間とのアクセスよりも、符号化/復号化処理側とSRAM22とのアクセスを優先するようにした。これにより、符号化/復号化処理は待たされずに、次マクロブロック処理を開始でき、処理時間の不要な増加を抑止することが可能になる。   As described above, in the second embodiment, when the encoding / decoding process is completed in a very short time, writing from the SRAM 22 to the DRAM 21 and reading from the DRAM 21 to the SRAM 22 are not essential. The access between the encoding / decoding processing side and the SRAM 22 is prioritized over the access between the DRAM 21 and the SRAM 22. Accordingly, the next macroblock process can be started without waiting for the encoding / decoding process, and an unnecessary increase in the processing time can be suppressed.

なお、上記では主にH.264で定められた16×16画素のマクロブロック単位で符号化/復号化処理を行うこととして説明したが、本発明の技術内容からわかるように、特にブロックサイズに限定されるものではなく、N画素×M画素といった任意のブロック単位で符号化/復号化処理を行ってもよい。また、上記の第1、第2の実施の形態におけるDRAM、SRAM、保持メモリの間で行われるマクロブロック情報の転送制御はすべて、符号化/復号化処理での必要量として、オーバーフロー/アンダーフローが生じないように、適切な量のマクロブロック情報がメモリ間で転送されるものである。   In the above, mainly H.264 is used. The encoding / decoding process has been described as being performed in units of 16 × 16 pixel macroblocks defined in H.264. However, as can be understood from the technical contents of the present invention, the block size is not particularly limited. You may perform an encoding / decoding process by arbitrary block units, such as a pixel x M pixel. In addition, the macroblock information transfer control performed between the DRAM, SRAM, and holding memory in the first and second embodiments described above is an overflow / underflow as a necessary amount in the encoding / decoding process. Therefore, an appropriate amount of macroblock information is transferred between the memories.

画像処理装置の原理図である。1 is a principle diagram of an image processing apparatus. マクロブロック情報を取得する際の隣接マクロブロックを示す図である。It is a figure which shows the adjacent macroblock at the time of acquiring macroblock information. 画像処理装置の構成を示す図である。It is a figure which shows the structure of an image processing apparatus. 画像処理装置の調停動作を示すタイムチャートである。It is a time chart which shows mediation operation | movement of an image processing apparatus. 状態遷移を示す図である。It is a figure which shows a state transition. 状態遷移を示す図である。It is a figure which shows a state transition. 状態遷移を示す図である。It is a figure which shows a state transition. 画像処理装置の原理図である。1 is a principle diagram of an image processing apparatus. 画像処理装置の構成を示す図である。It is a figure which shows the structure of an image processing apparatus. 画像処理装置の調停動作を示すタイムチャートである。It is a time chart which shows mediation operation | movement of an image processing apparatus. 状態遷移を示す図である。It is a figure which shows a state transition. 状態遷移を示す図である。It is a figure which shows a state transition. 状態遷移を示す図である。It is a figure which shows a state transition. DRAMとSRAMを含む画像処理装置の概略構成を示す図である。It is a figure which shows schematic structure of the image processing apparatus containing DRAM and SRAM. シングルポートSRAMを用いた構成を示す図である。It is a figure which shows the structure using a single port SRAM.

符号の説明Explanation of symbols

10 画像処理装置
11 第1のメモリ
12 第2のメモリ
12a 取得用メモリ領域
12b 退避用メモリ領域
13 画像処理部
13a 保持メモリ
13b 符号化/復号化処理部
13c 転送要求判定部
13d マクロブロック情報転送部
14 メモリ転送制御部
15 メモリアクセス調停部
A 退避用メモリ領域転送要求
B 保持メモリ取り込み転送要求
C 第1のメモリ転送要求
D 取得用メモリ領域転送要求
DESCRIPTION OF SYMBOLS 10 Image processing apparatus 11 1st memory 12 2nd memory 12a Acquisition memory area 12b Evacuation memory area 13 Image processing part 13a Holding memory 13b Encoding / decoding processing part 13c Transfer request determination part 13d Macroblock information transfer part 14 Memory Transfer Control Unit 15 Memory Access Arbitration Unit A Save Memory Area Transfer Request B Holding Memory Capture Transfer Request C First Memory Transfer Request D Acquisition Memory Area Transfer Request

Claims (5)

画像信号を符号化/復号化処理する画像処理装置において、
処理済みのマクロブロックのマクロブロック情報を格納する第1のメモリと、
前記第1のメモリから転送された前記マクロブロック情報を格納しておく取得用メモリ領域と、前記第1のメモリへ転送して前記第1のメモリに格納させるべき前記マクロブロック情報を格納しておく退避用メモリ領域とでメモリ領域が2つに分割されたシングルポートの第2のメモリと、
前記マクロブロック情報を一時格納する保持メモリと、前記保持メモリから前記マクロブロック情報を読み出して参照して、処理対象のマクロブロックの符号化/復号化処理を行い、処理完了後に得られた前記マクロブロック情報を前記保持メモリに格納する符号化/復号化処理部と、前記符号化/復号化処理が完了した際に、前記保持メモリにある前記マクロブロック情報を、前記退避用メモリ領域へ転送するための退避用メモリ領域転送要求を出力し、前記符号化/復号化処理を開始する際に、前記取得用メモリ領域にある前記マクロブロック情報を前記保持メモリへ転送するための保持メモリ取り込み転送要求を出力する転送要求判定部と、前記退避用メモリ領域転送要求または前記保持メモリ取り込み転送要求に対する許可応答があれば、前記マクロブロック情報の転送制御を行うマクロブロック情報転送部と、から構成される画像処理部と、
前記第1のメモリの占有量を監視し、前記第1のメモリに空きがあれば、前記退避用メモリ領域から前記第1のメモリへ前記マクロブロック情報の転送を行うための第1のメモリ転送要求を出力し、前記第1のメモリに前記マクロブロック情報が格納されている場合は、前記第1のメモリから前記取得用メモリ領域へ前記マクロブロック情報の転送を行う取得用メモリ領域転送要求を出力し、前記第1のメモリ転送要求または前記取得用メモリ領域転送要求に対する許可応答があれば、前記マクロブロック情報の転送制御を行うメモリ転送制御部と、
前記退避用メモリ領域転送要求、前記保持メモリ取り込み転送要求、前記第1のメモリ転送要求、前記取得用メモリ領域転送要求を受信して、転送可能な場合は前記許可応答を出力して、前記第2のメモリのポートアクセスの調停制御を行い、前記調停制御を行う際は、前記画像処理部からの前記退避用メモリ領域転送要求及び前記保持メモリ取り込み転送要求を最優先とし、前記退避用メモリ領域と前記取得用メモリ領域のオーバーフロー/アンダーフローを発生させないように、前記メモリ転送制御部からの前記第1のメモリ転送要求及び前記取得用メモリ領域転送要求を次に優先させるメモリアクセス調停部と、
を有することを特徴とする画像処理装置。
In an image processing apparatus for encoding / decoding an image signal,
A first memory for storing macroblock information of processed macroblocks;
An acquisition memory area for storing the macroblock information transferred from the first memory; and the macroblock information to be transferred to the first memory and stored in the first memory. A second memory of a single port in which the memory area is divided into two by a save memory area to be stored;
A holding memory for temporarily storing the macroblock information; and reading and referring to the macroblock information from the holding memory to perform encoding / decoding processing of the macroblock to be processed, and the macro obtained after the processing is completed An encoding / decoding processor that stores block information in the holding memory, and when the encoding / decoding process is completed, transfers the macroblock information in the holding memory to the save memory area. A storage memory fetch transfer request for transferring the macroblock information in the acquisition memory area to the holding memory when the encoding / decoding process is started. A transfer request determination unit that outputs a permission response to the save memory area transfer request or the retained memory capture transfer request. In a constructed image processing unit from, and the macro block information transfer unit for transferring control of the macro block information,
A first memory transfer for monitoring the occupation amount of the first memory and transferring the macroblock information from the save memory area to the first memory if the first memory is available Output a request, and if the macroblock information is stored in the first memory, an acquisition memory area transfer request for transferring the macroblock information from the first memory to the acquisition memory area Output, if there is a permission response to the first memory transfer request or the acquisition memory area transfer request, a memory transfer control unit that performs transfer control of the macroblock information;
Receiving the save memory area transfer request, the holding memory fetch transfer request, the first memory transfer request, and the acquisition memory area transfer request, and outputting the permission response if transfer is possible, When performing arbitration control of the port access of the memory 2 and performing the arbitration control, the save memory area transfer request and the hold memory fetch transfer request from the image processing unit are given top priority, and the save memory area And a memory access arbitration unit that prioritizes the first memory transfer request and the acquisition memory region transfer request from the memory transfer control unit so as not to cause an overflow / underflow of the acquisition memory region,
An image processing apparatus comprising:
前記保持メモリは、マクロブロックの処理開始時、少なくとも前記マクロブロックの1ライン左上、1ライン真上、1ライン右上、同一ライン左横に隣接するマクロブロックのマクロブロック情報を格納しておき、前記マクロブロックの処理が終了した後は、前記保持メモリは、前記マクロブロックのマクロブロック情報をさらに格納し、前記マクロブロック情報転送部は、前記退避用メモリ領域転送要求に対する許可応答があれば、前記同一ライン左横に隣接するマクロブロックのマクロブロック情報を前記退避用メモリ領域に転送し、かつ前記保持メモリ取り込み転送要求に対する許可応答があれば、次段マクロブロックの処理に備えて、少なくとも前記1ライン右上のマクロブロックの右横に位置するマクロブロックに関するマクロブロック情報を、前記取得用メモリ領域から読み出して前記保持メモリに転送することを特徴とする請求項1記載の画像処理装置。   The holding memory stores at least macroblock information of macroblocks adjacent to the macroblock adjacent to the upper left of the line, the upper right of the line, the upper right of the line, and the left of the same line at the start of processing of the macroblock, After the processing of the macro block is completed, the holding memory further stores macro block information of the macro block, and the macro block information transfer unit, if there is a permission response to the save memory area transfer request, If macro block information of a macro block adjacent to the left side of the same line is transferred to the save memory area and there is a permission response to the hold memory fetch transfer request, at least the 1 Macro block for the macro block located to the right of the macro block at the top right of the line Tsu the click information, the image processing apparatus according to claim 1, wherein the forwarding to the holding memory is read from the acquisition memory area. 画像信号を符号化/復号化処理する画像処理装置において、
処理済みのマクロブロックのマクロブロック情報を格納する第1のメモリと、
前記第1のメモリから転送された前記マクロブロック情報を格納しておく取得用メモリ領域と、前記第1のメモリへ転送して前記第1のメモリに格納させるべき前記マクロブロック情報を格納しておく退避用メモリ領域とでメモリ領域が2つに分割されたシングルポートの第2のメモリと、
前記マクロブロック情報を格納する保持メモリと、前記保持メモリから前記マクロブロック情報を読み出して参照して、処理対象のマクロブロックの符号化/復号化処理を行い、処理完了後に得られた前記マクロブロック情報を前記保持メモリに格納する符号化/復号化処理部と、メモリ側ポート使用権譲渡通知を受けて、前記第2のメモリへアクセス可能なポート使用権を有する場合であって、前記符号化/復号化処理が完了した際には、前記保持メモリにある前記マクロブロック情報を、前記退避用メモリ領域へ転送し、前記符号化/復号化処理を開始する際には、前記取得用メモリ領域にある前記マクロブロック情報を前記保持メモリへ転送する画像処理側マクロブロック情報転送部と、前記取得用メモリ領域から前記保持メモリへの前記マクロブロック情報の転送完了時に、前記ポート使用権を相手先へ譲渡するための画像処理側ポート使用権譲渡通知を出力する画像処理側ポート使用権管理部と、から構成される画像処理部と、
前記画像処理側ポート使用権譲渡通知を受けて、前記ポート使用権を有する場合であって、前記退避用メモリ領域から前記第1のメモリへ前記マクロブロック情報の転送を行い、前記第1のメモリから前記取得用メモリ領域へ前記マクロブロック情報の転送を行うメモリ側マクロブロック情報転送部と、前記第1のメモリから前記取得用メモリ領域への前記マクロブロック情報の転送完了時、前記メモリ側ポート使用権譲渡通知を出力して、前記ポート使用権を前記画像処理部へ譲渡するメモリ側ポート使用権管理部と、から構成されるメモリ転送制御部と、
を有することを特徴とする画像処理装置。
In an image processing apparatus for encoding / decoding an image signal,
A first memory for storing macroblock information of processed macroblocks;
An acquisition memory area for storing the macroblock information transferred from the first memory; and the macroblock information to be transferred to the first memory and stored in the first memory. A second memory of a single port in which the memory area is divided into two by a save memory area to be stored;
A holding memory for storing the macroblock information, and the macroblock information obtained by reading and referring to the macroblock information from the holding memory, performing encoding / decoding processing of the macroblock to be processed, and completing the processing An encoding / decoding processing unit for storing information in the holding memory, and a port usage right accessible to the second memory in response to a memory side port usage right transfer notification, wherein the encoding is performed When the decoding / decoding process is completed, the macroblock information in the holding memory is transferred to the save memory area, and when the encoding / decoding process is started, the acquisition memory area An image processing-side macroblock information transfer unit that transfers the macroblock information in the storage memory to the storage memory from the acquisition memory area An image processing side port usage right management unit that outputs an image processing side port usage right transfer notice for transferring the port usage right to the other party upon completion of transfer of the macroblock information; ,
In the case of receiving the port usage right transfer notification upon receipt of the image processing side port usage right transfer notification, the macro block information is transferred from the save memory area to the first memory, and the first memory is transferred. A memory-side macroblock information transfer unit for transferring the macroblock information from the first memory to the acquisition memory area, and when the transfer of the macroblock information from the first memory to the acquisition memory area is completed, the memory-side port A memory transfer control unit configured to output a usage right transfer notification and transfer the port usage right to the image processing unit;
An image processing apparatus comprising:
前記保持メモリは、マクロブロックの処理開始時、少なくとも前記マクロブロックの1ライン左上、1ライン真上、1ライン右上、同一ライン左横に隣接するマクロブロックのマクロブロック情報を格納しておき、前記マクロブロックの処理が終了した後は、前記保持メモリは、前記マクロブロックのマクロブロック情報をさらに格納し、前記画像処理側マクロブロック情報転送部は、前記ポート使用権があれば、前記同一ライン左横に隣接するマクロブロックのマクロブロック情報を前記退避用メモリ領域に転送し、かつ前記ポート使用権があれば、次段マクロブロックの処理に備えて、少なくとも前記1ライン右上のマクロブロックの右横に位置するマクロブロックに関するマクロブロック情報を、前記取得用メモリ領域から読み出して前記保持メモリに転送することを特徴とする請求項3記載の画像処理装置。   The holding memory stores at least macroblock information of macroblocks adjacent to the macroblock adjacent to the upper left of the line, the upper right of the line, the upper right of the line, and the left of the same line at the start of processing of the macroblock, After the processing of the macro block is completed, the holding memory further stores macro block information of the macro block, and the image processing side macro block information transfer unit, if there is the port use right, If macroblock information of a macroblock adjacent to the side is transferred to the save memory area and if the port use right is given, at least the right side of the macroblock on the upper right of the one line is prepared for the next macroblock processing. Macro block information related to the macro block located at The image processing apparatus according to claim 3, wherein the forwarding to the serial holding memory. 前記画像処理側ポート使用権管理部は、前記符号化/復号化処理の完了時に、前記ポート使用権がない場合は、前記ポート使用権を強制的に要求するためのポート使用権要求通知を出力し、前記メモリ側ポート使用権管理部は、前記ポート使用権要求通知を受信すると、前記取得用メモリ領域に前記マクロブロック情報が格納されているならば、前記メモリ側ポート使用権譲渡通知を出力して前記ポート使用権を前記画像処理部へ渡すことを特徴とする請求項3記載の画像処理装置。   The port right management unit on the image processing side outputs a port use right request notification for forcibly requesting the port use right when the encoding / decoding process is completed and the port use right is not present. When the memory side port usage right management unit receives the port usage right request notification, the memory side port usage right management unit outputs the memory side port usage right transfer notification if the macroblock information is stored in the acquisition memory area. The image processing apparatus according to claim 3, wherein the port use right is transferred to the image processing unit.
JP2006095952A 2006-03-30 2006-03-30 Image processor Withdrawn JP2007274224A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006095952A JP2007274224A (en) 2006-03-30 2006-03-30 Image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006095952A JP2007274224A (en) 2006-03-30 2006-03-30 Image processor

Publications (1)

Publication Number Publication Date
JP2007274224A true JP2007274224A (en) 2007-10-18

Family

ID=38676579

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006095952A Withdrawn JP2007274224A (en) 2006-03-30 2006-03-30 Image processor

Country Status (1)

Country Link
JP (1) JP2007274224A (en)

Similar Documents

Publication Publication Date Title
US6167475A (en) Data transfer method/engine for pipelining shared memory bus accesses
US6058459A (en) Video/audio decompression/compression device including an arbiter and method for accessing a shared memory
JP4357604B2 (en) Electronic system and computer
US8327046B1 (en) System and method of video decoding using hybrid buffer
KR100881539B1 (en) Image data structure for direct memory access
JP2008054222A (en) Image data buffer apparatus and image transfer processing system
JP2009267837A (en) Decoding device
JP5378344B2 (en) System for video processing
JPH08223571A (en) Image decoder
TW201423403A (en) Efficient processing of access requests for a shared resource
US20170371564A1 (en) Method and apparatus for memory efficiency improvement by providing burst memory access control
KR20070082835A (en) Apparatus and method for controlling direct memory access
EP0772159B1 (en) Memory sharing in a MPEG decoder
JP2008172410A (en) Imaging apparatus, image processing apparatus, image processing method, program for image processing method, and recording medium recorded with program for image processing method
JP2007274224A (en) Image processor
US9372817B2 (en) High perfomance DMA controller for video processors
US20130329137A1 (en) Video Encoding in Video Analytics
WO2019043822A1 (en) Memory access device, image processing device, and imaging device
JP2002027477A (en) Mpeg image processor and data transfer method for the same
US20060041690A1 (en) Software communication between MPEG layer and servo layer
TWI603616B (en) On die/off die memory management
JP2000092469A (en) Digital reception terminal
KR20110065335A (en) System for video processing
CN1220377C (en) Equipment for procesing data by means of multi processor
JP2006115168A (en) Image decoding apparatus and image display apparatus

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20090602