JPH1042293A - Encoding controller, encoding device and encoding control method - Google Patents

Encoding controller, encoding device and encoding control method

Info

Publication number
JPH1042293A
JPH1042293A JP20907396A JP20907396A JPH1042293A JP H1042293 A JPH1042293 A JP H1042293A JP 20907396 A JP20907396 A JP 20907396A JP 20907396 A JP20907396 A JP 20907396A JP H1042293 A JPH1042293 A JP H1042293A
Authority
JP
Japan
Prior art keywords
code amount
block
frame
encoding
estimated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP20907396A
Other languages
Japanese (ja)
Inventor
Kazushige Sakai
一重 酒井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Columbia Co Ltd
Original Assignee
Nippon Columbia Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Columbia Co Ltd filed Critical Nippon Columbia Co Ltd
Priority to JP20907396A priority Critical patent/JPH1042293A/en
Publication of JPH1042293A publication Critical patent/JPH1042293A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To suppress the deterioration of a picture and to prevent the occurrence of a fault in a reproduction processing in a decoder by judging estimated code quantity for respective blocks in a frame and adjusting the generated code quantity of the blocks in accordance with estimated code quantity. SOLUTION: A code quantity estimation means 1 estimates code quantity for the respective blocks of the frame for this time by executing temporary encoding on the frame for this time and the frame for previous time. A code quantity judgment means 2 judges whether estimated quantity obtained in the code quantity estimation means 1 is less than a prescribed threshold TH or not for the respective blocks. The average value of the estimated code quantity of the respective blocks in the prescribed frame can be used for the threshold. A code quantity adjustment means 3 adjusts the generated code quantity of the block in accordance with the estimated code quantity on the block whose estimated code quantity is less than the prescribed threshold. An encoding means 4 executes an encoding processing for the respective blocks on data in the prescribed frame so that code quantity for the respective blocks becomes code quantity adjusted by the code quantity adjusting means 3.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、JPEGやMPE
Gなどに適用可能であり、可変転送レートに適した符号
化制御装置および符号化装置および符号化制御方法に関
する。
[0001] The present invention relates to JPEG and MPE.
The present invention relates to an encoding control device, an encoding device, and an encoding control method applicable to G and the like and suitable for a variable transfer rate.

【0002】[0002]

【従来の技術】従来、CD−ROMなどを記録媒体とす
る記録・再生システム(デジタル画像符号化復号化シス
テム)などに利用される画像データの圧縮装置として、
例えば特開平4−177990号に示されているような
圧縮装置が知られている。
2. Description of the Related Art Conventionally, as a compression apparatus for image data used in a recording / reproducing system (digital image encoding / decoding system) using a CD-ROM or the like as a recording medium,
For example, a compression device as disclosed in Japanese Patent Application Laid-Open No. 4-177990 is known.

【0003】この圧縮装置では、DCT(離散コサイン
変換)などの直交変換と、量子化と、可変長符号化とを
順次組合せて行なうハイブリッド符号化方式(データ圧
縮のための符号化方式の典型的なもの)を用いる場合
に、画面の状態に応じたデータ量の変動に伴なうフレー
ムごとの圧縮データのビット量の変動を抑え、符号量が
ほぼ一定となるように符号化制御を行ない、復号化器
(再生)及び伝送系側の複雑さを軽減することを意図して
いる。
In this compression apparatus, a hybrid coding method (a typical coding method for data compression) is performed by sequentially combining orthogonal transform such as DCT (discrete cosine transform), quantization and variable length coding. In the case of using, the encoding control is performed so that the variation of the bit amount of the compressed data for each frame due to the variation of the data amount according to the state of the screen is suppressed, and the encoding amount is substantially constant, Decoder
It is intended to reduce (playback) and complexity on the transmission side.

【0004】すなわち、この圧縮装置は、基本的には、
直交変換手段の出力を量子化手段により変更可能な量子
化特性のもとで量子化し、この量子化出力を可変長符号
化手段により可変長符号化して圧縮画像データとすると
き、符号量制御手段において、この圧縮画像データの符
号量を検出し、その変動を抑圧する方向に量子化手段の
量子化特性を変更制御するようにしている。これによ
り、画像フレーム内において、圧縮画像データの符号量
は、画像フレーム内の各符号化ブロックごとに、ほぼ一
定のものとなり、この圧縮装置を符号化器の符号化に用
いる場合に、伝送系での処理負担を軽減することが可能
となる。
[0004] That is, this compression device is basically
When the output of the orthogonal transform means is quantized under quantization characteristics that can be changed by the quantizing means, and the quantized output is subjected to variable-length encoding by the variable-length encoding means to obtain compressed image data, the code amount control means In this method, the code amount of the compressed image data is detected, and the quantization characteristic of the quantization means is changed and controlled so as to suppress the fluctuation. As a result, in the image frame, the code amount of the compressed image data becomes substantially constant for each coding block in the image frame, and when this compression apparatus is used for encoding by the encoder, the transmission system Processing load can be reduced.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上述し
た従来の圧縮装置(符号化制御方法)では、画像フレーム
内の各符号化ブロックのスペクトル成分やその分布とは
無関係に、符号化ブロック毎に一定の符号量を発生させ
るように符号量割り当てがなされることにより、符号量
制御を安定して行なうことができる代わりに、高周波ス
ペクトルの多いブロックほど符号化効率が劣化し易く、
符号化ブロック全体のS/Nが劣化し、さらに、画像劣
化が目立ち易いという欠点があった。
However, in the above-described conventional compression apparatus (encoding control method), a constant value is set for each encoded block, irrespective of the spectral component of each encoded block in an image frame and its distribution. Since the code amount is allocated so as to generate the code amount of, the code amount can be stably controlled, but the coding efficiency is likely to be degraded in a block having a high frequency spectrum,
There is a drawback that the S / N of the entire coded block is deteriorated and that the image deterioration is conspicuous.

【0006】一方、これとは逆に、画像フレーム内の各
符号化ブロックを一定の再量子化階調で符号化すれば、
画像劣化の不自然さを軽減することができるが、画像フ
レーム全体の符号量を所望の符号量(目標符号量)に制御
することが困難となる。具体的には、符号量制御がなさ
れない場合には、伝送チャンネルの単位時間当たりの伝
送情報容量を超過したり、再生バッファ容量等の条件が
満たされなく、再生処理等に支障が生ずるという問題が
ある。
On the other hand, if each coded block in an image frame is coded with a constant requantized gradation,
Although the unnaturalness of image deterioration can be reduced, it is difficult to control the code amount of the entire image frame to a desired code amount (target code amount). More specifically, if the code amount control is not performed, the transmission information capacity per unit time of the transmission channel will be exceeded, and the conditions such as the reproduction buffer capacity will not be satisfied, and the reproduction processing will be hindered. There is.

【0007】このように、画像フレームの情報量に合わ
せて符号化を行なう可変ビットレートコーディングで
は、一定の再量子化階調で符号化がなされるように符号
化制御を行なう場合には例えば復号化器での再生処理等
に支障が生ずることがあり、また、一定の符号量で符号
化がなされるように符号化制御を行なう場合には、画像
劣化が目立ち易くなるなどの、互いに相反する問題があ
った。
As described above, in variable bit rate coding in which coding is performed in accordance with the information amount of an image frame, when coding control is performed so that coding is performed at a constant requantization gradation, decoding is performed, for example. In some cases, there may be a problem in the reproduction processing in the encoder, and in the case where the encoding control is performed so that the encoding is performed with a constant code amount, the image deterioration becomes conspicuous, and contradictory to each other. There was a problem.

【0008】本発明は、画像フレームの情報量に合わせ
て符号化を行なう場合に、画像劣化を抑え(画像劣化を
目立ちにくくし)、かつ、例えば復号化器での再生処理
に支障が生じないように、最適な符号化制御を行なうこ
との可能な符号化制御装置および符号化装置および符号
化制御方法を提供することを目的としている。
According to the present invention, when encoding is performed in accordance with the amount of information of an image frame, image deterioration is suppressed (image deterioration is made inconspicuous), and, for example, there is no trouble in reproduction processing in a decoder. It is an object of the present invention to provide an encoding control device, an encoding device, and an encoding control method capable of performing optimal encoding control.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するため
に、請求項1記載の発明は、所定フレーム内のデータに
対する符号化制御を行なう符号化制御装置であって、所
定フレーム内のデータについて、所定フレーム内の各ブ
ロックごとの推定符号量が所定閾値以下であるか否かを
各ブロックごとにそれぞれ判定する符号量判定手段と、
推定符号量が所定閾値以下であるブロックについて、そ
の推定符号量の多少に応じて、該ブロックの発生符号量
の調整を行なう符号量調整手段とを備えていることを特
徴としている。
According to one aspect of the present invention, there is provided an encoding control apparatus for performing encoding control on data in a predetermined frame. A code amount determining unit that determines whether the estimated code amount of each block in a predetermined frame is equal to or smaller than a predetermined threshold for each block,
For a block having an estimated code amount equal to or smaller than a predetermined threshold, a code amount adjusting means for adjusting the generated code amount of the block according to the estimated code amount is provided.

【0010】また、請求項2記載の発明は、請求項1記
載の符号化制御装置において、所定の閾値には、所定フ
レーム内での各ブロックの推定符号量の平均値を用いる
ことを特徴としている。
According to a second aspect of the present invention, in the encoding control apparatus according to the first aspect, an average value of the estimated code amount of each block in a predetermined frame is used as the predetermined threshold value. I have.

【0011】また、請求項3記載の発明は、請求項1記
載の符号化制御装置において、符号量調整手段は、推定
符号量が所定閾値以下で推定符号量が最小値までのブロ
ックに対して、推定符号量の所定閾値と最小値との中間
において高い優先順位を与える評価パラメータ値を設定
し、その評価パラメータ値に基づいて、発生符号調整量
が僅かであれば評価パラメータ値が最も大きなグループ
にランクされるブロックのみ量子化パラメータを変化さ
せ、発生符号調整量が多ければ評価パラメータ値が低い
ブロックまで順次に一様に量子化パラメータを変化させ
て、ブロックの発生符号量の調整を行なうことを特徴と
している。
According to a third aspect of the present invention, in the encoding control apparatus of the first aspect, the code amount adjusting means includes a code amount adjusting unit for a block whose estimated code amount is equal to or less than a predetermined threshold value and whose estimated code amount reaches a minimum value. Setting an evaluation parameter value that gives a high priority between the predetermined threshold value and the minimum value of the estimated code amount, and, based on the evaluation parameter value, a group having the largest evaluation parameter value if the generated code adjustment amount is small. If the amount of generated code adjustment is large, the quantization parameter is changed only for blocks that rank low, and the quantization parameter is sequentially changed uniformly to blocks with lower evaluation parameter values to adjust the generated code amount of the block. It is characterized by.

【0012】また、請求項4記載の発明は、請求項1乃
至請求項3のいずれか一項に記載の符号化制御装置にお
いて、符号量調整手段は、所定フレーム全体の総符号量
が、該フレームに割り当てられた目標符号量に漸近する
ように、推定符号量が所定閾値以下であるブロックにつ
いて、その推定符号量の多少に応じて、該ブロックの発
生符号量の調整を行なうことを特徴としている。
According to a fourth aspect of the present invention, in the encoding control apparatus according to any one of the first to third aspects, the code amount adjusting means is configured to determine that the total code amount of the entire predetermined frame is equal to the total code amount. For a block whose estimated code amount is equal to or smaller than a predetermined threshold value, the generated code amount of the block is adjusted according to the estimated code amount so as to approach the target code amount allocated to the frame. I have.

【0013】また、請求項5記載の発明は、請求項4記
載の符号化制御装置において、所定フレーム内の各ブロ
ックごとの推定符号量および所定フレーム内の目標符号
量は、今回の所定フレームを仮の符号化手段で符号化す
ることによって割り出されるか、あるいは、前回のフレ
ームに基づいて推測されることを特徴としている。
According to a fifth aspect of the present invention, in the encoding control apparatus according to the fourth aspect, the estimated code amount for each block in the predetermined frame and the target code amount in the predetermined frame are determined based on the current predetermined frame. It is characterized in that it is determined by encoding with a temporary encoding means, or is estimated based on the previous frame.

【0014】また、請求項6記載の発明は、所定フレー
ム内のデータに対し、各ブロックごとの符号化を行なう
符号化装置であって、所定フレーム内のデータについて
各ブロックごとの符号量の推定を行なう符号量推定手段
と、符号量推定手段で推定された各ブロックごとの推定
符号量が所定閾値以下であるか否かを各ブロックごとに
それぞれ判定する符号量判定手段と、推定符号量が所定
閾値以下であるブロックについて、その推定符号量の多
少に応じて、該ブロックの発生符号量の調整を行なう符
号量調整手段と、各ブロックごとの符号量が符号量調整
手段によって調整された符号量となるように、所定フレ
ーム内のデータに対して符号化処理を行なう符号化手段
とを備えていることを特徴としている。
According to a sixth aspect of the present invention, there is provided an encoding apparatus for encoding data in a predetermined frame for each block, and estimating a code amount for each block for data in a predetermined frame. Code amount estimating means for performing the following, code amount determining means for determining, for each block, whether or not the estimated code amount for each block estimated by the code amount estimating means is equal to or smaller than a predetermined threshold value; Code amount adjusting means for adjusting the generated code amount of the block according to the estimated code amount of the block having a predetermined threshold value or less, and a code amount adjusted by the code amount adjusting means for each block. Encoding means for performing an encoding process on data in a predetermined frame so as to obtain an amount of data.

【0015】また、請求項7記載の発明は、請求項6記
載の符号化装置において、符号量推定手段は、今回のフ
レームに対して仮の符号化を行なうことによって符号量
を推定するか、あるいは、前回のフレームに基づいて今
回のフレームの符号量を推定するようになっていること
を特徴としている。
According to a seventh aspect of the present invention, in the encoding apparatus according to the sixth aspect, the code amount estimating means estimates the code amount by performing provisional encoding on the current frame. Alternatively, it is characterized in that the code amount of the current frame is estimated based on the previous frame.

【0016】また、請求項8記載の発明は、請求項6記
載の符号化装置において、符号量調整手段は、所定フレ
ーム全体の総符号量が、該フレームに割り当てられた目
標符号量に漸近するように、推定符号量が所定閾値以下
であるブロックについて、その推定符号量の多少に応じ
て、該ブロックの発生符号量の調整を行なうことを特徴
としている。
According to an eighth aspect of the present invention, in the encoding apparatus according to the sixth aspect, the code amount adjusting means is arranged such that the total code amount of the entire predetermined frame approaches the target code amount allocated to the frame. As described above, for a block in which the estimated code amount is equal to or less than the predetermined threshold, the generated code amount of the block is adjusted according to the estimated code amount.

【0017】また、請求項9記載の発明は、請求項8記
載の符号化装置において、符号量調整手段は、推定符号
量の所定閾値と最小値との中間において高い優先順位を
与える評価パラメータ値を設定し、その評価パラメータ
値に基づいて、発生符号調整量が僅かであれば評価パラ
メータ値が最も大きなグループにランクされるブロック
のみ量子化パラメータを変化させ、発生符号調整量が多
ければ評価パラメータ値が低いブロックまで順次に一様
に量子化パラメータを変化させて再量子化階調の制御を
行ない所定フレームの符号化を行なうことを特徴として
いる。
According to a ninth aspect of the present invention, in the encoding apparatus according to the eighth aspect, the code amount adjusting means includes an evaluation parameter value which gives a high priority between a predetermined threshold value and a minimum value of the estimated code amount. Based on the evaluation parameter value, if the generated code adjustment amount is small, the quantization parameter is changed only for the block ranked in the group having the largest evaluation parameter value, and if the generated code adjustment amount is large, the evaluation parameter The present invention is characterized in that the quantization parameter is sequentially changed uniformly to the blocks having the lower values, the requantization gradation is controlled, and a predetermined frame is encoded.

【0018】また、請求項10記載の発明は、所定フレ
ーム内のデータに対する符号化制御を行なう符号化制御
方法であって、所定フレーム内のデータについて、所定
フレーム内の各フレームごとの推定符号量の多少を各ブ
ロックごとに判別し、推定符号量が多いブロックについ
ては、符号量の調整を行なわず、推定符号量がある程度
少ないブロックについて、符号量の調整を行なうことを
特徴としている。
According to a tenth aspect of the present invention, there is provided an encoding control method for performing encoding control on data in a predetermined frame, wherein the estimated code amount for each frame in the predetermined frame is determined for the data in the predetermined frame. Is determined for each block, and the code amount is not adjusted for a block with a large estimated code amount, but the code amount is adjusted for a block with a small estimated code amount to some extent.

【0019】また、請求項11記載の発明は、請求項1
0記載の符号化制御方法において、符号量の調整は、所
定フレーム全体の総符号量が、該フレームに割り当てら
れた目標符号量に漸近するように、推定符号量が所定閾
値以下であるブロックについて、その符号量の多少に応
じて、行なわれることを特徴としている。
The invention according to claim 11 is the first invention.
0, the code amount is adjusted for a block whose estimated code amount is equal to or less than a predetermined threshold so that the total code amount of the entire predetermined frame gradually approaches the target code amount allocated to the frame. , According to the amount of code.

【0020】また、請求項12記載の発明は、請求項1
1記載の符号化制御方法において、所定フレーム内の各
ブロックごとの推定符号量および所定フレーム内の目標
符号量は、今回の所定フレームを仮の符号化手段で符号
化することによって割り出されるか、あるいは、前回の
フレームに基づいて推測されることを特徴としている。
The invention according to claim 12 is the first invention.
In the encoding control method according to 1, the estimated code amount for each block in the predetermined frame and the target code amount in the predetermined frame are determined by coding the current predetermined frame by a temporary coding unit. Alternatively, the estimation is performed based on the previous frame.

【0021】請求項1乃至請求項12記載の発明では、
所定フレーム内のデータについて、所定フレーム内の各
フレームごとの推定符号量の多少を各ブロックごとに判
別し、推定符号量が多いブロックについては、符号量の
調整を行なわず、推定符号量がある程度少ないブロック
について、符号量の調整を行なうので、画像フレームの
情報量に合わせて符号化を行なう場合に、画像劣化を抑
え(画像劣化を目立ちにくくし)、かつ、例えば復号化器
での再生処理に支障が生じないように、最適な符号化制
御を行なうことができる。可変転送レートのデータチャ
ンネルを持つ蓄積メディアなどにおいて、その利点を最
大限に活用し高効率な画像符号化でかつ均質な再生画像
品質の符号化を行ないつつ、メディアの制約事項や復号
化器の制約に合わせた発生符号量の制御を行なうことが
できる。
According to the first to twelfth aspects of the invention,
For the data in the predetermined frame, the amount of the estimated code amount for each frame in the predetermined frame is determined for each block. Since the code amount is adjusted for a small number of blocks, when coding is performed in accordance with the information amount of the image frame, image deterioration is suppressed (image deterioration is less noticeable) and, for example, reproduction processing by a decoder is performed. Optimal encoding control can be performed so as not to cause trouble. For storage media with a variable transfer rate data channel, etc., while making the most of its advantages and performing high-efficiency image coding and uniform playback image quality coding, The generated code amount can be controlled in accordance with the constraint.

【0022】[0022]

【発明の実施の形態】以下、本発明の実施の形態を図面
に基づいて説明する。図1は本発明に係る符号化装置
(符号化器)の構成例を示す図である。図1を参照する
と、この符号化装置は、所定フレーム内のデータについ
て各ブロックごとの符号量の推定を行なう符号量推定手
段1と、符号量推定手段1で推定された各ブロックごと
の推定符号量が所定閾値TH以下であるか否かを各ブロ
ックごとにそれぞれ判定する符号量判定手段2と、推定
符号量が所定閾値TH以下であるブロックについて、そ
の推定符号量の多少に応じて、該ブロックの発生符号量
の調整を行なう符号量調整手段3と、各ブロックごとの
符号量が符号量調整手段3によって調整された符号量と
なるように、所定フレーム内のデータに対して各ブロッ
クごとの符号化処理を行なう符号化手段4とを備えてい
る。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows an encoding apparatus according to the present invention.
FIG. 3 is a diagram illustrating a configuration example of an (encoder). Referring to FIG. 1, the encoding apparatus includes a code amount estimating unit 1 for estimating a code amount for each block for data in a predetermined frame, and an estimated code for each block estimated by the code amount estimating unit 1. A code amount determining means 2 for determining, for each block, whether or not the amount is equal to or less than a predetermined threshold value TH, and for a block having an estimated code amount equal to or less than the predetermined threshold value TH, A code amount adjusting means 3 for adjusting the generated code amount of the block; and a code amount adjusting means 3 for adjusting the code amount of each block to the code amount adjusted by the code amount adjusting means 3. And an encoding means 4 for performing the encoding process.

【0023】ここで、符号量推定手段1は、今回のフレ
ームに対して仮の符号化を行なうことによって今回のフ
レームの各ブロックごとの符号量を推定するか、あるい
は、前回のフレームに基づいて今回のフレームの各ブロ
ックごとの符号量を推定するようになっている。例え
ば、復号化器での再生を保証するため、再生時の復号化
器でデータバッファの状態をシミュレートし、各画像フ
レーム間の大域的符号量配分を決定し、これを推定符号
量として割り出すことができる。
Here, the code amount estimating means 1 estimates the code amount of each block of the current frame by performing provisional encoding on the current frame, or based on the previous frame. The code amount for each block of the current frame is estimated. For example, in order to guarantee reproduction by the decoder, the decoder simulates the state of the data buffer during reproduction, determines the global code amount distribution between each image frame, and determines this as the estimated code amount. be able to.

【0024】また、符号量判定手段2において、上記所
定の閾値THには、符号量推定手段1で推定された所定
フレーム内での各ブロックの推定符号量の平均値を用い
ることができる。
In the code amount determining means 2, an average value of the estimated code amount of each block in a predetermined frame estimated by the code amount estimating means 1 can be used as the predetermined threshold value TH.

【0025】また、符号量調整手段3は、前記所定フレ
ーム全体の総符号量が、該フレームに割り当てられた目
標符号量に漸近するように、推定符号量が所定閾値TH
以下であるブロックについて、その推定符号量の多少に
応じて、該ブロックの発生符号量の調整を行なうように
なっている。
The code amount adjusting means 3 adjusts the estimated code amount to a predetermined threshold TH so that the total code amount of the entire predetermined frame gradually approaches the target code amount allocated to the frame.
For the following blocks, the generated code amount of the block is adjusted according to the estimated code amount.

【0026】より具体的には、推定符号量の所定閾値T
Hと最小値との中間において高い優先順位を与える評価
パラメータ値を設定し、その評価パラメータ値に基づい
て、発生符号調整量が僅かであれば評価パラメータ値が
最も大きなグループにランクされるブロックのみ量子化
パラメータを変化させ、発生符号調整量が多ければ評価
パラメータ値が低いブロックまで順次に一様に量子化パ
ラメータを変化させて、該ブロックの発生符号量の調整
を行なうようになっている。
More specifically, a predetermined threshold value T of the estimated code amount
An evaluation parameter value that gives a high priority between H and the minimum value is set. Based on the evaluation parameter value, if the generated code adjustment amount is small, only the blocks ranked in the group with the highest evaluation parameter value If the quantization parameter is changed, and if the generated code adjustment amount is large, the quantization parameter is sequentially and uniformly changed to a block having a lower evaluation parameter value, and the generated code amount of the block is adjusted.

【0027】図2は後述のような推定符号量(局所符号
情報量)dに対する基準量子化パラメータQrefの補正係
数Aの関係を示す図であり、また、図3は後述のような
基準量子化パラメータQref,推定符号量(局所符号情報
量)dに対する評価パラメータ値uの関係を示す図であ
る。
FIG. 2 is a diagram showing the relationship between the correction coefficient A of the reference quantization parameter Qref and the estimated code amount (local code information amount) d as described later. FIG. 9 is a diagram showing a relationship between an evaluation parameter value u and a parameterization parameter Q ref and an estimated code amount (local code information amount) d.

【0028】図2の例からわかるように、符号量調整手
段3は、あるブロックについて、推定符号量(局所符号
情報量)dと基準量子化パラメータQrefとが与えられる
とき、このブロックの基準量子化パラメータQrefに対
する補正係数Aを、推定符号量(局所符号情報量)dに基
づいて設定するようになっている。例えば、あるブロッ
クについて、基準量子化パラメータQrefが“3”であ
り、このブロックの局所符号情報量dが“0.6”であ
る場合、基準量子化パラメータQref(=3)に対する補
正係数Aは“+0.25”となり、従って、符号量調整
手段3は、図2のテーブルによって、基準量子化パラメ
ータQref(=3)を補正係数Aで補正し、Qref+A(=
3+0.25)として、これを再量子化パラメータQ’
(=Qref+A)とするようになっている。
As can be seen from the example of FIG. 2, when the estimated code amount (local code information amount) d and the reference quantization parameter Qref are given for a certain block, the code amount adjusting means 3 The correction coefficient A for the quantization parameter Qref is set based on the estimated code amount (local code information amount) d. For example, if the reference quantization parameter Q ref is “3” and the local code information amount d of this block is “0.6” for a certain block, the correction coefficient for the reference quantization parameter Q ref (= 3) A becomes “+0.25”, so the code amount adjusting means 3 corrects the reference quantization parameter Q ref (= 3) with the correction coefficient A according to the table of FIG. 2, and obtains Q ref + A (=
3 + 0.25), which is referred to as a requantization parameter Q ′.
(= Q ref + A).

【0029】ところで、本発明では、符号量調整手段3
は、さらに、図3のテーブルを用いて、図2で求めた補
正係数Aに対する補正量xを割り出し、補正係数Aを補
正量xで補正し、再量子化パラメータQ’を最終的に、
ref+A+xとするようになっている。
In the present invention, the code amount adjusting means 3
Further, using the table of FIG. 3, a correction amount x for the correction coefficient A obtained in FIG. 2 is calculated, the correction coefficient A is corrected by the correction amount x, and finally the requantization parameter Q ′ is
Q ref + A + x is set.

【0030】具体的に、図3を参照すると、推定符号量
(局所符号情報量)dが所定閾値(例えば平均値)TH(図
3の例では、TH=0.5)以上であるブロックについ
ては、評価パラメータ値uが“0”に設定され、また、
符号推定量(局所符号情報量)dが所定閾値TH(図3の
例では、TH=0.5)以下であるブロックについて
は、その符号推定量(局所符号情報量)dの多少に応じた
評価パラメータ値uが設定されている。すなわち、推定
符号量(局所符号情報量)dが所定閾値TH(図3の例で
は、d=0.5)に近いブロックあるいは推定符号量(局
所符号情報量)dが最小値に近いブロック(図3の例で
は、例えば、d<0.1のブロック)については、小さ
な評価パラメータ値uが設定され、また、推定符号量
(局所符号情報量)dが所定の閾値TH(図3の例では、
d=0.5)と最小値(図3の例では、d<0.1)との
中間付近にあるブロック(例えば、d=0.3のブロッ
ク)については、大きな評価パラメータ値uが設定され
ている。
More specifically, referring to FIG.
For a block in which the (local code information amount) d is equal to or greater than a predetermined threshold value (for example, an average value) TH (TH = 0.5 in the example of FIG. 3), the evaluation parameter value u is set to “0”.
For a block in which the estimated code amount (local code information amount) d is equal to or less than a predetermined threshold value TH (TH = 0.5 in the example of FIG. 3), the amount of the estimated code amount (local code information amount) d depends on the degree of d. An evaluation parameter value u is set. That is, a block whose estimated code amount (local code information amount) d is close to the predetermined threshold value TH (d = 0.5 in the example of FIG. 3) or a block whose estimated code amount (local code information amount) d is close to the minimum value ( In the example of FIG. 3, for example, for a block of d <0.1), a small evaluation parameter value u is set, and the estimated code amount
(Local code information amount) d is a predetermined threshold TH (in the example of FIG. 3,
A large evaluation parameter value u is set for a block (for example, a block with d = 0.3) near the middle between d = 0.5) and the minimum value (d <0.1 in the example of FIG. 3). Have been.

【0031】符号量調整手段3は、あるブロックについ
て、推定符号量(局所符号情報量)dと基準量子化パラメ
ータQrefとが与えられるとき、図3のテーブルから、
これに対応した評価パラメータ値uを割り出し、この評
価パラメータ値uに基づいて、補正係数Aに対する補正
量xを割り出すようになっている。
When the estimated code amount (local code information amount) d and the reference quantization parameter Qref are given for a certain block, the code amount adjusting means 3 determines from the table in FIG.
An evaluation parameter value u corresponding to this is calculated, and a correction amount x for the correction coefficient A is calculated based on the evaluation parameter value u.

【0032】すなわち、符号量調整手段3は、推定符号
量の所定閾値THと最小値との中間において高い優先順
位を与える評価パラメータ値を設定し、その評価パラメ
ータ値に基づいて、発生符号調整量が僅かであれば評価
パラメータ値が最も大きなグループ(例えば、d=0.
3のグループ)にランクされるブロックのみ量子化パラ
メータを変化させ、発生符号調整量が多ければ評価パラ
メータ値が低いブロックまで(例えば、d=0.3のブ
ロックからd=0.5,d=0.1のブロックまで)、
順次に一様に量子化パラメータを変化させるようになっ
ている。
That is, the code amount adjusting means 3 sets an evaluation parameter value giving a high priority between the predetermined threshold value TH and the minimum value of the estimated code amount, and based on the evaluation parameter value, the generated code adjustment amount. Is small, the group having the largest evaluation parameter value (for example, d = 0.
The quantization parameter is changed only for the blocks ranked in group No. 3 and, if the amount of generated code adjustment is large, the blocks with lower evaluation parameter values (for example, from d = 0.3 block to d = 0.5, d = 0.1 blocks),
The quantization parameter is sequentially and uniformly changed.

【0033】より具体的に、符号量制御の必要性が生じ
た場合、図3のテーブルにおいて評価パラメータ値uが
一番大きな値をとるブロック群(図3の例では、d=
0.3に属するブロック)について、その基準量子化パ
ラメータQrefの補正係数Aに対する補正量xとして、
フレーム符号量を増加させる方向に制御する場合には、
例えばx=−1を割り出し、また、フレーム符号量を減
少させる方向に制御する場合には、例えばx=+1を割
り出すようになっている。また、この場合、他のブロッ
ク群(図3の例では、d=0.3に属するブロック以外
のブロック)については、x=0を割り出すようになっ
ている。
More specifically, when the necessity of code amount control arises, a block group in which the evaluation parameter value u takes the largest value in the table of FIG. 3 (d = d in the example of FIG. 3).
0.3), as a correction amount x for the correction coefficient A of the reference quantization parameter Qref ,
When controlling in the direction of increasing the frame code amount,
For example, when x = −1 is determined and control is performed in a direction to reduce the frame code amount, x = + 1 is determined, for example. Further, in this case, x = 0 is determined for other blocks (blocks other than the block belonging to d = 0.3 in the example of FIG. 3).

【0034】上記符号量制御を行なっても、符号制御量
が不足する場合には、2番目に大きな評価パラメータ値
uをとるブロック群(図3の例では、d=0.4,d=
0.2に属するブロック)についても、その基準量子化
パラメータQrefの補正係数Aに対する補正量xとし
て、上記と同様の補正量(x=+1または−1)を割り出
すようになっている。
If the code control amount is insufficient even after performing the code amount control, a group of blocks having the second largest evaluation parameter value u (d = 0.4, d =
As for the block belonging to 0.2), the same correction amount (x = + 1 or -1) as above is calculated as the correction amount x for the correction coefficient A of the reference quantization parameter Qref .

【0035】さらに、符号制御量が不足する場合には、
上記各ブロック群について、その基準量子化パラメータ
refの補正係数Aに対する補正量xとして、x=±u
を割り出すようになっている。
Further, when the code control amount is insufficient,
For each block group, x = ± u as a correction amount x for the correction coefficient A of the reference quantization parameter Qref.
Is to be determined.

【0036】このような符号量制御を行なうことによ
り、符号量調整手段3は、最終的に、再量子化パラメー
タQ’を求めるようになっている。
By performing such code amount control, the code amount adjusting means 3 finally obtains the requantization parameter Q '.

【0037】すなわち、再量子化パラメータの決定は、
符号量の調整の必要性によって補正量xを段階的に変化
させて、最適な値を選ぶことができる。このとき、xの
値域を評価パラメータu(正の整数)によって制限を加
え、−u<x<uとする。この範囲で補正(調整)量が不
足する場合には、全画面の基準量子化パラメータQref
が1ステップシフトされることになる。従って、各ブロ
ックに適用される再量子化パラメータQ’は、次のよう
なものとして求められる。
That is, the requantization parameter is determined by
The optimal value can be selected by changing the correction amount x stepwise according to the necessity of adjusting the code amount. At this time, the range of x is restricted by the evaluation parameter u (positive integer), and −u <x <u. If the correction (adjustment) amount is insufficient in this range, the reference quantization parameter Q ref of the entire screen is used.
Is shifted by one step. Therefore, the requantization parameter Q ′ applied to each block is obtained as follows.

【0038】[0038]

【数1】 (Equation 1)

【0039】換言すれば、符号量調整手段3は、所定フ
レーム全体の総符号量が、該フレームに割り当てられた
目標符号量に漸近するように、推定符号量が所定閾値T
H以下であるブロックについて、例えば図3のようなテ
ーブルTBLを用いて、その推定符号量の多少に応じて
重み付けを行なって、該ブロックの発生符号量の調整を
行なうようになっている。
In other words, the code amount adjusting means 3 sets the estimated code amount to the predetermined threshold value T so that the total code amount of the entire predetermined frame gradually approaches the target code amount allocated to the frame.
For blocks below H, for example, using a table TBL as shown in FIG. 3, weighting is performed according to the estimated code amount, and the generated code amount of the block is adjusted.

【0040】また、符号化手段4は、各ブロックごとの
符号量が符号量調整手段3によって調整された符号量と
なるように、所定フレーム内のデータに対して各ブロッ
クごとの符号化処理を行なうようになっている。
The coding means 4 performs coding processing for each block on data in a predetermined frame so that the code amount for each block becomes the code amount adjusted by the code amount adjusting means 3. It is supposed to do it.

【0041】このように、本発明は、所定フレーム内の
データに対する符号化制御を行なう際、所定フレーム内
のデータについて、所定フレーム内の各フレームごとの
推定符号量の多少を各ブロックごとに判別し、推定符号
量が多いブロックについては、符号量の調整を行なわ
ず、符号量がある程度少ないブロックについて、符号量
の調整を行なうようになっている。
As described above, according to the present invention, when encoding control is performed on data in a predetermined frame, the amount of estimated code for each frame in the predetermined frame is determined for each block in the data in the predetermined frame. The code amount is not adjusted for a block having a large estimated code amount, but the code amount is adjusted for a block having a small code amount to some extent.

【0042】すなわち、均質で自然な再生画像を得るた
めには、できるだけ多くのブロックが同じ再量子化階調
で符号化されるのが望ましい。しかしながら、この場
合、発生符号量の制御を何ら行なわないときには、伝送
チャンネルの単位時間当たりの伝送情報容量を超過した
り、再生バッファ容量等の条件が満たされなく、再生処
理等に支障が生ずるという問題がある。このような相反
する問題を解決するため、本発明では、符号量を制御
(調整)すると画質劣化の目立ち易いブロック,すなわち
推定符号量が所定閾値(例えば平均値)TH(例えば、d
=0.5)以上のブロックについては、符号量制御(調
整)を行なわず、符号量をある程度制御(調整)しても画
像劣化が目立ちにくいブロック,すなわち推定符号量が
所定閾値(例えば平均値)TH(例えば、d=0.5)以下
のブロックについてのみ符号量制御(調整)を行なう。こ
れにより、フレーム全体の画質を差程劣化させず、か
つ、フレーム全体の符号量を目標符号量に漸近させて例
えば復号化器での再生を保証することができる。
That is, in order to obtain a uniform and natural reproduced image, it is desirable that as many blocks as possible be encoded with the same requantized gradation. However, in this case, when no control is performed on the generated code amount, the transmission information capacity per unit time of the transmission channel is exceeded, and the conditions such as the reproduction buffer capacity are not satisfied, which causes a problem in the reproduction processing and the like. There's a problem. In order to solve such conflicting problems, the present invention controls the code amount.
(Adjustment), the block in which image quality deterioration is conspicuous, that is, the estimated code amount becomes a predetermined threshold value (for example, an average value) TH
= 0.5) or more, the code amount control (adjustment) is not performed, and even if the code amount is controlled (adjusted) to a certain extent, the block in which the image deterioration is not conspicuous, that is, the estimated code amount is a predetermined threshold (for example, average ) Code amount control (adjustment) is performed only for blocks of TH (for example, d = 0.5) or less. As a result, the image quality of the entire frame is not significantly degraded, and the code amount of the entire frame is asymptotic to the target code amount, so that reproduction by, for example, a decoder can be guaranteed.

【0043】また、推定符号量が所定閾値TH(例え
ば、d=0.5)以下であっても、推定符号量が最小値
(例えば、d<0.1)に近いブロックについては、符号
量の調整量を大きくすると、画質の劣化が目立ち易くな
る。従って、推定符号量が最小値(例えば、d<0.1)
に近いブロックについては、符号量の調整を行なわない
か、調整を行なうとしても、その調整量を少ないものに
するのが良い。
Even if the estimated code amount is equal to or less than the predetermined threshold value TH (for example, d = 0.5), the estimated code amount is not more than the minimum value.
For blocks close to (for example, d <0.1), if the adjustment amount of the code amount is increased, the deterioration of the image quality becomes more conspicuous. Therefore, the estimated code amount is a minimum value (for example, d <0.1).
For a block close to, the code amount is not adjusted, or even if it is adjusted, the adjustment amount should be small.

【0044】また、推定符号量が所定閾値TH(例え
ば、d=0.5)以下であっても、推定符号量が所定閾
値TH(例えば、d=0.5)に近いブロックについて
は、推定符号量が所定閾値TH(例えば、d=0.5)以
上のブロックとの画質の連続性を確保するため、符号量
の調整を行なわないか、調整を行なうとしても、その調
整量を少ないものにするのが良い。
Even if the estimated code amount is equal to or less than the predetermined threshold value TH (for example, d = 0.5), for a block whose estimated code amount is close to the predetermined threshold value TH (for example, d = 0.5), In order to ensure continuity of image quality with blocks having a code amount equal to or larger than a predetermined threshold value TH (for example, d = 0.5), the code amount is not adjusted, or even if adjustment is performed, the adjustment amount is small. It is better to

【0045】このことから、推定符号量が所定閾値TH
以下であっても、符号量の調整は、推定符号量に応じた
重み付けがなされるのが良く、主に、推定符号量が所定
閾値TH(例えば、d=0.5)と最小値(例えば、d<
0.1)との中間付近(例えば、d=0.3,0.2,
0.4など)にあるブロック(すなわち、符号量調整がな
されても画質劣化が特に目立ちにくいブロック)につい
て、大きな重み付けをして(大きな調整量で)、調整を行
なうのが良い。すなわち、調整量を重み付けして割り出
すのが良い。
From this, the estimated code amount becomes equal to the predetermined threshold value TH.
Even in the following cases, the adjustment of the code amount is preferably weighted according to the estimated code amount, and the estimated code amount is mainly determined by the predetermined threshold value TH (for example, d = 0.5) and the minimum value (for example, , D <
0.1) (eg, d = 0.3, 0.2,
It is preferable to make a large weighting (with a large adjustment amount) on a block (eg, a block in which image quality deterioration is not particularly conspicuous even if the code amount is adjusted) in the block (eg, 0.4). That is, the adjustment amount is preferably weighted and determined.

【0046】図4は図1の符号化装置のより具体的な構
成例を示す図である。図4を参照すると、この符号化装
置は、所定フレーム内の画像データ(所定フレーム内の
各ブロックの画像データ)をブロックごとに直交変換(例
えば離散コサイン変換(DCT))する直交変換部9と、
直交変換部9からの出力データ(ブロックごとの直交変
換画像データ)DATAを一時記憶する記憶部10と、
直交変換部9からの出力データ(ブロックごとの直交変
換画像データ)DATAに対して、例えば標準的な符号
化特性(標準的な量子化パラメータ,標準的な可変長符
号化方式)で仮量子化,仮符号化する第1の符号化部1
1と、第1の符号化部11による仮符号化によって得ら
れた各ブロックごとの符号量を加算して所定フレームの
総符号量を算出し、算出された総符号量が、例えばマク
ロ的にみた場合の符号使用レート,通信チャンネルのバ
ッファ使用割合に関して、多いか少ないかを判別し、上
記判別結果に基づいて該フレームに割り当て可能なフレ
ーム目標符号量OBJを生成出力するとともに、該フレ
ーム目標符号量OBJに基づいてフレーム基準量子化パ
ラメータQrefを決定し、さらには、第1の符号化部1
1からの各ブロックごとの符号量を例えばこのフレーム
の総符号量で正規化した局所符号情報量dを生成出力す
る第1の符号量制御部12と、第1の符号量制御部12
からの各ブロックごとの局所符号情報量(正規化符号量)
dに基づいて符号量制御(符号量調整)が必要なブロック
であるか否かを判定し、また、符号量制御(符号量調整)
が必要なブロックについては、上記符号量制御(符号量
調整)適否の判定結果とともに、例えば、図2,図3の
テーブルを用いそのブロックの符号量に応じた評価パラ
メータ値(ランク値)uに基づいて基準量子化パラメータ
refの補正係数Aおよび補正係数Aに対する補正量x
をフラグ情報FLGとして生成出力する符号量調整適否
判定部13と、符号量調整適否判定部13からのフラグ
情報FLGに基づいて、符号量制御(符号量調整)を行な
うと判断されたブロックについて、フレームの総符号量
を第1の符号量制御部12からの目標符号量OBJに漸
近させるように、第1の符号量制御部12からの基準量
子化パラメータQrefを上記フラグ情報FLGの補正係
数A,補正量xに従って調整し、再量子化パラメータ
Q’とする第2の符号量制御部14と、第2の符号量制
御部14からの再量子化パラメータQ’と所定の可変長
符号長とで、記憶部10に記憶されているこのフレーム
のブロックごとの直交変換画像データDATAに対して
量子化(本量子化),符号化(本符号化)を行なう第2の符
号化部15とを備えている。
FIG. 4 is a diagram showing a more specific configuration example of the encoding apparatus of FIG. Referring to FIG. 4, the encoding apparatus includes an orthogonal transform unit 9 that performs orthogonal transform (for example, discrete cosine transform (DCT)) of image data in a predetermined frame (image data of each block in the predetermined frame) for each block. ,
A storage unit 10 for temporarily storing output data (orthogonal transformation image data for each block) DATA from the orthogonal transformation unit 9;
The output data (orthogonal transformation image data for each block) DATA from the orthogonal transformation unit 9 is provisionally quantized by, for example, standard encoding characteristics (standard quantization parameters, standard variable length encoding). , First encoding unit 1 for provisional encoding
1 and the code amount of each block obtained by the provisional coding by the first coding unit 11 is added to calculate the total code amount of the predetermined frame. It is determined whether the code usage rate and the communication channel buffer usage rate are high or low, and based on the determination result, a frame target code amount OBJ that can be allocated to the frame is generated and output. The frame reference quantization parameter Q ref is determined based on the quantity OBJ, and further, the first encoding unit 1
A first code amount control unit 12 that generates and outputs a local code information amount d in which the code amount of each block from 1 is normalized by, for example, the total code amount of this frame;
Local code information amount (normalized code amount) for each block from
It is determined whether or not the block requires code amount control (code amount adjustment) based on d, and code amount control (code amount adjustment).
For a block that requires, the evaluation parameter value (rank value) u according to the code amount of the block, using the tables of FIGS. The correction coefficient A of the reference quantization parameter Qref and the correction amount x for the correction coefficient A
Is generated and output as flag information FLG, and a block determined to perform code amount control (code amount adjustment) based on the flag information FLG from the code amount adjustment suitability determination unit 13 is described below. The reference quantization parameter Qref from the first code amount control unit 12 is set to the correction coefficient of the flag information FLG so that the total code amount of the frame approaches the target code amount OBJ from the first code amount control unit 12. A, a second code amount control unit 14 that adjusts according to the correction amount x to obtain a requantization parameter Q ′, a requantization parameter Q ′ from the second code amount control unit 14 and a predetermined variable length code length Thus, a second encoding unit 15 that performs quantization (main quantization) and encoding (main encoding) on the orthogonally transformed image data DATA for each block of this frame stored in the storage unit 10, Have

【0047】ここで、第1の符号化部11は、図1の符
号量推定手段1に対応しており、仮量子化部21と、仮
符号化部22とを有し、直交変換部9からの出力データ
(ブロックごとの直交変換画像データ)DATAに対し
て、標準的な符号化特性(標準的な量子化パラメータ,
標準的な可変長符号化方式)で仮量子化,仮符号化する
ことで、フレーム内の各ブロックの符号量を予測推定す
るようになっている。
Here, the first encoding unit 11 corresponds to the code amount estimating means 1 of FIG. 1, has a temporary quantization unit 21 and a temporary encoding unit 22, Output data from
(Orthogonal transform image data for each block) For DATA, standard encoding characteristics (standard quantization parameters,
The provisional quantization and provisional encoding using the standard variable-length coding scheme predict and estimate the code amount of each block in the frame.

【0048】また、第2の符号化部15は、図1の符号
化手段4に対応しており、量子化部23と、符号化部2
4とを有し、第2の符号量制御部14からの再量子化パ
ラメータQ’と重み付けマトリックスWと所定の可変長
符号長とにより、記憶部10に記憶されている該フレー
ムのブロックごとの直交変換画像データD(DATA)を
量子化,可変長符号化することで、目的とする本符号化
が実行される。
The second encoding unit 15 corresponds to the encoding means 4 in FIG. 1, and includes a quantization unit 23 and an encoding unit 2
4 and the re-quantization parameter Q ′ from the second code amount controller 14, the weighting matrix W, and a predetermined variable-length code length for each block of the frame stored in the storage unit 10. By subjecting the orthogonally transformed image data D (DATA) to quantization and variable-length encoding, the intended main encoding is executed.

【0049】いま、該フレームの該符号化ブロックの直
交変換データD,量子化を行なう上で各スペクトルに対
応した重み付け係数行列Wが、次式のようなものである
とする。
Now, it is assumed that the orthogonal transform data D of the coded block of the frame and the weighting coefficient matrix W corresponding to each spectrum in performing the quantization are as shown in the following equation.

【0050】[0050]

【数2】 (Equation 2)

【0051】直交変換データD,重み付け係数行列Wが
数2のように表わされるとき、再量子化された結果S
は、次式で表わされる値となる。
When the orthogonal transformation data D and the weighting coefficient matrix W are expressed as shown in Expression 2, the requantized result S
Is a value represented by the following equation.

【0052】[0052]

【数3】 (Equation 3)

【0053】ここで、W・Dは内積を表わし、各ベクト
ルの添字は2次元画像を直交変換した際の各スペクトル
に対応したインデックス値となる。
Here, WD represents an inner product, and the suffix of each vector is an index value corresponding to each spectrum when the two-dimensional image is orthogonally transformed.

【0054】なお、第2の符号化部15の符号化部24
は、例えば、第1の符号化部11の符号化部22で使用
する可変長符号化方式(標準的な可変長符号化方式)と同
じ可変長符号化方式で可変長符号化を行なうようになっ
ていても良いし、第1の符号化部11の符号化部22と
は異なる方式で可変長符号化を行なうようになっていて
も良い。
The encoding section 24 of the second encoding section 15
Is such that variable-length coding is performed using the same variable-length coding method as the variable-length coding method (standard variable-length coding method) used in the coding unit 22 of the first coding unit 11, for example. Alternatively, the variable-length coding may be performed by a method different from that of the coding unit 22 of the first coding unit 11.

【0055】また、第1の符号量制御部12は、所定フ
レームに割り当て可能なフレーム目標符号量OBJを生
成したときに、例えば図5に示すような符号量と量子化
パラメータとの変換特性を示す変換表に基づいて、フレ
ーム基準量子化パラメータQrefを決定するようになっ
ている。
When generating the frame target code amount OBJ that can be allocated to a predetermined frame, the first code amount control unit 12 determines the conversion characteristic between the code amount and the quantization parameter as shown in FIG. 5, for example. The frame reference quantization parameter Qref is determined based on the conversion table shown.

【0056】また、符号量調整適否判定部13は、各ブ
ロックごとの局所符号情報量dを例えば図2に示したよ
うな閾値TH(図2の例では、各ブロックの符号量dの
平均値)と比較し、局所符号情報量dが閾値THよりも
多いブロックについては、符号量制御に適しないと判定
する一方、局所符号情報量dが閾値THよりも少ないブ
ロックについては符号量制御に適していると判定し、符
号量制御に適していると判定したブロックについては、
さらに、例えば、図3のようなテーブルに設定されてい
る評価パラメータ値uに基づいて、補正係数Aに対する
補正量xを割り出すようになっている。
The code amount adjustment suitability judging section 13 determines the local code information amount d for each block by, for example, a threshold value TH as shown in FIG. 2 (in the example of FIG. 2, the average value of the code amount d of each block). ), It is determined that a block in which the local code information amount d is larger than the threshold value TH is not suitable for code amount control, while a block in which the local code information amount d is smaller than the threshold value TH is suitable for code amount control. For blocks that are determined to be suitable for code amount control,
Further, for example, a correction amount x for the correction coefficient A is calculated based on an evaluation parameter value u set in a table as shown in FIG.

【0057】また、第2の符号量制御部14は、符号量
調整適否判定部13からフラグ情報FLGとして、符号
量制御適否の判定情報とともに基準量子化パラメータ値
refに対する補正係数Aおよび補正係数Aに対する補
正量xが出力されるとき、符号量制御に適していると判
定されたブロックに対する基準量子化パラメータQref
をそのブロックに対して割り出された補正係数(調整量)
Aおよび補正量xにより補正し、これを再量子化パラメ
ータQ’として第2の符号化部15に与えるようになっ
ている。
Further, the second code amount control unit 14 uses the code amount adjustment suitability determination unit 13 as the flag information FLG, together with the code amount control suitability determination information and the correction coefficient A and the correction coefficient for the reference quantization parameter value Qref . When the correction amount x for A is output, the reference quantization parameter Q ref for the block determined to be suitable for the code amount control
Is the correction coefficient (adjustment amount) calculated for that block.
The correction is performed using A and the correction amount x, and this is provided to the second encoding unit 15 as a requantization parameter Q ′.

【0058】また、記憶部10は、直交変換部9から出
力データDATAが出力された時点から第2の符号化部
15による符号化処理がなされるまでに、直交変換部9
からの出力データDATAに基づき第1の符号化部11
などで処理がなされることによる時間遅延(1フレーム
の時間遅延)があることから、直交変換部9からの出力
データDATAを第2の符号化部15の符号化処理開始
時まで保持しておくために設けられている。
The storage unit 10 stores the orthogonal transform unit 9 from when the output data DATA is output from the orthogonal transform unit 9 to when the encoding process by the second encoding unit 15 is performed.
Encoding unit 11 based on output data DATA from
Since there is a time delay (a time delay of one frame) due to the processing performed, the output data DATA from the orthogonal transform unit 9 is held until the encoding process of the second encoding unit 15 starts. It is provided for.

【0059】次に、このような構成の符号化装置の動作
について説明する。符号化処理のなされるべき画像フレ
ームデータは、直交変換部9でブロックごとに直交変換
され、ブロックごとの直交変換画像データDATAとな
る。このブロックごとの変換画像データDATAは、符
号化後のデータ量を推測し適正な符号量割り当てを行な
うために第1の符号化部11に送られるとともに、1フ
レーム分の時間経過後の本符号化のために、記憶部10
に一時記憶される。
Next, the operation of the coding apparatus having such a configuration will be described. Image frame data to be coded is orthogonally transformed by the orthogonal transformation unit 9 for each block, and becomes orthogonally transformed image data DATA for each block. The converted image data DATA for each block is sent to the first encoding unit 11 in order to estimate the amount of data after encoding and to allocate an appropriate amount of code. Storage unit 10
Is temporarily stored.

【0060】第1の符号化部11では、ブロックごとの
変換画像データDATAに対し、例えば、標準的な符号
化パラメータ(符号化特性)で仮量子化,仮符号化を行な
い、ブロックごとの符号量(データ量)を予測推定する。
より詳しくは、第1の符号化部11は、仮量子化をした
後、例えば、第2の符号化部15での本符号化に使用す
る可変長符号化と同等である符号量変換によってブロッ
クごとの符号量を推定する。
The first encoding unit 11 performs, for example, tentative quantization and tentative encoding on the converted image data DATA for each block using standard encoding parameters (encoding characteristics), for example. Predict and estimate the amount (data amount).
More specifically, after performing the tentative quantization, the first encoding unit 11 performs block conversion by code amount conversion that is equivalent to, for example, the variable length encoding used in the main encoding in the second encoding unit 15. The code amount of each is estimated.

【0061】第1の符号化部11からのブロック毎の予
測発生符号量は、第1の符号量制御部12に送られ、こ
れにより、第1の符号量制御部12では、第2の符号化
部15での本符号化に際して符号化器が今回のフレーム
に割り当てることのできる目標符号量とする平均符号転
送レートや最大符号転送レートに適合するように大域的
符号使用量(フレーム目標符号量)OBJとフレーム基準
量子化パラメータQrefを調整する。すなわち、第1の
符号量制御部12は、第1の符号化部11からのブロッ
ク毎の符号量をフレーム全体で総計した符号量(総符号
量)が1フレームでの符号使用量として適正であるかど
うか判断し、総符号量が、目的とする通信チャンネルの
最大転送レートを超えたり平均符号レートが超過する場
合には、フレーム目標符号量DATAとフレーム基準符
号化パラメータQrefを変更して、符号量を調整する。
すなわち、フレーム符号量割り当てを行なう。
The predicted generated code amount for each block from the first coding unit 11 is sent to the first code amount control unit 12, whereby the first code amount control unit 12 outputs the second code amount. At the time of the main encoding in the encoding unit 15, a global code usage amount (frame target code amount) adapted to the average code transfer rate or the maximum code transfer rate as the target code amount that can be allocated to the current frame by the encoder. ) Adjust OBJ and frame reference quantization parameter Qref . That is, the first code amount control unit 12 determines that the code amount (total code amount) obtained by totaling the code amounts for each block from the first encoding unit 11 for the entire frame is appropriate as the code usage amount in one frame. If the total code amount exceeds the maximum transfer rate of the target communication channel or exceeds the average code rate, the frame target code amount DATA and the frame reference coding parameter Qref are changed. , Adjust the code amount.
That is, frame code amount allocation is performed.

【0062】具体的には、このフレームについて、ブロ
ックごとの可変長符号の符号長データを累積加算(積算)
してフレーム符号発生量を算出し、目標符号量との誤差
をある時間内で累積し、負帰還することにより、一定時
間内で目標とする平均符号転送レートに近づける制御を
自動的に行なって、第1の符号量制御部12は、このフ
レームについての目標符号量(このフレームの目標とす
る総符号量)OBJとフレーム基準量子化パラメータQ
refとを割り出す。なお、上記の処理において、フレー
ム基準量子化パラメータQrefは、例えば図5に示した
ような変換表によりフレームの目標符号量OBJから決
定する。
Specifically, for this frame, the code length data of the variable length code for each block is cumulatively added (integrated).
Then, the amount of frame code generation is calculated, the error with the target code amount is accumulated within a certain period of time, and negative feedback is performed to automatically perform control to approach the target average code transfer rate within a certain period of time. , The first code amount control unit 12 calculates a target code amount (target total code amount of this frame) OBJ for this frame and a frame reference quantization parameter Q
Find ref . In the above processing, the frame reference quantization parameter Q ref is determined from the target code amount OBJ of the frame by using a conversion table as shown in FIG. 5, for example.

【0063】また、第1の符号量制御部12は、第1の
符号化部11からのブロックごとの予測発生符号量を正
規化して、ブロックごとの局所符号情報量(符号量)dを
算出する。より詳細に、正規化は、符号量調整適否判定
部13においてブロックの符号量に対応する評価値を、
フレーム全体の総符号量に左右されずに、相対的に求め
るためになされ、具体的には、ブロックごとの符号量の
ヒストグラムを作成し、その頻度の平均化を行なって正
規化を行なうことができる。これにより、例えば、第1
の符号化部11で割り出されたフレームの各ブロックご
との符号量から、最大の符号量と最小の符号量とを検索
し、最大の符号量が1.0となり、最小の符号量が0.
0となるように、各ブロック毎の符号量を、正規化する
ことができる。
The first code amount control unit 12 normalizes the predicted generated code amount for each block from the first coding unit 11 and calculates the local code information amount (code amount) d for each block. I do. More specifically, in the normalization, the evaluation value corresponding to the code amount of the block is determined by the code amount adjustment appropriateness determination unit 13.
This is performed in order to obtain a relative value without being affected by the total code amount of the entire frame. Specifically, a histogram of the code amount for each block is created, and the frequency is averaged to perform normalization. it can. Thereby, for example, the first
The maximum code amount and the minimum code amount are searched from the code amount for each block of the frame calculated by the encoding unit 11 of FIG. .
The code amount for each block can be normalized so that it becomes zero.

【0064】このようにして、正規化されたブロックご
との局所符号情報量dは、符号量調整適否判定部13に
送られ、符号量調整適否判定部13は、ブロックごとの
局所符号情報量dに基づいて、各ブロックについて符号
量の調整の適否を判定し、また、符号量の調整に適して
いると判定したブロックについてその局所符号情報量d
に応じた評価パラメータ値uを与える。具体的には、例
えば図3のように、局所符号情報量dがフレーム全体の
平均値(いまの場合、正規化された平均値“0.5”)よ
りも少ないか否かにより、符号量の調整に適したブロッ
クであるか否かを判定し、局所符号情報量dが平均値
“0.5”よりも小さく符号量の調整に適したブロック
である場合には、このブロックに対してその局所符号情
報量dに応じた評価パラメータ値uを求め、この評価値
に対応する基準量子化パラメータQの補正係数Aに対す
る補正量xを割り出す。
The local code information amount d for each block normalized as described above is sent to the code amount adjustment suitability judging unit 13, and the code amount adjustment suitability judging unit 13 checks the local code information amount d for each block. Is determined as to whether or not each block is suitable for adjusting the code amount, and the local code information amount d is determined for each block determined to be suitable for adjusting the code amount.
Is given as the evaluation parameter value u. Specifically, for example, as shown in FIG. 3, the code amount is determined based on whether the local code information amount d is smaller than the average value of the entire frame (in this case, the normalized average value “0.5”). It is determined whether or not the block is suitable for the adjustment of. If the local code information amount d is smaller than the average value "0.5" and the block is suitable for the adjustment of the code amount, the block An evaluation parameter value u corresponding to the local code information amount d is obtained, and a correction amount x for the correction coefficient A of the reference quantization parameter Q corresponding to the evaluation value is determined.

【0065】このようにして、符号量調整適否判定部1
3は、各ブロックごとに、そのブロックが符号量調整に
適しているか否かの判定結果と、符号量調整に適してい
る場合には基準量子化パラメータQrefの補正係数(調整
量)Aおよびその補正量xとを、フラグ情報FLGとし
て生成し、第2の符号量制御部14に与える。
As described above, the code amount adjustment propriety judging section 1
3 is for each block, a determination result of whether the block is suitable for code amount adjustment, and a correction coefficient (adjustment amount) A and a reference quantization parameter Qref of the reference quantization parameter Qref if the block is suitable for code amount adjustment. The correction amount x is generated as flag information FLG and provided to the second code amount control unit 14.

【0066】第2の符号量制御部14では、このフラグ
情報FLGに基づき、第1の符号量制御部12からの量
子化パラメータQrefの補正係数Aを補正(調整)し、再
量子化パラメータQ’を求める。すなわち、符号量調整
に適していないと判定されたブロックについては、再量
子化パラメータQ’をQ’=Q+Aとして求める一方、
符号量調整に適していると判定されたブロックについて
は、再量子化パラメータQ’を例えば数1から求める。
すなわち、符号量の調整が必要なブロックについての
み、補正係数Aの調整を行なう。
The second code amount controller 14 corrects (adjusts) the correction coefficient A of the quantization parameter Qref from the first code amount controller 12 based on the flag information FLG, and Find Q '. That is, for a block determined to be unsuitable for code amount adjustment, the requantization parameter Q ′ is obtained as Q ′ = Q + A,
For a block determined to be suitable for code amount adjustment, the requantization parameter Q ′ is obtained from, for example, Equation 1.
That is, the adjustment of the correction coefficient A is performed only for the blocks requiring the code amount adjustment.

【0067】なお、本実施形態では、補正量xには、ブ
ロック画像の符号発生頻度に比した量子化階調の重み付
けがなされている。すなわち、一般に符号発生頻度の低
いブロックでは精細成分が少ないケースが多く、精細成
分の多いブロックに較べ量子化階調を減らした場合にブ
ロック境界等の量子化歪みが目立ち易い傾向にあるた
め、それらを考慮した重み付けが、補正量xに与えられ
ている。従って、上記再量子化パラメータQ’の調整
は、これらを考慮した重み付けがなされて行なわれる。
In this embodiment, the correction amount x is weighted with the quantization gradation in comparison with the code generation frequency of the block image. That is, in general, blocks having a low code generation frequency often have a small number of fine components, and quantization distortion such as block boundaries tends to be more conspicuous when the quantization gradation is reduced as compared with a block with a large number of fine components. Is given to the correction amount x. Therefore, the adjustment of the requantization parameter Q ′ is performed with weighting taking these factors into consideration.

【0068】第2の符号量制御部14から上記のような
再量子化パラメータQ’が出力されると、第2の符号化
部15は、第2の符号量制御部14からの再量子化パラ
メータQ’と所定の可変長符号長とで、記憶部10に記
憶されているこのフレームのブロックごとの直交変換画
像データDATAに対して量子化(本量子化),符号化
(本符号化)を行なう。具体的には、可変長符号化の符号
長の情報によってブロック符号量へ換算するとき、その
フィードバック情報により、フレーム換算符号量と推測
された符号量との間に誤差が検出されれば、再量子化レ
ベルの増減を調整し、フレーム目標符号量への収束を行
なう。
When the above-described requantization parameter Q ′ is output from the second code amount control unit 14, the second encoding unit 15 Using the parameter Q ′ and a predetermined variable-length code length, the orthogonal transformation image data DATA for each block of this frame stored in the storage unit 10 is quantized (main quantization) and encoded.
(Real coding). Specifically, when converting to a block code amount based on the information on the code length of the variable length coding, if an error is detected between the frame converted code amount and the estimated code amount based on the feedback information, the conversion is performed again. The increase / decrease of the quantization level is adjusted to converge to the frame target code amount.

【0069】このように、図4の符号化装置では、第1
の符号化部11が設けられていることによって、第1の
符号量制御部12,第2の符号量制御部14では、1画
像フレーム内での局所符号量の分布に応じた符号量制御
を容易に行なうことができる。すなわち、隣接する符号
化ブロックを均質な符号化パラメータ符号化することを
目標とし、各フレームへの符号量割り当てを第1の符号
化部11で推定された発生符号量に応じて可変し、か
つ、復号化器の再生データバッファ使用率が満足できる
ように制御を加えた上で大域的(単位時間当たりの)目標
発生符号量を分割することができる。
As described above, in the encoding apparatus shown in FIG.
Is provided, the first code amount control unit 12 and the second code amount control unit 14 control the code amount according to the distribution of the local code amount in one image frame. It can be done easily. That is, the aim is to encode adjacent coding blocks with uniform coding parameters, and to allocate the code amount to each frame in accordance with the generated code amount estimated by the first coding unit 11, and In addition, it is possible to divide the global (per unit time) target generated code amount after performing control so as to satisfy the reproduction data buffer usage rate of the decoder.

【0070】また、この符号化制御機構に符号化ブロッ
ク毎の符号発生量から推測される局所情報量が比較的小
さな符号ブロックにのみ制御を加えることで画像フレー
ム毎の目標発生符号量への調整を実現することができ
る。
Further, by controlling the coding control mechanism only for code blocks in which the local information amount estimated from the code generation amount for each coding block is relatively small, adjustment to the target generated code amount for each image frame is performed. Can be realized.

【0071】可変転送レートを目標とした符号化を行な
う場合には、大幅に符号発生量を制御する必要が生じる
ことが稀であるが、本発明においては、目標符号量には
発生符号量の推定近似値を用いるため、第2の符号化制
御部14で行なわれる発生符号量の補正は僅かな量とな
る。従って、符号量制御による画像品質の劣化と発生符
号量の可制御範囲の均衡の点からみると、画像フレーム
内の符号量配分が比較的少ない符号化ブロックから順に
優先して再量子化階調の制御を行なうのが、発生符号量
の調整を容易にする上で良い。すなわち、本発明のよう
に、推定符号量の所定閾値THと最小値との中間におい
て高い優先順位を与える評価パラメータ値uを設定し、
その評価パラメータ値に基づいて、発生符号調整量が僅
かであれば評価パラメータ値uが最も大きなグループに
ランクされるブロックのみ量子化パラメータを変化さ
せ、発生符号調整量が多ければ評価パラメータ値uが低
いブロックまで順次に一様に量子化パラメータを変化さ
せて再量子化階調の制御を行なうのが、発生符号量の調
整を容易にする上で、好ましい。
When encoding is performed with a target of a variable transfer rate, it is rarely necessary to greatly control the code generation amount. However, in the present invention, the target code amount is set to the generated code amount. Since the estimated approximate value is used, the correction of the generated code amount performed by the second encoding control unit 14 is a small amount. Therefore, from the viewpoint of the balance between the deterioration of the image quality due to the code amount control and the controllable range of the generated code amount, the requantization gradation is preferentially performed in order from the coding block in which the code amount distribution in the image frame is relatively small. Is preferable to facilitate the adjustment of the generated code amount. That is, as in the present invention, an evaluation parameter value u that gives a high priority between the predetermined threshold value TH and the minimum value of the estimated code amount is set,
Based on the evaluation parameter value, if the generated code adjustment amount is small, the quantization parameter is changed only for the block ranked in the group having the largest evaluation parameter value u, and if the generated code adjustment amount is large, the evaluation parameter value u is changed. It is preferable to control the re-quantization gradation by sequentially and uniformly changing the quantization parameter from the lower block to the easier adjustment of the generated code amount.

【0072】このように、本発明によれば、可変転送レ
ートのデータチャンネルを持つ蓄積メディアなどにおい
て、その利点を最大限に活用し高効率な画像符号化でか
つ均質な再生画像品質の符号化を行ないつつ、メディア
の制約事項や復号化器の制約に合わせた発生符号量の制
御を行なうことができる。
As described above, according to the present invention, in a storage medium or the like having a data channel with a variable transfer rate, it is possible to make the most of its advantages and achieve highly efficient image encoding and uniform reproduction image quality encoding. , The amount of generated code can be controlled in accordance with the restrictions of the media and the restrictions of the decoder.

【0073】また、本発明の符号化制御は、国際規格I
SO10918−1(JPEG:静止画像データ圧縮符
号化技術)に適用することもできるし、国際規格ISO
11172−2(MPEG:動画像符号化技術)にも適用
することもできる。すなわち、静止画画像を符号化する
のにも適用できるし、動画画像を符号化するのにも適用
できる。
The encoding control of the present invention is based on the international standard I
It can be applied to SO10918-1 (JPEG: still image data compression coding technology), and can be applied to the international standard ISO.
It is also applicable to 11172-2 (MPEG: moving picture coding technology). That is, the present invention can be applied to encoding of a still image and to encoding of a moving image.

【0074】特に、動画像のもつ各画像フレームの情報
量に合わせて符号化および伝送を行なうことができれば
より効率的な情報の伝達が可能である。すなわち、伝送
チャンネルとなるメディアが利用者の要求に応じて単位
時間当たりの伝送情報容量を伸縮できるのであれば、伝
送の対象となる動画像の比較的情報量が多い場合を想定
した伝送チャンネルの確保や符号化を行なう必要がな
く、かつ、均質な画像品質を保った符号化が行なえる。
しかしながら、全く符号化の制御を行なわなければ、前
述のように復号化器での再生を保証できなくなる。伝送
チャンネルとなるメディアが利用者の要求に応じて単位
時間当たりの伝送情報容量を伸縮できるメディア,すな
わち可変データ転送レートを特徴とするメディアの長所
を最大限に活かすために、本発明では、それに最適化さ
れた符号化方式と符号量制御方法を提供できる。
In particular, if encoding and transmission can be performed in accordance with the information amount of each image frame of a moving image, more efficient transmission of information is possible. In other words, if the media serving as the transmission channel can expand and contract the transmission information capacity per unit time according to the user's request, the transmission channel is assumed to have a relatively large amount of information of the moving image to be transmitted. There is no need to secure or encode, and encoding can be performed while maintaining uniform image quality.
However, if no encoding control is performed, reproduction by the decoder cannot be guaranteed as described above. In order to maximize the advantages of media in which the transmission channel media can expand and contract the transmission information capacity per unit time in accordance with the user's request, that is, media that features a variable data transfer rate, the present invention uses An optimized coding method and code amount control method can be provided.

【0075】なお、動画画像を符号化する場合には、直
交変換部9で画像データの直交変換を行なうに先立って
(その前提として)、今回のフレームと前回のフレームと
の差分(オフセット)を動きベクトルとして検出し、動き
補償を利用して圧縮効率をより向上させることができ
る。
When a moving image is encoded, the orthogonal transform unit 9 performs orthogonal transform of the image data before encoding.
(As a premise), the difference (offset) between the current frame and the previous frame is detected as a motion vector, and the compression efficiency can be further improved by using motion compensation.

【0076】図6は、このような動き補償をも加味した
符号化装置の構成例を示す図である。図6を参照する
と、この符号化装置では、図4の符号化装置において、
さらに、時間的に逐次入力する画像フレームデータから
動きベクトルGを検出する動きベクトル検出部107
と、動き補償タイプ/符号化タイプEを決定するタイプ
決定部106と、動き補償フレーム誤差を算出する動き
補償フレーム誤差算出部102と、検出した動きベクト
ルGを一時記憶する記憶部108とが設けられている。
FIG. 6 is a diagram showing an example of the configuration of a coding apparatus that also takes such motion compensation into account. Referring to FIG. 6, in the encoding apparatus, in the encoding apparatus in FIG.
Further, a motion vector detecting unit 107 for detecting a motion vector G from image frame data input sequentially in time.
A type determining unit 106 for determining a motion compensation type / coding type E; a motion compensation frame error calculation unit 102 for calculating a motion compensation frame error; and a storage unit 108 for temporarily storing the detected motion vector G. Have been.

【0077】ここで、動きベクトルは、前述のように、
ブロック動き補償を行なう場合に利用する動きの「大き
さ」と「方向」を表わすパラメータであり、また、動き
補償タイプは、フレーム間動き補償型を表わすパラメー
タであり、これには、前方フレーム間動き補償あり、後
方フレーム間動き補償あり、双方向フレーム間動き補償
あり、動き補償なし、などがある。また、符号化タイプ
は、動き補償タイプと関連して選択されるブロック符号
化型を表すパラメータであり、これには、フレーム間差
分符号化、フレーム内符号化、などがある。
Here, the motion vector is, as described above,
The parameters representing the “magnitude” and “direction” of the motion used when performing the block motion compensation. The motion compensation type is a parameter representing the inter-frame motion compensation type. There are motion compensation, backward inter-frame motion compensation, bidirectional inter-frame motion compensation, and no motion compensation. The coding type is a parameter indicating a block coding type selected in association with the motion compensation type, and includes inter-frame differential coding, intra-frame coding, and the like.

【0078】このような構成の符号化装置では、時間的
に連続する画像フレームデータが逐次到達すると、動き
ベクトル検出部107では、符号化に採用する可能性の
ある全ての動き補償タイプでブロック毎に参照フレーム
との差分が最小となるブロック変位量を動きベクトルG
として算出する。動き補償フレーム誤差算出部102
は、動きベクトル検出部107で検出された動きベクト
ルGに従い、タイプ決定部106が決定した動き補償タ
イプ/符号化タイプEで、動き補償をブロック毎に行な
い、ブロック毎のフレーム間差分を算出する。なお、符
号化タイプとしてフレーム内符号化が選択された場合に
は、動き補償フレーム誤差算出部102の処理は行なわ
ない(バイパスされる)。すなわち、ブロックの符号化タ
イプにフレーム間差分を用いないINTRA符号化が選
択されれば、このステージでの処理をバイパスし、単に
ブロックの画像データを記憶部から読出すだけの処理に
切替える。
In the coding apparatus having such a configuration, when the image frame data successive in time arrives sequentially, the motion vector detecting section 107 sets all the motion compensation types which may be employed for coding on a block-by-block basis. Is the block displacement amount that minimizes the difference from the reference frame.
Is calculated as Motion compensation frame error calculator 102
Performs motion compensation for each block using the motion compensation type / coding type E determined by the type determination unit 106 according to the motion vector G detected by the motion vector detection unit 107, and calculates the inter-frame difference for each block. . Note that, when the intra-frame encoding is selected as the encoding type, the processing of the motion compensation frame error calculation unit 102 is not performed (bypassed). That is, if the INTRA encoding that does not use the inter-frame difference is selected as the encoding type of the block, the processing in this stage is bypassed, and the processing is switched to the processing of simply reading the image data of the block from the storage unit.

【0079】すなわち、動画像を圧縮する技術の多く
は、フレーム間差分等を符号化するため、画像データの
復号時刻と画像データの再生時刻が同一ではなく、通
常、復号時刻より再生時刻が1フレームないし数フレー
ム遅れたものとなる。例えば、ISO11172−2
(MPEG)に準拠する符号化・復号化器を用いるのであ
れば、フレームごとにフレーム内符号化か動き補償型の
フレーム間符号化が選択可能で、フレームごとに異なっ
た符号量が割り当てられる。そのため、この符号の復号
化器では、最大0.5秒ないし1秒分のデータをバッフ
ァリングしながら復号化するのが一般的な使用方法とな
る。
That is, most of the techniques for compressing a moving image encode the difference between frames and the like, so that the decoding time of the image data is not the same as the reproduction time of the image data. Frame or several frames later. For example, ISO117172-2
If an encoder / decoder conforming to (MPEG) is used, intra-frame encoding or motion compensation type inter-frame encoding can be selected for each frame, and a different code amount is assigned to each frame. For this reason, a general usage of a decoder for this code is to decode data while buffering data for a maximum of 0.5 to 1 second.

【0080】ブロック毎に符号量情報と動きベクトル
G,動き補償タイプ/符号化タイプE,および直交変換
画像データは、1フレーム時間以上の遅延を実現する記
憶部10,108に蓄積され、本符号化に際し使用され
る。なお、符号化タイプについては、第1の符号化部1
1,第1の符号量制御部12,第2の符号量制御部14
においても使用される。
The code amount information, the motion vector G, the motion compensation type / coding type E, and the orthogonally transformed image data for each block are stored in the storage units 10 and 108 for realizing a delay of one frame time or more. It is used at the time of conversion. In addition, regarding the encoding type, the first encoding unit 1
1, first code amount control unit 12, second code amount control unit 14
Also used in

【0081】これらの機構によって決定された符号化パ
ラメータに基づき、第2の符号化部15で符号化された
画像データは、動きベクトルG,動き補償/符号化タイ
プ情報E,再量子化パラメータQ’と共にマルチプレク
サ129で多重化され、ビットストリームSRへ変換さ
れて出力される。
Based on the coding parameters determined by these mechanisms, the image data coded by the second coding unit 15 includes a motion vector G, motion compensation / coding type information E, and a requantization parameter Q. And multiplexed by the multiplexer 129, converted into a bit stream SR, and output.

【0082】なお、上述の処理において、図5のような
変換表は、符号化タイプ毎に用意することができ、符号
化タイプに応じて、量子化パラメータを決定することも
できる。この場合、この表中の値は、直前の同符号化タ
イプでのトレーニングにより逐次修正される。
In the above-described processing, a conversion table as shown in FIG. 5 can be prepared for each encoding type, and a quantization parameter can be determined according to the encoding type. In this case, the values in this table are successively modified by the previous training with the same coding type.

【0083】[0083]

【発明の効果】以上に説明したように、請求項1乃至請
求項12記載の発明によれば、所定フレーム内のデータ
について、所定フレーム内の各フレームごとの推定符号
量の多少を各ブロックごとに判別し、推定符号量が多い
ブロックについては、符号量の調整を行なわず、推定符
号量がある程度少ないブロックについて、符号量の調整
を行なうので、画像フレームの情報量に合わせて符号化
を行なう場合に、画像劣化を抑え(画像劣化を目立ちに
くくし)、かつ、例えば復号化器での再生処理に支障が
生じないように、最適な符号化制御を行なうことができ
る。
As described above, according to the first to twelfth aspects of the present invention, for the data in a predetermined frame, the estimated code amount for each frame in the predetermined frame is determined for each block. In the block having a large estimated code amount, the code amount is not adjusted, and the code amount is adjusted for a block having a small estimated code amount to some extent. Therefore, encoding is performed in accordance with the information amount of the image frame. In this case, it is possible to perform optimal encoding control so as to suppress image degradation (to make the image degradation less noticeable) and not to hinder, for example, reproduction processing in a decoder.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明に係る符号化装置の構成例を示す図であ
る。
FIG. 1 is a diagram illustrating a configuration example of an encoding device according to the present invention.

【図2】推定符号量(局所符号情報量)dに対する基準量
子化パラメータQrefの補正係数Aの関係を示す図であ
る。
FIG. 2 is a diagram showing a relationship between an estimated code amount (local code information amount) d and a correction coefficient A of a reference quantization parameter Qref .

【図3】基準量子化パラメータQref,推定符号量(局所
符号情報量)dに対する評価パラメータ値uの関係を示
す図である。
FIG. 3 is a diagram illustrating a relationship between an evaluation parameter value u and a reference quantization parameter Q ref and an estimated code amount (local code information amount) d.

【図4】図1の符号化装置のより具体的な構成例を示す
図である。
FIG. 4 is a diagram illustrating a more specific configuration example of the encoding device in FIG. 1;

【図5】符号量と量子化パラメータの変換特性の一例を
示す図である。
FIG. 5 is a diagram illustrating an example of a conversion characteristic between a code amount and a quantization parameter.

【図6】図1の符号化装置のより具体的な構成例を示す
図である。
FIG. 6 is a diagram illustrating a more specific configuration example of the encoding device in FIG. 1;

【符号の説明】[Explanation of symbols]

1 符号量推定手段 2 符号量判別手段 3 符号量調整手段 4 符号化手段 9 直交変換部 10 記憶部 11 第1の符号化部 12 第1の符号量制御部 13 符号量調整適否判定部 14 第2の符号量制御部 15 第2の符号化部 102 動き補償フレーム差分算出部 106 符号化タイプ決定部 107 動きベクトル検出部 108 記憶部 REFERENCE SIGNS LIST 1 code amount estimating means 2 code amount discriminating means 3 code amount adjusting means 4 encoding means 9 orthogonal transform unit 10 storage unit 11 first encoding unit 12 first code amount control unit 13 code amount adjustment suitability determining unit 14 th 2 code amount control unit 15 second encoding unit 102 motion compensation frame difference calculation unit 106 encoding type determination unit 107 motion vector detection unit 108 storage unit

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】 所定フレーム内のデータに対する符号化
制御を行なう符号化制御装置であって、所定フレーム内
のデータについて、所定フレーム内の各ブロックごとの
推定符号量が所定閾値以下であるか否かを各ブロックご
とにそれぞれ判定する符号量判定手段と、推定符号量が
所定閾値以下であるブロックについて、その推定符号量
の多少に応じて、該ブロックの発生符号量の調整を行な
う符号量調整手段とを備えていることを特徴とする符号
化制御装置。
1. An encoding control device for performing encoding control on data in a predetermined frame, wherein an estimated code amount for each block in the predetermined frame is not more than a predetermined threshold value for the data in the predetermined frame. Code amount determining means for determining whether or not each of the blocks has an estimated code amount equal to or less than a predetermined threshold, and a code amount adjusting unit for adjusting the generated code amount of the block according to the estimated code amount. Encoding control device comprising:
【請求項2】 請求項1記載の符号化制御装置におい
て、前記所定の閾値には、前記所定フレーム内での各ブ
ロックの推定符号量の平均値を用いることを特徴とする
符号化制御装置。
2. The coding control device according to claim 1, wherein the predetermined threshold value is an average value of estimated code amounts of blocks in the predetermined frame.
【請求項3】 請求項1記載の符号化制御装置におい
て、前記符号量調整手段は、推定符号量が前記所定閾値
以下で推定符号量が最小値までのブロックに対して、推
定符号量の前記所定閾値と最小値との中間において高い
優先順位を与える評価パラメータ値を設定し、その評価
パラメータ値に基づいて、発生符号調整量が僅かであれ
ば評価パラメータ値が最も大きなグループにランクされ
るブロックのみ量子化パラメータを変化させ、発生符号
調整量が多ければ評価パラメータ値が低いブロックまで
順次に一様に量子化パラメータを変化させて、ブロック
の発生符号量の調整を行なうことを特徴とする符号化制
御装置。
3. The encoding control device according to claim 1, wherein the code amount adjusting unit is configured to determine the estimated code amount of a block whose estimated code amount is equal to or less than the predetermined threshold and whose estimated code amount is a minimum value. An evaluation parameter value that gives a high priority between the predetermined threshold value and the minimum value is set, and based on the evaluation parameter value, a block ranked in the group with the largest evaluation parameter value if the generated code adjustment amount is small. Only the quantization parameter is changed, and if the amount of generated code adjustment is large, the quantization parameter is sequentially and uniformly changed up to the block having the lower evaluation parameter value to adjust the generated code amount of the block. Control device.
【請求項4】 請求項1乃至請求項3のいずれか一項に
記載の符号化制御装置において、前記符号量調整手段
は、前記所定フレーム全体の総符号量が、該フレームに
割り当てられた目標符号量に漸近するように、推定符号
量が所定閾値以下であるブロックについて、その推定符
号量の多少に応じて、該ブロックの発生符号量の調整を
行なうことを特徴とする符号化制御装置。
4. The encoding control device according to claim 1, wherein the code amount adjusting unit is configured to determine whether a total code amount of the entire predetermined frame is equal to a target amount allocated to the frame. An encoding control device for adjusting a generated code amount of a block whose estimated code amount is equal to or less than a predetermined threshold value according to the estimated code amount so as to approach the code amount.
【請求項5】 請求項4記載の符号化制御装置におい
て、前記所定フレーム内の各ブロックごとの推定符号量
および所定フレーム内の目標符号量は、今回の所定フレ
ームを仮の符号化手段で符号化することによって割り出
されるか、あるいは、前回のフレームに基づいて推測さ
れることを特徴とする符号化制御装置。
5. The coding control device according to claim 4, wherein the estimated code amount for each block in the predetermined frame and the target code amount in the predetermined frame are obtained by coding the current predetermined frame by temporary coding means. An encoding control device which is determined by encoding or is estimated based on a previous frame.
【請求項6】 所定フレーム内のデータに対し、各ブロ
ックごとの符号化を行なう符号化装置であって、所定フ
レーム内のデータについて各ブロックごとの符号量の推
定を行なう符号量推定手段と、符号量推定手段で推定さ
れた各ブロックごとの推定符号量が所定閾値以下である
か否かを各ブロックごとにそれぞれ判定する符号量判定
手段と、推定符号量が所定閾値以下であるブロックにつ
いて、その推定符号量の多少に応じて、該ブロックの発
生符号量の調整を行なう符号量調整手段と、各ブロック
ごとの符号量が前記符号量調整手段によって調整された
符号量となるように、前記所定フレーム内のデータに対
して符号化処理を行なう符号化手段とを備えていること
を特徴とする符号化装置。
6. An encoding device for encoding data in a predetermined frame for each block, a code amount estimating means for estimating a code amount for each block for data in a predetermined frame, A code amount determining unit that determines whether the estimated code amount for each block estimated by the code amount estimating unit is equal to or less than a predetermined threshold for each block, and for a block whose estimated code amount is equal to or less than a predetermined threshold, A code amount adjusting means for adjusting the generated code amount of the block according to the estimated code amount, and a code amount adjusted for each block by the code amount adjusted by the code amount adjusting means. An encoding unit for performing an encoding process on data in a predetermined frame.
【請求項7】 請求項6記載の符号化装置において、前
記符号量推定手段は、今回のフレームに対して仮の符号
化を行なうことによって符号量を推定するか、あるい
は、前回のフレームに基づいて今回のフレームの符号量
を推定するようになっていることを特徴とする符号化装
置。
7. The coding apparatus according to claim 6, wherein the code amount estimating means estimates the code amount by performing temporary coding on a current frame, or based on a previous frame. A coding apparatus for estimating a code amount of a current frame.
【請求項8】 請求項6記載の符号化装置において、前
記符号量調整手段は、前記所定フレーム全体の総符号量
が、該フレームに割り当てられた目標符号量に漸近する
ように、推定符号量が所定閾値以下であるブロックにつ
いて、その推定符号量の多少に応じて、該ブロックの発
生符号量の調整を行なうことを特徴とする符号化装置。
8. The coding apparatus according to claim 6, wherein said code amount adjusting means is configured to calculate the estimated code amount such that a total code amount of the entire predetermined frame gradually approaches a target code amount allocated to the frame. An encoding apparatus characterized in that, for a block whose is equal to or smaller than a predetermined threshold value, the generated code amount of the block is adjusted according to the estimated code amount.
【請求項9】 請求項8記載の符号化装置において、前
記符号量調整手段は、推定符号量の前記所定閾値と最小
値との中間において高い優先順位を与える評価パラメー
タ値を設定し、その評価パラメータ値に基づいて、発生
符号調整量が僅かであれば評価パラメータ値が最も大き
なグループにランクされるブロックのみ量子化パラメー
タを変化させ、発生符号調整量が多ければ評価パラメー
タ値が低いブロックまで順次に一様に量子化パラメータ
を変化させて再量子化階調の制御を行ない所定フレーム
の符号化を行なうことを特徴とする符号化装置。
9. The coding apparatus according to claim 8, wherein said code amount adjusting means sets an evaluation parameter value which gives a high priority in the middle between said predetermined threshold value and a minimum value of said estimated code amount, and evaluates said evaluation parameter value. Based on the parameter values, if the generated code adjustment amount is small, the quantization parameter is changed only for the block ranked in the group with the largest evaluation parameter value, and if the generated code adjustment amount is large, the blocks are sequentially reduced to blocks with lower evaluation parameter values. An encoding apparatus for controlling a re-quantization gradation by uniformly changing a quantization parameter to encode a predetermined frame.
【請求項10】 所定フレーム内のデータに対する符号
化制御を行なう符号化制御方法であって、所定フレーム
内のデータについて、所定フレーム内の各フレームごと
の推定符号量の多少を各ブロックごとに判別し、推定符
号量が多いブロックについては、符号量の調整を行なわ
ず、推定符号量がある程度少ないブロックについて、符
号量の調整を行なうことを特徴とする符号化制御方法。
10. An encoding control method for performing encoding control on data in a predetermined frame, wherein for the data in the predetermined frame, a degree of an estimated code amount for each frame in the predetermined frame is determined for each block. A coding control method characterized in that the code amount is not adjusted for a block having a large estimated code amount, and the code amount is adjusted for a block having a small estimated code amount to some extent.
【請求項11】 請求項10記載の符号化制御方法にお
いて、前記符号量の調整は、前記所定フレーム全体の総
符号量が、該フレームに割り当てられた目標符号量に漸
近するように、推定符号量が所定閾値以下であるブロッ
クについて、その符号量の多少に応じて、行なわれるこ
とを特徴とする符号化制御方法。
11. The encoding control method according to claim 10, wherein the adjustment of the code amount is performed such that a total code amount of the entire predetermined frame gradually approaches a target code amount allocated to the frame. An encoding control method for a block whose amount is equal to or smaller than a predetermined threshold value, depending on the amount of code amount.
【請求項12】 請求項11記載の符号化制御方法にお
いて、前記所定フレーム内の各ブロックごとの推定符号
量および所定フレーム内の目標符号量は、今回の所定フ
レームを仮の符号化手段で符号化することによって割り
出されるか、あるいは、前回のフレームに基づいて推測
されることを特徴とする符号化制御方法。
12. The coding control method according to claim 11, wherein the estimated code amount for each block in the predetermined frame and the target code amount in the predetermined frame are obtained by coding the current predetermined frame by temporary coding means. A coding control method characterized in that the coding control method is determined by coding or is estimated based on a previous frame.
JP20907396A 1996-07-19 1996-07-19 Encoding controller, encoding device and encoding control method Pending JPH1042293A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20907396A JPH1042293A (en) 1996-07-19 1996-07-19 Encoding controller, encoding device and encoding control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20907396A JPH1042293A (en) 1996-07-19 1996-07-19 Encoding controller, encoding device and encoding control method

Publications (1)

Publication Number Publication Date
JPH1042293A true JPH1042293A (en) 1998-02-13

Family

ID=16566815

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20907396A Pending JPH1042293A (en) 1996-07-19 1996-07-19 Encoding controller, encoding device and encoding control method

Country Status (1)

Country Link
JP (1) JPH1042293A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003052046A (en) * 2001-08-06 2003-02-21 Sony Corp Coding controller, coding control method, coding control program and coding control program storing medium
JP2009268064A (en) * 2008-04-28 2009-11-12 Mitsubishi Electric Research Laboratories Inc Method for compressing sar data and apparatus for encoding sar data
JP2013530610A (en) * 2010-05-27 2013-07-25 ソニー株式会社 Image compression method using random access function
JP2013191928A (en) * 2012-03-12 2013-09-26 Mega Chips Corp Image processing apparatus

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003052046A (en) * 2001-08-06 2003-02-21 Sony Corp Coding controller, coding control method, coding control program and coding control program storing medium
JP4543299B2 (en) * 2001-08-06 2010-09-15 ソニー株式会社 Encoding control device, encoding control method, encoding control program, and encoding control program storage medium
JP2009268064A (en) * 2008-04-28 2009-11-12 Mitsubishi Electric Research Laboratories Inc Method for compressing sar data and apparatus for encoding sar data
JP2013530610A (en) * 2010-05-27 2013-07-25 ソニー株式会社 Image compression method using random access function
JP2013191928A (en) * 2012-03-12 2013-09-26 Mega Chips Corp Image processing apparatus

Similar Documents

Publication Publication Date Title
KR100610520B1 (en) Video data encoder, video data encoding method, video data transmitter, and video data recording medium
US5969764A (en) Adaptive video coding method
JP2963416B2 (en) Video encoding method and apparatus for controlling bit generation amount using quantization activity
US7023914B2 (en) Video encoding apparatus and method
JP4624321B2 (en) Transcoder and coded image conversion method
US7653129B2 (en) Method and apparatus for providing intra coding frame bit budget
US7301999B2 (en) Quantization method and system for video MPEG applications and computer program product therefor
KR100484148B1 (en) Advanced method for rate control and apparatus thereof
US7925108B2 (en) Encoding device and dynamic image recording system having the encoding device
US6823008B2 (en) Video bitrate control method and device for digital video recording
US7095784B2 (en) Method and apparatus for moving picture compression rate control using bit allocation with initial quantization step size estimation at picture level
US8208537B2 (en) Video transcoding with suppression on drift errors
US6879632B1 (en) Apparatus for and method of variable bit rate video coding
JP3907875B2 (en) Coding rate control device and information coding device
US5781237A (en) Video coding apparatus and video coding method
US7714751B2 (en) Transcoder controlling generated codes of an output stream to a target bit rate
JP3846424B2 (en) Image signal quantization apparatus and method
JPH06141298A (en) Variable transfer rate coder and recording medium
JPH1042293A (en) Encoding controller, encoding device and encoding control method
US7801214B2 (en) Method and apparatus for controlling encoding rate and quantization scales
JP3149673B2 (en) Video encoding device, video encoding method, video reproducing device, and optical disc
KR20010104058A (en) Adaptive quantizer according to DCT mode in MPEG2 encoder
KR20030083109A (en) apparatus for transcoding bit rate
US7327892B2 (en) JPEG2000 encoder
US8817890B2 (en) System and method for controlling the long term generation rate of compressed data