JP2010206465A - Method, device and program for encoding moving image - Google Patents
Method, device and program for encoding moving image Download PDFInfo
- Publication number
- JP2010206465A JP2010206465A JP2009049113A JP2009049113A JP2010206465A JP 2010206465 A JP2010206465 A JP 2010206465A JP 2009049113 A JP2009049113 A JP 2009049113A JP 2009049113 A JP2009049113 A JP 2009049113A JP 2010206465 A JP2010206465 A JP 2010206465A
- Authority
- JP
- Japan
- Prior art keywords
- picture
- encoding
- intra
- encoded
- code amount
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本発明は動画像符号化方法、動画像符号化装置及び動画像符号化プログラムに係り、特にシーンチェンジや特定の指定画像を高画質化に符号化するための画像間予測符号化を用いた動画像符号化方法、動画像符号化装置及び動画像符号化プログラムに関する。 The present invention relates to a moving picture coding method, a moving picture coding apparatus, and a moving picture coding program, and in particular, a moving image using inter-picture predictive coding for coding a scene change or a specific designated picture with high image quality. The present invention relates to an image encoding method, a moving image encoding apparatus, and a moving image encoding program.
MPEG(Moving Picture Experts Group)に代表されるような画像間予測符号化を用いた動画像符号化装置では、入力動画像信号を3つのピクチャタイプで符号化する。なお、以下の説明では特に断らない限り画像とピクチャは同じ意味で用いる。3つのピクチャタイプとは、フレーム内符号化のみを利用したIピクチャ、フレーム内符号化と片方向の画像間予測符号化を利用したPピクチャ、フレーム内符号化と片方向又は双方向の画像間予測符号化を利用したBピクチャである。これらのピクチャのうち、IピクチャとPピクチャは、他のピクチャの符号化時に参照画像信号(参照ピクチャ)として利用されるピクチャであり、Bピクチャは他のピクチャの符号化時に参照画像信号として利用されないピクチャである。 In a moving picture coding apparatus using inter picture predictive coding represented by MPEG (Moving Picture Experts Group), an input moving picture signal is coded with three picture types. In the following description, images and pictures are used in the same meaning unless otherwise specified. The three picture types are: an I picture that uses only intra-frame coding, a P picture that uses intra-frame coding and unidirectional inter-picture predictive coding, and intra-frame coding and uni-directional or bi-directional pictures. B picture using predictive coding. Among these pictures, the I picture and the P picture are pictures used as reference picture signals (reference pictures) when other pictures are encoded, and the B picture is used as a reference picture signal when other pictures are coded. It is a picture that is not performed.
シーンチェンジなどのない通常の比較的時間相関のある動画像シーケンスを符号化する場合、符号化効率はBピクチャ>Pピクチャ>Iピクチャとなる。また、IピクチャやPピクチャは参照ピクチャとなることから、一般的に高画質化を実現するために符号化量の割り当てはIピクチャ>Pピクチャ>Bピクチャとする。 When a normal moving image sequence having a relatively time correlation without scene change is encoded, the encoding efficiency is B picture> P picture> I picture. In addition, since the I picture and the P picture are reference pictures, in general, the encoding amount is assigned as I picture> P picture> B picture in order to realize high image quality.
シーンチェンジのように時間相関が低いシーンを含む動画像シーケンスを符号化する場合について説明する。 A case where a moving image sequence including a scene having a low time correlation such as a scene change is encoded will be described.
符号化効率について考慮すると、PピクチャやBピクチャは参照ピクチャとの時間相関を利用して予測符号化するため、参照ピクチャと時間相関が低くなるような場合ではPピクチャやBピクチャの符号化効率は著しく低下し、Iピクチャよりも低下することがある。 Considering coding efficiency, P pictures and B pictures are predictively coded using temporal correlation with reference pictures. Therefore, when the temporal correlation with reference pictures is low, the coding efficiency of P pictures and B pictures is low. Is significantly lower than the I picture.
また、ランダムアクセス性について考慮すると、IピクチャはIピクチャ自身を復号することで再生画像を得ることができる。ところが、Pピクチャは参照ピクチャを得るために必要となるIピクチャ及びPピクチャを全て復号する必要がある。更に、BピクチャについてはPピクチャの復号処理に加え、Bピクチャ自身を復号する必要がある。このため、ランダムアクセス性を高めるためにはIピクチャで符号化するのが好ましい。 Considering random accessibility, an I picture can obtain a reproduced image by decoding the I picture itself. However, it is necessary for the P picture to decode all the I and P pictures that are necessary to obtain the reference picture. Further, for the B picture, in addition to the decoding process of the P picture, it is necessary to decode the B picture itself. For this reason, in order to improve random accessibility, it is preferable to encode with an I picture.
シーンチェンジは、一般的にチャプタやタイトルの開始位置であること、DVD(Digital Versatile Disc)レコーダなどでの編集点となること、ビデオカメラなどのインデックス画像の表示などに利用されることが多い。 A scene change is generally used for the start position of a chapter or title, an edit point on a DVD (Digital Versatile Disc) recorder, or the like, or an index image display of a video camera or the like.
次に、シーンチェンジのピクチャまたはその近傍のピクチャをIピクチャとして符号化する従来の動画像符号化方法、装置について説明する。 Next, a conventional moving picture coding method and apparatus for coding a scene change picture or a picture in the vicinity thereof as an I picture will be described.
まず、シーンチェンジ検出を行う従来の動画像符号化装置で符号化した場合のピクチャタイプの符号化順について図16を用いて説明する。 First, the coding order of picture types when coding is performed by a conventional moving image coding apparatus that performs scene change detection will be described with reference to FIG.
図16(a)は、定常状態のピクチャの入力順を示している。図16中のアルファベットはピクチャタイプ、数字は入力順を示す(他の図も同様)。従って、例えば、B0は入力順が0番目でBピクチャ、I2は入力順が2番目でIピクチャ、P5はで入力順が5番目でPピクチャあることを示す。ここで、8番目に入力されたPピクチャ(P8)がシーンチェンジであるとする。定常状態では8番目に入力されたピクチャはPピクチャとして符号化される。 FIG. 16A shows the input order of pictures in a steady state. The alphabet in FIG. 16 indicates the picture type, and the numbers indicate the input order (the same applies to other figures). Therefore, for example, B0 indicates that the input order is 0th and B picture, I2 indicates that the input order is 2nd and I picture, and P5 indicates that the input order is 5th and P picture. Here, it is assumed that the eighth P picture (P8) input is a scene change. In the steady state, the eighth input picture is encoded as a P picture.
図16(b)は、シーンチェンジ検出のない動画像符号化装置でのピクチャの符号化順を示している。この場合、8番目のピクチャはPピクチャ(P8)として符号化されるため、8番目のピクチャから始まるシーンを再生するためにはI2からP5、P8と順に復号する必要がある。なお、Iピクチャから次のIピクチャの直前のピクチャまでのピクチャの集合をGOP(Group of Picture)と呼ぶ。従って、図16(b)ではI2からB13までが1つのGOPとなる。ランダムアクセス性能を考慮してDVDではGOPの長さが0.6秒に規定されている。 FIG. 16B shows the coding order of pictures in the moving picture coding apparatus without scene change detection. In this case, since the 8th picture is encoded as a P picture (P8), in order to reproduce a scene starting from the 8th picture, it is necessary to decode in order from I2 to P5 and P8. A set of pictures from an I picture to a picture immediately before the next I picture is called a GOP (Group of Picture). Accordingly, in FIG. 16B, one GOP is from I2 to B13. In consideration of random access performance, the GOP length is specified to be 0.6 seconds in DVD.
図16(c)は、特許文献1による動画像符号化装置でのピクチャの符号化順を示している。特許文献1では、シーンチェンジが検出されたフレームに対してフレーム内符号化を行うため、図16(a)の入力順の場合、シーンチェンジが検出された8番目のピクチャP8は同図(c)に示すようにIピクチャ(I8)として符号化される。このため、8番目のピクチャから始まるシーンを再生するためには、I8を復号すればよい。
FIG. 16C shows a coding order of pictures in the moving picture coding apparatus according to
上記の特許文献1記載の発明では、シーンチェンジでは符号量を大きくしてIピクチャとして符号化することで高画質、かつ、ランダムアクセス性を高めることができる。ところが、デコーダバッファの状態によって符号量を十分に割り当てる事ができない場合がある。このような状況について図17を用いて説明する。なお、デコーダバッファとは動画像復号化装置に具備されているバッファである。
In the invention described in the above-mentioned
図17は、デコーダバッファ充足量の時間変化の一例を示す。同図において、時刻t(i)、t(i+1)、t(i+2)、・・・、t(j+2)、t(j+3)でピクチャが復号化(動画像符号化装置においては符号化)される。時刻t(i)におけるデコーダバッファ充足量はBt(i)である。このとき時刻t(i)で割り当てることのできる最大符号量はBt(i)となる。時刻t(i)で符号量がBcodのピクチャが復号化されると、デコーダバッファ充足量はBcodだけ減少してBb(i)となる。 FIG. 17 shows an example of a temporal change in the decoder buffer fullness. In the figure, a picture is decoded at time t (i), t (i + 1), t (i + 2),..., T (j + 2), t (j + 3) (encoded in the moving picture coding apparatus). The The decoder buffer fullness at time t (i) is Bt (i). At this time, the maximum code amount that can be allocated at time t (i) is Bt (i). When a picture whose code amount is Bcod is decoded at time t (i), the decoder buffer fullness is decreased by Bcod to Bb (i).
時刻t(i)から時刻t(i+1)にかけて動画像符号化装置より符号化データの入力があって、デコーダバッファ充足量はΔBだけ増加してBt(i+1)となる。以下、ピクチャの復号化のタイミングで同じことが繰り返される。時刻t(j+2)におけるデコーダバッファ充足量はBt(j+2)である。時刻t(j+2)で割り当てる事のできる最大符号量はBt(j+2)であるため、Bt(j+2)<BcodとなるようなBcodを割り当てることはできない。動画像符号化装置においてデコーダバッファの充足量を考慮しないでBcodで符号化した場合にはピクチャのデータが全て揃っていないためアンダーフローと呼ばれる現象となる。MPEGではアンダーフローが生じるような符号化は禁止されている。 From time t (i) to time t (i + 1), encoded data is input from the moving image encoding apparatus, and the decoder buffer fullness increases by ΔB to Bt (i + 1). Thereafter, the same process is repeated at the picture decoding timing. The decoder buffer fullness at time t (j + 2) is Bt (j + 2). Since the maximum code amount that can be allocated at time t (j + 2) is Bt (j + 2), Bcod that satisfies Bt (j + 2) <Bcod cannot be allocated. In a moving image encoding apparatus, when encoding with Bcod without taking into consideration the amount of decoder buffer fullness, a picture called “underflow” occurs because not all picture data is available. In MPEG, encoding that causes underflow is prohibited.
アンダーフローを回避するための手法として、特許文献2にはシーンチェンジのピクチャの符号量を小さくする方法が開示されている。
As a technique for avoiding underflow,
また、特許文献3にはシーンチェンジのピクチャと直前のIピクチャのピクチャタイプを入れ替えることでIピクチャの間隔を長くし、デコーダバッファに余裕を持たせてアンダーフローを発生し難くしている方法が開示されている。図16(d)は、特許文献3による動画像符号化装置でのピクチャの符号化順を示しており、シーンチェンジのピクチャP8と直前のIピクチャI2のピクチャタイプを入れ替え、I8、P2としている。この場合、P2、B0、B1、P5、B3、B4の符号化をやり直すような少なくともGOP単位のフィードバック制御が必要になる。
しかし、特許文献1記載の従来の画像間予測符号化を用いた動画像符号化方法では、デコーダバッファに余裕がない状態でシーンチェンジのピクチャをIピクチャとして符号化することがあり、その場合はデコーダバッファにアンダーフローが生じないように該当Iピクチャの符号量を抑制する必要があり、その結果、シーンチェンジのピクチャの画質を十分に向上させることができない課題がある。
However, in the moving image coding method using the conventional inter-picture prediction coding described in
また、特許文献2記載の動画像符号化方法のように、シーンチェンジのピクチャをBピクチャやPピクチャで符号化してシーンチェンジ近傍のピクチャをIピクチャとする場合には、上記アンダーフローを回避することはできるが、シーンチェンジの画質が劣化し、また、シーンチェンジのピクチャを再生するためにデコード遅延が生じる課題もある。
Further, when the scene change picture is encoded with a B picture or a P picture and the picture in the vicinity of the scene change is an I picture as in the moving picture encoding method described in
更に、シーンチェンジの近傍でデコーダバッファの状態に余裕を持たせるために、シーンチェンジのピクチャと直前のIピクチャのピクチャタイプを入れ替える特許文献3記載の動画像符号化方法では、ピクチャの符号化順序をGOP単位でフィードバック制御を行う必要があるため、符号化装置が大規模化する課題がある。
Further, in the moving picture coding method described in
本発明は、以上の点に鑑みなされたもので、強制的にシーンチェンジのピクチャとして設定した任意のピクチャにおいて、デコーダバッファの充足量が十分でない場合においても、上記の任意のピクチャのAUの符号量を抑制することなく高画質を実現でき、また、上記の任意のピクチャの挿入位置を制御することができる動画像符号化方法、動画像符号化装置及び動画像符号化プログラムを提供することを目的とする。 The present invention has been made in view of the above points. In any picture that is forcibly set as a scene change picture, the AU code of any picture can be obtained even when the decoder buffer is not sufficient. To provide a moving picture coding method, a moving picture coding apparatus, and a moving picture coding program capable of realizing high image quality without suppressing the amount and controlling the insertion position of the above arbitrary picture. Objective.
上記目的を達成するため、第1の発明の動画像符号化方法は、符号化ピクチャタイプを画像内符号化ピクチャとして設定する入力動画像信号中のピクチャを、外部入力に基づき指示する指示ステップと、指示ステップで指示されたピクチャの符号化ピクチャタイプを画像内符号化ピクチャに設定すると共に、指示ステップで指示されない入力動画像信号の各ピクチャに対しては符号化ピクチャタイプを所定の規則に従い設定するピクチャタイプ設定ステップと、設定された符号化ピクチャタイプに基づいた画像間予測符号化を用いる符号化により入力動画像信号を符号化して得たピクチャデータ、及び画像内符号化ピクチャに設定されたピクチャを予め設定された所定の目標符号量または予め設定された所定の量子化幅に基づいて画像内符号化して得たピクチャデータを出力すると共に、そのピクチャデータの符号量情報を出力する符号化ステップと、符号量情報に基づいて、仮想的なデコーダバッファの充足量を計算するデコーダバッファ充足量計算ステップと、画像内符号化ピクチャに設定されたピクチャの符号化に続く符号化ステップでの符号化後のデコーダバッファの充足量が、画像内符号化ピクチャのピクチャデータの符号量以上となった時に、その時点でのピクチャデータに続いて画像内符号化ピクチャのピクチャデータを配置するよう並び換えを指示する並び換え制御ステップと、ピクチャデータをバッファ手段に一時蓄積する第1の蓄積ステップと、並び換え制御ステップによりピクチャデータの並び換えの指示があった場合に、バッファ手段より出力されたピクチャデータを遅延バッファ手段に一時蓄積する第2の蓄積ステップと、並び換え制御ステップの指示によりバッファ手段又は遅延バッファ手段より並び換えの順で出力されたピクチャデータの時間情報を書き換える時間情報訂正ステップとを含むことを特徴とする。 In order to achieve the above object, a moving picture coding method according to a first aspect of the invention includes an instruction step for designating a picture in an input moving picture signal for setting a coded picture type as an intra-picture coded picture based on an external input. The coded picture type of the picture designated in the designation step is set to the intra-picture coded picture, and the coded picture type is set according to a predetermined rule for each picture of the input moving image signal not designated in the designation step. A picture type setting step, and picture data obtained by encoding an input video signal by encoding using inter-picture predictive encoding based on the set encoded picture type, and an intra-picture encoded picture. Intra-picture code based on a predetermined target code amount set in advance or a predetermined quantization width set in advance An encoding step for outputting the picture data obtained in this manner and outputting the code amount information of the picture data, and a decoder buffer sufficient amount calculating step for calculating a sufficient amount of the decoder buffer based on the code amount information When the amount of decoder buffer after encoding in the encoding step subsequent to the encoding of the picture set to the intra-picture coded picture is equal to or larger than the code quantity of the picture data of the intra-picture coded picture, A rearrangement control step for instructing rearrangement so that the picture data of the intra-picture coded picture is arranged following the picture data at that time; a first accumulation step for temporarily accumulating the picture data in the buffer means; When there is an instruction to rearrange the picture data in the control step, the picture output from the buffer means is displayed. A second accumulation step for temporarily accumulating the data in the delay buffer means, and a time information correction step for rewriting the time information of the picture data output from the buffer means or the delay buffer means in the order of rearrangement according to the instruction of the rearrangement control step; It is characterized by including.
また、上記目的を達成するため、第2の発明の動画像符号化方法は、符号化ピクチャタイプを画像内符号化ピクチャとして設定する入力動画像信号中のピクチャを、外部入力に基づき指示する指示ステップと、指示ステップで指示されたピクチャの符号化ピクチャタイプを画像内符号化ピクチャに設定すると共に、指示ステップで指示されない入力動画像信号の各ピクチャに対しては符号化ピクチャタイプを所定の規則に従い設定するピクチャタイプ設定ステップと、設定された符号化ピクチャタイプに基づいた画像間予測符号化を用いる符号化により入力動画像信号を符号化して得たピクチャデータ、及び画像内符号化ピクチャに設定されたピクチャを予め設定された所定の目標符号量または予め設定された所定の量子化幅に基づいて画像内符号化して得たピクチャデータを出力すると共に、そのピクチャデータの符号量情報を出力する第1の符号化ステップと、符号量情報に基づいて、仮想的なデコーダバッファの充足量を計算するデコーダバッファ充足量計算ステップと、シーンチェンジを検出した時点の画像内符号化ピクチャに設定されたピクチャを第1の符号化ステップにより符号化した時のデコーダバッファの充足量に、アンダーフロー又はオーバーフローが生じる場合は、当該画像内符号化ピクチャに設定されたピクチャより前の時間で表示すべきピクチャであり、かつ、画像内符号化ピクチャに設定されたピクチャの符号化に続いて符号化させる[参照ピクチャ挿入周期(M)−1]枚の範囲内の所定枚数分の各ピクチャの目標符号量を、画像内符号化ピクチャに設定されたピクチャを符号化したときのデコーダバッファ充足量にアンダーフロー又はオーバーフローが生じない値に決定する目標符号量調整ステップと、目標符号量調整ステップで決定された目標符号量に基づき所定枚数分のピクチャを符号化して得たピクチャデータを出力する第2の符号化ステップと、ピクチャデータのビットストリーム中での順序を、シーンチェンジを検出した時点の画像内符号化ピクチャのピクチャデータよりも、所定枚数分のピクチャのピクチャデータが前の位置に配置されるように並び換える指示を行う並び換え制御ステップと、ピクチャデータをバッファ手段に一時蓄積する第1の蓄積ステップと、並び換え制御ステップによりピクチャデータの並び換えの指示があった場合に、バッファ手段より出力されたピクチャデータを遅延バッファ手段に一時蓄積する第2の蓄積ステップと、並び換え制御ステップの指示によりバッファ手段又は遅延バッファ手段より並び換えの順で出力されたピクチャデータの時間情報を書き換える時間情報訂正ステップとを含むことを特徴とする。 In order to achieve the above object, the moving picture coding method according to the second aspect of the invention provides an instruction for instructing a picture in an input moving picture signal for setting a coded picture type as an intra-picture coded picture based on an external input. And an encoded picture type of the picture instructed in the instructing step is set to an intra-picture coded picture, and the encoded picture type is set to a predetermined rule for each picture of the input moving image signal not instructed in the instructing step. A picture type setting step that is set according to the above, and picture data obtained by encoding an input moving picture signal by encoding using inter-picture predictive encoding based on the set encoded picture type, and set in an intra-picture encoded picture Images based on a predetermined target code amount set in advance or a predetermined quantization width set in advance A first encoding step for outputting picture data obtained by encoding, and for outputting code amount information of the picture data, and a decoder buffer for calculating a sufficient amount of a virtual decoder buffer based on the code amount information Underflow or overflow occurs in the fullness calculation step and the fullness of the decoder buffer when the picture set in the intra-picture coded picture at the time when the scene change is detected is coded in the first coding step Is a picture to be displayed at a time before the picture set in the intra-picture coded picture, and is coded following the coding of the picture set in the intra-picture coded picture [insert reference picture The target code amount of each picture for a predetermined number of frames within a range of (cycle (M) -1] is defined as an intra-picture coded picture. A target code amount adjustment step for determining a value that does not cause an underflow or an overflow in the decoder buffer fullness when a specified picture is encoded, and a predetermined number of sheets based on the target code amount determined in the target code amount adjustment step The second encoding step for outputting the picture data obtained by encoding the picture of the picture, and the order in the bit stream of the picture data, than the picture data of the intra-picture encoded picture at the time when the scene change is detected, A rearrangement control step for instructing rearrangement so that picture data of a predetermined number of pictures is arranged at the previous position, a first accumulation step for temporarily accumulating picture data in the buffer means, and a rearrangement control step When there is an instruction to rearrange picture data, the output from the buffer means A second accumulation step for temporarily accumulating the cut data in the delay buffer means, and a time information correction step for rewriting the time information of the picture data output from the buffer means or the delay buffer means in the order of rearrangement according to the instruction of the rearrangement control step It is characterized by including.
また、上記の目的を達成するため、第3の発明の動画像符号化装置は、 符号化ピクチャタイプを画像内符号化ピクチャとして設定する入力動画像信号中のピクチャを、外部入力に基づき指示する指示手段と、指示手段で指示されたピクチャの符号化ピクチャタイプを画像内符号化ピクチャに設定すると共に、指示手段で指示されない入力動画像信号の各ピクチャに対しては符号化ピクチャタイプを所定の規則に従い設定するピクチャタイプ設定手段と、設定された符号化ピクチャタイプに基づいた画像間予測符号化を用いる符号化により入力動画像信号を符号化して得たピクチャデータ、及び画像内符号化ピクチャに設定されたピクチャを予め設定された所定の目標符号量又は予め設定された所定の量子化幅に基づいて画像内符号化して得たピクチャデータを出力すると共に、そのピクチャデータの符号量情報を出力する符号化手段と、符号量情報に基づいて、仮想的なデコーダバッファの充足量を計算するデコーダバッファ充足量計算手段と、画像内符号化ピクチャに設定されたピクチャの符号化に続く符号化手段での符号化後のデコーダバッファの充足量が、画像内符号化ピクチャのピクチャデータの符号量以上となった時に、その時点でのピクチャデータに続いて画像内符号化ピクチャのピクチャデータを配置するよう並び換えを指示する並び換え制御手段と、ピクチャデータを一時蓄積するバッファ手段と、並び換え制御手段によりピクチャデータの並び換えの指示があった場合に、バッファ手段より出力されたピクチャデータを一時蓄積する遅延バッファ手段と、並び換え制御手段の指示によりバッファ手段又は遅延バッファ手段より並び換えの順で出力されたピクチャデータの時間情報を書き換える時間情報訂正手段とを有することを特徴とする。 In order to achieve the above object, the moving picture coding apparatus according to the third aspect of the invention designates a picture in an input moving picture signal that sets a coded picture type as an intra-picture coded picture based on an external input. An instruction means and an encoded picture type of a picture designated by the instruction means are set as an intra-picture coded picture, and a coded picture type is set for each picture of the input moving image signal not designated by the instruction means. Picture type setting means for setting according to the rules, picture data obtained by encoding an input moving picture signal by encoding using inter-picture predictive encoding based on the set encoded picture type, and intra-picture encoded pictures Obtained by intra-picture coding of a set picture based on a predetermined target code amount set in advance or a predetermined quantization width set in advance Encoding means for outputting picture data and outputting code quantity information of the picture data; decoder buffer full quantity calculating means for calculating a virtual decoder buffer full quantity based on the code quantity information; When the fullness of the decoder buffer after encoding by the encoding means following the encoding of the picture set as the encoded picture becomes equal to or greater than the code amount of the picture data of the intra-picture encoded picture, Rearrangement control means for instructing rearrangement so that picture data of an intra-picture coded picture is placed following picture data, buffer means for temporarily storing picture data, and instruction for rearrangement of picture data by rearrangement control means If there is a delay buffer means for temporarily storing picture data output from the buffer means, rearrangement And a time information correcting means for rewriting the time information of the picture data output in the rearrangement order from the buffer means or the delay buffer means in accordance with an instruction from the control means.
また、上記の目的を達成するため、第4の発明の動画像符号化装置は、符号化ピクチャタイプを画像内符号化ピクチャとして設定する入力動画像信号中のピクチャを、外部入力に基づき指示する指示手段と、指示手段で指示されたピクチャの符号化ピクチャタイプを画像内符号化ピクチャに設定すると共に、指示ステップで指示されない入力動画像信号の各ピクチャに対しては符号化ピクチャタイプを所定の規則に従い設定するピクチャタイプ設定手段と、設定された符号化ピクチャタイプに基づいた画像間予測符号化を用いる符号化により入力動画像信号を符号化して得たピクチャデータ、及び画像内符号化ピクチャに設定されたピクチャを予め設定された所定の目標符号量または予め設定された所定の量子化幅に基づいて画像内符号化して得たピクチャデータを出力すると共に、そのピクチャデータの符号量情報を出力する第1の符号化手段と、符号量情報に基づいて、仮想的なデコーダバッファの充足量を計算するデコーダバッファ充足量計算手段と、シーンチェンジを検出した時点の画像内符号化ピクチャに設定されたピクチャを第1の符号化手段により符号化した時のデコーダバッファの充足量に、アンダーフロー又はオーバーフローが生じる場合は、当該画像内符号化ピクチャに設定されたピクチャより前の時間で表示すべきピクチャであり、かつ、画像内符号化ピクチャに設定されたピクチャの符号化に続いて符号化させる[参照ピクチャ挿入周期(M)−1]枚の範囲内の所定枚数分の各ピクチャの目標符号量を、画像内符号化ピクチャに設定されたピクチャを符号化したときのデコーダバッファ充足量にアンダーフロー又はオーバーフローが生じない値に決定する目標符号量調整手段と、目標符号量調整手段で決定された目標符号量に基づき所定枚数分のピクチャを符号化して得たピクチャデータを出力する第2の符号化手段と、ピクチャデータのビットストリーム中での順序を、シーンチェンジを検出した時点の画像内符号化ピクチャのピクチャデータよりも、所定枚数分のピクチャのピクチャデータが前の位置に配置されるように並び換える指示を行う並び換え制御手段と、ピクチャデータを一時蓄積するバッファ手段と、並び換え制御手段によりピクチャデータの並び換えの指示があった場合に、バッファ手段より出力されたピクチャデータを一時蓄積する遅延バッファ手段と、並び換え制御手段の指示によりバッファ手段又は遅延バッファ手段より並び換えの順で出力されたピクチャデータの時間情報を書き換える時間情報訂正手段とを有することを特徴とする。 In order to achieve the above object, a moving picture coding apparatus according to a fourth aspect of the invention designates a picture in an input moving picture signal that sets a coded picture type as an intra-picture coded picture based on an external input. An instruction means and an encoded picture type of a picture indicated by the instruction means are set as an intra-picture encoded picture, and an encoded picture type is set to a predetermined value for each picture of the input moving image signal not indicated in the instruction step. Picture type setting means for setting according to the rules, picture data obtained by encoding an input moving picture signal by encoding using inter-picture predictive encoding based on the set encoded picture type, and intra-picture encoded pictures Intra-picture coding of a set picture based on a predetermined target code amount set in advance or a predetermined quantization width set in advance A first encoding means for outputting the obtained picture data and outputting a code amount information of the picture data, and a decoder buffer sufficient amount calculation for calculating a virtual decoder buffer sufficient amount based on the code amount information If an underflow or overflow occurs in the sufficient amount of the decoder buffer when the picture set as the intra-picture coded picture at the time when the scene change is detected is coded by the first coding means, This is a picture to be displayed at a time before the picture set as the intra-picture coded picture, and is coded subsequent to the coding of the picture set as the intra-picture coded picture [reference picture insertion period (M ) -1] The target code amount of each picture for the predetermined number of pictures within the range of the picture is represented by the picture set as the intra-picture coded picture. A target code amount adjusting means for determining a value that does not cause an underflow or an overflow in the decoder buffer fullness at the time of encoding, and encoding a predetermined number of pictures based on the target code amount determined by the target code amount adjusting means The second encoding means for outputting the obtained picture data, and the order of the picture data in the bit stream are set to a predetermined number of pictures from the picture data of the intra-picture encoded picture at the time when the scene change is detected. When a rearrangement control means for instructing rearrangement so that picture data is arranged at the previous position, a buffer means for temporarily storing picture data, and an instruction for rearrangement of picture data by the rearrangement control means , Delay buffer means for temporarily storing picture data output from the buffer means, and rearrangement control means And time information correction means for rewriting the time information of the picture data output from the buffer means or the delay buffer means in the order of rearrangement.
また、上記の目的を達成するため、第5の発明の動画像符号化プログラムは、第1の発明の動画像符号化方法の各ステップをコンピュータにより実行させることを特徴とする。 In order to achieve the above object, a moving picture coding program according to a fifth aspect of the present invention causes a computer to execute each step of the moving picture coding method according to the first aspect of the invention.
更に、上記の目的を達成するため、第6の発明の動画像符号化プログラムは、第2の発明の動画像符号化方法の各ステップをコンピュータにより実行させることを特徴とする。 Furthermore, in order to achieve the above object, a moving picture coding program according to a sixth aspect of the invention is characterized by causing a computer to execute each step of the moving picture coding method according to the second aspect of the invention.
本発明によれば、強制的にシーンチェンジのピクチャとして設定した任意のピクチャにおいて、デコーダバッファの充足量が十分でない場合においても、上記任意のピクチャのAUのビットスリームでの並びの順序を変更することで、上記の任意のピクチャのAUの符号量を抑制することなく高画質を実現できる。 According to the present invention, even when an arbitrary picture that is forcibly set as a scene change picture does not have a sufficient amount of decoder buffer, the order of arrangement of the arbitrary picture in the AU bitstream is changed. In this way, high image quality can be realized without suppressing the AU code amount of the above arbitrary picture.
また、本発明によれば、強制的にシーンチェンジに設定した任意のピクチャをIピクチャとして符号化することでランダムアクセス性能を高めることができ、更に、GOP単位のフィードバック制御の必要がなくメモリ量を削減できる。 In addition, according to the present invention, random access performance can be improved by forcibly coding an arbitrary picture set to scene change as an I picture, and further, there is no need for feedback control in GOP units, and the amount of memory Can be reduced.
以下、図面を参照しながら本発明の実施の形態を説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
(第1の実施の形態)
図1は、本発明になる動画像符号化装置の第1の実施の形態のブロック図を示す。本実施形態の動画像符号化装置100は、シーンチェンジ検出部10、ピクチャ変換部20、ピクチャタイプ設定部30、符号化部40、デコーダバッファ充足量計算部50、AU並び換え制御部60、AUバッファ70、AU遅延バッファ80、及び時間情報訂正部90で構成される。
(First embodiment)
FIG. 1 shows a block diagram of a first embodiment of a video encoding apparatus according to the present invention. The moving
シーンチェンジ検出部10は、動画像に関する入力画像信号(すなわち、入力動画像信号)がシーンチェンジであるかどうかを検出する。ピクチャ変換部20は、入力動画像信号をピクチャデータに変換する。ピクチャタイプ設定部30は、シーンチェンジ検出部10から出力されるシーンチェンジ情報がオンであるかオフであるかを判定し、後述するように、その判定結果に応じたピクチャタイプを設定する。
The scene
符号化部40は、ピクチャタイプが参照ピクチャであるかどうかを判定し、後述するように、その判定結果に応じてピクチャデータを符号化する。ピクチャデータは符号化されるとAU(アクセスユニット)となる。また、符号化部40はAU符号量cをデコーダバッファ充足量計算部50に送る。なお、本実施形態では符号化部40は符号化方法としてMPEG−4AVCを用いるとする。
The
デコーダバッファ充足量計算部50は、n番目のピクチャデータのデコーダバッファ充足量Bf(n)と、次ピクチャ(n+1番目のピクチャ)のデコード前デコーダバッファ充足量Bft(n+1)とを計算する。
The decoder buffer
AU並び換え制御部60は、並び換えAU符号量e、AU遅延情報g及び遅延AU出力情報hを生成する。AUバッファ70は、符号化部40から出力されたAUを一時蓄積した後、そのAUを並び換え情報がオフであれば、時間情報訂正部90に転送し、並び換え情報がオンであれば、AU遅延バッファ80に転送する。
The AU
AU遅延バッファ80は、一時蓄積しているAUaを、遅延AU出力情報hがオンであるかオフであるかに応じて、時間情報訂正部90又は符号化部40に転送する。また、AU遅延バッファ80は遅延AU出力情報hを符号化部40に転送する。時間情報訂正部90は、入力されたAUの時間情報(表示順序と符号化順序)を訂正して符号化データとして出力する。
The
上記構成の動画像符号化装置100は、ビデオカメラ(カムコーダ)、レコーダ、オーサリングなどの用途に用いられる。また、この動画像符号化装置100による符号化フォーマットは、規制を与えなければDVD/BD(Blu-ray Disc)/AVCHD(Advanced Video Coding HD)規格に不適合のため独自フォーマットとなる。
The moving
次に、本実施の形態の動画像符号化装置100の動作について、図2のフローチャート等を併せ参照して説明する。
Next, the operation of the moving
動画像に関する入力画像信号は、シーンチェンジ検出部10に送られると同時に、ピクチャ変換部20に送られる。シーンチェンジ検出部10は、現フレームの入力画像信号と1フレーム前に入力された入力画像信号との間で画素単位の絶対差分和(SAD)を計算し、そのSADと所定値THaとの比較結果に基づいてシーンチェンジを検出する(ステップS11)。すなわち、シーンチェンジ検出部10は、SADが所定値THa以上である場合はシーンチェンジであると判定し、シーンチェンジ情報をオンにする。また、SADが所定値THaに満たない場合はシーンチェンジ情報をオフとする。シーンチェンジ検出部10は、このようにして得られたシーンチェンジ情報をピクチャタイプ設定部30に送る。なお、シーンチェンジの判定に使用する指標はSADに限定する必要はなく、二乗誤差和などを用いてもよい。
An input image signal relating to a moving image is sent to the scene
ピクチャ変換部20は、入力画像信号のライン間相関を計算し、ライン間相関が所定値THb以下であればピクチャ構造をフレームピクチャとし、所定値THbより大きければピクチャ構造をフィールドピクチャとするピクチャ変換を行う(ステップS12)。具体的には、ピクチャ変換部20は、ピクチャ構造がフレームピクチャ(例えば、水平方向720画素、垂直方向480画素)であれば、1つの入力画像信号について1つのピクチャデータを符号化部40に送り、ピクチャ構造がフィールドピクチャ(例えば、水平方向720画素、垂直方向240画素)であれば、1つの入力画像信号について2つのピクチャデータを符号化部40に送る。また、ピクチャ変換部20は、変換後のピクチャ構造をピクチャタイプ設定部30に送る。
The
なお、本実施形態では入力画像がプログレッシブ映像であるとし、ピクチャ構造が常にフレームピクチャである場合について説明する。 In the present embodiment, a case will be described in which the input image is a progressive video and the picture structure is always a frame picture.
ピクチャタイプ設定部30は、シーンチェンジ検出部10から入力されたシーンチェンジ情報がオン(ON)であるかどうか判定し(ステップS13)、オフ(OFF)であれば、予め設定されたIピクチャ挿入周期(N)、参照ピクチャ挿入周期(M)に基づいてピクチャタイプをIピクチャ、Pピクチャ、Bピクチャのいずれかに設定する(ステップS14)。なお、Iピクチャ挿入周期N及び参照ピクチャ挿入周期Mについては、入力画像の分析結果に基づいて可変とすることも可能である。
The picture
一方、ピクチャタイプ設定部30は、シーンチェンジ情報がオンであれば、ピクチャタイプをIピクチャに設定する(ステップS15)。ピクチャタイプ設定部30は、以上のように設定したピクチャタイプとシーンチェンジ情報を符号化部40に送る。
On the other hand, if the scene change information is ON, the picture
符号化部40は、まずピクチャタイプが参照ピクチャであるかどうかを判定する(ステップS16)。ピクチャタイプが参照ピクチャでなければ、ピクチャデータとピクチャタイプとを符号化部40内の後述する入力並び換えバッファに保持して入力画像単位の処理を完了する(ステップS17)。
The
一方、符号化部40は、ステップS16でピクチャタイプが参照ピクチャであると判定したときは、以下の処理を行う。
On the other hand, when the
符号化部40は、シーンチェンジ情報がオフであれば、参照ピクチャに対して一般に良く知られているTM(MPEGテストモデル)などの目標符号量設定方法に基づいて目標符号量を決定する。符号化部40はシーンチェンジ情報がオンであれば、ステップS15で決定したIピクチャに対して、上記TMなどの目標符号量設定方法に基づいて算出された目標符号量をα倍(αは1.0以上)に重み付けした目標符号量を決定する。αは固定値でもよく、ピクチャの複雑度を示すアクティビティなどから算出してもよい。また、目標符号量の替わりに量子化幅を設定してもよい(以上、ステップS18)。
If the scene change information is OFF, the
符号化部40は、上記のように決定した目標符号量又は量子化幅に基づいて、ピクチャ変換部20から入力されたピクチャデータを、指定されたピクチャタイプで符号化し、その符号化したピクチャデータであるアクセスユニット(AU)aをAUバッファ70に送ると共に、AU符号量cをデコーダバッファ充足量計算部50に送る(ステップS19)。
The
デコーダバッファ充足量計算部50は、n番目のピクチャデータのデコーダバッファ充足量Bf(n)を、デコーダバッファ初期遅延時間(init_delay)、ビットレート(bitrate)、ピクチャ間隔(pic_period)、AU符号量(codBits)から次式(1a)、(1b)に基づいて算出する。
The decoder buffer
Bf(0)=bitrate * init_delay−codBits(0); (n=0) (1a)
Bf(n)=Bf(n-1)+Bitrate * pic_period−codBits; (n≧1) (1b)
また、デコーダバッファ充足量計算部50は、次ピクチャ(n+1番目のピクチャ)のデコード前デコーダバッファ充足量Bft(n+1)を次式(2)に基づいて算出する。
Bf (0) = bitrate * init_delay−codBits (0); (n = 0) (1a)
Bf (n) = Bf (n-1) + Bitrate * pic_period-codBits; (n ≧ 1) (1b)
Further, the decoder buffer sufficient
Bft(n+1)=Bf(n)+Bitrate * pic_period; (2)
デコーダバッファ充足量計算部50は、AU符号量(codBits)及び算出したデコーダバッファ充足量Bf(n)と次ピクチャのデコード前デコーダバッファ充足量Bft(n+1)とをAU並び換え制御部60に送る(以上、ステップS20)。図1では、デコーダバッファ充足量Bf(n)と次ピクチャのデコード前デコーダバッファ充足量Bft(n+1)とをまとめてデコーダバッファ充足量bとして示す。
Bft (n + 1) = Bf (n) + Bitrate * pic_period; (2)
The decoder buffer
なお、一般的にMPEG4−AVCではデコーダバッファサイズ、デコーダバッファ初期充足量、ビットレート、ピクチャ間隔は符号化データ内に多重される。 In general, in MPEG4-AVC, the decoder buffer size, the decoder buffer initial fullness, the bit rate, and the picture interval are multiplexed in the encoded data.
次に、AU並び換え制御部60は、並び換えAU符号量eが“0”より大きく、かつ、次ピクチャのデコード前デコーダバッファ充足量Bft(n+1)が並び換えAU符号量e以上であれば、遅延AU出力情報hをオンとし、それ以外の場合は遅延AU出力情報hをオフとする。すなわち、次ピクチャのデコードによりデコードバッファが破綻(アンダーフロー)する場合には遅延AU出力情報hがオンとされる。AU並び換え制御部60は、この遅延AU出力情報hをデコーダバッファ充足量計算部50及びAUバッファ70に送る(以上、ステップS21)。
Next, the AU
続いて、AU並び換え制御部60は、デコーダバッファ充足量Bf(n)が所定値β未満であればAU遅延情報gをオンにし、デコーダバッファ充足量Bf(n)が所定値β以上であればAU遅延情報gをオフとする。AU並び換え制御部60は、AU遅延情報gを符号化部40、デコーダバッファ充足量計算部50、及びAUバッファ70に送る。本実施形態では所定値βを“0”とする。
Subsequently, the AU
更に、AU並び換え制御部60は、AU遅延情報gがオンである場合には、並び換えAU符号量eをデコーダバッファ充足量計算部50より送られたAU符号量cに設定する。並び換えAU符号量eの初期値は“0”である。AU並び換え制御部60は、並び換えAU符号量eをデコーダバッファ充足量計算部50に送る(以上、ステップS22)。
Further, when the AU delay information g is on, the AU
次に、AUバッファ70は、AU並び換え制御部60から入力されたAU遅延情報gがオンであるかどうかを判定する(ステップS23)。AUバッファ70は、AU遅延情報gがオフであれば、符号化部40から供給されてAUバッファ70に一時蓄積していたAUaを時間情報訂正部90に転送し(ステップS24)、AU遅延情報gがオンであれば、一時蓄積していたAUaをAU遅延バッファ80に転送する(ステップS25)。また、AUバッファ70は、遅延AU出力情報hをAU遅延バッファ80に送る。
Next, the
ステップS25に続いて、デコーダバッファ充足量計算部50は、AU並び換え制御部60から送られたAU遅延情報gがオンであれば、デコーダバッファ充足量を並び換えAU符号量(RoCodBits)を用いて式(3)のように再計算する(ステップS26)。
Subsequent to step S25, if the AU delay information g sent from the AU
Bf(n)=Bf(n)+RoCodBits; (3)
ステップS24又はS26の処理に続いて、AU遅延バッファ80は、AUバッファ70から入力された、ステップS21で設定された遅延AU出力情報hがオンであるか否かを判定する(ステップS27)。AU遅延バッファ80は、遅延AU出力情報hがオンであれば、AUバッファ70から供給されて一時蓄積していたAU遅延バッファ80内のAUaを時間情報訂正部90と符号化部40とにそれぞれ転送する(以上、ステップS28)。
Bf (n) = Bf (n) + RoCodBits; (3)
Following the processing of step S24 or S26, the
ステップS28に続いて、デコーダバッファ充足量計算部50は、AU並び換え制御部60から送られた遅延AU出力情報hがオンであれば、デコーダバッファ充足量を並び換えAU符号量(RoCodBits)eを用いて式(4)に基づいて再計算する(ステップS29)。
Subsequent to step S28, if the delay AU output information h sent from the AU
Bf(n)=Bf(n)−RoCodBits; (4)
ステップS29の再計算後、又はステップS27でAU遅延バッファ80が遅延AU出力情報hがオフであると判定したときには、時間情報訂正部90は、AUバッファ70又はAU遅延バッファ80から入力されたAUaの時間情報(表示順序と符号化順序)を訂正して符号化データとして出力する(ステップS30)。
Bf (n) = Bf (n) −RoCodBits; (4)
After the recalculation in step S29 or when the
その後、符号化部40は内部の後述する入力並び換えバッファ403が空でなければ、上記の目標符号量の設定(ステップS18)まで戻り、入力並び換えバッファ403が空になるまで、入力並び換えバッファ403に格納されたピクチャデータを入力並び換えバッファ403に格納されたピクチャタイプに従って繰り返し符号化処理を行う。
After that, if the input rearrangement buffer 403 (described later) is not empty, the
次に、符号化部40の符号化時の詳細な動作について図3のブロック図及び図4のフローチャートを用いて説明する。符号化部40は、図3のブロック図に示すように、目標符号量設定部401、符号化本部402、入力並び換えバッファ403、復号化部405、DPB406、及び復号化制御部404で構成される。
Next, a detailed operation of the
目標符号量設定部401は、符号化本部402よりピクチャタイプとAU符号量とが入力され、前述したステップS18で説明したように目標符号量を設定する。目標符号量設定部401は、設定した目標符号量を符号化本部402に送る。
The target code
符号化本部402は、ピクチャタイプが参照ピクチャであった場合、ピクチャタイプと目標符号量設定部401より送られた目標符号量とに従ってピクチャデータを符号化してAUを得る。このとき、ピクチャ間予測符号化で利用される参照ピクチャはDPB(Decoded Picture Buffer)46内で保持されているピクチャを利用する(以上、ステップS41)。
When the picture type is a reference picture, the encoding
符号化本部402は、得られたAUをAUバッファ70に送る。また、符号化本部402は、AU符号量を目標符号量設定部401及びデコードバッファ充足量計算部50に送る。更に、符号化本部402はピクチャタイプが参照ピクチャを示すタイプであればAUを復号化部405に送る(以上、ステップS42)。
The
一方、符号化本部402は、ピクチャタイプ設定部30から送られたピクチャタイプが参照ピクチャであるかどうか判定する(ステップS43)。参照ピクチャでない場合、符号化本部402は、ピクチャタイプとピクチャ変換部20より送られたピクチャデータとを入力並び換えバッファ403に送る(以上、ステップS17を再記述)。
On the other hand, the
一方、符号化本部402は参照ピクチャであると判定した場合、復号化制御部404がAU並び換え制御部60から送られるIピクチャを遅らせるか否かを示すAU遅延情報がオフであるか否かを判定する(ステップS44)。
On the other hand, if the coding
復号化制御部404は、AU遅延情報がオフであると判定した場合は、復号化部405に局部AU復号信号を送る。すなわち、この場合は符号化本部402からのAUを復号化させるIピクチャを遅らせないので、通常通りIピクチャ、Pピクチャの局部AU復号信号を用いる。復号化部405は、復号化制御部404より局部AU復号信号が送られた場合は、符号化本部402から送られたAUを復号化する(以上、ステップS45)。
When the
そして、復号化部405は、復号化したピクチャデータをDPB406に転送する(ステップS46)。ここで、符号化本部402から復号部405に送られるAUは必ずしも完全なAUである必要はなく、MPEG−4AVCの局部復号できる情報があればよい。
Then, the
ステップS46の処理に続いて、又はステップS43で参照ピクチャでないと判定された場合、又はステップS44でAU遅延情報がオンであると判定された場合は、復号化制御部404は、AU遅延バッファ80から送られた遅延AU出力情報がオンであるかどうかを判定する(ステップS47)。
Following the processing of step S46, or when it is determined in step S43 that the picture is not a reference picture, or when it is determined in step S44 that the AU delay information is on, the
復号化制御部404は、遅延AU出力情報がオフであると判定したときは、後述する復号化部405による復号を行わせることなく処理を終了する。一方、復号化制御部404は、遅延AU出力情報がオンであると判定したときは、遅らせたIピクチャを復号させることを指示する外部AU復号信号を復号化部405に送り、復号化部405によりAU遅延バッファ80から送られたAUを復号させる(ステップS48)。そして、復号化部405は、AUを復号化して得たピクチャデータをDPB406に転送する(ステップS49)。
When the
DPB406は、復号化部405から送られたピクチャデータを保持する。DPB406は、符号化本部402より参照要求があった場合にはDPB内のピクチャデータを符号化本部402に送る。
The
入力並び換えバッファ403は、符号化本部402から送られたピクチャデータとピクチャタイプを保持する。そして、入力並び換えバッファ403は、符号化本部402からデータの送信要求があった場合に、入力並び換えバッファ403内のピクチャデータとピクチャタイプを符号化本部402に送る。
The
ここで、本実施形態に基づいて符号化した場合のピクチャタイプの並びについて図5を参照して説明する。図5(a)は、8番目のPピクチャがシーンチェンジであるような入力ピクチャが入力される様子を示している。図5(b)は5番目のピクチャP5までが図示の順番で符号化された後、8番目のピクチャが符号化のために入力された状態を示す。8番目のPピクチャP8が符号化のために入力された時点では、ピクチャデータは参照ピクチャ毎に符号化されるため、I2、B0、B1、続いてP5、B3、B4は既に符号化されている。 Here, the arrangement of picture types in the case of encoding based on the present embodiment will be described with reference to FIG. FIG. 5A shows a state where an input picture in which the eighth P picture is a scene change is input. FIG. 5B shows a state where the eighth picture is input for encoding after the fifth picture P5 is encoded in the order shown. Since the picture data is encoded for each reference picture when the eighth P picture P8 is input for encoding, I2, B0, B1, and then P5, B3, B4 are already encoded. Yes.
図5(b)に示すように、8番目のPピクチャ(P8)は、シーンチェンジを検出したピクチャであるためIピクチャ(I8)として符号化される。また、図5(b)において、8番目のピクチャの次のBピクチャであるB6、B7は、参照ピクチャではないために入力並び換えバッファ403に格納されている。このBピクチャB6、B7は、シーンチェンジのIピクチャI8を参照ピクチャとして符号化されるピクチャのうち、I8より前の時間で表示したいピクチャである。
As shown in FIG. 5B, the eighth P picture (P8) is a picture from which a scene change has been detected, and is therefore encoded as an I picture (I8). In FIG. 5B, B6 and B7, which are B pictures following the eighth picture, are stored in the
このときI8の符号化後のデコーダバッファ充足量が所定値β以上であれば、図5(b)の順序で符号化される。I8の符号化後のデコーダバッファ充足量が所定値β未満であれば、デコーダバッファがアンダーフローする恐れがあるので、I8はAU遅延バッファ80に送られる。続いて図5(b)に示すようにB6が符号化される。そのB6符号化後の次ピクチャのデコード前デコーダバッファ充足量がI8の符号量以上であれば、デコーダバッファがアンダーフローしないように、図5(c)に示すように、符号化後のB6に続いて、AU遅延バッファ80により遅延された符号化後のI8が出力される。これにより、符号化されたピクチャデータのビットストリーム中での順序は、図5(c)に示すように、B6の次にI8が配置されたものとなる。
At this time, if the decoder buffer fullness after encoding I8 is equal to or larger than the predetermined value β, encoding is performed in the order shown in FIG. If the decoder buffer fullness after encoding I8 is less than the predetermined value β, the decoder buffer may underflow, so I8 is sent to the
一方、上記B6符号化後の次ピクチャのデコード前デコーダバッファ充足量がI8の符号量未満であれば、続いて図5(b)に示すようにB7が符号化される。そのB7符号化後の次ピクチャのデコード前デコーダバッファ充足量がI8の符号量以上であれば、デコーダバッファがアンダーフローしないように、図5(d)に示すように、符号化後のB6、B7に続いて、AU遅延バッファ80により遅延された符号化後のI8が出力される。これにより、符号化されたピクチャデータのビットストリーム中での順序は、図5(d)に示すように、B6、B7、I8の順となる。
On the other hand, if the decoder buffer full amount before decoding of the next picture after B6 encoding is less than the code amount of I8, then B7 is encoded as shown in FIG. If the decoder buffer full amount before decoding of the next picture after the B7 encoding is equal to or greater than the code amount of I8, as shown in FIG. Subsequent to B7, the encoded I8 delayed by the
図5(e)は、更に符号化したI8を遅延させて符号化したP11の後に配置されている例を示す。図5(e)に示すピクチャの並び順では、GOP0内に本来はGOP1内で表示すべきP11が含まれている。そのため、GOP1(I8)から再生を開始した場合にP11を再生させることができない。 FIG. 5E shows an example in which the encoded I8 is arranged after P11 which is encoded after being delayed. In the picture arrangement order shown in FIG. 5 (e), P11 that should originally be displayed in GOP1 is included in GOP0. Therefore, P11 cannot be reproduced when reproduction is started from GOP1 (I8).
そこで、P11を再生させるための仕組みとして、図15に示すような付加情報(MPEG−4AVCではSEI(Supplemental enhancement information)に相当)をI8に付与することで、P11を再生可能とすることもできる。 Therefore, as a mechanism for reproducing P11, it is possible to make P11 reproducible by giving I8 additional information (corresponding to SEI (Supplemental enhancement information in MPEG-4 AVC)) as shown in FIG. .
図15の付加情報の各要素について説明する。「present_frame_cnt_minus1」は、本SEIが付与されたピクチャにおいて符号化済で表示するピクチャの数を示す。「recovery_frame_cnt[i]」は、i番目に表示するピクチャを再生するために再生を開始するピクチャの位置を示す情報である。ここでは、本SEIが付与されたピクチャからの符号化順における位置を示すものとする。また、「display_frame_cnt[i]」は、i番目に表示するピクチャの位置を示す情報である。ここでは、本SEIが付与されたピクチャからの符号化順における位置を示すものとする。 Each element of the additional information in FIG. 15 will be described. “Present_frame_cnt_minus1” indicates the number of pictures that are encoded and displayed in the picture to which the present SEI is assigned. “Recovery_frame_cnt [i]” is information indicating the position of a picture from which playback is started in order to play the i-th picture to be displayed. Here, the position in the coding order from the picture to which the present SEI is assigned is shown. “Display_frame_cnt [i]” is information indicating the position of the i-th picture to be displayed. Here, the position in the coding order from the picture to which the present SEI is assigned is shown.
図5(e)の例でI8に本SEIを付与するとする。このとき、符号化済みで表示するピクチャはP11のみであり、「present_frame_cnt_minus1」には“1”、「recovery_frame_cnt[0]」にはI2を示す値として“−9”を、「display_frame_cnt [0]」にはP11を示す値として“−1”を、それぞれ符号化する。このようにすることで、I8から再生を始めた場合でもP11を再生でき、表示順序に従ってP11を表示することが可能となる。 Assume that the SEI is assigned to I8 in the example of FIG. At this time, the encoded picture to be displayed is only P11, "present_frame_cnt_minus1" is "1", "recovery_frame_cnt [0]" is "-9" as a value indicating I2, and "display_frame_cnt [0]" Is encoded with “−1” as a value indicating P11. In this way, even when playback is started from I8, P11 can be played back, and P11 can be displayed according to the display order.
次に、本実施の形態の効果について説明する。 Next, the effect of this embodiment will be described.
本実施形態の画像間予測符号化を用いた動画像符号化装置100では、デコーダバッファに余裕がない状態でシーンチェンジの入力画像をIピクチャとして符号化した場合でも、デコーダバッファが破綻(オーバーフロー又はアンダーフロー)しないように、シーンチェンジのIピクチャのビットスリーム上の位置を変更することで、シーンチェンジのIピクチャの符号量を抑制することなく高画質を実現できる。
In the moving
また、本実施の形態によれば、シーンチェンジのピクチャをIピクチャとして符号化することでランダムアクセス性能を高めることができる。更に、本実施の形態によれば、GOP単位のフィードバック制御の必要がなくメモリ量を削減できる。 Further, according to the present embodiment, the random access performance can be improved by encoding the scene change picture as an I picture. Furthermore, according to the present embodiment, the amount of memory can be reduced without the need for feedback control in GOP units.
(第2の実施の形態)
図6は、請求項3記載の本発明になる動画像符号化装置の第2の実施の形態のブロック図を示す。本実施形態の動画像符号化装置200は、強制Iピクチャ指示部15、ピクチャ変換部20、ピクチャタイプ設定部35、符号化部40、デコーダバッファ充足量計算部50、AU並び換え制御部60、AUバッファ70、AU遅延バッファ80、及び時間情報訂正部90で構成される。同図中、図1と同一構成部分には同一符号を付してある。
(Second Embodiment)
FIG. 6 is a block diagram showing a second embodiment of the moving picture coding apparatus according to the present invention. The moving
本実施形態の動画像符号化装置200は、図1に示した動画像符号化装置100と比較して、図1のシーンチェンジ検出部10の替りに、強制Iピクチャ指示部15を設けたものである。
Compared with the moving
本実施の形態の動画像符号化装置200は、ビデオカメラ(カムコーダ)の録画中においてユーザ指定によって任意画像を写真画質のような超高画質とするような形態を想定している。規制を与えなければDVD/BD/AVCHD規格不適合のため独自フォーマットとなる。
The moving
次に、動画像符号化装置200の動作について図7のフローチャートを併せ参照して説明する。図7中、図2と同一処理ステップには同一符号を付し、その説明を省略する。強制Iピクチャ指示部15は、外部からの強制Iピクチャ指示情報がオンである場合には、シーンチェンジ情報をオンとし、強制Iピクチャ指示情報がオフである場合にはシーンチェンジ情報をオフとする。強制Iピクチャ指示部15は、このシーンチェンジ情報をピクチャタイプ設定部35に送る(以上、ステップS35)。
Next, the operation of the moving
すなわち、本実施の形態では、入力画像信号のSADと所定値THaとの比較結果に関係なく、強制Iピクチャ指示部15は、外部からの強制Iピクチャ指示情報に基づいてシーンチェンジ情報をオン又はオフとする。強制Iピクチャ指示部15は、外部からの強制Iピクチャ指示情報がオンである場合には、ピクチャタイプ設定部35に対して入力画像信号中のピクチャをIピクチャに設定するよう指示する。
That is, in the present embodiment, regardless of the comparison result between the SAD of the input image signal and the predetermined value THa, the forced I picture
ピクチャ変換部20による入力画像信号のピクチャ変換後(ステップS12)、ピクチャタイプ設定部35は、強制Iピクチャ指示部15から入力されたシーンチェンジ情報がオンであるかどうか判定する(ステップS13)。ピクチャタイプ設定部35は、シーンチェンジ情報がオフであれば、予め設定されたIピクチャ挿入周期(N)、参照ピクチャ挿入周期(M)に基づいてピクチャタイプをIピクチャ、Pピクチャ、Bピクチャのいずれかに設定する(ステップS14)。一方、ピクチャタイプ設定部35は、シーンチェンジ情報がオンであれば、ピクチャタイプをIピクチャに設定する(ステップS15)。
After picture conversion of the input image signal by the picture conversion unit 20 (step S12), the picture
ピクチャタイプ設定部35は、以上のように設定したピクチャタイプとシーンチェンジ情報を符号化部40に送る。以後は第1の実施の形態と同様の動作が行われる。
The picture
次に、本実施の形態の効果について説明する。 Next, the effect of this embodiment will be described.
本実施形態の画像間予測符号化を用いた動画像符号化装置200では、強制的にシーンチェンジのピクチャとして設定した任意のピクチャにおいて、デコーダバッファの充足量が十分でない場合においても、上記任意のピクチャのAUのビットスリームでの並びの順序を変更することで、上記の任意のピクチャのAUの符号量を抑制することなく高画質を実現できる。
In the moving
また、本実施の形態によれば、シーンチェンジに設定した任意のピクチャをIピクチャとして符号化することでランダムアクセス性能を高めることができる。更に、本実施の形態によれば、GOP単位のフィードバック制御の必要がなくメモリ量を削減できる。 Further, according to the present embodiment, random access performance can be improved by encoding an arbitrary picture set as a scene change as an I picture. Furthermore, according to the present embodiment, the amount of memory can be reduced without the need for feedback control in GOP units.
(第3の実施の形態)
図8は、本発明になる動画像符号化装置の第3の実施の形態のブロック図を示す。本実施形態の動画像符号化装置300は、シーンチェンジ検出部10、ピクチャ変換部20、ピクチャタイプ設定部30、符号化部45、デコーダバッファ充足量計算部50、AU並び換え制御部65、AUバッファ70、AU遅延バッファ80、及び時間情報訂正部90で構成される。同図中、図1と同一構成部分には同一符号を付してある。
(Third embodiment)
FIG. 8 shows a block diagram of a third embodiment of the moving picture coding apparatus according to the present invention. The moving
本実施形態の動画像符号化装置300は、図1に示した動画像符号化装置100と比較して、符号化部45及びAU並び換え制御部65が第1の実施形態の符号化部40及びAU並び換え制御部60と異なる。動画像符号化装置300は、カムコーダ、レコーダ、オーサリングなどの用途に使用可能である。なお、動画像符号化装置300により得られる符号化データのフォーマットは、Bピクチャの遅延が禁止されているDVDには不適合であるが、BD/AVCHDに適合可能である。
Compared with the moving
次に、本実施形態の動画像符号化装置300の入力画像単位の動作について図9のフローチャートを併せ参照して説明する。同図中、図2と同一処理ステップには同一符号を付し、その説明を省略する。図9において、図2と異なるステップは、ステップS51、S52、S53である。
Next, the operation of the input image unit of the moving
最初に、AU並び換え制御部65について第1の実施形態のAU並び換え制御部60との相違を説明する。AU並び換え制御部65は、AU並び換え制御部60と同様に、並び換えAU符号量eが“0”より大きく、かつ、次ピクチャのデコード前デコーダバッファ充足量Bft(n+1)が並び換えAU符号量e以上であれば、遅延AU出力情報hをオンとし、それ以外の場合は遅延AU出力情報hをオフとし、この遅延AU出力情報hをデコーダバッファ充足量計算部50及びAUバッファ70に送る(以上、図9のステップS21)。
First, the difference between the AU
続いて、AU並び換え制御部65は、デコーダバッファ充足量Bf(n)が所定値β未満であればAU遅延情報gをオンにし、デコーダバッファ充足量Bf(n)が所定値β以上であればAU遅延情報gをオフとし、AU遅延情報gを符号化部45、デコーダバッファ充足量計算部50、及びAUバッファ70に送る。本実施形態では所定値βを“0”とする。
Subsequently, the AU
更に、AU並び換え制御部65は、AU遅延情報gがオンである場合には、並び換えAU符号量eをデコーダバッファ充足量計算部50より送られたAU符号量cに設定する。並び換えAU符号量eの初期値は“0”である。AU並び換え制御部65は、並び換えAU符号量eをデコーダバッファ充足量計算部50に送る(以上、図9のステップS22)。
Furthermore, when the AU delay information g is on, the AU
以上の動作はAU並び換え制御部60と同様であるが、本実施の形態のAU並び換え制御部65は、更に、AU遅延情報gがオンである場合にはデコードバッファ充足量bを符号化部45に送る(図9のステップS52)。
The above operation is the same as that of the AU
その後、デコーダバッファ充足量計算部50でデコーダバッファ充足量を再計算した後(図9のステップS26)、符号化部45が、シーンチェンジのIピクチャを所定のAU符号量を確保した状態で符号化した場合でも、デコーダバッファが破綻しないように所定ピクチャの目標符号量を決定する(図9のステップS53)。ここで、「所定ピクチャ」とは、シーンチェンジのIピクチャを参照ピクチャとして符号化するピクチャのうち、シーンチェンジのIピクチャより前の時間で表示したいピクチャで、まだ符号化していないピクチャのことである。例えば、図5(b)の例では、シーンチェンジのピクチャはI8であり、上記の所定ピクチャはB6とB7である。
Thereafter, after the decoder buffer full
続いて、図9のステップS27で遅延AU出力情報がオンであるか否かを判定する。このとき、シーンチェンジのピクチャの符号化終了時点においてデコーダバッファのアンダーフローが生じていた場合は、遅延AU出力情報はオンと判定される。この場合は、更に、ステップS28でAU遅延バッファ80に蓄積されていた所定のピクチャが符号化部45に転送された後、ステップS29でデコーダバッファ充足量が再計算される。このステップS29において、シーンチェンジのピクチャの符号化直前の時点のデコーダバッファ充足量が再計算される。その後、ステップS30、ステップS31のN0を経て、符号化部45が目標符号量を決定する(図9のステップS51)。このステップS51の目標符号量の決定に際しては、ステップS53での目標符号量の決定が行われていた場合にはそちらを優先するものとする。
Subsequently, in step S27 of FIG. 9, it is determined whether or not the delay AU output information is on. At this time, if an underflow of the decoder buffer has occurred at the end of the encoding of the scene change picture, it is determined that the delayed AU output information is on. In this case, after the predetermined picture stored in the
符号化部45は、続いて、前述した所定のピクチャをステップS53で決定した目標符号量に従い符号化する(ステップS19)。これにより、シーンチェンジのIピクチャを所定のAU符号量を確保した状態で符号化した場合でも、デコーダバッファが破綻しないようにすることができる。 Subsequently, the encoding unit 45 encodes the predetermined picture described above according to the target code amount determined in step S53 (step S19). As a result, the decoder buffer can be prevented from failing even when the scene change I picture is encoded with a predetermined AU code amount secured.
次に、符号化部45について図10及び図11を参照して詳細に説明する。図10は、符号化部45の一例のブロック図を示す。同図中、図3と同一構成部分には同一符号を付してある。図10に示すように、符号化部45は目標符号量設定部401、符号化本部402、入力並び換えバッファ403、復号化制御部404、復号化部405、DPB406、及び調整目標符号量設定部450で構成される。目標符号量設定部401、符号化本部402、入力並び換えバッファ403、復号化制御部404、復号化部405、及びDPB406は符号化部40と同じであり、本実施の形態の符号化部45は調整目標符号量設定部450が符号化部40に追加された構成である。
Next, the encoding unit 45 will be described in detail with reference to FIGS. FIG. 10 shows a block diagram of an example of the encoding unit 45. In the figure, the same components as in FIG. As shown in FIG. 10, the encoding unit 45 includes a target code
次に、符号化部45の特徴である調整目標符号量設定部450について説明する。符号化部45は、AU遅延情報gがオンである場合にはAU並び換え制御部65から送られたデコードバッファ充足量bを調整目標符号量設定部450に送る。調整目標符号量設定部450は、入力並び換えバッファ403内のピクチャの目標符号量をAU並び換え制御部65から送られたデコードバッファ充足量Bb、ビットレート(Bitrate)、ピクチャ間隔(pic_period)、を用いた次式(5)により算出する(図9のステップS53)。
Next, the adjustment target code
Tb(i)=w(i) * (Bb−m * Bitrate * pic_period) / m; (5)
Tb(i): 入力並び換えバッファ403内のi番目ピクチャの目標符号量
Bb: AU並び換え制御部65から送られたデコードバッファ充足量
i: 入力並び換えバッファ403内のピクチャ番号(i=0,1,・・・)
m: 入力並び換えバッファ403内のピクチャ数
w(i): i番目ピクチャの重み付け比率。Σw(i) = m;
調整目標符号量設定部450は、算出した目標符号量Tb(i)を符号化本部402に送る。符号化本部402は、目標符号量設定部401と調整目標符号量設定部450の両方から目標符号量が送られた場合には調整目標符号量設定部450から送られた目標符号量を用いる(以上、図9のステップS51)。
Tb (i) = w (i) * (Bb−m * Bitrate * pic_period) / m; (5)
Tb (i): target code amount of the i-th picture in the
Bb: Decoding buffer fullness sent from AU
i: Picture number in the input reordering buffer 403 (i = 0,1,...)
m: number of pictures in the
w (i): Weighting ratio of i-th picture. Σw (i) = m;
The adjustment target code
ここで、本実施の形態に基づいて符号化した場合のピクチャタイプの並びについて図5を用いて説明する。前述したように、図5(b)は、5番目のピクチャP5までが符号化され、8番目のピクチャが入力された状態を示す。ピクチャデータは参照ピクチャ毎に符号化されるため、I2、B0、B1、続いてP5、B3、B4は既に符号化されている。次に、B6、B7は参照ピクチャではないために、図9のステップS17で入力並び換えバッファ403に保持されており、8番目のピクチャP8がシーンチェンジであるためIピクチャ(I8)として符号化される。
Here, the arrangement of picture types in the case of encoding based on the present embodiment will be described with reference to FIG. As described above, FIG. 5B shows a state where the fifth picture P5 is encoded and the eighth picture is input. Since the picture data is encoded for each reference picture, I2, B0, B1, and then P5, B3, B4 are already encoded. Next, since B6 and B7 are not reference pictures, they are held in the
図11は、I8を符号化後のデコードバッファ充足量の様子を示す。B4の符号化に続いてI8を符号化した後の、図9のステップS20で計算されたデコードバッファ充足量が、図11(A)に示すBb(I8)であったとする。この場合は、デコードバッファがアンダーフローした状態である。そこで、本実施の形態では、調整目標符号量設定部450が、シーンチェンジのIピクチャI8を参照ピクチャとして符号化するピクチャのうち、I8より前の時間で表示したいピクチャで、まだ符号化していないピクチャであるBピクチャB6及びB7の目標符号量Tb(B6)及びTb(B7)を下式により算出する(図9のステップS53)。
FIG. 11 shows the state of the decoding buffer fullness after encoding I8. Assume that the decoding buffer fullness calculated in step S20 of FIG. 9 after encoding I8 following encoding of B4 is Bb (I8) shown in FIG. 11A. In this case, the decode buffer is in an underflow state. Therefore, in the present embodiment, adjustment target code
Tb(B6)=Tb(B7)= 1 * (Bb(I8)+2 * Bitrate * pic_period) / 2; (6)
その後、デコーダバッファ充足量計算部50は、ステップS29でシーンチェンジのピクチャI8の符号化直前の時点のデコーダバッファ充足量を再計算する。このとき再計算されたデコーダバッファ充足量は図11(B)に示すBt(図11(A)のBt(I8)に相当)である。続いて符号化部45は、式(6)で算出した目標符号量Tb(B6)及びTb(B7)でB6及びB7を符号化する(図9のステップS19)。
Tb (B6) = Tb (B7) = 1 * (Bb (I8) + 2 * Bitrate * pic_period) / 2; (6)
After that, the decoder buffer sufficient
そして、AU並び換え制御部65の制御により、AUバッファ70及びAU遅延バッファ80から時間情報訂正部90を通して出力されるAUのビットストリームの並びを図5(d)に示すように、I8の直前にB6とB7とを配置したAUの並びとする。この場合のデコーダバッファ充足量は、図11(C)に示すように、I8符号化直前のBtの値をBt(B6)とし、そこからBピクチャB6、B7の符号化毎に変化することとなる。
Under the control of the AU
なお、図11(C)において、Bt(B6)からBb(B6)までの差分がB6の符号量であり、Bt(B7)からBb(B7)までの差分がB7の符号量である。また、Bt(I8)からBb(I8)までの差分で示されるI8の符号量は、図11(A)で示したI8の符号量と同じであるが、上記のAUの並び換えによりI8出力後のデコーダバッファ充足量は0である。この結果、シーンチェンジのAUであるI8の符号量を所定量に確保した状態で符号化しても、I8符号化後のデコーダバッファの破綻(この場合アンダーフロー)を防止することができる。また、本実施の形態では、I8の次の参照ピクチャであるP11の前にI8を配置することができる。 In FIG. 11C, the difference from Bt (B6) to Bb (B6) is the code amount of B6, and the difference from Bt (B7) to Bb (B7) is the code amount of B7. The code amount of I8 indicated by the difference from Bt (I8) to Bb (I8) is the same as the code amount of I8 shown in FIG. 11A, but the I8 output is obtained by rearranging the above AUs. The subsequent decoder buffer fullness is zero. As a result, even if coding is performed in a state where the code amount of I8, which is the AU of the scene change, is secured to a predetermined amount, failure of the decoder buffer after I8 coding (in this case, underflow) can be prevented. Further, in the present embodiment, I8 can be arranged before P11 which is the next reference picture of I8.
なお、図5(c)のような符号化されたピクチャの並びにする場合には、B6の目標符号量Tb(B6)を示す式(6)の“2”を次式(7)にように“1”とすればよい。 In the case of a sequence of encoded pictures as shown in FIG. 5C, “2” in Expression (6) indicating the target code amount Tb (B6) of B6 is changed to the following Expression (7). “1” may be set.
Tb(B6)=1 * (Bb(I8)+1 * Bitrate * pic_period) / 1; (7)
次に、本実施の形態の効果について説明する。
Tb (B6) = 1 * (Bb (I8) + 1 * Bitrate * pic_period) / 1; (7)
Next, the effect of this embodiment will be described.
本実施形態の画像間予測符号化を用いた動画像符号化装置300では、第1の実施形態の動画像符号化装置100の効果に加えて、シーンチェンジのIピクチャの挿入位置を制御することが可能となる。Iピクチャの挿入位置が必ず次のPピクチャの前となるように制御することで、図5(e)のようにIピクチャとPピクチャの表示順と符号順が逆転する現象を回避することができるため、BD規格などIピクチャとPピクチャの表示順と符号順の逆転を禁じた規格に適合可能となる。
In the moving
なお、図8の本実施の形態の動画像符号化装置300は、シーンチェンジ検出部10の替りに、第2の実施の形態の強制Iピクチャ指示部15を設けた構成としてもよい。
Note that the moving
(第4の実施の形態)
図12は、本発明になる動画像符号化装置の第4の実施の形態のブロック図を示す。本実施形態の動画像符号化装置400は、シーンチェンジ検出部10、ピクチャ変換部20、ピクチャタイプ設定部30、符号化部47、デコーダバッファ充足量計算部50、AU並び換え制御部65、AUバッファ70、AU遅延バッファ80、及び時間情報訂正部90で構成される。同図中、図8と同一構成部分には同一符号を付し、その説明を省略する。
(Fourth embodiment)
FIG. 12 is a block diagram showing a fourth embodiment of the moving picture coding apparatus according to the present invention. The moving
本実施形態の動画像符号化装置400は、符号化部47が図8に示した動画像符号化装置300の符号化部45と構成が異なる。動画像符号化装置400は、カムコーダ、レコーダ、オーサリングなどの用途に使用可能である。なお、動画像符号化装置400により得られる符号化データのフォーマットは、DVD/BD/AVCHDに適合可能であり、MPEG−2への対応も可能である。
In the moving
図13は、図12中の符号化部47の一例のブロック図を示す。同図中、図10と同一構成部分には同一符号を付してある。図13に示すように、符号化部47は目標符号量設定部401、符号化本部402、入力並び換えバッファ403、復号化制御部404、復号化部405、DPB406、調整目標符号量設定部450、及びピクチャタイプ再設定部470で構成される。目標符号量設定部401、符号化本部402、入力並び換えバッファ403、復号化制御部404、復号化部405、DPB406、及び調整目標符号量設定部450は符号化部45と同じであり、本実施の形態の符号化部47はピクチャタイプ再設定部470が符号化部45に追加された構成である。
FIG. 13 shows a block diagram of an example of the
次に、符号化部47の動作について説明する。ピクチャタイプ再設定部470は、AU遅延情報がオンである場合に入力並び換えバッファ403にピクチャタイプ変更要求を送る。入力並び換えバッファ403は、ピクチャタイプ再設定部470からピクチャタイプ変更要求が送られた場合に入力並び換えバッファ403に保持しているピクチャタイプを変更する。
Next, the operation of the
調整目標符号量設定部450は、前述したように式(5)に基づいて入力並び換えバッファ403内のピクチャの目標符号量を算出する。符号化本部402は、目標符号量設定部401と調整目標符号量設定部450の両方から目標符号量が送られた場合には調整目標符号量設定部450から送られた目標符号量を用いる
ここで、本実施の形態に基づいて符号化した場合のピクチャタイプの並びについて図14を用いて説明する。図14(a)は8番目のピクチャがシーンチェンジであるような入力ピクチャの様子を示している。この入力ピクチャは、Iピクチャ挿入周期Nが「15」、参照ピクチャ挿入周期Mが「3」である。
The adjustment target code
シーンチェンジの8番目のピクチャが入力された時点では、ピクチャデータは参照ピクチャ毎に符号化されるため、I2、B0、B1、続いてP5、B3、B4は既に符号化されている。8番目のピクチャの次のBピクチャであるB6、B7は参照ピクチャではないために入力並び換えバッファ403に格納されており、8番目のPピクチャ(P8)がシーンチェンジであるためIピクチャ(I8)として符号化される。
Since the picture data is encoded for each reference picture when the eighth picture of the scene change is input, I2, B0, B1, and then P5, B3, B4 are already encoded. Since B6 and B7, which are the next B pictures after the eighth picture, are not reference pictures, they are stored in the
このとき前記の符号化部45では、I8を符号化後のデコードバッファ充足量が図11にBb(I8)で示したものであるとすると、目標符号量設定部401が式(6)で算出した目標符号量Tb(B6)及びTb(B7)に基づいて、BピクチャB6及びB7を符号化する。これにより符号化したB7の後に符号化したI8を配置する、つまり図5(d)のような符号化されたピクチャの並びにしている。
At this time, in the encoding unit 45, assuming that the decoding buffer fullness after encoding I8 is indicated by Bb (I8) in FIG. 11, the target code
これに対し、本実施の形態の符号化部47は、入力並び換えバッファ403に保持されていた6番目のピクチャ及び7番目のピクチャは、図14(a)に示すように本来ピクチャタイプはBピクチャであるが、ピクチャタイプ再設定部470からのピクチャタイプ変更要求を受けて6番目と7番目のピクチャがPピクチャに変更された場合、図14(b)に示すように、BピクチャからPピクチャに変更して符号化したP6とP7をI8の前の位置に配置されたピクチャの並びとする。
On the other hand, the
なお、図14(c)は、5番目のピクチャまでが符号化され、8番目のピクチャがシーンチェンジであるためIピクチャ(I8)として符号化されている。入力並び換えバッファ403に保持されていた6番目のピクチャ及び7番目のピクチャは本来ピクチャタイプはBピクチャであるが、ピクチャタイプ再設定部470からのピクチャタイプ変更要求を受けて7番目のピクチャがPピクチャP7に変更されて符号化されている様子を示している。なお、6番目のピクチャは本来のB6でピクチャタイプは変更されていない。
In FIG. 14C, up to the fifth picture is encoded, and since the eighth picture is a scene change, it is encoded as an I picture (I8). The sixth picture and the seventh picture held in the
なお、図14(c)に示すピクチャの並びにおいて、P7をB7とし、B6をP6としてもよい。また、図14(b)に示したピクチャタイプ変更とするか、同図(c)に示したピクチャタイプ変更とするかは、予め決めておくものとする。 In the picture arrangement shown in FIG. 14C, P7 may be B7 and B6 may be P6. In addition, it is assumed in advance whether the picture type change shown in FIG. 14B or the picture type change shown in FIG.
次に、本実施の形態の動画像符号化装置40の効果について説明する。
Next, the effect of the moving
本実施形態では、第1の実施形態の効果に加えて、符号化部47の符号化方法としてMPEG−4AVCに加えて、より一般的に使用されるMPEG−2規格に準拠させることが可能となる。MPEG−2規格では、GOPの規定として表示順で最後のピクチャがPピクチャであると定められているが、図14(c)の場合はこれに準拠している。また、Bピクチャの並び換え遅延が解消されるためDVD規格にも準じる構成となる。
In the present embodiment, in addition to the effects of the first embodiment, the encoding method of the
なお、図12の本実施の形態の動画像符号化装置400は、シーンチェンジ検出部10の替りに、第2の実施の形態の強制Iピクチャ指示部15を設けた構成としてもよい。
Note that the moving
なお、本発明は以上の実施の形態に限定されるものではなく、各実施の形態の動作をコンピュータにより実行させる動画像符号化プログラムも包含するものである。この動画像符号化プログラムは、記録媒体から再生されてコンピュータに取り込まれてもよいし、ネットワークを介してコンピュータにダウンロードされてもよい。 Note that the present invention is not limited to the above-described embodiment, and includes a moving image encoding program that causes a computer to execute the operation of each embodiment. This moving image encoding program may be reproduced from a recording medium and taken into a computer, or may be downloaded to a computer via a network.
本発明の動画像符号化装置は、監視カメラにおける変化点の高画質化やDVDレコーダなどで録り溜めた映像シーンのインデックス映像の高画質化、更にはビデオカメラでの特定画像の高画質化などに利用できる。 The moving image encoding apparatus of the present invention improves the image quality of a change point in a surveillance camera, increases the image quality of an index image of a video scene recorded by a DVD recorder, and further improves the image quality of a specific image in a video camera. It can be used for
10 シーンチェンジ検出部
15 強制Iピクチャ指示部
20 ピクチャ変換部
30、35 ピクチャタイプ設定部
40、45、47 符号化部
50 デコーダバッファ充足量計算部
60 AU並び換え制御部
70 AUバッファ
80 AU遅延バッファ
90 時間情報訂正部
100、200、300、400 動画像符号化装置
401 目標符号量設定部
402 符号化本部
403 入力並び換えバッファ
404 復号化制御部
405 復号化部
406 DPB
450 調整目標符号量設定部
470 ピクチャタイプ再設定部
DESCRIPTION OF
450 Adjustment target code
Claims (6)
前記指示ステップで指示されたピクチャの符号化ピクチャタイプを画像内符号化ピクチャに設定すると共に、前記指示ステップで指示されない前記入力動画像信号の各ピクチャに対しては符号化ピクチャタイプを所定の規則に従い設定するピクチャタイプ設定ステップと、
設定された前記符号化ピクチャタイプに基づいた画像間予測符号化を用いる符号化により前記入力動画像信号を符号化して得たピクチャデータ、及び前記画像内符号化ピクチャに設定されたピクチャを予め設定された所定の目標符号量または予め設定された所定の量子化幅に基づいて画像内符号化して得たピクチャデータを出力すると共に、そのピクチャデータの符号量情報を出力する符号化ステップと、
前記符号量情報に基づいて、仮想的なデコーダバッファの充足量を計算するデコーダバッファ充足量計算ステップと、
前記画像内符号化ピクチャに設定されたピクチャの符号化に続く前記符号化ステップでの符号化後の前記デコーダバッファの充足量が、前記画像内符号化ピクチャのピクチャデータの符号量以上となった時に、その時点でのピクチャデータに続いて前記画像内符号化ピクチャのピクチャデータを配置するよう並び換えを指示する並び換え制御ステップと、
前記ピクチャデータをバッファ手段に一時蓄積する第1の蓄積ステップと、
前記並び換え制御ステップにより前記ピクチャデータの並び換えの指示があった場合に、前記バッファ手段より出力された前記ピクチャデータを遅延バッファ手段に一時蓄積する第2の蓄積ステップと、
前記並び換え制御ステップの指示により前記バッファ手段又は前記遅延バッファ手段より前記並び換えの順で出力された前記ピクチャデータの時間情報を書き換える時間情報訂正ステップと
を含むことを特徴とする動画像符号化方法。 An instruction step for instructing a picture in the input moving image signal for setting an encoded picture type as an intra-picture encoded picture based on an external input;
The coded picture type of the picture instructed in the instructing step is set to an intra-picture coded picture, and the coded picture type is set to a predetermined rule for each picture of the input moving image signal not instructed in the instructing step. A picture type setting step to be set according to
Picture data obtained by encoding the input video signal by encoding using inter-picture predictive encoding based on the set encoded picture type, and a picture set as the intra-picture encoded picture are preset. An encoding step of outputting picture data obtained by intra-picture encoding based on a predetermined target code amount or a predetermined quantization width set, and outputting code amount information of the picture data;
A decoder buffer fullness calculation step for calculating a virtual decoder buffer fullness based on the code amount information;
The sufficient amount of the decoder buffer after encoding in the encoding step following the encoding of the picture set in the intra-picture coded picture is equal to or greater than the code quantity of the picture data of the intra-picture coded picture. Sometimes, a rearrangement control step for instructing rearrangement to arrange the picture data of the intra-picture coded picture following the picture data at that time;
A first accumulation step of temporarily accumulating the picture data in a buffer means;
A second accumulating step for temporarily accumulating the picture data output from the buffer means in a delay buffer means when there is an instruction to reorder the picture data in the reordering control step;
And a time information correction step of rewriting time information of the picture data output in the order of rearrangement from the buffer means or the delay buffer means in accordance with an instruction of the rearrangement control step. Method.
前記指示ステップで指示されたピクチャの符号化ピクチャタイプを画像内符号化ピクチャに設定すると共に、前記指示ステップで指示されない前記入力動画像信号の各ピクチャに対しては符号化ピクチャタイプを所定の規則に従い設定するピクチャタイプ設定ステップと、
設定された前記符号化ピクチャタイプに基づいた画像間予測符号化を用いる符号化により前記入力動画像信号を符号化して得たピクチャデータ、及び前記画像内符号化ピクチャに設定されたピクチャを予め設定された所定の目標符号量または予め設定された所定の量子化幅に基づいて画像内符号化して得たピクチャデータを出力すると共に、そのピクチャデータの符号量情報を出力する第1の符号化ステップと、
前記符号量情報に基づいて、仮想的なデコーダバッファの充足量を計算するデコーダバッファ充足量計算ステップと、
前記シーンチェンジを検出した時点の前記画像内符号化ピクチャに設定されたピクチャを前記第1の符号化ステップにより符号化した時の前記デコーダバッファの充足量に、アンダーフロー又はオーバーフローが生じる場合は、当該画像内符号化ピクチャに設定されたピクチャより前の時間で表示すべきピクチャであり、かつ、前記画像内符号化ピクチャに設定されたピクチャの符号化に続いて符号化させる[参照ピクチャ挿入周期(M)−1]枚の範囲内の所定枚数分の各ピクチャの目標符号量を、前記画像内符号化ピクチャに設定されたピクチャを符号化したときの前記デコーダバッファ充足量にアンダーフロー又はオーバーフローが生じない値に決定する目標符号量調整ステップと、
前記目標符号量調整ステップで決定された前記目標符号量に基づき前記所定枚数分のピクチャを符号化して得たピクチャデータを出力する第2の符号化ステップと、
前記ピクチャデータのビットストリーム中での順序を、前記シーンチェンジを検出した時点の前記画像内符号化ピクチャのピクチャデータよりも、前記所定枚数分のピクチャのピクチャデータが前の位置に配置されるように並び換える指示を行う並び換え制御ステップと、
前記ピクチャデータをバッファ手段に一時蓄積する第1の蓄積ステップと、
前記並び換え制御ステップにより前記ピクチャデータの並び換えの指示があった場合に、前記バッファ手段より出力された前記ピクチャデータを遅延バッファ手段に一時蓄積する第2の蓄積ステップと、
前記並び換え制御ステップの指示により前記バッファ手段又は前記遅延バッファ手段より前記並び換えの順で出力された前記ピクチャデータの時間情報を書き換える時間情報訂正ステップと
を含むことを特徴とする動画像符号化方法。 An instruction step for instructing a picture in the input moving image signal for setting an encoded picture type as an intra-picture encoded picture based on an external input;
The coded picture type of the picture instructed in the instructing step is set to an intra-picture coded picture, and the coded picture type is set to a predetermined rule for each picture of the input moving image signal not instructed in the instructing step. A picture type setting step to be set according to
Picture data obtained by encoding the input moving image signal by encoding using inter-picture predictive encoding based on the set encoded picture type, and a picture set as the intra-picture encoded picture are preset. A first encoding step for outputting picture data obtained by intra-picture encoding based on the predetermined target code amount or a predetermined predetermined quantization width, and outputting code amount information of the picture data When,
A decoder buffer fullness calculation step for calculating a virtual decoder buffer fullness based on the code amount information;
When an underflow or overflow occurs in the fullness of the decoder buffer when the picture set as the intra-picture encoded picture at the time of detecting the scene change is encoded by the first encoding step, [Reference picture insertion cycle] is a picture to be displayed at a time before the picture set as the intra-picture coded picture, and is coded following the coding of the picture set as the intra-picture coded picture. (M) -1] Underflow or overflow of the target code amount of each picture for a predetermined number of sheets within the range of the picture into the decoder buffer fullness when the picture set as the intra-picture coded picture is coded A target code amount adjustment step for determining a value that does not cause
A second encoding step of outputting picture data obtained by encoding the predetermined number of pictures based on the target code amount determined in the target code amount adjustment step;
The order of the picture data in the bit stream is such that the picture data of the predetermined number of pictures is arranged at a position before the picture data of the intra-picture coded picture at the time when the scene change is detected. A reordering control step for instructing reordering to,
A first accumulation step of temporarily accumulating the picture data in a buffer means;
A second accumulating step for temporarily accumulating the picture data output from the buffer means in a delay buffer means when there is an instruction to reorder the picture data in the reordering control step;
And a time information correction step of rewriting time information of the picture data output in the order of rearrangement from the buffer means or the delay buffer means in accordance with an instruction of the rearrangement control step. Method.
前記指示手段で指示されたピクチャの符号化ピクチャタイプを画像内符号化ピクチャに設定すると共に、前記指示手段で指示されない前記入力動画像信号の各ピクチャに対しては符号化ピクチャタイプを所定の規則に従い設定するピクチャタイプ設定手段と、
設定された前記符号化ピクチャタイプに基づいた画像間予測符号化を用いる符号化により前記入力動画像信号を符号化して得たピクチャデータ、及び前記画像内符号化ピクチャに設定されたピクチャを予め設定された所定の目標符号量又は予め設定された所定の量子化幅に基づいて画像内符号化して得たピクチャデータを出力すると共に、そのピクチャデータの符号量情報を出力する符号化手段と、
前記符号量情報に基づいて、仮想的なデコーダバッファの充足量を計算するデコーダバッファ充足量計算手段と、
前記画像内符号化ピクチャに設定されたピクチャの符号化に続く前記符号化手段での符号化後の前記デコーダバッファの充足量が、前記画像内符号化ピクチャのピクチャデータの符号量以上となった時に、その時点でのピクチャデータに続いて前記画像内符号化ピクチャのピクチャデータを配置するよう並び換えを指示する並び換え制御手段と、
前記ピクチャデータを一時蓄積するバッファ手段と、
前記並び換え制御手段により前記ピクチャデータの並び換えの指示があった場合に、前記バッファ手段より出力された前記ピクチャデータを一時蓄積する遅延バッファ手段と、
前記並び換え制御手段の指示により前記バッファ手段又は前記遅延バッファ手段より前記並び換えの順で出力された前記ピクチャデータの時間情報を書き換える時間情報訂正手段と
を有することを特徴とする動画像符号化装置。 An instruction means for instructing a picture in the input moving image signal for setting an encoded picture type as an intra-picture encoded picture based on an external input;
The encoded picture type of the picture instructed by the instructing means is set to an intra-picture coded picture, and the encoded picture type is set to a predetermined rule for each picture of the input moving image signal not instructed by the instructing means. Picture type setting means for setting according to
Picture data obtained by encoding the input moving image signal by encoding using inter-picture predictive encoding based on the set encoded picture type, and a picture set as the intra-picture encoded picture are preset. Encoding means for outputting picture data obtained by intra-picture encoding based on the predetermined target code amount or a predetermined quantization width set in advance, and for outputting code amount information of the picture data;
Decoder buffer sufficient amount calculation means for calculating a sufficient amount of decoder buffer based on the code amount information;
The sufficient amount of the decoder buffer after encoding by the encoding means following the encoding of the picture set in the intra-picture coded picture is equal to or greater than the code quantity of the picture data of the intra-picture coded picture Sometimes, rearrangement control means for instructing rearrangement to arrange the picture data of the intra-picture coded picture following the picture data at that time,
Buffer means for temporarily storing the picture data;
Delay buffer means for temporarily storing the picture data output from the buffer means when the rearrangement control means is instructed to rearrange the picture data;
Video information encoding means, comprising: time information correction means for rewriting time information of the picture data output in the order of rearrangement from the buffer means or the delay buffer means in accordance with an instruction of the rearrangement control means. apparatus.
前記指示手段で指示されたピクチャの符号化ピクチャタイプを画像内符号化ピクチャに設定すると共に、前記指示ステップで指示されない前記入力動画像信号の各ピクチャに対しては符号化ピクチャタイプを所定の規則に従い設定するピクチャタイプ設定手段と、
設定された前記符号化ピクチャタイプに基づいた画像間予測符号化を用いる符号化により前記入力動画像信号を符号化して得たピクチャデータ、及び前記画像内符号化ピクチャに設定されたピクチャを予め設定された所定の目標符号量または予め設定された所定の量子化幅に基づいて画像内符号化して得たピクチャデータを出力すると共に、そのピクチャデータの符号量情報を出力する第1の符号化手段と、
前記符号量情報に基づいて、仮想的なデコーダバッファの充足量を計算するデコーダバッファ充足量計算手段と、
前記シーンチェンジを検出した時点の前記画像内符号化ピクチャに設定されたピクチャを前記第1の符号化手段により符号化した時の前記デコーダバッファの充足量に、アンダーフロー又はオーバーフローが生じる場合は、当該画像内符号化ピクチャに設定されたピクチャより前の時間で表示すべきピクチャであり、かつ、前記画像内符号化ピクチャに設定されたピクチャの符号化に続いて符号化させる[参照ピクチャ挿入周期(M)−1]枚の範囲内の所定枚数分の各ピクチャの目標符号量を、前記画像内符号化ピクチャに設定されたピクチャを符号化したときの前記デコーダバッファ充足量にアンダーフロー又はオーバーフローが生じない値に決定する目標符号量調整手段と、
前記目標符号量調整手段で決定された前記目標符号量に基づき前記所定枚数分のピクチャを符号化して得たピクチャデータを出力する第2の符号化手段と、
前記ピクチャデータのビットストリーム中での順序を、前記シーンチェンジを検出した時点の前記画像内符号化ピクチャのピクチャデータよりも、前記所定枚数分のピクチャのピクチャデータが前の位置に配置されるように並び換える指示を行う並び換え制御手段と、
前記ピクチャデータを一時蓄積するバッファ手段と、
前記並び換え制御手段により前記ピクチャデータの並び換えの指示があった場合に、前記バッファ手段より出力された前記ピクチャデータを一時蓄積する遅延バッファ手段と、
前記並び換え制御手段の指示により前記バッファ手段又は前記遅延バッファ手段より前記並び換えの順で出力された前記ピクチャデータの時間情報を書き換える時間情報訂正手段と
を有することを特徴とする動画像符号化装置。 An instruction means for instructing a picture in the input moving image signal for setting an encoded picture type as an intra-picture encoded picture based on an external input;
The encoded picture type of the picture instructed by the instruction means is set to an intra-picture encoded picture, and the encoded picture type is set to a predetermined rule for each picture of the input moving image signal not instructed in the instruction step. Picture type setting means for setting according to
Picture data obtained by encoding the input moving image signal by encoding using inter-picture predictive encoding based on the set encoded picture type, and a picture set as the intra-picture encoded picture are preset. 1st encoding means for outputting picture data obtained by intra-picture coding based on a predetermined target code amount or a predetermined predetermined quantization width, and for outputting code amount information of the picture data When,
Decoder buffer sufficient amount calculation means for calculating a sufficient amount of decoder buffer based on the code amount information;
When an underflow or overflow occurs in the fullness of the decoder buffer when the picture set as the intra-picture coded picture at the time of detecting the scene change is coded by the first coding means, [Reference picture insertion cycle] is a picture to be displayed at a time before the picture set as the intra-picture coded picture, and is coded following the coding of the picture set as the intra-picture coded picture. (M) -1] Underflow or overflow of the target code amount of each picture for a predetermined number of sheets within the range of the picture into the decoder buffer fullness when the picture set as the intra-picture coded picture is coded Target code amount adjusting means for determining a value that does not cause
Second encoding means for outputting picture data obtained by encoding the predetermined number of pictures based on the target code amount determined by the target code amount adjusting means;
The order of the picture data in the bit stream is such that the picture data of the predetermined number of pictures is arranged at a position before the picture data of the intra-picture coded picture at the time when the scene change is detected. Reordering control means for instructing reordering to,
Buffer means for temporarily storing the picture data;
Delay buffer means for temporarily storing the picture data output from the buffer means when the rearrangement control means is instructed to rearrange the picture data;
Video information encoding means, comprising: time information correction means for rewriting time information of the picture data output in the order of rearrangement from the buffer means or the delay buffer means in accordance with an instruction of the rearrangement control means. apparatus.
前記指示ステップで指示されたピクチャの符号化ピクチャタイプを画像内符号化ピクチャに設定すると共に、前記指示ステップで指示されない前記入力動画像信号の各ピクチャに対しては符号化ピクチャタイプを所定の規則に従い設定するピクチャタイプ設定ステップと、
設定された前記符号化ピクチャタイプに基づいた画像間予測符号化を用いる符号化により前記入力動画像信号を符号化して得たピクチャデータ、及び前記画像内符号化ピクチャに設定されたピクチャを予め設定された所定の目標符号量または予め設定された所定の量子化幅に基づいて画像内符号化して得たピクチャデータを出力すると共に、そのピクチャデータの符号量情報を出力する符号化ステップと、
前記符号量情報に基づいて、仮想的なデコーダバッファの充足量を計算するデコーダバッファ充足量計算ステップと、
前記画像内符号化ピクチャに設定されたピクチャの符号化に続く前記符号化ステップでの符号化後の前記デコーダバッファの充足量が、前記画像内符号化ピクチャのピクチャデータの符号量以上となった時に、その時点でのピクチャデータに続いて前記画像内符号化ピクチャのピクチャデータを配置するよう並び換えを指示する並び換え制御ステップと、
前記ピクチャデータをバッファ手段に一時蓄積する第1の蓄積ステップと、
前記並び換え制御ステップにより前記ピクチャデータの並び換えの指示があった場合に、前記バッファ手段より出力された前記ピクチャデータを遅延バッファ手段に一時蓄積する第2の蓄積ステップと、
前記並び換え制御ステップの指示により前記バッファ手段又は前記遅延バッファ手段より前記並び換えの順で出力された前記ピクチャデータの時間情報を書き換える時間情報訂正ステップと
を、コンピュータにより実行させることを特徴とする動画像符号化プログラム。 An instruction step for instructing a picture in the input moving image signal for setting an encoded picture type as an intra-picture encoded picture based on an external input;
The coded picture type of the picture instructed in the instructing step is set to an intra-picture coded picture, and the coded picture type is set to a predetermined rule for each picture of the input moving image signal not instructed in the instructing step. A picture type setting step to be set according to
Picture data obtained by encoding the input moving image signal by encoding using inter-picture predictive encoding based on the set encoded picture type, and a picture set as the intra-picture encoded picture are preset. An encoding step of outputting picture data obtained by intra-picture encoding based on a predetermined target code amount or a predetermined quantization width set, and outputting code amount information of the picture data;
A decoder buffer fullness calculation step for calculating a virtual decoder buffer fullness based on the code amount information;
The sufficient amount of the decoder buffer after encoding in the encoding step following the encoding of the picture set in the intra-picture coded picture is equal to or greater than the code quantity of the picture data of the intra-picture coded picture. Sometimes, a rearrangement control step for instructing rearrangement to arrange the picture data of the intra-picture coded picture following the picture data at that time;
A first accumulation step of temporarily accumulating the picture data in a buffer means;
A second accumulating step for temporarily accumulating the picture data output from the buffer means in a delay buffer means when there is an instruction to reorder the picture data in the reordering control step;
And a time information correction step of rewriting time information of the picture data output in the order of rearrangement from the buffer means or the delay buffer means in accordance with an instruction of the rearrangement control step. A video encoding program.
前記指示ステップで指示されたピクチャの符号化ピクチャタイプを画像内符号化ピクチャに設定すると共に、前記指示ステップで指示されない前記入力動画像信号の各ピクチャに対しては符号化ピクチャタイプを所定の規則に従い設定するピクチャタイプ設定ステップと、
設定された前記符号化ピクチャタイプに基づいた画像間予測符号化を用いる符号化により前記入力動画像信号を符号化して得たピクチャデータ、及び前記画像内符号化ピクチャに設定されたピクチャを予め設定された所定の目標符号量または予め設定された所定の量子化幅に基づいて画像内符号化して得たピクチャデータを出力すると共に、そのピクチャデータの符号量情報を出力する第1の符号化ステップと、
前記符号量情報に基づいて、仮想的なデコーダバッファの充足量を計算するデコーダバッファ充足量計算ステップと、
前記シーンチェンジを検出した時点の前記画像内符号化ピクチャに設定されたピクチャを前記第1の符号化ステップにより符号化した時の前記デコーダバッファの充足量に、アンダーフロー又はオーバーフローが生じる場合は、当該画像内符号化ピクチャに設定されたピクチャより前の時間で表示すべきピクチャであり、かつ、前記画像内符号化ピクチャに設定されたピクチャの符号化に続いて符号化させる[参照ピクチャ挿入周期(M)−1]枚の範囲内の所定枚数分の各ピクチャの目標符号量を、前記画像内符号化ピクチャに設定されたピクチャを符号化したときの前記デコーダバッファ充足量にアンダーフロー又はオーバーフローが生じない値に決定する目標符号量調整ステップと、
前記目標符号量調整ステップで決定された前記目標符号量に基づき前記所定枚数分のピクチャを符号化して得たピクチャデータを出力する第2の符号化ステップと、
前記ピクチャデータのビットストリーム中での順序を、前記シーンチェンジを検出した時点の前記画像内符号化ピクチャのピクチャデータよりも、前記所定枚数分のピクチャのピクチャデータが前の位置に配置されるように並び換える指示を行う並び換え制御ステップと、
前記ピクチャデータをバッファ手段に一時蓄積する第1の蓄積ステップと、
前記並び換え制御ステップにより前記ピクチャデータの並び換えの指示があった場合に、前記バッファ手段より出力された前記ピクチャデータを遅延バッファ手段に一時蓄積する第2の蓄積ステップと、
前記並び換え制御ステップの指示により前記バッファ手段又は前記遅延バッファ手段より前記並び換えの順で出力された前記ピクチャデータの時間情報を書き換える時間情報訂正ステップと
を、コンピュータにより実行させることを特徴とする動画像符号化プログラム。 An instruction step for instructing a picture in the input moving image signal for setting an encoded picture type as an intra-picture encoded picture based on an external input;
The coded picture type of the picture instructed in the instructing step is set to an intra-picture coded picture, and the coded picture type is set to a predetermined rule for each picture of the input moving image signal not instructed in the instructing step. A picture type setting step to be set according to
Picture data obtained by encoding the input moving image signal by encoding using inter-picture predictive encoding based on the set encoded picture type, and a picture set as the intra-picture encoded picture are preset. A first encoding step for outputting picture data obtained by intra-picture encoding based on the predetermined target code amount or a predetermined predetermined quantization width, and outputting code amount information of the picture data When,
A decoder buffer fullness calculation step for calculating a virtual decoder buffer fullness based on the code amount information;
When an underflow or overflow occurs in the fullness of the decoder buffer when the picture set as the intra-picture encoded picture at the time of detecting the scene change is encoded by the first encoding step, [Reference picture insertion cycle] is a picture to be displayed at a time before the picture set as the intra-picture coded picture, and is coded following the coding of the picture set as the intra-picture coded picture. (M) -1] Underflow or overflow of the target code amount of each picture for a predetermined number of sheets within the range of the picture into the decoder buffer fullness when the picture set as the intra-picture coded picture is coded A target code amount adjustment step for determining a value that does not cause
A second encoding step of outputting picture data obtained by encoding the predetermined number of pictures based on the target code amount determined in the target code amount adjustment step;
The order of the picture data in the bit stream is such that the picture data of the predetermined number of pictures is arranged at a position before the picture data of the intra-picture coded picture at the time when the scene change is detected. A reordering control step for instructing reordering to,
A first accumulation step of temporarily accumulating the picture data in a buffer means;
A second accumulating step for temporarily accumulating the picture data output from the buffer means in a delay buffer means when there is an instruction to reorder the picture data in the reordering control step;
A time information correction step of rewriting time information of the picture data output in the order of the rearrangement from the buffer means or the delay buffer means in accordance with an instruction of the rearrangement control step. A video encoding program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009049113A JP2010206465A (en) | 2009-03-03 | 2009-03-03 | Method, device and program for encoding moving image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009049113A JP2010206465A (en) | 2009-03-03 | 2009-03-03 | Method, device and program for encoding moving image |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010206465A true JP2010206465A (en) | 2010-09-16 |
Family
ID=42967510
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009049113A Pending JP2010206465A (en) | 2009-03-03 | 2009-03-03 | Method, device and program for encoding moving image |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010206465A (en) |
-
2009
- 2009-03-03 JP JP2009049113A patent/JP2010206465A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4769717B2 (en) | Image decoding method | |
JP4416796B2 (en) | Image encoding device, image decoding device, image encoding program, and image decoding program | |
KR20110068946A (en) | Image decoding device, image encoding device, image decoding method, image encoding method, and program | |
KR100629293B1 (en) | Information recording system and information recording method | |
US7924916B2 (en) | Method and apparatus for decoding encoded groups of pictures of a video sequence and presenting said video sequence and said groups of pictures in temporally backward direction | |
JP5170708B2 (en) | Moving picture stream processing method and apparatus, moving picture reproduction apparatus and moving picture distribution apparatus using the same | |
JP2008167061A (en) | Encoding device and encoding method | |
JP2008283432A (en) | Image recording and reproducing device | |
WO2006126694A2 (en) | Video coding using an alternative reference frame for motion compensated prediction | |
US5793894A (en) | Image data editing apparatus and decoding apparatus | |
US8155186B2 (en) | Bit stream recording medium, video encoder, and video decoder | |
JP4875008B2 (en) | Moving picture encoding method, moving picture decoding method, moving picture encoding apparatus, and moving picture decoding apparatus | |
JP5493362B2 (en) | Movie playback apparatus and program | |
KR20070090174A (en) | Encoding device, method, and program | |
JP2008187694A (en) | Image encoder and method thereof | |
JP2010206463A (en) | Method, device and program for encoding moving image | |
JP4227643B2 (en) | Moving picture coding apparatus and method | |
JP2010206465A (en) | Method, device and program for encoding moving image | |
JP2010206464A (en) | Method, device and program for encoding moving image | |
JP4906197B2 (en) | Decoding device and method, and recording medium | |
KR100543453B1 (en) | Apparatus and method for controlling bit rate of digital video data in reverse play | |
JP4574530B2 (en) | Image coding apparatus and image coding method | |
JP2008042660A (en) | Video signal reencoding device and video signal reencoding method | |
JP2009081781A (en) | Motion compensating apparatus and motion compensating method | |
JP4193224B2 (en) | Moving picture coding apparatus and method, and moving picture decoding apparatus and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20111012 |