JP2006127280A - Memory management program and image display device - Google Patents
Memory management program and image display device Download PDFInfo
- Publication number
- JP2006127280A JP2006127280A JP2004316672A JP2004316672A JP2006127280A JP 2006127280 A JP2006127280 A JP 2006127280A JP 2004316672 A JP2004316672 A JP 2004316672A JP 2004316672 A JP2004316672 A JP 2004316672A JP 2006127280 A JP2006127280 A JP 2006127280A
- Authority
- JP
- Japan
- Prior art keywords
- image data
- image
- information amount
- unit
- memory management
- 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.)
- Pending
Links
Images
Abstract
Description
本発明は、画像データを表示する画像表示技術に関する。 The present invention relates to an image display technique for displaying image data.
計算機システムにおいて、作業メモリの管理は、アプリケーションプログラムの実行性能や信頼性を大きく左右する極めて重要な要素である。C言語は、ハードウェアの詳細な制御が可能であり、アプリケーションプログラムの実行性能を高めることができる場合がある反面、制御項目が多岐にわたり、ハードウェアを最適に制御することが難しい場合がある。例えば、C言語では、作業メモリの領域を使用した後には、使用した作業メモリの領域を明示的に開放する必要があり、この開放の処理が行われないアプリケーションプログラムが多く実行される場合には、作業メモリの空き領域の減少、いわゆるメモリ不足が起こり、システムの動作が不安定になる場合があった。また、PC(Personal Compuetr)等に比べて、CPUの処理速度や作業メモリの容量等が少ない組み込み機器においては、アプリケーションプログラムの実行性能を高める前に、少なくとも、限られたハードウェア資源を利用して確実に動作し続けることが要求されるため、作業メモリの管理が特に重要である。 In a computer system, management of working memory is an extremely important factor that greatly affects the execution performance and reliability of application programs. The C language can perform detailed control of hardware and can improve the execution performance of an application program. However, there are various control items, and it may be difficult to optimally control the hardware. For example, in the C language, after the working memory area is used, it is necessary to explicitly release the used working memory area. When many application programs that do not perform the releasing process are executed, In some cases, the operation of the system becomes unstable due to a decrease in free space in the working memory, a so-called memory shortage. Also, in embedded devices where the processing speed of the CPU and the capacity of the working memory are small compared to a PC (Personal Computer), etc., use at least limited hardware resources before increasing the performance of application programs. Management of working memory is particularly important because it is required to continue to operate reliably.
作業メモリの使用済み領域を開放し忘れることにより起こるメモリ不足を抑えるために、外部記憶装置に圧縮された状態で格納されているデータを作業メモリにロードする際に、データを圧縮した状態で作業メモリにロードし、実際に使用する段階でアプリケーションプログラムがロードしたデータを展開することにより、作業メモリにロードされるデータ量を削減する技術が知られている(例えば、特許文献1参照。)。 In order to suppress memory shortage caused by forgetting to free up used area of working memory, work with compressed data when loading data stored in compressed form in external storage device to working memory A technique for reducing the amount of data loaded into a working memory by loading data into a memory and expanding data loaded by an application program at the stage of actual use is known (see, for example, Patent Document 1).
しかし、特許文献1に記載の技術では、アプリケーションプログラムが実際に使用する段階でデータを展開する必要があり、データを処理するタイミングでCPUの処理負荷が増大する場合があった。また、特許文献1に記載の技術では、圧縮されたデータを展開するための領域が作業メモリ内に必要となり、必要となる領域は展開すべきデータに依存することから、全てのデータの展開に対応できるように十分に大きな領域を確保する必要があり、作業用メモリの使用効率が低下する場合があった。 However, in the technique described in Patent Document 1, it is necessary to develop data when it is actually used by an application program, and the processing load on the CPU may increase at the timing of processing the data. In the technique described in Patent Document 1, an area for expanding compressed data is required in the working memory, and the required area depends on the data to be expanded. It was necessary to secure a sufficiently large area to cope with it, and the use efficiency of the working memory might be reduced.
そこで本発明は、上記の課題を解決することのできるメモリ管理プログラムおよび画像表示装置を提供することを目的とする。例えば、作業メモリ上のデータのサイズを小さすると共に、アプリケーションプログラムが作業メモリ上のデータを使用する場合に、CPUの処理負荷の増加を低く抑えるようにする。 SUMMARY An advantage of some aspects of the invention is that it provides a memory management program and an image display apparatus that can solve the above-described problems. For example, the size of the data on the working memory is reduced, and when the application program uses the data on the working memory, an increase in the processing load on the CPU is kept low.
上記課題を解決するために、本発明のメモリ管理プログラムは、ヒープ領域内にロードされた画像データが最後に参照されてからの経過時間である非参照期間が、予め定められた削減閾値以下の場合に、ヒープ領域内の当該画像データの情報量を削減する。 In order to solve the above problem, the memory management program of the present invention has a non-reference period, which is an elapsed time since the image data loaded in the heap area is last referred, equal to or less than a predetermined reduction threshold. In this case, the information amount of the image data in the heap area is reduced.
例えば、画像データをディスプレイに表示させる画像表示装置が有する作業メモリのヒープ領域を管理するメモリ管理プログラムであって、画像表示装置に、外部記憶装置から作業メモリのヒープ領域にロードされた画像データがアプリケーションプログラムによって最後に参照されてからの経過時間である非参照期間を計測する非参照期間計測手段と、非参照期間計測手段が計測した非参照期間が、予め定められた削減閾値以上の場合に、ヒープ領域内の画像データの情報量を削減する情報量削減手段とを実現させることを特徴とするメモリ管理プログラムを提供する。 For example, a memory management program for managing a heap area of a working memory included in an image display device that displays image data on a display, and image data loaded from an external storage device to a heap area of the working memory is stored in the image display device When the non-reference period measuring means for measuring the non-reference period, which is the elapsed time since the last reference by the application program, and the non-reference period measured by the non-reference period measuring means are greater than or equal to a predetermined reduction threshold The present invention provides a memory management program characterized by realizing an information amount reducing means for reducing the information amount of image data in a heap area.
本発明によれば、参照頻度の少ない画像データの情報量をメモリ上で削減することができるので、作業メモリの空き領域の減少を抑えることができる。 According to the present invention, the amount of information of image data with a low reference frequency can be reduced on the memory, so that it is possible to suppress a decrease in the free area of the working memory.
以下に、本発明の実施の形態を説明する。 Hereinafter, embodiments of the present invention will be described.
図1は、本発明の一実施形態に係る画像表示システム10のハードウェア構成の一例を示す。画像表示システム10は、ディスプレイ12および画像表示装置14を備える。ディスプレイ12は、LCD(Liquid Crystal Display)やCRT(Cathode Ray Tube)等のモニタであり、画像表示装置14が出力する画像データを表示する。
FIG. 1 shows an example of a hardware configuration of an
画像表示装置14は、作業メモリ140、ビデオメモリ142、HDD(Hard Disk Drive)等の外部記憶装置144、CPU146、およびバス148を備える。外部記憶装置144は、画像表示装置14を動作させるOS(Operating System)や、アプリケーションプログラム、OSやアプリケーションプログラムが取り扱う設定データおよび画像データ等を格納する。外部記憶装置144は、HDD以外に、ROMや着脱可能な記憶媒体等であってもよい。
The image display device 14 includes a
作業メモリ140は、外部記憶装置144に格納されたアプリケーションプログラムの中で、実行中のアプリケーションプログラムを保持する。また、作業メモリ140は、実行中のアプリケーションプログラムが使用する設定データおよび画像データ等を保持する。ビデオメモリ142は、実行中のOSやアプリケーションプログラムの動作に応じて、作業メモリ140が保持している画像データの中で、表示が必要となった画像データを保持する。ビデオメモリ142は、ディスプレイ12と接続されており、ビデオメモリ142に書き込まれた画像データは、ディスプレイ12に表示される。
The
CPU146は、外部記憶装置144に格納されたアプリケーションプログラムと共に、当該アプリケーションプログラムで使用される設定データや画像データを作業メモリ140のヒープ領域にロードし、当該アプリケーションプログラムを実行する。そして、CPU146は、当該アプリケーションプログラムの動作に応じて表示が必要となった画像データを、作業メモリ140のヒープ領域から読み出して、ビデオメモリ142へコピーすることにより、当該画像データをディスプレイ12に表示させる。バス148は、作業メモリ140、ビデオメモリ142、外部記憶装置144、およびCPU146を互いに接続する。
The
なお、本例において、画像データは圧縮された状態で外部記憶装置144内に格納されており、CPU146は、当該圧縮された画像データを作業メモリ140のヒープ領域にロードした後に、当該圧縮された画像データを展開して、作業メモリ140のヒープ領域に格納する。また、本例において、アプリケーションプログラムや画像データ等は、画像表示装置14内の外部記憶装置144に格納されているが、他の例として、画像表示装置14は、アプリケーションプログラムや画像データ等を、ネットワークを介して他の機器から取得してもよい。
In this example, the image data is stored in the
図2は、画像表示装置14の機能構成の一例を示すブロック図である。画像表示装置14は、表示制御部150、画像出力部152、画像取得部154、画像格納部156、記録媒体158およびメモリ管理部160を備える。画像格納部156は、OSやアプリケーションプログラムで使用される画像データを格納する。
FIG. 2 is a block diagram illustrating an example of a functional configuration of the image display device 14. The image display device 14 includes a
表示制御部150は、記録媒体158に格納されたOSやアプリケーションプログラムに基づいて動作し、当該アプリケーションプログラムで使用される画像データを画像格納部156から画像取得部154へロードさせる。そして、表示制御部150は、当該アプリケーションプログラムの動作に応じて、画像取得部154にロードさせた画像データの中でディスプレイ12に表示させるタイミングになった画像データを、画像取得部154から画像出力部152へコピーする。
The
画像取得部154は、実行中のアプリケーションプログラムが使用する画像データを画像格納部156から読み出して保持する。画像出力部152は、ディスプレイ12に表示させるタイミングの画像データを画像取得部154から取得し、ディスプレイ12に表示させる。メモリ管理部160は、画像取得部154が保持する画像データを管理し、アプリケーションプログラムによって最後に参照されてから所定時間以上経過した画像データの情報量を削減することにより、画像取得部154の空きメモリの容量を増加させる。
The
記録媒体158は、画像表示装置14に、表示制御部150、画像出力部152、画像取得部154、画像格納部156、およびメモリ管理部160として機能させるプログラムや、OS、アプリケーションプログラム、これらのプログラムで使用される設定データ等を格納する。記録媒体158は、例えばDVD、PD等の光学記録媒体、MD等の光磁気記録媒体、テープ媒体、磁気記録媒体、または半導体記録装置等であってよい。画像表示装置14は、これらのプログラムを、記録媒体158から読み取って実行する。また、画像表示装置14は、例えばインターネット網等の通信回線を介して、これらのプログラムを取得してもよい。また、記録媒体158に格納されており、画像表示装置14に、表示制御部150、画像出力部152、画像取得部154、画像格納部156、およびメモリ管理部160として機能させるプログラムは、Java言語で記述されることが好ましい。
The
図3は、画像格納部156に格納されるデータの構造の一例を示す。画像格納部156は、画像データ本体1562を、それぞれの画像データを識別する画像ID1560に対応付けて格納する。画像格納部156を参照することにより、画像取得部154は、それぞれの画像データを区別することができる。また、表示制御部150は、それぞれの画像データを、当該画像ID1560を用いて識別する。これにより、表示制御部150は、表示させるタイミングになった画像データを、画像取得部154から画像出力部152へコピーするように、画像取得部154へ指示することができる。
FIG. 3 shows an example of the structure of data stored in the
図4は、メモリ管理部160の機能構成の一例を示すブロック図である。メモリ管理部160は、参照情報格納部162、適用フラグ格納部164、非参照期間計測部166、画像サイズ検出部168、情報量削減部170、参照回数計数部172、および再ロード指示部174を備える。適用フラグ格納部164は、画像取得部154にロードされた後に、最後に画像出力部152へコピーされてから所定時間経過した場合に、当該画像データの情報量を削減するか否かを示す削減処理適用フラグを、画像データを識別する画像IDに対応付けて格納している。
FIG. 4 is a block diagram illustrating an example of a functional configuration of the
非参照期間計測部166は、画像データが画像格納部156から画像取得部154へロードされた場合に、画像取得部154へロードされた画像データの画像IDを参照して、当該画像IDに対応する削減処理適用フラグを適用フラグ格納部164から読み出す。そして、適用フラグ格納部164から読み出した削減処理適用フラグが、画像データの情報量を削減すべき旨を示す場合に、非参照期間計測部166は、対応する画像データがディスプレイ12に表示されるために画像取得部154から画像出力部152へ最後にコピーされてからの経過時間である非参照期間を計測し、計測した非参照時間を、対応する画像データの画像IDに対応付けて参照情報格納部162に格納する。
When the image data is loaded from the
画像サイズ検出部168は、画像取得部154にロードされた画像データの画像サイズを算出し、算出した画像サイズを、対応する画像データの画像IDに対応付けて参照情報格納部162に格納する。画像サイズ検出部168は、画像サイズとして、例えば、画像データのデータサイズを算出する。また、他の例として画像サイズ検出部168は、画像サイズとして、画像データの表示領域の大きさや、色の種類を算出してもよい。
The image
参照情報格納部162は、非参照期間計測部166が計測した非参照期間および画像サイズ検出部168が算出した画像サイズを、画像IDに対応付けて格納する。また、参照情報格納部162は、画像データに対してどのような情報量の削減処理が施されたかという情報、および画像データが最後に情報量を削減されてから、ディスプレイ12に表示されるために画像取得部154から画像出力部152へ何回コピーされたかという情報を、画像IDにさらに対応付けて格納する。
The reference
情報量削減部170は、参照情報格納部162に格納されたそれぞれの画像IDの非参照期間を参照し、予め定められた削減閾値以上の非参照期間が参照情報格納部162内に存在する場合、当該非参照期間に対応する画像データであって、画像取得部154内に存在する画像データの情報量を削減する。情報量削減部170は、参照情報格納部162内の画像サイズを参照して、画像サイズが予め定められたサイズ閾値よりも大きい場合、当該画像データに対して、より多くの情報量を削減する。情報量削減部170は、例えば、画像データの色の種類を減少させることにより、画像データの情報量を削減する。
The information
また他の例として、情報量削減部170は、画像データの輝度や解像度を減少させてもよい。画像データの解像度を減少させる場合、情報量削減部170は、例えば、隣接する4個の画素データを、当該4個の画素データの画像情報を平均した1個の平均画素データに変換することにより、画像データの画素数を半分に減少させてよい。この場合、情報量削減部170は、4個の画素データの輝度および色情報を平均化することにより、当該4個の画素データ30を1個の画素データ30に変換してよい。また、情報量削減部170は、隣接するx2個の画素データを1個の画素データに変換することにより、画素数を1/x倍に減少させてもよい。また、画像データが動画像である場合、情報量削減部170は、動画像データのフレーム数を減少させることにより、画像データの情報量を削減してもよい。
As another example, the information
また、情報量削減部170は、画像取得部154内の画像データの情報量を削減した場合に、参照情報格納部162に格納された参照回数であって、削減した画像データに対応する参照回数を0クリアする。さらに、情報量削減部170は、画像データが画像取得部154内にロードされた場合に、当該画像データの画像IDを参照し、対応する画像IDが参照情報格納部162内に存在するか否かを判定する。対応する画像IDが参照情報格納部162内に存在する場合、情報量削減部170は、当該画像IDに対応付けられている画像データに対して前回適用した削減処理を、画像取得部154内にロードされた画像データに対しても適用する。
In addition, when the information amount of the image data in the
参照回数計数部172は、情報量削減部170によって、情報量が削減された画像取得部154内の画像データの参照回数を計数し、計数した参照回数を対応する画像データの画像IDに対応付けて参照情報格納部162に格納する。
The reference
再ロード指示部174は、参照情報格納部162に格納された参照回数を参照して、当該参照回数が予め定められた回復閾値以上である場合に、当該参照回数の画像IDに対応する画像データを、画像取得部154に、画像格納部156からロードさせる。
The reload
図5は、参照情報格納部162に格納されるデータの構造の一例を示す。参照情報格納部162は、画像データがディスプレイ12に表示されるために画像取得部154から画像出力部152へ最後にコピーされてからの経過時間である非参照期間1622、画像サイズ1624、情報量が削減された後に、ディスプレイ12に表示されるために画像取得部154から画像出力部152へコピーされた回数である参照回数1626、および情報量削減部170によってどのような情報量の削減処理が施されたかを示す情報である適用削減処理1628を、画像データを識別する画像ID1620に対応付けて格納する。
FIG. 5 shows an example of the structure of data stored in the reference
図6は、画素データ30の情報量の削減処理の一例を説明するための概念図である。画像データは、例えば複数の画素データ30を有する。それぞれの画素データ30は、パディング31、R(赤)32、G(緑)33、およびB(青)34を有する。情報量削減部170は、参照情報格納部162に格納されたそれぞれの画像IDの非参照期間を参照し、非参照期間が削減閾値以上の画像データの情報量を削減する。この場合、情報量削減部170は、例えば、R32、G33、およびB34の下位3bitをそれぞれ削除し、1bitのパディング31を付加することにより、32bitの画素データ30の情報量を、16bitに削減する削減処理1を行う。
FIG. 6 is a conceptual diagram for explaining an example of the information amount reduction process of the
また、情報量削減部170は、前回削減した画像データの非参照期間が削減閾値以上となった場合に、例えば、R32、G33、およびB34の下位3bitをそれぞれ削除し、2bitのパディング31を付加することにより、16bitの画素データ30の情報量を、さらに8bitに削減する削減処理2を行う。このように、非参照期間が予め定められた削減閾値以上になった場合に、情報量削減部170は、画像取得部154内の対応する画像データの情報量を削減するので、作業メモリ140の空き領域の減少を抑えることができる。
Further, when the non-reference period of the previously reduced image data exceeds the reduction threshold, the information
なお、情報量削減部170は、参照情報格納部162内の画像サイズを参照して、削減対象の画像データの画像サイズが、予め定められたサイズ閾値以上の場合、初回の削減処理であっても、対応する32bitの画像データの情報量を8bitに削減してもよい。これにより、画像サイズの大きい画像データほど多くの情報を削減することができるので、作業メモリ140の空き領域を迅速に増加させることができる。
The information
また、情報量削減部170は、画像データ内の複数の画素データ30のそれぞれを1ずつ処理するので、CPU146のスタック領域やCPU146のレジスタ内で処理することができる。そのため、従来のように、作業メモリ140内に圧縮された画像データを格納し、表示する段階で展開してビデオメモリ142に書き込む構成と比較して、処理するための作業領域が小さくてすみ、ヒープ領域に特別な処理領域を設ける必要がない。従って、作業メモリ140の空き領域の減少を抑えることができる。
Further, since the information
また、情報量削減部170は、前回削減した画像データの非参照期間が削減閾値以上となった場合に、対応する画像データの情報量を削減するので、情報量が削減された画像データを表示する段階では、画像取得部154に格納された画像データをそのまま画像出力部152へコピーすればよい。そのため、従来のように、圧縮された画像データを作業メモリ140に格納し、表示する段階で対応する画像データを展開する場合に比べて、画像データを表示する段階でCPU146にかかる負荷が少ない。従って、画像データをより適切にディスプレイ12に表示させることができる。
In addition, the information
なお、画像出力部152は、情報量削減部170によって、例えば32bitから16または8bitに削減された画素データ30の色情報のそれぞれの下位ビットにパディングを挿入することによって、情報量が削減された画素データ30を32bitに補完する。これにより、画像出力部152は、情報量が削減された画素データ30であっても、色情報を削減されていない他の32bitの画素データ30と共にディスプレイ12に表示することができる。
The
また、他の例として、隣接するx2個の画素データを1個の画素データに変換することにより画素数を1/x倍に減少させた場合、画像出力部152は、それぞれの画素データをコピーすることにより同一の画素データをx2個生成し、生成した同一の画素データを隣接させて配置することにより、画素数が1/x倍に減少した画像データを、当該画像データの元の画素数でディスプレイ12に表示させてよい。
As another example, if the reduced number of pixels in 1 / x times by converting the adjacent x 2 pieces of pixel data in the one pixel data, the
図7は、適用フラグ格納部164に格納されるデータの構造の一例を示す。適用フラグ格納部164は、情報量の削減処理を対応する画像データに適用するか否かを示す適用フラグ1642を、画像データを識別する画像ID1640に対応付けて格納する。本例では、画像データに情報量の削減処理を適用する場合に、適用フラグ1642に1を格納する。
FIG. 7 shows an example of the structure of data stored in the application
このように、情報量の削減処理を適用するか否かを画像データ毎に設定するので、絵画等の色や解像度が問題となるような画像データに対して、情報量の削減処理を行わないようにすることができる。そのため、アプリケーションプログラムが提供するサービスに影響が少ない画像データに対してのみ削減処理を行うことができ、アプリケーションプログラムを使用するユーザに違和感を与えることなく、作業メモリ140の空き容量の減少を抑えることができる。
In this way, whether or not to apply the information amount reduction processing is set for each image data, so the information amount reduction processing is not performed on the image data in which the color or resolution of the painting is a problem. Can be. Therefore, reduction processing can be performed only on image data that does not affect the service provided by the application program, and the reduction in the free space in the
なお、本例では、画像データ毎に適用フラグ1642を設けたが、他の例として、アプリケーションプログラム毎に、適用フラグ1642を設けてもよい。これにより、画像編集アプリケーションプログラム等の画像データの品質が問題となるアプリケーションプログラムにおいて、当該アプリケーションプログラムが扱う全ての画像データに対して情報量の削減処理を禁止することができる。 In this example, the application flag 1642 is provided for each image data. However, as another example, the application flag 1642 may be provided for each application program. Thus, in an application program such as an image editing application program in which the quality of the image data is a problem, the information amount reduction process can be prohibited for all image data handled by the application program.
図8は、メモリ管理部160の動作の一例を示すフローチャートである。電源投入等の所定のタイミングで、本フローチャートに記載のメモリ管理部160の動作が始まる。まず、非参照期間計測部166および参照回数計数部172は、参照情報格納部162に格納される非参照期間および参照回数を0クリアする(S100)。
FIG. 8 is a flowchart illustrating an example of the operation of the
次に、表示制御部150は、記録媒体158に格納されたアプリケーションプログラムに従って動作し、画像データをディスプレイ12に表示させるタイミングか否かを判定する(S102)。画像データをディスプレイ12に表示させるタイミングでない場合(S102:No)、非参照期間計測部166は、画像取得部154内のヒープ領域にロードされている画像データに対応する非参照期間を更新する(S124)。次に、情報量削減部170は、参照情報格納部162に格納されたそれぞれの画像IDの非参照期間を参照し、非参照期間が予め定められた削減閾値以上の画像IDが参照情報格納部162内に存在するか否かを判定する(S126)。削減閾値以上の画像IDが参照情報格納部162内に存在しない場合(S126:No)、表示制御部150は、再びステップ102に示した処理を行う。なお、非参照期間計測部166は、ステップ124の処理を、例えば10ms等の所定の時間間隔で行う。
Next, the
ステップ102において、画像データをディスプレイ12に表示させるタイミングである場合(S102:Yes)、表示制御部150は、表示させる画像データを画像出力部152にコピーするよう画像取得部154に指示する。画像取得部154は、対応する画像データがヒープ領域にロードされているか否かを判定する(S104)。対応する画像データがヒープ領域にロードされていない場合(S104:No)、画像取得部154は、対応する画像データを画像格納部156から読み出してヒープ領域にロードする(S106)。次に、情報量削減部170は、画像取得部154にロードされた画像データの画像IDを参照し、対応する画像IDが参照情報格納部162内に存在するか否かを判定する(S108)。対応する画像IDが参照情報格納部162内に存在しない場合(S108:No)、表示制御部150は、再びステップ102に示した処理を行う。
If it is time to display the image data on the
ステップ108において、対応する画像IDが参照情報格納部162内に存在する場合(S108:Yes)、情報量削減部170は、当該画像IDに対応付けられている画像データに対して前回適用した削減処理を、画像取得部154内にロードされた画像データに対して適用した後(S110)、表示制御部150は、再びステップ102に示した処理を行う。
In
ステップ104において、対応する画像データがヒープ領域にロードされている場合(S104:Yes)、参照回数計数部172は、画像取得部154内にロードされている画像データの画像IDおよび参照情報格納部162に格納された適用削減処理を参照して、表示すべき画像データに削減処理が既に適用されているか否かを判定する(S112)。削減処理が適用されていない場合(S112:No)、非参照期間計測部166は、対応する画像IDの参照情報格納部162内の非参照期間を0クリアする(S112)。
In
ステップ112において、削減処理が既に適用されている場合(S112:Yes)、参照回数計数部172は、対応する画像データの参照回数を1増やす(S114)。そして、再ロード指示部174は、参照情報格納部162内の参照回数を参照して、対応する画像データの参照回数が、予め定められた回復閾値以上か否かを判定する(S116)。対応する画像データの参照回数が回復閾値未満である場合(S116:No)、非参照期間計測部166は、対応する画像IDの参照情報格納部162内の非参照期間を0クリアする(S112)。
In step 112, when the reduction process has already been applied (S112: Yes), the
ステップ116において、対応する画像データの参照回数が回復閾値以上である場合(S116:Yes)、再ロード指示部174は、画像取得部154に、対応する画像データを画像格納部156から再びロードするよう指示する。画像取得部154は、再ロード指示部174からの指示に応じて、画像データを画像格納部156から再ロードする(S118)。そして、再ロード指示部174は、参照情報格納部162に格納された参照回数であって、画像取得部154に再ロードさせた画像データに対応する参照回数を0クリアする(S120)。次に、非参照期間計測部166は、参照情報格納部162に格納された非参照期間であって、対応する画像データの非参照期間を0クリアし(S122)、表示制御部150は、再びステップ102に示した処理を行う。
If the reference count of the corresponding image data is greater than or equal to the recovery threshold value in step 116 (S116: Yes), the reload
ステップ126において、削減閾値以上の画像IDが参照情報格納部162内に存在する場合(S126:Yes)、情報量削減部170は、当該画像IDに対応する画像取得部154内の画像データの情報量を削減する(S128)。ステップ128において、情報量削減部170は、参照情報格納部162内の画像サイズを参照して、削減対象の画像データの画像サイズが、予め定められたサイズ閾値以上の場合、初回の削減処理であっても、対応する画像データに対して削減処理2を行う。またこの場合、参照情報格納部162を参照して、削減対象の画像データの画像サイズがサイズ閾値未満であって、かつ前回削減処理を施していない場合、例えば、削減対象の画像データが32bitであるとすると、情報量削減部170は、32bitの画像データを、16bitに削減することが好ましい。このように、段階的に画像データの情報量を削減することにより、ユーザに与える違和感を抑えることができる。また、他の例として、作業メモリ140の空き容量が予め定められた閾値よりも少なくなった場合、情報量削減部170は、画像データの情報量を削減する場合に、32bitの画像データであっても、16bitの画像データであっても、8bitに削減してもよい。これにより、作業メモリ140の空き容量を迅速に増やすことができる。
In step 126, when an image ID equal to or greater than the reduction threshold exists in the reference information storage unit 162 (S126: Yes), the information
画像データの情報量を削減した後、情報量削減部170は、参照情報格納部162に格納された適用削減処理であって、対応する画像データの適用削減処理を、施した削減処理で更新する(S130)。次に、再ロード指示部174は、参照情報格納部162に格納された参照回数であって、削減処理を施した画像データに対応する参照回数を0クリアし、非参照期間計測部166は、参照情報格納部162に格納された非参照期間であって、削減処理を施した画像データの非参照期間を0クリアし(S132)、表示制御部150は、再びステップ102に示した処理を行う。
After reducing the information amount of the image data, the information
上記説明から明らかなように、本実施形態のメモリ管理部160は、作業メモリ140内のデータのサイズを削減することにより、作業メモリ140の空き領域を増加させると共に、アプリケーションプログラムが作業メモリ140内のデータを使用する場合に、CPUの処理負荷の増加を低く抑えることができる。
As is clear from the above description, the
以上、本発明を実施の形態を用いて説明したが、本発明の技術的範囲は上記した実施の形態に記載の範囲には限定されない。例えば、本実施形態では、情報量削減部170は、32bitの画像データを、16bit、8bitと段階的に削減することにより、ユーザに与える違和感を抑えるように作用するが、他の例として、32bitから8bitへ画像データの情報量を削減したり、カラーの画像データの色情報を削減することにより、画像データを白黒にしたりすることにより、長い間参照されていない画像データを目立たせ、ユーザに認識させてもよい。これにより、長い間参照されていない画像データを扱わないような処理をアプリケーションプログラムに行わせるように、ユーザに操作を促すことができ、ひいては、アプリケーションプログラムをユーザの嗜好に沿って効率的に動作させることができる。
As mentioned above, although this invention was demonstrated using embodiment, the technical scope of this invention is not limited to the range as described in embodiment mentioned above. For example, in the present embodiment, the information
また、本実施形態では、情報量削減部170が、10ms等の所定の時間間隔で、非参照期間が削減閾値以上か否かを判定し、非参照期間が削減閾値以上になった場合に、対応する画像データの情報量を削減したが、本発明はこれに限られない。他の例として、画像表示装置14が、プログラムが使用しなくなったメモリ領域や、プログラム間の隙間のメモリ領域を集めて、連続した利用可能なメモリ領域とするガーベジコレクションの機能を有する場合、情報量削減部170は、非参照期間が削減閾値以上になった場合に、対応する画像データの情報量を削減する旨をテーブルに登録し、ガーベジコレクションが実行される直前に、画像データの情報量を削減してもよい。ここで、CPUがガーベジコレクションを実行している間は、アプリケーションプログラムの実行が停止してしまうか、あるいは、アプリケーションプログラムの実行速度が低下する場合がある。しかし、ガーベジコレクションを行う直前に情報量削減部170が画像データの情報量の削減処理を行うと、情報量削減部170が画像データの情報量を削減することによって新たにメモリ内に空き領域を生成することができるので、ガーベジコレクションの実行を先延ばしすることができる可能性が高まる。従って、アプリケーションプログラムをより適切に動作させることができる。
In the present embodiment, the information
10・・・画像表示システム、12・・・ディスプレイ、14・・・画像表示装置、140・・・作業メモリ、142・・・ビデオメモリ、144・・・外部記憶装置、146・・・CPU、148・・・バス、150・・・表示制御部、152・・・画像出力部、154・・・画像取得部、156・・・画像格納部、1560、1620、1640・・・画像ID、1562・・・画像データ本体、158・・・記録媒体、160・・・メモリ管理部、162・・・参照情報格納部、1622・・・非参照期間、1624・・・画像サイズ、1626・・・参照回数、1628・・・適用削減処理、164・・・適用フラグ格納部、1642・・・適用フラグ、166・・・非参照期間計測部、168・・・画像サイズ検出部、170・・・情報量削減部、172・・・参照回数計数部、174・・・再ロード指示部、30・・・画素データ、31・・・パディング、32・・・R、33・・・G、34・・・B
DESCRIPTION OF
Claims (10)
前記画像表示装置に、
外部記憶装置から前記作業メモリの前記ヒープ領域にロードされた前記画像データがアプリケーションプログラムによって最後に参照されてからの経過時間である非参照期間を計測する非参照期間計測手段と、
前記非参照期間計測手段が計測した前記非参照期間が、予め定められた削減閾値以上の場合に、前記ヒープ領域内の前記画像データの情報量を削減する情報量削減手段と
を実現させることを特徴とするメモリ管理プログラム。 A memory management program for managing a heap area of a working memory included in an image display device that displays image data on a display,
In the image display device,
A non-reference period measuring means for measuring a non-reference period that is an elapsed time since the image data loaded from the external storage device to the heap area of the working memory was last referred to by an application program;
Realizing an information amount reducing unit that reduces the information amount of the image data in the heap area when the non-reference period measured by the non-reference period measuring unit is equal to or greater than a predetermined reduction threshold. Feature memory management program.
前記画像表示装置に
前記ヒープ領域にロードされた前記画像データの画像サイズを、前記画像データのそれぞれについて算出する画像サイズ算出手段
をさらに実現させ、
前記情報量削減手段は、
前記ヒープ領域内の前記画像データの情報量を削減する場合に、前記表示サイズ算出手段が算出した前記画像サイズを参照して、前記画像サイズのより大きな前記画像データほど、より多くの情報量を削減することを特徴とするメモリ管理プログラム。 The memory management program according to claim 1,
The image display device further realizes image size calculation means for calculating the image size of the image data loaded in the heap area for each of the image data,
The information amount reducing means is:
When reducing the information amount of the image data in the heap area, referring to the image size calculated by the display size calculation means, the larger the image size, the larger the information amount. A memory management program characterized by reducing.
前記情報量削減手段は、
前記非参照期間計測手段が計測した前記非参照期間が、予め定められた削減閾値以上の場合に、前記ヒープ領域内の前記画像データが有する色の種類を減少させることを特徴とするメモリ管理プログラム。 The memory management program according to claim 1 or 2,
The information amount reducing means is:
A memory management program for reducing the types of colors of the image data in the heap area when the non-reference period measured by the non-reference period measuring means is equal to or greater than a predetermined reduction threshold. .
前記情報量削減手段は、
前記非参照期間計測手段が計測した前記非参照期間が、予め定められた削減閾値以上の場合に、前記ヒープ領域内の前記画像データの解像度を減少させることを特徴とするメモリ管理プログラム。 The memory management program according to claim 1 or 2,
The information amount reducing means is:
A memory management program for reducing the resolution of the image data in the heap area when the non-reference period measured by the non-reference period measuring unit is equal to or greater than a predetermined reduction threshold.
前記画像データは、動画像データであり、
前記情報量削減手段は、
前記非参照期間計測手段が計測した前記非参照期間が、予め定められた削減閾値以上の場合に、前記ヒープ領域内の前記動画像データのフレーム数を減少させることを特徴とするメモリ管理プログラム。 The memory management program according to claim 1 or 2,
The image data is moving image data,
The information amount reducing means is:
A memory management program for reducing the number of frames of the moving image data in the heap area when the non-reference period measured by the non-reference period measuring means is equal to or greater than a predetermined reduction threshold.
前記画像表示装置に、
前記情報量削減手段によって、前回、前記画像データの情報量が削減されてから、前記アプリケーションプログラムによって情報量が削減された前記画像データが参照された回数である参照回数を計数する参照回数計数手段と、
前記参照回数計数手段が計数した前記参照回数が、予め定められた回復閾値以上になった場合に、前記参照回数が前記回復閾値以上になった前記画像データを前記外部記憶装置から前記ヒープ領域に再びロードする再ロード手段と
をさらに実現させることを特徴とするメモリ管理プログラム。 A memory management program according to any one of claims 1 to 5,
In the image display device,
The reference number counting means for counting the number of times of reference, which is the number of times the image data whose information amount has been reduced by the application program has been referred to since the information amount of the image data was reduced last time by the information amount reducing means. When,
When the reference count counted by the reference count counting unit is equal to or greater than a predetermined recovery threshold, the image data whose reference count is equal to or greater than the recovery threshold is transferred from the external storage device to the heap area. A memory management program characterized by further realizing a reloading means for reloading.
前記端末装置に、
前記情報量削減手段によって前記画像データの削減処理を行うか否かを示す削減処理フラグを、前記アプリケーションプログラムのそれぞれを識別するアプリケーションプログラム識別情報に対応付けて格納する削減処理フラグ格納手段
をさらに実現させ、
前記情報量削減手段は、
前記削減処理フラグ格納手段に格納された前記削減処理フラグを参照して、前記画像データの削減処理を行う旨が示されている前記アプリケーションプログラムが扱う前記画像データについて、前記削減処理を行うことを特徴とするメモリ管理プログラム。 A memory management program according to any one of claims 1 to 6,
In the terminal device,
Further realized is a reduction processing flag storage means for storing a reduction processing flag indicating whether or not the image data reduction processing is performed by the information amount reduction means in association with application program identification information for identifying each of the application programs. Let
The information amount reducing means is:
Referring to the reduction processing flag stored in the reduction processing flag storage means, performing the reduction processing on the image data handled by the application program indicated to perform the reduction processing of the image data. Feature memory management program.
前記端末装置に、
前記情報量削減手段が前記画像データの情報量を削減した場合に、情報量が削減された旨を示す削減情報を、情報量が削減された前記画像データを識別する画像識別情報に対応付けて格納する削減情報格納手段
をさらに実現させ、
前記情報量削減手段は、
前記ヒープ領域に前回ロードされた前記画像データが、前記アプリケーションプログラムによって再び前記外部記憶装置から前記ヒープ領域にロードされた場合に、前記非参照期間計測手段が計測した前記非参照期間に基づいて前記画像の情報量を削減するよりも前に、前記削減情報格納手段に格納された前記削減情報を参照して、前記画像データに前回施された削減処理と同一の削減処理を、再びロードされた前記画像データに施すことを特徴とするメモリ管理プログラム。 A memory management program according to any one of claims 1 to 7,
In the terminal device,
When the information amount reducing unit reduces the information amount of the image data, the reduction information indicating that the information amount is reduced is associated with the image identification information for identifying the image data with the reduced information amount. Further realize the reduction information storage means to store,
The information amount reducing means is:
Based on the non-reference period measured by the non-reference period measurement means when the image data previously loaded in the heap area is loaded from the external storage device into the heap area again by the application program. Prior to reducing the amount of image information, the reduction information stored in the reduction information storage means was referred to and the same reduction process as the previous reduction process applied to the image data was loaded again. A memory management program applied to the image data.
アプリケーションプログラムのコードがJava言語で記述されていることを特徴とするメモリ管理プログラム。 A memory management program according to any one of claims 1 to 7,
A memory management program characterized in that a code of an application program is described in Java language.
圧縮された複数の前記画像データを格納する外部記憶部と、
前記外部記憶部が格納する複数の前記画像データのいずれかがロードされた場合に、ロードされた前記画像データを展開して保持する作業メモリと、
アプリケーションプログラムに基づいて動作し、前記アプリケーションプログラムの指示に応じて、圧縮された前記画像データを前記外部記憶部から前記作業メモリのヒープ領域にロードし、ロードした前記圧縮された画像データを前記ヒープ領域に展開し、前記ヒープ領域に展開した前記画像データを、前記アプリケーションプログラムの指示に応じて前記ディスプレイに表示させる表示制御部と、
前記ヒープ領域内の前記画像データを管理するメモリ管理部と
を備え、
前記メモリ管理部は、
前記表示制御部によって、前記画像データが外部記憶装置から前記ヒープ領域にロードされた後に、前記表示制御部によって最後に参照されてからの経過時間である非参照期間を計測する非参照期間計測部と、
前記非参照期間計測部によって計測された前記非参照期間が、予め定められた削減閾値以上の場合に、前記ヒープ領域内の前記画像データの情報量を削減する情報量削減部と
を有することを特徴とするが画像表示装置。 An image display device for displaying image data on a display,
An external storage unit for storing a plurality of compressed image data;
A working memory that expands and holds the loaded image data when any of the plurality of image data stored in the external storage unit is loaded;
Operates based on an application program, and loads the compressed image data from the external storage unit to the heap area of the working memory according to an instruction of the application program, and loads the compressed image data loaded to the heap A display control unit that expands in the area and displays the image data expanded in the heap area on the display according to an instruction of the application program;
A memory management unit for managing the image data in the heap area;
The memory management unit
A non-reference period measurement unit that measures a non-reference period, which is an elapsed time since the display control unit was last referred to after the image data was loaded from the external storage device into the heap area by the display control unit. When,
An information amount reduction unit that reduces the information amount of the image data in the heap area when the non-reference period measured by the non-reference period measurement unit is equal to or greater than a predetermined reduction threshold. It is an image display device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004316672A JP2006127280A (en) | 2004-10-29 | 2004-10-29 | Memory management program and image display device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004316672A JP2006127280A (en) | 2004-10-29 | 2004-10-29 | Memory management program and image display device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006127280A true JP2006127280A (en) | 2006-05-18 |
Family
ID=36721956
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004316672A Pending JP2006127280A (en) | 2004-10-29 | 2004-10-29 | Memory management program and image display device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006127280A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013132038A (en) * | 2011-06-23 | 2013-07-04 | Riso Kagaku Corp | Image processing apparatus and host device |
-
2004
- 2004-10-29 JP JP2004316672A patent/JP2006127280A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013132038A (en) * | 2011-06-23 | 2013-07-04 | Riso Kagaku Corp | Image processing apparatus and host device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6847388B2 (en) | Method and system for accelerating a user interface of an image capture unit during play mode | |
US20080049113A1 (en) | Image sensing apparatus | |
US20060143610A1 (en) | Method and apparatus for detecting deadlocks | |
TWI244052B (en) | Window idle frame memory compression | |
WO2012111387A1 (en) | Test device | |
WO2018049761A1 (en) | Gif file playing method and system | |
JP2003150929A (en) | Image pickup device, image pickup method, computer readable storage medium and computer program | |
CA2460471A1 (en) | Picture encoding method and picture decoding method | |
JP2009140487A (en) | Converting method, conversion system and computer readable storage medium | |
JP4129242B2 (en) | Bitstream format and method and apparatus for reading and writing the same | |
US20130201197A1 (en) | Overscan Support | |
JP2006189881A (en) | Method and device for protecting display panel from burn-in effect | |
JP2006222973A (en) | Optimizing method and apparatus for string table loading during imaging device initialization | |
US5901277A (en) | Shared decompression buffer | |
JP2003348324A (en) | Multiple digital watermarking method, multiple digital watermarking apparatus, and multiple digital watermarking program and storage medium with the program recorded thereon | |
JP2006127280A (en) | Memory management program and image display device | |
US20050226501A1 (en) | Compressing and decompressing image of a mobile communication terminal | |
JP2003186668A (en) | Instruction code conversion unit and instruction code conversion method | |
JP4964219B2 (en) | Image processing apparatus, method, and program | |
CN113436108A (en) | Method for processing blur by canvas under high power screen | |
US20020012009A1 (en) | Scenario display method and apparatus | |
JP2007006125A (en) | Image processing support apparatus, electronic camera, image processing apparatus, development processing system, and program for fulfilling these image processing support apparatus and image processing apparatus | |
JP2007026340A (en) | Image processor, image processing system, and data transfer method | |
JP2008026782A (en) | Image display system, image data output unit, and computer program | |
JP2008149489A (en) | Image forming apparatus, printing system and output controlling program |