[go: up one dir, main page]

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 PDF

Info

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
Application number
JP2004026118A
Other languages
Japanese (ja)
Other versions
JP4023451B2 (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 JP2004026118A priority Critical patent/JP4023451B2/en
Publication of JP2004180339A publication Critical patent/JP2004180339A/en
Application granted granted Critical
Publication of JP4023451B2 publication Critical patent/JP4023451B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To realize reduction in a process delay during re-coding of a compressed moving picture, and to provide a compressed moving picture re-coding system with higher image quality. <P>SOLUTION: Using either and/or both of a quantization width and a code quantity in an input compressed moving picture stream, a complexity calculation means 101 calculates each complexity for two or more given time period or number of pictures. In addition, a picture group quantization width calculation means 102 outputs one complexity from a plurality of complexities, and a quantization width control means 103 uses a preset average bit rate and the output complexity to calculate a quantization width. Furthermore, using overs or shorts from target number of codes and actual number of codes, a quantization width selector 104 controlling a quantization width per time period calculates a quantization width used for re-coding, and controls the number of codes by inputting the quantization width and the quantization width in the input compressed moving picture stream and outputting a quantization width used for actual re-coding. Thus, the system will perform re-coding with a variable bit rate to output a compressed moving picture stream with modified bit rate. <P>COPYRIGHT: (C)2004,JPO

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 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. You.

図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 subtractor 301, a discrete cosine transformer 302, a quantizer 303, a variable length encoder 304, a code amount control unit 305, an inverse quantizer 306, It comprises an inverse discrete cosine transformer 307, an adder 308, a frame memory 309, and a motion compensation predictor 310.

図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 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 a coding path unit 43, and the decoding path unit 41 and the coding path The components other than the unit 43 and the code amount control unit 401 are referred to as an error compensating unit 42.

前述したように、図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 variable length decoder 201 as an encoding parameter at the time of re-encoding for the purpose of speeding up processing and improving image quality.

これに対し、より低コストかつ簡易に圧縮動画像の再符号化を行う装置が特許文献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 error compensating unit 42 shown in FIG. 14 is omitted for simplification of processing, and a decoding path 51, an encoding path 52, and a code amount controller 501 alone. However, when this device is used, image quality is deteriorated 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 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 error compensator 62, which is a conversion equivalent to the error compensator 42 of FIG.

これらの従来技術は、圧縮動画像再符号化装置の構成について開示されたものであり、符号量制御手段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 amount control unit 401. Next, a conventional technique in the code amount control method of the compressed moving image 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 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では、再符号化時の目標符号量を入力圧縮動画ストリームのピクチャの符号量と、入力ビットレートと、出力ビットレートを用いて、設定している。
特開平8−23539号公報 特開平8−51631号公報
As Conventional Example 3, United States Patent 5,805,224 is disclosed. In this method, a target code amount of a sub-picture at the time of re-encoding is set based on an input bit rate, an output bit rate, and a code amount of a picture to be coded. Ask for degrees. Next, the complexity is distributed according to the target generated code amount of the sub-picture, and the quantization width of the sub-picture is set. Next, the difference between the target code amount and the actual code amount is reflected in the control, and the quantization amount is adjusted to adjust the code amount. 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 moving image stream, the input bit rate, and the output bit rate.
JP-A-8-23539 JP-A-8-51631

しかしながら、上記従来の方式では、入力圧縮動画ストリームの符号量に応じて、再符号化時の目標符号量を設定し、動画像のシーン特性や符号化に必要となる符号量に係わらずほぼ一様に発生符号量を削減するため、画質が劣化する問題を伴う。   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 decoding path unit 11, an error compensating 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 as an input to the decoding path unit 11. The decoding path unit 11 performs variable-length decoding and inverse quantization of the input bit stream, and performs a bit rate of the input bit stream, a frame rate, a quantization width of the input bit stream for each macro block, and an input bit stream. The code amount is supplied to the code amount control means 14. In addition, the decoding path unit 11 supplies the DCT coefficient, the motion vector, and the like to the error compensating unit 12, and supplies the coding path unit 13 with coding information that can be reused at the time of re-coding.

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

符号化経路部13においては、復号経路部11から供給される符号化情報と、誤差補償部12から供給されるDCT係数と、符号量制御手段14から供給される量子化幅と、外部から供給される目標平均ビットレートを用いて、DCT係数の再量子化と、再符号化を行い出力ビットストリームを出力し、再符号化後の符号量を符号量制御手段14に供給する。   In the coding path unit 13, the coding information supplied from the decoding path unit 11, the DCT coefficient supplied from the error compensating unit 12, the quantization width supplied from the code amount control unit 14, Using the target average bit rate, the DCT coefficients are 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 unit 14.

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

複雑度計算手段101においては、復号経路部11からマクロブロック毎に供給される入力ビットストリームの量子化幅と、入力ビットストリームの符号量を用いて、複数ピクチャにおけるピクチャ群複雑度および符号化を行った全ピクチャにおける複雑度を計算し、ピクチャ群量子化幅計算手段102に供給する。   The complexity calculation means 101 uses the quantization width of the input bit stream supplied from the decoding path unit 11 for each macroblock and the code amount of the input bit stream to calculate the picture group complexity and coding of 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, the picture group complexity Is used to calculate the basic quantization width, and the calculated result is supplied to the quantization width adjustment unit 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 set the target code. The amount is set, a 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. Then, 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 adjusting unit 103 is 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 encoding 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 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 complexity calculation 101. In the complexity calculation 101, the quantization width accumulation of the picture group in a plurality of pictures is performed using the quantization width Qoji of the input bit stream and the code amount Soj of the input bit stream supplied from the decoding path unit 11 for each macroblock. The calculated value Qop and the code amount accumulated value Sop and the complexity Xp, the quantization width accumulated value Qot and the code amount accumulated value Sot and the complexity Xt in all pictures are calculated by, for example, 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 encoded pictures, and the code Nmb represents the number of macroblocks per picture.

Figure 2004180339
Figure 2004180339

ピクチャ群量子化幅計算手段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 decoding path unit 11, the target average bit rate ABR supplied from the outside, the complexity Xt supplied from the complexity calculation means 101, Using the picture group complexity Xp, the basic quantization width Qb is calculated by, for example, Expression (7), and is supplied to the quantization width adjustment 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 by selecting a small value, it becomes a control to generate a large amount of code. In addition, it is possible to suppress a decrease in image quality.

Figure 2004180339
Figure 2004180339

量子化幅調整手段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 the ABR, the picture group code amount accumulated value Sop, the picture group target code amount Tp, and the target code amount Tt of all pictures are calculated, for example, using the above-described formula (2), and the following formulas (8) and (8). Calculated by 9). Also, using the code amount Srj after re-encoding supplied from the coding path unit 13 for each macroblock, the code amount accumulated value Srt of all pictures is calculated by Expression (10), and the difference VBO is calculated by Expression (10). Determined by 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 2004180339
Figure 2004180339

ここで、上記の式(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 quantization width selector 104, if the quantization width Qm supplied from the quantization width adjusting unit 103 is smaller than the quantization width Qj of the input bit stream supplied from the decoding path unit 11, the input The quantization width Qj of the bit stream is supplied to the encoding 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 calculator 101 determines the complexity and the picture group complexity 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. calculate. According to the present embodiment, the complexity calculator 101 uses the quantization width after re-encoding supplied from the encoding path unit 13 and the code amount after re-encoding to calculate the complexity and the group of pictures. 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 a quantization width using the quantization width supplied from the quantization width adjustment unit 103. This embodiment is obtained by adding an adaptive quantization means 901 to the block diagram shown in FIG. The adaptive quantization unit 901 further 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 further increase the quantization width supplied from the quantization width adjustment unit 103. It is adjusted and supplied 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 will be described. The adaptive quantization means 901 uses the quantization width Qj of the input bit stream 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, by using Expression (3). ) Is calculated based on the picture group complexity Xp obtained from the above equation and the following equation (13), and is supplied to the quantization width selector 104. Here, the number of pictures Np in the picture group does not need to be the same as the number of pictures in the picture group used in the complexity calculation means 101. In the present embodiment, the calculation of the activity performed using the normal image signal is performed by using the quantization width and the code amount of the input bit stream to correct the quantization width. As a result, adaptive quantization using the characteristics of an image can be performed even for a compressed image re-encoding device having a configuration in which decoding is not performed up to the image signal level.

Figure 2004180339
Figure 2004180339

次に、本発明の第4の実施形態を図4に示す。第1の実施形態では、ピクチャ群複雑度101においては、複雑度の計算に入力ビットストリームの量子化幅を用いている。本実施形態は、図1に示されるブロック図に逆適応量子化器1001を追加したものである。   Next, a fourth embodiment of the present invention is shown in FIG. In the first embodiment, in the picture group complexity 101, the quantization width of the input bit stream is used for calculating the complexity. This embodiment is obtained by adding an inverse adaptive quantizer 1001 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 bit stream supplied from the decoding path unit 11 is calculated using the quantization width of the bit stream supplied from the decoding path unit 11 and the code amount of the input bit stream. Is adjusted and supplied to the complexity calculation means 101. As an operation example of the inverse adaptive quantization means 1001, for example, the inverse transform of the adaptive quantization means 901 in FIG. 3 can be considered. In the present 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 bit stream that has been adaptively quantized at the time of encoding. Can be used to calculate the complexity.

次に、本発明の第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 quantization width selector 104 is added to FIG. In the quantization width selector 1101 according to the first embodiment, the quantization width supplied from the quantization width adjustment unit 103 is smaller than the quantization width of the input bit stream 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 bit stream are If the value is smaller than the minimum quantization width, the minimum quantization width is supplied to the encoding path unit 13. As a result, in the present embodiment, it is possible to suppress the occurrence of useless codes caused by setting the quantization width too small.

次に、本発明の第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 decoding path unit 11, the code amount of the input bit stream, the bit rate and frame rate of the input bit stream, the decoding path unit The maximum bit rate not exceeding 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 externally supplied, etc. The 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 unit 1201 in addition to the above input, and uses the quantization width supplied from the quantization width adjustment unit 103. If the quantization width of the input bit stream is smaller than the maximum bit rate quantization width, the maximum bit rate quantization width is supplied to the encoding path unit 13. Here, as a method of calculating the maximum bit rate quantization width in the maximum bit rate quantization width calculation unit 1201, for example, the target bit rate and the maximum bit rate ratio of the input bit stream and the code amount of the input bit stream are used to calculate the target bit rate. This can be realized by setting the code amount and calculating the quantization width in macroblock units 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, the coding width is set too small more than necessary, and the occurrence of useless codes can be suppressed. .

次に、本発明の第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 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 unit. It comprises means 1301 and addition value calculating means 1302.

以下では、第1の実施形態と異なる部分に関してのみ説明する。平均量子化幅計算手段1301においては、復号経路部11から供給される入力ビットストリームの量子化幅を複数ピクチャ期間累算し、その平均値を加算値計算手段1302に供給する。   Hereinafter, only the portions different from the first embodiment will be described. The average quantization width calculation unit 1301 accumulates the quantization width of the input bit stream 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に供給する。   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 decoding path unit 11. Is added to the quantization width of the input bit stream supplied from the sub-block and supplied to the quantization width adjustment unit 103.

次に平均量子化幅計算手段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 decoding path unit 11, and added. It is supplied to the value calculation means 1302. Here, the number of pictures Np in the picture group does not need to be the same as the number of pictures in the picture group used in the complexity calculation means 101.

Figure 2004180339
Figure 2004180339

加算値計算手段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.

Figure 2004180339
Figure 2004180339

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

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

加算値計算手段の動作例を図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 width calculation unit 1301 encodes the intra-frame encoding (I picture), the forward inter-frame encoding (P picture), and the bidirectional inter-frame encoding (B picture) in MPEG-2. 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. , Is added to the quantization width of the input bit stream supplied from the decoding path unit 11 for each encoding mode, and the quantization width is calculated. As a result, in the present embodiment, since the addition value is switched according to the encoding mode, finer control than with 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-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.

本発明の圧縮動画像再符号化装置の実施形態の構成例を示すブロック図である。1 is a block diagram illustrating a configuration example of an embodiment of a compressed moving picture re-encoding device of the present invention. 第2の実施形態における圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram showing an example of composition of a compression moving picture re-encoding device in a 2nd embodiment. 第3の実施形態における圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram showing the example of composition of the compression moving picture re-encoding device in a 3rd embodiment. 第4の実施形態における圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram showing the example of composition of the compression moving picture re-encoding device in a 4th embodiment. 第5の実施形態における圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram showing the example of composition of the compression moving picture re-encoding device in a 5th embodiment. 第6の実施形態における圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram showing the example of composition of the compression moving picture re-encoding device in a 6th embodiment. 第7の実施形態における圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram showing the example of composition of the compression moving picture re-encoding device in a 7th embodiment. 第8の実施形態における圧縮動画像再符号化装置の構成例を示すブロック図である。It is a block diagram showing the example of composition of the compression moving picture re-encoding device in an 8th embodiment. 第8の実施形態における量子化幅設定手段の動作例の説明図である。FIG. 28 is an explanatory diagram of an operation example of a quantization width setting unit in the eighth embodiment. 原理説明図である。FIG. 原理説明図である。FIG. 従来の復号器の構成を示すブロック図である。FIG. 11 is a block diagram illustrating a configuration of a conventional decoder. 従来の符号化器の構成を示すブロック図である。FIG. 11 is a block diagram illustrating a configuration of a conventional encoder. 従来の圧縮動画像再符号化装置の構成例を示すブロック図である。FIG. 11 is a block diagram illustrating a configuration example of a conventional compressed moving image re-encoding device. 従来の圧縮動画像再符号化装置の構成例を示すブロック図である。FIG. 11 is a block diagram illustrating a configuration example of a conventional compressed moving image re-encoding device. 従来の圧縮動画像再符号化装置の構成例を示すブロック図である。FIG. 11 is a block diagram illustrating a configuration example of a conventional compressed moving image re-encoding device.

符号の説明Explanation of reference numerals

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 加算値計算手段
Reference Signs List 11 decoding path unit 12 error compensation unit 13 encoding path unit 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 unit 42 Error compensating unit 43 Encoding path unit 401 Code amount control unit 51 Decoding path unit 52 Encoding path unit 501 Code amount control unit 61 Decoding path Unit 62 error compensating unit 63 encoding path unit 601 subtraction 602 inverse quantizer 603 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, 1401 Addition value calculation means

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. The apparatus according to claim 1, further comprising means for selecting a larger quantization width from the quantization width used for the re-encoding and the quantization width in the input compressed video stream. . 前記入力圧縮動画ストリームあるいは前記再符号化した圧縮動画ストリームの何れかにおける、量子化幅と符号量の一方または両方を用いて、二種類以上の所定の予め定められた期間またはピクチャ枚数におけるそれぞれの複雑度を計算する手段と、
複数の前記複雑度から所定の複雑度を出力する手段と、
前記予め設定された平均ビットレートと前記出力された複雑度とを用いて前記量子化幅を計算する手段と、
目標符号量と実際の符号量との過不足量から所定の期間毎に前記量子化幅を調整して前記再符号化に用いる量子化幅とすることを特徴とする請求項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.
前記定められた期間またはピクチャ枚数として用いられる複数ピクチャとして、再符号化開始から現在再符号化をしている直前のピクチャまたはフレーム内符号化された画像を一枚含む複数のピクチャを使用することを特徴とする請求項3に記載の圧縮動画像再符号化装置。   As the plurality of pictures used as the predetermined period or the number of pictures, a plurality of pictures including one picture immediately before the current re-encoding or one intra-coded picture from the start of re-encoding is used. The compressed moving picture re-encoding device according to claim 3, wherein 前記目標符号量と過不足量から基本量子化幅を調整する前記所定の期間は、ピクチャを分割したブロックの集合を使用することを特徴とする請求項3または4に記載の圧縮動画像再符号化装置。   5. The compressed moving picture recoding apparatus according to claim 3, wherein a set of blocks obtained by dividing a picture is used in the predetermined period in which a basic quantization width is adjusted based on the target code amount and the excess or deficiency amount. Device. 前記複数の複雑度の中で最小となる複雑度を選択する手段をさらに有することを特徴とする請求項3または4に記載の圧縮動画像再符号化装置。   5. The apparatus according to claim 3, further comprising: means for selecting a minimum complexity among the plurality of complexity. 前記複雑度の計算に用いられる前記入力圧縮動画ストリームの量子化幅に対して画像特性による重み付けをし、該量子化幅を調整する手段をさらに有することを特徴とする請求項3から6の何れかに記載の圧縮動画像再符号化装置。   7. The apparatus according to claim 3, further comprising: means for weighting a quantization width of the input compressed moving image stream used for calculating the complexity by image characteristics, and adjusting the quantization width. A compressed video re-encoding device according to any one of claims 1 to 3. 前記入力圧縮動画ストリームの量子化幅と符号量の何れか一方または両方を用いて、所定の定められた期間またはピクチャ枚数におけるそれぞれの複雑度と再符号化対象の複雑度との比率を計算し、前記量子化幅の重み付けをし、該量子化幅を調整する手段をさらに有することを特徴とする請求項7に記載の圧縮動画像再符号化装置。   Using either or both of the quantization width and code amount of the input compressed video stream, calculate the ratio of the respective complexity and the complexity of the re-encoding target in a predetermined period or the number of pictures. 8. The apparatus according to claim 7, further comprising means for weighting the quantization width and adjusting the quantization width. 前記入力圧縮動画ストリームの量子化幅と符号量の何れか一方または両方を用いて、二種類以上の所定の定められた期間またはピクチャ枚数におけるそれぞれの複雑度を計算する手段と、
前記複数の複雑度から所定の複雑度を出力する手段と、
前記予め設定された平均ビットレートと前記出力された複雑度とを用いて量子化幅を計算する手段と、
前記入力圧縮動画ストリームの量子化幅を用いて、所定の期間またはピクチャ枚数毎に量子幅の平均を計算する手段と、
前記量子化幅と前記平均量子化幅を用いて加算値を計算し、前記入力圧縮動画ストリームの量子化幅に加算値を加算した加算量子化幅を計算する手段と、
目標符号量と実際の符号量との過不足量から所定の期間毎に前記加算量子化幅を調整して、再符号化に用いる量子化幅とすることを特徴とする請求項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.
前記加算量子化幅に対して、所定の複数の量子化幅においては閾値設定することを特徴とする請求項8または9に記載の圧縮動画像再符号化装置。   The apparatus according to claim 8, wherein a threshold value is set for a predetermined plurality of quantization widths with respect to the added quantization width. 前記再符号化に用いる量子化幅に対して、最小値を設定することを特徴とする請求項1記載の圧縮動画像再符号化装置。   2. The apparatus according to claim 1, wherein a minimum value is set for a quantization width used for the re-encoding. 動画像データを圧縮符号化して生成された入力圧縮動画ストリームを入力信号とし、予め設定した平均ビットレートで、且つ可変ビットレートで再符号化し、ビットレートを変更した出力圧縮動画ストリームを出力信号とする圧縮動画像再符号化方法において、
前記再符号化に用いる量子化幅を計算する工程と、
前記計算された量子化幅と前記入力圧縮動画ストリームにおける量子化幅を入力し、実際の再符号化に用いる量子化幅を出力する工程とを有することを特徴とする圧縮動画像再符号化方法。
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. The method according to claim 13, further comprising the step of selecting a larger quantization width from the quantization width used for the re-encoding and the quantization width in the input compressed video stream. . 前記入力圧縮動画ストリームあるいは前記再符号化した圧縮動画ストリームの何れかにおける、量子化幅と符号量の一方または両方を用いて、二種類以上の所定の予め定められた期間またはピクチャ枚数におけるそれぞれの複雑度を計算する工程と、
前記複数の複雑度から所定の複雑度を出力する工程と、
前記予め設定された平均ビットレートと前記出力された複雑度とを用いて前記量子化幅を計算する工程と、
目標符号量と実際の符号量との過不足量から所定の期間毎に前記量子化幅を調整して前記再符号化に用いる量子化幅とすることを特徴とする請求項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.
JP2004026118A 2004-02-02 2004-02-02 Compressed video re-encoding device and compressed video re-encoding method Expired - Lifetime JP4023451B2 (en)

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)

* Cited by examiner, † Cited by third party
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

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