JP4323174B2 - Memory control apparatus and method - Google Patents

Memory control apparatus and method Download PDF

Info

Publication number
JP4323174B2
JP4323174B2 JP2003018405A JP2003018405A JP4323174B2 JP 4323174 B2 JP4323174 B2 JP 4323174B2 JP 2003018405 A JP2003018405 A JP 2003018405A JP 2003018405 A JP2003018405 A JP 2003018405A JP 4323174 B2 JP4323174 B2 JP 4323174B2
Authority
JP
Japan
Prior art keywords
data transfer
data
transfer instruction
memory
output
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
Application number
JP2003018405A
Other languages
Japanese (ja)
Other versions
JP2004234057A (en
Inventor
裕江 岩崎
次郎 長沼
俊宏 南
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2003018405A priority Critical patent/JP4323174B2/en
Publication of JP2004234057A publication Critical patent/JP2004234057A/en
Application granted granted Critical
Publication of JP4323174B2 publication Critical patent/JP4323174B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、画像フレームを入力してマクロブロックに分割し、それらのマクロブロックを処理単位として符号化を行ってビットストリームを出力する処理を行う画像符号化装置などで用いられるメモリ制御装置及びその方法に関し、特に、入出力の際に必要となるバッファのオーバーフローやアンダーフローの発生大幅に回避できるようにすることで、それらのバッファの容量を削減できるようにするメモリ制御装置及びその方法に関する。
【0002】
【従来の技術】
MPEG2などの動画像符号化装置では、高圧縮を実現するために空間方向、時間方向の情報を用いているため、画像データなどの大量のデータを扱う必要がある。特に、HDTV画像の実時間符号化では、膨大な画像データを実時間で符号化するために、大容量のメモリと大きなメモリバンド幅(メモリにアクセスする際の帯域)とを確保することが重要である。
【0003】
このため、動画像符号化装置で用いられる従来のメモリ制御方式では、メモリとのデータ転送のバンド幅を確保するために、設計時に、予めデータ転送の順序をスケジューリングすることにより実現している。
【0004】
図12に、動画像符号化装置の装置構成を図示する。
【0005】
この図に示すように、動画像符号化装置は、▲1▼外部から画像フレームをインタレースあるいはプログレッシブで入力する画像入力部と、▲2▼画像フレームから分割されるマクロブロックを処理単位として動作するM個(M≧1)のマクロブロック同期転送部と、▲3▼画像フレームをN個(N≧1)に分割した分割フレームを入力としてマクロブロック単位で符号化処理を行った後それぞれの分割ビットストリームを出力する並列で動作するN個の符号化コア部と、▲4▼ビットストリームを外部に出力するビットストリーム出力部と、▲5▼メモリと、▲6▼メモリと画像入力部/マクロブロック同期転送部/符号化コア部/ビットストリーム出力部との間のデータ転送を制御するメモリ制御部とを備えるという構成を採っている。
【0006】
ここで、図12では、M個のマクロブロック同期転送部として、1個のフィルタ部を備えることを想定している。また、画像入力部及びビットストリーム出力部は、小容量のバッファを有する。また、入力画像、ビットストリームおよびマクロブロック処理用のデータについては、共通のメモリに蓄積されることになる。
【0007】
このように構成される動画像符号化装置では、画像入力部やビットストリーム出力部のデータ転送は、内部処理とは無関係に発生することになる。
【0008】
これから、予めデータ転送の順序をスケジューリングするという従来のメモリ制御方式に従っていたのでは、バッファのオーバーフローやアンダーフローが発生しないようにするために、画像入力部やビットストリーム出力部が保持するバッファを大きくするか、あるいは、画像入力部やビットストリーム出力部とメモリとの間のデータ転送回数を増やさなければならない。
【0009】
この場合、バッファを大きくするようにすると、バッファのメモリ量が大きくなるという問題があり、一方、データ転送回数を増やすようにすると、オーバーヘッドが大きくなり、符号化コア部へのデータ転送サイクルを十分に確保できなくなるために、画像品質の劣化を生じやすいという問題がある。
【0010】
なお、本発明に関連する先行技術として、(イ)下記の特許文献1には、画像メモリとバッファとの間のデータ転送を効率よく行うための技術が開示されており、(ロ)下記の特許文献2には、符号化データ量を制御することにより、バッファメモリでのオーバーフローを防止するという技術が開示されており、(ハ)下記の特許文献3には、画像符号化装置の各処理部の処理をスケジューリングにより決定することにより、処理競合を解決するという技術が開示されている。
【0011】
【特許文献1】
特開平8−9381号公報
【特許文献2】
特開平6−233272号公報
【特許文献3】
特開平10−108199号公報
【0012】
【発明が解決しようとする課題】
従来のメモリ制御方式では、メモリとのデータ転送を行うときに以下のような問題が生じる。
【0013】
(1)マクロブロックの処理サイクルは、画像の性質や符号化方法によって増減する。これから、図13に示すように、マクロブロックの処理サイクルの増減により、予めスケジューリングされたデータ転送では、画像入力部やビットストリーム出力部とメモリとの間のデータ転送間隔が変動することになる。
【0014】
このデータ転送間隔の変動により、一定のレートで入力されてくる画像入力部のバッファや、一定のレートで引き抜かれるビットストリーム出力部のバッファが破綻しないようにするために、バッファ量を大きくするとか、データ転送回数を多くする(オーバーヘッドの増加を招くことになる)という方法が用いられている。
【0015】
(2)画像入力部とメモリとの間で発生するデータ転送や、ビットストリーム出力部とメモリとの間で発生するデータ転送は、マクロブロック処理に無関係に発生する。一方、設計時に転送シーケンスを決定する場合、転送シーケンス順序にしかデータ転送が発生しない。これから、画像入力部の持つバッファがオーバーフローしたり、ビットストリーム出力部の持つバッファがアンダーフローする可能性がある。
【0016】
(3)N個の符号化コア部とメモリとの間の転送シーケンスとして、N回分指定するメモリ制御方式では、同様の転送シーケンスにも関わらず、N倍の転送シーケンスを指定しなければならない。
【0017】
(4)M個のマクロブロック同期転送部とメモリとの間の転送シーケンスの実行の待ち状態や、N個の符号化コア部とメモリとの間の転送シーケンスの実行の待ち状態は、全体のデータ転送の効率を悪くする可能性がある。
【0018】
以上に説明したように、従来技術に従っていると、画像入力部やビットストリーム出力部の持つバッファが大きなものとなったり、それらのバッファがオーバーフローしたりアンダーフローする可能性があるとともに、転送シーケンスを指定するメモリ量が大きく、転送シーケンスの待ち状態で無駄なオーバーヘッドを発生させるという問題がある。
【0019】
このような問題は、動画像符号化装置に限られることなく、処理データを入力してメモリに書き込む入力部と、メモリに記憶される処理データに所定の処理を施す処理部と、メモリに記憶される処理の施された処理データを出力する出力部とを備える処理装置で一般的に発生している問題である。
【0020】
本発明はかかる事情に鑑みてなされたものであって、処理データを入力してメモリに書き込む入力部と、メモリに記憶される処理データに所定の処理を施す処理部と、メモリに記憶される処理の施された処理データを出力する出力部とを備える処理装置で用いられて、それらの各部とメモリとの間のデータ転送を制御するという構成を採るときにあって、入出力の際に必要となるバッファのオーバーフローやアンダーフローの発生大幅に回避できるようにすることで、それらのバッファの容量を削減できるようにする新たなメモリ制御技術の提供を目的とする。
【0021】
さらに、本発明は、これに加えて、転送シーケンスを指定するメモリ量を削減できるようにするとともに、転送シーケンスの待ち状態により発生する無駄なオーバーヘッドを削減できるようにする新たなメモリ制御技術の提供を目的とする。
【0022】
【課題を解決するための手段】
この目的を達成するために、本発明のメモリ制御装置は、処理データを入力してメモリに書き込む入力部と、メモリに記憶される処理データに所定の処理を施す1つ又は複数の処理部と、メモリに記憶される処理の施された処理データを出力する出力部とを備える処理装置で用いられて、それらの各部とメモリとの間のデータ転送を制御するという構成を採るときにあって、
(1)メモリと処理部との間に発生する一連のデータ処理用データ転送命令を規定の順序に従って発行する発行手段と、
(2)入力部の持つバッファ容量から制限される入力部とメモリとの間に発生するデータ転送間隔の最大値である入力側最大値と、出力部の持つバッファ容量から制限される出力部とメモリとの間に発生するデータ転送間隔の最大値である出力側最大値とを記憶する第1の記憶手段と、
(3)入力部とメモリとの間の外部とのインタラクションで発生するデータ転送を司るデータ入力用データ転送命令の終了からの経過サイクル数である入力側経過サイクル数と、出力部とメモリとの間の外部とのインタラクションで発生するデータ転送を司るデータ出力用データ転送命令の終了からの経過サイクル数である出力側経過サイクル数とを計数する計数手段と、
(4)データ処理用データ転送命令のそれぞれについて、予め設定される固定値の実行サイクル数を記憶する第2の記憶手段と、
(5)第2の記憶手段から発行手段の発行したデータ処理用データ転送命令の実行サイクル数を取得して、その取得した実行サイクル数と入力側経過サイクル数との加算値を算出し、その加算値が入力側最大値を超えるのか否かを判断して、超える場合には、データ入力用データ転送命令を次に実行するデータ転送命令として決定し、超えない場合には、続いて、その取得した実行サイクル数と出力側経過サイクル数との加算値を算出し、その加算値が出力側最大値を超えるのか否かを判断して、超える場合には、データ出力用データ転送命令を次に実行するデータ転送命令として決定し、超えない場合には、発行手段の発行したデータ処理用データ転送命令を次に実行するデータ転送命令として決定する決定手段と、
(6)発行手段の発行したデータ処理用データ転送命令が次に実行するデータ転送命令として決定される場合にあって、そのデータ処理用データ転送命令が待ち状態にある場合には、データ入力用データ転送命令、あるいは、データ出力用データ転送命令を次に実行するデータ転送命令として最終決定する最終決定手段とを備えるように構成する。
【0024】
このように構成される本発明のメモリ制御装置では、発行手段は、メモリと処理部との間に発生する一連のデータ処理用データ転送命令を規定の順序に従って発行する。例えば、データ処理用データ転送命令の転送シーケンスを保持するメモリ域を参照することで、メモリと処理部との間に発生する一連のデータ処理用データ転送命令を規定の順序に従って発行するのである。
【0025】
このとき、複数のデータ処理用データ転送命令の組み合わせを繰り返し発行する場合には、転送シーケンスの命令数の削減を図るために、その組み合わせのデータ処理用データ転送命令の転送シーケンスを保持するメモリ域をサイクリックに参照することで、その組み合わせのデータ処理用データ転送命令を繰り返し発行することが好ましい。
【0026】
このデータ処理用データ転送命令の発行を受けて、決定手段は、第1の記憶手段の記憶データに従って、2つのデータ転送間隔の最大値(入力側最大値,出力側最大値)を取得するとともに、計数手段の計数する2つの経過サイクル数(入力側経過サイクル数,出力側経過サイクル数)を取得し、さらに、第2の記憶手段の記憶データに従って、発行手段の発行したデータ処理用データ転送命令の示すデータ転送に必要な実行サイクル数を取得する。
【0027】
続いて、決定手段は、その取得したデータ転送に必要な実行サイクル数と、その取得した経過サイクル数との加算値を算出して、その加算値がその取得した最大値を超えるのか否かを判断することで、次に実行するデータ転送命令を決定する。
【0028】
すなわち、その加算値が第1の記憶手段の記憶する最大値を超える場合には、発行手段の発行したデータ処理用データ転送命令を次に実行すると、入力部の持つバッファがオーバーフローしたり、出力部の持つバッファがアンダーフローすることになるので、そのような不都合を回避すべく、その加算値がその最大値を超える場合には、その超えた最大値に対応付けられるデータ転送命令(データ入力用データ転送命令あるいはデータ出力用データ転送命令)を次に実行するデータ転送命令として決定し、その加算値がその最大値を超えない場合には、発行手段の発行したデータ処理用データ転送命令を次に実行するデータ転送命令として決定するのである。
【0029】
このとき、入力部とメモリとの間のデータ転送を司るデータ入力用データ転送命令の方が、出力部とメモリとの間のデータ転送を司るデータ出力用データ転送命令よりも緊急性が高いことを考慮して、先ず最初に、加算値が入力部に係る入力側最大値を超えるのか否かを判断して、超える場合には、入力部とメモリとの間のデータ転送を司るデータ入力用データ転送命令を次に実行するデータ転送命令として決定し、超えない場合には、続いて、加算値が出力部に係る出力側最大値を超えるのか否かを判断して、超える場合には、出力部とメモリとの間のデータ転送を司るデータ出力用データ転送命令を次に実行するデータ転送命令として決定し、超えない場合には、発行手段の発行したデータ処理用データ転送命令を次に実行するデータ転送命令として決定する。
【0030】
決定手段が次に実行するデータ転送命令を決定すると、最終決定手段は、処理部とメモリとの間のデータ転送を司るデータ処理用データ転送命令に待ち状態が発生することを考慮して、発行手段の発行したデータ処理用データ転送命令が次に実行するデータ転送命令として決定される場合には、そのデータ処理用データ転送命令が待ち状態にあるのか否かをチェックして、そのデータ処理用データ転送命令が待ち状態にある場合には、入力部とメモリとの間のデータ転送を司るデータ入力用データ転送命令、あるいは、出力部とメモリとの間のデータ転送を司るデータ出力用データ転送命令を次に実行するデータ転送命令として最終決定するように処理する。
例えば、(i)前回にデータ入力用データ転送命令を次に実行するデータ転送命令として最終決定した場合には、今回はデータ出力用データ転送命令を次に実行するデータ転送命令として最終決定し、一方、前回にデータ出力用データ転送命令を次に実行するデータ転送命令として最終決定した場合には、今回はデータ入力用転送命令を次に実行するデータ転送命令として最終決定したり、(ii)入力側最大値と入力側経過サイクル数との差分値と、出力側最大値と出力側経過サイクル数との差分値とを求めて、小さな値を示す方の差分値を特定し、その特定した差分値が入力側最大値と入力側経過サイクル数との差分値である場合には、データ入力用データ転送命令を次に実行するデータ転送命令として最終決定し、一方、その特定した差分値が出力側最大値と出力側経過サイクル数との差分値である場合には、データ出力用データ転送命令を次に実行するデータ転送命令として最終決定する。
【0031】
このようにして、本発明によれば、処理データを入力してメモリに書き込む入力部と、メモリに記憶される処理データに所定の処理を施す処理部と、メモリに記憶される処理の施された処理データを出力する出力部とを備える処理装置で用いられて、それらの各部とメモリとの間のデータ転送を制御するという構成を採るときにあって、入力部の持つバッファのオーバーフローの発生大幅に回避できるようになるとともに、出力部の持つバッファのアンダーフローの発生大幅に回避できるようになり、これにより、バッファの容量に必要以上の余裕を持たせる必要がなくなるので、バッファの容量を削減できるようになる。
【0032】
そして、本発明によれば、処理部とメモリとの間のデータ転送を司るデータ転送命令を優先する形でデータ転送を実行することで、入力部の持つバッファがオーバーフローとなる直前までそのバッファに処理データを入力するとともに、出力部の持つバッファがアンダーフローとなる直前までそのバッファから処理データを出力するというように処理することから、入力部とメモリとの間のデータ転送回数を削減できるようになるとともに、出力部とメモリとの間のデータ転送回数を削減できるようになる。
【0033】
そして、本発明によれば、処理部とメモリとの間のデータ転送を司るデータ転送命令が繰り返し発行される場合に、その転送シーケンスを指定するメモリ量を削減できるようになる。
【0034】
そして、本発明によれば、処理部とメモリとの間のデータ転送を司るデータ転送命令の待ち状態により発生する無駄なオーバーヘッドを削減できるようになる。
【0035】
【発明の実施の形態】
以下、動画像符号化装置に適用した実施の形態に従って本発明を詳細に説明する。
【0036】
図1に、本発明を具備する動画像符号化装置の一実施形態例を図示する。
【0037】
図中、1は画像入力部であって、外部から画像フレームを入力するもの、10は画像入力部1の備えるバッファ、2はフィルタ部であって、画像フレームから分割されるマクロブロックの同期転送のためのフィルタリング処理を行うもの、3-i(i=1〜N)はN個設けられる符号化コア部であって、並列動作して、画像フレームをN個に分割した分割フレームを入力としてマクロブロック単位で符号化処理を行った後それぞれの分割ビットストリームを出力するもの、4はビットストリーム出力部であって、符号化コア部3-iの出力するビットストリームを外部に出力するもの、40はビットストリーム出力部4の備えるバッファ、5はメモリ、6は本発明を具備するメモリ制御部である。
【0038】
この画像入力部1は、外部から画像データを入力して、メモリ制御部6を介してメモリ5に書き込む処理を行う。フィルタ部2は、メモリ制御部6を介してメモリ5から画像データを読み出してフィルタリング処理を施し、メモリ制御部6を介してメモリ5に書き込む処理を行う。符号化コア部3-iは、メモリ制御部6を介してメモリ5から画像データを読み出して符号化処理を施し、メモリ制御部6を介してメモリ5に書き込む処理を行う。ビットストリーム出力部4は、メモリ制御部6を介してメモリ5から符号化画像データを読み出して、外部に出力する処理を行う。
【0039】
本発明を具備するメモリ制御部6は、パイプライン構成のハードウェアで構成されて、画像入力部1やビットストリーム出力部4のように、外部とのインタラクションでデータ転送が発生する処理部と、フィルタ部2や符号化コア部3-iのように、マクロブロックの処理に同期してデータ転送が発生する処理部とに対して、効率のよいデータ転送を提供する処理を行う。
【0040】
この処理を実現するために、本発明を具備するメモリ制御部6は、転送シーケンス保持用レジスタ61を備えるデータ転送命令発行手段60と、実行サイクル数管理手段62と、入出力実行間隔最大値管理手段63と、入出力経過サイクル数計数手段64と、実行命令決定手段65と、アドレス計算手段66と、データ転送手段67とを備える。
【0041】
転送シーケンス保持用レジスタ61は、図2に示すように、フィルタ部2とメモリ5との間のデータ転送を司るデータ転送命令(Trans1)と、各符号化コア部3-iとメモリ5との間のデータ転送を司るデータ転送命令(符号化コア部3-1についてはTrans2,Trans3,Trans4、・・・・・、符号化コア部3-NについてはTransz-2,Transz-1,Transz) との羅列データ(転送シーケンスを構成することになる)について保持する。
【0042】
データ転送命令発行手段60は、図3に示すように、この転送シーケンス保持用レジスタ61に保持される転送シーケンスに従って、実行命令決定手段65に対して、フィルタ部2とメモリ5との間のデータ転送を司るデータ転送命令と、各符号化コア部3-iとメモリ5との間のデータ転送を司るデータ転送命令とをサイクリックの形式に従って順番に発行することで、メモリ5とフィルタ部2/符号化コア部3-iとの間に発生するNマクロブロック処理分の一連のデータ転送命令を発行する。
【0043】
実行サイクル数管理手段62は、図2に示すように、転送シーケンス保持用レジスタ61に保持される各データ転送命令に対応付けて、そのデータ転送命令の実行サイクル数(予め設定される固定値)を管理する。
【0044】
入出力実行間隔最大値管理手段63は、画像入力部1の持つバッファ10の容量から制限される画像入力部1とメモリ5との間に発生するデータ転送間隔の最大値が何サイクルであるのかという情報と、ビットストリーム出力部4の持つバッファ40の容量から制限されるビットストリーム出力部4とメモリ5との間に発生するデータ転送間隔の最大値が何サイクルであるのかという情報とを管理する。
【0045】
すなわち、画像入力部1とメモリ5との間のデータ転送を司るデータ転送命令(TransIn)について、画像入力部1の持つバッファ10がオバーフローしないようにするために、例えば100サイクルを超えない形で実行されなければならないという条件が課されるときには、図2に示すように、画像入力部1とメモリ5との間に発生するデータ転送間隔の最大値が100サイクルであるということを管理するのである。
【0046】
そして、ビットストリーム出力部4とメモリ5との間のデータ転送を司るデータ転送命令(TransBs)について、ビットストリーム出力部4の持つバッファ40がアンダーフローしないようにするために、例えば500サイクルを超えない形で実行されなければならないという条件が課されるときには、図2に示すように、ビットストリーム出力部4とメモリ5との間に発生するデータ転送間隔の最大値が500サイクルであるということを管理するのである。
【0047】
入出力経過サイクル数計数手段64は、マクロブロックに同期しないデータ転送を行う画像入力部1/ビットストリーム出力部4のそれぞれのデータ転送が終了してからの経過サイクル数を計数するものであり、画像入力部1とメモリ5との間のデータ転送を司るデータ転送命令(TransIn)の終了からの経過サイクル数(RTransIn)を計数して、それを保持するとともに、ビットストリーム出力部4とメモリ5との間のデータ転送を司るデータ転送命令(TransBs)の終了からの経過サイクル数(RTransBs)を計数して、それを保持する。
【0048】
すなわち、入出力経過サイクル数計数手段64は、図4に示すように、画像入力部1とメモリ5との間のデータ転送を司るデータ転送命令(TransIn)の終了からの経過サイクル数(RTransIn)を計数するカウンタ640を備えて、そのデータ転送命令が実行を開始すると、カウンタ640の値をリセットし、そのデータ転送命令が実行を終了すると、1サイクル経過する度にカウンタ640の値を1つインクリメントすることで、そのデータ転送命令の終了からの経過サイクル数(RTransIn)を計数するのである。
【0049】
そして、入出力経過サイクル数計数手段64は、図4に示すように、ビットストリーム出力部4とメモリ5との間のデータ転送を司るデータ転送命令(TransBs)の終了からの経過サイクル数(RTransBs)を計数するカウンタ641を備えて、そのデータ転送命令が実行を開始すると、カウンタ641の値をリセットし、そのデータ転送命令が実行を終了すると、1サイクル経過する度にカウンタ641の値を1つインクリメントすることで、そのデータ転送命令の終了からの経過サイクル数(RTransBs)を計数するのである。
【0050】
実行命令決定手段65は、データ転送命令発行手段60の発行するデータ転送命令と、実行サイクル数管理手段62から取得されるそのデータ転送命令の実行サイクル数と、入出力実行間隔最大値管理手段63から取得されるデータ転送間隔の最大値と、入出力経過サイクル数計数手段64の計数する経過サイクル数とを入力として、次に実行するデータ転送命令を決定する。
【0051】
アドレス計算手段66は、実行命令決定手段65の決定したデータ転送命令を入力として、そのデータ転送命令の指定するアドレス計算を行い、メモリ5に対してそのアドレスを入力する。
【0052】
データ転送手段67は、メモリ5へのアドレス入力に同期して、画像入力部1/フィルタ部2/符号化コア部3-i/ビットストリーム出力部4とメモリ5との間のデータ転送を実行する。
【0053】
次に、図5を参照しつつ、このように構成される本発明を具備するメモリ制御部6の実行する処理について詳細に説明する。
【0054】
実行命令決定手段65は、データ転送命令発行手段60の発行するデータ転送命令(Transp(p=1〜z)) を受け取ると、図5に示すように、実行サイクル数管理手段62から、そのデータ転送命令(Transp)の実行サイクル数(Sp)を取得する。
【0055】
このとき、実行命令決定手段65は、さらに、入出力実行間隔最大値管理手段63から、データ転送間隔の最大値(MaxIn)/最大値(MaxBs)を取得するとともに、入出力経過サイクル数計数手段64から、経過サイクル数(RTransIn)/経過サイクル数(RTransBs)を取得する。
【0056】
続いて、実行命令決定手段65は、先ず最初に、
RTransIn+Sp >MaxIn
という条件が成立するのか否かを判断して、この条件が成立することを判断する場合には、次に実行するデータ転送命令として、画像入力部1とメモリ5との間のデータ転送を司るデータ転送命令(TransIn)を決定する。
【0057】
すなわち、次に実行するデータ転送命令として、データ転送命令発行手段60の発行したデータ転送命令(Transp)を選択すると、経過サイクル数(RTransIn)がデータ転送間隔の最大値(MaxIn)を超えてしまうことになる場合には、次に実行するデータ転送命令として、画像入力部1とメモリ5との間のデータ転送を司るデータ転送命令(TransIn)を選択するのである。
【0058】
このときには、データ転送命令発行手段60の発行したデータ転送命令(Transp)については保留状態とするので、データ転送命令発行手段60にはデータ転送命令をアクセプトした旨の通知がいかず、これから、データ転送命令発行手段60は、次のデータ転送命令の発行の待ち状態に入る。
【0059】
一方、実行命令決定手段65は、
RTransIn+Sp >MaxIn
という条件が成立しないことを判断する場合には、続いて、
RTransBs+Sp >MaxBs
という条件が成立するのか否かを判断して、この条件が成立することを判断する場合には、次に実行するデータ転送命令として、ビットストリーム出力部4とメモリ5との間のデータ転送を司るデータ転送命令(TransBs)を決定する。
【0060】
すなわち、次に実行するデータ転送命令として、データ転送命令発行手段60の発行したデータ転送命令(Transp)を選択すると、経過サイクル数(RTransBs)がデータ転送間隔の最大値(MaxBs)を超えてしまうことになる場合には、次に実行するデータ転送命令として、ビットストリーム出力部4とメモリ5との間のデータ転送を司るデータ転送命令(TransBs)を選択するのである。
【0061】
このときには、データ転送命令発行手段60の発行したデータ転送命令(Transp)については保留状態とするので、データ転送命令発行手段60にはデータ転送命令をアクセプトした旨の通知がいかず、これから、データ転送命令発行手段60は、次のデータ転送命令の発行の待ち状態に入る。
【0062】
一方、実行命令決定手段65は、
RTransBs+Sp >MaxBs
という条件が成立しないことを判断する場合には、次に実行するデータ転送命令として、データ転送命令発行手段60の発行したデータ転送命令(Transp)を決定する。
【0063】
このときには、データ転送命令発行手段60に対してデータ転送命令をアクセプトした旨が通知され、これから、データ転送命令発行手段60は、次のデータ転送命令を発行することになる。
【0064】
このように、実行命令決定手段65は、マクロブロック処理用のデータ転送を優先することで効率的にマクロブロックの処理を進めながら、データ転送命令発行手段60の発行したデータ転送命令(Transp)を選択すると、画像入力部1の持つバッファ10がオーバーフローしてしまう場合には、画像入力部1とメモリ5との間のデータ転送を司るデータ転送命令(TransIn)を選択し、また、データ転送命令発行手段60の発行したデータ転送命令(Transp)を選択すると、ビットストリーム出力部4の持つバッファ40がアンダーフローしてしまうときには、ビットストリーム出力部4とメモリ5との間のデータ転送を司るデータ転送命令(TransBs)を選択するように処理するのである。
【0065】
ここで、「RTransBs+Sp >MaxBs 」の判断よりも「RTransIn+Sp >MaxIn 」の判断を優先させるのは、画像入力部1の持つバッファ10がオーバーフローして入力画像が失われると画質劣化に直結するのに対して、ビットストリーム出力部4の持つバッファ40がアンダーフローすることにより出力できるビットストリームが無くなっても、nullパケットを挿入することにより、ある程度回避可能であるからである。
【0066】
これから、実行命令決定手段65は、先ず最初に、「RTransIn+Sp >MaxIn 」の判断を行い、続いて、「RTransBs+Sp >MaxBs 」の判断を行うことで、次に実行するデータ転送命令を決定するのである。
【0067】
実行命令決定手段65が次に実行するデータ転送命令を決定すると、アドレス計算手段66は、実行命令決定手段65の決定したデータ転送命令を入力として、そのデータ転送命令の指定するアドレス計算を行い、メモリ5に対してそのアドレスを入力し、これを受けて、データ転送手段67は、画像入力部1/フィルタ部2/符号化コア部3-i/ビットストリーム出力部4とメモリ5との間のデータ転送を実行する。
【0068】
このようにして、本発明を具備するメモリ制御部6によれば、画像入力部1の持つバッファ10のオーバーフローを回避できるようになるとともに、ビットストリーム出力部4の持つバッファ40のアンダーフローを回避できるようになり、これにより、バッファ10,40の容量に必要以上の余裕を持たせる必要がなくなるので、バッファ10,40の容量を削減できるようになる。
【0069】
そして、本発明を具備するメモリ制御部6によれば、フィルタ部2/符号化コア部3-iとメモリ5との間のデータ転送を司る命令を優先する形でデータ転送を実行することから、効率的にマクロブロックの処理を進めることができるようになる。
【0070】
そして、本発明を具備するメモリ制御部6によれば、画像入力部1の持つバッファ10がオーバーフローとなる直前までそのバッファ10に画像データを入力するとともに、ビットストリーム出力部4の持つバッファ40がアンダーフローとなる直前までそのバッファ40から画像データを出力するというように処理することから、画像入力部1とメモリ5との間のデータ転送回数を削減できるようになるとともに、ビットストリーム出力部4とメモリ5との間のデータ転送回数を削減できるようになる。
【0071】
上述したように、画像入力部1は、外部から与えられる画像データを入力する処理を行うことになるが、その他に、例えば、その入力した画像データの縮小画像データを作成してメモリ5に格納するというような処理を行うことがある。また、色画像を入力するときには、明度に関する画像データと輝度に関する画像データとを別々にメモリ5に入力する処理を行う。
【0072】
これから、画像入力部1とメモリ5との間のデータ転送を司るデータ転送命令として、データ転送命令(TransIn')と、データ転送命令(TransIn'')というように複数種類のデータ転送命令が存在することがある。なお、このようなときには別々のバッファ10が用意されることになる。
【0073】
このような場合には、図6に示すように、実行命令決定手段65は、図5に示した手順と同様の手順を実行する実行処理1(全てのバッファにオーバフローやアンダフローが発生しないようにしつつ、マクロブロックの処理に係るデータ転送命令を優先する形でデータ転送命令を選択する処理)に従って、画像入力部1とメモリ5との間のデータ転送を司るデータ転送命令を選択するときに、実行処理2に示すように、この複数種類のデータ転送命令(TransIn'やTransIn'')を順番に選択していくように処理することになる。
【0074】
ここで、このような場合には、図6に示すように、入出力実行間隔最大値管理手段63には、それぞれのデータ転送間隔の最大値が管理されることになるとともに、入出力経過サイクル数計数手段64は、それぞれのデータ転送命令の終了からの経過サイクル数を計数することになる。
【0075】
図2では、一般的な説明を行うために、各符号化コア部3-iのデータ転送命令が異なるものとなることで説明したが、実際には、各符号化コア部3-iは同一の処理を実行することから、図7に示すように、符号化コア部3-1のデータ転送命令もTrans2,Trans3,Trans4であり、符号化コア部3-2のデータ転送命令もTrans2,Trans3,Trans4であり、・・・・・、符号化コア部3-Nのデータ転送命令もTrans2,Trans3,Trans4であるというように、各符号化コア部3-iのデータ転送命令は同一のものとなる。
【0076】
この場合には、転送シーケンス保持用レジスタ61は、図7に示すように、フィルタ部2とメモリ5との間のデータ転送を司るデータ転送命令(Trans1)と、この共通のデータ転送命令(Trans2,Trans3,Trans4)との羅列データについて保持すれば足りることになる。
【0077】
すなわち、データ転送命令発行手段60は、図8に示すように、データ転送命令(Trans1)を発行した後、データ転送命令(Trans2,Trans3,Trans4)を、「Trans2→Trans3→Trans4」という順番にN回繰り返して発行してから、再び、データ転送命令(Trans1)を発行していくことを繰り返していくという処理を行うことにより、転送シーケンス保持用レジスタ61が「Trans1,Trans2,Trans3,Trans4 」という少ないデータ転送命令を保持すれば足りることを実現できるようになるからである。
【0078】
この構成に従うと、転送シーケンス保持用レジスタ61を小さなものにできるというメリットが得られる。
【0079】
データ転送命令発行手段60がこのようなデータ転送命令の発行形態を用いる場合には、アドレス計算手段66は、データ転送命令発行手段60での繰り返し数に応じてデータ転送毎のスライス番号とマクロブロック番号とを変更してアドレス計算を行うことになる。
【0080】
図9に、本発明を具備する動画像符号化装置の他の実施形態例を図示する。
【0081】
この実施形態例では、実行命令決定手段65が次に実行するデータ転送命令としてデータ転送命令発行手段60の発行したデータ転送命令(Transp)を決定するときにあって、そのデータ転送命令(Transp)が待ち状態にあるということが起こることを考慮して、そのような待ち状態により発生する無駄なオーバーヘッドを削減することを目的としている。
【0082】
この実施形態例に従う場合、メモリ制御部6は、実行命令決定手段65の決定したデータ転送命令を入力として、次に実行するデータ転送命令を最終決定する処理を行う実行命令最終決定手段68を備えるという構成を採る。
【0083】
この実行命令最終決定手段68は、実行命令決定手段65が次に実行するデータ転送命令としてデータ転送命令発行手段60の発行したデータ転送命令(Transp)を決定するときにあって、そのデータ転送命令(Transp)が待ち状態にあるときには、画像入力部1とメモリ5との間のデータ転送を司るデータ転送命令(TransIn)か、ビットストリーム出力部4とメモリ5との間のデータ転送を司るデータ転送命令(TransBs)のいずれか一方を、次に実行するデータ転送命令として最終決定してアドレス計算手段66に入力する処理を行う。
【0084】
例えば、図10に示すように、前回、画像入力部1とメモリ5との間のデータ転送を司るデータ転送命令(TransIn)を次に実行するデータ転送命令として最終決定した場合には、今回は、ビットストリーム出力部4とメモリ5との間のデータ転送を司るデータ転送命令(TransBs)を次に実行するデータ転送命令として最終決定し、逆に、前回、ビットストリーム出力部4とメモリ5との間のデータ転送を司るデータ転送命令(TransBs)を次に実行するデータ転送命令として最終決定した場合には、今回は、画像入力部1とメモリ5との間のデータ転送を司るデータ転送命令(TransIn)を次に実行するデータ転送命令として最終決定するのである。
【0085】
あるいは、図11に示すように、画像入力部1とメモリ5との間のデータ転送を司るデータ転送命令(TransIn)について、「MaxIn −RTransIn」を計算するとともに、ビットストリーム出力部4とメモリ5との間のデータ転送を司るデータ転送命令(TransBs)について、「MaxBs −RTransBs」を計算することで、どちらの方が余裕がないのかを判断して、その余裕のない方のデータ転送命令を次に実行するデータ転送命令として最終決定するのである。
【0086】
この実行命令最終決定手段68を備えることで、転送シーケンスの待ち状態により発生する無駄なオーバーヘッドを削減できるようになる。
【0087】
図示実施形態例に従って本発明を説明したが、本発明はこれに限定されるものではない。例えば、実施形態例では、動画像符号化装置に適用した実施の形態に従って本発明を説明したが、本発明はその適用が動画像符号化装置に限られるものではない。
【0088】
【発明の効果】
以上説明したように、本発明によれば、処理データを入力してメモリに書き込む入力部と、メモリに記憶される処理データに所定の処理を施す処理部と、メモリに記憶される処理の施された処理データを出力する出力部とを備える処理装置で用いられて、それらの各部とメモリとの間のデータ転送を制御するという構成を採るときにあって、入力部の持つバッファのオーバーフローの発生大幅に回避できるようになるとともに、出力部の持つバッファのアンダーフローの発生大幅に回避できるようになり、これにより、バッファの容量に必要以上の余裕を持たせる必要がなくなるので、バッファの容量を削減できるようになる。
【0089】
そして、本発明によれば、処理部とメモリとの間のデータ転送を司るデータ転送命令を優先する形でデータ転送を実行することで、入力部の持つバッファがオーバーフローとなる直前までそのバッファに処理データを入力するとともに、出力部の持つバッファがアンダーフローとなる直前までそのバッファから処理データを出力するというように処理することから、入力部とメモリとの間のデータ転送回数を削減できるようになるとともに、出力部とメモリとの間のデータ転送回数を削減できるようになる。
【0090】
そして、本発明によれば、処理部とメモリとの間のデータ転送を司るデータ転送命令が繰り返し発行される場合に、その転送シーケンスを指定するメモリ量を削減できるようになる。
【0091】
そして、本発明によれば、処理部とメモリとの間のデータ転送を司るデータ転送命令の待ち状態により発生する無駄なオーバーヘッドを削減できるようになる。
【図面の簡単な説明】
【図1】本発明を具備する動画像符号化装置の一実施形態例である。
【図2】転送シーケンス保持用レジスタの保持する転送シーケンスの説明図である。
【図3】データ転送命令発行手段の実行処理の説明図である。
【図4】入出力経過サイクル数計数手段の実行処理の説明図である。
【図5】実行命令決定手段の実行処理の説明図である。
【図6】実行命令決定手段の実行処理の説明図である。
【図7】符号化コア部のデータ転送命令の説明図である。
【図8】データ転送命令発行手段の実行処理の説明図である。
【図9】本発明を具備する動画像符号化装置の他の実施形態例である。
【図10】実行命令最終決定手段の実行処理の説明図である。
【図11】実行命令最終決定手段の実行処理の説明図である。
【図12】動画像符号化装置の装置構成の説明図である。
【図13】従来の動画像符号化装置の処理の説明図である。
【符号の説明】
1 画像入力部
2 フィルタ部
3 符号化コア部
4 ビットストリーム出力部
5 メモリ
6 メモリ制御部
10 バッファ
40 バッファ
60 データ転送命令発行手段
61 転送シーケンス保持用レジスタ
62 実行サイクル数管理手段
63 入出力実行間隔最大値管理手段
64 入出力経過サイクル数計数手段
65 実行命令決定手段
66 アドレス計算手段
67 データ転送手段
[0001]
BACKGROUND OF THE INVENTION
  The present invention relates to a memory control device used in an image encoding device or the like that performs processing of inputting an image frame, dividing it into macroblocks, encoding the macroblocks as processing units, and outputting a bitstream, and the like In particular, buffer overflow and underflow required for input / outputOccurrence ofTheDrasticallyThe present invention relates to a memory control device and a method thereof that can reduce the capacity of the buffers by enabling the avoidance.
[0002]
[Prior art]
Since a moving image encoding apparatus such as MPEG2 uses information in the spatial direction and the temporal direction in order to realize high compression, it is necessary to handle a large amount of data such as image data. In particular, in real-time encoding of HDTV images, it is important to ensure a large memory and a large memory bandwidth (bandwidth for accessing the memory) in order to encode a large amount of image data in real time. It is.
[0003]
For this reason, in the conventional memory control method used in the moving picture coding apparatus, in order to ensure the bandwidth of data transfer with the memory, it is realized by scheduling the data transfer order in advance at the time of design.
[0004]
FIG. 12 illustrates a device configuration of the moving image encoding device.
[0005]
As shown in this figure, the moving picture coding apparatus operates with (1) an image input unit for inputting an image frame from the outside in an interlaced or progressive manner, and (2) a macroblock divided from the image frame as a processing unit. And M (M ≧ 1) macroblock synchronous transfer units, and (3) an encoding process in units of macroblocks after input of divided frames obtained by dividing an image frame into N (N ≧ 1) N coding core units operating in parallel for outputting a divided bit stream, (4) a bit stream output unit for outputting a bit stream to the outside, (5) a memory, (6) a memory and an image input unit / The memory control unit that controls data transfer between the macroblock synchronous transfer unit / encoding core unit / bitstream output unit is employed.
[0006]
Here, in FIG. 12, it is assumed that one filter unit is provided as the M macroblock synchronous transfer units. The image input unit and the bit stream output unit have a small-capacity buffer. Also, the input image, the bit stream, and the data for macroblock processing are stored in a common memory.
[0007]
In the moving image encoding apparatus configured as described above, data transfer of the image input unit and the bit stream output unit occurs regardless of internal processing.
[0008]
From now on, according to the conventional memory control method in which the order of data transfer is scheduled in advance, the buffer held by the image input unit and the bit stream output unit is increased in order to prevent buffer overflow and underflow. Alternatively, the number of data transfers between the image input unit or bit stream output unit and the memory must be increased.
[0009]
In this case, there is a problem that increasing the size of the buffer increases the memory capacity of the buffer. On the other hand, increasing the number of data transfers increases the overhead, and the data transfer cycle to the encoding core unit is sufficient. Therefore, there is a problem that the image quality is liable to be deteriorated.
[0010]
As prior art related to the present invention, (a) the following Patent Document 1 discloses a technique for efficiently transferring data between an image memory and a buffer. Patent Document 2 discloses a technique for preventing overflow in a buffer memory by controlling the amount of encoded data. (C) Patent Document 3 below describes each process of an image encoding device. A technology is disclosed in which processing contention is resolved by determining processing of each part by scheduling.
[0011]
[Patent Document 1]
Japanese Patent Laid-Open No. 8-9381
[Patent Document 2]
JP-A-6-233272
[Patent Document 3]
JP-A-10-108199
[0012]
[Problems to be solved by the invention]
In the conventional memory control system, the following problems occur when data transfer with the memory is performed.
[0013]
(1) The processing cycle of the macroblock increases / decreases depending on the nature of the image and the encoding method. As shown in FIG. 13, the data transfer interval between the image input unit or the bit stream output unit and the memory fluctuates in the data transfer scheduled in advance due to increase / decrease in the processing cycle of the macroblock.
[0014]
In order to prevent the buffer of the image input unit that is input at a constant rate and the buffer of the bit stream output unit that is pulled out at a constant rate due to the fluctuation of the data transfer interval, the buffer amount is increased. A method of increasing the number of data transfers (increasing overhead) is used.
[0015]
(2) Data transfer that occurs between the image input unit and the memory and data transfer that occurs between the bit stream output unit and the memory occur regardless of the macroblock processing. On the other hand, when the transfer sequence is determined at the time of design, data transfer occurs only in the transfer sequence order. From this, the buffer of the image input unit may overflow, or the buffer of the bit stream output unit may underflow.
[0016]
(3) In the memory control method in which N times are designated as the transfer sequence between the N coding core units and the memory, the N-times transfer sequence must be specified in spite of the similar transfer sequence.
[0017]
(4) The waiting state for executing the transfer sequence between the M macroblock synchronous transfer units and the memory and the waiting state for executing the transfer sequence between the N coding core units and the memory Data transfer efficiency may be reduced.
[0018]
As described above, according to the prior art, the buffers of the image input unit and the bit stream output unit may become large, and those buffers may overflow or underflow, and the transfer sequence may be reduced. There is a problem that the amount of memory to be specified is large and wasteful overhead is generated in the waiting state of the transfer sequence.
[0019]
Such a problem is not limited to the moving picture coding apparatus, but is an input unit that inputs processing data and writes it to the memory, a processing unit that performs predetermined processing on the processing data stored in the memory, and a memory that stores the processing data. This is a problem that generally occurs in a processing apparatus that includes an output unit that outputs processed data to be processed.
[0020]
  The present invention has been made in view of such circumstances. An input unit that inputs processing data and writes the processing data in a memory, a processing unit that performs predetermined processing on the processing data stored in the memory, and the memory is stored in the memory. Used in a processing device including an output unit that outputs processed data and controls the data transfer between each unit and the memory. Required buffer overflow or underflowOccurrence ofTheDrasticallyIt is an object of the present invention to provide a new memory control technique that can reduce the capacity of these buffers by making it possible to avoid them.
[0021]
In addition to this, the present invention provides a new memory control technique that makes it possible to reduce the amount of memory that designates a transfer sequence and to reduce unnecessary overhead caused by a waiting state of the transfer sequence. With the goal.
[0022]
[Means for Solving the Problems]
  In order to achieve this object, a memory control device according to the present invention includes an input unit that inputs processing data and writes the processing data in the memory, and one or more processing units that perform predetermined processing on the processing data stored in the memory. Used in a processing apparatus including an output unit that outputs processed data stored in a memory and controls the data transfer between each unit and the memory. ,
  (1) Issuing means for issuing a series of data processing data transfer instructions generated between the memory and the processing unit in a prescribed order;
  (2) An input side maximum value that is a maximum value of a data transfer interval generated between the input unit and the memory limited by the buffer capacity of the input unit, and an output unit limited by the buffer capacity of the output unit First storage means for storing an output side maximum value that is a maximum value of a data transfer interval generated between the memory and the memory;
  (3) Between the input unit and the memoryOccurs in external interactionThe number of elapsed cycles on the input side, which is the number of cycles that have elapsed since the end of the data transfer instruction for data input that controls data transfer, and between the output unit and the memoryOccurs in external interactionCounting means for counting the number of output-side elapsed cycles, which is the number of elapsed cycles from the end of the data output data transfer instruction that controls data transfer;
  (4) For each data processing data transfer instructionOf a fixed value set in advanceSecond storage means for storing the number of execution cycles;
  (5) Obtain the number of execution cycles of the data processing data transfer instruction issued by the issuing means from the second storage means, calculate the added value of the obtained number of execution cycles and the number of input side elapsed cycles, It is determined whether or not the added value exceeds the maximum value on the input side. If so, the data transfer command for data input is determined as the next data transfer command to be executed. Calculate the added value of the acquired number of execution cycles and the number of output-side elapsed cycles, determine whether the added value exceeds the maximum value on the output side, and if so, execute the data transfer command for data output. A data transfer instruction to be executed, and if not exceeding, a determination means for determining the data transfer instruction for data processing issued by the issuing means as a data transfer instruction to be executed next;
  (6) When the data transfer command for data processing issued by the issuing means is determined as the data transfer command to be executed next, and the data transfer command for data processing is in a waiting state, The data transfer instruction or the data output instruction for data output is finally determined as a data transfer instruction to be executed next.
[0024]
  In the memory control device of the present invention configured as described above,IssueMeans are a series of generated between the memory and the processing unit.For data processingIssue data transfer instructions in a prescribed order. For example,For data processingBy referring to the memory area that holds the transfer sequence of the data transfer instruction, a series of data generated between the memory and the processing unitFor data processingData transfer instructions are issued in a prescribed order.
[0025]
  At this time, multipleFor data processingWhen a combination of data transfer instructions is issued repeatedly, to reduce the number of instructions in the transfer sequence,For data processingBy cyclically referencing the memory area holding the transfer sequence of data transfer instructions,For data processingIt is preferable to repeatedly issue a data transfer instruction.
[0026]
  thisFor data processingIn response to the issuance of data transfer instructions,DecisionMeansFirst memoryMeans storage dataToTherefore, the maximum value of the two data transfer intervals(Input side maximum value, output side maximum value)And getCountingCounting meansTwoNumber of elapsed cycles(Number of input side elapsed cycles, number of output side elapsed cycles)Get furtherSecond memoryMeans storage dataToTherefore,IssueIssued by meansFor data processingNecessary for data transfer indicated by data transfer instructionExecutionGet the number of cycles.
[0027]
  continue,DecisionMeans required for the transfer of the acquired dataExecutionAn addition value between the number of cycles and the acquired elapsed cycle number is calculated, and it is determined whether the addition value exceeds the acquired maximum value, thereby determining a data transfer instruction to be executed next.
[0028]
  That is, the added value isFirst memoryNote of meansRememberIf the maximum value exceedsIssueIssued by meansFor data processingWhen the data transfer instruction is executed next, the buffer of the input unit overflows or the buffer of the output unit underflows. Therefore, to avoid such inconvenience, the added value becomes the maximum value. If exceeded, the data transfer instruction associated with the maximum value exceeded(Data transfer instruction for data input or data transfer instruction for data output)Is determined as the next data transfer instruction to be executed, and if the added value does not exceed the maximum value,IssueIssued by meansFor data processingThe data transfer instruction is determined as the next data transfer instruction to be executed.
[0029]
  At this time, it manages the data transfer between the input unit and the memory.For data entryData transfer instructions are responsible for data transfer between the output and memoryFor data outputConsidering that the urgency is higher than the data transfer command, first, the added value is related to the input unit.Input sideJudges whether or not the maximum value is exceeded, and if so, manages the data transfer between the input unit and the memoryFor data entryThe data transfer instruction is determined as the next data transfer instruction to be executed, and if not exceeded, the added value is related to the output unit.Output sideJudges whether or not the maximum value is exceeded, and if so, manages the data transfer between the output unit and the memoryFor data outputIf the data transfer instruction is determined as the next data transfer instruction to be executed and does not exceed,IssueIssued by meansFor data processingDetermine the data transfer instruction as the next data transfer instruction to be executedThe
[0030]
  DecisionWhen the means determines the data transfer instruction to be executed next,final decisionThe means manages data transfer between the processing unit and the memory.For data processingConsidering that a wait state occurs in the data transfer instruction,IssueIssued by meansFor data processingIf the data transfer instruction is determined as the next data transfer instruction to be executed,For data processingCheck if the data transfer instruction is in the wait state andFor data processingControls data transfer between the input unit and memory when a data transfer command is in a wait stateFor data entryControls data transfer instructions or data transfer between output section and memoryFor data outputThe data transfer instruction is processed so as to be finally determined as a data transfer instruction to be executed next.
  For example, (i) when the data transfer instruction for data input is finally determined as the data transfer instruction to be executed next, the data transfer instruction for data output is finally determined as the data transfer instruction to be executed next, On the other hand, when the data transfer instruction for data output was finally determined as the data transfer instruction to be executed next, the data input transfer instruction is finally determined as the data transfer instruction to be executed next, or (ii) The difference value between the input side maximum value and the input side elapsed cycle number and the difference value between the output side maximum value and the output side elapsed cycle number were obtained, and the difference value indicating the smaller value was specified and specified. If the difference value is the difference value between the maximum value on the input side and the number of elapsed cycles on the input side, the data transfer instruction for data input is finally determined as the data transfer instruction to be executed next, while the specified difference Value if the difference value of the output-side maximum value and the output-side elapsed cycles is finalized as a data transfer instruction to be executed next data output for data transfer instruction.
[0031]
  As described above, according to the present invention, the input unit that inputs the processing data and writes the processing data to the memory, the processing unit that performs the predetermined processing on the processing data stored in the memory, and the processing stored in the memory are performed. Used in a processing apparatus having an output unit for outputting processed data and controlling the data transfer between each unit and the memory, and overflowing the buffer of the input unitOccurrence ofTheDrasticallyIt can be avoided and the buffer underflow of the output partOccurrence ofTheDrasticallyAs a result, it is not necessary to give the buffer capacity more than necessary, so that the buffer capacity can be reduced.
[0032]
According to the present invention, data transfer is executed with priority given to a data transfer instruction that controls data transfer between the processing unit and the memory, so that the buffer of the input unit is stored in the buffer until immediately before the buffer overflows. Processing data is input and processing data is output from the buffer until the buffer of the output unit immediately underflows, so that the number of data transfers between the input unit and the memory can be reduced. In addition, the number of data transfers between the output unit and the memory can be reduced.
[0033]
According to the present invention, when a data transfer instruction that controls data transfer between the processing unit and the memory is repeatedly issued, it is possible to reduce the amount of memory that specifies the transfer sequence.
[0034]
According to the present invention, it is possible to reduce useless overhead that occurs due to a wait state of a data transfer instruction that controls data transfer between the processing unit and the memory.
[0035]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the present invention will be described in detail according to an embodiment applied to a moving image encoding apparatus.
[0036]
FIG. 1 shows an embodiment of a moving picture encoding apparatus comprising the present invention.
[0037]
In the figure, 1 is an image input unit for inputting an image frame from the outside, 10 is a buffer provided in the image input unit 1, 2 is a filter unit, and synchronous transfer of macroblocks divided from the image frame 3-i (i = 1 to N) are N coding core units that perform the filtering process for the image, and operate in parallel, with the divided frames obtained by dividing the image frame into N as inputs. Outputs each divided bit stream after encoding in units of macroblocks, 4 indicates a bit stream output unit, and outputs the bit stream output from the encoding core unit 3-i to the outside, Reference numeral 40 denotes a buffer included in the bit stream output unit 4, 5 denotes a memory, and 6 denotes a memory control unit including the present invention.
[0038]
The image input unit 1 performs a process of inputting image data from the outside and writing it into the memory 5 via the memory control unit 6. The filter unit 2 reads out image data from the memory 5 through the memory control unit 6, performs a filtering process, and performs a process of writing into the memory 5 through the memory control unit 6. The encoding core unit 3-i reads out image data from the memory 5 through the memory control unit 6, performs encoding processing, and performs processing of writing into the memory 5 through the memory control unit 6. The bit stream output unit 4 reads out the encoded image data from the memory 5 via the memory control unit 6 and performs processing to output it to the outside.
[0039]
The memory control unit 6 including the present invention is configured by pipeline-structured hardware, and a processing unit that generates data transfer by interaction with the outside, such as the image input unit 1 and the bitstream output unit 4, A process of providing efficient data transfer is performed on a processing unit that generates data transfer in synchronization with the processing of the macroblock, such as the filter unit 2 and the encoding core unit 3-i.
[0040]
In order to realize this processing, the memory control unit 6 including the present invention includes a data transfer instruction issuing unit 60 including a transfer sequence holding register 61, an execution cycle number managing unit 62, and an input / output execution interval maximum value management. Means 63, input / output elapsed cycle number counting means 64, execution instruction determination means 65, address calculation means 66, and data transfer means 67 are provided.
[0041]
As shown in FIG. 2, the transfer sequence holding register 61 includes a data transfer command (Trans1) that controls data transfer between the filter unit 2 and the memory 5, and each encoding core unit 3-i and the memory 5. Data transfer command for managing data transfer between the coding core unit 3-1, Trans2, Trans3, Trans4,..., Coding core unit 3-N, Transz-2, Transz-1, Transz) And enumeration data (which will constitute a transfer sequence).
[0042]
As shown in FIG. 3, the data transfer command issuing means 60 sends data between the filter unit 2 and the memory 5 to the execution command determining means 65 in accordance with the transfer sequence held in the transfer sequence holding register 61. The memory 5 and the filter unit 2 are issued by sequentially issuing a data transfer command that controls the transfer and a data transfer command that controls the data transfer between each encoding core unit 3-i and the memory 5 according to a cyclic format. / A series of data transfer instructions for N macroblock processing generated between the encoding core unit 3-i is issued.
[0043]
  As shown in FIG. 2, the execution cycle number management means 62 associates each data transfer instruction held in the transfer sequence holding register 61 with the number of execution cycles of the data transfer instruction.(Fixed value set in advance)Manage.
[0044]
The input / output execution interval maximum value management means 63 determines how many cycles the maximum value of the data transfer interval generated between the image input unit 1 and the memory 5 limited by the capacity of the buffer 10 of the image input unit 1 is. And information on how many cycles the maximum value of the data transfer interval generated between the bit stream output unit 4 and the memory 5 limited by the capacity of the buffer 40 of the bit stream output unit 4 is managed. To do.
[0045]
That is, with respect to a data transfer command (TransIn) that controls data transfer between the image input unit 1 and the memory 5, in order to prevent the buffer 10 of the image input unit 1 from overflowing, for example, it does not exceed 100 cycles. When the condition that it must be executed is imposed, as shown in FIG. 2, it is managed that the maximum value of the data transfer interval generated between the image input unit 1 and the memory 5 is 100 cycles. is there.
[0046]
For the data transfer instruction (TransBs) that controls data transfer between the bit stream output unit 4 and the memory 5, for example, the buffer 40 of the bit stream output unit 4 does not underflow, for example, exceeds 500 cycles. When the condition that it must be executed in such a way is imposed, the maximum value of the data transfer interval generated between the bit stream output unit 4 and the memory 5 is 500 cycles as shown in FIG. Is managed.
[0047]
The input / output elapsed cycle number counting means 64 counts the number of elapsed cycles since the end of each data transfer of the image input unit 1 / bitstream output unit 4 that performs data transfer not synchronized with the macroblock, The number of cycles (RTransIn) that have elapsed since the end of the data transfer instruction (TransIn) that controls data transfer between the image input unit 1 and the memory 5 is counted and held, and the bitstream output unit 4 and the memory 5 Count the number of cycles (RTransBs) that have elapsed since the end of the data transfer instruction (TransBs) that controls data transfer to and hold it.
[0048]
That is, the input / output elapsed cycle number counting means 64, as shown in FIG. 4, is the number of elapsed cycles (RTransIn) from the end of the data transfer instruction (TransIn) that controls data transfer between the image input unit 1 and the memory 5. When the data transfer instruction starts execution, the value of the counter 640 is reset. When the data transfer instruction finishes execution, the counter 640 is incremented by one every time one cycle elapses. By incrementing, the number of elapsed cycles (RTransIn) from the end of the data transfer instruction is counted.
[0049]
Then, as shown in FIG. 4, the input / output elapsed cycle number counting means 64 counts the number of elapsed cycles (RTransBs) from the end of the data transfer instruction (TransBs) that controls data transfer between the bit stream output unit 4 and the memory 5. ) Is counted, and when the execution of the data transfer instruction starts, the value of the counter 641 is reset. When the execution of the data transfer instruction ends, the value of the counter 641 is set to 1 every time one cycle elapses. By incrementing it, the number of elapsed cycles (RTransBs) from the end of the data transfer instruction is counted.
[0050]
The execution instruction determination unit 65 includes a data transfer instruction issued by the data transfer instruction issue unit 60, the number of execution cycles of the data transfer instruction acquired from the execution cycle number management unit 62, and an input / output execution interval maximum value management unit 63. The data transfer instruction to be executed next is determined using the maximum value of the data transfer interval acquired from the above and the elapsed cycle number counted by the input / output elapsed cycle number counting means 64 as inputs.
[0051]
The address calculation means 66 receives the data transfer instruction determined by the execution instruction determination means 65 as input, performs address calculation designated by the data transfer instruction, and inputs the address to the memory 5.
[0052]
The data transfer means 67 executes data transfer between the image input unit 1 / filter unit 2 / encoding core unit 3-i / bitstream output unit 4 and the memory 5 in synchronization with the address input to the memory 5. To do.
[0053]
Next, a process executed by the memory control unit 6 having the present invention configured as described above will be described in detail with reference to FIG.
[0054]
Upon receiving the data transfer instruction (Transp (p = 1 to z)) issued by the data transfer instruction issuing means 60, the execution instruction determining means 65 receives the data from the execution cycle number management means 62 as shown in FIG. The number of execution cycles (Sp) of the transfer instruction (Transp) is acquired.
[0055]
At this time, the execution instruction determination unit 65 further obtains the maximum value (MaxIn) / maximum value (MaxBs) of the data transfer interval from the input / output execution interval maximum value management unit 63 and also counts the number of input / output elapsed cycles. From 64, the number of elapsed cycles (RTransIn) / the number of elapsed cycles (RTransBs) is acquired.
[0056]
Subsequently, the execution instruction determination means 65 firstly
RTransIn + Sp> MaxIn
If this condition is satisfied and it is determined that this condition is satisfied, data transfer between the image input unit 1 and the memory 5 is governed as a data transfer command to be executed next. Determine the data transfer instruction (TransIn).
[0057]
That is, when the data transfer instruction (Transp) issued by the data transfer instruction issuing means 60 is selected as the next data transfer instruction to be executed, the number of elapsed cycles (RTransIn) exceeds the maximum value (MaxIn) of the data transfer interval. In this case, a data transfer instruction (TransIn) that controls data transfer between the image input unit 1 and the memory 5 is selected as a data transfer instruction to be executed next.
[0058]
At this time, since the data transfer instruction (Transp) issued by the data transfer instruction issuing means 60 is put on hold, the data transfer instruction issuing means 60 is not notified that the data transfer instruction has been accepted. The instruction issuing means 60 enters a waiting state for issuing the next data transfer instruction.
[0059]
On the other hand, the execution instruction determination means 65
RTransIn + Sp> MaxIn
If it is determined that the above condition does not hold,
RTransBs + Sp> MaxBs
If this condition is satisfied and it is determined that this condition is satisfied, data transfer between the bit stream output unit 4 and the memory 5 is performed as a data transfer instruction to be executed next. Determine the data transfer command (TransBs) to be controlled.
[0060]
That is, when the data transfer instruction (Transp) issued by the data transfer instruction issuing means 60 is selected as the next data transfer instruction to be executed, the number of elapsed cycles (RTransBs) exceeds the maximum value (MaxBs) of the data transfer interval. In this case, a data transfer instruction (TransBs) that controls data transfer between the bit stream output unit 4 and the memory 5 is selected as a data transfer instruction to be executed next.
[0061]
At this time, since the data transfer instruction (Transp) issued by the data transfer instruction issuing means 60 is put on hold, the data transfer instruction issuing means 60 is not notified that the data transfer instruction has been accepted. The instruction issuing means 60 enters a waiting state for issuing the next data transfer instruction.
[0062]
On the other hand, the execution instruction determination means 65
RTransBs + Sp> MaxBs
When it is determined that the above condition is not satisfied, the data transfer instruction (Transp) issued by the data transfer instruction issuing means 60 is determined as the data transfer instruction to be executed next.
[0063]
At this time, the data transfer command issuing unit 60 is notified that the data transfer command has been accepted, and the data transfer command issuing unit 60 issues the next data transfer command.
[0064]
In this way, the execution instruction determination means 65 gives the data transfer instruction (Transp) issued by the data transfer instruction issue means 60 while efficiently advancing the macroblock processing by giving priority to data transfer for macroblock processing. If the buffer 10 of the image input unit 1 overflows when selected, a data transfer command (TransIn) that controls data transfer between the image input unit 1 and the memory 5 is selected. When the data transfer instruction (Transp) issued by the issuing means 60 is selected, when the buffer 40 of the bitstream output unit 4 underflows, the data that controls the data transfer between the bitstream output unit 4 and the memory 5 Processing is performed to select a transfer command (TransBs).
[0065]
Here, the determination of “RTransIn + Sp> MaxIn” is given priority over the determination of “RTransBs + Sp> MaxBs” because the buffer 10 of the image input unit 1 overflows and the input image is lost, which directly leads to image quality degradation. On the other hand, even if there is no bit stream that can be output when the buffer 40 of the bit stream output unit 4 underflows, it can be avoided to some extent by inserting null packets.
[0066]
From this, the execution instruction determination means 65 first determines “RTransIn + Sp> MaxIn” and then determines “RTransBs + Sp> MaxBs” to determine the data transfer instruction to be executed next. .
[0067]
When the execution instruction determination unit 65 determines the data transfer instruction to be executed next, the address calculation unit 66 receives the data transfer instruction determined by the execution instruction determination unit 65 and performs address calculation designated by the data transfer instruction. The address is input to the memory 5, and in response to this, the data transfer means 67 is connected between the image input unit 1 / filter unit 2 / encoding core unit 3 -i / bitstream output unit 4 and the memory 5. Execute data transfer.
[0068]
Thus, according to the memory control unit 6 having the present invention, it is possible to avoid overflow of the buffer 10 of the image input unit 1 and to avoid underflow of the buffer 40 of the bitstream output unit 4. As a result, the capacity of the buffers 10 and 40 need not be given more than necessary, so that the capacity of the buffers 10 and 40 can be reduced.
[0069]
Then, according to the memory control unit 6 including the present invention, the data transfer is executed in the form of giving priority to the instruction that controls the data transfer between the filter unit 2 / encoding core unit 3-i and the memory 5. Thus, it becomes possible to efficiently process the macroblock.
[0070]
According to the memory control unit 6 including the present invention, the image data is input to the buffer 10 until the buffer 10 of the image input unit 1 overflows, and the buffer 40 of the bit stream output unit 4 Since processing is performed such that image data is output from the buffer 40 until immediately before an underflow occurs, the number of data transfers between the image input unit 1 and the memory 5 can be reduced, and the bit stream output unit 4 And the number of data transfers between the memory 5 can be reduced.
[0071]
As described above, the image input unit 1 performs processing to input image data given from the outside. In addition, for example, reduced image data of the input image data is created and stored in the memory 5. A process such as Further, when inputting a color image, a process of inputting image data relating to brightness and image data relating to luminance separately to the memory 5 is performed.
[0072]
From now on, there are a plurality of types of data transfer commands such as a data transfer command (TransIn ') and a data transfer command (TransIn' ') as data transfer commands for controlling data transfer between the image input unit 1 and the memory 5. There are things to do. In such a case, separate buffers 10 are prepared.
[0073]
In such a case, as shown in FIG. 6, the execution instruction determination means 65 executes the execution process 1 for executing the same procedure as that shown in FIG. 5 (so that no overflow or underflow occurs in all buffers). When selecting a data transfer instruction that controls data transfer between the image input unit 1 and the memory 5 in accordance with a process of selecting a data transfer instruction in a form that gives priority to a data transfer instruction related to macroblock processing) As shown in the execution process 2, the plurality of types of data transfer instructions (TransIn ′ and TransIn ″) are processed in order.
[0074]
Here, in such a case, as shown in FIG. 6, the maximum value of each data transfer interval is managed by the input / output execution interval maximum value managing means 63 and the input / output elapsed cycle is managed. The number counting means 64 counts the number of elapsed cycles from the end of each data transfer instruction.
[0075]
In FIG. 2, for the sake of general explanation, it has been described that the data transfer command of each encoding core unit 3-i is different, but in reality, each encoding core unit 3-i is the same. As shown in FIG. 7, the data transfer instruction of the encoding core unit 3-1 is also Trans2, Trans3, Trans4, and the data transfer instruction of the encoding core unit 3-2 is also Trans2, Trans3, as shown in FIG. , Trans4,..., And the data transfer command of each encoding core unit 3-i is the same as the data transfer command of the encoding core unit 3-N is also Trans2, Trans3, Trans4. It becomes.
[0076]
In this case, the transfer sequence holding register 61, as shown in FIG. 7, has a data transfer instruction (Trans1) that controls data transfer between the filter unit 2 and the memory 5, and a common data transfer instruction (Trans2). , Trans3, Trans4), it is sufficient to hold the list data.
[0077]
That is, as shown in FIG. 8, the data transfer command issuing means 60 issues a data transfer command (Trans1) and then transfers the data transfer commands (Trans2, Trans3, Trans4) in the order of “Trans2 → Trans3 → Trans4”. The transfer sequence holding register 61 “Trans1, Trans2, Trans3, Trans4” is issued by repeating the process of repeatedly issuing the data transfer instruction (Trans1) N times and then issuing the data transfer instruction (Trans1) again. This is because it will be sufficient to hold a small number of data transfer instructions.
[0078]
According to this configuration, there is an advantage that the transfer sequence holding register 61 can be made small.
[0079]
When the data transfer instruction issuing means 60 uses such a data transfer instruction issuing form, the address calculating means 66 determines the slice number and macroblock for each data transfer according to the number of repetitions in the data transfer instruction issuing means 60. The address is calculated by changing the number.
[0080]
FIG. 9 shows another embodiment of the moving picture encoding apparatus provided with the present invention.
[0081]
In this embodiment, when the execution instruction determining means 65 determines the data transfer instruction (Transp) issued by the data transfer instruction issuing means 60 as the data transfer instruction to be executed next, the data transfer instruction (Transp) In view of the fact that the system is in a waiting state, the purpose is to reduce the useless overhead caused by such a waiting state.
[0082]
In the case of this embodiment, the memory control unit 6 includes an execution instruction final determination unit 68 that performs a process of finally determining a data transfer instruction to be executed next with the data transfer instruction determined by the execution instruction determination unit 65 as an input. The structure is taken.
[0083]
The execution instruction final decision means 68 is used when the execution instruction decision means 65 decides the data transfer instruction (Transp) issued by the data transfer instruction issue means 60 as the data transfer instruction to be executed next. When (Transp) is in a waiting state, a data transfer command (TransIn) that controls data transfer between the image input unit 1 and the memory 5 or data that controls data transfer between the bitstream output unit 4 and the memory 5 One of the transfer instructions (TransBs) is finally determined as a data transfer instruction to be executed next and inputted to the address calculating means 66.
[0084]
For example, as shown in FIG. 10, when the data transfer command (TransIn) that controls data transfer between the image input unit 1 and the memory 5 is finally determined as the data transfer command to be executed next, as shown in FIG. The data transfer instruction (TransBs) that controls the data transfer between the bit stream output unit 4 and the memory 5 is finally determined as the data transfer instruction to be executed next, and conversely, the bit stream output unit 4 and the memory 5 If the data transfer command (TransBs) that controls the data transfer between the image input unit 1 and the memory 5 is determined this time as the data transfer command to be executed next, the data transfer command that controls the data transfer between the image input unit 1 and the memory 5 this time (TransIn) is finally determined as a data transfer instruction to be executed next.
[0085]
Alternatively, as shown in FIG. 11, “MaxIn−RTransIn” is calculated for the data transfer instruction (TransIn) that controls data transfer between the image input unit 1 and the memory 5, and the bitstream output unit 4 and the memory 5 By calculating “MaxBs − RTransBs” for the data transfer instruction (TransBs) that controls the data transfer between and The data transfer instruction to be executed next is finally determined.
[0086]
By providing the execution instruction final decision means 68, it is possible to reduce useless overhead caused by the waiting state of the transfer sequence.
[0087]
Although the present invention has been described according to the illustrated embodiment, the present invention is not limited to this. For example, in the embodiment, the present invention has been described according to the embodiment applied to the moving image encoding apparatus, but the present invention is not limited to the moving image encoding apparatus.
[0088]
【The invention's effect】
  As described above, according to the present invention, the input unit that inputs processing data and writes it to the memory, the processing unit that performs predetermined processing on the processing data stored in the memory, and the processing that is stored in the memory. Used in a processing apparatus having an output unit for outputting processed data and controlling the data transfer between each unit and the memory, and overflowing the buffer of the input unitOccurrence ofTheDrasticallyIt can be avoided and the buffer underflow of the output partOccurrence ofTheDrasticallyAs a result, it is not necessary to give the buffer capacity more than necessary, so that the buffer capacity can be reduced.
[0089]
According to the present invention, data transfer is executed with priority given to a data transfer instruction that controls data transfer between the processing unit and the memory, so that the buffer of the input unit is stored in the buffer until immediately before the buffer overflows. Processing data is input and processing data is output from the buffer until the buffer of the output unit immediately underflows, so that the number of data transfers between the input unit and the memory can be reduced. In addition, the number of data transfers between the output unit and the memory can be reduced.
[0090]
According to the present invention, when a data transfer instruction that controls data transfer between the processing unit and the memory is repeatedly issued, it is possible to reduce the amount of memory that specifies the transfer sequence.
[0091]
According to the present invention, it is possible to reduce useless overhead that occurs due to a wait state of a data transfer instruction that controls data transfer between the processing unit and the memory.
[Brief description of the drawings]
FIG. 1 is an example of an embodiment of a moving image encoding apparatus provided with the present invention.
FIG. 2 is an explanatory diagram of a transfer sequence held by a transfer sequence holding register.
FIG. 3 is an explanatory diagram of an execution process of a data transfer instruction issuing unit.
FIG. 4 is an explanatory diagram of an execution process of an input / output elapsed cycle number counting unit.
FIG. 5 is an explanatory diagram of an execution process of an execution instruction determination unit.
FIG. 6 is an explanatory diagram of an execution process of an execution instruction determination unit.
FIG. 7 is an explanatory diagram of a data transfer instruction of an encoding core unit.
FIG. 8 is an explanatory diagram of an execution process of a data transfer instruction issuing unit.
[Fig. 9] Fig. 9 is another example of a moving image encoding apparatus according to the present invention.
FIG. 10 is an explanatory diagram of an execution process of an execution instruction final determination unit.
FIG. 11 is an explanatory diagram of an execution process of an execution instruction final determination unit.
FIG. 12 is an explanatory diagram of a device configuration of a video encoding device.
FIG. 13 is an explanatory diagram of processing of a conventional video encoding device.
[Explanation of symbols]
1 Image input section
2 Filter section
3 Coding core part
4-bit stream output section
5 memory
6 Memory controller
10 buffers
40 buffers
60 Data transfer command issuing means
61 Transfer sequence holding register
62 Execution cycle number management means
63 I / O execution interval maximum value management means
64 I / O elapsed cycle number counting means
65 Execution instruction determination means
66 Address calculation means
67 Data transfer means

Claims (8)

処理データを入力してメモリに書き込む入力部と、該メモリに記憶される処理データに所定の処理を施す1つ又は複数の処理部と、該メモリに記憶される処理の施された処理データを出力する出力部とを備える処理装置で用いられて、それらの各部と該メモリとの間のデータ転送を制御するメモリ制御装置であって、
上記メモリと上記処理部との間に発生する一連のデータ処理用データ転送命令を規定の順序に従って発行する発行手段と、
上記入力部の持つバッファ容量から制限される上記入力部と上記メモリとの間に発生するデータ転送間隔の最大値である入力側最大値と、上記出力部の持つバッファ容量から制限される上記出力部と上記メモリとの間に発生するデータ転送間隔の最大値である出力側最大値とを記憶する第1の記憶手段と、
上記入力部と上記メモリとの間の外部とのインタラクションで発生するデータ転送を司るデータ入力用データ転送命令の終了からの経過サイクル数である入力側経過サイクル数と、上記出力部と上記メモリとの間の外部とのインタラクションで発生するデータ転送を司るデータ出力用データ転送命令の終了からの経過サイクル数である出力側経過サイクル数とを計数する計数手段と、
上記データ処理用データ転送命令のそれぞれについて、予め設定される固定値の実行サイクル数を記憶する第2の記憶手段と、
上記第2の記憶手段から上記発行手段の発行したデータ処理用データ転送命令の実行サイクル数を取得して、その取得した実行サイクル数と上記入力側経過サイクル数との加算値を算出し、その加算値が上記入力側最大値を超えるのか否かを判断して、超える場合には、上記データ入力用データ転送命令を次に実行するデータ転送命令として決定し、超えない場合には、続いて、その取得した実行サイクル数と上記出力側経過サイクル数との加算値を算出し、その加算値が上記出力側最大値を超えるのか否かを判断して、超える場合には、上記データ出力用データ転送命令を次に実行するデータ転送命令として決定し、超えない場合には、上記発行手段の発行したデータ処理用データ転送命令を次に実行するデータ転送命令として決定する決定手段と、
上記発行手段の発行したデータ処理用データ転送命令が次に実行するデータ転送命令として決定される場合にあって、そのデータ処理用データ転送命令が待ち状態にある場合には、上記データ入力用データ転送命令、あるいは、上記データ出力用データ転送命令を次に実行するデータ転送命令として最終決定する最終決定手段とを備えることを、
特徴とするメモリ制御装置。
An input unit that inputs processing data and writes it to the memory, one or a plurality of processing units that perform predetermined processing on the processing data stored in the memory, and processed data that has been subjected to processing stored in the memory A memory control device used in a processing device including an output unit for outputting and controlling data transfer between each of the units and the memory,
Issuing means for issuing a series of data processing data transfer instructions generated between the memory and the processing unit according to a prescribed order;
The input side maximum value which is the maximum value of the data transfer interval generated between the input unit and the memory limited by the buffer capacity of the input unit, and the output limited by the buffer capacity of the output unit A first storage means for storing an output side maximum value, which is a maximum value of a data transfer interval generated between the storage unit and the memory,
An input side elapsed cycle number that is an elapsed cycle number from the end of a data transfer instruction for data input that controls data transfer generated by an external interaction between the input unit and the memory; the output unit and the memory; Counting means for counting the number of output-side elapsed cycles, which is the number of elapsed cycles from the end of the data transfer instruction for data output that governs the data transfer that occurs in the interaction with the outside between,
For each of the data processing data transfer instruction, a second storage means for storing the number of execution cycles of preset by a fixed value,
Obtaining the number of execution cycles of the data processing data transfer instruction issued by the issuing means from the second storage means, calculating the added value of the number of execution cycles acquired and the number of input side elapsed cycles, It is determined whether or not the added value exceeds the maximum value on the input side. If it exceeds, the data transfer instruction for data input is determined as a data transfer instruction to be executed next. , Calculate the added value of the obtained number of execution cycles and the output side elapsed cycle number, determine whether the added value exceeds the output side maximum value, and if so, for the data output The data transfer instruction is determined as the next data transfer instruction to be executed. If not exceeded, the data processing data transfer instruction issued by the issuing means is determined as the next data transfer instruction to be executed. And means,
When the data transfer command for data processing issued by the issuing means is determined as a data transfer command to be executed next and the data transfer data transfer command is in a wait state, the data input data Including a transfer instruction or a final determination means for finally determining the data output instruction for data output as a data transfer instruction to be executed next .
A memory control device.
請求項1に記載のメモリ制御装置において、
上記発行手段は、複数のデータ処理用データ転送命令の組み合わせを繰り返し発行する場合には、その組み合わせのデータ処理用データ転送命令の転送シーケンスを保持するメモリ域をサイクリックに参照することで、その組み合わせのデータ処理用データ転送命令を繰り返し発行することを、
特徴とするメモリ制御装置。
The memory control device according to claim 1.
The issuing means, when repeatedly issuing a combination of a plurality of data processing data transfer instructions, cyclically refers to the memory area holding the transfer sequence of the data processing data transfer instructions of the combination, Issuing repeated data transfer instructions for combined data processing,
A memory control device.
請求項に記載のメモリ制御装置において、
上記最終決定手段は、前回に上記データ入力用データ転送命令を次に実行するデータ転送命令として最終決定した場合には、今回は上記データ出力用データ転送命令を次に実行するデータ転送命令として最終決定し、一方、前回に上記データ出力用データ転送命令を次に実行するデータ転送命令として最終決定した場合には、今回は上記データ入力用転送命令を次に実行するデータ転送命令として最終決定することを、
特徴とするメモリ制御装置。
The memory control device according to claim 1 .
If the data input instruction for data input is finally determined as the next data transfer instruction to be executed next, the final determining means finally determines the data transfer instruction for data output as the data transfer instruction to be executed next. On the other hand, if the data output instruction for data output is finally determined as the next data transfer instruction to be executed last time, the data input transfer instruction is finally determined as the data transfer instruction to be executed next time. That
A memory control device.
請求項に記載のメモリ制御装置において、
上記最終決定手段は、上記入力側最大値と上記入力側経過サイクル数との差分値と、上記出力側最大値と上記出力側経過サイクル数との差分値とを求めて、小さな値を示す方の差分値を特定し、その特定した差分値が上記入力側最大値と上記入力側経過サイクル数との差分値である場合には、上記データ入力用データ転送命令を次に実行するデータ転送命令として最終決定し、一方、その特定した差分値が上記出力側最大値と上記出力側経過サイクル数との差分値である場合には、上記データ出力用データ転送命令を次に実行するデータ転送命令として最終決定することを、
特徴とするメモリ制御装置。
The memory control device according to claim 1 .
The final determining means obtains a difference value between the input side maximum value and the input side elapsed cycle number and a difference value between the output side maximum value and the output side elapsed cycle number, and indicates a smaller value. If the difference value is the difference value between the maximum value on the input side and the number of elapsed cycles on the input side, a data transfer instruction for executing the data transfer instruction for data input next On the other hand, if the specified difference value is a difference value between the output side maximum value and the output side elapsed cycle number, the data transfer instruction for executing the data output data transfer instruction next is executed. As the final decision,
A memory control device.
処理データを入力してメモリに書き込む入力部と、該メモリに記憶される処理データに所定の処理を施す1つ又は複数の処理部と、該メモリに記憶される処理の施された処理データを出力する出力部とを備える処理装置で用いられて、それらの各部と該メモリとの間のデータ転送を制御するメモリ制御方法であって、
上記メモリと上記処理部との間に発生する一連のデータ処理用データ転送命令を規定の順序に従って発行する第1の過程と、
上記入力部の持つバッファ容量から制限される上記入力部と上記メモリとの間に発生するデータ転送間隔の最大値である入力側最大値と、上記出力部の持つバッファ容量から制限される上記出力部と上記メモリとの間に発生するデータ転送間隔の最大値である出力側最大値とを記憶する第1の記憶手段から、該入力側最大値及び該出力側最大値を取得する第2の過程と、
上記入力部と上記メモリとの間の外部とのインタラクションで発生するデータ転送を司るデータ入力用データ転送命令の終了からの経過サイクル数である入力側経過サイクル数と、上記出力部と上記メモリとの間の外部とのインタラクションで発生するデータ転送を司るデータ出力用データ転送命令の終了からの経過サイクル数である出力側経過サイクル数とを計数する第3の過程と、
上記データ処理用データ転送命令のそれぞれについて、予め設定される固定値の実行サイクル数を記憶する第2の記憶手段から、上記発行したデータ処理用データ転送命令の実行サイクル数を取得する第4の過程と、
上記第2の記憶手段から取得した実行サイクル数と上記入力側経過サイクル数との加算値を算出し、その加算値が上記入力側最大値を超えるのか否かを判断して、超える場合には、上記データ入力用データ転送命令を次に実行するデータ転送命令として決定し、超えない場合には、続いて、その取得した実行サイクル数と上記出力側経過サイクル数との加算値を算出し、その加算値が上記出力側最大値を超えるのか否かを判断して、超える場合には、上記データ出力用データ転送命令を次に実行するデータ転送命令として決定し、超えない場合には、上記発行したデータ処理用データ転送命令を次に実行するデータ転送命令として決定する第5の過程と、
上記発行したデータ処理用データ転送命令が次に実行するデータ転送命令として決定される場合にあって、そのデータ処理用データ転送命令が待ち状態にある場合には、上記データ入力用データ転送命令、あるいは、上記データ出力用データ転送命令を次に実行するデータ転送命令として最終決定する第6の過程とを備えることを、
特徴とするメモリ制御方法。
An input unit that inputs processing data and writes it to the memory, one or a plurality of processing units that perform predetermined processing on the processing data stored in the memory, and processed data that has been subjected to processing stored in the memory A memory control method for controlling data transfer between each of the units and the memory used in a processing device including an output unit for outputting,
A first process of issuing a series of data processing data transfer instructions generated between the memory and the processing unit in a prescribed order;
The input side maximum value which is the maximum value of the data transfer interval generated between the input unit and the memory limited by the buffer capacity of the input unit, and the output limited by the buffer capacity of the output unit A second storage unit for acquiring the input-side maximum value and the output-side maximum value from a first storage unit that stores an output-side maximum value that is a maximum value of a data transfer interval that occurs between the memory and the memory. Process,
An input side elapsed cycle number that is an elapsed cycle number from the end of a data transfer instruction for data input that controls data transfer generated by an external interaction between the input unit and the memory; the output unit and the memory; A third step of counting the number of output-side elapsed cycles, which is the number of cycles elapsed since the end of the data transfer instruction for data output, which controls data transfer generated by external interaction between
For each of the data processing data transfer instruction from the second storage means for storing the number of execution cycles The preset fixed value, the fourth to get the number of execution cycles the issued data processing data transfer instruction And the process
If the sum of the number of execution cycles acquired from the second storage means and the number of elapsed cycles on the input side is calculated, it is determined whether or not the sum exceeds the maximum value on the input side. The data input instruction for data input is determined as a data transfer instruction to be executed next, and if it does not exceed, subsequently, an addition value between the acquired execution cycle number and the output side elapsed cycle number is calculated, It is determined whether or not the added value exceeds the maximum value on the output side, and if it exceeds, the data output instruction for data output is determined as a data transfer instruction to be executed next. A fifth step of determining the issued data transfer command for data processing as a data transfer command to be executed next ;
If the issued data processing data transfer instruction is determined as a data transfer instruction to be executed next, and the data processing data transfer instruction is in a wait state, the data input data transfer instruction, Or a sixth step of finally determining the data transfer instruction for data output as a data transfer instruction to be executed next .
A memory control method.
請求項に記載のメモリ制御方法において、
上記第1の過程では、複数のデータ処理用データ転送命令の組み合わせを繰り返し発行する場合には、その組み合わせのデータ処理用データ転送命令の転送シーケンスを保持するメモリ域をサイクリックに参照することで、その組み合わせのデータ処理用データ転送命令を繰り返し発行することを、
特徴とするメモリ制御方法。
The memory control method according to claim 5 ,
In the first process, when a combination of a plurality of data processing data transfer instructions is repeatedly issued, the memory area holding the transfer sequence of the data processing data transfer instructions of the combination is cyclically referenced. , Repeatedly issuing data transfer data processing instructions for that combination,
A memory control method.
請求項に記載のメモリ制御方法において、
上記第6の過程では、前回に上記データ入力用データ転送命令を次に実行するデータ転送命令として最終決定した場合には、今回は上記データ出力用データ転送命令を次に実行するデータ転送命令として最終決定し、一方、前回に上記データ出力用データ転送命令を次に実行するデータ転送命令として最終決定した場合には、今回は上記データ入力用転送命令を次に実行するデータ転送命令として最終決定することを、
特徴とするメモリ制御方法。
The memory control method according to claim 5 ,
In the sixth process, when the data transfer instruction for data input is finally determined as the next data transfer instruction to be executed last time, the data transfer instruction for data output is set as the data transfer instruction to be executed next time this time. On the other hand, if the data transfer instruction for data output is finally determined as the data transfer instruction to be executed next, the data transfer instruction for data input is finally determined as the data transfer instruction to be executed next time. To do the
A memory control method.
請求項に記載のメモリ制御方法において、
上記第6の過程では、上記入力側最大値と上記入力側経過サイクル数との差分値と、上記出力側最大値と上記出力側経過サイクル数との差分値とを求めて、小さな値を示す方の差分値を特定し、その特定した差分値が上記入力側最大値と上記入力側経過サイクル数との差分値である場合には、上記データ入力用データ転送命令を次に実行するデータ転送命令として最終決定し、一方、その特定した差分値が上記出力側最大値と上記出力側経過サイクル数との差分値である場合には、上記データ出力用データ転送命令を次に実行するデータ転送命令として最終決定することを、
特徴とするメモリ制御方法。
The memory control method according to claim 5 ,
In the sixth process, a difference value between the input side maximum value and the input side elapsed cycle number and a difference value between the output side maximum value and the output side elapsed cycle number are obtained, and a small value is indicated. If the difference value is the difference value between the maximum value on the input side and the number of elapsed cycles on the input side, the data transfer to execute the data transfer instruction for data input next is performed. Data transfer that is finally determined as an instruction, and on the other hand, if the specified difference value is a difference value between the output side maximum value and the output side elapsed cycle number, the data output data transfer instruction is executed next. The final decision as an order,
A memory control method.
JP2003018405A 2003-01-28 2003-01-28 Memory control apparatus and method Expired - Lifetime JP4323174B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003018405A JP4323174B2 (en) 2003-01-28 2003-01-28 Memory control apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003018405A JP4323174B2 (en) 2003-01-28 2003-01-28 Memory control apparatus and method

Publications (2)

Publication Number Publication Date
JP2004234057A JP2004234057A (en) 2004-08-19
JP4323174B2 true JP4323174B2 (en) 2009-09-02

Family

ID=32948544

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003018405A Expired - Lifetime JP4323174B2 (en) 2003-01-28 2003-01-28 Memory control apparatus and method

Country Status (1)

Country Link
JP (1) JP4323174B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4991453B2 (en) * 2007-08-30 2012-08-01 キヤノン株式会社 Encoding processing device, encoding processing system, and control method of encoding processing device

Also Published As

Publication number Publication date
JP2004234057A (en) 2004-08-19

Similar Documents

Publication Publication Date Title
AU685098B2 (en) Video peripheral for a computer
CN108574843B (en) Determine the method and encoder system of the GOP length for Video coding
US8223845B1 (en) Multithread processing of video frames
JP4223567B2 (en) Coded video sequence switching method and apparatus
US7796692B1 (en) Avoiding stalls to accelerate decoding pixel data depending on in-loop operations
US8675740B2 (en) Hypothetical reference decoder
CN1125031A (en) Adaptive video compression using variable quantization
US6006020A (en) Video peripheral circuitry exercising bus master control over a bus of a host computer
JP2007189518A (en) Signal processing apparatus, imaging device, network camera system, and video system
WO2008015781A1 (en) Image processing device and electronic camera
JPH11298916A (en) Image processing unit
JP2009267837A (en) Decoding device
US9100653B2 (en) Memory transfer controller and method of transfer control of video line data and macroblock data
CN116563085B (en) Large-scale parallel processing method and system for offline rendering
US20100104010A1 (en) Real-time rate-control method for video encoder chip
JP4323174B2 (en) Memory control apparatus and method
JP5694674B2 (en) Image coding apparatus, image coding / decoding system, image coding method, and image display method
KR102312681B1 (en) System and Method of processing image
EP1134664B1 (en) Image processing device
JP2002027477A (en) Mpeg image processor and data transfer method for the same
CN108462877B (en) Residual error processing circuit and related residual error processing method
JP2006115168A (en) Image decoding apparatus and image display apparatus
JP3611941B2 (en) Image data decoding apparatus and image data decoding method
WO2006035438A1 (en) Media player and method for operating a media player
Cheng et al. High speed video compression testbed

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050126

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070524

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070703

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070903

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20070903

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080610

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080807

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: 20090602

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: 20090604

R150 Certificate of patent or registration of utility model

Ref document number: 4323174

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: 20120612

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130612

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140612

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