JP2004180339A - Compressed moving picture re-coding system and compressed moving picture re-coding method - Google Patents
Compressed moving picture re-coding system and compressed moving picture re-coding method Download PDFInfo
- Publication number
- JP2004180339A JP2004180339A JP2004026118A JP2004026118A JP2004180339A JP 2004180339 A JP2004180339 A JP 2004180339A JP 2004026118 A JP2004026118 A JP 2004026118A JP 2004026118 A JP2004026118 A JP 2004026118A JP 2004180339 A JP2004180339 A JP 2004180339A
- Authority
- JP
- Japan
- Prior art keywords
- quantization width
- encoding
- complexity
- code amount
- compressed video
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000013139 quantization Methods 0.000 claims abstract description 319
- 230000006835 compression Effects 0.000 claims description 14
- 238000007906 compression Methods 0.000 claims description 14
- 230000007812 deficiency Effects 0.000 claims description 12
- 238000004364 calculation method Methods 0.000 abstract description 55
- 230000008569 process Effects 0.000 abstract description 3
- 230000009467 reduction Effects 0.000 abstract description 2
- 238000003079 width control Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 18
- 230000003044 adaptive effect Effects 0.000 description 14
- 230000014509 gene expression Effects 0.000 description 9
- 238000012545 processing Methods 0.000 description 8
- 238000007796 conventional method Methods 0.000 description 4
- 238000009825 accumulation Methods 0.000 description 3
- 238000013459 approach Methods 0.000 description 2
- 230000006866 deterioration Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 239000013598 vector Substances 0.000 description 2
- 230000002457 bidirectional effect Effects 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
Description
本発明は、圧縮動画像再符号化装置及び圧縮動画像再符号化方法に関し、特に、入力信号となる圧縮動画像の符号量を削減する圧縮動画像再符号化装置および圧縮動画像再符号化方法に関する。 The present invention relates to a compressed moving image re-encoding device and a compressed moving image re-encoding method, and in particular, to a compressed moving image re-encoding device and a compressed moving image re-encoding that reduce the amount of code of a compressed moving image serving as an input signal. About the method.
従来、圧縮動画像再符号化装置および圧縮動画像再符号化方法は、例えば、ディジタル放送システムやサービス等、動画像信号を伝送・蓄積する装置または方法に適用される。このディジタル放送システムやサービス等、動画像信号を伝送・蓄積する場合に、動画像信号は圧縮符号化され伝送・蓄積される。さらに近年では、動画像信号の圧縮符号化方式としてISO/ICE IS13818-2(MPEG-2 VIDEO) 等が規格化され、ディジタル放送システムやサービス等に用いられている。 2. Description of the Related Art Conventionally, a compressed moving image re-encoding device and a compressed moving image re-encoding method are applied to a device or method for transmitting and storing a moving image signal, such as a digital broadcasting system and a service. When transmitting and storing a moving image signal such as in a digital broadcasting system or service, the moving image signal is compression-encoded and transmitted and stored. In recent years, ISO / ICE IS13818-2 (MPEG-2 VIDEO) and the like have been standardized as a compression encoding method for moving image signals, and are used for digital broadcasting systems and services.
一方、放送局や家庭では、所定のビットレートで圧縮符号化された圧縮動画ストリームを、異なるビットレートの圧縮動画ストリームとして再符号化して伝送・蓄積するアプリケーションが期待されている。例えば、ディジタル記録装置への録画機能がある。 On the other hand, broadcasting stations and homes are expected to have an application that re-encodes a compressed video stream compressed and encoded at a predetermined bit rate as a compressed video stream of a different bit rate, and transmits and stores it. For example, there is a recording function for a digital recording device.
放送局から家庭に分配される圧縮動画ストリームは、所定のビットレートで符号化されている。視聴者が長時間録画等を目的とし、限られた記憶容量に分配された圧縮動画ストリームを録画する場合、分配時のビットレートよりも低いビットレートで圧縮動画ストリームを再符号化する必要がある。この場合、再符号化時の画質劣化を抑制することが望ましい。以下では、そのような圧縮動画ストリームの再符号化処理に関する従来技術を具体的に述べる。 A compressed moving image stream distributed from a broadcasting station to a home is encoded at a predetermined bit rate. When a viewer records a compressed video stream distributed to a limited storage capacity for a long-time recording or the like, it is necessary to re-encode the compressed video stream at a bit rate lower than the bit rate at the time of distribution. . In this case, it is desirable to suppress image quality degradation during re-encoding. Hereinafter, a conventional technique relating to such a re-encoding process of a compressed moving image stream will be specifically described.
以下の説明では、圧縮動画ストリームはMPEG-2 VIDEOに従って圧縮符号化されているものとする。よって以下では、MPEG-2ビットストリームとする。MPEG-2 VIDEOでは、ピクチャを複数の画素の集合からなるブロックに分割し、各ブロックに対して離散コサイン変換(DCT)を施すことにより、空間領域の信号を周波数領域の信号に変換する。この離散コサイン変換により得られる各周波数成分は、定められた量子化幅で量子化され、量子化変換係数に可変長符号を割り当てることで可変長符号化し、MPEG-2ビットストリームとして出力する。圧縮動画像再符号化装置は、基本的には入力信号であるMPEG-2ビットストリームを動画像信号に復号し、復号された動画像信号を再符号化することで実現できる。そのため圧縮動画像再符号化装置は、直列に接続された復号器と符号化器から構成される。 In the following description, it is assumed that the compressed moving image stream has been compression-encoded according to MPEG-2 VIDEO. Therefore, in the following, an MPEG-2 bit stream is used. In MPEG-2 VIDEO, a picture is divided into blocks composed of a group of a plurality of pixels, and a discrete cosine transform (DCT) is performed on each block, thereby converting a spatial domain signal into a frequency domain signal. Each frequency component obtained by the discrete cosine transform is quantized by a predetermined quantization width, and is variable-length coded by assigning a variable-length code to a quantized transform coefficient, and is output as an MPEG-2 bit stream. The compressed video re-encoding device can be basically realized by decoding an MPEG-2 bit stream as an input signal into a video signal, and re-encoding the decoded video signal. Therefore, the compressed moving picture re-encoding device is configured by a decoder and an encoder connected in series.
図12に、復号器の基本構成を示す。この図12に示す復号器は、可変長復号器201と、逆量子化器202と、逆離散コサイン変換器203と、加算器204と、フレームメモリ205と、動き補償予測器206とにより構成される。
FIG. 12 shows a basic configuration of the decoder. The decoder shown in FIG. 12 includes a
図13に、符号化器の基本構成を示す。この図13に示す符号化器は、減算器301と、離散コサイン変換器302と、量子化器303と、可変長符号化器304と、符号量制御手段305と、逆量子化器306と、逆離散コサイン変換器307と、加算器308と、フレームメモリ309と、動き補償予測器310とにより構成される。
FIG. 13 shows a basic configuration of the encoder. The encoder shown in FIG. 13 includes a
図14に、圧縮動画像再符号化装置の基本構成を示す。説明のため以下では、可変長復号器201と逆量子化器202を復号経路部41、量子化器303と可変長符号化器304を符号化経路部43とし、復号経路部41と符号化経路部43と符号量制御手段401以外の構成部を誤差補償部42とする。
FIG. 14 shows a basic configuration of the compressed moving picture re-encoding device. For the sake of explanation, the
前述したように、図14に示す圧縮動画像再符号装置は、直列に接続された復号器と符号器とで構成するため、図12に示す復号器と図13に示す符号化器を直列に接続している。また、圧縮動画像再符号化装置は、処理の高速化、画質向上の目的で可変長復号器201で復号された符号化情報を再符号化時の符号化パラメータとして再利用する。
As described above, since the compressed moving picture re-encoding device shown in FIG. 14 includes the decoder and the encoder connected in series, the decoder shown in FIG. 12 and the encoder shown in FIG. Connected. Further, the compressed moving picture re-encoding device reuses the encoded information decoded by the
これに対し、より低コストかつ簡易に圧縮動画像の再符号化を行う装置が特許文献1や特許文献2等において開示されている。図15に、特許文献1に開示されている圧縮動画像再符号装置の基本構成を示す。本図15に示す圧縮動画像再符号装置は、処理の簡略化のために、図14の誤差補償部42を省略した構成になっており、復号経路51と符号化経路52と符号量制御器501のみで構成される。ただし、この装置を用いた場合、再量子化による量子化誤差の蓄積のために画質劣化が生じる。
On the other hand, apparatuses for re-encoding a compressed moving image more simply and at lower cost are disclosed in Patent Documents 1 and 2, and the like. FIG. 15 shows a basic configuration of a compressed moving picture re-encoding device disclosed in Patent Document 1. The compressed moving picture re-encoding device shown in FIG. 15 has a configuration in which the
図16に、特許文献2に開示されている圧縮動画像再符号装置の基本構成を示す。本図16に示す圧縮動画像再符号装置は、図14の誤差補償部42に対して等価な変換である、誤差補償部62を用いることで処理の簡単化を行う。
FIG. 16 shows a basic configuration of a compressed moving picture re-encoding device disclosed in Patent Document 2. The compressed moving picture re-encoding device shown in FIG. 16 simplifies the processing by using an
これらの従来技術は、圧縮動画像再符号化装置の構成について開示されたものであり、符号量制御手段401における符号量制御に関しては述べられていない。次に圧縮動画像再符号化装置の符号量制御方式における従来技術について述べる。
These prior arts disclose the configuration of the compressed moving picture re-encoding device, but do not describe code amount control in the code
従来例1として、符号化装置の符号量制御方式であるMPEG-2のテストモデル(Test Model 5, ISO/ICE JTC1/SC21/WG11/N0400, 1993年4 月)の方式が知られている。この方式では、フレーム内符号化およびフレーム間予測符号化により発生した符号量を、ある単位時間毎に一定にしようとする固定ビットレート符号化方式を採用している。この結果、複数ピクチャの集合であるGOP(Group Of Pictures )を単位として、GOP毎に対する符号化処理により発生する符号量が一定になるよう、ピクチャを16×16画素に分割したマクロブロック単位毎に設定する基本量子化幅を設定することで、符号量を制御する。 As Conventional Example 1, a method of an MPEG-2 test model (Test Model 5, ISO / ICE JTC1 / SC21 / WG11 / N0400, April 1993), which is a code amount control method of an encoding device, is known. In this method, a fixed bit rate coding method is used in which the amount of code generated by intra-frame coding and inter-frame predictive coding is made to be constant at a certain unit time. As a result, the picture is divided into 16 × 16 pixels in units of macroblocks so that the amount of code generated by the encoding process for each GOP is constant in units of a GOP (Group Of Pictures) which is a set of a plurality of pictures. The code amount is controlled by setting the basic quantization width to be set.
しかしながら、上記従来例1は符号化装置の符号量制御方式であり、制御にはMPEG-2ビットストリームに含まれていない情報を必要とするため、直接適用することはできない。これに対し、上記従来例1の符号量制御方式に代わり、圧縮動画像再符号化装置に適した符号量制御方式が提案されている。例えば、従来例2として、図15に示した圧縮動画像再符号装置における符号量制御方式が、United State Patent 5,657,015 に開示されている。 However, the above-mentioned conventional example 1 is a code amount control method of an encoding device, and the control requires information that is not included in the MPEG-2 bit stream, so that it cannot be directly applied. On the other hand, a code amount control method suitable for a compressed moving picture re-encoding device has been proposed in place of the code amount control method of the above-mentioned conventional example 1. For example, United States Patent 5,657,015 discloses a code amount control method in the compressed video recoding device shown in FIG. 15 as Conventional Example 2.
この方式では、マクロブロック毎に再符号化後のピクチャの平均量子化幅と、ピクチャの目標符号量と、実際の符号量から基本量子化幅を設定する。次にピクチャの平均量子化幅と、符号化を行うマクロブロックの量子化幅の比率またはピクチャの符号量と、符号化を行うマクロブロックの符号量の比率を用いてアクティビティを計算し、基本量子化幅を調整することで符号量の制御を行う。 In this method, a basic quantization width is set for each macroblock based on an average quantization width of a picture after re-encoding, a target code amount of a picture, and an actual code amount. Next, the activity is calculated using the average quantization width of the picture, the ratio of the quantization width of the macroblock to be coded or the code amount of the picture, and the ratio of the code amount of the macroblock to be coded. The code amount is controlled by adjusting the quantization width.
従来例3として、United State Patent 5,805,224 が開示されている。この方式では、入力ビットレートと、出力ビットレートと、符号化を行うピクチャの符号量から再符号化時のサブピクチャの目標符号量を設定し、符号量と量子化幅の積によりピクチャの複雑度を求める。次に、複雑度をサブピクチャの目標発生符号量に応じて分配し、サブピクチャの量子化幅を設定する。また次に、目標符号量と実際の符号量の差分を制御に反映し、量子化幅を調整することで符号量の調整を行う。これら従来例2および従来例3では、再符号化時の目標符号量を入力圧縮動画ストリームのピクチャの符号量と、入力ビットレートと、出力ビットレートを用いて、設定している。
しかしながら、上記従来の方式では、入力圧縮動画ストリームの符号量に応じて、再符号化時の目標符号量を設定し、動画像のシーン特性や符号化に必要となる符号量に係わらずほぼ一様に発生符号量を削減するため、画質が劣化する問題を伴う。 However, in the above-mentioned conventional method, a target code amount at the time of re-encoding is set according to the code amount of the input compressed moving image stream, and almost one-way regardless of the scene characteristics of the moving image and the code amount required for encoding. As described above, since the generated code amount is reduced, there is a problem that image quality is deteriorated.
本発明は、圧縮動画像の再符号化時における処理遅延の短縮と画質の向上と符号化効率の向上とを実現した、圧縮動画像再符号化装置および圧縮動画像再符号化方法を提供することを目的とする。さらに述べると、本発明は、リアルタイム処理可能な圧縮動画像データの再符号化装置において、より高効率でより高画質な動画像データの再符号化を実現する圧縮動画像再符号化装置および圧縮動画像再符号化方法を提供することを目的とする。 The present invention provides a compressed moving image re-encoding device and a compressed moving image re-encoding method that realize a reduction in processing delay, an improvement in image quality, and an improvement in encoding efficiency when re-encoding a compressed moving image. The purpose is to: More specifically, the present invention relates to a re-encoding device for compressed moving image data which can be processed in real time, and a re-encoding device for re-encoding moving image data with higher efficiency and higher image quality. An object of the present invention is to provide a moving picture re-encoding method.
請求項1記載の発明は、動画像データを圧縮符号化して生成された入力圧縮動画ストリームを入力信号とし、予め設定した平均ビットレートで、かつ可変ビットレートで再符号化し、ビットレートを変更した出力圧縮動画ストリームを出力信号とする圧縮動画像再符号化装置において、前記再符号化に用いる量子化幅を計算する手段と、前記計算された量子化幅と前記入力圧縮動画ストリームにおける量子化幅を入力し、実際の再符号化に用いる量子化幅を出力する手段とを有することを特徴とする。 According to the first aspect of the present invention, an input compressed moving image stream generated by compression-encoding moving image data is used as an input signal, re-encoded at a predetermined average bit rate and at a variable bit rate, and the bit rate is changed. Means for calculating a quantization width used for the re-encoding, wherein the calculated quantization width and the quantization width in the input compressed video stream are output from a compressed moving image re-encoding device having an output compressed video stream as an output signal. And a means for outputting a quantization width used for actual re-encoding.
請求項2記載の発明は、請求項1記載の圧縮動画像再符号化装置において、前記再符号化に用いる量子化幅と前記入力圧縮動画ストリームにおける量子化幅からより大きい量子化幅を選択する手段を、さらに有することを特徴とする。 According to a second aspect of the present invention, in the compressed moving picture re-encoding device according to the first aspect, a larger quantization width is selected from a quantization width used for the re-encoding and a quantization width in the input compressed video stream. It is characterized by further comprising means.
請求項3記載の発明は、請求項1または2記載の圧縮動画像再符号化装置において、前記入力圧縮動画ストリームあるいは前記再符号化した圧縮動画ストリームの何れかにおける、量子化幅と符号量の一方または両方を用いて、二種類以上の所定の予め定められた期間またはピクチャ枚数におけるそれぞれの複雑度を計算する手段と、複数の前記複雑度から所定の複雑度を出力する手段と、前記予め設定された平均ビットレートと前記出力された複雑度とを用いて前記量子化幅を計算する手段と、目標符号量と実際の符号量との過不足量から所定の期間毎に前記量子化幅を調整して前記再符号化に用いる量子化幅とすることを特徴とする。 According to a third aspect of the present invention, in the compressed moving image re-encoding device according to the first or second aspect, the quantization width and the code amount of either the input compressed moving image stream or the re-encoded compressed moving image stream are determined. Means for calculating respective complexity in two or more predetermined periods or the number of pictures by using one or both; means for outputting a predetermined complexity from a plurality of the complexity; Means for calculating the quantization width using the set average bit rate and the output complexity, and the quantization width for each predetermined period from the excess or deficiency of the target code amount and the actual code amount. Is adjusted to obtain a quantization width used for the re-encoding.
請求項4記載の発明は、請求項3記載の圧縮動画像再符号化装置において、前記定められた期間またはピクチャ枚数として用いられる複数ピクチャとして、再符号化開始から現在再符号化をしている直前のピクチャまたはフレーム内符号化された画像を一枚含む複数のピクチャを使用することを特徴とする。 According to a fourth aspect of the present invention, in the compressed moving picture re-encoding device according to the third aspect, re-encoding is performed from the start of re-encoding as a plurality of pictures used as the predetermined period or the number of pictures. A feature is to use a plurality of pictures including one immediately preceding picture or one intra-coded picture.
請求項5記載の発明は、請求項3または4記載の圧縮動画像再符号化装置において、前記目標符号量と過不足量から基本量子化幅を調整する前記所定の期間は、ピクチャを分割したブロックの集合を使用することを特徴とする。 According to a fifth aspect of the present invention, in the compressed moving picture re-encoding device according to the third or fourth aspect, a picture is divided during the predetermined period in which a basic quantization width is adjusted from the target code amount and the excess or deficiency amount. It is characterized by using a set of blocks.
請求項6記載の発明は、請求項3または4記載の圧縮動画像再符号化装置において、前記複数の複雑度の中で最小となる複雑度を選択する手段をさらに有することを特徴とする。 According to a sixth aspect of the present invention, in the compressed moving picture re-encoding device according to the third or fourth aspect, there is further provided means for selecting a minimum complexity among the plurality of complexity.
請求項7記載の発明は、請求項3から6のいずれか1項記載の圧縮動画像再符号化装置において、前記複雑度の計算に用いられる前記入力圧縮動画ストリームの量子化幅に対して画像特性による重み付けをし、該量子化幅を調整する手段をさらに有することを特徴とする。 According to a seventh aspect of the present invention, in the compressed moving picture re-encoding apparatus according to any one of the third to sixth aspects, the quantization width of the input compressed moving image stream used in the calculation of the complexity is determined by an image. It is characterized by further comprising means for weighting by characteristics and adjusting the quantization width.
請求項8記載の発明は、請求項7記載の圧縮動画像再符号化装置において、前記入力圧縮動画ストリームの量子化幅と符号量の何れか一方または両方を用いて、所定の定められた期間またはピクチャ枚数におけるそれぞれの複雑度と再符号化対象の複雑度との比率を計算し、前記量子化幅の重み付けをし、該量子化幅を調整する手段をさらに有することを特徴とする。 According to an eighth aspect of the present invention, in the compressed moving picture re-encoding device according to the seventh aspect, a predetermined period is determined by using one or both of a quantization width and a code amount of the input compressed moving image stream. Alternatively, the image processing apparatus further includes means for calculating a ratio between each complexity in the number of pictures and the complexity to be re-encoded, weighting the quantization width, and adjusting the quantization width.
請求項9記載の発明は、請求項1記載の圧縮動画像再符号化装置において、前記入力圧縮動画ストリームの量子化幅と符号量の何れか一方または両方を用いて、二種類以上の所定の定められた期間またはピクチャ枚数におけるそれぞれの複雑度を計算する手段と、前記複数の複雑度から所定の複雑度を出力する手段と、前記予め設定された平均ビットレートと前記出力された複雑度とを用いて量子化幅を計算する手段と、前記入力圧縮動画ストリームの量子化幅を用いて、所定の期間またはピクチャ枚数毎に量子幅の平均を計算する手段と、前記量子化幅と前記平均量子化幅を用いて加算値を計算し、前記入力圧縮動画ストリームの量子化幅に加算値を加算した加算量子化幅を計算する手段と、目標符号量と実際の符号量との過不足量から所定の期間毎に前記加算量子化幅を調整して、再符号化に用いる量子化幅とすることを特徴とする。 According to a ninth aspect of the present invention, in the compressed moving image re-encoding device according to the first aspect, two or more types of predetermined moving image streams are used by using one or both of a quantization width and a code amount of the input compressed moving image stream. Means for calculating each complexity in a predetermined period or the number of pictures, means for outputting a predetermined complexity from the plurality of complexity, and the preset average bit rate and the output complexity Means for calculating the quantization width by using the quantization width of the input compressed video stream, means for calculating the average of the quantization width for each predetermined period or the number of pictures, and the quantization width and the average Means for calculating an addition value using the quantization width, and calculating an addition quantization width obtained by adding the addition value to the quantization width of the input compressed video stream; and an excess / deficiency amount between the target code amount and the actual code amount. From place Wherein by adjusting the added quantization width for each period, characterized by a quantization width used for re-encoding.
請求項10記載の発明は、請求項1記載の圧縮動画像再符号化装置において、前記入力圧縮動画ストリームの量子化幅と符号量の何れか一方または両方を用いて、二種類以上の所定の定められた期間またはピクチャ枚数におけるそれぞれの複雑度を計算する手段と、前記複数の複雑度から所定の複雑度を出力する手段と、前記予め設定された平均ビットレートと、前記出力された複雑度を用いて量子化幅を計算する手段と、前記入力圧縮動画ストリームの量子化幅を用いて、前記入力圧縮動画ストリームの符号化予測モードに応じて、所定の期間またはピクチャ枚数毎にそれぞれの量子化幅の平均を計算する手段と、前記量子化幅と前記平均量子化幅とを用いて符号化予測モード毎の加算値を計算し、前記入力圧縮動画ストリームの量子化幅に加算値を加算した加算量子化幅を計算する手段と、目標符号量と実際の符号量との過不足量から所定の期間毎に前記加算量子化幅を調整して、再符号化に用いる量子化幅とすることを特徴とする。 According to a tenth aspect of the present invention, in the compressed moving image re-encoding device according to the first aspect, two or more types of predetermined moving image are provided by using one or both of a quantization width and a code amount of the input compressed moving image stream. Means for calculating respective complexity in a predetermined period or the number of pictures, means for outputting a predetermined complexity from the plurality of complexity, the preset average bit rate, and the output complexity Means for calculating the quantization width by using the quantization width of the input compressed video stream, and by using the quantization prediction width of the input compressed video stream in accordance with the encoding prediction mode of the input compressed video stream, Means for calculating an average of the quantization widths, calculating an addition value for each encoding prediction mode using the quantization widths and the average quantization widths, and calculating a quantization width of the input compressed video stream. Means for calculating an added quantization width obtained by adding the added value, and adjusting the added quantization width for each predetermined period based on the excess or deficiency of the target code amount and the actual code amount, to obtain a quantum used for re-encoding. It is characterized in that it has a width.
請求項11記載の発明は、請求項8または9記載の圧縮動画像再符号化装置において、前記加算量子化幅に対して、所定の複数の量子化幅においては閾値設定することを特徴とする。 According to an eleventh aspect of the present invention, in the compressed moving picture re-encoding device according to the eighth or ninth aspect, a threshold value is set for a predetermined plurality of quantization widths with respect to the additional quantization width. .
請求項12記載の発明は、請求項1記載の圧縮動画像再符号化装置において、前記再符号化に用いる量子化幅に対して、最小値を設定することを特徴とする。 According to a twelfth aspect of the present invention, in the compressed moving picture re-encoding device according to the first aspect, a minimum value is set for a quantization width used for the re-encoding.
請求項13記載の発明は、動画像データを圧縮符号化して生成された入力圧縮動画ストリームを入力信号とし、予め設定した平均ビットレートで、且つ可変ビットレートで再符号化し、ビットレートを変更した出力圧縮動画ストリームを出力信号とする圧縮動画像再符号化方法において、前記再符号化に用いる量子化幅を計算する工程と、前記計算された量子化幅と前記入力圧縮動画ストリームにおける量子化幅を入力し、実際の再符号化に用いる量子化幅を出力する工程とを有することを特徴とする。 According to a thirteenth aspect of the present invention, an input compressed moving image stream generated by compression-encoding moving image data is used as an input signal, re-encoded at a predetermined average bit rate and at a variable bit rate, and the bit rate is changed. In a compressed moving image re-encoding method using an output compressed video stream as an output signal, a step of calculating a quantization width used for the re-encoding, the calculated quantization width and a quantization width in the input compressed video stream. And outputting a quantization width used for actual re-encoding.
請求項14記載の発明は、請求項13記載の圧縮動画像再符号化方法において、前記再符号化に用いる量子化幅と前記入力圧縮動画ストリームにおける量子化幅からより大きい量子化幅を選択する工程をさらに有することを特徴とする。 According to a fourteenth aspect of the present invention, in the compressed moving image re-encoding method according to the thirteenth aspect, a larger quantization width is selected from a quantization width used for the re-encoding and a quantization width in the input compressed moving image stream. The method further comprises a step.
請求項15記載の発明は、請求項14記載の圧縮動画像再符号化方法において、前記入力圧縮動画ストリームあるいは前記再符号化した圧縮動画ストリームの何れかにおける、量子化幅と符号量の一方または両方を用いて、二種類以上の所定の予め定められた期間またはピクチャ枚数におけるそれぞれの複雑度を計算する工程と、前記複数の複雑度から所定の複雑度を出力する工程と、前記予め設定された平均ビットレートと前記出力された複雑度とを用いて前記量子化幅を計算する工程と、目標符号量と実際の符号量との過不足量から所定の期間毎に前記量子化幅を調整して前記再符号化に用いる量子化幅とすることを特徴とする。 According to a fifteenth aspect of the present invention, there is provided the compressed moving image re-encoding method according to the fourteenth aspect, wherein one of the quantization width and the code amount in the input compressed moving image stream or the re-encoded compressed moving image stream. Using both, calculating the complexity of each of two or more predetermined periods or the number of pictures; outputting a predetermined complexity from the plurality of complexity; Calculating the quantization width using the averaged bit rate and the output complexity, and adjusting the quantization width at predetermined intervals from an excess or deficiency between a target code amount and an actual code amount. And a quantization width used for the re-encoding.
以上の説明より明かなように、本発明の圧縮動画像再符号化装置および圧縮動画像再符号化方法は、再符号化に用いる量子化幅を計算し、計算された量子化幅と入力圧縮動画ストリームにおける量子化幅を入力し、実際の再符号化に用いる量子化幅を出力している。よって、入力圧縮動画ストリームに含まれる符号化情報を用いて動画像のシーン特性を求め、特性に応じた量子化幅の設定を行い、設定した量子化幅に対して目標符号量と実際の符号量との差分を用いて修正を行うことで、ある期間に渡り、画質が一定の品質となり、平均ビットレートを満たし、目標符号量に近づくような制御を実現できる。これにより、高画質な再符号化を達成することができる。また、圧縮動画ストリーム全体を復号し、動画像の特性を求めることなく再符号化を行うため、低遅延かつリアルタイムに圧縮動画像ストリームの再符号化を達成することができる。 As is clear from the above description, the compressed moving image re-encoding device and the compressed moving image re-encoding method of the present invention calculate a quantization width used for re-encoding, and calculate the calculated quantization width and input compression. The quantization width in the video stream is input, and the quantization width used for actual re-encoding is output. Therefore, the scene characteristics of the moving image are obtained using the encoding information included in the input compressed video stream, the quantization width is set according to the characteristics, and the target code amount and the actual code amount are set with respect to the set quantization width. By performing the correction using the difference with the amount, it is possible to realize control such that the image quality becomes constant over a certain period, the average bit rate is satisfied, and the target code amount approaches. Thereby, high-quality re-encoding can be achieved. In addition, since the entire compressed moving image stream is decoded and re-encoded without obtaining the characteristics of the moving image, re-encoding of the compressed moving image stream can be achieved with low delay and in real time.
次に、添付図面を参照して本発明による圧縮動画像再符号化装置および圧縮動画像再符号化方法の実施形態を詳細に説明する。図1から図11を参照すると、本発明の圧縮動画像再符号化装置および圧縮動画像再符号化方法の一実施形態が示されている。 Next, embodiments of a compressed moving picture re-encoding device and a compressed moving picture re-encoding method according to the present invention will be described in detail with reference to the accompanying drawings. FIG. 1 to FIG. 11 show an embodiment of a compressed moving picture re-encoding device and a compressed moving picture re-encoding method of the present invention.
図1は、本発明の圧縮動画像再符号化装置を説明するための図である。ここで、圧縮符号化方式としてMPEG-2 VIDEOを用いることとするが、圧縮符号化方式としては、MPEG-2VIDEO に限らず、量子化幅により符号量の制御を行う圧縮符号化方式であればよい。例えば、ISO/ICE IS11172(MPEG-1 VIDEO)あるいはITU-T H.261 、ITU-T H.263 等の方式を用いてもよい。また、複雑度の計算を行う期間は符号化開始時から現在まで符号化した全ピクチャと、複数のピクチャから構成されるピクチャ群とし、目標符号量と実際の符号量の過不足量を調整する期間としては、マクロブロック単位とする。 FIG. 1 is a diagram for explaining a compressed moving picture re-encoding device according to the present invention. Here, it is assumed that MPEG-2 VIDEO is used as the compression encoding method. However, the compression encoding method is not limited to MPEG-2 VIDEO, and any other compression encoding method that controls the code amount by a quantization width may be used. Good. For example, a method such as ISO / ICE IS11172 (MPEG-1 VIDEO) or ITU-T H.261 or ITU-T H.263 may be used. In addition, the period of calculating the complexity is a group of pictures composed of all pictures coded from the start of coding to the present and a plurality of pictures, and the excess and deficiency of the target code amount and the actual code amount are adjusted. The period is a macroblock unit.
この符号化単位は、画像符号化単位の一例を示したにすぎず、複雑度の計算を行う期間は一定期間の画質を制御する単位であり、過不足量を調整する期間としてはより細かな制御を行うための複雑度の計算を行う期間より小さな単位であればよい。他に、ピクチャ群の単位としては、フレーム内予測された画像を一枚含む複数ピクチャ群や、一枚のピクチャや、ある時間におけるピクチャ等もある。ここで、図1によれば、本発明の圧縮動画像再符号装置は、復号経路部11と、誤差補償部12と、符号化経路部13と、符号量制御手段14から構成される。
This coding unit is only an example of an image coding unit, and the period for calculating the complexity is a unit for controlling the image quality for a certain period, and the period for adjusting the excess or deficiency is finer. It is sufficient that the unit is smaller than the period in which the complexity calculation for controlling is performed. In addition, as a unit of a picture group, there are a plurality of picture groups including one picture predicted in a frame, one picture, a picture at a certain time, and the like. Here, according to FIG. 1, the compressed moving picture re-encoding device of the present invention includes a
まず、MPEG-2ビットストリームが入力として復号経路部11に供給される。復号経路部11においては、入力ビットストリームの可変長復号および逆量子化を行い、入力ビットストリームのビットレートと、フレームレート、およびマクロブロック毎に入力ビットストリームの量子化幅と、入力ビットストリームの符号量を符号量制御手段14に供給する。また、復号経路部11においては、DCT係数と、動きベクトル等を誤差補償部12へ供給し、再符号化時に再利用できる符号化情報を符号化経路部13に供給する。
First, an MPEG-2 bit stream is supplied as an input to the
誤差補償部12においては、復号経路部11から供給される再量子化前のDCT係数と、動きベクトル等と、符号化経路部13から供給される再量子化後のDCT係数を用いて、再量子化による誤差の蓄積を防止し、再量子化を行うDCT係数を符号化経路部13に供給する。
The
符号化経路部13においては、復号経路部11から供給される符号化情報と、誤差補償部12から供給されるDCT係数と、符号量制御手段14から供給される量子化幅と、外部から供給される目標平均ビットレートを用いて、DCT係数の再量子化と、再符号化を行い出力ビットストリームを出力し、再符号化後の符号量を符号量制御手段14に供給する。
In the
符号量制御手段14においては、復号経路部11から供給される入力ビットストリームのビットレートと、フレームレートと、入力ビットストリームの量子化幅と、入力ビットストリームの符号量、符号化経路部13から供給される再符号化後の符号量、外部から供給される目標平均ビットレートを用いて量子化幅を計算し、符号化経路部13に供給する。ここで、符号量制御手段14は、複雑度計算手段101と、ピクチャ群量子化幅計算手段102と、量子化幅調整手段103と、量子化幅選択器104から構成される。
In the code
複雑度計算手段101においては、復号経路部11からマクロブロック毎に供給される入力ビットストリームの量子化幅と、入力ビットストリームの符号量を用いて、複数ピクチャにおけるピクチャ群複雑度および符号化を行った全ピクチャにおける複雑度を計算し、ピクチャ群量子化幅計算手段102に供給する。
The complexity calculation means 101 uses the quantization width of the input bit stream supplied from the
ピクチャ群量子化幅計算手段102においては、復号経路部11から供給されるフレームレート、外部から供給される目標平均ビットレートと、複雑度計算手段101から供給される複雑度と、ピクチャ群複雑度を用いて基本量子化幅を計算し、計算した結果を量子化幅調整手段103に供給する。
In the picture group quantization width calculation means 102, the frame rate supplied from the
量子化幅調整手段103においては、復号経路部11から供給される入力ビットストリームのビットレートと、フレームレートと、入力ビットストリームの符号量、外部から供給される目標平均ビットレートを用いて目標符号量を設定し、符号化経路部13から供給される再符号化後の符号量との差分を求め、差分に応じてピクチャ群量子化幅計算手段102から供給される基本量子化幅の調整を行い、調整した量子化幅を量子化幅選択器104に供給する。
The quantization
量子化幅選択器104においては、量子化幅調整手段103から供給される量子化幅が復号経路部11から供給される入力ビットストリームの量子化幅よりも小さい値であれば、入力ビットストリームの量子化幅を符号化経路部13に供給する。
In the
次に、本発明の符号量制御手段14における動作例を説明する。なお、以下に示す式(1)〜式(16)は、複雑度計算における処理例であり、これらの式は、複雑度計算101における処理例を表している。本複雑度計算101においては、復号経路部11からマクロブロック毎に供給される入力ビットストリームの量子化幅Qojと入力ビットストリームの符号量Sojを用いて、複数ピクチャにおけるピクチャ群の量子化幅累算値Qopおよび符号量累算値Sopおよび複雑度Xp、全ピクチャにおける量子化幅累算値Qotおよび符号量累算値Sotおよび複雑度Xtを、例えば式(1)〜式(6)により計算し、ピクチャ群複雑度Xpと複雑度Xtをピクチャ群量子化幅計算手段102に供給する。ここで、符号Npはピクチャ群におけるピクチャ数、符号Ntは符号化を行った全ピクチャ数、符号Nmbはピクチャ当たりのマクロブロック数を表す。
Next, an operation example of the code amount control means 14 of the present invention will be described. Expressions (1) to (16) shown below are processing examples in the complexity calculation, and these expressions represent processing examples in the
ピクチャ群量子化幅計算手段102においては、復号経路部11から供給されるフレームレートFRと、外部から供給される目標平均ビットレートABRと、複雑度計算手段101から供給される複雑度Xtと、ピクチャ群複雑度Xpを用いて、基本量子化幅Qbを、例えば式(7)により計算し、量子化幅調整手段103に供給する。ここで、min(Xt,Xp)はXtとXpの小さい値を選択する。上記計算では、入力ビットストリームの長期的なシーン特性とそれよりも短い期間のシーン特性を複雑度の比較を行うことで実現し、小さい値を選択することで多くの符号量を発生させる制御となり、画質の低下を抑えることができる。
In the picture group quantization width calculation means 102, the frame rate FR supplied from the
量子化幅調整手段103においては、符号化経路部11から供給される入力ビットストリームのビットレートBRと、フレームレートFRと、入力ビットストリームの符号量Sojと、外部から供給される目標平均ビットレートABRを用いて、ピクチャ群符号量累算値Sopと、ピクチャ群目標符号量Tpと、全ピクチャの目標符号量Ttを、例えば上記の式(2)、並びに下記の式(8)および式(9)により計算する。また、符号化経路部13からマクロブロック毎に供給される再符号化後の符号量Srjを用いて、全ピクチャの符号量累算値Srtを式(10)により計算し、差分VBOを式(11)により求める。さらに、ピクチャ群量子化手段102から供給される基本量子化幅Qbの調整を、例えば式(12)により計算し、量子化幅選択器104に調整を行った量子化幅Qmを供給する。
In the quantization
ここで、上記の式(9)はピクチャ群目標符号量Tpの累算値であり、符号α、rは目標平均ビットレートに対する発生符号量の差分における制御の反応の大きさを決めるパラメータである。 Here, the above equation (9) is the accumulated value of the picture group target code amount Tp, and the codes α and r are parameters that determine the magnitude of the control response in the difference between the generated code amount and the target average bit rate. .
量子化幅選択器104においては、量子化幅調整手段103から供給される量子化幅Qmが、復号経路部11から供給される入力ビットストリームの量子化幅Qjよりも小さい値であれば、入力ビットストリームの量子化幅Qjを符号化経路部13に供給する。
In the
次に、本発明の第2の実施形態を図2に示す。第1の実施形態では、複雑度計算手段101においては、復号経路部11から供給される入力ビットストリームの量子化幅と、入力ビットストリームの符号量を用いて、複雑度およびピクチャ群複雑度を計算する。本実施形態によれば、複雑度計算手段101においては、符号化経路部13から供給される再符号化後の量子化幅と、再符号化後の符号量を用いて、複雑度およびピクチャ群複雑度を計算する。
Next, a second embodiment of the present invention is shown in FIG. In the first embodiment, the
次に、本発明の第3の実施形態を図3に示す。第1の実施形態では、量子化幅選択器104においては、量子化幅調整手段103から供給された量子化幅を用いて、量子化幅の選択を行っている。本実施形態は図1に示されるブロック図に適応量子化手段901を追加したものである。適応量子化手段901においては、復号経路部11から供給される入力ビットストリームの量子化幅と、入力ビットストリームの符号量を用いて、量子化幅調整手段103から供給される量子化幅をさらに調整し、量子化幅選択器104へ供給する。
Next, a third embodiment of the present invention is shown in FIG. In the first embodiment, the
次に適応量子化手段901の動作の一例を示す。適応量子化手段901においては復号経路11から供給される入力ビットストリームの量子化幅Qjと、符号量Sj、量子化幅調整手段103から供給される量子化幅Qmを用いて、例えば式(3)から得られるピクチャ群複雑度Xpおよび下記の式(13)により量子化幅Qaを計算し、量子化幅選択器104へ供給する。ここで、ピクチャ群におけるピクチャ数Npは、複雑度計算手段101で用いられるピクチャ群のピクチャ数と同じである必要はない。本実施形態では、通常画像信号を用いて行うアクティビティの計算を、入力ビットストリームの量子化幅と符号量を用いて計算を行い、量子化幅を修正する。その結果、画像信号レベルまで復号を行わない構成の圧縮画像再符号化装置に対しても、画像の性質を用いた適応量子化を行える。
Next, an example of the operation of the adaptive quantization means 901 will be described. The adaptive quantization means 901 uses the quantization width Qj of the input bit stream supplied from the
次に、本発明の第4の実施形態を図4に示す。第1の実施形態では、ピクチャ群複雑度101においては、複雑度の計算に入力ビットストリームの量子化幅を用いている。本実施形態は、図1に示されるブロック図に逆適応量子化器1001を追加したものである。
Next, a fourth embodiment of the present invention is shown in FIG. In the first embodiment, in the
逆適応量子化器1001においては、復号経路部11から供給されるビットストリームの量子化幅と、入力ビットストリームの符号量を用いて、復号経路部11から供給される入力ビットストリームの量子化幅を調整し、複雑度計算手段101に供給する。逆適応量子化手段1001の動作例としては、例えば、図3における適応量子化手段901の逆変換が考えられる。本実施形態では、複雑度の計算のために、入力ビットストリームの量子化幅と、入力ビットストリームの符号量を用いて、入力ビットストリームの量子化幅を調整する。その結果、符号化時に適応量子化が行われた入力ビットストリームの量子化幅に対しても、適応量子化前の量子化幅を推定することが可能であり、適応量子化前の量子化幅を用いた複雑度の計算が可能になる。
In the inverse
次に、本発明の第5の実施形態を図5に示す。本実施形態は、図1に対して、量子化幅選択器104の外部入力が追加されている。第1の実施形態の量子化幅選択器1101においては、量子化幅調整手段103から供給される量子化幅が復号経路部11から供給される入力ビットストリームの量子化幅よりも小さい値であれば、入力ビットストリームの量子化幅を符号化経路部13に供給している。本実施形態の量子化幅選択器1101においては、上記入力に加え、外部から最小量子化幅が供給され、量子化幅調整手段103から供給される量子化幅と入力ビットストリームの量子化幅が最小量子化幅よりも小さい値であれば、最小量子化幅を符号化経路部13に供給する。これにより本実施形態では、量子化幅を小さく設定しすぎることによる無駄な符号の発生を抑えることが可能になる。
Next, a fifth embodiment of the present invention is shown in FIG. In the present embodiment, an external input of the
次に、本発明の第6の実施形態を図6に示す。本実施形態は図1に示されるブロック図に最大ビットレート量子化幅計算手段1201を追加したものである。最大ビットレート量子化幅計算手段1201においては、復号経路部11から供給される入力ビットストリームの量子化幅と、入力ビットストリームの符号量と、入力ビットストリームのビットレートおよびフレームレート、復号経路部13から供給される再符号化後の量子化幅と、再符号化後の符号量、外部から供給される最大ビットレート等を用いて、指定された最大ビットレートを超えないような最大ビットレート量子化幅を設定し、量子化幅選択器104へ供給する。
Next, a sixth embodiment of the present invention is shown in FIG. This embodiment is obtained by adding a maximum bit rate quantization width calculating means 1201 to the block diagram shown in FIG. In the maximum bit rate quantization width calculation means 1201, the quantization width of the input bit stream supplied from the
量子化幅選択器1202においては、上記入力に加え、最大ビットレート量子化幅計算手段1201から供給される最大ビットレート量子化幅を用いて、量子化幅調整手段103から供給される量子化幅と、入力ビットストリームの量子化幅が最大ビットレート量子化幅よりも小さい値であれば、最大ビットレート量子化幅を符号化経路部13に供給する。ここで、最大ビットレート量子化幅計算手段1201における最大ビットレート量子化幅の計算方法としては、例えば、入力ビットストリームのビットレートと最大ビットレート比率および入力ビットストリームの符号量を用いて、目標符号量を設定し、目標符号量を満たすような符号量制御を用いて、マクロブロック単位の量子化幅を計算することで実現できる。本実施形態では、入力ビットストリームのビットレートが非常に高く、目標平均ビットレートが低い場合に、必要以上に符号化幅を小さく設定しすぎて、無駄な符号の発生を抑えることが可能になる。
The
次に、本発明の第7の実施形態を図7に示す。本実施形態の、符号量制御手段14は、複雑度計算手段101と、ピクチャ群量子化幅計算手段102と、量子化幅調整手段103と、量子化幅選択器104と、平均量子化幅計算手段1301と、加算値計算手段1302から構成される。
Next, a seventh embodiment of the present invention is shown in FIG. In the present embodiment, the code
以下では、第1の実施形態と異なる部分に関してのみ説明する。平均量子化幅計算手段1301においては、復号経路部11から供給される入力ビットストリームの量子化幅を複数ピクチャ期間累算し、その平均値を加算値計算手段1302に供給する。
Hereinafter, only the portions different from the first embodiment will be described. The average quantization
加算値計算手段1302においては、ピクチャ群量子化幅計算手段102から供給される基本量子化幅と、平均量子化幅計算手段1301から供給される平均量子化幅の差分値を、復号経路部11から供給される入力ビットストリームの量子化幅に加算し、量子化幅調整手段103に供給する。
The addition value calculation means 1302 calculates a difference value between the basic quantization width supplied from the picture group quantization width calculation means 102 and the average quantization width supplied from the average quantization width calculation means 1301 by using the
次に平均量子化幅計算手段1301および加算値計算手段1302の動作の一例を示す。平均量子化幅計算手段1301においては、平均量子化幅Qaveは復号経路部11から供給される量子化幅Qjを用いて、上記の式(1)および下記の式(14)により計算され、加算値計算手段1302へ供給される。ここで、ピクチャ群におけるピクチャ数Npは、複雑度計算手段101で用いられるピクチャ群のピクチャ数と同じである必要はない。
Next, an example of the operation of the average quantization width calculation means 1301 and the added value calculation means 1302 will be described. In the average quantization width calculating means 1301, the average quantization width Qave is calculated by the above expression (1) and the following expression (14) using the quantization width Qj supplied from the
加算値計算手段1302においては、加算値Aをピクチャ群量子化幅計算手段102から供給される量子化幅Qb、平均量子化幅計算手段1301から供給される平均量子化幅Qaveを用いて、例えば下記の式(15)により計算し、量子化幅調整手段103へ供給する。これにより本実施形態では、入力ビットストリームの量子化幅に加算値を加えるため、符号化時に適応量子化を用いて量子化幅が設定されている場合、適応量子化を考慮することなく量子化幅を設定できる。 The addition value calculation means 1302 calculates the addition value A by using the quantization width Qb supplied from the picture group quantization width calculation means 102 and the average quantization width Qave supplied from the average quantization width calculation means 1301, for example. It is calculated by the following equation (15) and supplied to the quantization width adjusting means 103. Accordingly, in the present embodiment, since the added value is added to the quantization width of the input bit stream, if the quantization width is set using adaptive quantization during encoding, the quantization is performed without considering the adaptive quantization. You can set the width.
次に、本発明の第8の実施形態を図8に示す。本実施形態は、図7に対して、加算値計算手段1302への外部入力が追加されている。第7の実施形態の加算値計算手段1302においては、ピクチャ群量子化幅計算手段102から供給される基本量子化幅と、平均量子化幅計算手段1301から供給される平均量子化幅の差分値を、復号経路部11から供給される入力ビットストリームの量子化幅に加算し、量子化幅を計算している。
Next, an eighth embodiment of the present invention is shown in FIG. In the present embodiment, an external input to the addition value calculation means 1302 is added to FIG. In the addition value calculation means 1302 of the seventh embodiment, the difference value between the basic quantization width supplied from the picture group quantization width calculation means 102 and the average quantization width supplied from the average quantization width calculation means 1301 Is added to the quantization width of the input bit stream supplied from the
本実施形態の量子化幅設定手段1401においては、上記入力に加え、外部から最小量子化幅もしくは閾値が供給される。加算値計算手段1401においては、計算した量子化幅と、量子化幅もしくは閾値を比較することで、量子化幅の選択を行い、量子化幅調整手段103に量子化幅を供給する。
In the quantization
加算値計算手段の動作例を図9に示す。本図9は、最小量子化幅と閾値が設定されていた場合にどの量子化幅が選択されるかを示したものである。横軸は入力ビットストリームの量子化幅を表し、縦軸は再符号化後の量子化幅を表す。グラフの太線が本量子化幅設定により選択される量子化幅である。 FIG. 9 shows an operation example of the addition value calculation means. FIG. 9 shows which quantization width is selected when the minimum quantization width and the threshold are set. The horizontal axis represents the quantization width of the input bit stream, and the vertical axis represents the quantization width after re-encoding. The thick line in the graph is the quantization width selected by the main quantization width setting.
ここで、最小量子化幅により、量子化幅の最小値を設定し、閾値によりある量子化幅以降においては、入力ビットストリームの量子化幅が閾値を超えるまでは、再符号化後の量子化幅が閾値を越えないように量子化幅が設定される。これにより本実施形態では、再量子化後の量子化幅の最小値を設定することで過剰な符号量の発生を抑制する。また、閾値よりも大きな量子化幅を選択しないようにし、画質劣化を抑制する。 Here, the minimum quantization width is set by the minimum quantization width, and after a certain quantization width by the threshold, the quantization after re-encoding is performed until the quantization width of the input bit stream exceeds the threshold. The quantization width is set so that the width does not exceed the threshold. Thus, in the present embodiment, the generation of an excessive code amount is suppressed by setting the minimum value of the quantization width after requantization. In addition, a quantization width larger than the threshold value is not selected to suppress image quality deterioration.
次に、本発明の第9の実施形態について説明する。第7および第8の実施形態では、どの符号化予測方式においても等しい加算値を入力ビットストリームの量子化幅に加算している。第9の実施形態では、ピクチャの符号化予測方式毎に加算値を保持する。例えば、MPEG-2におけるフレーム内符号化(Iピクチャ)、前方向フレーム間符号化(Pピクチャ)、双方向フレーム間符号化(Bピクチャ)に対して、平均量子化幅計算手段1301において符号化モード毎に平均量子化幅Qaveを計算し、加算値計算手段1302へ供給する。
Next, a ninth embodiment of the present invention will be described. In the seventh and eighth embodiments, the same addition value is added to the quantization width of the input bit stream in any of the coding prediction methods. In the ninth embodiment, an addition value is held for each picture coding prediction method. For example, the average quantization
加算値計算手段1302においてピクチャ群量子化幅計算手段102から供給される基本量子化幅と、平均量子化幅計算手段1301から供給される符号化モード毎の平均量子化幅の差分値を計算し、符号化モード毎に復号経路部11から供給される入力ビットストリームの量子化幅に加算し、量子化幅の計算を行う。これにより本実施形態では、符号化モードに応じて加算値を切り替えるため、単一の加算値よりも細かな制御が可能になり、画質を向上させることが可能になる。
The addition value calculation means 1302 calculates a difference value between the basic quantization width supplied from the picture group quantization width calculation means 102 and the average quantization width for each coding mode supplied from the average quantization width calculation means 1301. , Is added to the quantization width of the input bit stream supplied from the
上記の実施形態において、例えば、入力である圧縮動画ストリーム1を再符号化し、圧縮動画ストリーム2を出力することを考える。図10は圧縮動画ストリーム1および再符号化後の圧縮動画ストリーム2におけるピクチャ当たりの平均量子化幅と時間の関係と、図11はその時の発生符号量と時間の関係の一例を示したものである。図10および図11の細い実線が圧縮動画ストリーム1を表す。 In the above-described embodiment, for example, consider that the input compressed video stream 1 is re-encoded and the compressed video stream 2 is output. FIG. 10 shows an example of the relationship between the average quantization width per picture and time in the compressed moving image stream 1 and the compressed moving image stream 2 after re-encoding, and FIG. 11 shows an example of the relationship between the generated code amount and time at that time. is there. The thin solid line in FIG. 10 and FIG.
一般に、符号量の削減は、圧縮動画ストリーム1における量子化幅よりも大きな量子化幅を設定して再量子化することで実現できる。ちなみに従来の方式では、圧縮動画ストリーム1の符号量に応じて、再符号化時の目標符号量を設定し、量子化幅を設定する。例えば図11のような場合には、どの期間においても、ほぼ一定の符号量を削減する必要があるため、一様に量子化幅を大きく設定してまう。その結果、図10の破線に示すように、入力圧縮動画ストリームの量子化幅が大きく画質の悪いピクチャに対しても、再符号化時にさらに大きい値を設定してしまい、画質劣化を引き起こす原因になる。そこで、図10の太い実線で示すような、動画像のシーン特性に応じた量子化幅の設定をすれば、このような問題は解決できる。本発明では、入力圧縮動画ストリームに含まれる符号化情報を用いて、動画像のシーン特性を求め、特性に応じた量子化幅を設定する。 In general, the code amount can be reduced by setting a quantization width larger than the quantization width in the compressed moving image stream 1 and performing re-quantization. Incidentally, in the conventional method, a target code amount at the time of re-encoding is set according to the code amount of the compressed moving image stream 1, and a quantization width is set. For example, in the case of FIG. 11, it is necessary to reduce a substantially constant code amount in any period, so that the quantization width is set uniformly large. As a result, as shown by the dashed line in FIG. 10, even for a picture with a large quantization width of the input compressed moving image stream and poor image quality, a larger value is set at the time of re-encoding, which may cause image quality deterioration. Become. Therefore, such a problem can be solved by setting the quantization width according to the scene characteristics of the moving image as shown by the thick solid line in FIG. According to the present invention, scene characteristics of a moving image are obtained using coding information included in an input compressed moving image stream, and a quantization width according to the characteristics is set.
次に、設定した量子化幅に対して、平均ビットレート等を用いて求めた目標符号量と、実際の符号量との差分を用いて修正を行う。その結果、ある期間にわたり画質が一定の品質となり、また平均ビットレートを満たし、目標符号量に近づくような制御を実現できる。また、量子化幅は入力圧縮動画ストリームの量子化幅よりも小さな値にならないようにすることで、必要以上に多くの符号量を割り当てることなく、より平均的な画質の向上を実現できる。さらに、本発明では、一旦、圧縮動画ストリーム全体を復号し、動画像の特性を求めることなく再符号化を行うため、遅延の少ないリアルタイム処理が実現できる。 Next, the set quantization width is corrected using the difference between the target code amount obtained using the average bit rate and the like and the actual code amount. As a result, control can be realized such that the image quality is constant over a certain period, the average bit rate is satisfied, and the target code amount approaches. In addition, by preventing the quantization width from being smaller than the quantization width of the input compressed moving image stream, it is possible to improve the average image quality without allocating an unnecessarily large amount of code. Furthermore, in the present invention, since the entire compressed moving image stream is once decoded and re-encoded without obtaining the characteristics of the moving image, real-time processing with little delay can be realized.
尚、上述の実施形態は本発明の好適な実施の一例である。但し、これに限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々変形実施が可能である。 The above embodiment is an example of a preferred embodiment of the present invention. However, the present invention is not limited to this, and various modifications can be made without departing from the scope of the present invention.
11 復号経路部
12 誤差補償部
13 符号化経路部
14 符号量制御手段
101 複雑度計算手段
102 ピクチャ群量子化幅計算手段
103 量子化幅調整手段
104 量子化幅選択器
201 可変長復号器
202 逆量子化器
203 逆離散コサイン変換器
204 加算器
205 フレームメモリ
206 動き補償予測器
301 減算器
302 離散コサイン変換器
303 量子化器
304 可変長符号化器
305 符号量制御手段
306 逆量子化器
307 逆離散コサイン変換器
308 加算器
309 フレームメモリ
310 動き補償予測器
41 復号経路部
42 誤差補償部
43 符号化経路部
401 符号量制御手段
51 復号経路部
52 符号化経路部
501 符号量制御手段
61 復号経路部
62 誤差補償部
63 符号化経路部
601 減算器
602 逆量子化器
603 減算器
604 逆離散コサイン変換器
605 フレームメモリ
606 動き補償予測器
607 離散コサイン変換器
608 符号量制御手段
901 適応量子化手段
1001 逆適応量子化手段
1101 量子化幅選択器
1201 最大ビットレート量子化幅計算手段
1202 量子化幅選択器
1301 平均量子化幅計算手段
1302、1401 加算値計算手段
Claims (15)
前記再符号化に用いる量子化幅を計算する手段と、
前記計算された量子化幅と前記入力圧縮動画ストリームにおける量子化幅を入力し、実際の再符号化に用いる量子化幅を出力する手段とを有することを特徴とする圧縮動画像再符号化装置。 An input compressed video stream generated by compression-coding moving image data is used as an input signal, and an output compressed video stream with a changed average bit rate and a variable bit rate is re-encoded at a predetermined average bit rate, and the output compressed video stream having a changed bit rate is output as an output signal. Compressed video re-encoding device,
Means for calculating a quantization width used for the re-encoding,
Means for inputting the calculated quantization width and the quantization width in the input compressed video stream and outputting a quantization width used for actual re-encoding. .
複数の前記複雑度から所定の複雑度を出力する手段と、
前記予め設定された平均ビットレートと前記出力された複雑度とを用いて前記量子化幅を計算する手段と、
目標符号量と実際の符号量との過不足量から所定の期間毎に前記量子化幅を調整して前記再符号化に用いる量子化幅とすることを特徴とする請求項1または2に記載の圧縮動画像再符号化装置。 In either the input compressed moving image stream or the re-encoded compressed moving image stream, using one or both of the quantization width and the code amount, each of the two or more predetermined predetermined periods or the number of pictures is used. Means for calculating complexity;
Means for outputting a predetermined complexity from the plurality of complexity,
Means for calculating the quantization width using the preset average bit rate and the output complexity,
3. The quantization width used for the re-encoding by adjusting the quantization width every predetermined period from an excess or deficiency of a target code amount and an actual code amount. Compressed video re-encoding device.
前記複数の複雑度から所定の複雑度を出力する手段と、
前記予め設定された平均ビットレートと前記出力された複雑度とを用いて量子化幅を計算する手段と、
前記入力圧縮動画ストリームの量子化幅を用いて、所定の期間またはピクチャ枚数毎に量子幅の平均を計算する手段と、
前記量子化幅と前記平均量子化幅を用いて加算値を計算し、前記入力圧縮動画ストリームの量子化幅に加算値を加算した加算量子化幅を計算する手段と、
目標符号量と実際の符号量との過不足量から所定の期間毎に前記加算量子化幅を調整して、再符号化に用いる量子化幅とすることを特徴とする請求項1記載の圧縮動画像再符号化装置。 Means for calculating the complexity of each of the two or more predetermined periods or the number of pictures using one or both of the quantization width and the code amount of the input compressed video stream,
Means for outputting a predetermined complexity from the plurality of complexity,
Means for calculating a quantization width using the preset average bit rate and the output complexity,
Using the quantization width of the input compressed video stream, means for calculating an average of the quantum width for each predetermined period or number of pictures,
Means for calculating an addition value using the quantization width and the average quantization width, and calculating an addition quantization width obtained by adding the addition value to the quantization width of the input compressed video stream;
2. The compression method according to claim 1, wherein the additional quantization width is adjusted every predetermined period from the excess or deficiency of the target code amount and the actual code amount to obtain a quantization width used for re-encoding. Moving image re-encoding device.
前記複数の複雑度から所定の複雑度を出力する手段と、
前記予め設定された平均ビットレートと、前記出力された複雑度を用いて量子化幅を計算する手段と、
前記入力圧縮動画ストリームの量子化幅を用いて、前記入力圧縮動画ストリームの符号化予測モードに応じて、所定の期間またはピクチャ枚数毎にそれぞれの量子化幅の平均を計算する手段と、
前記量子化幅と前記平均量子化幅とを用いて符号化予測モード毎の加算値を計算し、前記入力圧縮動画ストリームの量子化幅に加算値を加算した加算量子化幅を計算する手段と、
目標符号量と実際の符号量との過不足量から所定の期間毎に前記加算量子化幅を調整して、再符号化に用いる量子化幅とすることを特徴とする請求項1記載の圧縮動画像再符号化装置。 Means for calculating the complexity of each of the two or more predetermined periods or the number of pictures using one or both of the quantization width and the code amount of the input compressed video stream,
Means for outputting a predetermined complexity from the plurality of complexity,
Means for calculating a quantization width using the preset average bit rate and the output complexity,
Using the quantization width of the input compressed video stream, according to the encoding prediction mode of the input compressed video stream, means for calculating the average of the respective quantization width for each predetermined period or number of pictures,
Means for calculating an addition value for each coding prediction mode using the quantization width and the average quantization width, and calculating an addition quantization width obtained by adding the addition value to the quantization width of the input compressed video stream. ,
2. The compression method according to claim 1, wherein the additional quantization width is adjusted every predetermined period from the excess or deficiency of the target code amount and the actual code amount to obtain a quantization width used for re-encoding. Moving image re-encoding device.
前記再符号化に用いる量子化幅を計算する工程と、
前記計算された量子化幅と前記入力圧縮動画ストリームにおける量子化幅を入力し、実際の再符号化に用いる量子化幅を出力する工程とを有することを特徴とする圧縮動画像再符号化方法。 An input compressed video stream generated by compressing and encoding moving image data is used as an input signal, an output compressed video stream having a predetermined average bit rate and re-encoded at a variable bit rate, and an output compressed video stream having a changed bit rate is output. Compressed video re-encoding method,
Calculating a quantization width used for the re-encoding,
Inputting the calculated quantization width and the quantization width in the input compressed video stream, and outputting a quantization width used for actual re-encoding. .
前記複数の複雑度から所定の複雑度を出力する工程と、
前記予め設定された平均ビットレートと前記出力された複雑度とを用いて前記量子化幅を計算する工程と、
目標符号量と実際の符号量との過不足量から所定の期間毎に前記量子化幅を調整して前記再符号化に用いる量子化幅とすることを特徴とする請求項13または14に記載の圧縮動画像再符号化方法。 In either the input compressed moving image stream or the re-encoded compressed moving image stream, using one or both of the quantization width and the code amount, each of the two or more predetermined predetermined periods or the number of pictures is used. Calculating the complexity;
Outputting a predetermined complexity from the plurality of complexity,
Calculating the quantization width using the preset average bit rate and the output complexity;
15. The quantization width used for the re-encoding by adjusting the quantization width for each predetermined period from the excess or deficiency of the target code amount and the actual code amount. Compressed video re-encoding method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004026118A JP4023451B2 (en) | 2004-02-02 | 2004-02-02 | Compressed video re-encoding device and compressed video re-encoding method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004026118A JP4023451B2 (en) | 2004-02-02 | 2004-02-02 | Compressed video re-encoding device and compressed video re-encoding method |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP36763799A Division JP3871840B2 (en) | 1999-12-24 | 1999-12-24 | Compressed video re-encoding device |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007185162A Division JP4748126B2 (en) | 2007-07-17 | 2007-07-17 | Compressed video re-encoding device and compressed video re-encoding method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004180339A true JP2004180339A (en) | 2004-06-24 |
JP4023451B2 JP4023451B2 (en) | 2007-12-19 |
Family
ID=32709474
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004026118A Expired - Lifetime JP4023451B2 (en) | 2004-02-02 | 2004-02-02 | Compressed video re-encoding device and compressed video re-encoding method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4023451B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014196113A1 (en) | 2013-06-06 | 2014-12-11 | 日本電気株式会社 | Time series data encoding apparatus, method, and program, and time series data re-encoding apparatus, method, and program |
-
2004
- 2004-02-02 JP JP2004026118A patent/JP4023451B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP4023451B2 (en) | 2007-12-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3871840B2 (en) | Compressed video re-encoding device | |
Wang et al. | Rate-distortion optimization of rate control for H. 264 with adaptive initial quantization parameter determination | |
US9071840B2 (en) | Encoder with adaptive rate control for H.264 | |
KR101089325B1 (en) | Encoding method, decoding method, and encoding apparatus for a digital picture sequence | |
US20100111163A1 (en) | Method for p-domain frame level bit allocation for effective rate control and enhanced video encoding quality | |
KR20090108026A (en) | Improved Video Rate Control for Video Coding Standards | |
KR100790149B1 (en) | Rate control of scene-changed video encoder | |
JP3259702B2 (en) | Moving picture variable bit rate coding apparatus and method | |
WO2000018137A1 (en) | Frame-level rate control for video compression | |
JP4072859B2 (en) | Video information re-encoding device | |
US8442113B2 (en) | Effective rate control for video encoding and transcoding | |
KR100588795B1 (en) | Coding Device and Coding Method | |
JP4224778B2 (en) | STREAM CONVERTING APPARATUS AND METHOD, ENCODING APPARATUS AND METHOD, RECORDING MEDIUM, AND PROGRAM | |
JPH0998427A (en) | Dynamic image encoding device | |
JP4826533B2 (en) | Image processing apparatus, image processing method, program, and recording medium | |
JP4277530B2 (en) | Image processing apparatus and encoding apparatus and methods thereof | |
KR100800838B1 (en) | How to control video encoding data rate | |
JP2005012249A (en) | Image processing apparatus and image processing method, information processing apparatus, recording medium, and program | |
JP4407249B2 (en) | Data processing apparatus, method and encoding apparatus, method and program | |
JP4788653B2 (en) | Image data transcoding apparatus and transcoding method | |
JP4023451B2 (en) | Compressed video re-encoding device and compressed video re-encoding method | |
JP4292659B2 (en) | Image information conversion apparatus and image information conversion method | |
JP4748126B2 (en) | Compressed video re-encoding device and compressed video re-encoding method | |
JPH0775095A (en) | Rate control circuit | |
JP2002218470A (en) | Method for converting image encoded data rate and device for converting image encoding rate |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060711 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060911 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070220 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070420 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20070605 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20070705 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070717 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20070705 |
|
A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20070823 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20070911 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070924 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4023451 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101012 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111012 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121012 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131012 Year of fee payment: 6 |
|
EXPY | Cancellation because of completion of term |