JP2007081744A - Device and method for encoding moving image - Google Patents
Device and method for encoding moving image Download PDFInfo
- Publication number
- JP2007081744A JP2007081744A JP2005265953A JP2005265953A JP2007081744A JP 2007081744 A JP2007081744 A JP 2007081744A JP 2005265953 A JP2005265953 A JP 2005265953A JP 2005265953 A JP2005265953 A JP 2005265953A JP 2007081744 A JP2007081744 A JP 2007081744A
- Authority
- JP
- Japan
- Prior art keywords
- encoding
- filter
- picture
- filter coefficient
- block distortion
- 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.)
- Withdrawn
Links
Images
Abstract
Description
本発明は、プリフィルタ手段と動画像符号化手段から構成される動画像符号化装置および動画像符号化方法、画像伝送装置並びに画像伝送方法に関し、特に低ビットレートにおいても良好な画質を得ることが可能となる画像符号化装置および画像符号化方法、画像伝送装置並びに画像伝送方法に関する。更には、高画質を得るために最適なプリフィルタ手段と動画像符号化手段の制御方法に関する発明である。 The present invention relates to a moving image encoding apparatus and a moving image encoding method, an image transmission apparatus, and an image transmission method that are composed of a prefilter unit and a moving image encoding unit, and particularly to obtain good image quality even at low bit rates. The present invention relates to an image encoding device, an image encoding method, an image transmission device, and an image transmission method. Furthermore, the present invention relates to a control method for prefilter means and moving picture coding means that are optimal for obtaining high image quality.
近年のデジタル信号処理技術の飛躍的な進歩により、従来ならば困難であった動画像の蓄積メディアへの記録や伝送路を介した動画像の伝送が行われている。この場合に、動画像を構成する各々のピクチャは圧縮符号化処理が施されデータ量が大幅に削減される。この圧縮符号化処理として代表的な手法の一つが、例えばMPEG(Moving Picture Experts Group)方式である。 Due to dramatic progress in digital signal processing technology in recent years, recording of moving images to a storage medium and transmission of moving images via a transmission path, which have been difficult in the past, are performed. In this case, each picture constituting the moving image is subjected to compression encoding processing, and the data amount is greatly reduced. One typical technique for this compression encoding process is, for example, the MPEG (Moving Picture Experts Group) system.
MPEG方式に準拠して一連のピクチャを一定のビットレートという条件下で圧縮符号化する場合に、シーン、ピクチャの空間周波数特性、及び量子化スケール値に応じて符号量が大きく異なる。この様な符号化特性をもつ装置を実現する上で符号化歪みを最小限にするための重要な技術が符号量制御である。 When a series of pictures are compression-encoded under a condition of a constant bit rate in accordance with the MPEG system, the amount of codes varies greatly depending on the scene, the spatial frequency characteristics of the pictures, and the quantization scale value. An important technique for minimizing coding distortion in realizing an apparatus having such coding characteristics is code amount control.
符号量制御を実現するためのアルゴリズムについては、これまでの数多く提案されてきた。その中でもMPEG-2符号化方式の標準化の過程で提案されたTM5(非特許文献1)は良く知られているものの一つである。 Many algorithms for realizing the code amount control have been proposed so far. Among them, TM5 (Non-Patent Document 1) proposed in the process of standardization of the MPEG-2 encoding method is one well known.
このTM5では、次の3つのステップ(ステップ1〜3)から構成され、GOP毎にビットレートが一定になる様にQスケールを制御している。
This TM5 is composed of the following three steps (
[ステップ1:ビット割り当て]:GOP内の残り符号量から、次に符号化するピクチャの目標符号量を求める。 [Step 1: Bit allocation]: The target code amount of the picture to be encoded next is obtained from the remaining code amount in the GOP.
[ステップ2:符号量制御]:ステップ1で求めた目標符号量から仮想バッファの状態に応じてQスケールを求める。
[Step 2: Code amount control]: The Q scale is obtained from the target code amount obtained in
[ステップ3::Qスケールの調整]:マクロブロックの空間アクティビティに基づいて、最終的なQスケールを決定する。 [Step 3: Adjust Q Scale]: Determine the final Q scale based on the spatial activity of the macroblock.
前記3つのステップのうち、符号化歪みに最も影響の大きいステップ1の詳細な処理を次に説明する。
Of the three steps, detailed processing of
今、図3に示す通りに現GOP内の10番目のピクチャP3(Pピクチャ)の符号化に先立ち、P3の目標符号量を求めるものとする。ステップ1の処理は次式で表される。
Now, as shown in FIG. 3, prior to encoding the 10th picture P3 (P picture) in the current GOP, the target code amount of P3 is obtained. The processing of
ただし、Rgopは現GOPに対して割り当てられる符号量、Ni、Np及びNbはそれぞれI、P及びBピクチャの現GOPにおける残りのピクチャ数、bits_rateは目標ビットレート、picture_rateはピクチャ・レートを表す。更にはI、P及びBピクチャ毎に、符号化結果からピクチャの複雑度Xi、Xp及びXbを次式で求める。 Here, Rgop represents the amount of code allocated to the current GOP, Ni, Np, and Nb represent the number of remaining pictures in the current GOP for I, P, and B pictures, bits_rate represents the target bit rate, and picture_rate represents the picture rate. Further, for each of the I, P, and B pictures, the picture complexity Xi, Xp, and Xb is obtained from the encoding result by the following equation.
ただし、Ri、Rp及びRbはそれぞれI、P及びBピクチャを符号化した結果得られる符号量、Qi、Qp及びQbはそれぞれI、P及びBピクチャ内のすべてのマクロブロックに対するQスケールの平均値である。式(1)及び式(2)から、次式を用いて、I、P及びBピクチャそれぞれについて目標符号量Ti、Tp及びTbを求める。 Ri, Rp, and Rb are the code amounts obtained as a result of encoding I, P, and B pictures, respectively. Qi, Qp, and Qb are Q scale average values for all macroblocks in the I, P, and B pictures, respectively. It is. From the equations (1) and (2), the target code amounts Ti, Tp, and Tb are obtained for each of the I, P, and B pictures using the following equations.
ただし、Kp=1.0及びKb=1.4である。以上の処理から求めたピクチャP3の目標符号量Tpに基づきステップ2以降においてQスケールを求める。
However, Kp = 1.0 and Kb = 1.4. Based on the target code amount Tp of the picture P3 obtained from the above processing, the Q scale is obtained in
また、プリフィルタを用いて符号量制御手法として、特許文献1に記載された技術が提案されている。この手法によれば、プリフィルタであるLPF(以下プリフィルタLPF)によって符号化手段に入力される各ピクチャの空間周波数を制御する事で、量子化歪みを低減している。
プリフィルタLPFの制御には図4に示すバランス関数なるものを定義し、量子化歪みと画像鮮鋭度劣化との整合を取る。図4の2本の曲線は以下の2つの関数F1及びF2にそれぞれ相当する。F1及びF2はそれぞれ、
F1(動き量、フィルタ係数、Qスケール、符号量)
F2(フィルタ係数、Qスケール)
と表される。関数F1及びF2の交差点をバランス点と称して、この点において符号量と画質の整合が最も優れているQスケールとプリフィルタLPFのフィルタ係数が得られるとしている。
Further, as a code amount control method using a prefilter, a technique described in
For the control of the prefilter LPF, a balance function shown in FIG. 4 is defined to match the quantization distortion and the image sharpness deterioration. The two curves in FIG. 4 correspond to the following two functions F1 and F2, respectively. F1 and F2 are
F1 (motion amount, filter coefficient, Q scale, code amount)
F2 (Filter coefficient, Q scale)
It is expressed. The intersection of the functions F1 and F2 is referred to as a balance point, and the Q scale and the filter coefficient of the pre-filter LPF with the best matching of the code amount and image quality are obtained at this point.
同様にプリフィルタを用いた符号量制御手法のもう一つの従来技術として、特許文献2に記載された方法が提案されている。
この手法によれば、まず符号化難易度Yを以下の通りI、P及びBピクチャ毎に関数Fを使用して求める。
Similarly, a method described in
According to this method, first, the encoding difficulty level Y is obtained using the function F for each of the I, P, and B pictures as follows.
Y= F(累積符号量,平均Qスケール)
次にI、P及びBそれぞれについて求めた符号化難易度Yi、Yp及びYbからフィルタ係数パラメータZを次式から求める。
Y = F (cumulative code amount, average Q scale)
Next, the filter coefficient parameter Z is obtained from the following equations from the encoding difficulty levels Yi, Yp, and Yb obtained for I, P, and B, respectively.
式(4)により得られたフィルタ係数パラメータZの値に応じて、図5に示すグラフから実際のフィルタ係数Sを予め設定してある所定値S0、S1或いはS3から選択する。すなわち、各フィルタ係数Sに対応するフィルタ係数Zに幅をもたせる事によって、急激なフィルタ係数Zの変化を回避している。
TM5には次の様な課題がある。ステップ2及びステップ3において最終的なQスケールを得るために、ピクチャの目標符号量と現マクロブロックまでのピクチャ内の符号量との乖離、及びマクロブロックの空間アクティビティのみを使用している。
TM5 has the following problems. In order to obtain the final Q scale in
すなわち、TM5は符号化対象となるピクチャの目標符号量が既に決定された後、実際に符号化処理を行いながら視覚特性を調整しようとするものである。よって画質の定量的な劣化具合や人間の視覚特性が十分反映されていない課題がある。 That is, TM5 attempts to adjust the visual characteristics while actually performing the encoding process after the target code amount of the picture to be encoded has already been determined. Therefore, there is a problem that the degree of quantitative degradation of image quality and human visual characteristics are not sufficiently reflected.
更には、TM5を搭載した動画像符号化装置が携帯機器等の場合に手ぶれ等が発生した場合には、動き検出を行っても、十分に情報量を削減する事が困難である。これはQスケールのみで符号量を制御しているために、ピクチャ間の相関が低くなり動き検出のみでは十分に符号量を削減出来ないからである。
図6には、携帯機器において15秒間撮影した時の手ぶれの発生状況を採取したグラフを、図7には当該手ぶれが発生している状況下においてMPEG-4符号化を行った時の各ピクチャで使用したQスケールの値の推移である。
Furthermore, if camera shake or the like occurs when the moving picture encoding apparatus equipped with TM5 is a portable device or the like, it is difficult to sufficiently reduce the amount of information even if motion detection is performed. This is because since the code amount is controlled only by the Q scale, the correlation between pictures becomes low, and the code amount cannot be reduced sufficiently only by motion detection.
FIG. 6 is a graph showing the state of occurrence of camera shake when shooting for 15 seconds in a mobile device, and FIG. 7 shows each picture when MPEG-4 encoding is performed in the situation where the camera shake occurs. This is the transition of the value of the Q scale used in.
なお、ピクチャレートは30fpsでありビットレートは4Mbpsである。図7のグラフにおいてQスケールが急激に増加がピクチャNo.30〜60及び120〜150の期間に発生している。この期間に相当する図6の期間は、特に垂直方向の手ぶれが激しく発生している事がわかる。垂直方向の手ぶれにQスケールが大きく反応しているのは、垂直方向の動き検出の検索範囲が、水平方向に比べて狭いためである。 The picture rate is 30 fps and the bit rate is 4 Mbps. In the graph of FIG. 7, the Q scale rapidly increases during the periods of picture Nos. 30 to 60 and 120 to 150. It can be seen that in the period shown in FIG. 6 corresponding to this period, camera shake in the vertical direction is particularly severe. The reason why the Q scale responds greatly to camera shake in the vertical direction is that the search range for motion detection in the vertical direction is narrower than that in the horizontal direction.
また、特許文献1では、プリフィルタLPFを用いる事で、TM5の課題の解決を試みているが、関数F1において引数である動き量を算出するために大規模な回路が必要となる。また、F1及びF2の関数の定義や前記の交点の求め方について何ら言及しておらず、プリフィルタLPFの制御方法及び効果が不明瞭である。
In
更に特許文献2では、フィルタ係数を変更する際に、急激な変化を回避する事で、特許文献1の課題の解決を試みている。しかし、単純に累積符号量と平均Qスケールの情報からのみ、フィルタ係数を予測しているにすぎないので、依然として画質の劣化具合が考慮されているとは言い難い。
Further,
本発明は上記従来技術の課題に鑑みてなされたものであり、画質の劣化具合を考慮しながら、プリフィルタ及び符号化手段を制御することで、割り当てられた目標符号量の条件下において符号量と符号化歪み量が最適な符号化動画像データを得ることのできる動画像符号化装置及び方法を提供するものである。 The present invention has been made in view of the above-described problems of the prior art, and controls the pre-filter and the encoding means while taking into account the degree of image quality degradation, so that the code amount under the condition of the assigned target code amount. And a moving picture coding apparatus and method capable of obtaining coded moving picture data having an optimum coding distortion amount.
上記課題を解決するために、本発明による動画像符号化装置は、入力ピクチャを所定の目標符号量に符号化する動画像符号化装置であって、前記入力ピクチャに対して、与えられたフィルタ特性によりフィルタ処理を行いフィルタ処理ピクチャを生成するプリフィルタ手段と、前記プリフィルタ手段が出力する前記フィルタ処理ピクチャに対して量子化処理を施して符号化することにより符号化データを生成する符号化手段と、前記符号化手段が出力する前記符号化データに対して局所復号化処理を行い、局所復号データを生成する局所復号化手段と、前記フィルタ処理ピクチャ及び前記局所復号データに基づいて、前記プリフィルタ手段のフィルタ係数を決定するフィルタ係数決定手段と、を備えることを特徴とする。 In order to solve the above-described problem, a moving picture coding apparatus according to the present invention is a moving picture coding apparatus that codes an input picture to a predetermined target code amount, and applies a given filter to the input picture. Prefilter means for performing filtering processing according to characteristics to generate a filtered picture, and encoding for generating encoded data by performing quantization processing on the filtered picture output from the prefilter means and encoding A local decoding unit that performs local decoding processing on the encoded data output from the encoding unit and generates local decoded data, and based on the filtering picture and the local decoded data, Filter coefficient determining means for determining the filter coefficient of the pre-filter means.
また、本発明による動画像符号化方法は、入力ピクチャを所定の目標符号量に符号化する動画像符号化方法であって、前記入力ピクチャに対して、与えられたフィルタ特性によりフィルタ処理を行いフィルタ処理ピクチャを生成するプリフィルタ工程と、前記プリフィルタ工程によって得られる前記フィルタ処理ピクチャに対して量子化処理を施して符号化することにより符号化データを生成する符号化工程と、前記符号化工程で得られる前記符号化データに対して局所復号化処理を行い、局所復号データを生成する局所復号化工程と、前記フィルタ処理ピクチャ及び前記局所復号データに基づいて、前記プリフィルタ工程におけるフィルタ処理のフィルタ係数を決定するフィルタ係数決定工程と、を備えることを特徴とする。 The moving picture coding method according to the present invention is a moving picture coding method for coding an input picture to a predetermined target code amount, and performs a filtering process on the input picture with a given filter characteristic. A prefiltering step for generating a filtered picture, a coding step for generating coded data by performing a quantization process on the filtered picture obtained by the prefiltering step, and encoding the coded picture; A local decoding process for performing local decoding processing on the encoded data obtained in the process to generate local decoded data, and a filtering process in the prefiltering process based on the filter processing picture and the local decoded data And a filter coefficient determining step for determining the filter coefficient.
さらなる本発明の特徴は、以下本発明を実施するための最良の形態および添付図面によって明らかになるものである。 Further features of the present invention will become apparent from the best mode for carrying out the present invention and the accompanying drawings.
以上のような構成を備える本発明によれば、画質の劣化具合を考慮しながら、プリフィルタ及び符号化手段を制御するので、割り当てられた目標符号量の条件下において符号量と符号化歪み量が最適な符号化動画像データを得ることができるようになる。 According to the present invention having the above-described configuration, the pre-filter and the encoding unit are controlled in consideration of the deterioration degree of the image quality. Therefore, the code amount and the encoding distortion amount under the condition of the assigned target code amount. Can obtain the optimal encoded moving image data.
<第1の実施形態>
本発明に係る第1の実施形態では、プリフィルタとしてLPFを、符号化手段としてMPEG-4符号化方式に適用している。図1には本第1の実施形態の動画像符号化装置のブロック図を示す。動画像符号化装置は、画像処理手段100、初期値決定手段104、Qスケール決定手段105から構成される。
<First Embodiment>
In the first embodiment according to the present invention, LPF is applied as a prefilter, and MPEG-4 encoding is applied as encoding means. FIG. 1 shows a block diagram of a moving picture coding apparatus according to the first embodiment. The moving image encoding apparatus includes an
[動画像符号化装置の構成]
初めに、画像処理手段100を構成する3つの手段について説明する。プリフィルタ手段101は、3、5及び7タップの1次元の畳み込み型LPFによって構成され、各タップのフィルタ係数はピクチャ毎にフィルタ係数手段107から設定される。プリフィルタ手段101の構成を図8に示す。フィルタ係数はC1、C2、C3及びC4に相当し、ピクチャ内の全画素に対してラスタスキャン順に処理を施す。なお、各タップに対して用いられるフィルタ係数C1〜C4の総和Nは2のべき乗になる様に設定し、総和Nに相当する右シフトを図8中の変数SEKIWAに行いプリフィルタ手段101の出力とする。
[Configuration of video encoding device]
First, three means constituting the image processing means 100 will be described. The prefilter means 101 is constituted by a one-dimensional convolution LPF of 3, 5, and 7 taps, and the filter coefficient of each tap is set from the filter coefficient means 107 for each picture. The configuration of the
また、符号化手段102及び局所復号化手段103はMPEG-4符号化手段に相当し、符号化手段からはMPEG-4符号化ストリームが、局所復号化手段103からは復号ピクチャが出力される。
The
次に、初期値決定手段104について説明する。入力ピクチャが動画像符号化装置に入力される毎に符号化手段102で符号化するピクチャタイプをI或いはPピクチャの二つから一つを選択する。例えばGOV(Group of Vop)を構成するピクチャ数を常時15ピクチャと固定する場合には、先頭のピクチャをI ピクチャとして残りの14ピクチャをPピクチャと選択する。また、選択したピクチャタイプに応じて上述の非特許文献1で示されるTM5を用いる事でQスケールの初期値を決定する。
Next, the initial value determining means 104 will be described. Each time an input picture is input to the moving picture encoding apparatus, one of two picture types, I or P picture, is selected as the picture type to be encoded by the encoding means 102. For example, when the number of pictures constituting a GOV (Group of Vop) is always fixed to 15 pictures, the first picture is selected as the I picture and the remaining 14 pictures are selected as the P pictures. Also, the initial value of the Q scale is determined by using TM5 shown in
次に、Qスケール決定手段105を構成する5つの手段について説明する。ブロック歪み検出手段106は、特願2003-390752「画像処理装置及び方法、並びにコンピュータプログラム及びコンピュータ可読記憶媒体」で開示される空間微分法なる手法を用いる事で、マクロブロック毎にブロック歪み量を検出してピクチャ内の全MBを平均する事によりピクチャのブロック歪み量を検出する。
Next, five means constituting the Q
フィルタ係数選択手段107は、ブロック歪み検出手段から入力されるブロック歪み量を用いてプリフィルタ手段101のフィルタ係数C1〜C4を決定する。 The filter coefficient selection means 107 determines the filter coefficients C1 to C4 of the prefilter means 101 using the block distortion amount input from the block distortion detection means.
テーブル保持手段109には、動画像符号化装置に対して先頭のピクチャを入力する前に予めフィルタ係数C1〜C4とクラスの組み合わせテーブルを設定する。図9には、フィルタ係数C1〜C4の組み合わせを27通りとして、それぞれの27通りフィルタ係数を3つのクラスに分割したテーブルを示す。なお、フィルタNo.はカットオフ周波数が高い順にNo.1〜No.27に割り当てており、No.0はフィルタがオフの状態である。 In table holding means 109, a combination table of filter coefficients C1 to C4 and classes is set in advance before inputting the first picture to the moving picture coding apparatus. FIG. 9 shows a table in which there are 27 combinations of filter coefficients C1 to C4, and each of the 27 filter coefficients is divided into three classes. Note that the filter No. is assigned to No. 1 to No. 27 in descending order of the cut-off frequency, and No. 0 is a state in which the filter is off.
符号化履歴保持手段108は、ピクチャの符号化が完了する毎にブロック歪み検出手段106からブロック歪み量及びフィルタ係数選択手段107からフィルタ特性を保持する。本実施例では、直前10ピクチャ分のブロック歪み量及びフィルタ特性を保持するものとする。
The encoding
Qスケール決定手段110は、Iピクチャの符号化時に初期値決定手段104から入力されるQスケールの値を調整する。過去の複数のピクチャを符号化する際に用いたフィルタクラスNo.の平均を参照して、Qスケールを増減させる。例えば、フィルタクラスNo.が大きい状況時は、符号化難易度が高いピクチャが入力されている状況であり、この様な状況時にはIピクチャへの符号量の配分を小さくする事で、ピクチャ数の多いPピクチャへの符号量を増加させて符号化歪みを低減させる。
The Q
[LPFによって符号量を制御する原理]
プリフィルタ手段101の構成としてLPFを用いて符号量制御を実現する。この目的は、符号化手段102に入力されるピクチャに対してLPFを施す事により、符号化手段102の入力ピクチャの分散を減少させる事である。古典R-D理論により歪みを生じる符号化方式(Lossy)においては、符号量Rcは以下の式(5)に従う事が知られている。
[Principle to control code amount by LPF]
The code amount control is realized using LPF as the configuration of the pre-filter means 101. The purpose of this is to reduce the variance of the input picture of the encoding means 102 by applying LPF to the picture input to the encoding means 102. In an encoding method (Lossy) that causes distortion by the classical RD theory, it is known that the code amount Rc follows the following equation (5).
ただし、Θc及びIcは符号化方式に依存する係数であり、Sfは入力ピクチャの分散、MSEcは符号化歪みである。すなわち、MSEcを一定とした場合に符号量Rcは分散Sfの変数として表現される事がわかる。 However, Θc and Ic are coefficients depending on the coding method, Sf is the variance of the input picture, and MSEc is the coding distortion. That is, it can be seen that the code amount Rc is expressed as a variable of the variance Sf when MSEc is constant.
図10には、図9で示したフィルタNo.からNo.1、6、15、23、27に対応するLPFの分散特性の測定結果を、図11には各々の周波数特性を示す。図10において、横軸は各々LPFの入力ピクチャの分散、縦軸は入出力ピクチャの分散比である。図10からLPFには入出力のピクチャの空間周波数を変化させる特性に加えて、分散を変化させる特性も合わせ持つ事がわかる。更には、LPFのカットオフ周波数と分散特性には強い相関があり、カットオフ周波数が低いLPF程、入出力ピクチャの分散比が小さい事がわかる。 10 shows the measurement results of the dispersion characteristics of LPFs corresponding to the filters No. 1, No. 6, 15, 23, and 27 shown in FIG. 9, and FIG. 11 shows the frequency characteristics of each. In FIG. 10, the horizontal axis represents the variance of the LPF input pictures, and the vertical axis represents the variance ratio of the input / output pictures. From FIG. 10, it can be seen that the LPF has a characteristic for changing the dispersion in addition to the characteristic for changing the spatial frequency of the input and output pictures. Furthermore, it can be seen that there is a strong correlation between the cut-off frequency of LPF and the dispersion characteristics, and the LPF with a lower cut-off frequency has a smaller dispersion ratio of input / output pictures.
図12には、符号化手段102にQスケールを一定した場合に、プリフィルタ手段101のフィルタ係数C1〜C4をフィルタNo.1〜27まで変化させた時の符号量と分散を測定した結果を示す。図12から、式(5)で示される通りに、符号化手段102の入力ピクチャの分散に応じて符号量が減少している事がわかる。 FIG. 12 shows the result of measuring the code amount and variance when the filter coefficients C1 to C4 of the prefilter means 101 are changed from filter Nos. 1 to 27 when the encoding means 102 has a constant Q scale. Show. From FIG. 12, it can be seen that the amount of code decreases in accordance with the variance of the input picture of the encoding means 102 as shown in the equation (5).
よって、プリフィルタ手段101の構成としてLPFを用いて、フィルタ係数C1〜C4を適応的に変化させる事で符号量を制御出来る。
Therefore, the code amount can be controlled by adaptively changing the filter coefficients C1 to C4 using LPF as the configuration of the
[フィルタNo.の選択方法]
フィルタNo.の選択及びQスケールを決定する手段であるQスケール決定手段110の処理フローGetQscale( )を図2に示す。
[Filter No. selection method]
FIG. 2 shows a processing flow GetQscale () of the Q
ステップ201では、直前10ピクチャのブロック歪み量Bcの平均であるBtを算出する。言うまでもなく、本実施例においては算出の対象となるピクチャ数は10には限定されない。算出した平均Btを参照する事によって、直前の10ピクチャの符号化難易度を予測する事が出来る。Btが非常に大きいシーンの場合には、常時カットオフ周波数の低いフィルタNo.が選択される事になり、ブロック歪みで生じる視覚的な劣化よりも、プリフィルタ手段101による高周波成分の除去による劣化が目立つ事になる。
In
そこで、ステップ202 においてブロック歪み量の平均Btと、予め定めた定数LIMIT1とを比較する事によって、プリフィルタ手段101において常時カットオフ周波数の低いフィルタNo.が選択される状況を回避する。図13には、プリフィルタ手段101の動作がオフの期間であるフィルタクラスNo.0の期間とブロック歪み量Bcとの関係を示す。本実施例ではLIMIT1=500000とした。
Therefore, by comparing the average block distortion amount Bt with a predetermined constant LIMIT1 in
ステップ203において、フィルタクラスNo.の選択を行う。図14には、直前のピクチャの符号化時に検出したブロック歪み量Bcの値と、Bcに対応するフィルタクラスNo.との関係を示す。本実施例においては、フィルタクラスNo.1の下限値、すなわちフィルタNo.1の下限値をBc =200000、フィルタクラスNo.2の下限値をBc =250000、フィルタクラスNo.3の下限値をBc =3000000とした。なお、直前のピクチャで使用したフィルタクラスNo.に応じて選択出来るフィルタクラスNo.は制限され、フィルタクラス間の移動は隣のフィルタクラスにのみ許容される。
In
ステップ204においては、直前のピクチャのブロック歪み量Bcに応じて選択したフィルタクラスNo.から相当するフィルタNo.一つを選択する。本実施例においては、フィルタNo.間をBc =5000刻みに設定してある。すなわち、フィルタクラスNo.1には10種類のフィルタNo.1〜10が存在し、フィルタNo.1から順にBc =200000〜204999、Bc =205000〜209999、・・・Bc =245000〜249999が対応する。
In
ステップ205においては、直前10ピクチャのフィルタクラスNo.の平均を算出する。これは、ステップ201と同様にシーンの符号化難易度を過去10ピクチャで用いたフィルタNo.から予測を行っている。ここで、ステップ201で算出したBtを参照しない理由は、次のステップ206における仮Qスケールの調整を、プリフィルタ手段101の動作状況に応じて行うからである。
In
ステップ206では、初期値決定手段から入力される仮Qスケール値の調整を行う。本実施例においては、Iピクチャの場合についてのみ限定して仮Qスケールの調整を行うものとする。これは、目標符号量算出手段106においてピクチャの目標符号量を算出する際に、Pピクチャに対してIピクチャの方が多くの符号量を割り当てており、現在のシーンの符号化難易度が高い場合にはPピクチャに対して割り当てる符号量が足りなくなる状況を回避するためである。本実施例においては、ステップ205において算出したフィルタクラスNo.の直前10ピクチャ分の平均がフィルタクラスNo.3の場合には3を仮Qスケールに加算して符号化手段102のQスケールとし、フィルタクラスNo.2の場合には2を、フィルタクラスNo.1の場合には1をそれぞれ仮Qスケールに加算する。
In
[処理フローの説明]
本実施例の処理フローを図15に、更に図6で示す手ぶれが生じている15秒間のシーケンスを符号化した時のQスケール及びPSNR[dB]の値の推移を図16に、ブロック歪み量Bcの推移を図17に示す。図16及び図17で示す符号化結果は、ビットレートを4Mbpsとした時の符号化結果である。先頭のピクチャを本実施例の動画像符号化処理装置に入力する前に、ステップ1400及びステップ1401の処理を行う。ステップ1400では、初期値決定手段104に目標ビットレートを設定する。ステップ1401では、図9のフィルタクラスNo.及びフィルタNo.に対応する、各々のフィルタ係数C1〜C4をテーブル保持手段109に設定する。
[Description of processing flow]
FIG. 15 shows the processing flow of this embodiment, and FIG. 16 shows the transition of the Q scale and PSNR [dB] values when the 15-second sequence in which the camera shake shown in FIG. 6 occurs is encoded. The transition of Bc is shown in FIG. The encoding results shown in FIGS. 16 and 17 are encoding results when the bit rate is 4 Mbps. Before the leading picture is input to the moving picture coding processing apparatus of the present embodiment, the processing of
次にステップ1402においては、Qスケールの初期値算出を行う。前記の通り本実施例においては従来技術1のTM5を用いてQスケールの初期値を算出する。
Next, in
ステップ1403においては、前記[フィルタNo.の選択方法]で説明した図2に示すフロー処理を行う。ステップ1404においては、ステップ1403で得られたQスケールの値を符号化手段102に設定し、更にステップ1405ではフィルタNo.をフィルタ手段100に設定する。
In
以上のステップ1400〜1405までの処理が完了したら、ステップ1406でプリフィルタ手段101に先頭ピクチャを入力し、プリフィルタ手段101において設定されたフィルタ係数C1〜C4に対応するLPF処理を行う。また、例えばハードウエアで画像処理手段100を構成する場合には、符号化手段102は、プリフィルタ手段101が出力するピクチャ内の画素がマクロブロック分得られたら、順次符号化処理を行う。或いはソフトウエアで画像処理手段100を構成する場合には、プリフィルタ手段100において、1ピクチャ分の処理を完了した後、符号化手段102で符号化処理を行っても良い。
When the processing from
ピクチャ内のすべてのマクロブロックに対して、符号化手段102、局所復号化手段103及びブロック歪み検出手段109において処理が完了した後、本実施例の動画像符号化処理装置に入力するピクチャが更に存在する場合には、ステップ1402の処理から再度行い、最終ピクチャである場合には本実施例の動画像符号化処理装置の処理を完了する。
After all the macroblocks in the picture have been processed by the encoding means 102, the local decoding means 103, and the block distortion detection means 109, a picture to be input to the moving picture encoding processing apparatus of the present embodiment is further added. If it is present, the processing from
図16のQスケールのピクチャ毎推移から、同一ビットレートの符号化ストリームを生成する場合に、TM5によって符号化を行った時と比較して、本実施例によればQスケールの値を低く抑制出来ている事がわかる。特に、従来技術の課題の一つである手ぶれが激しく発生している期間である、ピクチャNo.30〜60及び120〜150の期間におけるQスケールの急激な増加の抑制に効果がある。 When the encoded stream of the same bit rate is generated from the transition of each Q scale picture in FIG. 16, the Q scale value is suppressed to be lower than that when TM5 is used for encoding. I can see that it is made. In particular, this is effective in suppressing a rapid increase in the Q scale during the periods of pictures Nos. 30 to 60 and 120 to 150, which is a period in which camera shake, which is one of the problems of the prior art, is intense.
<第2の実施形態>
第1の実施形態のフィルタ係数選択手段107におけるフィルタNo.の選択を、過去の複数ピクチャの符号化時にブロック歪み検出手段106で検出したブロック歪み量Bcの値に応じて適応的に変化させる場合について説明する。
<Second Embodiment>
When the filter number selection in the filter
第2の実施形態においても、動画像符号化装置のブロック構成は図1と、処理フローは図15と同様である。第1の実施形態と異なる点は図15のステップ1403のGetQscale( )の処理フローである。
Also in the second embodiment, the block configuration of the video encoding apparatus is the same as that in FIG. 1, and the processing flow is the same as that in FIG. The difference from the first embodiment is the processing flow of GetQscale () in
図18には、第2の実施形態におけるGetQscale( )の処理フローを示す。テーブル保持手段109には、第1の実施形態と同様に図9で示されるフィルタクラスNo.とフィルタNo.に対応するフィルタ係数C1〜C4が格納されている。また、各フィルタNo.に対応するブロック歪み量Bcの初期値は、図14で示される第1の実施形態で用いた値とし、フィルタクラスNo.1の下限値を変数BASE1、フィルタクラスNo.2の下限値の初期値を定数LIMIT2とする。第2の実施形態においては、LIMIT2=250000である。 FIG. 18 shows a processing flow of GetQscale () in the second embodiment. Similarly to the first embodiment, the table holding means 109 stores filter class numbers and filter coefficients C1 to C4 corresponding to the filter numbers shown in FIG. The initial value of the block distortion amount Bc corresponding to each filter No. is the value used in the first embodiment shown in FIG. 14, and the lower limit value of the filter class No. 1 is the variable BASE1 and the filter class No. The initial value of the lower limit of 2 is the constant LIMIT2. In the second embodiment, LIMIT2 = 250000.
図18のステップ1701では、直前10ピクチャのブロック歪み量Bcの平均であるBtを算出する。ステップ1702において、直前10ピクチャのブロック歪み量Bcの平均値Btと、フィルタクラスNo.2の下限値の初期値LIMIT2とを比較する。Btの値がLIMIT2以上の場合にはステップ1703でBASE1にBtの値を代入する。以下の場合にはステップ1704でBASE1に200000を代入する。この比較処理により、プリフィルタ手段101でLPFが起動されるブロック歪み量Btの下限値が増加し、特に符号化難易度が高いシーンにおいて常時カットオフ周波数の低いフィルタNo.が選択される事を回避する。その後のステップ1705〜1708の処理は、第1の実施形態と同様である。
In
図19は、ブロック歪み量BcとBASE1の値の推移を示した図である。ポイント1においては、Btの値がLIMIT2以下であるために、過去10ピクチャの符号化難易度が低いと判断し、BASE1には初期値200000を設定する。一方、ポイント2においては、Btの値がLIMIT2以上であるので、BASE1にはBtの値280000が設定される。同様にポイント3においても、Btの値がLIMIT2以上であるので、BASE1にはBtの値260000が設定される。
以上の様に、Bt値が適応的に設定される事により、適したフィルタが選択設定される事が可能となる。
FIG. 19 is a diagram showing transition of the block distortion amount Bc and the value of BASE1. At
As described above, an appropriate filter can be selected and set by adaptively setting the Bt value.
<その他の実施形態>
本発明では、実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体をシステム或は装置に提供し、そのシステム或は装置のコンピュータ(又はCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても達成される。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。このようなプログラムコードを供給するための記憶媒体としては、例えば、フロッピィ(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROMなどを用いることができる。
<Other embodiments>
In the present invention, a storage medium in which a program code of software for realizing the functions of the embodiments is recorded is provided to a system or apparatus, and a computer (or CPU or MPU) of the system or apparatus is stored in the storage medium. It is also achieved by reading and executing the code. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiment, and the storage medium storing the program code constitutes the present invention. As a storage medium for supplying such a program code, for example, a floppy (registered trademark) disk, hard disk, optical disk, magneto-optical disk, CD-ROM, CD-R, magnetic tape, nonvolatile memory card, ROM Etc. can be used.
また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施の形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)などが実際の処理の一部又は全部を行い、その処理によって前述した実施の形態の機能が実現される場合も含まれている。 Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS (operating system) running on the computer based on the instruction of the program code Includes a case where the function of the above-described embodiment is realized by performing part or all of the actual processing.
さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書きこまれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部又は全部を行い、その処理によって前述した実施の形態の機能が実現される場合も含む。 Furthermore, after the program code read from the storage medium is written to the memory provided in the function expansion board inserted into the computer or the function expansion unit connected to the computer, the function is based on the instruction of the program code. This includes the case where the CPU of the expansion board or function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing.
また、上記実施の形態の機能を実現するソフトウェアのプログラムコードがネットワークを介して配信されることにより、システム又は装置のハードディスクやメモリ等の記憶手段又はCD−RW、CD−R等の記憶媒体に格納され、そのシステム又は装置のコンピュータ(又はCPUやMPU)が当該記憶手段や当該記憶媒体に格納されたプログラムコードを読み出して実行することによっても、達成されることは云うまでもない。 In addition, by distributing the program code of the software that realizes the functions of the above-described embodiments via a network, the program code is stored in a storage unit such as a hard disk or memory of a system or apparatus or a storage medium such as a CD-RW or CD-R. Needless to say, this can also be achieved by the computer (or CPU or MPU) stored in the system or apparatus reading and executing the program code stored in the storage means or the storage medium.
Claims (12)
前記入力ピクチャに対して、与えられたフィルタ特性によりフィルタ処理を行いフィルタ処理ピクチャを生成するプリフィルタ手段と、
前記プリフィルタ手段の出力に対して量子化処理を施し、符号化データを生成する符号化手段と、
前記符号化手段の出力に対して局所復号化処理を行い、局所復号データを生成する局所復号化手段と、
前記フィルタ処理ピクチャ及び前記局所復号データに基づいて、前記プリフィルタ手段のフィルタ係数を決定するフィルタ係数決定手段と、
を備えることを特徴とする動画像符号化装置。 A moving image encoding apparatus that encodes an input picture to a predetermined target code amount,
Pre-filter means for generating a filtered picture by performing filtering on the input picture according to a given filter characteristic;
Encoding means for performing quantization processing on the output of the prefilter means and generating encoded data;
Local decoding means for performing local decoding processing on the output of the encoding means and generating local decoded data;
Filter coefficient determining means for determining a filter coefficient of the prefilter means based on the filtered picture and the locally decoded data;
A moving picture encoding apparatus comprising:
前記フィルタ係数決定手段は、前記ブロック歪量に応じて前記テーブル手段から前記ブロック歪量を補正するのに適する前記フィルタ係数を選択することを特徴とする請求項2に記載の動画像符号化装置。 Furthermore, it comprises table means for storing the filter coefficient,
3. The moving picture coding apparatus according to claim 2, wherein the filter coefficient determining unit selects the filter coefficient suitable for correcting the block distortion amount from the table unit according to the block distortion amount. .
前記符号化手段は、前記量子化スケール調整手段によって得られた量子化スケールに基づいて、前記フィルタ処理ピクチャに前記量子化処理を施すことを特徴とする請求項4に記載の動画像符号化装置。 And a quantization scale adjusting unit that adjusts a quantization scale according to information related to a block distortion amount of a plurality of pictures preceded by the encoding order,
5. The moving picture encoding apparatus according to claim 4, wherein the encoding unit performs the quantization process on the filter processing picture based on a quantization scale obtained by the quantization scale adjustment unit. .
前記入力ピクチャに対して、与えられたフィルタ特性によりフィルタ処理を行いフィルタ処理ピクチャを生成するプリフィルタ工程と、
前記プリフィルタ工程によって得られる前記フィルタ処理ピクチャに対して量子化処理を施し、符号化データを生成する符号化工程と、
前記符号化工程で得られる前記符号化データに対して局所復号化処理を行い、局所復号データを生成する局所復号化工程と、
前記フィルタ処理ピクチャ及び前記局所復号データに基づいて、前記プリフィルタ工程におけるフィルタ処理のフィルタ係数を決定するフィルタ係数決定工程と、
を備えることを特徴とする動画像符号化方法。 A moving image encoding method for encoding an input picture to a predetermined target code amount,
A pre-filtering step of generating a filtered picture by performing filtering on the input picture according to a given filter characteristic;
An encoding step of performing quantization processing on the filtered picture obtained by the prefiltering step to generate encoded data;
Performing a local decoding process on the encoded data obtained in the encoding step to generate local decoded data; and
A filter coefficient determination step for determining a filter coefficient of the filter processing in the prefiltering step based on the filter processing picture and the locally decoded data;
A moving picture encoding method comprising:
前記符号化工程は、前記量子化スケール調整工程で得られた量子化スケールに基づいて、前記フィルタ処理ピクチャに前記量子化処理を施すことを特徴とする請求項10に記載の動画像符号化方法。 Furthermore, a quantization scale adjustment step of adjusting a quantization scale according to information on block distortion amounts of a plurality of pictures preceded by the encoding order,
The video encoding method according to claim 10, wherein the encoding step performs the quantization process on the filter processing picture based on the quantization scale obtained in the quantization scale adjustment step. .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005265953A JP2007081744A (en) | 2005-09-13 | 2005-09-13 | Device and method for encoding moving image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005265953A JP2007081744A (en) | 2005-09-13 | 2005-09-13 | Device and method for encoding moving image |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007081744A true JP2007081744A (en) | 2007-03-29 |
Family
ID=37941591
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005265953A Withdrawn JP2007081744A (en) | 2005-09-13 | 2005-09-13 | Device and method for encoding moving image |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007081744A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009094644A (en) * | 2007-10-04 | 2009-04-30 | Canon Inc | Moving image encoding apparatus and method for controlling the same |
JP2009094646A (en) * | 2007-10-04 | 2009-04-30 | Canon Inc | Moving image encoding apparatus and method for controlling the same |
-
2005
- 2005-09-13 JP JP2005265953A patent/JP2007081744A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009094644A (en) * | 2007-10-04 | 2009-04-30 | Canon Inc | Moving image encoding apparatus and method for controlling the same |
JP2009094646A (en) * | 2007-10-04 | 2009-04-30 | Canon Inc | Moving image encoding apparatus and method for controlling the same |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7492819B2 (en) | Video coding apparatus | |
JP2010199656A (en) | Video image pickup device | |
US20040234150A1 (en) | Quantization matrix adjusting method for avoiding underflow of data | |
JP2003018603A (en) | Method and device for encoding moving image | |
JP2005094458A (en) | Device and method for encoding moving image | |
JP4795223B2 (en) | Image processing device | |
JP2006352198A (en) | Image coding device and image-coding program | |
JP2006135557A (en) | Moving picture encoding device | |
KR100950525B1 (en) | Transcoding apparatus and method, target bit allocation, complexity prediction apparatus and method of picture therein | |
JP5396302B2 (en) | Video signal encoding apparatus and video signal encoding method | |
JP2007081744A (en) | Device and method for encoding moving image | |
KR100390167B1 (en) | Video encoding method and video encoding apparatus | |
JP2000261799A (en) | Variable rate moving image encoding device | |
JP6694902B2 (en) | Video coding apparatus and video coding method | |
JP5656575B2 (en) | Image encoding device | |
JPH10108197A (en) | Image coder, image coding control method, and medium storing image coding control program | |
JP2009017127A (en) | Coding device and coding method | |
JP2007020216A (en) | Encoding apparatus, encoding method, filtering apparatus and filtering method | |
JP3779066B2 (en) | Video encoding device | |
JP2005175621A (en) | Motion picture encoder and encoding method | |
JP4747109B2 (en) | Calculation amount adjustment device | |
JP3934772B2 (en) | Variable transfer rate encoding method and apparatus | |
JP3922581B2 (en) | Variable transfer rate encoding method and apparatus | |
JP2007300557A (en) | Image encoding device and image encoding method | |
JP4478480B2 (en) | Video encoding apparatus and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20081202 |