JP4886747B2 - Image coding apparatus, image coding method, and program - Google Patents
Image coding apparatus, image coding method, and program Download PDFInfo
- Publication number
- JP4886747B2 JP4886747B2 JP2008219095A JP2008219095A JP4886747B2 JP 4886747 B2 JP4886747 B2 JP 4886747B2 JP 2008219095 A JP2008219095 A JP 2008219095A JP 2008219095 A JP2008219095 A JP 2008219095A JP 4886747 B2 JP4886747 B2 JP 4886747B2
- Authority
- JP
- Japan
- Prior art keywords
- frame
- bit rate
- compression
- scene change
- image
- 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
- 238000000034 method Methods 0.000 title claims description 100
- 238000007906 compression Methods 0.000 claims description 119
- 230000006835 compression Effects 0.000 claims description 117
- 230000008569 process Effects 0.000 claims description 45
- 230000008859 change Effects 0.000 claims description 44
- 238000013139 quantization Methods 0.000 description 25
- 230000006866 deterioration Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 5
- 238000011156 evaluation Methods 0.000 description 5
- 238000003754 machining Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000015556 catabolic process Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 238000006731 degradation reaction Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- 230000001629 suppression Effects 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Description
本発明は、動画像処理、具体的には動画像の符号化技術に関する。 The present invention relates to moving image processing, specifically, a moving image encoding technique.
動画像の符号化方式には、可変ビットレート方式と、固定ビットレート方式がある。可変ビットレート方式は、画質を優先させ、フレームのビットレートが一定ではない方式である(特許文献1、特許文献2)。固定ビットレート方式は、各フレームのビットレートが同一である方式である。 There are a variable bit rate method and a fixed bit rate method for encoding moving images. The variable bit rate method is a method in which image quality is prioritized and the frame bit rate is not constant (Patent Documents 1 and 2). The fixed bit rate method is a method in which the bit rate of each frame is the same.
符号化した画像(以下圧縮画像という)をデコードする装置では、システムレイヤの制約や、ディスクドライブの読出性能などの条件により、1フレームあたりの上限値が設定されており、フレームの符号量がこの上限値を超えると、システムの動作に支障を来す恐れがある。可変ビットレート方式の圧縮画像は、ビットレートが不定であり、フレームによっては上限値を超える可能性がある。一方、固定ビットレート方式の圧縮画像は、符号量が上限値以下になるようにビットレートが固定されていればフレームの符号量が上限値を超えることが無いが、デコードした画像には、ブロックノイズなどの画質劣化が生じる問題がある。 In an apparatus that decodes an encoded image (hereinafter referred to as a compressed image), an upper limit value per frame is set according to conditions such as system layer restrictions and disk drive read performance, and the code amount of the frame is Exceeding the upper limit may interfere with system operation. A variable bit rate compressed image has an indefinite bit rate and may exceed the upper limit depending on the frame. On the other hand, if the bit rate is fixed so that the code amount is equal to or less than the upper limit value, the compressed image of the fixed bit rate method does not exceed the upper limit value of the frame. There is a problem that image quality deterioration such as noise occurs.
特許文献2には、H.264/AVC(Advanced Video Coding)方式でビットレート可変に符号化する際に符号量を抑制する手法が開示されている。この手法は、1フレームあたりの符号量が上限値を超えそうか否かを判定し、超えそうと判定したときに、該フレームに対して直交変換後の変換係数の一部を0(ゼロ)に置き換えることにより符号量を抑制する。
上述したH.264/AVCなどの圧縮方式は、人間の目が、低周波成分に敏感であるが高周波成分に鈍感である特性を利用して、高周波成分の情報を低周波成分の情報よりも多くカットしている。具体的には、直交変換後の変換係数を量子化する際に、周波数が高いほど大きな量子化テーブルの値を割り当てている。 H. mentioned above. The compression method such as H.264 / AVC cuts the information of the high frequency component more than the information of the low frequency component by utilizing the characteristic that the human eye is sensitive to the low frequency component but insensitive to the high frequency component. Yes. Specifically, when the transform coefficient after orthogonal transform is quantized, a larger quantization table value is assigned as the frequency is higher.
直交変換後の変換係数の一部を0に置き換える特許文献1の手法は、量子化の前に変換係数を操作してより符号量を抑えることを図っている。 In the method of Patent Document 1 in which a part of the transform coefficient after the orthogonal transform is replaced with 0, the code amount is further suppressed by manipulating the transform coefficient before quantization.
しかし、量子化において高周波成分が多くカットされるため、量子化の前に高周波成分の変換係数を0に置き換えても、符号量の抑制効果がそれほど大きく望めない。一方、符号量を確実に抑制するために低周波成分に近い変換係数を0に置き換えると、画質劣化が著しくなる。 However, since many high-frequency components are cut in the quantization, even if the conversion coefficient of the high-frequency components is replaced with 0 before the quantization, the effect of suppressing the code amount cannot be expected to be so great. On the other hand, if the conversion coefficient close to the low frequency component is replaced with 0 in order to surely suppress the code amount, the image quality deterioration becomes remarkable.
本発明の一つの態様は、画像符号化方法である。この方法は、動画像を構成する複数のフレームのうちの、可変ビットレート方式で該動画像を圧縮した場合のビットレートが所定の閾値を越えるフレームであるシーンチェンジフレームの直前のフレームを対象フレームとし、シーンチェンジフレームの一部の領域を、該シーンチェンジフレームに対応する対象フレームにコピーする加工を行う。そして、対象フレームについては加工がなされたものを使用し、対象フレーム以外のフレームについては元のフレームを使用して、固定ビットレート方式で圧縮を行う。 One aspect of the present invention is an image encoding method. This method uses a frame immediately before a scene change frame, which is a frame whose bit rate exceeds a predetermined threshold when a moving image is compressed by a variable bit rate method among a plurality of frames constituting a moving image as a target frame. And processing for copying a partial region of the scene change frame to the target frame corresponding to the scene change frame. Then, the processed target frame is used, and the original frame is used for frames other than the target frame, and compression is performed by the fixed bit rate method.
なお、上記方法を装置やシステム、またはプログラムとして表現したものも、本発明の態様としては有効である。 In addition, what expressed the said method as an apparatus, a system, or a program is also effective as an aspect of this invention.
本発明の技術によれば、動画像を圧縮する際に、符号量の抑制と、画質劣化の軽減を確実に実現できる。 According to the technology of the present invention, when a moving image is compressed, it is possible to reliably realize the suppression of the code amount and the reduction of the image quality deterioration.
本発明の具体的な実施の形態を説明する前に、まず、本発明にかかる符号化技術の原理を説明する。 Before describing a specific embodiment of the present invention, first, the principle of the encoding technique according to the present invention will be described.
前述したように、動画像を圧縮する際に、可変ビットレート方式を用いると、画質の劣化を抑制することができるものの、符号量が上限値を超える可能性がある、一方、固定ビットレート方式を用いると、符号量が上限値を超えることを防ぐことができるものの、ブロックノイズが目立つなどの画質劣化の問題がある。本願発明者は、画質と符号量のトレードオフについて鋭意研究模索した結果、下記の2点を知見した。
1.可変ビットレート方式で符号化する際に符号量が大きくなるフレームと、固定ビットレート方式で符号化する際にブロックノイズが目立つフレームは、共通した特徴を有する。
As described above, when a moving image is compressed, if a variable bit rate method is used, deterioration in image quality can be suppressed, but the code amount may exceed the upper limit value, while a fixed bit rate method is used. Although it is possible to prevent the code amount from exceeding the upper limit, there is a problem of image quality deterioration such as block noise conspicuous. The inventor of the present application has earnestly searched for a trade-off between image quality and code amount, and as a result, has found the following two points.
1. A frame in which the amount of code increases when encoding by the variable bit rate method and a frame in which block noise is conspicuous when encoding by the constant bit rate method have common characteristics.
このようなフレームは、フレーム予測が効かないもの、すなわち直前のフレームからの変動量が大きいものある。このようなフレームは、以下シーンチェンジフレームと呼ぶ。
2.シーンチェンジが生じた場合、画面の変動が大きいため、画面が切り替わる直前、すなわちシーンチェンジフレームの直前のフレームの画質を落としても、人間の目には違和感を与えない。
Such a frame is one in which frame prediction is not effective, that is, a frame having a large variation from the immediately preceding frame. Such a frame is hereinafter referred to as a scene change frame.
2. When a scene change occurs, the screen changes greatly, so even if the image quality of the frame immediately before the screen change, that is, immediately before the scene change frame is reduced, the human eye does not feel uncomfortable.
本願発明者は、これらの知見に基づき、本発明にかかる技術を確立した。この技術は、シーンチェンジフレームの一部を、シーンチェンジフレームの直前のフレーム(対象フレーム)にコピーした後に固定ビットレート方式で圧縮を行う。固定ビットレートであるので、符号量は一定になる。また、シーンチェンジ直前のフレームを加工しているので、人間の目に違和感を与えず、画質の劣化を回避できる。 The inventor of the present application has established the technology according to the present invention based on these findings. In this technique, after a part of a scene change frame is copied to a frame (target frame) immediately before the scene change frame, compression is performed by a fixed bit rate method. Since it is a fixed bit rate, the code amount is constant. In addition, since the frame immediately before the scene change is processed, it is possible to avoid deterioration in image quality without giving a sense of incongruity to human eyes.
なお、加工は、シーンチェンジフレームの直前の1つのフレームのみを対象フレームとすることに限らず、シーンチェンジフレームの直前の複数のフレームを対象フレームとしてもよい。この場合、シーンチェンジフレームの一部の領域を複数に分けて、該シーンチェンジフレームに対応する複数の対象フレームに1つコピーする。こうすることにより、シーンチェンジに起因した変動量が、シーンチェンジフレームの前の複数のフレームに分散されるので、画質の低下をより確実に回避できる。 Note that the processing is not limited to a single frame immediately before the scene change frame, but a plurality of frames immediately before the scene change frame may be the target frame. In this case, a partial area of the scene change frame is divided into a plurality of areas, and one area is copied to a plurality of target frames corresponding to the scene change frame. By doing this, the amount of variation caused by the scene change is distributed to a plurality of frames before the scene change frame, so that it is possible to more reliably avoid a deterioration in image quality.
特に限定されることがないが、下記の手法でシーンチェンジフレームの検出を行うことが好ましい。 Although not particularly limited, it is preferable to detect the scene change frame by the following method.
この手法は、まず、圧縮を担う機能ブロック(圧縮部)に、動画像の元のフレームを用いて可変ビットレート方式でプレ圧縮を行わせる。そして、該プレ圧縮により得られたビットレートが所定の閾値を越えたフレームをシーンチェンジフレームとして検出する。こうすることにより、圧縮部にプレ圧縮を行わせると共に、プレ圧縮の結果に応じて加工がなされた後に、固定レート方式による本圧縮を圧縮部に行わせるように制御すればよい。すなわち、シーンチェンジフレームを検出する専用の装置を設ける必要がなく、装置の規模を抑制することができる。 In this method, first, a functional block (compression unit) responsible for compression performs pre-compression by a variable bit rate method using an original frame of a moving image. A frame in which the bit rate obtained by the pre-compression exceeds a predetermined threshold is detected as a scene change frame. By doing so, the compression unit may perform pre-compression and control may be performed so that the compression unit performs main compression by a fixed rate method after processing according to the result of the pre-compression. That is, it is not necessary to provide a dedicated device for detecting a scene change frame, and the size of the device can be suppressed.
以上の原理を踏まえて、本発明の技術にかかる具体的な実施の形態を説明する。
図1は、本発明の実施の形態にかかる画像圧縮装置100を示す。画像圧縮装置100は、H.264/AVC方式で動画像を圧縮するものであり、データ供給部110、加算器120、直交変換部122、量子化部124、可変長符号化部126、レート制御部130、逆量子化部140、逆直交変換部142、フレームメモリ150、動き補償処理部160、画像加工部170、ストリーム出力制御部180、ストリームバッファ182、動作モード制御部190を備える。データ供給部110は、プレ圧縮用画像データメモリ112と、本圧縮用画像データメモリ114と、切替部116を有する。レート制御部130は、レート調整部132とレート評価部134を有する。フレームメモリ150は、プレ圧縮用予測フレームメモリ152と本圧縮用予測フレームメモリ154を有する。画像加工部170は、加工実行部172とビットレート値保存メモリ174を有する。加算器120、直交変換部122、量子化部124、可変長符号化部126、レート制御部130、逆量子化部140、逆直交変換部142、動き補償処理部160は、圧縮部を構成する。
Based on the above principle, a specific embodiment according to the technique of the present invention will be described.
FIG. 1 shows an
図1において、様々な処理を行う機能ブロックとして記載される各要素は、ハードウェア的には、プロセッサ、メモリ、その他の回路で構成することができ、ソフトウェア的には、メモリに記録された、またはロードされたプログラムなどによって実現される。したがって、これらの機能ブロックがハードウェアのみ、ソフトウェアのみ、またはそれらの組合せによっていろいろな形で実現できることは当業者には理解されるところであり、いずれかに限定されるものではない。また、分かりやすいように、これらの図面において、本発明の技術を説明するために必要なもののみを示す。 In FIG. 1, each element described as a functional block for performing various processes can be configured by a processor, a memory, and other circuits in terms of hardware, and recorded in the memory in terms of software. Alternatively, it is realized by a loaded program. Therefore, it is understood by those skilled in the art that these functional blocks can be realized in various forms by hardware only, software only, or a combination thereof, and is not limited to any one. Also, for the sake of clarity, only those necessary for explaining the technique of the present invention are shown in these drawings.
画像圧縮装置100は、動画像を圧縮するに当たり、動画像の各フレームのおおよその符号量を把握するための圧縮(プレ圧縮)を行う前半処理と、前半処理の結果を用いて実際の圧縮(本圧縮)を行う後半処理を順次行う。プレ圧縮は可変ビットレート方式で行われ、本圧縮は、固定レート方式で行われる。前半処理と後半処理の間に、画像加工処理が行われ、前半処理と後半処理の切替えは、動作モード制御部190により制御される。
When compressing a moving image, the
図2は、画像圧縮装置100における、前半処理に関与する機能ブロックのみを示す。動画像は、フレーム単位にデータ供給部110に入力される。データ供給部110におけるプレ圧縮用画像データメモリ112は、入力された各フレームのデータを格納する。以下、プレ圧縮用画像データメモリ112に格納された各々のフレームのデータを、プレ圧縮用画像データという。また、H.264/AVC方式では、画像の表示順と圧縮順が異なるが、ここでは、フレームが圧縮順にデータ供給部110に入力されるとする。
FIG. 2 shows only functional blocks related to the first half process in the
前半処理時に、切替部116は、プレ圧縮用画像データメモリ112からフレームデータ(プレ圧縮用画像データ)を加算器120と動き補償処理部160に出力する。
During the first half processing, the
加算器120は、データ供給部110からのプレ圧縮用画像データと、動き補償処理部160の算出結果とを合成し、直交変換部122への入力データを作成する。
The
直交変換部122は、加算器120が作成した入力データに対して直交変換を行って変換係数を得る。この変換係数は、直交変換部122から量子化部124に出力される。
The
量子化部124は、直交変換部122の変換係数に対して量子化処理を行う。量子化処理は、符号量の削減を担う処理であり、どの程度削減するかについては、レート制御部130のレート調整部132からの指示に従う。量子化部124は、量子化処理の結果を可変長符号化部126と逆量子化部140に出力する。
The
可変長符号化部126は、量子化部124から出力される量子化の結果と、動き補償処理部160から出力される動きベクトルを符号化し、符号化されたデータをストリーム出力制御部180に出力する。なお、符号化されたデータは動画像の圧縮データそのものであるが、前半処理(プレ圧縮)では符号量を把握することが目的であるため、可変長符号化部126は、さらに、ここで得られた当該フレームのビットレートをレート制御部130のレート評価部134と、画像加工部170に出力する。
The variable
レート評価部134は、可変長符号化部126からのビットレートと、予め設定されたビットレートとの比較結果をレート調整部132に出力する。
The
レート調整部132は、レート評価部134の比較結果に応じたレート調整指示を量子化部124に行うものであり、前半処理時においては、可変ビットレート方式となるように調整を行う。
The
なお、ストリーム出力制御部180は、前半処理時において、符号化されたフレームを出力しない。
The stream
逆量子化部140は、逆量子化処理を行った結果を逆直交変換部142に出力し、逆直交変換部142は、逆直交変換を行った結果をフレームメモリ150に出力する。逆直交変換部142の処理結果は、動き予測するためのフレームデータであり、フレームメモリ150のプレ圧縮用予測フレームメモリ152に格納される。以下、プレ圧縮用予測フレームメモリ152に格納されるフレームデータを、プレ圧縮用予測フレームデータという。
The
なお、H.264/AVCでは、逆直交変換部142の処理結果がフレームメモリ150(ここではプレ圧縮用予測フレームメモリ152)に格納される前に、デブロッキングフィルタによりブロックノイズ軽減処理がされる場合もあるが、ここでは省略する。
H. In H.264 / AVC, block noise reduction processing may be performed by a deblocking filter before the processing result of the inverse
動き補償処理部160は、前半処理時に、プレ圧縮用予測フレームメモリ152に格納されたプレ圧縮用予測フレームデータに基づいて動き予測を行う。なお、動き予測には、フレーム間予測とフレーム内予測があるが、動き補償処理部160はこの2つの処理を行うものである。
The motion
画像加工部170は、前半処理時に可変長符号化部126から出力されたビットレートをビットレート値保存メモリ174に保存する。ビットレート値保存メモリ174は、現在のフレームと、現在のフレームの直前の1つ以上のフレームのビットレートを保持するものであり、本実施の形態において、一例として、ビットレート値保存メモリ174は、計5つのフレームのビットレートを保持する。
The
画像加工部170は、現在のフレームのビットレートに基づいて、直前の4つのフレームを加工するか否かを判定し、加工すると判定した場合、直前の4つのフレームのデータ(プレ圧縮用画像データメモリ112に格納されたフレームデータ)を加工してデータ供給部110に出力する。一方、加工しないと判定した場合は、直前の4つのフレームをそのままデータ供給部110に出力する。加工実行部172の動作の詳細について後に説明する。
Based on the bit rate of the current frame, the
データ供給部110は、画像加工部170からのデータを本圧縮用画像データメモリ114に格納する。なお、本圧縮用画像データメモリ114に格納されたフレームデータは、後半処理すなわち本圧縮に供されるため、以下本圧縮用画像データという。
The
次に後半処理について画像圧縮装置100の動作を説明する。後半処理が前半処理と異なるのは、下記の3点である:「データ供給部110から供給されるデータが異なる」、「レート調整部132の動作が異なる」、「ストリーム出力制御部180からストリームバッファ182への出力が行われる」。図3を参照して後半処理を説明する。なお、図3は、後半処理に関与する機能ブロックのみを示す。
Next, the operation of the
後半処理に当たり、データ供給部110の切替部116は、本圧縮用画像データメモリ114に格納された本圧縮用画像データを加算器120と動き補償処理部160に出力する。
In the latter half of the process, the
加算器120、直交変換部122、量子化部124、逆量子化部140、逆直交変換部142は、入力されるデータが異なる点以外、前半処理時と同様の動作をする。
The
フレームメモリ150は、逆直交変換部142の出力を本圧縮用予測フレームメモリ154に格納して動き補償処理部160に供する。
The
動き補償処理部160は、本圧縮用予測フレームメモリ154に保存されたフレームデータを用いて動き予測を行う。
The motion
レート調整部132は、フレームのビットレートが予め設定されたビットレートになるように量子化部124に調整指示する。すなわち、本実施の形態にかかる画像圧縮装置100は、後半処理にて固定ビットレート方式で圧縮を行う。
The
すなわち、レート調整部132は前半処理時と後半処理時とでビットレート調整の方式が異なる。具体的には、前半処理時は可変ビットレート方式となるように調整を行い、後半処理時は固定ビットレート方式となるように調整を行う。
That is, the
ストリーム出力制御部180は、前半処理時に何も出力しないが、後半処理時に、可変長符号化部126が得た圧縮データ(本圧縮の圧縮結果となるビットストリーム)をストリームバッファ182に出力する。
The stream
ストリームバッファ182は、ストリーム出力制御部180からのビットストリームを一時的に格納し、図示しない出力装置など外部に出力する。
The
次いで、図4〜図9を参照して、画像加工部170における加工実行部172を詳細に説明する。
H.264/AVC方式では、圧縮された動画像をデコードして再生する際に、クロッピングと呼ばれる処理が行われる。この処理は、表示装置の解像度など、再生形態に合致するように、フレームの切出しを行う。すなわち、圧縮された動画像をデコードして得た各フレームに対して、すべての画素を表示するのではなく、一部のみを表示する。通常、フレームの中央領域が表示され、フレームの辺縁領域が切り捨てられる。
Next, the
H. In the H.264 / AVC format, a process called cropping is performed when a compressed moving image is decoded and reproduced. In this process, the frame is cut out so as to match the reproduction form such as the resolution of the display device. That is, instead of displaying all the pixels for each frame obtained by decoding the compressed moving image, only a part is displayed. Usually, the center area of the frame is displayed and the edge area of the frame is truncated.
一方、エンコードに際してのフレーム間予測では、非表示領域からの動きベクトルも利用した動きベクトル予測ができる。 On the other hand, in inter-frame prediction at the time of encoding, motion vector prediction using a motion vector from a non-display area can be performed.
図4に示すように、デコードして得たフレーム300に対して、中央部分の表示領域304は表示用に切り出され、陰影が示す辺縁部分は非表示領域302領域として切り捨てられる。
As shown in FIG. 4, with respect to the
なお、フレームの上端から表示領域304の上端までの長さ、フレームの下端から表示領域304の下端までの長さ、フレームの左端から表示領域304の左端までの長さ、フレームの右端から表示領域304の右端までの長さは、夫々Fram_Crop_Top_Offset(FCTO)312、Fram_Crop_Bottom_Offset(FCBO)314、Fram_Crop_Left_Offset(FCLO)316、Fram_Crop_Right_Offset(FCRO)318と呼ばれ、エンコーダ装置側において知り得る情報である。 Note that the length from the upper end of the frame to the upper end of the display area 304, the length from the lower end of the frame to the lower end of the display area 304, the length from the left end of the frame to the left end of the display area 304, the right end of the frame to the display area The lengths up to the right end of 304 are Fram_Crop_Top_Offset (FCTO) 312, Fram_Crop_Bottom_Offset (FCBO) 314, Fram_Crop_Left_Offset (FCLO) 316, and Fram_Crop_Roff 18
画像加工部170は、前半処理時にのみ動作し、プレ圧縮用画像データメモリ112に格納されたプレ圧縮用画像データから後半処理の本圧縮に用いられるフレームデータ(本圧縮用画像データ)を生成するものである。本実施の形態において、加工実行部172は、可変ビットレート方式で圧縮する際に符号化量が大きくなるフレーム、すなわち固定ビットレート方式で圧縮する際にブロックノイズが目立つフレームをシーンチェンジフレームとし、シーンチェンジフレームの直前の4つのフレームを、該シーンチェンジフレームに対応する対象フレームとして、シーンチェンジフレームの表示領域の一部を複数の領域に分けて複数の対象フレームの非表示領域に1つずつコピーする。
The
図5に示すように、前半処理中、ビットレート値保存メモリ174には、現在のフレーム401と、フレーム401の直前の4つのフレーム(1つ前のフレーム402、2つ前のフレーム403、3つ前のフレーム404、4つ前のフレーム405)が格納されている。
As shown in FIG. 5, during the first half processing, the bit rate
加工実行部172は、まず、現在のフレーム401のビットレートと、予め設定された閾値Thとを比較し、フレーム402〜405を加工するか否かを判定する。具体的には、フレーム401のビットレートが閾値Th以下である場合には、フレーム402〜405を加工しないと判定し、フレーム401のビットレートが閾値Thを超えた場合、すなわちフレーム401がシーンチェンジフレームであると判断できる場合には、フレーム402〜405を加工すると判定する。
First, the
図6は、ビットレート値保存メモリ174に格納された5つのフレームのビットレートの例を示す。この例では、現在のフレーム401は、シーンチェンジフレームであり、ビットレートM0が閾値Thを超えている。その直前の4つのフレーム402〜405のビットレートM1〜M4は、閾値以下である。この場合、加工実行部172は、フレーム402〜405を加工すると判定する。
FIG. 6 shows an example of bit rates of five frames stored in the bit rate
加工すると判定した場合には、加工実行部172は、さらにフレーム402〜405に対する加工量をそれぞれ算出する。本実施の形態において、加工実行部172は、加工に際して、シーンチェンジフレーム401の表示領域から、閾値を超えた面積分のデータを切り取り、切り取ったデータの領域をさらに4つの領域に分け、直前の4つのフレームの非表示領域に1つずつコピーする。そのため、加工量とは、フレーム402〜405にコピーされる夫々の領域のサイズになる。なお、加工量の具体的な算出手法については後述する。
When it determines with processing, the
加工しないと判定した場合には、プレ圧縮用画像データメモリ112に格納されたフレーム402〜405のデータがそのまま本圧縮用画像データとして本圧縮用画像データメモリ114に格納される。
If it is determined not to be processed, the data of the frames 402 to 405 stored in the pre-compression
図7は、加工実行部172がフレーム402〜405を加工して得たフレーム502〜505を示す。フレーム501は、現在のフレーム401と同じであり、ビットレートが閾値Thを超えたシーンチェンジフレームである。なお、図7において、分かりやすいように、各フレームの表示領域と下端の非表示領域のみを表示している。
FIG. 7 shows
図7に示すように、フレーム501の全領域のうちの、表示領域に含まれる「領域1+領域2+領域3+領域4」は、コピーされる領域である。フレーム501における領域1〜領域4を、夫々領域601〜604で表記する。
As shown in FIG. 7, “area 1 + area 2 +
加工実行部172は、領域601をフレーム402の非表示領域に領域701としてコピーする。領域701を除き、フレーム502の他の各部位は、フレーム402における相対応の部位と同一である。
The
動きベクトルを符号化する際に、動きベクトル量が少ない、すなわち動いた距離が近いほうが符号量を少なくできるので、本実施の形態において、加工実行部172は、コピーされる領域のフレーム501における位置に対応する、フレーム402の非表示領域における位置に、当該領域をコピーする。
When encoding a motion vector, since the amount of code can be reduced when the amount of motion vector is small, that is, the distance moved is short, in this embodiment, the
そのため、フレーム501の下部左側に位置する領域601は、動きベクトル量が少なくなるように、フレーム402の下端の非表示領域の左側にコピーされる。図7に示すように、領域601をコピーして得た領域701は、フレーム502の下端の非表示領域の左側に位置している。
Therefore, the area 601 located on the lower left side of the
同じように、フレーム501の領域602は、フレーム403の下端の非表示領域の左側にコピーされる。それによって得られるフレーム503において、下端の非表示領域の左側の領域702は、領域602と同じである。
Similarly, the area 602 of the
また、フレーム501の領域603は、フレーム404の下端の非表示領域の右側にコピーされる。それによって得られるフレーム504において、下端の非表示領域の右側の領域703は、領域603と同じである。
The area 603 of the
また、フレーム501の領域604は、フレーム404の下端の非表示領域の右側にコピーされる。それによって得られるフレーム505において、下端の非表示領域の右側の領域704は、領域604と同じである。
Further, the area 604 of the
このようにして得られたフレーム502〜505は、本圧縮用画像データとして、本圧縮用画像データメモリ114に格納される。
The
ここで加工実行部172による加工量の算出手法を説明する。説明に際して、図6に示す例を用いる。
Here, a calculation method of the machining amount by the
シーンチェンジフレームの直前のフレームを加工する目的は、後半処理時に固定ビットレートで圧縮しても、画質の劣化を回避するところにある。具体的には、加工実行部172は、前半処理時に得られたビットレートが閾値Thを超えたフレームに対して、そのビットレートがThを超えた分を前の4つのフレームに分散させる。
The purpose of processing the frame immediately before the scene change frame is to avoid deterioration in image quality even if compression is performed at a fixed bit rate during the latter half of the processing. Specifically, the
図8に示すように、現在のフレームの前の4つのフレームに分担させるべき量が(M0−Th)である。 As shown in FIG. 8, the amount to be shared by the four frames before the current frame is (M0-Th).
加工実行部172は、まず、各フレームに対して、該フレームのビットレートMiと分担係数θiの積(Mi×θi)を求める。すなわち、1つ前のフレーム〜4つ前のフレームについて、夫々(M1×θ1)、(M2×θ2)、(M3×θ3)、(M4×θ4)を求める。分担係数θ1〜θ4は、予め設定された0から1までの数値であり、値が1に近いほどそのフレームの画質劣化が抑えられ、逆に0に近いほど画質劣化が大きくなる。
First, the
そして、下記の式(1)に従って、前の4つのフレームの分担量を夫々算出する。
ΔMi=(M0−Th)×{(Th−Mi×θi)/Σi(Th−Mi×θi)} (1)
但し,Th:閾値
M0:現在のフレームのビットレート
Mi:現在のフレームのi個前のフレームのビットレート
θi:現在のフレームのi個前のフレームに対して設定された分担係数
ΔMi:現在のフレームのi個前のフレームの分担量
Then, according to the following equation (1), the share amounts of the previous four frames are calculated.
ΔMi = (M0−Th) × {(Th−Mi × θi) / Σ i (Th−Mi × θi)} (1)
Where Th: threshold
M0: bit rate of the current frame
Mi: bit rate of i frames before the current frame
θi: sharing coefficient set for i frames before the current frame
ΔMi: Share of i frames before the current frame
こうすることにより、図9に示すように、現在のフレームのビットレートが閾値Thを超えた量は前の4つのフレームに分散させられる。 By doing so, as shown in FIG. 9, the amount by which the bit rate of the current frame exceeds the threshold value Th is distributed to the previous four frames.
そして、加工実行部172は、i個前のフレームの分担量ΔMiが、前の4つのフレームの分担量の総和(ΔM1+ΔM2+ΔM3+ΔM4)に占める割合と、現在のフレームにおいてコピーされる領域の総サイズとの乗算により、i個前のフレームにコピーする領域のサイズを算出する。このサイズは、i個前のフレームの加工量となる。
Then, the
次いで、図10のフローチャートを参照して、動作モード制御部190を中心に、画像圧縮装置100の動作の流れを説明する。
動画像がフレーム単位に順次データ供給部110に入力され、プレ圧縮用画像データメモリ112に格納される。前半処理のために、動作制御モード制御部190により、画像処理装置100の他の各機能ブロックに対して下記の制御が行われる。
Next, an operation flow of the
The moving images are sequentially input to the
A.データ供給部110において、プレ圧縮用画像データメモリ112を使用するように切替えがなされる。すなわち、切替部116は、プレ圧縮用画像データメモリ112からフレームデータ(プレ圧縮用画像データ)を出力する(S100)。
B.フレームメモリ150において、プレ圧縮用予測フレームメモリ152を使用するように切替えがなされる(S102)。すなわち、逆直交変換部142からのフレームデータがプレ圧縮用予測フレームメモリ152に格納され、プレ圧縮用予測フレームメモリ152から動き補償処理部160に出力される。
C.レート調整部132では、可変ビットレート方式となるようにビットレート調整方式の切替えがなされる(S103)。
D.ストリーム出力制御部180では、ビットストリームを出力しないように切替えがなされる(S104)。
A. The
B. The
C. The
D. In the stream
そして、現在のフレームの前半処理(プレ圧縮)が行われる(S110)。 Then, the first half processing (pre-compression) of the current frame is performed (S110).
ステップ110の前半処理にて現在のフレームのビットレートが得られ、該ビットレートは、画像加工部170のビットレート値保存メモリ174に保存される(S112)。
The bit rate of the current frame is obtained by the first half processing of
該ビットレートが閾値Th以下である場合(S114:No)、プレ圧縮用画像データメモリ112に格納された該フレームのデータは、本圧縮用画像データメモリ114に転送され(S116)、処理はステップS122に進む。一方、ビットレートが閾値Thを超えている場合(S114:Yes)、現在のフレームの直前のフレームに対して加工が行われるべきと判定され、加工量が算出される(S118)。
If the bit rate is equal to or lower than the threshold Th (S114: No), the data of the frame stored in the pre-compression
そして、現在のフレームの直前の4つのフレームに対して、ステップS118で算出された量の加工がなされて、これらのフレームの本圧縮用画像データとして本圧縮用画像データメモリ114に出力される(S120)。なお、本圧縮用画像データメモリ114にこれらのフレームの本圧縮用画像データが既に格納されている場合は、格納中のデータが上記加工されたデータにより更新される。また、現在のフレームのデータは、そのまま本圧縮用画像データメモリ114に転送される。そして、処理がステップS122に進む。
Then, the four frames immediately before the current frame are processed by the amount calculated in step S118, and are output to the main compression
後半処理のために、動作制御モード制御部190により、画像処理装置100の他の各機能ブロックに対して下記の制御が行われる。
For the latter half of the processing, the operation control
A.データ供給部110において、本圧縮用画像データメモリ114を使用するように切替えがなされる。すなわち、切替部116は、本圧縮用画像データメモリ114からフレームデータ(本圧縮用画像データ)を出力する(S122)。
B.フレームメモリ150おいて、本圧縮用予測フレームメモリ154を使用するように切替えがなされる(S124)。すなわち、逆直交変換部142からのフレームデータが本圧縮用予測フレームメモリ154に格納され、本圧縮用予測フレームメモリ154から動き補償処理部160に出力される。
C.レート調整部132では、固定ビットレート方式となるようにビットレート調整方式の切替えがなされる(S126)。
D.ストリーム出力制御部180では、ビットストリームを出力するように切替えがなされる(S128)。
A. The
B. The
C. The
D. In the stream
そして、現在のフレームについて後半処理が(本圧縮)が行われる(S130)。 Then, the latter half processing (main compression) is performed for the current frame (S130).
このように、本実施の形態の画像圧縮装置100は、プレ圧縮→本圧縮用画像データ生成→本圧縮の順に圧縮を行う。本圧縮用画像データの生成に当たり、プレ圧縮で得られたビットレートが閾値Thを超えたフレームの表示領域の一部を複数の領域に分けて直前の複数のフレームの非表示領域に1個ずつコピーする。本圧縮に際して、例えば図7に示す現在のフレーム501の領域601のデータが既に1つ前のフレーム502の領域701の部分としてエンコード済みなので、フレーム間予測により現在のフレーム501の符号量が少なくなる。また、加工は、シーンチェーンフレームの直前のフレームに対してなされるので、人間の目に知覚され難いため、画質の劣化を軽減できる。
As described above, the
以上、実施の形態をもとに本発明を説明した。実施の形態は例示であり、本発明の主旨から逸脱しない限り、さまざまな変更、増減を加えてもよい。これらの変更、増減が加えられた変形例も本発明の範囲にあることは当業者に理解されるところである。 The present invention has been described above based on the embodiment. The embodiment is an exemplification, and various changes and increases / decreases may be added without departing from the gist of the present invention. It will be understood by those skilled in the art that modifications to which these changes and increases / decreases are also within the scope of the present invention.
100 画像圧縮装置 110 データ供給部
112 プレ圧縮用画像データメモリ 114 本圧縮用画像データメモリ
116 切替部 120 加算器
122 直交変換部 124 量子化部
126 可変長符号化部 130 レート制御部
132 レート調整部 134 レート評価部
140 逆量子化部 142 逆直交変換部
150 フレームメモリ 152 プレ圧縮用予測フレームメモリ
154 本圧縮用予測フレームメモリ 160 動き補償処理部
170 画像加工部 172 加工実行部
174 ビットレート値保存メモリ 180 ストリーム出力制御部
182 ストリームバッファ 190 動作モード制御部
302 非表示領域 304 表示領域
DESCRIPTION OF
Claims (8)
対象フレームについては前記画像加工部により加工がなされたものを使用し、対象フレーム以外のフレームについては元のフレームを使用して、固定ビットレート方式で圧縮を行う圧縮部とを備えることを特徴とする画像符号化装置。 Of the plurality of frames constituting the moving image, the frame immediately before the scene change frame that is a frame in which the bit rate when the moving image is compressed by the variable bit rate method exceeds a predetermined threshold is set as the target frame, and the scene change An image processing unit for performing processing for copying a partial area of the frame to a target frame corresponding to the scene change frame;
A compression unit that performs compression by a fixed bit rate method using a frame that has been processed by the image processing unit for a target frame, and an original frame for a frame other than the target frame. An image encoding device.
前記画像加工部は、前記プレ圧縮により得られたビットレートが前記所定の閾値を超えるフレームを前記シーンチェンジフレームとすることを特徴とする請求項1から4のいずれか1項に記載の画像符号化装置。 A pre-compression of the moving image by a variable bit rate method, further comprising an operation mode control unit that causes the compression unit to perform the pre-compression using the original frame for all frames;
5. The image code according to claim 1, wherein the image processing unit sets, as the scene change frame, a frame in which a bit rate obtained by the pre-compression exceeds the predetermined threshold value. 6. Device.
対象フレームについては前記加工がなされたものを使用し、対象フレーム以外のフレームについては元のフレームを使用して、固定ビットレート方式で圧縮を行うことを特徴とする画像符号化方法。 Of the plurality of frames constituting the moving image, the frame immediately before the scene change frame that is a frame in which the bit rate when the moving image is compressed by the variable bit rate method exceeds a predetermined threshold is set as the target frame, and the scene change Processing to copy a part of the frame to the target frame corresponding to the scene change frame,
An image encoding method, wherein the target frame is processed and the original frame is used for frames other than the target frame, and compression is performed by a fixed bit rate method.
対象フレームについては前記加工がなされたものを使用し、対象フレーム以外のフレームについては元のフレームを使用して、固定ビットレート方式で圧縮を行う処理をコンピュータに実行させることを特徴とするプログラム。 Of the plurality of frames constituting the moving image, the frame immediately before the scene change frame that is a frame in which the bit rate when the moving image is compressed by the variable bit rate method exceeds a predetermined threshold is set as the target frame, and the scene change Processing to copy a part of the frame to the target frame corresponding to the scene change frame,
A program that causes a computer to execute a compression process using a fixed bit rate method by using the processed target frame and using the original frame for frames other than the target frame.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008219095A JP4886747B2 (en) | 2008-08-28 | 2008-08-28 | Image coding apparatus, image coding method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008219095A JP4886747B2 (en) | 2008-08-28 | 2008-08-28 | Image coding apparatus, image coding method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010056830A JP2010056830A (en) | 2010-03-11 |
JP4886747B2 true JP4886747B2 (en) | 2012-02-29 |
Family
ID=42072286
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008219095A Expired - Fee Related JP4886747B2 (en) | 2008-08-28 | 2008-08-28 | Image coding apparatus, image coding method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4886747B2 (en) |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3050047B2 (en) * | 1994-06-24 | 2000-06-05 | 日本ビクター株式会社 | Moving picture coding apparatus and moving picture coding method |
JP3307143B2 (en) * | 1995-03-20 | 2002-07-24 | 松下電器産業株式会社 | Image encoding method and image encoding device |
JPH09261656A (en) * | 1996-03-22 | 1997-10-03 | Toshiba Corp | Moving picture compression-encoding device |
JP2006074332A (en) * | 2004-09-01 | 2006-03-16 | Pioneer Electronic Corp | Multiplex transmission apparatus and method |
EP1727371A1 (en) * | 2005-05-27 | 2006-11-29 | Thomson Licensing | Method for controlling the encoder output bit rate in a block-based video encoder, and corresponding video encoder apparatus |
JP2008022405A (en) * | 2006-07-14 | 2008-01-31 | Sony Corp | Image processing apparatus and method, and program |
JP4249218B2 (en) * | 2006-12-18 | 2009-04-02 | Nttエレクトロニクス株式会社 | Image encoding device |
-
2008
- 2008-08-28 JP JP2008219095A patent/JP4886747B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2010056830A (en) | 2010-03-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4495702B2 (en) | Video decoding method considering human visual characteristics | |
JP4410225B2 (en) | Moving picture decoding apparatus and method | |
JP4889231B2 (en) | Image encoding method and apparatus, and image decoding method | |
US8243802B2 (en) | Moving picture encoding apparatus, moving picture encoding method, moving picture encoding program, moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program | |
JP5137687B2 (en) | Decoding device, decoding method, and program | |
JP2019114905A (en) | Dynamic picture image encoder, dynamic picture image encoding method and computer program for dynamic picture image encoding | |
WO2007091588A1 (en) | Dynamic image decoding device, decoded image recording device, their method, and program | |
WO2019073802A1 (en) | Sending device, sending method, and program | |
JP4922101B2 (en) | Information processing apparatus and inter prediction mode determination method | |
JP2006148409A (en) | Frame rate conversion method | |
JP6481457B2 (en) | Moving picture coding apparatus, moving picture coding method, moving picture decoding apparatus, and moving picture decoding method | |
WO2012160626A1 (en) | Image compression device, image restoration device, and program | |
JP2014007469A (en) | Image coding device and image coding method | |
JP2006148615A (en) | Program for causing computer to execute decoding apparatus and encoding method | |
JP4886747B2 (en) | Image coding apparatus, image coding method, and program | |
KR102338980B1 (en) | Encoder for adjusting quantization coefficient to remove flicker and device including the same | |
JP2014003523A (en) | Image encoding device, control method therefor and program | |
JP2009260595A (en) | Quantization matrix switching method, video encoder, video encoding program, and its recording medium | |
JP6200220B2 (en) | Image processing apparatus, encoding apparatus, decoding apparatus, and program | |
JP4857243B2 (en) | Image encoding apparatus, control method therefor, and computer program | |
JP5006763B2 (en) | Image encoding apparatus, control method therefor, and computer program | |
WO2008079330A1 (en) | Video compression with complexity throttling | |
JP2021129128A (en) | Encoding device, encoding method, and program | |
JP2005080004A (en) | Dynamic image encoding device | |
JP2007195117A (en) | Moving image decoding device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110302 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20111122 |
|
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: 20111129 |
|
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: 20111209 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20141216 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
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 |
|
LAPS | Cancellation because of no payment of annual fees |