JP2005080004A - Dynamic image encoding device - Google Patents
Dynamic image encoding device Download PDFInfo
- Publication number
- JP2005080004A JP2005080004A JP2003309208A JP2003309208A JP2005080004A JP 2005080004 A JP2005080004 A JP 2005080004A JP 2003309208 A JP2003309208 A JP 2003309208A JP 2003309208 A JP2003309208 A JP 2003309208A JP 2005080004 A JP2005080004 A JP 2005080004A
- Authority
- JP
- Japan
- Prior art keywords
- code
- encoded data
- data
- frame
- skip
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 claims description 29
- 238000004364 calculation method Methods 0.000 claims description 15
- 238000001514 detection method Methods 0.000 abstract description 7
- 230000006866 deterioration Effects 0.000 abstract description 4
- 230000003139 buffering effect Effects 0.000 abstract description 2
- 238000013139 quantization Methods 0.000 description 23
- 238000010586 diagram Methods 0.000 description 6
- 230000009466 transformation Effects 0.000 description 2
- 230000015556 catabolic process Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本発明は動画像符号化装置に関し、例えばディジタルビデオ録画再生装置に適用して好適なものである。 The present invention relates to a moving image encoding apparatus, and is suitable for application to, for example, a digital video recording / reproducing apparatus.
従来、動画像符号化装置は、外部から供給される連続した複数の画像からなる信号(以下これを動画像信号と呼ぶ)をディジタル化した後、所定の画像符号化方式に準拠した符号化処理を施すことにより、例えば1フレーム等の所定単位の符号化データを生成するようになされている。 2. Description of the Related Art Conventionally, a moving image encoding apparatus digitizes a signal composed of a plurality of continuous images supplied from the outside (hereinafter referred to as a moving image signal), and then performs an encoding process based on a predetermined image encoding method. By performing the above, for example, encoded data of a predetermined unit such as one frame is generated.
かかる画像符号化方式としては、ISO/IECの符号化専門家グループMPEG(Moving Picture Expert Group)により汎用画像の符号化を目的として標準化されたMPEGと呼ばれる画像符号化方式が知られている。 As such an image encoding method, an image encoding method called MPEG standardized for the purpose of encoding general-purpose images by an MPEG / Moving Picture Expert Group (ISO / IEC) is known.
このMPEG符号化方式の一つとして標準化されているMPEG2方式では、実際に符号化した動画像信号(以下これを符号化データと呼ぶ)の符号量の遷移を監視するために、図示しない動画像復号化装置における内部バッファに相当する仮想的なVBV(Video Buffering Verifier)バッファを想定し、当該VBVバッファにおける符号化データの符号量(以下これを占有量と呼ぶ)を随時算出するようになされており、当該占有量に応じ量子化ステップの制御等を行って符号化データの符号量を調整することにより、符号化データのビットレートを設定された値とするようになされている。 In the MPEG2 system, which is standardized as one of the MPEG encoding systems, a moving picture (not shown) is used to monitor the transition of the code amount of the actually encoded moving picture signal (hereinafter referred to as encoded data). Assuming a virtual VBV (Video Buffering Verifier) buffer corresponding to the internal buffer in the decoding apparatus, the code amount of the encoded data in the VBV buffer (hereinafter referred to as the occupation amount) is calculated as needed. The bit rate of the encoded data is set to a set value by adjusting the code amount of the encoded data by controlling the quantization step according to the occupied amount.
例えば動画像符号化装置においては、図7に示すように、フレーム(n−1)における符号化データを出力した後、フレーム(n)における符号化データを出力するまでの間に、VBVバッファにおける符号化データの符号量a(n)を算出する。 For example, in the moving image encoding apparatus, as shown in FIG. 7, after the encoded data in the frame (n−1) is output, the encoded data in the frame (n) is output in the VBV buffer. The code amount a (n) of the encoded data is calculated.
次に動画像符号化装置は、フレーム(n−1)の符号化データを基にフレーム(n)の符号化データの符号量b(n)を算出することにより予測し、フレーム(n−1)におけるVBVバッファの占有量V(n−1)と予め設定されたビットレートとに基づいて、フレーム(n)の符号化データを出力するときに当該VBVバッファの上限及び下限を超えないように(図7)、フレーム(n)における量子化スケール等を調整してから、当該フレーム(n)の画像を符号化する。 Next, the moving image encoding apparatus predicts by calculating the code amount b (n) of the encoded data of the frame (n) based on the encoded data of the frame (n−1), and the frame (n−1) ) Based on the VBV buffer occupancy V (n-1) and the preset bit rate so that the upper and lower limits of the VBV buffer are not exceeded when the encoded data of frame (n) is output. (FIG. 7) After adjusting the quantization scale and the like in the frame (n), the image of the frame (n) is encoded.
しかし、実際に動画像信号を符号化する際には、例えばシーン切換の場面等で、符号化後の実際の符号量が予測結果の符号量を超えてしまう場合がある。 However, when a moving image signal is actually encoded, the actual code amount after encoding may exceed the code amount of the prediction result, for example, in a scene switching scene.
このため動画像符号化装置は、フレーム(n)の画像の上端から順次符号化していく途中でもVBVバッファを監視しており、例えば当該画像上端での符号量を基に算出した当該フレーム(n)の予測符号量be(n)(図7)が当初予測した符号量b(n)を超えてしまいVBVバッファのアンダーフローが生じてしまうことを認識すると、徐々に量子化スケールを上げて生成する符号量を削減し、生成する符号量を符号量b(n)程度に抑えることによってVBVバッファのアンダーフローを防止するようになされている。 For this reason, the moving image encoding device monitors the VBV buffer even during the sequential encoding from the upper end of the image of the frame (n). For example, the frame (n) calculated based on the code amount at the upper end of the image. ) When the predicted code amount be (n) (FIG. 7) exceeds the initially predicted code amount b (n), causing an underflow of the VBV buffer. Therefore, the underflow of the VBV buffer is prevented by reducing the generated code amount and suppressing the generated code amount to about the code amount b (n).
しかし、復号化装置等によってこのような符号化データを復号化した場合、フレーム(n)の画像は上部から下部にかけてだんだんと画質が荒くなってしまい、動画像としての画質が低下してしまうという問題があった。 However, when such encoded data is decoded by a decoding device or the like, the image quality of the image of the frame (n) gradually becomes worse from the upper part to the lower part, and the image quality as a moving image is deteriorated. There was a problem.
かかる問題を解決するための従来手法として、MPEGのユーザデータ領域等を利用して、1フレーム分の画像を前フレームの画像で代用することを示すコードを予め独自に設定しておき、動画像信号の符号化時にVBVバッファのアンダーフローが生じそうになった際に、符号化データの代わりに当該コードをユーザデータ領域に出力するようになされた動画像符号化装置が提案されている(例えば、特許文献1参照)。
ところが、かかる手法を適用した動画像符号化装置においては、MPEG方式で規定されていない独自のコードをユーザデータ領域に格納しているために、復号化装置側で当該コードを検出するための専用の検出回路等を設ける必要があった。 However, in a moving image encoding apparatus to which such a technique is applied, a unique code not defined in the MPEG system is stored in the user data area, and therefore a dedicated code for detecting the code on the decoding apparatus side. It was necessary to provide a detection circuit and the like.
このため、広く普及している一般的な(検出装置を搭載していない)復号化装置では、上述のスキップコードを含んだ符号化データを正しく復号化することができないという問題があった。 For this reason, there has been a problem that a general decoding device (not equipped with a detection device) that is widely used cannot correctly decode the encoded data including the skip code described above.
本発明は以上の点を考慮してなされたもので、画質の低下を防止させることなく容易に復号化装置で復号化し得る動画像符号化装置を提案しようとするものである。 The present invention has been made in consideration of the above points, and an object of the present invention is to propose a moving picture coding apparatus that can be easily decoded by a decoding apparatus without preventing deterioration in image quality.
かかる課題を解決するため本発明においては、動画像データを所定の符号化方式に従って符号化処理を実行し、所定単位ごとに順次生成した符号化データを外部に出力する動画像符号化装置において、復号側のバッファに蓄積された際の符号化データの占有量を、予測占有量として算出する予測占有量算出手段と、予測占有量算出手段により算出された予測占有量が所定の閾値を超えた時点に生成された符号化データに代えて、当該時点よりも前の上記符号化データの復号結果を再表示させるための指示コードを、符号化方式に従って生成し出力するコード出力手段とを設けるようにしたことにより、符号化データの符号量が予測占有量以上に増加した場合に、当該コード出力手段が、当該符号化データの代わりに符号化方式に従ったデータ構成でなる指示コードを生成し出力するようにした。 In order to solve such a problem, in the present invention, in a moving image encoding apparatus that performs encoding processing on moving image data according to a predetermined encoding method, and outputs encoded data sequentially generated for each predetermined unit to the outside. Predicted occupancy calculation means for calculating the occupancy of the encoded data when accumulated in the decoding side buffer as the predicted occupancy, and the predicted occupancy calculated by the predicted occupancy calculation means exceeds a predetermined threshold. In place of the encoded data generated at the time, code output means for generating and outputting an instruction code for re-displaying the decoding result of the encoded data before the time according to the encoding method is provided. As a result, when the code amount of the encoded data increases more than the predicted occupancy amount, the code output means uses the data according to the encoding method instead of the encoded data. And to output it generates instruction code consisting of growth.
この結果この動画像符号化装置では、符号化データの符号量が所定の閾値を超えないように抑えることができると共に、特別な検出回路等を用いることなく復号化装置によって正常に認識できる符号化データを生成することができる。 As a result, in this moving image encoding apparatus, the encoding amount of encoded data can be suppressed so as not to exceed a predetermined threshold, and encoding that can be normally recognized by the decoding apparatus without using a special detection circuit or the like. Data can be generated.
本発明によれば、実際に符号化した符号量が予測以上に増加した場合に、符号化データの代わりに符号化方式に従ったデータで構成された指示コードを出力できるので、符号化データの符号量が所定の閾値を超えないように抑えることができると共に、特別な検出回路等を用いることなく復号化装置によって正常に認識でき、画質の低下を防止できる符号化データを生成し得る動画像符号化装置を実現できる。 According to the present invention, when the code amount actually encoded increases more than expected, an instruction code composed of data according to the encoding method can be output instead of the encoded data. A moving image capable of generating encoded data that can be suppressed so that the code amount does not exceed a predetermined threshold, can be normally recognized by a decoding device without using a special detection circuit, and can prevent deterioration in image quality An encoding device can be realized.
以下、図面について、本発明の一実施の形態を詳述する。 Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
(1)動画像符号化装置の構成
図1に示すように、1は全体として動画像符号化装置を示し、MPEG2方式に従って、外部から供給される画像のデータ(以下、これをフレームデータD1と呼ぶ)ごとに順次符号化処理を実行するようになされている。
(1) Configuration of Moving Image Encoding Device As shown in FIG. 1,
この場合、減算器2は、動き補償回路12から予測データD2が与えられない場合には、フレームデータD1をそのまま差分データD3として直交変換処理部3へ送出する。
In this case, when the prediction data D2 is not given from the
直交変換処理部6は、差分データD3に対して離散コサイン変換等の直交変換処理を施すことにより直交変換係数データD4を生成し、これを量子化処理部4へ送出する。
The orthogonal
量子化処理部4は、直交変換係数データD4に対して、符号化制御部5によるフィードバック制御に従って与えられる量子化制御信号S1の量子化パラメータ値に応じて、量子化処理を施すことにより量子化データD5を生成し、これを可変長符号化制御部6及び逆量子化処理部8へそれぞれ送出する。
The quantization processing unit 4 quantizes the orthogonal transform coefficient data D4 by performing a quantization process according to the quantization parameter value of the quantization control signal S1 given according to the feedback control by the encoding control unit 5. Data D5 is generated and sent to the variable length
可変長符号化制御部6は、量子化処理部4から与えられる量子化データD5に対して可変長符号化処理を施すことにより符号化データD6を生成し、これをバッファ7に蓄積する。
The variable length
一方、逆量子化処理部8は、量子化処理部4から与えられる量子化データD5に対して逆量子化処理を施すことにより、直交変換係数データD4に相当する直交変換係数データD8を復元し、これを逆直交変換処理部9へ送出する。
On the other hand, the inverse
逆直交変換処理部9は、逆量子化処理部8から与えられる直交変換係数データD8に対して逆直交変換処理を施すことにより、差分データD3に相当する差分データD9を復元し、これを加算器10へ送出する。
The inverse orthogonal transform processing unit 9 performs inverse orthogonal transform processing on the orthogonal transform coefficient data D8 given from the inverse
加算器10は、動き補償処理部12から予測データD2が与えられる場合、逆直交変換処理部9から与えられる差分データD9に対して、当該差分データD9に対応する予測データD2を必要に応じて加算することによりフレームデータD1に相当するフレームデータD10を復元し、これをフレームメモリ11へ記憶する。
When the prediction data D2 is given from the motion
動き補償処理部12は、フレームメモリ11から1フレーム分のフレームデータD11を逐次読み出し、所定の動き補償処理に基づいて予測データD2を生成し、これを減算器2及び加算器10へ送出する。
The motion
ここで減算器2は、動き補償回路12での動き補償結果として予測データD2が与えられる場合、フレームデータD1から当該フレームデータD1に対応する予測データD2を減算することにより差分データD3を生成し、これを直交変換処理部3へ送出する。
Here, when the prediction data D2 is given as the motion compensation result in the
そして差分データD3は、上述の場合と同様に、直交変換処理、量子化処理、可変長符号化処理が順次施され、この結果、符号化データD6としてバッファ7に蓄積される。 The difference data D3 is sequentially subjected to orthogonal transform processing, quantization processing, and variable length coding processing as in the case described above, and as a result, is stored in the buffer 7 as encoded data D6.
このように動画像符号化装置1は、入力されたフレームデータD1ごとに符号化処理を実行し、バッファ7に蓄積される符号化データD6を、切換器14を介して順次出力符号化データD13として出力するようになされている。
In this way, the moving
(2)符号化制御部5の構成
ここで、動画像符号化装置1の符号化制御部5は、図2に示すように、VBV占有量算出部21と、スキップ判定部22と、レート制御部23とによって構成される。
(2) Configuration of Encoding Control Unit 5 Here, the encoding control unit 5 of the moving
VBV占有量算出部21は、仮想的なVBVバッファにおける占有量を算出するようになされており、例えばフレーム(n)について着目すると、1つ前のフレームであるフレーム(n−1)の符号化データD6を送出した時点で、図3に示すような当該符号化データD6の符号量b(n−1)及びこのときのVBVバッファの占有量V(n−1)を認識しており、当該占有量V(n−1)と当該符号量b(n−1)とを占有符号量データD21としてレート制御部22へ送出する。
The VBV occupation
そしてVBV占有量算出部21は、バッファ7から符号化データD6を取得してその符号量b(n)を認識し、フレーム(n)の出力符号化データD13を出力する時点でのVBVバッファにおける占有量V(n)を次式
Then, the VBV occupation
に基づいて算出し、これを占有量データD22としてスキップ制御部23へ送出する。
And is sent as occupancy data D22 to the
またVBV占有量算出部21は、スキップ制御部23からスキップコードD12を出力したことの通知(詳しくは後述する)を受け取ると、当該スキップコードD12をフレーム(n)の符号化データD6として認識するようになされている。
When the VBV occupation
レート制御部22は、予測占有符号量データD21として与えられた符号量b(n−1)と予め設定されたビットレートとに基づいて、フレーム(n)のフレームデータD1を可変長符号化処理部6によって符号化データD6に変換したときの予測符号量be(n)を算出する。
The rate control unit 22 performs variable-length coding processing on the frame data D1 of the frame (n) based on the code amount b (n−1) given as the predicted occupied code amount data D21 and a preset bit rate. A prediction code amount be (n) when converted into encoded data D6 by the
さらにレート制御部22は、フレーム(n−1)の符号化データD6を出力してからフレーム(n)の符号化データD6を出力するまでの間にVBVバッファに蓄積される符号化データ量a(n)と、フレーム(n)の予測符号量be(n)とを用いて、フレーム(n)に相当する符号化データD6を送出する時点でのVBVバッファの予測占有量Ve(n)を次式 Further, the rate control unit 22 outputs the encoded data amount a accumulated in the VBV buffer between the time when the encoded data D6 of the frame (n−1) is output and the time when the encoded data D6 of the frame (n) is output. Using (n) and the predicted code amount be (n) of the frame (n), the predicted occupation amount Ve (n) of the VBV buffer at the time when the encoded data D6 corresponding to the frame (n) is sent is obtained. Next formula
によって算出する。 Calculated by
ここでレート制御部22は、VBVバッファのアンダーフローを発生させないために、予測占有量Ve(n)>0を満たすような予測符号量be(n)となるように量子化パラメータを決定し、量子化制御信号S1として量子化処理部4へ送出する。 Here, the rate control unit 22 determines the quantization parameter so that the predicted code amount be (n) satisfies the predicted occupation amount Ve (n)> 0 in order not to cause an underflow of the VBV buffer, The quantization control signal S1 is sent to the quantization processing unit 4.
この結果、量子化処理部4では、VBVバッファのアンダーフローが生じないような量子化データD5として直交変換処理部6へ送出される。
As a result, the quantization processing unit 4 sends the data to the orthogonal
スキップ制御部23は、VBV占有量算出部21から与えられる占有符号量データD22に基づき、占有量V(n)<0であるか否か、すなわちVBVバッファのアンダーフローが発生するか否かを判定する。
The
ここでスキップ制御部23は、占有量V(n)<0である場合は、スキップコード生成信号S3をスキップコード生成部13へ出力することによって、当該スキップコード生成部13(図1)にスキップコードD12を生成させると共に、出力切換信号S2を出力することによって切換器14(図1)をk側に切り換え(図1)、スキップコードD12を符号化データD13として出力させ、さらにVBV占有量算出部21に対してスキップコードD12を出力したことを通知する。
If the occupancy V (n) <0, the
一方スキップ制御部23は、占有量V(n)<0でない場合は、出力切換信号S2を出力することによって切換器14(図1)をj側に切り換え(図1)、符号化データD6をそのまま符号化データD13として出力させる。
On the other hand, when the occupation amount V (n) <0 is not satisfied, the
このように符号化制御部5は、符号化データD6を用いてVBVバッファの占有量V(n)を算出し、量子化処理部4の量子化パラメータを決定すると共に、必要に応じて当該符号化データD6の代わりにスキップコードD12を出力符号化データD13として出力させるようになされている。 In this way, the encoding control unit 5 calculates the occupation amount V (n) of the VBV buffer using the encoded data D6, determines the quantization parameter of the quantization processing unit 4, and, if necessary, the code A skip code D12 is output as output encoded data D13 instead of the encoded data D6.
(3)スキップコードD12の構成
このスキップコードD12は、通常の(画像を示すデータを含む)符号化データと同様に1フレーム分の画像に相当するデータによって構成されており、例えば1フレームが480ラインで構成される場合、1マクロブロックを16×16画素で構成すると、当該1フレームはライン方向に30個のスライスに分割されることになる。
(3) Configuration of Skip Code D12 This skip code D12 is configured by data corresponding to an image for one frame, as in the case of normal encoded data (including data indicating an image). In the case of being composed of lines, if one macroblock is composed of 16 × 16 pixels, the one frame is divided into 30 slices in the line direction.
このスライスは、図4に示すようなデータ構成となっており、(m)番目のスライス30は、ヘッダ部31とデータ部32とから構成されている。 This slice has a data configuration as shown in FIG. 4, and the (m) th slice 30 is composed of a header portion 31 and a data portion 32.
ヘッダ部31はスライススタートコード31A、量子化スケールコード31B、マクロブロックタイプ31C、及びフレームモーションタイプ31Dからなっており、MPEG2方式に準拠した構成となっている。 The header section 31 includes a slice start code 31A, a quantization scale code 31B, a macroblock type 31C, and a frame motion type 31D, and has a configuration conforming to the MPEG2 system.
またデータ部32は、マクロブロックエスケープ32A、マクロブロックアドレス加算32B、マクロブロックタイプ32C、フレームモーションタイプ32Dからなっており、通常のスライス層のデータ部から画像を表すデータを削除したような構成となっている。 The data section 32 includes a macro block escape 32A, a macro block address addition 32B, a macro block type 32C, and a frame motion type 32D, and has a configuration in which data representing an image is deleted from the data section of a normal slice layer. It has become.
すなわちスライス30は、標準的なスライス層のヘッダ等を維持したままで画像を示すデータのみを取り除いた、いわば「画像データの無いスライス」を構成していることになり、このような構成のスライス30は、MPEG規格の規定に基づき、復号化装置において「1つ前のフレームにおける同じ位置のスライスと同じ内容を繰り返す」旨のデータであると解釈される。 That is, the slice 30 constitutes a so-called “slice without image data” in which only the data indicating the image is removed while maintaining the header of the standard slice layer, and so on. 30 is interpreted as data indicating that “the same content as the slice at the same position in the previous frame is repeated” in the decoding apparatus based on the MPEG standard.
ちなみにこの「画像データの無いスライス」のようなデータは、本来、あるフレーム(p)のあるスライス(q)が1つ前のフレーム(p−1)における同じ位置を表すスライス(q)と全く同じ符号となる際に、冗長を避けて符号量を削減するために、MPEG2方式において規定されている。 Incidentally, the data such as “slice without image data” is originally completely different from the slice (q) in which a certain slice (q) in a certain frame (p) represents the same position in the previous frame (p−1). In order to avoid redundancy and reduce the amount of code when the same code is used, it is defined in the MPEG2 system.
またスライス30は、画像を表す符号化データを削除したような構成となっているため、1スライス分のデータとして必要最小限の符号量となっている。 In addition, since the slice 30 has a configuration in which encoded data representing an image is deleted, the minimum amount of code is required as data for one slice.
そしてスキップコードD12は、このようなスライス30と同様のスライス40等を例えば30個組み合わせた構成となっており、このため当該スキップコードD12は、その符号量bscがフレーム(n)の符号量b(n)よりも非常に少なくなるようになされている(図3)。 The skip code D12 is configured by combining, for example, 30 slices 40 similar to the slice 30. For this reason, the skip code D12 has a code amount bsc of the code amount b of the frame (n). This is much less than (n) (FIG. 3).
さらにスキップコードD12は、MPEG2方式に従って構成されているため、特別な検出回路等を具えない動画像復号化装置(以下これを標準的な動画像復号化装置と呼ぶ)によって、フレーム(n)を表示すべきタイミングにおいて1つ前のフレーム(n−1)と同じ画像を再度表示し得るようになされている。 Further, since the skip code D12 is configured according to the MPEG2 system, the frame (n) is converted by a moving picture decoding apparatus (hereinafter referred to as a standard moving picture decoding apparatus) that does not include a special detection circuit or the like. The same image as the previous frame (n-1) can be displayed again at the timing to be displayed.
(4)動画像符号化処理手順
次に、必要に応じて符号化データD6に代えてスキップコードD12を出力するときの動画像符号化処理手順について、図5のフローチャートを用いて詳細に説明する。
(4) Moving Picture Encoding Process Procedure Next, a moving picture encoding process procedure when the skip code D12 is output instead of the encoded data D6 as necessary will be described in detail with reference to the flowchart of FIG. .
すなわち動画像符号化装置1は、ルーチンRT1の開始ステップSP0から入ってステップSP1へ移り、図6(A)に示すようなフレーム(n)のフレームデータD1を基に、量子化処理部4、可変長符号化処理部6等によって、図6(B)に示すようなフレーム(n)の符号化データD6を生成するまで待機し、当該符号化データD6を生成した時点で次のステップSP2へ移る。
That is, the moving
なお符号化制御部5は、フレーム(n)の符号化データD6を1フレーム分生成する途中では、VBVバッファの予測占有量Ve(n)を算出しないようになされており、当該符号化制御部5における処理負荷を軽減するようになされている。 The encoding control unit 5 does not calculate the predicted occupation amount Ve (n) of the VBV buffer during the generation of the encoded data D6 of the frame (n) for one frame. 5 to reduce the processing load.
ステップSP2において符号化制御部5は、フレーム(n)の出力符号化データD13を出力する時点での占有量V(n)<0であるか否かを判定する。 In step SP2, the encoding control unit 5 determines whether or not the occupation amount V (n) <0 when the output encoded data D13 of the frame (n) is output.
ここで否定結果が得られると、このことはフレーム(n)の符号化データD6を出力する時点においてVBVバッファのアンダーフローが発生しないことを表しており、このとき符号化制御部5は次のステップSP3へ移る。 If a negative result is obtained here, this indicates that the underflow of the VBV buffer does not occur when the encoded data D6 of the frame (n) is output. At this time, the encoding control unit 5 Control goes to step SP3.
ステップSP3において符号化制御部5は、出力切換信号S2を出力することによって切換器14をj側に切り換え(図1)、符号化データD6をそのまま符号化データD13として出力して次のステップSP5へ移る。
In step SP3, the encoding control unit 5 switches the
これに対してステップSP2において肯定結果が得られると、このことは、フレーム(n)の符号化データD6を出力する時点においてVBVバッファのアンダーフローが発生することを表しており(図3)、このとき符号化制御部5は次のステップSP4へ移る。 On the other hand, if an affirmative result is obtained in step SP2, this indicates that an underflow of the VBV buffer occurs when the encoded data D6 of the frame (n) is output (FIG. 3). At this time, the encoding control unit 5 proceeds to the next step SP4.
ステップSP4において符号化制御部5は、スキップコード生成信号S3をスキップコード生成部13へ出力してスキップコードD12を生成させて切換器14へ送出させ、さらに出力切換信号S2を出力することによって切換器14をk側に切り換えて(図1)、スキップコードD12を符号化データD13として出力して次のステップSP5へ移る。
In step SP4, the encoding control unit 5 outputs the skip code generation signal S3 to the skip
ステップSP5において符号化制御部5は、フレームデータD1を全て符号化したか否かを判定し、ここで否定結果が得られると再度ステップSP1へ戻って上述したステップSP1〜SP4の処理を繰り返し、一方ここで肯定結果が得られると次のステップSP6へ移って当該動画像符号化処理手順を終了する。 In step SP5, the encoding control unit 5 determines whether or not all the frame data D1 has been encoded. If a negative result is obtained here, the process returns to step SP1 again and repeats the processing of steps SP1 to SP4 described above. On the other hand, if an affirmative result is obtained here, the process proceeds to the next step SP6, and the moving image encoding processing procedure is terminated.
(5)スキップコードの復号化
次に、このようなスキップコードD12を含む符号化データを復号化する場合について説明する。
(5) Decoding Skip Code Next, a case where encoded data including such a skip code D12 is decoded will be described.
すなわち上述したように、フレーム(n)のフレームデータD1(図6(A))を単純に符号化した場合、符号化データD6が生成される(図6(B))。 That is, as described above, when the frame data D1 (FIG. 6A) of the frame (n) is simply encoded, the encoded data D6 is generated (FIG. 6B).
しかし、フレーム(n)においてVBVバッファのアンダーフローが生じる場合、符号化データ(n)の代わりにスキップコードD12が挿入された出力符号化データD13が生成される(図6(C))。 However, when underflow of the VBV buffer occurs in frame (n), output encoded data D13 in which skip code D12 is inserted instead of encoded data (n) is generated (FIG. 6C).
一方、このような出力符号化データD13を一般的な動画像復号化装置(図示せず)によって復号化する場合、当該動画像復号化装置は、フレーム(n)に相当する箇所においてスキップコードD12を認識すると、当該スキップコードD12に画像を示すデータが含まれていないため、MPEG2方式の規定に従って、フレーム(n)のタイミングで再度フレーム(n−1)の画像を表示する(図6(D))。 On the other hand, when such output encoded data D13 is decoded by a general moving picture decoding apparatus (not shown), the moving picture decoding apparatus has a skip code D12 at a position corresponding to the frame (n). Since the skip code D12 does not include data indicating an image, the image of the frame (n−1) is displayed again at the timing of the frame (n) in accordance with the MPEG2 standard (FIG. 6D )).
このとき動画像復号化装置は、フレーム(n)を表示するタイミングにおいて、標準的なデータによって構成されたスキップコードD12を正常に認識でき、1フレーム前のフレーム(n−1)の画像を再度表示させることによって、画質劣化のない動画像を復号化することができる。 At this time, the moving picture decoding apparatus can normally recognize the skip code D12 composed of standard data at the timing of displaying the frame (n), and the image of the frame (n-1) one frame before is again displayed. By displaying it, it is possible to decode a moving image without image quality degradation.
(6)動作及び効果
以上の構成において動画像符号化装置1は、入力されたフレームデータD1を順次符号化し、出力符号化データD13として出力すると共に、符号化制御部5のVBV占有量算出部21によって符号化データD6の実際の符号量b(n)を用いてVBVバッファにおける占有量を監視しており、当該VBVバッファにおいてアンダーフローが発生することが判明したフレーム(n)については、符号化データD6に代えてスキップコードD12を挿入する(図6(B)、(C))。
(6) Operation and Effect In the above configuration, the moving
このとき動画像符号化装置1は、画像を示すデータ以外のヘッダ等のデータによってスキップコードD12を構成するようにしたことにより、フレーム(n)の画像をそのまま符号化した場合の符号化データ(n)の符号量と比較して、当該スキップコードD12の符号量を少なく抑えることができるので、VBVバッファのアンダーフローを防止できると共に、送出する符号量が少ないために当該VBVバッファの占有量を回復させる(増やす)ことができ、以降の符号化におけるVBVバッファのアンダーフローの発生頻度を低減させることができる(図3)。
At this time, the moving
さらに動画像符号化装置1は、符号化データD6を常時監視するのではなく、1フレーム分を蓄積した時点でVBVバッファの占有量を算出するようにしたことにより、符号化制御部5の処理負荷を軽減させることができ、代わりに量子化パラメータの高精度な算出等の処理を行うことができるので、動画像の画質を向上させることができる。
Furthermore, the moving
そのうえ生成されたスキップコードD12は、MPEG2方式のユーザデータ領域等に独自のコードを設定するのではなく、MPEG2方式に従った標準的なデータによって構成するようにしたことにより、特別な検出回路等を具えない標準的な動画像復号化装置によって当該スキップコードD12を認識できるので、当該標準的な動画像復号化装置でフレーム(n)の画像を表示すべきタイミングにフレーム(n−1)の画像を再度表示させることができ、動画像の画質を低下させることがない。 In addition, the generated skip code D12 does not set a unique code in the user data area of the MPEG2 system, but is configured by standard data in accordance with the MPEG2 system, so that a special detection circuit, etc. The skip code D12 can be recognized by a standard moving picture decoding apparatus that does not include the frame (n-1) at the timing when the image of the frame (n) should be displayed by the standard moving picture decoding apparatus. The image can be displayed again, and the image quality of the moving image is not deteriorated.
以上の構成によれば、動画像符号化装置1は、符号化データD6の実際の符号量を用いてVBVバッファの占有量を算出し、当該VBVバッファにおいてアンダーフローの発生を検出したフレームについては、符号化データD6に代えて、MPEG2方式に従ったデータで構成されて符号量が少ないスキップコードD12を挿入することにより、VBVバッファのアンダーフローを防止できると同時に占有量を増加させることができ、さらに一般的な動画像復号化装置によって当該スキップコードD12を正常に認識できるので、復号化した際の動画像の画質低下を防止することができる。
According to the above configuration, the moving
(7)他の実施の形態
なお上述の実施の形態においては、図4に示したデータ構成でなるスキップコードD12を生成するようにした場合について述べたが、本発明はこれに限らず、MPEG2方式に従ったシンタックスでなるこの他の種々のデータ構成でなるスキップコードを指示コードとして生成するようにしても良い。
(7) Other Embodiments In the above embodiment, the case where the skip code D12 having the data configuration shown in FIG. 4 is generated has been described. However, the present invention is not limited to this, and MPEG2 You may make it produce | generate the skip code which consists of the other various data structure which consists of the syntax according to a system as an instruction code.
また上述の実施の形態においては、指示コードとして、1フレーム前の画像を再表示させるスキップコードD12を出力するようにした場合について述べたが、本発明はこれに限らず、例えば2フレーム前の画面を再表示させるコード等、他の種々のコードを指示コードとして出力するようにしても良い。 In the above-described embodiment, the case where the skip code D12 for redisplaying the image one frame before is output as the instruction code has been described. However, the present invention is not limited to this. Various other codes such as a code for redisplaying the screen may be output as the instruction code.
さらに上述の実施の形態においては、符号化データD6に基づいてVBVバッファの予測占有量Veを算出するようにした場合について述べたが、本発明はこれに限らず、この他の種々の算出方式によって予測占有量Veを算出するようにしても良く、また例えば符号量と量子化パラメータとの関係を示した所定のテーブルを参照することによって予測占有量Veを得るようにしても良い。 Furthermore, in the above-described embodiment, the case where the predicted occupation amount Ve of the VBV buffer is calculated based on the encoded data D6 has been described. However, the present invention is not limited to this, and other various calculation methods. For example, the predicted occupation amount Ve may be calculated by referring to a predetermined table showing the relationship between the code amount and the quantization parameter.
さらに上述の実施の形態においては、本発明をMPEG2方式に準拠した動画像符号化装置1に適用するようにした場合について述べたが、本発明はこれに限らず、例えばMPEG4等の、他の種々の符号化方式に準拠した符号化装置に適用するようにしても良い。
Furthermore, in the above-described embodiment, the case where the present invention is applied to the moving
本発明は、動画像符号化機能を有したパーソナルコンピュータ等にも適用できる。 The present invention can also be applied to a personal computer or the like having a moving image encoding function.
1……動画像符号化装置、5……符号化制御部、13……スキップコード生成部、14……切換器、21……VBV占有量算出部、22……レート制御部、23……スキップ制御部。
DESCRIPTION OF
Claims (4)
復号側のバッファに蓄積された際の上記符号化データの占有量を、予測占有量として算出する予測占有量算出手段と、
予測占有量算出手段により算出された上記予測占有量が所定の閾値を超えた時点に生成された上記符号化データに代えて、当該時点よりも前の上記符号化データの復号結果を再表示させるための指示コードを、上記符号化方式に従って生成し出力するコード出力手段と
を具えることを特徴とする動画像符号化装置。 In a moving image encoding apparatus that performs encoding processing on moving image data according to a predetermined encoding method, and outputs encoded data sequentially generated for each predetermined unit to the outside.
Predicted occupancy calculation means for calculating the occupancy of the encoded data when accumulated in the decoding-side buffer as a predicted occupancy;
Instead of the encoded data generated when the predicted occupancy calculated by the predicted occupancy calculation means exceeds a predetermined threshold, the decoding result of the encoded data before the time is redisplayed. And a code output means for generating and outputting an instruction code according to the encoding method.
ことを特徴とする請求項1に記載の動画像符号化装置。 The moving picture encoding apparatus according to claim 1, wherein the instruction code is configured by a part (or all) of a header defined in accordance with the encoding method.
ことを特徴とする請求項1に記載の動画像符号化装置。 The moving image encoding apparatus according to claim 1, wherein the instruction code is a skip code defined in the encoding method.
ことを特徴とする請求項1に記載の動画像符号化装置。 The moving picture encoding apparatus according to claim 1, wherein the predicted occupation amount calculation means is calculated based on an actual code amount of the encoded data in units of one frame or one field.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003309208A JP2005080004A (en) | 2003-09-01 | 2003-09-01 | Dynamic image encoding device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003309208A JP2005080004A (en) | 2003-09-01 | 2003-09-01 | Dynamic image encoding device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005080004A true JP2005080004A (en) | 2005-03-24 |
Family
ID=34411443
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003309208A Pending JP2005080004A (en) | 2003-09-01 | 2003-09-01 | Dynamic image encoding device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005080004A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009159599A (en) * | 2007-12-06 | 2009-07-16 | Canon Inc | Moving image coding apparatus, and moving image coding method |
JPWO2011138900A1 (en) * | 2010-05-06 | 2013-07-22 | 日本電信電話株式会社 | Video encoding control method and apparatus |
US9179165B2 (en) | 2010-05-07 | 2015-11-03 | Nippon Telegraph And Telephone Corporation | Video encoding control method, video encoding apparatus and video encoding program |
JP7523134B2 (en) | 2021-07-30 | 2024-07-26 | サイレックス・テクノロジー株式会社 | Transmitter and communication system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08191451A (en) * | 1995-01-10 | 1996-07-23 | Canon Inc | Moving picture transmitter |
WO1997039588A1 (en) * | 1996-04-12 | 1997-10-23 | Sony Corporation | Image encoder, image encoding method and medium on which image encoding program is recorded |
JPH10336670A (en) * | 1997-04-04 | 1998-12-18 | Sony Corp | Image transmitter, image transmission method and providing medium |
JP2002010271A (en) * | 2000-04-20 | 2002-01-11 | Matsushita Electric Ind Co Ltd | Video coding device |
JP2003125400A (en) * | 2001-10-10 | 2003-04-25 | Toshiba Corp | Method and apparatus for encoding dynamic image, program as well as method and apparatus for multiplexing dynamic image and voice |
-
2003
- 2003-09-01 JP JP2003309208A patent/JP2005080004A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08191451A (en) * | 1995-01-10 | 1996-07-23 | Canon Inc | Moving picture transmitter |
WO1997039588A1 (en) * | 1996-04-12 | 1997-10-23 | Sony Corporation | Image encoder, image encoding method and medium on which image encoding program is recorded |
JPH10336670A (en) * | 1997-04-04 | 1998-12-18 | Sony Corp | Image transmitter, image transmission method and providing medium |
JP2002010271A (en) * | 2000-04-20 | 2002-01-11 | Matsushita Electric Ind Co Ltd | Video coding device |
JP2003125400A (en) * | 2001-10-10 | 2003-04-25 | Toshiba Corp | Method and apparatus for encoding dynamic image, program as well as method and apparatus for multiplexing dynamic image and voice |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009159599A (en) * | 2007-12-06 | 2009-07-16 | Canon Inc | Moving image coding apparatus, and moving image coding method |
JPWO2011138900A1 (en) * | 2010-05-06 | 2013-07-22 | 日本電信電話株式会社 | Video encoding control method and apparatus |
JP2014135741A (en) * | 2010-05-06 | 2014-07-24 | Nippon Telegr & Teleph Corp <Ntt> | Video encoding control method and device |
US9179154B2 (en) | 2010-05-06 | 2015-11-03 | Nippon Telegraph And Telephone Corporation | Video encoding control method and apparatus |
US9179165B2 (en) | 2010-05-07 | 2015-11-03 | Nippon Telegraph And Telephone Corporation | Video encoding control method, video encoding apparatus and video encoding program |
JP7523134B2 (en) | 2021-07-30 | 2024-07-26 | サイレックス・テクノロジー株式会社 | Transmitter and communication system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4901772B2 (en) | Moving picture coding method and moving picture coding apparatus | |
US6819714B2 (en) | Video encoding apparatus that adjusts code amount by skipping encoding of image data | |
US20020057739A1 (en) | Method and apparatus for encoding video | |
JP4532980B2 (en) | Moving picture coding apparatus and method, computer program, and computer-readable storage medium | |
US8228988B2 (en) | Encoding device, encoding method, decoding device, and decoding method | |
US6509929B1 (en) | Apparatus and method for coding a moving picture | |
KR101996775B1 (en) | An encoding apparatus including a video switching apparatus and an encoding method including a video switching detecting method | |
JP2004523985A (en) | Video encoding method and corresponding encoding device | |
JP2005506776A (en) | Method and system for skipping decoding of overlay video area | |
JP2005080004A (en) | Dynamic image encoding device | |
US7408985B2 (en) | Moving picture coding apparatus and method | |
JP4586340B2 (en) | Encoding apparatus, encoding method, and program | |
JP2009246489A (en) | Video-signal switching apparatus | |
JP4708821B2 (en) | Moving picture coding apparatus, control method therefor, computer program, and storage medium | |
JP2008109259A (en) | Moving image coding device and program | |
JP2007067694A (en) | Apparatus and method for encoding image, camera, and portable terminal equipment | |
JP2005286594A (en) | Video encoder | |
JP4343745B2 (en) | Video encoding calculation amount control method, video encoding calculation amount control device, video encoding calculation amount control program, and program recording medium thereof | |
JP5007759B2 (en) | Encoding apparatus, encoding method, decoding apparatus, and decoding method | |
JPH0545117B2 (en) | ||
JPH10145793A (en) | Image coding device and method, and image decoding device and method | |
JP2002064822A (en) | Statistical multiplex system, statistical multiplex controller and method for statistically multiplexing | |
JP2004032361A (en) | Video encoder | |
JP2002330441A (en) | Encoding method, program for encoding method, recording medium for recording program for encoding method and encoder | |
JPH07236146A (en) | Image signal coding apparatus and quantization parameter setting method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060711 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20080718 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080724 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080918 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090827 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20091016 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20100428 |