JP4188878B2 - Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium recording the program - Google Patents

Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium recording the program Download PDF

Info

Publication number
JP4188878B2
JP4188878B2 JP2004168437A JP2004168437A JP4188878B2 JP 4188878 B2 JP4188878 B2 JP 4188878B2 JP 2004168437 A JP2004168437 A JP 2004168437A JP 2004168437 A JP2004168437 A JP 2004168437A JP 4188878 B2 JP4188878 B2 JP 4188878B2
Authority
JP
Japan
Prior art keywords
lagrange multiplier
code amount
encoding
ave
quantization parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004168437A
Other languages
Japanese (ja)
Other versions
JP2005348310A (en
Inventor
靖之 中島
豊 田代
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 JP2004168437A priority Critical patent/JP4188878B2/en
Publication of JP2005348310A publication Critical patent/JP2005348310A/en
Application granted granted Critical
Publication of JP4188878B2 publication Critical patent/JP4188878B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は,動画像符号化技術に関し,特に,動画像を与えられた符号量でH.264またはMPEG−4,MPEG−2などの規格に基づき効率的に符号化する動画像符号化方法とその関連技術に関するものである。   The present invention relates to a moving image coding technique, and in particular, H.264 with a given code amount. The present invention relates to a moving picture coding method for efficiently coding based on standards such as H.264, MPEG-4, and MPEG-2, and related techniques.

従来の動画像符号化技術として,例えば,H.264映像符号化方式を策定する際に提案された図4に示す方法がある(例えば,非特許文献1参照)。   As a conventional moving image encoding technique, for example, H.264 has been described. There is a method shown in FIG. 4 proposed when formulating the H.264 video encoding method (see, for example, Non-Patent Document 1).

図4に示す従来の符号化処理フローにおいては,まず,量子化パラメータ値Qと,Qの関数であるラグランジュ乗数λの初期値を設定する(ステップS41)。次に,最初のブロック(i=1)から順番に符号化を開始し(ステップS42,S43),動きベクトルを探索し決定する(ステップS44)。   In the conventional encoding process flow shown in FIG. 4, first, a quantization parameter value Q and an initial value of a Lagrange multiplier λ that is a function of Q are set (step S41). Next, encoding is started in order from the first block (i = 1) (steps S42 and S43), and a motion vector is searched and determined (step S44).

次に,符号化モードの各候補について符号量歪みDと符号量Rを算出してD+λRを計算し,D+λRを最小化する符号化モードで符号化する(ステップS45)。符号化モードの候補としては,例えば画面内予測符号化を行うか画面間予測符号化を行うかのモードあるいは予測ブロックの大きさによってINTRA4×4,INTRA16×16,INTER16×16,INTER16×8,INTER8×16,INTER8×8,INTER8×4,INTER4×8,INTER4×4,SKIP,DIRECTのモードがある。   Next, the code amount distortion D and the code amount R are calculated for each candidate of the encoding mode, D + λR is calculated, and encoding is performed in the encoding mode that minimizes D + λR (step S45). As encoding mode candidates, for example, INTRA 4 × 4, INTRA 16 × 16, INTER16 × 16, INTER16 × 8, INTER16 × 8, depending on the mode of whether to perform intra prediction encoding or inter prediction encoding or the size of a prediction block, There are INTER8 × 16, INTER8 × 8, INTER8 × 4, INTER4 × 8, INTER4 × 4, SKIP, and DIRECT modes.

次のブロックを符号化する前に,符号量を制御するために量子化パラメータ値Qとラグランジュ乗数λを更新する(ステップS46)。上記ステップS43からステップS46までの処理を,iをインクリメントしながら(ステップS48),iがiMAX になるまで全てのブロックについて繰り返す(ステップS47)。 Before the next block is encoded, the quantization parameter value Q and the Lagrange multiplier λ are updated in order to control the code amount (step S46). The process from step S43 to step S46, while incrementing i (step S48), i is repeated for all the blocks until i MAX (step S47).

図4に示すとおり,従来は,量子化パラメータ値Qを変化させることにより,符号量を制御している。例えばH.264映像符号化方式においては,符号量歪みDと符号量Rを算出して符号化モードを選択する際に,単一の量子化パラメータ値Qを用いている。
S.Ma, W.Gao and Y.Lu, "Rate controll on JVT standard", Document JVT_DO30, Klagenfurt, Austria, 22-26 July, 2002.
As shown in FIG. 4, conventionally, the amount of code is controlled by changing the quantization parameter value Q. For example, H.C. In the H.264 video encoding system, when a code amount distortion D and a code amount R are calculated and an encoding mode is selected, a single quantization parameter value Q is used.
S.Ma, W.Gao and Y.Lu, "Rate controll on JVT standard", Document JVT_DO30, Klagenfurt, Austria, 22-26 July, 2002.

ラグランジュ未定乗数法の観点からは,ラグランジュ乗数λをなるべく定数に保ったまま符号量歪みDと符号量Rを算出してD+λRを最小にするような符号化モードを選択していくのが最も効率の高い符号化方法である。   From the viewpoint of the Lagrange multiplier method, it is most efficient to select a coding mode that minimizes D + λR by calculating the code amount distortion D and the code amount R while keeping the Lagrange multiplier λ as constant as possible. This is a high encoding method.

ところが,従来の方法においては,λはQの関数となっており,符号量を制御するために量子化パラメータ値Qを更新すると,同時にλも更新することになり,λの変動が大きくなってしまい,符号化効率が低下するという問題がある。   However, in the conventional method, λ is a function of Q. When the quantization parameter value Q is updated to control the code amount, λ is also updated at the same time, and the variation of λ increases. Therefore, there is a problem that the encoding efficiency is lowered.

また,従来の方法においては,D+λRを計算して符号化モードを選択する際に,量子化パラメータ値Qを固定している。ところが,例えばこれから符号化する領域の複雑度が高い場合には,複雑度を考慮しないで決定した場合の量子化パラメータ値Qよりも大きな値で符号化した方が全体の符号化効率は上がる可能性が高いが,単一の量子化パラメータ値Qで符号化することをあらかじめ決定してしまっているためにその値をとることができず,符号化効率が上がらないという問題がある。   In the conventional method, the quantization parameter value Q is fixed when calculating the D + λR and selecting the encoding mode. However, for example, when the complexity of a region to be encoded is high, encoding with a value larger than the quantization parameter value Q when determined without considering the complexity may increase the overall encoding efficiency. However, since it is determined in advance that encoding is performed with a single quantization parameter value Q, there is a problem that the value cannot be obtained and the encoding efficiency does not increase.

本発明は,上記従来技術の問題点を解決し,符号化中のラグランジュ乗数λの変動を抑制し,符号化効率を向上させることができる新しい動画像符号化技術を提供することを目的とする。   An object of the present invention is to solve the above-described problems of the prior art, and to provide a new moving picture coding technique capable of suppressing the fluctuation of the Lagrangian multiplier λ during coding and improving the coding efficiency. .

上記問題点を解決するために,本発明は,符号量歪みDと符号量Rとを算出してD+λRの値をもとに符号化シンタックスを決定する動画像符号化方法において,符号化時にラグランジュ乗数λは量子化パラメータ値Qとは独立に変更し,λに関して符号量Rとλとの関係などから別途λを更新することにし,かつ複数の量子化パラメータ値Qを含む符号化モードの中からD+λRを最小化する符号化モードを選択することにする。   In order to solve the above problems, the present invention provides a moving picture coding method for calculating a code amount distortion D and a code amount R and determining a coding syntax based on a value of D + λR. The Lagrange multiplier λ is changed independently of the quantization parameter value Q, and λ is separately updated from the relationship between the code amount R and λ with respect to λ, and a coding mode including a plurality of quantization parameter values Q is included. A coding mode that minimizes D + λR is selected from the above.

これにより,符号化中のλの変動を抑制し,符号化効率を向上させることができる。複数の量子化パラメータ値QについてD+λRを最小化する符号化モードを選択するため,計算量は増大するが,動きべクトルの探索に要する計算量の膨大さに比べればその増加量は微小である。なお,符号化シンタックスとは,符号化の文字(“1”または“0”)がどのように配列されているかという符号化の構文を意味する。   As a result, variation in λ during encoding can be suppressed and encoding efficiency can be improved. Since the encoding mode that minimizes D + λR is selected for a plurality of quantization parameter values Q, the amount of calculation increases, but the amount of increase is small compared to the amount of calculation required for the motion vector search. . The encoding syntax means an encoding syntax indicating how the encoding characters (“1” or “0”) are arranged.

すなわち,第1の本発明は,符号量歪みDと符号量Rとを算出して符号化シンタックスを決定する符号化装置による動画像符号化方法において,同一のラグランジュ乗数λに対し,複数の量子化パラメータ値の候補を含む符号化モードの中からD+λRを最小にする符号化モードと量子化パラメータ値を選択することを特徴とし,符号化中にラグランジュ乗数λを更新する契機と量子化パラメータ値を更新する契機とを独立にすることを特徴とする。   That is, according to the first aspect of the present invention, in the moving picture encoding method by the encoding apparatus that calculates the encoding amount distortion D and the encoding amount R and determines the encoding syntax, An encoding mode that minimizes D + λR and a quantization parameter value are selected from encoding modes that include quantization parameter value candidates, and an opportunity to update a Lagrange multiplier λ during encoding and a quantization parameter It is characterized by making the trigger for updating the value independent.

また,第2の本発明は,符号量歪みDと符号量Rを算出して符号化シンタックスを決定する符号化装置による動画像符号化方法において,同一のラグランジュ乗数λに対し,複数の動きベクトルの候補ならびに複数の量子化パラメータ値の候補を含む符号化モードの中からD+λRを最小にする符号化モードと量子化パラメータ値と動きベクトルとを選択することを特徴とし,符号化中にラグランジュ乗数λを更新する契機と量子化パラメータ値を更新する契機とを独立にすることを特徴とする。   The second aspect of the present invention is a moving picture coding method by a coding apparatus that calculates a coding amount distortion D and a coding amount R to determine a coding syntax, and a plurality of motions with respect to the same Lagrange multiplier λ. A coding mode that minimizes D + λR, a quantization parameter value, and a motion vector are selected from coding modes including a vector candidate and a plurality of quantization parameter value candidates. The trigger for updating the multiplier λ is independent of the trigger for updating the quantization parameter value.

具体的には,上記第1または第2の発明において,ラグランジュ乗数λを更新する契機を,あらかじめ決められた数の符号化対象ブロックを符号化した契機とする。または,発生符号量とその符号化範囲における目標符号量との差が所定の値を超えた契機とする。 Specifically, in the first or second invention, the trigger for updating the Lagrange multiplier λ is the trigger for encoding a predetermined number of blocks to be encoded . Alternatively, it is assumed that the difference between the generated code amount and the target code amount in the encoding range exceeds a predetermined value.

また,上記第1または第2の発明においては,ラグランジュ乗数λの更新を次のように行う。ラグランジュ乗数λを更新する毎に,そのラグランジュ乗数λと,そのラグランジュ乗数λの値で符号化した範囲における発生符号量Rまたはその範囲におけるブロック平均の平均符号量Rave との関係を示す組(λ,R)または(λ,Rave )の情報を順次保持し,次回ラグランジュ乗数λを更新する際に,保持した組(λ,R)または(λ,Rave )の情報を基にラグランジュ乗数λを更新する。 In the first or second invention, the Lagrange multiplier λ is updated as follows. Each time a Lagrangian multiplier λ is updated, a set indicating the relationship between the Lagrange multiplier λ and the generated code amount R in the range encoded with the value of the Lagrange multiplier λ or the average code amount R ave of the block average in the range ( The information of λ, R) or (λ, R ave ) is sequentially held, and the next time the Lagrange multiplier λ is updated, the Lagrange multiplier is based on the information of the held pair (λ, R) or (λ, R ave ). to update the λ.

または,上記第1または第2の発明において,ラグランジュ乗数λの更新を次のように行うこともできる。ラグランジュ乗数λを更新する毎に,ラグランジュ乗数λと,そのラグランジュ乗数λの値で符号化した範囲におけるブロック平均の平均符号量Rave と,その平均符号量Rave と平均量子化パラメータ値の積で定義されるブロック平均の複雑さ指標Xave との組(λ,Rave ,Xave )の情報を順次保持し,次回ラグランジュ乗数λを更新する際に,保持した組(λ,Rave ,Xave )の情報の関係を基にラグランジュ乗数λを更新する。 Alternatively, in the first or second invention, the Lagrange multiplier λ can be updated as follows. Each time the Lagrange multiplier λ is updated, the Lagrangian multiplier λ, the average code amount R ave of the block average in the range encoded with the value of the Lagrange multiplier λ, and the product of the average code amount R ave and the average quantization parameter value The information of the pair (λ, R ave , X ave ) with the block average complexity index X ave defined in (1) is sequentially held, and the next time the Lagrange multiplier λ is updated (λ, R ave , based on the relationship between the information of X ave) to update the Lagrange multiplier λ.

さらに,上記発明において,ラグランジュ乗数λを更新する毎に,ラグランジュ乗数λと,そのラグランジュ乗数λの値で符号化した範囲におけるブロック平均の平均符号量Rave と,その平均符号量Rave と平均量子化パラメータ値の積で定義されるブロック平均の複雑さ指標Xave との前記保持された組(λ,Rave ,Xave )の情報から,ラグランジュ乗数λがXave /(Rave 2 に比例するモデル式に基づいてラグランジュ乗数λを更新することもできる Further, in the above invention, every time the Lagrange multiplier λ is updated, the Lagrange multiplier λ, the average code amount R ave of the block average in the range encoded with the value of the Lagrange multiplier λ, the average code amount R ave and the average From the information of the retained set (λ, R ave , X ave ) with the block average complexity index X ave defined by the product of the quantization parameter values, the Lagrange multiplier λ is X ave / (R ave ) 2 It is also possible to update the Lagrange multiplier λ based on a model equation proportional to.

図1は,本発明の動画像符号化装置の構成例を示す図である。動画像符号化装置1は,画像入力部10,量子化パラメータ値Qの候補選出部11,各量子化パラメータ値Qi に対する符号化部12−i(i=1,2,…,N),量子化パラメータ値Qによらない符号化部13,量子化パラメータ値Qの評価部14,ラグランジュ乗数λの評価・変更部15,符号化ストリーム出力部16からなる。 FIG. 1 is a diagram illustrating a configuration example of a moving image encoding apparatus according to the present invention. The moving image encoding apparatus 1 includes an image input unit 10, a quantization parameter value Q candidate selection unit 11, encoding units 12-i (i = 1, 2,..., N) for each quantization parameter value Q i , The encoding unit 13 does not depend on the quantization parameter value Q, the evaluation unit 14 for the quantization parameter value Q, the evaluation / change unit 15 for the Lagrange multiplier λ, and the encoded stream output unit 16.

画像入力部10は,符号化対象の画像信号を入力する。Qの候補選出部11は,各符号化対象ブロックごとに,複数の量子化パラメータ値Qi の候補を決定する。Qi に対する符号化部12−iは,それぞれ同一のラグランジュ乗数λに対し,各量子化パラメータ値Qi の候補を含む符号化モードの中からD+λR(D:符号量歪み,R:符号量)を最小にする符号化モードにより,符号化対象ブロックを符号化する。Qによらない符号化部13は,動きベクトルやヘッダ情報その他の量子化パラメータに依存しない符号化を行う部分である。 The image input unit 10 inputs an image signal to be encoded. The Q candidate selection unit 11 determines a plurality of quantization parameter value Q i candidates for each encoding target block. The encoding unit 12- i for Q i uses D + λR (D: code amount distortion, R: code amount) from among the encoding modes including candidates for each quantization parameter value Q i for the same Lagrangian multiplier λ. The encoding target block is encoded in an encoding mode that minimizes. The coding unit 13 that does not depend on Q is a part that performs coding independent of motion vectors, header information, and other quantization parameters.

Qの評価部14は,各Qi に対する符号化部12−iによる符号化結果の中で,D+λRが最も小さい量子化パラメータ値と符号化モードの組を選出する。λの評価・変更部15は,Qの候補選出部11により量子化パラメータ値Qの候補を決定する契機とは独立に,所定数の符号化対象ブロックごとに,または各符号化対象ブロック当たりの発生符号量の平均値と目標平均符号量との差が所定の値を超えた契機でラグランジュ乗数λを更新する。新しいラグランジュ乗数λは,例えば現在のラグランジュ乗数λと,そのラグランジュ乗数λの値で符号化した範囲におけるブロック平均の平均符号量Rave との関係を示す組(λ,Rave )の情報を順次保持しておき,その組(λ,Rave )の情報をもとに決定する。 The Q evaluation unit 14 selects a set of a quantization parameter value and a coding mode with the smallest D + λR among the coding results of the coding unit 12- i for each Q i . The λ evaluating / changing unit 15 is independent of the opportunity for determining the candidate for the quantization parameter value Q by the Q candidate selecting unit 11 for each predetermined number of encoding target blocks or for each encoding target block. The Lagrange multiplier λ is updated when the difference between the generated code amount average value and the target average code amount exceeds a predetermined value. For example, the new Lagrange multiplier λ sequentially includes information on a set (λ, R ave ) indicating the relationship between the current Lagrange multiplier λ and the average code amount R ave of the block average in the range encoded with the value of the Lagrange multiplier λ. It is determined based on the information of the set (λ, R ave ).

本発明によれば,符号量歪みDと符号量Rを算出して符号化シンタックスを決定する動画像符号化装置において,計算量の微小な増加で,より高効率な動画像映像符号化を行うことができる。   According to the present invention, in a video encoding device that determines the encoding syntax by calculating the code amount distortion D and the code amount R, a highly efficient video image encoding can be performed with a small increase in the calculation amount. It can be carried out.

〔第1の実施の形態〕
本発明の第1の実施の形態として,第1,第3および第5の本発明を同時に採用した場合の例を説明する。図2は,本発明の第1の実施の形態に係る動画像符号化処理フローの一例を示している。
[First Embodiment]
As a first embodiment of the present invention, an example in which the first, third and fifth present inventions are employed at the same time will be described. FIG. 2 shows an example of a moving image encoding processing flow according to the first embodiment of the present invention.

まず,初期の量子化パラメータ値Qとラグランジュ乗数λの初期値を設定し(ステップS1),ブロック番号i=1として(ステップS2),最初のブロックの符号化を開始する(ステップS3)。   First, initial quantization parameter value Q and initial value of Lagrange multiplier λ are set (step S1), block number i = 1 (step S2), and encoding of the first block is started (step S3).

動きベクトルを探索し決定した後に(ステップS4),複数の量子化パラメータ値Qの候補を決定する(ステップS5)。なお,最初のブロックの複数の量子化パラメータ値Qとしては,例えば従来の方法で求められる量子化パラメータ値とそれに1をプラスマイナスした量子化パラメータ値の計3つを用いる。   After searching and determining a motion vector (step S4), a plurality of quantization parameter value Q candidates are determined (step S5). As the plurality of quantization parameter values Q of the first block, for example, a total of three quantization parameter values obtained by a conventional method and quantization parameter values obtained by adding 1 to the quantization parameter value are used.

次に,複数の符号化モードの各候補(例えば画面内予測符号化か画面間予測符号化を行うかあるいは予測ブロックの大きさによってINTRA4×4,INTRA16×16,INTER16×16,INTER16×8,INTER8×16,INTER8×8,INTER8×4,INTER4×8,INTER4×4,SKIP,DIRECTがある)と量子化パラメータ値Qの組のそれぞれについて符号量歪みDと符号量Rを算出してD+λRを計算し,D+λRを最小化する符号化モードと量子化パラメータ値Qで符号化する(ステップS6)。これまでに同一のλのもとで符号化したブロックの発生符号量Rの和Rsum を算出しメモリに記憶しておく(ステップS7)。 Next, candidates for a plurality of encoding modes (for example, whether intra prediction encoding or inter prediction encoding is performed, or INTRA 4 × 4, INTRA 16 × 16, INTER16 × 16, INTER16 × 8, INTER8 × 16, INTER8 × 8, INTER8 × 4, INTER4 × 8, INTER4 × 4, SKIP, and DIRECT) and a quantization parameter value Q, a code amount distortion D and a code amount R are calculated and D + λR Is calculated, and encoding is performed with an encoding mode for minimizing D + λR and a quantization parameter value Q (step S6). The sum R sum of the generated code amounts R of the blocks encoded under the same λ is calculated and stored in the memory (step S7).

ラグランジュ乗数λを更新するか否かを判断し(ステップS8),λを更新する場合には,現在のλと,これまでに符号化したブロックの発生符号量Rの和Rsum の組の情報を記憶し(ステップS9),後述する方法によりλを変更する(ステップS10)。その後,ステップS11へ進む。 It is determined whether or not the Lagrange multiplier λ is to be updated (step S8), and when λ is updated, information on the set of the sum λ sum of the current λ and the generated code amount R of the blocks encoded so far Is stored (step S9), and λ is changed by a method described later (step S10). Then, it progresses to step S11.

ステップS8で,λを更新しないと判断した場合には,λを変更しないでステップS11へ進む。ステップS11では,最後のiMAX 番目のブロックまで符号化が終了したかを判断し,最後のブロックまで符号化が終了したならそのフレームの符号化処理を終了する。まだ,次のブロックがある場合には,iに1を加算した後(ステップS12),ステップS3へ戻って,次のi番目のブロックについて同様に処理を繰り返す。 If it is determined in step S8 that λ is not updated, the process proceeds to step S11 without changing λ. In step S11, it is determined whether or not the encoding has been completed up to the last iMAX- th block. If the encoding has been completed up to the last block, the encoding processing of the frame is ended. If there is still a next block, after adding 1 to i (step S12), the process returns to step S3 to repeat the same process for the next i-th block.

ステップS8において,ラグランジュ乗数λを更新するか否かは,例えばあらかじめ定められた数のブロックからなる1ビデオパケット分の符号化が終了したかどうかで判断する。1ビデオパケット分の符号化を終了するまではラグランジュ乗数λの値は一定に保ち,1ビデオパケット分の符号化を終了した場合に,ステップS10において,ラグランジュ乗数λの値を更新する。   In step S8, whether or not to update the Lagrange multiplier λ is determined based on whether or not the encoding of one video packet including a predetermined number of blocks has been completed. The value of the Lagrangian multiplier λ is kept constant until the encoding of one video packet is completed, and when the encoding of one video packet is completed, the value of the Lagrange multiplier λ is updated in step S10.

λの更新にあたっては,例えば,これまでに符号化を終了したパケットごとに,ステップS9において(λ,Rsum )の組を過去の数ビデオパケット(例えば20ビデオパケット)について保持しておき,次のビデオパケットの目標符号量に最も近いRsum を有する2つの(λ,Rsum )の組から目標符号量の値に内挿あるいは外挿したλの値を次のビデオパケットにおけるラグランジュ乗数λの値とする。なお,初めから1または2個目のビデオパケットのラグランジュ乗数λの値を与えるため,2組以上の(λ,Rsum )の組の初期値をあらかじめ与えておく。 In updating λ, for example, for each packet that has been encoded so far, in step S9, a set of (λ, R sum ) is held for the past several video packets (for example, 20 video packets). The value of λ interpolated or extrapolated to the value of the target code amount from the set of two (λ, R sum ) having the R sum closest to the target code amount of the video packet of the Lagrange multiplier λ in the next video packet Value. In order to give the value of the Lagrange multiplier λ of the first or second video packet from the beginning, the initial values of two or more sets of (λ, R sum ) are given in advance.

なお,ビデオパケットの発生符号量Rsum ではなく,あるラグランジュ乗数λの値で符号化した範囲におけるブロック平均の平均符号量Rave を算出し,λとRave の組の情報を記憶してもよい。ただし,この例では,ラグランジュ乗数λを更新するまでのブロック数は常に一定であるので,ブロック平均の平均符号量Rave の代わりに,一定のブロック数のビデオパケットの発生符号量Rsum を用いている。これによって,Rsum をブロック数で割り算し,Rave を算出する処理を省略している。 It should be noted that the average code amount R ave of the block average in the range encoded with the value of a certain Lagrangian multiplier λ is calculated instead of the generated code amount R sum of the video packet, and information on a set of λ and R ave is stored. Good. However, in this example, since the number of blocks until the Lagrange multiplier λ is updated is always constant, the generated code amount R sum of video packets having a fixed number of blocks is used instead of the average code amount R ave of the block average. ing. Thus, the process of dividing R sum by the number of blocks and calculating R ave is omitted.

ステップS5において,第2番目のブロック以降の複数の量子化パラメータ値Qの候補は,例えば次のような方法で決定する。
(1)一つ前のブロックの符号化に用いた量子化パラメータ値Qと,それに1をプラスマイナスした量子化パラメータ値の計3つを候補とする。
(2)同一のλである過去の数ブロックについての各ブロックの発生符号量Rと量子化パラメータ値Qとの組(R,Q)を,ステップS7で保持しておき,その情報をもとに目標符号量の値に最も近い符号量を与える量子化パラメータ値Qを予測し,その値Qと,それに1をプラスマイナスした量子化パラメータ値の計3つを候補とする。
In step S5, candidates for a plurality of quantization parameter values Q after the second block are determined by the following method, for example.
(1) A total of three quantization parameter values Q used for encoding the previous block and quantization parameter values obtained by adding 1 to the quantization parameter value are candidates.
(2) A set (R, Q) of the generated code amount R and the quantization parameter value Q of each block for the past several blocks having the same λ is held in step S7. Then, a quantization parameter value Q that gives a code amount closest to the target code amount is predicted, and the value Q and a total of three quantization parameter values plus or minus 1 are set as candidates.

ここでは,複数の量子化パラメータ値Qの候補としては,例えば最初に従来の方法で求められる量子化パラメータ値とそれに1をプラスマイナスした量子化パラメータ値の計3つを用い,第2番目以降のブロックでは,直前の量子化パラメータ値Qまたは過去の符号化情報から目標符号量をもとに選出した量子化パラメータ値Qと,それに1をプラスマイナスした量子化パラメータ値の計3つを用いる例を述べたが,複数の量子化パラメータ値の候補の決定方法はこれに限定されず,例えば2つおきに全ての量子化パラメータ値を候補とする方法など,他の方法を用いてもよいことは言うまでもない。   Here, as the candidates for the plurality of quantization parameter values Q, for example, a total of three quantization parameter values first obtained by the conventional method and quantization parameter values obtained by adding 1 to the quantization parameter value are used. In this block, the quantization parameter value Q selected based on the target code amount from the previous quantization parameter value Q or the past encoded information, and the quantization parameter value obtained by adding 1 to the quantization parameter value are used. Although an example has been described, the method of determining a plurality of quantization parameter value candidates is not limited to this, and other methods may be used, such as a method in which every two quantization parameter values are candidates. Needless to say.

また,第1の実施の形態では,上記ステップS8におけるλの更新の契機について,あらかじめ定められた数のブロックからなる1ビデオパケット単位でラグランジュ乗数λの値を更新する例を述べたが,あらかじめ決められた数のブロックを定める方法はビデオパケットを用いる方法に限定されず,例えば,同じ水平行に属する全てのマクロブロックの間では,λの値を一定とする方法などを用いてもよいことは言うまでもない。   In the first embodiment, the example of updating the value of the Lagrange multiplier λ in units of one video packet composed of a predetermined number of blocks has been described as the trigger for updating λ in step S8. The method for determining a predetermined number of blocks is not limited to the method using video packets. For example, a method of making the value of λ constant among all macroblocks belonging to the same horizontal line may be used. Needless to say.

〔第2の実施の形態〕
本発明の第2の実施の形態として,第2,第4,第6および第7の本発明を同時に採用した場合の例を説明する。図3は,本発明の第2の実施の形態に係る動画像符号化処理フローの一例を示している。
[Second Embodiment]
As a second embodiment of the present invention, an example will be described in which the second, fourth, sixth and seventh aspects of the present invention are employed simultaneously. FIG. 3 shows an example of a moving image encoding processing flow according to the second embodiment of the present invention.

まず,初期の量子化パラメータ値Qとラグランジュ乗数λの初期値を設定し(ステップS21),ブロック番号iを1として(ステップS22),最初のブロックの符号化を開始する(ステップS23)。   First, initial quantization parameter value Q and initial value of Lagrange multiplier λ are set (step S21), block number i is set to 1 (step S22), and encoding of the first block is started (step S23).

動きベクトルを探索し,複数の動きベクトルの候補を決定する(ステップS24)。複数の動きベクトルの候補の選出方法としては,例えば符号量歪みDと,符号量Rと,動きベクトルを求めるためのラグランジュ乗数λmotionからD+λmotion・Rの小さい値を与える順に動きベクトルを複数個(例えば5個)選択する。 A motion vector is searched and a plurality of motion vector candidates are determined (step S24). As a method for selecting a plurality of motion vector candidates, for example, a plurality of motion vectors are provided in the order of giving a small value of D + λ motion · R from a Lagrangian multiplier λ motion for determining a code amount distortion D, a code amount R, and a motion vector. Select (for example, 5).

次に,複数の量子化パラメータ値Qの候補を決定する(ステップS25)。複数の量子化パラメータ値Qとしては,例えば従来の方法で求められる量子化パラメータ値と,その量子化パラメータ値に1をプラスマイナスした量子化パラメータ値の計3つを用いる。   Next, a plurality of quantization parameter value Q candidates are determined (step S25). As the plurality of quantization parameter values Q, for example, a total of three quantization parameter values obtained by a conventional method and quantization parameter values obtained by adding 1 to the quantization parameter value are used.

複数の符号化モードの各候補(例えば画面内予測符号化か画面間予測符号化を行うかあるいは予測ブロックの大きさによってINTRA4×4,INTRA16×16,INTER16×16,INTER16×8,INTER8×16,INTER8×8,INTER8×4,INTER4×8,INTER4×4,SKIP,DIRECTがある)と量子化パラメータ値Qと動きベクトルの組のそれぞれについて,符号量歪みDと符号量Rを算出してD+λRを計算し,D+λRを最小化する符号化モードと量子化パラメータ値Qと動きベクトルの組で符号化する(ステップS26)。   Candidates of a plurality of encoding modes (for example, whether to perform intra prediction encoding or inter prediction encoding, or depending on the size of the prediction block, INTRA 4 × 4, INTRA 16 × 16, INTER16 × 16, INTER16 × 8, INTER8 × 16 , INTER8 × 8, INTER8 × 4, INTER4 × 8, INTER4 × 4, SKIP, and DIRECT), and a quantization parameter value Q and a motion vector, respectively, D + λR is calculated, and encoding is performed using a set of an encoding mode that minimizes D + λR, a quantization parameter value Q, and a motion vector (step S26).

符号化したブロックの発生符号量Rと,量子化パラメータ値Qとをメモリに記憶する(ステップS27)。また,同一のλを用いて符号化しているブロックのブロック数をカウントしておく。   The generated code amount R of the encoded block and the quantization parameter value Q are stored in the memory (step S27). The number of blocks encoded using the same λ is counted.

ラグランジュ乗数λを更新するか否かを判断し(ステップS28),λを更新する場合には,現在のλの値と,そのλの値で符号化した範囲におけるブロック平均の平均符号量Rave と,Rave と平均量子化パラメータ値の積で定義されるブロック平均の複雑さ指標Xave の組(λ,Rave ,Xave )の情報を記憶する(ステップS29)。この組(λ,Rave ,Xave )の情報は,過去数回の更新数(例えば20回)分について保持しておく。次に,後述する方法によりラグランジュ乗数λを変更する(ステップS30)。その後,ステップS31へ進む。 It is determined whether or not the Lagrange multiplier λ is to be updated (step S28). When λ is updated, the current value of λ and the average code amount R ave of the block average in the range encoded with the value of λ. Then, information of a set (λ, R ave , X ave ) of the block average complexity index X ave defined by the product of R ave and the average quantization parameter value is stored (step S29). Information of this set (λ, R ave , X ave ) is held for the past number of updates (for example, 20 times). Next, the Lagrange multiplier λ is changed by a method described later (step S30). Thereafter, the process proceeds to step S31.

ステップS28で,λを更新しないと判断した場合には,λを変更しないでステップS31へ進む。ステップS31では,最後のiMAX 番目のブロックまで符号化が終了したかを判断し,最後のブロックまで符号化が終了したならそのフレームの符号化処理を終了する。まだ,次のブロックがある場合には,iに1を加算した後(ステップS32),ステップS23へ戻って,次のi番目のブロックについて同様に処理を繰り返す。 If it is determined in step S28 that λ is not updated, the process proceeds to step S31 without changing λ. In step S31, it is determined whether or not encoding has been completed up to the last iMAX- th block. If encoding has been completed up to the last block, the encoding processing of the frame is ended. If there is still a next block, after adding 1 to i (step S32), the process returns to step S23 and the same process is repeated for the next i-th block.

ステップS28において,ラグランジュ乗数λを更新するか否かは,例えば発生した符号量のブロック当たりの平均値と,ブロック当たりの目標平均符号量との比較によって決定する。この例では,発生した符号量のブロック当たりの平均値が,ブロック当たりの目標平均符号量に比べて10%以内の差に収まっている場合には,ラグランジュ乗数λの値を一定に保ち,10%以内の差に収まらない場合には,ラグランジュ乗数λの値を更新するようにしている。   In step S28, whether or not to update the Lagrange multiplier λ is determined, for example, by comparing the average value of the generated code amount per block with the target average code amount per block. In this example, when the average value of the generated code amount per block is within 10% of the target average code amount per block, the value of the Lagrange multiplier λ is kept constant, 10 If the difference does not fall within the%, the value of the Lagrange multiplier λ is updated.

ステップS30におけるλの更新にあたっては,ステップS29において記憶しておいた過去数回分の,ラグランジュ乗数λと,平均符号量Rave と,複雑さ指標Xave との組(λ,Rave ,Xave )の情報をもとに,λがXave /(Rave 2 に比例するモデル式であるところの,
λ=k・Xave /(Rave 2
の比例係数kを求め,更新されたラグランジュ乗数λを適用する領域におけるブロック平均の目標符号量Rave と,ブロック平均の複雑さ指標Xave の予測値とから,
λ=k・Xave /(Rave 2
に代入して得られるλの値に,ラグランジュ乗数の値を更新する。
In updating λ in step S30, a set (λ, R ave , X ave) of Lagrange multiplier λ, average code amount R ave , and complexity index X ave for the past several times stored in step S29. ) Is a model equation in which λ is proportional to X ave / (R ave ) 2 .
λ = k · X ave / (R ave ) 2
Is obtained from the block average target code amount R ave in the region to which the updated Lagrange multiplier λ is applied and the predicted value of the block average complexity index X ave .
λ = k · X ave / (R ave ) 2
Update the value of the Lagrange multiplier to the value of λ obtained by substituting.

第2の実施の形態では,上記ステップS28におけるλの更新の契機について,発生した符号量のブロック当たりの平均値が,ブロック当たりの目標平均符号量に比べて10%以内の差に収まっている場合には,ラグランジュ乗数λの値は一定に保ち,10%以内の差に収まらない場合にはλの値を更新する例を述べたが,必ずしも10%に限定されず,他の割合の範囲内で収まっているかどうかでλの値を更新しても良いことは言うまでもない。   In the second embodiment, the average value of the generated code amount per block is within 10% of the target average code amount per block when the λ is updated in step S28. In this case, the value of the Lagrange multiplier λ is kept constant, and when the difference does not fall within 10%, the value of λ is updated. However, the value is not necessarily limited to 10%, but other ratio ranges It goes without saying that the value of λ may be updated depending on whether it falls within the range.

以上の動画像符号化の処理は,ハードウェアやファームウェアによって実現することができるだけでなく,コンピュータとソフトウェアプログラムとによっても実現することができ,そのプログラムをコンピュータ読み取り可能な記録媒体に記録して提供することも,ネットワークを通して提供することも可能である。   The above moving image encoding processing can be realized not only by hardware and firmware but also by a computer and a software program, and the program is recorded on a computer-readable recording medium and provided. Or can be provided through a network.

動画像符号化装置の構成の一例を示す図である。It is a figure which shows an example of a structure of a moving image encoder. 動画像符号化処理フローの一例を示す図である。It is a figure which shows an example of a moving image encoding process flow. 動画像符号化処理フローの一例を示す図である。It is a figure which shows an example of a moving image encoding process flow. 従来の符号化処理フローを示す図である。It is a figure which shows the conventional encoding process flow.

符号の説明Explanation of symbols

1 動画像符号化装置
10 画像入力部
11 Qの候補選出部
12−i Qi に対する符号化部
13 Qによらない符号化部
14 Qの評価部
15 λの評価・変更部
16 符号化ストリーム出力部
1 video encoding apparatus 10 image input unit 11 Q candidate selecting unit 12-i Q i does not depend on the coding unit 13 Q for encoding unit 14 Q evaluation unit 15 lambda evaluation and changing unit 16 encoded stream output of the Part

Claims (12)

符号量歪みDと符号量Rとを算出して,ラグランジュ乗数λをもとにD+λRを最小にする符号化シンタックスを決定する符号化装置による動画像符号化方法において,
あらかじめ定められたラグランジュ乗数λの初期値を設定する第1の過程と,
複数の量子化パラメータ値の候補を決定する第2の過程と,
同一のラグランジュ乗数λに対し,前記複数の量子化パラメータ値の候補を含む符号化モードの中からD+λRを最小にする符号化モードと量子化パラメータ値を選択し,符号化対象データを符号化する第3の過程と,
前記量子化パラメータ値の候補を決定する契機とは独立に,前記第2および第3の過程の繰り返しにおいて所定数の符号化対象データを符号化した契機または各符号化対象データ当たりの発生符号量の平均値と目標平均符号量との差が所定の値を超えた契機で,前記ラグランジュ乗数λを更新する第4の過程とを有し,
前記第4の過程では,ラグランジュ乗数λを更新する毎に,そのラグランジュ乗数λと,そのラグランジュ乗数λの値で符号化した範囲における発生符号量または符号化対象データ毎の平均符号量との関係を示す情報を順次保持し,次回ラグランジュ乗数λを更新する際に,保持したラグランジュ乗数λと符号量との関係を示す情報を基にラグランジュ乗数λを更新する
ことを特徴とする動画像符号化方法。
In a video encoding method by an encoding device that calculates a code amount distortion D and a code amount R and determines an encoding syntax that minimizes D + λR based on a Lagrange multiplier λ,
A first step of setting an initial value of a predetermined Lagrange multiplier λ;
A second step of determining a plurality of quantization parameter value candidates;
For the same Lagrangian multiplier λ, a coding mode and a quantization parameter value that minimizes D + λR are selected from the coding modes including the plurality of quantization parameter value candidates, and the data to be encoded is encoded. The third process,
Independently of the trigger for determining the candidate of the quantized parameter value, said second and third trigger or each coded data per encoded a predetermined number of coded data in Repetitive flashing process of generating in opportunity for the difference between the average value and the target average code amount of the code amount exceeds the predetermined value, possess a fourth step of updating the Lagrangian multiplier lambda,
In the fourth process, every time the Lagrange multiplier λ is updated, the relationship between the Lagrange multiplier λ and the generated code amount in the range encoded with the value of the Lagrange multiplier λ or the average code amount for each encoding target data The video coding is characterized in that when the Lagrange multiplier λ is updated next time, the Lagrange multiplier λ is updated based on the information indicating the relationship between the stored Lagrange multiplier λ and the code amount . Method.
符号量歪みDと符号量Rを算出して,ラグランジュ乗数λをもとにD+λRを最小にする符号化シンタックスを決定する符号化装置による動画像符号化方法において,
あらかじめ定められたラグランジュ乗数λの初期値を設定する第1の過程と,
複数の量子化パラメータ値の候補を決定する第2の過程と,
同一のラグランジュ乗数λに対し,複数の動きベクトルの候補および前記複数の量子化パラメータ値の候補を含む符号化モードの中からD+λRを最小にする符号化モードと量子化パラメータ値と動きベクトルとを選択し,符号化対象データを符号化する第3の過程と,
前記量子化パラメータ値の候補を決定する契機とは独立に,前記第2および第3の過程の繰り返しにおいて所定数の符号化対象データを符号化した契機または各符号化対象データ当たりの発生符号量の平均値と目標平均符号量との差が所定の値を超えた契機で,前記ラグランジュ乗数λを更新する第4の過程とを有し,
前記第4の過程では,ラグランジュ乗数λを更新する毎に,そのラグランジュ乗数λと,そのラグランジュ乗数λの値で符号化した範囲における発生符号量または符号化対象データ毎の平均符号量との関係を示す情報を順次保持し,次回ラグランジュ乗数λを更新する際に,保持したラグランジュ乗数λと符号量との関係を示す情報を基にラグランジュ乗数λを更新する
ことを特徴とする動画像符号化方法。
In a video encoding method by an encoding device that calculates a code amount distortion D and a code amount R and determines an encoding syntax that minimizes D + λR based on a Lagrange multiplier λ,
A first step of setting an initial value of a predetermined Lagrange multiplier λ;
A second step of determining a plurality of quantization parameter value candidates;
For the same Lagrange multiplier λ, an encoding mode, a quantization parameter value, and a motion vector that minimize D + λR are selected from among a plurality of motion vector candidates and a plurality of quantization parameter value candidates. A third process of selecting and encoding the data to be encoded;
Independently of the trigger for determining the candidate of the quantized parameter value, said second and third trigger or each coded data per encoded a predetermined number of coded data in Repetitive flashing process of generating A fourth step of updating the Lagrange multiplier λ when the difference between the average value of the code amount and the target average code amount exceeds a predetermined value ,
In the fourth process, every time the Lagrange multiplier λ is updated, the relationship between the Lagrange multiplier λ and the generated code amount in the range encoded with the value of the Lagrange multiplier λ or the average code amount for each encoding target data The video coding is characterized in that when the Lagrange multiplier λ is updated next time, the Lagrange multiplier λ is updated based on the information indicating the relationship between the stored Lagrange multiplier λ and the code amount . Method.
符号量歪みDと符号量Rとを算出して,ラグランジュ乗数λをもとにD+λRを最小にする符号化シンタックスを決定する符号化装置による動画像符号化方法において,
あらかじめ定められたラグランジュ乗数λの初期値を設定する第1の過程と,
複数の量子化パラメータ値の候補を決定する第2の過程と,
同一のラグランジュ乗数λに対し,前記複数の量子化パラメータ値の候補を含む符号化モードの中からD+λRを最小にする符号化モードと量子化パラメータ値を選択し,符号化対象データを符号化する第3の過程と,
前記量子化パラメータ値の候補を決定する契機とは独立に,前記第2および第3の過程の繰り返しにおいて所定数の符号化対象データを符号化した契機または各符号化対象データ当たりの発生符号量の平均値と目標平均符号量との差が所定の値を超えた契機で,前記ラグランジュ乗数λを更新する第4の過程とを有し,
前記第4の過程では,ラグランジュ乗数λを更新する毎に,ラグランジュ乗数λと,そのラグランジュ乗数λの値で符号化した範囲における符号化対象データ毎の平均符号量R ave と,その平均符号量R ave と平均量子化パラメータ値の積で定義される符号化対象データの平均の複雑さ指標X ave との組(λ,R ave ,X ave )を順次保持し,次回ラグランジュ乗数λを更新する際に,保持した(λ,R ave ,X ave )の関係を基にラグランジュ乗数λを更新する
ことを特徴とする動画像符号化方法。
In a video encoding method by an encoding device that calculates a code amount distortion D and a code amount R and determines an encoding syntax that minimizes D + λR based on a Lagrange multiplier λ,
A first step of setting an initial value of a predetermined Lagrange multiplier λ;
A second step of determining a plurality of quantization parameter value candidates;
For the same Lagrangian multiplier λ, a coding mode and a quantization parameter value that minimizes D + λR are selected from the coding modes including the plurality of quantization parameter value candidates, and the data to be encoded is encoded. The third process,
Independent of the opportunity for determining the quantization parameter value candidate, the opportunity for encoding a predetermined number of encoding target data in the repetition of the second and third processes, or the generated code amount per encoding target data A fourth step of updating the Lagrangian multiplier λ when the difference between the average value of the code and the target average code amount exceeds a predetermined value,
In the fourth step, every time the Lagrange multiplier λ is updated, the Lagrange multiplier λ, the average code amount R ave for each data to be encoded in the range encoded with the value of the Lagrange multiplier λ, and the average code amount A pair (λ, R ave , X ave ) of the average complexity index X ave defined by the product of R ave and the average quantization parameter value is sequentially held, and the next Lagrange multiplier λ is updated. In this case, the video coding method is characterized in that the Lagrange multiplier λ is updated based on the relationship of (λ, R ave , X ave ) held .
符号量歪みDと符号量Rとを算出して,ラグランジュ乗数λをもとにD+λRを最小にする符号化シンタックスを決定する符号化装置による動画像符号化方法において,
あらかじめ定められたラグランジュ乗数λの初期値を設定する第1の過程と,
複数の量子化パラメータ値の候補を決定する第2の過程と,
同一のラグランジュ乗数λに対し,複数の動きベクトルの候補および前記複数の量子化パラメータ値の候補を含む符号化モードの中からD+λRを最小にする符号化モードと量子化パラメータ値と動きベクトルとを選択し,符号化対象データを符号化する第3の過程と,
前記量子化パラメータ値の候補を決定する契機とは独立に,前記第2および第3の過程の繰り返しにおいて所定数の符号化対象データを符号化した契機または各符号化対象データ当たりの発生符号量の平均値と目標平均符号量との差が所定の値を超えた契機で,前記ラグランジュ乗数λを更新する第4の過程とを有し,
前記第4の過程では,ラグランジュ乗数λを更新する毎に,ラグランジュ乗数λと,そのラグランジュ乗数λの値で符号化した範囲における符号化対象データ毎の平均符号量R ave と,その平均符号量R ave と平均量子化パラメータ値の積で定義される符号化対象データの平均の複雑さ指標X ave との組(λ,R ave ,X ave )を順次保持し,次回ラグランジュ乗数λを更新する際に,保持した(λ,R ave ,X ave )の関係を基にラグランジュ乗数λを更新する
ことを特徴とする動画像符号化方法。
In a video encoding method by an encoding device that calculates a code amount distortion D and a code amount R and determines an encoding syntax that minimizes D + λR based on a Lagrange multiplier λ,
A first step of setting an initial value of a predetermined Lagrange multiplier λ;
A second step of determining a plurality of quantization parameter value candidates;
For the same Lagrange multiplier λ, an encoding mode, a quantization parameter value, and a motion vector that minimize D + λR are selected from among a plurality of motion vector candidates and a plurality of quantization parameter value candidates. A third process of selecting and encoding the data to be encoded;
Independent of the opportunity for determining the quantization parameter value candidate, the opportunity for encoding a predetermined number of encoding target data in the repetition of the second and third processes, or the generated code amount per encoding target data A fourth step of updating the Lagrangian multiplier λ when the difference between the average value of the code and the target average code amount exceeds a predetermined value,
In the fourth step, every time the Lagrange multiplier λ is updated, the Lagrange multiplier λ, the average code amount R ave for each data to be encoded in the range encoded with the value of the Lagrange multiplier λ, and the average code amount A set (λ, R ave , X ave ) of the average complexity index X ave defined by the product of R ave and the average quantization parameter value is sequentially held, and the next Lagrange multiplier λ is updated. In this case, the video coding method is characterized in that the Lagrange multiplier λ is updated based on the relationship of (λ, R ave , X ave ) held .
請求項3または請求項4記載の動画像符号化方法において,
前記第4の過程では,ラグランジュ乗数λを更新する毎に,ラグランジュ乗数λと,そのラグランジュ乗数λの値で符号化した範囲における符号化対象データ毎の平均符号量Rave と,その平均符号量Rave と平均量子化パラメータ値の積で定義される符号化対象データの平均の複雑さ指標Xave との前記保持された(λ,Rave ,Xave )の組から,ラグランジュ乗数λがXave /(Rave 2 に比例するモデル式に基づいてラグランジュ乗数λを更新する
ことを特徴とする動画像符号化方法。
In the moving image encoding method according to claim 3 or 4 ,
In the fourth step, every time the Lagrange multiplier λ is updated, the Lagrange multiplier λ, the average code amount R ave for each data to be encoded in the range encoded with the value of the Lagrange multiplier λ, and the average code amount From the set of the held (λ, R ave , X ave ) with the average complexity index X ave defined by the product of R ave and the average quantization parameter value, the Lagrange multiplier λ is X A video encoding method, wherein the Lagrange multiplier λ is updated based on a model equation proportional to ave / (R ave ) 2 .
符号量歪みDと符号量Rとを算出して,ラグランジュ乗数λをもとにD+λRを最小にする符号化シンタックスを決定する動画像符号化装置において,
各符号化対象データごとに,複数の量子化パラメータ値の候補を決定する量子化パラメータ値の候補選出手段と,
同一のラグランジュ乗数λに対し,前記複数の量子化パラメータ値の候補を含む符号化モードの中からD+λRを最小にする符号化モードと量子化パラメータ値を選択し,符号化対象データを符号化する符号化および評価手段と,
前記量子化パラメータ値の候補を決定する契機とは独立に,所定数の符号化対象データを符号化した契機または各符号化対象データ当たりの発生符号量の平均値と目標平均符号量との差が所定の値を超えた契機で,前記ラグランジュ乗数λを更新するラグランジュ乗数の評価・変更手段とを備え,
前記ラグランジュ乗数の評価・変更手段は,ラグランジュ乗数λを更新する毎に,そのラグランジュ乗数λと,そのラグランジュ乗数λの値で符号化した範囲における発生符号量または符号化対象データ毎の平均符号量との関係を示す情報を順次保持し,次回ラグランジュ乗数λを更新する際に,保持したラグランジュ乗数λと符号量との関係を示す情報を基にラグランジュ乗数λを更新する
ことを特徴とする動画像符号化装置。
In a video encoding device that calculates a code amount distortion D and a code amount R and determines an encoding syntax that minimizes D + λR based on a Lagrange multiplier λ,
A quantization parameter value candidate selection means for determining a plurality of quantization parameter value candidates for each encoding target data;
For the same Lagrangian multiplier λ, a coding mode and a quantization parameter value that minimizes D + λR are selected from the coding modes including the plurality of quantization parameter value candidates, and the data to be encoded is encoded. Encoding and evaluation means;
Independent of the opportunity to determine the quantization parameter value candidate, the difference between the opportunity to encode a predetermined number of encoding target data or the average value of the generated code amount for each encoding target data and the target average code amount in opportunity but exceeds a predetermined value, Bei example an evaluation-changing means Lagrangian multiplier updating the Lagrangian multiplier lambda,
The Lagrangian multiplier evaluating / changing means updates the Lagrange multiplier λ every time the Lagrange multiplier λ is updated, and the generated code amount in the range encoded with the value of the Lagrange multiplier λ or the average code amount for each encoding target data The information indicating the relationship between the Lagrangian multiplier λ is updated and the Lagrange multiplier λ is updated based on the information indicating the relationship between the Lagrange multiplier λ and the code amount when the Lagrange multiplier λ is updated next time. Image encoding device.
符号量歪みDと符号量Rとを算出して,ラグランジュ乗数λをもとにD+λRを最小にする符号化シンタックスを決定する動画像符号化装置において,In a video encoding device that calculates a code amount distortion D and a code amount R and determines an encoding syntax that minimizes D + λR based on a Lagrange multiplier λ,
各符号化対象データごとに,複数の量子化パラメータ値の候補を決定する量子化パラメータ値の候補選出手段と,A quantization parameter value candidate selection means for determining a plurality of quantization parameter value candidates for each encoding target data;
同一のラグランジュ乗数λに対し,複数の動きベクトルの候補および前記複数の量子化パラメータ値の候補を含む符号化モードの中からD+λRを最小にする符号化モードと量子化パラメータ値と動きベクトルとを選択し,符号化対象データを符号化する符号化および評価手段と,For the same Lagrange multiplier λ, an encoding mode, a quantization parameter value, and a motion vector that minimize D + λR are selected from among a plurality of motion vector candidates and a plurality of quantization parameter value candidates. An encoding and evaluation means for selecting and encoding the data to be encoded;
前記量子化パラメータ値の候補を決定する契機とは独立に,所定数の符号化対象データを符号化した契機または各符号化対象データ当たりの発生符号量の平均値と目標平均符号量との差が所定の値を超えた契機で,前記ラグランジュ乗数λを更新するラグランジュ乗数の評価・変更手段とを備え,Independent of the opportunity to determine the quantization parameter value candidate, the difference between the opportunity to encode a predetermined number of encoding target data or the average value of the generated code amount for each encoding target data and the target average code amount And a Lagrange multiplier evaluating / changing means for updating the Lagrange multiplier λ when the value exceeds a predetermined value,
前記ラグランジュ乗数の評価・変更手段は,ラグランジュ乗数λを更新する毎に,そのラグランジュ乗数λと,そのラグランジュ乗数λの値で符号化した範囲における発生符号量または符号化対象データ毎の平均符号量との関係を示す情報を順次保持し,次回ラグランジュ乗数λを更新する際に,保持したラグランジュ乗数λと符号量との関係を示す情報を基にラグランジュ乗数λを更新するEach time the Lagrange multiplier λ is updated, the Lagrange multiplier evaluating / changing means generates the Lagrange multiplier λ and the generated code amount in the range encoded with the value of the Lagrange multiplier λ or the average code amount for each encoding target data Information indicating the relationship between the Lagrangian multiplier λ is updated and the Lagrange multiplier λ is updated based on the information indicating the relationship between the held Lagrange multiplier λ and the code amount.
ことを特徴とする動画像符号化装置。A moving picture coding apparatus characterized by the above.
符号量歪みDと符号量Rとを算出して,ラグランジュ乗数λをもとにD+λRを最小にする符号化シンタックスを決定する動画像符号化装置において,In a video encoding device that calculates a code amount distortion D and a code amount R and determines an encoding syntax that minimizes D + λR based on a Lagrange multiplier λ,
各符号化対象データごとに,複数の量子化パラメータ値の候補を決定する量子化パラメータ値の候補選出手段と,A quantization parameter value candidate selection means for determining a plurality of quantization parameter value candidates for each encoding target data;
同一のラグランジュ乗数λに対し,前記複数の量子化パラメータ値の候補を含む符号化モードの中からD+λRを最小にする符号化モードと量子化パラメータ値を選択し,符号化対象データを符号化する符号化および評価手段と,For the same Lagrangian multiplier λ, a coding mode and a quantization parameter value that minimizes D + λR are selected from the coding modes including the plurality of quantization parameter value candidates, and the data to be encoded is encoded. Encoding and evaluation means;
前記量子化パラメータ値の候補を決定する契機とは独立に,所定数の符号化対象データを符号化した契機または各符号化対象データ当たりの発生符号量の平均値と目標平均符号量との差が所定の値を超えた契機で,前記ラグランジュ乗数λを更新するラグランジュ乗数の評価・変更手段とを備え,Independent of the opportunity to determine the quantization parameter value candidate, the difference between the opportunity to encode a predetermined number of encoding target data or the average value of the generated code amount for each encoding target data and the target average code amount And a Lagrange multiplier evaluating / changing means for updating the Lagrange multiplier λ when the value exceeds a predetermined value,
前記ラグランジュ乗数の評価・変更手段は,ラグランジュ乗数λを更新する毎に,ラグランジュ乗数λと,そのラグランジュ乗数λの値で符号化した範囲における符号化対象データ毎の平均符号量RThe Lagrangian multiplier evaluating / changing means updates the Lagrange multiplier λ every time the Lagrange multiplier λ is updated, and an average code amount R for each encoding target data in a range encoded with the value of the Lagrange multiplier λ. ave ave と,その平均符号量RAnd the average code amount R ave ave と平均量子化パラメータ値の積で定義される符号化対象データの平均の複雑さ指標XThe average complexity index X of the encoding target data defined by the product of the average quantization parameter value ave ave との組(λ,R(Λ, R ave ave ,X, X ave ave )を順次保持し,次回ラグランジュ乗数λを更新する際に,保持した(λ,R) In order, and the next time the Lagrange multiplier λ is updated (λ, R ave ave ,X, X ave ave )の関係を基にラグランジュ乗数λを更新する) To update Lagrange multiplier λ
ことを特徴とする動画像符号化装置。A moving picture coding apparatus characterized by the above.
符号量歪みDと符号量Rとを算出して,ラグランジュ乗数λをもとにD+λRを最小にする符号化シンタックスを決定する動画像符号化装置において,In a video encoding device that calculates a code amount distortion D and a code amount R and determines an encoding syntax that minimizes D + λR based on a Lagrange multiplier λ,
各符号化対象データごとに,複数の量子化パラメータ値の候補を決定する量子化パラメータ値の候補選出手段と,A quantization parameter value candidate selection means for determining a plurality of quantization parameter value candidates for each encoding target data;
同一のラグランジュ乗数λに対し,複数の動きベクトルの候補および前記複数の量子化パラメータ値の候補を含む符号化モードの中からD+λRを最小にする符号化モードと量子化パラメータ値と動きベクトルとを選択し,符号化対象データを符号化する符号化および評価手段と,For the same Lagrange multiplier λ, an encoding mode, a quantization parameter value, and a motion vector that minimize D + λR are selected from among a plurality of motion vector candidates and a plurality of quantization parameter value candidates. An encoding and evaluation means for selecting and encoding the data to be encoded;
前記量子化パラメータ値の候補を決定する契機とは独立に,所定数の符号化対象データを符号化した契機または各符号化対象データ当たりの発生符号量の平均値と目標平均符号量との差が所定の値を超えた契機で,前記ラグランジュ乗数λを更新するラグランジュ乗数の評価・変更手段とを備え,Independent of the opportunity to determine the quantization parameter value candidate, the difference between the opportunity to encode a predetermined number of encoding target data or the average value of the generated code amount for each encoding target data and the target average code amount And a Lagrange multiplier evaluating / changing means for updating the Lagrange multiplier λ when the value exceeds a predetermined value,
前記ラグランジュ乗数の評価・変更手段は,ラグランジュ乗数λを更新する毎に,ラグランジュ乗数λと,そのラグランジュ乗数λの値で符号化した範囲における符号化対象データ毎の平均符号量RThe Lagrangian multiplier evaluating / changing means updates the Lagrange multiplier λ every time the Lagrange multiplier λ is updated, and an average code amount R for each encoding target data in a range encoded with the value of the Lagrange multiplier λ. ave ave と,その平均符号量RAnd the average code amount R ave ave と平均量子化パラメータ値の積で定義される符号化対象データの平均の複雑さ指標XThe average complexity index X of the encoding target data defined by the product of the average quantization parameter value ave ave との組(λ,R(Λ, R ave ave ,X, X ave ave )を順次保持し,次回ラグランジュ乗数λを更新する際に,保持した(λ,R) In order, and the next time the Lagrange multiplier λ is updated (λ, R ave ave ,X, X ave ave )の関係を基にラグランジュ乗数λを更新する) To update Lagrange multiplier λ
ことを特徴とする動画像符号化装置。A moving picture coding apparatus characterized by the above.
請求項8または請求項9記載の動画像符号化装置において,In the moving image encoding device according to claim 8 or 9,
前記ラグランジュ乗数の評価・変更手段は,ラグランジュ乗数λを更新する毎に,ラグランジュ乗数λと,そのラグランジュ乗数λの値で符号化した範囲における符号化対象データ毎の平均符号量RThe Lagrangian multiplier evaluating / changing means updates the Lagrange multiplier λ every time the Lagrange multiplier λ is updated, and an average code amount R for each encoding target data in a range encoded with the value of the Lagrange multiplier λ. ave ave と,その平均符号量RAnd the average code amount R ave ave と平均量子化パラメータ値の積で定義される符号化対象データの平均の複雑さ指標XThe average complexity index X of the encoding target data defined by the product of the average quantization parameter value ave ave との前記保持された(λ,RAnd held (λ, R ave ave ,X, X ave ave )の組から,ラグランジュ乗数λがX), The Lagrange multiplier λ is X ave ave /(R/ (R ave ave ) 2 2 に比例するモデル式に基づいてラグランジュ乗数λを更新するUpdate Lagrange multiplier λ based on a model equation proportional to
ことを特徴とする動画像符号化装置。A moving picture coding apparatus characterized by the above.
請求項1から請求項までのいずれか1項に記載の動画像符号化方法を,コンピュータに実行させるための動画像符号化プログラム。 A moving picture coding program for causing a computer to execute the moving picture coding method according to any one of claims 1 to 5 . 請求項1から請求項までのいずれか1項に記載の動画像符号化方法を,コンピュータに実行させるための動画像符号化プログラムを記録したコンピュータ読み取り可能な記録媒体。 A computer-readable recording medium having recorded thereon a moving image encoding program for causing a computer to execute the moving image encoding method according to any one of claims 1 to 5 .
JP2004168437A 2004-06-07 2004-06-07 Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium recording the program Expired - Fee Related JP4188878B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004168437A JP4188878B2 (en) 2004-06-07 2004-06-07 Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium recording the program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004168437A JP4188878B2 (en) 2004-06-07 2004-06-07 Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium recording the program

Publications (2)

Publication Number Publication Date
JP2005348310A JP2005348310A (en) 2005-12-15
JP4188878B2 true JP4188878B2 (en) 2008-12-03

Family

ID=35500227

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004168437A Expired - Fee Related JP4188878B2 (en) 2004-06-07 2004-06-07 Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium recording the program

Country Status (1)

Country Link
JP (1) JP4188878B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9008171B2 (en) 2008-01-08 2015-04-14 Qualcomm Incorporated Two pass quantization for CABAC coders
US8891615B2 (en) 2008-01-08 2014-11-18 Qualcomm Incorporated Quantization based on rate-distortion modeling for CABAC coders
JP5426506B2 (en) * 2010-09-06 2014-02-26 日本電信電話株式会社 Adaptive quantization method, adaptive quantization apparatus, and adaptive quantization program
WO2016194380A1 (en) * 2015-06-03 2016-12-08 日本電気株式会社 Moving image coding device, moving image coding method and recording medium for storing moving image coding program

Also Published As

Publication number Publication date
JP2005348310A (en) 2005-12-15

Similar Documents

Publication Publication Date Title
JP4898467B2 (en) Coding mode determination method and apparatus for variable block size motion prediction
JP4885486B2 (en) Image encoding and decoding
US20160330473A1 (en) Picture encoding method, picture decoding method, picture encoding apparatus, picture decoding apparatus, picture encoding program, and picture decoding program
US7924918B2 (en) Temporal prediction in video coding
JP5310614B2 (en) Moving picture coding apparatus, moving picture coding method, moving picture decoding apparatus, and moving picture decoding method
JP4764136B2 (en) Moving picture coding apparatus and fade scene detection apparatus
JP4573438B2 (en) Video coding
JP2011512047A (en) Method and apparatus for performing lower complexity multi-bitrate video encoding using metadata
US8462849B2 (en) Reference picture selection for sub-pixel motion estimation
CN108174204B (en) Decision tree-based inter-frame rapid mode selection method
JPWO2007105590A1 (en) Moving picture encoding method, and apparatus and program using the same
JPWO2017122604A1 (en) Moving picture coding apparatus, moving picture coding method, and storage medium storing moving picture coding program
JP4677932B2 (en) Moving picture coding method, moving picture coding apparatus, program, and medium
EP4262203A1 (en) Method and apparatus for video predictive coding
CN107295336B (en) Adaptive fast coding dividing elements method and device based on image correlation
JP4227067B2 (en) Moving picture coding method, apparatus and program
JP2005260588A (en) Encoding device, encoding method, decoding device and decoding method
JP2005348280A (en) Image encoding method, image encoding apparatus, image encoding program, and computer readable recording medium recorded with the program
JP5566786B2 (en) Error absolute value sum estimation system and estimation method
CN112004091B (en) Inter-frame prediction method and related device thereof
JP4188878B2 (en) Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium recording the program
KR20170126934A (en) Content-Adaptive B-Picture Pattern Video Encoding
JP2011091772A (en) Image encoder
JP2002247584A (en) Method and device for encoding image, program for image encoding processing, and recording medium for the program
JP2002199398A (en) Variable bit rate moving image encoding device and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060808

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080605

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080617

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080811

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080811

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 4188878

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110919

Year of fee payment: 3

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: R3D02

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

Free format text: PAYMENT UNTIL: 20120919

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130919

Year of fee payment: 5

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees