JP2009055262A - Image encoding control device, image encoding control method, image encoding control program, and computer-readable medium recorded with the program - Google Patents

Image encoding control device, image encoding control method, image encoding control program, and computer-readable medium recorded with the program Download PDF

Info

Publication number
JP2009055262A
JP2009055262A JP2007219223A JP2007219223A JP2009055262A JP 2009055262 A JP2009055262 A JP 2009055262A JP 2007219223 A JP2007219223 A JP 2007219223A JP 2007219223 A JP2007219223 A JP 2007219223A JP 2009055262 A JP2009055262 A JP 2009055262A
Authority
JP
Japan
Prior art keywords
picture
encoded
complexity index
code amount
screen
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.)
Granted
Application number
JP2007219223A
Other languages
Japanese (ja)
Other versions
JP4527756B2 (en
Inventor
Atsushi Sagata
淳 嵯峨田
Mitsuro Ikeda
充郎 池田
Taku Sano
卓 佐野
Jiro Naganuma
次郎 長沼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2007219223A priority Critical patent/JP4527756B2/en
Publication of JP2009055262A publication Critical patent/JP2009055262A/en
Application granted granted Critical
Publication of JP4527756B2 publication Critical patent/JP4527756B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a new image encoding control technology capable of achieving stable encoding control even in the case of encoding images to be gradually changed in difficulty of image. <P>SOLUTION: Paying attention to a fact that action showing the index of complication and action showing the screen characteristic quantity such as screen total variance value are similar to each other, the screen characteristic quantity of a picture to be encoded is computed by correcting the index of complication of I picture, and the index of complication of the I picture is corrected based on the computed screen characteristic quantity of the picture to be encoded and the screen characteristic quantity of the I picture encoded last before the picture to be encoded so as to set the index of complication of the I picture to be used to decide a target encoding quantity of the picture to be encoded, and the target encoding quantity of the picture to be encoded is decided by using the set index of complication. With this structure, prediction accuracy of the target encoding quantity of the picture to be encoded is raised, and stable encoding control can be achieved. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、画像の複雑さ指数に基づいて符号化対象ピクチャのターゲット符号量を決定する映像符号化制御装置およびその方法と、その映像符号化制御装置の実現に用いられる映像符号化制御プログラムおよびそのプログラムを記録したコンピュータ読み取り可能な記録媒体とに関する。   The present invention relates to a video coding control apparatus and method for determining a target code amount of a picture to be coded based on an image complexity index, a video coding control program used for realizing the video coding control apparatus, and a method thereof. The present invention relates to a computer-readable recording medium on which the program is recorded.

MPEG2 test Model5(以下、MPEG2 TM5と称する)では、レート制御(量子化制御)を行うにあたって必要となる符号化対象ピクチャのターゲット符号量の決定方法について規格化している(例えば、非特許文献1参照)。   MPEG2 test Model 5 (hereinafter referred to as MPEG2 TM5) standardizes a method for determining a target code amount of a picture to be encoded that is necessary for performing rate control (quantization control) (for example, see Non-Patent Document 1). ).

このMPEG2 TM5では、これから符号化する各ピクチャタイプのピクチャ枚数と符号化した各ピクチャタイプのピクチャの複雑さ指数とに基づいて、符号化対象ピクチャのターゲット符号量を決定することについて規格化している。   This MPEG2 TM5 standardizes the determination of the target code amount of a picture to be encoded based on the number of pictures of each picture type to be encoded and the complexity index of each picture type of encoded picture. .

ここで、あるピクチャβの複雑さ指数X〔β〕とは、そのピクチャβを符号化したときに発生した符号量S〔β〕と、その符号化で用いた量子化ステップの平均値 aveQ(β〕とに基づいて、
X〔β〕=S〔β〕× aveQ〔β〕
という式に従って導出されることになる。
Here, the complexity index X [β] of a picture β is the code amount S [β] generated when the picture β is encoded, and the average value aveQ ( β] and
X [β] = S [β] × aveQ [β]
It is derived according to the following formula.

次に、図12に従って、MPEG2 TM5の規格化する符号化対象ピクチャのターゲット符号量の決定方法について説明する。   Next, a method for determining the target code amount of the encoding target picture to be standardized by MPEG2 TM5 will be described with reference to FIG.

図12に示すように、符号化対象ピクチャ(図中に示すピクチャα)を含む未来Z枚のピクチャに含まれるIピクチャの枚数をNi 、Pピクチャの枚数をNp 、Bピクチャの枚数をNb と表すならば、MPEG2 TM5では、符号化対象ピクチャがPピクチャである場合には、下記の式(1)に従って、そのターゲット符号量Tp を決定することを規定し、符号化対象ピクチャがBピクチャである場合には、下記の式(2)に従って、そのターゲット符号量Tb を決定することを規定し、符号化対象ピクチャがIピクチャである場合には、下記の式(3)に従って、そのターゲット符号量Ti を決定することを規定する。   As shown in FIG. 12, the number of I pictures included in future Z pictures including the picture to be encoded (picture α shown in the figure) is Ni, the number of P pictures is Np, and the number of B pictures is Nb. For example, in MPEG2 TM5, when the encoding target picture is a P picture, it is defined that the target code amount Tp is determined according to the following equation (1), and the encoding target picture is a B picture. In some cases, it is defined that the target code amount Tb is determined according to the following equation (2). When the encoding target picture is an I picture, the target code amount is determined according to the following equation (3). It is specified that the quantity Ti is determined.

Figure 2009055262
Figure 2009055262

ここで、式中のKp,Kb は定数を表す。また、RはZ枚のピクチャに対する残存符号量(Z枚のピクチャに対する総ターゲット符号量)を表す。また、Xi は符号化対象ピクチャよりも前にかつ最後に符号化したIピクチャ(図中に示すピクチャβ)の複雑さ指数を表し、Xp は符号化対象ピクチャよりも前にかつ最後に符号化したPピクチャの複雑さ指数を表し、Xb は符号化対象ピクチャよりも前にかつ最後に符号化したBピクチャの複雑さ指数を表す。   Here, Kp and Kb in the formula represent constants. R represents the remaining code amount for Z pictures (total target code amount for Z pictures). Xi represents the complexity index of the I picture (picture β shown in the figure) encoded before and at the end of the encoding target picture, and Xp is encoded before and at the end of the encoding target picture. Represents the complexity index of the P picture, and Xb represents the complexity index of the B picture encoded before and at the end of the current picture.

このように、MPEG2 TM5では、未来Z枚のピクチャに含まれる各ピクチャに対して、Iピクチャ、Pピクチャ、Bピクチャのそれぞれに、
Ti :Tp :Tb =(Xi /1):(Xp /Kp ):(Xb /Kb )
の比でもって、残存符号量Rを割り当てることを規定しているのである。
Thus, in MPEG2 TM5, for each picture included in the future Z pictures, each of the I picture, P picture, and B picture is
Ti: Tp: Tb = (Xi / 1) :( Xp / Kp) :( Xb / Kb)
Therefore, it is specified that the remaining code amount R is allocated.

従来技術では、このようなMPEG2 TM5の規格に従って、図13および図14に示すフローチャートの処理を実行することで、符号化対象ピクチャのターゲット符号量を決定するようにしている。   In the prior art, the target code amount of the picture to be encoded is determined by executing the processes of the flowcharts shown in FIGS. 13 and 14 in accordance with the MPEG2 TM5 standard.

すなわち、図13のフローチャートに示すように、先ず最初に、ステップS300で、GOPの先頭ピクチャの符号化に入ると、GOPのピクチャ枚数(gopN)と1ピクチャ当たりの平均符号量とを乗算することで、これから符号化するGOPの総ターゲット符号量を算出するとともに、その算出した総ターゲット符号量に対して1つ前のGOPにおいて残った符号量を加算することで、これから符号化するGOPの残存符号量Rを求める。   That is, as shown in the flowchart of FIG. 13, first, in step S300, when encoding of the first picture of the GOP is started, the number of GOP pictures (gopN) is multiplied by the average code amount per picture. Then, the total target code amount of the GOP to be encoded is calculated, and the remaining code amount of the GOP to be encoded is added by adding the remaining code amount in the previous GOP to the calculated total target code amount. The code amount R is obtained.

続いて、ステップS301で、GOPの先頭ピクチャからの順番に従って符号化対象ピクチャを選択する。続いて、ステップS302で、メモリから、符号化済みの各種ピクチャタイプのピクチャの複雑さ指数Xを読み出す。   Subsequently, in step S301, an encoding target picture is selected according to the order from the first picture of the GOP. Subsequently, in step S302, the complexity index X of pictures of various encoded picture types is read from the memory.

続いて、ステップS303で、読み出した複雑さ指数Xの中から、符号化対象ピクチャよりも前にかつ最後に符号化したIピクチャの複雑さ指数Xi と、符号化対象ピクチャよりも前にかつ最後に符号化したPピクチャの複雑さ指数Xp と、符号化対象ピクチャよりも前にかつ最後に符号化したBピクチャの複雑さ指数Xb とを抽出して、それらの複雑さ指数Xi,Xp,Xb と前述したNi,Np,Nb とを使って符号化対象ピクチャのターゲット符号量Tを決定する。   Subsequently, in step S303, from the read complexity index X, the complexity index Xi of the I picture encoded last and before the encoding target picture, and the encoding index before the encoding target picture and the last one are encoded. Are extracted from the complexity index Xp of the P picture encoded in step B and the complexity index Xb of the B picture encoded last and before the picture to be encoded, and these complexity indices Xi, Xp, Xb are extracted. And the above-described Ni, Np, and Nb, the target code amount T of the encoding target picture is determined.

すなわち、図14のフローチャートに示すように、符号化対象ピクチャがPピクチャである場合には、複雑さ指数Xi,Xp,Xb を使い、式(1)に従ってターゲット符号量Tp を決定し、符号化対象ピクチャがBピクチャである場合には、複雑さ指数Xi,Xp,Xb を使い、式(2)に従ってターゲット符号量Tb を決定し、符号化対象ピクチャがIピクチャである場合には、複雑さ指数Xi,Xp,Xb を使い、式(3)に従ってターゲット符号量Ti を決定する。   That is, as shown in the flowchart of FIG. 14, when the picture to be encoded is a P picture, the complexity index Xi, Xp, Xb is used to determine the target code amount Tp according to the equation (1), and the encoding is performed. If the target picture is a B picture, the complexity index Xi, Xp, Xb is used to determine the target code amount Tb according to the equation (2). If the target picture is an I picture, the complexity Using the indices Xi, Xp, and Xb, the target code amount Ti is determined according to the equation (3).

続いて、ステップS304で、決定したターゲット符号量Tに従って量子化ステップを設定して符号化対象ピクチャを符号化する。続いて、ステップS305で、符号化対象ピクチャの符号化で発生した符号量Sを測定する。続いて、ステップS306で、残存符号量Rから発生符号量Sを差し引くことで残存符号量Rを更新する。   Subsequently, in step S304, a quantization step is set according to the determined target code amount T, and the encoding target picture is encoded. Subsequently, in step S305, the code amount S generated by encoding the encoding target picture is measured. Subsequently, in step S306, the remaining code amount R is updated by subtracting the generated code amount S from the remaining code amount R.

続いて、ステップS307で、符号化対象ピクチャの符号化に用いた量子化ステップQの平均値 aveQを算出する。続いて、ステップS308で、“X=S× aveQ”に従って符号化対象ピクチャの複雑さ指数Xを算出して、メモリに書き込む。   Subsequently, in step S307, the average value aveQ of the quantization step Q used for encoding the encoding target picture is calculated. Subsequently, in step S308, the complexity index X of the picture to be encoded is calculated according to “X = S × aveQ” and written into the memory.

続いて、ステップS309で、GOPが終了したのか否かを判断して、GOPが終了していないことを判断するときには、ステップS301の処理に戻り、GOPが終了したことを判断するときには、次のGOPを処理すべくステップS300の処理に戻る。   Subsequently, in step S309, it is determined whether or not the GOP has ended. When it is determined that the GOP has not ended, the process returns to step S301. When it is determined that the GOP has ended, The process returns to step S300 to process the GOP.

図15に、この処理を実行する従来の映像符号化装置の装置構成を図示する。   FIG. 15 shows a device configuration of a conventional video encoding device that executes this processing.

この図に示すように、従来の映像符号化装置は、符号化部100とレート制御部200とで構成され、符号化部100は、マクロブロック分割部101、動き予測部102、動き補償部103、イントラ・インター選択部104、減算器105、DCT部106、量子化部107、情報源符号化部108、逆量子化部109、逆DCT部110、加算器111およびフレームメモリ112を備えて、レート制御部200から与えられる量子化ステップ値に従って符号化対象のマクロブロックを符号化して、そのときに発生した符号量をレート制御部200に通知する。   As shown in this figure, the conventional video encoding apparatus includes an encoding unit 100 and a rate control unit 200. The encoding unit 100 includes a macroblock division unit 101, a motion prediction unit 102, and a motion compensation unit 103. , An intra / inter selection unit 104, a subtractor 105, a DCT unit 106, a quantization unit 107, an information source encoding unit 108, an inverse quantization unit 109, an inverse DCT unit 110, an adder 111, and a frame memory 112, The macro block to be encoded is encoded according to the quantization step value given from the rate control unit 200, and the code amount generated at that time is notified to the rate control unit 200.

一方、レート制御部200は、GOPの残りのピクチャ枚数を更新する残りIPB枚数更新部201と、GOPの残りの符号量を更新するGOP残り符号量更新部202と、IPB枚数とGOP残り符号量と符号化済みピクチャ複雑さ指数メモリ300から読み出される複雑さ指数とに基づいて、符号化対象ピクチャのターゲット符号量を算出するターゲット符号量算出部203と、ターゲット符号量に基づいてマクロブロックの量子化ステップ値を算出して量子化部107に与えるマクロブロック量子化ステップ算出部204と、情報源符号化部108から与えられるマクロブロックの発生符号量を集計することで符号化対象ピクチャの発生符号量を算出するピクチャ発生符号量算出部205と、量子化部107に与えた量子化ステップ値の符号化対象ピクチャにおける平均値を算出するピクチャ平均量子化ステップ算出部206と、量子化ステップ値の平均値と発生符号量とに基づいて符号化を終えた符号化対象ピクチャの複雑さ指数を算出して符号化済みピクチャ複雑さ指数メモリ300に書き込む複雑さ指数算出部207とを備えることで、符号化部100の実行する符号化を制御する。   On the other hand, the rate control unit 200 includes a remaining IPB number updating unit 201 that updates the remaining number of pictures in the GOP, a GOP remaining code amount updating unit 202 that updates the remaining code amount of the GOP, an IPB number and a remaining GOP code amount. And a target code amount calculation unit 203 that calculates a target code amount of a picture to be encoded based on the complexity index read from the encoded picture complexity index memory 300, and a macroblock quantum based on the target code amount The macro block quantization step calculation unit 204 that calculates the quantization step value and supplies the quantization step value to the quantization unit 107, and the generated code amount of the macro block given from the information source coding unit 108 is aggregated to generate the generated code of the picture to be encoded Quantization step value given to picture generation code amount calculation unit 205 for calculating the amount and quantization unit 107 A picture average quantization step calculation unit 206 that calculates an average value in the encoding target picture, and calculates a complexity index of the encoding target picture that has been encoded based on the average quantization step value and the generated code amount And a complexity index calculating unit 207 that writes the encoded picture complexity index memory 300 to the encoded picture complexity index memory 300, thereby controlling encoding performed by the encoding unit 100.

従来の映像符号化装置は、この図15の構成に従って、図13および図14のフローチャートを実行することで、MPEG2 TM5の規格に従って符号化対象ピクチャのターゲット符号量を決定して、それに基づいて符号化対象ピクチャを符号化するようにしているのである。
インターネット<URL:http://www.mpeg.org/MSSG/tm5/Ch10/Ch10.html >
The conventional video encoding apparatus determines the target code amount of the encoding target picture according to the MPEG2 TM5 standard by executing the flowcharts of FIGS. 13 and 14 according to the configuration of FIG. The encoding target picture is encoded.
Internet <URL: http://www.mpeg.org/MSSG/tm5/Ch10/Ch10.html>

動画像の映像効果の一つであるフェード映像は、シーンチェンジが発生することなく画像の難しさが漸次変化することから、映像符号化におけるレート制御(量子化制御)が困難であるという問題がある。   Fade video, which is one of the video effects of moving images, has the problem that rate control (quantization control) in video coding is difficult because the difficulty of the image gradually changes without scene changes. is there.

一方、前述したように、従来の映像符号化装置では、MPEG2 TM5の規格に従って符号化対象ピクチャのターゲット符号量を決定するようにしている。   On the other hand, as described above, in the conventional video encoding apparatus, the target code amount of the encoding target picture is determined according to the MPEG2 TM5 standard.

これから、従来の映像符号化装置では、フェード映像のような画像の難しさが漸次変化する映像を符号化する場合にも、直近に符号化したI・P・Bピクチャの符号化結果である複雑さ指数Xi,Xp,Xb を使って符号化対象ピクチャのターゲット符号量を決定するようにしている。   As a result, in the conventional video encoding apparatus, even when a video such as a faded video in which the difficulty of an image gradually changes is encoded, a complicated result that is the encoding result of the most recently encoded I / P / B picture is obtained. The target code amount of the picture to be encoded is determined using the depth indices Xi, Xp, and Xb.

しかしながら、このような方法では、時間的にかなり前に求まった複雑さ指数を未来に符号化する同種のピクチャタイプの複雑さ指数として利用して、これから符号化する符号化対象ピクチャのターゲット符号量を予測することになる。   However, in such a method, the complexity index obtained a long time ago is used as the complexity index of the same picture type to be encoded in the future, and the target code amount of the current picture to be encoded is encoded. Will be predicted.

これから、従来の映像符号化装置では、符号化対象ピクチャのターゲット符号量の予測精度が上がらず、フェードイン映像(暗い画面がだんだん明るくなっていく映像)の符号化の場合には、符号量が予想よりも出すぎるという問題や、逆に、フェードアウト映像(明るい画面がだんだん暗くなってなっていく映像)の符号化の場合には、符号量が予想よりも出ないという問題がある。   Thus, in the conventional video encoding device, the prediction accuracy of the target code amount of the encoding target picture does not increase, and in the case of encoding a fade-in video (a video in which a dark screen becomes gradually brighter), the code amount is In the case of encoding a fade-out video (a video in which a bright screen becomes gradually darker), there is a problem that the amount of codes is not higher than expected.

このように、従来技術では、時間的にかなり前に求まった複雑さ指数を未来に符号化する同種のピクチャタイプの複雑さ指数として利用して、これから符号化する符号化対象ピクチャのターゲット符号量を決定するようにしていることから、ターゲット符号量の予測精度が上がらず、画像の難しさが漸次変化する映像を符号化する場合に、符号化制御が安定しないことで画質が劣化するという問題がある。   As described above, in the conventional technology, the complexity index obtained a long time ago is used as the complexity index of the same picture type to be encoded in the future, and the target code amount of the encoding target picture to be encoded from now on is used. Therefore, when encoding a video in which the prediction accuracy of the target code amount does not increase and the difficulty of the image gradually changes, the image quality deteriorates due to unstable encoding control. There is.

特に、IピクチャはGOPの先頭に出現するだけであり、PピクチャやBピクチャに比べて出現回数が少ないことから、時間的にかなり前に求まった複雑さ指数を使うことになり、この問題を大きなものにしている。   In particular, since the I picture only appears at the beginning of the GOP and has a smaller number of appearances than the P picture and the B picture, the complexity index obtained long before is used. Make it big.

本発明はかかる事情に鑑みてなされたものであって、画像の難しさが漸次変化する映像を符号化する場合にも、安定した符号化制御を実現できるようにする新たな映像符号化制御技術の提供を目的とする。   The present invention has been made in view of such circumstances, and is a new video encoding control technique that can realize stable encoding control even when encoding video in which the difficulty of an image gradually changes. The purpose is to provide.

〔1〕第1の構成
前述の目的を達成するために、本発明の映像符号化制御装置は、これから符号化する所定枚数のピクチャに含まれる各ピクチャタイプのピクチャ枚数と、符号化対象ピクチャよりも前にかつ最後に符号化した各ピクチャタイプのピクチャの複雑さ指数とに基づいて、符号化対象ピクチャの目標符号量を決定するという構成を採るときに、(1)符号化対象ピクチャの画面特徴量を算出する算出手段と、(2)算出手段の算出した画面特徴量と、符号化対象ピクチャよりも前にかつ最後に符号化したIピクチャの画面特徴量とに基づいて、そのIピクチャの複雑さ指数を補正することで、符号化対象ピクチャの目標符号量を決定するのに用いるIピクチャの複雑さ指数を設定する設定手段と、(3)設定手段の設定した複雑さ指数を用いて、符号化対象ピクチャの目標符号量を決定する決定手段とを備えるように構成する。
[1] First Configuration In order to achieve the above-described object, the video coding control apparatus according to the present invention includes the number of pictures of each picture type included in a predetermined number of pictures to be coded, and a picture to be coded. When adopting a configuration in which the target code amount of a picture to be coded is determined based on the complexity index of the picture of each picture type coded before and last, (1) the picture of the picture to be coded A calculation means for calculating a feature value; (2) based on the screen feature value calculated by the calculation means and the screen feature value of the I picture encoded last and before the encoding target picture; Setting means for setting the complexity index of the I picture used for determining the target code amount of the picture to be encoded by correcting the complexity index of (3), and (3) the complexity set by the setting means And determining means for determining a target code amount of the encoding target picture using the exponent.

この構成を採るときに、画面特徴量として画面分散合計値を用いることがあり、この場合には、算出手段は、画面特徴量として画面分散合計値を算出し、設定手段は、算出手段の算出した画面分散合計値と、符号化対象ピクチャよりも前にかつ最後に符号化したIピクチャの画面分散合計値とに基づいて、Iピクチャの複雑さ指数を設定する。   When adopting this configuration, the screen variance total value may be used as the screen feature amount. In this case, the calculation unit calculates the screen variance total value as the screen feature amount, and the setting unit calculates the calculation unit. The complexity index of the I picture is set on the basis of the calculated screen variance total value and the screen variance total value of the I picture encoded last and before the encoding target picture.

また、この構成を採るときに、符号化対象ピクチャがBピクチャである場合には、(i)設定手段は、符号化対象ピクチャの目標符号量を決定するのに用いるIピクチャの複雑さ指数を補正しないようにし、(ii)決定手段は、符号化対象ピクチャの目標符号量を決定するのに用いるIピクチャの複雑さ指数として、符号化対象ピクチャよりも前にかつ最後に符号化したPピクチャの目標符号量の決定の際に用いたIピクチャの複雑さ指数を用いることを決定するようにする。   Also, when this configuration is adopted, if the encoding target picture is a B picture, (i) the setting means sets the complexity index of the I picture used to determine the target code amount of the encoding target picture. (Ii) the P picture that is encoded before and at the end of the encoding target picture is used as the complexity index of the I picture used to determine the target code amount of the encoding target picture. It is decided to use the complexity index of the I picture used in determining the target code amount.

以上の各処理手段はコンピュータプログラムでも実現できるものであり、このコンピュータプログラムは、適当なコンピュータ読み取り可能な記録媒体に記録して提供されたり、ネットワークを介して提供され、本発明を実施する際にインストールされてCPUなどの制御手段上で動作することにより本発明を実現することになる。   Each of the above processing means can also be realized by a computer program. This computer program is provided by being recorded on an appropriate computer-readable recording medium or provided via a network, and is used when implementing the present invention. The present invention is realized by being installed and operating on a control means such as a CPU.

このように構成される本発明の映像符号化制御装置では、画像の複雑さ指数の示す挙動と画面分散合計値(画像内の画素についてのL1分散やL2分散などの値)などのような画面特徴量の示す挙動とが類似しているということに着目して、I・P・Bピクチャの内で出現頻度が最も少ないことで時間的にかなり前に求まった複雑さ指数を使うことになるIピクチャの複雑さ指数を補正対象として、符号化対象ピクチャの画面特徴量を算出し、その算出した符号化対象ピクチャの画面特徴量と、符号化対象ピクチャよりも前にかつ最後に符号化したIピクチャの画面特徴量とに基づいて、そのIピクチャの複雑さ指数を補正することで、符号化対象ピクチャの目標符号量を決定するのに用いるIピクチャの複雑さ指数を設定して、その設定した複雑さ指数を用いて符号化対象ピクチャの目標符号量を決定するようにする。   In the video encoding control apparatus of the present invention configured as described above, a screen such as the behavior indicated by the complexity index of the image and the screen variance total value (values such as L1 variance and L2 variance for the pixels in the image), etc. Focusing on the fact that the behavior indicated by the feature amount is similar, the complexity index obtained long ago is used because the appearance frequency is the lowest among the I, P, and B pictures. Using the complexity index of the I picture as a correction target, the screen feature amount of the encoding target picture is calculated, and the calculated screen feature amount of the encoding target picture is encoded before and at the end of the encoding target picture. By correcting the complexity index of the I picture based on the screen feature value of the I picture, the complexity index of the I picture used to determine the target code amount of the encoding target picture is set, Set So as to determine the target code amount of the encoding target picture by using the complexity index.

このとき、Bピクチャについては並び替えが起こることを考慮して、符号化対象ピクチャがBピクチャである場合には、Iピクチャの複雑さ指数の補正は行わずに、符号化対象ピクチャの目標符号量を決定するのに用いるIピクチャの複雑さ指数として、符号化対象ピクチャよりも前にかつ最後に符号化したPピクチャの目標符号量の決定の際に用いたIピクチャの複雑さ指数を用いるようにする。   At this time, considering that rearrangement occurs for the B picture, if the encoding target picture is a B picture, the complexity index of the I picture is not corrected and the target code of the encoding target picture is not corrected. As the complexity index of the I picture used to determine the amount, the complexity index of the I picture used in determining the target code amount of the P picture encoded before and at the end of the encoding target picture is used. Like that.

このようにして、本発明の映像符号化制御装置では、符号化対象ピクチャの目標符号量を決定するにあたって、Iピクチャの複雑さ指数に関して、時間的にかなり前の複雑さ指数を使うのではなくて、画面特徴量の変化を使って予測した符号化対象ピクチャ時点の複雑さ指数を使うようにすることから、符号化対象ピクチャの目標符号量の予測精度が上がり、画像の難しさが漸次変化する映像を符号化する場合にも、符号化制御が安定して画質の劣化を発生を防ぐことができるようになる。   In this way, in the video coding control apparatus of the present invention, when determining the target code amount of the picture to be coded, the complexity index of I picture is not used in terms of the complexity index that is much earlier in time. Therefore, since the complexity index at the time of the encoding target picture predicted using the change in the screen feature amount is used, the prediction accuracy of the target encoding amount of the encoding target picture increases, and the difficulty of the image gradually changes. Even when the video to be encoded is encoded, the encoding control is stabilized and the deterioration of the image quality can be prevented.

〔2〕第2の構成
前述の目的を達成するために、本発明の映像符号化制御装置は、これから符号化する所定枚数のピクチャに含まれる各ピクチャタイプのピクチャ枚数と、符号化対象ピクチャよりも前にかつ最後に符号化した各ピクチャタイプのピクチャの複雑さ指数とに基づいて、符号化対象ピクチャの目標符号量を決定するという構成を採るときに、(1)符号化対象ピクチャよりも後にかつ最初に符号化することになるIピクチャの画面特徴量を算出する算出手段と、(2)算出手段の算出した画面特徴量と、符号化対象ピクチャよりも前にかつ最後に符号化したIピクチャの画面特徴量とに基づいて、そのIピクチャの複雑さ指数を補正することで、符号化対象ピクチャの目標符号量を決定するのに用いるIピクチャの複雑さ指数を設定する設定手段と、(3)設定手段の設定した複雑さ指数を用いて、符号化対象ピクチャの目標符号量を決定する決定手段とを備えるように構成する。
[2] Second Configuration In order to achieve the above-described object, the video coding control apparatus according to the present invention includes the number of pictures of each picture type included in a predetermined number of pictures to be coded, and a picture to be coded. When a configuration is adopted in which the target code amount of the encoding target picture is determined based on the complexity index of the picture of each picture type encoded before and last, (1) than the encoding target picture A calculation means for calculating the screen feature value of the I picture to be encoded later and first; (2) the screen feature value calculated by the calculation means; and the encoding before the encoding target picture. By correcting the complexity index of the I picture based on the screen feature quantity of the I picture, the complexity index of the I picture used to determine the target code quantity of the encoding target picture is obtained. A setting unit configured to set; and (3) a determination unit configured to determine a target code amount of the encoding target picture using the complexity index set by the setting unit.

この構成を採るときに、画面特徴量として画面分散合計値を用いることがあり、この場合には、算出手段は、画面特徴量として画面分散合計値を算出し、設定手段は、算出手段の算出した画面分散合計値と、符号化対象ピクチャよりも前にかつ最後に符号化したIピクチャの画面分散合計値とに基づいて、Iピクチャの複雑さ指数を設定する。   When adopting this configuration, the screen variance total value may be used as the screen feature amount. In this case, the calculation unit calculates the screen variance total value as the screen feature amount, and the setting unit calculates the calculation unit. The complexity index of the I picture is set on the basis of the calculated screen variance total value and the screen variance total value of the I picture encoded last and before the encoding target picture.

以上の各処理手段はコンピュータプログラムでも実現できるものであり、このコンピュータプログラムは、適当なコンピュータ読み取り可能な記録媒体に記録して提供されたり、ネットワークを介して提供され、本発明を実施する際にインストールされてCPUなどの制御手段上で動作することにより本発明を実現することになる。   Each of the above processing means can also be realized by a computer program. This computer program is provided by being recorded on an appropriate computer-readable recording medium or provided via a network, and is used when implementing the present invention. The present invention is realized by being installed and operating on a control means such as a CPU.

このように構成される本発明の映像符号化制御装置では、画像の複雑さ指数の示す挙動と画面分散合計値(画面内の画素についてのL1分散やL2分散などの値)などのような画面特徴量の示す挙動とが類似しているということに着目して、I・P・Bピクチャの内で出現頻度が最も少ないことで時間的にかなり前に求まった複雑さ指数を使うことになるIピクチャの複雑さ指数を補正対象として、符号化対象ピクチャよりも後にかつ最初に符号化することになるIピクチャの画面特徴量を算出し、その算出した符号化対象ピクチャの画面特徴量と、符号化対象ピクチャよりも前にかつ最後に符号化したIピクチャの画面特徴量とに基づいて、そのIピクチャの複雑さ指数を補正することで、符号化対象ピクチャの目標符号量を決定するのに用いるIピクチャの複雑さ指数を設定して、その設定した複雑さ指数を用いて符号化対象ピクチャの目標符号量を決定するようにする。   In the video coding control apparatus of the present invention configured as described above, a screen such as the behavior indicated by the complexity index of the image and the screen variance total value (values such as L1 variance and L2 variance for the pixels in the screen), etc. Focusing on the fact that the behavior indicated by the feature amount is similar, the complexity index obtained long ago is used because the appearance frequency is the lowest among the I, P, and B pictures. Using the complexity index of the I picture as a correction target, calculate the screen feature amount of the I picture to be encoded first after the encoding target picture, the calculated screen feature amount of the encoding target picture, The target code amount of the encoding target picture is determined by correcting the complexity index of the I picture based on the screen feature amount of the I picture encoded before and at the end of the encoding target picture. In Set the complexity index of I pictures are, so as to determine the target code amount of the encoding target picture by using the complexity index was the setting.

このようにして、本発明の映像符号化制御装置では、符号化対象ピクチャの目標符号量を決定するにあたって、Iピクチャの複雑さ指数に関して、時間的にかなり前の複雑さ指数を使うのではなくて、画面特徴量の変化を使って予測した符号化対象ピクチャよりも未来の時点の複雑さ指数を使うようにすることから、符号化対象ピクチャの目標符号量の予測精度が上がり、画像の難しさが漸次変化する映像を符号化する場合にも、符号化制御が安定して画質の劣化を発生を防ぐことができるようになる。   In this way, in the video coding control apparatus of the present invention, when determining the target code amount of the picture to be coded, the complexity index of I picture is not used in terms of the complexity index that is much earlier in time. Therefore, since the complexity index at a future time point is used rather than the current picture predicted using changes in the screen feature value, the target code quantity prediction accuracy of the current picture increases and the picture becomes difficult. Even when a video with a gradually changing length is encoded, the encoding control is stabilized and the deterioration of the image quality can be prevented.

本発明によれば、符号化対象ピクチャの目標符号量を決定するにあたって、Iピクチャの複雑さ指数に関して、時間的にかなり前の複雑さ指数を使うのではなくて、画面特徴量の変化を使って予測した符号化対象ピクチャ時点の複雑さ指数や符号化対象ピクチャよりも未来の時点の複雑さ指数を使うようにすることから、符号化対象ピクチャの目標符号量の予測精度が上がり、画像の難しさが漸次変化する映像を符号化する場合にも、符号化制御が安定して画質の劣化を発生を防ぐことができるようになる。   According to the present invention, when determining the target code amount of a picture to be encoded, the change of the screen feature amount is used for the complexity index of the I picture, instead of using the complexity index that is much earlier in time. Therefore, the prediction accuracy of the target code amount of the encoding target picture is improved, and the complexity index at the time of the encoding target picture predicted in advance and the complexity index at the future time point are used. Even when a video whose difficulty is gradually changed is encoded, the encoding control is stabilized and the deterioration of the image quality can be prevented.

以下、実施の形態に従って本発明を詳細に説明する。   Hereinafter, the present invention will be described in detail according to embodiments.

図1に、本発明の適用される映像符号化装置1の装置構成を図示する。   FIG. 1 illustrates a device configuration of a video encoding device 1 to which the present invention is applied.

この図に示すように、本発明の適用される映像符号化装置1は、符号化部100とレート制御部200とで構成され、符号化部100は、レート制御部200から与えられる量子化ステップ値に従って符号化対象のマクロブロックを符号化して、そのときに発生した符号量をレート制御部200に通知し、レート制御部200は、符号化部100から受け取った発生符号量に基づいて残存するターゲット符号量を更新しつつ、符号化対象のマクロブロックの量子化ステップ値を設定して符号化部100に与える。   As shown in this figure, a video encoding apparatus 1 to which the present invention is applied includes an encoding unit 100 and a rate control unit 200, and the encoding unit 100 is a quantization step given from the rate control unit 200. The macroblock to be encoded is encoded according to the value, and the code amount generated at that time is notified to the rate control unit 200. The rate control unit 200 remains based on the generated code amount received from the encoding unit 100. While updating the target code amount, the quantization step value of the encoding target macroblock is set and supplied to the encoding unit 100.

〔1〕第1の実施形態例
次に、図2に従って、本発明の第1の実施形態例による符号化対象ピクチャのターゲット符号量の決定方法について説明する。
[1] First Embodiment Next, a method for determining a target code amount of a picture to be encoded according to a first embodiment of the present invention will be described with reference to FIG.

本実施形態例では、
(イ)画像の複雑さ指数の示す挙動と画面分散合計値の示す挙動とが類似していると いうことと、
(ロ)符号化対象ピクチャをピクチャαと表し、符号化対象ピクチャよりも前にかつ 最後に符号化したIピクチャをピクチャβと表すならば、ピクチャαとピクチ ャβとについては画面分散合計値が算出可能であるということ
に着目して、ピクチャβの複雑さ指数Xi[β] と、ピクチャβの画面分散合計値var[β] と、ピクチャαの画面分散合計値var[α] とに基づいて、ピクチャαがIピクチャである場合の複雑さ指数Xi[α] を、
Xi[α] =Xi[β] ×(var[α] /var[β] )
と予測して、従来技術がピクチャαのターゲット符号量の決定に用いていた式(1)や式(3)に示す複雑さ指数Xi の代わりに、この予測したXi[α] を用いるようにするという構成を採る。
In this embodiment example,
(B) The behavior indicated by the complexity index of the image is similar to the behavior indicated by the total screen variance,
(B) If the picture to be encoded is represented as picture α, and the I picture coded before and at the end of the picture to be coded is represented as picture β, the screen variance total value for picture α and picture β Note that the complexity index Xi [β] of the picture β, the screen variance total value var [β] of the picture β, and the screen variance total value var [α] of the picture α On the basis of the complexity index Xi [α] when the picture α is an I picture,
Xi [α] = Xi [β] × (var [α] / var [β])
Thus, the predicted Xi [α] is used instead of the complexity index Xi shown in the equations (1) and (3) used in the determination of the target code amount of the picture α by the prior art. The configuration is to be taken.

なお、以下では、Iピクチャであるピクチャβを簡単のためにIピクチャβと記載することがある。   In the following, the picture β, which is an I picture, may be referred to as an I picture β for simplicity.

ここで、画面分散合計値としては、下記に示すL1分散の値やL2分散の値などを用いることが可能である。   Here, as the screen dispersion total value, the following L1 dispersion value, L2 dispersion value, or the like can be used.

L1分散値=ΣΣ|Ixy−Ave
ただし、ΣΣはマクロブロック内画素についての総和
xyはマクロブロック内画素の画素値
veはマクロブロック内画素の画素値の平均値
L2分散値=ΣΣ|Ixy−Ave2
ただし、ΣΣはマクロブロック内画素についての総和
xyはマクロブロック内画素の画素値
veはマクロブロック内画素の画素値の平均値
図3および図4に、本実施形態例で構成されるレート制御部200が実行するフローチャートを図示する。
L1 dispersion value = ΣΣ | I xy −A ve |
Where ΣΣ is the sum of the pixels in the macroblock
I xy is the pixel value of the pixel in the macroblock
A ve is the average pixel value of the pixels in the macroblock
L2 dispersion value = ΣΣ | I xy −A ve | 2
Where ΣΣ is the sum of the pixels in the macroblock
I xy is the pixel value of the pixel in the macroblock
Ave is the average value of the pixel values of the pixels in the macroblock. FIGS. 3 and 4 are flowcharts executed by the rate control unit 200 configured in this embodiment.

次に、図3および図4のフローチャートに従って、本実施形態例が実行する符号化対象ピクチャのターゲット符号量の決定処理について説明する。   Next, according to the flowcharts of FIGS. 3 and 4, the target code amount determination process of the encoding target picture executed by the present embodiment will be described.

本実施形態例に従う場合、レート制御部200は、図3のフローチャートに示すように、先ず最初に、ステップS100で、GOPの先頭ピクチャの符号化に入ると、GOPのピクチャ枚数(gopN)と1ピクチャ当たりの平均符号量とを乗算することで、これから符号化するGOPの総ターゲット符号量を算出するとともに、その算出した総ターゲット符号量に対して1つ前のGOPにおいて残った符号量を加算することで、これから符号化するGOPの残存符号量Rを求める。   According to the present embodiment, as shown in the flowchart of FIG. 3, the rate control unit 200 first enters the number of GOP pictures (gopN) and 1 when the encoding of the first picture of the GOP starts in step S100. Multiply by the average code amount per picture to calculate the total target code amount of the GOP to be encoded, and add the remaining code amount in the previous GOP to the calculated total target code amount Thus, the remaining code amount R of the GOP to be encoded is obtained.

続いて、ステップS101で、GOPの先頭ピクチャからの順番に従って符号化対象ピクチャαを選択する。   Subsequently, in step S101, the encoding target picture α is selected according to the order from the first picture of the GOP.

続いて、ステップS102で、符号化対象ピクチャαの画面分散合計値var[α] を算出する。   Subsequently, in step S102, the screen variance total value var [α] of the encoding target picture α is calculated.

続いて、ステップS103で、メモリから、符号化対象ピクチャαよりも前にかつ最後に符号化したIピクチャβの画面分散合計値var[β] を読み出す。Iピクチャβについては符号化対象ピクチャαよりも前に符号化しており、その際に画面分散合計値var[β] を算出してメモリに保存しているので、それをメモリから読み出すのである。   Subsequently, in step S103, the screen variance total value var [β] of the I picture β encoded last and before the encoding target picture α is read from the memory. The I picture β is encoded before the encoding target picture α, and the screen variance total value var [β] is calculated and stored in the memory at that time, and is read from the memory.

続いて、ステップS104で、メモリから、Iピクチャβの複雑さ指数Xi[β] を含む、符号化済みの各種ピクチャタイプのピクチャの複雑さ指数Xを読み出す。   Subsequently, in step S104, the encoded complexity indices X of various picture types including the complexity index Xi [β] of the I picture β are read out from the memory.

続いて、ステップS105で、メモリから読み出した複雑さ指数Xと、算出した画面分散合計値var[α] と、メモリから読み出した画面分散合計値var[β] と、前述したNi,Np,Nb とを使って符号化対象ピクチャαのターゲット符号量Tを決定する。   Subsequently, in step S105, the complexity index X read from the memory, the calculated screen variance total value var [α], the screen variance total value var [β] read from the memory, and the aforementioned Ni, Np, Nb. Are used to determine the target code amount T of the encoding target picture α.

すなわち、ステップS105の処理に入ると、図4のフローチャートに示すように、先ず最初に、ステップS1050で、符号化対象ピクチャαがPピクチャであるのか否かを判断して、符号化対象ピクチャαがPピクチャであることを判断するときには、ステップS1051に進んで、Iピクチャβの複雑さ指数Xi[β] と、Iピクチャβの画面分散合計値var[β] と、符号化対象ピクチャαの画面分散合計値var[α] とに基づいて、
Xi[α] =Xi[β] ×(var[α] /var[β] )
という算出式に従って、符号化対象ピクチャαがIピクチャであるならば持つであろう複雑さ指数Xi[α] を予測する。
That is, when entering the process of step S105, as shown in the flowchart of FIG. 4, first, in step S1050, it is determined whether or not the encoding target picture α is a P picture, and the encoding target picture α Is determined to be a P picture, the process proceeds to step S1051, and the complexity index Xi [β] of the I picture β, the screen variance total value var [β] of the I picture β, and the encoding target picture α Based on the total screen variance var [α]
Xi [α] = Xi [β] × (var [α] / var [β])
According to the calculation formula, the complexity index Xi [α] that the encoding target picture α will have if it is an I picture is predicted.

続いて、ステップS1052で、その予測した複雑さ指数Xi[α] を式(1)で用いる複雑さ指数Xi として設定するとともに、メモリから読み出した複雑さ指数Xの中から、符号化対象ピクチャαよりも前にかつ最後に符号化したPピクチャの複雑さ指数Xp と、符号化対象ピクチャαよりも前にかつ最後に符号化したBピクチャの複雑さ指数Xb とを抽出して、それらの複雑さ指数Xi,Xp,Xb と前述したNi,Np,Nb とを使い、前述した式(1)に従ってターゲット符号量Tp を決定する。   Subsequently, in step S1052, the predicted complexity index Xi [α] is set as the complexity index Xi used in Expression (1), and the encoding target picture α is selected from the complexity indices X read from the memory. The complexity index Xp of the P picture encoded before and last and the complexity index Xb of the B picture encoded last and before the encoding target picture α are extracted and their complexity is extracted. The target code amount Tp is determined according to the above-described equation (1) using the depth index Xi, Xp, Xb and the above-described Ni, Np, Nb.

一方、ステップS1050で符号化対象ピクチャがPピクチャでないことを判断するときには、ステップS1053に進んで、符号化対象ピクチャαがBピクチャであるのか否かを判断して、符号化対象ピクチャαがBピクチャであることを判断するときには、ステップS1054に進んで、メモリから、符号化対象ピクチャαよりも前にかつ最後に符号化したPピクチャのターゲット符号量の算出の際に用いた複雑さ指数Xi を取得する。   On the other hand, when it is determined in step S1050 that the encoding target picture is not a P picture, the process proceeds to step S1053 to determine whether or not the encoding target picture α is a B picture. When it is determined that the picture is a picture, the process proceeds to step S1054, and the complexity index Xi used when calculating the target code amount of the P picture encoded before and last from the encoding target picture α from the memory. To get.

続いて、ステップS1055で、メモリから読み出した複雑さ指数Xの中から、符号化対象ピクチャαよりも前にかつ最後に符号化したPピクチャの複雑さ指数Xp と、符号化対象ピクチャαよりも前にかつ最後に符号化したBピクチャの複雑さ指数Xb とを抽出して、その取得した複雑さ指数Xi とその抽出したXp,Xb と前述したNi,Np,Nb とを使い、前述した式(2)に従ってターゲット符号量Tb を決定する。   Subsequently, in step S1055, out of the complexity index X read from the memory, the complexity index Xp of the P picture encoded last before the encoding target picture α and the encoding target picture α is determined. Extract the complexity index Xb of the B picture encoded before and last, and use the obtained complexity index Xi and the extracted Xp, Xb and the aforementioned Ni, Np, Nb, and The target code amount Tb is determined according to (2).

ここで、符号化対象ピクチャαがBピクチャである場合に、ステップS1051で実行するような予測処理を行わないのは、Bピクチャについては並び替えが起こることで、そのような予測処理を行うことが適切ではないからである。   Here, when the encoding target picture α is a B picture, the prediction process that is executed in step S1051 is not performed because the B picture is rearranged and the prediction process is performed. Is not appropriate.

一方、ステップS1053で符号化対象ピクチャαがBピクチャでないことを判断するとき、すなわち、符号化対象ピクチャαがIピクチャであることを判断するときには、ステップS1056に進んで、Iピクチャβの複雑さ指数Xi[β] と、Iピクチャβの画面分散合計値var[β] と、Iピクチャである符号化対象ピクチャαの画面分散合計値var[α] とに基づいて、
Xi[α] =Xi[β] ×(var[α] /var[β] )
という算出式に従って、Iピクチャである符号化対象ピクチャαを符号化する場合の複雑さ指数Xi[α] を予測する。
On the other hand, when it is determined in step S1053 that the encoding target picture α is not a B picture, that is, when it is determined that the encoding target picture α is an I picture, the process proceeds to step S1056 to determine the complexity of the I picture β. Based on the index Xi [β], the screen variance total value var [β] of the I picture β, and the screen variance total value var [α] of the encoding target picture α that is an I picture,
Xi [α] = Xi [β] × (var [α] / var [β])
The complexity index Xi [α] when the encoding target picture α that is an I picture is encoded is predicted according to the following calculation formula.

続いて、ステップS1057で、その予測した複雑さ指数Xi[α] を式(3)で用いる複雑さ指数Xi として設定するとともに、メモリから読み出した複雑さ指数Xの中から、符号化対象ピクチャαよりも前にかつ最後に符号化したPピクチャの複雑さ指数Xp と、符号化対象ピクチャαよりも前にかつ最後に符号化したBピクチャの複雑さ指数Xb とを抽出して、それらの複雑さ指数Xi,Xp,Xb と前述したNi,Np,Nb とを使い、前述した式(3)に従ってターゲット符号量Ti を決定する。   Subsequently, in step S1057, the predicted complexity index Xi [α] is set as the complexity index Xi used in Expression (3), and the encoding target picture α is selected from the complexity indices X read from the memory. The complexity index Xp of the P picture encoded before and last and the complexity index Xb of the B picture encoded last and before the encoding target picture α are extracted and their complexity is extracted. The target code amount Ti is determined according to the above-described equation (3) using the depth index Xi, Xp, Xb and the above-described Ni, Np, Nb.

このようにして、図4のフローチャートを実行することでステップS105の処理を終了すると、続いて、ステップS106で、決定したターゲット符号量Tに従って量子化ステップを設定して符号化対象ピクチャαを符号化する。   When the process of step S105 is completed by executing the flowchart of FIG. 4 in this way, subsequently, in step S106, the quantization step is set according to the determined target code amount T, and the encoding target picture α is encoded. Turn into.

続いて、ステップS107で、符号化対象ピクチャαの符号化で発生した符号量Sを測定する。続いて、ステップS108で、残存符号量Rから発生符号量Sを差し引くことで残存符号量Rを更新する。   Subsequently, in step S107, the code amount S generated by the encoding of the encoding target picture α is measured. Subsequently, in step S108, the remaining code amount R is updated by subtracting the generated code amount S from the remaining code amount R.

続いて、ステップS109で、符号化対象ピクチャαの符号化に用いた量子化ステップQの平均値 aveQを算出する。続いて、ステップS110で、“X=S× aveQ”に従って符号化対象ピクチャαの複雑さ指数Xを算出して、メモリに書き込む。   Subsequently, in step S109, an average value aveQ of the quantization step Q used for encoding the encoding target picture α is calculated. Subsequently, in step S110, the complexity index X of the encoding target picture α is calculated according to “X = S × aveQ”, and is written in the memory.

続いて、ステップS111で、GOPが終了したのか否かを判断して、GOPが終了していないことを判断するときには、ステップS101の処理に戻り、GOPが終了したことを判断するときには、次のGOPを処理すべくステップS100の処理に戻る。   Subsequently, in step S111, it is determined whether or not the GOP has ended. When determining that the GOP has not ended, the process returns to step S101. When determining that the GOP has ended, The process returns to step S100 to process the GOP.

図5に、この処理を実行する本実施形態例の映像符号化装置1の装置構成を図示する。ここで、図15に示したものと同じものについては同一の記号で示してある。   FIG. 5 illustrates a device configuration of the video encoding device 1 of the present embodiment that executes this processing. Here, the same components as those shown in FIG. 15 are denoted by the same symbols.

この図5に示すように、本実施形態例では、図15に示した従来技術と異なって、符号化済みIピクチャ分散値メモリ301を備え、さらに、符号化部100がマクロブロック分散値算出部113を備え、さらに、レート制御部200がピクチャ分散値算出部208とIピクチャ複雑さ指数補正部209とを備え、さらに、レート制御部200が図15に示したターゲット符号量算出部203とは異なる処理を実行するターゲット符号量算出部203xを備える。   As shown in FIG. 5, unlike the prior art shown in FIG. 15, this embodiment includes an encoded I picture variance value memory 301, and the encoding unit 100 further includes a macroblock variance value calculation unit. 113, the rate control unit 200 further includes a picture variance value calculation unit 208 and an I picture complexity index correction unit 209, and the rate control unit 200 further includes the target code amount calculation unit 203 illustrated in FIG. A target code amount calculation unit 203x that executes different processing is provided.

この符号化済みIピクチャ分散値メモリ301は、符号化を終えたIピクチャβの画面分散合計値var[β] を保存する。   The encoded I picture variance value memory 301 stores the screen variance total value var [β] of the I picture β that has been encoded.

マクロブロック分散値算出部113は、符号化対象マクロブロックの分散値を算出する。   The macroblock variance value calculation unit 113 calculates the variance value of the encoding target macroblock.

ピクチャ分散値算出部208は、マクロブロック分散値算出部113の算出した分散値を集計することで符号化対象ピクチャαの画面分散合計値var[α] を算出する。   The picture variance value calculation unit 208 calculates the screen variance total value var [α] of the encoding target picture α by aggregating the variance values calculated by the macroblock variance value calculation unit 113.

Iピクチャ複雑さ指数補正部209は、符号化済みピクチャ複雑さ指数メモリ300から読み出したIピクチャβの複雑さ指数Xi[β] と、符号化済みIピクチャ分散値メモリ301から読み出したIピクチャβの画面分散合計値var[β] と、ピクチャ分散値算出部208の算出した符号化対象ピクチャαの画面分散合計値var[α] とに基づいて、符号化対象ピクチャαがPピクチャである場合には、符号化対象ピクチャαがIピクチャであるならば持つであろう複雑さ指数Xi[α] を予測し、符号化対象ピクチャαがIピクチャである場合には、その複雑さ指数Xi[α] を予測する。   The I picture complexity index correction unit 209 includes the complexity index Xi [β] of the I picture β read from the encoded picture complexity index memory 300 and the I picture β read from the encoded I picture variance value memory 301. When the encoding target picture α is a P picture based on the screen dispersion total value var [β] of the image and the screen dispersion total value var [α] of the encoding target picture α calculated by the picture distribution value calculation unit 208 Predicts the complexity index Xi [α] that the encoding target picture α will have if it is an I picture, and if the encoding target picture α is an I picture, the complexity index Xi [ α] is predicted.

ターゲット符号量算出部203xは、Iピクチャ複雑さ指数補正部209の予測した複雑さ指数Xi[α] と、符号化済みピクチャ複雑さ指数メモリ300から読み出した複雑さ指数Xとに基づいて、図4のフローチャートを実行することで、符号化対象ピクチャαのターゲット符号量Tを算出する。   Based on the complexity index Xi [α] predicted by the I picture complexity index correction unit 209 and the complexity index X read from the encoded picture complexity index memory 300, the target code amount calculation unit 203x The target code amount T of the encoding target picture α is calculated by executing the flowchart of FIG.

本実施形態例の映像符号化装置1は、この図5の構成に従って、図3および図4のフローチャートを実行することで、符号化対象ピクチャαのターゲット符号量を決定するにあたって、Iピクチャの複雑さ指数に関して、画面分散合計値の変化を使って予測した符号化対象ピクチャαの時点の複雑さ指数Xi[α] を使うように処理するのである。   The video encoding apparatus 1 according to the present embodiment executes the flowcharts of FIGS. 3 and 4 according to the configuration of FIG. 5 to determine the complexity of the I picture when determining the target code amount of the encoding target picture α. With respect to the length index, processing is performed so as to use the complexity index Xi [α] at the time of the picture to be encoded α predicted using the change in the screen variance total value.

この構成に従って、本実施形態例の映像符号化装置1によれば、符号化対象ピクチャαのターゲット符号量の予測精度が上がり、画像の難しさが漸次変化する映像を符号化する場合にも、符号化制御が安定して画質の劣化を発生を防ぐことができるようになる。   According to this configuration, according to the video encoding device 1 of the present embodiment, the prediction accuracy of the target code amount of the encoding target picture α is increased, and even when encoding video in which the difficulty of the image gradually changes, Encoding control can be stabilized and deterioration of image quality can be prevented.

〔2〕第2の実施形態例
次に、図6に従って、本発明の第2の実施形態例による符号化対象ピクチャのターゲット符号量の決定方法について説明する。
[2] Second Embodiment Next, a method for determining a target code amount of a picture to be encoded according to a second embodiment of the present invention will be described with reference to FIG.

本実施形態例では、
(イ)画像の複雑さ指数の示す挙動と画面分散合計値の示す挙動とが類似していると いうことと、
(ロ)符号化対象ピクチャをピクチャαと表し、符号化対象ピクチャよりも前にかつ 最後に符号化したIピクチャをピクチャβと表すならば、ピクチャβについて は画面分散合計値が算出可能であるということ
(ハ)符号化対象ピクチャよりも後にかつ最初に符号化することになるIピクチャを ピクチャγと表すならば、ピクチャγまでの映像を先読みしておくことで、ピ クチャγについては画面分散合計値が算出可能であるということ
に着目して、ピクチャβの複雑さ指数Xi[β] と、ピクチャβの画面分散合計値var[β] と、ピクチャγの画面分散合計値var[γ] とに基づいて、ピクチャγの複雑さ指数Xi[γ] を、
Xi[γ] =Xi[β] ×(var[γ] /var[β] )
と予測して、従来技術が符号化対象ピクチャαのターゲット符号量の決定に用いていた式(1)〜式(3)に示す複雑さ指数Xi の代わりに、この予測したXi[γ] を用いるようにするという構成を採る。
In this embodiment example,
(B) The behavior indicated by the complexity index of the image is similar to the behavior indicated by the total screen variance,
(B) If the picture to be coded is represented as picture α, and the I picture coded before and at the end of the picture to be coded is represented as picture β, the screen variance total value can be calculated for picture β. (C) If the I picture to be encoded first after the picture to be encoded is represented as picture γ, the picture up to picture γ is pre-read, and picture γ is displayed on the screen. Focusing on the fact that the variance total value can be calculated, the complexity index Xi [β] of picture β, the screen variance total value var [β] of picture β, and the screen variance total value var [γ of picture γ ], The complexity index Xi [γ] of the picture γ is
Xi [γ] = Xi [β] × (var [γ] / var [β])
Thus, instead of the complexity index Xi shown in the equations (1) to (3) used in the prior art for determining the target code amount of the encoding target picture α, the predicted Xi [γ] is The configuration is to use.

図7および図8に、本実施形態例で構成されるレート制御部200が実行するフローチャートを図示する。   7 and 8 show flowcharts executed by the rate control unit 200 configured in the present embodiment.

次に、図7および図8のフローチャートに従って、本実施形態例が実行する符号化対象ピクチャαのターゲット符号量の決定処理について説明する。   Next, the target code amount determination process of the encoding target picture α executed by the present embodiment will be described with reference to the flowcharts of FIGS. 7 and 8.

本実施形態例に従う場合、レート制御部200は、図7のフローチャートに示すように、先ず最初に、ステップS200で、GOPの先頭ピクチャの符号化に入ると、GOPのピクチャ枚数(gopN)と1ピクチャ当たりの平均符号量とを乗算することで、これから符号化するGOPの総ターゲット符号量を算出するとともに、その算出した総ターゲット符号量に対して1つ前のGOPにおいて残った符号量を加算することで、これから符号化するGOPの残存符号量Rを求める。   According to the present embodiment, as shown in the flowchart of FIG. 7, the rate control unit 200 first enters the GOP picture number (gopN) and 1 when the encoding of the first picture of the GOP starts in step S200. Multiply by the average code amount per picture to calculate the total target code amount of the GOP to be encoded, and add the remaining code amount in the previous GOP to the calculated total target code amount Thus, the remaining code amount R of the GOP to be encoded is obtained.

続いて、ステップS201で、GOPの先頭ピクチャからの順番に従って符号化対象ピクチャαを選択する。   Subsequently, in step S201, the encoding target picture α is selected according to the order from the first picture of the GOP.

続いて、ステップS202で、次にIピクチャとして符号化することになるピクチャγの画面分散合計値var[γ] を算出する。ピクチャγについては先読みしているので、その先読みしているピクチャγの画面分散合計値var[γ] を算出するのである。   Subsequently, in step S202, a screen variance total value var [γ] of a picture γ to be encoded next as an I picture is calculated. Since the picture γ is prefetched, the screen variance total value var [γ] of the picture γ being prefetched is calculated.

続いて、ステップS203で、メモリから、符号化対象ピクチャαよりも前にかつ最後に符号化したIピクチャβの画面分散合計値var[β] および複雑さ指数Xi[β] を読み出す。Iピクチャβについては符号化対象ピクチャαよりも前に符号化しており、その際に画面分散合計値var[β] および複雑さ指数Xi[β] を算出してメモリに保存しているので、それらをメモリから読み出すのである。   Subsequently, in step S203, the screen variance total value var [β] and the complexity index Xi [β] of the I picture β encoded before and at the end of the encoding target picture α are read from the memory. Since the I picture β is encoded before the encoding target picture α, the screen dispersion total value var [β] and the complexity index Xi [β] are calculated and stored in the memory. They are read from memory.

続いて、ステップS204で、Iピクチャβの複雑さ指数Xi[β] と、Iピクチャβの画面分散合計値var[β] と、ピクチャγの画面分散合計値var[γ] とに基づいて、
Xi[γ] =Xi[β] ×(var[γ] /var[β] )
という算出式に従って、Iピクチャであるピクチャγを符号化する場合の複雑さ指数Xi[γ] を予測する。
Subsequently, in step S204, based on the complexity index Xi [β] of the I picture β, the screen variance total value var [β] of the I picture β, and the screen variance total value var [γ] of the picture γ,
Xi [γ] = Xi [β] × (var [γ] / var [β])
The complexity index Xi [γ] for encoding the picture γ, which is an I picture, is predicted according to the following calculation formula.

なお、以下では、Iピクチャであるピクチャγを簡単のためにIピクチャγと記載することがある。   Hereinafter, the picture γ that is an I picture may be referred to as an I picture γ for simplicity.

続いて、ステップS205で、メモリから、符号化済みの各種ピクチャタイプのピクチャの複雑さ指数Xを読み出す。   Subsequently, in step S205, the complexity index X of pictures of various encoded picture types is read from the memory.

続いて、ステップS206で、予測した複雑さ指数Xi[γ] と、メモリから読み出した複雑さ指数Xと、前述したNi,Np,Nb とを使って符号化対象ピクチャαのターゲット符号量Tを決定する。   Subsequently, in step S206, the target code amount T of the encoding target picture α is calculated using the predicted complexity index Xi [γ], the complexity index X read from the memory, and Ni, Np, Nb described above. decide.

すなわち、ステップS206の処理に入ると、図8のフローチャートに示すように、先ず最初に、ステップS2060で、符号化対象ピクチャαがPピクチャであるのか否かを判断して、符号化対象ピクチャαがPピクチャであることを判断するときには、ステップS2061に進んで、ステップS204で予測した複雑さ指数Xi[γ] を式(1)で用いる複雑さ指数Xi として設定するとともに、メモリから読み出した複雑さ指数Xの中から、符号化対象ピクチャαよりも前にかつ最後に符号化したPピクチャの複雑さ指数Xp と、符号化対象ピクチャαよりも前にかつ最後に符号化したBピクチャの複雑さ指数Xb とを抽出して、それらの複雑さ指数Xi,Xp,Xb と前述したNi,Np,Nb とを使い、前述した式(1)に従ってターゲット符号量Tp を決定する。   That is, when the process of step S206 is entered, as shown in the flowchart of FIG. 8, first, in step S2060, it is determined whether or not the encoding target picture α is a P picture. Is determined to be a P picture, the process proceeds to step S2061, where the complexity index Xi [γ] predicted in step S204 is set as the complexity index Xi used in equation (1), and the complexity read out from the memory is set. The complexity index Xp of the P picture encoded last and before the encoding target picture α and the complexity of the B picture encoded last and before the encoding target picture α from the length index X The depth index Xb is extracted, and the target code amount Tp is calculated according to the above-described equation (1) using the complexity index Xi, Xp, Xb and the above-described Ni, Np, Nb. decide.

一方、ステップS2061で符号化対象ピクチャαがPピクチャでないことを判断するときには、ステップS2062に進んで、符号化対象ピクチャαがBピクチャであるのか否かを判断して、符号化対象ピクチャαがBピクチャであることを判断するときには、ステップS2063に進んで、ステップS204で予測した複雑さ指数Xi[γ] を式(2)で用いる複雑さ指数Xi として設定するとともに、メモリから読み出した複雑さ指数Xの中から、符号化対象ピクチャαよりも前にかつ最後に符号化したPピクチャの複雑さ指数Xp と、符号化対象ピクチャαよりも前にかつ最後に符号化したBピクチャの複雑さ指数Xb とを抽出して、それらの複雑さ指数Xi,Xp,Xb と前述したNi,Np,Nb とを使い、前述した式(2)に従ってターゲット符号量Tb を決定する。   On the other hand, when it is determined in step S2061 that the encoding target picture α is not a P picture, the process proceeds to step S2062 to determine whether or not the encoding target picture α is a B picture. When determining that the picture is a B picture, the process proceeds to step S2063, where the complexity index Xi [γ] predicted in step S204 is set as the complexity index Xi used in equation (2), and the complexity read from the memory is set. Of the index X, the complexity index Xp of the P picture encoded last and before the encoding target picture α and the complexity of the B picture encoded last and before the encoding target picture α The index Xb is extracted, and the complexity code Xi, Xp, Xb and the above-described Ni, Np, Nb are used, and the target code amount according to the above-described equation (2). Tb is determined.

一方、ステップS2062で符号化対象ピクチャαがBピクチャでないことを判断するとき、すなわち、符号化対象ピクチャαがIピクチャであることを判断するときには、ステップS2064に進んで、ステップS204で予測した複雑さ指数Xi[γ] を式(3)で用いる複雑さ指数Xi として設定するとともに、メモリから読み出した複雑さ指数Xの中から、符号化対象ピクチャαよりも前にかつ最後に符号化したPピクチャの複雑さ指数Xp と、符号化対象ピクチャαよりも前にかつ最後に符号化したBピクチャの複雑さ指数Xb とを抽出して、それらの複雑さ指数Xi,Xp,Xb と前述したNi,Np,Nb とを使い、前述した式(3)に従ってターゲット符号量Ti を決定する。   On the other hand, when it is determined in step S2062 that the encoding target picture α is not a B picture, that is, when it is determined that the encoding target picture α is an I picture, the process proceeds to step S2064 and the complex predicted in step S204 is performed. The length index Xi [γ] is set as the complexity index Xi used in the expression (3), and P encoded before and finally from the encoding target picture α is read out from the complexity index X read from the memory. The complexity index Xp of the picture and the complexity index Xb of the B picture encoded before and at the end of the picture α to be encoded are extracted, and the complexity index Xi, Xp, Xb and the above-described Ni , Np, Nb and the target code amount Ti is determined according to the above-described equation (3).

このようにして、図8のフローチャートを実行することで、ステップS206の処理を終了すると、続いて、ステップS207で、決定したターゲット符号量Tに従って量子化ステップを設定して符号化対象ピクチャαを符号化する。   In this way, by executing the flowchart of FIG. 8, when the processing of step S206 is completed, subsequently, in step S207, the quantization step is set according to the determined target code amount T, and the encoding target picture α is set. Encode.

続いて、ステップS208で、符号化対象ピクチャαの符号化で発生した符号量Sを測定する。続いて、ステップS209で、残存符号量Rから発生符号量Sを差し引くことで残存符号量Rを更新する。   Subsequently, in step S208, the code amount S generated by encoding the encoding target picture α is measured. Subsequently, in step S209, the remaining code amount R is updated by subtracting the generated code amount S from the remaining code amount R.

続いて、ステップS210で、符号化対象ピクチャαの符号化に用いた量子化ステップQの平均値 aveQを算出する。続いて、ステップS211で、“X=S× aveQ”に従って符号化対象ピクチャαの複雑さ指数Xを算出して、メモリに書き込む。   Subsequently, in step S210, an average value aveQ of the quantization step Q used for encoding the encoding target picture α is calculated. Subsequently, in step S211, the complexity index X of the encoding target picture α is calculated according to “X = S × aveQ”, and is written in the memory.

続いて、ステップS212で、GOPが終了したのか否かを判断して、GOPが終了していないことを判断するときには、ステップS201の処理に戻り、GOPが終了したことを判断するときには、次のGOPを処理すべくステップS200の処理に戻る。   Subsequently, in step S212, it is determined whether or not the GOP has ended. When it is determined that the GOP has not ended, the process returns to step S201. When it is determined that the GOP has ended, The process returns to step S200 to process the GOP.

図9に、この処理を実行する本実施形態例の映像符号化装置1の装置構成を図示する。ここで、図15に示したものと同じものについては同一の記号で示してある。   FIG. 9 illustrates a device configuration of the video encoding device 1 of the present embodiment that executes this processing. Here, the same components as those shown in FIG. 15 are denoted by the same symbols.

この図9に示すように、本実施形態例では、図15に示した従来技術と異なって、符号化済みIピクチャ分散値メモリ301とフレームメモリ400とピクチャ分散先行算出部500とを備え、さらに、レート制御部200がピクチャ分散値算出部208yとIピクチャ複雑さ指数補正部209yとを備え、さらに、レート制御部200が図15に示したターゲット符号量算出部203とは異なる処理を実行するターゲット符号量算出部203yを備える。   As shown in FIG. 9, the present embodiment includes an encoded I picture variance value memory 301, a frame memory 400, and a picture variance precedence calculation unit 500, unlike the prior art shown in FIG. The rate control unit 200 includes a picture variance value calculation unit 208y and an I picture complexity index correction unit 209y, and the rate control unit 200 executes processing different from the target code amount calculation unit 203 illustrated in FIG. A target code amount calculation unit 203y is provided.

この符号化済みIピクチャ分散値メモリ301は、符号化を終えたIピクチャβの画面分散合計値var[β] を保存する。   The encoded I picture variance value memory 301 stores the screen variance total value var [β] of the I picture β that has been encoded.

フレームメモリ400は、符号化部100へ入力される入力画像を遅延させることで、ピクチャγの先読みを実現する。   The frame memory 400 realizes prefetching of the picture γ by delaying the input image input to the encoding unit 100.

ピクチャ分散先行算出部500は、フレームメモリ400へ入力される入力画像を先読みする形で入力して、その入力した入力画像をマクロブロックに分割するマクロブロック分割部501と、マクロブロック分割部501の分割したマクロブロックの分散値を算出するマクロブロック分散先行算出部502とを備える。   The picture distribution advance calculation unit 500 inputs an input image input to the frame memory 400 in a pre-read form, and divides the input image into macro blocks, and the macro block division unit 501 A macroblock distribution preceding calculation unit 502 that calculates a distribution value of the divided macroblocks.

ピクチャ分散値算出部208yは、マクロブロック分散先行算出部502の算出した分散値を集計することで符号化対象ピクチャαに先行するIピクチャγの画面分散合計値var[γ] を算出する。   The picture variance value calculation unit 208y calculates the screen variance total value var [γ] of the I picture γ preceding the encoding target picture α by aggregating the variance values calculated by the macroblock variance precedence calculation unit 502.

Iピクチャ複雑さ指数補正部209yは、符号化済みピクチャ複雑さ指数メモリ300から読み出したIピクチャβの複雑さ指数Xi[β] と、符号化済みIピクチャ分散値メモリ301から読み出したIピクチャβの画面分散合計値var[β] と、ピクチャ分散値算出部208yの算出したピクチャγの画面分散合計値var[γ] とに基づいて、ピクチャγを符号化する場合の複雑さ指数Xi[γ] を予測する。   The I picture complexity index correction unit 209y reads the complexity index Xi [β] of the I picture β read from the encoded picture complexity index memory 300 and the I picture β read from the encoded I picture variance value memory 301. Complexity index Xi [γ for encoding picture γ based on the total screen variance value var [β] of picture γ and the total screen variance value var [γ] of picture γ calculated by the picture variance value calculation unit 208y ].

ターゲット符号量算出部203yは、Iピクチャ複雑さ指数補正部209yの予測した複雑さ指数Xi[γ] と、符号化済みピクチャ複雑さ指数メモリ300から読み出した複雑さ指数Xとに基づいて、図8のフローチャートを実行することで、符号化対象ピクチャαのターゲット符号量Tを算出する。   Based on the complexity index Xi [γ] predicted by the I picture complexity index correction unit 209y and the complexity index X read from the encoded picture complexity index memory 300, the target code amount calculation unit 203y The target code amount T of the encoding target picture α is calculated by executing the flowchart of FIG.

本実施形態例の映像符号化装置1は、この図9の構成に従って、図7および図8のフローチャートを実行することで、符号化対象ピクチャαのターゲット符号量を決定するにあたって、Iピクチャの複雑さ指数に関して、画面分散合計値の変化を使って予測した未来のIピクチャγの複雑さ指数Xi[γ] を使うように処理するのである。   The video encoding apparatus 1 according to the present embodiment executes the flowcharts of FIGS. 7 and 8 according to the configuration of FIG. 9 to determine the complexity of the I picture when determining the target code amount of the encoding target picture α. For the depth index, processing is performed so as to use the complexity index Xi [γ] of the future I picture γ predicted using the change in the total screen variance.

この構成に従って、本実施形態例の映像符号化装置1によれば、符号化対象ピクチャαのターゲット符号量の予測精度が上がり、画像の難しさが漸次変化する映像を符号化する場合にも、符号化制御が安定して画質の劣化を発生を防ぐことができるようになる。   According to this configuration, according to the video encoding device 1 of the present embodiment, the prediction accuracy of the target code amount of the encoding target picture α is increased, and even when encoding video in which the difficulty of the image gradually changes, Encoding control can be stabilized and deterioration of image quality can be prevented.

〔3〕本発明の有効性を検証するために行った実験結果について
図10および図11に、本発明の有効性を検証すべく、グレー画像から動画像へとフェードすることを想定して行った実験結果を図示する。
[3] Results of Experiments Performed to Verify the Effectiveness of the Present Invention FIGS. 10 and 11 are performed assuming that a gray image is faded to a moving image in order to verify the effectiveness of the present invention. The experimental results are illustrated.

図10は第1の実施形態例を用いた場合の実験結果を示し、図11は従来技術を用いた場合の実験結果を示す。   FIG. 10 shows the experimental results when using the first embodiment, and FIG. 11 shows the experimental results when using the conventional technique.

ここで、横軸はフレーム番号0のグレー画像から動画像へとフェードする映像のフレーム番号を示し、縦軸は複雑さ指数値および画面分散合計値を示している。   Here, the horizontal axis indicates the frame number of the video faded from the gray image with frame number 0 to the moving image, and the vertical axis indicates the complexity index value and the screen dispersion total value.

図10と図11を比較すれば分かるように、従来技術では、最後にIピクチャを符号化した際のIピクチャの複雑さ指数を用いることから、複雑さ指数の動きが画面分散合計値の動きについていくことができないのに対して、本発明では、最後にIピクチャを符号化した際のIピクチャの複雑さ指数をPピクチャ周期で補正していくことから、複雑さ指数の動きが画面分散合計値の動きについていくことができることになる。この実験結果から、本発明の有効性を確認することができた。   As can be seen from a comparison between FIG. 10 and FIG. 11, in the prior art, since the complexity index of the I picture when the I picture was last encoded is used, the movement of the complexity index is the movement of the screen variance total value. On the other hand, in the present invention, since the complexity index of the I picture when the I picture is encoded last is corrected in the P picture period, the movement of the complexity index is distributed on the screen. You can keep up with the movement of the total value. From this experimental result, the effectiveness of the present invention could be confirmed.

本発明は、複雑さ指数に基づいて符号化対象ピクチャのターゲット符号量を決定する映像符号化制御に適用できるものであり、符号化対象ピクチャのターゲット符号量の予測精度が上がり、画像の難しさが漸次変化する映像を符号化する場合にも、符号化制御が安定して画質の劣化の発生を防ぐことができるようになる。   The present invention can be applied to video coding control for determining the target code amount of a picture to be coded based on the complexity index, and the prediction accuracy of the target code quantity of the picture to be coded is improved, and the difficulty of the image is increased. Even in the case of encoding a video in which the gradual change occurs, the encoding control is stable and it is possible to prevent the deterioration of the image quality.

本発明の適用される映像符号化装置の装置構成図である。It is an apparatus block diagram of the video coding apparatus with which this invention is applied. 第1の実施形態例の説明図である。It is explanatory drawing of the example of 1st Embodiment. 第1の実施形態例の実行するフローチャートである。3 is a flowchart executed by the first embodiment. 第1の実施形態例の実行するフローチャートである。3 is a flowchart executed by the first embodiment. 第1の実施形態例の映像符号化装置の装置構成図である。1 is a device configuration diagram of a video encoding device according to a first embodiment. FIG. 第2の実施形態例の説明図である。It is explanatory drawing of the example of 2nd Embodiment. 第2の実施形態例の実行するフローチャートである。It is a flowchart which a 2nd embodiment example performs. 第2の実施形態例の実行するフローチャートである。It is a flowchart which a 2nd embodiment example performs. 第2の実施形態例の映像符号化装置の装置構成図である。It is an apparatus block diagram of the video encoding apparatus of 2nd Example. 本発明の有効性を検証するために行った実験結果の説明図である。It is explanatory drawing of the experimental result performed in order to verify the effectiveness of this invention. 本発明の有効性を検証するために行った実験結果の説明図である。It is explanatory drawing of the experimental result performed in order to verify the effectiveness of this invention. 従来技術の説明図である。It is explanatory drawing of a prior art. 従来の映像符号化装置の実行するフローチャートである。It is a flowchart which the conventional video coding apparatus performs. 従来の映像符号化装置の実行するフローチャートである。It is a flowchart which the conventional video coding apparatus performs. 従来の映像符号化装置の装置構成図である。It is an apparatus block diagram of the conventional video coding apparatus.

符号の説明Explanation of symbols

1 映像符号化装置
100 符号化部
200 レート制御部
201 残りIPB枚数更新部
202 GOP残り符号量更新部
203x ターゲット符号量算出部
204 マクロブロック量子化ステップ算出部
205 ピクチャ発生符号量算出部
206 ピクチャ平均量子化ステップ算出部
207 複雑さ指数算出部
208 ピクチャ分散値算出部
209 Iピクチャ複雑さ指数補正部
300 符号化済みピクチャ複雑さ指数メモリ
301 符号化済みIピクチャ分散値メモリ
DESCRIPTION OF SYMBOLS 1 Video coding apparatus 100 Encoding part 200 Rate control part 201 Remaining IPB number update part 202 GOP remaining code amount update part 203x Target code amount calculation part 204 Macroblock quantization step calculation part 205 Picture generation code amount calculation part 206 Picture average Quantization step calculation unit 207 Complexity index calculation unit 208 Picture variance value calculation unit 209 I picture complexity index correction unit 300 Encoded picture complexity index memory 301 Encoded I picture variance value memory

Claims (12)

これから符号化する所定枚数のピクチャに含まれる各ピクチャタイプのピクチャ枚数と、符号化対象ピクチャよりも前にかつ最後に符号化した各ピクチャタイプのピクチャの複雑さ指数とに基づいて、符号化対象ピクチャの目標符号量を決定する映像符号化制御装置であって、
符号化対象ピクチャの画面特徴量を算出する算出手段と、
前記算出手段の算出した画面特徴量と、符号化対象ピクチャよりも前にかつ最後に符号化したIピクチャの画面特徴量とに基づいて、そのIピクチャの複雑さ指数を補正することで、符号化対象ピクチャの目標符号量を決定するのに用いるIピクチャの複雑さ指数を設定する設定手段と、
前記設定手段の設定した複雑さ指数を用いて、符号化対象ピクチャの目標符号量を決定する決定手段とを備えることを、
特徴とする映像符号化制御装置。
Based on the number of pictures of each picture type included in the predetermined number of pictures to be encoded and the complexity index of the picture type of each picture type encoded before and at the end of the picture to be encoded A video encoding control device for determining a target code amount of a picture,
Calculating means for calculating a screen feature amount of the encoding target picture;
By correcting the complexity index of the I picture based on the screen feature value calculated by the calculating means and the screen feature value of the I picture encoded before and at the end of the encoding target picture, Setting means for setting a complexity index of an I picture used to determine a target code amount of a picture to be converted;
Using a complexity index set by the setting means, and determining means for determining a target code amount of a picture to be encoded.
A video encoding control device.
請求項1に記載の映像符号化制御装置において、
前記算出手段は、前記画面特徴量として画面分散合計値を算出し、
前記設定手段は、前記算出手段の算出した画面分散合計値と、符号化対象ピクチャよりも前にかつ最後に符号化したIピクチャの画面分散合計値とに基づいて、Iピクチャの複雑さ指数を設定することを、
特徴とする映像符号化制御装置。
The video encoding control apparatus according to claim 1,
The calculation means calculates a screen variance total value as the screen feature value,
The setting means calculates the complexity index of the I picture based on the screen variance total value calculated by the calculation means and the screen variance total value of the I picture encoded before and at the end of the encoding target picture. To set
A video encoding control device.
請求項1又は2に記載の映像符号化制御装置において、
符号化対象ピクチャがBピクチャである場合には、
前記設定手段は、符号化対象ピクチャの目標符号量を決定するのに用いるIピクチャの複雑さ指数を補正しないようにし、
前記決定手段は、符号化対象ピクチャの目標符号量を決定するのに用いるIピクチャの複雑さ指数として、符号化対象ピクチャよりも前にかつ最後に符号化したPピクチャの目標符号量の決定の際に用いたIピクチャの複雑さ指数を用いることを決定することを、
特徴とする映像符号化制御装置。
The video encoding control apparatus according to claim 1 or 2,
When the encoding target picture is a B picture,
The setting means does not correct the complexity index of the I picture used to determine the target code amount of the encoding target picture,
The determination means determines the target code amount of the P picture encoded before and last to the encoding target picture as the complexity index of the I picture used for determining the target code amount of the encoding target picture. To decide to use the complexity index of the I picture used in
A video encoding control device.
これから符号化する所定枚数のピクチャに含まれる各ピクチャタイプのピクチャ枚数と、符号化対象ピクチャよりも前にかつ最後に符号化した各ピクチャタイプのピクチャの複雑さ指数とに基づいて、符号化対象ピクチャの目標符号量を決定する映像符号化制御装置であって、
符号化対象ピクチャよりも後にかつ最初に符号化することになるIピクチャの画面特徴量を算出する算出手段と、
前記算出手段の算出した画面特徴量と、符号化対象ピクチャよりも前にかつ最後に符号化したIピクチャの画面特徴量とに基づいて、そのIピクチャの複雑さ指数を補正することで、符号化対象ピクチャの目標符号量を決定するのに用いるIピクチャの複雑さ指数を設定する設定手段と、
前記設定手段の設定した複雑さ指数を用いて、符号化対象ピクチャの目標符号量を決定する決定手段とを備えることを、
特徴とする映像符号化制御装置。
Based on the number of pictures of each picture type included in the predetermined number of pictures to be encoded and the complexity index of the picture type of each picture type encoded before and at the end of the picture to be encoded A video encoding control device for determining a target code amount of a picture,
Calculating means for calculating a screen feature amount of an I picture to be encoded first after the encoding target picture;
By correcting the complexity index of the I picture based on the screen feature value calculated by the calculating means and the screen feature value of the I picture encoded before and at the end of the encoding target picture, Setting means for setting a complexity index of an I picture used to determine a target code amount of a picture to be converted;
Using a complexity index set by the setting means, and determining means for determining a target code amount of a picture to be encoded.
A video encoding control device.
請求項4に記載の映像符号化制御装置において、
前記算出手段は、前記画面特徴量として画面分散合計値を算出し、
前記設定手段は、前記算出手段の算出した画面分散合計値と、符号化対象ピクチャよりも前にかつ最後に符号化したIピクチャの画面分散合計値とに基づいて、Iピクチャの複雑さ指数を設定することを、
特徴とする映像符号化制御装置。
The video encoding control apparatus according to claim 4, wherein
The calculation means calculates a screen variance total value as the screen feature value,
The setting means calculates the complexity index of the I picture based on the screen variance total value calculated by the calculation means and the screen variance total value of the I picture encoded before and at the end of the encoding target picture. To set
A video encoding control device.
これから符号化する所定枚数のピクチャに含まれる各ピクチャタイプのピクチャ枚数と、符号化対象ピクチャよりも前にかつ最後に符号化した各ピクチャタイプのピクチャの複雑さ指数とに基づいて、符号化対象ピクチャの目標符号量を決定する映像符号化制御方法であって、
符号化対象ピクチャの画面特徴量を算出する過程と、
前記算出した画面特徴量と、符号化対象ピクチャよりも前にかつ最後に符号化したIピクチャの画面特徴量とに基づいて、そのIピクチャの複雑さ指数を補正することで、符号化対象ピクチャの目標符号量を決定するのに用いるIピクチャの複雑さ指数を設定する過程と、
前記設定した複雑さ指数を用いて、符号化対象ピクチャの目標符号量を決定する過程とを備えることを、
特徴とする映像符号化制御方法。
Based on the number of pictures of each picture type included in the predetermined number of pictures to be encoded and the complexity index of the picture type of each picture type encoded before and at the end of the picture to be encoded A video encoding control method for determining a target code amount of a picture, comprising:
A process of calculating the screen feature of the encoding target picture;
By correcting the complexity index of the I picture based on the calculated screen feature quantity and the screen feature quantity of the I picture encoded before and at the end of the encoding target picture, the encoding target picture is corrected. Setting a complexity index of an I picture used to determine a target code amount of
Using the set complexity index to determine a target code amount of a picture to be encoded.
A characteristic video encoding control method.
請求項6に記載の映像符号化制御方法において、
前記算出する過程では、前記画面特徴量として画面分散合計値を算出し、
前記設定する過程では、前記算出した画面分散合計値と、符号化対象ピクチャよりも前にかつ最後に符号化したIピクチャの画面分散合計値とに基づいて、Iピクチャの複雑さ指数を設定することを、
特徴とする映像符号化制御方法。
The video encoding control method according to claim 6, wherein
In the calculating process, a screen dispersion total value is calculated as the screen feature amount,
In the setting process, the complexity index of the I picture is set based on the calculated screen variance total value and the screen variance total value of the I picture encoded last and before the encoding target picture. That
A characteristic video encoding control method.
請求項6又は7に記載の映像符号化制御方法において、
符号化対象ピクチャがBピクチャである場合には、
前記設定する過程では、符号化対象ピクチャの目標符号量を決定するのに用いるIピクチャの複雑さ指数を補正しないようにし、
前記決定する過程では、符号化対象ピクチャの目標符号量を決定するのに用いるIピクチャの複雑さ指数として、符号化対象ピクチャよりも前にかつ最後に符号化したPピクチャの目標符号量の決定の際に用いたIピクチャの複雑さ指数を用いることを決定することを、
特徴とする映像符号化制御方法。
In the video encoding control method according to claim 6 or 7,
When the encoding target picture is a B picture,
In the setting process, the complexity index of the I picture used for determining the target code amount of the encoding target picture is not corrected,
In the determining process, as the complexity index of the I picture used to determine the target code amount of the encoding target picture, the target code amount of the P picture encoded last and before the encoding target picture is determined. Deciding to use the complexity index of the I picture used in the
A characteristic video encoding control method.
これから符号化する所定枚数のピクチャに含まれる各ピクチャタイプのピクチャ枚数と、符号化対象ピクチャよりも前にかつ最後に符号化した各ピクチャタイプのピクチャの複雑さ指数とに基づいて、符号化対象ピクチャの目標符号量を決定する映像符号化制御方法であって、
符号化対象ピクチャよりも後にかつ最初に符号化することになるIピクチャの画面特徴量を算出する過程と、
前記算出した画面特徴量と、符号化対象ピクチャよりも前にかつ最後に符号化したIピクチャの画面特徴量とに基づいて、そのIピクチャの複雑さ指数を補正することで、符号化対象ピクチャの目標符号量を決定するのに用いるIピクチャの複雑さ指数を設定する過程と、
前記設定した複雑さ指数を用いて、符号化対象ピクチャの目標符号量を決定する過程とを備えることを、
特徴とする映像符号化制御方法。
Based on the number of pictures of each picture type included in the predetermined number of pictures to be encoded and the complexity index of the picture type of each picture type encoded before and at the end of the picture to be encoded A video encoding control method for determining a target code amount of a picture, comprising:
A process of calculating a screen feature amount of an I picture to be encoded first after the encoding target picture;
By correcting the complexity index of the I picture based on the calculated screen feature quantity and the screen feature quantity of the I picture encoded before and at the end of the encoding target picture, the encoding target picture is corrected. Setting a complexity index of an I picture used to determine a target code amount of
Using the set complexity index to determine a target code amount of a picture to be encoded.
A characteristic video encoding control method.
請求項9に記載の映像符号化制御方法において、
前記算出する過程では、前記画面特徴量として画面分散合計値を算出し、
前記設定する過程では、前記算出した画面分散合計値と、符号化対象ピクチャよりも前にかつ最後に符号化したIピクチャの画面分散合計値とに基づいて、Iピクチャの複雑さ指数を設定することを、
特徴とする映像符号化制御方法。
The video encoding control method according to claim 9, wherein
In the calculating process, a screen dispersion total value is calculated as the screen feature amount,
In the setting process, the complexity index of the I picture is set based on the calculated screen variance total value and the screen variance total value of the I picture encoded last and before the encoding target picture. That
A characteristic video encoding control method.
請求項1ないし5のいずれか1項に記載の映像符号化制御装置を構成する手段としてコンピュータを機能させるための映像符号化制御プログラム。   6. A video encoding control program for causing a computer to function as means constituting the video encoding control apparatus according to claim 1. 請求項1ないし5のいずれか1項に記載の映像符号化制御装置を構成する手段としてコンピュータを機能させるための映像符号化制御プログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium having recorded thereon a video encoding control program for causing a computer to function as means for constituting the video encoding control device according to any one of claims 1 to 5.
JP2007219223A 2007-08-27 2007-08-27 Video encoding control apparatus, video encoding control method, video encoding control program, and computer-readable recording medium recording the program Active JP4527756B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007219223A JP4527756B2 (en) 2007-08-27 2007-08-27 Video encoding control apparatus, video encoding control method, video encoding control program, and computer-readable recording medium recording the program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007219223A JP4527756B2 (en) 2007-08-27 2007-08-27 Video encoding control apparatus, video encoding control method, video encoding control program, and computer-readable recording medium recording the program

Publications (2)

Publication Number Publication Date
JP2009055262A true JP2009055262A (en) 2009-03-12
JP4527756B2 JP4527756B2 (en) 2010-08-18

Family

ID=40505937

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007219223A Active JP4527756B2 (en) 2007-08-27 2007-08-27 Video encoding control apparatus, video encoding control method, video encoding control program, and computer-readable recording medium recording the program

Country Status (1)

Country Link
JP (1) JP4527756B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011142236A1 (en) 2010-05-12 2011-11-17 日本電信電話株式会社 Code amount control method and apparatus
JP2014011493A (en) * 2012-06-27 2014-01-20 Ntt Electornics Corp Quantization controller
EP2648409B1 (en) * 2011-03-10 2016-08-17 Nippon Telegraph And Telephone Corporation Quantization control device and method, and quantization control program

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001028753A (en) * 1999-07-13 2001-01-30 Victor Co Of Japan Ltd Dynamic image coder and its method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001028753A (en) * 1999-07-13 2001-01-30 Victor Co Of Japan Ltd Dynamic image coder and its method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011142236A1 (en) 2010-05-12 2011-11-17 日本電信電話株式会社 Code amount control method and apparatus
US9131236B2 (en) 2010-05-12 2015-09-08 Nippon Telegraph And Telephone Corporation Code amount control method and apparatus
EP2648409B1 (en) * 2011-03-10 2016-08-17 Nippon Telegraph And Telephone Corporation Quantization control device and method, and quantization control program
US9906803B2 (en) 2011-03-10 2018-02-27 Nippon Telegraph And Telephone Corporation Quantization control apparatus and method, and quantization control program
JP2014011493A (en) * 2012-06-27 2014-01-20 Ntt Electornics Corp Quantization controller

Also Published As

Publication number Publication date
JP4527756B2 (en) 2010-08-18

Similar Documents

Publication Publication Date Title
US7031387B2 (en) B picture mode determining method and apparatus in video coding system
US8189660B2 (en) Bit rate control method and apparatus
KR100997298B1 (en) Multi-pass video encoding
JP4246723B2 (en) Intraframe predictive coding control method, intraframe predictive coding control apparatus, intraframe predictive coding control program, and computer-readable recording medium storing the program
JP4543971B2 (en) Encoding method, encoding apparatus, encoding processing program, and recording medium recording the encoding processing program
US6819714B2 (en) Video encoding apparatus that adjusts code amount by skipping encoding of image data
JP2011055504A (en) Picture-level rate control for video encoding
JP2010130558A (en) Video encoding apparatus and video encoding method
JP2007124587A (en) Moving picture encoding apparatus and fade scene detecting apparatus
US8654840B2 (en) Rate control method of perceptual-based rate-distortion optimized bit allocation
JP4908943B2 (en) Image coding apparatus and image coding method
US8861596B2 (en) Image encoding device and image encoding method
JP4527756B2 (en) Video encoding control apparatus, video encoding control method, video encoding control program, and computer-readable recording medium recording the program
JPWO2011138923A1 (en) Moving picture coding control method, moving picture coding apparatus, and moving picture coding program
JP2006135557A (en) Moving picture encoding device
JP2007318617A (en) Image encoder and image encoding program
JP2008252225A (en) Motion picture encoding device and method
JP5871602B2 (en) Encoder
WO2020008858A1 (en) Moving-image encoding device, moving-image encoding method, and program
JP2005045736A (en) Method and device for encoding image signal, encoding controller, and program
JP4857243B2 (en) Image encoding apparatus, control method therefor, and computer program
JP2007300557A (en) Image encoding device and image encoding method
EP2458861A1 (en) Bit rate regulation module and method for regulating bit rate
JP4829951B2 (en) Intraframe predictive coding control method, intraframe predictive coding control apparatus, intraframe predictive coding control program, and computer-readable recording medium storing the program
JP2007243813A (en) Image encoding method and image encoding apparatus

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100122

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100126

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100319

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20100331

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: 20100518

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100603

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130611

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4527756

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140611

Year of fee payment: 4

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