JP5076085B2 - Transcoder - Google Patents

Transcoder Download PDF

Info

Publication number
JP5076085B2
JP5076085B2 JP2012005457A JP2012005457A JP5076085B2 JP 5076085 B2 JP5076085 B2 JP 5076085B2 JP 2012005457 A JP2012005457 A JP 2012005457A JP 2012005457 A JP2012005457 A JP 2012005457A JP 5076085 B2 JP5076085 B2 JP 5076085B2
Authority
JP
Japan
Prior art keywords
period
bit rate
stream
ratio
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2012005457A
Other languages
Japanese (ja)
Other versions
JP2012110011A (en
Inventor
弘 長谷川
宣行 高須
誠 斉藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
MegaChips Corp
Original Assignee
MegaChips Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by MegaChips Corp filed Critical MegaChips Corp
Priority to JP2012005457A priority Critical patent/JP5076085B2/en
Publication of JP2012110011A publication Critical patent/JP2012110011A/en
Application granted granted Critical
Publication of JP5076085B2 publication Critical patent/JP5076085B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、入力ストリームをデコードして異なる出力ストリームに変換するトランスコーダに関し、詳しくは、出力ストリームの発生符号量を目標ビットレートに向けて適正に制御する技術に関する。   The present invention relates to a transcoder that decodes an input stream and converts it to a different output stream, and more particularly to a technique for appropriately controlling the generated code amount of an output stream toward a target bit rate.

デジタル放送で配信される画像や、DVD、ハードディスクなどに格納される画像などは、各種の符号化方式に従って圧縮される。これは、伝送帯域を圧迫しないため、伝送速度を上げるため、あるいは、記憶サイズを小さくするなどの目的のためである。   An image distributed by digital broadcasting, an image stored on a DVD, a hard disk, or the like is compressed according to various encoding methods. This is for the purpose of not increasing the transmission band, increasing the transmission speed, or reducing the storage size.

画像の符号化方式には、MPEG2やH.264など様々な規格が存在する。そして、入力した符号化画像の符号量を削減するなどの目的で符号化方式の変換が行われる場合がある。トランスコーダは、入力した符号化画像を一旦デコードする。そして、トランスコーダは、デコードした画像を、再び異なる符号化方式(あるいは同じ符号化方式)で符号化する。このようにして、トランスコーダは、出力ストリームのビットレートを制御するのである。   MPEG2 and H.264 can be used for image encoding. There are various standards such as H.264. Then, encoding method conversion may be performed for the purpose of reducing the code amount of the input encoded image. The transcoder once decodes the input encoded image. Then, the transcoder encodes the decoded image again with a different encoding method (or the same encoding method). In this way, the transcoder controls the bit rate of the output stream.

下記特許文献1は、第1の圧縮符号化方式で圧縮された画像を第2の圧縮符号化方式で圧縮された画像に変換するトランスコーダに関するものである。このトランスコーダは、第1の圧縮符号化方式で圧縮された画像を復号する際に発生する中間情報を用いて、第2の圧縮符号化方式で画像を圧縮するようにしている。   Patent Document 1 below relates to a transcoder that converts an image compressed by a first compression encoding method into an image compressed by a second compression encoding method. This transcoder compresses an image by the second compression encoding method using intermediate information generated when the image compressed by the first compression encoding method is decoded.

特開2006−74635号公報JP 2006-74635 A

従来のビットレート変換技術では、入力ストリームのGOP(Group of pictures)単位のビットレートや出力ストリームのGOP単位の目標ビットレートに基づいて、ビットレート変換が行われている。つまり、GOP単位をレート制御の制御単位期間として設定している。そして、入力ストリームのGOPのピクチャ構成がシーケンス全体において、ある程度一定であることが前提とされており、入力ストリームのGOP単位のビットレートが急激に変動することは想定されていない。   In the conventional bit rate conversion technology, bit rate conversion is performed based on the bit rate of the input stream in GOP (Group of pictures) units or the target bit rate of the output stream in GOP units. That is, the GOP unit is set as the control unit period for rate control. Then, it is assumed that the GOP picture configuration of the input stream is constant to some extent in the entire sequence, and it is not assumed that the bit rate of the GOP unit of the input stream fluctuates rapidly.

このため、シーケンスの途中で一時的にGOPを構成するフレーム数が少なくなった場合、あるいはGOPのピクチャ構成が、PピクチャフレームやIピクチャフレームが連続して挿入される構成となった場合などには、制御単位期間内のIピクチャフレームの挿入比率が高くなる。   For this reason, when the number of frames constituting a GOP temporarily decreases in the middle of a sequence, or when the GOP picture configuration is such that P picture frames or I picture frames are inserted continuously. The insertion ratio of I picture frames within the control unit period becomes high.

一般的に、MPEG2においてピクチャフレームのビット比率はI:P:B=5:3:1とされている。したがって、一時的に、GOP内のIピクチャフレームやPピクチャフレームの挿入比率が高くなった場合、その制御単位期間のビットレートが、入力ストリームの平均ビットレートよりも一時的に急激に増加し、レート変換制御が不安定になるという問題があった。   In general, the bit ratio of picture frames in MPEG2 is I: P: B = 5: 3: 1. Therefore, when the insertion ratio of the I picture frame or P picture frame in the GOP temporarily increases, the bit rate of the control unit period temporarily increases more rapidly than the average bit rate of the input stream, There was a problem that the rate conversion control became unstable.

そこで、本発明は前記問題点に鑑み、制御単位期間内における入力ストリームのビットレートを大きく変動させることなく、出力ストリームの発生符号量を目標ビットレートに向けて適正に制御することを目的とする。   In view of the above problems, the present invention has an object to appropriately control the amount of generated code of an output stream toward a target bit rate without greatly changing the bit rate of the input stream within the control unit period. .

上記課題を解決するため、請求項1記載の発明は、第1のストリームを第2のストリームに変換するトランスコーダであって、制御単位期間を決定する期間決定手段と、決定された制御単位期間ごとの第1のストリームのビットレートを取得する手段と、取得した制御単位期間ごとの第1のストリームのビットレートを含む第1のストリームの情報を用いて、第2のストリームの量子化ステップ値を算出する量子化ステップ値算出手段と、を備え、前記期間決定手段は、各制御単位期間に含まれるIピクチャフレームの比率が所定の比率以下となるよう各制御単位期間を決定することを特徴とする。   In order to solve the above problem, the invention according to claim 1 is a transcoder for converting a first stream into a second stream, a period determining means for determining a control unit period, and a determined control unit period. The second stream quantization step value using means for acquiring the bit rate of the first stream for each control unit and information of the first stream including the bit rate of the first stream for each acquired control unit period Quantizing step value calculating means for calculating the control unit, wherein the period determining means determines each control unit period so that a ratio of I picture frames included in each control unit period is equal to or less than a predetermined ratio. And

請求項2記載の発明は、請求項1に記載のトランスコーダにおいて、前記期間決定手段は、GOP内のIピクチャフレームの比率が所定の割合以下である場合には、GOPを制御単位期間として決定し、GOP内のIピクチャフレームの比率が所定の割合を超える場合には、Iピクチャフレームの比率が所定の比率以下となるまで複数のGOPを連結し、連結された複数のGOPを制御単位期間として決定することを特徴とする。   According to a second aspect of the present invention, in the transcoder according to the first aspect, the period determining means determines the GOP as the control unit period when the ratio of the I picture frames in the GOP is equal to or less than a predetermined ratio. If the ratio of the I picture frames in the GOP exceeds a predetermined ratio, the plurality of GOPs are concatenated until the ratio of the I picture frames is equal to or less than the predetermined ratio, and the concatenated GOPs are connected to the control unit period. It is determined as follows.

請求項3記載の発明は、請求項2に記載のトランスコーダにおいて、前記期間決定手段は、I、P、Bピクチャフレームにそれぞれ所定の重み付けを設定し、重み付けを加味した上で、GOP内のIピクチャフレームの比率が所定の比率以下となるか否かを判断することを特徴とする。   According to a third aspect of the present invention, in the transcoder according to the second aspect, the period determining means sets a predetermined weight to each of the I, P, and B picture frames, takes into account the weight, and It is characterized by determining whether or not the ratio of the I picture frame is equal to or less than a predetermined ratio.

請求項4記載の発明は、請求項1ないし請求項3のいずれかに記載のトランスコーダにおいて、さらに、第N+1期間の第2のストリームの目標ビットレートと第N期間以前の第1のストリームのビットレートとの比に基づいて第N+1期間の期間変換係数を算出する期間変換係数算出手段、を備え、前記量子化ステップ値算出手段は、第N+1期間の第1のストリームの量子化ステップ値に前記期間変換係数を乗算することで、第N+1期間の第2のストリームの量子化ステップ値を算出する手段、を含むことを特徴とする。   According to a fourth aspect of the present invention, in the transcoder according to any one of the first to third aspects, the target bit rate of the second stream in the N + 1 period and the first stream before the Nth period Period conversion coefficient calculation means for calculating a period conversion coefficient for the (N + 1) period based on a ratio to the bit rate, and the quantization step value calculation means sets the quantization step value of the first stream for the (N + 1) period to Means for calculating a quantization step value of the second stream in the (N + 1) period by multiplying by the period conversion coefficient.

請求項5記載の発明は、請求項4に記載のトランスコーダにおいて、さらに、第2のストリーム全体の目標ビットレートと、第N期間以前の変換済みの第2のストリームのビットレートと、第N期間の第2のストリームの目標ビットレートに基づいて第N+1期間の第2のストリームの目標ビットレートを決定する目標ビットレート決定手段、を備えることを特徴とする。   The invention according to claim 5 is the transcoder according to claim 4, further comprising: a target bit rate of the entire second stream; a bit rate of the converted second stream before the Nth period; Target bit rate determining means for determining the target bit rate of the second stream in the (N + 1) period based on the target bit rate of the second stream in the period is provided.

請求項6記載の発明は、請求項5に記載のトランスコーダにおいて、第N期間以前の変換済みの第2のストリームのビットレートと第N期間の第2のストリームの目標ビットレートとの比を目標比とすると、前記目標ビットレート決定手段は、第2のストリームの全体の目標ビットレートと前記目標比との比に基づいて第N+1期間の第2のストリームの目標ビットレートを算出することを特徴とする。   The invention according to claim 6 is the transcoder according to claim 5, wherein the ratio between the bit rate of the converted second stream before the Nth period and the target bitrate of the second stream in the Nth period is calculated. Assuming the target ratio, the target bit rate determining means calculates the target bit rate of the second stream in the (N + 1) period based on the ratio between the total target bit rate of the second stream and the target ratio. Features.

請求項7記載の発明は、請求項6に記載のトランスコーダにおいて、第N−1期間の第1のストリームのビットレートと第N期間の第1のストリームのビットレートの比を期間比とすると、前記目標ビットレート決定手段は、前記目標比に前記期間比を乗算し、前記目標比を調整することを特徴とする。   The invention according to claim 7 is the transcoder according to claim 6, wherein the ratio of the bit rate of the first stream in the (N-1) period and the bit rate of the first stream in the N period is the period ratio. The target bit rate determining means adjusts the target ratio by multiplying the target ratio by the period ratio.

請求項8記載の発明は、請求項6に記載のトランスコーダにおいて、第N期間の第1のストリームのビットレートと第N+1期間の第1のストリームのビットレートの比を期間比とすると、前記目標ビットレート決定手段は、前記目標比に前記期間比を乗算し、前記目標比を調整することを特徴とする。   The invention according to claim 8 is the transcoder according to claim 6, wherein the ratio of the bit rate of the first stream in the N period and the bit rate of the first stream in the N + 1 period is a period ratio. The target bit rate determining means adjusts the target ratio by multiplying the target ratio by the period ratio.

請求項9記載の発明は、請求項5に記載のトランスコーダにおいて、第N期間の第2のストリームの目標ビットレートと第N期間以前の変換済みの第2のストリームのビットレートとの差に基づいて算出される値を目標差とすると、前記目標ビットレート決定手段は、第2のストリームの全体の目標ビットレートに前記目標差を加算することで、第N+1期間の第2のストリームの目標ビットレートを算出することを特徴とする。   The invention described in claim 9 is the transcoder according to claim 5, wherein the difference between the target bit rate of the second stream in the Nth period and the bit rate of the converted second stream before the Nth period. If the value calculated based on the target difference is the target difference, the target bit rate determination means adds the target difference to the overall target bit rate of the second stream, thereby obtaining the target of the second stream in the (N + 1) period. The bit rate is calculated.

請求項10記載の発明は、請求項9に記載のトランスコーダにおいて、第N期間の第1のストリームのビットレートと第N−1期間の第1のストリームのビットレートの比を期間比とすると、前記目標ビットレート決定手段は、前記目標差に前記期間比を乗算し、前記目標差を調整することを特徴とする。   According to a tenth aspect of the present invention, in the transcoder according to the ninth aspect, the ratio of the bit rate of the first stream in the Nth period and the bit rate of the first stream in the N-1 period is a period ratio. The target bit rate determining means adjusts the target difference by multiplying the target difference by the period ratio.

請求項11記載の発明は、請求項9に記載のトランスコーダにおいて、第N期間の第1のストリームのビットレートと第N−1期間の第1のストリームのビットレートの差に基づいて算出される値を期間差とすると、前記目標ビットレート決定手段は、前記目標差に前記期間差を乗算し、前記目標差を調整することを特徴とする。   The invention according to claim 11 is the transcoder according to claim 9, wherein the transcoder is calculated based on a difference between a bit rate of the first stream in the Nth period and a bit rate of the first stream in the N-1 period. The target bit rate determining means adjusts the target difference by multiplying the target difference by the period difference.

請求項12記載の発明は、請求項9に記載のトランスコーダにおいて、第N期間の第1のストリームのビットレートと第N−1期間の第1のストリームのビットレートの差に基づいて算出される値を期間差とすると、前記目標ビットレート決定手段は、前記目標差に前記期間差を加算し、前記目標差を調整することを特徴とする。   The invention according to claim 12 is the transcoder according to claim 9, wherein the transcoder is calculated based on a difference between a bit rate of the first stream in the Nth period and a bit rate of the first stream in the N-1 period. The target bit rate determination means adjusts the target difference by adding the period difference to the target difference.

本発明のトランスコーダは、各制御単位期間が所定のフレーム数以上となるよう各制御単位期間を決定し、制御単位期間ごとの第1のストリームのビットレートを含む第1のストリームの情報を用いて、第2のストリームの量子化ステップ値を算出する。これにより、制御単位期間ごとの第1のストリームのビットレートの変動を小さく抑えることができ、ビットレートの制御を適正に行うことが可能である。   The transcoder of the present invention determines each control unit period so that each control unit period is equal to or more than a predetermined number of frames, and uses the information of the first stream including the bit rate of the first stream for each control unit period. Thus, the quantization step value of the second stream is calculated. Thereby, the fluctuation | variation of the bit rate of the 1st stream for every control unit period can be suppressed small, and it is possible to control bit rate appropriately.

また、本発明のトランスコーダは、制御単位期間内のIピクチャフレームの比率が所定の割合以下となるよう各制御単位期間を決定し、制御単位期間ごとの第1のストリームのビットレートを含む第1のストリームの情報を用いて、第2のストリームの量子化ステップ値を算出する。これにより、制御単位期間ごとの第1のストリームのビットレートの変動を小さく抑えることができ、ビットレートの制御を適正に行うことが可能である。   In addition, the transcoder of the present invention determines each control unit period so that the ratio of the I picture frames in the control unit period is equal to or less than a predetermined ratio, and includes the bit rate of the first stream for each control unit period. The quantization step value of the second stream is calculated using the information of the first stream. Thereby, the fluctuation | variation of the bit rate of the 1st stream for every control unit period can be suppressed small, and it is possible to control bit rate appropriately.

トランスコーダのブロック図である。It is a block diagram of a transcoder. 入力ストリーム(第1ストリーム)と出力ストリーム(第2ストリーム)の情報を制御単位期間ごとに示した図である。It is the figure which showed the information of the input stream (1st stream) and the output stream (2nd stream) for every control unit period. 第1の実施の形態に係る制御単位期間の補正方法(補正されない場合の例)を示す図である。It is a figure which shows the correction method (example when not correct | amending) of the control unit period which concerns on 1st Embodiment. 第1の実施の形態に係る制御単位期間の補正方法を示す図である。It is a figure which shows the correction method of the control unit period which concerns on 1st Embodiment. 第1の実施の形態に係る制御単位期間の補正方法を示す図である。It is a figure which shows the correction method of the control unit period which concerns on 1st Embodiment. 第1の実施の形態に係る制御単位期間の補正方法を示す図である。It is a figure which shows the correction method of the control unit period which concerns on 1st Embodiment. 第2の実施の形態に係る制御単位期間の補正方法(補正されない場合の例)を示す図である。It is a figure which shows the correction method (example when not correct | amending) of the control unit period which concerns on 2nd Embodiment. 第2の実施の形態に係る制御単位期間の補正方法を示す図である。It is a figure which shows the correction method of the control unit period which concerns on 2nd Embodiment. 第2の実施の形態に係る制御単位期間の補正方法を示す図である。It is a figure which shows the correction method of the control unit period which concerns on 2nd Embodiment. 第2の実施の形態に係る制御単位期間の補正方法を示す図である。It is a figure which shows the correction method of the control unit period which concerns on 2nd Embodiment.

{1.トランスコーダの全体構成}
以下、図面を参照しつつ本発明の実施の形態について説明する。図1は、本実施の形態に係るトランスコーダ1のブロック図である。このトランスコーダ1は、デコーダ2とエンコーダ3とを備えている。
{1. Overall configuration of transcoder}
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram of a transcoder 1 according to the present embodiment. The transcoder 1 includes a decoder 2 and an encoder 3.

デコーダ2は、第1ストリームを入力する。第1ストリームは、符号化画像のストリームである。デコーダ2は、第1ストリームをデコードし、非圧縮の画像データをエンコーダ3に出力する。エンコーダ3は、デコーダ2においてデコードされた非圧縮の画像データを再び符号化し、第2ストリームを出力するのである。   The decoder 2 inputs the first stream. The first stream is a stream of encoded images. The decoder 2 decodes the first stream and outputs uncompressed image data to the encoder 3. The encoder 3 re-encodes the uncompressed image data decoded by the decoder 2 and outputs the second stream.

たとえば、トランスコーダ1は、MPEG2で符号化された第1ストリームを入力し、H.264で符号化された第2ストリームを出力するなど、ストリームの符号化方式を変換する処理を行う。そして、変換処理を行う際、出力する第2ストリームのレート制御を最適に行えるよう本発明は工夫されている。あるいは、トランスコーダ1は、MPEG2で符号化された第1ストリームを入力し、再びMPEG2で符号化された第2ストリームを出力するなど、同じ符号化方式のストリームを出力する。このときにも、出力する第2ストリームのレート制御を最適に行えるよう本発明は工夫されている。   For example, the transcoder 1 inputs a first stream encoded by MPEG2, A process for converting the encoding method of the stream, such as outputting a second stream encoded by H.264, is performed. And when performing the conversion process, the present invention is devised so that the rate control of the second stream to be output can be optimally performed. Alternatively, the transcoder 1 outputs a stream of the same encoding method, such as inputting a first stream encoded with MPEG2 and outputting a second stream encoded again with MPEG2. Also at this time, the present invention is devised so that the rate control of the second stream to be output can be performed optimally.

なお、この後説明するレート制御方法(A)〜(D)における各演算処理は、デコーダ2およびエンコーダ3において実行される演算処理であるが、デコーダ2およびエンコーダ3における各演算処理は、ハードウェアにより実現されてもよいし、ソフトウェア処理により実現されていてもよい。つまり、デコーダ2およびエンコーダ3は、ハードウェア回路として構成されていてもよいし、CPUとメモリに格納されたプログラムとで構成されていてもよい。あるいは、一部の処理がハードウェアで処理され、一部の処理がソフトウェアで処理される形態であってもよい。   Note that each calculation process in the rate control methods (A) to (D) described below is a calculation process executed in the decoder 2 and the encoder 3, but each calculation process in the decoder 2 and the encoder 3 is performed by hardware. Or may be realized by software processing. That is, the decoder 2 and the encoder 3 may be configured as a hardware circuit, or may be configured by a CPU and a program stored in a memory. Alternatively, a form in which a part of processing is processed by hardware and a part of processing is processed by software may be used.

{2.レート制御方法}
図2は、トランスコーダ1が入出力するストリームの制御単位期間ごとの情報を表した図である。トランスコーダ1は、処理時間軸を制御単位期間L(n=1,2・・・)に区分し、この制御単位期間Lを処理単位としてレート制御を行う。以下の説明において、適宜、制御単位期間Lを第n期間と呼ぶことにする。本実施の形態においては、基本的には、1GOPが制御単位期間Lとして設定されるが、後で説明するように入力ストリームの状態に応じて連続する複数のGOPが制御単位期間Lとして設定される。ただし、制御単位期間Lとしては、1フレーム、連続する複数フレームなどを設定することが可能である。
{2. Rate control method}
FIG. 2 is a diagram showing information for each control unit period of the stream input / output by the transcoder 1. The transcoder 1 divides the processing time axis into control unit periods L n (n = 1, 2,...), And performs rate control using the control unit period L n as a processing unit. In the following description, appropriately, to the control unit time L n is referred to as the n period. In the present embodiment, basically, 1 GOP is set as the control unit period L n , but as will be described later, a plurality of consecutive GOPs according to the state of the input stream is set as the control unit period L n. Is set. However, it is possible to set one frame, a plurality of continuous frames, etc. as the control unit period L n .

第1ストリームの入力全体ビットレートSは、シーケンスヘッダなどから取得される。入力平均ビットレートSは、第n期間における第1ストリームの平均ビットレートである。トランスコーダ1は、バッファを備えており、M期間分の入力平均ビットレートSに関する情報を格納可能としている。つまり、バッファは、第(n−M+1)期間から第n期間までの入力平均ビットレートSに関する情報を格納可能としている。そして、期間平均ビットレートASは、第(n−M+1)期間から第n期間における入力平均ビットレートSを平均した値である。期間平均ビットレートASは、数1式で表される。 The input total bit rate S of the first stream is acquired from a sequence header or the like. The input average bit rate Sn is an average bit rate of the first stream in the n period. Transcoder 1 is provided with a buffer, and can store information about the average input bit rate S n of M periods. In other words, the buffer is to allow storing information on the average input bit rate S n from the (n-M + 1) period to the n period. The average period bit rate AS n is a value obtained by averaging the average input bit rate S n in the n period from the (n-M + 1) period. The period average bit rate AS n is expressed by Equation 1.

Figure 0005076085
Figure 0005076085

デコーダ2は、入力した第1ストリームから、入力全体ビットレートS、入力平均ビットレートS、期間平均ビットレートAS、第n期間における量子化ステップ値Pなどの情報を取得し、これらの情報をエンコーダ3に与える。エンコーダ3は、これらの情報を利用して、画像の再符号化を行う。 The decoder 2 acquires information such as the input total bit rate S, the input average bit rate S n , the period average bit rate AS n , and the quantization step value P in the n period from the input first stream, and these information Is given to the encoder 3. The encoder 3 uses these pieces of information to re-encode the image.

第2ストリームの全体目標ビットレートTは、ユーザにより設定される。たとえば、ユーザが、トランスコーダ1に設けられた図示せぬ操作部を用いて全体目標ビットレートTを設定する。目標設定ビットレートTは、第n期間における第2ストリームの目標ビットレートである。出力平均ビットレートCは、第n期間における変換済みの第2ストリームの平均ビットレートである。トランスコーダ1は、バッファを備えており、M期間分の出力平均ビットレートCに関する情報を格納可能としている。つまり、バッファは、第(n−M+1)期間から第n期間までの出力平均ビットレートCに関する情報を格納可能としている。そして、期間平均ビットレートACは、第(n−M+1)から第n期間における出力平均ビットレートCを平均した値である。期間平均ビットレートACは、数2式で表される。なお、この実施の形態では、期間平均ビットレートAS、ACを計算する場合に利用するバッファ期間を、制御単位期間Lと連動させたが、バッファ期間の設定方法は、これに限るものではない。たとえば、符号化が終わった時点の過去1フレーム、連続する過去複数フレームなどをバッファ期間として設定することが可能である。 The overall target bit rate T of the second stream is set by the user. For example, the user sets the overall target bit rate T using an operation unit (not shown) provided in the transcoder 1. The target setting bit rate T n is the target bit rate of the second stream in the n-th period. The output average bit rate C n is an average bit rate of the converted second stream in the n-th period. The transcoder 1 includes a buffer, and can store information related to the output average bit rate C n for M periods. That is, the buffer can store information on the output average bit rate C n from the (n−M + 1) period to the n period. The period average bit rate AC n is a value obtained by averaging the output average bit rates C n in the (n−M + 1) th to nth periods. The period average bit rate AC n is expressed by Equation 2. In this embodiment, the average period bit rate AS n, the buffer period for use in calculating AC n, but are interlocked with the control unit time L n, setting the buffer period, limited to this is not. For example, it is possible to set the past one frame at the end of encoding, a plurality of consecutive past frames, etc. as the buffer period.

Figure 0005076085
Figure 0005076085

また、量子化ステップ変換係数αは、第(n−1)期間の終了時に算出される係数である。第1ストリームの量子化ステップ値そのもの、あるいは第1ストリームの量子化ステップ値から計算される値Pに、量子化ステップ変換係数αを乗算することで、第2ストリームの量子化ステップ値Qが決定される。この関係を数3式に示す。 The quantization step conversion coefficient α n is a coefficient calculated at the end of the (n−1) period. By multiplying the quantization step value itself of the first stream or the value P calculated from the quantization step value of the first stream by the quantization step conversion coefficient α n , the quantization step value Q of the second stream is obtained. It is determined. This relationship is shown in Equation 3.

Figure 0005076085
Figure 0005076085

ここで、量子化ステップ変換係数αの初期値αは、数4式で与えられる。つまり、第2ストリームの全体目標ビットレートTを第1ストリームの入力全体ビットレートSで除算した値、つまりビットレート比を関数fに入力することによって、量子化ステップ変換係数の初期値αを求めている。 Here, the initial value α 1 of the quantization step conversion coefficient α n is given by Equation 4. That is, by inputting the value obtained by dividing the overall target bit rate T of the second stream by the input overall bit rate S of the first stream, that is, the bit rate ratio to the function f, the initial value α 1 of the quantization step transform coefficient is obtained. Seeking.

Figure 0005076085
Figure 0005076085

ここで、関数fは、ビットレートの比から量子化ステップ値の比を求める関数であり、ビットレートの比をR、量子化ステップ値の比をRとすると、一般的に、数5式で表される。 Here, the function f is a function for obtaining the quantization step value ratio from the bit rate ratio. When the bit rate ratio is R B and the quantization step value ratio is R Q , in general, It is expressed by an expression.

Figure 0005076085
Figure 0005076085

関数fの具体例を説明する。本実施の形態では、数6式に示すように、ピクチャあるいはマクロブロックのタイプI、P、B(Iピクチャ、Pピクチャ、Bピクチャ)それぞれに異なる特性で量子化ステップ値の比を制御できる関数を利用している。数6式中、f(x)、f(x)、f(x)は、それぞれI、P、Bピクチャに対応して適応される関数を示している。 A specific example of the function f will be described. In the present embodiment, as shown in Equation 6, a function that can control the ratio of quantization step values with different characteristics for each type I, P, B (I picture, P picture, B picture) of a picture or macroblock Is used. In Equation 6, f I (x), f P (x), and f B (x) indicate functions that are adapted to the I, P, and B pictures, respectively.

Figure 0005076085
Figure 0005076085

数6式においては、MPEG2からH.264へストリーム変換する場合のε、ε、ε、δ、δ、δの値として、実験等に基づいて算出された具体的数値を例示した。つまり、実験の結果、ε=2.1、ε=2.1、ε=1.3、δ=1.1、δ=0.8、δ=0.9とすることで、良好な特性が得られた。これ以外に、入力ストリームをデコードする際に得られる画像の特徴量を利用して、ε、δの値を決定するようにしてもよい。たとえば、数7式に示すように、入力ストリームのActivity値(act値)や、動き評価値(sad値)に基づいてε、δの値を決定するようにしてもよい。 In Equation 6, from MPEG2 to H.264. As the values of ε I , ε P , ε B , δ I , δ P , and δ B in the case of stream conversion to H.264, specific numerical values calculated based on experiments or the like are illustrated. That is, as a result of the experiment, ε I = 2.1, ε P = 2.1, ε B = 1.3, δ I = 1.1, δ P = 0.8, and δ B = 0.9. Thus, good characteristics were obtained. In addition to this, the values of ε and δ may be determined using the feature amount of the image obtained when the input stream is decoded. For example, as shown in Equation 7, the values of ε and δ may be determined based on the activity value (act value) of the input stream and the motion evaluation value (sad value).

Figure 0005076085
Figure 0005076085

数7式中、aは、act値、sはsad値を示しており、ε(a,s)、ε(a,s)、ε(a,s)、−δ(a,s)、−δ(a,s)、−δ(a,s)は、act値およびsad値をパラメータとして、εおよびδの値が算出されることを示している。 In Equation 7, a represents an act value, and s represents a sad value. Ε I (a, s), ε P (a, s), ε B (a, s), −δ I (a, s), −δ P (a, s), and −δ B (a, s) indicate that the values of ε and δ are calculated using the act value and the sad value as parameters.

Activity値は、マクロブロック内の画素平均値とマクロブロック内の各画素の画素値との差分絶対値和をマクロブロックごとに計算したものである。つまり、Activity値は、マクロブロック内の画素のばらつき度合い示す評価値である。MPEG2の符号量制御モデルTM5などで用いられるActivity値と同様である。動き評価値(sad値)は、マクロブロックごとに参照画像マクロブロック内の画素とフレーム間差分絶対値和を計算したものである。つまり、マクロブロックの各画素と、参照画像マクロブロックの各画素とを比較し、同じ座標位置にある画素同士の画素値差分の絶対値和を算出したものである。   The Activity value is obtained by calculating the sum of absolute differences between the average pixel value in the macroblock and the pixel value of each pixel in the macroblock for each macroblock. That is, the Activity value is an evaluation value indicating the degree of variation of pixels in the macroblock. This is the same as the Activity value used in the MPEG2 code amount control model TM5 or the like. The motion evaluation value (sad value) is obtained by calculating the sum of absolute differences between pixels and frames in the reference image macroblock for each macroblock. That is, each pixel of the macro block and each pixel of the reference image macro block are compared, and the absolute value sum of the pixel value differences between the pixels at the same coordinate position is calculated.

より一般的には、第n期間における画像の特徴量をILnとすると、f(x)、f(x)、f(x)は、それぞれ数8式で表される。 More generally, assuming that the image feature amount in the n-th period is I Ln , f I (x), f P (x), and f B (x) are each expressed by Formula 8.

Figure 0005076085
Figure 0005076085

数8式中、ε(ILn)、ε(ILn)、ε(ILn)、−δ(ILn)、−δ(ILn)、−δ(ILn)は、それぞれ、画像の特徴量ILnをパラメータとして、係数ε、δが決定されることを示している。 In the equation 8, ε I (I Ln ), ε P (I Ln ), ε B (I Ln ), −δ I (I Ln ), −δ P (I Ln ), −δ B (I Ln ) are , The coefficients ε and δ are determined using the image feature quantity ILn as a parameter.

以下、4つのレート制御方法(A)〜(D)について説明する。   Hereinafter, the four rate control methods (A) to (D) will be described.

<2−1.レート制御方法(A)>
まず、レート制御方法(A)に関して、第2ストリームの量子化ステップ値Qを算出するための量子化ステップ変換係数αの算出方法を説明する。トランスコーダ1は、第n期間経過時において、量子化ステップ変換係数αn+1を算出する。
<2-1. Rate control method (A)>
First, regarding the rate control method (A), a method for calculating the quantization step conversion coefficient α n for calculating the quantization step value Q of the second stream will be described. The transcoder 1 calculates the quantization step conversion coefficient α n + 1 when the n-th period has elapsed.

数9式は、量子化ステップ変換係数αn+1を算出するための数式を示している。数9式中、(T−C)は、第2ストリームの全体目標ビットレートTから変換済みの第n期間における出力平均ビットレートCを減算したものである。この値を変動係数と呼ぶことにする。kは、変動係数を調整する調整係数であり、正の値が用いられる。 Equation 9 shows a mathematical formula for calculating the quantization step conversion coefficient α n + 1 . In Equation 9, (T−C n ) is obtained by subtracting the converted average output bit rate C n in the n-th period from the overall target bit rate T of the second stream. This value is called a variation coefficient. k is an adjustment coefficient for adjusting the coefficient of variation, and a positive value is used.

Figure 0005076085
Figure 0005076085

このように、数4式で求められたαに対して、変動係数を加算することで、量子化ステップ値の比が目標へと近づくように調整するのである。この意味で、量子化ステップ変換係数の初期値αは、基準変換係数と呼ぶことができる。 In this way, by adjusting the coefficient of variation to α 1 obtained by the equation (4), the quantization step value ratio is adjusted so as to approach the target. In this sense, the initial value α 1 of the quantization step transform coefficient can be called a reference transform coefficient.

数9式を用いて、量子化ステップ変換係数αn+1が算出されると、数3式により、第2ストリームの第(n+1)期間における量子化ステップ値Qが求められるのである。 When the quantization step conversion coefficient α n + 1 is calculated using Equation 9, the quantization step value Q in the (n + 1) period of the second stream is obtained by Equation 3.

上記数9式において変動係数を算出する際、第n期間における出力平均ビットレートCを用いた。ここで、数10式で示すように、出力平均ビットレートCに代えて、第(n−M+1)期間から第n期間における期間平均ビットレートACを用いても良い。 When calculating the coefficient of variation in Equation 9, the output average bit rate C n in the nth period was used. Here, as shown in Formula 10, instead of the output average bit rate C n , the period average bit rate AC n from the (n−M + 1) period to the n period may be used.

Figure 0005076085
Figure 0005076085

これにより、局所的なCの変化に大きく左右されることなく、変動係数を緩やかに制御することができる。 Thus, without being greatly influenced by changes in the local C n, it is possible to gently control the coefficient of variation.

また、上記数9式において変動係数を算出する際、第2ストリームの全体目標ビットレートTから変換済みの第n期間における出力平均ビットレートCを減算したものを採用した。ここで、数11式に示すように、減算値をさらに第1のストリームの第n期間における入力平均ビットレートSで除算するようにしてもよい。 Further, when the variation coefficient is calculated in the above equation 9, a value obtained by subtracting the output average bit rate C n in the converted n period from the overall target bit rate T of the second stream is employed. Here, as shown in equation (11) may be divided by the average input bit rate S n in the n period of further first stream subtraction value.

Figure 0005076085
Figure 0005076085

これにより、第1ストリームのビットレートが局所的に大きく変化した場合などに、変動係数が大きく影響を受けることを回避できるのである。   Thereby, when the bit rate of the first stream greatly changes locally, it can be avoided that the variation coefficient is greatly affected.

さらに、数10式と数11式を用いて説明した変動係数の算出方法の両方の考え方を取り入れるようにしてもよい。つまり、数12式に示すように、出力平均ビットレートCに代えて、期間平均ビットレートACを用い、さらに、減算値を入力平均ビットレートSで除算するのである。これにより、変動係数をより緩やかに制御することができる。 Furthermore, you may make it incorporate the idea of both the calculation methods of the variation coefficient demonstrated using several 10 Formula and several 11 Formula. That is, as shown in Equation 12, instead of the output average bit rate C n , the period average bit rate AC n is used, and the subtracted value is further divided by the input average bit rate S n . Thereby, the variation coefficient can be controlled more gently.

Figure 0005076085
Figure 0005076085

また、数11式では、全体目標ビットレートTから出力平均ビットレートCを減算し、その減算値をビットレートSで除算するようにした。これに代えて、数13式に示すように、減算値を、第(n−M+1)期間から第n期間における第1ストリームの期間平均ビットレートASで除算するようにしてもよい。これにより、第1ストリームのビットレートの局所的変換に影響されることなく、より緩やかに変動係数を制御することができる。 In Equation 11, the output average bit rate C n is subtracted from the overall target bit rate T, and the subtracted value is divided by the bit rate S n . Instead, as shown in Equation 13, the subtracted value may be divided by the period average bit rate AS n of the first stream from the (n−M + 1) period to the n period. As a result, the variation coefficient can be controlled more gently without being affected by the local conversion of the bit rate of the first stream.

Figure 0005076085
Figure 0005076085

また、数14式で示したように、出力平均ビットレートCに代えて、期間平均ビットレートACを用い、入力平均ビットレートSに代えて、期間平均ビットレートASを用いても良い。これにより、さらに緩やかに変動係数を制御することが可能である。 Also, as indicated by the number 14 formula, instead of the average output bit rate C n, using the average period bit rate AC n, instead of the average input bit rate S n, it is used average period bit rate AS n good. As a result, the coefficient of variation can be controlled more gently.

Figure 0005076085
Figure 0005076085

<2−2.レート制御方法(B)>
次に、レート制御方法(B)について説明する。レート制御方法(B)においても、量子化ステップ変換係数を算出し、数3式を用いて、第2ストリームの量子化ステップ値Qを算出する。ただし、量子化ステップ変換係数の算出方法がレート制御方法(A)とは異なる。レート制御方法(A)では、量子化ステップ変換係数の初期値αを求め、これを基準変換係数として、基準変換係数からの変動を順次求めていくこととした。これに対して、レート制御方法(B)においては、第n期間が終了した時点で、第(n+1)期間における第2ストリームの目標設定ビットレートTn+1を決定し、決定された目標設定ビットレートTn+1を用いて、第(n+1)期間の量子化ステップ変換係数αn+1を算出するのである。
<2-2. Rate control method (B)>
Next, the rate control method (B) will be described. Also in the rate control method (B), the quantization step conversion coefficient is calculated, and the quantization step value Q of the second stream is calculated using Equation (3). However, the method of calculating the quantization step conversion coefficient is different from the rate control method (A). The rate control method (A), obtains the initial value alpha 1 of the quantization step conversion factor, as a reference transform coefficients, it was decided to sequentially determine the variation from the reference transform coefficients. In contrast, in the rate control method (B), when the n-th period ends, the target setting bit rate T n + 1 of the second stream in the (n + 1) period is determined, and the determined target setting bit rate is determined. Using T n + 1 , the quantization step conversion coefficient α n + 1 in the (n + 1) period is calculated.

第(n+1)期間の目標設定ビットレートTn+1が決定すると、数5式を用いて説明した場合と同様の方法で、量子化ステップ変換係数αn+1が算出される。つまり、数6式〜数8式で例示したような関数fを利用して、量子化ステップ変換係数αn+1が算出される。具体的には、数15式で示すように、第(n+1)期間の目標設定ビットレートTn+1と第n期間の入力平均ビットレートSの比を関数fに入力することで、量子化ステップ変換係数αn+1を算出する。 When the target setting bit rate T n + 1 in the (n + 1) period is determined, the quantization step conversion coefficient α n + 1 is calculated by the same method as described using Equation (5). That is, the quantization step conversion coefficient α n + 1 is calculated by using the function f exemplified in Expression 6 to Expression 8. Specifically, as shown in Equation 15, the quantization step is performed by inputting a ratio between the target set bit rate T n + 1 in the (n + 1) period and the input average bit rate S n in the n period to the function f. A conversion coefficient α n + 1 is calculated.

Figure 0005076085
Figure 0005076085

あるいは、数16式で示すように、第n期間における入力平均ビットレートSに代えて、第(n−M+1)期間から第n期間までの期間平均ビットレートASを用いて量子化ステップ変換係数αn+1を算出してもよい。 Alternatively, as shown by the number 16 formula, instead of the average input bit rate S n in the n period, the quantization step conversion using the (n-M + 1) period average bit rate AS n from period to the n period The coefficient α n + 1 may be calculated.

Figure 0005076085
Figure 0005076085

数17式は、第(n+1)期間の目標設定ビットレートTn+1を算出する式である。つまり、トランスコーダ1が、第n期間終了後に算出する第(n+1)期間の目標設定ビットレートTn+1を示している。具体的には、第n期間の変換済みの第2ストリームの出力平均ビットレートCを第n期間の目標設定ビットレートTで除算した値を目標比と考えると、第(n+1)期間の目標設定ビットレートTn+1は、第2ストリームの全体目標ビットレートTを目標比で除算することで算出されるのである。 Expression 17 is an expression for calculating the target setting bit rate T n + 1 in the (n + 1) period. That is, the transcoder 1 indicates the target setting bit rate T n + 1 in the (n + 1) period calculated after the end of the n period. Specifically, when a value obtained by dividing the output average bit rate C n of the converted second stream in the n period by the target setting bit rate T n in the n period is considered as the target ratio, the (n + 1) period The target set bit rate T n + 1 is calculated by dividing the overall target bit rate T of the second stream by the target ratio.

Figure 0005076085
Figure 0005076085

数17式中、kは正の係数であり、目標設定ビットレートTn+1を調整するための係数である。このように、C/Tにより第n期間における目標との比を算出し、全体目標ビットレートTを目標比で除算することで第(n+1)期間の目標設定ビットレートTn+1を調整し、全体として目標ビットレートに近づくよう制御するのである。 In Equation 17, k is a positive coefficient, and is a coefficient for adjusting the target setting bit rate T n + 1 . In this way, the ratio to the target in the n-th period is calculated by C n / T n, and the target set bit rate T n + 1 in the (n + 1) period is adjusted by dividing the overall target bit rate T by the target ratio. As a whole, control is performed so as to approach the target bit rate.

数17式では、第n期間の第2ストリームの出力平均ビットレートCを目標設定ビットレートTで除算した値を目標比として利用しているが、この目標比をさらに調整するようにしたのが、数18式である。 In Equation 17, the value obtained by dividing the output average bit rate C n of the second stream in the n period by the target set bit rate T n is used as the target ratio, but this target ratio is further adjusted. Is the equation (18).

Figure 0005076085
Figure 0005076085

数18式において、目標比にSn−1/Sが乗算されている。Sn−1/Sは、第(n−1)期間の第1ストリームの入力平均ビットレートSn−1を、第n期間の第1ストリームの入力平均ビットレートSで除算した値であり、入力平均ビットレートの期間比と呼ぶことができる。つまり、目標比に期間比を乗算することで、目標比を調整しているのである。 In Equation 18, the target ratio is multiplied by S n−1 / S n . S n-1 / S n is the the (n-1) the average input bit rate S n-1 of the first stream of period, by the average input bit rate S n of the first stream in the n period Yes, it can be called the period ratio of the input average bit rate. That is, the target ratio is adjusted by multiplying the target ratio by the period ratio.

このように目標比に期間比を乗算することで、局所的な目標比の変化を補正することができる。たとえば、入力平均ビットレートSが局所的に小さく変化した場合には、それに伴い、目標比C/Tも小さく変動する場合がある。このような場合にも、期間比Sn−1/S(この場合、期間比が1より大きな値となる。)を乗算することで、目標比を調整し、目標設定ビットレートTn+1が大きく変動することを回避できるのである。逆に、入力平均ビットレートSが局所的に大きく変化した場合には、期間比Sn−1/Sが1より小さい値となり、目標比が急激に大きくなることを抑制することができる。 In this way, by multiplying the target ratio by the period ratio, a local change in the target ratio can be corrected. For example, when the input average bit rate S n changes locally locally, the target ratio C n / T n may also fluctuate accordingly. Even in such a case, the target ratio is adjusted by multiplying the period ratio S n-1 / S n (in this case, the period ratio is a value larger than 1), and the target set bit rate T n + 1 is Large fluctuations can be avoided. Conversely, if the average input bit rate S n is changed locally large, can be the period ratio S n-1 / S n becomes a value smaller than 1, the target ratio is prevented from becoming rapidly increased .

数18式では、第(n−1)期間の第1ストリームの入力平均ビットレートSn−1を、第n期間の第1ストリームの入力平均ビットレートSで除算した値を期間比とした。これに対して、第1ストリームの第(n+1)期間の入力平均ビットレートSn+1を先読みできる場合には、入力平均ビットレートSn+1を利用してもよい。入力平均ビットレートSn+1を先読みできる場合とは、入力平均ビットレートSn+1に関する情報をバッファリングした上で、第(n+1)期間の目標設定ビットレートTn+1を算出できる時間的余裕がある場合である。つまり、ある程度の処理遅延が許されるような場合である。数19式に、入力平均ビットレートSn+1を用いて目標設定ビットレートTn+1を算出する式を示す。 The number 18 expression, the a (n-1) the average input bit rate S n-1 of the first stream of period, a value obtained by dividing the average input bit rate S n of the first stream in the n period as the period ratio . On the other hand, when the input average bit rate S n + 1 in the (n + 1) period of the first stream can be prefetched, the input average bit rate S n + 1 may be used. The case where the input average bit rate S n + 1 can be prefetched is a case where there is a time margin for calculating the target set bit rate T n + 1 in the (n + 1) period after buffering information on the input average bit rate S n + 1. is there. That is, a case where a certain amount of processing delay is allowed. Equation 19 shows an equation for calculating the target setting bit rate T n + 1 using the input average bit rate S n + 1 .

Figure 0005076085
Figure 0005076085

数19式に示すように、期間比として、S/Sn+1、つまり、第n期間の第1ストリームの入力平均ビットレートSを、第(n+1)期間の第1ストリームの入力平均ビットレートSn+1で除算した値を用いている。このように、第(n+1)期間の第1ストリームの入力平均ビットレートSn+1を利用することで、目標設定ビットレートTn+1をより高い精度で制御することが可能となる。つまり、より最新の入力情報を用いることで、目標ビットレートに対する最適制御を行うことができるのである。 As shown in Equation 19, as the period ratio, S n / S n + 1 , that is, the average input bit rate S n of the first stream in the n period is the average input bit rate of the first stream in the (n + 1) period. The value divided by Sn + 1 is used. Thus, by using the average input bit rate S n + 1 of the first stream in the (n + 1) period, the target set bit rate T n + 1 can be controlled with higher accuracy. That is, optimal control with respect to the target bit rate can be performed by using the latest input information.

期間比として、第(n+1)期間の第1ストリームの入力平均ビットレートSn+1を利用した場合には、数15式に代えて、数20式で示すように、第(n+1)期間の目標設定ビットレートTn+1と、第(n+1)期間の入力平均ビットレートSn+1の比を関数fに入力することで、第(n+1)期間の量子化ステップ変換係数αn+1を算出するようにすればよい。 When the average input bit rate S n + 1 of the first stream in the (n + 1) period is used as the period ratio, the target setting for the (n + 1) period is used as shown in Expression 20 instead of Expression 15. The ratio between the bit rate T n + 1 and the average input bit rate S n + 1 in the (n + 1) period may be input to the function f to calculate the quantization step conversion coefficient α n + 1 in the (n + 1) period. .

Figure 0005076085
Figure 0005076085

また、数18式では、期間比としてSn−1/Sを利用した。これに代えて、第(n−1)期間を含む過去M期間の期間平均ビットレートASn−1と、第n期間を含む過去M期間の期間平均ビットレートASの比を期間比として用いてもよい。つまり、数18式において、期間比として、Sn−1/Sに代えて、ASn−1/ASを用いてもよい。これにより、局所的な変動の影響を小さくし、目標設定ビットレートTn+1を最適制御することが可能である。 In Equation 18, Sn-1 / Sn is used as the period ratio. Alternatively, using the average period bit rate AS n-1 of the last M periods including the (n-1) period, the ratio of the average period bit rate AS n of past M periods including the n period as the period ratio May be. That is, in Expression 18, AS n-1 / AS n may be used as the period ratio instead of S n-1 / S n . Thereby, it is possible to reduce the influence of local fluctuations and optimally control the target setting bit rate T n + 1 .

あるいは、第1ストリームの第(n+1)期間の入力平均ビットレートSn+1を先読みできる場合には、第n期間を含む過去M期間の期間平均ビットレートASと、第(n+1)期間を含む過去M期間の期間平均ビットレートASn+1の比を期間比として用いてもよい。つまり、数18式において、期間比として、Sn−1/Sに代えて、AS/ASn+1を用いてもよい。これにより、局所的な変動の影響を小さくするとともに、最新の入力ビットレートを利用することで、より精度高く目標設定ビットレートTn+1を制御することが可能である。 Alternatively, when the input average bit rate S n + 1 in the (n + 1) period of the first stream can be prefetched, the period average bit rate AS n of the past M period including the n period and the past including the (n + 1) period The ratio of the period average bit rate AS n + 1 of the M period may be used as the period ratio. That is, in Expression 18, AS n / AS n + 1 may be used as the period ratio instead of S n−1 / S n . As a result, it is possible to control the target set bit rate T n + 1 with higher accuracy by reducing the influence of local fluctuations and using the latest input bit rate.

期間比として、第(n+1)期間を含む過去M期間の期間平均ビットレートASn+1を利用した場合には、数16式に代えて、数21式で示すように、第(n+1)期間の目標設定ビットレートTn+1と、第(n+1)期間を含む過去M期間の期間平均ビットレートASn+1の比を関数fに入力することで、第(n+1)期間の量子化ステップ変換係数αn+1を算出するようにすればよい。 When the period average bit rate AS n + 1 of the past M periods including the (n + 1) period is used as the period ratio, the target of the (n + 1) period as shown in Expression 21 instead of Expression 16. A ratio between the set bit rate T n + 1 and the period average bit rate AS n + 1 of the past M periods including the (n + 1) period is input to the function f, thereby calculating the quantization step conversion coefficient α n + 1 of the (n + 1) period. You just have to do it.

Figure 0005076085
Figure 0005076085

制御レート方法(B)における目標設定ビットレートTn+1の計算方法を、数17式、数18式、数19式などを用いて説明したが、これら数式を用いて説明した場合を含め制御レート方法(B)における全ての場合において、第n期間の出力平均ビットレートCに代えて、第(n−M+1)期間から第n期間までの期間平均ビットレートACを用いても良い。たとえば、数17式、数18式、数19式などにおいて、Cに代えてACを用いるのである。これにより、目標設定ビットレートTn+1を、より緩やかに制御することが可能である。 Although the calculation method of the target setting bit rate T n + 1 in the control rate method (B) has been described using Equation 17, Equation 18, Equation 19, etc., the control rate method including the case described using these equations In all cases in (B), the average period bit rate AC n from the (n−M + 1) period to the n period may be used instead of the average output bit rate C n of the n period. For example, AC n is used in place of C n in Equation 17, Equation 18, Equation 19, and the like. Thereby, the target setting bit rate T n + 1 can be controlled more gently.

<2−3.レート制御方法(C)>
次に、レート制御方法(C)について説明する。レート制御方法(C)においても、量子化ステップ変換係数を算出し、数3式を用いて、第2ストリームの量子化ステップ値Qを算出する。また、レート制御方法(C)においても、レート制御方法(B)と同様、第n期間が終了した時点で、第(n+1)期間における第2ストリームの目標設定ビットレートTn+1を決定し、決定された目標設定ビットレートTn+1を用いて、第(n+1)期間の量子化ステップ変換係数αn+1を算出する。
<2-3. Rate control method (C)>
Next, the rate control method (C) will be described. Also in the rate control method (C), the quantization step conversion coefficient is calculated, and the quantization step value Q of the second stream is calculated using Equation (3). Also in the rate control method (C), similarly to the rate control method (B), the target set bit rate T n + 1 of the second stream in the (n + 1) period is determined and determined when the n period ends. Using the set target bit rate T n + 1 , the quantization step conversion coefficient α n + 1 in the (n + 1) period is calculated.

第(n+1)期間の目標設定ビットレートTn+1が決定すると、数5式を用いて説明した場合と同様の方法で、量子化ステップ変換係数αn+1が算出される。つまり、数6式〜数8式で例示したような関数fを利用して、量子化ステップ変換係数αn+1が算出される。具体的には、数15式で示すように、第(n+1)期間の目標設定ビットレートTn+1と第n期間の入力平均ビットレートSの比を関数fに入力することで、量子化ステップ変換係数αn+1を算出する。あるいは、数16式で示すように、入力平均ビットレートSの比に代えて、第(n−M+1)期間から第n期間までの期間平均ビットレートASを用いて量子化ステップ変換係数αn+1を算出してもよい。 When the target setting bit rate T n + 1 in the (n + 1) period is determined, the quantization step conversion coefficient α n + 1 is calculated by the same method as described using Equation (5). That is, the quantization step conversion coefficient α n + 1 is calculated by using the function f exemplified in Expression 6 to Expression 8. Specifically, as shown in Equation 15, the quantization step is performed by inputting a ratio between the target set bit rate T n + 1 in the (n + 1) period and the input average bit rate S n in the n period to the function f. A conversion coefficient α n + 1 is calculated. Alternatively, as shown in Expression 16, instead of the ratio of the input average bit rate S n , the quantization step conversion coefficient α using the period average bit rate AS n from the (n−M + 1) period to the n period. n + 1 may be calculated.

数22式は、第(n+1)期間の目標設定ビットレートTn+1を算出する式である。つまり、トランスコーダ1が、第n期間終了後に算出する第(n+1)期間の目標設定ビットレートTn+1を表している。具体的には、第n期間の目標設定ビットレートTから第n期間の変換済みの第2ストリームの出力平均ビットレートCを減算した値を目標差と考えると、第(n+1)期間の目標設定ビットレートTn+1は、第2ストリームの全体目標ビットレートTに目標差を加算することで算出されるのである。 Expression 22 is an expression for calculating the target setting bit rate T n + 1 in the (n + 1) period. That is, the transcoder 1 represents the target setting bit rate T n + 1 of the (n + 1) period calculated after the end of the n period. Specifically, when a value obtained by subtracting the output average bit rate C n of the converted second stream of the n-th period from the target setting bit rate T n of the n-th period is considered as the target difference, the (n + 1) -th period The target set bit rate T n + 1 is calculated by adding the target difference to the overall target bit rate T of the second stream.

Figure 0005076085
Figure 0005076085

数22式中、kは正の係数であり、目標設定ビットレートTn+1を調整するための係数である。このように、(T−C)により、第n期間における目標との差を算出し、全体目標ビットレートTに目標差を加算することで、出力ストリームが目標ビットレートに近づくような制御を行うのである。 In Equation 22, k is a positive coefficient and is a coefficient for adjusting the target set bit rate T n + 1 . As described above, the difference from the target in the n-th period is calculated by (T n −C n ), and the target stream is added to the overall target bit rate T, so that the output stream approaches the target bit rate. Is done.

数22式では、第n期間の目標設定ビットレートTから第n期間の第2ストリームの出力平均ビットレートCを減算した目標差を利用しているが、この目標差をさらに調整するようにしたのが、数23式である。 In Equation 22, the target difference obtained by subtracting the output average bit rate C n of the second stream in the n-th period from the target setting bit rate T n in the n-th period is used, but this target difference is further adjusted. Equation 23 is used.

Figure 0005076085
Figure 0005076085

数23式において、目標差にS/Sn−1が乗算されている。S/Sn−1は、第n期間の第1ストリームの入力平均ビットレートSを、第(n−1)期間の第1ストリームの入力平均ビットレートSn−1で除算した期間比である。つまり、目標差に期間比を乗算することで、目標差を調整しているのである。 In equation 23, S n / S n-1 to the target difference is multiplied. S n / S n-1 is the period ratio of the average input bit rate S n of the first stream in the n period, divided by the average input bit rate S n-1 of the first stream in the (n-1) It is. That is, the target difference is adjusted by multiplying the target difference by the period ratio.

このように目標差に期間比を乗算することで、局所的な目標差の変化を補正することができる。たとえば、第n期間の入力平均ビットレートSが局所的に第(n−1)期間と比べて小さく変化した場合には、それに伴い、目標差(T−C)が大きく変動する場合がある。このような場合にも、期間比S/Sn−1(この場合、期間比が1より小さな値となる。)を乗算することで、目標差を調整し、目標設定ビットレートTn+1が大きく変動することを回避できるのである。 Thus, by multiplying the target difference by the period ratio, it is possible to correct a local change in the target difference. For example, if the average input bit rate S n of the n period is changed smaller than that locally the (n-1) is accordingly, if the target difference (T n -C n) varies greatly There is. Even in such a case, the target difference is adjusted by multiplying the period ratio S n / S n-1 (in this case, the period ratio is smaller than 1), and the target set bit rate T n + 1 is Large fluctuations can be avoided.

数23式では、第n期間の第1ストリームの入力平均ビットレートSを、第(n−1)期間の第1ストリームの入力平均ビットレートSn−1で除算した値を期間比とした。これに対して、第1ストリームの第(n+1)期間の入力平均ビットレートSn+1を先読みできる場合には、入力平均ビットレートSn+1を利用してもよい。入力平均ビットレートSn+1を先読みできる場合とは、上述したように、入力平均ビットレートSn+1に関する情報をバッファリングした上で、第(n+1)期間の目標設定ビットレートTn+1を算出できる時間的余裕がある場合である。この場合には、数23式において、期間比として、S/Sn−1に代えて、Sn+1/Sを用いるのである。このように、第(n+1)期間の第1ストリームの入力平均ビットレートSn+1を利用することで、目標設定ビットレートTn+1をより高い精度で制御することが可能となる。 In equation 23, the average input bit rate S n of the first stream in the n period, and the first (n-1) first stream average input bit rate S n-1 period ratio division value in the period . On the other hand, when the input average bit rate S n + 1 in the (n + 1) period of the first stream can be prefetched, the input average bit rate S n + 1 may be used. As described above, the case where the input average bit rate S n + 1 can be prefetched means that the target setting bit rate T n + 1 in the (n + 1) period can be calculated after buffering information on the input average bit rate S n + 1. This is when there is room. In this case, in Expression 23, S n + 1 / S n is used as the period ratio instead of S n / S n−1 . Thus, by using the average input bit rate S n + 1 of the first stream in the (n + 1) period, the target set bit rate T n + 1 can be controlled with higher accuracy.

期間比として、第(n+1)期間の第1ストリームの入力平均ビットレートSn+1を利用した場合には、数15式に代えて、数20式で示すように、第(n+1)期間の目標設定ビットレートTn+1と、第(n+1)期間の入力平均ビットレートSn+1の比を関数fに入力することで、第(n+1)期間の量子化ステップ変換係数αn+1を算出するようにすればよい。 When the average input bit rate S n + 1 of the first stream in the (n + 1) period is used as the period ratio, the target setting for the (n + 1) period is used as shown in Expression 20 instead of Expression 15. The ratio between the bit rate T n + 1 and the average input bit rate S n + 1 in the (n + 1) period may be input to the function f to calculate the quantization step conversion coefficient α n + 1 in the (n + 1) period. .

また、数23式では、期間比としてS/Sn−1を利用した。これに代えて、第n期間を含む過去M期間の期間平均ビットレートASと、第(n−1)期間を含む過去M期間の期間平均ビットレートASn−1の比を期間比として用いてもよい。つまり、数23式において、期間比として、S/Sn−1に代えて、AS/ASn−1を用いてもよい。これにより、局所的な変動の影響を小さくし、目標設定ビットレートTn+1を最適制御することが可能である。 In Equation 23, Sn / Sn-1 is used as the period ratio. Instead, the ratio of the period average bit rate AS n of the past M period including the nth period and the period average bit rate AS n−1 of the past M period including the (n−1) period is used as the period ratio. May be. That is, in Expression 23, AS n / AS n−1 may be used as the period ratio instead of S n / S n−1 . Thereby, it is possible to reduce the influence of local fluctuations and optimally control the target setting bit rate T n + 1 .

あるいは、第1ストリームの第(n+1)期間の入力平均ビットレートSn+1を先読みできる場合には、第(n+1)期間を含む過去M期間の期間平均ビットレートASn+1と、第n期間を含む過去M期間の期間平均ビットレートASの比を期間比として用いてもよい。つまり、数23式において、期間比として、S/Sn−1に代えて、ASn+1/ASを用いてもよい。これにより、局所的な変動の影響を小さくするとともに、最新の入力ビットレートを利用することで、より精度高く目標設定ビットレートTn+1を制御することが可能である。 Alternatively, when the input average bit rate S n + 1 of the (n + 1) period of the first stream can be prefetched, the period average bit rate AS n + 1 of the past M period including the (n + 1) period and the past including the n period A ratio of the period average bit rate AS n of the M period may be used as the period ratio. That is, in Expression 23, AS n + 1 / AS n may be used as the period ratio instead of S n / S n−1 . As a result, it is possible to control the target set bit rate T n + 1 with higher accuracy by reducing the influence of local fluctuations and using the latest input bit rate.

期間比として、第(n+1)期間を含む過去M期間の期間平均ビットレートASn+1を利用した場合には、数16式に代えて、数21式で示すように、第(n+1)期間の目標設定ビットレートTn+1と、第(n+1)期間を含む過去M期間の期間平均ビットレートASn+1の比を関数fに入力することで、第(n+1)期間の量子化ステップ変換係数αn+1を算出するようにすればよい。 When the period average bit rate AS n + 1 of the past M periods including the (n + 1) period is used as the period ratio, the target of the (n + 1) period as shown in Expression 21 instead of Expression 16. A ratio between the set bit rate T n + 1 and the period average bit rate AS n + 1 of the past M periods including the (n + 1) period is input to the function f, thereby calculating the quantization step conversion coefficient α n + 1 of the (n + 1) period. You just have to do it.

また、制御レート方法(C)における目標設定ビットレートTn+1の計算方法を、数22式、数23式などを用いて説明したが、これら数式を用いて説明した場合を含め、この制御レート方法(C)において説明した全ての計算方法において、第n期間の出力平均ビットレートCに代えて、第(n−M+1)期間から第n期間までの期間平均ビットレートACを用いても良い。たとえば、数22式、数23式などにおいて、Cに代えてACを用いても良い。これにより、目標設定ビットレートTn+1を、より緩やかに制御することが可能である。 In addition, the calculation method of the target setting bit rate T n + 1 in the control rate method (C) has been described using Equation 22, Equation 23, etc., but this control rate method includes the case described using these equations. In all the calculation methods described in (C), the average period bit rate AC n from the (n−M + 1) period to the n period may be used instead of the average output bit rate C n in the n period. . For example, AC n may be used in place of C n in Equation 22 and Equation 23. Thereby, the target setting bit rate T n + 1 can be controlled more gently.

<2−4.レート制御方法(D)>
次に、レート制御方法(D)について説明する。レート制御方法(D)においても、レート制御方法(C)と同様、第n期間が終了した時点で、第(n+1)期間における第2ストリームの目標設定ビットレートTn+1を決定し、決定された目標設定ビットレートTn+1を用いて、第(n+1)期間の量子化ステップ変換係数αn+1を算出する。レート制御方法(D)においては、第(n+1)期間における第2ストリームの目標設定ビットレートTn+1の決定の方法が、レート制御方法(C)と異なる。
<2-4. Rate control method (D)>
Next, the rate control method (D) will be described. Also in the rate control method (D), as in the rate control method (C), the target set bit rate T n + 1 of the second stream in the (n + 1) period is determined and determined when the n period ends. Using the target setting bit rate T n + 1 , the quantization step conversion coefficient α n + 1 in the (n + 1) period is calculated. In the rate control method (D), the method of determining the target set bit rate T n + 1 of the second stream in the (n + 1) period is different from the rate control method (C).

数24式は、第(n+1)期間の目標設定ビットレートTn+1を算出する式である。第n期間の目標設定ビットレートTから第n期間の変換済みの第2ストリームの出力平均ビットレートCを減算した値を目標差として利用する点も、レート制御方法(C)と同様である。レート制御方法(C)では、この目標差に期間比を乗算することで、目標差を調整したが、数24式に示すように、レート制御方法(D)では、目標差に期間差を乗算するようにしている。 Expression 24 is an expression for calculating the target setting bit rate T n + 1 in the (n + 1) period. Similarly to the rate control method (C), a value obtained by subtracting the output average bit rate C n of the converted second stream in the n period from the target set bit rate T n in the n period is used as the target difference. is there. In the rate control method (C), the target difference is adjusted by multiplying the target difference by the period ratio. However, in the rate control method (D), the target difference is multiplied by the period difference as shown in Equation 24. Like to do.

Figure 0005076085
Figure 0005076085

数24式において、目標差に(S−Sn−1)が乗算されている。(S−Sn−1)は、第n期間の第1ストリームの入力平均ビットレートSから、第(n−1)期間の第1ストリームの入力平均ビットレートSn−1を減算した期間差である。つまり、目標差に期間差を乗算することで、目標差を調整しているのである。なお、数24式中、係数kは、目標設定ビットレートTn+1を調整するための正の係数である。 In Equation 24, the target difference is multiplied by (S n −S n−1 ). (S n −S n−1 ) is obtained by subtracting the input average bit rate S n−1 of the first stream in the (n−1) period from the input average bit rate S n of the first stream in the n period. It is a period difference. That is, the target difference is adjusted by multiplying the target difference by the period difference. In Equation 24, the coefficient k is a positive coefficient for adjusting the target setting bit rate T n + 1 .

このように目標差に期間差を乗算することで、局所的な目標差の変化を補正することができる。たとえば、入力平均ビットレートSが次第に小さく変化しているような場合には、それに伴い、Cが小さくなる場合があり、目標差(T−C)が正の値になる。このような場合には、期間差(S−Sn−1)が負の値となり、目標設定ビットレートTn+1が大きく設定されないよう補正するのである。つまり、入力平均ビットレートSが小さく変化しているような場合には、その変化に反して、目標設定ビットレートTn+1が大きく変化しないよう制御するのである。 Thus, by multiplying the target difference by the period difference, it is possible to correct a local change in the target difference. For example, when the input average bit rate S n is gradually changing, C n may be reduced accordingly, and the target difference (T n −C n ) becomes a positive value. In such a case, the period difference (S n −S n−1 ) becomes a negative value, and the target setting bit rate T n + 1 is corrected so as not to be set large. That is, when the average input bit rate S n changes small, the target set bit rate T n + 1 is controlled so as not to change greatly, contrary to the change.

数24式で説明した目標設定ビットレートTn+1の算出方法では、目標差(T−C)に期間差を乗算するようにした。これに対して、数25式に示すように、目標差に期間差を加算するようにしてもよい。数25式中、hは、目標設定ビットレートTn+1を調整するための正の係数である。このように、期間差を加算することで、乗算した場合とは異なる特性で目標設定ビットレートTn+1を制御することが可能である。 In the method of calculating the target setting bit rate T n + 1 described in Expression 24, the target difference (T n −C n ) is multiplied by the period difference. On the other hand, as shown in Formula 25, the period difference may be added to the target difference. In Equation 25, h is a positive coefficient for adjusting the target setting bit rate T n + 1 . In this way, by adding the period difference, it is possible to control the target set bit rate T n + 1 with characteristics different from the case of multiplication.

Figure 0005076085
Figure 0005076085

数24式では、第n期間の第1ストリームの入力平均ビットレートSから第(n−1)期間の第1ストリームの入力平均ビットレートSn−1を減算した値を期間差とした。そして、目標差に期間差を乗算するようにした。これに対して、第1ストリームの第(n+1)期間の入力平均ビットレートSn+1を先読みできる場合には、入力平均ビットレートSn+1を利用してもよい。この場合には、数24式において、期間差として、(S−Sn−1)に代えて、(Sn+1−S)を用いるのである。このように、第(n+1)期間の第1ストリームの入力平均ビットレートSn+1を利用することで、目標設定ビットレートTn+1をより高い精度で制御することが可能となる。 In Formula 24, a value obtained by subtracting the input average bit rate S n−1 of the first stream in the (n−1) period from the input average bit rate S n of the first stream in the n period is defined as the period difference. Then, the target difference is multiplied by the period difference. On the other hand, when the input average bit rate S n + 1 in the (n + 1) period of the first stream can be prefetched, the input average bit rate S n + 1 may be used. In this case, in Equation 24, (S n + 1 −S n ) is used as the period difference instead of (S n −S n−1 ). Thus, by using the average input bit rate S n + 1 of the first stream in the (n + 1) period, the target set bit rate T n + 1 can be controlled with higher accuracy.

また、数25式においても、第n期間の第1ストリームの入力平均ビットレートSから第(n−1)期間の第1ストリームの入力平均ビットレートSn−1を減算した値を期間差とした。そして、目標差に期間差を加算するようにした。これに対して、第1ストリームの第(n+1)期間の入力平均ビットレートSn+1を先読みできる場合には、入力平均ビットレートSn+1を利用してもよい。この場合には、数25式において、期間差として、(S−Sn−1)に代えて、(Sn+1−S)を用いるのである。このように、第(n+1)期間の第1ストリームの入力平均ビットレートSn+1を利用することで、目標設定ビットレートTn+1をより高い精度で制御することが可能となる。 Also in Equation 25, a value obtained by subtracting the input average bit rate S n−1 of the first stream in the (n−1) period from the input average bit rate S n of the first stream in the n period is a period difference. It was. Then, the period difference is added to the target difference. On the other hand, when the input average bit rate S n + 1 in the (n + 1) period of the first stream can be prefetched, the input average bit rate S n + 1 may be used. In this case, in Equation 25, (S n + 1 −S n ) is used as the period difference instead of (S n −S n−1 ). Thus, by using the average input bit rate S n + 1 of the first stream in the (n + 1) period, the target set bit rate T n + 1 can be controlled with higher accuracy.

期間差として、第(n+1)期間の第1ストリームの入力平均ビットレートSn+1を利用した場合には、数20式で示すように、第(n+1)期間の目標設定ビットレートTn+1と、第(n+1)期間の入力平均ビットレートSn+1の比を関数fに入力することで、第(n+1)期間の量子化ステップ変換係数αn+1を算出するようにすればよい。 When the average input bit rate S n + 1 of the first stream in the (n + 1) period is used as the period difference, the target set bit rate T n + 1 in the (n + 1) period, The ratio of the input average bit rate S n + 1 in the (n + 1) period may be input to the function f to calculate the quantization step conversion coefficient α n + 1 in the (n + 1) period.

また、数24式、数25式では、期間差として(S−Sn−1)を利用した。これに代えて、第n期間を含む過去M期間の期間平均ビットレートASと、第(n−1)期間を含む過去M期間の期間平均ビットレートASn−1の差を期間差として用いてもよい。つまり、数24式、数25式において、期間差として、(S−Sn−1)に代えて、(AS−ASn−1)を用いてもよい。これにより、局所的な変動の影響を小さくし、目標設定ビットレートTn+1を最適制御することが可能である。 Further, in Equation 24 and Equation 25, (S n −S n−1 ) is used as the period difference. Alternatively, using the average period bit rate AS n of past M periods including the n period, the difference between the average period bit rate AS n-1 of the last M periods including the (n-1) period as the period difference May be. That is, in Expression 24 and Expression 25, (AS n −AS n−1 ) may be used as the period difference instead of (S n −S n−1 ). Thereby, it is possible to reduce the influence of local fluctuations and optimally control the target setting bit rate T n + 1 .

あるいは、第1ストリームの第(n+1)期間の入力平均ビットレートSn+1を先読みできる場合には、第(n+1)期間を含む過去M期間の期間平均ビットレートASn+1と、第n期間を含む過去M期間の期間平均ビットレートASの比を期間差として用いてもよい。つまり、数24式、数25式において、期間差として、(S−Sn−1)に代えて、(ASn+1−AS)を用いてもよい。これにより、局所的な変動の影響を小さくするとともに、最新の入力ビットレートを利用することで、より精度高く目標設定ビットレートTn+1を制御することが可能である。 Alternatively, when the input average bit rate S n + 1 of the (n + 1) period of the first stream can be prefetched, the period average bit rate AS n + 1 of the past M period including the (n + 1) period and the past including the n period A ratio of the period average bit rate AS n of the M period may be used as the period difference. That is, (AS n + 1 −AS n ) may be used in place of (S n −S n−1 ) as the period difference in the equations (24) and (25). As a result, it is possible to control the target set bit rate T n + 1 with higher accuracy by reducing the influence of local fluctuations and using the latest input bit rate.

期間差として、第(n+1)期間を含む過去M期間の期間平均ビットレートASn+1を利用した場合には、数21式で示すように、第(n+1)期間の目標設定ビットレートTn+1と、第(n+1)期間を含む過去M期間の期間平均ビットレートASn+1の比を関数fに入力することで、第(n+1)期間の量子化ステップ変換係数αn+1を算出するようにすればよい。 When the period average bit rate AS n + 1 of the past M periods including the (n + 1) period is used as the period difference, as shown in Equation 21, the target set bit rate T n + 1 of the (n + 1) period, The quantization step conversion coefficient α n + 1 for the (n + 1) period may be calculated by inputting the ratio of the period average bit rate AS n + 1 for the past M periods including the (n + 1) period to the function f.

また、レート制御方法(D)における目標設定ビットレートTn+1の計算方法を、数24式、数25式などを用いて説明したが、これら数式を用いて説明した場合を含めレート制御方法(D)で説明した全ての計算方法において、第n期間の出力平均ビットレートCに代えて、第(n−M+1)期間から第n期間までの期間平均ビットレートACを用いても良い。たとえば、数24式、数25式などにおいて、Cに代えてACを用いても良い。これにより、目標設定ビットレートTn+1を、より緩やかに制御することが可能である。 In addition, the calculation method of the target setting bit rate T n + 1 in the rate control method (D) has been described using Equation 24, Equation 25, and the like. However, the rate control method (D In all the calculation methods described in (1), the average period bit rate AC n from the (n−M + 1) period to the n period may be used instead of the average output bit rate C n in the n period. For example, AC n may be used instead of C n in Equation 24, Equation 25, and the like. Thereby, the target setting bit rate T n + 1 can be controlled more gently.

{3.制御単位期間の決定方法}
次に、制御単位期間の決定方法を説明する。上述したように、各レート制御方法(A)〜(D)においては、量子化ステップ値Qを算出する計算過程において、制御単位期間Lにおける入力平均ビットレートSを利用した。あるいは、制御単位期間Ln−1,Ln+1における入力平均ビットレートSn−1,Sn+1を利用した。さらには、期間平均ビットレートASなどを利用した。
{3. Method for determining control unit period}
Next, a method for determining the control unit period will be described. As described above, in each rate control method (A) ~ (D), in the calculation process of calculating a quantization step value Q, using the average input bit rate S n in the control unit period L n. Alternatively, using the average input bit rate S n-1, S n + 1 in the control unit time L n-1, L n + 1. Furthermore, a period average bit rate AS n is used.

本実施の形態においては、上述したように、制御単位期間Lとして、基本的には、1GOP期間を利用する。しかし、1GOP内のフレーム数が少ない場合や、1GOP内のIピクチャフレームの比率が高い場合には、入力平均ビットレートSが急激に高くなる場合が発生する。そこで、本実施の形態のトランスコーダ1は、このような場合に、制御単位期間Lを補正して、入力平均ビットレートSの変動が小さくなるようにする。 In the present embodiment, as described above, as the control unit time L n, basically it utilizes 1GOP period. However, when the number of frames in 1 GOP is small or the ratio of I picture frames in 1 GOP is high, the input average bit rate Sn may increase rapidly. Therefore, the transcoder 1 of the present embodiment, in such a case, by correcting the control unit time L n, so that variations in the average input bit rate S n becomes smaller.

<3−1.第1の実施の形態>
制御単位期間の補正方法について第1の実施の形態を説明する。デコーダ2は、まず、入力したGOPに含まれるフレーム数を取得する。そして、GOPに含まれるフレーム数が所定の閾値以上である場合には、そのGOPについては、1GOPを制御単位期間Lとする。一方、GOPに含まれるフレーム数が所定の閾値未満である場合には、その後に続くGOPを連結して、連結した2つのGOPのフレーム数が所定の閾値以上となるようにする。2つのGOPを連結してもフレーム数が所定の閾値未満である場合には、さらに、後続のGOPを連結する。このようにして、フレーム数が所定の閾値以上となるまで、GOPを連結し、連結されたGOPを1つの制御単位期間として決定するのである。
<3-1. First Embodiment>
A first embodiment of the control unit period correction method will be described. The decoder 2 first acquires the number of frames included in the input GOP. When the number of frames included in the GOP is equal to or greater than a predetermined threshold, 1 GOP is set as the control unit period L n for the GOP. On the other hand, when the number of frames included in the GOP is less than a predetermined threshold, the subsequent GOPs are connected so that the number of frames of the two connected GOPs is greater than or equal to the predetermined threshold. If the number of frames is less than the predetermined threshold even when two GOPs are connected, the subsequent GOPs are further connected. In this way, GOPs are concatenated until the number of frames exceeds a predetermined threshold, and the concatenated GOPs are determined as one control unit period.

図3〜図6の例を用いて説明する。図3〜図6において、上段(A)は、入力ストリームのGOPをそのまま1対1で制御単位期間に対応させた場合の例を示す。これに対して、図3〜図6の下段(B)は、上段(A)と同じピクチャ構成の入力ストリームを入力した場合に、本実施の形態の制御単位期間の決定方法により、制御単位期間を補正した場合の例を示している。なお、図3〜図6の例においては、フレーム数の閾値を15と設定する。つまり、GOPのフレーム数が15未満の場合には、フレーム数が15以上となるまで、GOPを連結することで、制御単位期間を補正する。   This will be described with reference to FIGS. 3 to 6, the upper part (A) shows an example in which the GOP of the input stream is directly associated with the control unit period on a one-to-one basis. On the other hand, in the lower part (B) of FIGS. 3 to 6, when an input stream having the same picture configuration as that of the upper part (A) is input, the control unit period is determined according to the control unit period determining method of the present embodiment. An example in which is corrected is shown. In the examples of FIGS. 3 to 6, the threshold number of frames is set to 15. That is, when the number of GOP frames is less than 15, the control unit period is corrected by connecting the GOPs until the number of frames becomes 15 or more.

図3の例について説明する。この例は、最も一般的な場合である。各GOP1〜GOP3は、15枚のフレームから構成されている。具体的には、各GOP1〜GOP3が、「IBBPBBPBBPBBPBB」という基本的なピクチャ構成となっている。そのため、図3(A)、(B)ともに、各GOP1〜GOP3が、そのまま制御単位期間L〜Lに対応している。つまり、この例の場合には、制御単位期間は1GOP単位のままであり、補正されない。 The example of FIG. 3 will be described. This example is the most common case. Each GOP1 to GOP3 is composed of 15 frames. Specifically, each of GOP1 to GOP3 has a basic picture configuration of “IBBPBBPBBPBBPBB”. Therefore, FIG. 3 (A), the can (B) together, each GOP1~GOP3, which directly corresponds to the control unit time L 1 ~L 3. That is, in this example, the control unit period remains in 1 GOP unit and is not corrected.

図4の例について説明する。この例では、GOP1、GOP4は、「IBBPBBPBBPBBPBB」という基本的なピクチャ構成となっており、15枚のフレームから構成されている。しかし、GOP2のピクチャ構成は、「IBB」であり、フレーム数が3である。また、GOP3のピクチャ構成は、「IBBPBBPBBPBB」であり、フレーム数が12である。   The example of FIG. 4 will be described. In this example, GOP1 and GOP4 have a basic picture configuration of “IBBPBBPBBPBBPBB” and are composed of 15 frames. However, the picture configuration of GOP2 is “IBB” and the number of frames is three. The picture configuration of GOP3 is “IBBPBBPBBPBB”, and the number of frames is 12.

図4(A)のように、各GOP1〜GOP4が、そのまま制御単位期間L〜Lに対応する場合、制御単位期間LやLの入力平均ビットレートSやSの値が急激に高くなる。そこで、図4(B)に示すように、GOP2とGOP3とを連結して1つの制御単位期間Lと決定する。これにより、制御単位期間Lのフレーム数は15となり、入力平均ビットレートSの変動を小さくすることができる。 As shown in FIG. 4 (A), the respective GOP1~GOP4 If the directly corresponding to the control unit time L 1 ~L 4, the value of the average input bit rate S 2 and S 3 of the control unit time L 2 and L 3 It becomes high rapidly. Therefore, as shown in FIG. 4 (B), to determine one control unit period L 2 and connects the GOP2 and GOP3. Thus, the number of frames control unit time L 2 may be 15, and the variation of the average input bit rate S n small.

図5の例について説明する。この例では、GOP1、GOP3、GOP4は、「IBBPBBPBBPBBPBB」という基本的なピクチャ構成となっており、15枚のフレームから構成されている。しかし、GOP2のピクチャ構成は、「IBB」であり、フレーム数が3である。   An example of FIG. 5 will be described. In this example, GOP1, GOP3, and GOP4 have a basic picture configuration of “IBBPBBPBBPBBPBB” and are composed of 15 frames. However, the picture configuration of GOP2 is “IBB” and the number of frames is three.

図5(A)のように、各GOP1〜GOP4が、そのまま制御単位期間L〜Lに対応する場合、制御単位期間Lの入力平均ビットレートSの値が急激に高くなる。そこで、図5(B)に示すように、GOP2とGOP3とを連結して1つの制御単位期間Lと決定する。これにより、制御単位期間Lのフレーム数は18となり、入力平均ビットレートSの変動を小さくすることができる。このように、GOP3のフレーム数は15であり、制御単位期間としての条件を満たしているが、GOP2のフレーム数が少ないために、GOP2との連結により制御単位期間が補正される。この結果、制御単位期間Lのフレーム数が18と他の制御単位期間よりもフレーム数が多くなるが、入力平均ビットレートSの変動を小さくするという意味において問題はない。 As shown in FIG. 5 (A), the respective GOP1~GOP4 is directly may correspond to the control unit period L 1 ~L 4, the value of the average input bit rate S 2 of the control unit time L 2 is rapidly increased. Therefore, as shown in FIG. 5 (B), to determine one control unit period L 2 and connects the GOP2 and GOP3. Thus, the number of frames control unit time L 2 can be next to 18, the variation of the average input bit rate S n small. As described above, the number of frames of GOP3 is 15, which satisfies the conditions as the control unit period. However, since the number of frames of GOP2 is small, the control unit period is corrected by connection with GOP2. As a result, the number of frames control unit time L 2 is the number of frames greater than 18 and the other control unit time, no problem in the sense of reducing the variation of the average input bit rate S n.

図6の例について説明する。この例では、GOP1は、「IBBPBBPBBPBBPBB」という基本的なピクチャ構成となっており、15枚のフレームから構成されている。しかし、GOP2のピクチャ構成は、「IBB」であり、フレーム数が3である。また、GOP3のピクチャ構成は、「IBBPBBPBB」であり、フレーム数が9である。また、GOP4のピクチャ構成は、「IBBPBBPBBPBBPBBPBB」であり、フレーム数が18である。   The example of FIG. 6 will be described. In this example, GOP1 has a basic picture configuration of “IBBPBBPBBPBBPBB” and is composed of 15 frames. However, the picture configuration of GOP2 is “IBB” and the number of frames is three. Also, the picture configuration of GOP3 is “IBBPBBPBB” and the number of frames is nine. The picture configuration of GOP4 is “IBBPBBPBBPBBPBBPBB” and the number of frames is 18.

図6(A)のように、各GOP1〜GOP4が、そのまま制御単位期間L〜Lに対応する場合、制御単位期間LやLの入力平均ビットレートSやSの値が急激に高くなる。そこで、図6(B)に示すように、GOP2とGOP3とGOP4を連結して1つの制御単位期間Lと決定する。これにより、制御単位期間Lのフレーム数は30となり、入力平均ビットレートSの変動を小さくすることができる。このように、2つのGOPを連結しても、フレーム数が閾値15に満たない場合には、さらにそれ以上のGOPを連結することで、入力平均ビットレートSの変動を抑えるのである。 As shown in FIG. 6 (A), the respective GOP1~GOP4 If the directly corresponding to the control unit time L 1 ~L 4, the value of the average input bit rate S 2 and S 3 of the control unit time L 2 and L 3 It becomes high rapidly. Therefore, as shown in FIG. 6 (B), determined GOP2 and GOP3 and GOP4 and one control unit time L 2 by connecting. Thus, the number of frames control unit time L 2 may be 30, and the variation of the average input bit rate S n small. Thus, even when connecting two GOP, if the number of frames is less than the threshold value 15, by further linking more GOP, it is to suppress the fluctuation of the average input bit rate S n.

なお、本実施の形態においては、GOP単位で制御単位期間を連結させる場合を説明したが、フレーム単位で制御単位期間を補正するようにしてもよい。   In the present embodiment, the case where the control unit periods are connected in units of GOPs has been described. However, the control unit periods may be corrected in units of frames.

このように、本実施の形態においては、入力ストリームのGOPに含まれるフレーム数に応じて適応的に制御単位期間を補正する。これにより、入力平均ビットレートSの変動を抑え、一定化された入力平均ビットレートSを用いて、最適なレート制御を行うことが可能である。 Thus, in the present embodiment, the control unit period is adaptively corrected according to the number of frames included in the GOP of the input stream. Thus, suppressing the variation of the average input bit rate S n, using the average input bit rate S n which is kept constant, it is possible to perform optimal rate control.

<3−2.第2の実施の形態>
制御単位期間の補正方法について第2の実施の形態を説明する。デコーダ2は、まず、入力したGOPに含まれるIピクチャフレーム数を取得する。そして、GOPに含まれるIピクチャフレームの比率が所定の閾値以下である場合には、そのGOPについては、1GOPを制御単位期間Lとする。一方、GOPに含まれるIピクチャフレームの比率が所定の閾値を超える場合には、その後に続くGOPを連結して、連結した2つのGOPにおけるIピクチャフレームの比率が所定の閾値以下となるようにする。2つのGOPを連結してもIピクチャフレームの比率が所定の閾値を超える場合には、さらに、後続のGOPを連結する。このようにして、Iピクチャフレームの比率が所定の閾値以下となるまで、GOPを連結し、連結されたGOPを1つの制御単位期間として決定するのである。
<3-2. Second Embodiment>
A second embodiment of the control unit period correction method will be described. The decoder 2 first acquires the number of I picture frames included in the input GOP. When the ratio of I picture frames included in a GOP is equal to or less than a predetermined threshold, 1 GOP is set as the control unit period L n for the GOP. On the other hand, when the ratio of the I picture frames included in the GOP exceeds a predetermined threshold, the subsequent GOPs are connected so that the ratio of the I picture frames in the two connected GOPs is not more than the predetermined threshold. To do. If the ratio of I picture frames exceeds a predetermined threshold even when two GOPs are connected, further subsequent GOPs are further connected. In this way, GOPs are concatenated until the ratio of I picture frames is equal to or less than a predetermined threshold, and the concatenated GOPs are determined as one control unit period.

図7〜図10の例を用いて説明する。図7〜図10において、上段(A)は、入力ストリームのGOPをそのまま1対1で制御単位期間に対応させた場合の例を示す。これに対して、図7〜図10の下段(B)は、上段(A)と同じピクチャ構成の入力ストリームを入力した場合に、本実施の形態の制御単位期間の決定方法により、制御単位期間を補正した場合の例を示している。なお、図7〜図10の例においては、Iピクチャフレームの比率の閾値を0.2と設定する。つまり、GOPに含まれるIピクチャフレームの比率が0.2を超える場合には、Iピクチャフレームの比率が0.2以下となるまで、GOPを連結することで、制御単位期間を補正する。   This will be described with reference to the examples of FIGS. 7 to 10, the upper part (A) shows an example in which the GOP of the input stream is directly associated with the control unit period on a one-to-one basis. On the other hand, in the lower part (B) of FIGS. 7 to 10, when an input stream having the same picture configuration as the upper part (A) is input, the control unit period is determined by the control unit period determining method according to the present embodiment. An example in which is corrected is shown. In the examples of FIGS. 7 to 10, the threshold value of the ratio of I picture frames is set to 0.2. That is, when the ratio of the I picture frame included in the GOP exceeds 0.2, the control unit period is corrected by concatenating the GOP until the ratio of the I picture frame becomes 0.2 or less.

図7の例について説明する。この例は、最も一般的な場合である。各GOP1〜GOP3は、15枚のフレームから構成され、ピクチャ構成は、「IBBPBBPBBPBBPBB」である。したがって、各GOP1〜GOP3において、Iピクチャフレームの比率は、1/15≒0.07である。そのため、図7(A)、(B)ともに、各GOP1〜GOP3が、そのまま制御単位期間L〜Lに対応している。つまり、この例の場合には、制御単位期間は1GOP単位のままであり、補正されない。 The example of FIG. 7 will be described. This example is the most common case. Each GOP1 to GOP3 is composed of 15 frames, and the picture configuration is “IBBPBBPBBPBBPBB”. Accordingly, in each of GOP1 to GOP3, the ratio of the I picture frame is 1 / 15≈0.07. Therefore, FIG. 7 (A), the (B) together, each GOP1~GOP3, which directly corresponds to the control unit time L 1 ~L 3. That is, in this example, the control unit period remains in 1 GOP unit and is not corrected.

図8の例について説明する。この例では、GOP1、GOP4は、「IBBPBBPBBPBBPBB」という基本的なピクチャ構成となっており、15枚のフレームから構成されており、Iピクチャフレームの比率は、1/15≒0.07である。しかし、GOP2のピクチャ構成は、「III」であり、フレーム数が3であり、Iピクチャフレームの比率が3/3=1である。また、GOP3のピクチャ構成は、「IBBPBBPBBPBB」であり、フレーム数が12である。   The example of FIG. 8 will be described. In this example, GOP1 and GOP4 have a basic picture configuration of “IBBPBBPBBPBBPBB”, which is composed of 15 frames, and the ratio of I picture frames is 1 / 15≈0.07. However, the picture configuration of GOP2 is “III”, the number of frames is 3, and the ratio of I picture frames is 3/3 = 1. The picture configuration of GOP3 is “IBBPBBPBBPBB”, and the number of frames is 12.

図8(A)のように、各GOP1〜GOP4が、そのまま制御単位期間L〜Lに対応する場合、制御単位期間Lの入力平均ビットレートSの値が急激に高くなる。そこで、図8(B)に示すように、GOP2とGOP3とGOP4を連結して1つの制御単位期間Lと決定する。GOP2とGOP3とを連結した場合にも、Iピクチャフレームの比率は4/15≒0.27であり閾値の0.2を超える。3つのGOPを連結することにより、制御単位期間Lのフレーム数は30となり、Iピクチャフレームの比率が5/30≒0.17となる。これにより、入力平均ビットレートSの変動を小さくすることができる。 As shown in FIG. 8 (A), the respective GOP1~GOP4 is directly may correspond to the control unit period L 1 ~L 4, the value of the average input bit rate S 2 of the control unit time L 2 is rapidly increased. Therefore, as shown in FIG. 8 (B), to determine one control unit period L 2 by connecting the GOP2 and GOP3 and GOP4. Even when GOP2 and GOP3 are connected, the ratio of I picture frames is 4 / 15≈0.27, which exceeds the threshold value of 0.2. By connecting the three GOP, the number of frames control unit time L 2 is 30, and the ratio of I-picture frame becomes 5/30 ≒ 0.17. Thus, it is possible to reduce variation in the average input bit rate S n.

図9の例について説明する。この例では、GOP1、GOP4は、「IBBPBBPBBPBBPBB」という基本的なピクチャ構成となっており、15枚のフレームから構成されている。しかし、GOP2のピクチャ構成は、「IPPIPP」であり、Iピクチャフレームの比率が2/6≒0.33である。また、GOP3のピクチャ構成は、「IBBPBBPBBPBB」である。   The example of FIG. 9 will be described. In this example, GOP1 and GOP4 have a basic picture configuration of “IBBPBBPBBPBBPBB” and are composed of 15 frames. However, the picture configuration of GOP2 is “IPPIPP”, and the ratio of I picture frames is 2 / 6≈0.33. The picture configuration of GOP3 is “IBBPBBPBBPBB”.

図9(A)のように、各GOP1〜GOP4が、そのまま制御単位期間L〜Lに対応する場合、制御単位期間Lの入力平均ビットレートSの値が急激に高くなる。そこで、図9(B)に示すように、GOP2とGOP3とを連結して1つの制御単位期間Lと決定する。これにより、制御単位期間LのIピクチャフレームの比率は3/18≒0.17となり、入力平均ビットレートSの変動を小さくすることができる。 As shown in FIG. 9 (A), the respective GOP1~GOP4 is directly may correspond to the control unit period L 1 ~L 4, the value of the average input bit rate S 2 of the control unit time L 2 is rapidly increased. Therefore, as shown in FIG. 9 (B), to determine one control unit period L 2 and connects the GOP2 and GOP3. Thus, the ratio of I-picture frame control unit time L 2 can be 3/18 ≒ 0.17. Therefore, the variation of the average input bit rate S n small.

図10の例について説明する。この例では、GOP1、GOP4は、「IBBPBBPBBPBBPBB」という基本的なピクチャ構成となっており、15枚のフレームから構成されている。GOP2のピクチャ構成は、「IPPPPP」であるが、Iピクチャフレームの比率は1/6≒0.17であり閾値0.2以下である。また、GOP3のピクチャ構成は、「IBBPBBPBB」であり、Iピクチャフレームの比率は0.2以下である。そのため、図10(A)、(B)ともに、各GOP1〜GOP4が、そのまま制御単位期間L〜Lに対応している。 The example of FIG. 10 will be described. In this example, GOP1 and GOP4 have a basic picture configuration of “IBBPBBPBBPBBPBB” and are composed of 15 frames. The picture configuration of GOP2 is “IPPPPP”, but the ratio of I picture frames is 1 / 6≈0.17, which is equal to or less than the threshold value 0.2. The picture configuration of GOP3 is “IBBPBBPBB”, and the ratio of I picture frames is 0.2 or less. Therefore, FIG. 10 (A), the can (B) together, each GOP1~GOP4, which directly corresponds to the control unit time L 1 ~L 4.

なお、この実施の形態で用いた閾値0.2は一例である。入力ストリームのビットレートやピクチャ構成に応じて、適宜、最適な値を選択すればよい。また、本実施の形態においては、GOP単位で制御単位期間を連結させる場合を説明したが、フレーム単位で制御単位期間を補正するようにしてもよい。   The threshold value 0.2 used in this embodiment is an example. An optimal value may be selected as appropriate according to the bit rate of the input stream and the picture configuration. In the present embodiment, the case where the control unit periods are connected in units of GOPs has been described. However, the control unit periods may be corrected in units of frames.

このように、本実施の形態においては、入力ストリームのGOPに含まれるIピクチャフレームの比率に応じて適応的に制御単位期間を補正する。これにより、入力平均ビットレートSの変動を抑え、一定化された入力平均ビットレートSを用いて、最適なレート制御を行うことが可能である。 As described above, in the present embodiment, the control unit period is adaptively corrected according to the ratio of the I picture frames included in the GOP of the input stream. Thus, suppressing the variation of the average input bit rate S n, using the average input bit rate S n which is kept constant, it is possible to perform optimal rate control.

<3−3.変形例>
次に、変形例について説明する。この変形例は、上記第2の実施の形態に対する変形例である。第2の実施の形態においては、GOPを構成する全フレーム枚数に対するIピクチャフレームの枚数をIピクチャの比率とした。GOPを構成するI、P、Bピクチャフレームのビット比率は、MPEG2においては、一般的には、I:P:B=5:3:1である。この変形例では、GOPを構成するI、P、Bピクチャフレームの枚数に、それぞれ重み付けとしてビット比率を乗算して重み付け枚数を求め、この重み付け枚数によりIピクチャフレームの比率を求める。
<3-3. Modification>
Next, a modified example will be described. This modification is a modification to the second embodiment. In the second embodiment, the number of I picture frames with respect to the total number of frames constituting the GOP is used as the ratio of I pictures. In MPEG2, the bit ratio of I, P, and B picture frames constituting a GOP is generally I: P: B = 5: 3: 1. In this modification, the number of I, P, and B picture frames constituting a GOP is multiplied by a bit ratio as a weight to obtain a weighted number, and the ratio of the I picture frame is obtained from this weighted number.

重み付けを加味することで、Iピクチャフレームの比率は全般的に高くなるので、閾値としては、第2の実施の形態で使用した0.2より大きめの値を設定すればよい。例えば、0.22〜0.24などが考えられる。   By adding weighting, the ratio of I picture frames generally increases. Therefore, a value larger than 0.2 used in the second embodiment may be set as the threshold value. For example, 0.22 to 0.24 can be considered.

たとえば、図10の例であれば、GOP2については、第2の実施の形態においては、Iピクチャフレームの比率は、1/6≒0.17であり、制御単位期間の条件を満たしていた。これに対して、重み付けを加味した場合、Iピクチャフレームの枚数は1×5=5枚であり、Pピクチャフレームの枚数は5×3=15である。したがって、GOP2の重み付け全フレーム枚数は20枚であり、GOP2におけるIピクチャフレームの重み付け比率は、5/20=0.25となる。   For example, in the example of FIG. 10, for GOP2, in the second embodiment, the ratio of I picture frames is 1 / 6≈0.17, which satisfies the condition of the control unit period. On the other hand, when weighting is added, the number of I picture frames is 1 × 5 = 5, and the number of P picture frames is 5 × 3 = 15. Therefore, the total number of weighted frames in GOP2 is 20, and the weighting ratio of I picture frames in GOP2 is 5/20 = 0.25.

そこで、GOP2とGOP3を連結した制御単位期間を考える。GOP3において、Iピクチャフレームの重み付け枚数は、1×5=5枚であり、Pピクチャフレームの重み付け枚数は3×3=9枚であり、Bピクチャフレームの重み付け枚数は、8×1=8枚である。したがって、GOP3の重み付け全フレーム枚数は22枚であり、Iピクチャフレームの重み付け枚数は5枚である。GOP2とGOP3を連結した制御単位期間では、重み付け全フレーム枚数は42枚であり、Iピクチャフレームの重み付け枚数は10枚であるので、Iピクチャフレームの重み付け比率は10/42≒0.24となる。   Therefore, a control unit period in which GOP2 and GOP3 are connected is considered. In GOP3, the weighted number of I picture frames is 1 × 5 = 5, the weighted number of P picture frames is 3 × 3 = 9, and the weighted number of B picture frames is 8 × 1 = 8. It is. Therefore, the total number of weighted frames in GOP3 is 22, and the number of weighted I picture frames is 5. In the control unit period in which GOP2 and GOP3 are connected, the total number of frames is 42, and the number of I picture frames is 10. Therefore, the weight ratio of I picture frames is 10 / 42≈0.24. .

したがって、閾値が0.24に設定されていれば、GOP2とGOP3とを連結した期間を制御単位期間として補正すればよい。閾値が0.24よりも小さい場合には、さらに、GOP4と連結させればよい。   Therefore, if the threshold is set to 0.24, a period in which GOP2 and GOP3 are connected may be corrected as a control unit period. If the threshold is smaller than 0.24, it may be further connected to GOP4.

このように、I、P、Bピクチャフレームのビット比率を用いて重み付けをすることにより、さらに入力平均ビットレートSの変動を小さく抑えることができる。 Thus, I, P, by weighting with a bit ratio of B-pictures frame can be suppressed further small variation in the average input bit rate S n.

1 トランスコーダ
2 デコーダ
3 エンコーダ
AC 期間平均ビットレート
AS 期間平均ビットレート
出力平均ビットレート
制御単位期間
P 量子化ステップ値
Q 量子化ステップ値
S 入力全体ビットレート
入力平均ビットレート
T 全体目標ビットレート
目標設定ビットレート
α 量子化ステップ変換係数
1 transcoder 2 decoder 3 encoder AC n period average bit rate AS n period average bit rate C n output average bit rate L n control unit period P quantization step value Q quantization step value S total input bit rate S n input average bit Rate T Overall target bit rate T n Target set bit rate α n Quantization step transform coefficient

Claims (12)

第1のストリームを第2のストリームに変換するトランスコーダであって、
制御単位期間を決定する期間決定手段と、
決定された制御単位期間ごとの第1のストリームのビットレートを取得する手段と、
取得した制御単位期間ごとの第1のストリームのビットレートを含む第1のストリームの情報を用いて、第2のストリームの量子化ステップ値を算出する量子化ステップ値算出手段と、
を備え、
前記期間決定手段は、各制御単位期間に含まれるIピクチャフレームの比率が所定の比率以下となるよう各制御単位期間を決定することを特徴とするトランスコーダ。
A transcoder for converting a first stream into a second stream,
A period determining means for determining a control unit period;
Means for obtaining the bit rate of the first stream for each determined control unit period;
Quantization step value calculating means for calculating the quantization step value of the second stream using the information of the first stream including the bit rate of the first stream for each acquired control unit period;
With
The period deciding unit decides each control unit period so that a ratio of I picture frames included in each control unit period is equal to or less than a predetermined ratio.
請求項1に記載のトランスコーダにおいて、
前記期間決定手段は、GOP内のIピクチャフレームの比率が所定の割合以下である場合には、GOPを制御単位期間として決定し、GOP内のIピクチャフレームの比率が所定の割合を超える場合には、Iピクチャフレームの比率が所定の比率以下となるまで複数のGOPを連結し、連結された複数のGOPを制御単位期間として決定することを特徴とするトランスコーダ。
The transcoder of claim 1.
The period determining means determines the GOP as a control unit period when the ratio of the I picture frames in the GOP is equal to or less than a predetermined ratio, and when the ratio of the I picture frames in the GOP exceeds the predetermined ratio Is a transcoder that concatenates a plurality of GOPs until a ratio of I picture frames is equal to or less than a predetermined ratio, and determines the concatenated GOPs as a control unit period.
請求項2に記載のトランスコーダにおいて、
前記期間決定手段は、I、P、Bピクチャフレームにそれぞれ所定の重み付けを設定し、重み付けを加味した上で、GOP内のIピクチャフレームの比率が所定の比率以下となるか否かを判断することを特徴とするトランスコーダ。
The transcoder according to claim 2, wherein
The period determining means sets a predetermined weight to each of the I, P, and B picture frames, and determines whether or not the ratio of the I picture frames in the GOP is equal to or less than the predetermined ratio after adding the weights. Transcoder characterized by that.
請求項1ないし請求項3のいずれかに記載のトランスコーダにおいて、さらに、
第N+1期間の第2のストリームの目標ビットレートと第N期間以前の第1のストリームのビットレートとの比に基づいて第N+1期間の期間変換係数を算出する期間変換係数算出手段、
を備え、
前記量子化ステップ値算出手段は、
第N+1期間の第1のストリームの量子化ステップ値に前記期間変換係数を乗算することで、第N+1期間の第2のストリームの量子化ステップ値を算出する手段、
を含むことを特徴とするトランスコーダ。
The transcoder according to any one of claims 1 to 3, further comprising:
Period conversion coefficient calculating means for calculating a period conversion coefficient for the (N + 1) period based on the ratio between the target bit rate of the second stream in the (N + 1) period and the bit rate of the first stream before the N period;
With
The quantization step value calculation means includes:
Means for calculating the quantization step value of the second stream in the (N + 1) period by multiplying the quantization step value of the first stream in the (N + 1) period by the period conversion coefficient;
Transcoder characterized by including.
請求項4に記載のトランスコーダにおいて、さらに、
第2のストリーム全体の目標ビットレートと、第N期間以前の変換済みの第2のストリームのビットレートと、第N期間の第2のストリームの目標ビットレートに基づいて第N+1期間の第2のストリームの目標ビットレートを決定する目標ビットレート決定手段、
を備えることを特徴とするトランスコーダ。
The transcoder according to claim 4, further comprising:
Based on the target bit rate of the entire second stream, the bit rate of the converted second stream before the Nth period, and the target bitrate of the second stream in the Nth period, the second of the N + 1 period Target bit rate determining means for determining a target bit rate of the stream;
A transcoder comprising:
請求項5に記載のトランスコーダにおいて、
第N期間以前の変換済みの第2のストリームのビットレートと第N期間の第2のストリームの目標ビットレートとの比を目標比とすると、前記目標ビットレート決定手段は、第2のストリームの全体の目標ビットレートと前記目標比との比に基づいて第N+1期間の第2のストリームの目標ビットレートを算出することを特徴とするトランスコーダ。
The transcoder according to claim 5, wherein
When the ratio of the bit rate of the converted second stream before the N period and the target bit rate of the second stream in the N period is a target ratio, the target bit rate determining means A transcoder that calculates a target bit rate of the second stream in the (N + 1) period based on a ratio between an overall target bit rate and the target ratio.
請求項6に記載のトランスコーダにおいて、
第N−1期間の第1のストリームのビットレートと第N期間の第1のストリームのビットレートの比を期間比とすると、前記目標ビットレート決定手段は、前記目標比に前記期間比を乗算し、前記目標比を調整することを特徴とするトランスコーダ。
The transcoder according to claim 6, wherein
When the ratio of the bit rate of the first stream in the (N-1) period and the bit rate of the first stream in the N period is a period ratio, the target bit rate determining means multiplies the target ratio by the period ratio. And the target ratio is adjusted.
請求項6に記載のトランスコーダにおいて、
第N期間の第1のストリームのビットレートと第N+1期間の第1のストリームのビットレートの比を期間比とすると、前記目標ビットレート決定手段は、前記目標比に前記期間比を乗算し、前記目標比を調整することを特徴とするトランスコーダ。
The transcoder according to claim 6, wherein
When the ratio of the bit rate of the first stream in the N period and the bit rate of the first stream in the (N + 1) period is a period ratio, the target bit rate determining unit multiplies the target ratio by the period ratio, A transcoder for adjusting the target ratio.
請求項5に記載のトランスコーダにおいて、
第N期間の第2のストリームの目標ビットレートと第N期間以前の変換済みの第2のストリームのビットレートとの差に基づいて算出される値を目標差とすると、前記目標ビットレート決定手段は、第2のストリームの全体の目標ビットレートに前記目標差を加算することで、第N+1期間の第2のストリームの目標ビットレートを算出することを特徴とするトランスコーダ。
The transcoder according to claim 5, wherein
When the target difference is a value calculated based on the difference between the target bit rate of the second stream in the N period and the bit rate of the converted second stream before the N period, the target bit rate determining means The transcoder is characterized in that the target bit rate of the second stream in the (N + 1) period is calculated by adding the target difference to the overall target bit rate of the second stream.
請求項9に記載のトランスコーダにおいて、
第N期間の第1のストリームのビットレートと第N−1期間の第1のストリームのビットレートの比を期間比とすると、前記目標ビットレート決定手段は、前記目標差に前記期間比を乗算し、前記目標差を調整することを特徴とするトランスコーダ。
The transcoder according to claim 9, wherein
When the ratio of the bit rate of the first stream in the N period and the bit rate of the first stream in the (N-1) period is a period ratio, the target bit rate determining means multiplies the target difference by the period ratio. And the target difference is adjusted.
請求項9に記載のトランスコーダにおいて、
第N期間の第1のストリームのビットレートと第N−1期間の第1のストリームのビットレートの差に基づいて算出される値を期間差とすると、前記目標ビットレート決定手段は、前記目標差に前記期間差を乗算し、前記目標差を調整することを特徴とするトランスコーダ。
The transcoder according to claim 9, wherein
When the value calculated based on the difference between the bit rate of the first stream in the Nth period and the bitrate of the first stream in the (N−1) period is a period difference, the target bit rate determining means A transcoder that adjusts the target difference by multiplying the difference by the period difference.
請求項9に記載のトランスコーダにおいて、
第N期間の第1のストリームのビットレートと第N−1期間の第1のストリームのビットレートの差に基づいて算出される値を期間差とすると、前記目標ビットレート決定手段は、前記目標差に前記期間差を加算し、前記目標差を調整することを特徴とするトランスコーダ。
The transcoder according to claim 9, wherein
When the value calculated based on the difference between the bit rate of the first stream in the Nth period and the bitrate of the first stream in the (N−1) period is a period difference, the target bit rate determining means A transcoder that adjusts the target difference by adding the period difference to a difference.
JP2012005457A 2012-01-13 2012-01-13 Transcoder Expired - Fee Related JP5076085B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012005457A JP5076085B2 (en) 2012-01-13 2012-01-13 Transcoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012005457A JP5076085B2 (en) 2012-01-13 2012-01-13 Transcoder

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2008042427A Division JP5076083B2 (en) 2008-02-25 2008-02-25 Transcoder

Publications (2)

Publication Number Publication Date
JP2012110011A JP2012110011A (en) 2012-06-07
JP5076085B2 true JP5076085B2 (en) 2012-11-21

Family

ID=46495045

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012005457A Expired - Fee Related JP5076085B2 (en) 2012-01-13 2012-01-13 Transcoder

Country Status (1)

Country Link
JP (1) JP5076085B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4624321B2 (en) * 2006-08-04 2011-02-02 株式会社メガチップス Transcoder and coded image conversion method

Also Published As

Publication number Publication date
JP2012110011A (en) 2012-06-07

Similar Documents

Publication Publication Date Title
JP4624321B2 (en) Transcoder and coded image conversion method
JP5076083B2 (en) Transcoder
JP2005065291A (en) Method of controlling encoding rate of video encoder, method of transmitting video data, encoding rate controller for video encoder, and video data transmission system
JP4790669B2 (en) Transcoder
US10027979B2 (en) Variable rate video encoder
JP5900163B2 (en) Image processing apparatus, image processing method, and program
US20110317756A1 (en) Coding device, imaging device, coding transmission system, and coding method
JP5098043B2 (en) Transcoder
JP5550032B2 (en) Transcoder
JP5050158B2 (en) Transcoder
JP6259273B2 (en) Moving picture coding apparatus, coding amount control method, and program
JP5256803B2 (en) Transcoder
JP5076085B2 (en) Transcoder
JP5232898B2 (en) Transcoder
JP5391294B2 (en) Transcoder
JP5050159B2 (en) Encoder
JP2008252225A (en) Motion picture encoding device and method
JP5412588B2 (en) Transcoder
JP5641755B2 (en) Encoding apparatus, encoding apparatus control method, and program
JP5495156B2 (en) Transcoder
JP4239734B2 (en) Encoding apparatus, encoding method, and program

Legal Events

Date Code Title Description
TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120710

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120717

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

Free format text: PAYMENT UNTIL: 20150907

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5076085

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees