JP4332013B2 - Pseudo multi-port memory device and pixel readout method of pseudo multi-port memory device - Google Patents
Pseudo multi-port memory device and pixel readout method of pseudo multi-port memory device Download PDFInfo
- Publication number
- JP4332013B2 JP4332013B2 JP2003366925A JP2003366925A JP4332013B2 JP 4332013 B2 JP4332013 B2 JP 4332013B2 JP 2003366925 A JP2003366925 A JP 2003366925A JP 2003366925 A JP2003366925 A JP 2003366925A JP 4332013 B2 JP4332013 B2 JP 4332013B2
- Authority
- JP
- Japan
- Prior art keywords
- address
- horizontal
- real
- virtual
- dimensional
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Description
本発明は,多ポートメモリ装置に関し,特に動画像のフレーム間画像符号化処理の動きベクトル検出などで用いられ,複数の画素を連続アドレスに一度に書き込むとともに,複数の画素を関連のないアドレスから同時に読み出すことができる擬似多ポートメモリ装置およびその画素読み出し方法に関するものである。 The present invention relates to a multi-port memory device, and is used in particular for motion vector detection in inter-frame image encoding processing of moving images, and writes a plurality of pixels to a continuous address at a time and extracts a plurality of pixels from unrelated addresses. those related to the pseudo multi-port memory device and a pixel reading way method can be read simultaneously.
動きベクトルの検出とは,ある画像中の画素ブロック(MPEG−2やMPEG−4ではマクロブロックと呼ばれる。以下,テンプレートという。)が他の画像中のどの画素ブロックから動いてきたかを検出し,その位置情報を取り出す処理である。その位置情報は動きベクトルと呼ばれ,その検出には一般にブロックマッチング法が用いられる。 The detection of a motion vector is to detect which pixel block in another image has moved from a pixel block in an image (called a macro block in MPEG-2 or MPEG-4, hereinafter referred to as a template). This is processing for extracting the position information. The position information is called a motion vector, and a block matching method is generally used for the detection.
この方法では,探索領域中から切り出した画素ブロック(以下,探索対象ブロックという。)とテンプレートの対応する画素間で差分絶対値を計算し,その総和(以下,差分絶対値和という。)を求める。この差分絶対値和が最小となる探索対象ブロックの位置情報を動きベクトルとする。なお,差分絶対値和の代わりに差分二乗値和が最小となるものを求めてもよい。 In this method, a difference absolute value is calculated between a pixel block cut out from the search area (hereinafter referred to as a search target block) and a corresponding pixel of the template, and a total sum (hereinafter referred to as difference absolute value sum) is obtained. . The position information of the search target block that minimizes the sum of absolute differences is set as a motion vector. In addition, you may obtain | require what becomes the minimum difference square value sum instead of a difference absolute value sum.
動きベクトル検出器1の構成を図1に示す。動きベクトル検出器1は,差分絶対値和計算回路2,最小値検出回路3,および参照メモリ4で構成される。外部フレームメモリ5に画像を保持し,外部フレームメモリ5から動きベクトルが存在する可能性がある領域(以下,参照領域という。)を参照メモリ4にコピーし,参照メモリ4内の画素に対して探索演算を行う。
The configuration of the
外部フレームメモリ5から参照メモリ4に参照領域を転送する際には,隣接する2つのテンプレートの参照領域は大部分重なっていることを利用して転送画素数を削減する。隣接する2つのテンプレートの参照領域の例を図2に示す。
When the reference area is transferred from the
テンプレート8とテンプレート9は,画像6内の同一のスライス7に含まれ,隣接している。テンプレート8の参照領域10は,テンプレート9の参照領域11より右方向にテンプレートの横方向の画素数分ずれている。このため,重なっていない領域(以下,更新領域という。)12の幅は,テンプレートの横方向の画素数と一致する。
The
この更新領域12のみ外部フレームメモリ5からデータを転送した後,テンプレート9の動き探索を開始するとき,参照領域の原点を参照領域10の(0,0)から参照領域11の(0,0)’に付け替える。このように,更新領域12のみ読み込んで参照領域を更新することにより,外部フレームメモリ5から参照メモリ4への転送レートを低減することができる。
When the motion search of the
ここで,動き検出精度が最も高い探索法として全探索法が知られているが,全探索法は膨大な演算量を必要とする。一方,画像間の距離に反比例して演算量を削減できるにもかかわらず,全探索法とほぼ同等の画質が得られる探索法としてテレスコピック探索法が知られている(例えば,特許文献1の段落0028〜0032参照)。 Here, the full search method is known as the search method with the highest motion detection accuracy, but the full search method requires a huge amount of calculation. On the other hand, a telescopic search method is known as a search method that can obtain almost the same image quality as the full search method even though the amount of calculation can be reduced in inverse proportion to the distance between images (for example, paragraph of Patent Document 1). 0028-0032).
テレスコピック探索法では,物体の動きは時間的に連続していることに着目し,演算量を削減する。このテレスコピック探索法について,図3を参照して説明する。図3はテレスコピック探索法を示す説明図である。同図において,画像14〜17は時間的に連続した4枚の画像であり,画像17が動きベクトル検出対象の画像である。画像16,画像15,画像14はそれぞれ1画面前,2画面前,3画面前の画像である。
In the telescopic search method, paying attention to the fact that the movement of the object is continuous in time, the amount of calculation is reduced. This telescopic search method will be described with reference to FIG. FIG. 3 is an explanatory diagram showing a telescopic search method. In the figure,
矩形ブロック13は,画像14から画像15へ動きベクトルmv3で移動しており,同様に画像15から画像16,画像16から画像17へそれぞれ動きベクトルmv2,mv1で移動している。したがって,画像14から画像17への矩形ブロック13の動きベクトルは「mv3+mv2+mv1」となる。
The
テレスコピック探索法では,画像14から画像17への動きベクトルを求めるために,画像17中の矩形ブロック13をテンプレートとして,最初に画像16中の探索領域20を探索して動きベクトルmv1を検出する。この場合,探索領域20の中心の動きベクトルは(0,0)である。
In the telescopic search method, in order to obtain a motion vector from the
次に,画像15中の探索領域19を探索して動きベクトルmv2を検出する。矩形ブロック13に関する画像16から画像17への動きベクトルを考量すると,探索領域19の中心の動きベクトルはmv1となる。最後に画像14中の探索領域18を探索して動きベクトルmv3を検出する。矩形ブロック13に関する画像15から画像17への動きベクトルを考量すると,探索領域18の中心の動きベクトルは「mv1+mv2」となる。
Next, the
テレスコピック探索では,動きベクトルmv2とmv3の探索の際には,参照領域全体ではなく,それぞれ動きベクトルmv2とmv3の周辺の探索領域のみ全探索法により探索する。このため,参照領域全てを探索する場合と比べると,画像間の距離に反比例して演算量を削減できる。しかも,個々の探索領域は全探索法で探索しているため,時間的に離れた画像間の動きベクトルを直接全探索法により探索した場合とほぼ同等の画質が得られる。 In the telescopic search, when searching for the motion vectors mv2 and mv3, only the search regions around the motion vectors mv2 and mv3 are searched by the full search method, not the entire reference region. For this reason, the amount of calculation can be reduced in inverse proportion to the distance between images as compared with the case of searching all reference regions. In addition, since the individual search areas are searched by the full search method, almost the same image quality as that obtained by searching the motion vectors between images separated in time by the direct full search method can be obtained.
しかし,テレスコピック探索では,直前の探索結果をもとに狭い範囲の全探索を行うことを繰り返すため,個々の全探索を開始する直前まで探索領域が決まらない。このため,参照メモリ4に真に探索する領域のみを読み込むことにすると,直前の全探索が終了した後,次に探索する領域のアドレスを計算し,読み込まなければならない。例えば,図3においては,動きベクトルmv1が決まった後,mv1に基づいて動きベクトルmv2のための探索領域のアドレスを計算し,読み込むことになる。
However, in the telescopic search, since a narrow range full search is repeatedly performed based on the previous search result, the search area is not determined until just before starting each full search. For this reason, if only the area to be truly searched is read into the
この構成では,探索領域の読み込みと差分絶対値和の計算を逐次的に行うことになるため,差分絶対値和計算回路2に空き時間が生じる。ただし,この問題は,参照領域全体を参照メモリ4に読み込むことにすれば解決できる。参照メモリ4は大規模になるが,外部フレームメモリ5から参照メモリ4に参照領域を転送する際には,図2に示したように隣接する2つのテンプレートの参照領域は大部分重なっていることを利用して,更新領域12のみ転送することにより転送画素数を削減することができる。しかし,この改良した転送法(以下,改良転送法という。)でも,直前の全探索が終了した後,次に全探索する探索領域の位置が決まるため,予め探索対象画素のアドレスを決めることができない点に変わりはない。
In this configuration, since the reading of the search area and the calculation of the sum of absolute differences are performed sequentially, an idle time occurs in the differential absolute value
また,参照領域が広い場合,差分絶対値和演算器を並列化することにより動きベクトル検出器1の演算スループットを向上することができる。非特許文献1に示されている分割1次元TMSB(Template-pixel mapping method with search-area-pixel broadcasting )を差分絶対値和演算器として用いる場合に,2並列化する例を図4に示す。この場合の探索領域を図5に示す。
When the reference area is wide, the calculation throughput of the
図4と図5は,テンプレートの大きさが4画素×4ライン,探索範囲が水平方向−4/+3(横方向の探索対象ブロックの数が8),垂直方向±2の場合の例である。探索領域23と24を,それぞれ差分絶対値和計算回路21と22で並列に探索する。分割1次元TMSBには,探索領域中の2画素を同時に供給する必要があるが,探索領域23と24は一部が重なっていることを利用すると,同時に供給する画素を3画素に削減できる。例えば,画素x2,0 と画素xo,8 をそれぞれ差分絶対値和計算回路21と22に供給し,画素x1,4 を差分絶対値和計算回路21と22の両方に供給することにより,差分絶対値和計算回路21と22を並列動作させることができる。同様に,差分絶対値和計算回路を4並列で動作させる場合には,探索領域中の画素を5画素同時に供給すればよい。
FIGS. 4 and 5 are examples in which the template size is 4 pixels × 4 lines, the search range is horizontal −4 / + 3 (the number of blocks to be searched in the horizontal direction is 8), and the vertical direction is ± 2. .
これら複数の画素を差分絶対値和計算回路に供給するために複数のバンクで構成される多バンク分割メモリを用いることが考えられる。しかし,上記参照メモリに対する改良転送法では,参照メモリ上に参照領域をマッピングした後,探索領域のアドレスが決まる。このため,探索領域中の画素をバンク数分同時にリードすることが可能なようにメモリマッピングを行うことは極めて困難である。 In order to supply the plurality of pixels to the difference absolute value sum calculation circuit, it is conceivable to use a multi-bank divided memory composed of a plurality of banks. However, in the improved transfer method for the reference memory, the address of the search area is determined after mapping the reference area on the reference memory. For this reason, it is extremely difficult to perform memory mapping so that pixels in the search area can be read simultaneously for the number of banks.
図6は,この問題を解決できる擬似多ポートメモリのブロック図である(例えば,特許文献1の段落0049〜0054,図2参照)。2バンクに分割された1ポートメモリ25と26,8画素を入力して並べ替え出力する画素並べ替え回路30,および3画素分の画素単位のシフトレジスタ27〜29で構成される。
FIG. 6 is a block diagram of a pseudo multi-port memory that can solve this problem (see, for example, paragraphs 0049 to 0054 of FIG. 2 and FIG. 2). 1-
この擬似多ポートメモリを用いると,図4に示す2並列の差分絶対値和計算回路21,22に対し,3画素を同時に供給することができる。1ポートメモリ25の0番地,1番地,2番地,3番地には,それぞれ番号00〜03,番号08〜11,番号16〜19,番号24〜27の画素が記憶されている。また,1ポートメモリ26の0番地,1番地,2番地,3番地には,それぞれ番号04〜07,番号12〜15,番号20〜23,番号28〜31の画素が記憶されている。
If this pseudo multi-port memory is used, three pixels can be simultaneously supplied to the two parallel absolute difference
ここで,例えば1ポートメモリ25,26にまたがる番号22〜25の画素をシフトレジスタ27にセットする場合には,まず1ポートメモリ25の3番地から番号24〜27の画素を一度に読み出し,1ポートメモリ26の2番地から番号20〜23の画素を一度に読み出す。次に,これら8画素を画素並べ換え回路30で並べ替えて,番号22〜25の画素を選択する。すなわち,読み出される8画素中,若い番号の画素が1ポートメモリ26に記憶されている場合,1ポートメモリ25のアドレスは,1ポートメモリ26のアドレスに1加算することによって算出される。一方,読み出される8画素中,若い番号の画素が1ポートメモリ25に記憶されている場合には,1ポートメモリ26には1ポートメモリ25と同一アドレスが与えられる。これにより,任意の番号の画素を先頭として連続した番号の4画素を読み出すことができる。
Here, for example, when setting the pixels of
そして,画素並べ換え回路30で並べ替えてシフトレジスタ27〜29に設定する。ただし,シフトレジスタ27〜29には画素を同時に設定できず,3クロック(CK)かけて設定するため,設定タイミングにずれがある。この設定タイミングのずれをシフトレジスタ27〜29のシフト段数に差をつけることによって補正して3画素を同時に出力する。このように,擬似多ポートメモリは,特別なメモリマッピングを行わなくても,複数の画素を関連のないアドレスから同時に読み出すことができる。
Then, it is rearranged by the
また,信号処理では,モジュロアドレシングと呼ばれるアドレス生成法が頻繁に用いられる。モジュロアドレシングとは,アドレスを1ずつインクリメントしながら最小アドレスと最大アドレス間に限定されたアドレスを繰り返し生成することである。 In signal processing, an address generation method called modulo addressing is frequently used. Modulo addressing is to repeatedly generate an address limited between the minimum address and the maximum address while incrementing the address by one.
図7は,16バンクに分割されたメモリにおけるモジュロアドレシングを説明するための図である(例えば,特許文献2の図6参照)。B1はバンク間アドレス(0〜AF),B2はバンク内アドレス(0〜A),B3はバンク番号(0〜F)である。 FIG. 7 is a diagram for explaining modulo addressing in a memory divided into 16 banks (see, for example, FIG. 6 of Patent Document 2). B1 is an interbank address (0 to AF), B2 is an intrabank address (0 to A), and B3 is a bank number (0 to F).
バンク間アドレスはメモリ全体を一括して見たときのアドレス,バンク内アドレスは各バンクを独立して見たときのアドレスであり,各バンクにはバンク間アドレスをバンク数で割った余りと一致するようにバンク番号が与えられる。この関係を式で表すと,次式となる。 The inter-bank address is the address when the entire memory is viewed at once, the in-bank address is the address when each bank is viewed independently, and each bank matches the remainder when the inter-bank address is divided by the number of banks The bank number is given as follows. This relationship is expressed by the following equation.
〔バンク間アドレス〕=〔バンク内アドレス〕×〔バンク数〕+〔バンク番号〕
各バンクから連続したバンク間アドレスのデータをリードする場合には,基準となるバンク間アドレスを与え,個々のバンクのアドレスは基準となるバンク間アドレスのバンク内アドレス(以下,基準バンク内アドレスという。)に変位を加算することにより生成することができる。
[Inter-bank address] = [In-bank address] x [Number of banks] + [Bank number]
When reading data at consecutive inter-bank addresses from each bank, a reference inter-bank address is given, and each bank address is an intra-bank address of the inter-bank address (hereinafter referred to as a reference inter-bank address). .)) By adding the displacement.
具体的には,モジュロアドレスは,以下の方法で生成することができる(例えば,特許文献2の第6ページ左上欄4行〜左下欄11行,第3図参照)。
(1)バンク間アドレスが1つずつ増加するとき,バンク番号は0からFに向かって1つずつ増加し,Fを超えると0に戻り,このときバンク内アドレスは1だけ増加する。そこで,リードするデータ群の中間でバンク番号がFから0に戻る場合,その点を境として基準バンク内アドレスに変位として1を加算する。
(2)ただし,基準バンク内アドレスがバンク内モジュロ終了アドレスと一致するとき,1を加算するのではなく,バンク内モジュロアドレス幅を減算する。
Specifically, the modulo address can be generated by the following method (for example, refer to
(1) When the inter-bank address increases by one, the bank number increases by one from 0 toward F, and when it exceeds F, it returns to 0. At this time, the in-bank address increases by one. Therefore, when the bank number returns from F to 0 in the middle of the data group to be read, 1 is added as a displacement to the reference bank address at that point.
(2) However, when the reference bank address matches the bank modulo end address, 1 is not added, but the bank modulo address width is subtracted.
例えば,図7に示すように,個々のバンクに対して「最小のバンク内アドレス=3」と「最大のバンク内アドレス=8」の間でモジュロアドレスを生成する場合,「基準バンク内アドレス=3〜7」であるときには,基準となるバンク間アドレスから求められるバンク番号(以下,基準バンク番号という。)よりも少ないバンク番号を有するバンクのバンク内アドレスは,基準バンク内アドレスに変位として1を加算することにより生成し,基準バンク番号以上のバンク番号を有するバンクには,基準バンク内アドレスをそのまま与える。 For example, as shown in FIG. 7, when generating a modulo address between “minimum bank address = 3” and “maximum bank address = 8” for each bank, “reference bank address = 3-7 ", the bank address of the bank having a bank number smaller than the bank number obtained from the reference inter-bank address (hereinafter referred to as the reference bank number) is 1 as a displacement to the reference bank address. Are added to the bank, and the bank having the bank number equal to or higher than the reference bank number is given the address in the reference bank as it is.
一方,「基準バンク内アドレス=8」であるとき,基準バンク番号よりも少ないバンク番号を有するバンクのバンク内アドレスは基準バンク内アドレスから5を減算することにより生成し,基準バンク番号以上のバンク番号を有するバンクには,基準バンク内アドレスをそのまま与える。 On the other hand, when “in-reference bank address = 8”, an in-bank address of a bank having a bank number smaller than the reference bank number is generated by subtracting 5 from the in-reference bank address, and a bank greater than or equal to the reference bank number is generated. The bank having the number is given the address in the reference bank as it is.
このように,基準となるバンク間アドレスを与えるのみで,複数のバンクのモジュロアドレスを生成することができる。
図6に示した従来技術の例では,1ポートメモリ25と26の0番地にそれぞれ番号00〜03と番号04〜07,1ポートメモリ25と26の1番地にそれぞれ番号08〜11と番号12〜15の画素が記憶されている。これは,1ポートメモリ25と26にアドレスが画素単位で割り当てられているとみなすことができる。これを,以下では仮想1次元アドレスと呼ぶ。
In the example of the prior art shown in FIG. 6,
擬似多ポートメモリは,画素並べ替え回路30によって切り出される4画素中最下位のものの仮想1次元アドレス(以下,代表アドレスという。)が与えられると,以下のようにしてシフトレジスタ27〜29から3画素を同時に出力する。
When a virtual one-dimensional address (hereinafter referred to as a representative address) of the lowest one of the four pixels cut out by the
(1)代表アドレスが1ポートメモリ25内に存在する場合には,1ポートメモリ25と26の両方に代表アドレスの下位3ビットを切り捨てたアドレスを与える。一方,代表アドレスが1ポートメモリ26内に存在する場合には,1ポートメモリ26には代表アドレスの下位3ビットを切り捨てたアドレス,1ポートメモリ25に対しては1ポートメモリ26のアドレスを1増加させたアドレスを与える。例えば,22番地から25番地までをリードする場合には,代表アドレスが1ポートメモリ26内であるため,1ポートメモリ26からは2番地,1ポートメモリ25からは3番地のデータを読み出す。
(1) When the representative address exists in the 1-
(2)切り出された8画素のうち代表アドレスの画素が最も早く出力されるように画素並べ替え回路30により並べ替えてシフトレジスタ27ないし29に設定する。例えば,22番地から25番地の画素を読み出す場合,代表アドレスは22番地であり,22番地に記憶されている画素が最も右側,25番地に記憶されている画素が最も左側となるように並べ替える。
(2) The
(3)このようにして並べ替えた4画素をシフトレジスタ27ないし29に設定する。ただし,シフトレジスタ27ないし29に4画素が設定されるタイミングにはずれがある。この設定タイミングのずれをシフトレジスタ27〜29のシフト段数に差をつけることによって補正して3画素を同時に出力する。 (3) The four pixels rearranged in this way are set in the shift registers 27-29. However, there is a difference in timing when four pixels are set in the shift registers 27 to 29. This setting timing shift is corrected by making a difference in the number of shift stages of the shift registers 27 to 29, and three pixels are output simultaneously.
上記方法により,代表アドレスを与えるだけで擬似多ポートメモリから関連のないアドレスに記憶されている複数の画素を同時に出力することができる。 By the above method, it is possible to simultaneously output a plurality of pixels stored at unrelated addresses from the pseudo multi-port memory only by giving a representative address.
ところが,参照メモリ4に対する改良転送法では,外部フレームメモリ5から更新領域のみデータを転送し,新たなテンプレートの動き探索を開始する際に,参照領域の原点(0,0)を付け替える。擬似多ポートメモリから画素を読み出すためには,この原点が付け替えられるたびに,1ポートメモリ25,26の実際のアドレスとの対応が変化するアドレス(以下,2次元論理アドレスと呼ぶ。)を代表アドレスに変換する必要がある。
However, in the improved transfer method for the
また,図3に示すテレスコピック探索法では,最終的に動きベクトルを検出する対象となる画像の参照領域(探索領域)18だけでなく,中間の画像15と16の参照領域(探索領域)19と20も参照メモリ4に読み込む必要がある。これらの参照領域(探索領域)18〜20ごとに小容量のメモリを個々に設けると,分割損が生じ,チップ面積が増大するため,これらの参照領域(探索領域)18〜20は大容量の共用メモリにまとめて記憶することが望ましい。
Further, in the telescopic search method shown in FIG. 3, not only the reference region (search region) 18 of the image to be finally detected, but also the reference region (search region) 19 of the
このため,全ての参照領域が共用の擬似多ポートメモリに記憶されているという条件の下で,個々の参照領域を破壊することなく,個々の参照領域ごとの更新領域を擬似多ポートメモリに書き込み,各々の参照領域について上述した原点(0,0)の付け替えを実現し,2次元論理アドレスを代表アドレスに変換しなければならないという問題がある。 Therefore, under the condition that all reference areas are stored in the shared pseudo multi-port memory, the update area for each reference area is written to the pseudo multi-port memory without destroying the individual reference areas. There is a problem that the above-described replacement of the origin (0, 0) must be realized for each reference area, and the two-dimensional logical address must be converted into a representative address.
この問題を解決するために,従来技術の例で説明した多バンクに分割されたメモリにおけるモジュロアドレス生成法を応用することが考えられる。すなわち,個々の参照領域ごとに最小のアドレスと最大のアドレスを決め,その範囲内のアドレスを生成することが考えられる。しかし,従来技術の例で説明したモジュロアドレスは1次元のアドレスであるが,画像は水平方向と垂直方向の2次元のアドレスを有するという問題がある。 In order to solve this problem, it is conceivable to apply the modulo address generation method in the memory divided into multiple banks described in the example of the prior art. That is, it is conceivable to determine the minimum address and the maximum address for each reference area and generate an address within the range. However, although the modulo address described in the prior art example is a one-dimensional address, there is a problem that an image has a two-dimensional address in the horizontal direction and the vertical direction.
本発明は,このような従来の課題を解決するためになされたもので,その目的は共用の大容量擬似多ポートメモリに全ての参照領域を記憶するという条件の下で,参照メモリ4に対する改良転送法を実現できる擬似多ポートメモリ装置を提供する点にある。
The present invention has been made to solve such a conventional problem, and its object is to improve the
上記課題を解決するため,第1の本発明は,関連のないアドレスから複数の画素を同時に読み出すことができる擬似多ポートメモリ装置において,m個(mは自然数)の画素を記憶できるワード幅を有するn個(nは自然数)の1ポートメモリと,有限の大きさの水平論理アドレスと有限の大きさの垂直論理アドレスとからなる2次元論理アドレスを与える2次元論理アドレス付与手段と,前記水平論理アドレスを,m×nの整数倍の大きさの水平仮想アドレスに変換し,前記垂直論理アドレスをそのまま垂直仮想アドレスに変換することにより,2次元仮想アドレスを生成する2次元仮想アドレス生成手段と,当該2次元仮想アドレスが割り当てられている領域のベースアドレスと,前記水平仮想アドレスと,前記垂直仮想アドレスに前記水平仮想アドレスを乗じた値とを加算することにより,前記n個の1ポートメモリに画素単位で割り当てられた仮想1次元アドレスを生成する仮想1次元アドレス生成手段と,当該仮想1次元アドレスを(m×n)で除すことにより代表実アドレスを生成する代表実アドレス生成手段と,当該仮想1次元アドレスを(m×n)で除した結果得られる余りをさらにmで除すことにより代表実バンク番号を生成する代表実バンク番号生成手段と,当該代表実アドレスと当該代表実バンク番号より各1ポートメモリに与える実アドレスを生成する実アドレス生成手段と,前記実アドレス群が与えられることによって前記n個の1ポートメモリから出力されるm×n個以下の画素を入力し,前記2次元論理アドレス付与手段によって与えられた水平論理アドレスが最下位の水平論理アドレスである場合には,上位側に連続した水平論理アドレスを有するm×(n−1)個以下の画素を,水平論理アドレスの昇順または降順に並べ替えて出力し,または前記2次元論理アドレス付与手段によって与えられた水平論理アドレスが最上位の水平論理アドレスである場合には,下位側に連続した水平論理アドレスを有するm×(n−1)個以下の画素を,水平論理アドレスの昇順または降順に並べ替えて出力する画素並べ替え手段と,この画素並べ替え手段に対して並列配置されたそれぞれ所定シフト段数を有する複数のシフトレジスタからなり,前記画素並べ替え手段から順次出力される画素群を各シフトレジスタで順に保持するとともに,各画素群を構成する複数の画素を1画素ずつ各シフトレジスタから順次シフト出力することにより出力タイミングを調整し,各シフトレジスタから所望の画素を並列して同時に出力する出力タイミング調整手段とを備えることを特徴とする。 In order to solve the above problem, the first aspect of the present invention is a pseudo multi-port memory device capable of simultaneously reading out a plurality of pixels from unrelated addresses, and having a word width capable of storing m (m is a natural number) pixels. Two-dimensional logical address assigning means for providing a two-dimensional logical address comprising n (n is a natural number) 1-port memory, a horizontal logical address having a finite size, and a vertical logical address having a finite size; Two-dimensional virtual address generation means for generating a two-dimensional virtual address by converting a logical address into a horizontal virtual address having an integer multiple of m × n and converting the vertical logical address into a vertical virtual address as it is; , The base address of the area to which the two-dimensional virtual address is assigned, the horizontal virtual address, and the vertical virtual address A virtual one-dimensional address generating means for generating a virtual one-dimensional address assigned to each of the n one-port memories by a pixel by adding a value obtained by multiplying the flat virtual address, and the virtual one-dimensional address ( a representative real address generating means for generating a representative real address by dividing by m × n), and a remainder obtained as a result of dividing the virtual one-dimensional address by (m × n) is further divided by m. A representative real bank number generating means for generating a bank number; a real address generating means for generating a real address to be given to each one-port memory from the representative real address and the representative real bank number; and the real address group. Input not more than m × n pixels output from the n one-port memories, and the horizontal logical address given by the two-dimensional logical address assigning means. If the address is the lowest horizontal logical address, then output mx (n-1) or less pixels having consecutive horizontal logical addresses on the upper side in ascending or descending order of the horizontal logical addresses. Or when the horizontal logical address given by the two-dimensional logical address assigning means is the highest horizontal logical address, not more than m × (n−1) pixels having consecutive horizontal logical addresses on the lower side. Comprising a plurality of shift registers each having a predetermined number of shift stages arranged in parallel to the pixel rearranging means. The pixel groups sequentially output from the means are held in order by each shift register, and a plurality of pixels constituting each pixel group are stored one by one in each shift register. Output timing adjustment means for adjusting the output timing by sequentially shifting the output from the shift registers, and simultaneously outputting desired pixels from each shift register in parallel.
また,第2の本発明は,第1の本発明の擬似多ポートメモリ装置であって,前記2次元仮想アドレス生成手段は,0〜(水平仮想アドレスの大きさ/m−1)の範囲で巡回する値に基づいて水平仮想アドレスと水平論理アドレスとの差に相当する値を算出し,水平論理アドレスに当該水平仮想アドレスと水平論理アドレスとの差に相当する値を加算し,その結果が水平仮想アドレスの大きさを超えたときは当該結果から水平仮想アドレスの大きさを減算することにより,水平論理アドレスを,m×nの整数倍の大きさの水平仮想アドレスに変換することを特徴とする。 The second aspect of the present invention is the pseudo multi-port memory device according to the first aspect of the present invention, wherein the two-dimensional virtual address generation means is in a range of 0 to (horizontal virtual address size / m-1). A value corresponding to the difference between the horizontal virtual address and the horizontal logical address is calculated based on the cyclic value, and a value corresponding to the difference between the horizontal virtual address and the horizontal logical address is added to the horizontal logical address. When the size of the horizontal virtual address is exceeded, the horizontal logical address is converted to a horizontal virtual address having an integer multiple of m × n by subtracting the size of the horizontal virtual address from the result. And
さらに,第3の本発明は,第1の本発明または第2の本発明の擬似多ポートメモリ装置であって,前記実アドレス生成手段は,前記2次元論理アドレス付与手段によって与えられた水平論理アドレスが最下位の水平論理アドレスである場合には,前記代表実アドレスが,前記垂直仮想アドレスが変換される可能性がある実アドレス範囲の中の最上位の実アドレスでないとき,前記代表実バンク番号よりも小さな実バンク番号を有する1ポートメモリには当該代表実アドレスに1を加算した実アドレスを与え,一方,当該代表実アドレスが,前記垂直仮想アドレスが変換される可能性がある実アドレス範囲の中の最上位の実アドレスであるとき,当該代表実バンク番号よりも小さな実バンク番号を有する1ポートメモリには前記垂直仮想アドレスが変換される可能性がある実アドレス範囲の中の最下位の実アドレスを与え,前記2次元論理アドレス付与手段によって与えられた水平論理アドレスが最上位の水平論理アドレスである場合には,当該代表実アドレスが,最初に与えられた垂直仮想アドレスが変換される可能性がある実アドレス範囲の中の最下位の実アドレスでないとき,当該代表実バンク番号よりも大きな実バンク番号を有する1ポートメモリには,当該代表実アドレスから1を減算した実アドレスを与え,一方,当該代表実アドレスが,最初に与えられた垂直論理アドレスが変換される可能性がある実アドレス範囲の中の最下位の実アドレスであるとき,当該代表実バンク番号よりも大きな実バンク番号を有する1ポートメモリには,当該代表実アドレスが最初に与えられた垂直仮想アドレスが変換される可能性がある実アドレス範囲の中の最上位の実アドレスを与える実アドレス生成手段であることを特徴とする。 Further, the third aspect of the present invention is the pseudo multi-port memory device according to the first aspect of the present invention or the second aspect of the present invention, wherein the real address generation means is a horizontal logic provided by the two-dimensional logical address assignment means. If the address is the lowest horizontal logical address, the representative real bank is not the highest real address in the real address range to which the vertical virtual address may be translated. A one-port memory having a real bank number smaller than the number is given a real address obtained by adding 1 to the representative real address, while the representative real address is a real address where the vertical virtual address may be converted When it is the highest real address in the range, the vertical virtual address is not included in the 1-port memory having a real bank number smaller than the representative real bank number. Is given the lowest real address in the real address range that can be converted, and the horizontal logical address given by the two-dimensional logical address assigning means is the highest horizontal logical address, 1 port having a real bank number larger than the representative real bank number when the representative real address is not the lowest real address in the real address range to which the first given vertical virtual address may be translated The memory is given a real address obtained by subtracting 1 from the representative real address, while the representative real address is the lowest in the real address range to which the first given vertical logical address may be converted The one-port memory having a larger real bank number than the representative real bank number is given the representative real address first. Characterized in that a vertical virtual address is a real address generating means for providing the real address of the top level in the real address range that can be converted.
本発明は,大容量の1ポートメモリを複数用いて,複数の画素を関連のないアドレスから同時に読み出すことのできる擬似多ポートメモリ装置を構成でき,共用の大容量擬似多ポートメモリに全ての参照領域を記憶することにより,テレスコピック探索用動きベクトル検出装置を小型化できる効果がある。 The present invention can configure a pseudo multi-port memory device that can simultaneously read out a plurality of pixels from unrelated addresses by using a plurality of large-capacity one-port memories. By storing the area, the telescopic search motion vector detection device can be reduced in size.
以下,本発明の実施形態を説明する。図8は本発明の実施形態におけるテレスコピック探索の参照領域33〜35の大きさを示す図である。テンプレートの大きさを4画素×4ライン,画面ごとの個々の探索範囲を水平方向+8/−7,垂直方向±4とする。
Hereinafter, embodiments of the present invention will be described. FIG. 8 is a diagram showing the sizes of the
また,図3において説明した例と同様に,最終的に動きベクトルを検出する対象となる画像は,テンプレート32が含まれる画像から3フレーム離れているものとする。この場合,テンプレート32が含まれる画像から1フレーム離れた画像の参照領域33の大きさは,20画素×12ライン,2フレーム離れた画像の参照領域34の大きさは,36画素×20ライン,最終的に動きベクトルを検出する対象となる画像の参照領域35の大きさは,52画素×28ラインとなる。
Similarly to the example described with reference to FIG. 3, it is assumed that the image that is the target of finally detecting the motion vector is separated from the image including the
ここで,画面ごとの個々の探索範囲は水平方向+8/−7であるため,参照領域の水平方向の画素数は実際には4の倍数ではない。しかし,更新領域の画素数はテンプレートの横方向の画素数と一致しており,4画素である。そして,参照メモリには外部フレームメモリから更新領域を一まとまりとして転送する。このため,参照メモリ上における参照領域の水平方向の画素数は,4の倍数であるものとする。この場合におけるテレスコピック探索による動きベクトルの検出範囲は,水平方向+24/−21,垂直方向±12である。 Here, since the individual search range for each screen is horizontal + 8 / −7, the number of pixels in the horizontal direction of the reference area is not actually a multiple of 4. However, the number of pixels in the update region is the same as the number of pixels in the horizontal direction of the template and is four pixels. Then, the update area is transferred to the reference memory as a group from the external frame memory. For this reason, the number of pixels in the horizontal direction of the reference area on the reference memory is assumed to be a multiple of four. In this case, the motion vector detection range by the telescopic search is horizontal + 24 / -21 and vertical ± 12.
図9は,参照メモリ上での参照領域33,34,35のマッピングを示す図である。参照領域33が0番地からマッピングされ,参照領域34は参照領域33と35の間,参照領域35はその上位アドレス側にマッピングされる。
FIG. 9 is a diagram showing the mapping of the
図10は,本発明の実施形態における動きベクトル検出器42の構成を示すブロック図である。36は参照メモリ,43は外部フレームメモリである。この動きベクトル検出器42は,4個の差分絶対値和計算回路37〜40を含む。差分絶対値和計算回路37〜40としては分割1次元TMSBを用い,探索範囲を水平方向に4分割し,個々の差分絶対値和計算回路37〜40に分割された領域を1個ずつ評価させるものとする。
FIG. 10 is a block diagram showing the configuration of the
図11は,本発明の実施形態における擬似多ポートメモリのブロック図である。本実施形態では,1ポートメモリ44〜47のワード幅を更新領域の水平方向の画素数と一致させる。これにより,更新領域の書き込み回路を単純化できる。ただし,当該ワード幅を更新領域の水平方向の画素数の半分,1/4等というように,1/n(nは整数)にしてもよい。なお,図11では,1ポートメモリ44〜47から12画素読み出して,8画素切り出す例を示しているが,4画素のワード幅を有する4個の1ポートメモリを用いる場合,16画素読み出して12画素切り出す構成とすることも可能である。
FIG. 11 is a block diagram of the pseudo multi-port memory in the embodiment of the present invention. In the present embodiment, the word widths of the 1-
本実施形態における探索領域を図12に,4並列の差分絶対値和計算回路37〜40へ供給される画素を図13に示す。図13に示すように,本実施形態では,擬似多ポートメモリから差分絶対値和計算回路37〜40へ5画素を同時に供給する必要がある。これを4画素分のワード幅を有する1ポートメモリを4個用い,そのうち3個から12画素同時に読み出して,8画素を切り出すことにより実現する。
The search area in this embodiment is shown in FIG. 12, and the pixels supplied to the 4-parallel absolute difference
すなわち,最初のCK(CK=0)でx0,0 〜x0,7 を1ポートメモリ44〜47から読み出して,シフトレジスタ49にx0,0 〜x0,3 ,シフトレジスタ50にx0,4 〜x0,7 を設定する。次に,4CK後(CK=4)にx1,0 〜x1,7 を1ポートメモリ44〜47から読み出して,シフトレジスタ49にx1,0 〜x1,3 ,シフトレジスタ50にx1,4 〜x1,7 を設定する。シフトレジスタ50は遅延用のレジスタを4個有するため,x0,4 〜x0,7 はx0,0 〜x0,3 より4CK遅延して出力される。
That is, x 0,0 ~x 0, 7 are read from the 1-
したがって,図13に示したように,x1,0 〜x1,3 とx0,4 〜x0,7 のそれぞれ対応する画素が同時に出力される。さらに,3CK後(CK=7)にx0,8 〜x0,15を1ポートメモリ44〜47から読み出して,シフトレジスタ51にx0,8 〜x0,11,シフトレジスタ52にx0,12〜x0,15を設定し,その1CK後(CK=8)にx2,0 〜x2,7 を1ポートメモリ44〜47から読み出して,シフトレジスタ49にx2,0 〜x2,3 ,シフトレジスタ50にx2,4 〜x2,7 を設定する。シフトレジスタ51は遅延用のレジスタを1個有するため,x2,0 〜x2,3 ,x1,4 〜x1,7 ,およびx0,8 〜x0,11のそれぞれ対応する画素が同時に出力される。
Accordingly, as shown in FIG. 13, the corresponding pixel of the x 1, 0 ~x 1, 3 and x 0, 4 ~x 0, 7 are simultaneously outputted. Furthermore, after 3CK in (CK = 7) reads the x 0, 8 ~x 0, 15 1-
さらに,3CK後(CK=11)にx1,8 〜x1,15を1ポートメモリ44〜47から読み出して,シフトレジスタ51にx1,8 〜x1,11,シフトレジスタ52にx1,12〜x1,15を設定し,その1CK後(CK=12)にx3,0 〜x3,7 を1ポートメモリ44〜47から読み出して,シフトレジスタ49にx3,0 〜x3,3 ,シフトレジスタ50にx3,4 〜x3,7 を設定する。シフトレジスタ51とシフトレジスタ52は遅延用のレジスタをそれぞれ1個と5個有するため,x3,0 〜x3,3 ,x2,4 〜x2,7 ,x1,8 〜x1,11,およびx0,12〜x0,15のそれぞれ対応する画素が同時に出力される。
Furthermore, after 3CK in (CK = 11) reads the x l, 8 ~x 1, 15 from the 1-
さらに,2CK後(CK=13)にx0,16〜x0,18を1ポートメモリ44〜47から読み出して,シフトレジスタ53に設定し,その1CK後(CK=14)にx2,8 〜x2,15 を1ポートメモリ44〜47から読み出して,シフトレジスタ51にx2,8 〜x2,11,シフトレジスタ52にx2,12〜x2,15を設定し,その1CK後(CK=15)にx4,0 〜x4,7 を1ポートメモリ44〜47から読み出して,シフトレジスタ49にx4,0 〜x4,3 ,シフトレジスタ50にx4,4 〜x4,7 を設定する。
In addition, after reading 2CK the (CK = 13) to x 0, 16 ~x 0, 18 1-
シフトレジスタ53は遅延用のレジスタを2個有するため,x4,0 〜x4,3 ,x3,4 〜x3,7 ,x2,8 〜x2,11,x1,12〜x1,15,およびx0,16〜x0,18のそれぞれ対応する画素が同時に出力される。例えば,図12の中で印を付したx4,0 ,x3,4 ,x2,8 ,x1,12,およびx0,16が同時に出力される。
Since the
本発明では,個々の参照領域について水平方向の画素数が更新領域の水平方向の画素数の整数倍となるように水平方向の探索範囲を決め,更新領域の水平方向の画素数を単位として参照領域を水平方向に仮想的に分割する。この分割された個々のブロックを論理バンクと呼び,個々の参照領域について上述した原点(0,0)の更新を論理バンク単位で行う。 In the present invention, the horizontal search range is determined so that the number of horizontal pixels in each reference area is an integral multiple of the number of horizontal pixels in the update area, and the reference is made in units of the number of horizontal pixels in the update area. The area is virtually divided in the horizontal direction. Each divided block is called a logical bank, and the above-described update of the origin (0, 0) is performed for each reference area in units of logical banks.
図14は,参照領域34の画素に対する2次元論理アドレスの割り当てと論理バンクへの分割を示す図である。論理バンクの水平方向の画素数は,更新領域の水平方向の画素数と同一である。
FIG. 14 is a diagram illustrating assignment of a two-dimensional logical address to a pixel in the
本発明では,右隣の次のテンプレートの動きベクトルの探索を開始する前に,外部フレームメモリから参照メモリヘ更新領域中の画素を転送する。そして,現テンプレートの動きベクトルの探索が終了し,右隣の次のテンプレートの動きベクトルの探索を開始するとき,水平方向の論理アドレス(以下,水平論理アドレスという。)と論理バンク番号を更新する。ただし,垂直方向の論理アドレス(以下,垂直論理アドレスという。)は変化させない。 In the present invention, before starting the search for the motion vector of the next template on the right side, the pixels in the update area are transferred from the external frame memory to the reference memory. When the search for the motion vector of the current template is completed and the search for the motion vector of the next template on the right is started, the horizontal logical address (hereinafter referred to as the horizontal logical address) and the logical bank number are updated. . However, the logical address in the vertical direction (hereinafter referred to as the vertical logical address) is not changed.
例えば,図14に示す参照領域34では,更新後の水平論理アドレス0〜31は更新前の水平論理アドレス4〜35が付け替えられ,更新後の水平論理アドレス32〜35は更新された画素に割り当てられる。同様に,更新後の論理バンク番号0〜7は更新前の論理バンク番号1〜8が付け替えられ,更新後の論理バンク番号8は更新領域に割り当てられる。
For example, in the
ここで,本発明では,参照領域を水平方向に分割した論理バンクの数に更新領域のバンク数1を加算した数が1ポートメモリ44〜47のバンク数の整数倍とならないときは,空領域を追加し,1ポートメモリのバンク数の整数倍と一致させて1ポートメモリ44〜47にマッピングする。
Here, in the present invention, when the number obtained by adding the number of banks in the update area to the number of logical banks obtained by dividing the reference area in the horizontal direction is not an integral multiple of the number of banks in the 1-
図15は,図14に示した参照領域34の2次元論理アドレスを擬似多ポートメモリヘマッピングした一状態を示す図である。図15では,論理バンク番号と垂直論理アドレスを組みにして,(論理バンク番号,垂直論理アドレス)の形でマッピング状態を表している。1ポートメモリ44〜47にはそれぞれ実バンク番号0〜3が割り当てられる。参照領域33が1ポートメモリ44〜47の0番地〜23番地に記憶されるため,参照領域34はその上位アドレスである24番地〜63番地に記憶されている。
FIG. 15 is a diagram showing a state in which the two-dimensional logical address of the
図15のマッピング状態では,水平論理アドレスの下位側が1ポートメモリ44〜47の実際のアドレス(以下,実アドレスという。)の下位側であって,かつ実バンク番号の小さい側にマッピングされており,水平論理アドレスの上位側が実アドレスの上位側であって,かつ実バンク番号の大きい側にマッピングされている。
In the mapping state of FIG. 15, the lower side of the horizontal logical address is mapped to the lower side of the actual address (hereinafter referred to as the real address) of the 1-
この状態の2次元論理アドレス,水平論理アドレス,垂直論理アドレス,および論理バンク番号をそれぞれ2次元仮想アドレス,水平仮想アドレス,垂直仮想アドレス,および仮想バンク番号と呼び,これらは外部フレームメモリから更新領域が転送され,2次元論理アドレスが更新されても変化しないものとする。 The two-dimensional logical address, horizontal logical address, vertical logical address, and logical bank number in this state are called a two-dimensional virtual address, horizontal virtual address, vertical virtual address, and virtual bank number, respectively, which are updated from the external frame memory. Is transferred and the two-dimensional logical address is updated, it will not change.
図16は,図15のマッピング状態から5回更新領域が転送され,2次元論理アドレスが更新された状態を示す図である。図16の状態において論理バンク番号0〜3の論理バンクに含まれる画素と,図15のマッピング状態における論理バンク番号5〜8の論理バンクに含まれる画素は同一である。図16の状態において論理バンク番号4〜8の論理バンクに含まれる画素は,図15の状態で動きベクトルを探索した後に外部フレームメモリから新たに転送されたものである。
FIG. 16 is a diagram showing a state where the update area is transferred five times from the mapping state of FIG. 15 and the two-dimensional logical address is updated. In the state of FIG. 16, the pixels included in the logical banks with
図17は,図16に示した状態における参照領域34に含まれる画素の擬似多ポートメモリヘのマッピングを示す図である。図16と図17に示すように,本発明では,2次元論理アドレスが更新されても垂直論理アドレスと垂直仮想アドレスの対応は固定されており,水平論理アドレスと水平仮想アドレスの対応のみが変化する。
FIG. 17 is a diagram showing the mapping of the pixels included in the
このため,例えば,垂直論理アドレス=1,水平論理アドレス=22〜29(論理バンク番号=5〜7)に記憶されている8画素を読み出す場合,図15のマッピング状態では1ポートメモリ45〜47の実アドレス=28から12画素読み出し,画素並べ替え回路48で8画素を切り出すことになる。
Therefore, for example, when reading 8 pixels stored in the vertical logical address = 1, horizontal logical address = 22 to 29 (logical bank number = 5 to 7), in the mapping state of FIG. 12 pixels are read out from the real address = 28, and the
一方,図17のマッピング状態では1ポートメモリ46と47の実アドレス=29から8画素,1ポートメモリ44の実アドレス=27から4画素読み出し,画素並べ替え回路48で8画素を切り出すことになる。
On the other hand, in the mapping state of FIG. 17, 8 pixels are read from the real address = 29 of the 1-
すなわち,垂直仮想アドレス一定の範囲内で水平仮想アドレスを巡回させる。このように,本実施の形態では,2次元論理アドレスが同一であっても,2次元論理アドレスの1ポートメモリ44〜47上でのマッピング状態により,1ポートメモリ44〜47に与える実アドレスが異なる場合がある。
That is, the horizontal virtual address is circulated within a certain range of the vertical virtual address. As described above, in this embodiment, even if the two-dimensional logical address is the same, the real address given to the one-
図18は,水平仮想アドレスと実アドレスの対応を示す図である。本発明では,仮想バンクの総数は実バンク(1ポートメモリ44〜47)のバンク数の整数倍である。このため,上記水平仮想アドレスの巡回は,画素並べ替え回路48によって切り出される8画素中最下位のものに対応する実アドレス(以下,代表実アドレスという。)が垂直仮想アドレス一定の範囲内で最上位の実アドレスではない場合,代表実アドレスに+1を加算することにより,また,代表実アドレスが垂直仮想アドレス一定の範囲内で最上位の実アドレスである場合,垂直仮想アドレス一定の範囲内における最下位の実アドレスに置き換えることで実現できる。
FIG. 18 is a diagram showing the correspondence between horizontal virtual addresses and real addresses. In the present invention, the total number of virtual banks is an integral multiple of the number of real banks (1-
ところで,上記の例と異なり,仮想バンクの総数が1ポートメモリのバンク数の整数倍ではない場合には,垂直論理アドレス=1,水平論理アドレス=22〜29に記憶されている8画素を同時に読み出すことができない。論理バンクの総数が1ポートメモリ44〜47のバンク数の整数倍ではない場合における,図17に対応するマッピング状態を図19に示す。
However, unlike the above example, if the total number of virtual banks is not an integral multiple of the number of banks of 1-port memory, 8 pixels stored in vertical logical address = 1 and horizontal logical address = 22-29 are simultaneously displayed. Cannot read. FIG. 19 shows a mapping state corresponding to FIG. 17 when the total number of logical banks is not an integral multiple of the number of banks of the 1-
垂直論理アドレス=1,水平論理アドレス=22と23(論理バンク番号=5)の画素と,垂直論理アドレス=1,水平論理アドレス=28と29(論理バンク番号=7)の画素がともに1ポートメモリ46に記憶されるため,垂直論理アドレス=1,水平論理アドレス=22〜29(論理バンク番号=5〜7)に記憶されている8画素を一度に読み出すことはできない。本発明による擬似多ポートメモリから,水平論理アドレスが連続する8画素を必ず読み出すことができるのは,仮想バンクの総数が1ポートメモリのバンク数の整数倍であるからである。
One port includes both vertical logical address = 1, horizontal logical address = 22 and 23 (logical bank number = 5), and vertical logical address = 1, horizontal logical address = 28 and 29 (logical bank number = 7). Since they are stored in the
図20は,参照領域34の仮想1次元アドレスを示す。仮想1次元アドレスは,図11に示すように,1ポートメモリ44〜47に画素単位で割り当てられているアドレスであり,1ポートメモリ44,45,46,47の0番地にそれぞれ00〜03,04〜07,08〜11,12〜15,1ポートメモリ44,45,46,47の1番地にそれぞれ16〜19,20〜23,24〜27,28〜31のように割り当てられている。仮想1次元アドレスの0番地〜383番地には,参照領域33がマッピングされているため,参照領域34の最下位の仮想1次元アドレス(以下,ベースアドレスという。)は384番地となる。
FIG. 20 shows a virtual one-dimensional address of the
上述したように,本発明では,2次元論理アドレスを2次元仮想アドレス,仮想1次元アドレスを経て実アドレスに変換する。まず,2次元論理アドレスから2次元仮想アドレスヘ変換する方法について,以下に具体的に説明する。 As described above, in the present invention, a two-dimensional logical address is converted into a real address via a two-dimensional virtual address and a virtual one-dimensional address. First, a method for converting a two-dimensional logical address to a two-dimensional virtual address will be specifically described below.
テンプレートが含まれる画像から各参照領域が含まれる画像までの画像間距離をdfとすると,更新領域と空き領域を含む参照領域の横方向の画素数,すなわち水平仮想アドレスの大きさMAXX(df)は,
MAXX(df)=(2×8×df+4×4)
となる。
If the inter-image distance from the image including the template to the image including each reference area is df, the number of pixels in the horizontal direction of the reference area including the update area and the empty area, that is, the horizontal virtual address size MAXX (df) Is
MAXX (df) = (2 × 8 × df + 4 × 4)
It becomes.
また,現在の更新領域の仮想バンク番号をrvk(df)とする。現テンプレートの動きベクトルの探索が終了し,右隣の次のテンプレートの動きベクトルの探索を開始するとき,rvk(df)は+1増加するが,0〜(4×df+3)の範囲で巡回するものとする。 Further, the virtual bank number of the current update area is assumed to be rvk (df). When the search for the motion vector of the current template is completed and the search for the motion vector of the next template on the right is started, rvk (df) increases by +1, but cycles in the range of 0 to (4 × df + 3) And
本実施形態では,rvk(df)を記憶しておき,これに基づいて2次元論理アドレスを仮想2次元アドレスに変換する。水平論理アドレスをlxa(df),水平仮想アドレスをvxa(df)とすると,lxa(df)からvxa(df)には,以下の式により変換できる。 In the present embodiment, rvk (df) is stored, and based on this, a two-dimensional logical address is converted into a virtual two-dimensional address. If the horizontal logical address is lxa (df) and the horizontal virtual address is vxa (df), it can be converted from lxa (df) to vxa (df) by the following equation.
vxa(df)=lxa(df)+4{rvk(df)+3};
if vxa(df)≧MAXX(df)
vxa(df)=vxa(df)−MAXX(df);
ただし,4{rvk(df)+3}は,水平仮想アドレスと水平論理アドレスの差を算出する方法の一例であり,例えば,論理バンク番号=0の論理バンクに対応する仮想バンク番号を記憶しておき,この仮想バンク番号に仮想バンクの水平方向の画素数を掛けたもので水平仮想アドレスと水平論理アドレスの差を算出してもよい。
vxa (df) = lxa (df) +4 {rvk (df) +3};
if vxa (df) ≧ MAXX (df)
vxa (df) = vxa (df) −MAXX (df);
However, 4 {rvk (df) +3} is an example of a method for calculating the difference between the horizontal virtual address and the horizontal logical address. For example, the virtual bank number corresponding to the logical bank with logical bank number = 0 is stored. Alternatively, the difference between the horizontal virtual address and the horizontal logical address may be calculated by multiplying the virtual bank number by the number of pixels in the horizontal direction of the virtual bank.
次に,2次元仮想アドレスを1次元仮想アドレスに変換する方法について説明する。ya(df)を垂直仮想アドレス(=垂直論理アドレス),BASE(df)をテンプレートが含まれる画像から画像間距離dfだけ離れた画像に含まれる参照領域におけるベースアドレスとすると,水平仮想アドレスvxa(df)とya(df)から参照メモリ上の仮想1次元アドレスvadrは次式により算出できる。 Next, a method for converting a two-dimensional virtual address into a one-dimensional virtual address will be described. If ya (df) is a vertical virtual address (= vertical logical address) and BASE (df) is a base address in a reference area included in an image separated from the image including the template by an inter-image distance df, a horizontal virtual address vxa ( The virtual one-dimensional address vadr on the reference memory can be calculated from the following equation from df) and ya (df).
vadr=BASE(df)+vxa(df)+ya(df)×MAXX(df);
上記のように,現在の更新領域の仮想バンク番号rvk(df)を記憶しておけば,2次元論理アドレス(lxa(df),ya(df))を仮想1次元アドレスvadrに変換することができる。
vadr = BASE (df) + vxa (df) + ya (df) × MAXX (df);
As described above, if the virtual bank number rvk (df) of the current update area is stored, the two-dimensional logical address (lxa (df), ya (df)) can be converted into the virtual one-dimensional address vadr. it can.
この仮想1次元アドレスvadrの最下位側の2ビットが擬似多ポートメモリにおける各バンクのワード内の画素の番号pn(0〜3),最下位のビットから数えて3ビット目と4ビット目が実バンク番号rb(0〜3),その上位のビットが実アドレスraに対応する。 The least significant 2 bits of the virtual one-dimensional address vadr are the pixel number pn (0-3) in the word of each bank in the pseudo multi-port memory, and the third and fourth bits counted from the least significant bit. The real bank number rb (0 to 3) and the higher order bits correspond to the real address ra.
最後に,代表アドレス,すなわち,画素並べ替え回路48によって切り出される8画素中最下位のものの仮想1次元アドレスから各バンクごとの実アドレスを生成する方法について具体的に説明する。代表アドレスがvadrであるとき,1ポートメモリ44〜47に付された実バンク番号をbnとすると,1ポートメモリ44〜47に与える実アドレスba(bn)は,以下の式により算出される。
Finally, a method for generating a real address for each bank from the representative address, that is, the virtual one-dimensional address of the lowest one of the eight pixels cut out by the
If(bn<rb){
If(MAXX(df)−vxa(df)≦16)
ba(bn)=ra−df;
else ba(bn)=ra+1;
}
else ba(bn)=ra;
ここで,(MAXX(df)−vxa(df)≦16)は,画素並べ替え回路48によって切り出される8画素中最下位のものの実アドレス(以下,代表実アドレスという。)raが,その垂直論理アドレスya(df)が変換される可能性がある実アドレス範囲の中の最上位のアドレスであることを意味する。
If (bn <rb) {
If (MAXX (df) −vxa (df) ≦ 16)
ba (bn) = ra-df;
else ba (bn) = ra + 1;
}
else ba (bn) = ra;
Here, (MAXX (df) −vxa (df) ≦ 16) is the lowest real address (hereinafter referred to as a representative real address) ra of the eight pixels cut out by the
例えば,図16と図17において,lxa(2)=22〜29,ya(2)=1の8画素を読み出すとき,代表実アドレスはra=29である。このとき,ya(2)=1が変換される可能性がある実アドレス範囲は27番地〜29番地であり,ra=29は最上位のアドレスである。この場合,1ポートメモリ44の実バンク番号bn=0は,画素並べ替え回路48によって切り出される8画素中最下位のものの実バンク番号rb=2よりも小さいため,1ポートメモリ44にはba(0)=ra−df=29−2=27番地の実アドレスが与えられる。
For example, in FIGS. 16 and 17, when reading 8 pixels of lxa (2) = 22 to 29 and ya (2) = 1, the representative real address is ra = 29. At this time, the real address range in which ya (2) = 1 may be converted is addresses 27 to 29, and ra = 29 is the highest address. In this case, the real bank number bn = 0 of the 1-
1ポートメモリ44〜47から読み出された12画素は,画素並べ替え回路48により8画素が切り出され,画素並べ替え回路48によって切り出される8画素中最下位のものが最も早く出力されるように並べ替えられてシフトレジスタ49〜53に設定される。
Of the 12 pixels read from the 1-
上記方法により2次元論理アドレス(lxa(df),ya(df))によって指定されるアドレスから連続した水平論理アドレスの8画素を読み出し,シフトレジスタ49〜53により出力タイミングを調整することによって擬似多ポートメモリから5画素を同時に出力することができる。 By reading out 8 pixels of horizontal logical addresses consecutively from the address specified by the two-dimensional logical address (lxa (df), ya (df)) by the above method and adjusting the output timing by the shift registers 49 to 53, the pseudo-multiple Five pixels can be output simultaneously from the port memory.
なお,上記本発明の実施の形態では,テンプレートの大きさを4画素×4ライン,画面ごとの個々の探索範囲を水平方向+8/−7,垂直方向±4として説明したが,テンプレートは8画素×4ラインや8画素×8ライン等矩形のブロックであればよく,また,探索範囲は,水平方向,垂直方向とも任意の大きさとすることができる。ただし,探索範囲の水平方向の画素数がテンプレートの水平方向の画素数の整数倍でないときは,テンプレートの水平方向の画素数の整数倍となるように探索範囲を拡大して本発明を適用する。 In the above embodiment of the present invention, the template size is 4 pixels × 4 lines, and each search range for each screen is described as horizontal direction + 8 / −7 and vertical direction ± 4. However, the template has 8 pixels. A rectangular block such as × 4 lines or 8 pixels × 8 lines may be used, and the search range can be set arbitrarily in both the horizontal and vertical directions. However, when the number of pixels in the horizontal direction of the search range is not an integer multiple of the number of pixels in the horizontal direction of the template, the present invention is applied by expanding the search range so as to be an integer multiple of the number of pixels in the horizontal direction of the template. .
また,最終的に動きベクトルを検出する対象となる画像とテンプレートが含まれる画像間の距離は3フレームに限らず,任意のフレーム数とすることができる。 In addition, the distance between the image that finally becomes the target of detecting the motion vector and the image including the template is not limited to three frames, but can be any number of frames.
さらに,上記本発明の実施の形態では,画素並べ替え回路48によって切り出される8画素中水平論理アドレスが最下位のものの仮想1次元アドレスを代表アドレスとしたが,画素並べ替え回路48によって切り出される8画素中水平論理アドレスが最上位のものの仮想1次元アドレスを代表アドレスとしてもよい。
Furthermore, in the embodiment of the present invention described above, the virtual one-dimensional address having the lowest horizontal logical address among the 8 pixels cut out by the
このようにした場合,画素並べ替え回路48によって切り出される8画素中水平論理アドレスが最上位のものの実アドレスが,その垂直論理アドレスya(df)が変換される可能性がある実アドレス範囲の中の最下位の実アドレスでないとき,代表アドレスから求められる実バンク番号よりも大きな実バンク番号を有する1ポートメモリには,代表アドレスから求められる実アドレスから1を減算した実アドレスが与えられ,また,その垂直論理アドレスya(df)が変換される可能性がある実アドレス範囲の中の最下位の実アドレスであるとき,代表アドレスから求められる実バンク番号よりも大きな実バンク番号を有する1ポートメモリには,その垂直論理アドレスya(df)が変換される可能性がある実アドレス範囲の中の最上位のアドレスが与えられる。
In this case, the real address having the highest horizontal logical address among the eight pixels extracted by the
図21は,本発明による擬似多ポートメモリ装置の構成例を示す図である。擬似多ポートメモリ装置は,m個(mは自然数)の画素を記憶できるワード幅を有するn個(nは自然数)の1ポートメモリ44〜47と,入力した水平論理アドレスおよび垂直論理アドレスを1ポートメモリ44〜47の実アドレスに変換するアドレス変換手段100と,1ポートメモリ44〜47から読み出した画素を並べ替える画素並べ替え手段200と,並べ替えた画素の出力タイミングをシフトレジスタ等を用いることによって調整する出力タイミング調整手段300とから構成される。
FIG. 21 is a diagram showing a configuration example of a pseudo multi-port memory device according to the present invention. The pseudo multi-port memory device includes n (n is a natural number) 1-
画素並べ替え手段200は,図11に示した画素並べ替え回路48によって構成され,アドレス変換手段100によって実アドレス群が与えられることによってn個の1ポートメモリ44〜47から出力されるm×n個以下の画素を入力し,2次元論理アドレス付与手段110によって与えられた水平論理アドレスを最下位の水平論理アドレスとして,上位側に連続した水平論理アドレスを有するm×(n−1)個以下の画素を,水平論理アドレスの昇順または降順に並べ替えて出力する。
The pixel rearrangement means 200 is constituted by the
また,出力タイミング調整手段300は,画素並べ替え手段200に対して並列配置されたそれぞれ所定シフト段数を有する複数のシフトレジスタ(例えば図11のシフトレジスタ49〜53)からなり,画素並べ替え手段200から順次出力される画素群を各シフトレジスタで順に保持するとともに,各画素群を構成する複数の画素を1画素ずつ各シフトレジスタから順次シフト出力することにより出力タイミングを調整し,各シフトレジスタから所望の画素を並列して同時に出力する。
The output
図22は,図21に示すアドレス変換手段100の詳細な構成例を示している。アドレス変換手段100の2次元論理アドレス付与手段110は,水平論理アドレスを保持する水平論理アドレスレジスタ111と,垂直論理アドレスを保持する垂直論理アドレスレジスタ112からなる。2次元仮想アドレス生成手段120は,水平論理アドレスをm×nの整数倍の大きさの水平仮想アドレスに変換する水平仮想アドレス生成回路121と,生成された水平仮想アドレスを保持する水平仮想アドレスレジスタ122と,垂直論理アドレスをそのまま垂直仮想アドレスとして保持する垂直仮想アドレスレジスタ123とから構成される。垂直仮想アドレスレジスタ123は省略してもよい。
FIG. 22 shows a detailed configuration example of the
水平仮想アドレス生成回路121は,0〜(水平仮想アドレスの大きさ/m−1)の範囲で巡回する値(すなわち仮想バンク番号)に基づいて水平仮想アドレスと水平論理アドレスとの差に相当する値を算出し,水平論理アドレスに当該水平仮想アドレスと水平論理アドレスとの差に相当する値を加算し,その結果が水平仮想アドレスの大きさを超えたときは当該結果から水平仮想アドレスの大きさを減算することにより,水平論理アドレスを,m×nの整数倍の大きさの水平仮想アドレスに変換する。
The horizontal virtual
仮想1次元アドレス生成手段130は,水平仮想アドレスと垂直仮想アドレスとを乗算する乗算器131と,当該2次元仮想アドレスが割り当てられている領域のベースアドレスを保持するベースアドレスレジスタ132と,水平仮想アドレスと乗算器131による乗算結果とベースアドレスとを加算する加算器133と,加算器133の出力を仮想1次元アドレスとして保持する仮想1次元アドレスレジスタ134とから構成される。
The virtual one-dimensional address generation means 130 includes a
代表実アドレス生成手段140は,m×nの値を保持する定数メモリ141と,仮想1次元アドレスを(m×n)で除算する除算器142と,その商を代表実アドレスとして保持する代表実アドレスレジスタ143とから構成される。また,代表実バンク番号生成手段150は,mの値を保持する定数メモリ151と,除算器142が出力する除算の余りをmで除算する除算器152と,除算器152の除算結果を代表実バンク番号として保持する代表実バンク番号153とから構成される。
The representative real address generation means 140 includes a
実アドレス生成手段160は,代表実アドレスと代表実バンク番号から各1ポートメモリ44〜47に与える実アドレスを生成する実アドレス生成回路161を備える。この実アドレス生成回路161は,2次元論理アドレス付与手段110によって与えられた水平論理アドレスが最下位の水平論理アドレスである場合には,代表実アドレスが,垂直仮想アドレスが変換される可能性がある実アドレス範囲の中の最上位の実アドレスでないとき,代表実バンク番号よりも小さな実バンク番号を有する1ポートメモリには当該代表実アドレスに1を加算した実アドレスを与え,一方,当該代表実アドレスが,垂直仮想アドレスが変換される可能性がある実アドレス範囲の中の最上位の実アドレスであるとき,当該代表実バンク番号よりも小さな実バンク番号を有する1ポートメモリには垂直仮想アドレスが変換される可能性がある実アドレス範囲の中の最下位の実アドレスを与える。
The real address generation means 160 includes a real
また,実アドレス生成回路161は,2次元論理アドレス付与手段110によって与えられた水平論理アドレスが最上位の水平論理アドレスである場合には,当該代表実アドレスが,最初に与えられた垂直仮想アドレスが変換される可能性がある実アドレス範囲の中の最下位の実アドレスでないとき,当該代表実バンク番号よりも大きな実バンク番号を有する1ポートメモリには,当該代表実アドレスから1を減算した実アドレスを与え,一方,当該代表実アドレスが,最初に与えられた垂直論理アドレスが変換される可能性がある実アドレス範囲の中の最下位の実アドレスであるとき,当該代表実バンク番号よりも大きな実バンク番号を有する1ポートメモリには,当該代表実アドレスが最初に与えられた垂直仮想アドレスが変換される可能性がある実アドレス範囲の中の最上位の実アドレスを与える。
Further, the real
1,42 動きベクトル検出器
2,21,22,31,37,38,39,40 差分絶対値和計算回路
3,41 最小値検出回路
4,36 参照メモリ
5,43 外部フレームメモリ
6,14,15,16,17 画像
7 スライス
8,9 テンプレート
10,11,33,34,35 参照領域
12 更新領域
13 矩形ブロック
18,19,20,23,24,54,55,56,57 探索領域
25,26,44,45,46,47 1ポートメモリ
27,28,29,49,50,51,52,53 シフトレジスタ
30,48 画素並べ替え回路
32 テンプレート
B1 バンク間アドレス
B2 バンク内アドレス
B3 バンク番号
100 アドレス変換手段
110 2次元論理アドレス付与手段
120 2次元仮想アドレス生成手段
130 仮想1次元アドレス生成手段
140 代表実アドレス生成手段
150 代表実バンク番号生成手段
160 実アドレス生成手段
200 画素並べ替え手段
300 出力タイミング調整手段
1,42
Claims (4)
m個(mは自然数)の画素を記憶できるワード幅を有するn個(nは自然数)の1ポートメモリと,
有限の大きさの水平論理アドレスと有限の大きさの垂直論理アドレスとからなる2次元論理アドレスを与える2次元論理アドレス付与手段と,
前記水平論理アドレスを,m×nの整数倍の大きさの水平仮想アドレスに変換し,前記垂直論理アドレスをそのまま垂直仮想アドレスに変換することにより,2次元仮想アドレスを生成する2次元仮想アドレス生成手段と,
当該2次元仮想アドレスが割り当てられている領域のベースアドレスと,前記水平仮想アドレスと,前記垂直仮想アドレスに前記水平仮想アドレスを乗じた値とを加算することにより,前記n個の1ポートメモリに画素単位で割り当てられた仮想1次元アドレスを生成する仮想1次元アドレス生成手段と,
当該仮想1次元アドレスを(m×n)で除すことにより代表実アドレスを生成する代表実アドレス生成手段と,
当該仮想1次元アドレスを(m×n)で除した結果得られる余りをさらにmで除すことにより代表実バンク番号を生成する代表実バンク番号生成手段と,
当該代表実アドレスと当該代表実バンク番号より各1ポートメモリに与える実アドレスを生成する実アドレス生成手段と,
前記実アドレス群が与えられることによって前記n個の1ポートメモリから出力されるm×n個以下の画素を入力し,前記2次元論理アドレス付与手段によって与えられた水平論理アドレスが最下位の水平論理アドレスである場合には,上位側に連続した水平論理アドレスを有するm×(n−1)個以下の画素を,水平論理アドレスの昇順または降順に並べ替えて出力し,または前記2次元論理アドレス付与手段によって与えられた水平論理アドレスが最上位の水平論理アドレスである場合には,下位側に連続した水平論理アドレスを有するm×(n−1)個以下の画素を,水平論理アドレスの昇順または降順に並べ替えて出力する画素並べ替え手段と,
この画素並べ替え手段に対して並列配置されたそれぞれ所定シフト段数を有する複数のシフトレジスタからなり,前記画素並び替え手段から順次出力される画素群を各シフトレジスタで順に保持するとともに,各画素群を構成する複数の画素を1画素ずつ各シフトレジスタから順次シフト出力することにより出力タイミングを調整し,各シフトレジスタから所望の画素を並列して同時に出力する出力タイミング調整手段とを備える
ことを特徴とする擬似多ポートメモリ装置。 A pseudo multi-port memory device capable of simultaneously reading a plurality of pixels from unrelated addresses,
n (n is a natural number) 1-port memory having a word width capable of storing m (m is a natural number) pixels;
Two-dimensional logical address assigning means for giving a two-dimensional logical address composed of a finite size horizontal logical address and a finite size vertical logical address;
Two-dimensional virtual address generation for generating a two-dimensional virtual address by converting the horizontal logical address into a horizontal virtual address having an integer multiple of m × n and converting the vertical logical address into a vertical virtual address as it is Means,
By adding the base address of the area to which the two-dimensional virtual address is allocated, the horizontal virtual address, and a value obtained by multiplying the vertical virtual address by the horizontal virtual address, the n one-port memories are added. Virtual one-dimensional address generation means for generating a virtual one-dimensional address assigned in pixel units;
Representative real address generating means for generating a representative real address by dividing the virtual one-dimensional address by (m × n);
Representative real bank number generating means for generating a representative real bank number by further dividing the remainder obtained by dividing the virtual one-dimensional address by (m × n) by m;
Real address generating means for generating a real address to be given to each one-port memory from the representative real address and the representative real bank number;
When the real address group is given, m × n pixels or less outputted from the n one-port memories are inputted, and the horizontal logical address given by the two-dimensional logical address assigning means is the lowest horizontal In the case of a logical address, m × (n−1) or less pixels having continuous horizontal logical addresses on the upper side are rearranged in the ascending or descending order of the horizontal logical address, or the two-dimensional logic is output. If the horizontal logical address given by the address assigning means is the highest horizontal logical address, m × (n−1) or less pixels having consecutive horizontal logical addresses on the lower side are assigned to the horizontal logical address. Pixel rearrangement means for rearranging and outputting in ascending or descending order;
A plurality of shift registers each having a predetermined number of shift stages arranged in parallel to the pixel rearranging means, each of the pixel groups sequentially output from the pixel rearranging means is held in each shift register, and each pixel group The output timing is adjusted by sequentially shifting and outputting a plurality of pixels constituting each pixel from each shift register, and output timing adjusting means for simultaneously outputting desired pixels from each shift register in parallel is provided. A pseudo multi-port memory device.
前記2次元仮想アドレス生成手段は,0から(水平仮想アドレスの大きさ/m−1)までの範囲で巡回する値に基づいて水平仮想アドレスと水平論理アドレスとの差に相当する値を算出し,水平論理アドレスに当該水平仮想アドレスと水平論理アドレスとの差に相当する値を加算し,その結果が水平仮想アドレスの大きさを超えたときは当該結果から水平仮想アドレスの大きさを減算することにより,水平論理アドレスを,m×nの整数倍の大きさの水平仮想アドレスに変換する
ことを特徴とする擬似多ポートメモリ装置。 The pseudo multi-port memory device according to claim 1,
The two-dimensional virtual address generation means calculates a value corresponding to a difference between the horizontal virtual address and the horizontal logical address based on a value that circulates in a range from 0 to (horizontal virtual address size / m−1). , Add a value corresponding to the difference between the horizontal virtual address and the horizontal logical address to the horizontal logical address, and if the result exceeds the size of the horizontal virtual address, subtract the size of the horizontal virtual address from the result Thus, the pseudo multi-port memory device is characterized in that the horizontal logical address is converted into a horizontal virtual address having an integer multiple of m × n.
前記実アドレス生成手段は,
前記2次元論理アドレス付与手段によって与えられた水平論理アドレスが最下位の水平論理アドレスである場合には,前記代表実アドレスが,前記垂直仮想アドレスが変換される可能性がある実アドレス範囲の中の最上位の実アドレスでないとき,前記代表実バンク番号よりも小さな実バンク番号を有する1ポートメモリには当該代表実アドレスに1を加算した実アドレスを与え,一方,当該代表実アドレスが,前記垂直仮想アドレスが変換される可能性がある実アドレス範囲の中の最上位の実アドレスであるとき,当該代表実バンク番号よりも小さな実バンク番号を有する1ポートメモリには前記垂直仮想アドレスが変換される可能性がある実アドレス範囲の中の最下位の実アドレスを与え,
前記2次元論理アドレス付与手段によって与えられた水平論理アドレスが最上位の水平論理アドレスである場合には,当該代表実アドレスが,最初に与えられた垂直仮想アドレスが変換される可能性がある実アドレス範囲の中の最下位の実アドレスでないとき,当該代表実バンク番号よりも大きな実バンク番号を有する1ポートメモリには,当該代表実アドレスから1を減算した実アドレスを与え,一方,当該代表実アドレスが,最初に与えられた垂直論理アドレスが変換される可能性がある実アドレス範囲の中の最下位の実アドレスであるとき,当該代表実バンク番号よりも大きな実バンク番号を有する1ポートメモリには,当該代表実アドレスが最初に与えられた垂直仮想アドレスが変換される可能性がある実アドレス範囲の中の最上位の実アドレスを与える実アドレス生成手段である
ことを特徴とする擬似多ポートメモリ装置。 The pseudo multi-port memory device according to claim 1 or 2,
The real address generating means
When the horizontal logical address given by the two-dimensional logical address assigning means is the lowest horizontal logical address, the representative real address is in the real address range in which the vertical virtual address may be converted. 1 port memory having a real bank number smaller than the representative real bank number is given a real address obtained by adding 1 to the representative real address, while the representative real address is When the vertical virtual address is the highest real address in the real address range that can be converted, the vertical virtual address is converted to a 1-port memory having a real bank number smaller than the representative real bank number. Give the lowest real address in the real address range that can be
When the horizontal logical address given by the two-dimensional logical address assigning means is the highest horizontal logical address, the representative real address may be converted to the vertical virtual address given first. When it is not the lowest real address in the address range, a 1-port memory having a real bank number larger than the representative real bank number is given a real address obtained by subtracting 1 from the representative real address, while the representative 1 port having a real bank number larger than the representative real bank number when the real address is the lowest real address in the real address range to which the first given vertical logical address may be converted The memory contains the highest virtual address in the real address range to which the vertical virtual address given the representative real address first may be converted. Pseudo multi-port memory device which is a real address generation means for providing a real address.
有限の大きさの水平論理アドレスと有限の大きさの垂直論理アドレスとからなる2次元論理アドレスを入力する過程と,
前記水平論理アドレスを,m×nの整数倍の大きさの水平仮想アドレスに変換し,前記垂直論理アドレスをそのまま垂直仮想アドレスに変換することにより,2次元仮想アドレスを生成する過程と,
当該2次元仮想アドレスが割り当てられている領域のベースアドレスと,前記水平仮想アドレスと,前記垂直仮想アドレスに前記水平仮想アドレスを乗じた値とを加算することにより,前記n個の1ポートメモリに画素単位で割り当てられた仮想1次元アドレスを生成する過程と,
当該仮想1次元アドレスを(m×n)で除すことにより代表実アドレスを生成する過程と,
当該仮想1次元アドレスを(m×n)で除した結果得られる余りをさらにmで除すことにより代表実バンク番号を生成する過程と,
当該代表実アドレスと当該代表実バンク番号より各1ポートメモリに与える実アドレスを生成する過程と,
前記実アドレス群が与えられることによって前記n個の1ポートメモリから出力されるm×n個以下の画素を入力し,前記入力した水平論理アドレスが最下位の水平論理アドレスである場合には,上位側に連続した水平論理アドレスを有するm×(n−1)個以下の画素を,水平論理アドレスの昇順または降順に並べ替えて出力し,または前記入力した水平論理アドレスが最上位の水平論理アドレスである場合には,下位側に連続した水平論理アドレスを有するm×(n−1)個以下の画素を,水平論理アドレスの昇順または降順に並べ替えて出力する過程と,
順次並べ替えて出力される画素群をそれぞれ所定シフト段数を有する複数のシフトレジスタで順に保持するとともに,各画素群を構成する複数の画素を1画素ずつ各シフトレジスタから順次シフト出力することにより出力タイミングを調整し,各シフトレジスタから所望の画素を並列して同時に出力する過程とを有する
ことを特徴とする擬似多ポートメモリ装置の画素読み出し方法。 A pixel reading method stored in a pseudo multi-port memory device having n (n is a natural number) 1-port memory having a word width capable of storing m (m is a natural number) pixels,
A process of inputting a two-dimensional logical address consisting of a finite size horizontal logical address and a finite size vertical logical address;
Generating a two-dimensional virtual address by converting the horizontal logical address into a horizontal virtual address having an integer multiple of m × n, and converting the vertical logical address into a vertical virtual address as it is;
By adding the base address of the area to which the two-dimensional virtual address is allocated, the horizontal virtual address, and a value obtained by multiplying the vertical virtual address by the horizontal virtual address, the n one-port memories are added. Generating a virtual one-dimensional address assigned in pixel units;
Generating a representative real address by dividing the virtual one-dimensional address by (m × n);
A process of generating a representative real bank number by further dividing the remainder obtained by dividing the virtual one-dimensional address by (m × n) by m;
A process of generating a real address to be given to each one-port memory from the representative real address and the representative real bank number;
When the real address group is given and m × n pixels or less output from the n one-port memories are input, and the input horizontal logical address is the lowest horizontal logical address, Output not more than m × (n−1) pixels having consecutive horizontal logical addresses on the upper side in ascending or descending order of horizontal logical addresses, or the input horizontal logical address is the highest horizontal logic If it is an address, a process of rearranging and outputting m × (n−1) or less pixels having consecutive horizontal logical addresses on the lower side in ascending or descending order of the horizontal logical addresses;
The pixel groups that are sequentially rearranged are sequentially held by a plurality of shift registers each having a predetermined number of shift stages, and the plurality of pixels constituting each pixel group are sequentially shifted and output from each shift register. A method of reading out a pixel of a pseudo multi-port memory device, comprising: adjusting a timing and simultaneously outputting a desired pixel from each shift register in parallel.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003366925A JP4332013B2 (en) | 2003-10-28 | 2003-10-28 | Pseudo multi-port memory device and pixel readout method of pseudo multi-port memory device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003366925A JP4332013B2 (en) | 2003-10-28 | 2003-10-28 | Pseudo multi-port memory device and pixel readout method of pseudo multi-port memory device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2005136455A JP2005136455A (en) | 2005-05-26 |
| JP4332013B2 true JP4332013B2 (en) | 2009-09-16 |
Family
ID=34645075
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2003366925A Expired - Lifetime JP4332013B2 (en) | 2003-10-28 | 2003-10-28 | Pseudo multi-port memory device and pixel readout method of pseudo multi-port memory device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4332013B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100837811B1 (en) | 2006-11-15 | 2008-06-13 | 주식회사 하이닉스반도체 | Data conversion circuit and semiconductor memory device using same |
| JP4695124B2 (en) * | 2007-09-13 | 2011-06-08 | 日本電信電話株式会社 | Motion search device in video coding |
-
2003
- 2003-10-28 JP JP2003366925A patent/JP4332013B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JP2005136455A (en) | 2005-05-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR101386767B1 (en) | Apparatus and method for displaying a warped version of a source image | |
| US6266733B1 (en) | Two-level mini-block storage system for volume data sets | |
| JP2006094494A (en) | Accelerating video encoding using graphics processor unit | |
| CN100378867C (en) | Semiconductor device, image data processing apparatus and method | |
| CN113032007B (en) | Data processing method and device | |
| JPH0662312A (en) | Video image mapping device | |
| CN113436057B (en) | Data processing method and binocular stereo matching method | |
| JP2897761B2 (en) | Block-matching arithmetic unit and machine-readable recording medium recording program | |
| JPWO2010134347A1 (en) | Graphics drawing apparatus, graphics drawing method, graphics drawing program, recording medium recording graphics drawing program, integrated circuit for graphics drawing | |
| CN113672183A (en) | Image processing device and image processing method | |
| JP2002171401A (en) | SIMD type arithmetic unit having a thinning operation instruction | |
| KR101091054B1 (en) | Device for motion search in dynamic image encoding | |
| US8436865B2 (en) | Memory controller and memory system using the same | |
| US6850569B2 (en) | Effective motion estimation for hierarchical search | |
| JP4332013B2 (en) | Pseudo multi-port memory device and pixel readout method of pseudo multi-port memory device | |
| JP5917907B2 (en) | Image processing device | |
| CN104618717A (en) | Line and block integrating and converting method and computer readable memory medium thereof | |
| JP5147102B2 (en) | Memory access method | |
| JP5865696B2 (en) | Image processing device | |
| JPH06223099A (en) | Signal processing system provided with reduced memory space | |
| US20180108113A1 (en) | Apparatus and Method for Parallel Polyphase Image Interpolation | |
| JP2014042139A (en) | Coding device, coding method and program | |
| EP0775976B1 (en) | Method for resizing an image | |
| KR100246033B1 (en) | Computation Method for Fast Real-time Processing Motion Estimation and Computing Device Therefor | |
| CN101599260B (en) | Method and device for enlarging or shrinking image through sharable hardware |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060410 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090414 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090526 |
|
| RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20090526 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20090616 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20090619 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4332013 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120626 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130626 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140626 Year of fee payment: 5 |
|
| S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| EXPY | Cancellation because of completion of term |