JPH10164577A - Video encoding device - Google Patents
Video encoding deviceInfo
- Publication number
- JPH10164577A JPH10164577A JP31721196A JP31721196A JPH10164577A JP H10164577 A JPH10164577 A JP H10164577A JP 31721196 A JP31721196 A JP 31721196A JP 31721196 A JP31721196 A JP 31721196A JP H10164577 A JPH10164577 A JP H10164577A
- Authority
- JP
- Japan
- Prior art keywords
- screen
- complexity
- target
- code amount
- quantization width
- 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
Links
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
(57)【要約】
【課題】 動画像をリアルタイムで可変レート符号化す
ることができる動画像符号化装置を提供することを目的
とする。
【解決手段】 本発明による動画像符号化装置100
は、動画像を符号化する際に、画面内の発生符号量と画
面内の量子化幅の平均値とを乗じた値を画面複雑度とし
て求め、過去の画面複雑度の平均値に対する現在の画面
複雑度の割合を基に、画面の目標発生符号量または目標
量子化幅を決定し、その目標発生符号量または目標量子
化幅を用いて画面の符号化または量子化を行うようにし
たものである。
(57) [Summary] An object of the present invention is to provide a moving picture coding apparatus capable of performing variable rate coding of a moving picture in real time. SOLUTION: A moving picture coding apparatus 100 according to the present invention.
When encoding a moving image, a value obtained by multiplying the generated code amount in the screen by the average value of the quantization width in the screen is determined as the screen complexity, and the current value with respect to the average value of the past screen complexity is calculated. A target code amount or a target quantization width of a screen is determined based on the ratio of the screen complexity, and the coding or quantization of the screen is performed using the target code amount or the target quantization width. It is.
Description
【0001】[0001]
【発明の属する技術分野】本発明は動画像符号化装置に
関し、特にリアルタイムに可変レート符号化を行うこと
のできる動画像符号化装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a moving picture coding apparatus, and more particularly to a moving picture coding apparatus capable of performing variable rate coding in real time.
【0002】[0002]
【従来の技術】近年、動画像の高能率符号化方法として
MPEG2方式が広く用いられている。MPEG2方式
では、画面を16×16画素のマクロブロックに分割
し、そのマクロブロックをさらに8×8画素のブロック
に分割する。そして各ブロック毎に離散コサイン変換を
施して、離散コサイン変換係数を求める。得られた離散
コサイン変換係数を、量子化幅と各周波数成分に対応し
た8×8の量子化行列とで除算することにより、離散コ
サイン変換係数を量子化する。量子化された離散コサイ
ン変換係数は、可変長符号化を施されて符号列となる。
量子化における量子化幅は、マクロブロック単位で変更
することができ、これにより発生符号量を制御すること
ができる。MPEG2 TEST MODEL3におけ
る発生符号量を制御する方法には、GOP単位で発生符
号量を一定にする固定レート方法が提案されている。2. Description of the Related Art In recent years, the MPEG2 system has been widely used as a highly efficient coding method for moving images. In the MPEG2 system, a screen is divided into macroblocks of 16 × 16 pixels, and the macroblocks are further divided into blocks of 8 × 8 pixels. Then, a discrete cosine transform is performed for each block to obtain a discrete cosine transform coefficient. The discrete cosine transform coefficient is quantized by dividing the obtained discrete cosine transform coefficient by a quantization width and an 8 × 8 quantization matrix corresponding to each frequency component. The quantized discrete cosine transform coefficients are subjected to variable-length coding to form a code sequence.
The quantization width in the quantization can be changed for each macroblock, whereby the generated code amount can be controlled. As a method of controlling the generated code amount in the MPEG2 TEST MODEL3, a fixed rate method for making the generated code amount constant in GOP units has been proposed.
【0003】この従来の固定レート符号化装置では、動
きの小さい動画像(情報量が少ない)に割り当てる符号
量と、動きの大きい動画像や複雑な動画像(情報量が多
い)に割り当てる符号量は同じである。そのため、設定
レートが低い場合には、情報量の多い画像に視覚的な画
質劣化が生じてしまっていた。この画質劣化は、設定レ
ートを高くすることにより解決されるが、しかし、情報
量の少ない画像に対しては割り当てた符号量に無駄が多
くなり、例えば記録媒体に符号列を記録するような場合
に記録時間が短くなってしまうというような問題点が生
じた。In this conventional fixed-rate encoding apparatus, the code amount allocated to a moving image with a small motion (the amount of information is small) and the code amount allocated to a moving image with a large motion or a complex moving image (a large amount of information). Is the same. Therefore, when the set rate is low, an image with a large amount of information is visually deteriorated in image quality. This degradation in image quality can be solved by increasing the set rate. However, for an image with a small amount of information, the allocated code amount becomes wasteful, for example, when a code string is recorded on a recording medium. However, there is a problem that the recording time is shortened.
【0004】以上のような問題点を解決するために、特
開平6−141298号公報では、単位時間毎に設定レ
ートを制御して動画像の全符号量が所定値になるように
発生符号量の制御を行うことにより、画質を向上させる
可変ビットレート符号化装置が提案されている。この従
来の可変ビットレート符号化装置では、同じ入力画像に
対して2回の符号化を行う。まず、入力画像の1回目の
符号化(仮符号化)を、固定の量子化幅を用いて行う。
仮符号化により生成された符号列は、単位時間毎に発生
符号量が計数されて仮転送レートとして記憶される。そ
して、入力画像の全符号量が所定値となるように、単位
時間毎に計数された仮転送レートから目標転送レートを
設定する。次に、入力画像の2回目の符号化(実符号
化)を、各単位時間毎の目標転送レートに合うように発
生符号量を制御しながら行う。In order to solve the above-mentioned problems, Japanese Patent Laid-Open Publication No. Hei 6-141298 discloses a method of controlling a set rate for each unit time so that the total code amount of a moving image becomes a predetermined value. , A variable bit rate encoding device that improves the image quality has been proposed. In this conventional variable bit rate encoding device, the same input image is encoded twice. First, the first encoding (temporary encoding) of an input image is performed using a fixed quantization width.
In the code sequence generated by the provisional encoding, the generated code amount is counted for each unit time and stored as a provisional transfer rate. Then, the target transfer rate is set from the provisional transfer rates counted per unit time so that the total code amount of the input image becomes a predetermined value. Next, the second encoding (actual encoding) of the input image is performed while controlling the generated code amount so as to match the target transfer rate for each unit time.
【0005】[0005]
【発明が解決しようとする課題】しかしながら、上記従
来の可変ビットレート符号化装置では、符号列を得るた
めに2回の符号化動作を行わなければならず、このた
め、少なくとも動画像の全時間長の2倍の時間が必要と
なり、また、動画像のすべてを一度仮符号化しなければ
実符号化を行えないために、リアルタイム性を要求され
るような場合にはこの可変ビットレート符号化装置を使
用できないという課題があった。However, in the above-mentioned conventional variable bit rate coding apparatus, two coding operations must be performed in order to obtain a code string. This variable bit rate encoding device requires twice the length of the video and cannot perform actual encoding unless all of the moving image is provisionally encoded once. There was a problem that cannot be used.
【0006】本発明は、上記のような状況を鑑みてなさ
れたものであり、動画像をリアルタイムに可変ビットレ
ート符号化することのできる動画像符号化装置を提供す
ることを目的とする。SUMMARY OF THE INVENTION The present invention has been made in view of the above situation, and has as its object to provide a moving picture coding apparatus capable of performing variable bit rate coding of a moving picture in real time.
【0007】[0007]
【課題を解決するための手段】上記課題を解決するため
に、本発明の請求項1にかかる動画像符号化装置は、複
数の画面からなる動画像の該各画面を複数のブロックに
分割するブロック変換手段と、上記ブロック変換手段に
より分割された上記各画面の複数のブロックを、それぞ
れ係数に変換する画像変換手段と、上記画像変換手段に
より変換された上記各画面の複数のブロックの係数を、
量子化幅を用いて量子化する量子化手段と、上記量子化
手段により量子化された上記各画面の複数のブロックの
係数から、上記各画面の符号列を生成する符号列生成手
段と、上記符号列生成手段により生成された上記各画面
の符号列から、上記各画面内の発生符号量を計数する符
号量計数手段と、上記量子化手段で用いた量子化幅の平
均値を求める平均値演算手段と、上記符号量計数手段に
より計数された発生符号量と上記平均値演算手段により
演算された量子化幅の平均値とを乗じた値を上記各画面
の画面複雑度として演算する複雑度演算手段と、上記複
雑度演算手段により演算された過去の画面の平均画面複
雑度を求め、該過去の画面の平均画面複雑度に対する上
記複雑度演算手段により演算された現在の画面の画面複
雑度の割合を求め、その割合から次の画面の目標発生符
号量を決定し、該目標発生符号量を用いて次の画面の量
子化幅を求め、該量子化幅を上記量子化手段に出力する
目標符号量決定手段と、を具備することを特徴とする動
画像符号化装置である。According to a first aspect of the present invention, there is provided a moving picture coding apparatus which divides each screen of a moving picture including a plurality of screens into a plurality of blocks. Block conversion means, image conversion means for converting a plurality of blocks of each screen divided by the block conversion means into coefficients, and coefficients of a plurality of blocks of each screen converted by the image conversion means. ,
Quantizing means for quantizing using a quantization width; code string generating means for generating a code string for each screen from coefficients of a plurality of blocks of each screen quantized by the quantization means; A code amount counting means for counting the generated code amount in each screen from the code string of each screen generated by the code string generation means, and an average value for obtaining an average value of a quantization width used in the quantization means. Arithmetic means, and a complexity of calculating a value obtained by multiplying the generated code amount counted by the code amount counting means by the average value of the quantization width calculated by the average value calculating means as the screen complexity of each screen. Calculating means for calculating the average screen complexity of the past screen calculated by the complexity calculating means, and calculating the screen complexity of the current screen calculated by the complexity calculating means with respect to the average screen complexity of the past screen Find the percentage of A target code amount determining means for determining a target code amount of the next screen from the ratio, obtaining a quantization width of the next screen using the target code amount, and outputting the quantization width to the quantization means. And a moving picture coding apparatus characterized by comprising:
【0008】また、本発明の請求項2にかかる動画像符
号化装置は、請求項1記載の動画像符号化装置におい
て、上記目標符号量決定手段は、画面のピクチャタイプ
(Iピクチャ,Pピクチャ,Bピクチャ)のそれぞれに
つき、第1の過去の画面の平均画面複雑度から単位時間
あたりの第2の過去の画面の平均画面複雑度を求め、第
1の現在の画面の画面複雑度及び第1の過去の該現在の
画面以外の2つの画面の画面複雑度から、単位時間あた
りの第2の現在の画面の画面複雑度を求め、上記第2の
過去の画面の平均画面複雑度に対する上記第2の現在の
画面の画面複雑度の割合から次の画面の目標発生符号量
を決定し、該目標発生符号量を用いて次の画面の量子化
幅を求め、該量子化幅を上記量子化手段に出力するもの
であることを特徴とする動画像符号化装置である。According to a second aspect of the present invention, in the moving image encoding apparatus according to the first aspect, the target code amount determining means includes a picture type (I picture, P picture) of a screen. , B picture), the average screen complexity of the second past screen per unit time is calculated from the average screen complexity of the first past screen, and the screen complexity of the first current screen and the second screen The screen complexity of a second current screen per unit time is determined from the screen complexity of two screens other than the current screen of one past, and the above-mentioned average screen complexity of the second past screen is calculated. A target generated code amount for the next screen is determined from the ratio of the screen complexity of the second current screen, and a quantization width of the next screen is obtained using the target generated code amount. Output to the conversion means That is a moving picture coding apparatus.
【0009】また、本発明の請求項3にかかる動画像符
号化装置は、請求項1記載の動画像符号化装置におい
て、上記動画像符号化装置は、所定の目標平均符号化レ
ートと上記符号量計数手段により計数された発生符号量
とから割り当て可能符号残量を求め、その割り当て可能
符号残量を保持する仮想バッファ手段を具備したもので
あり、上記目標符号量決定手段は、画面のピクチャタイ
プ(Iピクチャ,Pピクチャ,Bピクチャ)のそれぞれ
につき、第1の過去の画面の平均画面複雑度から単位時
間あたりの第2の過去の画面の平均画面複雑度を求め、
第1の現在の画面の画面複雑度及び第1の過去の該現在
の画面以外の2つの画面の画面複雑度から、単位時間あ
たりの第2の現在の画面の画面複雑度を求め、上記第2
の過去の画面の平均画面複雑度に対する上記第2の現在
の画面の画面複雑度の割合と上記仮想バッファに保持さ
れた単位時間あたりの割り当て可能符号残量との比率か
ら次の画面の目標発生符号量を決定し、該目標発生符号
量を用いて次の画面の量子化幅を求め、該量子化幅を上
記量子化手段に出力するものであることを特徴とする動
画像符号化装置である。According to a third aspect of the present invention, there is provided the moving picture coding apparatus according to the first aspect, wherein the moving picture coding apparatus includes a predetermined target average coding rate and the predetermined code. Virtual buffer means for obtaining the allocatable code remaining amount from the generated code amount counted by the amount counting means and holding the allocatable code remaining amount, wherein the target code amount determining means comprises a picture For each type (I picture, P picture, B picture), the average screen complexity of the second past screen per unit time is determined from the average screen complexity of the first past screen,
The screen complexity of the second current screen per unit time is obtained from the screen complexity of the first current screen and the screen complexity of two screens other than the current screen of the first past, and 2
Target generation of the next screen from the ratio of the screen complexity of the second current screen to the average screen complexity of the previous screen and the remaining allocable code per unit time held in the virtual buffer. Determining a code amount, obtaining a quantization width of the next screen using the target generated code amount, and outputting the quantization width to the quantization means. is there.
【0010】また、本発明の請求項4にかかる動画像符
号化装置は、複数の画面からなる動画像の該各画面を複
数のブロックに分割するブロック変換手段と、上記ブロ
ック変換手段により分割された上記各画面の複数のブロ
ックを、それぞれ係数に変換する画像変換手段と、上記
画像変換手段により変換された上記各画面の複数のブロ
ックの係数を、量子化幅を用いて量子化する量子化手段
と、上記量子化手段により量子化された上記各画面の複
数のブロックの係数から、上記各画面の符号列を生成す
る符号列生成手段と、上記符号列生成手段により生成さ
れた上記各画面の符号列から、上記各画面内の発生符号
量を計数する符号量計数手段と、上記量子化手段で用い
た量子化幅の平均値を求める平均値演算手段と、上記符
号量計数手段により計数された発生符号量と上記平均値
演算手段により演算された量子化幅の平均値とを乗じた
値を上記各画面の画面複雑度として演算する複雑度演算
手段と、上記複雑度演算手段により演算された過去の画
面の平均画面複雑度を求め、該過去の画面の平均画面複
雑度に対する上記複雑度演算手段により演算された現在
の画面の画面複雑度の割合を求め、その割合から次の画
面の目標量子化幅を決定し、該目標量子化幅を上記量子
化手段に出力する目標量子化幅決定手段と、を具備する
ことを特徴とする動画像符号化装置である。According to a fourth aspect of the present invention, there is provided a moving picture coding apparatus comprising: a block converting means for dividing each picture of a moving picture comprising a plurality of pictures into a plurality of blocks; Image conversion means for converting the plurality of blocks of each screen into coefficients, respectively, and quantizing the coefficients of the plurality of blocks of each screen converted by the image conversion means using a quantization width. Means, code string generating means for generating a code string of each screen from coefficients of a plurality of blocks of each screen quantized by the quantization means, and each of the screens generated by the code string generating means A code amount counting means for counting the generated code amount in each screen, an average value calculating means for obtaining an average value of the quantization width used by the quantization means, and a code amount counting means. A complexity calculating means for calculating a value obtained by multiplying the counted generated code amount by an average value of the quantization width calculated by the average value calculating means as the screen complexity of each screen; and The calculated average screen complexity of the past screen is calculated, and the ratio of the screen complexity of the current screen calculated by the complexity calculating means to the average screen complexity of the past screen is calculated. A moving image encoding apparatus comprising: a target quantization width determining unit that determines a target quantization width of a screen and outputs the target quantization width to the quantization unit.
【0011】また、本発明の請求項5にかかる動画像符
号化装置は、請求項4記載の動画像符号化装置におい
て、上記目標量子化幅決定手段は、画面のピクチャタイ
プ(Iピクチャ,Pピクチャ,Bピクチャ)のそれぞれ
につき、第1の過去の画面の平均画面複雑度から単位時
間あたりの第2の過去の画面の平均画面複雑度を求め、
第1の現在の画面の画面複雑度及び第1の過去の該現在
の画面以外の2つの画面の画面複雑度から、単位時間あ
たりの第2の現在の画面の画面複雑度を求め、上記第2
の過去の画面の平均画面複雑度に対する上記第2の現在
の画面の画面複雑度の割合から次の画面の目標量子化幅
を決定し、該目標量子化幅を上記量子化手段に出力する
ものであることを特徴とする動画像符号化装置である。According to a fifth aspect of the present invention, in the moving picture encoding apparatus according to the fourth aspect, the target quantization width determining means includes a picture type (I picture, P picture) of a screen. Picture, B picture), the average screen complexity of the second past screen per unit time is calculated from the average screen complexity of the first past screen,
The screen complexity of the second current screen per unit time is obtained from the screen complexity of the first current screen and the screen complexity of two screens other than the current screen of the first past, and 2
Determining the target quantization width of the next screen from the ratio of the screen complexity of the second current screen to the average screen complexity of the past screen, and outputting the target quantization width to the quantization means. A moving image encoding apparatus.
【0012】また、本発明の請求項6にかかる動画像符
号化装置は、請求項4記載の動画像符号化装置におい
て、上記動画像符号化装置は、所定の目標平均符号化レ
ートと上記符号量計数手段により計数された発生符号量
とから割り当て可能符号残量を求め、その割り当て可能
符号残量を保持する仮想バッファ手段を具備したもので
あり、上記目標量子化幅決定手段は、画面のピクチャタ
イプ(Iピクチャ,Pピクチャ,Bピクチャ)のそれぞ
れにつき、第1の過去の画面の平均画面複雑度から単位
時間あたりの第2の過去の画面の平均画面複雑度を求
め、第1の現在の画面の画面複雑度及び第1の過去の該
現在の画面以外の2つの画面の画面複雑度から、単位時
間あたりの第2の現在の画面の画面複雑度を求め、上記
第2の過去の画面の平均画面複雑度に対する上記第2の
現在の画面の画面複雑度の割合と上記仮想バッファに保
持された単位時間あたりの割り当て可能符号残量との比
率から次の画面の目標量子化幅を決定し、該目標量子化
幅を上記量子化手段に出力するものであることを特徴と
する動画像符号化装置である。According to a sixth aspect of the present invention, there is provided the moving picture coding apparatus according to the fourth aspect, wherein the moving picture coding apparatus comprises a predetermined target average coding rate and the predetermined code. The apparatus further comprises virtual buffer means for obtaining the allocatable code remaining amount from the generated code amount counted by the amount counting means and holding the allocatable code remaining amount. For each picture type (I picture, P picture, B picture), the average screen complexity of the second past screen per unit time is calculated from the average screen complexity of the first past screen, and the first current The screen complexity of the second current screen per unit time is obtained from the screen complexity of the second screen and the screen complexity of two screens other than the current screen of the first past, and Screen flat Determining a target quantization width of the next screen from the ratio of the screen complexity of the second current screen to the screen complexity and the remaining amount of codes that can be allocated per unit time held in the virtual buffer; A moving picture coding apparatus characterized in that said target quantization width is output to said quantization means.
【0013】また、本発明の請求項7にかかる動画像符
号化装置は、請求項1ないし3のいずれかに記載の動画
像符号化装置において、上記目標符号量決定手段により
決定された目標発生符号量を、現在の画面に対する目標
発生符号量とすることを特徴とする動画像符号化装置で
ある。According to a seventh aspect of the present invention, there is provided the moving picture coding apparatus according to any one of the first to third aspects, wherein the target generation determined by the target code amount determining means is performed. A moving image encoding apparatus characterized in that the code amount is a target generated code amount for a current screen.
【0014】また、本発明の請求項8にかかる動画像符
号化装置は、請求項4ないし6のいずれかに記載の動画
像符号化装置において、上記目標量子化幅決定手段によ
り決定された目標量子化幅を、現在の画面に対する目標
量子化幅とすることを特徴とする動画像符号化装置であ
る。According to an eighth aspect of the present invention, there is provided a video encoding apparatus according to any one of the fourth to sixth aspects, wherein the target quantization width determined by the target quantization width determining means is selected. A moving image encoding apparatus characterized in that a quantization width is a target quantization width for a current screen.
【0015】また、本発明の請求項9にかかる動画像符
号化装置は、請求項1ないし3のいずれかに記載の動画
像符号化装置において、上記目標符号量決定手段により
決定された目標発生符号量に対して、上限値と下限値を
設定することを特徴とする動画像符号化装置である。According to a ninth aspect of the present invention, there is provided the moving picture coding apparatus according to any one of the first to third aspects, wherein the target generation amount determined by the target code amount determining means is used. A moving image encoding apparatus characterized in that an upper limit and a lower limit are set for a code amount.
【0016】また、本発明の請求項10にかかる動画像
符号化装置は、請求項4ないし6のいずれかに記載の動
画像符号化装置において、上記目標量子化幅決定手段に
より決定された目標量子化幅に対して、上限値と下限値
を設定することを特徴とする動画像符号化装置である。According to a tenth aspect of the present invention, in the moving image encoding apparatus according to any one of the fourth to sixth aspects, the target image determined by the target quantization width determining means is provided. A moving picture coding apparatus characterized in that an upper limit value and a lower limit value are set for a quantization width.
【0017】また、本発明の請求項11にかかる動画像
符号化装置は、請求項4ないし6のいずれかに記載の動
画像符号化装置において、画面のピクチャタイプ(Iピ
クチャ,Pピクチャ,Bピクチャ)のそれぞれにつき、
上記目標量子化幅決定手段により決定された目標量子化
幅に対して所定の係数を乗じ、その値を上記目標量子化
幅とすることを特徴とする動画像符号化装置である。[0017] Further, according to an eleventh aspect of the present invention, in the video encoding apparatus according to any one of the fourth to sixth aspects, the picture type (I picture, P picture, B picture Picture)
A moving picture encoding apparatus characterized in that the target quantization width determined by the target quantization width determination means is multiplied by a predetermined coefficient, and the value is used as the target quantization width.
【0018】また、本発明の請求項12にかかる動画像
符号化装置は、請求項1ないし3のいずれかに記載の動
画像符号化装置において、上記過去の画面複雑度の平均
値を得るための過去の画面数は、画面のピクチャタイプ
(Iピクチャ,Pピクチャ,Bピクチャ)の各々に対し
て、一定値であることを特徴とする動画像符号化装置で
ある。According to a twelfth aspect of the present invention, in the moving picture coding apparatus according to any one of the first to third aspects, the moving picture coding apparatus obtains the average value of the past screen complexity. Is a constant value for each of the picture types of the screen (I picture, P picture, B picture).
【0019】また、本発明の請求項13にかかる動画像
符号化装置は、請求項4ないし6のいずれかに記載の動
画像符号化装置において、上記過去の画面複雑度の平均
値を得るための過去の画面数は、画面のピクチャタイプ
(Iピクチャ,Pピクチャ,Bピクチャ)の各々に対し
て、一定値であることを特徴とする動画像符号化装置で
ある。According to a thirteenth aspect of the present invention, in the moving picture coding apparatus according to any one of the fourth to sixth aspects, the moving picture coding apparatus obtains the average value of the past screen complexity. Is a constant value for each of the picture types of the screen (I picture, P picture, B picture).
【0020】また、本発明の請求項14にかかる動画像
符号化装置は、請求項1に記載の動画像符号化装置にお
いて、上記目標発生符号量決定手段により決定された目
標発生符号量Tと、上記過去の画面複雑度の平均値によ
り上記現在の画面複雑度を除した値Kは、K1<K2で
あるときにf(K1)≦f(K2)となる関数f(K)
に対して、T=f(K)を満たすものであることを特徴
とする動画像符号化装置である。According to a fourteenth aspect of the present invention, there is provided the moving picture coding apparatus according to the first aspect, wherein the target generated code amount T determined by the target generated code amount determining means is equal to the target generated code amount T. The value K obtained by dividing the current screen complexity by the average of the past screen complexity is a function f (K) that satisfies f (K1) ≦ f (K2) when K1 <K2.
Is a moving picture coding apparatus characterized by satisfying T = f (K).
【0021】また、本発明の請求項15にかかる動画像
符号化装置は、請求項2に記載の動画像符号化装置にお
いて、上記目標符号量決定手段により決定された目標発
生符号量Tと、上記第3の画面複雑度により上記第4の
画面複雑度を除した値Kは、K1<K2であるときにf
(K1)≦f(K2)となる関数f(K)に対して、T
=f(K)を満たすものであることを特徴とする動画像
符号化装置である。According to a fifteenth aspect of the present invention, there is provided the video encoding apparatus according to the second aspect, wherein the target generated code amount T determined by the target code amount determining means; A value K obtained by dividing the fourth screen complexity by the third screen complexity is f when K1 <K2.
For a function f (K) that satisfies (K1) ≦ f (K2), T
= F (K).
【0022】また、本発明の請求項16にかかる動画像
符号化装置は、請求項3に記載の動画像符号化装置にお
いて、上記目標符号量決定手段により決定された目標発
生符号量Tと、上記第3の画面複雑度により上記第4の
画面複雑度を除した値Kは、単位時間当たりの割り当て
可能符号残量Rと、K1<K2であるときにg(K1,
R)≦g(K2,R),かつR1<R2であるときにg
(K,R2)≦g(K,R2)となる関数g(K,R)
に対して、T=g(K,R)を満たすものであることを
特徴とする動画像符号化装置である。The video encoding device according to claim 16 of the present invention is the video encoding device according to claim 3, wherein the target generated code amount T determined by the target code amount determination means; The value K obtained by dividing the fourth screen complexity by the third screen complexity is g (K1, K1) when the remaining code amount R per unit time and K1 <K2 are satisfied.
R) ≦ g (K2, R), and when R1 <R2, g
Function g (K, R) that satisfies (K, R2) ≦ g (K, R2)
Is a moving picture coding apparatus characterized by satisfying T = g (K, R).
【0023】また、本発明の請求項17にかかる動画像
符号化装置は、請求項4に記載の動画像符号化装置にお
いて、上記目標量子化幅決定手段により決定された目標
量子化幅Qは、上記過去の画面複雑度の平均値により上
記現在の画面複雑度を除した値Kと、K1<K2である
ときにf(K1)≧f(K2)となる関数fとに対し
て、Q=f(K)を満たすものであることを特徴とする
動画像符号化装置である。According to a seventeenth aspect of the present invention, in the moving picture encoding apparatus according to the fourth aspect, the target quantization width Q determined by the target quantization width determining means is equal to or smaller than the target quantization width Q. , The value K obtained by dividing the current screen complexity by the average value of the past screen complexity and the function f satisfying f (K1) ≧ f (K2) when K1 <K2. = F (K).
【0024】また、本発明の請求項18にかかる動画像
符号化装置は、請求項5に記載の動画像符号化装置にお
いて、上記目標量子化幅決定手段により決定した目標量
子化幅Qと、上記第3の画面複雑度により上記第4の画
面複雑度を除した値Kは、K1<K2であるときにf
(K1)≧f(K2)となる関数f(K)に対して、Q
=f(K)を満たすものであることを特徴とする動画像
符号化装置である。The video encoding apparatus according to claim 18 of the present invention is the video encoding apparatus according to claim 5, wherein: the target quantization width Q determined by the target quantization width determination means; A value K obtained by dividing the fourth screen complexity by the third screen complexity is f when K1 <K2.
For a function f (K) that satisfies (K1) ≧ f (K2), Q
= F (K).
【0025】また、本発明の請求項19にかかる動画像
符号化装置は、請求項6に記載の動画像符号化装置にお
いて、上記目標量子化幅決定手段により決定された目標
量子化幅Qと、上記第3の画面複雑度により上記第4の
画面複雑度を除した値Kは、単位時間当たりの上記割り
当て可能符号残量Rと、K1<K2であるときにg(K
1,R)≧g(K2,R),かつR1<R2であるとき
にg(K,R2)≧g(K,R2)となる関数gに対し
て、S=g(K,R)を満たすものであることを特徴と
する動画像符号化装置である。According to a nineteenth aspect of the present invention, in the moving picture coding apparatus according to the sixth aspect, the target quantization width Q and the target quantization width determined by the target quantization width determining means are used. , The value K obtained by dividing the fourth screen complexity by the third screen complexity is g (K) when the assignable code remaining amount R per unit time and K1 <K2 are satisfied.
For a function g that satisfies g (K, R2) ≧ g (K, R2) when (1, R) ≧ g (K2, R) and R1 <R2, S = g (K, R) A moving picture coding apparatus characterized by satisfying the following.
【0026】[0026]
【発明の実施の形態】以下、図面を参照しながら、符号
化方法としてMPEG2方式を用いた場合の本発明によ
る動画像符号化装置について説明する。 実施の形態1.まず、実施の形態1について、図面を参
照しながら説明する。図1は、本実施の形態1による動
画像符号化装置のブロック図である。図中100は本実
施の形態1による動画像符号化装置であり、このように
動画像符号化装置100は、ブロック変換手段であるブ
ロック変換器101と,差分器102と,スイッチ10
3,111と,画像変換手段である直交変換器104
と,量子化手段である量子化器105と,符号量計数手
段,平均値演算手段,複雑度演算手段,目標符号量決定
手段,及び仮想バッファ手段を統合した符号量制御器1
06と,符号生成手段である可変長符号化器107と、
バッファ108と,逆量子化器109と,逆直交変換器
110と,動き補償予測器112と,フレームメモリ1
13と,加算器114とからなっている。本実施の形態
1では、このような動画像符号化装置100に入力され
る動画像を、図2(a) に示すようなフレーム201〜2
27…から構成されているものとし、フレーム201〜
227はフレーム201を先頭として時間順に並んでい
る。また、各フレーム201〜227に付記されたI,
P,Bの記号は、各フレームがそれぞれIピクチャ(フ
レーム内符号化画像)、Pピクチャ(フレーム間順方向
予測符号化画像)、Bピクチャ(双方向予測符号化画
像)であることを示している。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, a moving picture coding apparatus according to the present invention when the MPEG2 system is used as a coding method will be described with reference to the drawings. Embodiment 1 FIG. First, Embodiment 1 will be described with reference to the drawings. FIG. 1 is a block diagram of a video encoding device according to the first embodiment. In the figure, reference numeral 100 denotes a moving image coding apparatus according to the first embodiment. As described above, the moving image coding apparatus 100 includes a block converter 101 as a block converting means, a differentiator 102, and a switch 10
3, 111, and an orthogonal transformer 104 as an image converting means.
And a quantizer 105 as a quantizing means, and a code amount controller 1 integrating code amount counting means, average value calculating means, complexity calculating means, target code amount determining means, and virtual buffer means.
06, a variable-length encoder 107 as code generation means,
Buffer 108, inverse quantizer 109, inverse orthogonal transformer 110, motion compensation predictor 112, and frame memory 1
13 and an adder 114. In the first embodiment, a moving image input to such a moving image encoding apparatus 100 is converted into frames 201 to 2 as shown in FIG.
27, and frames 201 to 201
227 are arranged in chronological order with the frame 201 at the top. Also, I, added to each of the frames 201 to 227,
The symbols P and B indicate that each frame is an I picture (intra-frame coded image), a P picture (inter-frame forward prediction coded image), and a B picture (bidirectional prediction coded image), respectively. I have.
【0027】まず、入力フレームがIピクチャである場
合の、動画像符号化装置100の基本動作について図面
を参照しながら説明する。動画像符号化装置100に入
力された動画像を構成する入力フレームは、図2(b) に
示すように、ブロック変換器101により16×16画
素からなるマクロブロックに分割される。入力フレーム
がIピクチャである場合は、スイッチ103はbに接続
され、従ってマクロブロックは直交変換器104に入力
される。直交変換器104は、図2(c) に示すように、
1個のマクロブロックを8×8画素からなるブロックに
分割し、各ブロック毎に直交変換を施して、各ブロック
を直交変換係数に変換する。なお図2(c) は、画像フォ
ーマットが4:2:0である場合についての1個のマク
ロブロックに含まれるブロックを示している。First, the basic operation of the moving picture coding apparatus 100 when an input frame is an I picture will be described with reference to the drawings. As shown in FIG. 2B, an input frame constituting a moving image input to the moving image encoding apparatus 100 is divided into 16 × 16 macroblocks by a block converter 101. If the input frame is an I-picture, switch 103 is connected to b, so that the macroblock is input to orthogonal transformer 104. The orthogonal transformer 104, as shown in FIG.
One macroblock is divided into blocks of 8 × 8 pixels, and an orthogonal transform is performed for each block to convert each block into an orthogonal transform coefficient. FIG. 2C shows blocks included in one macroblock when the image format is 4: 2: 0.
【0028】次に、直交変換係数は、量子化器105に
より量子化を施される。この量子化は、直行変換係数
を、符号量制御器106により与えられる量子化幅と各
周波数成分に対応した8×8の量子化行列とで除算する
ことにより行われる。量子化された直行変換係数は、可
変長符号化器107により符号列に変換されてバッファ
108に入力される。バッファ108に入力された符号
列は、所定のレートでバースト的あるいは連続的にバッ
ファ108から読み出され、蓄積メディア等に蓄積され
るデータとなる。Next, the orthogonal transform coefficients are quantized by a quantizer 105. This quantization is performed by dividing the orthogonal transform coefficient by a quantization width given by the code amount controller 106 and an 8 × 8 quantization matrix corresponding to each frequency component. The quantized orthogonal transform coefficients are converted into a code string by the variable length encoder 107 and input to the buffer 108. The code string input to the buffer 108 is read out from the buffer 108 at a predetermined rate in a burst or continuous manner, and becomes data to be stored in a storage medium or the like.
【0029】一方、量子化器105により量子化された
直交変換係数は、逆量子化器109にも入力されて逆量
子化を施され、さらに逆直交変換器110により逆直交
変換を施されて局所復号化画像となる。入力画像がIピ
クチャである場合、スイッチ111は接続されず、局所
復号化画像はそのままフレームメモリ113に格納され
ることとなる。On the other hand, the orthogonal transform coefficients quantized by the quantizer 105 are also input to an inverse quantizer 109, where they are subjected to inverse quantization, and further subjected to inverse orthogonal transform by an inverse orthogonal transformer 110. It becomes a locally decoded image. When the input image is an I picture, the switch 111 is not connected, and the locally decoded image is stored in the frame memory 113 as it is.
【0030】次に、入力フレームがPおよびBピクチャ
である場合の、動画像符号化装置100の基本動作につ
いて説明する。動画像符号化装置に入力された動画像を
構成する入力フレームは、Iピクチャの場合と同様に、
まずブロック変換器101により16×16画素からな
るマクロブロックに分割される。入力フレームがPおよ
びBピクチャである場合は、スイッチ103はaに接続
され、従ってマクロブロックは動き補償予測器112に
入力され、フレームメモリ113に格納された局所復号
化画像を用いて動き予測が行われる。例えば、入力フレ
ームがフレーム207(Pピクチャ)である場合には、
フレームメモリ113に格納されたフレーム204(P
ピクチャ)の局所復号化画像を参照フレームとして用い
て動き予測を行う。また、入力フレームがフレーム20
6(Bピクチャ)である場合には、フレーム204(P
ピクチャ)とフレーム207(Pピクチャ)の局所復号
化画像を参照フレームとして用いて動き予測を行う。動
き予測により得られた入力フレームの動きベクトルは、
可変長符号化器107により可変長符号化される。ま
た、入力フレームのマクロブロックと動き予測により得
られた参照画像のマクロブロックとは、差分器102に
より差分が取られ、その差分値は差分マクロブロックと
なる。Next, the basic operation of the moving picture coding apparatus 100 when the input frames are P and B pictures will be described. An input frame constituting a moving image input to the moving image encoding apparatus is, like the case of the I picture,
First, the block is divided into macroblocks composed of 16 × 16 pixels by the block converter 101. If the input frames are P and B pictures, the switch 103 is connected to a, so that the macroblock is input to the motion compensation predictor 112, and the motion prediction is performed using the locally decoded image stored in the frame memory 113. Done. For example, if the input frame is frame 207 (P picture),
The frame 204 (P
The motion prediction is performed using the locally decoded image of the current picture (picture) as a reference frame. Also, if the input frame is frame 20
6 (B picture), the frame 204 (P
(Picture) and the locally decoded image of the frame 207 (P picture) are used as reference frames to perform motion prediction. The motion vector of the input frame obtained by the motion prediction is
The variable length coder 107 performs variable length coding. The difference between the macroblock of the input frame and the macroblock of the reference image obtained by the motion prediction is obtained by a differentiator 102, and the difference value is a difference macroblock.
【0031】差分マクロブロックは、Iピクチャの場合
と同様に、直交変換器104,量子化器105,可変長
符号化器107により符号列に変換され、バッファ10
8に入力される。また、入力フレームがPピクチャの場
合、量子化された差分マクロブロックの直交変換係数
は、逆量子化器109にも入力されて逆量子化を施さ
れ、さらに逆直交変換器110により逆直交変換を施さ
れた後、動き予測で得られた参照画像との加算が加算器
114により行われて、局所復号化画像となりフレーム
メモリ113に格納される。入力フレームがBピクチャ
の場合には、局所復号化画像は生成する必要はない。The difference macroblock is converted into a code string by an orthogonal transformer 104, a quantizer 105, and a variable-length encoder 107 in the same manner as in the case of an I picture.
8 is input. When the input frame is a P-picture, the quantized orthogonal transform coefficients of the differential macroblock are also input to the inverse quantizer 109 and subjected to inverse quantization. Is performed, the addition with the reference image obtained by the motion prediction is performed by the adder 114 to be a locally decoded image, which is stored in the frame memory 113. If the input frame is a B picture, there is no need to generate a locally decoded image.
【0032】以上のような動作において、符号量制御器
106は、バッファ108に入力された符号量を計数
し、計数した各フレームの符号量と量子化幅とを用いて
フレームの複雑度を求め、その複雑度から新しい量子化
幅を決定し、それを量子化器105に送る。このような
符号量制御器106の構造および動作について以下に説
明を行う。In the above operation, the code amount controller 106 counts the code amount input to the buffer 108 and obtains the complexity of the frame using the counted code amount and the quantization width of each frame. , A new quantization width is determined from the complexity and sent to the quantizer 105. The structure and operation of the code amount controller 106 will be described below.
【0033】まず、入力フレームがフレーム201(I
ピクチャ)である場合の符号量制御器106の詳細な動
作を、図3のフローチャートを参照しながら以下に説明
する。図3は、符号量制御器の動作を示すフローチャー
トである。まず、入力フレームの符号化開始前に符号量
制御器106は、ステップ301において変数Xi,X
p,Xb,AvgXi,AvgXp,AvgXbの初期
値を設定する。Xi,Xp,Xbは、現在符号化しよう
としている入力フレームの直前のI,P,Bピクチャの
フレーム複雑度を示す。AvgXiは、現在符号化しよ
うとしている入力フレームの直前のIピクチャよりも以
前のIピクチャに対する平均フレーム複雑度である。A
vgXp,AvgXbは、現在符号化しようとしている
入力フレームの直前のP,Bピクチャよりも以前のP,
Bピクチャに対する平均フレーム複雑度である。例えば
入力フレームがフレーム222(Pピクチャ)である場
合、この入力フレームを符号化する際のXpはフレーム
219(Pピクチャ)のフレーム複雑度となり、Avg
Xpはフレーム216より以前(フレーム216を含
む)のPピクチャの平均フレーム複雑度となる。符号量
制御器106はこのような変数Xi,Xp,Xb,Av
gXi,AvgXp,AvgXbの初期値の設定と同時
に、(数1),(数2)による初期化の動作も行う。First, when the input frame is a frame 201 (I
The detailed operation of the code amount controller 106 in the case of (picture) will be described below with reference to the flowchart of FIG. FIG. 3 is a flowchart showing the operation of the code amount controller. First, before starting to encode an input frame, the code amount controller 106 determines in step 301 that the variables Xi, X
Initial values of p, Xb, AvgXi, AvgXp, and AvgXb are set. Xi, Xp, and Xb indicate the frame complexity of the I, P, and B pictures immediately before the input frame that is currently being encoded. AvgXi is the average frame complexity for I-pictures prior to the I-picture immediately preceding the input frame currently being coded. A
vgXp, AvgXb are the P, B pictures before the P, B picture immediately before the input frame to be currently encoded.
Average frame complexity for B pictures. For example, when the input frame is the frame 222 (P picture), Xp when encoding the input frame is the frame complexity of the frame 219 (P picture), and Avg
Xp is the average frame complexity of a P picture before (including the frame 216) before the frame 216. The code amount controller 106 determines such variables Xi, Xp, Xb, Av
At the same time as setting the initial values of gXi, AvgXp, and AvgXb, the initialization operation by (Equation 1) and (Equation 2) is performed.
【0034】[0034]
【数1】 (Equation 1)
【0035】[0035]
【数2】 (Equation 2)
【0036】(数1)におけるBitRateは目標平
均符号レートを示し、FrameRateは1秒あたり
のフレーム数を示す。また、Nは1GOPを構成するフ
レーム数を示し、例えば図2(a) ではN=12となる。
よってGは、1GOP当たりの平均割り当て符号量を示
すことになる。(数2)におけるLは1以上の整数であ
り、Rは仮想的なバッファの残量を示す。In (Equation 1), BitRate indicates a target average code rate, and FrameRate indicates the number of frames per second. N indicates the number of frames constituting one GOP. For example, in FIG. 2A, N = 12.
Therefore, G indicates the average allocated code amount per GOP. L in (Equation 2) is an integer of 1 or more, and R indicates the remaining amount of the virtual buffer.
【0037】次にステップ302において、入力フレー
ムがGOPの先頭(符号化の開始時点)であるかどうか
を判定する。例えばフレーム201ならば、GOPの先
頭であるのでステップ303に進む。ステップ303で
は、仮想バッファ残量Rの更新を(数3)により行う。Next, in step 302, it is determined whether or not the input frame is at the head of the GOP (at the start of encoding). For example, if the frame 201 is the head of the GOP, the process proceeds to step 303. In step 303, the virtual buffer remaining amount R is updated according to (Equation 3).
【0038】[0038]
【数3】 (Equation 3)
【0039】(数3)における右辺のRは更新前の仮想
バッファ残量を示すものであり、左辺のRは更新後の仮
想バッファ残量を示す。In the equation (3), R on the right side indicates the virtual buffer remaining amount before updating, and R on the left side indicates the virtual buffer remaining amount after updating.
【0040】ステップ304で、1GOP単位のフレー
ム目標発生符号量Tgの設定を(数4),(数5),
(数6)により行う。At step 304, the setting of the frame target generated code amount Tg for each GOP is set by (Equation 4), (Equation 5),
This is performed by (Equation 6).
【0041】[0041]
【数4】 (Equation 4)
【0042】[0042]
【数5】 (Equation 5)
【0043】[0043]
【数6】 (Equation 6)
【0044】Np,Nbはそれぞれ1GOPに含まれる
P,Bピクチャのフレーム数を示し、例えば図2(a)
では3,8となる。従って、Xgは1GOP単位のフレ
ーム複雑度、AvgXgは1GOP単位の平均フレーム
複雑度を示すこととなる。Np and Nb indicate the number of frames of P and B pictures included in one GOP, for example, as shown in FIG.
Then, it becomes 3,8. Therefore, Xg indicates the frame complexity in GOP units, and AvgXg indicates the average frame complexity in GOP units.
【0045】ステップ305で、フレーム201に対す
るフレーム目標発生符号量Tの設定を、Xiを用いて
(数7)により行う。In step 305, the frame target generated code amount T for the frame 201 is set by using (Xi) (Equation 7).
【0046】[0046]
【数7】 (Equation 7)
【0047】ステップ306で、フレーム201の符号
化を行う。このとき、フレーム201の符号量が、ステ
ップ305で設定したフレーム201に対するフレーム
目標発生符号量Tとなるように、MPEG TEST
MODEL3の方法を用いてフレーム201の符号化を
行う。なお、この符号化は、MPEG TEST MO
DEL3以外の方法を用いて行ってもかまわない。In step 306, the frame 201 is encoded. At this time, the MPEG TEST is performed such that the code amount of the frame 201 becomes the frame target generated code amount T for the frame 201 set in step 305.
The frame 201 is encoded using the method of MODEL3. This encoding is performed by MPEG TEST MO
A method other than DEL3 may be used.
【0048】フレーム201の符号化が終了すると、ス
テップ307において符号化後処理を行う。ここでの符
号化後処理とは、仮想バッファ残量Rの更新,平均フレ
ーム複雑度AvgXi,フレーム複雑度Xiの更新のこ
とである。仮想バッファ残量Rの更新は(数8)により
行う。When the encoding of the frame 201 is completed, post-encoding processing is performed in step 307. Here, the post-coding process refers to updating the remaining virtual buffer R, updating the average frame complexity AvgXi, and the frame complexity Xi. The update of the virtual buffer remaining amount R is performed according to (Equation 8).
【0049】[0049]
【数8】 (Equation 8)
【0050】(数8)におけるSはフレーム201の発
生符号量を示す。また、(数8)の右辺のRは更新前の
仮想バッファ残量を示すものであり、左辺のRは更新後
の仮想バッファ残量を示す。平均フレーム複雑度Avg
Xiの更新は(数9),(数10),(数11)により
行う。S in (Equation 8) indicates the generated code amount of the frame 201. Further, R on the right side of (Equation 8) indicates the remaining amount of the virtual buffer before the update, and R on the left side indicates the remaining amount of the virtual buffer after the update. Average frame complexity Avg
Xi is updated by (Equation 9), (Equation 10), and (Equation 11).
【0051】[0051]
【数9】 (Equation 9)
【0052】[0052]
【数10】 (Equation 10)
【0053】[0053]
【数11】 [Equation 11]
【0054】(数9)におけるSumXiはフレーム複
雑度Xiの累積値を示し、フレーム201の符号化開始
時点では0である。また、(数10)におけるFiは符
号化が終了したIピクチャ数を示す。フレーム複雑度X
iの更新は(数12)により行う。SumXi in (Equation 9) indicates the cumulative value of the frame complexity Xi, and is 0 at the start of the encoding of the frame 201. Fi in (Equation 10) indicates the number of I pictures for which encoding has been completed. Frame complexity X
The updating of i is performed according to (Equation 12).
【0055】[0055]
【数12】 (Equation 12)
【0056】(数12)におけるQは、Iピクチャフレ
ーム内の全マクロブロックに対する量子化幅の平均値を
示す。Q in (Equation 12) indicates the average value of the quantization width for all macroblocks in the I picture frame.
【0057】以上までが、フレーム201(Iピクチ
ャ)を符号化する際の符号量制御器106の動作の説明
である。The operation of the code amount controller 106 when encoding the frame 201 (I picture) has been described above.
【0058】次に、フレーム201の次フレームである
フレーム204(Pピクチャ)を符号化する際の、符号
量制御器106の動作の詳細について、図3のフローチ
ャートを参照しながら以下に説明する。まず、上述のフ
レーム201(Iピクチャ)のときと同様にして、符号
量制御器106はステップ301,302を行う。フレ
ーム204はGOPの先頭フレームではないので、ステ
ップ303を飛ばしてステップ304を行う。ステップ
304において、1GOP単位のフレーム目標発生符号
量Tgの設定を行った後、ステップ305で、フレーム
204に対するフレーム目標発生符号量Tの設定を、X
pを用いて(数13)により行う。上述のフレーム20
1(Iピクチャ)のときは、Xiを用いて(数7)によ
りフレーム目標発生符号量Tの設定を行う。Next, the details of the operation of the code amount controller 106 when encoding the frame 204 (P picture) which is the next frame of the frame 201 will be described below with reference to the flowchart of FIG. First, the code amount controller 106 performs steps 301 and 302 in the same manner as in the case of the frame 201 (I picture) described above. Since the frame 204 is not the first frame of the GOP, step 304 is skipped and step 304 is performed. In step 304, after setting the frame target generated code amount Tg for each GOP, in step 305, the frame target generated code amount T for the frame 204 is set to X
This is performed according to (Equation 13) using p. Frame 20 described above
In the case of 1 (I picture), the frame target generated code amount T is set using Xi by (Equation 7).
【0059】[0059]
【数13】 (Equation 13)
【0060】ステップ306で、フレーム204の符号
化を行う。このとき、フレーム204の符号量が、ステ
ップ305で設定したフレーム204に対するフレーム
目標発生符号量Tとなるように、MPEG TEST
MODEL3の方法を用いてフレーム204の符号化を
行う。なお、この符号化は、MPEG TEST MO
DEL3以外の方法を用いて行ってもかまわない。In step 306, the frame 204 is encoded. At this time, the MPEG TEST is performed such that the code amount of the frame 204 becomes the frame target generated code amount T for the frame 204 set in step 305.
The frame 204 is encoded using the method of MODEL3. This encoding is performed by MPEG TEST MO
A method other than DEL3 may be used.
【0061】フレーム201の符号化が終了すると、ス
テップ307において符号化後処理を行う。ここでの符
号化後処理とは、仮想バッファ残量Rの更新,平均フレ
ーム複雑度AvgXp,フレーム複雑度Xpの更新のこ
とである。When the encoding of the frame 201 is completed, post-encoding processing is performed in step 307. The post-coding process here refers to updating the remaining virtual buffer R, updating the average frame complexity AvgXp, and the frame complexity Xp.
【0062】仮想バッファ残量Rの更新は(数8)によ
り行う。The update of the virtual buffer remaining amount R is performed according to (Equation 8).
【0063】[0063]
【数8】 (Equation 8)
【0064】平均フレーム複雑度AvgXpの更新は
(数14)〜(数16)により行う。上述のフレーム2
01(Iピクチャ)のときは、(数9)〜(数11)に
より平均フレーム複雑度AvgXiを更新した。The update of the average frame complexity AvgXp is performed according to (Equation 14) to (Equation 16). Frame 2 above
In the case of 01 (I picture), the average frame complexity AvgXi was updated by (Equation 9) to (Equation 11).
【0065】[0065]
【数14】 [Equation 14]
【0066】[0066]
【数15】 (Equation 15)
【0067】[0067]
【数16】 (Equation 16)
【0068】(数14)におけるSumXpはフレーム
複雑度Xpの累積値を示し、フレーム204の符号化開
始時点では0である。また、(数15)におけるFpは
符号化終了済みのPピクチャ数である。フレーム複雑度
Xpの更新は(数17)により行う。上述のフレーム2
01(Iピクチャ)のときは、(数12)によりフレー
ム複雑度Xiを更新した。SumXp in (Equation 14) indicates the accumulated value of the frame complexity Xp, and is 0 at the start of encoding of the frame 204. Fp in (Equation 15) is the number of P pictures for which encoding has been completed. The update of the frame complexity Xp is performed by (Equation 17). Frame 2 above
In the case of 01 (I picture), the frame complexity Xi was updated by (Equation 12).
【0069】[0069]
【数17】 [Equation 17]
【0070】(数17)におけるQは、Pピクチャフレ
ーム内の全マクロブロックに対する平均量子化幅であ
る。Q in (Equation 17) is the average quantization width for all macroblocks in the P picture frame.
【0071】以上までが、フレーム204(Pピクチ
ャ)を符号化する際の符号量制御器106の動作の説明
である。The operation of the code amount controller 106 when encoding the frame 204 (P picture) has been described above.
【0072】次に、フレーム204の次フレームである
フレーム202(Bピクチャ)を符号化する際の、符号
量制御器106の動作の詳細について、図3のフローチ
ャートを参照しながら以下に説明する。まず、上述のフ
レーム201(Iピクチャ),フレーム204(Pピク
チャ)のときと同様にして、符号量制御器106はステ
ップ301,302を行う。フレーム202はGOPの
先頭フレームではないので、ステップ303を飛ばして
ステップ304を行う。ステップ304において、1G
OP単位のフレーム目標発生符号量Tgの設定を行った
後、ステップ305でフレーム202に対するフレーム
目標発生符号量Tの設定を行う。フレーム202に対す
るフレーム目標発生符号量Tの設定は、Xbを用いて
(数18)により行う。先述のフレーム201(Iピク
チャ)のときはXiを用いて(数7)により、フレーム
204(Pピクチャ)のときはXpを用いて(数13)
により、フレーム目標発生符号量Tの設定を行った。Next, details of the operation of the code amount controller 106 at the time of encoding the frame 202 (B picture) subsequent to the frame 204 will be described with reference to the flowchart of FIG. First, the code amount controller 106 performs steps 301 and 302 as in the case of the frame 201 (I picture) and the frame 204 (P picture). Since the frame 202 is not the first frame of the GOP, step 304 is skipped and step 304 is performed. In step 304, 1G
After setting the frame target generated code amount Tg for each OP, in step 305, the frame target generated code amount T for the frame 202 is set. The setting of the frame target generated code amount T for the frame 202 is performed by (Equation 18) using Xb. For the frame 201 (I picture) described above, Xi is used by (Equation 7), and for the frame 204 (P picture), Xp is used (Equation 13).
Thus, the frame target generated code amount T was set.
【0073】[0073]
【数18】 (Equation 18)
【0074】ステップ306で、フレーム202の符号
化を行う。このとき、フレーム202の符号量が、ステ
ップ305で設定したフレーム202に対するフレーム
目標発生符号量Tとなるように、MPEG TEST
MODEL3の方法を用いてフレーム202の符号化を
行う。なお、この符号化は、MPEG TEST MO
DEL3以外の方法を用いて行ってもかまわない。At step 306, the frame 202 is encoded. At this time, the MPEG TEST is performed such that the code amount of the frame 202 becomes the frame target generated code amount T for the frame 202 set in step 305.
The frame 202 is encoded using the method of MODEL3. This encoding is performed by MPEG TEST MO
A method other than DEL3 may be used.
【0075】フレーム202の符号化が終了すると、ス
テップ307で符号化後処理を行う。ここでの符号化後
処理とは、仮想バッファ残量Rの更新,平均フレーム複
雑度AvgXb,フレーム複雑度Xbの更新のことであ
る。仮想バッファ残量Rの更新は(数8)により行う。When the encoding of the frame 202 is completed, post-encoding processing is performed in step 307. The post-coding process here refers to updating the remaining virtual buffer R, updating the average frame complexity AvgXb, and the frame complexity Xb. The update of the virtual buffer remaining amount R is performed according to (Equation 8).
【0076】[0076]
【数8】 (Equation 8)
【0077】平均フレーム複雑度AvgXbの更新は
(数19)〜(数21)により行う。先述のフレーム2
01(Iピクチャ)のときは(数9)〜(数11)によ
り、フレーム204(Pピクチャ)のときは(数14)
〜(数16)により、平均フレーム複雑度AvgXi,
AvgXpを更新した。The update of the average frame complexity AvgXb is performed according to (Equation 19) to (Equation 21). Frame 2 mentioned above
For 01 (I picture), (Equation 9) to (Equation 11), and for frame 204 (P picture), (Equation 14)
From (Equation 16), the average frame complexity AvgXi,
AvgXp was updated.
【0078】[0078]
【数19】 [Equation 19]
【0079】[0079]
【数20】 (Equation 20)
【0080】[0080]
【数21】 (Equation 21)
【0081】(数19)におけるSumXpはフレーム
複雑度Xbの累積値を示し、フレーム202の符号化開
始時点では0である。(数20)におけるFbは符号化
が終了したBピクチャ数である。フレーム複雑度Xbの
更新は(数17)により行う。なお、先述のフレーム2
01(Iピクチャ)のときは(数12)により、フレー
ム204(Pピクチャ)のときは(数17)により、フ
レーム複雑度Xi,Xbを更新した。SumXp in (Equation 19) indicates the cumulative value of the frame complexity Xb, and is 0 at the start of encoding of the frame 202. Fb in (Equation 20) is the number of B pictures for which encoding has been completed. The update of the frame complexity Xb is performed by (Equation 17). In addition, the above-mentioned frame 2
The frame complexity Xi and Xb are updated according to (Equation 12) for 01 (I picture) and (Equation 17) for frame 204 (P picture).
【0082】[0082]
【数22】 (Equation 22)
【0083】(数22)におけるQは、Bピクチャフレ
ーム内の全マクロブロックに対する平均量子化幅であ
る。Q in (Equation 22) is an average quantization width for all macroblocks in a B picture frame.
【0084】以上までが、フレーム202(Bピクチ
ャ)を符号化する際の符号量制御器106の動作の説明
である。図4(a) ,(b) は、符号量制御器106が、上
記のような可変ビットレート符号化方法を用いて動作し
た場合の、発生符号量の時間的変化の例を示す図であ
る。図4(a) の実線はフレーム複雑度Xgを、破線は1
平均フレーム複雑度AvgXgを示す。図4(b) の実線
は1GOP単位の発生符号量を、破線は1GOP単位の
目標発生符号量を示す。このように、1GOP単位のフ
レーム複雑度と1GOP単位の発生符号量の時間的変化
は同じような曲線を描いており、すなわちこのグラフ
は、フレーム複雑度に応じた適切な目標発生符号量をも
って動画像の符号化を行っていることを示している。The operation of the code amount controller 106 when encoding the frame 202 (B picture) has been described above. FIGS. 4A and 4B are diagrams showing an example of a temporal change in the generated code amount when the code amount controller 106 operates using the above-described variable bit rate coding method. . The solid line in FIG. 4A indicates the frame complexity Xg, and the broken line indicates 1.
5 shows the average frame complexity AvgXg. In FIG. 4B, the solid line indicates the generated code amount in one GOP unit, and the broken line indicates the target generated code amount in one GOP unit. As described above, the temporal change in the frame complexity in 1 GOP unit and the generated code amount in 1 GOP unit draws a similar curve. That is, this graph shows a moving image with an appropriate target generated code amount according to the frame complexity. This indicates that the image is being encoded.
【0085】以上のように本実施の形態1による動画像
符号化装置では、過去の平均フレーム複雑度に対する現
在符号化しようとしているフレーム複雑度の比率を求
め、その比率により現在のフレームの目標発生符号量を
求めているので、フレーム複雑度に応じた適切な目標発
生符号量でもって現在のフレームの符号化を行うことが
可能となり、かつ、1GOP単位の目標発生符号量を満
足させることも可能となる。従って、本実施の形態1に
よる動画像符号化装置は、予め設定されていた1GOP
単位の目標発生符号量が低い場合であっても、従来のよ
うな固定レート符号化方法に比べると画質が向上する効
果が得られる。As described above, in the moving picture coding apparatus according to the first embodiment, the ratio of the frame complexity to be currently coded to the past average frame complexity is obtained, and the target generation of the current frame is determined based on the ratio. Since the code amount is obtained, it is possible to encode the current frame with an appropriate target generated code amount according to the frame complexity, and it is also possible to satisfy the target generated code amount in GOP units. Becomes Therefore, the moving picture coding apparatus according to the first embodiment uses a preset 1 GOP
Even when the target generated code amount per unit is low, the effect of improving the image quality can be obtained as compared with the conventional fixed rate coding method.
【0086】実施の形態2.次に、図面を参照しなが
ら、本発明の実施の形態2による動画像符号化装置につ
いて説明する。実施の形態2における符号量制御器10
6は、符号量計数手段,平均値演算手段,複雑度演算手
段,仮想バッファ手段,及び目標量子化幅決定手段を統
合した手段である。先述の実施の形態1における符号量
制御器106は、目標量子化幅決定手段を備えておら
ず、その代わりに目標符号量決定手段を備えていた。図
5は、本実施の形態2による符号量制御器106の動作
のフローチャートである。図5と実施の形態1による図
3とを比較すると、フレーム目標発生符号量の計算のス
テップ(ステップ305)と符号化のステップ(ステッ
プ502)の間において、フレーム目標量子化幅の計算
をステップ501により行っている点が異なっている。
このように、本実施の形態2による符号量制御器106
のステップ301〜ステップ305とステップ307の
動作は、実施の形態1の場合と同様であるので説明は省
略し、ステップ305とステップ502の動作について
の説明を以下に行う。Embodiment 2 Next, a moving picture coding apparatus according to a second embodiment of the present invention will be described with reference to the drawings. Code amount controller 10 according to Embodiment 2
Reference numeral 6 denotes a unit integrating the code amount counting unit, the average value calculating unit, the complexity calculating unit, the virtual buffer unit, and the target quantization width determining unit. The code amount controller 106 according to the first embodiment does not include the target quantization width determining unit, but includes the target code amount determining unit instead. FIG. 5 is a flowchart of the operation of the code amount controller 106 according to the second embodiment. Comparing FIG. 5 with FIG. 3 according to the first embodiment, the calculation of the frame target quantization width is performed between the step of calculating the target target code amount (step 305) and the step of encoding (step 502). 501 is different.
Thus, the code amount controller 106 according to the second embodiment
The operations in steps 301 to 305 and step 307 are the same as those in the first embodiment, and a description thereof will be omitted. The operations in steps 305 and 502 will be described below.
【0087】ステップ305で、フレーム目標発生符号
量Tを(数7)により設定した後、ステップ501にお
いて、そのフレーム目標発生符号量Tを用いて(数2
3)によりフレーム目標量子化幅Qiを設定する。ただ
し、(数23)は現在符号化しようとしているフレーム
(以下、フレームMとする)がIピクチャである場合に
用いるものであって、フレームMがP,Bピクチャであ
るときは(数24),(数25)によりフレーム目標量
子化幅Qp,Qbの設定を行う。In step 305, the frame target generated code amount T is set according to (Equation 7).
The frame target quantization width Qi is set according to 3). However, (Equation 23) is used when the frame currently to be encoded (hereinafter referred to as frame M) is an I picture, and when the frame M is a P or B picture, (Equation 24) , (Equation 25), the frame target quantization widths Qp and Qb are set.
【0088】[0088]
【数23】 (Equation 23)
【0089】[0089]
【数24】 (Equation 24)
【0090】[0090]
【数25】 (Equation 25)
【0091】(数23),(数24),(数25)によ
り求めたフレーム目標量子化幅Qi,Qp,Qbの値を
そのまま、フレームM内のすべてのマクロブロックに対
する量子化幅として用いて、フレームMの量子化を行
う。The values of the frame target quantization widths Qi, Qp, and Qb obtained by (Equation 23), (Equation 24), and (Equation 25) are directly used as the quantization widths for all the macroblocks in the frame M. , Frame M is quantized.
【0092】以降、ステップ502におけるフレームM
の符号化と、ステップ307における符号化後処理の動
作は、実施の形態1と同様である。Thereafter, the frame M in step 502
And the operation of the post-coding process in step 307 are the same as in the first embodiment.
【0093】なお、フレームMを量子化する際、フレー
ムM内のすべてのマクロブロックに対する量子化幅の値
は、フレーム目標量子化幅Qi,Qp,Qbの値をその
まま用いていたが、フレームM内の各マクロブロックに
対する量子化幅の平均値が、フレーム目標量子化幅Q
i,Qp,Qbに近い値になるのであれば、各マクロブ
ロックに対する量子化幅の値を変更してもかまわない。
例えば、図8に示すように、動画像符号化装置100に
アクティビティ計算器801を設け、アクティビティ計
算器801により計算された各マクロブロックのアクテ
ィビティに応じて、各マクロブロックに対する量子化幅
を変更してもかまわない。When the frame M is quantized, the values of the frame target quantization widths Qi, Qp, and Qb are used as they are as the quantization widths for all the macroblocks in the frame M. The average value of the quantization width for each macroblock in the frame is the frame target quantization width Q
If the values are close to i, Qp, and Qb, the value of the quantization width for each macroblock may be changed.
For example, as shown in FIG. 8, an activity calculator 801 is provided in the video encoding device 100, and the quantization width for each macro block is changed according to the activity of each macro block calculated by the activity calculator 801. It doesn't matter.
【0094】また、フレームMを量子化する際、フレー
ムM内のすべてのマクロブロックに対する量子化幅の値
は、フレーム目標量子化幅Qi,Qp,Qbの値をその
まま用いていたが、フレーム目標量子化幅Qi,Qp,
Qbの値は、フレームMのピクチャタイプに応じて重み
をかけてもよい。例えば、フレームMがI,Pピクチャ
であれば、フレーム目標量子化幅Qi,Qpをそのまま
用いてフレームMの量子化を行い、Bピクチャであれ
ば、(数25)で得たフレーム目標量子化幅Qbを1.
4倍した値をフレーム目標量子化幅Qbとして用いてフ
レームMの量子化を行ってもよい。When quantizing the frame M, the values of the frame target quantization widths Qi, Qp, and Qb are used as they are as the quantization width values for all the macroblocks in the frame M. The quantization widths Qi, Qp,
The value of Qb may be weighted according to the picture type of the frame M. For example, if the frame M is an I or P picture, the frame M is quantized using the frame target quantization widths Qi and Qp as it is, and if the frame M is a B picture, the frame target quantization obtained by (Equation 25) is used. The width Qb is set to 1.
The quantization of the frame M may be performed using the quadrupled value as the frame target quantization width Qb.
【0095】以上のように本実施の形態2による動画像
符号化装置では、過去の平均フレーム複雑度に対する現
在符号化しようとしているフレームの複雑度の比率を求
め、その比率により現在のフレームの目標量子化幅を求
め、その目標量子化幅を用いて現在のフレームの量子化
を行っているので、フレーム複雑度に応じた適切な目標
発生符号量でもって現在のフレームの符号化を行うこと
が可能となり、かつ、1GOP単位の目標発生符号量を
満足させることも可能となる。従って、本実施の形態2
による動画像符号化装置は、予め設定されていた1GO
P単位の目標発生符号量が低い場合であっても、従来の
ような固定レート符号化方法に比べると画質が向上する
効果が得られる。As described above, in the moving picture coding apparatus according to the second embodiment, the ratio of the complexity of the current frame to be coded to the average of the past frame complexity is obtained, and the target of the current frame is calculated based on the ratio. Since the quantization width is obtained and the current frame is quantized using the target quantization width, it is possible to encode the current frame with an appropriate target generated code amount according to the frame complexity. It becomes possible, and it is also possible to satisfy the target generated code amount of one GOP unit. Therefore, the second embodiment
Is a moving image encoding apparatus that has previously set 1GO.
Even when the target generated code amount in P units is low, the effect of improving the image quality can be obtained as compared with the conventional fixed rate coding method.
【0096】実施の形態3.次に、本発明の実施の形態
3による動画像符号化装置について、図面を参照しなが
ら説明する。図6は、本実施の形態3による動画像符号
化装置のブロック図である。このように本実施の形態3
による動画像符号化装置は、動画像符号化装置603,
604を組み合わせたものであり、動画像符号化装置6
03は、実施の形態1による動画像符号化装置100か
ら符号量制御器106とバッファ108を取り除き、可
変長符号化器107aの後段に複雑度演算器602を付
加したものであり、動画像符号化装置604は、動画像
符号化装置100と同じ装置である。すなわち、本実施
の形態3による動画像符号化装置は、実施の形態1によ
る動画像符号化装置の変形例である。Embodiment 3 Next, a video encoding device according to Embodiment 3 of the present invention will be described with reference to the drawings. FIG. 6 is a block diagram of a video encoding device according to the third embodiment. Thus, the third embodiment
Is a video encoding device 603,
604 in combination with the moving picture coding device 6
Numeral 03 denotes a configuration in which the code amount controller 106 and the buffer 108 are removed from the moving picture coding apparatus 100 according to the first embodiment, and a complexity calculator 602 is added at the subsequent stage of the variable length coding unit 107a. The encoding device 604 is the same device as the video encoding device 100. That is, the moving picture coding apparatus according to the third embodiment is a modification of the moving picture coding apparatus according to the first embodiment.
【0097】動画像符号化装置603は、フレーム複雑
度を求めるために、現在符号化しようとしているフレー
ム(例えば、フレームMとする)の仮の符号化を行う装
置であり、この動画像符号化装置603による符号化の
方法は実施の形態1の場合とほぼ同様である。異なるの
は、符号量制御を行わず、また量子化器105aにおい
て用いる量子化幅が一定である点である。複雑度演算器
602は、可変長符号化器107aの出力である符号列
を計数し、フレーム毎の符号量を求める。そして、その
フレーム符号量と量子化幅との積をとることにより、フ
レームMのフレーム複雑度を求める。求めたフレーム複
雑度は、動画像符号化装置604の符号量制御器106
bに出力する。The moving picture coding device 603 is a device for temporarily coding a frame to be currently coded (for example, a frame M) in order to obtain the frame complexity. The encoding method by the device 603 is almost the same as in the first embodiment. The difference is that code amount control is not performed, and the quantization width used in the quantizer 105a is constant. The complexity calculator 602 counts a code string output from the variable-length encoder 107a, and obtains a code amount for each frame. Then, the frame complexity of the frame M is obtained by multiplying the frame code amount by the quantization width. The obtained frame complexity is determined by the code amount controller 106 of the moving image coding apparatus 604.
b.
【0098】動画像符号化装置604は、フレームMの
実際の符号化を行って符号列を生成する装置である。フ
レームメモリ601により、動画像符号化装置604へ
のフレームMの入力は、動画像符号化装置603への入
力よりも少なくとも1フレーム遅れて入力されることに
なる。符号量制御器106bは動画像符号化装置603
から出力されたフレームMのフレーム複雑度を基に、フ
レームMに対する目標発生符号量を求め、この目標発生
符号量を量子化器105bに出力する。そして動画像符
号化装置604はフレームMの符号化を行う。この動画
像符号化装置604による符号化の方法は実施の形態1
の場合とほぼ同様であるが、フレーム複雑度に用いる値
が異なっている。すなわち、実施の形態1では、フレー
ム複雑度Xi,Xp,Xbは、フレームMの直前に存在
する同一ピクチャタイプのフレームの複雑度であった
が、本実施の形態3では現在のフレームMのフレーム複
雑度であり、このフレーム複雑度は複雑度演算器602
で求めたものである。従って、例えばフレーム222を
符号化する際には、Xpはフレーム222のフレーム複
雑度となり、AvgXpはフレーム219以前(フレー
ム219を含む)のPピクチャのフレーム複雑度の平均
値となる。また、ステップ307において、(数12)
によるフレーム複雑度の演算を行う必要はない。The moving image coding device 604 is a device that performs actual coding of the frame M to generate a code string. By the frame memory 601, the input of the frame M to the video encoding device 604 is input at least one frame later than the input to the video encoding device 603. The code amount controller 106b includes a moving image coding device 603.
, A target generated code amount for the frame M is obtained based on the frame complexity of the frame M output from, and the target generated code amount is output to the quantizer 105b. Then, the video encoding device 604 encodes the frame M. The encoding method by the moving image encoding device 604 is described in Embodiment 1.
Is almost the same as that of the above, but the value used for the frame complexity is different. That is, in the first embodiment, the frame complexity Xi, Xp, Xb is the complexity of the frame of the same picture type existing immediately before the frame M, but in the third embodiment, the frame complexity of the current frame M The frame complexity is calculated by the complexity calculator 602.
It was obtained in. Therefore, for example, when encoding the frame 222, Xp is the frame complexity of the frame 222, and AvgXp is the average value of the frame complexity of the P pictures before the frame 219 (including the frame 219). Also, in step 307, (Equation 12)
It is not necessary to calculate the frame complexity by using.
【0099】なお、動画像符号化装置604には、実施
の形態2による動画像符号化装置100を用いても構わ
ない。この場合、符号量制御器106bは動画像符号化
装置603から出力されたフレーム複雑度を基に、フレ
ームMに対する目標発生符号量を求め、この目標発生符
号量から目標量子化幅を求めて量子化器105bに出力
する。量子化器105bは、符号量制御器106bから
出力された目標量子化幅を用いてフレームMの量子化を
行う。その後、動画像符号化装置604はフレームMの
符号化を行う。Note that the moving picture coding apparatus 604 may use the moving picture coding apparatus 100 according to the second embodiment. In this case, the code amount controller 106b obtains a target generated code amount for the frame M based on the frame complexity output from the video encoding device 603, obtains a target quantization width from the target generated code amount, and performs quantization. Output to the converter 105b. The quantizer 105b quantizes the frame M using the target quantization width output from the code amount controller 106b. After that, the video encoding device 604 encodes the frame M.
【0100】以上のように本実施の形態3による動画像
符号化装置では、過去の平均フレーム複雑度に対する現
在符号化しようとしているフレーム複雑度の比率を求
め、その比率により現在のフレームの目標発生符号量を
求めているので、フレーム複雑度に応じた適切な目標発
生符号量でもって現在のフレームの符号化を行うことが
可能となり、かつ、1GOP単位の目標発生符号量を満
足させることも可能となる。従って、本実施の形態3に
よる動画像符号化装置は、予め設定されていた1GOP
単位の目標発生符号量が低い場合であっても、従来のよ
うな固定レート符号化方法に比べると画質が向上する効
果が得られる。As described above, in the moving picture coding apparatus according to the third embodiment, the ratio of the frame complexity to be coded to the average frame complexity in the past is determined, and the target generation of the current frame is determined based on the ratio. Since the code amount is obtained, it is possible to encode the current frame with an appropriate target generated code amount according to the frame complexity, and it is also possible to satisfy the target generated code amount in GOP units. Becomes Therefore, the moving picture coding apparatus according to the third embodiment uses the preset 1 GOP
Even when the target generated code amount per unit is low, the effect of improving the image quality can be obtained as compared with the conventional fixed rate coding method.
【0101】なお、本実施の形態1〜3における符号化
方法は、MPEG2方式を基にして説明したが、これは
量子化幅により発生符号量を制御する方法(H.261
方式,Motion JPEG方式等)であれば、どの
ような符号化方法であってもよい。Although the encoding method according to the first to third embodiments has been described based on the MPEG2 method, this method controls the generated code amount by the quantization width (H.261).
System, Motion JPEG system, etc.).
【0102】また、本実施の形態1〜3における動画像
の単位は、フレームとして説明したが、フィールドであ
ってもよい。Although the unit of a moving image in the first to third embodiments has been described as a frame, it may be a field.
【0103】また、本実施の形態1〜3における(数
6)の式は、GOP換算の複雑度XgとGOP換算の平
均複雑度AvgXgの比をそのまま割り当て符号量Tg
に反映させたものであるが、割り当て符号量TgがXg
/AvgXgに対して単純増加関数になるのであれば、
どのような反映方法であってもよい。例えば、(数6)
の代わりに(数26)のような式が考えられる。In the equations (Equation 6) in the first to third embodiments, the ratio between the GOP-converted complexity Xg and the GOP-converted average complexity AvgXg is directly assigned to the code amount Tg.
, But the allocated code amount Tg is Xg
If / AvgXg is a simple increasing function,
Any reflection method may be used. For example, (Equation 6)
Equation (26) can be used instead of
【0104】[0104]
【数26】 (Equation 26)
【0105】また、本実施の形態1〜3において、平均
フレーム複雑度AvgXi,AvgXp,AvgXb
は、シーケンスの先頭からの平均値としたが、これは現
在符号化しようとしているフレームの直前の数GOP分
のフレームの平均値としてもよい。例えば、現在符号化
しようとしているフレームがIピクチャであって、その
直前のG個のフレームのフレーム複雑度の平均値を平均
フレーム複雑度として用いるとすると、ステップ307
での(数9)〜(数11)の計算(数27)のようにな
る。In the first to third embodiments, the average frame complexity AvgXi, AvgXp, AvgXb
Is the average value from the beginning of the sequence, but this may be the average value of frames for several GOPs immediately before the frame currently being encoded. For example, if the frame currently being encoded is an I picture, and the average value of the frame complexity of the G frames immediately before it is used as the average frame complexity, step 307
(Equation 27) as shown in (Equation 27).
【0106】[0106]
【数27】 [Equation 27]
【0107】(数27)における右辺のAvgXiは更
新前の値、左辺のAvgXiは更新後の値である。In Equation (27), AvgXi on the right side is a value before update, and AvgXi on the left side is a value after update.
【0108】また、本実施の形態1〜3において、各ピ
クチャタイプの先頭フレームの符号化は、ステップ30
1で設定したXi,Xp,Xb,AvgXi,AvgX
p,AvgXbの初期値によりフレーム目標発生符号量
またはフレーム目標量子化幅を求め、これらフレーム目
標発生符号量またはフレーム目標量子化幅を用いて符号
化したが、固定の量子化幅を用いて符号化してもよい。In the first to third embodiments, the encoding of the first frame of each picture type is performed in step 30.
Xi, Xp, Xb, AvgXi, AvgX set in 1
The frame target generated code amount or the frame target quantization width is obtained from the initial values of p and AvgXb, and the coding is performed using the frame target generated code amount or the frame target quantization width. However, the coding is performed using the fixed quantization width. It may be.
【0109】また、本実施の形態1〜3において、フレ
ーム目標発生符号量Tの値をそのまま用いて入力フレー
ムの符号化を行っていたが、フレーム目標発生符号量T
に対して最大値,最小値の制限を設けてもよい。この場
合、図3,図4に示したフローチャートは、それぞれ図
7(a) ,(b) に示すようなものとなる。この図7の最大
値,最小値の制限を設定するというステップ701の処
理は、(数28)により行うものとする。In the first to third embodiments, the input frame is encoded using the value of the frame target generated code amount T as it is.
May be limited to a maximum value and a minimum value. In this case, the flowcharts shown in FIGS. 3 and 4 are as shown in FIGS. 7 (a) and 7 (b), respectively. The process of step 701 of setting the maximum and minimum values in FIG. 7 is performed according to (Equation 28).
【0110】[0110]
【数28】 [Equation 28]
【0111】(数28)におけるTmax,Tmin
は、それぞれフレーム目標発生符号量Tに対する最大
値,最小値である。この制限は1GOP単位のフレーム
目標発生符号量Tgに対して行ってもよい。Tmax and Tmin in (Equation 28)
Are the maximum and minimum values for the frame target generated code amount T, respectively. This restriction may be applied to the frame target generated code amount Tg in GOP units.
【0112】[0112]
【発明の効果】以上のように本発明による動画像符号化
装置では、動画像を符号化する際、画面内の発生符号量
と画面内の量子化幅の平均値とを乗じた値を画面複雑度
とし、過去の画面複雑度の平均値に対する現在の画面複
雑度の割合を基に、画面の目標発生符号量または目標量
子化幅を決定するようにしたので、画面の複雑度に応じ
た目標発生符号量または目標量子化幅を各画面に割り当
てることが可能となり、かつ、1GOP単位の目標発生
符号量を満足することも可能となる。従って、本発明に
よる動画像符号化装置は、予め設定されていた目標発生
符号量が低い場合であっても、従来のような固定レート
符号化方法に比べると画質が飛躍的に向上する効果が得
られる。As described above, in the moving picture coding apparatus according to the present invention, when coding a moving picture, the value obtained by multiplying the generated code amount in the screen by the average value of the quantization width in the screen is used. As the complexity, and based on the ratio of the current screen complexity to the average of the past screen complexity, the target generated code amount or the target quantization width of the screen is determined. The target generated code amount or the target quantization width can be allocated to each screen, and the target generated code amount in one GOP can be satisfied. Therefore, the moving picture coding apparatus according to the present invention has an effect that the picture quality is dramatically improved as compared with the conventional fixed rate coding method even when the preset target generated code amount is low. can get.
【図1】本発明の実施の形態1による動画像符号化装置
の構成を示すブロック図である。FIG. 1 is a block diagram illustrating a configuration of a video encoding device according to Embodiment 1 of the present invention.
【図2】本発明の動画像符号化装置に入力される動画像
を構成するフレーム,マクロブロック,ブロックを説明
するための図である。FIG. 2 is a diagram for explaining frames, macro blocks, and blocks constituting a moving image input to the moving image encoding device of the present invention.
【図3】本実施の形態1による符号量制御器の動作を示
すフローチャート図である。FIG. 3 is a flowchart showing an operation of the code amount controller according to the first embodiment.
【図4】本実施の形態1における量子化幅と発生符号量
の時間的推移の例を示す図である。FIG. 4 is a diagram illustrating an example of a temporal transition of a quantization width and a generated code amount according to the first embodiment.
【図5】本実施の形態2による符号量制御器の動作を示
すフローチャート図である。FIG. 5 is a flowchart showing an operation of a code amount controller according to the second embodiment.
【図6】本実施の形態3による動画像符号化装置のブロ
ック図である。FIG. 6 is a block diagram of a video encoding device according to a third embodiment.
【図7】本実施の形態2による符号量制御器の動作の例
を示すフローチャート図である。FIG. 7 is a flowchart illustrating an example of an operation of a code amount controller according to the second embodiment.
【図8】本実施の形態2による符号量制御器の構成の例
を示すブロック図である。FIG. 8 is a block diagram illustrating an example of a configuration of a code amount controller according to the second embodiment.
100,603,604 動画像符号化装置、101
ブロック変換器、102 差分器、103,111 ス
イッチ、104 直交変換器、105 量子化器、10
6 符号量制御器、107 可変長符号化器、108
バッファ、109 逆量子化器、110 逆直交変換
器、112 動き補償予測器、113,601 フレー
ムメモリ、114 加算器、201〜227 フレー
ム、602複雑度演算器、801 アクティビティ計算
器。100, 603, 604 Video encoding device, 101
Block converter, 102 differentiator, 103, 111 switch, 104 orthogonal transformer, 105 quantizer, 10
6 Code amount controller, 107 Variable length encoder, 108
Buffer, 109 inverse quantizer, 110 inverse orthogonal transformer, 112 motion compensation predictor, 113,601 frame memory, 114 adder, 201-227 frames, 602 complexity calculator, 801 activity calculator.
Claims (19)
複数のブロックに分割するブロック変換手段と、 上記ブロック変換手段により分割された上記各画面の複
数のブロックを、それぞれ係数に変換する画像変換手段
と、 上記画像変換手段により変換された上記各画面の複数の
ブロックの係数を、量子化幅を用いて量子化する量子化
手段と、 上記量子化手段により量子化された上記各画面の複数の
ブロックの係数から、上記各画面の符号列を生成する符
号列生成手段と、 上記符号列生成手段により生成された上記各画面の符号
列から、上記各画面内の発生符号量を計数する符号量計
数手段と、 上記量子化手段で用いた量子化幅の平均値を求める平均
値演算手段と、 上記符号量計数手段により計数された発生符号量と上記
平均値演算手段により演算された量子化幅の平均値とを
乗じた値を上記各画面の画面複雑度として演算する複雑
度演算手段と、 上記複雑度演算手段により演算された過去の画面の平均
画面複雑度を求め、該過去の画面の平均画面複雑度に対
する上記複雑度演算手段により演算された現在の画面の
画面複雑度の割合を求め、その割合から次の画面の目標
発生符号量を決定し、該目標発生符号量を用いて次の画
面の量子化幅を求め、該量子化幅を上記量子化手段に出
力する目標符号量決定手段と、を具備することを特徴と
する動画像符号化装置。1. A block conversion unit that divides each screen of a moving image composed of a plurality of screens into a plurality of blocks, and converts a plurality of blocks of each screen divided by the block conversion unit into coefficients. Image conversion means, quantization means for quantizing coefficients of a plurality of blocks of each screen converted by the image conversion means using a quantization width, and each screen quantized by the quantization means Code string generating means for generating a code string for each screen from the coefficients of the plurality of blocks; and counting the amount of code generated in each screen from the code string for each screen generated by the code string generating means. Code amount counting means for calculating, an average value calculating means for calculating an average value of the quantization width used by the quantization means, and a generated code amount counted by the code amount counting means and the average value calculating means. A complexity calculating means for calculating a value obtained by multiplying the average value of the calculated quantization width as the screen complexity of each screen, and an average screen complexity of a past screen calculated by the complexity calculating means. Calculating the ratio of the screen complexity of the current screen calculated by the complexity calculating means to the average screen complexity of the past screen, and determining the target generated code amount of the next screen from the ratio; A moving image encoding apparatus comprising: a target code amount determining unit that obtains a quantization width of a next screen using a generated code amount and outputs the quantization width to the quantization unit.
て、 上記目標符号量決定手段は、画面のピクチャタイプ(I
ピクチャ,Pピクチャ,Bピクチャ)のそれぞれにつ
き、第1の過去の画面の平均画面複雑度から単位時間あ
たりの第2の過去の画面の平均画面複雑度を求め、第1
の現在の画面の画面複雑度及び第1の過去の該現在の画
面以外の2つの画面の画面複雑度から、単位時間あたり
の第2の現在の画面の画面複雑度を求め、上記第2の過
去の画面の平均画面複雑度に対する上記第2の現在の画
面の画面複雑度の割合から次の画面の目標発生符号量を
決定し、該目標発生符号量を用いて次の画面の量子化幅
を求め、該量子化幅を上記量子化手段に出力するもので
あることを特徴とする動画像符号化装置。2. The moving picture coding apparatus according to claim 1, wherein said target code amount determining means includes a picture type (I) of a screen.
Picture, P picture, B picture), the average screen complexity of the second past screen per unit time is determined from the average screen complexity of the first past screen,
The screen complexity of the second current screen per unit time is obtained from the screen complexity of the current screen and the screen complexity of two screens other than the current screen of the first past in the second past. A target generated code amount for the next screen is determined from the ratio of the screen complexity of the second current screen to the average screen complexity of the past screen, and the quantization width of the next screen is determined using the target generated code amount. And outputting the quantization width to the quantization means.
て、 上記動画像符号化装置は、所定の目標平均符号化レート
と上記符号量計数手段により計数された発生符号量とか
ら割り当て可能符号残量を求め、その割り当て可能符号
残量を保持する仮想バッファ手段を具備したものであ
り、 上記目標符号量決定手段は、画面のピクチャタイプ(I
ピクチャ,Pピクチャ,Bピクチャ)のそれぞれにつ
き、第1の過去の画面の平均画面複雑度から単位時間あ
たりの第2の過去の画面の平均画面複雑度を求め、第1
の現在の画面の画面複雑度及び第1の過去の該現在の画
面以外の2つの画面の画面複雑度から、単位時間あたり
の第2の現在の画面の画面複雑度を求め、上記第2の過
去の画面の平均画面複雑度に対する上記第2の現在の画
面の画面複雑度の割合と上記仮想バッファに保持された
単位時間あたりの割り当て可能符号残量との比率から次
の画面の目標発生符号量を決定し、該目標発生符号量を
用いて次の画面の量子化幅を求め、該量子化幅を上記量
子化手段に出力するものであることを特徴とする動画像
符号化装置。3. The moving picture coding apparatus according to claim 1, wherein said moving picture coding apparatus assigns a code that can be assigned from a predetermined target average coding rate and a generated code amount counted by said code amount counting means. Virtual buffer means for obtaining the remaining amount and holding the allocatable code remaining amount, wherein the target code amount determining means includes a picture type (I
Picture, P picture, B picture), the average screen complexity of the second past screen per unit time is determined from the average screen complexity of the first past screen,
The screen complexity of the second current screen per unit time is obtained from the screen complexity of the current screen and the screen complexity of two screens other than the current screen of the first past in the second past. From the ratio of the ratio of the screen complexity of the second current screen to the average screen complexity of the past screen and the allocatable code remaining per unit time held in the virtual buffer, the target generated code of the next screen A moving picture coding apparatus characterized in that the amount is determined, the quantization width of the next screen is determined using the target generated code amount, and the quantization width is output to the quantization means.
複数のブロックに分割するブロック変換手段と、 上記ブロック変換手段により分割された上記各画面の複
数のブロックを、それぞれ係数に変換する画像変換手段
と、 上記画像変換手段により変換された上記各画面の複数の
ブロックの係数を、量子化幅を用いて量子化する量子化
手段と、 上記量子化手段により量子化された上記各画面の複数の
ブロックの係数から、上記各画面の符号列を生成する符
号列生成手段と、 上記符号列生成手段により生成された上記各画面の符号
列から、上記各画面内の発生符号量を計数する符号量計
数手段と、 上記量子化手段で用いた量子化幅の平均値を求める平均
値演算手段と、 上記符号量計数手段により計数された発生符号量と上記
平均値演算手段により演算された量子化幅の平均値とを
乗じた値を上記各画面の画面複雑度として演算する複雑
度演算手段と、 上記複雑度演算手段により演算された過去の画面の平均
画面複雑度を求め、該過去の画面の平均画面複雑度に対
する上記複雑度演算手段により演算された現在の画面の
画面複雑度の割合を求め、その割合から次の画面の目標
量子化幅を決定し、該目標量子化幅を上記量子化手段に
出力する目標量子化幅決定手段と、を具備することを特
徴とする動画像符号化装置。4. A block converting means for dividing each screen of a moving image composed of a plurality of screens into a plurality of blocks, and converting the plurality of blocks of each screen divided by the block converting means into coefficients. Image conversion means, quantization means for quantizing coefficients of a plurality of blocks of each screen converted by the image conversion means using a quantization width, and each screen quantized by the quantization means Code string generating means for generating a code string for each screen from the coefficients of the plurality of blocks; and counting the amount of code generated in each screen from the code string for each screen generated by the code string generating means. Code amount counting means for calculating, an average value calculating means for calculating an average value of the quantization width used by the quantization means, and a generated code amount counted by the code amount counting means and the average value calculating means. A complexity calculating means for calculating a value obtained by multiplying the average value of the calculated quantization width as the screen complexity of each screen, and an average screen complexity of a past screen calculated by the complexity calculating means. Determining the ratio of the screen complexity of the current screen calculated by the complexity calculating means to the average screen complexity of the past screen, and determining the target quantization width of the next screen from the ratio; A moving image encoding apparatus, comprising: a target quantization width determining unit that outputs a quantization width to the quantization unit.
て、 上記目標量子化幅決定手段は、画面のピクチャタイプ
(Iピクチャ,Pピクチャ,Bピクチャ)のそれぞれに
つき、第1の過去の画面の平均画面複雑度から単位時間
あたりの第2の過去の画面の平均画面複雑度を求め、第
1の現在の画面の画面複雑度及び第1の過去の該現在の
画面以外の2つの画面の画面複雑度から、単位時間あた
りの第2の現在の画面の画面複雑度を求め、上記第2の
過去の画面の平均画面複雑度に対する上記第2の現在の
画面の画面複雑度の割合から次の画面の目標量子化幅を
決定し、該目標量子化幅を上記量子化手段に出力するも
のであることを特徴とする動画像符号化装置。5. The moving picture coding apparatus according to claim 4, wherein said target quantization width determining means determines a first past picture for each picture type (I picture, P picture, B picture) of the picture. The average screen complexity of the second past screen per unit time is calculated from the average screen complexity of the first screen, and the screen complexity of the first current screen and the two screens other than the current screen of the first past are obtained. The screen complexity of the second current screen per unit time is obtained from the screen complexity, and the following is calculated from the ratio of the screen complexity of the second current screen to the average screen complexity of the second past screen. A moving image encoding apparatus for determining a target quantization width of the screen of (1) and outputting the target quantization width to the quantization means.
て、 上記動画像符号化装置は、所定の目標平均符号化レート
と上記符号量計数手段により計数された発生符号量とか
ら割り当て可能符号残量を求め、その割り当て可能符号
残量を保持する仮想バッファ手段を具備したものであ
り、 上記目標量子化幅決定手段は、画面のピクチャタイプ
(Iピクチャ,Pピクチャ,Bピクチャ)のそれぞれに
つき、第1の過去の画面の平均画面複雑度から単位時間
あたりの第2の過去の画面の平均画面複雑度を求め、第
1の現在の画面の画面複雑度及び第1の過去の該現在の
画面以外の2つの画面の画面複雑度から、単位時間あた
りの第2の現在の画面の画面複雑度を求め、上記第2の
過去の画面の平均画面複雑度に対する上記第2の現在の
画面の画面複雑度の割合と上記仮想バッファに保持され
た単位時間あたりの割り当て可能符号残量との比率から
次の画面の目標量子化幅を決定し、該目標量子化幅を上
記量子化手段に出力するものであることを特徴とする動
画像符号化装置。6. The moving picture coding apparatus according to claim 4, wherein said moving picture coding apparatus assigns a code that can be assigned from a predetermined target average coding rate and a generated code amount counted by said code amount counting means. Virtual buffer means for obtaining the remaining amount and holding the allocatable code remaining amount, wherein the target quantization width determining means is provided for each picture type (I picture, P picture, B picture) of the screen. Calculating the average screen complexity of the second past screen per unit time from the average screen complexity of the first past screen, and calculating the screen complexity of the first current screen and the current past of the first past. The screen complexity of the second current screen per unit time is obtained from the screen complexity of two screens other than the screen, and the second current screen of the second current screen is compared with the average screen complexity of the second past screen. Screen Determining the target quantization width for the next screen from the ratio of the degree of the degree and the remaining amount of assignable codes per unit time held in the virtual buffer, and outputting the target quantization width to the quantization means. A moving picture coding apparatus, characterized in that:
画像符号化装置において、 上記目標符号量決定手段により決定された目標発生符号
量を、現在の画面に対する目標発生符号量とすることを
特徴とする動画像符号化装置。7. The moving picture coding apparatus according to claim 1, wherein the target generated code amount determined by said target code amount determining means is a target generated code amount for a current screen. A video encoding device characterized by the above-mentioned.
画像符号化装置において、 上記目標量子化幅決定手段により決定された目標量子化
幅を、現在の画面に対する目標量子化幅とすることを特
徴とする動画像符号化装置。8. The video encoding apparatus according to claim 4, wherein the target quantization width determined by said target quantization width determination means is set as a target quantization width for a current screen. A moving picture coding apparatus characterized by the above-mentioned.
画像符号化装置において、 上記目標符号量決定手段により決定された目標発生符号
量に対して、上限値と下限値を設定することを特徴とす
る動画像符号化装置。9. The moving picture coding apparatus according to claim 1, wherein an upper limit value and a lower limit value are set for the target generated code amount determined by the target code amount determining means. A video encoding device characterized by the above-mentioned.
動画像符号化装置において、 上記目標量子化幅決定手段により決定された目標量子化
幅に対して、上限値と下限値を設定することを特徴とす
る動画像符号化装置。10. The moving picture coding apparatus according to claim 4, wherein an upper limit value and a lower limit value are set for the target quantization width determined by said target quantization width determination means. A moving picture coding apparatus characterized by the above-mentioned.
動画像符号化装置において、 画面のピクチャタイプ(Iピクチャ,Pピクチャ,Bピ
クチャ)のそれぞれにつき、上記目標量子化幅決定手段
により決定された目標量子化幅に対して所定の係数を乗
じ、その値を上記目標量子化幅とすることを特徴とする
動画像符号化装置。11. The moving picture coding apparatus according to claim 4, wherein each of the picture types of the screen (I picture, P picture, B picture) is determined by said target quantization width determining means. A moving picture coding apparatus characterized in that the target quantization width is multiplied by a predetermined coefficient, and the value is used as the target quantization width.
動画像符号化装置において、 上記過去の画面複雑度の平均値を得るための過去の画面
数は、画面のピクチャタイプ(Iピクチャ,Pピクチ
ャ,Bピクチャ)の各々に対して、一定値であることを
特徴とする動画像符号化装置。12. The moving picture coding apparatus according to claim 1, wherein the number of past screens for obtaining the average value of the past screen complexity is a picture type of a screen (I picture, I picture, A moving picture encoding apparatus having a constant value for each of a P picture and a B picture.
動画像符号化装置において、 上記過去の画面複雑度の平均値を得るための過去の画面
数は、画面のピクチャタイプ(Iピクチャ,Pピクチ
ャ,Bピクチャ)の各々に対して、一定値であることを
特徴とする動画像符号化装置。13. The video encoding apparatus according to claim 4, wherein the number of past screens for obtaining the average value of the past screen complexity is a picture type (I picture, A moving picture encoding apparatus having a constant value for each of a P picture and a B picture.
おいて、 上記目標発生符号量決定手段により決定された目標発生
符号量Tと、上記過去の画面複雑度の平均値により上記
現在の画面複雑度を除した値Kは、K1<K2であると
きにf(K1)≦f(K2)となる関数f(K)に対し
て、T=f(K)を満たすものであることを特徴とする
動画像符号化装置。14. The moving picture encoding apparatus according to claim 1, wherein the current generated picture amount is determined by the target generated code amount determining means and an average value of the past screen complexity is used to calculate the current screen. The value K obtained by dividing the complexity satisfies T = f (K) for a function f (K) that satisfies f (K1) ≦ f (K2) when K1 <K2. Moving image encoding apparatus.
おいて、 上記目標符号量決定手段により決定された目標発生符号
量Tと、上記第3の画面複雑度により上記第4の画面複
雑度を除した値Kは、K1<K2であるときにf(K
1)≦f(K2)となる関数f(K)に対して、T=f
(K)を満たすものであることを特徴とする動画像符号
化装置。15. The moving picture coding apparatus according to claim 2, wherein the fourth screen complexity is calculated based on the target generated code amount T determined by the target code amount determining means and the third screen complexity. Is divided by f (K) when K1 <K2.
1) For a function f (K) that satisfies ≦ f (K2), T = f
(K) A moving picture coding apparatus characterized by satisfying (K).
おいて、 上記目標符号量決定手段により決定された目標発生符号
量Tと、上記第3の画面複雑度により上記第4の画面複
雑度を除した値Kは、単位時間当たりの割り当て可能符
号残量Rと、K1<K2であるときにg(K1,R)≦
g(K2,R),かつR1<R2であるときにg(K,
R2)≦g(K,R2)となる関数g(K,R)に対し
て、T=g(K,R)を満たすものであることを特徴と
する動画像符号化装置。16. The moving picture coding apparatus according to claim 3, wherein the fourth screen complexity is calculated based on the target generated code amount T determined by the target code amount determining means and the third screen complexity. Is divided by the remaining code amount R that can be allocated per unit time, and g (K1, R) ≦ when K1 <K2.
g (K2, R), and when R1 <R2, g (K,
R2) ≦ g (K, R2) A function g (K, R) that satisfies T = g (K, R) with respect to a function g (K, R).
おいて、 上記目標量子化幅決定手段により決定された目標量子化
幅Qは、上記過去の画面複雑度の平均値により上記現在
の画面複雑度を除した値Kと、K1<K2であるときに
f(K1)≧f(K2)となる関数fとに対して、Q=
f(K)を満たすものであることを特徴とする動画像符
号化装置。17. The moving picture coding apparatus according to claim 4, wherein the target quantization width Q determined by the target quantization width determination means is determined based on the average value of the past screen complexity. For a value K obtained by dividing the complexity and a function f satisfying f (K1) ≧ f (K2) when K1 <K2, Q =
A moving picture coding apparatus that satisfies f (K).
おいて、 上記目標量子化幅決定手段により決定した目標量子化幅
Qと、上記第3の画面複雑度により上記第4の画面複雑
度を除した値Kは、K1<K2であるときにf(K1)
≧f(K2)となる関数f(K)に対して、Q=f
(K)を満たすものであることを特徴とする動画像符号
化装置。18. The moving picture coding apparatus according to claim 5, wherein the fourth screen complexity is obtained based on the target quantization width Q determined by the target quantization width determining means and the third screen complexity. Is divided by f (K1) when K1 <K2.
For a function f (K) that satisfies ≧ f (K2), Q = f
(K) A moving picture coding apparatus characterized by satisfying (K).
おいて、 上記目標量子化幅決定手段により決定された目標量子化
幅Qと、上記第3の画面複雑度により上記第4の画面複
雑度を除した値Kは、単位時間当たりの上記割り当て可
能符号残量Rと、K1<K2であるときにg(K1,
R)≧g(K2,R),かつR1<R2であるときにg
(K,R2)≧g(K,R2)となる関数gに対して、
S=g(K,R)を満たすものであることを特徴とする
動画像符号化装置。19. The video encoding apparatus according to claim 6, wherein the fourth screen complexity is determined based on the target quantization width Q determined by the target quantization width determination means and the third screen complexity. The value K obtained by dividing the degree is the above-mentioned allocatable code remaining amount R per unit time and g (K1, K1) when K1 <K2.
R) ≧ g (K2, R), and when R1 <R2, g
For a function g such that (K, R2) ≧ g (K, R2),
A moving picture coding apparatus, wherein S = g (K, R) is satisfied.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP31721196A JP3872849B2 (en) | 1996-11-28 | 1996-11-28 | Video encoding device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP31721196A JP3872849B2 (en) | 1996-11-28 | 1996-11-28 | Video encoding device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH10164577A true JPH10164577A (en) | 1998-06-19 |
| JP3872849B2 JP3872849B2 (en) | 2007-01-24 |
Family
ID=18085713
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP31721196A Expired - Fee Related JP3872849B2 (en) | 1996-11-28 | 1996-11-28 | Video encoding device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3872849B2 (en) |
Cited By (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6600783B1 (en) | 1999-06-22 | 2003-07-29 | Victor Company Of Japan, Ltd. | Apparatus and method of encoding moving picture signal |
| JP2003531533A (en) * | 2000-04-18 | 2003-10-21 | コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ | Bitrate allocation in joint bitrate transcoding |
| US6718121B1 (en) | 1998-11-13 | 2004-04-06 | Victor Company Of Japan, Limited | Information signal processing apparatus using a variable compression rate in accordance with contents of information signals |
| KR100468726B1 (en) * | 2002-04-18 | 2005-01-29 | 삼성전자주식회사 | Apparatus and method for performing variable bit rate control in real time |
| US6879632B1 (en) | 1998-12-24 | 2005-04-12 | Nec Corporation | Apparatus for and method of variable bit rate video coding |
| KR100668324B1 (en) | 2005-01-21 | 2007-01-12 | 삼성전자주식회사 | Bit rate control method and apparatus for encoding image data |
| JP2007134758A (en) * | 2005-11-08 | 2007-05-31 | Nippon Hoso Kyokai <Nhk> | Video data compression device for video streaming |
| CN100380982C (en) * | 2004-01-13 | 2008-04-09 | 索尼株式会社 | Image coding method and device |
| JP2008124937A (en) * | 2006-11-14 | 2008-05-29 | Canon Inc | Image encoding apparatus |
| US7903732B2 (en) | 2004-11-04 | 2011-03-08 | Victor Company Of Japan, Ltd. | Method and apparatus for encoding a moving-picture signal by calculating the complexity of the moving-picture signal |
| JP2014017844A (en) * | 2001-09-12 | 2014-01-30 | Panasonic Corp | Distribution method and encoded image stream |
| WO2014050015A1 (en) * | 2012-09-26 | 2014-04-03 | パナソニック株式会社 | Image encoding device, captured image recording system, capture device, image encoding method, and image encoding program |
| JPWO2014199566A1 (en) * | 2013-06-13 | 2017-02-23 | 日本電気株式会社 | Non-transitory computer-readable medium storing moving picture coding apparatus, moving picture coding method, and program |
| JP2021520160A (en) * | 2018-10-31 | 2021-08-12 | ▲騰▼▲訊▼科技(深▲セン▼)有限公司 | Video coding methods, equipment, computer programs and computer equipment |
| US11323703B2 (en) | 2018-07-03 | 2022-05-03 | Nec Corporation | Moving-image encoding device, moving-image encoding method, and program |
-
1996
- 1996-11-28 JP JP31721196A patent/JP3872849B2/en not_active Expired - Fee Related
Cited By (20)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6718121B1 (en) | 1998-11-13 | 2004-04-06 | Victor Company Of Japan, Limited | Information signal processing apparatus using a variable compression rate in accordance with contents of information signals |
| US6879632B1 (en) | 1998-12-24 | 2005-04-12 | Nec Corporation | Apparatus for and method of variable bit rate video coding |
| US6922442B2 (en) | 1999-06-22 | 2005-07-26 | Victor Company Of Japan, Ltd. | Apparatus and method of encoding moving picture signal |
| US6600783B1 (en) | 1999-06-22 | 2003-07-29 | Victor Company Of Japan, Ltd. | Apparatus and method of encoding moving picture signal |
| JP2003531533A (en) * | 2000-04-18 | 2003-10-21 | コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ | Bitrate allocation in joint bitrate transcoding |
| JP2014017844A (en) * | 2001-09-12 | 2014-01-30 | Panasonic Corp | Distribution method and encoded image stream |
| KR100468726B1 (en) * | 2002-04-18 | 2005-01-29 | 삼성전자주식회사 | Apparatus and method for performing variable bit rate control in real time |
| CN100380982C (en) * | 2004-01-13 | 2008-04-09 | 索尼株式会社 | Image coding method and device |
| US7903732B2 (en) | 2004-11-04 | 2011-03-08 | Victor Company Of Japan, Ltd. | Method and apparatus for encoding a moving-picture signal by calculating the complexity of the moving-picture signal |
| KR100668324B1 (en) | 2005-01-21 | 2007-01-12 | 삼성전자주식회사 | Bit rate control method and apparatus for encoding image data |
| JP2007134758A (en) * | 2005-11-08 | 2007-05-31 | Nippon Hoso Kyokai <Nhk> | Video data compression device for video streaming |
| JP2008124937A (en) * | 2006-11-14 | 2008-05-29 | Canon Inc | Image encoding apparatus |
| WO2014050015A1 (en) * | 2012-09-26 | 2014-04-03 | パナソニック株式会社 | Image encoding device, captured image recording system, capture device, image encoding method, and image encoding program |
| JP2014068182A (en) * | 2012-09-26 | 2014-04-17 | Panasonic Corp | Image encoding device, photographed image recording system, imaging apparatus, image encoding method, and image encoding program |
| US10091521B2 (en) | 2012-09-26 | 2018-10-02 | Panasonic Intellectual Property Management Co., Ltd. | Image encoding device, captured image recording system, imaging device, method of encoding image, and image encoding program |
| JPWO2014199566A1 (en) * | 2013-06-13 | 2017-02-23 | 日本電気株式会社 | Non-transitory computer-readable medium storing moving picture coding apparatus, moving picture coding method, and program |
| US10264260B2 (en) | 2013-06-13 | 2019-04-16 | Nec Corporation | Moving picture encoding in which base quantization is based on corrected macroblock complexity |
| US11323703B2 (en) | 2018-07-03 | 2022-05-03 | Nec Corporation | Moving-image encoding device, moving-image encoding method, and program |
| JP2021520160A (en) * | 2018-10-31 | 2021-08-12 | ▲騰▼▲訊▼科技(深▲セン▼)有限公司 | Video coding methods, equipment, computer programs and computer equipment |
| US11317097B2 (en) | 2018-10-31 | 2022-04-26 | Tencent Technology (Shenzhen) Company Limited | Video encoding method and apparatus, computer-readable storage medium, and computer device |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3872849B2 (en) | 2007-01-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4256574B2 (en) | Image signal encoding method and image signal encoding apparatus | |
| US7388995B2 (en) | Quantization matrix adjusting method for avoiding underflow of data | |
| JPH07184196A (en) | Image coding device | |
| JPH08251587A (en) | Image coded data rate conversion method and apparatus | |
| JP3872849B2 (en) | Video encoding device | |
| JP3259702B2 (en) | Moving picture variable bit rate coding apparatus and method | |
| JP3508916B2 (en) | Moving image variable bit rate encoding method and apparatus | |
| JP4362795B2 (en) | Video encoding apparatus and method | |
| JPH07203430A (en) | Image coding device | |
| JP3858520B2 (en) | Video encoding apparatus and method | |
| JP2001025015A (en) | Moving image encoder and method therefor | |
| JP3341842B2 (en) | Buffer management method | |
| JPH1174799A (en) | Processing method of variable length encoding data and buffer controller | |
| JPH10108197A (en) | Image encoding device, image encoding control method, and medium recording image encoding control program | |
| JP3425130B2 (en) | Encoding device and encoding method | |
| JPH09191458A (en) | Moving image compression coding method and its device | |
| JPH11205803A (en) | Encoding device and encoding method | |
| JP3779066B2 (en) | Video encoding device | |
| JP2900927B2 (en) | Encoding method and encoding device | |
| JP3341839B2 (en) | Image signal encoding buffer management device | |
| JP3934772B2 (en) | Variable transfer rate encoding method and apparatus | |
| JP3310276B2 (en) | Image signal encoding device | |
| JP3922581B2 (en) | Variable transfer rate encoding method and apparatus | |
| JP3341841B2 (en) | Buffer management device | |
| JP3310277B2 (en) | Image signal encoding method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20060104 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060131 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060329 |
|
| 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: 20061003 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20061023 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091027 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101027 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111027 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121027 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |