JP2006310912A - Moving picture bit rate conversion method, moving picture bit rate conversion apparatus, moving picture bit rate conversion circuit, and program recording medium - Google Patents

Moving picture bit rate conversion method, moving picture bit rate conversion apparatus, moving picture bit rate conversion circuit, and program recording medium Download PDF

Info

Publication number
JP2006310912A
JP2006310912A JP2005127412A JP2005127412A JP2006310912A JP 2006310912 A JP2006310912 A JP 2006310912A JP 2005127412 A JP2005127412 A JP 2005127412A JP 2005127412 A JP2005127412 A JP 2005127412A JP 2006310912 A JP2006310912 A JP 2006310912A
Authority
JP
Japan
Prior art keywords
code amount
bit rate
unit
reduction
moving 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.)
Pending
Application number
JP2005127412A
Other languages
Japanese (ja)
Inventor
Yuji Hayashino
裕司 林野
Yasuo Hamamoto
康男 濱本
Yoichi Masuda
洋一 増田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2005127412A priority Critical patent/JP2006310912A/en
Publication of JP2006310912A publication Critical patent/JP2006310912A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To control the bit rate of an output stream to be constant after bit rate conversion of a compression coded moving picture stream. <P>SOLUTION: A code amount reduction section uses a combination of three code amount reduction systems comprising revision of a quantization scale, round-off threshold value corresponding to re-quantization and reduction in discrete cosine transform coefficient so as to determine a code amount reduction parameter in advance in a way of being capable of meticulously controlling a bit rate unit, calculates a target code quantity from the target bit rate by each prescribed control unit, obtains the code amount reduction parameter from accumulation of errors between the target code amount and an output code amount to reduce the code amount, and carries out code amount control so that the error of the output code amount with respect to the target code amount is suppressed within a prescribed range. Further, when the target bit rate is low and the bit rate cannot be decreased depending on a picture type, the target code amount ratio by each picture type is revised to make the target bit rate of whole the bit stream constant. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、MPEG(Moving Picture Experts Group)等で規格化された動画像圧縮技術を用いて圧縮符号化された動画像ビットストリームのビットレートを所望のビットレートにリアルタイム変換する動画像ビットレート変換方法及び動画像ビットレート変換装置に関するものである。特に、動画像ビットストリームの標準規格を満たした上で、符号化した動画像ビットストリームを復号化することなくビットレート変換し、定ビットレートに保つ動画像ビットレート変換方法及び装置に関するものである。   The present invention relates to a moving image bit rate conversion for converting a bit rate of a moving image bit stream compressed and encoded using a moving image compression technique standardized by MPEG (Moving Picture Experts Group) into a desired bit rate in real time. The present invention relates to a method and a moving image bit rate conversion apparatus. In particular, the present invention relates to a moving image bit rate conversion method and apparatus that satisfies the video bit stream standard, performs bit rate conversion without decoding the encoded moving image bit stream, and maintains the bit rate. .

近年、パーソナルコンピュータやDVDレコーダ等に代表される映像サーバーに蓄積されている圧縮符号化された動画像ビットストリームを、LAN等のネットワークを介してクライアントとなる動画像受信端末に伝送する動画像伝送システムが普及し始めている。これらの動画像ビットストリームは、一般的に圧縮符号化方式として離散コサイン変換を用いたMPEG1(ISO/IEC11172)、MPEG2(ISO/IEC13818−2)、MPEG4(ISO/IEC14496−2)等のMPEG規格を用いて圧縮符号化されている。   In recent years, moving image transmission for transmitting a compression-coded moving image bit stream stored in a video server typified by a personal computer or a DVD recorder to a moving image receiving terminal serving as a client via a network such as a LAN. The system is starting to spread. These video bitstreams are generally MPEG standards such as MPEG1 (ISO / IEC11172), MPEG2 (ISO / IEC13818-2), MPEG4 (ISO / IEC14496-2) using discrete cosine transform as a compression encoding method. Is compressed and encoded.

このような動画像伝送システムにおいて、高画質な動画像ビットストリームを伝送すると、MPEG規格により圧縮符号化されてはいるものの、ネットワークの伝送帯域が不十分であったり、動画像受信端末の性能が受信した動画像ビットストリームを復号するのに十分でなかったりするために、動画像受信端末において受信した動画像をリアルタイムに再生できない場合がある。そこで、ネットワークの監視端末や動画像受信端末からの要求に応じて、映像サーバーに蓄積されている動画像ビットストリームを映像サーバー内やネットワーク上の中継局等においてビットレートを削減して伝送する方法がある。   In such a moving image transmission system, when a high-quality moving image bit stream is transmitted, the transmission band of the network is insufficient, or the performance of the moving image receiving terminal is low although it is compressed and encoded according to the MPEG standard. In some cases, the received moving image bitstream is not sufficient to decode the moving image, and the moving image received at the moving image receiving terminal may not be reproduced in real time. Therefore, a method of transmitting a moving image bit stream stored in a video server with a reduced bit rate in the video server or a relay station on the network in response to a request from a network monitoring terminal or a moving image receiving terminal There is.

このように、すでに圧縮符号化されている動画像ビットストリームのビットレートを削減する方法としては特許文献1に記載されている動画像ビットレート変換装置などがある。   As described above, as a method for reducing the bit rate of a moving image bit stream that has already been compression-encoded, there is a moving image bit rate conversion device described in Patent Document 1.

図16は、前記従来の動画像ビットレート変換装置の構成を示すものである。図16において、従来の動画像ビットレート変換装置110は、MPEG2により圧縮符号化された入力ビットストリームbs1を入力とし、入力ビットストリームbs1の可変長復号化を行う可変長復号化部111、可変長復号化を行ったビットストリームを逆量子化して離散コサイン係数変換列を出力する逆量子化部112、離散コサイン係数変換列を再度量子化スケールで除算して量子化を行う再量子化部113、再量子化した離散コサイン係数変換列を可変長符号化して出力ビットストリームbs2を得る可変長符号化部114を備え、ビットレートを変換した出力ビットストリームbs2を出力する。   FIG. 16 shows the configuration of the conventional moving image bit rate conversion apparatus. In FIG. 16, a conventional moving image bit rate conversion apparatus 110 has an input bit stream bs1 compression-encoded by MPEG2 as an input, a variable length decoding unit 111 that performs variable length decoding of the input bit stream bs1, and a variable length An inverse quantization unit 112 that dequantizes the decoded bitstream and outputs a discrete cosine coefficient transform sequence; a requantization unit 113 that divides the discrete cosine coefficient transform sequence by a quantization scale and performs quantization; A variable length coding unit 114 is provided that performs variable length coding on the requantized discrete cosine coefficient transform sequence to obtain an output bit stream bs2, and outputs an output bit stream bs2 obtained by converting the bit rate.

さらに、従来の動画像ビットレート変換装置110は再量子化部113において再量子化時に用いる量子化スケールを与える符号量制御部115を備える。符号量制御部115は出力される出力ビットストリームbs2のビットレートが一定になるように符号量制御を行う。   Further, the conventional moving image bit rate conversion apparatus 110 includes a code amount control unit 115 that gives a quantization scale used in the requantization unit 113 in the requantization. The code amount control unit 115 performs code amount control so that the bit rate of the output bit stream bs2 to be output is constant.

図17は、従来の動画像ビットレート変換装置の符号量制御部115の詳細な動作を示すフローチャートである。図17を用いて符号量制御部115の詳細な動作について説明する。   FIG. 17 is a flowchart showing a detailed operation of the code amount control unit 115 of the conventional moving image bit rate conversion apparatus. The detailed operation of the code amount control unit 115 will be described with reference to FIG.

まず、最初のステップで、Iピクチャ、Pピクチャ及びBピクチャの複雑度Xi、Xp及びXbを、それぞれ以下の式により算出する。   First, in the first step, the complexity Xi, Xp, and Xb of I picture, P picture, and B picture are calculated by the following equations, respectively.

Xi=Si×Qi
Xp=Sp×Qp
Xb=Sb×Qb
ここで、Si、Sp及びSbはそれぞれIピクチャ、Pピクチャ及びBピクチャの発生符号量であり、Qi、Qp及びQbはそれぞれIピクチャ内、Pピクチャ内及びBピクチャ内における全マクロブロックの量子化スケールの平均値である。
Xi = Si × Qi
Xp = Sp × Qp
Xb = Sb × Qb
Here, Si, Sp, and Sb are generated code amounts of I picture, P picture, and B picture, respectively, and Qi, Qp, and Qb are quantizations of all macroblocks in I picture, P picture, and B picture, respectively. The average value of the scale.

また、Iピクチャ、Pピクチャ及びBピクチャの複雑度Xi、Xp及びXbの初期値は、それぞれ以下の式により与えられる。   In addition, initial values of the complexity Xi, Xp, and Xb of the I picture, P picture, and B picture are given by the following equations, respectively.

Xi=160×Rtarget/115
Xp=60×Rtarget/115
Xb=42×Rtarget/115
次のステップでは、GOP内のIピクチャ、Pピクチャ及びBピクチャに対する割当て符号量Ti、Tp及びTbをそれぞれ以下の式により算出する。
Xi = 160 × Rtarget / 115
Xp = 60 × Rtarget / 115
Xb = 42 × Rtarget / 115
In the next step, the allocated code amounts Ti, Tp, and Tb for the I picture, P picture, and B picture in the GOP are calculated by the following equations, respectively.

Ti=Kp・Kb・Xi
/(Kp・Kb・Xi+Kb・Np・Xp+Kp・Nb・Xb)×R
Tp=Kb・Xp/(Kb・Np・Xp+Kp・Nb・Xb)×R
Tb=Kp・Xb/(Kp・Nb・Xb+Kb・Np・Xp)×R
ここで、Np及びNbは、それぞれGOP内の未符号化のPピクチャ及びBピクチャの数であり、また、Kp及びKbは、Iピクチャの量子化スケールを基準としたPピクチャ及びBピクチャの量子化スケールの比率を示す。実験的に、Kp=1.0及びKb=1.4となる場合に、全体の画質が最適化される。
Ti = Kp · Kb · Xi
/ (Kp · Kb · Xi + Kb · Np · Xp + Kp · Nb · Xb) × R
Tp = Kb · Xp / (Kb · Np · Xp + Kp · Nb · Xb) × R
Tb = Kp · Xb / (Kp · Nb · Xb + Kb · Np · Xp) × R
Here, Np and Nb are the numbers of uncoded P pictures and B pictures in the GOP, respectively, and Kp and Kb are the quantum of the P picture and B picture with reference to the quantization scale of the I picture. The ratio of the conversion scale is shown. Experimentally, the overall image quality is optimized when Kp = 1.0 and Kb = 1.4.

続くステップでは、GOP内の未符号化ピクチャに対する割当て符号量Rを算出する。   In the subsequent step, an allocated code amount R for an uncoded picture in the GOP is calculated.

R=R−Si
R=R−Sp
R=R−Sb
ここで、Si、Sp及びSbは、それぞれ1つ前のピクチャが符号化された時のIピクチャ、Pピクチャ及びBピクチャの発生符号量であり、符号化するピクチャタイプにより、上に示したいずれかの式を用いる。
R = R-Si
R = R-Sp
R = R-Sb
Here, Si, Sp, and Sb are the generated code amounts of the I picture, P picture, and B picture when the previous picture is encoded, respectively, depending on the picture type to be encoded. The formula is used.

また、GOPの最初のピクチャを符号化するときのGOP内の未符号化ピクチャに対する割当て符号量Rは、以下の式で与えられる。   Also, the allocated code amount R for an uncoded picture in the GOP when the first picture of the GOP is coded is given by the following equation.

R=Rtarget×N/frame_rate+R
ここで、NはGOP内のピクチャの総数、frame_rateはフレームレートで、1秒間に表示される画面の枚数を表す。
R = Rtarget × N / frame_rate + R
Here, N is the total number of pictures in the GOP, and frame_rate is the frame rate, representing the number of screens displayed per second.

次のステップでは、Iピクチャ、Pピクチャ及びBピクチャ内のj番目のマクロブロックを符号化する時のバッファ占有量di(j)、dp(j)及びdb(j)を、それぞれ以下の式により算出する。   In the next step, the buffer occupancy di (j), dp (j), and db (j) when encoding the j-th macroblock in the I picture, P picture, and B picture are expressed by the following equations, respectively. calculate.

di(j)=di(0)+B(j−1)−Ti×(j−1)/NMB
dp(j)=dp(0)+B(j−1)−Tp×(j−1)/NMB
db(j)=db(0)+B(j−1)−Tb×(j−1)/NMB
ここで、B(j−1)は、(j−1)番目のマクロブロックまでの全マクロブロックの発生符号量であり、NMBはピクチャ内のマクロブロック数である。また、di(0)、dp(0)及びdb(0)は、それぞれIピクチャ、Pピクチャ及びBピクチャのバッファ占有量の初期値であり、以下の式で与えられる。
di (j) = di (0) + B (j-1) -Ti * (j-1) / NMB
dp (j) = dp (0) + B (j−1) −Tp × (j−1) / NMB
db (j) = db (0) + B (j−1) −Tb × (j−1) / NMB
Here, B (j−1) is the generated code amount of all macroblocks up to the (j−1) th macroblock, and NMB is the number of macroblocks in the picture. Further, di (0), dp (0), and db (0) are initial values of buffer occupancy amounts of I picture, P picture, and B picture, respectively, and are given by the following equations.

di(0)=10×r/31
dp(0)=Kp×di(0)
db(0)=Kb×di(0)
ここで、rはリアクションパラメータと呼ばれ、以下の式で与えられる。
di (0) = 10 × r / 31
dp (0) = Kp × di (0)
db (0) = Kb × di (0)
Here, r is called a reaction parameter and is given by the following equation.

r=2×Rtarget/frame_rate
また、Iピクチャ、Pピクチャ及びBピクチャの符号化終了時のバッファ占有量、すなわちNMB番目のマクロブロックを符号化した時のバッファ占有量di(NMB)、dp(NMB)及びdb(NMB)は、ピクチャタイプごとに次回符号化する時のバッファ占有量の初期値di(0)、dp(0)及びdb(0)として用いられる。
r = 2 × Rtarget / frame_rate
Also, the buffer occupancy at the end of encoding of the I picture, P picture, and B picture, that is, the buffer occupancy di (NMB), dp (NMB), and db (NMB) when the NMB-th macroblock is encoded are These are used as initial values di (0), dp (0), and db (0) of the buffer occupancy for the next encoding for each picture type.

次のステップでは、バッファの占有量d(j)から、ピクチャタイプごとにj番目のマクロブロックを量子化するための量子化スケールを以下の式により求める。   In the next step, a quantization scale for quantizing the j-th macroblock for each picture type is obtained from the buffer occupancy d (j) by the following equation.

Q(j)=d(j)×31/r
次のステップでは、ピクチャ内のマクロブロックの符号化をNMB番目のマクロブロックまで終了したか否かを判断し、終了した場合には次のステップへ進み、終了していない場合にはマクロブロック符号化時のバッファ占有量算出ステップへ戻り、以下の処理を繰り返す。
Q (j) = d (j) × 31 / r
In the next step, it is determined whether or not the encoding of the macroblock in the picture has been completed up to the NMB-th macroblock, and if completed, the process proceeds to the next step, and if not completed, the macroblock code is determined. Return to the buffer occupancy calculation step at the time of conversion, and repeat the following processing.

次に、符号化対象のピクチャすべてを符号化し終えたか否かを判断し、すべて符号化し終えている場合には処理を終了し、符号化し終えていない場合にはピクチャ複雑度算出ステップに戻り、以下の処理を繰り返す。
特開2001−128175号公報(第7−8頁、図1)
Next, it is determined whether or not all the pictures to be encoded have been encoded. If all the encoding has been completed, the process ends.If not all have been encoded, the process returns to the picture complexity calculation step. The following process is repeated.
Japanese Patent Laying-Open No. 2001-128175 (page 7-8, FIG. 1)

しかしながら、前記従来の動画像ビットレート変換方法においては、原画像からの圧縮符号化を行う際の符号量制御を行っているために、GOPの構造を解析し、ピクチャタイプごとの複雑度を演算して割当て符号量を求め、バッファ占有量が一定となるように符号量制御を行っている。   However, in the conventional moving image bit rate conversion method, since the code amount control is performed when performing compression encoding from the original image, the GOP structure is analyzed and the complexity for each picture type is calculated. Thus, the allocated code amount is obtained, and the code amount control is performed so that the buffer occupation amount becomes constant.

このため、GOP構造の解析が必要となるため、処理遅延が大きくなり、また回路構成が複雑になるという課題を有していた。   For this reason, since analysis of the GOP structure is required, there is a problem that processing delay increases and the circuit configuration becomes complicated.

本発明の動画像ビットレート変換方法及び装置は、前記従来の課題を解決するもので、圧縮符号化された動画像ビットストリームの入力符号量情報をもとに目標ビットレートに保った符号量の削減を行うことができ、回路規模を増大させずに符号量削減を行うことが可能な動画像ビットレート変換方法及びその装置、ならびに記録媒体を提供することを目的とする。   The moving picture bit rate conversion method and apparatus according to the present invention solves the above-described conventional problems, and the code amount of the code amount maintained at the target bit rate based on the input code amount information of the compressed and coded moving picture bit stream. It is an object of the present invention to provide a moving image bit rate conversion method and apparatus, and a recording medium that can reduce the amount of code without increasing the circuit scale.

前記従来の課題を解決するために、本発明の請求項1に記載の動画像ビットレート変換方法は、所定の符号量制御単位ごとに動画像ビットストリームの入力符号量と出力符号量をカウントするステップと、前記入力符号量と所定の符号量削減率から目標符号量を演算するステップと、前記目標符号量と前記出力符号量との符号量誤差を演算するステップと、ピクチャタイプごとに前記符号量誤差の累積演算を行うステップと、前記累積符号量誤差を平滑化するステップと、前記平滑化した累積符号量誤差からピクチャタイプごとに符号量削減パラメータを演算するステップと、動画像ビットストリームを所定の符号量制御単位ごとに可変長復号化して逆量子化した離散コサイン変換系数列を、前記符号量削減パラメータにより再量子化して離散コサイン変換系数列の削減を行い、可変長符号化することにより符号量削減を行うステップとを備え、前記符号量削減パラメータは、再量子化時に量子化スケールに加算する値を指定するパラメータと量子化丸め処理時に離散コサイン変換系数列に加算する値を指定するパラメータと離散コサイン変換係数列を削減する数を指定するパラメータとを含み、符号量削減パラメータを制御することにより、動画像ビットストリームを所望のビットレートに変換するようにしたものである。   In order to solve the conventional problem, the moving image bit rate conversion method according to claim 1 of the present invention counts an input code amount and an output code amount of a moving image bit stream for each predetermined code amount control unit. A step of calculating a target code amount from the input code amount and a predetermined code amount reduction rate, a step of calculating a code amount error between the target code amount and the output code amount, and the code for each picture type A step of performing a cumulative calculation of a quantity error, a step of smoothing the cumulative code quantity error, a step of calculating a code quantity reduction parameter for each picture type from the smoothed cumulative code quantity error, and a moving picture bitstream A discrete cosine transform sequence that has been subjected to variable length decoding and inverse quantization for each predetermined code amount control unit is requantized and separated by the code amount reduction parameter. A code amount reduction step by reducing cosine transform series and performing variable length coding, wherein the code amount reduction parameter is a parameter for specifying a value to be added to a quantization scale during requantization and a quantum Including a parameter for specifying a value to be added to the discrete cosine transform series and a parameter for specifying the number to reduce the discrete cosine transform coefficient sequence, and by controlling the code amount reduction parameter, This is converted to a desired bit rate.

この方法により、あらかじめ細かいビットレート単位で符号量制御できるように符号量削減パラメータを設定しているので、所定の符号量制御単位ごとに低遅延の処理で所望のビットレートに保つように最適な符号量制御を行うことができる。   By this method, the code amount reduction parameter is set in advance so that the code amount can be controlled in units of a fine bit rate. Therefore, it is optimal to maintain a desired bit rate with low delay processing for each predetermined code amount control unit. Code amount control can be performed.

本発明の請求項2に記載の動画像ビットレート変換方法は、符号量削減パラメータを、離散コサイン変換系数列の係数削減による符号量削減を行った後、量子化スケールに値を加算して符号量削減を行うように設定するようにしたものである。   In the moving image bit rate conversion method according to the second aspect of the present invention, the code amount reduction parameter is obtained by reducing the code amount by reducing the coefficient of the discrete cosine transform series, and then adding the value to the quantization scale. It is set to reduce the amount.

この方法により、符号量削減指示を行う符号量削減パラメータを細かいビットレート単位で設定することができる。   By this method, the code amount reduction parameter for instructing the code amount reduction can be set in units of fine bit rates.

本発明の請求項3に記載の動画像ビットレート変換方法は、符号量削減パラメータを、量子化スケールを1加算して再量子化する際の丸め処理時に、量子化丸め補正値を加算する量子化丸め補正パラメータを変化させた後、量子化スケールを2以上加算するように設定するようにしたものである。   According to a third aspect of the present invention, there is provided a moving picture bit rate conversion method in which a quantization rounding correction value is added during rounding processing when a code amount reduction parameter is requantized by adding a quantization scale by one. The quantization rounding correction parameter is changed, and then the quantization scale is set to be added by 2 or more.

この方法により、符号量削減指示を行う符号量削減パラメータを細かいビットレート単位で設定することができる。   By this method, the code amount reduction parameter for instructing the code amount reduction can be set in units of fine bit rates.

本発明の請求項4に記載の動画像ビットレート変換方法は、符号量削減パラメータを、累積符号量誤差をピクチャタイプごとに定めた制御単位符号量で除算することにより求めるようにしたものである。   The moving image bit rate conversion method according to claim 4 of the present invention is such that the code amount reduction parameter is obtained by dividing the accumulated code amount error by the control unit code amount determined for each picture type. .

この方法により、ピクチャタイプごとにそれぞれのピクチャの符号量特性に応じて符号量制御を行うことができる。   By this method, code amount control can be performed according to the code amount characteristic of each picture for each picture type.

本発明の請求項5に記載の動画像ビットレート変換方法は、制御単位符号量を、制御単位当たりの平均入力符号量を符号量削減パラメータ数で除算し、ピクチャタイプごとの符号量比率を乗算した値であるように設定するようにしたものである。   The moving image bit rate conversion method according to claim 5 of the present invention divides the control unit code amount by dividing the average input code amount per control unit by the number of code amount reduction parameters and multiplying by the code amount ratio for each picture type. The value is set so as to be the same value.

この方法により、ピクチャタイプごとにそれぞれのピクチャの符号量特性に応じて符号量制御を行うことができる。   By this method, code amount control can be performed according to the code amount characteristic of each picture for each picture type.

本発明の請求項6に記載の動画像ビットレート変換方法は、制御単位符号量は、ピクチャタイプごとの符号量比率を固定の符号量比率として仮定し、あらかじめ定めておくように設定するようにしたものである。   In the moving image bit rate conversion method according to claim 6 of the present invention, the control unit code amount is set to be determined in advance assuming that the code amount ratio for each picture type is a fixed code amount ratio. It is what.

この方法により、符号量を検出するごとに符号量比率を演算する必要がなくなるので、回路規模を削減することができる。   This method eliminates the need to calculate the code amount ratio each time the code amount is detected, thereby reducing the circuit scale.

本発明の請求項7に記載の動画像ビットレート変換方法は、所定の制御単位は、スライス単位であるように設定するようにしたものである。   In the moving image bit rate conversion method according to the seventh aspect of the present invention, the predetermined control unit is set to be a slice unit.

この方法により、スライス単位で符号量制御を行うことができ、ビットレート変換の処理遅延を小さくすることができる。   With this method, code amount control can be performed in units of slices, and the processing delay of bit rate conversion can be reduced.

本発明の請求項8に記載の動画像ビットレート変換方法は、所定の制御単位は、マクロブロック単位であるように設定するようにしたものである。   In the moving picture bit rate conversion method according to the eighth aspect of the present invention, the predetermined control unit is set to be a macroblock unit.

この方法により、マクロブロック単位で符号量制御を行うことができ、ビットレート変換の処理遅延を小さくすることができる。   By this method, code amount control can be performed in units of macro blocks, and the processing delay of bit rate conversion can be reduced.

本発明の請求項9に記載の動画像ビットレート変換方法は、所定の符号量検出単位ごとに動画像ビットストリームの入力符号量をカウントするステップと、前記所定の符号量検出単位ごとに動画像ビットストリーム中の可変長符号量をカウントするステップと、ビットレート削減率、前記入力符号量及び前記可変長符号量から所定の符号量検出単位に非削減ビット列を除く符号量削減率を演算するようにしたものである。   The moving image bit rate conversion method according to claim 9 of the present invention includes a step of counting an input code amount of a moving image bit stream for each predetermined code amount detection unit, and a moving image for each predetermined code amount detection unit. A step of counting the variable length code amount in the bitstream, and calculating a code amount reduction rate excluding the non-reduced bit string in a predetermined code amount detection unit from the bit rate reduction rate, the input code amount and the variable length code amount It is a thing.

この方法により、非削減ビット列を除く正確な符号量削減率を元に符号量制御を行うことができ、所望の目標ビットレートに符号量削減したビットストリームを出力することができる。   By this method, code amount control can be performed based on an accurate code amount reduction rate excluding non-reduced bit strings, and a bit stream with a code amount reduced to a desired target bit rate can be output.

本発明の請求項10に記載の動画像ビットレート変換方法は、動画像ビットストリームがMPEG2−TSである場合には、符号量検出単位ごとのMPEG2−TSパケット数をカウントし、MPEG2−TSパケット数から入力符号量を算出して、所定の符号量検出単位に非削減ビット列を除く符号量削減率を演算するようにしたものである。   In the moving image bit rate conversion method according to claim 10 of the present invention, when the moving image bit stream is MPEG2-TS, the number of MPEG2-TS packets for each code amount detection unit is counted, and the MPEG2-TS packet is counted. The input code amount is calculated from the number, and the code amount reduction rate excluding the non-reduced bit string is calculated for a predetermined code amount detection unit.

この方法により、入力ビットストリームがMPEG2−TSであっても、非削減ビット列を除く正確な符号量削減率を元に符号量制御を行うことができ、所望の目標ビットレートに符号量削減したビットストリームを出力することができる。   By this method, even if the input bit stream is MPEG2-TS, it is possible to perform code amount control based on an accurate code amount reduction rate excluding non-reduced bit strings, and to reduce the bit amount to a desired target bit rate. A stream can be output.

本発明の請求項11に記載の動画像ビットレート変換方法は、所定の符号量検出単位はピクチャ単位であるように設定したものである。   In the moving image bit rate conversion method according to the eleventh aspect of the present invention, the predetermined code amount detection unit is set to be a picture unit.

この方法により、ピクチャ単位ごとに所望の目標ビットレートを出力するための符号量削減率を求めることができる。   By this method, it is possible to obtain a code amount reduction rate for outputting a desired target bit rate for each picture unit.

本発明の請求項12に記載の動画像ビットレート変換方法は、符号量削減パラメータがあらかじめ設定した下限の値であるにもかかわらず、累積した符号量誤差が所定の符号量制御単位ごとに増加している場合には、ピクチャタイプごとの目標符号量を目標符号量比率により補正し、出力符号量を削減するようにしたものである。   In the moving image bit rate conversion method according to claim 12 of the present invention, the accumulated code amount error increases for each predetermined code amount control unit even though the code amount reduction parameter is a preset lower limit value. In this case, the target code amount for each picture type is corrected by the target code amount ratio, and the output code amount is reduced.

この方法により、目標ビットレートが低く、ピクチャタイプによっては符号量を削減できない場合においても、ピクチャタイプごとの目標符号量比率を補正することにより、ビットストリーム全体のビットレートを所望の目標ビットレートに削減することができる。   By this method, even when the target bit rate is low and the code amount cannot be reduced depending on the picture type, the bit rate of the entire bit stream is adjusted to the desired target bit rate by correcting the target code amount ratio for each picture type. Can be reduced.

本発明の請求項13に記載の動画像ビットレート変換方法は、初期状態においてピクチャタイプごとの目標符号量比率が同一であり、前記符号量削減パラメータがあらかじめ設定した下限の値であるにもかかわらず、累積した符号量誤差が所定の符号量制御単位ごとに増加している場合には、Pピクチャの目標符号量比率を下げて出力符号量を削減するようにしたものである。   In the moving image bit rate conversion method according to the thirteenth aspect of the present invention, although the target code amount ratio for each picture type is the same in the initial state, the code amount reduction parameter is a preset lower limit value. If the accumulated code amount error increases for each predetermined code amount control unit, the output code amount is reduced by lowering the target code amount ratio of the P picture.

この方法により、目標ビットレートが低く、ピクチャタイプによっては符号量を削減できない場合においても、Pピクチャの目標符号量比率を削減することにより、最低限の画質を保ったまま、ビットストリーム全体のビットレートを所望の目標ビットレートに削減することができる。   By this method, even when the target bit rate is low and the code amount cannot be reduced depending on the picture type, by reducing the target code amount ratio of the P picture, the bit of the entire bit stream is maintained while maintaining the minimum image quality. The rate can be reduced to the desired target bit rate.

本発明の請求項14に記載の動画像ビットレート変換方法は、Pピクチャの目標符号量をBピクチャの目標符号量まで下げた時点で、なおかつ累積した符号量誤差が所定の符号量制御単位ごとに増加している場合には、Iピクチャの目標符号量比率を下げて出力符号量を削減するようにしたものである。   In the moving picture bit rate conversion method according to the fourteenth aspect of the present invention, when the target code amount of the P picture is lowered to the target code amount of the B picture, the accumulated code amount error is determined every predetermined code amount control unit. Is increased, the output code amount is reduced by lowering the target code amount ratio of the I picture.

この方法により、目標ビットレートが低く、Pピクチャの目標符号量比率を下げただけでは符号量を削減できない場合においても、Iピクチャの目標符号量比率を削減することにより、ビットストリーム全体のビットレートを所望の目標ビットレートに削減することができる。   By this method, even when the target bit rate is low and the code amount cannot be reduced only by reducing the target code amount ratio of the P picture, the bit rate of the entire bit stream can be reduced by reducing the target code amount ratio of the I picture. Can be reduced to a desired target bit rate.

本発明の請求項15に記載の動画像ビットレート変換方法は、前記目標符号量比率を、入力ビットストリーム中のGOP単位ごとにピクチャタイプ別の平均符号量から平均符号量比率を演算し、前記平均符号量比率をもとに補正するピクチャタイプごとの目標符号量比率を演算するようにしたものである。   The moving image bit rate conversion method according to claim 15 of the present invention calculates the target code amount ratio from an average code amount for each picture type for each GOP unit in an input bitstream, and The target code amount ratio for each picture type to be corrected is calculated based on the average code amount ratio.

この方法により、ビットストリーム中のピクチャタイプごとの符号量比率特性に応じた目標符号量比率の補正値を求めることができる。   By this method, it is possible to obtain a correction value of the target code amount ratio according to the code amount ratio characteristic for each picture type in the bitstream.

本発明の請求項16に記載の動画像ビットレート変換方法は、前記目標符号量比率を、入力されるピクチャタイプごとの符号量比率が固定であると仮定し、前記ピクチャタイプごとの符号量比率をもとに補正するピクチャタイプごとの目標符号量比率をあらかじめ演算して保有するようにしたものである。   The moving image bit rate conversion method according to claim 16 of the present invention assumes that the target code amount ratio is a fixed code amount ratio for each input picture type, and the code amount ratio for each picture type is fixed. Based on the above, a target code amount ratio for each picture type to be corrected is calculated and held in advance.

この方法により、符号量検出ごとに目標符号量補正値を演算する必要がなく、回路規模を削減することができる。   With this method, it is not necessary to calculate the target code amount correction value every time the code amount is detected, and the circuit scale can be reduced.

本発明の請求項17に記載の動画像ビットレート変換方法は、1GOPあるいは複数のGOPを符号量補正単位とし、前記符号量補正単位ごとに、目標符号量比率により補正した目標符号量と目標符号量の誤差累積して全誤差補正量を演算し、前記全誤差補正量をピクチャタイプ別目標符号量比率で分割してピクチャタイプ別の誤差補正量を演算し、次の符号量補正単位で符号量制御単位ごとに前記ピクチャタイプ別の誤差補正量を分散して目標符号量を補正するようにしたものである。   According to a seventeenth aspect of the present invention, there is provided a moving image bit rate conversion method in which one GOP or a plurality of GOPs is used as a code amount correction unit, and a target code amount and a target code corrected by a target code amount ratio for each code amount correction unit The total error correction amount is calculated by accumulating the amount error, and the total error correction amount is divided by the target code amount ratio for each picture type to calculate the error correction amount for each picture type. The target code amount is corrected by distributing the error correction amount for each picture type for each amount control unit.

この方法により、1GOPあるいは複数のGOP単位で生ずる目標符号量の誤差を補正することができる。   By this method, it is possible to correct a target code amount error that occurs in one GOP or a plurality of GOP units.

本発明の請求項18に記載の動画像ビットレート変換方法は、異なる符号量削減パラメータを用いて符号量削減を行う複数のステップと、符号量削減を行った複数の出力符号量の中から、目標符号量を下回り、目標符号量に最も近い出力符号量を出力した符号量削減パラメータを選択するステップとを備えるようにしたものである。   The moving image bit rate conversion method according to claim 18 of the present invention includes a plurality of steps for performing code amount reduction using different code amount reduction parameters, and a plurality of output code amounts for which code amount reduction has been performed. And a step of selecting a code amount reduction parameter that outputs an output code amount that is less than the target code amount and is closest to the target code amount.

この方法により、ビットレート変換直後の符号量削減パラメータとして、元のビットレートから符号量制御を行う場合と比較して、高速かつ安定的に引き込む符号量制御が可能となる。また、ビットレート変換直後に、目標符号量より低い出力符号量のビットストリームを出力しているので、ネットワークの伝送帯域が不足している場合などには有効である。   By this method, it is possible to control the code amount to be pulled in stably and at high speed as compared with the case of performing the code amount control from the original bit rate as the code amount reduction parameter immediately after the bit rate conversion. Also, since a bit stream having an output code amount lower than the target code amount is output immediately after bit rate conversion, it is effective when the transmission band of the network is insufficient.

本発明の請求項19に記載の動画像ビットレート変換方法は、異なる符号量削減パラメータを順次用いて符号量制御単位ごとに符号量削減を行うステップと、符号量制御単位ごとに出力符号量を検出し、符号量削減パラメータとともに保持するステップと、保持した複数の出力符号量の中から目標符号量を下回り、目標符号量に最も近い出力符号量を出力した符号量削減パラメータ選択するステップとを備えるようにしたものである。   According to a nineteenth aspect of the present invention, there is provided a moving image bit rate conversion method comprising: a step of performing code amount reduction for each code amount control unit by sequentially using different code amount reduction parameters; and an output code amount for each code amount control unit. Detecting and holding together with a code amount reduction parameter, and selecting a code amount reduction parameter that outputs an output code amount that is less than the target code amount and is closest to the target code amount from among the plurality of held output code amounts. It is intended to provide.

この方法により、ビットレート変換直後の符号量削減パラメータとして、元のビットレートから符号量制御を行う場合と比較して、高速かつ安定的に引き込む符号量制御が可能となる。また、ビットレート変換直後に、目標符号量より低い出力符号量のビットストリームを出力しているので、ネットワークの伝送帯域が不足している場合などには有効である。   By this method, it is possible to control the code amount to be pulled in stably and at high speed as compared with the case of performing the code amount control from the original bit rate as the code amount reduction parameter immediately after the bit rate conversion. Also, since a bit stream having an output code amount lower than the target code amount is output immediately after bit rate conversion, it is effective when the transmission band of the network is insufficient.

本発明の請求項20に記載の動画像ビットレート変換装置は、直交変換を用いて圧縮符号化された動画像ビットストリームを入力とし、所望のビットレートに変換して出力する動画像ビットレート変換装置であって、所定の符号量制御単位ごとに入力された動画像ビットストリームの入力符号量をカウントする入力符号量検出部と、所定の符号量制御単位ごとに出力する動画像ビットストリームの出力符号量をカウントする出力符号量検出部と、前記入力符号量と与えられた符号量削減率から目標符号量を演算する目標符号量演算部と、前記目標符号量と前記出力符号量の符号量誤差を演算する符号量誤差演算部と、ピクチャタイプごとに前記符号量誤差の累積演算を行う符号量誤差累積演算部と、前記累積した符号量誤差を平滑化する符号量誤差平滑化部と、前記平滑化した累積符号量誤差から符号量削減パラメータを演算する符号量削減パラメータ演算部と、動画像ビットストリームを所定の符号量制御単位ごとに可変長復号化して逆量子化した離散コサイン変換系数列を、前記符号量削減パラメータにより再量子化して離散コサイン変換系数列の削減を行い、可変長符号化することにより符号量削減を行う符号量削減部とを有し、前記符号量削減パラメータは、再量子化時に量子化スケールに加算する値を指定するパラメータと量子化丸め処理時に離散コサイン変換系数列に加算する値を指定するパラメータと離散コサイン変換係数列を削減する数を指定するパラメータとを含むように設定したものである。   The moving image bit rate conversion apparatus according to claim 20 of the present invention receives a moving image bit stream compressed and encoded using orthogonal transformation, converts the moving image bit rate to a desired bit rate, and outputs the converted moving image bit rate. An input code amount detection unit that counts an input code amount of a moving image bit stream input for each predetermined code amount control unit, and an output of a moving image bit stream that is output for each predetermined code amount control unit An output code amount detection unit that counts a code amount; a target code amount calculation unit that calculates a target code amount from the input code amount and a given code amount reduction rate; and a code amount of the target code amount and the output code amount A code amount error calculating unit for calculating an error, a code amount error accumulating unit for accumulating the code amount error for each picture type, and a code for smoothing the accumulated code amount error An error smoothing unit, a code amount reduction parameter calculation unit for calculating a code amount reduction parameter from the smoothed accumulated code amount error, and variable-length decoding the video bitstream for each predetermined code amount control unit to perform inverse quantum A code amount reduction unit that reduces the amount of code by requantizing the discrete cosine transform system sequence that has been converted, requantizing the code amount reduction parameter, and performing variable-length coding. The code amount reduction parameter reduces a parameter for specifying a value to be added to the quantization scale at the time of requantization, a parameter for specifying a value to be added to the discrete cosine transform series in the quantization rounding process, and a discrete cosine transform coefficient sequence. And a parameter that specifies the number.

本構成により、あらかじめ細かいビットレート単位で符号量制御できるように符号量削減パラメータを設定しているので、所定の符号量制御単位ごとに低遅延の処理で所望のビットレートに保つように符号量制御を行い、目標ビットレートに変換した動画像ビットストリームを出力することができる。   With this configuration, since the code amount reduction parameter is set in advance so that the code amount can be controlled in units of fine bit rate, the code amount is set so as to maintain the desired bit rate with low delay processing for each predetermined code amount control unit. It is possible to perform control and output a moving image bit stream converted to a target bit rate.

本発明の請求項21に記載の動画像ビットレート変換装置は、動画像ビットストリーム及びビットレート削減率を入力とし、所定の符号量検出単位の先頭を検出する単位コード検出部と、所定の符号量単位ごとに入力された動画像ビットストリームの入力符号量をカウントする符号量検出部と、所定の符号量単位ごとに入力された動画像ビットストリームの中の入力可変長符号量をカウントする可変長符号量検出部と、前記入力符号量、前記入力可変長符号量、及び与えられたビットレート削減率から符号量削減率を演算する符号量削減率演算部とを備え、前記符号量削減率を前記目標符号量演算部へ出力するように設定したものである。   A moving picture bit rate conversion apparatus according to a twenty-first aspect of the present invention includes a unit code detection unit that receives a moving picture bit stream and a bit rate reduction rate and detects a head of a predetermined code amount detection unit, and a predetermined code. A code amount detection unit that counts the input code amount of a moving image bit stream input for each unit of quantity, and a variable that counts an input variable length code amount in a moving image bit stream input for each predetermined code amount unit A long code amount detection unit; and a code amount reduction rate calculating unit that calculates a code amount reduction rate from the input code amount, the input variable length code amount, and a given bit rate reduction rate, and the code amount reduction rate Is set to be output to the target code amount calculation unit.

本構成により、非削減ビット列を除く正確な符号量削減率を元に符号量制御を行うことができ、所望の目標ビットレートに符号量削減したビットストリームを出力することができる。   With this configuration, it is possible to perform code amount control based on an accurate code amount reduction rate excluding non-reduced bit strings, and to output a bit stream with the code amount reduced to a desired target bit rate.

本発明の請求項22に記載の動画像ビットレート変換装置は、請求項20に記載の動画像ビットレート変換装置において、符号量削減パラメータが下限に達したにもかかわらず、累積符号量誤差が増加していると判断した場合に、符号量削減パラメータ演算部から比率変更指示を受け、前記目標符号量のピクチャタイプごとの比率を補正する目標符号量比率補正部と、前記目標符号量と前記ピクチャタイプごとの比率を補正した目標符号量との符号量誤差を補正する目標符号量誤差補正部とを備え、前記補正した目標符号量を符号量誤差演算部に出力するように設定したものである。   The moving image bit rate conversion device according to claim 22 of the present invention is the moving image bit rate conversion device according to claim 20, wherein the accumulated code amount error is increased even though the code amount reduction parameter reaches the lower limit. A target code amount ratio correction unit that receives a ratio change instruction from the code amount reduction parameter calculation unit and corrects the ratio of the target code amount for each picture type, and determines that the target code amount and the target code amount A target code amount error correction unit that corrects a code amount error with a target code amount whose ratio for each picture type is corrected, and is set to output the corrected target code amount to a code amount error calculation unit. is there.

本構成により、目標ビットレートが低く、ピクチャタイプによっては符号量を削減できない場合においても、ピクチャタイプごとの目標符号量比率を補正することにより、ビットストリーム全体のビットレートを所望の目標ビットレートに削減することができる。   With this configuration, even when the target bit rate is low and the code amount cannot be reduced depending on the picture type, the bit rate of the entire bit stream is set to the desired target bit rate by correcting the target code amount ratio for each picture type. Can be reduced.

本発明の請求項23に記載の動画像ビットレート変換装置は、請求項20に記載の動画像ビットレート変換装置において、複数の符号量削減パラメータの初期値を記憶する符号量削減パラメータ記憶部と、前記符号量削減パラメータの初期値あるいは符号量削減パラメータ演算部の出力である符号量削減パラメータを用いてそれぞれ符号量の削減を行う複数の符号量削減部と、複数の符号量削減部から1つを選択するスイッチ部とを備え、ビットレート変換時に、前記複数の符号量削減部の出力から目標符号量を下回り、かつ目標符号量に最も近い出力符号量を出力する符号量削減部を選択し、以降選択された符号量削減部は符号量削減パラメータ演算部の出力である符号量削減パラメータを用いて符号量削減を行うように設定したものである。   A moving picture bit rate conversion apparatus according to a twenty-third aspect of the present invention is the moving picture bit rate conversion apparatus according to the twentieth aspect, wherein a coding amount reduction parameter storage unit stores initial values of a plurality of coding amount reduction parameters. A plurality of code amount reduction units that respectively reduce the code amount using a code amount reduction parameter that is an initial value of the code amount reduction parameter or an output of the code amount reduction parameter calculation unit; and a plurality of code amount reduction units A code amount reduction unit that outputs an output code amount that is less than the target code amount and is closest to the target code amount from the outputs of the plurality of code amount reduction units at the time of bit rate conversion The code amount reduction unit selected thereafter is set to perform code amount reduction using the code amount reduction parameter output from the code amount reduction parameter calculation unit. .

本構成により、ビットレート変換直後の符号量削減パラメータとして、元のビットレートから符号量制御を行う場合と比較して、高速かつ安定的に引き込む符号量制御が可能となる。   With this configuration, as a code amount reduction parameter immediately after bit rate conversion, it is possible to control the code amount to be pulled in stably at a higher speed than in the case where the code amount control is performed from the original bit rate.

本発明の請求項24に記載の動画像ビットレート変換装置は、請求項20に記載の動画像ビットレート変換装置において、複数の符号量削減パラメータの初期値を記憶する符号量削減パラメータ記憶部と、前記複数の符号量削減パラメータの初期値を順次用いて制御単位ごとに符号量削減を行う第1の符号量削減部と、前記第1の符号量削減部の出力符号量をカウントして、符号量削減パラメータとともに保持する出力符号量検出部と、符号量削減パラメータを用いて符号量削減を行う第2の符号量削減部とを備え、ビットレート変換時に、与えられた目標符号量により、前記複数の符号量削減パラメータを用いて符号量削減を行ったの出力符号量から目標符号量を下回り、かつ目標符号量に最も近い出力符号量を出力する符号量削減パラメータを選択し、前記第2の符号量削減部は、ビットレート変換時に、前記選択した符号量削減パラメータを用い、それ以外の場合は、符号量削減パラメータ演算部の出力である符号量削減パラメータを用いて符号量削減を行うように設定したものである。   A moving image bit rate conversion device according to a twenty-fourth aspect of the present invention is the moving image bit rate conversion device according to the twentieth aspect, wherein a code amount reduction parameter storage unit stores initial values of a plurality of code amount reduction parameters; A first code amount reduction unit that performs code amount reduction for each control unit by sequentially using initial values of the plurality of code amount reduction parameters, and counts the output code amount of the first code amount reduction unit, An output code amount detection unit that is held together with a code amount reduction parameter, and a second code amount reduction unit that performs code amount reduction using the code amount reduction parameter, according to a given target code amount at the time of bit rate conversion, A code amount reduction parameter that outputs an output code amount that is less than the target code amount and is closest to the target code amount from the output code amount that has been subjected to code amount reduction using the plurality of code amount reduction parameters. The second code amount reduction unit uses the selected code amount reduction parameter at the time of bit rate conversion; otherwise, the code amount reduction parameter that is the output of the code amount reduction parameter calculation unit Is set so as to reduce the code amount.

本構成により、ビットレート変換直後の符号量削減パラメータとして、元のビットレートから符号量制御を行う場合と比較して、高速かつ安定的に引き込む符号量制御が可能となる。   With this configuration, as a code amount reduction parameter immediately after bit rate conversion, it is possible to control the code amount to be pulled in stably at a higher speed than in the case where the code amount control is performed from the original bit rate.

本発明の請求項25に記載の動画像ビットレート変換装置は、請求項20に記載の動画像ビットレート変換装置において、複数の符号量削減パラメータの初期値を記憶する符号量削減パラメータ記憶部と、符号量削減パラメータ演算部から与えられる符号量削減パラメータを用いて符号量削減を行う第1の符号量削減部と、前記符号量削減パラメータの初期値を用いて符号量削減を行う第2の符号量削減部と、前記第2の符号量削減部が出力した出力ビットストリームの出力符号量を符号量制御単位ごとに検出し、符号量削減パラメータの初期値とともに保持する出力符号量検出保持部とを備え、ビットレート変換時に、前記出力符号量検出保持部が保持している出力符号量から目標符号量を下回り、目標符号量に最も近い出力符号量を得た符号量削減パラメータを選択し、前記第1の符号量削減部は、ビットレート変換時のみ、前記選択した符号量削減パラメータを用いて符号量削減を行うように設定したものである。   A moving image bit rate conversion device according to claim 25 of the present invention is the moving image bit rate conversion device according to claim 20, wherein a code amount reduction parameter storage unit stores initial values of a plurality of code amount reduction parameters; A first code amount reduction unit that performs code amount reduction using a code amount reduction parameter given from a code amount reduction parameter calculation unit; and a second code amount reduction that uses an initial value of the code amount reduction parameter A code amount reduction unit, and an output code amount detection holding unit that detects the output code amount of the output bitstream output from the second code amount reduction unit for each code amount control unit and holds it together with the initial value of the code amount reduction parameter And at the time of bit rate conversion, an output code amount that is less than the target code amount from the output code amount held by the output code amount detection holding unit and that is closest to the target code amount was obtained. Select issue reduction parameter, the first code amount reduction unit, the bit rate conversion during only is obtained by setting to perform reduction code amount using the selected code amount reduction parameter.

本構成により、ビットレート変換直後の符号量削減パラメータとして、元のビットレートから符号量制御を行う場合と比較して、高速かつ安定的に引き込む符号量制御が可能となる。   With this configuration, as a code amount reduction parameter immediately after bit rate conversion, it is possible to control the code amount to be pulled in stably at a higher speed than in the case where the code amount control is performed from the original bit rate.

本発明の請求項26に記載のプログラム記録媒体は、請求項1から請求項18までのいずれかに記載の動画像ビットストリーム変換方法が有する機能の全部または一部をコンピュータで実現するためのプログラムを格納するようにしたものである。   A program recording medium according to a twenty-sixth aspect of the present invention is a program for realizing all or part of the functions of the moving image bitstream conversion method according to any one of the first to eighteenth aspects of the present invention. Is stored.

本構成により、動画像ビットストリーム変換方法をハードウェアだけでなく、ソフトウェアで実現可能となる。   With this configuration, the moving image bitstream conversion method can be realized not only by hardware but also by software.

本発明の請求項27に記載の集積回路は、直交変換を用いて圧縮符号化された動画像ビットストリームを入力とし、請求項1から請求項19までのいずれかに記載の動画像ビットストリーム変換方法が有する機能の全部または一部を集積化した回路で実現し、所望のビットレートに変換した動画像ビットストリームを出力するようにしたものである。   An integrated circuit according to a twenty-seventh aspect of the present invention receives, as an input, a moving picture bitstream that has been compression-encoded using orthogonal transformation, and the moving picture bitstream conversion according to any one of the first to nineteenth aspects All or some of the functions of the method are realized by an integrated circuit, and a moving image bit stream converted to a desired bit rate is output.

本構成により、動画像ビットストリーム変換方法を集積化することにより、機器の小型化及び大幅なコストダウンが可能となる。   With this configuration, it is possible to reduce the size of the device and significantly reduce the cost by integrating the moving image bitstream conversion method.

本発明の動画像ビットレート変換方法によれば、動画像ビットストリームの入力符号量情報を元に、符号量制御単位ごとに入力符号量と符号量削減率から目標符号量を演算し、目標符号量と出力符号量の符号量誤差から符号量削減パラメータを符号量制御単位ごとに設定することができるので、簡単な回路構成で符号量制御を行い、目標ビットレートに符号量を削減することが可能となる。   According to the moving image bit rate conversion method of the present invention, the target code amount is calculated from the input code amount and the code amount reduction rate for each code amount control unit based on the input code amount information of the moving image bit stream, and the target code amount is calculated. Since the code amount reduction parameter can be set for each code amount control unit from the code amount error of the amount and the output code amount, it is possible to control the code amount with a simple circuit configuration and reduce the code amount to the target bit rate. It becomes possible.

さらに、本発明の動画像ビットレート変換方法によれば、量子化スケール変更、再量子化時の丸め閾値補正及び離散コサイン変換係数削による3つの符号量削減方式の組み合わせにより、ビットレート単位を細かく制御できるようにあらかじめ符号量削減パラメータを定めているので、目標ビットレートを一定に保つために最適な符号量制御を行うことが可能となる。   Furthermore, according to the moving picture bit rate conversion method of the present invention, the bit rate unit is finely divided by combining three code amount reduction methods by changing the quantization scale, correcting the rounding threshold at the time of requantization, and reducing the discrete cosine transform coefficient. Since the code amount reduction parameter is determined in advance so that control is possible, optimal code amount control can be performed in order to keep the target bit rate constant.

また、本発明の動画像ビットレート変換方法によれば、目標ビットレートが低く、ピクチャタイプによってはビットレートが下げられない場合には、ピクチャタイプごとの目標符号量比率を変更することで、最低限の画質を保ったまま、目標ビットレートに符号量削減を行うことが可能となる。   Further, according to the moving image bit rate conversion method of the present invention, when the target bit rate is low and the bit rate cannot be lowered depending on the picture type, the target code amount ratio for each picture type is changed, so that the minimum The code amount can be reduced to the target bit rate while maintaining the limited image quality.

以下本発明の実施の形態について、図面を参照しながら説明する。   Embodiments of the present invention will be described below with reference to the drawings.

(実施の形態1)
図1は、本発明の実施の形態1における動画像ビットレート変換装置の構成を示す。動画像ビットレート変換装置100は、入力された入力ビットストリームbs1を所定の目標ビットレートR_targetを有する出力ビットストリームbs2に変換して出力する。入力ビットストリームbs1は、例えば直交変換を用いた動画像圧縮方式であるMPEG2を用いて圧縮符号化された情報ストリーム、あるいは前記MPEG2を用いて圧縮符号化された情報ストリームをパケット化したMPEG2−PS(MPEG2 Program Stream)、あるいはMPEG2−TS(MPEG2 transport Stream)などである。
(Embodiment 1)
FIG. 1 shows a configuration of a moving image bit rate conversion apparatus according to Embodiment 1 of the present invention. The moving image bit rate conversion apparatus 100 converts the input bit stream bs1 that has been input into an output bit stream bs2 having a predetermined target bit rate R_target and outputs the result. The input bit stream bs1 is, for example, an MPEG2-PS obtained by packetizing an information stream compressed and encoded using MPEG2, which is a moving image compression method using orthogonal transform, or an information stream compressed and encoded using the MPEG2. (MPEG2 Program Stream) or MPEG2-TS (MPEG2 transport Stream).

図18は、以下で説明する各実施の形態において取り扱う圧縮符号化された動画像ビットストリームの階層構造を説明した図である。ここでは、一例としてMPEG2のビットストリームの説明を行う。図18において、MPEG2はシーケンス層、GOP(Group of Pictures)層、ピクチャ層、スライス層、マクロブロック層、ブロック層により構成される。本実施の形態において、ビットの削減を行うのはブロック層の可変長符号であり、それ以外の付加情報の削減は行わない。スライスヘッダ及びマクロブロックヘッダは量子化スケールコードを含み、当該スライス及びマクロブロックを量子化した時の量子化ステップを表す。   FIG. 18 is a diagram illustrating a hierarchical structure of a compression-coded moving image bitstream handled in each embodiment described below. Here, an MPEG2 bit stream will be described as an example. In FIG. 18, MPEG2 includes a sequence layer, a GOP (Group of Pictures) layer, a picture layer, a slice layer, a macroblock layer, and a block layer. In this embodiment, it is the variable-length code of the block layer that performs bit reduction, and no other additional information is reduced. The slice header and the macroblock header include a quantization scale code and represent a quantization step when the slice and the macroblock are quantized.

図1において、動画像ビットレート変換装置100は、入力ビットストリームbs1を入力とし、入力ビットストリームbs1の符号量を削減して出力ビットストリームbs2を出力する符号量削減部10、所定の制御単位ごとに入力ビットストリームbs1の符号量を検出する入力符号量検出部20、所定の制御単位ごとに出力ビットストリームbs2のビットレートを検出する出力符号量検出部30、所定の制御単位ごとに目標符号量を演算する目標符号量演算部40、入力符号量と出力符号量の誤差を演算する符号量誤差演算部51、符号量誤差を累積演算する符号量誤差累積演算部52、累積符号量誤差を平滑化する符号量誤差平滑化部53、及びレート変換パラメータを演算する符号量削減パラメータ演算部54により構成され、出力ビットストリームbs2を出力する。   In FIG. 1, a moving image bit rate conversion apparatus 100 receives an input bit stream bs1 and reduces the code amount of the input bit stream bs1, and outputs an output bit stream bs2, for each predetermined control unit. The input code amount detection unit 20 for detecting the code amount of the input bit stream bs1, the output code amount detection unit 30 for detecting the bit rate of the output bit stream bs2 for each predetermined control unit, and the target code amount for each predetermined control unit Code amount error calculation unit 51 for calculating an error between the input code amount and the output code amount, a code amount error accumulation calculation unit 52 for accumulating the code amount error, and smoothing the accumulated code amount error Code amount error smoothing unit 53 and code amount reduction parameter calculating unit 54 for calculating a rate conversion parameter, Outputting a force bitstream bs2.

図2に、符号量削減部10の詳細な構成を示す。符号量削減部10は、入力ビットストリームbs1を入力とし、可変長復号化部11、逆量子化部12、再量子化部13、係数削減部14、可変長符号化部15から構成され、出力ビットストリームbs2を出力する。再量子化部13及び係数削減部14は、出力ビットストリームのビットレートが所望のビットレートを保つように、図1に示す動画像ビットレート変換装置100の符号量削減パラメータ演算部54から符号量削減パラメータによる指示を受け、所定の符号量削減パラメータを用いて各々の処理を行う。   FIG. 2 shows a detailed configuration of the code amount reduction unit 10. The code amount reduction unit 10 receives the input bitstream bs1, and includes a variable length decoding unit 11, an inverse quantization unit 12, a requantization unit 13, a coefficient reduction unit 14, and a variable length coding unit 15, and outputs them. The bit stream bs2 is output. The requantization unit 13 and the coefficient reduction unit 14 transmit the code amount from the code amount reduction parameter calculation unit 54 of the moving image bit rate conversion apparatus 100 illustrated in FIG. 1 so that the bit rate of the output bitstream maintains a desired bit rate. In response to an instruction by a reduction parameter, each process is performed using a predetermined code amount reduction parameter.

以上のように構成された動画像ビットレート変換装置100の詳細な動作について説明する。動画像ビットレート変換装置100に入力された入力ビットストリームbs1は、まず入力符号量検出部20に入力される。   The detailed operation of the moving image bit rate conversion apparatus 100 configured as described above will be described. The input bit stream bs1 input to the moving image bit rate conversion apparatus 100 is first input to the input code amount detection unit 20.

入力符号量検出部20は、所定の制御単位ごとに入力ビットストリームbs1の符号量をカウントし、そのカウント結果、すなわち所定の制御単位ごとの入力符号量を目標符号量演算部40に出力する。ここで、所定の制御単位とは、MPEG2で定義されるストリーム構造のレイヤ単位であり、例えば、ピクチャ、スライスあるいはマクロブロック等の機能単位ごとに分割された単位である。以降、所定の制御単位をスライス単位として説明する。但し、制御単位はスライスに限定されるものではなく、マクロブロック単位であってもよい。   The input code amount detection unit 20 counts the code amount of the input bitstream bs1 for each predetermined control unit, and outputs the count result, that is, the input code amount for each predetermined control unit, to the target code amount calculation unit 40. Here, the predetermined control unit is a layer unit of a stream structure defined in MPEG2, for example, a unit divided for each functional unit such as a picture, a slice, or a macroblock. Hereinafter, the predetermined control unit will be described as a slice unit. However, the control unit is not limited to a slice, and may be a macroblock unit.

入力ビットストリームbs1は、同時に符号量削減部10に入力される。符号量削減部10は、符号量削減パラメータ演算部54からの指示により、所定の符号量削減パラメータを用いて符号量の削減を行う。図2に示す符号量削減部10の詳細な構成において、可変長復号化部11は、入力された入力ビットストリームbs1の可変長復号を行い、離散コサイン変換係数列を得て、逆量子化部12に出力する。   The input bit stream bs1 is input to the code amount reduction unit 10 at the same time. The code amount reduction unit 10 performs code amount reduction using a predetermined code amount reduction parameter according to an instruction from the code amount reduction parameter calculation unit 54. In the detailed configuration of the code amount reduction unit 10 illustrated in FIG. 2, the variable length decoding unit 11 performs variable length decoding of the input bit stream bs1 input to obtain a discrete cosine transform coefficient sequence, and an inverse quantization unit 12 is output.

逆量子化部12は、可変長復号化部11で得られた離散コサイン変換係数列をビットストリーム中に記載されている量子化スケールにより逆量子化する。逆量子化部12はこの逆量子化された離散コサイン変換系数列を再量子化部13に出力する。   The inverse quantization unit 12 inversely quantizes the discrete cosine transform coefficient sequence obtained by the variable length decoding unit 11 using a quantization scale described in the bitstream. The inverse quantization unit 12 outputs the inversely quantized discrete cosine transform system sequence to the requantization unit 13.

再量子化部13は、逆量子化部12で逆量子化の際に用いた量子化スケールに、符号量削減パラメータ演算部54より与えられた符号量削減パラメータで示された量子化パラメータ値を加算した量子化スケールにより離散コサイン変換系数列を再量子化する。再量子化部13は、再量子化した離散コサイン変換系数列を係数削減部14へ出力する。   The requantization unit 13 adds the quantization parameter value indicated by the code amount reduction parameter given from the code amount reduction parameter calculation unit 54 to the quantization scale used in the inverse quantization by the inverse quantization unit 12. The discrete cosine transform series is requantized with the added quantization scale. The requantization unit 13 outputs the requantized discrete cosine transform system sequence to the coefficient reduction unit 14.

係数削減部14は、再量子化した離散コサイン変換系数列を、符号量削減パラメータ演算部54より与えられた符号量削減パラメータで示された係数削減パラメータにより削減する。   The coefficient reduction unit 14 reduces the requantized discrete cosine transform system sequence using the coefficient reduction parameter indicated by the code amount reduction parameter given from the code amount reduction parameter calculation unit 54.

この時、離散コサイン変換係数列を削減する方法について、図3を用いて説明する。図3は、現動画像を8画素×8ラインのブロックごとに分割して離散コサイン変換を行い、量子化した後、可変長符号化を行う際の離散コサイン変換係数のスキャン順序を示す。図3(a)はジグザグスキャンの順序を示す図であり、図3(b)はオルタネートスキャンの順序を示す図である。これらのスキャン順序はMPEG2により規格化されており、いずれのスキャン順序が採用されているかはビットストリーム中に記載されている。係数削減部14において、符号量削減パラメータの係数削減パラメータにより、スキャン順における所定の番号以降の離散コサイン変換系数列を0として、可変長符号化することにより、ビットレートを削減することが可能となる。   At this time, a method of reducing the discrete cosine transform coefficient sequence will be described with reference to FIG. FIG. 3 shows the scan order of the discrete cosine transform coefficients when the current moving image is divided into blocks of 8 pixels × 8 lines, subjected to discrete cosine transform, quantized, and then subjected to variable length coding. FIG. 3A is a diagram showing the order of zigzag scanning, and FIG. 3B is a diagram showing the order of alternate scanning. These scan orders are standardized by MPEG2, and which scan order is adopted is described in the bitstream. In the coefficient reduction unit 14, it is possible to reduce the bit rate by performing variable length coding with the coefficient cosine parameter of the code amount reduction parameter set to 0 as the discrete cosine transform system sequence after a predetermined number in the scan order. Become.

係数削減部14は、係数削減パラメータにより所定のスキャン順番号以降の離散コサイン変換係数を0に変換した離散コサイン変換系数列を可変長符号化部15へ出力する。   The coefficient reduction unit 14 outputs a discrete cosine transform system sequence obtained by converting the discrete cosine transform coefficients after a predetermined scan order number to 0 according to the coefficient reduction parameter to the variable length coding unit 15.

可変長符号化部15は、離散コサイン変換系数列を可変長符号化し、ビットレートを変換した出力ビットストリームbs2を出力する。   The variable length coding unit 15 performs variable length coding on the discrete cosine transform series and outputs an output bit stream bs2 obtained by converting the bit rate.

次に、目標符号量演算部40は、制御単位ごとの入力符号量と符号量削減率を乗算することにより目標符号量を演算する。符号量削減率は図示しないビットレート制御部などから与えられ、所望のビットレートを入力ビットストリームbs1の平均ビットレートで除算する方法により求めることができる。制御単位ごとに目標符号量を求めることで、GOPの構造を解析して目標符号量を割り当てる必要がなく、制御単位を最小単位として符号量制御を行うことができる。目標符号量演算部40は、求めた目標符号量を符号量誤差演算部51へ出力する。   Next, the target code amount calculation unit 40 calculates the target code amount by multiplying the input code amount for each control unit by the code amount reduction rate. The code amount reduction rate is given from a bit rate control unit (not shown) or the like, and can be obtained by a method of dividing a desired bit rate by the average bit rate of the input bit stream bs1. By obtaining the target code amount for each control unit, it is not necessary to analyze the GOP structure and assign the target code amount, and code amount control can be performed with the control unit as the minimum unit. The target code amount calculation unit 40 outputs the obtained target code amount to the code amount error calculation unit 51.

出力符号量検出部30は、入力符号量検出部20と同様、所定の制御単位ごとに符号量削減部10より出力されたビットストリームbs2の符号量をカウントする。カウントした出力符号量は符号量誤差演算部51へ出力する。   Similar to the input code amount detection unit 20, the output code amount detection unit 30 counts the code amount of the bit stream bs2 output from the code amount reduction unit 10 for each predetermined control unit. The counted output code amount is output to the code amount error calculation unit 51.

符号量誤差演算部51は、入力ビットストリームbs1を制御単位ごとに分割した入力符号量に対する目標符号量と、出力ビットストリームbs2中の同一制御単位における出力符号量の誤差符号量を演算する。例えば、制御単位をスライス単位とすれば、入力ビットストリームbs1中のGOPの先頭からm番目のピクチャのn番目のスライスの目標符号量がStarget(m,n)であり、出力ビットストリームbs2のGOPの先頭からm番目のピクチャのn番目のスライスの出力符号量がSout(m,n)である場合、Starget(m,n)−Sout(m,n)を演算する。符号量誤差演算部51は求めた符号量誤差を符号量誤差累積演算部52に出力する。   The code amount error calculation unit 51 calculates a target code amount for the input code amount obtained by dividing the input bit stream bs1 for each control unit and an error code amount of the output code amount in the same control unit in the output bit stream bs2. For example, if the control unit is a slice unit, the target code amount of the nth slice of the mth picture from the beginning of the GOP in the input bitstream bs1 is Target (m, n), and the GOP of the output bitstream bs2 When the output code amount of the nth slice of the mth picture from the beginning of S is Sout (m, n), Target (m, n) −Sout (m, n) is calculated. The code amount error calculation unit 51 outputs the obtained code amount error to the code amount error accumulation calculation unit 52.

符号量誤差累積演算部52は、符号量誤差演算部51で求めた符号量誤差をピクチャタイプごとに累積する。すなわち、Iピクチャ、Pピクチャ及びBピクチャのそれぞれのピクチャタイプに関して、符号量誤差演算部51から出力されるスライス単位ごとの符号量誤差を累積し、その演算結果である累積符号量誤差を符号量誤差平滑化部53へ出力する。   The code amount error accumulation calculation unit 52 accumulates the code amount error obtained by the code amount error calculation unit 51 for each picture type. That is, for each picture type of I picture, P picture, and B picture, the code amount error for each slice unit output from the code amount error calculation unit 51 is accumulated, and the accumulated code amount error that is the calculation result is represented by the code amount. Output to the error smoothing unit 53.

符号量誤差平滑化部53は、符号量誤差累積演算部52で求めたピクチャタイプごとの累積符号量誤差のばらつきを抑えるために、ピクチャタイプごとにフィルタ等を用いて累積符号量誤差を平滑化する。   The code amount error smoothing unit 53 smoothes the accumulated code amount error using a filter or the like for each picture type in order to suppress variation in the accumulated code amount error for each picture type obtained by the code amount error accumulation calculation unit 52. To do.

図7は、符号量誤差平滑化部53の詳細な構成の一例を示す図である。図7に示す構成は、フィードバックループで用いられるループフィルタであり、低域通過フィルタの一種である。G1及びG2はフィルタのゲインを表しており、動画像ビットレート変換装置のシステム要求に応じて、出力符号量のフィードバックを含めた2次系のフィードバックループのモデル解析結果より求めることができる。   FIG. 7 is a diagram illustrating an example of a detailed configuration of the code amount error smoothing unit 53. The configuration shown in FIG. 7 is a loop filter used in a feedback loop, and is a kind of low-pass filter. G1 and G2 represent the gain of the filter, and can be obtained from the model analysis result of the secondary feedback loop including the feedback of the output code amount in accordance with the system requirements of the moving picture bit rate conversion apparatus.

符号量削減パラメータ演算部54は、符号量誤差平滑化部53により平滑化した累積符号量誤差から符号量削減パラメータを求める。符号量削減パラメータは、符号量誤差平滑化部53の出力である累積符号量誤差をピクチャタイプ別に定めた制御単位符号量で除算することにより求める。この演算により、出力符号量を目標符号量との符号量誤差を補正するための符号量削減パラメータの差分を求めることができ、求めた符号量削減パラメータを用いて符号量削減部10で符号量を削減することにより、出力符号量を目標符号量に近づけるように符号量制御を行うことができる。   The code amount reduction parameter calculation unit 54 obtains a code amount reduction parameter from the accumulated code amount error smoothed by the code amount error smoothing unit 53. The code amount reduction parameter is obtained by dividing the accumulated code amount error output from the code amount error smoothing unit 53 by the control unit code amount determined for each picture type. By this calculation, the difference of the code amount reduction parameter for correcting the code amount error between the output code amount and the target code amount can be obtained, and the code amount reducing unit 10 uses the obtained code amount reduction parameter to obtain the code amount. By reducing the code amount control, the code amount control can be performed so that the output code amount approaches the target code amount.

ここで、制御単位符号量は、ピクチャタイプ別に以下のように定義する。   Here, the control unit code amount is defined for each picture type as follows.

Ui=Rin/frame_rate/Ncu/Nrcp×Ki
Up=Rin/frame_rate/Ncu/Nrcp×Kp
Ub=Rin/frame_rate/Ncu/Nrcp×Kb
上式において、Ui、Up、UbはIピクチャ、Pピクチャ及びBピクチャの制御単位符号量、Rinは入力ビットストリームbs1のビットレート、frame_rateは入力ビットストリームbs1のフレームレート、Ncuはピクチャ内の制御単位数、Nrcpは符号量削減パラメータ数、Ki、Kp、KbはIピクチャ、Pピクチャ及びBピクチャの符号量比率である。ピクチャ内の制御単位数Ncuは制御単位がスライス単位である場合には、ピクチャ内のスライス数であり、制御単位がマクロブロック単位である場合には、ピクチャ内のマクロブロック数となる。
Ui = Rin / frame_rate / Ncu / Nrcp × Ki
Up = Rin / frame_rate / Ncu / Nrcp × Kp
Ub = Rin / frame_rate / Ncu / Nrcp × Kb
In the above equation, Ui, Up, and Ub are the control unit code amounts of I picture, P picture, and B picture, Rin is the bit rate of the input bit stream bs1, frame_rate is the frame rate of the input bit stream bs1, and Ncu is the control within the picture. The number of units, Nrcp is the number of code amount reduction parameters, and Ki, Kp, and Kb are the code amount ratios of I picture, P picture, and B picture. The control unit number Ncu in the picture is the number of slices in the picture when the control unit is a slice unit, and is the number of macroblocks in the picture when the control unit is a macroblock unit.

ピクチャタイプごとの符号量比率Ki、Kp及びKbは以下の手順により求める。まず、GOP単位の平均入力符号量Sgopは、
Sgop=Si×Ni+Sp×Np+Sb×Nb
また、平均ピクチャ数Ngopは、
Ngop=Ni+Np+Nb
となる。上式において、Si、Sp及びSbはそれぞれIピクチャ、Pピクチャ及びBピクチャの平均入力符号量であり、Ni、Np及びNbはそれぞれIピクチャ、Pピクチャ及びBピクチャの平均ピクチャ数である。この時、Iピクチャ、Pピクチャ及びBピクチャの符号量比率はそれぞれ以下の式により算出することができる。
The code amount ratios Ki, Kp, and Kb for each picture type are obtained by the following procedure. First, the average input code amount Sgop in GOP units is
Sgop = Si × Ni + Sp × Np + Sb × Nb
The average picture number Ngop is
Ngop = Ni + Np + Nb
It becomes. In the above equation, Si, Sp, and Sb are average input code amounts of I picture, P picture, and B picture, respectively, and Ni, Np, and Nb are average picture numbers of I picture, P picture, and B picture, respectively. At this time, the code amount ratios of the I picture, P picture, and B picture can be calculated by the following equations, respectively.

Ki=Si/Sgop×Ngop
Kp=Sp/Sgop×Ngop
Kb=Sb/Sgop×Ngop
なお、上記においてはピクチャタイプごとの符号量比率Ki、Kp、Kbを入力ビットストリームbs1中のIピクチャ、Pピクチャ、及びBピクチャのそれぞれの平均符号量を元に算出したが、入力ビットストリームbs1における前GOP中のIピクチャ、Pピクチャ、及びBピクチャの符号量として算出しても良い。
Ki = Si / Sgop × Ngop
Kp = Sp / Sgop × Ngop
Kb = Sb / Sgop × Ngop
In the above description, the code amount ratios Ki, Kp, and Kb for each picture type are calculated based on the average code amounts of the I picture, the P picture, and the B picture in the input bit stream bs1, but the input bit stream bs1 May be calculated as the code amount of the I picture, P picture, and B picture in the previous GOP.

また、あらかじめIピクチャ、Pピクチャ、及びBピクチャの符号量比率を固定の比率、例えば、4:2:1と想定し、上記式の平均符号量に代入して算出しても良い。Iピクチャ、Pピクチャ、及びBピクチャの符号量比率を4:2:1、ピクチャ数を1:4:10と想定した場合、Ki、Kp、及びKbの値は上式による演算を省略して、あらかじめ以下のように定めることができる。   Further, the code amount ratio of I picture, P picture, and B picture may be assumed to be a fixed ratio, for example, 4: 2: 1, and may be calculated by substituting into the average code amount of the above formula. Assuming that the code amount ratio of I picture, P picture, and B picture is 4: 2: 1 and the number of pictures is 1: 4: 10, the values of Ki, Kp, and Kb are omitted from the above calculation. Can be determined in advance as follows.

Ki=2.727
Kp=1.363
Kb=0.682
次に、符号量削減パラメータについて説明する。符号量削減パラメータは、量子化パラメータ、量子化丸め補正パラメータ及び係数削減パラメータの3つの変数により構成される。
Ki = 2.727
Kp = 1.363
Kb = 0.682
Next, the code amount reduction parameter will be described. The code amount reduction parameter is composed of three variables: a quantization parameter, a quantization rounding correction parameter, and a coefficient reduction parameter.

量子化パラメータは、逆量子化部12において、逆量子化時に用いた量子化スケールに加算する値で、再量子化部13において再量子化時に量子化スケールとして用いる。例えば、入力ビットストリームbs1の1マクロブロックの量子化スケールが3であり、量子化パラメータが1である場合には、再量子化部13において、再量子化時に用いる量子化スケールは4となる。量子化スケールに量子化パラメータを加算した値が量子化スケールの最大値である31を超える場合には再量子化時の量子化スケールとして31を用いることとする。   The quantization parameter is a value added to the quantization scale used at the time of inverse quantization in the inverse quantization unit 12 and is used as the quantization scale at the time of requantization by the requantization unit 13. For example, when the quantization scale of one macroblock of the input bitstream bs1 is 3 and the quantization parameter is 1, the requantization unit 13 uses 4 for the quantization scale. When the value obtained by adding the quantization parameter to the quantization scale exceeds 31, which is the maximum value of the quantization scale, 31 is used as the quantization scale at the time of requantization.

係数削減パラメータは、係数削減部14において、離散コサイン変換系数列を0に変換するスキャン順の所定の番号をあらかじめ定めた変数である。図4に、係数削減パラメータの一例を示す。図4(a)はジグザグスキャン、図4(b)はオルタネートスキャンを用いた場合の係数削減パラメータと0に変換する離散コサイン変換系数列のスキャン順番号を示している。例えば、ジグザグスキャンを用いている場合に、係数削減パラメータが1の場合は、図3(a)におけるスキャン順番号の58以降の離散コサイン変換係数をすべて0にする。オルタネートスキャンを用いている場合に、係数削減パラメータが2の場合は、図3(b)におけるスキャン順番号の52以降の離散コサイン変換係数をすべて0にする。   The coefficient reduction parameter is a variable in which a predetermined number in the scan order for converting the discrete cosine transform series into 0 in the coefficient reduction unit 14 is determined in advance. FIG. 4 shows an example of the coefficient reduction parameter. FIG. 4A shows a zigzag scan, and FIG. 4B shows a coefficient reduction parameter and a scan order number of a discrete cosine transform series sequence to be converted to 0 when an alternate scan is used. For example, when zigzag scanning is used and the coefficient reduction parameter is 1, all the discrete cosine transform coefficients after the scan order number 58 in FIG. When the alternate scan is used and the coefficient reduction parameter is 2, all the discrete cosine transform coefficients after the scan order number 52 in FIG.

図5は、CCIR(International Radio Consultative Comittee)の12Mbpsのテストシーケンス「Mobile&Calendar」を係数削減パラメータ及び量子化パラメータをそれぞれ1〜10まで変化させて符号量削減を行った場合の平均出力ビットレートを表している。図5から明らかなように、係数削減パラメータを変化させることによる平均出力ビットレートの変化は、緩やかに削減されているのに対し、量子化パラメータを変化させた場合は、量子化パラメータが1で急激に平均出力ビットレートが削減され、以降緩やかに削減されている。このことから、符号量削減時のパラメータとして、まず係数削減パラメータ1〜9を用いた後、量子化パラメータを用いることにより、比較的細かいビットレート単位に、かつリニアに近い変化する出力符号量を得ることが可能となり、符号量制御が行いやすくなる。この場合、符号量削減パラメータ数を15として、符号量削減パラメータの1〜8には係数削減パラメータの1〜8を、符号量削減パラメータの9〜15には量子化パラメータの1〜6を割り当てる。   FIG. 5 shows an average output bit rate when the code amount reduction is performed by changing the coefficient reduction parameter and the quantization parameter from 1 to 10, respectively, in the 12 Mbps test sequence “Mobile & Calendar” of CCIR (International Radio Consultative Committee). ing. As apparent from FIG. 5, the change in the average output bit rate due to the change of the coefficient reduction parameter is moderately reduced, whereas the quantization parameter is 1 when the quantization parameter is changed. The average output bit rate has been drastically reduced, and then gradually reduced. Therefore, after using the coefficient reduction parameters 1 to 9 as parameters at the time of code amount reduction, by using the quantization parameter, an output code amount that changes in a relatively fine bit rate unit and close to linear can be obtained. Therefore, the code amount control can be easily performed. In this case, the number of code amount reduction parameters is set to 15, coefficient reduction parameters 1 to 8 are assigned to code amount reduction parameters 1 to 8, and quantization parameters 1 to 6 are assigned to code amount reduction parameters 9 to 15. .

ただし、上記のパラメータの割当ては一例であり、同様の手法で他の割当てを行っても同様の効果が得られ、圧縮符号化された様々なビットストリーム例をもとにパラメータの割当てを行っても良い。量子化パラメータは1〜30までの値を取ることができ、離散コサイン変換係数列の削減スキャン順番号は2〜63までの値をとることが可能であり、この中から符号量削減パラメータを設定することができる。離散コサイン変換係数の削減スキャン順数が1の場合はDC係数のみを残す場合であり、この場合は除外する。   However, the above parameter assignment is only an example, and the same effect can be obtained even if other assignments are performed using the same method, and parameter assignment is performed based on various compression-coded bitstream examples. Also good. The quantization parameter can take a value from 1 to 30, and the reduction scan order number of the discrete cosine transform coefficient sequence can take a value from 2 to 63, from which the code amount reduction parameter is set. can do. Discrete cosine transform coefficient reduction When the scan order number is 1, only the DC coefficient is left, which is excluded in this case.

次に、符号量削減パラメータの他の例について説明する。量子化丸め補正パラメータは、再量子化部13において再量子化演算を行う際の丸め処理を、通常は小数点以下の切捨てを行っているところを、量子化丸め補正値を加算した後、丸め処理を行うものである。例えば、再量子化演算時に丸め処理前の離散コサイン変換係数列の1係数が3.8である場合、通常は小数点以下を切り捨てするのみであるので、丸め処理後の値は3となるが、量子化丸め補正値を0.375とした場合、係数の値3.8に0.375を加算して4.175から切り捨て処理を行うので、丸め処理後の値は4となる。従って、量子化丸め補正値を大きくすると、小数点以下を切り上げする確率が高くなり、可変長符号化時の削減符号量が小さくなる。   Next, another example of the code amount reduction parameter will be described. The quantization rounding correction parameter is a rounding process when the requantization unit 13 performs a requantization operation, usually rounding off the decimal part, and after adding the quantization rounding correction value, the rounding process Is to do. For example, when 1 coefficient of the discrete cosine transform coefficient sequence before rounding processing is 3.8 at the time of requantization calculation, since usually only the fractional part is rounded down, the value after rounding processing is 3. When the quantization rounding correction value is set to 0.375, 0.375 is added to the coefficient value 3.8 and the rounding process is performed from 4.175, so the value after the rounding process is 4. Therefore, when the quantization rounding correction value is increased, the probability of rounding up the decimal point is increased, and the reduction code amount at the time of variable length encoding is reduced.

図6は、CCIRの12Mbpsのテストシーケンス「Mobile&Calendar」を、再量子化時の量子化パラメータを1、量子化丸め補正パラメータを1〜6、すなわち量子化丸め補正値として0.5、0.375、0.25、0.187、0.125及び0を用いて符号量削減を行った場合の平均出力ビットレートを表している。量子化丸め補正値が0の場合は離散コサイン変換系数列の小数点以下を切り捨て、0.5の場合は四捨五入を行っているのと同じ処理になる。図6から、再量子化時に単純に量子化スケールを増やすだけでなく、量子化丸め補正値を変えることにより、より細かいビットレート単位で変化する出力符号量を得ることが可能となる。従って、量子化パラメータが1の場合には量子化丸め補正パラメータと組み合わせ、量子化丸め補正パラメータを1〜6変化させた後、量子化パラメータの2以上の値を取るように符号量削減パラメータを設定すれば、比較的細かいビットレート単位に、かつリニアに近い変化する出力符号量を得ることが可能となり、符号量制御が行いやすくなる。   FIG. 6 shows a CCIR 12 Mbps test sequence “Mobile & Calendar” with a quantization parameter at requantization of 1 and a quantization rounding correction parameter of 1 to 6, that is, 0.5 and 0.375 as quantization rounding correction values. , 0.25, 0.187, 0.125, and 0, the average output bit rate is shown when the code amount is reduced. When the quantization rounding correction value is 0, the decimal part of the discrete cosine transform series is rounded down, and when it is 0.5, the process is the same as rounding. From FIG. 6, it is possible not only to simply increase the quantization scale at the time of re-quantization but also to obtain an output code amount that changes in finer bit rate units by changing the quantization rounding correction value. Therefore, when the quantization parameter is 1, it is combined with the quantization rounding correction parameter, and after changing the quantization rounding correction parameter by 1 to 6, the code amount reduction parameter is set so as to take a value of 2 or more of the quantization parameter. If it is set, it is possible to obtain an output code amount that changes in a relatively fine bit rate unit and close to linear, and it becomes easy to control the code amount.

ただし、上記で示した符号量削減パラメータの組み合わせは一例であり、他の組み合わせを用いてもよい。   However, the combinations of the code amount reduction parameters shown above are examples, and other combinations may be used.

以上、符号量削減パラメータの3つの要素である量子化パラメータ、量子化丸め補正パラメータ及び係数削減パラメータとその組み合わせについて説明したが、これらの組み合わせにより符号量削減パラメータをあらかじめ定義して保有し、符号量削減パラメータ演算部54から符号量削減部10に符号量削減パラメータによる指示を行うことにより細かいビットレート単位に符号量制御が可能となる。   As described above, the quantization parameter, the quantization rounding correction parameter, the coefficient reduction parameter, and the combination thereof, which are the three elements of the code amount reduction parameter, have been described. By giving an instruction with the code amount reduction parameter from the amount reduction parameter calculation unit 54 to the code amount reduction unit 10, it is possible to control the code amount in fine bit rate units.

以上の動作により、スライス単位あるいはマクロブロック単位に符号量制御を行い、レート変換遅延の少なく、かつ所望の目標ビットレートを保つビットレート変換を行うことが可能となる。   With the above operation, code amount control can be performed in units of slices or macroblocks, and bit rate conversion with a small rate conversion delay and a desired target bit rate can be performed.

なお、本実施の形態1においては、符号量削減時に係数削減部14において量子化された離散コサイン変換係数列を削減した後、可変長符号化部15において当該離散コサイン変換系数列の可変長符号化を行ったが、可変長符号化部15において可変長符号化時に、離散コサイン変換系数列を所定のスキャン順で読み出し、符号量削減パラメータ演算部54からの指示による削減パラメータまで至った時に残りの離散コサイン変換系数列を0として可変長符号化を行い、係数削減部14の処理を省略してもよい。   In the first embodiment, after reducing the discrete cosine transform coefficient sequence quantized by the coefficient reducing unit 14 when the code amount is reduced, the variable length coding unit 15 uses the variable length code of the discrete cosine transform series number sequence. However, when the variable length coding unit 15 performs variable length coding, the discrete cosine transform system sequence is read out in a predetermined scan order, and remains when the reduction parameter is reached by an instruction from the code amount reduction parameter calculation unit 54. It is also possible to perform variable length coding with the discrete cosine transform series of 0 as 0 and omit the processing of the coefficient reduction unit 14.

また、本実施の形態1においては、逆量子化部12と再量子化部13を2つの処理ブロックに分割したが、逆量子化部12において、離散コサイン変換系数列を入力量子化スケールにより乗算する演算と、再量子化部13において、離散コサイン変換系数列を入力量子化スケールに量子化パラメータを加算した量子化スケールにより除算を行う演算を1つにし、逆量子化部12と再量子化部13を2つの処理ブロックを1つの処理ブロックにしてもよい。   In the first embodiment, the inverse quantization unit 12 and the requantization unit 13 are divided into two processing blocks. However, the inverse quantization unit 12 multiplies the discrete cosine transform series by the input quantization scale. And the requantization unit 13 divides the discrete cosine transform sequence by the quantization scale obtained by adding the quantization parameter to the input quantization scale, and the inverse quantization unit 12 and the requantization unit The unit 13 may have two processing blocks as one processing block.

なお、本実施の形態1においては、動画像ビットレート変換装置として説明したが、これらの装置構成をソフトウェアプログラムに記述して記録媒体に記録し、CPUで実行するようにしても実現可能である。   In the first embodiment, the video bit rate conversion device has been described. However, it is also possible to describe these device configurations in a software program, record them on a recording medium, and execute them by the CPU. .

さらに、本実施の形態1においては、各機能ブロックは典型的には集積回路であるLSIとして実現される。これらは個別に1チップ化されても良いし、一部又は全てを含むように1チップ化されても良い。ここでは、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称されることもある。また、集積回路化の手法はLSIに限るものではなく、専用回路又は汎用プロセサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサーを利用しても良い。さらには、半導体技術の進歩又は派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行ってもよい。バイオ技術の適応等が可能性としてありえる。   Furthermore, in the first embodiment, each functional block is typically realized as an LSI that is an integrated circuit. These may be individually made into one chip, or may be made into one chip so as to include a part or all of them. The name used here is LSI, but it may also be called IC, system LSI, super LSI, or ultra LSI depending on the degree of integration. Further, the method of circuit integration is not limited to LSI, and implementation with a dedicated circuit or a general-purpose processor is also possible. An FPGA (Field Programmable Gate Array) that can be programmed after manufacturing the LSI, or a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used. Further, if integrated circuit technology comes out to replace LSI's as a result of the advancement of semiconductor technology or a derivative other technology, it is naturally also possible to carry out function block integration using this technology. Biotechnology can be applied.

図14及び図15を用いて、本実施の形態1における動画像ビットレート変換装置の各機能ブロックを集積化したLSIが適用される映像サーバー及びネットワーク中継器について説明する。   A video server and a network repeater to which an LSI in which each functional block of the moving image bit rate conversion apparatus according to the first embodiment is integrated will be described with reference to FIGS.

図14は、本実施の形態1における動画像ビットレート変換装置の各機能ブロックを集積化したLSIを用いた映像サーバー80の構成を示すブロック図である。図14において、映像サーバー80は、動画像ビットストリームのビットレートを変換する動画像ビットレート変換部81、ネットワークインタフェース82、ネットワーク制御部83、動画像を記録し、動画像ビットストリームを出力する動画像記録部84により構成される。   FIG. 14 is a block diagram illustrating a configuration of a video server 80 using an LSI in which the respective functional blocks of the moving image bit rate conversion apparatus according to the first embodiment are integrated. In FIG. 14, a video server 80 is a moving image bit rate converting unit 81 that converts the bit rate of a moving image bit stream, a network interface 82, a network control unit 83, a moving image that records moving images and outputs a moving image bit stream. An image recording unit 84 is used.

動画像記録部84は動画像ビットストリームを記録し、ネットワークを介して図示しないクライアントからの要求に応じて、記録してある動画像ビットストリームを動画像ビットレート変換部81に出力する。   The moving image recording unit 84 records the moving image bit stream, and outputs the recorded moving image bit stream to the moving image bit rate conversion unit 81 in response to a request from a client (not shown) via the network.

動画像ビットストリーム変換部81は、動画像ビットレート変換装置100の各機能ブロックを集積化した回路であり、動画像記録部84から入力された入力ビットストリームbs1を、ネットワーク制御部83から与えられる符号量削減率により所望のビットレートに変換して、出力ビットストリームbs2を出力する。   The moving image bit stream conversion unit 81 is a circuit in which the functional blocks of the moving image bit rate conversion apparatus 100 are integrated. The input bit stream bs1 input from the moving image recording unit 84 is given from the network control unit 83. The output bit stream bs2 is output after conversion to a desired bit rate by the code amount reduction rate.

ネットワークインタフェース82は、動画像ビットストリームを受信して再生するクライアントとネットワークを介して接続するためのLAN等の送受信処理インタフェースである。ここでは、ネットワークインタフェースとして特定の通信規格を規定しないが、例えば代表的な通信規格として、LANの標準規格としてはIEEE802.3、無線LAN規格としてはIEEE802.11などがある。これらは通信規格の一例であり、前記通信規格に縛られることなく他の通信手段を用いてもよい。   The network interface 82 is a transmission / reception processing interface such as a LAN for connecting to a client that receives and reproduces a moving image bitstream via a network. Here, a specific communication standard is not specified as a network interface. For example, as a typical communication standard, there are IEEE 802.3 as a LAN standard, IEEE 802.11 as a wireless LAN standard, and the like. These are examples of communication standards, and other communication means may be used without being bound by the communication standards.

ネットワーク制御部83は、ネットワークインタフェース82の通信状態を監視し、動画像ビットレート変換部81に符号量削減率を与えて、出力ビットストリームbs2のビットレートを制御し、ネットワークインタフェース82の送信バッファオーバーフローがおきないように制御を行う。ネットワークインタフェース82の通信状態を監視方法としては、送信バッファオーバーフローを発生させない閾値を設定し、送信バッファの容量が前記閾値を超えた場合に、符号量を削減するように符号量削減率を設定する。また、通信状態を監視する他の方法としては、伝送誤りの発生状態を監視して、伝送誤り率があらかじめ設定した閾値を超えた場合に、符号量を削減するように符号量削減率を設定する。   The network control unit 83 monitors the communication state of the network interface 82, gives a code amount reduction rate to the moving image bit rate conversion unit 81, controls the bit rate of the output bit stream bs 2, and transmits the transmission buffer overflow of the network interface 82 Control to prevent As a method for monitoring the communication state of the network interface 82, a threshold value that does not cause a transmission buffer overflow is set, and a code amount reduction rate is set so as to reduce the code amount when the transmission buffer capacity exceeds the threshold value. . Another method for monitoring the communication status is to monitor the transmission error occurrence state and set the code amount reduction rate so that the code amount is reduced when the transmission error rate exceeds a preset threshold. To do.

以上の動作により、映像サーバーとクライアントを接続するネットワークの伝送容量が動画像記録部84に記録されている動画像ビットストリームのビットレートよりも小さい場合などにおいても、ネットワークインタフェース82の送信バッファオーバーフローが発生せず、クライアントは受信した動画像ビットストリームを途切れることなく再生することができる。   With the above operation, even when the transmission capacity of the network connecting the video server and the client is smaller than the bit rate of the moving image bit stream recorded in the moving image recording unit 84, the transmission buffer overflow of the network interface 82 occurs. The client can play back the received moving image bitstream without interruption.

図15は、本実施の形態1における動画像ビットレート変換装置の各機能ブロックを集積化したLSIを用いたネットワーク中継器の構成を示すブロック図である。図15において、ネットワーク中継器90は、動画像ビットストリームのビットレートを変換する動画像ビットレート変換部91、ネットワークインタフェース92及び93、ネットワークインタフェース92及び93のブリッジ処理を行うブリッジ部94、ネットワーク制御部95により構成される。   FIG. 15 is a block diagram showing a configuration of a network repeater using an LSI in which the respective functional blocks of the moving image bit rate conversion apparatus according to the first embodiment are integrated. In FIG. 15, a network repeater 90 includes a moving image bit rate converting unit 91 that converts a bit rate of a moving image bit stream, network interfaces 92 and 93, a bridge unit 94 that performs bridge processing of the network interfaces 92 and 93, and network control. The unit 95 is configured.

動画像ビットレート変換部91は、動画像ビットレート変換装置100の各機能ブロックを集積化した回路であり、ブリッジ部94から入力された入力ビットストリームbs1を、ネットワーク制御部95から与えられる符号量削減率により所望のビットレートに変換して、出力ビットストリームbs2をブリッジ部94へ出力する。   The moving image bit rate conversion unit 91 is a circuit in which the functional blocks of the moving image bit rate conversion apparatus 100 are integrated, and the code amount provided from the network control unit 95 to the input bit stream bs1 input from the bridge unit 94. The output bit stream bs2 is output to the bridge unit 94 after being converted into a desired bit rate by the reduction rate.

ネットワークインタフェース92及び93は、映像サーバーやクライアントとネットワークを介して接続するためのLAN等の送受信処理インタフェースである。ここでは、ネットワークインタフェースとして特定の通信規格を規定しないが、例えば代表的な通信規格として、LANの標準規格としてはIEEE802.3、無線LAN規格としてはIEEE802.11などがある。これらは通信規格の一例であり、前記通信規格に縛られることなく他の通信手段を用いてもよい。また、ネットワークインタフェース92と93はそれぞれ同一の通信規格であっても良いし、異なる通信規格であっても良い。   The network interfaces 92 and 93 are transmission / reception processing interfaces such as a LAN for connecting to a video server or a client via a network. Here, a specific communication standard is not specified as a network interface. For example, as a typical communication standard, there are IEEE 802.3 as a LAN standard, IEEE 802.11 as a wireless LAN standard, and the like. These are examples of communication standards, and other communication means may be used without being bound by the communication standards. The network interfaces 92 and 93 may be the same communication standard or different communication standards.

ブリッジ部94はネットワークインタフェース92と93のブリッジ処理を行うとともに、ネットワークインタフェース92あるいは93で受信したフレーム内から動画像ビットストリームを抽出して動画像ビットレート変換部91に供給する。また、動画像ビットレート変換部91から出力された出力ビットストリームbs2をネットワークインタフェース92あるいは93に出力する。ネットワークインタフェース92と93が異なる通信規格である場合にはフレームフォーマットの変換等も行う。   The bridge unit 94 performs a bridge process between the network interfaces 92 and 93, extracts a moving image bit stream from the frame received by the network interface 92 or 93, and supplies the extracted moving image bit stream to the moving image bit rate conversion unit 91. Also, the output bit stream bs2 output from the moving image bit rate conversion unit 91 is output to the network interface 92 or 93. When the network interfaces 92 and 93 are different communication standards, the frame format is converted.

ネットワーク制御部95は、ネットワークインタフェース92及び93の通信状態を監視し、動画像ビットレート変換部91に符号量削減率を与えて、出力ビットストリームbs2のビットレートを制御し、ネットワークインタフェース92あるいは93の送信バッファオーバーフローが発生しないように制御を行う。   The network control unit 95 monitors the communication state of the network interfaces 92 and 93, gives the code amount reduction rate to the moving image bit rate conversion unit 91, controls the bit rate of the output bit stream bs2, and controls the network interface 92 or 93. Control is performed so that no transmission buffer overflow occurs.

以上の動作により、動画像ビットストリームを受信して再生するクライアントと繋がるネットワークインタフェース92あるいは93のいずれかが接続されるネットワークの伝送容量が、もう一方の映像サーバーと繋がるネットワークインタフェースから送られてくる動画像ビットストリームのビットレートよりも小さい場合などにおいても、ネットワークインタフェース92あるいは93の送信バッファオーバーフローが発生せず、クライアントは受信した動画像ビットストリームを途切れることなく再生することができる。   With the above operation, the transmission capacity of the network to which either the network interface 92 or 93 connected to the client that receives and reproduces the moving image bitstream is connected is sent from the network interface connected to the other video server. Even when the bit rate of the moving image bit stream is smaller, the transmission buffer overflow of the network interface 92 or 93 does not occur, and the client can reproduce the received moving image bit stream without interruption.

(実施の形態2)
図8は、本発明の実施の形態2における動画像ビットレート変換装置101の構成を示すブロック図である。図8において、動画像ビットレート変換装置101は、入力ビットストリームbs1を入力とし、入力ビットストリームbs1の符号量を削減して出力ビットストリームbs2を出力する符号量削減部10、所定の制御単位ごとに入力ビットストリームbs1の符号量を検出する入力符号量検出部20、所定の制御単位ごとに出力ビットストリームbs2のビットレートを検出する出力符号量検出部30、所定の符号量検出単位ごとに符号量削減率を演算する符号量削減率検出部41、所定の制御単位ごとに目標符号量を演算する目標符号量演算部40、入力符号量と出力符号量の誤差を演算する符号量誤差演算部51、符号量誤差を累積演算する符号量誤差累積演算部52、累積符号量誤差を平滑化する符号量誤差平滑化部53、及び符号量削減パラメータを演算する符号量削減パラメータ演算部54により構成され、出力ビットストリームbs2を出力する。
(Embodiment 2)
FIG. 8 is a block diagram showing the configuration of the moving image bit rate conversion apparatus 101 according to Embodiment 2 of the present invention. In FIG. 8, a moving image bit rate conversion apparatus 101 receives an input bitstream bs1 as an input, reduces the code amount of the input bitstream bs1, and outputs an output bitstream bs2, for each predetermined control unit. The input code amount detection unit 20 that detects the code amount of the input bit stream bs1, the output code amount detection unit 30 that detects the bit rate of the output bit stream bs2 for each predetermined control unit, and the code for each predetermined code amount detection unit Code amount reduction rate detection unit 41 that calculates the amount reduction rate, target code amount calculation unit 40 that calculates the target code amount for each predetermined control unit, and code amount error calculation unit that calculates the error between the input code amount and the output code amount 51, a code amount error accumulating unit 52 for accumulating code amount errors, a code amount error smoothing unit 53 for smoothing accumulated code amount errors, and a code We are constituted by the code amount reduction parameter calculation unit 54 for calculating the reduction parameters, and outputs an output bit stream bs2.

動画像ビットレート変換装置101において、符号量削減率検出部41以外の各処理ブロックは、実施の形態1における動画像ビットレート変換装置100の各処理ブロックと同じ動作を行うので、符号量削減率検出部41以外の各処理ブロックの詳細な説明はここでは省略する。   In the moving image bit rate conversion apparatus 101, each processing block other than the code amount reduction rate detection unit 41 performs the same operation as each processing block of the moving image bit rate conversion apparatus 100 in the first embodiment. A detailed description of each processing block other than the detection unit 41 is omitted here.

図9は、動画像ビットレート変換装置101における符号量削減率検出部41の詳細な構成を示すブロック図である。図9において、動画像ビットレート変換装置101は、入力ビットストリームbs1及びビットレート削減率を入力とし、所定の符号量検出単位の先頭を検出する単位コード検出部42、所定の符号量単位ごとに入力ビットストリームbs1の入力符号量をカウントする符号量検出部43、所定の符号量単位ごとに入力ビットストリームbs1中の入力可変長符号量をカウントする可変長符号量検出部44、入力符号量、入力可変長符号量、及びビットレート削減率から符号量削減率を演算する符号量削減率演算部45より構成され、符号量削減率を図8に示す動画像ビットレート変換装置101の目標符号量演算部40へ出力する。   FIG. 9 is a block diagram illustrating a detailed configuration of the code amount reduction rate detection unit 41 in the moving image bit rate conversion apparatus 101. In FIG. 9, a moving image bit rate conversion apparatus 101 receives an input bit stream bs1 and a bit rate reduction rate as input, and a unit code detection unit 42 that detects the beginning of a predetermined code amount detection unit, for each predetermined code amount unit. A code amount detector 43 that counts the input code amount of the input bitstream bs1, a variable length code amount detector 44 that counts the input variable length code amount in the input bitstream bs1 for each predetermined code amount unit, an input code amount, The code amount reduction rate calculating unit 45 calculates the code amount reduction rate from the input variable length code amount and the bit rate reduction rate, and the code amount reduction rate is the target code amount of the moving image bit rate conversion apparatus 101 shown in FIG. Output to the calculation unit 40.

以上のように構成された動画像ビットレート変換装置101の詳細な動作について説明する。   A detailed operation of the moving image bit rate conversion apparatus 101 configured as described above will be described.

単位コード検出部42は入力ビットストリームbs1から所定の符号量検出単位の先頭部を検出する。ここで、所定の符号量検出単位とは、MPEG2で定義されるストリーム構造のレイヤ単位であり、GOP、ピクチャあるいはスライス等の機能単位ごとに分割された単位とする。以降、所定の符号量検出単位はピクチャ単位として説明する。単位コード検出部42は入力ビットストリームbs1から符号量検出単位の先頭であるピクチャスタートコードを検出し、ピクチャの先頭タイミングを符号量検出部43及び可変長符号量検出部44に出力する。   The unit code detection unit 42 detects the head part of a predetermined code amount detection unit from the input bit stream bs1. Here, the predetermined code amount detection unit is a layer unit of a stream structure defined in MPEG2, and is a unit divided for each functional unit such as GOP, picture, or slice. Hereinafter, the predetermined code amount detection unit will be described as a picture unit. The unit code detector 42 detects the picture start code that is the head of the code amount detection unit from the input bitstream bs1, and outputs the head timing of the picture to the code amount detector 43 and the variable length code amount detector 44.

符号量検出部43は、単位コード検出部42から出力されたピクチャ先頭タイミングから次のピクチャ先頭タイミングまで、入力ビットストリームbs1の入力ビット列をカウントする。この操作により、ピクチャ単位の入力符号量を求めることができる。符号量検出部43は、カウントしたピクチャ単位の入力符号量を符号量削減率演算部45へ出力する。   The code amount detection unit 43 counts the input bit string of the input bit stream bs1 from the picture head timing output from the unit code detection unit 42 to the next picture head timing. By this operation, the input code amount for each picture can be obtained. The code amount detection unit 43 outputs the counted input code amount in units of pictures to the code amount reduction rate calculation unit 45.

可変長符号量検出部44は、単位コード検出部42から出力されたピクチャ先頭タイミングから次のピクチャ先頭タイミングまで、入力ビットストリームbs1中の可変長符号化されたビット列のみをカウントする。この操作により、ピクチャ単位でヘッダ等の非削減部を除く正味のビット削減部分である可変長符号化されたビット列の符号量を求めることができる。符号量検出部43は、カウントしたピクチャ単位の入力可変長符号量を符号量削減率演算部45へ出力する。   The variable length code amount detector 44 counts only the variable length encoded bit string in the input bitstream bs1 from the picture head timing output from the unit code detector 42 to the next picture head timing. By this operation, it is possible to obtain the code amount of the variable-length-coded bit string that is a net bit reduction part excluding a non-reduction part such as a header for each picture. The code amount detection unit 43 outputs the counted input variable length code amount in units of pictures to the code amount reduction rate calculation unit 45.

符号量削減率演算部45は、符号量検出部43から入力符号量、可変長符号量検出部44から入力可変長符号量、図示しないビットレート制御部等からビットレート削減率を得て、以下の演算により符号量検出単位、すなわちピクチャ単位ごとの符号量削減率を演算する。   The code amount reduction rate calculation unit 45 obtains an input code amount from the code amount detection unit 43, an input variable length code amount from the variable length code amount detection unit 44, a bit rate control rate from a bit rate control unit (not shown), etc. The code amount reduction rate is calculated for each code amount detection unit, that is, for each picture unit.

まず、以下の計算式により、本来符号量削減部10において、入力ビットストリームbs1中の符号量が削減されないヘッダ等が占める非削減符号量をピクチャ単位に求める。   First, in accordance with the following calculation formula, the code amount reduction unit 10 obtains the non-reduced code amount occupied by a header or the like in which the code amount in the input bitstream bs1 is not reduced in units of pictures.

Snr(m)=Sfu(m)−Svlc(m)
ここでSnr(m)は符号量検出単位当たりの非削減符号量、Sfu(m)は符号量検出単位当たりの入力符号量、Svlc(m)は符号量検出単位当たりの可変長符号量である。また、mは自然数で分割されたピクチャ単位に番号を割り振ったものである。
Snr (m) = Sfu (m) −Svlc (m)
Here, Snr (m) is a non-reduced code amount per code amount detection unit, Sfu (m) is an input code amount per code amount detection unit, and Svlc (m) is a variable length code amount per code amount detection unit. . Further, m is a number assigned to each picture unit divided by natural numbers.

次に、ピクチャ単位の入力符号量とレート削減率から求めた目標符号量から前記非削減符号量Snr(m)補正した正確なピクチャごとの削減目標符号量を求める。   Next, an accurate reduction target code amount for each picture obtained by correcting the non-reduction code amount Snr (m) from the target code amount obtained from the input code amount in units of pictures and the rate reduction rate is obtained.

Starget(m)=Sin(m)×Rred−Snr(m)
ここで、Starget(m)は符号量検出単位当たりの正味の目標符号量、入力ビットストリームbs1をピクチャ単位に分割した入力符号量、Rredはレート削減率である。
Target (m) = Sin (m) × Rred−Snr (m)
Here, Target (m) is a net target code amount per code amount detection unit, an input code amount obtained by dividing the input bitstream bs1 in units of pictures, and Rred is a rate reduction rate.

最後に、符号量削減率Rs(m)は正味の目標符号量と可変長符号量から以下の計算式により求められる。   Finally, the code amount reduction rate Rs (m) is obtained from the net target code amount and the variable length code amount by the following calculation formula.

Rs(m)=Starget(m)/Svlc(m)
符号量削減率演算部45は、上記で求めたピクチャ単位ごとの符号量削減率Rs(m)を図8に示す動画像ビットレート変換装置101の目標符号量演算部40に出力する。
Rs (m) = Target (m) / Svlc (m)
The code amount reduction rate calculation unit 45 outputs the code amount reduction rate Rs (m) for each picture unit obtained above to the target code amount calculation unit 40 of the moving picture bit rate conversion apparatus 101 shown in FIG.

以上の動作により、与えられたレート削減率から動画像ビットストリーム中のヘッダ等の非削減部分を除いた正確な符号量削減率を求めることができ、出力符号量をより安定的に制御することが可能となる。   With the above operation, it is possible to obtain an accurate code amount reduction rate by removing non-reduced portions such as headers in a moving picture bitstream from a given rate reduction rate, and to control the output code amount more stably. Is possible.

なお、入力ビットストリームがMPEG2−TSである場合には、ビデオTS以外にオーディオTSやセクション符号量検出部42において、この操作により、MPEG2−TSからオーディオTSやエレメンタリストリームのヘッダ等を除いた正味の符号量を求めることができる。   When the input bit stream is MPEG2-TS, the audio TS and the section code amount detection unit 42 in addition to the video TS remove the header of the audio TS and elementary stream from the MPEG2-TS by this operation. The net code amount can be obtained.

この時、ピクチャ単位当たりの入力符号量は以下の式により求められる。   At this time, the input code amount per picture unit is obtained by the following equation.

Sin(m)=Nts(m)×188×8
ここで、Nts(m)は所定の符号量検出単位当たりの入力TSパケット数、188はTSパケットのバイト数、8はバイトをビットに変換するものである。
Sin (m) = Nts (m) × 188 × 8
Here, Nts (m) is the number of input TS packets per predetermined code amount detection unit, 188 is the number of bytes of the TS packet, and 8 is a byte to bit conversion.

以上の動作により、入力ビットストリームbs1がMPEG2−TSであっても、与えられたレート削減率から動画像ビットストリーム中のオーディオTSやヘッダ等の非削減部分を除いた正確な符号量削減率を求めることが可能となる。   With the above operation, even if the input bit stream bs1 is MPEG2-TS, an accurate code amount reduction rate excluding non-reduced portions such as the audio TS and header in the moving image bit stream from the given rate reduction rate is obtained. It can be obtained.

なお、本実施の形態2においては、動画像ビットレート変換装置として説明したが、これらの装置構成をソフトウェアプログラムに記述して記録媒体に記録し、CPUで実行するようにしても実現可能である。   In the second embodiment, the video bit rate conversion device has been described. However, it is also possible to describe the configuration of these devices in a software program, record them on a recording medium, and execute them by the CPU. .

なお、本実施の形態2においては、各機能ブロックは典型的には集積回路であるLSIとして実現される。これらは個別に1チップ化されても良いし、一部又は全てを含むように1チップ化されても良い。ここでは、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称されることもある。また、集積回路化の手法はLSIに限るものではなく、専用回路又は汎用プロセサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサーを利用しても良い。さらには、半導体技術の進歩又は派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行ってもよい。バイオ技術の適応等が可能性としてありえる。   In the second embodiment, each functional block is typically realized as an LSI that is an integrated circuit. These may be individually made into one chip, or may be made into one chip so as to include a part or all of them. The name used here is LSI, but it may also be called IC, system LSI, super LSI, or ultra LSI depending on the degree of integration. Further, the method of circuit integration is not limited to LSI, and implementation with a dedicated circuit or a general-purpose processor is also possible. An FPGA (Field Programmable Gate Array) that can be programmed after manufacturing the LSI, or a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used. Further, if integrated circuit technology comes out to replace LSI's as a result of the advancement of semiconductor technology or a derivative other technology, it is naturally also possible to carry out function block integration using this technology. Biotechnology can be applied.

また、本実施の形態2における動画像ビットレート変換装置の各機能ブロックを集積化したLSIが適用される映像サーバー及びネットワーク中継器はそれぞれ実施の形態1における図14及び図15の構成と同様である。ただし、ネットワーク制御部83及び95から動画像ビットレート変換部81及び91へ与えられる符号量削減率は、実施の形態2においてはビットレート削減率となる。   Further, the video server and the network repeater to which the LSI in which the functional blocks of the moving image bit rate conversion apparatus in the second embodiment are integrated are applied have the same configurations as those in FIGS. 14 and 15 in the first embodiment, respectively. is there. However, the code amount reduction rate given from the network control units 83 and 95 to the moving image bit rate conversion units 81 and 91 is the bit rate reduction rate in the second embodiment.

(実施の形態3)
図10は、本発明の実施の形態3における動画像ビットレート変換装置の構成を示すブロック図である。図10において、動画像ビットレート変換装置102は、入力ビットストリームbs1を入力とし、入力ビットストリームbs1の符号量を削減して出力ビットストリームbs2を出力する符号量削減部10、所定の制御単位ごとに入力ビットストリームbs1の符号量を検出する入力符号量検出部20、所定の制御単位ごとに出力ビットストリームbs2のビットレートを検出する出力符号量検出部30、所定の制御単位ごとに目標符号量を演算する目標符号量演算部40、ピクチャタイプごとに目標符号量比率を補正する目標符号量比率補正部46、目標符号量誤差の補正を行う目標符号量誤差補正部47、入力符号量と出力符号量の誤差を演算する符号量誤差演算部51、符号量誤差を累積演算する符号量誤差累積演算部52、累積符号量誤差を平滑化する符号量誤差平滑化部53、及び符号量削減パラメータを演算する符号量削減パラメータ演算部54により構成され、出力ビットストリームbs2を出力する。
(Embodiment 3)
FIG. 10 is a block diagram showing a configuration of a moving image bit rate conversion apparatus according to Embodiment 3 of the present invention. In FIG. 10, a moving image bit rate conversion apparatus 102 receives an input bit stream bs1 and reduces the code amount of the input bit stream bs1, and outputs an output bit stream bs2, for each predetermined control unit. The input code amount detection unit 20 for detecting the code amount of the input bit stream bs1, the output code amount detection unit 30 for detecting the bit rate of the output bit stream bs2 for each predetermined control unit, and the target code amount for each predetermined control unit Target code amount calculation unit 40 for calculating the target code amount ratio correction unit 46 for correcting the target code amount ratio for each picture type, target code amount error correction unit 47 for correcting the target code amount error, input code amount and output Code amount error calculation unit 51 for calculating code amount error, code amount error accumulation calculation unit 52 for cumulative calculation of code amount error, cumulative code It is constituted by the code amount reduction parameter calculation unit 54 for calculating a code amount error smoothing unit 53, and the code amount reduction parameter smoothes the amount error, and outputs an output bit stream bs2.

動画像ビットレート変換装置102において、目標符号量演算部40、目標符号量比率補正部46、目標符号量誤差補正部47、及び符号量削減パラメータ演算部54以外の各処理ブロックは、実施の形態1における動画像ビットレート変換装置100の各処理ブロックと同じ動作を行うので、目標符号量演算部40、目標符号量比率補正部46、目標符号量誤差補正部47、及び符号量削減パラメータ演算部54以外の各処理ブロックの詳細な説明はここでは省略する。   In the moving image bit rate conversion apparatus 102, each processing block other than the target code amount calculation unit 40, the target code amount ratio correction unit 46, the target code amount error correction unit 47, and the code amount reduction parameter calculation unit 54 is described in the embodiment. 1, the target code amount calculation unit 40, the target code amount ratio correction unit 46, the target code amount error correction unit 47, and the code amount reduction parameter calculation unit are performed. A detailed description of each processing block other than 54 is omitted here.

なお、目標符号量演算部40への入力である符号量削減率は、実施の形態2における符号量削減率検出部41の出力である符号量削減率を用いてもよい。   Note that the code amount reduction rate that is the output of the code amount reduction rate detection unit 41 in the second embodiment may be used as the code amount reduction rate that is an input to the target code amount calculation unit 40.

符号量削減部10において、符号量を削減する時に、指定された符号量削減率が低い場合には、あらかじめ定めた符号量削減パラメータが下限に達し、ビットレートを削減できなくなる。特に、ピクチャタイプ別に見ると、Bピクチャはもともと符号量が小さいため、符号量を削減するには限界がある。そこで、Iピクチャ、Pピクチャ、Bピクチャの符号量比率を補正することで、所望のビットレートに削減できるようにする。   If the designated code amount reduction rate is low when the code amount reduction unit 10 reduces the code amount, the predetermined code amount reduction parameter reaches the lower limit, and the bit rate cannot be reduced. In particular, when looking at each picture type, since the code amount of B pictures is originally small, there is a limit to reducing the code amount. Therefore, the bit rate can be reduced to a desired bit rate by correcting the code amount ratio of the I picture, P picture, and B picture.

符号量削減パラメータ演算部54は、符号量削減パラメータが下限に達したにもかかわらず、累積符号量誤差が増加していると判断した場合に、目標符号量比率補正部46に対して、比率変更指示を出力する。   When the code amount reduction parameter calculation unit 54 determines that the accumulated code amount error has increased despite the code amount reduction parameter reaching the lower limit, the code amount reduction parameter calculation unit 54 determines the ratio to the target code amount ratio correction unit 46. Output change instructions.

目標符号量比率補正部46は、初期状態においてはIピクチャ、Pピクチャ及びBピクチャの目標符号量比率を1:1:1とし、目標符号量の補正を行わない。初期状態において、目標符号量比率補正部46は符号量削減パラメータ演算部54から比率変更指示を受けとると、まずIピクチャの目標符号量比率は変更せずに、Pピクチャの目標符号量比率を所定の比率分下げる。目標符号量比率補正部46は符号量削減パラメータ演算部54から比率変更指示を受ける毎に、Pピクチャの目標符号量比率を所定の比率分下げて行くが、Pピクチャの目標符号量をBピクチャの目標符号量と同じになるまで下げた時点で、次に、Iピクチャの符号量比率を下げる。以上のように、符号量比率を変更することで、Iピクチャ、Pピクチャ及びBピクチャを固定の比率で変更する場合よりもさらに符号量を削減することが可能となる。   The target code amount ratio correction unit 46 sets the target code amount ratio of the I picture, P picture, and B picture to 1: 1: 1 in the initial state, and does not correct the target code amount. In the initial state, when the target code amount ratio correction unit 46 receives a ratio change instruction from the code amount reduction parameter calculation unit 54, the target code amount ratio of the P picture is set to a predetermined value without changing the target code amount ratio of the I picture. Decrease by the ratio. Each time the target code amount ratio correction unit 46 receives a ratio change instruction from the code amount reduction parameter calculation unit 54, the target code amount ratio of the P picture is decreased by a predetermined ratio. Next, the code amount ratio of the I picture is lowered at the time when it is lowered until it becomes the same as the target code amount. As described above, by changing the code amount ratio, the code amount can be further reduced as compared with the case where the I picture, the P picture, and the B picture are changed at a fixed ratio.

以下、符号量比率補正方法について詳細に説明する。まず、Iピクチャの符号量比率は変えず、Pピクチャの符号量比率を下げる場合について説明する。GOP単位のPピクチャ及びBピクチャの平均符号量の合計Spbは、
Spb=Sp×Np+Sb×Nb
Bピクチャの平均符号量に対するPピクチャの平均符号量の比率Kpbは、
Kpb=Sp/Sb
となる。ここで、Pピクチャの符号量比率をKc(0<Kc<1)に下げる時、Pピクチャの目標符号量比率はBピクチャを1とするとKpb×Kcとなる。従って、符号量比率1当たりの目標符号量Dtは、
Dt=Spb/(Np×Kpb×Kc+Nb)
以上から、Pピクチャ及びBピクチャの目標符号量比率Ktp、Ktbはそれぞれ以下の計算式により求めることができる。
Hereinafter, the code amount ratio correction method will be described in detail. First, a case where the code amount ratio of the P picture is lowered without changing the code amount ratio of the I picture will be described. The total Spb of the average code amount of P picture and B picture in GOP unit is
Spb = Sp × Np + Sb × Nb
The ratio Kpb of the average code amount of the P picture to the average code amount of the B picture is:
Kpb = Sp / Sb
It becomes. Here, when the code amount ratio of the P picture is lowered to Kc (0 <Kc <1), the target code amount ratio of the P picture is Kpb × Kc when the B picture is 1. Accordingly, the target code amount Dt per code amount ratio 1 is
Dt = Spb / (Np × Kpb × Kc + Nb)
From the above, the target code amount ratios Ktp and Ktb of the P picture and the B picture can be obtained by the following calculation formulas, respectively.

Ktp=Dt/Sp×Kpb×Kc
Ktb=Dt/Sb
上記で求めたPピクチャ及びBピクチャの目標符号量比率Ktp及びKtbを、目標符号量演算部40の出力であるPピクチャ及びBピクチャの目標符号量にそれぞれ乗算することにより、Pピクチャの目標符号量比率をKcに下げた時の各ピクチャの目標符号量を求めることができる。
Ktp = Dt / Sp × Kpb × Kc
Ktb = Dt / Sb
The target code amount of the P picture is obtained by multiplying the target code amount ratios Ktp and Ktb of the P picture and B picture obtained above by the target code amount of the P picture and B picture, which are the outputs of the target code amount calculation unit 40, respectively. The target code amount of each picture when the amount ratio is lowered to Kc can be obtained.

次に、Iピクチャ及びPピクチャ双方の符号量比率を下げる場合について説明する。GOP単位のIピクチャ、Pピクチャ及びBピクチャの平均符号量の合計Sipbは、
Sipb=Si×Ni+Sp×Np+Sb×Nb
Bピクチャの平均符号量に対するIピクチャ及びPピクチャの平均符号量の比率Kib及びKpbは、それぞれ、
Kpi=Si/Sb
Kpb=Sp/Sb
となる。ここで、Iピクチャの符号量比率をKci(0<Kci<1)、Pピクチャの符号量比率をKcp(0<Kcp<1)に下げる時、Iピクチャ及びPピクチャの目標符号量比率はBピクチャを1とすると、Kib×Kci及びKpb×Kcpとなる。従って、符号量比率1当たりの目標符号量Dtは、
Dt=Sipb/(Ni×Kib×Kci+Np×Kpb×Kcp+Nb)
以上から、Iピクチャ、Pピクチャ及びBピクチャの目標符号量比率Kti、Ktp、Ktbはそれぞれ以下の計算式により求めることができる。
Next, a case where the code amount ratio of both the I picture and the P picture is lowered will be described. The total Sipb of the average code amount of I picture, P picture and B picture in GOP unit is
Sipb = Si × Ni + Sp × Np + Sb × Nb
The ratios Kib and Kpb of the average code amount of the I picture and P picture to the average code amount of the B picture are respectively
Kpi = Si / Sb
Kpb = Sp / Sb
It becomes. Here, when the code amount ratio of the I picture is lowered to Kci (0 <Kci <1) and the code amount ratio of the P picture is lowered to Kcp (0 <Kcp <1), the target code amount ratio of the I picture and the P picture is B If the picture is 1, Kib × Kci and Kpb × Kcp. Accordingly, the target code amount Dt per code amount ratio 1 is
Dt = Sipb / (Ni × Kib × Kci + Np × Kpb × Kcp + Nb)
From the above, the target code amount ratios Kti, Ktp, and Ktb of I picture, P picture, and B picture can be obtained by the following calculation formulas, respectively.

Kti=Dt/Si×Kib×Kci
Ktp=Dt/Sp×Kpb×Kcp
Ktb=Dt/Sb
上記で求めたIピクチャ、Pピクチャ及びBピクチャの目標符号量比率Kti、Ktp及びKtbを、目標符号量演算部40の出力であるIピクチャ、Pピクチャ及びBピクチャの目標符号量にそれぞれ乗算することにより、Iピクチャの目標符号量比率をKci、Pピクチャの目標符号量比率をKcpに下げた時の各ピクチャの目標符号量を求めることができる。
Kti = Dt / Si × Kib × Kci
Ktp = Dt / Sp × Kpb × Kcp
Ktb = Dt / Sb
The target code amount ratios Kti, Ktp, and Ktb for the I picture, P picture, and B picture obtained above are respectively multiplied by the target code amounts for the I picture, P picture, and B picture that are output from the target code amount calculation unit 40. Thus, the target code amount of each picture when the target code amount ratio of the I picture is lowered to Kci and the target code amount ratio of the P picture is lowered to Kcp can be obtained.

なお、上記においてはGOP単位のIピクチャ、Pピクチャ及びBピクチャの平均符号量を元に、目標符号量比率を算出したが、GOP単位のIピクチャ、Pピクチャ及びBピクチャの平均符号量を固定の符号量比率とし、あらかじめ補正する目標符号量比率をメモリに保有しておき、符号量削減パラメータ演算部54から比率変更指示を受けるごとにメモリから順次補正比率を読み出して、目標符号量を補正してもよい。   In the above, the target code amount ratio is calculated based on the average code amount of I, P, and B pictures in GOP units, but the average code amount of I, P, and B pictures in GOP units is fixed. The target code amount ratio to be corrected is stored in the memory in advance, and each time the ratio change instruction is received from the code amount reduction parameter calculation unit 54, the correction ratio is sequentially read from the memory to correct the target code amount. May be.

目標符号量誤差補正部47は、1GOPあるいは複数のGOPを符号量補正単位とした場合に、符号量補正単位で生ずる補正目標符号量と目標符号量の誤差を補正する。誤差補正量は符号量補正単位ごとに、全ピクチャの目標符号量比率による補正後の目標符号量と補正前の目標符号量の誤差を累積して全誤差補正量を求め、求めた全誤差補正量を符号量補正単位のピクチャタイプ別目標符号量比率で分割することにより求める。求めたピクチャタイプ別の誤差補正量は、次以降の符号量補正単位で符号量制御単位ごとに分散して目標符号量を補正する。   The target code amount error correction unit 47 corrects an error between the corrected target code amount and the target code amount that occurs in the code amount correction unit when one GOP or a plurality of GOPs is used as the code amount correction unit. The error correction amount is calculated for each code amount correction unit by accumulating the error between the target code amount after correction based on the target code amount ratio of all pictures and the target code amount before correction to obtain the total error correction amount. The amount is obtained by dividing the amount by the target code amount ratio by picture type in the code amount correction unit. The obtained error correction amount for each picture type is dispersed for each code amount control unit in the following and subsequent code amount correction units to correct the target code amount.

誤差補正量の分散方法としては、ピクチャタイプ別の誤差補正量を、ピクチャタイプごとの符号量制御単位で均等に分散して目標符号量の補正を行う。また、誤差補正量の別の分散方法としては、符号量制御単位ごとに、ピクチャタイプ別の制御単位符号量Ui、Up及びUb単位で分散して目標符号量の補正を行う。   As a method of distributing the error correction amount, the error correction amount for each picture type is uniformly distributed in the code amount control unit for each picture type to correct the target code amount. As another method of distributing the error correction amount, the target code amount is corrected by being distributed in units of control unit code amounts Ui, Up, and Ub for each picture type for each code amount control unit.

以上の動作により、符号量削減率が著しく低い場合においても、所望のビットレートに変換した出力ビットストリームを出力することが可能となる。   With the above operation, even when the code amount reduction rate is extremely low, it is possible to output an output bit stream converted to a desired bit rate.

なお、本実施の形態3においては、動画像ビットレート変換装置として説明したが、これらの装置構成をソフトウェアプログラムに記述して記録媒体に記録し、CPUで実行するようにしても実現可能である。   In the third embodiment, the video bit rate conversion device has been described. However, these device configurations can be described in a software program, recorded on a recording medium, and executed by the CPU. .

なお、本実施の形態3においては、各機能ブロックは典型的には集積回路であるLSIとして実現される。これらは個別に1チップ化されても良いし、一部又は全てを含むように1チップ化されても良い。ここでは、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称されることもある。また、集積回路化の手法はLSIに限るものではなく、専用回路又は汎用プロセサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサーを利用しても良い。さらには、半導体技術の進歩又は派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行ってもよい。バイオ技術の適応等が可能性としてありえる。   In the third embodiment, each functional block is typically realized as an LSI that is an integrated circuit. These may be individually made into one chip, or may be made into one chip so as to include a part or all of them. The name used here is LSI, but it may also be called IC, system LSI, super LSI, or ultra LSI depending on the degree of integration. Further, the method of circuit integration is not limited to LSI, and implementation with a dedicated circuit or a general-purpose processor is also possible. An FPGA (Field Programmable Gate Array) that can be programmed after manufacturing the LSI, or a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used. Further, if integrated circuit technology comes out to replace LSI's as a result of the advancement of semiconductor technology or a derivative other technology, it is naturally also possible to carry out function block integration using this technology. Biotechnology can be applied.

また、本実施の形態3における動画像ビットレート変換装置の各機能ブロックを集積化したLSIが適用される映像サーバー及びネットワーク中継器は、それぞれ実施の形態1における図14及び図15の構成と同様である。   In addition, the video server and the network repeater to which the LSI in which the functional blocks of the moving image bit rate conversion apparatus according to the third embodiment are integrated are applied have the same configurations as those of FIGS. 14 and 15 according to the first embodiment, respectively. It is.

(実施の形態4)
図11は、本発明の実施の形態4における符号量削減装置の構成を示すブロック図であり、実施の形態1〜3において、符号量削減部10の代替として用いることができる。図11において、符号量削減装置60は、入力ビットストリームbs1を入力とし、複数の符号量削減パラメータの初期値を記憶する符号量削減パラメータ記憶部65、符号量削減パラメータの初期値及び符号量削減パラメータを選択してそれぞれ符号量の削減を行う第1の符号量削減回路61、第2の符号量削減回路62、第3の符号量削減回路63及び第4の符号量削減回路64、目標符号量により第1〜第4の符号量削減回路61〜64の出力を選択して出力ビットストリームbs2を出力するスイッチ部66を備える。
(Embodiment 4)
FIG. 11 is a block diagram showing the configuration of the code amount reduction apparatus according to the fourth embodiment of the present invention, and can be used as an alternative to the code amount reduction unit 10 in the first to third embodiments. In FIG. 11, the code amount reduction device 60 receives an input bitstream bs1 and stores a code amount reduction parameter storage unit 65 that stores initial values of a plurality of code amount reduction parameters, initial values of code amount reduction parameters, and code amount reduction. A first code amount reduction circuit 61, a second code amount reduction circuit 62, a third code amount reduction circuit 63, a fourth code amount reduction circuit 64, a target code, which select parameters and reduce the code amount respectively. A switch unit 66 is provided that selects the output of the first to fourth code amount reduction circuits 61 to 64 according to the amount and outputs the output bit stream bs2.

第1〜第4の符号量削減回路61〜64は、図2に示す符号量削減部10と同様の構成を有している。符号量削減パラメータは実施の形態1〜3で説明した符号量削減パラメータ演算部54から与えられ、また、目標符号量は目標符号量演算部40から与えられる。なお、ここでは説明の都合上、符号量削減回路の数を4としたが、回路規模やシステム用件に応じて、2以上の複数の数から選択するものとする。   The first to fourth code amount reduction circuits 61 to 64 have the same configuration as the code amount reduction unit 10 shown in FIG. The code amount reduction parameter is provided from the code amount reduction parameter calculation unit 54 described in the first to third embodiments, and the target code amount is provided from the target code amount calculation unit 40. Here, for convenience of explanation, the number of code amount reduction circuits is four, but it is selected from a plurality of two or more according to the circuit scale and system requirements.

以上のように構成した符号量削減装置60の詳細な動作について説明する。まず、ネットワークの帯域不足や受信端末からの要求等により、動画像ビットストリームのビットレート変換が必要になった場合、図示しない制御装置からビットレート変換の指示が符号量削減装置60に与えられる。この時、第1〜第4の符号量削減回路61〜64は、符号量削減パラメータ記憶部65から符号量削減パラメータの初期値を読み出して、それぞれ入力ビットストリームの符号量削減を行う。この時、第1〜第4の符号量削減回路61〜64に与えられる符号量削減パラメータの初期値はすべて異なる値であり、異なる出力符号量が得られる。   The detailed operation of the code amount reduction device 60 configured as described above will be described. First, when the bit rate conversion of a moving image bit stream becomes necessary due to a lack of network bandwidth or a request from a receiving terminal, an instruction for bit rate conversion is given to the code amount reduction device 60 from a control device (not shown). At this time, the first to fourth code amount reduction circuits 61 to 64 read the initial value of the code amount reduction parameter from the code amount reduction parameter storage unit 65, and respectively reduce the code amount of the input bitstream. At this time, the initial values of the code amount reduction parameters given to the first to fourth code amount reduction circuits 61 to 64 are all different values, and different output code amounts are obtained.

図12は、第1〜第4の符号量削減回路61〜64から出力される符号量制御単位、すなわちスライス単位の出力符号量の遷移を示す図である。図12において、スライス番号0の時点でビットレート変換の指示が与えられ、符号量削減パラメータの初期値により符号量削減を行い、以降符号量削減パラメータ演算部54から与えられる符号量削減パラメータにより出力符号量を目標符号量に近づくように符号量制御を行っている。白丸で示した点は下から第1〜第4の符号量削減部61〜64がそれぞれ出力した出力符号量である。この時、スイッチ部66は目標符号量を下回り、目標符号量に最も近い出力符号量である第2の符号量削減回路62の出力を選択する。以降、第2の符号量削減回路62は符号量削減パラメータ演算部54から符号量削減パラメータを与えられ、符号量削減を行った出力ビットストリームbs2を出力する。   FIG. 12 is a diagram illustrating transitions in the code amount control units output from the first to fourth code amount reduction circuits 61 to 64, that is, the output code amounts in slice units. In FIG. 12, a bit rate conversion instruction is given at the time of slice number 0, the code amount is reduced by the initial value of the code amount reduction parameter, and thereafter output by the code amount reduction parameter given from the code amount reduction parameter calculation unit 54. Code amount control is performed so that the code amount approaches the target code amount. The points indicated by white circles are output code amounts output from the first to fourth code amount reduction units 61 to 64 from the bottom. At this time, the switch unit 66 selects the output of the second code amount reduction circuit 62 that is below the target code amount and is the output code amount closest to the target code amount. Thereafter, the second code amount reduction circuit 62 receives the code amount reduction parameter from the code amount reduction parameter calculation unit 54, and outputs the output bit stream bs2 subjected to the code amount reduction.

以上の動作により、ビットレート変換直後の符号量削減パラメータとして、元のビットレートから符号量制御を行う場合と比較して、高速かつ安定的に引き込む符号量制御が可能となる。また、ビットレート変換直後に目標符号量より低い出力符号量のビットストリームを出力しているので、元の高ビットレートからの符号量制御を行う場合に比べて、ネットワークの伝送帯域が不足している場合などには有効である。   With the above operation, it is possible to control the code amount to be pulled in at a higher speed and more stably than the case where the code amount control is performed from the original bit rate as the code amount reduction parameter immediately after the bit rate conversion. In addition, since the bit stream of the output code amount lower than the target code amount is output immediately after the bit rate conversion, the network transmission band is insufficient compared to the case of performing the code amount control from the original high bit rate. It is effective when there is.

なお、上記においては、符号量削減回路を並列に並べて符号量削減を行い、その中から目標符号量を下回る最大の出力符号量を出力した符号量削減回路を選択したが、符号量削減回路を1個とし、符号量削減パラメータ記憶部65から与えられる複数の符号量削減パラメータを用いて同一のスライスの符号量削減を行い、目標符号量を下回り、目標符号量に最も近い出力符号量を出力した符号量削減パラメータを選択して、以降符号量削減を行うようにしても良い。   In the above, code amount reduction circuits are arranged in parallel to reduce the code amount, and the code amount reduction circuit that outputs the maximum output code amount below the target code amount is selected, but the code amount reduction circuit is The code amount of the same slice is reduced using a plurality of code amount reduction parameters given from the code amount reduction parameter storage unit 65, and the output code amount closest to the target code amount is output below the target code amount The code amount reduction parameter may be selected and the code amount may be reduced thereafter.

なお、本実施の形態4においては、符号量削減装置として説明したが、これらの装置構成をソフトウェアプログラムに記述して記録媒体に記録し、CPUで実行するようにしても実現可能である。   In the fourth embodiment, the code amount reduction device has been described. However, it is also possible to describe these device configurations in a software program, record them in a recording medium, and execute them by the CPU.

なお、本実施の形態4においては、各機能ブロックは典型的には集積回路であるLSIとして実現される。これらは個別に1チップ化されても良いし、一部又は全てを含むように1チップ化されても良い。ここでは、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称されることもある。また、集積回路化の手法はLSIに限るものではなく、専用回路又は汎用プロセサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサーを利用しても良い。さらには、半導体技術の進歩又は派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行ってもよい。バイオ技術の適応等が可能性としてありえる。   In the fourth embodiment, each functional block is typically realized as an LSI that is an integrated circuit. These may be individually made into one chip, or may be made into one chip so as to include a part or all of them. The name used here is LSI, but it may also be called IC, system LSI, super LSI, or ultra LSI depending on the degree of integration. Further, the method of circuit integration is not limited to LSI, and implementation with a dedicated circuit or a general-purpose processor is also possible. An FPGA (Field Programmable Gate Array) that can be programmed after manufacturing the LSI, or a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used. Further, if integrated circuit technology comes out to replace LSI's as a result of the advancement of semiconductor technology or a derivative other technology, it is naturally also possible to carry out function block integration using this technology. Biotechnology can be applied.

また、本実施の形態4における動画像ビットレート変換装置の各機能ブロックを集積化したLSIが適用される映像サーバー及びネットワーク中継器はそれぞれ実施の形態1における図14及び図15の構成と同様である。   Further, the video server and the network repeater to which the LSI in which the functional blocks of the moving image bit rate conversion apparatus according to the fourth embodiment are integrated are applied have the same configurations as those in FIGS. 14 and 15 in the first embodiment, respectively. is there.

(実施の形態5)
図13は、本発明の実施の形態5における動画像ビットレート変換装置の符号量削減部構成を示すブロック図であり、実施の形態1〜3において、符号量削減部10の代替として用いることができる。図13において、符号量削減装置70は、入力ビットストリームbs1を入力とし、複数の符号量削減パラメータの初期値を記憶する符号量削減パラメータ記憶部73、符号量削減パラメータ演算部54から与えられる符号量削減パラメータを用いて符号量削減を行う第1の符号量削減回路71、符号量削減パラメータの初期値を用いて符号量削減を行う第2の符号量削減回路72、符号量削減回路72の出力符号量を検出して符号量削減パラメータとともに保持する出力符号量検出保持部74とを備える。
(Embodiment 5)
FIG. 13 is a block diagram showing the configuration of the code amount reduction unit of the moving image bit rate conversion apparatus according to Embodiment 5 of the present invention. In Embodiments 1 to 3, it is used as an alternative to the code amount reduction unit 10. it can. In FIG. 13, the code amount reduction device 70 receives the input bitstream bs1 and receives a code amount reduction parameter storage unit 73 that stores initial values of a plurality of code amount reduction parameters, and a code provided from the code amount reduction parameter calculation unit 54. The first code amount reduction circuit 71 that performs code amount reduction using the amount reduction parameter, the second code amount reduction circuit 72 that performs code amount reduction using the initial value of the code amount reduction parameter, and the code amount reduction circuit 72 An output code amount detection holding unit 74 that detects the output code amount and holds it together with the code amount reduction parameter.

第1の符号量削減部71及び第2の符号量削減回路72は、図2に示す符号量削減部10と同様の構成を有している。また、符号量削減パラメータは実施の形態1〜3で説明した符号量削減パラメータ演算部54から与えられ、また、目標符号量は目標符号量演算部40から与えられる。   The first code amount reduction unit 71 and the second code amount reduction circuit 72 have the same configuration as the code amount reduction unit 10 shown in FIG. The code amount reduction parameter is provided from the code amount reduction parameter calculation unit 54 described in the first to third embodiments, and the target code amount is provided from the target code amount calculation unit 40.

以上のように構成した符号量削減装置70の詳細な動作について説明する。第2の符号量削減回路72は符号量制御単位ごとに符号量削減パラメータ記憶部73から符号量削減パラメータを順次読み出し、符号量の削減を行う。すなわち、スライス単位ごとに異なる符号量削減パラメータを用いて符号量削減を行うことになる。符号量削減回路72は、符号量削減パラメータ記憶部73に記憶されているすべての符号量削減パラメータを使用した後、再び最初の符号量削減パラメータから繰り返し符号量削減を行う。符号量削減回路72は、出力ビットストリームと用いた符号量削減パラメータを出力符号量検出部保持部74へ出力する。   The detailed operation of the code amount reducing apparatus 70 configured as described above will be described. The second code amount reduction circuit 72 sequentially reads the code amount reduction parameters from the code amount reduction parameter storage unit 73 for each code amount control unit, and reduces the code amount. That is, code amount reduction is performed using different code amount reduction parameters for each slice unit. The code amount reduction circuit 72 uses all the code amount reduction parameters stored in the code amount reduction parameter storage unit 73, and then repeatedly performs code amount reduction again from the first code amount reduction parameter. The code amount reduction circuit 72 outputs the output bit stream and the code amount reduction parameter used to the output code amount detection unit holding unit 74.

出力符号量検出保持部74は、符号量制御単位ごとに出力ビットストリームの出力符号量を検出し、符号量削減パラメータとともに保持する。符号量削減回路72から同じ符号量削減パラメータが入力された場合には、保持しておいた出力符号量と符号量削減パラメータを消去する。   The output code amount detection holding unit 74 detects the output code amount of the output bitstream for each code amount control unit, and holds it together with the code amount reduction parameter. When the same code amount reduction parameter is input from the code amount reduction circuit 72, the stored output code amount and code amount reduction parameter are deleted.

ここで、ネットワークの帯域不足や受信端末からの要求等により、動画像ビットストリームのビットレート変換が必要になった場合、図示しない制御装置からビットレート変換の指示が符号量削減装置70に与えられる。この時、出力符号量検出保持部74は、目標符号量演算部40から目標符号量を与えられ、繰り返し符号量削減を行った出力結果である出力符号量から目標符号量を下回り、目標符号量に最も近い出力符号量を得た符号量削減パラメータを選択し、符号量削減回路71へ出力する。   Here, when the bit rate conversion of the moving image bit stream becomes necessary due to a lack of network bandwidth or a request from the receiving terminal, a bit rate conversion instruction is given to the code amount reduction device 70 from a control device (not shown). . At this time, the output code amount detection / holding unit 74 is provided with the target code amount from the target code amount calculation unit 40, and is less than the target code amount from the output code amount that is the output result of the repeated code amount reduction. The code amount reduction parameter that obtained the output code amount closest to is selected and output to the code amount reduction circuit 71.

符号量削減回路71は、以降出力符号量検出保持部74から与えられた符号量削減パラメータを用いて符号量削減を行い、出力ビットストリームbs2を出力する。   The code amount reduction circuit 71 subsequently performs code amount reduction using the code amount reduction parameter given from the output code amount detection holding unit 74, and outputs the output bit stream bs2.

以上の動作により、ビットレート変換直後の符号量削減パラメータとして、元のビットレートから符号量制御を行う場合と比較して、高速かつ安定的に引き込む符号量制御が可能となる。また、ビットレート変換直後に目標符号量より低い出力符号量のビットストリームを出力しているので、元の高ビットレートからの符号量制御を行う場合に比べて、ネットワークの伝送帯域が不足している場合などには有効である。   With the above operation, it is possible to control the code amount to be pulled in at a higher speed and more stably than the case where the code amount control is performed from the original bit rate as the code amount reduction parameter immediately after the bit rate conversion. In addition, since the bit stream of the output code amount lower than the target code amount is output immediately after the bit rate conversion, the network transmission band is insufficient compared to the case of performing the code amount control from the original high bit rate. It is effective when there is.

なお、本実施の形態5においては、動画像ビットレート変換装置として説明したが、これらの装置構成をソフトウェアプログラムに記述して記録媒体に記録し、CPUで実行するようにしても実現可能である。   Although the fifth embodiment has been described as a moving image bit rate conversion device, it is also possible to describe the configuration of these devices in a software program, record them on a recording medium, and execute them by a CPU. .

なお、本実施の形態5においては、各機能ブロックは典型的には集積回路であるLSIとして実現される。これらは個別に1チップ化されても良いし、一部又は全てを含むように1チップ化されても良い。ここでは、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称されることもある。また、集積回路化の手法はLSIに限るものではなく、専用回路又は汎用プロセサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサーを利用しても良い。さらには、半導体技術の進歩又は派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行ってもよい。バイオ技術の適応等が可能性としてありえる。   In the fifth embodiment, each functional block is typically realized as an LSI which is an integrated circuit. These may be individually made into one chip, or may be made into one chip so as to include a part or all of them. The name used here is LSI, but it may also be called IC, system LSI, super LSI, or ultra LSI depending on the degree of integration. Further, the method of circuit integration is not limited to LSI, and implementation with a dedicated circuit or a general-purpose processor is also possible. An FPGA (Field Programmable Gate Array) that can be programmed after manufacturing the LSI, or a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used. Further, if integrated circuit technology comes out to replace LSI's as a result of the advancement of semiconductor technology or a derivative other technology, it is naturally also possible to carry out function block integration using this technology. Biotechnology can be applied.

また、本実施の形態5における動画像ビットレート変換装置の各機能ブロックを集積化したLSIが適用される映像サーバー及びネットワーク中継器はそれぞれ実施の形態1における図14及び図15の構成と同様である。   Further, the video server and the network repeater to which the LSI in which the functional blocks of the moving picture bit rate conversion apparatus in the fifth embodiment are integrated are applied have the same configurations as those in FIGS. 14 and 15 in the first embodiment, respectively. is there.

本発明にかかる動画像ビットレート変換方法及び装置は、MPEG等の直交変換により圧縮符号化された動画像ビットストリームのビットレートをリアルタイムに変換する機能を有し、動画像サーバー内やビデオカメラ内、あるいはネットワーク上の中継器内等に配置され、動画像の受信端末からの要求や伝送路の負荷状況等に応じて動画像のビットレートを変換して伝送する動画像伝送システムとして有用である。   A moving image bit rate conversion method and apparatus according to the present invention has a function of converting a bit rate of a moving image bit stream compression-encoded by orthogonal transform such as MPEG in real time, in a moving image server or a video camera. Or, it is arranged in a repeater on a network, etc., and is useful as a moving image transmission system that converts the bit rate of a moving image according to a request from a moving image receiving terminal or a load state of a transmission path, etc. .

本発明の実施の形態1における動画像ビットレート変換装置の構成を示すブロック図1 is a block diagram showing a configuration of a moving image bit rate conversion apparatus according to Embodiment 1 of the present invention. 本発明の実施の形態1における符号量削減部の構成を示すブロック図The block diagram which shows the structure of the code amount reduction part in Embodiment 1 of this invention. 可変長符号化を行う際に離散コサイン変換係数列のスキャン順序を示す図The figure which shows the scanning order of a discrete cosine transform coefficient sequence when performing variable length coding 本発明の実施の形態1における係数削減パラメータの一例を示す図The figure which shows an example of the coefficient reduction parameter in Embodiment 1 of this invention 本発明の実施の形態1における符号量削減部において、係数削減パラメータ及び量子化パラメータを変化させた時の平均出力ビットレートを表す図The figure showing the average output bit rate when the coefficient reduction parameter and the quantization parameter are changed in the code amount reduction unit according to the first embodiment of the present invention. 本発明の実施の形態1における符号量削減部において、量子化丸め補正パラメータを変化させた時の平均出力ビットレートを表す図The figure showing the average output bit rate when changing the quantization rounding correction parameter in the code amount reduction unit according to the first embodiment of the present invention. 本発明の実施の形態1における符号量誤差平滑化部の構成を示すブロック図The block diagram which shows the structure of the code amount error smoothing part in Embodiment 1 of this invention. 本発明の実施の形態2における動画像ビットレート変換装置の構成を示すブロック図The block diagram which shows the structure of the moving image bit rate conversion apparatus in Embodiment 2 of this invention. 本発明の実施の形態2における符号量削減率検出部の構成を示すブロック図The block diagram which shows the structure of the code amount reduction rate detection part in Embodiment 2 of this invention. 本発明の実施の形態3における動画像ビットレート変換装置における符号量削減部の構成を示すブロック図FIG. 9 is a block diagram showing a configuration of a code amount reduction unit in a moving image bit rate conversion apparatus according to Embodiment 3 of the present invention. 本発明の実施の形態4における動画像ビットレート変換装置における符号量削減部の構成を示すブロック図FIG. 9 is a block diagram showing the configuration of a code amount reduction unit in a moving image bit rate conversion apparatus according to Embodiment 4 of the present invention. 本発明の実施の形態4における符号量削減部の出力符号量の遷移を示す説明図Explanatory drawing which shows the transition of the output code amount of the code amount reduction part in Embodiment 4 of this invention. 本発明の実施の形態5における動画像ビットレート変換装置における符号量削減部の構成を示すブロック図FIG. 9 is a block diagram showing a configuration of a code amount reduction unit in a moving image bit rate conversion apparatus according to Embodiment 5 of the present invention. 本発明の実施の形態1における映像サーバーの構成を示すブロック図The block diagram which shows the structure of the video server in Embodiment 1 of this invention. 本発明の実施の形態1におけるネットワーク中継器の構成を示すブロック図The block diagram which shows the structure of the network repeater in Embodiment 1 of this invention. 従来の動画像ビットレート変換装置の構成を示すブロック図The block diagram which shows the structure of the conventional moving image bit rate conversion apparatus 従来の動画像ビットレート変換装置の符号量制御部の動作を示すフローチャートThe flowchart which shows operation | movement of the code amount control part of the conventional moving image bit rate conversion apparatus. MPEG2規格のビットストリームの階層構造を示す説明図Explanatory drawing showing the hierarchical structure of the bit stream of the MPEG2 standard

符号の説明Explanation of symbols

10 符号量削減部
11 可変長復号化部
12 逆量子化部
13 再量子化部
14 係数削減部
15 可変長符号化部
20 入力符号量検出部
30 出力符号量検出部
40 目標符号量演算部
41 符号量削減率検出部
42 単位コード検出部
43 符号量検出部
44 可変長符号量検出部
45 符号量削減率演算部
46 目標符号量比率補正部
47 目標符号量誤差補正部
50 符号量制御部
51 符号量誤差演算部
52 符号量誤差累積演算部
53 符号量誤差平滑化部
54 符号量削減パラメータ演算部
60,70 符号量削減装置
61,62,63,64,71,72 符号量削減回路
65,73 符号量削減パラメータ記憶部
66 スイッチ部
74 出力符号量検出保持部
80 映像サーバー
81 動画像ビットレート変換部
82 ネットワークインタフェース
83 ネットワーク制御部
84 動画像記録部
90 ネットワーク中継器
91 動画像ビットレート変換部
92,93 ネットワークインタフェース
94 ブリッジ部
95 ネットワーク制御部
100,101,102 動画像ビットレート変換装置
110 従来の動画像ビットレート変換装置
111 可変長復号化部
112 逆量子化部
113 再量子化部
114 可変長符号化部
115 符号量制御部
DESCRIPTION OF SYMBOLS 10 Code amount reduction part 11 Variable length decoding part 12 Inverse quantization part 13 Requantization part 14 Coefficient reduction part 15 Variable length encoding part 20 Input code amount detection part 30 Output code amount detection part 40 Target code amount calculation part 41 Code amount reduction rate detection unit 42 Unit code detection unit 43 Code amount detection unit 44 Variable length code amount detection unit 45 Code amount reduction rate calculation unit 46 Target code amount ratio correction unit 47 Target code amount error correction unit 50 Code amount control unit 51 Code amount error calculation unit 52 Code amount error accumulation calculation unit 53 Code amount error smoothing unit 54 Code amount reduction parameter calculation unit 60, 70 Code amount reduction device 61, 62, 63, 64, 71, 72 Code amount reduction circuit 65, 73 Code amount reduction parameter storage unit 66 Switch unit 74 Output code amount detection holding unit 80 Video server 81 Video bit rate conversion unit 82 Network interface Ace 83 Network control unit 84 Video recording unit 90 Network repeater 91 Video bit rate conversion unit 92, 93 Network interface 94 Bridge unit 95 Network control unit 100, 101, 102 Video bit rate conversion device 110 Conventional video bit rate Rate converter 111 Variable length decoding unit 112 Inverse quantization unit 113 Requantization unit 114 Variable length encoding unit 115 Code amount control unit

Claims (27)

直交変換を用いて圧縮符号化された動画像ビットストリームを、所望のビットレートに変換する動画像ビットレート変換方法であって、
所定の符号量制御単位ごとに動画像ビットストリームの入力符号量と出力符号量をカウントするステップと、
前記入力符号量と所定の符号量削減率から目標符号量を演算するステップと、
前記目標符号量と前記出力符号量との符号量誤差を演算するステップと、
ピクチャタイプごとに前記符号量誤差の累積演算を行うステップと、
前記累積符号量誤差を平滑化するステップと、
前記平滑化した累積符号量誤差から符号量削減パラメータを演算するステップと、
動画像ビットストリームを所定の符号量制御単位ごとに可変長復号化して逆量子化した離散コサイン変換系数列を、前記符号量削減パラメータにより再量子化して離散コサイン変換系数列の削減を行い、可変長符号化することにより符号量削減を行うステップとを備え、
前記符号量削減パラメータは、再量子化時に量子化スケールに加算する値を決定するパラメータと量子化丸め処理時に離散コサイン変換系数列に加算する値を決定するパラメータと離散コサイン変換係数列を削減する数を指定するパラメータとを含み、
符号量削減パラメータを制御することにより、動画像ビットストリームを所望のビットレートに変換する動画像ビットレート変換方法。
A moving image bit rate conversion method for converting a moving image bit stream compressed and encoded using orthogonal transformation into a desired bit rate,
Counting an input code amount and an output code amount of a moving picture bitstream for each predetermined code amount control unit;
Calculating a target code amount from the input code amount and a predetermined code amount reduction rate;
Calculating a code amount error between the target code amount and the output code amount;
Performing a cumulative calculation of the code amount error for each picture type;
Smoothing the accumulated code amount error;
Calculating a code amount reduction parameter from the smoothed accumulated code amount error;
A discrete cosine transform sequence that is variable-length decoded and inverse-quantized for each predetermined code amount control unit is requantized using the code amount reduction parameter to reduce the discrete cosine transform sequence. A code amount reduction step by performing long encoding,
The code amount reduction parameter reduces a parameter for determining a value to be added to the quantization scale at the time of requantization, a parameter for determining a value to be added to the discrete cosine transform series in the quantization rounding process, and a discrete cosine transform coefficient sequence. A parameter specifying the number,
A moving image bit rate conversion method for converting a moving image bit stream to a desired bit rate by controlling a code amount reduction parameter.
前記符号量削減パラメータは、離散コサイン変換系数列の係数削減による符号量削減を行った後、量子化スケールに値を加算して符号量削減を行うように設定する請求項1に記載の動画像ビットレート変換方法。 The moving image according to claim 1, wherein the code amount reduction parameter is set to perform code amount reduction by adding a value to a quantization scale after performing code amount reduction by reducing coefficients of a discrete cosine transform series. Bit rate conversion method. 前記符号量削減パラメータは、量子化スケールを1加算して再量子化する際の丸め処理時に、量子化丸め補正値を加算する量子化丸め補正パラメータを変化させた後、量子化スケールを2以上加算するように設定する請求項1に記載の動画像ビットレート変換方法。 The code amount reduction parameter is obtained by changing a quantization rounding correction parameter to which a quantization rounding correction value is added during rounding when adding a quantization scale by 1 and requantizing, and then increasing the quantization scale by two or more. The moving image bit rate conversion method according to claim 1, wherein the moving image bit rate conversion method is set to add. 前記符号量削減パラメータは、前記累積符号量誤差をピクチャタイプごとに定めた制御単位符号量で除算することにより求める請求項1に記載の動画像ビットレート変換方法。 The moving image bit rate conversion method according to claim 1, wherein the code amount reduction parameter is obtained by dividing the accumulated code amount error by a control unit code amount determined for each picture type. 前記制御単位符号量は、制御単位当たりの平均入力符号量を符号量削減パラメータ数で除算し、ピクチャタイプごとの符号量比率を乗算した値である請求項4に記載の動画像ビットレート変換方法。 5. The moving image bit rate conversion method according to claim 4, wherein the control unit code amount is a value obtained by dividing an average input code amount per control unit by the number of code amount reduction parameters and multiplying by a code amount ratio for each picture type. . 前記制御単位符号量は、ピクチャタイプごとの符号量比率を固定の符号量比率として仮定し、あらかじめ定めておく請求項4に記載の動画像ビットレート変換方法。 5. The moving image bit rate conversion method according to claim 4, wherein the control unit code amount is determined in advance assuming a code amount ratio for each picture type as a fixed code amount ratio. 前記所定の制御単位は、スライス単位である請求項1に記載の動画像ビットレート変換方法。 The moving image bit rate conversion method according to claim 1, wherein the predetermined control unit is a slice unit. 前記所定の制御単位は、マクロブロック単位である請求項1に記載の動画像ビットレート変換方法。 The moving image bit rate conversion method according to claim 1, wherein the predetermined control unit is a macroblock unit. 所定の符号量検出単位ごとに動画像ビットストリームの入力符号量をカウントするステップと、
前記所定の符号量検出単位ごとに動画像ビットストリーム中の可変長符号量をカウントするステップと、
ビットレート削減率、前記入力符号量及び前記可変長符号量から所定の符号量検出単位に非削減ビット列を除く符号量削減率を演算するステップとを備える請求項1に記載の動画像ビットレート変換方法。
Counting the input code amount of the video bitstream for each predetermined code amount detection unit;
Counting a variable length code amount in a moving image bitstream for each predetermined code amount detection unit;
The video bit rate conversion according to claim 1, further comprising: calculating a code amount reduction rate excluding a non-reduced bit string in a predetermined code amount detection unit from the bit rate reduction rate, the input code amount, and the variable length code amount. Method.
前記動画像ビットストリームがMPEG2−TSである場合には、符号量検出単位ごとのMPEG2−TSパケット数をカウントし、
前記MPEG2−TSパケット数から入力符号量を算出して、所定の符号量検出単位に非削減ビット列を除く符号量削減率を演算する請求項9に記載の動画像ビットレート変換方法。
When the moving image bitstream is MPEG2-TS, the number of MPEG2-TS packets per code amount detection unit is counted,
10. The moving image bit rate conversion method according to claim 9, wherein an input code amount is calculated from the number of MPEG2-TS packets, and a code amount reduction rate excluding a non-reduced bit sequence is calculated for a predetermined code amount detection unit.
前記所定の符号量検出単位はピクチャ単位である請求項9に記載の動画像ビットレート変換方法。 The moving image bit rate conversion method according to claim 9, wherein the predetermined code amount detection unit is a picture unit. 前記符号量削減パラメータがあらかじめ設定した下限の値であるにもかかわらず、累積した符号量誤差が所定の符号量制御単位ごとに増加している場合には、ピクチャタイプごとの目標符号量を目標符号量比率により補正し、出力符号量を削減する請求項1に記載の動画像ビットレート変換方法。 When the accumulated code amount error increases for each predetermined code amount control unit even though the code amount reduction parameter is a preset lower limit value, the target code amount for each picture type is set as the target. The moving image bit rate conversion method according to claim 1, wherein the output code amount is reduced by correcting the code amount ratio. 初期状態においてピクチャタイプごとの目標符号量比率が同一であり、前記符号量削減パラメータがあらかじめ設定した下限の値であるにもかかわらず、累積した符号量誤差が所定の符号量制御単位ごとに増加している場合には、Pピクチャの目標符号量比率を下げて出力符号量を削減する請求項12に記載の動画像ビットレート変換方法。 In the initial state, the target code amount ratio for each picture type is the same, and the accumulated code amount error increases for each predetermined code amount control unit even though the code amount reduction parameter is a preset lower limit value. 13. The moving image bit rate conversion method according to claim 12, wherein if the ratio is set, the target code amount ratio of the P picture is lowered to reduce the output code amount. Pピクチャの目標符号量をBピクチャの目標符号量まで下げた時点で、なおかつ累積した符号量誤差が所定の符号量制御単位ごとに増加している場合には、Iピクチャの目標符号量比率を下げ、出力符号量を削減する請求項13に記載の動画像ビットレート変換方法。 When the target code amount of the P picture is reduced to the target code amount of the B picture, and the accumulated code amount error increases for each predetermined code amount control unit, the target code amount ratio of the I picture is set to 14. The moving image bit rate conversion method according to claim 13, wherein the output code amount is reduced to reduce the output code amount. 前記目標符号量比率は、入力ビットストリーム中のGOP単位ごとにピクチャタイプ別の平均符号量から平均符号量比率を演算し、
前記平均符号量比率をもとに補正するピクチャタイプごとの目標符号量比率を演算する請求項12に記載の動画像ビットレート変換方法。
The target code amount ratio calculates an average code amount ratio from an average code amount for each picture type for each GOP unit in the input bitstream,
The moving image bit rate conversion method according to claim 12, wherein a target code amount ratio for each picture type to be corrected is calculated based on the average code amount ratio.
前記目標符号量比率は、入力されるピクチャタイプごとの符号量比率が固定であると仮定し、
前記ピクチャタイプごとの符号量比率をもとに補正するピクチャタイプごとの目標符号量比率をあらかじめ演算して保有している請求項12に記載の動画像ビットレート変換方法。
The target code amount ratio is assumed to be fixed for each input picture type.
13. The moving image bit rate conversion method according to claim 12, wherein a target code amount ratio for each picture type to be corrected based on the code amount ratio for each picture type is calculated and held in advance.
1GOPあるいは複数のGOPを符号量補正単位とし、
前記符号量補正単位ごとに、目標符号量比率により補正した目標符号量と目標符号量の誤差累積して全誤差補正量を演算し、
前記全誤差補正量をピクチャタイプ別目標符号量比率で分割してピクチャタイプ別の誤差補正量を演算し、
次の符号量補正単位で符号量制御単位ごとに前記ピクチャタイプ別の誤差補正量を分散して目標符号量を補正するステップを備える請求項12に記載の動画像ビットレート変換方法。
1 GOP or multiple GOPs are used as a code amount correction unit,
For each code amount correction unit, calculate the total error correction amount by accumulating errors between the target code amount and the target code amount corrected by the target code amount ratio,
Dividing the total error correction amount by the target code amount ratio by picture type to calculate the error correction amount by picture type,
13. The moving image bit rate conversion method according to claim 12, comprising a step of correcting the target code amount by distributing the error correction amount for each picture type for each code amount control unit in a next code amount correction unit.
異なる符号量削減パラメータを用いて符号量削減を行う複数のステップと、
符号量削減を行った複数の出力符号量の中から、目標符号量を下回り、目標符号量に最も近い出力符号量を出力した符号量削減パラメータを選択するステップとを備える請求項1に記載の動画像ビットレート変換方法。
A plurality of steps for performing code amount reduction using different code amount reduction parameters;
And a step of selecting a code amount reduction parameter that outputs an output code amount that is less than the target code amount and is closest to the target code amount, from among a plurality of output code amounts subjected to code amount reduction. Video bit rate conversion method.
異なる符号量削減パラメータを順次用いて符号量制御単位ごとに符号量削減を行うステップと、
符号量制御単位ごとに出力符号量を検出し、符号量削減パラメータとともに保持するステップと、
保持した複数の出力符号量の中から目標符号量を下回り、目標符号量に最も近い出力符号量を出力した符号量削減パラメータ選択するステップとを備える請求項1に記載の動画像ビットレート変換方法。
Performing code amount reduction for each code amount control unit by sequentially using different code amount reduction parameters;
Detecting an output code amount for each code amount control unit and holding it together with a code amount reduction parameter;
The moving image bit rate conversion method according to claim 1, further comprising: selecting a code amount reduction parameter that outputs an output code amount that is less than the target code amount and is closest to the target code amount from among the plurality of output code amounts held. .
直交変換を用いて圧縮符号化された動画像ビットストリームを入力とし、所望のビットレートに変換して出力する動画像ビットレート変換装置であって、
所定の符号量制御単位ごとに入力された動画像ビットストリームの入力符号量をカウントする入力符号量検出部と、
所定の符号量制御単位ごとに出力する動画像ビットストリームの出力符号量をカウントする出力符号量検出部と、
前記入力符号量と所定の符号量削減率から目標符号量を演算する目標符号量演算部と、
前記目標符号量と前記出力符号量との符号量誤差を演算する符号量誤差演算部と、
ピクチャタイプごとに前記符号量誤差の累積演算を行う符号量誤差累積演算部と、
前記累積した符号量誤差を平滑化する符号量誤差平滑化部と、
前記平滑化した累積符号量誤差から符号量削減パラメータを演算する符号量削減パラメータ演算部と、
動画像ビットストリームを所定の符号量制御単位ごとに可変長復号化して逆量子化した離散コサイン変換系数列を、前記符号量削減パラメータにより再量子化して離散コサイン変換系数列の削減を行い、可変長符号化することにより符号量削減を行う符号量削減部とを有し、
前記符号量削減パラメータは、再量子化時に量子化スケールに加算する値を指定するパラメータと量子化丸め処理時に離散コサイン変換系数列に加算する値を指定するパラメータと離散コサイン変換係数列を削減する数を指定するパラメータとを含む動画像ビットレート変換装置。
A moving image bit rate conversion device that receives a moving image bit stream that has been compression-encoded using orthogonal transformation, converts the moving image bit stream to a desired bit rate, and outputs the moving image bit rate.
An input code amount detection unit that counts an input code amount of a moving image bitstream input for each predetermined code amount control unit;
An output code amount detection unit that counts the output code amount of the moving image bitstream output for each predetermined code amount control unit;
A target code amount calculation unit for calculating a target code amount from the input code amount and a predetermined code amount reduction rate;
A code amount error calculation unit for calculating a code amount error between the target code amount and the output code amount;
A code amount error accumulation calculation unit that performs accumulation calculation of the code amount error for each picture type;
A code amount error smoothing unit that smoothes the accumulated code amount error;
A code amount reduction parameter calculation unit for calculating a code amount reduction parameter from the smoothed accumulated code amount error;
A discrete cosine transform sequence that is variable-length decoded and inverse-quantized for each predetermined code amount control unit is requantized using the code amount reduction parameter to reduce the discrete cosine transform sequence. A code amount reduction unit that performs code amount reduction by long encoding,
The code amount reduction parameter reduces a parameter for specifying a value to be added to the quantization scale at the time of requantization, a parameter for specifying a value to be added to the discrete cosine transform series in the quantization rounding process, and a discrete cosine transform coefficient sequence. A moving image bit rate conversion device including a parameter for specifying a number.
動画像ビットストリーム及びビットレート削減率を入力とし、
所定の符号量検出単位の先頭を検出する単位コード検出部と、
所定の符号量単位ごとに入力された動画像ビットストリームの入力符号量をカウントする符号量検出部と、
所定の符号量単位ごとに入力された動画像ビットストリームの中の入力可変長符号量をカウントする可変長符号量検出部と、
前記入力符号量、前記入力可変長符号量、及び与えられたビットレート削減率から符号量削減率を演算する符号量削減率演算部とを備え、
前記符号量削減率を前記目標符号量演算部へ出力する請求項20に記載の動画像ビットレート変換装置。
Input video bit stream and bit rate reduction rate,
A unit code detection unit for detecting a head of a predetermined code amount detection unit;
A code amount detection unit that counts the input code amount of a moving image bitstream input for each predetermined code amount unit;
A variable-length code amount detection unit that counts an input variable-length code amount in a moving image bitstream input for each predetermined code amount unit;
A code amount reduction rate calculating unit that calculates a code amount reduction rate from the input code amount, the input variable length code amount, and a given bit rate reduction rate;
21. The moving image bit rate conversion device according to claim 20, wherein the code amount reduction rate is output to the target code amount calculation unit.
符号量削減パラメータが下限に達したにもかかわらず、累積符号量誤差が増加していると判断した場合に、符号量削減パラメータ演算部から比率変更指示を受け、前記目標符号量のピクチャタイプごとの比率を補正する目標符号量比率補正部と、
前記目標符号量と前記ピクチャタイプごとの比率を補正した目標符号量との符号量誤差を補正する目標符号量誤差補正部とを備え、
前記補正した目標符号量を符号量誤差演算部に出力する請求項20に記載の動画像ビットレート変換装置。
When it is determined that the accumulated code amount error has increased despite the code amount reduction parameter reaching the lower limit, a ratio change instruction is received from the code amount reduction parameter calculation unit, and each picture type of the target code amount A target code amount ratio correction unit for correcting the ratio of
A target code amount error correction unit that corrects a code amount error between the target code amount and a target code amount obtained by correcting a ratio for each picture type;
21. The moving image bit rate conversion device according to claim 20, wherein the corrected target code amount is output to a code amount error calculation unit.
複数の符号量削減パラメータの初期値を記憶する符号量削減パラメータ記憶部と、
前記符号量削減パラメータの初期値あるいは符号量削減パラメータ演算部の出力である符号量削減パラメータを用いてそれぞれ符号量の削減を行う複数の符号量削減部と、
複数の符号量削減部から1つを選択するスイッチ部とを備え、
ビットレート変換時に、前記複数の符号量削減部の出力から目標符号量を下回り、かつ前記所定の目標符号量に最も近い出力符号量を出力する符号量削減部を選択し、
以降選択された符号量削減部は符号量削減パラメータ演算部の出力である符号量削減パラメータを用いて符号量削減を行う請求項20に記載の動画像ビットレート変換装置。
A code amount reduction parameter storage unit that stores initial values of a plurality of code amount reduction parameters;
A plurality of code amount reduction units that respectively reduce a code amount using a code amount reduction parameter that is an initial value of the code amount reduction parameter or an output of a code amount reduction parameter calculation unit;
A switch unit for selecting one from a plurality of code amount reduction units,
At the time of bit rate conversion, select a code amount reducing unit that outputs an output code amount that is less than the target code amount from the outputs of the plurality of code amount reducing units and is closest to the predetermined target code amount,
21. The moving picture bit rate conversion apparatus according to claim 20, wherein the selected code amount reduction unit performs code amount reduction using a code amount reduction parameter that is an output of the code amount reduction parameter calculation unit.
複数の符号量削減パラメータの初期値を記憶する符号量削減パラメータ記憶部と、
前記複数の符号量削減パラメータの初期値を順次用いて制御単位ごとに符号量削減を行う第1の符号量削減部と、
前記第1の符号量削減部の出力符号量をカウントして、符号量削減パラメータとともに保持する出力符号量検出部と、
符号量削減パラメータを用いて符号量削減を行う第2の符号量削減部とを備え、
ビットレート変換時に、所定の目標符号量により、前記複数の符号量削減パラメータを用いて符号量削減を行ったの出力符号量から目標符号量を下回り、かつ前記所定の目標符号量に最も近い出力符号量を出力する符号量削減パラメータを選択し、
前記第2の符号量削減部は、ビットレート変換時に、前記選択した符号量削減パラメータを用い、それ以外の場合は、符号量削減パラメータ演算部の出力である符号量削減パラメータを用いて符号量削減を行う請求項20に記載の動画像ビットレート変換装置。
A code amount reduction parameter storage unit that stores initial values of a plurality of code amount reduction parameters;
A first code amount reduction unit that performs code amount reduction for each control unit by sequentially using initial values of the plurality of code amount reduction parameters;
An output code amount detection unit that counts an output code amount of the first code amount reduction unit and holds it together with a code amount reduction parameter;
A second code amount reduction unit that performs code amount reduction using the code amount reduction parameter;
At the time of bit rate conversion, an output that is less than the target code amount from the output code amount obtained by performing code amount reduction using the plurality of code amount reduction parameters by a predetermined target code amount and is closest to the predetermined target code amount Select the code amount reduction parameter to output the code amount,
The second code amount reduction unit uses the selected code amount reduction parameter at the time of bit rate conversion, and otherwise uses the code amount reduction parameter that is the output of the code amount reduction parameter calculation unit. 21. The moving image bit rate conversion device according to claim 20, wherein the reduction is performed.
複数の符号量削減パラメータの初期値を記憶する符号量削減パラメータ記憶部と、
符号量削減パラメータ演算部から与えられる符号量削減パラメータを用いて符号量削減を行う第1の符号量削減部と、
前記符号量削減パラメータの初期値を用いて符号量削減を行う第2の符号量削減部と、
前記第2の符号量削減部が出力した出力ビットストリームの出力符号量を符号量制御単位ごとに検出し、符号量削減パラメータの初期値とともに保持する出力符号量検出保持部とを備え、
ビットレート変換時に、前記出力符号量検出保持部が保持している出力符号量から目標符号量を下回り、目標符号量に最も近い出力符号量を得た符号量削減パラメータを選択し、
前記第1の符号量削減部は、ビットレート変換時のみ、前記選択した符号量削減パラメータを用いて符号量削減を行う請求項20に記載の動画像ビットレート変換装置。
A code amount reduction parameter storage unit that stores initial values of a plurality of code amount reduction parameters;
A first code amount reduction unit that performs code amount reduction using the code amount reduction parameter given from the code amount reduction parameter calculation unit;
A second code amount reduction unit that performs code amount reduction using an initial value of the code amount reduction parameter;
An output code amount detection holding unit that detects the output code amount of the output bitstream output by the second code amount reduction unit for each code amount control unit, and holds the initial value of the code amount reduction parameter;
At the time of bit rate conversion, select a code amount reduction parameter that is less than the target code amount from the output code amount held by the output code amount detection holding unit and obtains the output code amount closest to the target code amount,
21. The moving image bit rate conversion apparatus according to claim 20, wherein the first code amount reduction unit performs code amount reduction using the selected code amount reduction parameter only at the time of bit rate conversion.
前記請求項1から請求項19までのいずれかに記載の動画像ビットストリーム変換方法が有する機能の全部または一部をコンピュータで実現するためのプログラムを格納して構成されているプログラム記録媒体。 A program recording medium configured to store a program for realizing all or part of the functions of the moving image bitstream conversion method according to any one of claims 1 to 19 by a computer. 直交変換を用いて圧縮符号化された動画像ビットストリームを入力とし、所望のビットレートに変換して出力する動画像ビットレート変換回路であって、
所定の符号量制御単位ごとに入力された動画像ビットストリームの入力符号量をカウントする入力符号量検出部と、
所定の符号量制御単位ごとに出力する動画像ビットストリームの出力符号量をカウントする出力符号量検出部と、
前記入力符号量と所定の符号量削減率から目標符号量を演算する目標符号量演算部と、
前記目標符号量と前記出力符号量との符号量誤差を演算する符号量誤差演算部と、
ピクチャタイプごとに前記符号量誤差の累積演算を行う符号量誤差累積演算部と、
前記累積した符号量誤差を平滑化する符号量誤差平滑化部と、
前記平滑化した累積符号量誤差から符号量削減パラメータを演算する符号量削減パラメータ演算部と、
動画像ビットストリームを所定の符号量制御単位ごとに可変長復号化して逆量子化した離散コサイン変換系数列を、前記符号量削減パラメータにより再量子化して離散コサイン変換系数列の削減を行い、可変長符号化することにより符号量削減を行う符号量削減部とを有し、
前記符号量削減パラメータは、再量子化時に量子化スケールに加算する値を指定するパラメータと量子化丸め処理時に離散コサイン変換系数列に加算する値を指定するパラメータと離散コサイン変換係数列を削減する数を指定するパラメータとを含む動画像ビットレート変換回路。
A moving image bit rate conversion circuit that receives a moving image bit stream that has been compression-encoded using orthogonal transformation, converts the moving image bit stream to a desired bit rate, and outputs the moving image bit rate.
An input code amount detection unit that counts an input code amount of a moving image bitstream input for each predetermined code amount control unit;
An output code amount detection unit that counts the output code amount of the moving image bitstream output for each predetermined code amount control unit;
A target code amount calculation unit for calculating a target code amount from the input code amount and a predetermined code amount reduction rate;
A code amount error calculation unit for calculating a code amount error between the target code amount and the output code amount;
A code amount error accumulation calculation unit that performs accumulation calculation of the code amount error for each picture type;
A code amount error smoothing unit that smoothes the accumulated code amount error;
A code amount reduction parameter calculation unit for calculating a code amount reduction parameter from the smoothed accumulated code amount error;
A discrete cosine transform sequence that is variable-length decoded and inverse-quantized for each predetermined code amount control unit is requantized using the code amount reduction parameter to reduce the discrete cosine transform sequence. A code amount reduction unit that performs code amount reduction by long encoding,
The code amount reduction parameter reduces a parameter for specifying a value to be added to the quantization scale at the time of requantization, a parameter for specifying a value to be added to the discrete cosine transform series in the quantization rounding process, and a discrete cosine transform coefficient sequence. A moving image bit rate conversion circuit including a parameter for specifying a number.
JP2005127412A 2005-04-26 2005-04-26 Moving picture bit rate conversion method, moving picture bit rate conversion apparatus, moving picture bit rate conversion circuit, and program recording medium Pending JP2006310912A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005127412A JP2006310912A (en) 2005-04-26 2005-04-26 Moving picture bit rate conversion method, moving picture bit rate conversion apparatus, moving picture bit rate conversion circuit, and program recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005127412A JP2006310912A (en) 2005-04-26 2005-04-26 Moving picture bit rate conversion method, moving picture bit rate conversion apparatus, moving picture bit rate conversion circuit, and program recording medium

Publications (1)

Publication Number Publication Date
JP2006310912A true JP2006310912A (en) 2006-11-09

Family

ID=37477336

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005127412A Pending JP2006310912A (en) 2005-04-26 2005-04-26 Moving picture bit rate conversion method, moving picture bit rate conversion apparatus, moving picture bit rate conversion circuit, and program recording medium

Country Status (1)

Country Link
JP (1) JP2006310912A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009148076A1 (en) * 2008-06-05 2009-12-10 日本電信電話株式会社 Video encoding amount control method, video encoding amount control device, video encoding amount control program, and computer readable recording medium on which said program is recorded
JP2015516734A (en) * 2012-03-31 2015-06-11 バイドゥ オンライン ネットワーク テクノロジー(ペキン) カンパニー リミテッド Method, apparatus and device for image compression

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009148076A1 (en) * 2008-06-05 2009-12-10 日本電信電話株式会社 Video encoding amount control method, video encoding amount control device, video encoding amount control program, and computer readable recording medium on which said program is recorded
CN102047661A (en) * 2008-06-05 2011-05-04 日本电信电话株式会社 Video encoding amount control method, video encoding amount control device, video encoding amount control program, and computer readable recording medium on which said program is recorded
JP4999991B2 (en) * 2008-06-05 2012-08-15 日本電信電話株式会社 Video code amount control method, video code amount control device, video code amount control program, and computer-readable recording medium storing the program
KR101213243B1 (en) 2008-06-05 2012-12-18 니폰덴신뎅와 가부시키가이샤 Video bitrate control method, video bitrate control apparatus, video bitrate control program, and computer-readable recording medium having the program recorded thereon
RU2485711C2 (en) * 2008-06-05 2013-06-20 Ниппон Телеграф Энд Телефон Корпорейшн Method of controlling video bitrate, apparatus for controlling video bitrate, machine-readable recording medium on which video bitrate control program is recorded
US8548042B2 (en) 2008-06-05 2013-10-01 Nippon Telegraph And Telephone Corporation Video bitrate control method, video bitrate control apparatus, video bitrate control program, and computer-readable recording medium having the program recorded thereon
JP2015516734A (en) * 2012-03-31 2015-06-11 バイドゥ オンライン ネットワーク テクノロジー(ペキン) カンパニー リミテッド Method, apparatus and device for image compression

Similar Documents

Publication Publication Date Title
US7301999B2 (en) Quantization method and system for video MPEG applications and computer program product therefor
US20100091842A1 (en) Coding rate conversion apparatus, coding rate conversion method, and integrated circuit
US6895052B2 (en) Coded signal separating and merging apparatus, method and computer program product
KR100604702B1 (en) Apparatus for encoding an image sequence and method for generating a quantizer scale to quantize an image signals
US6587508B1 (en) Apparatus, method and computer program product for transcoding a coded moving picture sequence
US7426309B2 (en) Method of controlling encoding rate, method of transmitting video data, encoding rate controller for video encoder, and video data transmission system using the encoding rate controller
US8355434B2 (en) Digital video line-by-line dynamic rate adaptation
RU2527740C2 (en) Video encoding control method, video encoding device and video encoding programme
US20050271140A1 (en) Bit stream separating and merging system, apparatus, method and computer program product
US9047669B1 (en) Bit rate control for data compression
KR101379537B1 (en) Method for video encoding controll using channel information of wireless networks
US7082163B2 (en) Picture coding method, picture coding apparatus and image relaying apparatus
EP2192785A1 (en) Image processing device, and image processing method
US20060171463A1 (en) Apparatus, system for, method of and computer program product for separating and merging coded signal
US7933459B2 (en) Data processing apparatus, the method and coding apparatus
JP3519673B2 (en) Video data creation device and video encoding device
JP2006191253A (en) Rate converting method and rate converter
KR100950525B1 (en) Transcoding apparatus and method, target bit allocation, complexity prediction apparatus and method of picture therein
JP3807157B2 (en) Encoding apparatus and encoding method
US20080253447A1 (en) Video Transcoding with Selection of Data Portions to be Processed
JP2006310912A (en) Moving picture bit rate conversion method, moving picture bit rate conversion apparatus, moving picture bit rate conversion circuit, and program recording medium
JP3948025B2 (en) Image code transcoder and image code transcoding method
WO2002080575A1 (en) Image processing apparatus, image processing method, image processing program, and recording medium
WO2007125574A1 (en) Video transferring apparatus
JP4038774B2 (en) Encoding apparatus and encoding method