[go: up one dir, main page]

JP2007318794A - Apparatus and method for reencoding compressed moving image - Google Patents

Apparatus and method for reencoding compressed moving image Download PDF

Info

Publication number
JP2007318794A
JP2007318794A JP2007185162A JP2007185162A JP2007318794A JP 2007318794 A JP2007318794 A JP 2007318794A JP 2007185162 A JP2007185162 A JP 2007185162A JP 2007185162 A JP2007185162 A JP 2007185162A JP 2007318794 A JP2007318794 A JP 2007318794A
Authority
JP
Japan
Prior art keywords
quantization width
encoding
complexity
moving image
code amount
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
Application number
JP2007185162A
Other languages
Japanese (ja)
Other versions
JP4748126B2 (en
Inventor
Junji Tajime
純二 田治米
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2007185162A priority Critical patent/JP4748126B2/en
Publication of JP2007318794A publication Critical patent/JP2007318794A/en
Application granted granted Critical
Publication of JP4748126B2 publication Critical patent/JP4748126B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a compressed moving image reencoding apparatus capable of shortening processing delay for the reencoding of a compressed moving image and improving picture quality. <P>SOLUTION: A complexity calculation means 101 calculates respective complexities in two or more sorts of determined periods or the number of pictures by using either one or both of the quantization width and code amount of an input compressed moving image stream. A picture group quantization width calculation means 102 outputs a certain complexity out of the plurality of complexities and a quantization width adjusting means 103 calculates the quantization width by using a previously set average bit rate and the outputted complexity. Further, a quantization width selector 104 for adjusting the quantization width in a certain period from a difference between a target code amount and a practical code amount calculates the quantization width to be used for reencoding, inputs the calculated quantization width and the quantization width of the inputted compressed moving image stream and outputs the quantization width to be used for practical reencoding to control the code amount. Consequently the compressed moving image stream is reencoded by a variable bit rate and a compressed moving image stream whose bit rate is changed is outputted. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、圧縮動画像再符号化装置及び圧縮動画像再符号化方法に関し、特に、入力信号となる圧縮動画像の符号量を削減する圧縮動画像再符号化装置および圧縮動画像再符号化方法に関する。   The present invention relates to a compressed moving image re-encoding device and a compressed moving image re-encoding method, and more particularly, to a compressed moving image re-encoding device and a compressed moving image re-encoding for reducing the code amount of a compressed moving image serving as an input signal. Regarding 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 an apparatus or a method for transmitting and storing a moving image signal such as a digital broadcasting system or a service. When a moving image signal is transmitted / stored in the digital broadcasting system or service, the moving image signal is compressed and encoded and transmitted / stored. In recent years, ISO / ICE IS13818-2 (MPEG-2 VIDEO) has been standardized as a compression encoding method for moving image signals, and is used in digital broadcasting systems and services.

一方、放送局や家庭では、所定のビットレートで圧縮符号化された圧縮動画ストリームを、異なるビットレートの圧縮動画ストリームとして再符号化して伝送・蓄積するアプリケーションが期待されている。例えば、ディジタル記録装置への録画機能がある。   On the other hand, in broadcasting stations and homes, applications are expected that re-encode a compressed video stream that has been compression-encoded at a predetermined bit rate as a compressed video stream having a different bit rate, and transmit / store the compressed video stream. For example, there is a recording function for a digital recording apparatus.

放送局から家庭に分配される圧縮動画ストリームは、所定のビットレートで符号化されている。視聴者が長時間録画等を目的とし、限られた記憶容量に分配された圧縮動画ストリームを録画する場合、分配時のビットレートよりも低いビットレートで圧縮動画ストリームを再符号化する必要がある。この場合、再符号化時の画質劣化を抑制することが望ましい。以下では、そのような圧縮動画ストリームの再符号化処理に関する従来技術を具体的に述べる。   The compressed video stream distributed from the broadcasting station to the home is encoded at a predetermined bit rate. When a viewer records a compressed video stream distributed to a limited storage capacity for the purpose of 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. In the following, a conventional technique related to such re-encoding processing 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 video stream is compression-encoded according to MPEG-2 VIDEO. Therefore, in the following, an MPEG-2 bit stream is assumed. In MPEG-2 VIDEO, a picture is divided into blocks each composed of a set of pixels, and a discrete cosine transform (DCT) is performed on each block to convert a spatial domain signal into a frequency domain signal. Each frequency component obtained by the discrete cosine transform is quantized with a predetermined quantization width, variable-length coded by assigning a variable-length code to the quantized transform coefficient, and output as an MPEG-2 bit stream. The compressed moving image re-encoding device can be basically realized by decoding an MPEG-2 bit stream as an input signal into a moving image signal and re-encoding the decoded moving image signal. For this reason, the compressed video re-encoding device includes a decoder and an encoder connected in series.

図12に、復号器の基本構成を示す。この図12に示す復号器は、可変長復号器201と、逆量子化器202と、逆離散コサイン変換器203と、加算器204と、フレームメモリ205と、動き補償予測器206とにより構成される。   FIG. 12 shows the basic configuration of the decoder. The decoder shown in FIG. 12 includes a variable length decoder 201, an inverse quantizer 202, an inverse discrete cosine transformer 203, an adder 204, a frame memory 205, and a motion compensation predictor 206. The

図13に、符号化器の基本構成を示す。この図13に示す符号化器は、減算器301と、離散コサイン変換器302と、量子化器303と、可変長符号化器304と、符号量制御手段305と、逆量子化器306と、逆離散コサイン変換器307と、加算器308と、フレームメモリ309と、動き補償予測器310とにより構成される。   FIG. 13 shows the basic configuration of the encoder. The encoder shown in FIG. 13 includes a subtractor 301, a discrete cosine transformer 302, a quantizer 303, a variable length encoder 304, a code amount control means 305, an inverse quantizer 306, An inverse discrete cosine transformer 307, an adder 308, a frame memory 309, and a motion compensation predictor 310 are included.

図14に、圧縮動画像再符号化装置の基本構成を示す。説明のため以下では、可変長復号器201と逆量子化器202を復号経路部41、量子化器303と可変長符号化器304を符号化経路部43とし、復号経路部41と符号化経路部43と符号量制御手段401以外の構成部を誤差補償部42とする。   FIG. 14 shows a basic configuration of a compressed video re-encoding device. In the following description, the variable length decoder 201 and the inverse quantizer 202 are referred to as a decoding path unit 41, the quantizer 303 and the variable length encoder 304 are referred to as an encoding path unit 43, and the decoding path unit 41 and the encoding path are described below. A component other than the unit 43 and the code amount control unit 401 is referred to as an error compensation unit 42.

前述したように、図14に示す圧縮動画像再符号装置は、直列に接続された復号器と符号器とで構成するため、図12に示す復号器と図13に示す符号化器を直列に接続している。また、圧縮動画像再符号化装置は、処理の高速化、画質向上の目的で可変長復号器201で復号された符号化情報を再符号化時の符号化パラメータとして再利用する。   As described above, since the compressed video re-encoding device shown in FIG. 14 includes a decoder and an encoder connected in series, the decoder shown in FIG. 12 and the encoder shown in FIG. 13 are connected in series. Connected. The compressed video re-encoding apparatus reuses the encoded information decoded by the variable-length decoder 201 as an encoding parameter at the time of re-encoding for the purpose of speeding up the processing and improving the image quality.

これに対し、より低コストかつ簡易に圧縮動画像の再符号化を行う装置が特許文献1や特許文献2等において開示されている。図15に、特許文献1に開示されている圧縮動画像再符号装置の基本構成を示す。本図15に示す圧縮動画像再符号装置は、処理の簡略化のために、図14の誤差補償部42を省略した構成になっており、復号経路51と符号化経路52と符号量制御器501のみで構成される。ただし、この装置を用いた場合、再量子化による量子化誤差の蓄積のために画質劣化が生じる。   On the other hand, Patent Document 1, Patent Document 2, and the like disclose apparatuses that re-encode compressed moving images at a lower cost and more easily. FIG. 15 shows a basic configuration of the compressed video re-encoding device disclosed in Patent Document 1. The compressed video re-encoding device shown in FIG. 15 has a configuration in which the error compensation unit 42 in FIG. 14 is omitted for simplification of processing, and includes a decoding path 51, an encoding path 52, and a code amount controller. 501 only. However, when this apparatus is used, image quality degradation occurs due to accumulation of quantization errors due to requantization.

図16に、特許文献2に開示されている圧縮動画像再符号装置の基本構成を示す。本図16に示す圧縮動画像再符号装置は、図14の誤差補償部42に対して等価な変換である、誤差補償部62を用いることで処理の簡単化を行う。   FIG. 16 shows a basic configuration of a compressed moving image re-encoding device disclosed in Patent Document 2. The compressed video re-encoding device shown in FIG. 16 simplifies processing by using an error compensation unit 62 that is equivalent to the error compensation unit 42 of FIG.

これらの従来技術は、圧縮動画像再符号化装置の構成について開示されたものであり、符号量制御手段401における符号量制御に関しては述べられていない。次に圧縮動画像再符号化装置の符号量制御方式における従来技術について述べる。   These prior arts are disclosed for the configuration of the compressed video re-encoding device, and the code amount control in the code amount control means 401 is not described. Next, the prior art in the code amount control method of the compressed video re-encoding device will be described.

従来例1として、符号化装置の符号量制御方式であるMPEG-2のテストモデル(Test Model 5, ISO/ICE JTC1/SC21/WG11/N0400, 1993年4 月)の方式が知られている。この方式では、フレーム内符号化およびフレーム間予測符号化により発生した符号量を、ある単位時間毎に一定にしようとする固定ビットレート符号化方式を採用している。この結果、複数ピクチャの集合であるGOP(Group Of Pictures )を単位として、GOP毎に対する符号化処理により発生する符号量が一定になるよう、ピクチャを16×16画素に分割したマクロブロック単位毎に設定する基本量子化幅を設定することで、符号量を制御する。   As a conventional example 1, 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 encoding method is adopted in which the amount of code generated by intraframe encoding and interframe predictive encoding is made constant every certain unit time. As a result, the GOP (Group Of Pictures), which is a set of a plurality of pictures, is used as a unit, and a macro block unit obtained by dividing a picture into 16 × 16 pixels so that the code amount generated by the encoding process for each GOP is constant. 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 conventional example 1 is a code amount control method of the encoding device, and information that is not included in the MPEG-2 bit stream is required for the control, and therefore cannot be directly applied. On the other hand, a code amount control method suitable for a compressed moving image re-encoding device has been proposed in place of the code amount control method of the first conventional example. For example, as conventional example 2, a code amount control method in the compressed video re-encoding device shown in FIG. 15 is disclosed in United State Patent 5,657,015.

この方式では、マクロブロック毎に再符号化後のピクチャの平均量子化幅と、ピクチャの目標符号量と、実際の符号量から基本量子化幅を設定する。次にピクチャの平均量子化幅と、符号化を行うマクロブロックの量子化幅の比率またはピクチャの符号量と、符号化を行うマクロブロックの符号量の比率を用いてアクティビティを計算し、基本量子化幅を調整することで符号量の制御を行う。   In this method, the basic quantization width is set from the average quantization width of the re-encoded picture, the target code amount of the picture, and the actual code amount for each macroblock. Next, the activity is calculated using the average quantization width of the picture and the ratio of the quantization width of the macroblock to be encoded or the code amount of the picture and the ratio of the code amount of the macroblock to be encoded. The code amount is controlled by adjusting the quantization width.

従来例3として、United State Patent 5,805,224 が開示されている。この方式では、入力ビットレートと、出力ビットレートと、符号化を行うピクチャの符号量から再符号化時のサブピクチャの目標符号量を設定し、符号量と量子化幅の積によりピクチャの複雑度を求める。次に、複雑度をサブピクチャの目標発生符号量に応じて分配し、サブピクチャの量子化幅を設定する。また次に、目標符号量と実際の符号量の差分を制御に反映し、量子化幅を調整することで符号量の調整を行う。これら従来例2および従来例3では、再符号化時の目標符号量を入力圧縮動画ストリームのピクチャの符号量と、入力ビットレートと、出力ビットレートを用いて、設定している。
特開平8−23539号公報 特開平8−51631号公報
United States Patent 5,805,224 is disclosed as Conventional Example 3. In this method, the target code amount of the sub-picture at the time of re-encoding is set from the input bit rate, the output bit rate, and the code amount of the picture to be encoded, and the complexity of the picture is determined by the product of the code amount and the quantization width. Find the degree. Next, the complexity is distributed according to the target generated code amount of the subpicture, and the quantization width of the subpicture is set. Next, the difference between the target code amount and the actual code amount is reflected in the control, and the code amount is adjusted by adjusting the quantization width. In these conventional examples 2 and 3, the target code amount at the time of re-encoding is set using the code amount of the picture of the input compressed video stream, the input bit rate, and the output bit rate.
JP-A-8-23539 JP-A-8-51631

しかしながら、上記従来の方式では、入力圧縮動画ストリームの符号量に応じて、再符号化時の目標符号量を設定し、動画像のシーン特性や符号化に必要となる符号量に係わらずほぼ一様に発生符号量を削減するため、画質が劣化する問題を伴う。   However, in the above-described conventional method, the target code amount at the time of re-encoding is set according to the code amount of the input compressed video stream, and the code amount is almost one regardless of the scene characteristics of the moving image and the code amount necessary for encoding. Similarly, since the amount of generated codes is reduced, there is a problem that image quality deteriorates.

本発明は、圧縮動画像の再符号化時における処理遅延の短縮と画質の向上と符号化効率の向上とを実現した、圧縮動画像再符号化装置および圧縮動画像再符号化方法を提供することを目的とする。さらに述べると、本発明は、リアルタイム処理可能な圧縮動画像データの再符号化装置において、より高効率でより高画質な動画像データの再符号化を実現する圧縮動画像再符号化装置および圧縮動画像再符号化方法を提供することを目的とする。   The present invention provides a compressed moving image re-encoding device and a compressed moving image re-encoding method that realizes a reduction in processing delay, improved image quality, and improved encoding efficiency when re-encoding a compressed moving image. For the purpose. More specifically, the present invention relates to a compressed moving image data re-encoding device and a compressed moving image data re-encoding device that can re-encode moving image data with higher efficiency and higher image quality in a re-encoding device capable of real-time processing. An object is to provide a moving image re-encoding method.

請求項1記載の発明は、動画像データを圧縮符号化して生成された入力圧縮動画ストリームを入力信号とし、予め設定した平均ビットレートで、かつ可変ビットレートで再符号化し、ビットレートを変更した出力圧縮動画ストリームを出力信号とする圧縮動画像再符号化装置において、前記再符号化に用いる量子化幅を計算する手段と、前記計算された量子化幅と前記入力圧縮動画ストリームにおける量子化幅を入力し、実際の再符号化に用いる量子化幅を出力する手段とを有することを特徴とする。   According to the first aspect of the present invention, an input compressed moving image stream generated by compressing and encoding moving image data is used as an input signal, and the bit rate is changed by re-encoding at a preset average bit rate and a variable bit rate. In a compressed video re-encoding device using an output compressed video stream as an output signal, means for calculating a quantization width used for the re-encoding, the calculated quantization width, and a quantization width in the input compressed video stream 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 video 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 further has a means.

請求項3記載の発明は、請求項1または2記載の圧縮動画像再符号化装置において、前記入力圧縮動画ストリームあるいは前記再符号化した圧縮動画ストリームの何れかにおける、量子化幅と符号量の一方または両方を用いて、二種類以上の所定の予め定められた期間またはピクチャ枚数におけるそれぞれの複雑度を計算する手段と、複数の前記複雑度から所定の複雑度を出力する手段と、前記予め設定された平均ビットレートと前記出力された複雑度とを用いて前記量子化幅を計算する手段と、目標符号量と実際の符号量との過不足量から所定の期間毎に前記量子化幅を調整して前記再符号化に用いる量子化幅とすることを特徴とする。   According to a third aspect of the present invention, in the compressed video re-encoding device according to the first or second aspect, the quantization width and the code amount of either the input compressed video stream or the re-encoded compressed video stream are determined. Means for calculating the complexity of each of two or more predetermined periods or the number of pictures using one or both, means for outputting a predetermined complexity from a plurality of the complexity, Means for calculating the quantization width using a set average bit rate and the output complexity, and the quantization width for each predetermined period from an excess or deficiency between a target code amount and an actual code amount To a quantization width used for the re-encoding.

請求項4記載の発明は、請求項3記載の圧縮動画像再符号化装置において、前記定められた期間またはピクチャ枚数として用いられる複数ピクチャとして、再符号化開始から現在再符号化をしている直前のピクチャまたはフレーム内符号化された画像を一枚含む複数のピクチャを使用することを特徴とする。   According to a fourth aspect of the present invention, in the compressed video re-encoding device according to the third aspect, the 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 plurality of pictures including one immediately preceding picture or an intra-coded picture are used.

請求項5記載の発明は、請求項3または4記載の圧縮動画像再符号化装置において、前記目標符号量と過不足量から基本量子化幅を調整する前記所定の期間は、ピクチャを分割したブロックの集合を使用することを特徴とする。   According to a fifth aspect of the present invention, in the compressed video re-encoding device according to the third or fourth aspect, the picture is divided during the predetermined period in which the basic quantization width is adjusted from the target code amount and the excess / deficiency amount. It is characterized by using a set of blocks.

請求項6記載の発明は、請求項3または4記載の圧縮動画像再符号化装置において、前記複数の複雑度の中で最小となる複雑度を選択する手段をさらに有することを特徴とする。   A sixth aspect of the present invention is the compressed video re-encoding device according to the third or fourth aspect, further comprising means for selecting a minimum complexity among the plurality of complexity.

請求項7記載の発明は、請求項3から6のいずれか1項記載の圧縮動画像再符号化装置において、前記複雑度の計算に用いられる前記入力圧縮動画ストリームの量子化幅に対して画像特性による重み付けをし、該量子化幅を調整する手段をさらに有することを特徴とする。   A seventh aspect of the present invention is the compressed video re-encoding device according to any one of the third to sixth aspects, wherein an image is obtained with respect to a quantization width of the input compressed video stream used for the calculation of the complexity. It further has means for weighting according to the characteristics and adjusting the quantization width.

請求項8記載の発明は、請求項7記載の圧縮動画像再符号化装置において、前記入力圧縮動画ストリームの量子化幅と符号量の何れか一方または両方を用いて、所定の定められた期間またはピクチャ枚数におけるそれぞれの複雑度と再符号化対象の複雑度との比率を計算し、前記量子化幅の重み付けをし、該量子化幅を調整する手段をさらに有することを特徴とする。   According to an eighth aspect of the present invention, in the compressed video re-encoding device according to the seventh aspect of the present invention, a predetermined period is determined using one or both of the quantization width and the code amount of the input compressed video stream. Alternatively, the method further includes means for calculating a ratio between each complexity in the number of pictures and the complexity of the re-encoding target, weighting the quantization width, and adjusting the quantization width.

請求項9記載の発明は、請求項1記載の圧縮動画像再符号化装置において、前記入力圧縮動画ストリームの量子化幅と符号量の何れか一方または両方を用いて、二種類以上の所定の定められた期間またはピクチャ枚数におけるそれぞれの複雑度を計算する手段と、前記複数の複雑度から所定の複雑度を出力する手段と、前記予め設定された平均ビットレートと前記出力された複雑度とを用いて量子化幅を計算する手段と、前記入力圧縮動画ストリームの量子化幅を用いて、所定の期間またはピクチャ枚数毎に量子幅の平均を計算する手段と、前記量子化幅と前記平均量子化幅を用いて加算値を計算し、前記入力圧縮動画ストリームの量子化幅に加算値を加算した加算量子化幅を計算する手段と、目標符号量と実際の符号量との過不足量から所定の期間毎に前記加算量子化幅を調整して、再符号化に用いる量子化幅とすることを特徴とする。   According to a ninth aspect of the present invention, in the compressed video re-encoding device according to the first aspect of the present invention, two or more types of predetermined predetermined values are used by using one or both of the quantization width and the code amount of the input compressed video stream. Means for calculating each complexity in a predetermined period or number of pictures, means for outputting a predetermined complexity from the plurality of complexity, the preset average bit rate and the output complexity A means for calculating a quantization width using the quantization width of the input compressed video stream, a means for calculating an average of the quantum width for each predetermined period or number of pictures, the quantization width and the average Means for calculating an added value using a quantized width, and calculating an added quantized width obtained by adding the added value to the quantized width of the input compressed video stream; an excess / deficiency amount between a target code amount and an actual code amount; From 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 video re-encoding device according to the first aspect, two or more types of predetermined predetermined values are obtained by using one or both of a quantization width and a code amount of the input compressed video stream. Means for calculating each complexity for a predetermined period or number of pictures; means for outputting a predetermined complexity from the plurality of complexity; the preset average bit rate; and the output complexity And a quantization width of the input compressed video stream using a quantization width of the input compressed video stream and a quantized width of the input compressed video stream according to a coding prediction mode of the input compressed video stream. A means for calculating an average quantization width; and an addition value for each encoding prediction mode using the quantization width and the average quantization width; and a quantization width of the input compressed video stream A means for calculating an addition quantization width obtained by adding the addition value; and a quantum used for re-encoding by adjusting the addition quantization width for each predetermined period from an excess or deficiency between a target code amount and an actual code amount. It is characterized by having a width.

請求項11記載の発明は、請求項8または9記載の圧縮動画像再符号化装置において、前記加算量子化幅に対して、所定の複数の量子化幅においては閾値設定することを特徴とする。   According to an eleventh aspect of the present invention, in the compressed video re-encoding device according to the eighth or ninth aspect, a threshold is set for a predetermined plurality of quantization widths with respect to the added quantization width. .

請求項12記載の発明は、請求項1記載の圧縮動画像再符号化装置において、前記再符号化に用いる量子化幅に対して、最小値を設定することを特徴とする。   A twelfth aspect of the present invention is the compressed video re-encoding device according to the first aspect, wherein a minimum value is set for the quantization width used for the re-encoding.

請求項13記載の発明は、動画像データを圧縮符号化して生成された入力圧縮動画ストリームを入力信号とし、予め設定した平均ビットレートで、且つ可変ビットレートで再符号化し、ビットレートを変更した出力圧縮動画ストリームを出力信号とする圧縮動画像再符号化方法において、前記再符号化に用いる量子化幅を計算する工程と、前記計算された量子化幅と前記入力圧縮動画ストリームにおける量子化幅を入力し、実際の再符号化に用いる量子化幅を出力する工程とを有することを特徴とする。   According to the invention of claim 13, the input compressed video stream generated by compressing and encoding moving image data is used as an input signal, and the bit rate is changed by re-encoding at a preset average bit rate and a variable bit rate. In a compressed video 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 a step of outputting a quantization width used for actual re-encoding.

請求項14記載の発明は、請求項13記載の圧縮動画像再符号化方法において、前記再符号化に用いる量子化幅と前記入力圧縮動画ストリームにおける量子化幅からより大きい量子化幅を選択する工程をさらに有することを特徴とする。   The invention according to claim 14 is the compressed video re-encoding method according to claim 13, wherein a larger quantization width is selected from the quantization width used for the re-encoding and the quantization width in the input compressed video stream. It further has a process.

請求項15記載の発明は、請求項14記載の圧縮動画像再符号化方法において、前記入力圧縮動画ストリームあるいは前記再符号化した圧縮動画ストリームの何れかにおける、量子化幅と符号量の一方または両方を用いて、二種類以上の所定の予め定められた期間またはピクチャ枚数におけるそれぞれの複雑度を計算する工程と、前記複数の複雑度から所定の複雑度を出力する工程と、前記予め設定された平均ビットレートと前記出力された複雑度とを用いて前記量子化幅を計算する工程と、目標符号量と実際の符号量との過不足量から所定の期間毎に前記量子化幅を調整して前記再符号化に用いる量子化幅とすることを特徴とする。   A fifteenth aspect of the present invention is the compressed video re-encoding method according to the fourteenth aspect, wherein one of a quantization width and a code amount in either the input compressed moving image stream or the re-encoded compressed moving image stream or Using both, calculating a complexity for each of two or more predetermined predetermined periods or number of pictures, outputting a predetermined complexity from the plurality of complexity, and the preset The step of calculating the quantization width using the average bit rate and the output complexity, and adjusting the quantization width every predetermined period from the excess and deficiency between the target code amount and the actual code amount Thus, the quantization width used for the re-encoding is used.

以上の説明より明かなように、本発明の圧縮動画像再符号化装置および圧縮動画像再符号化方法は、再符号化に用いる量子化幅を計算し、計算された量子化幅と入力圧縮動画ストリームにおける量子化幅を入力し、実際の再符号化に用いる量子化幅を出力している。よって、入力圧縮動画ストリームに含まれる符号化情報を用いて動画像のシーン特性を求め、特性に応じた量子化幅の設定を行い、設定した量子化幅に対して目標符号量と実際の符号量との差分を用いて修正を行うことで、ある期間に渡り、画質が一定の品質となり、平均ビットレートを満たし、目標符号量に近づくような制御を実現できる。これにより、高画質な再符号化を達成することができる。また、圧縮動画ストリーム全体を復号し、動画像の特性を求めることなく再符号化を行うため、低遅延かつリアルタイムに圧縮動画像ストリームの再符号化を達成することができる。   As is clear from the above description, the compressed video re-encoding device and the compressed video re-encoding method of the present invention calculate the quantization width used for re-encoding, and the calculated quantization width and the 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 are set for the set quantization width. By performing the correction using the difference from the amount, it is possible to realize a control in which the image quality becomes constant quality over a certain period, satisfies the average bit rate, and approaches the target code amount. 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 moving image characteristics, the re-encoding of the compressed moving image stream can be achieved in real time with low delay.

次に、添付図面を参照して本発明による圧縮動画像再符号化装置および圧縮動画像再符号化方法の実施形態を詳細に説明する。図1から図11を参照すると、本発明の圧縮動画像再符号化装置および圧縮動画像再符号化方法の一実施形態が示されている。   Next, embodiments of a compressed video re-encoding device and a compressed video re-encoding method according to the present invention will be described in detail with reference to the accompanying drawings. Referring to FIG. 1 to FIG. 11, an embodiment of a compressed video re-encoding device and a compressed video re-encoding method of the present invention is shown.

図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 video re-encoding apparatus according to the present invention. Here, MPEG-2 VIDEO is used as the compression encoding method. However, the compression encoding method is not limited to MPEG-2VIDEO, and any compression encoding method that controls the amount of code by the quantization width can be used. Good. For example, ISO / ICE IS11172 (MPEG-1 VIDEO), ITU-T H.261, ITU-T H.263, or the like may be used. Also, the complexity calculation period is a picture group composed of all pictures encoded from the start of encoding to the present and a plurality of pictures, and the target code amount and the actual code amount excess / deficiency are adjusted. The period is a macroblock unit.

この符号化単位は、画像符号化単位の一例を示したにすぎず、複雑度の計算を行う期間は一定期間の画質を制御する単位であり、過不足量を調整する期間としてはより細かな制御を行うための複雑度の計算を行う期間より小さな単位であればよい。他に、ピクチャ群の単位としては、フレーム内予測された画像を一枚含む複数ピクチャ群や、一枚のピクチャや、ある時間におけるピクチャ等もある。ここで、図1によれば、本発明の圧縮動画像再符号装置は、復号経路部11と、誤差補償部12と、符号化経路部13と、符号量制御手段14から構成される。   This encoding unit is merely an example of an image encoding unit, and the period during which the complexity is calculated is a unit for controlling the image quality of a certain period, and the period for adjusting the excess / deficiency is finer. Any unit smaller than the period for calculating the complexity for performing the control may be used. In addition, as a unit of the picture group, there are a plurality of picture groups including one intra-frame predicted image, one picture, a picture at a certain time, and the like. Here, according to FIG. 1, the compressed video re-encoding device of the present invention includes a decoding path unit 11, an error compensation unit 12, an encoding path unit 13, and a code amount control unit 14.

まず、MPEG-2ビットストリームが入力として復号経路部11に供給される。復号経路部11においては、入力ビットストリームの可変長復号および逆量子化を行い、入力ビットストリームのビットレートと、フレームレート、およびマクロブロック毎に入力ビットストリームの量子化幅と、入力ビットストリームの符号量を符号量制御手段14に供給する。また、復号経路部11においては、DCT係数と、動きベクトル等を誤差補償部12へ供給し、再符号化時に再利用できる符号化情報を符号化経路部13に供給する。   First, an MPEG-2 bit stream is supplied to the decoding path unit 11 as an input. The decoding path unit 11 performs variable-length decoding and inverse quantization of the input bitstream, the bit rate of the input bitstream, the frame rate, the quantization width of the input bitstream for each macroblock, and the input bitstream The code amount is supplied to the code amount control means 14. The decoding path unit 11 supplies DCT coefficients, motion vectors, and the like to the error compensation unit 12, and supplies encoding information that can be reused during re-encoding to the encoding path unit 13.

誤差補償部12においては、復号経路部11から供給される再量子化前のDCT係数と、動きベクトル等と、符号化経路部13から供給される再量子化後のDCT係数を用いて、再量子化による誤差の蓄積を防止し、再量子化を行うDCT係数を符号化経路部13に供給する。   The error compensator 12 uses the pre-requantization DCT coefficients supplied from the decoding path unit 11, the motion vector, and the re-quantized DCT coefficients supplied from the coding path unit 13 to re-encode. Accumulation of errors due to quantization is prevented, and DCT coefficients for requantization are supplied to the coding path unit 13.

符号化経路部13においては、復号経路部11から供給される符号化情報と、誤差補償部12から供給されるDCT係数と、符号量制御手段14から供給される量子化幅と、外部から供給される目標平均ビットレートを用いて、DCT係数の再量子化と、再符号化を行い出力ビットストリームを出力し、再符号化後の符号量を符号量制御手段14に供給する。   In the encoding path unit 13, the encoding information supplied from the decoding path unit 11, the DCT coefficient supplied from the error compensation unit 12, the quantization width supplied from the code amount control means 14, and the external supply Using the target average bit rate, the DCT coefficient is re-quantized and re-encoded to output an output bit stream, and the code amount after re-encoding is supplied to the code amount control means 14.

符号量制御手段14においては、復号経路部11から供給される入力ビットストリームのビットレートと、フレームレートと、入力ビットストリームの量子化幅と、入力ビットストリームの符号量、符号化経路部13から供給される再符号化後の符号量、外部から供給される目標平均ビットレートを用いて量子化幅を計算し、符号化経路部13に供給する。ここで、符号量制御手段14は、複雑度計算手段101と、ピクチャ群量子化幅計算手段102と、量子化幅調整手段103と、量子化幅選択器104から構成される。   In the code amount control means 14, the bit rate of the input bit stream supplied from the decoding path unit 11, the frame rate, the quantization width of the input bit stream, the code amount of the input bit stream, and the encoding path unit 13 The quantization width is calculated using the supplied code amount after re-encoding and the target average bit rate supplied from the outside, and supplied to the encoding path unit 13. Here, the code amount control means 14 includes a complexity calculation means 101, a picture group quantization width calculation means 102, a quantization width adjustment means 103, and a quantization width selector 104.

複雑度計算手段101においては、復号経路部11からマクロブロック毎に供給される入力ビットストリームの量子化幅と、入力ビットストリームの符号量を用いて、複数ピクチャにおけるピクチャ群複雑度および符号化を行った全ピクチャにおける複雑度を計算し、ピクチャ群量子化幅計算手段102に供給する。   The complexity calculation unit 101 uses the quantization width of the input bitstream supplied from the decoding path unit 11 for each macroblock and the code amount of the input bitstream to perform picture group complexity and encoding in a plurality of pictures. The complexity of all the performed pictures is calculated and supplied to the picture group quantization width calculation means 102.

ピクチャ群量子化幅計算手段102においては、復号経路部11から供給されるフレームレート、外部から供給される目標平均ビットレートと、複雑度計算手段101から供給される複雑度と、ピクチャ群複雑度を用いて基本量子化幅を計算し、計算した結果を量子化幅調整手段103に供給する。   In the picture group quantization width calculation means 102, the frame rate supplied from the decoding path unit 11, the target average bit rate supplied from the outside, the complexity supplied from the complexity calculation means 101, and the picture group complexity Is used to calculate the basic quantization width, and the calculated result is supplied to the quantization width adjusting means 103.

量子化幅調整手段103においては、復号経路部11から供給される入力ビットストリームのビットレートと、フレームレートと、入力ビットストリームの符号量、外部から供給される目標平均ビットレートを用いて目標符号量を設定し、符号化経路部13から供給される再符号化後の符号量との差分を求め、差分に応じてピクチャ群量子化幅計算手段102から供給される基本量子化幅の調整を行い、調整した量子化幅を量子化幅選択器104に供給する。   The quantization width adjusting unit 103 uses the bit rate of the input bit stream supplied from the decoding path unit 11, the frame rate, the code amount of the input bit stream, and the target average bit rate supplied from the outside to generate the target code. The amount is set, the difference from the re-encoded code amount supplied from the encoding path unit 13 is obtained, and the basic quantization width supplied from the picture group quantization width calculation unit 102 is adjusted according to the difference. The adjusted quantization width is supplied to the quantization width selector 104.

量子化幅選択器104においては、量子化幅調整手段103から供給される量子化幅が復号経路部11から供給される入力ビットストリームの量子化幅よりも小さい値であれば、入力ビットストリームの量子化幅を符号化経路部13に供給する。   In the quantization width selector 104, if the quantization width supplied from the quantization width adjustment unit 103 is a value smaller than the quantization width of the input bit stream supplied from the decoding path unit 11, the input bit stream The quantization width is supplied to the coding path unit 13.

次に、本発明の符号量制御手段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 in the code amount control means 14 of the present invention will be described. The following formulas (1) to (16) are processing examples in the complexity calculation, and these formulas represent processing examples in the complexity calculation 101. In the complexity calculation 101, the quantization width accumulation of a group of pictures in a plurality of pictures is performed using the quantization width Qoj of the input bitstream and the code amount Soji of the input bitstream supplied from the decoding path unit 11 for each macroblock. The arithmetic value Qop, the code amount accumulated value Sop and the complexity Xp, and the quantization width accumulated value Qot, the code amount accumulated value Sot, and the complexity Xt in all pictures are calculated by, for example, the equations (1) to (6). Then, the picture group complexity Xp and the complexity Xt are supplied to the picture group quantization width calculation means 102. Here, the code Np represents the number of pictures in the picture group, the code Nt represents the total number of pictures that have been encoded, and the code Nmb represents the number of macroblocks per picture.

Figure 2007318794
Figure 2007318794

ピクチャ群量子化幅計算手段102においては、復号経路部11から供給されるフレームレートFRと、外部から供給される目標平均ビットレートABRと、複雑度計算手段101から供給される複雑度Xtと、ピクチャ群複雑度Xpを用いて、基本量子化幅Qbを、例えば式(7)により計算し、量子化幅調整手段103に供給する。ここで、min(Xt,Xp)はXtとXpの小さい値を選択する。上記計算では、入力ビットストリームの長期的なシーン特性とそれよりも短い期間のシーン特性を複雑度の比較を行うことで実現し、小さい値を選択することで多くの符号量を発生させる制御となり、画質の低下を抑えることができる。   In the picture group quantization width calculation unit 102, the frame rate FR supplied from the decoding path unit 11, the target average bit rate ABR supplied from the outside, the complexity Xt supplied from the complexity calculation unit 101, Using the picture group complexity Xp, the basic quantization width Qb is calculated by, for example, Expression (7) and supplied to the quantization width adjusting unit 103. Here, min (Xt, Xp) selects a small value of Xt and Xp. In the above calculation, the long-term scene characteristics of the input bit stream and the scene characteristics of a shorter period are realized by comparing the complexity, and control is performed to generate a large amount of code by selecting a small value. , Deterioration of image quality can be suppressed.

Figure 2007318794
Figure 2007318794

量子化幅調整手段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 width adjusting unit 103, the bit rate BR of the input bit stream supplied from the encoding path unit 11, the frame rate FR, the code amount Soj of the input bit stream, and the target average bit rate supplied from the outside. Using ABR, the picture group code amount accumulated value Sop, the picture group target code amount Tp, and the target code amount Tt of all the pictures are expressed by, for example, the above equation (2) and the following equations (8) and ( Calculate according to 9). Also, using the re-encoded code amount Srj supplied from the encoding path unit 13 for each macroblock, the code amount accumulated value Srt of all the pictures is calculated by the equation (10), and the difference VBO is expressed by the equation ( 11). Further, the adjustment of the basic quantization width Qb supplied from the picture group quantization means 102 is calculated by, for example, Expression (12), and the adjusted quantization width Qm is supplied to the quantization width selector 104.

Figure 2007318794
Figure 2007318794

ここで、上記の式(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 control response in the difference of the generated code amount with respect to the target average bit rate. .

量子化幅選択器104においては、量子化幅調整手段103から供給される量子化幅Qmが、復号経路部11から供給される入力ビットストリームの量子化幅Qjよりも小さい値であれば、入力ビットストリームの量子化幅Qjを符号化経路部13に供給する。   In the quantization width selector 104, if the quantization width Qm supplied from the quantization width adjustment unit 103 is smaller than the quantization width Qj of the input bitstream supplied from the decoding path unit 11, the input The quantization width Qj of the bit stream is supplied to the coding path unit 13.

次に、本発明の第2の実施形態を図2に示す。第1の実施形態では、複雑度計算手段101においては、復号経路部11から供給される入力ビットストリームの量子化幅と、入力ビットストリームの符号量を用いて、複雑度およびピクチャ群複雑度を計算する。本実施形態によれば、複雑度計算手段101においては、符号化経路部13から供給される再符号化後の量子化幅と、再符号化後の符号量を用いて、複雑度およびピクチャ群複雑度を計算する。   Next, a second embodiment of the present invention is shown in FIG. In the first embodiment, the complexity calculating unit 101 uses the quantization width of the input bit stream supplied from the decoding path unit 11 and the code amount of the input bit stream to calculate the complexity and the picture group complexity. calculate. According to the present embodiment, the complexity calculating unit 101 uses the quantization width after re-encoding supplied from the encoding path unit 13 and the code amount after re-encoding to determine the complexity and the picture group. Calculate complexity.

次に、本発明の第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 quantization width selector 104 selects the quantization width using the quantization width supplied from the quantization width adjustment unit 103. In this embodiment, adaptive quantization means 901 is added to the block diagram shown in FIG. In the adaptive quantization means 901, the quantization width supplied from the quantization width adjusting means 103 is further increased using the quantization width of the input bit stream supplied from the decoding path unit 11 and the code amount of the input bit stream. Adjust and supply to the quantization width selector 104.

次に適応量子化手段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 is shown. The adaptive quantization means 901 uses the quantization width Qj of the input bitstream supplied from the decoding path 11, the code amount Sj, and the quantization width Qm supplied from the quantization width adjustment means 103, for example, using the expression (3 The quantization width Qa is calculated by the picture group complexity Xp obtained from (1) and the following equation (13), and is supplied to the quantization width selector 104. Here, the number of pictures Np in the picture group need not be the same as the number of pictures in the picture group used in the complexity calculation means 101. In the present embodiment, the activity calculated using the normal image signal is calculated using the quantization width and the code amount of the input bitstream, and the quantization width is corrected. As a result, adaptive quantization using the properties of the image can be performed even for a compressed image re-encoding device configured not to perform decoding to the image signal level.

Figure 2007318794
Figure 2007318794

次に、本発明の第4の実施形態を図4に示す。第1の実施形態では、ピクチャ群複雑度101においては、複雑度の計算に入力ビットストリームの量子化幅を用いている。本実施形態は、図1に示されるブロック図に逆適応量子化器1001を追加したものである。   Next, FIG. 4 shows a fourth embodiment of the present invention. In the first embodiment, in the picture group complexity 101, the quantization width of the input bitstream is used for calculating the complexity. In the present embodiment, an inverse adaptive quantizer 1001 is added to the block diagram shown in FIG.

逆適応量子化器1001においては、復号経路部11から供給されるビットストリームの量子化幅と、入力ビットストリームの符号量を用いて、復号経路部11から供給される入力ビットストリームの量子化幅を調整し、複雑度計算手段101に供給する。逆適応量子化手段1001の動作例としては、例えば、図3における適応量子化手段901の逆変換が考えられる。本実施形態では、複雑度の計算のために、入力ビットストリームの量子化幅と、入力ビットストリームの符号量を用いて、入力ビットストリームの量子化幅を調整する。その結果、符号化時に適応量子化が行われた入力ビットストリームの量子化幅に対しても、適応量子化前の量子化幅を推定することが可能であり、適応量子化前の量子化幅を用いた複雑度の計算が可能になる。   In the inverse adaptive quantizer 1001, the quantization width of the input bitstream supplied from the decoding path unit 11 using the quantization width of the bitstream supplied from the decoding path unit 11 and the code amount of the input bitstream. Are supplied to the complexity calculation means 101. As an operation example of the inverse adaptive quantization means 1001, for example, the inverse transformation of the adaptive quantization means 901 in FIG. 3 can be considered. In this embodiment, in order to calculate the complexity, the quantization width of the input bit stream is adjusted using the quantization width of the input bit stream and the code amount of the input bit stream. As a result, it is possible to estimate the quantization width before adaptive quantization even for the quantization width of the input bitstream that has been subjected to adaptive quantization at the time of encoding. The complexity can be calculated using.

次に、本発明の第5の実施形態を図5に示す。本実施形態は、図1に対して、量子化幅選択器104の外部入力が追加されている。第1の実施形態の量子化幅選択器1101においては、量子化幅調整手段103から供給される量子化幅が復号経路部11から供給される入力ビットストリームの量子化幅よりも小さい値であれば、入力ビットストリームの量子化幅を符号化経路部13に供給している。本実施形態の量子化幅選択器1101においては、上記入力に加え、外部から最小量子化幅が供給され、量子化幅調整手段103から供給される量子化幅と入力ビットストリームの量子化幅が最小量子化幅よりも小さい値であれば、最小量子化幅を符号化経路部13に供給する。これにより本実施形態では、量子化幅を小さく設定しすぎることによる無駄な符号の発生を抑えることが可能になる。   Next, FIG. 5 shows a fifth embodiment of the present invention. In the present embodiment, an external input of the quantization width selector 104 is added to FIG. In the quantization width selector 1101 of the first embodiment, the quantization width supplied from the quantization width adjustment unit 103 is smaller than the quantization width of the input bitstream supplied from the decoding path unit 11. For example, the quantization width of the input bit stream is supplied to the encoding path unit 13. In the quantization width selector 1101 of the present embodiment, in addition to the above input, the minimum quantization width is supplied from the outside, and the quantization width supplied from the quantization width adjustment unit 103 and the quantization width of the input bitstream are If the value is smaller than the minimum quantization width, the minimum quantization width is supplied to the coding path unit 13. As a result, in this embodiment, it is possible to suppress generation of useless codes due to setting the quantization width too small.

次に、本発明の第6の実施形態を図6に示す。本実施形態は図1に示されるブロック図に最大ビットレート量子化幅計算手段1201を追加したものである。最大ビットレート量子化幅計算手段1201においては、復号経路部11から供給される入力ビットストリームの量子化幅と、入力ビットストリームの符号量と、入力ビットストリームのビットレートおよびフレームレート、復号経路部13から供給される再符号化後の量子化幅と、再符号化後の符号量、外部から供給される最大ビットレート等を用いて、指定された最大ビットレートを超えないような最大ビットレート量子化幅を設定し、量子化幅選択器104へ供給する。   Next, FIG. 6 shows a sixth embodiment of the present invention. In this embodiment, a maximum bit rate quantization width calculation unit 1201 is added 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 decoding path unit 11, the code amount of the input bit stream, the bit rate and frame rate of the input bit stream, and the decoding path unit The maximum bit rate that does not exceed the specified maximum bit rate using the quantization width after re-encoding supplied from 13, the code amount after re-encoding, the maximum bit rate supplied from the outside, etc. A quantization width is set and supplied to the quantization width selector 104.

量子化幅選択器1202においては、上記入力に加え、最大ビットレート量子化幅計算手段1201から供給される最大ビットレート量子化幅を用いて、量子化幅調整手段103から供給される量子化幅と、入力ビットストリームの量子化幅が最大ビットレート量子化幅よりも小さい値であれば、最大ビットレート量子化幅を符号化経路部13に供給する。ここで、最大ビットレート量子化幅計算手段1201における最大ビットレート量子化幅の計算方法としては、例えば、入力ビットストリームのビットレートと最大ビットレート比率および入力ビットストリームの符号量を用いて、目標符号量を設定し、目標符号量を満たすような符号量制御を用いて、マクロブロック単位の量子化幅を計算することで実現できる。本実施形態では、入力ビットストリームのビットレートが非常に高く、目標平均ビットレートが低い場合に、必要以上に符号化幅を小さく設定しすぎて、無駄な符号の発生を抑えることが可能になる。   The quantization width selector 1202 uses the maximum bit rate quantization width supplied from the maximum bit rate quantization width calculation means 1201 in addition to the above input, and the quantization width supplied from the quantization width adjustment means 103. If the quantization width of the input bitstream is smaller than the maximum bit rate quantization width, the maximum bit rate quantization width is supplied to the coding path unit 13. Here, as a calculation method of the maximum bit rate quantization width in the maximum bit rate quantization width calculation unit 1201, for example, the bit rate of the input bit stream, the maximum bit rate ratio, and the code amount of the input bit stream are used. This can be realized by setting the code amount and calculating the quantization width in units of macroblocks using code amount control that satisfies the target code amount. In the present embodiment, when the bit rate of the input bit stream is very high and the target average bit rate is low, it is possible to suppress the generation of useless codes by setting the encoding width too small as necessary. .

次に、本発明の第7の実施形態を図7に示す。本実施形態の、符号量制御手段14は、複雑度計算手段101と、ピクチャ群量子化幅計算手段102と、量子化幅調整手段103と、量子化幅選択器104と、平均量子化幅計算手段1301と、加算値計算手段1302から構成される。   Next, a seventh embodiment of the present invention is shown in FIG. In this embodiment, the code amount control unit 14 includes a complexity calculation unit 101, a picture group quantization width calculation unit 102, a quantization width adjustment unit 103, a quantization width selector 104, and an average quantization width calculation. It comprises means 1301 and addition value calculation means 1302.

以下では、第1の実施形態と異なる部分に関してのみ説明する。平均量子化幅計算手段1301においては、復号経路部11から供給される入力ビットストリームの量子化幅を複数ピクチャ期間累算し、その平均値を加算値計算手段1302に供給する。   Below, only a different part from 1st Embodiment is demonstrated. The average quantization width calculation unit 1301 accumulates the quantization width of the input bitstream supplied from the decoding path unit 11 for a plurality of picture periods, and supplies the average value to the addition value calculation unit 1302.

加算値計算手段1302においては、ピクチャ群量子化幅計算手段102から供給される基本量子化幅と、平均量子化幅計算手段1301から供給される平均量子化幅の差分値を、復号経路部11から供給される入力ビットストリームの量子化幅に加算し、量子化幅調整手段103に供給する。   In the addition value calculation unit 1302, the decoding path unit 11 calculates the difference value between the basic quantization width supplied from the picture group quantization width calculation unit 102 and the average quantization width supplied from the average quantization width calculation unit 1301. Is added to the quantization width of the input bit stream supplied from, and supplied to the quantization width adjusting means 103.

次に平均量子化幅計算手段1301および加算値計算手段1302の動作の一例を示す。平均量子化幅計算手段1301においては、平均量子化幅Qaveは復号経路部11から供給される量子化幅Qjを用いて、上記の式(1)および下記の式(14)により計算され、加算値計算手段1302へ供給される。ここで、ピクチャ群におけるピクチャ数Npは、複雑度計算手段101で用いられるピクチャ群のピクチャ数と同じである必要はない。   Next, an example of the operations of the average quantization width calculation unit 1301 and the addition value calculation unit 1302 will be described. In the average quantization width calculation unit 1301, the average quantization width Qave is calculated by the above equation (1) and the following equation (14) using the quantization width Qj supplied from the decoding path unit 11 and added. The value is supplied to the value calculation means 1302. Here, the number of pictures Np in the picture group need not be the same as the number of pictures in the picture group used in the complexity calculation means 101.

Figure 2007318794
Figure 2007318794

加算値計算手段1302においては、加算値Aをピクチャ群量子化幅計算手段102から供給される量子化幅Qb、平均量子化幅計算手段1301から供給される平均量子化幅Qaveを用いて、例えば下記の式(15)により計算し、量子化幅調整手段103へ供給する。これにより本実施形態では、入力ビットストリームの量子化幅に加算値を加えるため、符号化時に適応量子化を用いて量子化幅が設定されている場合、適応量子化を考慮することなく量子化幅を設定できる。   The addition value calculation means 1302 uses the quantization value 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 the addition value A, for example, It is calculated by the following equation (15) and supplied to the quantization width adjusting means 103. As a result, in this embodiment, in order to add an added value to the quantization width of the input bitstream, if the quantization width is set using adaptive quantization at the time of encoding, the quantization is performed without considering adaptive quantization. You can set the width.

Figure 2007318794
Figure 2007318794

次に、本発明の第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 bitstream supplied from the decoding path unit 11 to calculate the quantization width.

本実施形態の量子化幅設定手段1401においては、上記入力に加え、外部から最小量子化幅もしくは閾値が供給される。加算値計算手段1401においては、計算した量子化幅と、量子化幅もしくは閾値を比較することで、量子化幅の選択を行い、量子化幅調整手段103に量子化幅を供給する。   In the quantization width setting unit 1401 of this embodiment, in addition to the above input, a minimum quantization width or threshold value is supplied from the outside. The addition value calculation unit 1401 selects the quantization width by comparing the calculated quantization width with the quantization width or threshold value, and supplies the quantization width to the quantization width adjustment unit 103.

加算値計算手段の動作例を図9に示す。本図9は、最小量子化幅と閾値が設定されていた場合にどの量子化幅が選択されるかを示したものである。横軸は入力ビットストリームの量子化幅を表し、縦軸は再符号化後の量子化幅を表す。グラフの太線が本量子化幅設定により選択される量子化幅である。   An example of the operation of the addition value calculation means is shown in FIG. 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 bold line in the graph is the quantization width selected by this quantization width setting.

ここで、最小量子化幅により、量子化幅の最小値を設定し、閾値によりある量子化幅以降においては、入力ビットストリームの量子化幅が閾値を超えるまでは、再符号化後の量子化幅が閾値を越えないように量子化幅が設定される。これにより本実施形態では、再量子化後の量子化幅の最小値を設定することで過剰な符号量の発生を抑制する。また、閾値よりも大きな量子化幅を選択しないようにし、画質劣化を抑制する。   Here, the minimum value of the quantization width is set by the minimum quantization width, and after the certain quantization width by the threshold, the quantization after the re-encoding is performed until the quantization width of the input bitstream exceeds the threshold. The quantization width is set so that the width does not exceed the threshold value. Thereby, in this embodiment, generation | occurrence | production of an excessive code amount is suppressed by setting the minimum value of the quantization width | variety after re-quantization. Also, a quantization width larger than the threshold value is not selected, and image quality deterioration is suppressed.

次に、本発明の第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 added value is added to the quantization width of the input bitstream in any encoding prediction method. In the ninth embodiment, an added value is held for each coding prediction method of a picture. For example, for the intra-frame coding (I picture), forward inter-frame coding (P picture), and bidirectional inter-frame coding (B picture) in MPEG-2, the average quantization width calculation unit 1301 performs coding. The average quantization width Qave is calculated for each mode and supplied to the addition value calculation means 1302.

加算値計算手段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. For each coding mode, the quantization width of the input bit stream supplied from the decoding path unit 11 is added to calculate the quantization width. Thereby, in this embodiment, since the addition value is switched according to the encoding mode, finer control than a single addition value is possible, and the image quality can be improved.

上記の実施形態において、例えば、入力である圧縮動画ストリーム1を再符号化し、圧縮動画ストリーム2を出力することを考える。図10は圧縮動画ストリーム1および再符号化後の圧縮動画ストリーム2におけるピクチャ当たりの平均量子化幅と時間の関係と、図11はその時の発生符号量と時間の関係の一例を示したものである。図10および図11の細い実線が圧縮動画ストリーム1を表す。   In the above embodiment, for example, consider re-encoding the compressed video stream 1 as an input and outputting the compressed video stream 2. FIG. 10 shows 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. A thin solid line in FIGS. 10 and 11 represents the compressed moving image stream 1.

一般に、符号量の削減は、圧縮動画ストリーム1における量子化幅よりも大きな量子化幅を設定して再量子化することで実現できる。ちなみに従来の方式では、圧縮動画ストリーム1の符号量に応じて、再符号化時の目標符号量を設定し、量子化幅を設定する。例えば図11のような場合には、どの期間においても、ほぼ一定の符号量を削減する必要があるため、一様に量子化幅を大きく設定してまう。その結果、図10の破線に示すように、入力圧縮動画ストリームの量子化幅が大きく画質の悪いピクチャに対しても、再符号化時にさらに大きい値を設定してしまい、画質劣化を引き起こす原因になる。そこで、図10の太い実線で示すような、動画像のシーン特性に応じた量子化幅の設定をすれば、このような問題は解決できる。本発明では、入力圧縮動画ストリームに含まれる符号化情報を用いて、動画像のシーン特性を求め、特性に応じた量子化幅を設定する。   In general, the amount of code can be reduced by setting a quantization width larger than the quantization width in the compressed video stream 1 and performing re-quantization. Incidentally, in the conventional method, the target code amount at the time of re-encoding is set according to the code amount of the compressed moving image stream 1, and the quantization width is set. For example, in the case as shown in FIG. 11, since it is necessary to reduce a substantially constant code amount in any period, the quantization width is set uniformly large. As a result, as shown by the broken line in FIG. 10, even for a picture with a large quantization width of the input compressed video stream and poor image quality, a larger value is set at the time of re-encoding, which causes image quality degradation. 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. In the present invention, scene characteristics of a moving image are obtained by using encoded information included in an input compressed moving image stream, and a quantization width corresponding to the characteristics is set.

次に、設定した量子化幅に対して、平均ビットレート等を用いて求めた目標符号量と、実際の符号量との差分を用いて修正を行う。その結果、ある期間にわたり画質が一定の品質となり、また平均ビットレートを満たし、目標符号量に近づくような制御を実現できる。また、量子化幅は入力圧縮動画ストリームの量子化幅よりも小さな値にならないようにすることで、必要以上に多くの符号量を割り当てることなく、より平均的な画質の向上を実現できる。さらに、本発明では、一旦、圧縮動画ストリーム全体を復号し、動画像の特性を求めることなく再符号化を行うため、遅延の少ないリアルタイム処理が実現できる。   Next, the set quantization width is corrected using a difference between the target code amount obtained using the average bit rate and the actual code amount. As a result, it is possible to realize a control in which the image quality becomes constant quality over a certain period, the average bit rate is satisfied, and the target code amount is approached. Further, by preventing the quantization width from being smaller than the quantization width of the input compressed video stream, it is possible to improve the average image quality without assigning more code amount than necessary. Furthermore, in the present invention, since the entire compressed video 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-described 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.

本発明の圧縮動画像再符号化装置の実施形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of embodiment of the compression moving image re-encoding apparatus of this invention. 第2の実施形態における圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the compression moving image re-encoding apparatus in 2nd Embodiment. 第3の実施形態における圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the compression moving image re-encoding apparatus in 3rd Embodiment. 第4の実施形態における圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the compressed moving image re-encoding apparatus in 4th Embodiment. 第5の実施形態における圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the compression moving image re-encoding apparatus in 5th Embodiment. 第6の実施形態における圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the compressed moving image re-encoding apparatus in 6th Embodiment. 第7の実施形態における圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the compressed moving image re-encoding apparatus in 7th Embodiment. 第8の実施形態における圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the compression moving image re-encoding apparatus in 8th Embodiment. 第8の実施形態における量子化幅設定手段の動作例の説明図である。It is explanatory drawing of the operation example of the quantization width setting means in 8th Embodiment. 原理説明図である。It is a principle explanatory drawing. 原理説明図である。It is a principle explanatory drawing. 従来の復号器の構成を示すブロック図である。It is a block diagram which shows the structure of the conventional decoder. 従来の符号化器の構成を示すブロック図である。It is a block diagram which shows the structure of the conventional encoder. 従来の圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the conventional compression moving image re-encoding apparatus. 従来の圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the conventional compression moving image re-encoding apparatus. 従来の圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the conventional compression moving image re-encoding apparatus.

符号の説明Explanation of symbols

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 加算値計算手段
DESCRIPTION OF SYMBOLS 11 Decoding path part 12 Error compensation part 13 Encoding path part 14 Code amount control means 101 Complexity calculation means 102 Picture group quantization width calculation means 103 Quantization width adjustment means 104 Quantization width selector 201 Variable length decoder 202 Inverse Quantizer 203 Inverse discrete cosine transformer 204 Adder 205 Frame memory 206 Motion compensation predictor 301 Subtractor 302 Discrete cosine transformer 303 Quantizer 304 Variable length encoder 305 Code amount control means 306 Inverse quantizer 307 Inverse Discrete cosine transformer 308 Adder 309 Frame memory 310 Motion compensation predictor 41 Decoding path section 42 Error compensation section 43 Encoding path section 401 Code amount control means 51 Decoding path section 52 Encoding path section 501 Code amount control means 61 Decoding path Unit 62 Error compensation unit 63 Coding path unit 601 Subtractor 602 Inverse quantizer 60 Subtractor 604 Inverse discrete cosine transformer 605 Frame memory 606 Motion compensation predictor 607 Discrete cosine transformer 608 Code amount control means 901 Adaptive quantization means 1001 Inverse adaptive quantization means 1101 Quantization width selector 1201 Maximum bit rate quantization width Calculation means 1202 Quantization width selector 1301 Average quantization width calculation means 1302 and 1401 Addition value calculation means

Claims (12)

動画像を圧縮符号化して生成された入力圧縮動画ストリームに対して、動画像のピクチャの複雑度を求め、該複雑度と再符号化対象画像の目標符号量とを利用して前記再符号化対象画像の量子化幅を決定し、予め設定した平均ビットレートで、かつ可変ビットレートの圧縮動画ストリームに再符号化する圧縮動画像再符号化装置において、
前記再符号化対象画像よりも過去のピクチャを含む第1の期間と前記第1の期間を含みより長い第2の期間の動画像の複雑度を計算する手段と、
複数の前記複雑度から最小の複雑度を選択し、前記量子化幅を変更するために利用する複雑度として出力する手段とを有することを特徴とする圧縮動画像再符号化装置。
With respect to an input compressed moving image stream generated by compressing and encoding a moving image, the complexity of the picture of the moving image is obtained, and the re-encoding is performed using the complexity and the target code amount of the re-encoding target image. In a compressed video re-encoding device that determines a quantization width of a target image and re-encodes the compressed video stream with a preset average bit rate and a variable bit rate,
Means for calculating the complexity of a moving image in a first period including a picture past the re-encoding target image and a second period longer including the first period;
A compressed moving image re-encoding apparatus, comprising: means for selecting a minimum complexity from a plurality of the complexity and outputting the selected complexity as a complexity used for changing the quantization width.
前記複雑度は、前記入力圧縮動画ストリームあるいは再符号化した圧縮動画ストリームのいずれかにおける量子化幅と符号量との積であることを特徴とする請求項1に記載の圧縮動画像再符号化装置。   The compressed moving image re-encoding according to claim 1, wherein the complexity is a product of a quantization width and a code amount in either the input compressed moving image stream or the re-encoded compressed moving image stream. apparatus. 再符号化に用いる量子化幅が前記入力圧縮動画ストリームの量子化幅を下回らないように制御する手段を有することを特徴とする請求項1または2に記載の圧縮動画像再符号化装置。   3. The compressed moving image re-encoding apparatus according to claim 1, further comprising means for controlling so that a quantization width used for re-encoding is not less than a quantization width of the input compressed video stream. 前記第1の期間は再符号化開始から現在再符号化している直前のピクチャまでであり、前記第2の期間はフレーム内符号化された画像を一枚含む複数のピクチャを含む期間であることを特徴とする請求項1または2に記載の圧縮動画像再符号化装置。   The first period is from a re-encoding start to a picture immediately before the current re-encoding, and the second period is a period including a plurality of pictures including one intra-coded image. The compressed video re-encoding device according to claim 1 or 2. 前記複雑度を計算する手段に用いられる前記入力圧縮動画ストリームの量子化幅に対して画像特性による重み付けをする手段を有することを特徴とする請求項3または4に記載の圧縮動画像再符号化装置。   5. The compressed moving image re-encoding according to claim 3, further comprising means for weighting the quantization width of the input compressed moving picture stream used for the means for calculating the complexity by an image characteristic. apparatus. 前記入力圧縮動画ストリームの量子化幅と符号量の積による複雑度を計算し、前記再符号化対象画像よりも過去のある期間の複雑度と再符号化対象の複雑度との比率を計算し、前記入力圧縮動画ストリームの量子化幅の重み付けをする手段を有することを特徴とする請求項5に記載の圧縮動画像再符号化装置。   Calculate the complexity by the product of the quantization width and the code amount of the input compressed video stream, and calculate the ratio between the complexity of a certain period in the past and the complexity of the re-encoding target than the re-encoding target image 6. The compressed moving image re-encoding apparatus according to claim 5, further comprising means for weighting a quantization width of the input compressed video stream. 動画像を圧縮符号化して生成された入力圧縮動画ストリームに対して、動画像のピクチャの複雑度を求め、該複雑度と再符号化対象画像の目標符号量とを利用して前記再符号化対象画像の量子化幅を決定して予め設定した平均ビットレートで、かつ可変ビットレートの圧縮動画ストリームに再符号化する圧縮動画像再符号化装置において、
前記再符号化対象画像よりも過去のピクチャを含む第1の期間と前記第1の期間を含みより長い第2の期間の動画像の複雑度をそれぞれ、前記入力圧縮動画ストリームあるいは再符号化した圧縮動画ストリームのいずれかにおける量子化幅と符号量の積として計算する手段と、
前記複数の複雑度から最小の複雑度を出力する手段と、
前記予め設定された平均ビットレートを用いて目標符号量を計算する手段と、
前記目標符号量と前記出力された複雑度とを用いて第一の量子化幅を計算する手段と、
前記入力圧縮動画ストリームの量子化幅を用いて、前記再符号化対象画像よりも過去のある期間の量子化幅の平均を計算する手段と、
前記第一の量子化幅と前記量子化幅の平均の減算により加算値を計算し、前記入力圧縮動画ストリームの量子化幅に前記加算値を加算し、再符号化する量子化幅を計算する手段とを有することを特徴とする圧縮動画像再符号化装置。
With respect to an input compressed moving image stream generated by compressing and encoding a moving image, the complexity of the picture of the moving image is obtained, and the re-encoding is performed using the complexity and the target code amount of the re-encoding target image. In a compressed video re-encoding device that determines a quantization width of a target image and re-encodes the compressed video stream with a preset average bit rate and a variable bit rate,
The complexity of moving images in the first period including pictures past the re-encoding target image and the second period longer including the first period is re-encoded in the input compressed video stream or re-encoded respectively. Means for calculating as a product of the quantization width and the code amount in any of the compressed video streams;
Means for outputting a minimum complexity from the plurality of complexity;
Means for calculating a target code amount using the preset average bit rate;
Means for calculating a first quantization width using the target code amount and the output complexity;
Means for calculating an average quantization width of a certain period in the past from the re-encoding target image using a quantization width of the input compressed video stream;
An addition value is calculated by subtracting the average of the first quantization width and the quantization width, the addition value is added to the quantization width of the input compressed video stream, and a quantization width to be re-encoded is calculated. And a compressed moving image re-encoding device.
動画像を圧縮符号化して生成された入力圧縮動画ストリームに対して、動画像のピクチ
ャの複雑度を求め、該複雑度と再符号化対象画像の目標符号量とを利用して前記再符号化
対象画像の量子化幅を決定して、予め設定した平均ビットレートで、かつ可変ビットレー
トの圧縮動画ストリームに再符号化する圧縮動画像再符号化装置において、
前記再符号化対象画像よりも過去のピクチャを含む第1の期間と前記第1の期間を含みより長い第2の期間の動画像の複雑度をそれぞれ前記入力圧縮動画ストリームあるいは再符号化した圧縮動画
ストリームのいずれかにおける量子化幅と符号量の積として計算する手段と、
複数の前記複雑度から最小の複雑度を出力する手段と、
前記予め設定された平均ビットレートを用いて目標符号量を計算する手段と、
前記目標符号量と前記出力された複雑度とを用いて第一の量子化幅を計算する手段と、
前記入力圧縮動画ストリームの量子化幅を用いて前記入力圧縮動画ストリームの符号化予測モードに応じて、前記再符号化対象画像よりも過去のある期間の量子化幅の平均を計算する手段と、
前記第一の量子化幅と前記量子化幅の平均の減算により符号化予測モード毎の加算値を計算し、前記入力圧縮動画ストリームの量子化幅に前記加算値を加算し、再符号化する量子化幅を計算する手段とを有することを特徴とする圧縮動画像再符号化装置。
With respect to an input compressed moving image stream generated by compressing and encoding a moving image, the complexity of the picture of the moving image is obtained, and the re-encoding is performed using the complexity and the target code amount of the re-encoding target image. In a compressed video re-encoding device that determines the quantization width of a target image and re-encodes the compressed video stream with a preset average bit rate and a variable bit rate,
The complexity of moving images in the first period including pictures past the re-encoding target image and the second period longer including the first period is respectively the input compressed video stream or the re-encoded compression. Means for calculating as a product of the quantization width and the code amount in any of the video streams;
Means for outputting a minimum complexity from a plurality of the complexity,
Means for calculating a target code amount using the preset average bit rate;
Means for calculating a first quantization width using the target code amount and the output complexity;
Means for calculating an average quantization width of a period in the past from the re-encoding target image according to an encoding prediction mode of the input compressed video stream using a quantization width of the input compressed video stream;
An addition value for each encoding prediction mode is calculated by subtracting the average of the first quantization width and the quantization width, and the addition value is added to the quantization width of the input compressed video stream and re-encoding is performed. And a compression video re-encoding device, characterized by comprising: means for calculating a quantization width;
動画像を圧縮符号化して生成された入力圧縮動画ストリームに対して、動画像のピクチャの複雑度を求め、該複雑度と再符号化対象画像の目標符号量とを利用して前記再符号化対象画像の量子化幅を決定して予め設定した平均ビットレートで、かつ可変ビットレートの圧縮動画ストリームに再符号化する圧縮動画像再符号化方法において、
前記再符号化対象画像よりも過去のピクチャを含む第1の期間と前記第1の期間を含みより長い第2の期間の動画像の複雑度をそれぞれ計算する工程と、
複数の前記複雑度から最小の複雑度を選択し、前記量子化幅を変更するために利用する複雑度として出力する工程とを有することを特徴とする圧縮動画像再符号化方法。
With respect to an input compressed moving image stream generated by compressing and encoding a moving image, the complexity of the picture of the moving image is obtained, and the re-encoding is performed using the complexity and the target code amount of the re-encoding target image. In a compressed video re-encoding method that determines a quantization width of a target image and re-encodes the compressed video stream with a preset average bit rate and a variable bit rate,
Calculating the complexity of a moving image in a first period including a picture past the re-encoding target image and a second period including the first period and longer, respectively;
And a step of selecting a minimum complexity from the plurality of complexity and outputting as a complexity used for changing the quantization width.
符号化に用いて量子化幅が前記入力圧縮動画ストリームの量子化幅を下回らないように制御する工程を有することを特徴とする請求項9記載の圧縮動画像再符号化方法。   10. The compressed moving image re-encoding method according to claim 9, further comprising a step of controlling the quantization width so that the quantization width is not less than the quantization width of the input compressed video stream. 前記第1の期間は再符号化開始から現在再符号化している直前のピクチャまでであり、前記第2の期間はフレーム内符号化された画像を一枚含む複数のピクチャを含む期間であることを特徴とする請求項7および8に記載の圧縮動画像再符号化装置。 The first period is from a re-encoding start to a picture immediately before the current re-encoding, and the second period is a period including a plurality of pictures including one intra-coded image. The compressed moving image re-encoding device according to claim 7 or 8, characterized in that: 前記第1の期間は再符号化開始から現在再符号化している直前のピクチャまでであり、前記第2の期間はフレーム内符号化された画像を一枚含む複数のピクチャを含む期間であることを特徴とする請求項9に記載の圧縮動画像再符号化方法。 The first period is from a re-encoding start to a picture immediately before the current re-encoding, and the second period is a period including a plurality of pictures including one intra-coded image. The compressed video re-encoding method according to claim 9.
JP2007185162A 2007-07-17 2007-07-17 Compressed video re-encoding device and compressed video re-encoding method Expired - Lifetime JP4748126B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007185162A JP4748126B2 (en) 2007-07-17 2007-07-17 Compressed video re-encoding device and compressed video re-encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007185162A JP4748126B2 (en) 2007-07-17 2007-07-17 Compressed video re-encoding device and compressed video re-encoding method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2004026118A Division JP4023451B2 (en) 2004-02-02 2004-02-02 Compressed video re-encoding device and compressed video re-encoding method

Publications (2)

Publication Number Publication Date
JP2007318794A true JP2007318794A (en) 2007-12-06
JP4748126B2 JP4748126B2 (en) 2011-08-17

Family

ID=38852159

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007185162A Expired - Lifetime JP4748126B2 (en) 2007-07-17 2007-07-17 Compressed video re-encoding device and compressed video re-encoding method

Country Status (1)

Country Link
JP (1) JP4748126B2 (en)

Also Published As

Publication number Publication date
JP4748126B2 (en) 2011-08-17

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
US6141380A (en) Frame-level rate control for video compression
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
JP3259702B2 (en) Moving picture variable bit rate coding apparatus and method
JP5640979B2 (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding program
KR100588795B1 (en) Coding Device and Coding Method
JP4362795B2 (en) Video encoding apparatus and method
JP4224778B2 (en) STREAM CONVERTING APPARATUS AND METHOD, ENCODING APPARATUS AND METHOD, RECORDING MEDIUM, AND PROGRAM
JP5708490B2 (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding program
KR100790149B1 (en) Rate control of scene-changed video encoder
JPH0998427A (en) Video coding device
JP4277530B2 (en) Image processing apparatus and encoding apparatus and methods thereof
JP4826533B2 (en) Image processing apparatus, image processing method, program, and recording medium
JP4407249B2 (en) Data processing apparatus, method and encoding apparatus, method and program
JP4023451B2 (en) Compressed video re-encoding device and compressed video re-encoding method
US8442113B2 (en) Effective rate control for video encoding and transcoding
JP4292659B2 (en) Image information conversion apparatus and image information conversion method
JP4748126B2 (en) Compressed video re-encoding device and compressed video re-encoding method
JP4788653B2 (en) Image data transcoding apparatus and transcoding method
KR100800838B1 (en) How to control video encoding data rate
JP2002218470A (en) Method for converting image encoded data rate and device for converting image encoding rate
JP4292658B2 (en) Image information conversion apparatus and image information conversion method
JP2002077905A (en) Encoding control device and method

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20080613

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20090511

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A132

Effective date: 20101109

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110105

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110502

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4748126

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140527

Year of fee payment: 3

EXPY Cancellation because of completion of term