JP5189618B2 - Video encoding method, video encoding apparatus, and video encoding program - Google Patents
Video encoding method, video encoding apparatus, and video encoding program Download PDFInfo
- Publication number
- JP5189618B2 JP5189618B2 JP2010109921A JP2010109921A JP5189618B2 JP 5189618 B2 JP5189618 B2 JP 5189618B2 JP 2010109921 A JP2010109921 A JP 2010109921A JP 2010109921 A JP2010109921 A JP 2010109921A JP 5189618 B2 JP5189618 B2 JP 5189618B2
- Authority
- JP
- Japan
- Prior art keywords
- picture
- gop
- frame
- scene change
- video encoding
- 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.)
- Active
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Description
本発明は,符号化器の画質を向上させる映像符号化技術に関し,特に,GOP(Group Of Pictures) の長さを制御してシーンチェンジを含む映像での画質劣化を抑止する映像符号化方法,映像符号化装置および映像符号化プログラムに関するものである。 The present invention relates to a video encoding technique for improving the image quality of an encoder, and in particular, a video encoding method for controlling the length of a GOP (Group Of Pictures) to suppress image quality deterioration in a video including a scene change, The present invention relates to a video encoding device and a video encoding program.
H.264/AVC(ISO/IEC 14496-10“MPEG-4 Part 10 Advanced Video Coding”)に代表される映像符号化においては,入力映像はGOPと呼ばれる特定の長さのフレーム群に分割される。また,各映像フレームの符号化方法としてフレーム内符号化のみ行うIピクチャ,過去の1枚のフレームの情報を利用して符号化を行うPピクチャ,過去および未来の複数枚のフレームの情報を利用するBピクチャが選択可能である。なお,GOPは,Iピクチャを先頭とする連続する複数のピクチャ群であり,再生や映像編集の単位となる。
H. In video coding represented by H.264 / AVC (ISO / IEC 14496-10 “MPEG-4
図9に,長さが6フレームで,IピクチャとPピクチャ,あるいはPピクチャとIピクチャの間隔が3フレームの場合のGOPの構成例を示す。図9に示すように,IピクチャをGOPの先頭とし,次のIピクチャの直前までをGOPの終端とするのが一般的である。PおよびBピクチャについては,過去あるいは未来のフレームの情報を利用するため,直前あるいは直後にシーンチェンジが発生すると,利用すべきフレームとの間に相関がなくなり,符号化効率が低下する。そこでシーンチェンジが発生した場合,その直後のPピクチャをIピクチャに変更することが従来行われていた。 FIG. 9 shows a configuration example of a GOP when the length is 6 frames and the interval between the I picture and the P picture or between the P picture and the I picture is 3 frames. As shown in FIG. 9, it is general that an I picture is the head of a GOP, and the end of the GOP is just before the next I picture. For P and B pictures, information on past or future frames is used. Therefore, if a scene change occurs immediately before or after, there is no correlation with the frame to be used, and coding efficiency decreases. Therefore, when a scene change occurs, the P picture immediately after it has been changed to an I picture.
例えば,図9に示すようにフレームB2とフレームB3の間でシーンチェンジが発生した場合,フレームP1をIピクチャに変更する。しかし,単純にPピクチャをIピクチャに変換した場合,一般的にはIピクチャの情報量はPピクチャ,Bピクチャに比べて大きいため,Iピクチャの枚数が増加することによる符号量増加,すなわち符号化効率の低下を招く。 For example, as shown in FIG. 9, when a scene change occurs between the frame B2 and the frame B3, the frame P1 is changed to an I picture. However, when a P picture is simply converted to an I picture, the information amount of the I picture is generally larger than that of the P picture and B picture, so that the code amount increases due to the increase in the number of I pictures. This leads to a decrease in efficiency.
シーンチェンジがあった場合に,発生符号量ができるだけ増加しないようにピクチャタイプを変更する従来技術として,例えば特許文献1に記載されているような従来技術aと,特許文献2に記載されているような従来技術bがある。
As conventional techniques for changing the picture type so that the generated code amount is not increased as much as possible when there is a scene change, for example, the conventional technique a described in
(a)従来技術a〔特許文献1参照〕
従来技術aは,シーンチェンジが発生した場合に,時間的にその後にあるフレーム間符号化される予定であったフレームを,フレーム内符号化とすることで,符号化効率低下に伴う画質劣化を抑止する技術である。この従来技術aでは,Iピクチャ枚数の増加を避けるため,シーンチェンジによりIピクチャへの変換が発生した場合,その前後のIピクチャをPピクチャに変換することでIピクチャの数を調整する。これには後述するようにGOP長が延びるという問題点がある。
(A) Prior art a [see Patent Document 1]
In the prior art “a”, when a scene change occurs, a frame that is scheduled to be inter-frame encoded temporally thereafter is set to intra-frame encoding, thereby reducing image quality degradation accompanying a decrease in encoding efficiency. Deterrence technology. In this prior art a, in order to avoid an increase in the number of I pictures, when conversion to an I picture occurs due to a scene change, the number of I pictures is adjusted by converting the preceding and succeeding I pictures into P pictures. This has a problem that the GOP length increases as will be described later.
(b)従来技術b〔特許文献2参照〕
従来技術bでは,最初に設定した第1のGOP構造で符号化を行い,Iピクチャへの変換が発生した際に,該当ピクチャの位置がGOPの先頭となるように,時間的に前のGOP構造を第1のGOP構造と異なるGOP構造に変更する。これには,時間的に前のGOPにおける符号化をやり直す必要があるため,演算量が増加するという問題点がある。
(B) Prior art b [see Patent Document 2]
In the prior art b, encoding is performed with the first GOP structure set first, and when conversion to an I picture occurs, the previous GOP is temporally changed so that the position of the corresponding picture becomes the head of the GOP. The structure is changed to a GOP structure different from the first GOP structure. This has the problem that the amount of calculation increases because it is necessary to redo the encoding in the previous GOP in terms of time.
シーンチェンジに伴い,PあるいはBピクチャをIピクチャに変更することは,シーンチェンジを含む映像に対する符号化効率低下を抑制するためには必須であるが,その際,Iピクチャの枚数が不必要に増加することは避ける必要がある。 Changing the P or B picture to the I picture in accordance with the scene change is indispensable in order to suppress a decrease in the encoding efficiency for the video including the scene change, but at that time, the number of I pictures is unnecessary. It is necessary to avoid an increase.
上記従来技術aでは,IピクチャからPピクチャへの変換を併用することで,Iピクチャ枚数の増加を避ける手法であるが,GOPの先頭付近でIピクチャへの変換が発生した場合,次GOPの先頭のIピクチャがPピクチャに変換され,当該GOPの終端が変換前の次々GOPの終端まで延びてしまい,GOP長が2倍近くなってしまう。 In the conventional technique a, the conversion from the I picture to the P picture is used together to avoid an increase in the number of I pictures. However, when conversion to the I picture occurs near the beginning of the GOP, the next GOP The leading I picture is converted to a P picture, and the end of the GOP extends to the end of the GOP before conversion, and the GOP length becomes nearly double.
図10に,フレームB2とフレームB3の間でシーンチェンジが発生した場合のピクチャタイプの変換例を示す。フレームP1がIピクチャに,フレームI1がPピクチャにそれぞれ変換されており,GOP(n+1)の長さが延びている。 FIG. 10 shows a picture type conversion example when a scene change occurs between the frame B2 and the frame B3. Frame P1 is converted to an I picture, and frame I1 is converted to a P picture, and the length of GOP (n + 1) is extended.
IPTV(Internet Protocol Television)では,最大GOP長が1秒(30フレーム)と規定されており,CM映像のようにシーンチェンジが多発するような映像に対しては,ピクチャタイプ変換に伴ってGOP長が延びても問題ないように,当初のGOP長を短く設定する必要がある。最悪,GOP先頭のIピクチャ直後でシーンチェンジが発生した場合でも規定のGOP長を超えないようにするためには,当初のGOP長は規定の半分(IPTVの場合には15フレーム)とする必要がある。その場合,シーンチェンジが存在しない場合,あるいは少なかった場合にIピクチャの数が単純に倍となるため,符号化効率は大幅に低下する。 In IPTV (Internet Protocol Television), the maximum GOP length is stipulated as 1 second (30 frames). For images with frequent scene changes, such as CM images, the GOP length is accompanied by the picture type conversion. It is necessary to set the initial GOP length to be short so that there is no problem even if it is extended. In the worst case, even if a scene change occurs immediately after the I picture at the beginning of the GOP, the initial GOP length needs to be half the prescribed (15 frames in the case of IPTV) so as not to exceed the prescribed GOP length. There is. In that case, when there are no scene changes or when there are few scene changes, the number of I pictures is simply doubled, so the coding efficiency is greatly reduced.
また,従来技術bでは,直前のGOPの構造を変更するため,構造を変更されたGOPにおける符号化をやり直す必要がある。そのため,最大でGOP長(IPTVであれば最大30フレーム) 分の符号化に要する演算が増加するという問題点がある。シーンチェンジが多発する映像,例えばCM映像のように秒単位でシーンが切り替わるような場合,最悪でほとんどのGOPで符号化をやり直すことになる。その場合,符号化に要する演算時間はほぼ2倍となる。 In the prior art b, since the structure of the immediately preceding GOP is changed, it is necessary to redo the encoding in the GOP whose structure has been changed. Therefore, there is a problem in that the computation required for encoding for the maximum GOP length (up to 30 frames for IPTV) increases. When a scene changes in units of seconds, such as a video with frequent scene changes, for example, a CM video, the encoding is re-executed in the worst GOP. In that case, the calculation time required for encoding is almost doubled.
以上のように,従来法ではシーンチェンジに伴ってPピクチャをIピクチャに変更する際に,Iピクチャの増加に伴い符号量が増加して符号化効率が低下することや,元々設定していたGOP長が延びてしまうという問題点があった。 As described above, in the conventional method, when the P picture is changed to the I picture in accordance with the scene change, the code amount increases with the increase of the I picture, and the encoding efficiency is lowered or originally set. There was a problem that the GOP length would increase.
本発明は,上記課題の解決を図り,シーンチェンジを含む映像での画質劣化を,従来技術よりも効果的に抑止することを目的とする。 An object of the present invention is to solve the above-described problems and to more effectively suppress image quality deterioration in a video including a scene change than in the prior art.
本発明では,上記課題を解決するため,シーンチェンジに伴い,直後のPピクチャをIピクチャに変更する際,変更されたIピクチャを先頭として,設定された最大GOP長分のフレーム群を新たなGOPとするようにそれ以降のフレームのピクチャタイプを変換する。それにより,最大GOP長を確保しながら符号化効率の低下に繋がる不要なIピクチャの増加を抑制する。 In the present invention, in order to solve the above-described problem, when the immediately following P picture is changed to an I picture due to a scene change, a frame group for the set maximum GOP length is newly set starting from the changed I picture. The picture type of subsequent frames is converted so as to be GOP. This suppresses an increase in unnecessary I pictures that leads to a decrease in encoding efficiency while ensuring the maximum GOP length.
すなわち,本発明は,符号化対象である入力映像信号に対してシーンチェンジを検出する手段と,検出されたシーンチェンジ直前のフレームが存在するGOPの長さを延ばすことなく,検出されたシーンチェンジ直後に存在する本来Pピクチャとして符号化される予定であったフレームをIピクチャに変更する手段とを有し,変更されたIピクチャを先頭として,設定された最大GOP長分のフレーム群を新たなGOPとするようにそれ以降のフレームのピクチャタイプを変換して符号化することを主要な特徴とする。
That is, the present invention provides a means for detecting a scene change with respect to an input video signal to be encoded and a detected scene change without increasing the length of the GOP in which the frame immediately before the detected scene change exists. and means for changing the frame Tsu scheduled der encoded as original P-picture exists immediately after the I-picture, as a head a modified I-picture, a frame group of up GOP length fraction that has been set The main feature is that the picture type of a subsequent frame is converted and encoded so as to be a new GOP.
また,上記手段によって符号化を実施するに際して,ピクチャタイプを変換されたフレーム以前のフレームについては再符号化を伴わないことを特徴とする。 In addition, when encoding is performed by the above means, a frame before a frame whose picture type has been converted is not accompanied by re-encoding.
本発明の作用は,以下のとおりである。シーンチェンジを含む映像においては,シーンチェンジ前後のフレーム間の相関が低くなる。そこで,シーンチェンジ直後のPピクチャを,符号化にフレーム間の相関を使用しないIピクチャに変更することで,画質劣化を抑止できる。しかし,単純にPピクチャをIピクチャに変換しただけでは,変換した回数だけIピクチャの枚数が増加してしまう。Iピクチャは一般的に情報量が大きいため圧縮効率が低下する。 The operation of the present invention is as follows. In a video including a scene change, the correlation between frames before and after the scene change becomes low. Therefore, image quality deterioration can be suppressed by changing the P picture immediately after the scene change to an I picture that does not use the correlation between frames for encoding. However, simply converting a P picture to an I picture increases the number of I pictures by the number of conversions. Since I pictures generally have a large amount of information, compression efficiency decreases.
本発明では,変更されたIピクチャを先頭とする新たなGOPとして再設定し,それ以降のフレームのピクチャタイプを変換する。これに伴い,当初IピクチャだったフレームをPピクチャに変換することで,不要なIピクチャの増加を抑制する。また,最大GOP長に従って再設定を行うので,GOP長が延びてしまうこともない。IPTVのように,最大GOP長(30フレーム)が規定されている用途にも対応可能である。 In the present invention, the changed I picture is reset as a new GOP, and the picture type of the subsequent frames is converted. Accordingly, an increase in unnecessary I pictures is suppressed by converting a frame that was originally an I picture into a P picture. Further, since resetting is performed according to the maximum GOP length, the GOP length does not increase. As with IPTV, it can be used for applications in which the maximum GOP length (30 frames) is specified.
また,GOPの再設定は,変更されたIピクチャ以降のフレームに限定される。符号化済みである,該当フレーム以前のフレームについては再設定は不要のため,再度符号化をやり直す必要もないため,スペックの低い低廉な装置での適用も可能である。 Also, GOP resetting is limited to frames after the changed I picture. Since it is not necessary to re-set the frames that have been encoded and before the corresponding frame, it is not necessary to re-encode, so that it can be applied to an inexpensive device with low specifications.
本発明によれば,Iピクチャの不要な増加を抑え,かつ,GOP長を延ばすことなく,シーンチェンジを含む映像での画質劣化を抑止することができる。また,演算量を増やすことなく,シーンチェンジを含む映像での画質劣化を抑止することができる。 According to the present invention, it is possible to suppress an unnecessary increase in I picture and to suppress image quality deterioration in a video including a scene change without increasing the GOP length. In addition, it is possible to suppress image quality degradation in a video including a scene change without increasing the amount of calculation.
以下,本発明の実施の形態について,図面を用いて説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
図1に,本実施形態におけるシーンチェンジが発生した場合のピクチャタイプの変換例を示す。この例では,(最大GOP長)=(変換前のGOP長)=6である。フレームB3とフレームP1の間でシーンチェンジが発生しており,フレームP1をIピクチャに変換し,変換されたフレームI1を先頭とする6フレームを,新たなGOP(n+1)とする。それに応じて,フレームI1をPピクチャに,フレームP2をIピクチャに変更し,以下同様の変更を行って,それ以降のGOP長も6となるようとする。図10の従来技術による結果と比較すると,従来技術では最大GOP長は9まで延びてしまっているの対し,本実施形態では6に収まっている。 FIG. 1 shows an example of picture type conversion when a scene change occurs in this embodiment. In this example, (maximum GOP length) = (GOP length before conversion) = 6. A scene change has occurred between the frame B3 and the frame P1, the frame P1 is converted into an I picture, and the six frames starting from the converted frame I1 are set as new GOP (n + 1). Accordingly, the frame I1 is changed to a P picture, the frame P2 is changed to an I picture, and the same change is performed thereafter, so that the GOP length thereafter becomes 6 as well. Compared with the result of the prior art of FIG. 10, the maximum GOP length has been extended to 9 in the prior art, but is 6 in the present embodiment.
図2に,本実施形態の装置構成例を示す。フレームメモリ100に蓄積された入力映像からシーンチェンジ検出部101によってシーンチェンジを検出し,その情報とあらかじめ設定された最大GOP長から,ピクチャタイプ決定部102において,各フレームのピクチャタイプを決定する。決定されたピクチャタイプに従って,符号化部103にて符号化処理を行う。
FIG. 2 shows a device configuration example of the present embodiment. A scene change is detected by the scene
符号化部103における符号化処理は,従来のMPEG−2,H.264その他の映像符号化を行う装置と同様である。
The encoding process in the
動き参照部104では,入力映像信号について動き探索により動きの検出を行う。予測残差信号生成部115は,入力映像信号とフレーム間予測信号との残差から予測残差信号を生成する。この予測残差信号はDCT変換部106に入力され,DCT変換による変換係数が出力される。変換係数は,量子化部107に入力され,量子化部107で,制御部114から設定された量子化ステップサイズに従って量子化される。この量子化された変換係数は,可変長符号化部111に入力され,可変長符号化部111において可変長符号化される。可変長符号化部111から出力される符号化データは,多重化部112において多重化されバッファ部113に格納される。バッファ部113からは符号化ストリームとして出力される。
The
一方,量子化された変換係数は,逆量子化部108で逆量子化され,逆直交変換部109で逆直交変換されて,復号予測残差信号が生成される。この復号予測残差信号は,加算器116でフレーム間予測信号と加算され,復号信号が生成される。復号信号は,続くフレームの予測符号化における参照画像として用いるために,ローカルデコード画像メモリ110に格納される。予測部105は,動き参照部104で検出された動きベクトルに従って,ローカルデコード画像メモリ110を参照し,フレーム間予測信号を生成する。
On the other hand, the quantized transform coefficient is inversely quantized by the
制御部114は,バッファ部113に格納された符号化データ量から量子化部107における発生符号量を制御する。
The
図3に,本実施形態におけるピクチャタイプ決定の処理フローチャートを示す。まず,処理対象フレーム番号frnを1に初期化する(ステップS10)。続いて,処理対象フレーム番号frnに1を加算して次のフレームを処理対象とし(ステップS11),入力映像の2番目のフレームから最終フレームまで,以下の処理を繰り返す(ステップS12)。 FIG. 3 shows a processing flowchart of picture type determination in the present embodiment. First, the processing target frame number frn is initialized to 1 (step S10). Subsequently, 1 is added to the processing target frame number frn to set the next frame as a processing target (step S11), and the following processing is repeated from the second frame to the final frame of the input video (step S12).
前のフレームと処理対象フレーム(frn)との間でシーンチェンジがあったかどうかを調べ(ステップS13),シーンチェンジが検出されない場合,シーンチェンジを検出するまで処理対象フレーム番号をインクリメントして検出処理を繰り返す(ステップS11〜S13)。 It is checked whether or not a scene change has occurred between the previous frame and the processing target frame (frn) (step S13). If no scene change is detected, the processing target frame number is incremented until a scene change is detected, and detection processing is performed. Repeat (steps S11 to S13).
シーンチェンジを検出した場合,そのフレームのピクチャタイプを調べる。Pピクチャであった場合には(ステップS14),当該フレームをIピクチャに変更し(ステップS18),変更されたIピクチャを先頭として,設定された最大GOP長分のフレーム群を新たなGOPとするように,それ以降のフレームのピクチャタイプを変換する(ステップS19)。その後,ステップS11へ戻り,同様に処理を繰り返す。 If a scene change is detected, the picture type of the frame is checked. If it is a P picture (step S14), the frame is changed to an I picture (step S18), and a frame group corresponding to the set maximum GOP length is set as a new GOP with the changed I picture as the head. Thus, the picture type of the subsequent frames is converted (step S19). Thereafter, the process returns to step S11 and the process is repeated in the same manner.
Iピクチャであった場合には(ステップS15),ピクチャタイプの変換は行わないで,ステップS11へ戻り,処理対象フレーム番号frnをインクリメントして,シーンチェンジ判定処理を繰り返す。 If it is an I picture (step S15), picture type conversion is not performed, the process returns to step S11, the process target frame number frn is incremented, and the scene change determination process is repeated.
PピクチャでもIピクチャでもなかった場合には,処理対象フレーム番号frnをインクリメントし(ステップS16),最終フレームに達していなければ,ステップS14へ戻って,ピクチャタイプの調査を継続する。処理対象フレーム番号frnをインクリメントした際に,入力映像の最終フレームに達した場合には処理を終了する(ステップS17)。 If it is neither a P picture nor an I picture, the processing target frame number frn is incremented (step S16). If the final frame has not been reached, the process returns to step S14 and the picture type investigation is continued. When the process target frame number frn is incremented, if the final frame of the input video is reached, the process is terminated (step S17).
以下,H.264,H.264/AVCにおけるOpen GOPとClosed GOPの場合を例に挙げて具体例を説明する。 Hereinafter, H.C. 264, H. A specific example will be described taking the case of Open GOP and Closed GOP in H.264 / AVC as an example.
〔Open GOPの場合の例〕
初期設定として,入力画像の全フレームに対して,設定したGOP長に応じて各フレームのピクチャタイプを決定する。
[Example of Open GOP]
As an initial setting, the picture type of each frame is determined according to the set GOP length for all frames of the input image.
Bピクチャが存在する場合には,Bピクチャを先頭としPピクチャもしくはIピクチャを終端とするフレーム群を,Bピクチャが存在しない場合には,PピクチャもしくはIピクチャ単体を1単位としてシーンチェンジ検出を実施する。フレーム群の中にシーンチェンジが検出された場合,時間的に最も未来に存在するシーンチェンジのみに着目し,その直後のフレームのピクチャタイプによって以下の処理を切り分ける。以下の処理はフレーム群が入力映像の最後に達するまで実施する。 If a B picture exists, a scene group is detected with a frame group starting with the B picture and ending with a P picture or I picture. If no B picture exists, a scene change is detected with the P picture or I picture as a unit. carry out. When a scene change is detected in a frame group, only the scene change that exists in the future in terms of time is focused on, and the following processing is divided according to the picture type of the immediately following frame. The following processing is performed until the frame group reaches the end of the input video.
(1)シーンチェンジ直後のフレームがIピクチャの場合
ピクチャタイプは変更せずにフレーム群の符号化を実施する。
(1) When the frame immediately after the scene change is an I picture The frame group is encoded without changing the picture type.
(2)シーンチェンジ直後のフレームがPピクチャの場合
当該PピクチャをIピクチャに変更してフレーム群の符号化を実施する。また,このIピクチャを先頭として長さを最大GOP長とする新たなGOPを設定し,それ以降のGOPについても同じ長さを持つGOPの連続として設定する。それに応じて,当該Iピクチャ以降のフレームにおけるピクチャタイプを変更する。
(2) When the frame immediately after the scene change is a P picture The P picture is changed to an I picture and the frame group is encoded. Also, a new GOP with the maximum GOP length starting from this I picture is set, and subsequent GOPs are set as a series of GOPs having the same length. Accordingly, the picture type in the frame after the I picture is changed.
(3)シーンチェンジ直後のフレームがBピクチャの場合
当該フレーム群の終端がPピクチャの場合,(2)と同様の処理を行う。Iピクチャの場合には(1)と同様の処理を行う。
(3) When the frame immediately after the scene change is a B picture When the end of the frame group is a P picture, the same processing as in (2) is performed. In the case of an I picture, the same processing as (1) is performed.
〔Closed GOPの場合の例〕
先のOpen GOPは,フレーム間符号化の際に異なるGOPに属するフレームの情報が利用可能な構造であるが,Closed GOPは,先頭のIピクチャがIDR(Instantaneous Decording Refresh) と呼ばれる特殊なピクチャタイプとなる。IDRピクチャを符号化する時点で,全ての参照ピクチャ(フレーム間符号化で情報を他フレームから利用されるフレーム群)が開放され,利用不可能となる。ここで注意しなければいけないのは,映像を表示する順序と,符号化する順序が一致していないことである。フレームの表示順序と符号化順序の一例を,図4に示す。
[Example of Closed GOP]
The previous Open GOP has a structure in which information of frames belonging to different GOPs can be used during inter-frame coding, but the Closed GOP has a special picture type in which the first I picture is called IDR (Instantaneous Decorating Refresh) It becomes. At the time of encoding an IDR picture, all reference pictures (frame groups in which information is used from other frames in interframe coding) are released and cannot be used. It should be noted here that the order of displaying the video does not match the order of encoding. An example of the frame display order and the encoding order is shown in FIG.
複数のフレームの情報を利用できるBピクチャの特性を活かすために,時間的に未来に存在するIあるいはPピクチャを先に符号化することで,未来のフレームの情報を利用することができる。さらに,Closed GOPの場合,GOP先頭のIピクチャはIDRであるため,I0やI1が符号化された後のフレームは,それ以前に符号化されたフレームの情報を利用することができない。例えばフレームB8〜B11は,Open GOPであれば時間的に過去となるフレームP0の情報を利用できるが,IDRであるI1が符号化された時点でP0の情報は開放されてしまうため,Closed GOPにおいてはP0の情報は利用できない。これらを念頭において,Closed GOPの場合に効率のよいピクチャタイプ変換方法を以下に示す。 In order to take advantage of the characteristics of a B picture that can use information of a plurality of frames, information of future frames can be used by first encoding an I or P picture that exists in the future in time. Furthermore, in the case of a Closed GOP, since the I picture at the head of the GOP is an IDR, the frame after the encoding of I0 and I1 cannot use the information of the previously encoded frame. For example, if the frame B8 to B11 is an Open GOP, the information of the frame P0 that is in the past can be used, but the information of the P0 is released when the ID1 I1 is encoded. In P, the information of P0 cannot be used. With these in mind, an efficient picture type conversion method in the case of Closed GOP is shown below.
初期設定として,入力画像の全フレームに対して,設定したGOP長に応じて各フレームのピクチャタイプを決定する。 As an initial setting, the picture type of each frame is determined according to the set GOP length for all frames of the input image.
Bピクチャが存在する場合には,Bピクチャを先頭としPピクチャもしくはIピクチャを終端とするフレーム群を,Bピクチャが存在しない場合には,PピクチャもしくはIピクチャ単体を1単位としてシーンチェンジ検出を実施する。フレーム群の中に複数のシーンチェンジが検出された場合のピクチャタイプ変更方法を,以下「変更1」および「変更2」として記述するが,フレーム群の中で検出されたシーンチェンジが1つである場合には「変更1」のみ行うものとする。図5〜図8で示す例は,長さが10フレームで,IピクチャとPピクチャ,あるいはPピクチャとIピクチャの間隔が5フレームの場合のGOPである。
If a B picture exists, a scene group is detected with a frame group starting with the B picture and ending with a P picture or I picture. If no B picture exists, a scene change is detected with the P picture or I picture as a unit. carry out. The method of changing the picture type when multiple scene changes are detected in a frame group will be described as “
[変更1]:フレーム群において,時間的に最も未来に存在するシーンチェンジ直後のフレームに着目し,以下の処理を行う。 [Change 1]: In the frame group, paying attention to the frame immediately after the scene change existing in the future in time, the following processing is performed.
(1)Iピクチャである場合
ピクチャタイプは変更せずに,シーンチェンジ直前のフレームをPピクチャに変更する(図5,対象フレーム群はB8〜I1)。フレームB8〜B11は,フレームI1の情報しか利用できないが,フレームI1はシーンチェンジ後のフレームであるため,当該Bピクチャとの相関がなく,そのままでは符号化効率が低下する。そこでフレームB11をPピクチャに変更する。これにより符号化順序は,I1→B8→B9→B10→B11からP1→B8→B9→B10→I1と変更され,フレームB8〜B10はフレームP1の情報を利用することが可能となる。
(1) In the case of an I picture The frame immediately before the scene change is changed to a P picture without changing the picture type (FIG. 5, target frame group is B8 to I1). The frames B8 to B11 can use only the information of the frame I1, but since the frame I1 is a frame after the scene change, there is no correlation with the B picture, and the coding efficiency is lowered as it is. Therefore, the frame B11 is changed to a P picture. Thus, the encoding order is changed from I1 → B8 → B9 → B10 → B11 to P1 → B8 → B9 → B10 → I1 and the frames B8 to B10 can use the information of the frame P1.
(2)Pピクチャである場合
当該PピクチャをIピクチャに変更する。また,このIピクチャを先頭として長さを最大GOP長とする新たなGOPを設定,それ以降のGOPについても同じ長さを持つGOPの連続として設定する。それに応じて,当該Iピクチャ以降のフレームにおけるピクチャタイプを変更する(図6,対象フレーム群はB4〜P0)。上記(1)と同様の理由により,IDRの前にPピクチャを挿入することで符号化効率の低下を抑制する。
(2) In the case of a P picture The P picture is changed to an I picture. In addition, a new GOP having the maximum GOP length starting from this I picture is set, and subsequent GOPs are also set as a series of GOPs having the same length. Accordingly, the picture type in the frame after the I picture is changed (FIG. 6, target frame group is B4 to P0). For the same reason as in (1) above, a decrease in coding efficiency is suppressed by inserting a P picture before IDR.
(3)Bピクチャである場合
フレーム群の終端がPピクチャであればIピクチャに変更し,シーンチェンジ直前のフレームをPピクチャに変更する(図7,対象フレーム群はB4〜P0)。フレームB4,B5が,シーンチェンジ後のPピクチャ情報を利用しなくてもよくするためである。
(3) In the case of a B picture If the end of the frame group is a P picture, it is changed to an I picture, and the frame immediately before the scene change is changed to a P picture (FIG. 7, target frame group is B4 to P0). This is to prevent the frames B4 and B5 from using the P picture information after the scene change.
[変更2]:フレーム群において,複数のシーンチェンジが検出された場合に,「変更1 」の結果に対して以下の処理を行う。
[Change 2]: When a plurality of scene changes are detected in the frame group, the following processing is performed on the result of “
(1)「変更1」でPピクチャに変更されたフレームをIピクチャに変更する。ただし,該当IピクチャはIDRではなく,新たなGOP設定は実施しない(図8)。フレームP0はフレームI0の情報を利用して符号化を行うが,フレームP0の直前にシーンチェンジが発生しているため,P0とI0の相関は低く符号化効率が低下する。そのため,P0を他フレームの情報を利用しないIピクチャに変更する。
(1) The frame changed to the P picture in “
「変更1」および「変更2」のピクチャタイプ変更を実施後,フレーム群の符号化を行う。
After changing the picture type of “
以上の処理はフレーム群が入力映像の最後に達するまで実施する。 The above processing is performed until the frame group reaches the end of the input video.
以上の映像符号化の処理は,コンピュータとソフトウェアプログラムとによっても実現することができ,そのプログラムをコンピュータ読み取り可能な記録媒体に記録することも,ネットワークを通して提供することも可能である。 The video encoding process described above can be realized by a computer and a software program, and the program can be recorded on a computer-readable recording medium or provided through a network.
100 フレームメモリ
101 シーンチェンジ検出部
102 ピクチャタイプ決定部
103 符号化部
104 動き参照部
105 予測部
106 DCT変換部
107 量子化部
108 逆量子化部
109 逆直交変換部
110 ローカルデコード画像メモリ
111 可変長符号化部
112 多重化部
113 バッファ部
114 制御部
115 予測残差信号生成部
116 加算器
DESCRIPTION OF
Claims (4)
符号化対象である入力映像信号に対してシーンチェンジを検出する過程と,
検出されたシーンチェンジ直前のフレームが存在するGOPの長さを延ばすことなく,検出されたシーンチェンジ直後に存在する,本来,順方向予測符号化ピクチャとして符号化される予定であったフレームをフレーム内符号化ピクチャに変更する過程と,
変更されたフレーム内符号化ピクチャを先頭として,設定された最大GOP長分のピクチャ群を新たなGOPとするようにそれ以降のフレームのピクチャタイプを変換して符号化する過程とを有する
ことを特徴とする映像符号化方法。 In a video encoding method for encoding an input video signal in accordance with a GOP structure composed of a plurality of continuous picture groups,
A process of detecting a scene change for an input video signal to be encoded;
A frame that was originally scheduled to be encoded as a forward-predictive coded picture that exists immediately after the detected scene change without extending the length of the GOP in which the frame immediately before the detected scene change exists is framed. Changing to an inner-coded picture;
A process of converting and encoding the picture type of the subsequent frames so that the set of pictures for the maximum GOP length is set as a new GOP, with the changed intra-frame coded picture as the head. A characteristic video encoding method.
GOPの先頭ピクチャがIDRピクチャである場合に,前記検出されたシーンチェンジ直前のピクチャタイプを,順方向予測符号化ピクチャに変更して符号化する
ことを特徴とする映像符号化方法。 The video encoding method of claim 1 Symbol placement,
A video encoding method, wherein, when the first picture of a GOP is an IDR picture, the picture type immediately before the detected scene change is changed to a forward prediction encoded picture and encoded.
符号化対象である入力映像信号に対してシーンチェンジを検出するシーンチェンジ検出手段と,
検出されたシーンチェンジ直前のフレームが存在するGOPの長さを延ばすことなく,検出されたシーンチェンジ直後に存在する,本来,順方向予測符号化ピクチャとして符号化される予定であったフレームをフレーム内符号化ピクチャに変更し,変更されたフレーム内符号化ピクチャを先頭として,設定された最大GOP長分のピクチャ群を新たなGOPとするようにそれ以降のフレームのピクチャタイプを決定するピクチャタイプ決定手段と,
前記ピクチャタイプ決定手段によって決定されたピクチャタイプに従って,入力映像信号を符号化する符号化手段とを備える
ことを特徴とする映像符号化装置。 In a video encoding device that encodes an input video signal in accordance with a GOP structure composed of a plurality of continuous picture groups,
Scene change detection means for detecting a scene change with respect to an input video signal to be encoded;
A frame that was originally scheduled to be encoded as a forward-predictive coded picture that exists immediately after the detected scene change without extending the length of the GOP in which the frame immediately before the detected scene change exists is framed. Picture type that changes to an inner-coded picture, and determines the picture type of the subsequent frames so that the changed group-encoded picture becomes the new GOP with a picture group for the set maximum GOP length as the new GOP A determination means;
A video encoding apparatus comprising: encoding means for encoding an input video signal in accordance with the picture type determined by the picture type determining means.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010109921A JP5189618B2 (en) | 2010-05-12 | 2010-05-12 | Video encoding method, video encoding apparatus, and video encoding program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010109921A JP5189618B2 (en) | 2010-05-12 | 2010-05-12 | Video encoding method, video encoding apparatus, and video encoding program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011239255A JP2011239255A (en) | 2011-11-24 |
JP5189618B2 true JP5189618B2 (en) | 2013-04-24 |
Family
ID=45326731
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010109921A Active JP5189618B2 (en) | 2010-05-12 | 2010-05-12 | Video encoding method, video encoding apparatus, and video encoding program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5189618B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7017223B2 (en) * | 2017-07-31 | 2022-02-08 | 株式会社Free-D | Video compression method |
JP7210944B2 (en) | 2018-09-05 | 2023-01-24 | 富士通株式会社 | Video encoding device, video encoding method and video encoding program |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08307860A (en) * | 1995-04-28 | 1996-11-22 | Toshiba Corp | Scene re-encoder |
JP3951152B2 (en) * | 1997-09-19 | 2007-08-01 | ソニー株式会社 | Image coding apparatus and method |
JP4005691B2 (en) * | 1998-03-19 | 2007-11-07 | 株式会社東芝 | Moving picture coding method and moving picture coding apparatus |
JP2002010263A (en) * | 2000-06-20 | 2002-01-11 | Mitsubishi Electric Corp | Motion picture encoding apparatus and its method |
JP4650454B2 (en) * | 2007-06-04 | 2011-03-16 | ソニー株式会社 | Encoding apparatus and encoding method |
-
2010
- 2010-05-12 JP JP2010109921A patent/JP5189618B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2011239255A (en) | 2011-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10298953B2 (en) | Moving image prediction encoding/decoding system | |
JP5090158B2 (en) | VIDEO INFORMATION RECORDING DEVICE, VIDEO INFORMATION RECORDING METHOD, VIDEO INFORMATION RECORDING PROGRAM, AND RECORDING MEDIUM CONTAINING VIDEO INFORMATION RECORDING PROGRAM | |
JP2007020187A (en) | Video encoding and decoding methods and apparatuses | |
US9319682B2 (en) | Moving image encoding apparatus, control method therefor, and non-transitory computer readable storage medium | |
US9386310B2 (en) | Image reproducing method, image reproducing device, image reproducing program, imaging system, and reproducing system | |
US8165217B2 (en) | Image decoding apparatus and method for decoding prediction encoded image data | |
JP2000295616A (en) | Image coder, image decoder, image coding method, image decoding method and program storage medium | |
JP5650856B2 (en) | Video encoding control method and apparatus | |
JP2008010943A (en) | Video image encoding device and method | |
JP2004523985A (en) | Video encoding method and corresponding encoding device | |
JP5189618B2 (en) | Video encoding method, video encoding apparatus, and video encoding program | |
JP2002199392A (en) | Method and device for encoding image | |
US8594195B2 (en) | Method and apparatus for encoding and decoding at least one image frame that is artificially inserted into image sequence | |
US7983337B2 (en) | Moving picture coding device, moving picture coding method, and recording medium with moving picture coding program recorded thereon | |
JP2007124580A (en) | Moving picture encoding program, program storage medium and encoder | |
JP2007142809A (en) | Video recording apparatus | |
US20110051815A1 (en) | Method and apparatus for encoding data and method and apparatus for decoding data | |
JP5579730B2 (en) | Brightness change coding | |
JP2008311824A (en) | Image encoding device, and image encoding program | |
KR101145399B1 (en) | Apparatus and Method for High-speed Multi-pass Encoding | |
JP2011129979A (en) | Image processor | |
JP5067492B2 (en) | Digital video recording device | |
JP4851270B2 (en) | Moving picture decoding apparatus and decoding method. | |
JP2018113525A (en) | Moving picture encoding device and moving picture encoding method | |
JP2002300586A (en) | Method and apparatus for inserting electronic watermark information for image signal for coding |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120524 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120529 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120718 |
|
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: 20130122 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130124 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160201 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5189618 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 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 |