JP3948024B2 - Image code transcoder and image code transcoding method - Google Patents

Image code transcoder and image code transcoding method Download PDF

Info

Publication number
JP3948024B2
JP3948024B2 JP2005241147A JP2005241147A JP3948024B2 JP 3948024 B2 JP3948024 B2 JP 3948024B2 JP 2005241147 A JP2005241147 A JP 2005241147A JP 2005241147 A JP2005241147 A JP 2005241147A JP 3948024 B2 JP3948024 B2 JP 3948024B2
Authority
JP
Japan
Prior art keywords
amplitude
code
frequency component
zero
image
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.)
Expired - Fee Related
Application number
JP2005241147A
Other languages
Japanese (ja)
Other versions
JP2006060835A (en
Inventor
茂之 倉橋
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 JP2005241147A priority Critical patent/JP3948024B2/en
Publication of JP2006060835A publication Critical patent/JP2006060835A/en
Application granted granted Critical
Publication of JP3948024B2 publication Critical patent/JP3948024B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

本発明は、原画像を符号化して得られた原画像符号を、その原画像符号よりも符号総量が少なく、符号量相応の品質の画像を表す削減画像符号に変換するための画像符号のトランスコーダに関する。   The present invention provides a transcoding of an image code for converting an original image code obtained by encoding an original image into a reduced image code that represents an image having a code total amount smaller than that of the original image code and corresponding to the code amount. Regarding the coder.

近年、MPEG(Motion Picture Experts Group)方式は、動画像及び音声を蓄積又は伝送する方式として普及してきており、例えば、CD−R(Compact Disc-Recordable)、DVD(Digital Versatile Disc)、ハードディスク等のデジタル蓄積メディア(Digital Storage Medium)の記録フォーマットとして使用され、また、デジタルテレビ放送のデータ符号化方式としても使用されている。また、MPEG方式は動画像及び音声のストリーミングのデータ符号化方式としても使用されている。   In recent years, the Motion Picture Experts Group (MPEG) system has become widespread as a system for storing or transmitting moving images and audio. For example, a CD-R (Compact Disc-Recordable), a DVD (Digital Versatile Disc), a hard disk, etc. It is used as a recording format for digital storage media and is also used as a data encoding method for digital television broadcasting. The MPEG system is also used as a data encoding system for streaming moving images and audio.

MPEG信号より成るストリーミングデータによりストリーミングを行うストリーミングクライアントとしては、10Mbpsの伝送ビットレートの光通信によりストリーミングデータを受信するパーソナルコンピュータの外に、数Mbpsの伝送ビットレートのADSL(Asymmetric Digital Subscriber Line)によりストリーミングデータを受信するパーソナルコンピュータ及び384kbps〜2Mbpsの伝送ビットレートのデータ通信チャネルによりストリーミングデータを受信するW−CDMA(Wideband-Code Division Multiple Access)方式の携帯端末等が想定される。一方、ストリーミングサーバには、コンテンツ制作者が制作したMPEGデータが蓄積されているが、このMPEGデータは、高画質なオリジナルMPEGデータである。NTSC方式、PAL/SECAM方式等のコンベンショナルテレビ方式の信号を基にしたオリジナルMPEGデータをそのまま伝送するならば、6Mbps程度のビットレートを必要とする。   As a streaming client that performs streaming using streaming data composed of MPEG signals, in addition to a personal computer that receives streaming data by optical communication at a transmission bit rate of 10 Mbps, ADSL (Asymmetric Digital Subscriber Line) at a transmission bit rate of several Mbps is used. A personal computer that receives streaming data, a W-CDMA (Wideband-Code Division Multiple Access) mobile terminal that receives streaming data through a data communication channel having a transmission bit rate of 384 kbps to 2 Mbps, and the like are assumed. On the other hand, MPEG data produced by a content creator is stored in the streaming server, and this MPEG data is high-quality original MPEG data. If original MPEG data based on conventional television signals such as NTSC and PAL / SECAM are transmitted as they are, a bit rate of about 6 Mbps is required.

従って、種々のストリーミングクライアントにストリーミングデータを送信するためには、トランスコーダにより、オリジナルMPEGデータをそれよりも必要とする伝送ビットレートが低い2次的なMPEGデータに変換する必要がある。   Therefore, in order to transmit streaming data to various streaming clients, it is necessary to convert the original MPEG data into secondary MPEG data having a lower transmission bit rate that is required by the transcoder.

従来、トランスコーダによって符号量を削減する方法として、(1)MPEGデコーダによりビデオ信号を復号してから、復号されたビデオ信号をMPEGエンコーダにより符号化する方法、(2)量子化スケールを調整することにより、符号量を削減する方法、(3)Pピクチャを間引くことにより、符号量を削減する方法、(4)IピクチャをPピクチャに変換することにより、符号量を削減する方法及び(5)ダウンスケーリングを行うことにより符号量を削減する方法が提案されている。   Conventionally, as a method of reducing the amount of code by a transcoder, (1) a method in which a video signal is decoded by an MPEG decoder and then the decoded video signal is encoded by an MPEG encoder, and (2) a quantization scale is adjusted. (3) A method of reducing the code amount by thinning out the P picture, (4) A method of reducing the code amount by converting the I picture to the P picture, and (5 A method for reducing the code amount by downscaling has been proposed.

MPEGデコーダによりビデオ信号を復号してから、復号されたビデオ信号をMPEGエンコーダにより符号化する方法について説明する。   A method of decoding a video signal with an MPEG decoder and then encoding the decoded video signal with an MPEG encoder will be described.

この方法は、最も原始的な方法であり、図22に示すMPEGデコーダによりビデオ信号を復号してから、図23に示すMPEGエンコーダによりビデオ信号を符号化する。   This method is the most primitive method. After the video signal is decoded by the MPEG decoder shown in FIG. 22, the video signal is encoded by the MPEG encoder shown in FIG.

図22を参照すると、MPEGデコーダは、バッファ701、可変長復号器702、逆量子化器703、逆離散コサイン変換器(IDCT)704、加算器705、過去画像メモリ706、未来画像メモリ707、動き補償予測器708及びスイッチ709を備える。このMPEGデコーダは、ビデオストリーム751を入力し、ビデオ信号752を出力する。また、逆量子化器の逆量子化特性は量子化スケール753により定められる。量子化特性については後述する。また、MPEGデコーダの各部の動作は公知であるので、その説明は省略する。   Referring to FIG. 22, the MPEG decoder includes a buffer 701, a variable length decoder 702, an inverse quantizer 703, an inverse discrete cosine transformer (IDCT) 704, an adder 705, a past image memory 706, a future image memory 707, a motion. A compensation predictor 708 and a switch 709 are provided. This MPEG decoder receives a video stream 751 and outputs a video signal 752. Further, the inverse quantization characteristic of the inverse quantizer is determined by the quantization scale 753. The quantization characteristic will be described later. Further, since the operation of each part of the MPEG decoder is known, the description thereof is omitted.

図23を参照すると、MPEGエンコーダは、スイッチ801、離散コサイン変換器(DCT)802、量子化器803、逆量子化器804、逆離散コサイン変換器(IDCT)804、加算器806、過去画像メモリ807、未来画像メモリ808、動き検出部809、動き補償予測器810、スイッチ811、可変長符号器813、バッファ814及び制御部815を備える。このMPEGエンコーダはMPEGデコーダが出力するビデオ信号752をビデオ信号851として入力し、ビデオストリーム852を出力する。量子化器803及び逆量子化器の量子化特性は量子化スケール853により定められる。MPEGエンコーダの各部の動作は公知であるので、その説明は省略する。   Referring to FIG. 23, the MPEG encoder includes a switch 801, a discrete cosine transformer (DCT) 802, a quantizer 803, an inverse quantizer 804, an inverse discrete cosine transformer (IDCT) 804, an adder 806, and a past image memory. 807, a future image memory 808, a motion detection unit 809, a motion compensation predictor 810, a switch 811, a variable length encoder 813, a buffer 814, and a control unit 815. This MPEG encoder inputs a video signal 752 output from the MPEG decoder as a video signal 851, and outputs a video stream 852. The quantization characteristics of the quantizer 803 and the inverse quantizer are determined by the quantization scale 853. Since the operation of each part of the MPEG encoder is known, its description is omitted.

このMPEGデコーダとMPEGエンコーダを直列接続したトランスコーダにおいて、バッファ814からビデオストリームを読み出すビットレートをビデオストリーム751のビットレートとは異ならせることにより、トランスコーディングが可能となる。この場合、バッファ814からビデオストリームを読み出すビットレートに応じて量子化スケール853が変化する。また、MPEGエンコーダが決定するGOP(Group Of Pictures)の構成を変化させることによっても、トランスコーディングが可能となる。   In the transcoder in which the MPEG decoder and the MPEG encoder are connected in series, transcoding can be performed by making the bit rate for reading the video stream from the buffer 814 different from the bit rate of the video stream 751. In this case, the quantization scale 853 changes according to the bit rate at which the video stream is read from the buffer 814. Transcoding can also be performed by changing the configuration of a GOP (Group Of Pictures) determined by the MPEG encoder.

量子化スケールを調整することにより、符号量を削減する方法について説明する。   A method of reducing the code amount by adjusting the quantization scale will be described.

この方法を実現するためには、例えば、図24に示すようなトランスコーダを用いる。このトランスコーダは、バッファ901、可変長符号器902、逆量子化器903、量子化器904、マルチプレクサ905、可変長符号器906、バッファ907及び制御部908を備える。バッファ901、可変長復号器902及び逆量子化器903は、公知のMPEGデコーダのものと同一であるので、その説明は省略する。量子化器904は、逆量子化器903が出力するDCT係数を制御部908が出力するトランスコーディド量子化スケール954に従って、再量子化する。マルチプレクサ905は、量子化器904が出力する再量子化されたDCT係数のレベルを示す数値及びDCT係数以外のデータをマルチプレクスする。可変長符号器906は、マルチプレクサ905が出力するデータを可変長符号化する。この可変長符号化には、DCT係数の2次元ハフマン符号化が含まれる。バッファ907は、可変長符号器906が出力する可変長符号の発生頻度のゆらぎを吸収して一定のビットレートでトランスコーディドビデオストリーム952を出力する。制御部908は、バッファ907の占有率及び所定の規則等に従ってトランスコーディド量子化スケール954の値を定める。バッファ907からトランスコーディドビデオストリーム952を読み出すビットレートを原ビデオストリーム951のビットストリームと異ならせることにより、トランスコーディド量子化スケール954の値を調整することができる。また、このように調整されたトランスコーディド量子化スケール954は原量子化スケールとは、一般に異なる。従って、原量子化スケール953をトランスコーディド量子化スケール954に変換したことになる。   In order to realize this method, for example, a transcoder as shown in FIG. 24 is used. This transcoder includes a buffer 901, a variable length encoder 902, an inverse quantizer 903, a quantizer 904, a multiplexer 905, a variable length encoder 906, a buffer 907, and a control unit 908. Since the buffer 901, variable length decoder 902, and inverse quantizer 903 are the same as those of a known MPEG decoder, description thereof will be omitted. The quantizer 904 re-quantizes the DCT coefficient output from the inverse quantizer 903 according to the transcoded quantization scale 954 output from the control unit 908. The multiplexer 905 multiplexes the numerical value indicating the level of the requantized DCT coefficient output from the quantizer 904 and data other than the DCT coefficient. The variable length encoder 906 performs variable length encoding on the data output from the multiplexer 905. This variable length coding includes two-dimensional Huffman coding of DCT coefficients. The buffer 907 absorbs fluctuations in the frequency of occurrence of variable length codes output from the variable length encoder 906 and outputs a transcoded video stream 952 at a constant bit rate. The control unit 908 determines the value of the transcoded quantization scale 954 according to the occupation ratio of the buffer 907, predetermined rules, and the like. By changing the bit rate at which the transcoded video stream 952 is read from the buffer 907 to be different from that of the original video stream 951, the value of the transcoded quantization scale 954 can be adjusted. Also, the transcoded quantization scale 954 adjusted in this way is generally different from the original quantization scale. Therefore, the original quantization scale 953 is converted to the transcoded quantization scale 954.

トランスコーディドビデオストリーム952を復号するMPEGデコーダは、図22に示すMPEGデコーダと同一であり、このMPEGデコーダは、トランスコーディド量子化スケール954を量子化スケール753として用いる。   The MPEG decoder for decoding the transcoded video stream 952 is the same as the MPEG decoder shown in FIG. 22, and this MPEG decoder uses the transcoded quantization scale 954 as the quantization scale 753.

図22に示すトランスコーダの量子化器904では、マクロブロックがイントラマクロブロックであるか非イントラマクロブロックであるかにかかわらず、各マクロブロック内の各DCTブロックの8×8個の画素をDCT変換して得られた8×8個のDCT係数を量子化する。この量子化の結果得られるのは、量子化後のDCT係数の振幅を示す数値である。そして、図22に示すMPEGデコーダでは、マクロブロックがイントラマクロブロックであるか非イントラマクロブロックであるかにかかわらず、量子化後のDCT係数の振幅を示す数値より量子化後のDCT係数を復元し、復元された8×8個のDCT係数を逆DCT変換して8×8個の画素を復元する。   In the transcoder quantizer 904 shown in FIG. 22, regardless of whether the macro block is an intra macro block or a non-intra macro block, 8 × 8 pixels of each DCT block in each macro block are DCT-converted. The 8 × 8 DCT coefficients obtained by the conversion are quantized. As a result of this quantization, a numerical value indicating the amplitude of the DCT coefficient after quantization is obtained. In the MPEG decoder shown in FIG. 22, the quantized DCT coefficient is restored from the numerical value indicating the amplitude of the quantized DCT coefficient regardless of whether the macroblock is an intra macroblock or a non-intra macroblock. Then, the restored 8 × 8 DCT coefficients are subjected to inverse DCT transform to restore 8 × 8 pixels.

イントラマクロブロック内のDCTブロックのDCT係数のうちのAC係数F(m、n)(m、nは0以上且つm+n≠0を満たす整数)は、振幅がゼロの付近のデッドゾーンを有しない量子化器により量子化される。この量子化器のステップサイズS1は、AC係数の成分により異なるので、S1(m、n)と表すことができるが、ステップサイズS1(m、n)は、
S1(m、n)=2×イントラ量子化マトリックス(m、n)×量子化スケール/32
と表される。
The AC coefficient F (m, n) (m, n is an integer satisfying m + n ≠ 0) among the DCT coefficients of the DCT block in the intra macroblock is a quantum having no dead zone in the vicinity of zero amplitude. Quantized by the quantizer. Since the step size S1 of this quantizer differs depending on the component of the AC coefficient, it can be expressed as S1 (m, n). The step size S1 (m, n) is
S1 (m, n) = 2 × intra quantization matrix (m, n) × quantization scale / 32
It is expressed.

この量子化器に対応する逆量子化器により得られる量子化後のDCT係数の振幅F1(m、n)は、量子化器が出力する量子化後のDCT係数の振幅F1(m、n)を示す数値をQF1(m、n)とすれば、
F1(m、n)
=2×QF1(m、n)×イントラ量子化マトリックス(m、n)×量子化スケール/32
となる。
The amplitude F1 (m, n) of the DCT coefficient after quantization obtained by the inverse quantizer corresponding to this quantizer is the amplitude F1 (m, n) of the DCT coefficient after quantization output from the quantizer. If the numerical value indicating is QF1 (m, n),
F1 (m, n)
= 2 × QF1 (m, n) × Intra quantization matrix (m, n) × quantization scale / 32
It becomes.

非イントラマクロブロック内のDCTブロックのDCT係数F(m、n)(m、nは0以上の整数)は、振幅がゼロの付近のデッドゾーンを有する量子化器により量子化される。この量子化器のステップサイズS2は、DCT係数の成分により異なるので、S2(m、n)と表すことができるが、ステップサイズS2(m、m)は、
S2(m、n)=2×量子化スケール×非イントラ量子化マトリックス(m、n)/32
と表される。
The DCT coefficient F (m, n) (m, n is an integer greater than or equal to 0) of the DCT block in the non-intra macroblock is quantized by a quantizer having a dead zone in the vicinity of zero amplitude. Since the step size S2 of this quantizer varies depending on the DCT coefficient component, it can be expressed as S2 (m, n), but the step size S2 (m, m) is
S2 (m, n) = 2 × quantization scale × non-intra quantization matrix (m, n) / 32
It is expressed.

この量子化器に対応する逆量子化器により得られる量子化後のDCT係数の振幅F2(m、n)は、量子化器が出力する量子化後のDCT係数の振幅F2(m、n)を示す数値をQF2(m、n)とすれば、
F2(m、n)
=(2×QF2(m、n)+k)×非イントラ量子化マトリックス(m、n)×量子化スケール/32
ただし、
k=sign(QF2(m、n))
となる。
The amplitude F2 (m, n) of the DCT coefficient after quantization obtained by the inverse quantizer corresponding to this quantizer is the amplitude F2 (m, n) of the DCT coefficient after quantization output from the quantizer. If the numerical value indicating is QF2 (m, n),
F2 (m, n)
= (2 * QF2 (m, n) + k) * non-intra quantization matrix (m, n) * quantization scale / 32
However,
k = sign (QF2 (m, n))
It becomes.

ここで、上2式の量子化スケールは、q_scale_typeの値が0であるときには、
量子化スケール=2×量子化スケールコード
と表され、q_scale_typeの値が1であるときには、
量子化スケール=function(量子化スケールコード)
と表される。ここで、functionは非線形特性を示す。図25に量子化スケールコード対量子化スケールの特性の例を示す。
Here, when the value of q_scale_type is 0, the quantization scale of the above two equations is
When the quantization scale = 2 × quantization scale code and the value of q_scale_type is 1,
Quantization scale = function (quantization scale code)
It is expressed. Here, function indicates a non-linear characteristic. FIG. 25 shows an example of the characteristics of the quantization scale code versus the quantization scale.

q_scale_typeはピクチャ毎に定めることができ、量子化スケールコードはマクロブロック毎に定めることができる。従って、ピクチャ毎にq_scale_typeの値を調整し、且つ、マクロブロック毎に量子化スケールコードの値をこれが大きくなるように調整することにより、マクロブロック毎の量子化スケールを大きくすることができる。そして、量子化スケールを大きくすることにより、量子化されたDCTブロックのDCT係数を表す数値の値を小さくして、符号量を削減することができる。   The q_scale_type can be determined for each picture, and the quantization scale code can be determined for each macroblock. Therefore, by adjusting the value of q_scale_type for each picture and adjusting the value of the quantization scale code for each macroblock, the quantization scale for each macroblock can be increased. By increasing the quantization scale, the numerical value representing the DCT coefficient of the quantized DCT block can be reduced to reduce the code amount.

Pピクチャを間引くことにより、符号量を削減する方法について説明する。   A method of reducing the code amount by thinning out P pictures will be described.

図26に示すように、ピクチャを間引くことにより間引いたピクチャの分だけ符号量を削減することができる。図26(a)に示すような構造を有するGOP(Group Of Pictures)が与えられたとする。僅かに符号量を削減する場合には、図26(b)に示すように、Bピクチャ、Bピクチャ及びBピクチャを間引く。この場合には、復号器では、例えば、BピクチャをIピクチャで補間し、BピクチャをPピクチャで補間し、BピクチャをPピクチャで補間すればよいので、トランスコーダは、間引かれていないピクチャを再符号化する必要はない。更に、符号量を削減する場合には、図26(c)に示すように、Bピクチャ、Bピクチャ、Bピクチャ、Bピクチャ、Bピクチャ及びBピクチャを間引く。この場合には、復号器では、例えば、Bピクチャ及びBピクチャをIピクチャで補間し、Bピクチャ及びBピクチャをPピクチャで補間し、Bピクチャ及びBピクチャをPピクチャで補間すればよいので、トランスコーダは、間引かれていないピクチャを再符号化する必要はない。更に、符号量を削減する場合には、図26(d)に示すように、Bピクチャ、Bピクチャ、Bピクチャ、Bピクチャ、Bピクチャ及びBピクチャに加えてPピクチャを間引く。この場合には、復号器では、例えば、Bピクチャ、Bピクチャ、Pピクチャ及びBピクチャをIピクチャで補間し、Bピクチャ、Bピクチャ及びBピクチャをPピクチャで補完する。しかし、Pピクチャは、Pピクチャから元々動き補償予測されているので、復号器では、Pピクチャが間引かれていると、Pピクチャを復号することができない。そこで、トランスコーダは、PピクチャをIピクチャから動き補償予測して、予測誤差を符号化しなければならない。 As shown in FIG. 26, the code amount can be reduced by the amount of the thinned out picture by thinning out the picture. Assume that a GOP (Group Of Pictures) having a structure as shown in FIG. When the code amount is slightly reduced, the B 2 picture, the B 5 picture, and the B 8 picture are thinned out as shown in FIG. In this case, for example, the decoder may interpolate B 2 picture with I 1 picture, B 5 picture with P 4 picture, and B 8 picture with P 7 picture. There is no need to re-encode the undecimated pictures. Further, when the code amount is reduced, as shown in FIG. 26C, the B 2 picture, the B 3 picture, the B 5 picture, the B 6 picture, the B 8 picture, and the B 9 picture are thinned out. In this case, in the decoder, for example, B 2 picture and B 3 picture are interpolated with I 1 picture, B 5 picture and B 6 picture are interpolated with P 4 picture, and B 8 picture and B 9 picture are interpolated with P 4 picture. Since it is sufficient to interpolate with 7 pictures, the transcoder does not need to re-encode the pictures that have not been thinned out. Further, when the code amount is reduced, as shown in FIG. 26 (d), in addition to the B 2 picture, the B 3 picture, the B 5 picture, the B 6 picture, the B 8 picture and the B 9 picture, the P 4 picture Thin out. In this case, in the decoder, for example, B 2 picture, B 3 picture, P 4 picture and B 5 picture are interpolated with I 1 picture, and B 6 picture, B 8 picture and B 9 picture are replaced with P 7 picture. Complement. However, P 7 pictures, because it is originally motion compensated prediction from P 4 picture, the decoder, the P 4 picture are thinned out, it is impossible to decode the P 7 picture. Therefore, the transcoder, and motion compensation predicting P 7 pictures from I 1 picture, it must encode the prediction error.

IフレームをPフレームに変換することにより、符号量を削減する方法について説明する。   A method for reducing the code amount by converting the I frame into the P frame will be described.

GOPは、Iピクチャ、Pピクチャ、Bピクチャより構成されるが、1ピクチャあたりの符号量は、Iピクチャが最も多く、Pピクチャ、Bピクチャと続く。そこで、図27に示すように、GOP2のI10ピクチャをP10ピクチャに変換することにより、符号量を削減する。このためには、トランスコーダは、P10ピクチャをPピクチャから動き補償予測して、予測誤差を符号化しなければならない。 The GOP is composed of an I picture, a P picture, and a B picture, but the code amount per picture is the largest for the I picture, followed by the P picture and the B picture. Therefore, as shown in FIG. 27, the code amount is reduced by converting the I 10 picture of GOP2 into the P 10 picture. For this purpose, the transcoder, and motion compensation predicting P 10 pictures from P 7 pictures, must encode the prediction error.

Bピクチャ及びPピクチャを間引くことにより、符号量を削減する方法とIフレームをPフレームに変換することにより、符号量を削減する方法を組み合わせた場合の例を図28に示すが、この例では、Bピクチャ、Bピクチャ、Pピクチャ、Bピクチャ、Bピクチャ、Pピクチャ、Bピクチャ、Bピクチャ、B11ピクチャ、B12ピクチャ、P13ピクチャ、B14ピクチャ、B15ピクチャ、P16ピクチャ、B17ピクチャ、B18ピクチャが間引かれ、I10ピクチャがP10ピクチャに変換される。この場合には、P10ピクチャは、これに最も近い過去のピクチャであるIピクチャから動き補償予測されることになる。 FIG. 28 shows an example in which the method of reducing the code amount by thinning out the B picture and the P picture and the method of reducing the code amount by converting the I frame into the P frame are shown in FIG. , B 2 picture, B 3 picture, P 4 picture, B 5 picture, B 6 picture, P 7 picture, B 8 picture, B 9 picture, B 11 picture, B 12 picture, P 13 picture, B 14 picture, B 15 pictures, P 16 pictures, B 17 pictures, and B 18 pictures are thinned out, and I 10 pictures are converted into P 10 pictures. In this case, the P 10 picture is predicted by motion compensation from the I 1 picture which is the closest past picture.

ダウンスケーリングを行うことにより符号量を削減する方法について説明する。   A method for reducing the code amount by downscaling will be described.

画像に含まれる画素数を削減することをダウンスケーリングという。例えば、640(水平方向)×480(垂直方向)のフレームを320(水平方向)×240(垂直方向)のフレームに縮小することにより画像に含まれる画素数を削減する。この場合、ダウンスケーリング前のDCTブロックを2(水平方向)×2(垂直方向)個集めたものがダウンスケーリング後の1つのDCTブロックとなる。最も単純なダウンスケーリングは、画像符号を復号して復号画像を得て、復号画像を再符号化するものである。再符号化する際に、画像符号を復号したときに得られた動きベクトルを再利用できる場合もある。   Reducing the number of pixels included in an image is called downscaling. For example, the number of pixels included in the image is reduced by reducing a frame of 640 (horizontal direction) × 480 (vertical direction) to a frame of 320 (horizontal direction) × 240 (vertical direction). In this case, a collection of 2 (horizontal direction) × 2 (vertical direction) DCT blocks before downscaling is one DCT block after downscaling. The simplest downscaling involves decoding the image code to obtain a decoded image, and re-encoding the decoded image. When re-encoding, the motion vector obtained when the image code is decoded may be reused.

ところで、ストリーミングは、同時に多数のストリーミングクライアントが行う。従って、ストリーミングサーバは、同時に多数のストリーミングクライアントにストリーミングデータを送信する必要がある。そして、ストリーミングクライアントは上記のように多種あり、それに応じてストリーミングデータのビットレートも多種ある。従って、ストリーミングサーバは、多種のビットレートのストリーミングデータを同時に生成するために、多数のトランスコーディングを同時に行わなければならない。   By the way, streaming is simultaneously performed by many streaming clients. Therefore, the streaming server needs to transmit streaming data to a large number of streaming clients at the same time. There are various types of streaming clients as described above, and accordingly, there are also various bit rates of streaming data. Therefore, the streaming server must perform a large number of transcodings simultaneously in order to simultaneously generate various bit rate streaming data.

原始的なトランスコーディングの方法を利用した場合には、全てのデコード処理及び全てのエンコード処理が必要であるので、大量の処理を必要とする。   When the primitive transcoding method is used, all the decoding processes and all the encoding processes are necessary, so that a large amount of processes are required.

また、例えば、Pピクチャの間引きを行うトランスコーディング、IピクチャのPピクチャへの変換を行うトランスコーディング、ダウンスケーリングを行うトランスコーディングは、動き補償予測を行うために動き予測ベクトルをマクロブロック毎に必要とする。そして、トランスコーディング前の動き予測ベクトルをトランスコーディング後のマクロブロックに再利用できる場合もあるが、できない場合もある。トランスコーディング前の動き予測ベクトルをトランスコーディング後のマクロブロックに再利用できない場合には、動き予測ベクトルの生成は大量の演算を必要とするので、このようなトランスコーディングは演算量が非常に多い。従って、1つのストリーミングサーバでCPUを用いて多数のこれらの種類のトランスコーディングをすることは、現在のCPU能力を考えると殆ど不可能である。量子化スケールの調整を行うトランスコーディングは、Pピクチャの間引きを行うトランスコーディング、IピクチャのPピクチャへの変換を行うトランスコーディング、ダウンスケーリングを行うトランスコーディングに比べて、必要とする演算量が少ないが、このトランスコーディングを用いた場合であっても、1つのストリーミングサーバでCPUを用いて多数のこの種類のトランスコーディングをすることは、現在のCPU能力を考えると非常に困難である。特に、将来は、同時にストリーミングを行うストリーミングクライアントの数が増大することが予測されるので、この問題が深刻となることが予測される。   Also, for example, transcoding for thinning out P pictures, transcoding for converting I pictures to P pictures, and transcoding for downscaling require motion prediction vectors for each macroblock in order to perform motion compensation prediction. And In some cases, a motion prediction vector before transcoding can be reused in a macroblock after transcoding, but in some cases, it cannot. When the motion prediction vector before transcoding cannot be reused for the macroblock after transcoding, since the generation of the motion prediction vector requires a large amount of computation, such transcoding has a large amount of computation. Therefore, it is almost impossible to perform a large number of these types of transcoding using a CPU in one streaming server in view of the current CPU capability. Transcoding that adjusts the quantization scale requires less computation than transcoding that thins out P pictures, transcoding that converts I pictures to P pictures, and transcoding that performs downscaling. However, even when this transcoding is used, it is very difficult to perform a large number of this kind of transcoding using a CPU in one streaming server in view of the current CPU capability. In particular, since the number of streaming clients that simultaneously perform streaming is expected to increase in the future, this problem is expected to become serious.

また、量子化スケールを調整することにより、符号量を削減するトランスコーディングでは、同一のマクロブロック内の全てのDCTブロックの全てのDCT係数が一律に粗く量子化されることとなるので、画質が劣化する。Pピクチャを間引くことにより、符号量を削減するトランスコーディングでは、フレームレートが落ちるので、動きがぎくしゃくして、画質が劣化する。IピクチャをPピクチャに変換することにより、符号量を削減するトランスコーディングでは、エラー耐性が弱くなるので、僅かなエラーが発生しただけでも、画質が劣化する。ダウンスケーリングを行うことにより符号量を削減するトランスコーディングでは、画面が小さくなるので、解像度が落ちて、画質が劣化する。   Also, in transcoding that reduces the amount of code by adjusting the quantization scale, all DCT coefficients of all DCT blocks in the same macroblock are uniformly coarsely quantized. to degrade. In transcoding that reduces the amount of code by thinning out P-pictures, the frame rate is lowered, so the motion becomes jerky and the image quality deteriorates. In transcoding that reduces the amount of code by converting an I picture to a P picture, error resistance is weakened, so even if a slight error occurs, the image quality deteriorates. In transcoding that reduces the amount of code by performing downscaling, the screen becomes smaller, so the resolution is lowered and the image quality is degraded.

本発明は、上記の問題点に鑑みてなされたものであり、演算量が少なく且つ一定の画質を維持できるトランスコーダ及びトランスコーディング方法を提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a transcoder and a transcoding method that can reduce the amount of calculation and maintain a constant image quality.

本発明によれば、第1の画像符号を復号して画像の各符号化ブロックの周波数成分を得る復号手段と、複数の符号化ブロックを再符号化したときに該複数の符号化ブロック当たりの符号量が減少するように、各符号化ブロックの非ゼロの周波数成分の全て又は一部の振幅を減少し又はゼロにする振幅減少手段と、前記振幅減少手段により振幅がゼロになった周波数成分のうちのある周波数成分の振幅を所定の非ゼロに増加した場合における、その周波数成分が属するブロック当たりの総符号量が、増加する前における、その周波数成分が属するブロック当たりの総符号量よりも少なくなるか否かを判断し、その判断結果が肯定的である場合には、その周波数成分の振幅を前記所定の非ゼロ値に増加する振幅増加手段と、前記振幅減少手段及び前記振幅増加手段により処理された各ブロックの周波数成分を再符号化して第2の画像符号を得る再符号手段と、を備える画像符号のトランスコーダであって、前記振幅減少手段は、全て又は一部の周波数成分を1よりも大きい整数で除算し、その商を切り捨てて整数化し、整数化の結果を前記整数で乗算することを特徴とする画像符号のトランスコーダが提供される。 According to the present invention, a decoding means for obtaining a frequency component of each encoded block of an image by decoding the first image coding, the coded block per the plurality of when re-encoding a plurality of coded blocks Amplitude reducing means for reducing or zeroing all or part of the non-zero frequency components of each coding block so that the code amount is reduced, and a frequency component whose amplitude is zero by the amplitude reducing means When the amplitude of a certain frequency component is increased to a predetermined non-zero, the total code amount per block to which the frequency component belongs is larger than the total code amount per block to which the frequency component belongs before the increase. If the determination result is affirmative, the amplitude increasing means for increasing the amplitude of the frequency component to the predetermined non-zero value, the amplitude decreasing means, Serial An image code transcoder comprising a recoding unit, the obtaining a second image code to re-encode the frequency component of each block processed by the augmentation means, said amplitude reducing means, all or a single There is provided an image code transcoder characterized by dividing a frequency component of a part by an integer larger than 1, rounding down the quotient to make an integer, and multiplying the integer by the integer.

上記の画像符号のトランスコーダにおいて、前記第1の画像符号の量から前記第2の画像符号の量への削減率を計測する計測手段と、計測された前記削減率が目標削減率になるように、前記整数を変化させる制御手段と、を更に備えるようにしてもよい。   In the above-described image code transcoder, measurement means for measuring a reduction rate from the amount of the first image code to the amount of the second image code, and the measured reduction rate become a target reduction rate And a control means for changing the integer.

本発明によれば、各DCTブロックのDCT係数の振幅を削減し又はゼロにすることによりトランスコーディングを行うので、トランスコーディングのための演算量を削減することができ、従って、コンピュータが同時に多数のトランスコーディングを行うことが可能となる。   According to the present invention, since transcoding is performed by reducing or reducing the DCT coefficient amplitude of each DCT block to zero, it is possible to reduce the amount of computation for transcoding. Transcoding can be performed.

また、本発明によれば、単に各DCTブロックのDCT係数のうちの高域成分を無くすような方法を採らずに、DCT係数の振幅があまり変動しないようにしているので、トランスコーディングされた画像符号からビットレート相応の復号画像を得ることが可能となる。   Further, according to the present invention, the amplitude of the DCT coefficient does not fluctuate so much without adopting a method of simply eliminating the high frequency component of the DCT coefficient of each DCT block. A decoded image corresponding to the bit rate can be obtained from the code.

以下、図面を参照して本発明を実施するための最良の形態について詳細に説明する。   The best mode for carrying out the present invention will be described below in detail with reference to the drawings.

図1は、本発明の実施形態によるトランスコーダの構成を示す。図2は、本発明の実施形態によるトランスコーダの入出力信号のフォーマットを示す。図1に示すトランスコーダは、図2に示すフォーマットの原プログラムストリーム151を入力し、これをトランスコードして、図2に示すフォーマットのトランスコーディドプログラムストリーム161を出力する。プログラムストリームは、MPEG2の規格で定められたものである。図2を参照すると明らかなように、トランスコーディドプログラムストリーム161は、原プログラムストリーム151と比較すると、スライス(スライス1〜6)が短くなっている点が相違し、他の部分は同一である。   FIG. 1 shows the configuration of a transcoder according to an embodiment of the present invention. FIG. 2 shows a format of an input / output signal of a transcoder according to an embodiment of the present invention. The transcoder shown in FIG. 1 receives the original program stream 151 in the format shown in FIG. 2, transcodes it, and outputs a transcoded program stream 161 in the format shown in FIG. The program stream is defined by the MPEG2 standard. As apparent from FIG. 2, the transcoded program stream 161 is different from the original program stream 151 in that the slices (slices 1 to 6) are shorter, and the other parts are the same. .

図1を参照すると、本発明の実施形態によるトランスコーダは、ビデオPES(Packetized Elementary Stream)検出部101、ビデオPESトランスコーダ102、トランスコーディドビデオPESFIFO103、PESカウンタ104、原プログラムストリームFIFO105、Dタイプフリップフロップ106、減算器107、比較器108、ラッチ109、トランスコーディドビデオPESカウンタ110、比較器111、立ち上がり検出回路112、RSフリップフロップ113、マルチプレクサ114を備える。   Referring to FIG. 1, a transcoder according to an embodiment of the present invention includes a video PES (Packetized Elementary Stream) detection unit 101, a video PES transcoder 102, a transcoded video PES FIFO 103, a PES counter 104, an original program stream FIFO 105, and a D type. A flip-flop 106, a subtractor 107, a comparator 108, a latch 109, a transcoded video PES counter 110, a comparator 111, a rising edge detection circuit 112, an RS flip-flop 113, and a multiplexer 114 are provided.

ビデオPES検出部101は、主に原プログラムストリーム151のうちのビデオPESの検出を行う。ビデオPES検出部101は、原プログラムストリーム151を入力し、原プログラムストリーム151、原プログラムストリーム151のうちのビデオPESを検出した部分でアクティブになるビデオPESイネーブル信号171、原プログラムストリーム151からPESスタートコード検出信号を検出した時にアクティブになるPESスタートコード検出信号及び原プログラムストリーム151のうちのビデオPESの末部を検出したときにアクティブとなるビデオPES末部検出信号173を出力する。   The video PES detection unit 101 mainly detects a video PES in the original program stream 151. The video PES detection unit 101 receives the original program stream 151, starts the PES from the original program stream 151, the video PES enable signal 171 that becomes active when the video PES is detected in the original program stream 151, and the original program stream 151. A PES start code detection signal that becomes active when the code detection signal is detected and a video PES end detection signal 173 that becomes active when the end of the video PES in the original program stream 151 is detected are output.

ビデオPESトランスコーダ102は、ビデオPES内の各スライスに含まれる各DCTブロック当たりの画像符号の量を削減する。この削減により、各スライスが短くなり、また、各ビデオPESが短くなる。このように短くされたビデオPESがトランスコーディドビデオPES152である。ビデオPESトランスコーダ102は、原プログラムストリーム151、ビデオPESイネーブル信号171、ビデオPES末部検出信号173及び削減率指示信号176を入力し、トランスコーディドビデオPES152、ビデオPES末部検出信号173及びトランスコーディドビデオPESイネーブル信号174を出力する。トランスコーディドビデオPESイネーブル信号174は、ビデオPESトランスコーダ102が有効なトランスコーディドビデオPES152を出力しているときにアクティブとなる信号である。ビデオPESトランスコーダ102の入出力信号のタイミング図を図3に示す。ビデオPESイネーブル信号171は、ビデオPES(ビデオPES1、ビデオPES2、ビデオPES3)の部分でアクティブとなる。ビデオPES末部検出信号173は、ビデオPES(ビデオPES1、ビデオPES2、ビデオPES3)の末部でアクティブとなる。トランスコーディドビデオPES152は、原プログラムストリーム中のビデオPESと比較すると、各スライス(スライス1’、・・・スライス6’)が短くなっている点において相違する。トランスコーディドビデオPESイネーブル信号174は、トランスコーディドビデオPESの各スライスのうちの有効な画像符号が含まれている部分及びスライス以外の部分(ユーザデータ1、ユーザデータ2、ユーザデータ3)でアクティブとなる。ビデオPESトランスコーダ102の構成及び動作の詳細な説明は後にする。   The video PES transcoder 102 reduces the amount of image codes per DCT block included in each slice in the video PES. This reduction shortens each slice and shortens each video PES. The video PES shortened in this way is the transcoded video PES 152. The video PES transcoder 102 receives the original program stream 151, the video PES enable signal 171, the video PES end detection signal 173, and the reduction rate instruction signal 176, and receives the transcoded video PES 152, the video PES end detection signal 173, and the transformer. A coded video PES enable signal 174 is output. The transcoded video PES enable signal 174 is a signal that becomes active when the video PES transcoder 102 outputs a valid transcoded video PES 152. A timing diagram of input / output signals of the video PES transcoder 102 is shown in FIG. The video PES enable signal 171 becomes active in the video PES (video PES1, video PES2, and video PES3) portions. The video PES end detection signal 173 becomes active at the end of the video PES (video PES1, video PES2, video PES3). The transcoded video PES 152 differs from the video PES in the original program stream in that each slice (slice 1 ', ... slice 6') is shorter. The transcoded video PES enable signal 174 is a portion including a valid image code in each slice of the transcoded video PES and a portion other than the slice (user data 1, user data 2, user data 3). Become active. A detailed description of the configuration and operation of the video PES transcoder 102 will be given later.

図1に戻ると、トランスコーディドビデオPESFIFO103は、トランスコーディドビデオPESイネーブル信号174をライトイネーブル(WEN)として使用することにより、有効なトランスコーディドビデオPES及びビデオPES末部検出信号173のみを一時記憶し、RSフリップフロップ113が出力するマルチプレクス制御信号(後述)に従って、これらを出力する。従って、トランスコーディドビデオPESFIFO103は、ビデオPESのうちの画像符号のないスライス末部を除去する機能と、トランスコーディドビデオPESを可変遅延する機能を有する。   Returning to FIG. 1, the transcoded video PESFIFO 103 uses only the transcoded video PES enable signal 174 as a write enable (WEN), so that only the valid transcoded video PES and the video PES end detection signal 173 are received. These are temporarily stored and output according to a multiplex control signal (described later) output from the RS flip-flop 113. Therefore, the transcoded video PESFIFO 103 has a function of removing the end of the slice without the image code in the video PES and a function of variably delaying the transcoded video PES.

PESカウンタ104は、PESスタートコード検出信号172を入力し、これをカウントした値を示すPESカウント175を出力する。   The PES counter 104 receives the PES start code detection signal 172, and outputs a PES count 175 indicating the counted value.

原プログラムストリームFIFO105は、ビデオPESイネーブル信号171の反転信号をライトイネーブル(WEN)信号として入力し、この反転信号に従って、原プログラムストリーム151及びPESカウント175を一時記憶する。従って、図4に示すように、原プログラムストリームFIFO105は、原プログラムストリーム151のうちビデオPES以外のPES(ユーザデータPES1、オーディオPES1、オーディオPES2)及びビデオPES以外のPESに対応したPESカウント(n、n+3、n+4)を一時記憶する。原プログラムストリームFIFO105は、RSフリップフロップ113が出力するマルチプレクス制御信号(後述)に従って、一時記憶したデータを出力する。従って、原プログラムストリームFIFO105は、原プログラムストリーム151のうちのビデオPESを除去する機能と、ビデオPESが除去された原プログラムストリーム151を可変遅延する機能を有する。   The original program stream FIFO 105 receives an inverted signal of the video PES enable signal 171 as a write enable (WEN) signal, and temporarily stores the original program stream 151 and the PES count 175 according to the inverted signal. Therefore, as shown in FIG. 4, the original program stream FIFO 105 includes a PES count (n) corresponding to a PES other than the video PES (user data PES1, audio PES1, audio PES2) and a PES other than the video PES in the original program stream 151. , N + 3, n + 4) are temporarily stored. The original program stream FIFO 105 outputs temporarily stored data according to a multiplex control signal (described later) output from the RS flip-flop 113. Therefore, the original program stream FIFO 105 has a function of removing the video PES from the original program stream 151 and a function of variably delaying the original program stream 151 from which the video PES has been removed.

Dタイプフリップフロップ106、減算器107、比較器108、ラッチ109、トランスコーディドビデオPESカウンタ110、比較器111、立ち上がり検出回路112及びRSフリップフロップ113は、前述のマルチプレクス制御信号(マルチプレクサ114を制御すると共に、トランスコーディドビデオPESFIFO103のリードイネーブル(REN)及び原プログラムストリームFIFO105のリードイネーブル(REN)を制御する信号)を発生するために用意されている。これらのタイミング図を図5に示す。   The D-type flip-flop 106, the subtractor 107, the comparator 108, the latch 109, the transcoded video PES counter 110, the comparator 111, the rise detection circuit 112, and the RS flip-flop 113 are connected to the multiplex control signal (the multiplexer 114). And a signal for controlling the read enable (REN) of the transcoded video PESFIFO 103 and the read enable (REN) of the original program stream FIFO 105). These timing diagrams are shown in FIG.

まず、原プログラムストリームFIFO105のRENがアクティブであるので、原プログラムストリームFIFO105から値がnであるPESカウント及びユーザデータPES1が出力される。ユーザデータPES1が終了すると、PESカウントの値はnからn+3に変化し、従って、減算器107からは3が出力され、比較器108の出力はHIGHとなり、ラッチ109には3がラッチされ、トランスコーディドビデオPESカウンタ110には「1」がロードされ、RSフリップフロップ113はリセットされる。   First, since the REN of the original program stream FIFO 105 is active, the PES count having the value n and the user data PES1 are output from the original program stream FIFO 105. When the user data PES1 is completed, the value of the PES count changes from n to n + 3. Therefore, 3 is output from the subtractor 107, the output of the comparator 108 is HIGH, 3 is latched in the latch 109, The coded video PES counter 110 is loaded with “1”, and the RS flip-flop 113 is reset.

RSフリップフロップ113がリセットされるので、原プログラムストリームFIFO105からのユーザデータ1の読出は停止し、トランスコーディドビデオPESFIFO103からビデオPES1’が読み出される。また、マルチプレクサ114の出力は、ユーザデータPES1からビデオPES1’に切り替わる。ビデオPES1’の末部では、トランスコーディドビデオPESFIFO103から読み出されるビデオPES末部検出信号がHIGHとなるので、トランスコーディドビデオPESカウンタ110のカウント値が1から2に増加する。続いて、トランスコーディドビデオPESFIFO103からビデオPES2’が読み出される。ビデオPES2’の末部では、トランスコーディドビデオPESFIFOから読み出されるビデオ末部検出信号が再度HIGHとなるので、トランスコーディドビデオPESカウンタ110のカウント値が2から3に増加する。   Since the RS flip-flop 113 is reset, the reading of the user data 1 from the original program stream FIFO 105 is stopped, and the video PES 1 ′ is read from the transcoded video PES FIFO 103. Further, the output of the multiplexer 114 is switched from the user data PES1 to the video PES1 '. At the end of the video PES 1 ′, the video PES end detection signal read from the transcoded video PESFIFO 103 becomes HIGH, so that the count value of the transcoded video PES counter 110 increases from 1 to 2. Subsequently, the video PES 2 ′ is read from the transcoded video PES FIFO 103. At the end of the video PES 2 ′, the video end detection signal read from the transcoded video PESFIFO becomes HIGH again, so that the count value of the transcoded video PES counter 110 increases from 2 to 3.

トランスコーディドビデオPESカウンタ110のカウント値が3になると、この値とラッチ109が保持している値3とが等しくなるので、比較器111の出力はアクティブ(HIGH)となる。立ち上がり検出回路112は、比較器111の出力の変化を検出し、RSフリップフロック113のセット信号を発生する。従って、この時にRSフリップフロップ113はセットされるので、トランスコーディドビデオPESFIFO103からのビデオPES2’の読出は停止し、原プログラムストリームFIFO105からオーディオPES1が読み出される。また、マルチプレクサ114の出力は、ビデオPES2’からオーディオPES1に切り替わる。   When the count value of the transcoded video PES counter 110 becomes 3, this value and the value 3 held by the latch 109 become equal, so the output of the comparator 111 becomes active (HIGH). The rise detection circuit 112 detects a change in the output of the comparator 111 and generates a set signal for the RS flip-flop 113. Therefore, since the RS flip-flop 113 is set at this time, reading of the video PES 2 ′ from the transcoded video PES FIFO 103 is stopped, and the audio PES 1 is read from the original program stream FIFO 105. Further, the output of the multiplexer 114 is switched from the video PES 2 'to the audio PES1.

オーディオデータPES1が終了すると、PESカウントの値はn+3からn+4に変化し、従って、減算器107からは1が出力されるが、比較器108の出力はLOWのままである。従って、ラッチ109は3をラッチしたままであり、トランスコーディドビデオPESカウンタ110のカウントは「3」のままであり、RSフリップフロップ113はセットされたままである。従って、次に原プログラムストリームFIFO105からオーディオPES2が読み出される。   When the audio data PES1 is completed, the value of the PES count changes from n + 3 to n + 4. Therefore, although 1 is output from the subtractor 107, the output of the comparator 108 remains LOW. Accordingly, the latch 109 remains latched 3, the count of the transcoded video PES counter 110 remains “3”, and the RS flip-flop 113 remains set. Accordingly, the audio PES2 is read from the original program stream FIFO 105 next.

これ以降の動作は上記と同様であるので、その説明を省略する。   Since the subsequent operation is the same as described above, the description thereof is omitted.

このような動作により、マルチプレクサ114から図2に示すようなフォーマットのトランスコーディドプログラムストリーム161が出力される。なお、トランスコーディドビデオPESFIFO103及び原プログラムストリームFIFO105の読出クロックをこれらの書き込みクロックよりも遅くすることにより、ビットレートの低減が可能となる。   With such an operation, the multiplexer 114 outputs a transcoded program stream 161 having a format as shown in FIG. The bit rate can be reduced by making the read clocks of the transcoded video PES FIFO 103 and the original program stream FIFO 105 slower than these write clocks.

次に、ビデオPESトランスコーダ102について詳細に説明する。   Next, the video PES transcoder 102 will be described in detail.

図6は、ビデオPESトランスコーダ102の構成の一例を示す。図6を参照すると、ビデオPESトランスコーダ102は、スライス検出部121、可変長復号器122、DCT係数変更部123、マルチプレクサ124、可変長符号器125、論理積ゲート126及び符号量制御部127を備える。   FIG. 6 shows an example of the configuration of the video PES transcoder 102. Referring to FIG. 6, the video PES transcoder 102 includes a slice detector 121, a variable length decoder 122, a DCT coefficient changing unit 123, a multiplexer 124, a variable length encoder 125, a logical product gate 126, and a code amount control unit 127. Prepare.

スライス検出部121は、原プログラムストリーム151及びビデオPESイネーブル信号171を入力し、ビデオPESからビデオスタートコード及びスライスを検出し、原プログラムストリーム151、ビデオPESイネーブル信号171、ビデオスタートコード検出信号180及びスライスイネーブル信号189を出力する。ビデオスタートコード検出信号180は、スライス検出部121が出力する原プログラムストリーム151のうちのビデオスタートコードがある部分でアクティブとなる信号である。ビデオスタートコードとは、ピクチャスタートコード(00H)、スライススタートコード(01H〜AFH)等の00H〜B8Hの値をとるスタートコードである。スライスイネーブル信号189は、スライス検出部121が出力する原プログラムストリーム151のうちのスライスの部分でアクティブとなる信号である。   The slice detector 121 receives the original program stream 151 and the video PES enable signal 171, detects a video start code and slice from the video PES, and detects the original program stream 151, the video PES enable signal 171, the video start code detection signal 180, and A slice enable signal 189 is output. The video start code detection signal 180 is a signal that becomes active in a portion where the video start code is present in the original program stream 151 output from the slice detection unit 121. The video start code is a start code having a value of 00H to B8H such as a picture start code (00H) and a slice start code (01H to AFH). The slice enable signal 189 is a signal that becomes active in the slice portion of the original program stream 151 output from the slice detection unit 121.

可変長復号器122は、原プログラムストリーム151、ビデオPESイネーブル信号171、ビデオスタートコード検出信号180及びスライスイネーブル信号189を入力し、ビデオPES内の可変長符号を復号し、各DCTブロックのDCT係数を含む変更前復号データ181を出力する。   The variable length decoder 122 receives the original program stream 151, the video PES enable signal 171, the video start code detection signal 180, and the slice enable signal 189, decodes the variable length code in the video PES, and outputs the DCT coefficient of each DCT block. The pre-change decoded data 181 including is output.

DCT係数変更部123は、可変長復号データ181のうちの各DCTブロックのDCT係数を入力し、各DCTブロックのDCT係数の全て又は一部については、振幅を減少させ又はゼロにして出力し、振幅を減少させ又はゼロにしないDCT係数については、そのまま出力する。また、DCT係数変更部123は、係数変更信号188の値により、DCT係数を減少させ又はゼロにする程度を変化させる。DCT係数変更部123が行うDCT係数の減少化又はゼロ化の方法については、後に詳しく説明する。   The DCT coefficient changing unit 123 receives the DCT coefficient of each DCT block in the variable length decoded data 181 and outputs all or part of the DCT coefficients of each DCT block with the amplitude reduced or zero. A DCT coefficient whose amplitude is not reduced or made zero is output as it is. Further, the DCT coefficient changing unit 123 changes the degree of reducing or reducing the DCT coefficient to zero according to the value of the coefficient changing signal 188. A method of reducing or zeroing the DCT coefficient performed by the DCT coefficient changing unit 123 will be described in detail later.

マルチプレクサ124は、DCT係数変更部123から各DCTブロックのDCT係数を入力し、可変長復号器122からDCT係数以外のデータを入力し、これらの入力したデータをマルチプレクスして、出力する。   The multiplexer 124 receives the DCT coefficient of each DCT block from the DCT coefficient changing unit 123, receives data other than the DCT coefficient from the variable length decoder 122, multiplexes the input data, and outputs the multiplexed data.

可変長符号器125は、マルチプレクサ124でマルチプレクスされたデータを可変長符号化して、可変長符号をトランスコーディドビデオPES152として出力する。この可変長符号化は、各DCTブロックのDCT係数の可変長符号化も含む。また、可変長符号器125は、出力するトランスコーディドビデオPES152の各バイトが有効であるか否かを示すトランスコーディドビデオPESイネーブル信号174も出力する。図3に示すトランスコーディドビデオPESイネーブル信号174はスライスの始点から途中まで連続してアクティブであるが、これは、可変長符号器125がスライス内でスライスの先頭から連続して可変長符号を生成した場合のものである。DCT係数変更部123で各DCTブロックのDCT係数が削減され又はゼロにされているので、スライスの途中から末部までは、可変長符号が生成されず、それに対応して、この部分でトランスコーディドビデオPESイネーブル信号174は非アクティブとなる。なお、可変長符号器125が断続的に可変長符号を生成してもよく、この場合には、トランスコーディドビデオPESイネーブル信号174も断続的にアクティブとなる。   The variable length encoder 125 performs variable length encoding on the data multiplexed by the multiplexer 124 and outputs the variable length code as the transcoded video PES 152. This variable length coding also includes variable length coding of the DCT coefficients of each DCT block. The variable length encoder 125 also outputs a transcoded video PES enable signal 174 indicating whether each byte of the output transcoded video PES 152 is valid. The transcoded video PES enable signal 174 shown in FIG. 3 is continuously active from the start point to the middle of the slice. This is because the variable length encoder 125 continuously outputs the variable length code in the slice from the beginning of the slice. This is the case when it is generated. Since the DCT coefficient of each DCT block is reduced or zeroed by the DCT coefficient changing unit 123, a variable-length code is not generated from the middle to the end of the slice. The video PES enable signal 174 becomes inactive. Note that the variable length encoder 125 may intermittently generate a variable length code, and in this case, the transcoded video PES enable signal 174 is also intermittently activated.

論理積ゲート186は、画像符号イネーブル信号185の反転信号及びビデオPESイネーブル信号171の論理積をとり、この論理積を画像符号ディスエーブル信号186として出力する。   The logical product gate 186 takes the logical product of the inverted signal of the image code enable signal 185 and the video PES enable signal 171 and outputs the logical product as the image code disable signal 186.

図7を参照すると、符号量制御部127は、画像符号イネーブル時間計測部201、画像符号ディスエーブル時間計測部202、削減率計測部203及び係数変更信号調整部204を備える。画像符号イネーブル時間計測部201は、画像符号イネーブル信号185を入力し、この信号がアクティブである時間の累積値T1を計測する。画像符号ディスエーブル時間計測部202は、画像符号ディスエーブル信号186を入力し、この信号がアクティブである時間の累積値T2を計測する。削減率計測部203は、計測削減率Rを、次式、
R=T2/(T1+T2)
により求め、これを示す計測削減率信号213を出力する。係数変更信号調整部204は、削減率指示信号176及び計測削減率信号213を入力し、計測削減率信号213により示される計測削減率Rが削減率指示信号176により示され目標削減率になるように、係数変更信号188の値を変化させる。
Referring to FIG. 7, the code amount control unit 127 includes an image code enable time measurement unit 201, an image code disable time measurement unit 202, a reduction rate measurement unit 203, and a coefficient change signal adjustment unit 204. The image code enable time measuring unit 201 receives the image code enable signal 185 and measures the accumulated value T1 of the time during which this signal is active. The image code disable time measuring unit 202 receives the image code disable signal 186 and measures the accumulated value T2 of the time during which this signal is active. The reduction rate measuring unit 203 calculates the measurement reduction rate R by the following equation:
R = T2 / (T1 + T2)
And a measurement reduction rate signal 213 indicating this is output. The coefficient change signal adjustment unit 204 receives the reduction rate instruction signal 176 and the measurement reduction rate signal 213 so that the measurement reduction rate R indicated by the measurement reduction rate signal 213 becomes the target reduction rate indicated by the reduction rate instruction signal 176. Then, the value of the coefficient change signal 188 is changed.

次に、DCT係数変更部123の行うDCT係数を削減又はゼロ化する方法に詳細に説明する。   Next, a method for reducing or zeroing the DCT coefficient performed by the DCT coefficient changing unit 123 will be described in detail.

DCT係数変更部123は、入力した各DCTブロックのDCT係数を、再符号化したときにDCTブロック当たりの符号量が少なくなるように、変更する。変更の方法としては、例えば、以下に示す(1)〜(7)の方法を用いる。すなわち、DCT係数変更部123は、(1)〜(7)のいずれかの方法を用いることにより、入力した非ゼロDCT係数の全て又は一部の振幅をより小さい振幅に減少させ、又は0にして、これにより各DCTブロックあたりの符号量を削減する。   The DCT coefficient changing unit 123 changes the input DCT coefficient of each DCT block so that the code amount per DCT block is reduced when re-encoding. As a changing method, for example, the following methods (1) to (7) are used. That is, the DCT coefficient changing unit 123 reduces the amplitude of all or part of the input non-zero DCT coefficient to a smaller amplitude or sets it to 0 by using any one of the methods (1) to (7). Thus, the code amount per DCT block is reduced.

(1)各DCTブロックのDCT係数に低域通過フィルタをかけて、高域のDCT係数の振幅を減らし又はゼロにする。   (1) A low-pass filter is applied to the DCT coefficient of each DCT block to reduce or zero the amplitude of the high-frequency DCT coefficient.

例えば、図8に示すような周波数特性を有する2次元低域通過フィルタを用意する。この2次元低域通過フィルタの周波数特性は、4つの周波数領域(領域A、領域B、領域C及び領域D)に分割されている。各周波数領域のゲインは、1(領域A)、3/4(領域B)、2/4(領域C)又は1/4(領域D)である。2次元低域通過フィルタは、各DCT係数にこのゲインを乗じて、整数化のために切り捨てる。この2次元フィルタを例えば図9の左に示すDCT係数f(i、j)に適用すると、図9の右に示すDCT係数F(i、j)が得られる。この2次元低域通過フィルタをかけると、非ゼロDCT係数f(i、j)のうちのf(2、3)=1はF(2、3)=0に変化するが、他の非ゼロ係数f(i、j)はゼロにはならずに振幅が減少する。   For example, a two-dimensional low-pass filter having frequency characteristics as shown in FIG. 8 is prepared. The frequency characteristic of the two-dimensional low-pass filter is divided into four frequency regions (region A, region B, region C, and region D). The gain in each frequency domain is 1 (area A), 3/4 (area B), 2/4 (area C), or 1/4 (area D). The two-dimensional low-pass filter multiplies each DCT coefficient by this gain and rounds it down for integerization. When this two-dimensional filter is applied to, for example, the DCT coefficient f (i, j) shown on the left in FIG. 9, a DCT coefficient F (i, j) shown on the right in FIG. 9 is obtained. When this two-dimensional low-pass filter is applied, f (2,3) = 1 of nonzero DCT coefficients f (i, j) changes to F (2,3) = 0, but other nonzero The coefficient f (i, j) does not become zero, but the amplitude decreases.

2次元分布するDCT係数は、図10に示すようなジグザグスキャンにより1次元のDCT係数に並べられる。すなわち、DCT係数は、f(0、0)、f(0、1)、f(1、0)、f(2、0)、f(1、1)、f(0、2)、..、.f(7、7)の順に一次元的に並べられる。そしてこれらのDCT係数は、非ゼロのDCT係数の振幅(レベル)とこのように並べられたときに非ゼロのDCT係数に先行するゼロのDCT係数の連続個数(ゼロランレングス)をペアとして符号化される。レベルとゼロランレングスの各ペアには発生頻度に応じた長さの可変長符号が割り当てられる。各ペアのレベルとゼロランレングスの組み合わせと可変長符号の長さの関係は、図11及び図12に示すようになる。図11は、非イントラブロック及びintra_vlc_format=0のイントラブロックについてのものであり、図12は、intra_vlc_format=1のイントラブロックについてのものである。ただし、図11及び図12はレベルとゼロランレングスの全ての組み合わせのうち一部についてのみレベルとゼロランレングスの組み合わせと可変長符号の長さの関係を示している。   The two-dimensionally distributed DCT coefficients are arranged in a one-dimensional DCT coefficient by zigzag scanning as shown in FIG. That is, the DCT coefficients are f (0, 0), f (0, 1), f (1, 0), f (2, 0), f (1, 1), f (0, 2),. . ,. They are arranged one-dimensionally in the order of f (7, 7). These DCT coefficients are coded by pairing the amplitude (level) of the non-zero DCT coefficient and the continuous number of zero DCT coefficients (zero run length) preceding the non-zero DCT coefficient when arranged in this way. It becomes. A variable length code having a length corresponding to the occurrence frequency is assigned to each pair of level and zero run length. The relationship between the level of each pair, the combination of zero run length, and the length of the variable length code is as shown in FIGS. FIG. 11 is for a non-intra block and an intra block with intra_vlc_format = 0, and FIG. 12 is for an intra block with intra_vlc_format = 1. However, FIG. 11 and FIG. 12 show the relationship between the combination of level and zero run length and the length of the variable length code for only a part of all combinations of level and zero run length.

図9に示すブロックがintra_vlc_format=1のイントラブロックであるとした場合、このような符号化を2次元低域通過フィルタをかける前のf(i、j)に対して行うと、図9の左側の2次元マトリックスにおいて、例えば、DCT係数f(1、1)の振幅(レベル)は1であり、対応するゼロランレングスは図10のジグザグスキャンによりゼロをカウントすると3であり、対応する符号長は図12の可変長符号長の表においてレベル1とゼロランレングス3における値である6となる。   If the block shown in FIG. 9 is an intra block of intra_vlc_format = 1, if such encoding is performed on f (i, j) before applying the two-dimensional low-pass filter, the left side of FIG. In the two-dimensional matrix, for example, the amplitude (level) of the DCT coefficient f (1, 1) is 1, and the corresponding zero run length is 3 when zero is counted by the zigzag scan of FIG. Is 6 which is a value at level 1 and zero run length 3 in the variable length code length table of FIG.

他のDCT係数の振幅に対応するゼロランレングスと符号長も図9の左側の2次元マトリックスの下に示すように求められる。従って、EOB(End Of Block)を除いたブロック当たりの符号長は123ビットとなる。   Zero run lengths and code lengths corresponding to the amplitudes of other DCT coefficients are also obtained as shown below the two-dimensional matrix on the left side of FIG. Accordingly, the code length per block excluding EOB (End Of Block) is 123 bits.

一方、図9に示すブロックがintra_vlc_format=1のイントラブロックであるとした場合、このような符号化を2次元低域通過フィルタをかけた後のDCT係数F(i、j)に対して行うと、図9の右側の2次元マトリックスの下に示すように符号長が求められ、EOBを除いたブロック当たりの符号長は109ビットとなる。   On the other hand, when the block shown in FIG. 9 is an intra block of intra_vlc_format = 1, when such encoding is performed on the DCT coefficient F (i, j) after the two-dimensional low-pass filter is applied. The code length is determined as shown below the two-dimensional matrix on the right side of FIG. 9, and the code length per block excluding EOB is 109 bits.

従って、intra_vlc_format=1のイントラブロックの場合には、図9に示すように、各非ゼロDCT係数とそれに先行するゼロラングレングスを図10に示すジグザグスキャンに沿って2次元ハフマン符号化したときのDCTブロックあたりの符号量は、2次元フィルタをかける前では123ビットであるが、2次元フィルタをかけた後では109ビットに削減される。   Accordingly, in the case of an intra block of intra_vlc_format = 1, as shown in FIG. 9, when each non-zero DCT coefficient and the preceding zero run length are two-dimensionally Huffman encoded along the zigzag scan shown in FIG. The code amount per DCT block is 123 bits before the two-dimensional filter is applied, but is reduced to 109 bits after the two-dimensional filter is applied.

(2)各DCTブロックのDCT係数の振幅を1よりも大きい整数で除算し、その商を切り捨てて整数化し、整数化の結果をその整数で乗算する。つまり、切り捨て前の振幅をAmp1、切り捨て後の振幅をAmp2としたときに、
Amp2=int(Amp1/n)×n
ただし、nは1よりも大きい整数
とする。nの値をDCT係数の周波数毎に変えても良く、例えば、nの値をDCT係数の周波数が高いほど大きくしても良い。また、全てのDCT係数について上記の方法を行っても良いが、一部のDCT係数については、このような処理を行わなくても良い。
(2) The amplitude of the DCT coefficient of each DCT block is divided by an integer greater than 1, and the quotient is rounded down to an integer, and the result of the integerization is multiplied by the integer. That is, when the amplitude before truncation is Amp1, and the amplitude after truncation is Amp2,
Amp2 = int (Amp1 / n) × n
However, n is an integer larger than 1. The value of n may be changed for each frequency of the DCT coefficient. For example, the value of n may be increased as the frequency of the DCT coefficient is higher. In addition, the above method may be performed for all DCT coefficients, but such processing may not be performed for some DCT coefficients.

例えば、図13に示すように周波数領域を4つの周波数領域(領域A、領域B、領域C及び領域D)に分割する。領域AのDCT係数は2で割ってから、切り捨てて整数化し、それから2をかける。同様に、領域BのDCT係数は4で割ってから、切り捨てて整数化し、それから4をかけ、領域CのDCT係数は8で割ってから、切り捨てて整数化し、それから8をかけ、領域DのDCT係数は16で割ってから、切り捨てて整数化し、それから16をかける。この方法を例えば図14の左に示すDCT係数f(i、j)に適用すると、図14の右に示すDCT係数F(i、j)が得られる。この方法を適用すると、非ゼロDCT係数f(i、j)のうちのf(1、1)、f(2、1)、f(0、4)f(2、3)及びf(6、4)はゼロに変化するが、他の非ゼロ係数f(i、j)は0にはならずに振幅が減少する。intra_vlc_format=1のイントラブロックの場合には、図14に示すように、各非ゼロDCT係数とそれに先行するゼロラングレングスを図10に示すジグザグスキャンに沿って2次元ハフマン符号化したときのDCTブロックあたりの符号量は、この方法を行う前では123ビットであるが、この方法を行った後では101ビットに削減される。   For example, as shown in FIG. 13, the frequency region is divided into four frequency regions (region A, region B, region C, and region D). The DCT coefficient in region A is divided by 2, then rounded down to an integer, and then multiplied by 2. Similarly, the DCT coefficient for region B is divided by 4, then rounded down to an integer, then multiplied by 4, and the DCT coefficient for region C is divided by 8, then rounded down to an integer, then multiplied by 8, and The DCT coefficient is divided by 16, then rounded down to an integer, and then multiplied by 16. For example, when this method is applied to the DCT coefficient f (i, j) shown on the left in FIG. 14, the DCT coefficient F (i, j) shown on the right in FIG. 14 is obtained. When this method is applied, f (1,1), f (2,1), f (0,4) f (2,3) and f (6, of the non-zero DCT coefficients f (i, j) 4) changes to zero, but the other non-zero coefficients f (i, j) do not become zero but the amplitude decreases. In the case of an intra block of intra_vlc_format = 1, as shown in FIG. 14, each non-zero DCT coefficient and its preceding zero run length are two-dimensional Huffman encoded along the zigzag scan shown in FIG. The per-code amount is 123 bits before this method is performed, but is reduced to 101 bits after this method is performed.

(3)各DCTブロックの非ゼロDCT係数の全て又は一部の振幅を、非ゼロDCT係数とジグザグスキャンしたときにその非ゼロDCT係数に先行する連続するゼロの組に対応する可変長符号の長さが1段階又は数段階短くなるように、減らし、又は0にする。   (3) When all or part of the amplitudes of the non-zero DCT coefficients of each DCT block are zigzag scanned with the non-zero DCT coefficients, the variable length code corresponding to the set of consecutive zeros preceding the non-zero DCT coefficients The length is reduced or reduced to zero so that the length is shortened by one step or several steps.

非ゼロDCT係数とそれに先行する連続したゼロの組に対応する2次元ハフマン符号化の長さは、非イントラブロック及びintra_vlc_format=0のイントラブロックについては、図11に示すようになり、intra_vlc_format=1のイントラブロックについては、図12に示すようになる。ただし、図11及び図12は、一部の(非ゼロ係数、それに先行する連続したゼロの数)の組についてのみ2次元ハフマン符号の長さを示している。   The lengths of the two-dimensional Huffman coding corresponding to the set of non-zero DCT coefficients and the preceding zeros are as shown in FIG. 11 for the non-intra block and the intra block with intra_vlc_format = 0, and intra_vlc_format = 1. The intra block is as shown in FIG. However, FIGS. 11 and 12 show the lengths of the two-dimensional Huffman codes only for some (non-zero coefficients, the number of consecutive zeros preceding them).

従って、図12からわかるように、例えば、intra_vlc_format=1のイントラブロックの場合であれば、1つのゼロに先行され振幅が6のDCT係数の振幅を5に減少させれば、対応するハフマン符号の長さを14ビットから9ビットに削減できる。すなわち、このようにすれば、対応するハフマン符号の長さを1段階短くすることができる。このような方法を例えば図15の左に示すイントラブロックのDCT係数f(i、j)に適用すると、図15の右に示すDCT係数F(i、j)が得られる。図15の例では、図12のテーブルを参照して、ハフマン符号の長さが1段階短くなるようにDCT係数f(i、j)の振幅をDCT係数F(i、j)に減少させている。intra_vlc_format=1のイントラブロックの場合には、図15に示すように、各非ゼロDCT係数とそれに先行するゼロラングレングスを図10に示すジグザグスキャンに沿って2次元ハフマン符号化したときのDCTブロックあたりの符号量は、この方法を行う前では123ビットであるが、この方法を行った後では90ビットに削減される。   Therefore, as can be seen from FIG. 12, for example, in the case of an intra block of intra_vlc_format = 1, if the amplitude of a DCT coefficient preceded by one zero and having an amplitude of 6 is reduced to 5, the corresponding Huffman code The length can be reduced from 14 bits to 9 bits. That is, in this way, the length of the corresponding Huffman code can be shortened by one step. For example, when such a method is applied to the DCT coefficient f (i, j) of the intra block shown on the left of FIG. 15, the DCT coefficient F (i, j) shown on the right of FIG. 15 is obtained. In the example of FIG. 15, referring to the table of FIG. 12, the amplitude of the DCT coefficient f (i, j) is reduced to the DCT coefficient F (i, j) so that the length of the Huffman code is shortened by one step. Yes. In the case of an intra block of intra_vlc_format = 1, as shown in FIG. 15, each non-zero DCT coefficient and its preceding zero run length are two-dimensional Huffman coded along the zigzag scan shown in FIG. The per-code amount is 123 bits before this method is performed, but is reduced to 90 bits after this method is performed.

なお、図15の例では、ハフマン符号の長さが1段階短くなるように各非ゼロDCT係数の振幅を減少させたが、ハフマン符号の長さが数段階短くなるように各非ゼロDCT係数の振幅を減少させ又はゼロにしても良い。   In the example of FIG. 15, the amplitude of each non-zero DCT coefficient is decreased so that the length of the Huffman code is shortened by one step. However, each non-zero DCT coefficient is decreased so that the length of the Huffman code is shortened by several steps. May be reduced or made zero.

(4)(3)において、振幅の減少割合が所定の割合を超えないようにする。すなわち、変更前の振幅をAmp3、変更後の振幅をAmp4としたときに、
(Amp3−Amp4)/Amp3<r
ただし、rは0を超え1未満の数
とする。rの値は、例えば、0.9、0.8、0.7、0.6、0.5等とする。このように、振幅の減少割合が所定の割合を超えないようにすることにより、画質劣化を抑えることができる。
(4) In (3), the reduction rate of the amplitude should not exceed a predetermined rate. That is, when the amplitude before change is Amp3 and the amplitude after change is Amp4,
(Amp3-Amp4) / Amp3 <r
However, r is a number greater than 0 and less than 1. The value of r is, for example, 0.9, 0.8, 0.7, 0.6, 0.5, etc. As described above, the deterioration rate of the image quality can be suppressed by preventing the decrease rate of the amplitude from exceeding the predetermined rate.

図16は、図15に示す例に、r=0.5の制限をかけた場合のDCT係数の振幅変化とDCTブロックあたりの符号量の変化を示す。intra_vlc_format=1のイントラブロックの場合には、図16に示すように、各非ゼロDCT係数とそれに先行するゼロラングレングスを図4に示すジグザグスキャンに沿って2次元ハフマン符号化したときのDCTブロックあたりの符号量は、イントラブロックの場合には、この方法を行う前では123ビットであるが、この方法を行った後では110ビットに削減される。   FIG. 16 shows the change in the amplitude of the DCT coefficient and the change in the code amount per DCT block when the example shown in FIG. 15 is restricted by r = 0.5. In the case of an intra block of intra_vlc_format = 1, as shown in FIG. 16, each non-zero DCT coefficient and its preceding zero run length are two-dimensional Huffman encoded along the zigzag scan shown in FIG. The code amount per frame is 123 bits before this method is performed in the case of an intra block, but is reduced to 110 bits after this method is performed.

(5)(3)において、振幅の減少値が所定の値を超えないようにする。すなわち、変更前の振幅をAmp3、変更後の振幅をAmp4としたときに、
(Amp3−Amp4)<diff
ただし、diffは0を超えた整数
とするdiffの値は、例えば、1、2、3、・・・等とする。このように、振幅の減少値が所定の値を超えないようにすることにより、画質劣化を抑えることができる。
(5) In (3), the amplitude decrease value is made not to exceed a predetermined value. That is, when the amplitude before change is Amp3 and the amplitude after change is Amp4,
(Amp3-Amp4) <diff
However, the value of diff, where diff is an integer exceeding 0, is, for example, 1, 2, 3,. Thus, by preventing the decrease value of the amplitude from exceeding a predetermined value, it is possible to suppress image quality deterioration.

図17は、図15に示す例に、diff=1の制限をかけた場合のDCT係数の振幅変化とDCTブロックあたりの符号量の変化を示す。intra_vlc_format=1のイントラブロックの場合には、図17に示すように、各非ゼロDCT係数とそれに先行するゼロラングレングスを図4に示すジグザグスキャンに沿って2次元ハフマン符号化したときのDCTブロックあたりの符号量は、イントラブロックの場合には、この方法を行う前では123ビットであるが、この方法を行った後では119ビットに削減される。   FIG. 17 shows the change in the amplitude of the DCT coefficient and the change in the code amount per DCT block when the diff = 1 restriction is applied to the example shown in FIG. In the case of an intra block with intra_vlc_format = 1, as shown in FIG. 17, each non-zero DCT coefficient and its preceding zero run length are two-dimensional Huffman coded along the zigzag scan shown in FIG. In the case of an intra block, the per-code amount is 123 bits before this method is performed, but is reduced to 119 bits after this method is performed.

(6)DCT係数をジグザグスキャンしたときの最後の所定個数sの非ゼロのDCT係数の振幅を0にする。   (6) The amplitude of the last predetermined number s of non-zero DCT coefficients when zigzag scanning the DCT coefficients is set to zero.

例えば、所定個数sの値を2にして図18の左に示すDCT係数にこの方法を適用すると、図18の右に示すようなDCT係数が得られる。intra_vlc_format=1のイントラブロックの場合には、図18に示すように、各非ゼロDCT係数とそれに先行するゼロラングレングスを図10に示すジグザグスキャンに沿って2次元ハフマン符号化したときのDCTブロックあたりの符号量は、この方法を行う前では123ビットであるが、この方法を行った後では75ビットに削減される。   For example, when the value of the predetermined number s is set to 2 and this method is applied to the DCT coefficient shown on the left of FIG. 18, the DCT coefficient shown on the right of FIG. 18 is obtained. In the case of an intra block with intra_vlc_format = 1, as shown in FIG. 18, each non-zero DCT coefficient and its preceding zero run length are two-dimensional Huffman encoded along the zigzag scan shown in FIG. The per-code amount is 123 bits before this method is performed, but is reduced to 75 bits after this method is performed.

(7)(1)〜(6)の方法を組み合わせる。   (7) The methods (1) to (6) are combined.

例えば、図14の左に示すDCT係数に(1)の方法を適用して図14の右(又は図19の左)に示すDCT係数を得た後に、更に、(4)の方法を適用すると、図19の右に示すDCT係数が得られる。intra_vlc_format=1のイントラブロックの場合には、図14及び図19に示すように、各非ゼロDCT係数とそれに先行するゼロラングレングスを図10に示すジグザグスキャンに沿って2次元ハフマン符号化したときのDCTブロックあたりの符号量は、この方法を行う前では123ビットであるが、この方法を行った後では90ビットに削減される。   For example, after applying the method (1) to the DCT coefficient shown on the left of FIG. 14 to obtain the DCT coefficient shown on the right of FIG. 14 (or the left of FIG. 19), the method (4) is further applied. The DCT coefficient shown on the right side of FIG. 19 is obtained. In the case of an intra block of intra_vlc_format = 1, as shown in FIGS. 14 and 19, when each non-zero DCT coefficient and the preceding zero run length are two-dimensionally Huffman encoded along the zigzag scan shown in FIG. The code amount per DCT block is 123 bits before this method is performed, but is reduced to 90 bits after this method is performed.

(8)(1)〜(3)又は(7)の方法において、DCTブロック当たりの総符号量を削減するために、元々非ゼロDCT係数であったが、(1)〜(3)又は(6)の方法によりゼロとなったDCT係数の全て又は一部を非ゼロDCT係数にする。   (8) In the method of (1) to (3) or (7), in order to reduce the total code amount per DCT block, it was originally a non-zero DCT coefficient, but (1) to (3) or ( All or part of the DCT coefficients that have become zero by the method of 6) are made non-zero DCT coefficients.

(1)の方法の図9に示す例では、f(2、3)=1をF(2、3)=0に変化させているので、f(2、3)とそれに先行するゼロランレングス(=2)に対応する符号の符号長6とf(2、3)の後の非ゼロDCT係数であるf(3、2)(=7)とそれに先行するゼロランレングス(=0)に対応する符号の符号長7の和(=13)よりも、それに対応する領域の符号(F(3、2)(=5)とそれに対応するゼロランレングス(=3)に対応する符号)の符号長(=24)が長くなってしまっている。この問題を解決するために、以下のような対策をとる。   In the example shown in FIG. 9 of the method (1), since f (2, 3) = 1 is changed to F (2, 3) = 0, f (2, 3) and the preceding zero run length are changed. The code length 6 of the code corresponding to (= 2) and the non-zero DCT coefficient f (3, 2) (= 7) after f (2, 3) and the preceding zero run length (= 0) Rather than the sum of code length 7 of the corresponding code (= 13), the code of the corresponding region (the code corresponding to F (3, 2) (= 5) and the corresponding zero run length (= 3)) The code length (= 24) has become longer. In order to solve this problem, the following measures are taken.

まず、(1)〜(3)又は(7)の方法により、非ゼロDCT係数の振幅を削減し又はゼロにして、DCTブロックを符号化し、DCTブロック当たりの符号量を求める。それから、(1)の方法により非ゼロからゼロに変化したDCT係数があったならば、その係数を非ゼロにして(例えば、1にする。元の振幅に戻しても良い。)、DCTブロックを符号化し、DCTブロック当たりの符号量を求める。そして、後者の符号量の方が少なければ、ゼロに変化したDCT係数を非ゼロにする。   First, by the method (1) to (3) or (7), the amplitude of the non-zero DCT coefficient is reduced or made zero, the DCT block is encoded, and the code amount per DCT block is obtained. Then, if there is a DCT coefficient that has been changed from non-zero to zero by the method of (1), the coefficient is set to non-zero (for example, set to 1 and may be returned to the original amplitude), and the DCT block. And the amount of code per DCT block is obtained. If the latter code amount is smaller, the DCT coefficient changed to zero is set to non-zero.

(1)の方法に(8)の方法を適用すると、図20の右に示すように、F(2、3)の振幅は1となる。この場合のDCTブロック当たりの符号量は、97ビットとなり、図9の右に示す例の符号量109ビットよりも少なくなる。   When the method (8) is applied to the method (1), the amplitude of F (2,3) becomes 1 as shown on the right side of FIG. In this case, the code amount per DCT block is 97 bits, which is smaller than the code amount of 109 bits in the example shown on the right in FIG.

(2)の方法に(8)の方法を適用すると、図21の右に示すように、F(2、3)の振幅は1となる。この場合のDCTブロック当たりの符号量は、89ビットとなり、図14の右に示す例の符号量101ビットよりも少なくなる。   When the method (8) is applied to the method (2), the amplitude of F (2, 3) becomes 1 as shown on the right side of FIG. In this case, the code amount per DCT block is 89 bits, which is smaller than the code amount of 101 bits in the example shown on the right in FIG.

例は示さないが、(3)、(6)の方法に(8)の方法を適用することも可能である。   Although no example is shown, the method (8) can be applied to the methods (3) and (6).

DCT係数変更部123は、係数変更信号188の値に応じて、DCT係数の振幅の削減の割合又は変更するDCT係数の数を調整し、これによって、各DCTブロックあたりの符号量の削減の割合を調整する。(1)の方法を用いているときには、低域通過フィルタの周波数特性を変えることにより、DCT係数の振幅の変更の割合を調整することができる。(2)の方法を用いているときには、周波数毎にnの値を変えることにより、DCT係数の振幅の変更の割合を調整することができる。(3)の方法を用いているときには、振幅を減らすDCT係数の数を変えることにより、変更されるDCT係数の数を調整することができる。また、ハフマン符号の長さの削減の段階の数を変えることにより、DCT係数の振幅の割合を調整することができる。(4)の方法を用いているときには、rの値を変えることにより、変更されるDCT係数の数を調整することができる。(5)の方法を用いているときには、所定個数sの値を変えることにより変更されるDCT係数の数を調整することができる。DCT係数変更部123は、係数変更信号188の値に応じて、用いる方法又はこれらの方法の組み合わせを適宜変更することにより、DCT係数の振幅の削減の割合及び/又は変更するDCT係数の数を調整することができる。   The DCT coefficient changing unit 123 adjusts the reduction ratio of the amplitude of the DCT coefficient or the number of DCT coefficients to be changed according to the value of the coefficient change signal 188, and thereby the reduction ratio of the code amount per each DCT block. Adjust. When the method (1) is used, the change rate of the amplitude of the DCT coefficient can be adjusted by changing the frequency characteristics of the low-pass filter. When the method (2) is used, the rate of change in the amplitude of the DCT coefficient can be adjusted by changing the value of n for each frequency. When the method (3) is used, the number of DCT coefficients to be changed can be adjusted by changing the number of DCT coefficients that reduce the amplitude. Further, the ratio of the amplitude of the DCT coefficient can be adjusted by changing the number of steps of reducing the length of the Huffman code. When the method (4) is used, the number of DCT coefficients to be changed can be adjusted by changing the value of r. When the method (5) is used, the number of DCT coefficients to be changed can be adjusted by changing the value of the predetermined number s. The DCT coefficient changing unit 123 appropriately changes the method to be used or a combination of these methods according to the value of the coefficient changing signal 188, thereby determining the reduction ratio of the amplitude of the DCT coefficient and / or the number of DCT coefficients to be changed. Can be adjusted.

なお、図1に示すトランスコーダ、図6に示すビデオPESトランスコーダ及び図7に示す符号量制御部の構成はあくまでハードウェアにより実現した場合の一例である。また、図1に示すトランスコーダ及び図6に示すビデオPESトランスコーダでは、数クロック単位の遅延調整のための回路は省略している。トランスコーダは図1に示す構成以外の構成によっても実現することができる。特に、トランスコーダは、コンピュータをトランスコーダとして機能させるためのプログラムをコンピュータが読み取り、実行することによって実現することもできる。従って、トランスコーダの行う方法を記述したプログラムをコンピュータが読み取り実行することにより、コンピュータをトランスコーダとして機能させることができる。   The configurations of the transcoder shown in FIG. 1, the video PES transcoder shown in FIG. 6, and the code amount control unit shown in FIG. 7 are merely examples when realized by hardware. Further, in the transcoder shown in FIG. 1 and the video PES transcoder shown in FIG. 6, a circuit for delay adjustment in units of several clocks is omitted. The transcoder can be realized by a configuration other than the configuration shown in FIG. In particular, the transcoder can be realized by a computer reading and executing a program for causing the computer to function as a transcoder. Accordingly, the computer can function as a transcoder when the computer reads and executes a program describing a method performed by the transcoder.

本発明の実施形態によるトランスコーダの構成を示すブロック図である。It is a block diagram which shows the structure of the transcoder by embodiment of this invention. 本発明の実施形態によるトランスコーダの入出力信号のフォーマットを示す図である。It is a figure which shows the format of the input / output signal of the transcoder by embodiment of this invention. 本発明の実施形態によるトランスコーダのビデオPESトランスコーダの入出力信号のタイミング図である。FIG. 4 is a timing diagram of input / output signals of a video PES transcoder of a transcoder according to an embodiment of the present invention. 本発明の実施形態によるトランスコーダの原プログラムストリームFIFOの入力信号のタイミング図である。FIG. 6 is a timing diagram of input signals of an original program stream FIFO of a transcoder according to an embodiment of the present invention. 本発明の実施形態によるトランスコーダのトランスコーディドビデオPESFIFO及び原プログラムストリームFIFOの出力信号及び関連信号のタイミング図である。FIG. 6 is a timing diagram of output signals and related signals of a transcoded video PES FIFO and an original program stream FIFO of a transcoder according to an embodiment of the present invention. 本発明の実施形態によるトランスコーダのビデオPESトランスコーダの構成を示すブロック図である。It is a block diagram which shows the structure of the video PES transcoder of the transcoder by embodiment of this invention. 本発明の実施形態によるトランスコーダの符号量制御部の構成を示すブロック図である。It is a block diagram which shows the structure of the code amount control part of the transcoder by embodiment of this invention. 本発明の実施形態によるトランスコーダのDCT係数変更部が行う第1の方法を説明するための図である。It is a figure for demonstrating the 1st method which the DCT coefficient change part of the transcoder by embodiment of this invention performs. 本発明の実施形態によるトランスコーダのDCT係数変更部がDCT係数に対して第1の方法を行う前のDCT係数と行った後のDCT係数を比較する図である。It is a figure which the DCT coefficient change part of the transcoder by embodiment of this invention compares with the DCT coefficient after performing with the DCT coefficient before performing a 1st method with respect to a DCT coefficient. DCT係数を2次元可変長符号化するときに用いるジグザグスキャンの例を示す図である。It is a figure which shows the example of the zigzag scan used when carrying out two-dimensional variable length encoding of a DCT coefficient. MPEG規格による2次元可変長符号の符号長を示す第1の図表である。It is a 1st table | surface which shows the code length of the two-dimensional variable length code by MPEG specification. MPEG規格による2次元可変長符号の符号長を示す第2の図表である。It is a 2nd table | surface which shows the code length of the two-dimensional variable length code by MPEG specification. 本発明の実施形態によるトランスコーダのDCT係数変更部が行う第2の方法を説明するための図である。It is a figure for demonstrating the 2nd method which the DCT coefficient change part of the transcoder by embodiment of this invention performs. 本発明の実施形態によるトランスコーダのDCT係数変更部がDCT係数に対して第2の方法を行う前のDCT係数と行った後のDCT係数を比較する図である。It is a figure which the DCT coefficient change part of the transcoder by embodiment of this invention compares the DCT coefficient after performing with the DCT coefficient before performing the 2nd method with respect to a DCT coefficient. 本発明の実施形態によるトランスコーダのDCT係数変更部がDCT係数に対して第3の方法を行う前のDCT係数と行った後のDCT係数を比較する図である。It is a figure which the DCT coefficient change part of the transcoder by embodiment of this invention compares the DCT coefficient after performing with the DCT coefficient before performing a 3rd method with respect to a DCT coefficient. 本発明の実施形態によるトランスコーダのDCT係数変更部がDCT係数に対して第4の方法を行う前のDCT係数と行った後のDCT係数を比較する図である。It is a figure which the DCT coefficient change part of the transcoder by embodiment of this invention compares with the DCT coefficient after performing with the DCT coefficient before performing a 4th method with respect to a DCT coefficient. 本発明の実施形態によるトランスコーダのDCT係数変更部がDCT係数に対して第5の方法を行う前のDCT係数と行った後のDCT係数を比較する図である。It is a figure which the DCT coefficient change part of the transcoder by embodiment of this invention compares the DCT coefficient after performing with the DCT coefficient before performing the 5th method with respect to a DCT coefficient. 本発明の実施形態によるトランスコーダのDCT係数変更部がDCT係数に対して第6の方法を行う前のDCT係数と行った後のDCT係数を比較する図である。It is a figure which the DCT coefficient change part of the transcoder by embodiment of this invention compares the DCT coefficient after performing with the DCT coefficient before performing a 6th method with respect to a DCT coefficient. 本発明の実施形態によるトランスコーダのDCT係数変更部がDCT係数に対して第7の方法を行う前のDCT係数と行った後のDCT係数を比較する図である。It is a figure which the DCT coefficient change part of the transcoder by embodiment of this invention compares the DCT coefficient after performing with the DCT coefficient before performing a 7th method with respect to a DCT coefficient. 本発明の実施形態によるトランスコーダのDCT係数変更部がDCT係数に対して第1及び第8の方法を行う前のDCT係数と行った後のDCT係数を比較する図である。It is a figure which the DCT coefficient change part of the transcoder by embodiment of this invention compares with the DCT coefficient after performing with the DCT coefficient before performing the 1st and 8th method with respect to a DCT coefficient. 本発明の実施形態によるトランスコーダのDCT係数変更部がDCT係数に対して第2及び第7の方法を行う前のDCT係数と行った後のDCT係数を比較する図である。It is a figure which the DCT coefficient change part of the transcoder by embodiment of this invention compares with the DCT coefficient after performing with the DCT coefficient before performing the 2nd and 7th method with respect to a DCT coefficient. 従来例によるMPEGデコーダの構成を示すブロック図である。It is a block diagram which shows the structure of the MPEG decoder by a prior art example. 従来例によるMPEGエンコーダの構成を示すブロック図である。It is a block diagram which shows the structure of the MPEG encoder by a prior art example. 従来例によるトランスコーダの構成を示すブロック図である。It is a block diagram which shows the structure of the transcoder by a prior art example. MPEG2規格による量子化スケールコード対量子化スケールの特性の例を示すグラフである。It is a graph which shows the example of the characteristic of the quantization scale code by the MPEG2 standard versus the quantization scale. Pピクチャを間引くことにより、符号量を削減する従来の方法を説明するための図である。It is a figure for demonstrating the conventional method of reducing code amount by thinning out a P picture. IフレームをPフレームに変換することにより、符号量を削減する従来の方法を説明するための図である。It is a figure for demonstrating the conventional method of reducing code amount by converting an I frame into a P frame. Iピクチャ及びPピクチャを間引き、更に、IフレームをPフレームに変換することにより、符号量を削減する従来の方法を説明するための図である。It is a figure for demonstrating the conventional method of reducing a code amount by thinning out an I picture and a P picture, and also converting an I frame into a P frame.

符号の説明Explanation of symbols

101 ビデオPES検出部
102 ビデオPESトランスコーダ
103 トランスコーディドビデオPESFIFO
104 PESカウンタ
105 原プログラムストリームFIFO
106 Dタイプフリップフロップ
107 減算器
108 比較器
109 ラッチ
110 トランスコーディドビデオPESカウンタ
111 比較器
112 立ち上がり検出回路
113 RSフリップフロップ
114 マルチプレクサ
101 Video PES detection unit 102 Video PES transcoder 103 Transcoded video PESFIFO
104 PES counter 105 Original program stream FIFO
106 D-type flip-flop 107 Subtractor 108 Comparator 109 Latch 110 Transcoded video PES counter 111 Comparator 112 Rise detection circuit 113 RS flip-flop 114 Multiplexer

Claims (6)

第1の画像符号を復号して画像の各符号化ブロックの周波数成分を得る復号手段と、
複数の符号化ブロックを再符号化したときに該複数の符号化ブロック当たりの符号量が減少するように、各符号化ブロックの非ゼロの周波数成分の全て又は一部の振幅を減少し又はゼロにする振幅減少手段と、
前記振幅減少手段により振幅がゼロになった周波数成分のうちのある周波数成分の振幅を所定の非ゼロに増加した場合における、その周波数成分が属するブロック当たりの総符号量が、増加する前における、その周波数成分が属するブロック当たりの総符号量よりも少なくなるか否かを判断し、その判断結果が肯定的である場合には、その周波数成分の振幅を前記所定の非ゼロ値に増加する振幅増加手段と、
前記振幅減少手段及び前記振幅増加手段により処理された各ブロックの周波数成分を再符号化して第2の画像符号を得る再符号手段と、
を備える画像符号のトランスコーダであって
前記振幅減少手段は、全て又は一部の周波数成分を1よりも大きい整数で除算し、その商を切り捨てて整数化し、整数化の結果を前記整数で乗算することを特徴とする画像符号のトランスコーダ。
Decoding means for decoding the first image code to obtain the frequency component of each encoded block of the image;
As the code amount of the coded block per the plurality of when re-encoding a plurality of coding blocks is reduced, all or reduce the portion of the amplitude or zero non-zero frequency component of each encoded block Amplitude reduction means to
When the amplitude of a certain frequency component among the frequency components whose amplitude has become zero by the amplitude reducing means is increased to a predetermined non-zero, the total code amount per block to which the frequency component belongs is increased, It is determined whether or not the total code amount per block to which the frequency component belongs is smaller, and if the determination result is affirmative, the amplitude that increases the amplitude of the frequency component to the predetermined non-zero value Increase means,
Re-encoding means for re-encoding the frequency component of each block processed by the amplitude reducing means and the amplitude increasing means to obtain a second image code;
The image code transcoder comprising,
The amplitude reducing means divides all or some of the frequency components by an integer greater than 1, rounds the quotient to an integer, and multiplies the integer result by the integer. Coda.
請求項に記載の画像符号のトランスコーダにおいて、
前記第1の画像符号の量から前記第2の画像符号の量への削減率を計測する計測手段と、
計測された前記削減率が目標削減率になるように、前記整数を変化させる制御手段と、
を更に備えることを特徴とする画像符号のトランスコーダ。
The image code transcoder according to claim 1 ,
Measuring means for measuring a reduction rate from the amount of the first image code to the amount of the second image code;
Control means for changing the integer so that the measured reduction rate becomes a target reduction rate;
An image code transcoder.
第1の画像符号を復号して画像の各符号化ブロックの周波数成分を得る復号ステップと、
複数の符号化ブロックを再符号化したときに該複数の符号化ブロック当たりの符号量が減少するように、各符号化ブロックの非ゼロの周波数成分の全て又は一部の振幅を減少し又はゼロにする振幅減少ステップと、
前記振幅減少ステップにより振幅がゼロになった周波数成分のうちのある周波数成分の振幅を所定の非ゼロに増加した場合における、その周波数成分が属するブロック当たりの総符号量が、増加する前における、その周波数成分が属するブロック当たりの総符号量よりも少なくなるか否かを判断し、その判断結果が肯定的である場合には、その周波数成分の振幅を前記所定の非ゼロ値に増加する振幅増加ステップと、
前記振幅減少ステップ及び前記振幅増加ステップにより処理された各ブロックの周波数成分を再符号化して第2の画像符号を得る再符号ステップと、
備える画像符号のトランスコーディング方法であって
前記振幅減少ステップは、全て又は一部の周波数成分を1よりも大きい整数で除算し、その商を切り捨てて整数化し、整数化の結果を前記整数で乗算することを特徴とする画像符号のトランスコーディング方法。
A decoding step of decoding the first image code to obtain a frequency component of each encoded block of the image;
As the code amount of the coded block per the plurality of when re-encoding a plurality of coding blocks is reduced, all or reduce the portion of the amplitude or zero non-zero frequency component of each encoded block An amplitude reduction step to
When the amplitude of a certain frequency component among the frequency components whose amplitude has become zero by the amplitude decreasing step is increased to a predetermined non-zero, the total code amount per block to which the frequency component belongs is increased. It is determined whether or not the total code amount per block to which the frequency component belongs is smaller, and if the determination result is affirmative, the amplitude that increases the amplitude of the frequency component to the predetermined non-zero value Increasing steps,
A re-encoding step of re-encoding the frequency component of each block processed by the amplitude decreasing step and the amplitude increasing step to obtain a second image code;
A transcoding method for image encoding comprising,
In the amplitude reduction step, all or a part of frequency components are divided by an integer larger than 1, the quotient is rounded down to an integer, and the result of the integerization is multiplied by the integer. Coding method.
請求項に記載の画像符号のトランスコーディング方法において、
前記第1の画像符号の量から前記第2の画像符号の量への削減率を計測する計測ステップと、
計測された前記削減率が目標削減率になるように、前記整数を変化させる制御ステップと、
を更に備えることを特徴とする画像符号のトランスコーディング方法。
The image code transcoding method according to claim 3 , wherein:
A measurement step of measuring a reduction rate from the amount of the first image code to the amount of the second image code;
A control step of changing the integer so that the measured reduction rate becomes a target reduction rate;
Further image transcoding method code, characterized in that it comprises a.
第1の画像符号を復号して画像の各符号化ブロックの周波数成分を得る復号ステップと、
複数の符号化ブロックを再符号化したときに該複数の符号化ブロック当たりの符号量が減少するように、各符号化ブロックの非ゼロの周波数成分の全て又は一部の振幅を減少し又はゼロにする振幅減少ステップと、
前記振幅減少ステップにより振幅がゼロになった周波数成分のうちのある周波数成分の振幅を所定の非ゼロに増加した場合における、その周波数成分が属するブロック当たりの総符号量が、増加する前における、その周波数成分が属するブロック当たりの総符号量よりも少なくなるか否かを判断し、その判断結果が肯定的である場合には、その周波数成分の振幅を前記所定の非ゼロ値に増加する振幅増加ステップと、
前記振幅減少ステップ及び前記振幅増加ステップにより処理された各ブロックの周波数成分を再符号化して第2の画像符号を得る再符号ステップと、
を備える画像符号のトランスコーディング方法であって
前記振幅減少ステップは、全て又は一部の周波数成分を1よりも大きい整数で除算し、その商を切り捨てて整数化し、整数化の結果を前記整数で乗算することを特徴とする画像符号のトランスコーディング方法をコンピュータに実行させるためのプログラム。
A decoding step of decoding the first image code to obtain a frequency component of each encoded block of the image;
As the code amount of the coded block per the plurality of when re-encoding a plurality of coding blocks is reduced, all or reduce the portion of the amplitude or zero non-zero frequency component of each encoded block An amplitude reduction step to
When the amplitude of a certain frequency component among the frequency components whose amplitude has become zero by the amplitude decreasing step is increased to a predetermined non-zero, the total code amount per block to which the frequency component belongs is increased. It is determined whether or not the total code amount per block to which the frequency component belongs is smaller, and if the determination result is affirmative, the amplitude that increases the amplitude of the frequency component to the predetermined non-zero value Increasing steps,
A re-encoding step of re-encoding the frequency component of each block processed by the amplitude decreasing step and the amplitude increasing step to obtain a second image code;
A transcoding method for image encoding comprising,
In the amplitude reduction step, all or a part of frequency components are divided by an integer larger than 1, the quotient is rounded down to an integer, and the result of the integerization is multiplied by the integer. A program that causes a computer to execute the coding method.
請求項に記載の画像符号のプログラムにおいて、
前記画像符号のトランスコーディング方法は、
前記第1の画像符号の量から前記第2の画像符号の量への削減率を計測する計測ステップと、
計測された前記削減率が目標削減率になるように、前記整数を変化させる制御ステップと、
を更に備えることを特徴とするプログラム。
In the image code program according to claim 5 ,
The image code transcoding method includes:
A measurement step of measuring a reduction rate from the amount of the first image code to the amount of the second image code;
A control step of changing the integer so that the measured reduction rate becomes a target reduction rate;
A program characterized by further comprising a.
JP2005241147A 2005-08-23 2005-08-23 Image code transcoder and image code transcoding method Expired - Fee Related JP3948024B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005241147A JP3948024B2 (en) 2005-08-23 2005-08-23 Image code transcoder and image code transcoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005241147A JP3948024B2 (en) 2005-08-23 2005-08-23 Image code transcoder and image code transcoding method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2001316806A Division JP3856292B2 (en) 2001-10-15 2001-10-15 Image code transcoder and image code transcoding method

Publications (2)

Publication Number Publication Date
JP2006060835A JP2006060835A (en) 2006-03-02
JP3948024B2 true JP3948024B2 (en) 2007-07-25

Family

ID=36107869

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005241147A Expired - Fee Related JP3948024B2 (en) 2005-08-23 2005-08-23 Image code transcoder and image code transcoding method

Country Status (1)

Country Link
JP (1) JP3948024B2 (en)

Also Published As

Publication number Publication date
JP2006060835A (en) 2006-03-02

Similar Documents

Publication Publication Date Title
US7949044B2 (en) Method for coefficient bitdepth limitation, encoder and bitstream generation apparatus
JP3888597B2 (en) Motion compensation coding apparatus and motion compensation coding / decoding method
US6658157B1 (en) Method and apparatus for converting image information
TWI478584B (en) Apparatus and method thereof for encoding/decoding video
US9071844B2 (en) Motion estimation with motion vector penalty
KR100850706B1 (en) Method for adaptive encoding and decoding motion image and apparatus thereof
KR100850705B1 (en) Method for adaptive encoding motion image based on the temperal and spatial complexity and apparatus thereof
US8340182B2 (en) Video decoding apparatus and video decoding method
US7738716B2 (en) Encoding and decoding apparatus and method for reducing blocking phenomenon and computer-readable recording medium storing program for executing the method
US8194735B2 (en) Video encoding apparatus and video encoding method
KR101213704B1 (en) Method and apparatus for video coding and decoding based on variable color format
US20100091842A1 (en) Coding rate conversion apparatus, coding rate conversion method, and integrated circuit
US20100254450A1 (en) Video coding method, video decoding method, video coding apparatus, video decoding apparatus, and corresponding program and integrated circuit
EP1195993A2 (en) Transcoding of video signal
US7787541B2 (en) Dynamic pre-filter control with subjective noise detector for video compression
JP2001169281A (en) Device and method for encoding moving image
JP2005323353A (en) High-fidelity transcoding
US20080219576A1 (en) Method and apparatus for encoding/decoding image
KR20040106364A (en) System and method for providing single-layer video encoded bitstreams suitable for reduced-complexity decoding
US8903196B2 (en) Video presentation at fractional speed factor using time domain interpolation
JP2006191253A (en) Rate converting method and rate converter
KR20070063556A (en) Compression rate control system and method with variable subband processing
JPH09322165A (en) Image decoding device and method, and image reproducing device
JP3948025B2 (en) Image code transcoder and image code transcoding method
US20080253447A1 (en) Video Transcoding with Selection of Data Portions to be Processed

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070105

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070302

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070408

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110427

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120427

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120427

Year of fee payment: 5

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R371 Transfer withdrawn

Free format text: JAPANESE INTERMEDIATE CODE: R371

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

Free format text: PAYMENT UNTIL: 20120427

Year of fee payment: 5

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

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

Free format text: PAYMENT UNTIL: 20120427

Year of fee payment: 5

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20120427

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120427

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130427

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130427

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20140427

Year of fee payment: 7

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees