JP4180468B2 - Image compression system and image compression method - Google Patents
Image compression system and image compression method Download PDFInfo
- Publication number
- JP4180468B2 JP4180468B2 JP2003291081A JP2003291081A JP4180468B2 JP 4180468 B2 JP4180468 B2 JP 4180468B2 JP 2003291081 A JP2003291081 A JP 2003291081A JP 2003291081 A JP2003291081 A JP 2003291081A JP 4180468 B2 JP4180468 B2 JP 4180468B2
- Authority
- JP
- Japan
- Prior art keywords
- compression
- image data
- cpu
- algorithm
- changing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Description
本発明は動画像データを圧縮する技術に関する。さらに詳しくは、動画像データをコンピュータにより圧縮符号化し、ハードディスクなどの記憶媒体に記録するための技術に関する。 The present invention relates to a technique for compressing moving image data. More specifically, the present invention relates to a technique for compressing and encoding moving image data with a computer and recording the data on a storage medium such as a hard disk.
TV放送信号などのビデオ信号をコンピュータの記録媒体に記録することが広く行われている。ビデオ信号はデータ量が多いため、通常は圧縮符号化されて記録媒体に記録される。ビデオ信号を圧縮符号化するエンコーダには、ハードウェアエンコーダ及びソフトウェアエンコーダがある。ハードウェアエンコーダは圧縮処理速度が速い一方で、それ自体を搭載した製品、例えばビデオキャプチャボードなどの価格が高くなってしまう。このようなハードウェアエンコーダの価格の高さと近年のCPUの性能の向上とを反映し、ソフトウェアエンコーダが用いられることが多くなってきている。 Recording video signals such as TV broadcast signals on computer recording media is widely performed. Since a video signal has a large amount of data, it is usually compressed and encoded and recorded on a recording medium. There are a hardware encoder and a software encoder as an encoder for compressing and encoding a video signal. The hardware encoder has a high compression processing speed, but the price of a product equipped with the hardware encoder such as a video capture board is high. Reflecting the high price of such hardware encoders and the recent improvement in CPU performance, software encoders are increasingly used.
ソフトウェアエンコーダにおいては、圧縮符号化処理に要求される速度と画質とが相反関係にある。具体的には、ビデオ信号の通信においては、単位時間内に一定のフレーム数が送信される。従って、送られてきたビデオ信号を圧縮符号化してメモリに記録するためには、送信速度に応じた速度で符号化処理を行うことが要求される。一般的には、1秒間に30フレームが送信されるので、1フレームを1/30秒以内に圧縮符号化できればよい。連続して長時間の録画を行う場合には、通信速度を上回る符号化処理速度を確実に維持できることが要求される。その一方で、高画質を維持するために圧縮アルゴリズムの精度を高めると、演算に時間がかかり過ぎて要求される符号化処理速度を実現できない場合がある。 In software encoders, the speed required for compression encoding processing and the image quality are in a conflicting relationship. Specifically, in video signal communication, a certain number of frames are transmitted within a unit time. Accordingly, in order to compress and encode the transmitted video signal and record it in the memory, it is required to perform the encoding process at a speed corresponding to the transmission speed. Generally, since 30 frames are transmitted per second, it is only necessary that one frame can be compressed and encoded within 1/30 second. When recording continuously for a long time, it is required to reliably maintain the encoding processing speed exceeding the communication speed. On the other hand, if the accuracy of the compression algorithm is increased in order to maintain high image quality, the required encoding processing speed may not be realized because the computation takes too much time.
しかし、従来のソフトウェアエンコーダは、CBR(Constant Bit Rate)モードかVBR(Valuable Bit Rate)モードかのいずれかの動作モードやビットレート等の初期設定値が決定されると、一定のアルゴリズムに基づいて圧縮符号化処理を行う。ところが、ユーザが使用するコンピュータのCPUの性能は様々である。ソフトウェアエンコーダが、どのCPU上でも可能な限り高い画質を維持しながら圧縮符号化処理を必要な速度で行うためには、各CPUの性能を十分に活用し、各CPUに合わせて動作することが求められている。 However, the conventional software encoder is based on a certain algorithm when an initial setting value such as an operation mode or a bit rate in either a CBR (Constant Bit Rate) mode or a VBR (Valuable Bit Rate) mode is determined. Perform compression encoding processing. However, the CPU performance of computers used by users varies. In order for a software encoder to perform compression encoding processing at a necessary speed while maintaining the highest possible image quality on any CPU, it is necessary to fully utilize the performance of each CPU and operate according to each CPU. It has been demanded.
また、ソフトウェアエンコーダの圧縮処理には、CPUの性能以外の要因も影響する。例えばOS(Operating System)の種類やマルチタスク環境か否かによって、圧縮符号化処理に使用できるCPUパワーが変動する。従って、CPUの性能やコンピュータの動作環境が変動しても、要求される画質及び十分な符号化処理速度を実現する圧縮処理システムが求められている。 In addition, factors other than the performance of the CPU affect the compression processing of the software encoder. For example, the CPU power that can be used for the compression encoding process varies depending on the type of OS (Operating System) and the multitasking environment. Accordingly, there is a need for a compression processing system that realizes the required image quality and sufficient encoding processing speed even when the CPU performance and the computer operating environment vary.
本発明は、動作環境が変動しても、圧縮符号化処理の速度及び画質への要求を満たす圧縮符号化処理を行う画像圧縮システムを提供することを目的とする。 SUMMARY OF THE INVENTION An object of the present invention is to provide an image compression system that performs compression coding processing that satisfies requirements for the speed and image quality of compression coding processing even when the operating environment fluctuates.
また本発明は、CPUの性能に応じた圧縮符号化処理を行うことができるソフトウェアエンコーダを提供することを目的とする。 It is another object of the present invention to provide a software encoder capable of performing compression encoding processing in accordance with CPU performance.
前記課題を解決するために、発明1はコンピュータを含む画像圧縮システムを提供する。このシステムは、以下の手段を備えている。
・前記コンピュータのCPU(Central Processing Unit)の負荷レベルを監視する負荷監視手段、
・前記CPUの負荷レベルに応じ、画像データの圧縮符号化に用いるアルゴリズムを、所定のパラメータの変更、演算精度の変更、動き検出の範囲の変更、予測方法自体の変更またはこれらの組み合わせのいずれかにより変更するアルゴリズム変更手段、
・逐次入力される画像データの圧縮符号化処理を行い、画像データの入力が開始してから終了するまでにアルゴリズムが変化した場合には、変更後のアルゴリズムに基づいて圧縮符号化処理を続行する圧縮符号化手段。
In order to solve the above-mentioned problems, the
Load monitoring means for monitoring the load level of the CPU (Central Processing Unit) of the computer;
Depending on the load level of the CPU, the algorithm used for compression encoding of the image data is any one of a predetermined parameter change, a calculation accuracy change, a motion detection range change, a prediction method itself change, or a combination thereof. Algorithm changing means to change by
・ Sequentially input image data is compressed and encoded, and if the algorithm changes between the start and end of image data input, the compression encoding process is continued based on the changed algorithm. Compression encoding means.
前記負荷監視手段は、1)前記コンピュータ内のメモリへの画像データの書込アドレスと、前記メモリに書き込まれた画像データを読み取る読出アドレスとの差を1GOP相当の一定時間間隔ΔTごとに演算して記憶し、2)新たに演算したアドレスの差と記憶している前回の演算結果との比較結果に基づいて前記CPUの負荷レベルを判断する。 The load monitoring means 1) calculates a difference between a write address of image data to a memory in the computer and a read address for reading the image data written in the memory at a constant time interval ΔT corresponding to 1 GOP. stored Te, 2) newly determines the load level of the CPU based on a comparison result between the previous computation result computed difference addresses to be stored.
負荷監視手段、アルゴリズム変更手段及び圧縮符号化手段は、具体的にはソフトウェアである。ソフトウェアは、現在の処理のCPU負荷レベルを判断し、CPU負荷レベルに応じた圧縮アルゴリズムを用いて圧縮符号化を行う。負荷が高ければ、CPUの負荷がより軽減される圧縮アルゴリズムで圧縮符号化を行う。逆に、CPUの負荷が低くCPUの処理能力に余裕があれば、CPUの負荷がより重くなっても画質が向上する圧縮アルゴリズムで圧縮符号化を行う。圧縮アルゴリズムの切替は、所定のパラメータの値や予測方法などを変更することにより行う。 Specifically, the load monitoring unit, the algorithm changing unit, and the compression encoding unit are software. The software determines the CPU load level of the current process and performs compression encoding using a compression algorithm corresponding to the CPU load level. If the load is high, compression encoding is performed using a compression algorithm that further reduces the load on the CPU. Conversely, if the CPU load is low and the CPU processing capacity is sufficient, compression encoding is performed with a compression algorithm that improves image quality even when the CPU load increases. The compression algorithm is switched by changing a predetermined parameter value or a prediction method.
例えば、圧縮前の画像データのメモリへの書込速度Vwが、そのメモリから読み出される速度Vrよりも速ければ(Vw>Vr)、CPUの負荷レベルが高い。逆に、書込速度Vwが読み出し速度Vrよりも遅ければ(Vw<Vr)、CPUの負荷レベルは低い。両者が同程度であれば(Vw=Vr)、CPUの処理負荷と性能とが釣り合った状態にある。ここで、読み出し速度Vrは、圧縮符号化処理の速度と見なすことができる。 For example, if the writing speed Vw of the image data before compression to the memory is faster than the speed Vr read from the memory (Vw> Vr), the load level of the CPU is high. Conversely, if the writing speed Vw is slower than the reading speed Vr (Vw <Vr), the load level of the CPU is low. If both are comparable (Vw = Vr), the CPU processing load and performance are in balance. Here, the reading speed Vr can be regarded as the speed of the compression encoding process.
発明2は、発明1において、アルゴリズム変更手段が、前記CPUの負荷レベルが高い場合はその負荷レベルが低下するようにアルゴリズムを変更し、前記CPUの負荷レベルが低い場合は圧縮符号化された画像データの画質が向上するようにアルゴリズムを変更する画像圧縮システムを提供する。 A second aspect of the present invention provides the method according to the first aspect, wherein the algorithm changing means changes the algorithm so that the load level decreases when the load level of the CPU is high, and the compression-encoded image when the load level of the CPU is low. An image compression system for changing an algorithm so that the image quality of data is improved is provided.
アルゴリズムの変更は、CPUの性能に応じた圧縮符号化処理を実行できるように行う。具体的には、CPUの負荷が高すぎるときには圧縮符号化処理が軽くなるよう演算精度を下げたり、動き検出の範囲を狭めるかもしくは予測方法自体を切替えるようにアルゴリズムの変更を行う。CPUの負荷を軽減する代償として圧縮画像データの画質が低下する。逆に、負荷を増加させても良い場合には、CPUの負荷が増大するものの画質を向上させる。例えば、MPEG2の圧縮符号化において、アルゴリズムの変更により動き検出の範囲を変えたり予測方法を変更することで、画質を高めたりCPUの負荷を軽減したりすることができる。 The algorithm is changed so that compression encoding processing according to the performance of the CPU can be executed. Specifically, when the load on the CPU is too high, the algorithm is changed so that the calculation accuracy is lowered so that the compression encoding process becomes light, the range of motion detection is narrowed, or the prediction method itself is switched. As a price to reduce the load on the CPU, the image quality of the compressed image data is lowered. Conversely, if the load may be increased, the image quality is improved although the load on the CPU increases. For example, in compression encoding of MPEG2, it is possible to increase the image quality or reduce the load on the CPU by changing the motion detection range or changing the prediction method by changing the algorithm.
発明3は、コンピュータが実行する画像圧縮プログラムを提供する。このプログラムは、コンピュータを以下の手段として機能させる。
・前記コンピュータのCPU(Central Processing Unit)の負荷レベルを監視する負荷監視手段、
・前記CPUの負荷レベルに応じ、画像データの圧縮符号化に用いるアルゴリズムを、所定のパラメータの変更、演算精度の変更、動き検出の範囲の変更、予測方法自体の変更またはこれらの組み合わせのいずれかにより変更するアルゴリズム変更手段、
・逐次入力される画像データの圧縮符号化処理を行い、画像データの入力が開始してから終了するまでにアルゴリズムが変化した場合には、変更後のアルゴリズムに基づいて圧縮符号化処理を続行する圧縮符号化手段。
Invention 3 provides an image compression program executed by a computer. This program causes the computer to function as the following means.
Load monitoring means for monitoring the load level of the CPU (Central Processing Unit) of the computer;
Depending on the load level of the CPU, the algorithm used for compression encoding of the image data is any one of a predetermined parameter change, a calculation accuracy change, a motion detection range change, a prediction method itself change, or a combination thereof. Algorithm changing means to change by
・ Sequentially input image data is compressed and encoded, and if the algorithm changes between the start and end of image data input, the compression encoding process is continued based on the changed algorithm. Compression encoding means.
前記負荷監視手段は、1)前記コンピュータ内のメモリへの画像データの書込アドレスと、前記メモリに書き込まれた画像データを読み取る読出アドレスとの差を1GOP相当の一定時間間隔ΔTごとに演算して記憶し、2)新たに演算したアドレスの差と記憶している前回の演算結果との比較結果に基づいて前記CPUの負荷レベルを判断する。 The load monitoring means 1) calculates a difference between a write address of image data to a memory in the computer and a read address for reading the image data written in the memory at a constant time interval ΔT corresponding to 1 GOP. stored Te, 2) newly determines the load level of the CPU based on a comparison result between the previous computation result computed difference addresses to be stored.
このプログラムは、コンピュータを発明1の画像圧縮システムとして機能させる。ここで、プログラムとは、ダウンロード可能なものであってもなくてもよい。また、プログラムは、コンピュータ読み取り可能な記録媒体に記録されていても良い。そのような記録媒体としては、コンピュータが読み書き可能なフレキシブルディスク、ハードディスク、半導体メモリ、CD−ROM、DVD、光磁気ディスク(MO)、その他のものが挙げられる。 This program causes the computer to function as the image compression system of the first aspect. Here, the program may or may not be downloadable. The program may be recorded on a computer-readable recording medium. Examples of such a recording medium include a computer readable / writable flexible disk, hard disk, semiconductor memory, CD-ROM, DVD, magneto-optical disk (MO), and others.
発明4は、コンピュータが行う画像圧縮方法を提供する。この方法は以下のステップを含む。
・前記コンピュータのCPU(Central Processing Unit)の負荷レベルを監視する負荷監視ステップ、
・前記CPUの負荷レベルに応じ、画像データの圧縮符号化に用いるアルゴリズムを、所定のパラメータの変更、演算精度の変更、動き検出の範囲の変更、予測方法自体の変更またはこれらの組み合わせのいずれかにより変更するアルゴリズム変更ステップ、
・逐次入力される画像データの圧縮符号化処理を行い、画像データの入力が開始してから終了するまでにアルゴリズムが変化した場合には、変更後のアルゴリズムに基づいて圧縮符号化処理を続行する圧縮符号化ステップ。
Invention 4 provides an image compression method performed by a computer. The method includes the following steps.
A load monitoring step for monitoring a load level of a CPU (Central Processing Unit) of the computer;
Depending on the load level of the CPU, the algorithm used for compression encoding of the image data is any one of a predetermined parameter change, a calculation accuracy change, a motion detection range change, a prediction method itself change, or a combination thereof. Algorithm change step to be changed by
・ Sequentially input image data is compressed and encoded, and if the algorithm changes between the start and end of image data input, the compression encoding process is continued based on the changed algorithm. Compression encoding step.
前記負荷監視ステップでは、1)前記コンピュータ内のメモリへの画像データの書込アドレスと、前記メモリに書き込まれた画像データを読み取る読出アドレスとの差を1GOP相当の一定時間間隔ΔTごとに演算して記憶し、2)新たに演算したアドレスの差と記憶している前回の演算結果との比較結果に基づいて前記CPUの負荷レベルを判断する。 In the load monitoring step, 1) the difference between the write address of the image data to the memory in the computer and the read address to read the image data written in the memory is calculated at a constant time interval ΔT corresponding to 1 GOP. stored Te, 2) newly determines the load level of the CPU based on a comparison result between the previous computation result computed difference addresses to be stored.
この方法は、発明1の画像圧縮システムが実行する方法であり、発明1と同様の作用効果を有している。 This method is executed by the image compression system according to the first aspect of the invention, and has the same effects as those of the first aspect.
本発明を用いれば、ソフトウェアエンコーダを用い、動作環境やCPUの性能に応じて実時間内で圧縮符号化処理を行うことができる。 According to the present invention, a software encoder can be used to perform compression encoding processing in real time according to the operating environment and CPU performance.
<発明の概要>
本発明の画像圧縮システムでは、ソフトウェアが自分自身のCPU負荷レベルを監視し、その負荷レベルに応じた圧縮符号化処理を行う。負荷レベルが高ければ、CPUの処理負担がより軽減される圧縮符号化処理に切り替える。負荷レベルが低くCPUの処理能力に余裕があれば、CPUの処理負担が増えても画質が向上する圧縮符号化処理に切り替える。そのため、画像圧縮システムの動作環境がその都度変化しても、その時点の動作環境において可能な高画質を保ちながら、要求される圧縮速度を保って圧縮符号化処理を行うことができる。また、CPUの性能に応じ、そのCPUで実現可能な限り最高の画質で圧縮符号化処理を行うことができる。
<Outline of the invention>
In the image compression system of the present invention, software monitors its own CPU load level and performs compression encoding processing according to the load level. If the load level is high, the processing is switched to compression encoding processing that further reduces the processing load on the CPU. If the load level is low and the processing capacity of the CPU is sufficient, the processing is switched to compression encoding processing that improves the image quality even if the processing load on the CPU increases. Therefore, even if the operating environment of the image compression system changes each time, it is possible to perform the compression encoding process while maintaining the required compression speed while maintaining the high image quality possible in the operating environment at that time. Further, according to the performance of the CPU, the compression encoding process can be performed with the highest image quality that can be realized by the CPU.
<第1実施形態例>
[構成]
図1は、本発明の第1実施形態例に係る画像圧縮システムの構成図である。画像圧縮システム1はコンピュータを用いて構成される。画像圧縮システム1には、ビデオキャプチャボード2が接続される。画像データは、ビデオキャプチャボード2を介して画像圧縮システム1に入力される。
<First embodiment>
[Constitution]
FIG. 1 is a configuration diagram of an image compression system according to a first embodiment of the present invention. The
画像圧縮システム1は、下記の構成要素を有している。
The
(a)PCIカードスロットインターフェイス101:このインターフェイス101は、コンピュータの拡張スロット(図示せず)及びPCI(Peripheral Component Interconnect/Interface)バス102に接続されており、拡張スロットに挿入されるビデオキャプチャボード2からの画像データの入力を取り込む。
(A) PCI card slot interface 101: This
(b)サウスブリッジ103:サウスブリッジ103は、PCIバス102に接続されており、ビデオキャプチャボード2から入力された画像データを、後述のノースブリッジ104に供給する。サウスブリッジ103とノースブリッジ104とは、高速専用バス105により接続されている。また、サウスブリッジ103は、IDE(Integrated Drive Electronics)バス106によりHD107(Hard Disk)と接続されている。サウスブリッジ103は、IDEインターフェイス等の各種I/Oインターフェイスを内蔵している(図示せず)。そして、サウスブリッジ103は各種のI/Oを制御する。例えば、IDEバス106に接続されるデバイスの制御や、I/Oインターフェイス109を介して接続されるデバイスの制御などを行う。
(B) South Bridge 103: The
(c)HD107:HD107は、IDEバス106によりサウスブリッジ103と接続されている。HD107は、後述する各種プログラム及び非圧縮画像データや圧縮された画像データを記憶する。HD107に記憶されているプログラムは、起動処理の過程で、ノースブリッジ104のメインメモリ110に供給・ロードされる。
(C) HD 107: The
(d)ノースブリッジ104:ノースブリッジ104は、高速専用バス105によりサウスブリッジ103と接続され、ホストバス111によりCPU112と接続されている。ノースブリッジ104は、RAM(Random-Access Memory)であるメインメモリ110やCPU112(Central Processing Unit)、サウスブリッジ103間のデータの流れを調停する。
(D) North Bridge 104: The
(e)CPU112:CPU112は、例えばインテル社製のペンティアム(登録商標)プロセッサなどで構成される。CPU112は、ホストバス111によりノースブリッジ104に接続されている。またCPU112は、その内部にCPU112自身が制御し、高速に動作するキャッシュメモリ(以下、CPUメモリ113という)を有している。
(E) CPU 112: The
(f)I/Oインターフェイス109:I/Oインターフェイス109には、図示しない入出力デバイスが接続される。例えばキーボード、タッチパネルなどが、I/Oインターフェイス109に接続される。
(F) I / O interface 109: An input / output device (not shown) is connected to the I /
上記構成の画像圧縮システム1において、HD107は、負荷監視プログラム107a(負荷監視手段に相当)、アルゴリズム変更プログラム107b(アルゴリズム変更手段に相当)、及び圧縮プログラム107c(圧縮符号化手段に相当)を記憶している。負荷監視プログラム107aは、コンピュータのCPU112(Central Processing Unit)の負荷レベルを監視する。アルゴリズム変更プログラム107bは、CPU112の負荷レベルに応じ、画像データの圧縮符号化に用いるアルゴリズムを変更する。圧縮プログラム107cは、メインメモリ110に逐次書き込まれる画像データの圧縮符号化処理を行う。また、圧縮プログラム107cは、画像データの入力が開始されてから終了するまでにアルゴリズムが変化した場合には、変更後のアルゴリズムに基づいて圧縮符号化処理を続行する。これらのプログラムは、コンピュータに設けられたHD107に記録されており、CPU112のメインメモリ110内にロードされてそこで実行される。
In the
図2は、このような画像圧縮システム1におけるデータの流れを示す。図中、破線矢印は非圧縮画像データの流れを示し、実線矢印は圧縮画像データの流れを示す。図に示すように、メインメモリ110には、非圧縮画像データを蓄積する非圧縮画像データバッファ114と、圧縮画像データを蓄積する圧縮画像データバッファ115とが、それぞれ設けられる。ビデオキャプチャボード2から入力された非圧縮画像データは、PCIカードスロットインターフェイス101からサウスブリッジ103を経て、ノースブリッジ104のメインメモリ110の非圧縮画像データバッファ114に書き込まれる。書き込まれる速度は、おおよそ1秒間に30フレームである。非圧縮画像データバッファ114に書き込まれた非圧縮画像データは、古い順にCPU112に読み出され、逐次圧縮符号化される。圧縮符号化された画像データは、メインメモリ110の圧縮画像データバッファ115内に一旦蓄積される。その後、圧縮画像データは、ノースブリッジ104、サウスブリッジ103を経由してHD107に書き込まれる。
FIG. 2 shows a data flow in such an
なお、図2では、メインメモリ110に変化値バッファ116を設けている。このバッファ116の機能については詳細を後述する。
In FIG. 2, a
[動作]
(a)システム全体の動作
前記構成の画像圧縮システム1において、CPU112は、現在の処理の負荷レベルを判断し、負荷レベルに応じた圧縮符号化処理を行う。負荷が高ければ、CPU112の負荷がより軽減されるアルゴリズムで圧縮符号化を行う。逆に、CPU112の負荷が低くCPU112の処理能力に余裕があれば、CPU112の負荷がより重くなっても画質が向上するアルゴリズムで圧縮符号化を行う。アルゴリズムの変更は、画像データの入力が開始されてから終了するまでの間に行われる。ここで、アルゴリズムの変更とは、所定のパラメータの変更、演算精度の変更、動き検出の範囲の変更、予測方法自体の変更またはこれらの組み合わせをいう。所定のパラメータとは、圧縮符号化に用いるパラメータであり、圧縮率を変えることなく圧縮処理の負荷を調整できるパラメータである。
[Operation]
(A) Operation of entire system In the
動画像圧縮を例に取れば、CPU112の負荷レベルに応じた演算精度に変更したり動き補償予測の方法を変更することが挙げられる。MPEG圧縮符号化であれば、動き補償予測の方法として、片方向予測、双方向予測、フレーム/フィールド予測、16×8/16×16予測などが挙げられる。また例えば、DV圧縮符号化であれば、予測の方法として、8×8−DCT/2−4−8DCTを挙げることができる。また、別の例として、動き検出の範囲を変えることが挙げられる。本発明の方法は、MPEG、DVなどの動画像圧縮、モーションJPEGなど、圧縮符号化方法を特に限定することなく適用可能である。
Taking moving image compression as an example, it may be possible to change the calculation accuracy according to the load level of the
(b)CPU112の負荷レベルの判断方法
負荷監視プログラム107aは、非圧縮画像データバッファ114への非圧縮画像データの書込速度Vwと圧縮符号化処理速度Vrとに基づいて、CPU112の負荷レベルを判断することができる。すなわち、非圧縮画像データバッファ114への書込速度Vwと圧縮符号化処理速度Vrとの比較結果に基づいて、CPU112の負荷レベルを判断する。ここで、非圧縮画像データバッファ114に書き込まれた非圧縮画像データが圧縮符号化のために読み出される速度(以下、読み出し速度という)を、圧縮符号化処理の速度Vrと見なすと良い。例えば、書込速度Vwが読み出し速度Vrよりも速ければ(Vw>Vr)、負荷監視プログラム107aはCPU112の負荷レベルが高いと判断する。逆に、書込速度Vwが読み出し速度Vrよりも遅ければ(Vw<Vr)、負荷監視プログラム107aはCPU112の負荷レベルが低いと判断する。両者が同程度であれば(Vw=Vr)、CPU112の負荷レベルはバランスしている。つまり、CPU112の処理負荷と性能とが釣り合った状態にある。
(B) Method for Determining Load Level of
再度図2を参照し、負荷監視プログラム107aの処理の一例を説明する。書込速度Vwと読み出し速度Vrとの比較は、非圧縮画像データバッファ114への書込アドレスP1と非圧縮画像データバッファ114からの読み出しアドレスP2との差を監視することにより行うことができる。具体的には、次のように監視を行うことが挙げられる。
With reference to FIG. 2 again, an example of processing of the
負荷監視プログラム107aにより、書込アドレスP1と読み出しアドレスP2との差(以下、アドレスの差という)を一定時間間隔ΔTで演算する。ΔTの値は、適宜設定可能である。例えばMPEG圧縮符号化であれば、GOPを形成する15フレームが送出される0.5秒間隔をΔTとすることができる。演算した最新の値ΔPiをメインメモリ110内の変化値バッファ116に格納しておく。ΔT後に演算したアドレスの差ΔPi+1と変化値バッファ116内に格納された前回のアドレスの差ΔPiとを比較する。差が大きくなっていれば(ΔPi<ΔPi+1)、CPU112の負荷レベルが高いと負荷監視プログラム107aは判断する。逆に差が小さくなっていれば、(ΔPi>ΔPi+1)CPU112の処理能力に余裕があると負荷監視プログラム107aは判断する。つまり、CPU112の負荷レベルは低いと判断する。
The
なお、変化値バッファ116には、前回のアドレスの差ΔPiだけでなく、複数の過去のアドレスの差ΔPi-1、ΔPi-2・・・を蓄積しても良い。そのようにすれば、アドレスの差の時間変化に基づいて、CPU112の処理能力の過不足発生を予測することができ好ましい。
The
(c)圧縮符号化処理の変更・設定
アルゴリズム変更プログラム107bは、前記ΔT時間毎に所定の圧縮符号化処理を決定する。アルゴリズム変更プログラム107bは、負荷監視プログラム107aによりCPU112の負荷レベルが高いと判断されると、CPU112の負荷が軽減されるように所定のパラメータの値や予測方法などのアルゴリズムを変更する。アルゴリズムは、具体的には圧縮された画像の画質を落とすように変更することができる。画質を上げることとCPU112の負荷を軽くすることとは、通常は相反するからである。例えば、MPEG圧縮符号化において、動き検出の範囲を狭めるようにアルゴリズムを変更することが挙げられる。
(C) Change / setting of compression encoding process The
逆に、CPU112の負荷レベルが低いと判断されると、アルゴリズム変更プログラム107bは画質が向上するようにアルゴリズムを変更するとよい。CPU112の処理能力に余裕がある場合はCPU112の負荷が増加してもよいので、画質を上げてCPU112の性能を活用することが好ましい。例えば、動き検出の範囲を拡大するようにアルゴリズムを変更することが挙げられる。
Conversely, if it is determined that the load level of the
なお、CPU112の負荷レベルがバランスしていると判断されると、アルゴリズム変更プログラム107bはアルゴリズムを変更せず、そのまま同じアルゴリズムを設定する。
When it is determined that the load level of the
(d)圧縮
圧縮プログラム107cは、画像データの入力の途中で所定の圧縮符号化処理の変更を受け付け、圧縮符号化処理が変更された場合には変更後の圧縮符号化処理を用いて圧縮符号化を行う。より具体的には、圧縮プログラム107cは、アルゴリズム変更プログラム107bによるアルゴリズムの設定を、前記ΔT時間毎に受け付けるとよい。
(D) Compression The
[処理の流れ]
図3は、上記の構成を有する画像圧縮システム1が行う処理の流れを示すフローチャートである。この処理は、ビデオキャプチャボード2から画像データが入力されることにより開始するものであり、図3(a)に示すメイン処理としての圧縮処理と、図3(b)に示す一定時間(例えば、30秒)毎に割り込み処理される非圧縮画像取込処理とで構成される。
[Process flow]
FIG. 3 is a flowchart showing a flow of processing performed by the
ステップS1:圧縮プログラム107cは、CPU112の負荷レベルの判断及び圧縮符号化処理の設定がΔT時間毎に実行されるよう、負荷監視プログラム107a及びアルゴリズム変更プログラム107bを制御する。
Step S1: The
ステップS2:負荷監視プログラム107aは、非圧縮画像データバッファ114の書込アドレスP1及び読み出しアドレスP2から、現在のアドレスの差を演算する。さらに、負荷監視プログラム107aは、メインメモリ110内の変化値バッファ116に格納された前回のアドレスの差ΔPiと現在のアドレスの差ΔPi+1とを比較し、CPU112の負荷レベルを判断する。
Step S2: The
ステップS3:アルゴリズム変更プログラム107bは、ステップS2での判断結果に従い、アルゴリズムを設定し、設定したアルゴリズムを圧縮プログラム107cに渡す。
Step S3: The
ステップS4:圧縮プログラム107cは、設定されたアルゴリズムを用いて圧縮符号化処理を続行する。
Step S4: The
ステップS5:負荷監視プログラム107aは読み出しアドレスP2をインクリメントする。
Step S5: The
ステップS6:圧縮プログラム107cは、画像データの入力が終了したか否かを判断し、入力が終了するまでステップS1〜S5の処理を繰り返すよう、負荷監視プログラム107a及びアルゴリズム変更プログラム107bを制御する。
Step S6: The
ステップS11:ビデオキャプチャボード2から入力された非圧縮画像データをPCIカードスロットインターフェイス101からサウスブリッジ103を経てノースブリッジ104のメインメモリ110の非圧縮画像データバッファ114に1画面分取り込む。
Step S11: Uncompressed image data input from the
ステップS12:負荷監視プログラム107aは書込アドレスP1をインクリメントする。
Step S12: The
<その他の実施形態例>
コンピュータを前述の画像圧縮システム1として機能させるプログラムは、本発明の範囲に含まれる。また、そのプログラムを記録したコンピュータ読み取り可能な記録媒体は、本発明の範囲に含まれる。ここで、プログラムとは、ダウンロード可能なものであってもなくてもよい。記録媒体としては、コンピュータが読み書き可能なフレキシブルディスク、ハードディスク、半導体メモリ、CD−ROM、DVD、光磁気ディスク(MO)、その他のものが挙げられる。また、前述の画像圧縮システム1が実行する方法は、本発明の範囲に含まれる。
<Other embodiment examples>
A program that causes a computer to function as the above-described
本発明は、ソフトウェアエンコーダによる画像圧縮に適用可能である。 The present invention can be applied to image compression by a software encoder.
1:画像圧縮システム
112:CPU
113:CPUメモリ
114:バッファ
1: Image compression system 112: CPU
113: CPU memory 114: Buffer
Claims (4)
前記コンピュータのCPU(Central Processing Unit)の負荷レベルを監視する負荷監視手段と、
前記CPUの負荷レベルに応じ、画像データの圧縮符号化に用いるアルゴリズムを、所定のパラメータの変更、演算精度の変更、動き検出の範囲の変更、予測方法自体の変更またはこれらの組み合わせのいずれかにより変更するアルゴリズム変更手段と、
逐次入力される画像データの圧縮符号化処理を行い、画像データの入力が開始してから終了するまでにアルゴリズムが変化した場合には、変更後のアルゴリズムに基づいて圧縮符号化処理を続行する圧縮符号化手段と、を含み、
前記負荷監視手段は、
前記コンピュータ内のメモリへの画像データの書込アドレスと、前記メモリに書き込まれた画像データを読み取る読出アドレスとの差を1GOP相当の一定時間間隔ΔTごとに演算して記憶し、
新たに演算したアドレスの差と記憶している前回の演算結果との比較結果に基づいて前記CPUの負荷レベルを判断する、
画像圧縮システム。 An image compression system including a computer,
Load monitoring means for monitoring the load level of the CPU (Central Processing Unit) of the computer;
Depending on the load level of the CPU, the algorithm used for compression encoding of the image data can be changed by changing a predetermined parameter, changing the calculation accuracy, changing the motion detection range, changing the prediction method itself, or a combination thereof. An algorithm changing means to change;
Compression that performs compression encoding processing of image data that is sequentially input, and if the algorithm changes from the start to the end of image data input, compression that continues the compression encoding processing based on the changed algorithm Encoding means,
The load monitoring means includes
The difference between the write address of the image data to the memory in the computer and the read address for reading the image data written in the memory is calculated and stored at regular time intervals ΔT corresponding to 1 GOP, and stored .
Determining a load level of the CPU based on a comparison result between a newly calculated address difference and a stored previous calculation result ;
Image compression system.
前記コンピュータのCPU(Central Processing Unit)の負荷レベルを監視する負荷監視手段、
前記CPUの負荷レベルに応じ、画像データの圧縮符号化に用いるアルゴリズムを、所定のパラメータの変更、演算精度の変更、動き検出の範囲の変更、予測方法自体の変更またはこれらの組み合わせのいずれかにより変更するアルゴリズム変更手段、及び
逐次入力される画像データの圧縮符号化処理を行い、画像データの入力が開始してから終了するまでにアルゴリズムが変化した場合には、変更後のアルゴリズムに基づいて圧縮符号化処理を続行する圧縮符号化手段、
として前記コンピュータを機能させる画像圧縮プログラムであって、
前記負荷監視手段は、
前記コンピュータ内のメモリへの画像データの書込アドレスと、前記メモリに書き込まれた画像データを読み取る読出アドレスとの差を1GOP相当の一定時間間隔ΔTごとに演算して記憶し、
新たに演算したアドレスの差と記憶している前回の演算結果との比較結果に基づいて前記CPUの負荷レベルを判断する、画像圧縮プログラム。 An image compression program executed by a computer,
Load monitoring means for monitoring the load level of the CPU (Central Processing Unit) of the computer;
Depending on the load level of the CPU, the algorithm used for compression encoding of the image data can be changed by changing a predetermined parameter, changing the calculation accuracy, changing the motion detection range, changing the prediction method itself, or a combination thereof. Algorithm changing means to change, and compression encoding processing of sequentially input image data. If the algorithm changes from the start to the end of image data input, compression is performed based on the changed algorithm. Compression encoding means for continuing the encoding process;
An image compression program for causing the computer to function as
The load monitoring means includes
The difference between the write address of the image data to the memory in the computer and the read address for reading the image data written in the memory is calculated and stored at regular time intervals ΔT corresponding to 1 GOP, and stored .
An image compression program for determining a load level of the CPU based on a comparison result between a newly calculated address difference and a stored previous calculation result .
前記コンピュータのCPU(Central Processing Unit)の負荷レベルを監視する負荷監視ステップと、
前記CPUの負荷レベルに応じ、画像データの圧縮符号化に用いるアルゴリズムを、所定のパラメータの変更、演算精度の変更、動き検出の範囲の変更、予測方法自体の変更またはこれらの組み合わせのいずれかにより変更するアルゴリズム変更ステップと、
逐次入力される画像データの圧縮符号化処理を行い、画像データの入力が開始してから終了するまでにアルゴリズムが変化した場合には、変更後のアルゴリズムに基づいて圧縮符号化処理を続行する圧縮符号化ステップと、を含み、
前記負荷監視ステップでは、
前記コンピュータ内のメモリへの画像データの書込アドレスと、前記メモリに書き込まれた画像データを読み取る読出アドレスとの差を1GOP相当の一定時間間隔ΔTごとに演算して記憶し、
新たに演算したアドレスの差と記憶している前回の演算結果との比較結果に基づいて前記CPUの負荷レベルを判断する、画像圧縮方法。 An image compression method performed by a computer,
A load monitoring step of monitoring a load level of a CPU (Central Processing Unit) of the computer;
Depending on the load level of the CPU, the algorithm used for compression encoding of the image data can be changed by changing a predetermined parameter, changing the calculation accuracy, changing the motion detection range, changing the prediction method itself, or a combination thereof. An algorithm change step to be changed;
Compression that performs compression encoding processing of image data that is sequentially input, and if the algorithm changes from the start to the end of image data input, compression that continues the compression encoding processing based on the changed algorithm An encoding step,
In the load monitoring step,
The difference between the write address of the image data to the memory in the computer and the read address for reading the image data written in the memory is calculated and stored at regular time intervals ΔT corresponding to 1 GOP, and stored .
An image compression method for determining a load level of the CPU based on a comparison result between a newly calculated address difference and a stored previous calculation result .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003291081A JP4180468B2 (en) | 2003-08-11 | 2003-08-11 | Image compression system and image compression method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003291081A JP4180468B2 (en) | 2003-08-11 | 2003-08-11 | Image compression system and image compression method |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008097731A Division JP4383488B2 (en) | 2008-04-04 | 2008-04-04 | Image compression system and image compression method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005064773A JP2005064773A (en) | 2005-03-10 |
JP4180468B2 true JP4180468B2 (en) | 2008-11-12 |
Family
ID=34368879
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003291081A Expired - Fee Related JP4180468B2 (en) | 2003-08-11 | 2003-08-11 | Image compression system and image compression method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4180468B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008203938A (en) * | 2007-02-16 | 2008-09-04 | Ricoh Co Ltd | Image pickup device |
TW201236462A (en) * | 2011-02-21 | 2012-09-01 | Hon Hai Prec Ind Co Ltd | System and method for recording a video |
KR101894420B1 (en) * | 2011-04-15 | 2018-09-03 | 에스케이플래닛 주식회사 | Adaptive video transcoding method and its system for maximizing transcoding server capacity |
JP5924211B2 (en) * | 2012-09-21 | 2016-05-25 | ソニー株式会社 | Image processing apparatus, image processing method, and program |
RU2720067C1 (en) | 2017-04-21 | 2020-04-23 | Зенимакс Медиа Инк. | Systems and methods for rendering and issuing hints to an encoder based on estimating a pre-encoded load |
-
2003
- 2003-08-11 JP JP2003291081A patent/JP4180468B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2005064773A (en) | 2005-03-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100389977B1 (en) | A playback method of data encoded by a reverse playback operation and a playback apparatus | |
US10509588B2 (en) | System and method for controlling memory frequency using feed-forward compression statistics | |
US7174091B2 (en) | Method and apparatus for improving video reproduction quality | |
WO2009128227A1 (en) | Encoding apparatus of video data and sound data, encoding method thereof, and video editing system | |
US20030133694A1 (en) | Systems and methods for fast random access and backward playback of video frames using decoded frame cache | |
US7925136B2 (en) | Method and apparatus for recording information in battery operated devices | |
US20050086553A1 (en) | System and method for setting a clock rate of a memory card | |
JP2001022464A (en) | Device and method for hibernation, recording medium stored with same, and computer applied with same | |
US7787747B2 (en) | Playback apparatus, Playback method, recording medium, and program | |
US20100289917A1 (en) | Imaging device, imaging method, and program | |
JP2004086823A (en) | Information processing apparatus, information processing method, and information processing program | |
JP4383488B2 (en) | Image compression system and image compression method | |
US7843460B2 (en) | Method and apparatus for bandwidth corruption recovery | |
JP4180468B2 (en) | Image compression system and image compression method | |
JP2008252262A (en) | Coder and change point detection method for moving images | |
TWI445409B (en) | Image data compression apparatu and method | |
US20100211738A1 (en) | Mass storage system with improved usage of buffer capacity | |
JP2000276856A (en) | Device and method for recording data and device and method for reproducing data | |
JP2000276857A (en) | Data recording device, data recording method, data reproducing device and data reproducing method | |
US6636639B1 (en) | Image recording apparatus, image recording method and storage medium | |
JP3427467B2 (en) | Data drive device | |
JP2021044746A (en) | Recording apparatus, control method, and program | |
JP2577705B2 (en) | Image compression / expansion apparatus and control method thereof | |
JP2002271745A (en) | Video recorder and video recording quality setting method thereof | |
JPH07236119A (en) | Video signal storing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060227 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20071120 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20071127 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080122 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20080205 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080404 |
|
A911 | Transfer of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20080528 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080701 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080710 |
|
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: 20080826 |
|
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: 20080827 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110905 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110905 Year of fee payment: 3 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110905 Year of fee payment: 3 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313113 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110905 Year of fee payment: 3 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120905 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120905 Year of fee payment: 4 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313113 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120905 Year of fee payment: 4 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120905 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130905 Year of fee payment: 5 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |