JP2011199473A - Device for setting bit rate - Google Patents
Device for setting bit rate Download PDFInfo
- Publication number
- JP2011199473A JP2011199473A JP2010062513A JP2010062513A JP2011199473A JP 2011199473 A JP2011199473 A JP 2011199473A JP 2010062513 A JP2010062513 A JP 2010062513A JP 2010062513 A JP2010062513 A JP 2010062513A JP 2011199473 A JP2011199473 A JP 2011199473A
- Authority
- JP
- Japan
- Prior art keywords
- bit rate
- code amount
- time length
- moving image
- recording time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
Description
本発明は、可変ビットレート方式の符号化装置に対し動画像の全ての符号を記録媒体に記録できるようなビットレートを設定できるビットレート設定装置に関するものである。 The present invention relates to a bit rate setting device that can set a bit rate that allows a variable bit rate encoding device to record all the codes of a moving image on a recording medium.
従来において、例えば、映画などの動画像を符号化する符号化装置の1つとして、可変ビットレート方式の符号化装置が知られている。 2. Description of the Related Art Conventionally, for example, a variable bit rate encoding apparatus is known as one of encoding apparatuses that encode a moving image such as a movie.
図6において、符号化装置2は、外部から設定されるビットレートBRに応じた総符号量が得られるように動画像Vを符号化すべく動画像Vの符号化対象部分のデータ量に応じてビットレートBRより大きいまたは小さいビットレートで当該符号化対象部分を符号化する可変ビットレート方式の符号化装置である。
In FIG. 6, the
符号化装置2は、例えば、動画像記憶装置3から送信される動画像Vを可変ビットレート方式で符号化し、符号を符号蓄積装置4に送信し、蓄積する。
For example, the
符号化装置2は、動画像Vを符号化する符号化部21と、符号化部21から符号化対象部分のデータ量を取得し、データ量が大の場合は、例えば、激しい動きが連続する符号化対象部分の場合は、ビットレートBRより大きいビットレートを計算し、一方、データ量が小の場合は、例えば、静止画である符号化対象部分の場合は、ビットレートBRより小さいビットレートを計算し、そのビットレートを符号化部21に与えるビットレート計算部22を有し、符号化部21は、与えられるビットレートで符号化対象部分を符号化する。
The
これにより、符号化装置2は、ビットレートBRに応じた総符号量が得られるように動画像Vを符号化できるようになっている。
Thereby, the
総符号量に対応する全ての符号は、符号蓄積装置4から読み出され、例えば、記録媒体(DVDディスクなど)に記録される。 All the codes corresponding to the total code amount are read from the code storage device 4 and recorded on, for example, a recording medium (DVD disc or the like).
図7は、符号化の過程での総符号量の変化の様子を示す図である。横軸は動画像Vの記録時間上で時刻の推移を示し、縦軸は符号量を示す。 FIG. 7 is a diagram showing how the total code amount changes during the encoding process. The horizontal axis shows the transition of time on the recording time of the moving image V, and the vertical axis shows the code amount.
仮に、動画像Vの各符号化対象部分のデータ量が一定で、且つ、ビットレートBRに等しいビットレートが符号化部21に常に与えられるなら、符号化当初から任意のタイミングまでの期間での総符号量は、目標符号量P0つまり当該ビットレートの当該期間での定積分に等しく、ビットレートBRに等しい一定の傾きで増加する。
If the data amount of each encoding target portion of the moving image V is constant and a bit rate equal to the bit rate BR is always given to the
しかし、動画像Vの各符号化対象部分のデータ量は、通常は一定でなく、実際の総符号量D2は、例えば、データ量が増すと、目標符号量P0より大きくなることがある。 However, the data amount of each encoding target portion of the moving image V is not usually constant, and the actual total code amount D2 may be larger than the target code amount P0 when the data amount increases, for example.
そのため、総符号量は、最終的に、記録媒体の容量より大きくなり、全ての符号が、記録媒体に記録できないことがある。 Therefore, the total code amount eventually becomes larger than the capacity of the recording medium, and all codes may not be recorded on the recording medium.
そこで、符号化装置2に対し、全ての符号を記録媒体に記録可能とすべく、機能を追加することが考えられる。
Therefore, it is conceivable to add a function to the
しかし、符号化装置2は、例えば、他社製で内部が非公開であることや、既に集積化されていることがあり、実際には機能追加は困難である。
However, for example, the
本発明は、上記の課題に鑑みてなされたものであり、その目的とするところは、可変ビットレート方式の符号化装置に対し動画像の全ての符号を記録媒体に記録できるようなビットレートを設定できるビットレート設定装置を提供することにある。 The present invention has been made in view of the above-described problems, and an object of the present invention is to provide a bit rate that allows a variable bit rate encoding apparatus to record all the codes of a moving image on a recording medium. An object of the present invention is to provide a bit rate setting device that can be set.
上記の課題を解決するために、第1の本発明に係るビットレート設定装置は、外部から設定されるビットレートに応じた総符号量が得られるように動画像を符号化すべく当該動画像の符号化対象部分のデータ量に応じて当該ビットレートより大きいまたは小さいビットレートで当該符号化対象部分を符号化する可変ビットレート方式の符号化装置に対し当該動画像の符号化が終了するまでの複数のタイミングでビットレートを設定するビットレート設定装置であって、符号化された動画像が記録される記録媒体に記録可能な最大符号量である記録媒体容量が予め記憶される記録媒体容量記憶部と、前記動画像の記録時間長である動画像記録時間長が予め記憶される動画像記録時間長記憶部と、前記動画像の符号化が終了するまでの複数のタイミングにおいて符号化済みの累積の符号量である累積符号量を計算する累積符号量計算部と、前記累積符号量が計算されたなら、前記記録媒体容量記憶部から記録媒体容量を読み出し、当該記録媒体容量から当該累積符号量を減じた残存容量を計算する残存容量計算部と、前記動画像の符号化が終了するまでの複数のタイミングにおいて符号化済みの累積の符号量に対応する動画像部分の記録時間長である符号化済記録時間長を取得する符号化済記録時間長取得部と、前記符号化済記録時間長が取得されたなら、前記動画像記録時間長記憶部から動画像記録時間長を読み出し、当該動画像記録時間長から当該符号化済記録時間長を減じた残存記録時間長を計算する残存記録時間長計算部と、前記残存容量と前記残存記録時間長が計算されたなら、当該残存容量を当該残存記録時間長で除したビットレートを計算するビットレート計算部と、前記ビットレートが計算されたなら、当該ビットレートに等しいビットレートを前記符号化装置に設定するビットレート設定部とを備えることを特徴とする。 In order to solve the above-described problem, the bit rate setting device according to the first aspect of the present invention is configured to encode a moving image so as to obtain a total code amount corresponding to a bit rate set from the outside. Until the encoding of the moving image is completed with respect to the variable bit rate encoding apparatus that encodes the encoding target portion at a bit rate larger or smaller than the bit rate according to the data amount of the encoding target portion. A bit rate setting device for setting a bit rate at a plurality of timings, and a recording medium capacity storage in which a recording medium capacity that is a maximum code amount that can be recorded on a recording medium on which an encoded moving image is recorded is stored in advance A moving image recording time length storage unit that stores in advance a moving image recording time length that is a recording time length of the moving image, and a plurality of times until the encoding of the moving image ends. A cumulative code amount calculation unit that calculates a cumulative code amount that is a cumulative code amount that has been encoded in encoding, and if the cumulative code amount is calculated, reads the recording medium capacity from the recording medium capacity storage unit, A remaining capacity calculation unit that calculates a remaining capacity obtained by subtracting the accumulated code amount from the medium capacity, and a moving image portion corresponding to the accumulated code amount that has been encoded at a plurality of timings until the encoding of the moving image ends. An encoded recording time length acquisition unit that acquires an encoded recording time length that is a recording time length of the video, and if the encoded recording time length is acquired, a moving image recording from the moving image recording time length storage unit A remaining recording time length calculation unit that reads a time length and calculates a remaining recording time length obtained by subtracting the encoded recording time length from the moving image recording time length, and the remaining capacity and the remaining recording time length are calculated. Na A bit rate calculation unit that calculates a bit rate obtained by dividing the remaining capacity by the remaining recording time length; and a bit rate that sets a bit rate equal to the bit rate in the encoding device if the bit rate is calculated And a setting unit.
第2の本発明に係るビットレート設定装置は、外部から設定されるビットレートに応じた総符号量が得られるように動画像を符号化すべく当該動画像の符号化対象部分のデータ量に応じて当該ビットレートより大きいまたは小さいビットレートで当該動画像を符号化する可変ビットレート方式の符号化装置に対し当該動画像の符号化が終了するまでの複数のタイミングでビットレートを設定するビットレート設定装置であって、符号化された動画像が記録される記録媒体に記録可能な最大符号量である記録媒体容量が予め記憶される記録媒体容量記憶部と、前記動画像の記録時間長である動画像記録時間長が予め記憶される動画像記録時間長記憶部と、前記動画像の符号化が終了するまでの複数のタイミングにおいて符号化済みの累積の符号量である累積符号量を計算する累積符号量計算部と、前記累積符号量が計算されたなら、前記記録媒体容量記憶部から記録媒体容量を読み出し、当該記録媒体容量から当該累積符号量を減じた残存容量を計算する残存容量計算部と、前記動画像の符号化が終了するまでの複数のタイミングにおいて符号化済みの累積の符号量に対応する動画像部分の記録時間長である符号化済記録時間長を取得する符号化済記録時間長取得部と、前記符号化済記録時間長が取得されたなら、前記動画像記録時間長記憶部から動画像記録時間長を読み出し、当該動画像記録時間長から当該符号化済記録時間長を減じた残存記録時間長を計算する残存記録時間長計算部と、前記残存容量と前記残存記録時間長が計算されたなら、当該残存容量を当該残存記録時間長で除したビットレートを計算するビットレート計算部と、1回目に計算されたビットレートである初期ビットレートが記憶される初期ビットレート記憶部と、2回目以降の最も新しく計算されたビットレートである最新ビットレートが記憶される最新ビットレート記憶部と、前記最新ビットレートが計算されたなら、前記初期ビットレート記憶部から初期ビットレートを読み出し、当該最新ビットレートが、当該初期ビットレートより小さいか否かを判定するビットレート判定部と、前記符号化装置に対しビットレートを設定する各タイミングにおいて予め定めた時間長を遡った期間のみの符号化済みの符号量である最新累積符号量を計算する最新累積符号量計算部と、前記最新ビットレートが計算されたなら、当該最新ビットレートと前記予め定めた時間長と予め定めた係数とを互いに乗じた最新累積符号量閾値を計算する最新累積符号量閾値計算部と、前記最新累積符号量、前記最新累積符号量閾値が計算されたなら、当該最新累積符号量が当該最新累積符号量閾値より小さいか否かを判定する最新累積符号量判定部と、前記ビットレート判定部による判定結果が肯定的であり、且つ、前記最新累積符号量判定部による判定結果が肯定的であるなら、前記初期ビットレート記憶部から初期ビットレートを読み出し、当該初期ビットレートに等しいビットレートを前記符号化装置に設定する一方、前記ビットレート判定部による判定結果、または、前記最新累積符号量判定部による判定結果が否定的であるなら、前記最新ビットレート記憶部から最新ビットレートを読み出し、当該最新ビットレートに等しいビットレートを前記符号化装置に設定するビットレート設定部とを備えることを特徴とする。 The bit rate setting device according to the second aspect of the present invention is based on the data amount of the encoding target portion of the moving image so as to encode the moving image so as to obtain a total code amount corresponding to the bit rate set from the outside. A bit rate that sets a bit rate at a plurality of timings until the encoding of the moving image is completed with respect to a variable bit rate encoding apparatus that encodes the moving image at a bit rate larger or smaller than the bit rate. A setting device, a recording medium capacity storage unit in which a recording medium capacity, which is a maximum code amount that can be recorded on a recording medium on which an encoded moving image is recorded, and a recording time length of the moving image; A moving image recording time length storage unit in which a certain moving image recording time length is stored in advance, and a cumulative code that has been encoded at a plurality of timings until the encoding of the moving image is completed A cumulative code amount calculation unit that calculates the cumulative code amount, and if the cumulative code amount is calculated, the recording medium capacity is read from the recording medium capacity storage unit, and the cumulative code amount is subtracted from the recording medium capacity A remaining capacity calculation unit for calculating a remaining capacity, and an encoded recording that is a recording time length of a moving image portion corresponding to a cumulative code amount that has been encoded at a plurality of timings until the encoding of the moving image is completed; When the encoded recording time length acquisition unit acquires the time length, and the encoded recording time length is acquired, the moving image recording time length is read from the moving image recording time length storage unit, and the moving image recording time A remaining recording time length calculation unit for calculating a remaining recording time length obtained by subtracting the encoded recording time length from a length, and if the remaining capacity and the remaining recording time length are calculated, the remaining capacity is determined as the remaining recording time. Long A bit rate calculation unit for calculating the divided bit rate, an initial bit rate storage unit for storing an initial bit rate which is a bit rate calculated for the first time, and a newly calculated bit rate for the second and subsequent times. The latest bit rate storage unit for storing the latest bit rate, and if the latest bit rate is calculated, the initial bit rate is read from the initial bit rate storage unit, and whether the latest bit rate is smaller than the initial bit rate. A bit rate determination unit that determines whether or not, and the latest cumulative code amount that is an encoded code amount only for a period that goes back a predetermined time length at each timing for setting the bit rate for the encoding device If the latest accumulated code amount calculation unit and the latest bit rate are calculated, the latest bit rate and the predicted bit rate are calculated. If the latest cumulative code amount threshold value calculation unit that calculates the latest cumulative code amount threshold value obtained by multiplying the predetermined time length and a predetermined coefficient with each other, and the latest cumulative code amount threshold value and the latest cumulative code amount threshold value are calculated, The latest cumulative code amount determination unit that determines whether or not the latest cumulative code amount is smaller than the latest cumulative code amount threshold; the determination result by the bit rate determination unit is affirmative; and the latest cumulative code amount determination If the determination result by the unit is affirmative, the initial bit rate is read from the initial bit rate storage unit, and a bit rate equal to the initial bit rate is set in the encoding device, while the determination result by the bit rate determination unit Or, if the determination result by the latest cumulative code amount determination unit is negative, the latest bit rate is read from the latest bit rate storage unit, Characterized in that it comprises a bit rate setting unit for setting a bit rate equal to the new bit rate to the encoding device.
本発明に係るビットレート設定装置によれば、可変ビットレート方式の符号化装置に対し動画像の全ての符号を記録媒体に記録できるようなビットレートを設定することができる。 According to the bit rate setting device of the present invention, it is possible to set a bit rate at which all the codes of a moving image can be recorded on a recording medium for a variable bit rate encoding device.
以下、本発明の実施の形態を図面を参照して説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[第1の実施の形態]
図1は、第1の実施の形態に係るビットレート設定装置の構成と利用形態を示す図である。
[First Embodiment]
FIG. 1 is a diagram illustrating the configuration and usage of the bit rate setting device according to the first embodiment.
ビットレート設定装置1は、符号化装置2に対し、ビットレートBRを設定する装置である。
The bit rate setting device 1 is a device that sets the bit rate BR for the
符号化装置2は、ビットレート設定装置1から設定されるビットレートBRに応じた総符号量が得られるように動画像Vを符号化すべく動画像Vの符号化対象部分のデータ量に応じてビットレートBRより大きいまたは小さいビットレートで符号化対象部分を符号化する可変ビットレート方式の符号化装置である。
The
符号化装置2は、例えば、動画像記憶装置3から送信される動画像Vを可変ビットレート方式で符号化し、符号を符号蓄積装置4に送信し、蓄積する。
For example, the
符号化装置2は、動画像Vを符号化する符号化部21と、符号化部21から符号化対象部分のデータ量を取得し、データ量が大の場合は、例えば、激しい動きが連続する符号化対象部分の場合は、ビットレートBRより大きいビットレートを計算し、一方、データ量が小の場合は、例えば、静止画である符号化対象部分の場合は、ビットレートBRより小さいビットレートを計算し、そのビットレートを符号化部21に与えるビットレート計算部22を有し、符号化部21は、ビットレート計算部22から与えられるビットレートで符号化対象部分を符号化する。
The
これにより、符号化装置2は、ビットレート設定装置1から設定されるビットレートBRに応じた総符号量が得られるように動画像Vを符号化できるようになっている。
Thereby, the
ビットレート設定装置1は、このような符号化装置2に対し動画像Vの符号化が終了するまでの複数のタイミングで、例えば、10秒ごとに、ビットレートBRを設定する装置である。
The bit rate setting device 1 is a device that sets the bit rate BR, for example, every 10 seconds at a plurality of timings until the encoding of the moving image V is completed with respect to such an
ビットレート設定装置1は、符号化された動画像が記録される記録媒体(DVDディスクなど)に記録可能な最大符号量である記録媒体容量C(例えば、4.7ギガバイト)が予め記憶される記録媒体容量記憶部11と、動画像Vの記録時間長(再生時間長ともいう)である動画像記録時間長M(例えば、動画像Vが映画の場合の2時間といった時間長)が予め記憶される動画像記録時間長記憶部12と、各タイミングにタイミング信号tを出力するタイマー13と、例えば、符号を監視して累積の符号量を継続的に計算しておき、タイミング信号tを受信したタイミングで、最新の計算値である累積符号量Dを出力する累積符号量計算部14と、累積符号量Dが出力されたなら、記録媒体容量記憶部11から記録媒体容量Cを読み出し、記録媒体容量Cから累積符号量Dを減じた残存容量(C−D)を計算する残存容量計算部15と、タイミング信号tを受信したタイミングで、例えば、符号化装置2から、符号化済みの累積の符号量に対応する動画像部分の記録時間長である符号化済記録時間長Nを取得する符号化済記録時間長取得部16と、符号化済記録時間長Nが取得されたなら、動画像記録時間長記憶部12から動画像記録時間長Mを読み出し、動画像記録時間長Mから符号化済記録時間長Nを減じた残存記録時間長(M−N)を計算する残存記録時間長計算部17と、残存容量(C−D)と残存記録時間長(M−N)が計算されたなら、残存容量(C−D)を残存記録時間長(M−N)で除したビットレートK(=(C−D)÷(M−N))を計算するビットレート計算部18と、ビットレートKが計算されたなら、ビットレートKに等しいビットレートBRを符号化装置2のビットレート計算部22に設定するビットレート設定部19と、図示しない入力部とを備える。
The bit rate setting device 1 stores in advance a recording medium capacity C (for example, 4.7 gigabytes) that is the maximum code amount that can be recorded on a recording medium (DVD disc or the like) on which an encoded moving image is recorded. A recording medium
(第1の実施の形態の動作)
第1の実施の形態では、入力部から記録媒体容量C及び動画像記録時間長Mが入力され、記録媒体容量Cは、記録媒体容量記憶部11に、動画像記録時間長Mは動画像記録時間長記憶部12に記憶される。
(Operation of the first embodiment)
In the first embodiment, the recording medium capacity C and the moving image recording time length M are input from the input unit, the recording medium capacity C is input to the recording medium
タイマー13は、例えば、符号化装置2へ動画像Vが送信開始される以前のタイミングを含め、10秒ごとの各タイミングにタイミング信号tを出力する。
For example, the
累積符号量計算部14は、まず、1回目のタイミング信号tを受信したタイミングで、累積符号量Dであるゼロを出力する。
The accumulated code
残存容量計算部15は、累積符号量Dであるゼロが出力されたなら、記録媒体容量記憶部11から記録媒体容量Cである、例えば、4.7ギガバイトを読み出し、記録媒体容量Cからゼロを減じ、残存容量(C−D)である4.7ギガバイトを得る。
The remaining
符号化済記録時間長取得部16は、まず、1回目のタイミング信号tを受信したタイミングで、例えば、符号化装置2から、符号化済記録時間長Nであるゼロを取得する。
The encoded recording time
残存記録時間長計算部17は、符号化済記録時間長Nが取得されたなら、動画像記録時間長記憶部12から動画像記録時間長Mである、例えば2時間を読み出し、動画像記録時間長Mから符号化済記録時間長N(ゼロ)を減じ、残存記録時間長(M−N)である、例えば2時間を得る。
If the encoded recording time length N is acquired, the remaining recording time
ビットレート計算部18は、例えば、残存容量(C−D)である4.7ギガバイトと残存記録時間長(M−N)である2時間が計算されたなら、残存容量(C−D)を残存記録時間長(M−N)で除し、ビットレートK(=(C−D)÷(M−N))つまり初期ビットレートK0を得る。
For example, if the remaining capacity (C−D) of 4.7 gigabytes and the remaining recording time length (M−N) of 2 hours are calculated, the bit
ビットレート設定部19は、初期ビットレートK0が計算されたなら、初期ビットレートK0に等しいビットレートBRを符号化装置2のビットレート計算部22に設定する。
When the initial bit rate K0 is calculated, the bit
ビットレート計算部22は、符号化部21から符号化対象部分のデータ量を取得し、データ量が大の場合は、例えば、激しい動きが連続する符号化対象部分の場合は、初期ビットレートK0より大きいビットレートを計算し、一方、データ量が小の場合は、例えば、静止画である符号化対象部分の場合は、初期ビットレートK0より小さいビットレートを計算し、そのビットレートを符号化部21に与える。
The bit
符号化部21は、ビットレート計算部22から与えられるビットレートで符号化対象部分を符号化し、符号を符号蓄積装置4に送信し、蓄積する。
The
次に、ビットレート計算部22は、符号化部21から次の符号化対象部分のデータ量を取得し、同様にビットレートを計算し、そのビットレートを符号化部21に与える。
Next, the bit
符号化部21は、ビットレート計算部22から与えられるビットレートで符号化対象部分を符号化し、符号を符号蓄積装置4に送信し、蓄積する。
The
同様な処理が続く間、累積符号量計算部14は、符号を監視し、累積符号量Dを継続的に計算し記憶しておく。
While the same processing continues, the accumulated code
タイマー13は、例えば、1回目のタイミングの10秒後に、2回目のタイミング信号tを出力する。
For example, the
累積符号量計算部14は、2回目のタイミング信号tを受信したタイミングで、累積符号量Dを出力する。累積符号量Dは、勿論、前回の累積符号量Dよりも多い。
The accumulated code
残存容量計算部15は、2回目の累積符号量Dが出力されたなら、記録媒体容量記憶部11から記録媒体容量Cを読み出し、記録媒体容量Cから2回目の累積符号量Dを減じ、残存容量(C−D)を得る。
When the second cumulative code amount D is output, the remaining
符号化済記録時間長取得部16は、2回目のタイミング信号tを受信したタイミングで、例えば、符号化装置2から、符号化済記録時間長Nを取得する。符号化済記録時間長Nは、勿論、前回の符号化済記録時間長Nよりも長い。
The encoded recording time
残存記録時間長計算部17は、符号化済記録時間長Nが取得されたなら、動画像記録時間長記憶部12から動画像記録時間長Mを読み出し、動画像記録時間長Mから符号化済記録時間長Nを減じ、残存記録時間長(M−N)を得る。
When the encoded recording time length N is acquired, the remaining recording time
ビットレート計算部18は、残存容量(C−D)と残存記録時間長(M−N)が計算されたなら、残存容量(C−D)を残存記録時間長(M−N)で除し、ビットレートKつまり2回目のビットレートKを得る。
When the remaining capacity (CD) and the remaining recording time length (MN) are calculated, the bit
ビットレート設定部19は、2回目のビットレートKが計算されたなら、ビットレートKに等しいビットレートBRを符号化装置2のビットレート計算部22に設定する。
When the second bit rate K is calculated, the bit
ビットレート計算部22は、符号化部21から符号化対象部分のデータ量を取得し、データ量が大の場合は、例えば、激しい動きが連続する符号化対象部分の場合は、2回目のビットレートKより大きいビットレートを計算し、一方、データ量が小の場合は、例えば、静止画である符号化対象部分の場合は、2回目のビットレートKより小さいビットレートを計算し、そのビットレートを符号化部21に与える。
The bit
符号化部21は、ビットレート計算部22から与えられるビットレートで符号化対象部分を符号化し、符号を符号蓄積装置4に送信し、蓄積する。
The
次に、ビットレート計算部22は、符号化部21から次の符号化対象部分のデータ量を取得し、同様にビットレートを計算し、そのビットレートを符号化部21に与える。
Next, the bit
符号化部21は、ビットレート計算部22から与えられるビットレートで符号化対象部分を符号化し、符号を符号蓄積装置4に送信し、蓄積する。
The
同様な処理が続く間、累積符号量計算部14は、符号を監視し、累積符号量Dを継続的に計算し記憶しておく。
While the same processing continues, the accumulated code
これ以降は、2回目のタイミング信号tが出力されたときと同様の処理がなされ、符号蓄積装置4に符号が蓄積されていく。 Thereafter, the same processing as when the second timing signal t is output is performed, and the code is stored in the code storage device 4.
図2は、第1の実施の形態における累積符号量Dが理想的には記録媒体容量Cに等しくなる仕組みを説明するための図である。横軸は動画像Vの記録時間上での時刻の推移を示し、縦軸は符号量を示す。 FIG. 2 is a diagram for explaining a mechanism in which the accumulated code amount D is ideally equal to the recording medium capacity C in the first embodiment. The horizontal axis indicates the transition of time on the recording time of the moving image V, and the vertical axis indicates the code amount.
1回目のタイミングT0において、符号化装置2には、初期ビットレートK0に等しいビットレートBRが設定される。
At the first timing T0, the
仮に、動画像Vの各符号化対象部分のデータ量が一定であり、そのビットレートBRに等しいビットレートが符号化部21に常に与えられるならば、その場合の目標符号量P0つまり符号化部21に与えられるビットレートについてのタイミングT0から任意のタイミングまでの期間における定積分は、ビットレートBRに等しい一定の傾きで増加し、最終的に記録媒体容量Cに等しくなる。この場合、目標符号量P0は、常に累積符号量Dに等しく、全ての符号は、例えば、記録媒体(DVDディスクなど)に記録できるのである。
If the data amount of each encoding target portion of the moving image V is constant and a bit rate equal to the bit rate BR is always given to the
第1の実施の形態では、動画像Vの各符号化対象部分のデータ量が一定でなくても、全ての符号を記録媒体(DVDディスクなど)に記録できる。その仕組みは以下の通りである。 In the first embodiment, all codes can be recorded on a recording medium (DVD disc or the like) even if the data amount of each encoding target portion of the moving image V is not constant. The mechanism is as follows.
タイミングT0から、2回目のビットレートBRが設定されるタイミングT1までの期間において、例えば、動画像Vの符号化対象部分のデータ量が増加すると、累積符号量Dが目標符号量P0より大きくなる。 During the period from timing T0 to timing T1 when the second bit rate BR is set, for example, when the data amount of the encoding target portion of the moving image V increases, the cumulative code amount D becomes larger than the target code amount P0. .
これにより、タイミングT1では、残存容量(C−D)がより大きく減少することとなるので、ビットレートBRが低減される。以降、動画像Vの各符号化対象部分のデータ量が一定なら、その場合の目標符号量P1つまり符号化部21に与えられるビットレートについてのタイミングT1から任意のタイミングまで期間における定積分は、当該ビットレートBRに等しい一定の傾きで増加し、最終的に記録媒体容量Cに等しくなる。
As a result, at the timing T1, the remaining capacity (C-D) is greatly reduced, so that the bit rate BR is reduced. Thereafter, if the data amount of each encoding target portion of the moving image V is constant, the definite integral in the period from the timing T1 regarding the target code amount P1 in that case, that is, the bit rate given to the
低減後のビットレートBRは、目標符号量P1の傾きに等しく、目標符号量P0の傾きよりも小さい。 The bit rate BR after the reduction is equal to the gradient of the target code amount P1, and is smaller than the gradient of the target code amount P0.
逆に、タイミングT1から、3回目のビットレートBRが設定されるタイミングT2までの期間において、例えば、動画像Vの符号化対象部分のデータ量が減少すると、累積符号量Dが目標符号量P1より小さくなり、さらに、目標符号量P0より小さくなることがある。 On the contrary, during the period from the timing T1 to the timing T2 when the third bit rate BR is set, for example, when the data amount of the encoding target portion of the moving image V decreases, the cumulative code amount D becomes the target code amount P1. It may become smaller and may be smaller than the target code amount P0.
これにより、タイミングT2では、残存容量(C−D)の減りが少なくなるので、ビットレートBRは増加する。以降、動画像Vの各符号化対象部分のデータ量が一定なら、その場合の目標符号量P2つまり符号化部21に与えられるビットレートについてのタイミングT2から任意のタイミングまで定積分は、当該ビットレートBRに等しい一定の傾きで増加し、最終的に記録媒体容量Cに等しくなる。
Thereby, at the timing T2, the decrease in the remaining capacity (C-D) is reduced, so that the bit rate BR is increased. Thereafter, if the data amount of each encoding target portion of the moving image V is constant, the definite integration from the timing T2 regarding the target code amount P2 in that case, that is, the bit rate given to the
増加後のビットレートBRは、目標符号量P2の傾きに等しく、目標符号量P1の傾きよりも大きい。 The increased bit rate BR is equal to the gradient of the target code amount P2, and is larger than the gradient of the target code amount P1.
これにより、タイミングT2以降においては、累積符号量Dが目標符号量P2に近づき、理想的には、記録媒体容量Cに等しくなるのである。つまり、全ての符号は、理想的には、記録媒体(DVDディスクなど)に記録できるのである。 As a result, after timing T2, the accumulated code amount D approaches the target code amount P2, and ideally becomes equal to the recording medium capacity C. That is, all the codes can be ideally recorded on a recording medium (DVD disc or the like).
図3は、第1の実施の形態における実際の累積符号量Dの変化の様子を示す図である。横軸は動画像Vの記録時間上で時刻の推移を示し、縦軸は符号量を示す。比較例として、従来における総符号量D2と目標符号量P0の変化の様子を示す。 FIG. 3 is a diagram illustrating how the actual accumulated code amount D changes in the first embodiment. The horizontal axis shows the transition of time on the recording time of the moving image V, and the vertical axis shows the code amount. As a comparative example, changes in the total code amount D2 and the target code amount P0 in the past are shown.
例えば、動画像Vの符号化対象部分のデータ量が増加すると、総符号量D2は、目標符号量P0より大きくなり、最終的に、4.7ギガバイトを超えてしまう可能性がある。 For example, when the data amount of the encoding target portion of the moving image V increases, the total code amount D2 becomes larger than the target code amount P0 and may eventually exceed 4.7 gigabytes.
しかし、第1の実施の形態では、動画像Vの符号化対象部分のデータ量が増加し、累積符号量Dが、目標符号量P0より大きくなると、残存容量(C−D)がより大きく減少し、ビットレートBRが低減される。その結果、累積符号量Dは目標符号量P0に近づき、最終的に、記録媒体容量C以下、かつ、少ない誤差に収めることができる。 However, in the first embodiment, when the data amount of the encoding target portion of the moving image V increases and the accumulated code amount D becomes larger than the target code amount P0, the remaining capacity (C−D) decreases more greatly. In addition, the bit rate BR is reduced. As a result, the accumulated code amount D approaches the target code amount P0, and can finally be within the recording medium capacity C and within a small error.
したがって、第1の実施の形態に係るビットレート設定装置1は、外部から設定されるビットレートBRに応じた総符号量が得られるように動画像Vを符号化すべく当該動画像の符号化対象部分のデータ量に応じて当該ビットレートより大きいまたは小さいビットレートで当該符号化対象部分を符号化する可変ビットレート方式の符号化装置2に対し当該動画像の符号化が終了するまでの複数のタイミングでビットレートBRを設定するビットレート設定装置であって、符号化された動画像が記録される記録媒体に記録可能な最大符号量である記録媒体容量Cが予め記憶される記録媒体容量記憶部11と、動画像の記録時間長である動画像記録時間長Mが予め記憶される動画像記録時間長記憶部12と、動画像の符号化が終了するまでの複数のタイミングにおいて符号化済みの累積の符号量である累積符号量Dを計算する累積符号量計算部14と、累積符号量が計算されたなら、記録媒体容量記憶部から記録媒体容量を読み出し、当該記録媒体容量から当該累積符号量を減じた残存容量(C−D)を計算する残存容量計算部15と、動画像の符号化が終了するまでの複数のタイミングにおいて符号化済みの累積の符号量に対応する動画像部分の記録時間長である符号化済記録時間長Nを取得する符号化済記録時間長取得部16と、符号化済記録時間長が取得されたなら、動画像記録時間長記憶部から動画像記録時間長を読み出し、当該動画像記録時間長から当該符号化済記録時間長を減じた残存記録時間長(M−N)を計算する残存記録時間長計算部17と、残存容量と残存記録時間長が計算されたなら、当該残存容量を当該残存記録時間長で除したビットレートK,K0を計算するビットレート計算部18と、ビットレートが計算されたなら、当該ビットレートに等しいビットレートBRを符号化装置に設定するビットレート設定部19とを備えるので、可変ビットレート方式の符号化装置に対し動画像の全ての符号を記録媒体に記録できるようなビットレートを設定することができる。
Therefore, the bit rate setting apparatus 1 according to the first embodiment encodes the moving image in order to encode the moving image V so that the total code amount corresponding to the bit rate BR set from outside is obtained. Depending on the data amount of the portion, the variable bit rate
[第2の実施の形態]
図4は、第2の実施の形態に係るビットレート設定装置の構成と利用形態を示す図である。
[Second Embodiment]
FIG. 4 is a diagram illustrating the configuration and usage of the bit rate setting device according to the second embodiment.
第2の実施の形態では、第1の実施の形態で説明済みの装置やその構成要素には、同一符号を付与し、重複説明を適宜省略する。 In the second embodiment, the same reference numerals are given to the devices already described in the first embodiment and the components thereof, and repeated description will be omitted as appropriate.
ビットレート設定装置1Aは、符号化装置2に対し動画像Vの符号化が終了するまでの複数のタイミングで、例えば、符号化装置2へ動画像Vが送信開始される以前のタイミングとその10秒後のタイミングを含め、以降、0.5秒ごとに、ビットレートBRを設定する装置である。
The bit rate setting device 1A has a plurality of timings until the encoding of the moving image V with respect to the
ビットレート設定装置1Aは、記録媒体容量記憶部11と、動画像記録時間長記憶部12と、タイマー13と、累積符号量計算部14と、残存容量計算部15と、符号化済記録時間長取得部16と、残存記録時間長計算部17と、ビットレート計算部18と、例えば、2回目のビットレートKが計算されたタイミングの0.5秒後を含め、0.5秒ごとにタイミング信号t1を出力するタイマー100と、初期ビットレートK0が記憶される初期ビットレート記憶部101と、2回目の以降のタイミング信号tの出力により計算された最も新しいビットレートKである最新ビットレートKiが記憶される最新ビットレート記憶部102と、最新ビットレートKiが計算されたなら、初期ビットレート記憶部101から初期ビットレートK0を読み出し、最新ビットレートKiが、初期ビットレートK0より小さいか否かを判定するビットレート判定部103と、例えば、符号を監視して、予め定めた時間長L(例えば、0.5秒間)を遡った期間のみの符号化済みの符号量である最新累積符号量Hを継続的に計算し、タイミング信号t1が出力されたなら、そのときの最新累積符号量Hを出力する最新累積符号量計算部104と、最新ビットレートKiが計算されたなら、最新ビットレートKiと時間長Lと予め定めた係数α(例えば、0.5)とを互いに乗じた最新累積符号量閾値Gを計算する最新累積符号量閾値計算部105と、時間長Lと係数αが予め記憶されるパラメータ記憶部106と、最新累積符号量Hが出力され、最新累積符号量閾値Gが計算されたなら、最新累積符号量Hが最新累積符号量閾値Gより小さいか否かを判定する最新累積符号量判定部107と、ビットレート判定部103による判定結果が肯定的であり、且つ、最新累積符号量判定部107による判定結果が肯定的であるなら、初期ビットレート記憶部101から初期ビットレートK0を読み出し、初期ビットレートK0に等しいビットレートBRを符号化装置2のビットレート計算部22に設定する一方、ビットレート判定部103による判定結果、または、最新累積符号量判定部107による判定結果が否定的であるなら、最新ビットレート記憶部102から最新ビットレートKiを読み出し、最新ビットレートKiに等しいビットレートBRを符号化装置2のビットレート計算部22に設定するビットレート設定部108と、図示しない入力部とを備える。
The bit rate setting device 1A includes a recording medium
(第2の実施の形態の動作)
第2の実施の形態では、入力部から記録媒体容量C、動画像記録時間長M、時間長L、係数αが入力され、記録媒体容量Cは記録媒体容量記憶部11に、動画像記録時間長Mは動画像記録時間長記憶部12に、時間長L、係数αは、パラメータ記憶部106に記憶される。
(Operation of Second Embodiment)
In the second embodiment, a recording medium capacity C, a moving image recording time length M, a time length L, and a coefficient α are input from the input unit, and the recording medium capacity C is stored in the recording medium
第2の実施の形態では、2回目のビットレートKが計算されるまでの動作は、ビットレート計算部18が初期ビットレートK0を初期ビットレート記憶部101に記憶させ、ビットレート設定部108が、その初期ビットレートK0を直ちに読み出し、ビットレート計算部22に設定することを除いては、第1の実施の形態と同様なので、説明を省略する。
In the second embodiment, until the second bit rate K is calculated, the bit
第2の実施の形態では、タイマー100が、2回目のビットレートK(この時点での最新ビットレートKi)が計算されたなら、タイミング信号t1を出力し、以降、0.5秒ごとにタイミング信号t1を出力する。
In the second embodiment, the
ビットレート計算部18は、2回目のビットレートK(この時点での最新ビットレートKi)が計算されたなら、最新ビットレートKiを最新ビットレート記憶部102に記憶させる。
When the second bit rate K (the latest bit rate Ki at this time) is calculated, the bit
ビットレート判定部103は、最新ビットレートKiが計算されたなら、初期ビットレート記憶部101から初期ビットレートK0を読み出し、最新ビットレートKiが初期ビットレートK0より小さいか否かを判定する。ビットレート判定部103は、最新ビットレートKiが初期ビットレートK0より小さいなら、ビットレート設定部108に肯定的な判定結果を与え、一方、最新ビットレートKiが初期ビットレートK0以上なら、ビットレート設定部108に否定的な判定結果を与える。
When the latest bit rate Ki is calculated, the bit
最新累積符号量計算部104は、タイミング信号t1が出力されたなら、そのときの最新累積符号量Hを出力する。
When the timing signal t1 is output, the latest accumulated code
最新累積符号量閾値計算部105は、最新ビットレートKiが計算されたなら、パラメータ記憶部106から時間長Lと係数αを読み出し、最新ビットレートKiと時間長Lと係数αとを互いに乗じ、最新累積符号量閾値Gを得て、出力する。
When the latest bit rate Ki is calculated, the latest accumulated code amount
最新累積符号量判定部107は、最新累積符号量H、最新累積符号量閾値Gが出力されたなら、最新累積符号量Hが最新累積符号量閾値Gより小さいか否かを判定する。最新累積符号量判定部107は、最新累積符号量Hが最新累積符号量閾値Gより小さいなら、ビットレート設定部108に肯定的な判定結果を与え、一方、最新累積符号量Hが最新累積符号量閾値G以上なら、ビットレート設定部108に否定的な判定結果を与える。
When the latest cumulative code amount H and the latest cumulative code amount threshold G are output, the latest cumulative code
例えば、最新累積符号量Hは、この最新累積符号量Hに対応する動画像Vの部分が静止画である場合には小さい値となる。すなわち、最新累積符号量判定部107は、最新累積符号量Hに対応する動画像Vの部分が静止画であるか否かを判定しているともいえる。
For example, the latest accumulated code amount H is a small value when the portion of the moving image V corresponding to the latest accumulated code amount H is a still image. That is, it can be said that the latest accumulated code
ビットレート設定部108は、ビットレート判定部103による判定結果が肯定的であり、且つ、最新累積符号量判定部107による判定結果が肯定的であるなら、初期ビットレート記憶部101から初期ビットレートK0を読み出し、初期ビットレートK0に等しいビットレートBRを符号化装置2のビットレート計算部22に設定する。
If the determination result by the bit
ビットレート設定部108は、一方、ビットレート判定部103による判定結果、または、最新累積符号量判定部107による判定結果が否定的であるなら、最新ビットレート記憶部102から最新ビットレートKiを読み出し、最新ビットレートKiに等しいビットレートBRを符号化装置2のビットレート計算部22に設定する。
On the other hand, if the determination result by the bit
図5は、第2の実施の形態における累積符号量Dが理想的には記録媒体容量Cに等しくなる仕組みを説明するための図である。横軸は動画像Vの記録時間上で時刻の推移を示し、縦軸は符号量を示す。 FIG. 5 is a diagram for explaining a mechanism in which the accumulated code amount D is ideally equal to the recording medium capacity C in the second embodiment. The horizontal axis shows the transition of time on the recording time of the moving image V, and the vertical axis shows the code amount.
第1の実施の形態と同様に、動画像Vの各符号化対象部分のデータ量が一定であり、初期ビットレートK0に等しいビットレートが符号化部21に常に与えられたならば、目標符号量P0は、初期ビットレートK0(=ビットレートBR)に等しい一定の傾きで増加し、最終的に記録媒体容量Cに等しくなる。この場合、目標符号量P0は、常に累積符号量に等しく、全ての符号は、例えば、記録媒体(DVDディスクなど)に記録できる。
As in the first embodiment, if the data amount of each encoding target portion of the moving image V is constant and a bit rate equal to the initial bit rate K0 is always given to the
また、第1の実施の形態と同様に、タイミングT0からタイミングT1までの間において、例えば、動画像Vの符号化対象部分のデータ量が増加すると、累積符号量Dが目標符号量P0より大きくなる。 Similarly to the first embodiment, for example, when the data amount of the encoding target portion of the moving image V increases between timing T0 and timing T1, the cumulative code amount D becomes larger than the target code amount P0. Become.
これにより、第1の実施の形態と同様に、タイミングT1では、残存容量(C−D)がより大きく減少することとなるので、ビットレートBRが低減される。第1の実施の形態と同様に、以降、動画像Vの各符号化対象部分のデータ量が一定なら、目標符号量P1は、当該ビットレートBRに等しい一定の傾きで増加し、最終的に記録媒体容量Cに等しくなる。 As a result, as in the first embodiment, the remaining capacity (C−D) is greatly reduced at the timing T1, so that the bit rate BR is reduced. Similarly to the first embodiment, if the data amount of each encoding target portion of the moving image V is constant thereafter, the target code amount P1 increases with a constant slope equal to the bit rate BR, and finally It becomes equal to the recording medium capacity C.
第1の実施の形態と同様に、低減後のビットレートBRは、目標符号量P1の傾きに等しく、目標符号量P0の傾きよりも小さい。つまり、低減後のビットレートBRは、初期ビットレートK0よりも低い。 Similar to the first embodiment, the reduced bit rate BR is equal to the gradient of the target code amount P1 and smaller than the gradient of the target code amount P0. That is, the reduced bit rate BR is lower than the initial bit rate K0.
ここで、ビットレート設定部108が、この低減後のビットレートBRを、つまり、常に最新ビットレートKiをビットレート計算部22に設定すると仮定すると、累積符号量Dは、参照符号量D1で示すように変化し、タイミングT1、T2間で参照符号量D1の傾きが小さくなり、ビットレートが低くなることがある。この場合、全ての符号を記録媒体に記録できるのだが、符号を再生したときには、タイミングT1、T2間で画質が低くなってしまう。
Here, assuming that the bit
しかし、ビットレート設定部108は、最新累積符号量Hが最新累積符号量閾値Gより小さい場合には、最新ビットレートKiでなく、それより大きい初期ビットレートK0に等しいビットレートBRを符号化装置2のビットレート計算部22に設定する。
However, when the latest accumulated code amount H is smaller than the latest accumulated code amount threshold G, the bit
つまり、ビットレート設定部108は、最新ビットレートKiが初期ビットレートK0よりも小さい、かつ、最も新しく符号化された部分が静止画なら、例えば、それ以降の映画のシーンにおいても最新ビットレートKiが初期ビットレートK0よりも小さい、かつ、静止画が続くような場合、より大きいビットレートBRを符号化装置2に設定する。
In other words, if the latest bit rate Ki is smaller than the initial bit rate K0 and the most recently encoded portion is a still image, the bit
例えば、タイミングT1から、タイミングT2より前のタイミングT1’までの期間で最新ビットレートKiが初期ビットレートK0よりも小さい、かつ、最新累積符号量Hが最新累積符号量閾値Gより小さいと判定されたなら、ビットレート計算部22には、初期ビットレートK0に等しいビットレートBRつまり少なくとも最新ビットレートKi以上のビットレートBRが設定され、累積符号量Dは、参照符号量D1よりも多くなる。よって、この期間の画質が向上する。
For example, it is determined that the latest bit rate Ki is smaller than the initial bit rate K0 and the latest accumulated code amount H is smaller than the latest accumulated code amount threshold G in the period from the timing T1 to the timing T1 ′ before the timing T2. Then, a bit rate BR equal to the initial bit rate K0, that is, a bit rate BR that is at least equal to or higher than the latest bit rate Ki is set in the bit
仮に、タイミングT1’以降、最新ビットレートKiが初期ビットレートK0よりも小さい、かつ、最新累積符号量Hが最新累積符号量閾値G以上と判定された場合であっても、タイミングT1、T1’間で累積符号量Dを多くしたことで、符号を再生した場合の画質を向上させることができる。さらに、タイミングT1、T1’間で累積符号量Dを多くしたにも関わらず、全ての符号を記録媒体に記録することができる。すなわち、全ての符号の記録媒体への記録と、画質向上の両方を満たすことができる。 Even if it is determined that the latest bit rate Ki is lower than the initial bit rate K0 and the latest accumulated code amount H is equal to or greater than the latest accumulated code amount threshold G after the timing T1 ′, the timings T1 and T1 ′. By increasing the cumulative code amount D between the two, the image quality when the code is reproduced can be improved. In addition, all codes can be recorded on the recording medium in spite of increasing the accumulated code amount D between the timings T1 and T1 '. That is, it is possible to satisfy both the recording of all codes on the recording medium and the improvement of the image quality.
したがって、第2の実施の形態に係るビットレート設定装置1Aは、外部から設定されるビットレートBRに応じた総符号量が得られるように動画像を符号化すべく当該動画像の符号化対象部分のデータ量に応じて当該ビットレートより大きいまたは小さいビットレートで当該動画像を符号化する可変ビットレート方式の符号化装置2に対し当該動画像の符号化が終了するまでの複数のタイミングでビットレートBRを設定するビットレート設定装置であって、符号化された動画像が記録される記録媒体に記録可能な最大符号量である記録媒体容量Cが予め記憶される記録媒体容量記憶部11と、動画像の記録時間長である動画像記録時間長Mが予め記憶される動画像記録時間長記憶部12と、動画像の符号化が終了するまでの複数のタイミングにおいて符号化済みの累積の符号量である累積符号量Dを計算する累積符号量計算部14と、累積符号量が計算されたなら、記録媒体容量記憶部から記録媒体容量を読み出し、当該記録媒体容量から当該累積符号量を減じた残存容量(C−D)を計算する残存容量計算部15と、動画像の符号化が終了するまでの複数のタイミングにおいて符号化済みの累積の符号量に対応する動画像部分の記録時間長である符号化済記録時間長Nを取得する符号化済記録時間長取得部16と、符号化済記録時間長が取得されたなら、動画像記録時間長記憶部から動画像記録時間長を読み出し、当該動画像記録時間長から当該符号化済記録時間長を減じた残存記録時間長(M−N)を計算する残存記録時間長計算部17と、残存容量と残存記録時間長が計算されたなら、当該残存容量を当該残存記録時間長で除したビットレートK,K0、Kiを計算するビットレート計算部18と、1回目に計算されたビットレートである初期ビットレートK0が記憶される初期ビットレート記憶部101と、2回目以降の最も新しく計算されたビットレートである最新ビットレートKiが記憶される最新ビットレート記憶部102と、最新ビットレートが計算されたなら、初期ビットレート記憶部から初期ビットレートを読み出し、当該最新ビットレートが、当該初期ビットレートより小さいか否かを判定するビットレート判定部103と、符号化装置に対しビットレートを設定する各タイミングにおいて予め定めた時間長Lを遡った期間のみの符号化済みの符号量である最新累積符号量Hを計算する最新累積符号量計算部104と、最新ビットレートが計算されたなら、当該最新ビットレートと予め定めた時間長Lと予め定めた係数αとを互いに乗じた最新累積符号量閾値Gを計算する最新累積符号量閾値計算部105と、最新累積符号量、最新累積符号量閾値が計算されたなら、当該最新累積符号量が当該最新累積符号量閾値より小さいか否かを判定する最新累積符号量判定部107と、ビットレート判定部による判定結果が肯定的であり、且つ、最新累積符号量判定部による判定結果が肯定的であるなら、初期ビットレート記憶部から初期ビットレートを読み出し、当該初期ビットレートに等しいビットレートを符号化装置に設定する一方、ビットレート判定部による判定結果、または、最新累積符号量判定部による判定結果が否定的であるなら、最新ビットレート記憶部から最新ビットレートを読み出し、当該最新ビットレートに等しいビットレートを符号化装置に設定するビットレート設定部108とを備えるので、可変ビットレート方式の符号化装置に対し動画像の全ての符号を記録媒体に記録できるようなビットレートを設定でき、符号を再生した場合の画質を向上させることができる。
Therefore, the bit rate setting device 1A according to the second embodiment encodes a moving image in order to encode a moving image so as to obtain a total code amount corresponding to the bit rate BR set from the outside. Bits at a plurality of timings until the encoding of the moving image is completed with respect to the variable bit
なお、各実施の形態において、記録媒体容量Cとして言及した4.7ギガバイト、動画像Vの記録時間長として言及した2時間、タイミング信号tの間隔として言及した10秒、タイミング信号t1の間隔として言及した0.5秒、時間長Lとして言及した0.5秒、係数αとして言及した0.5は、それぞれ、説明の便宜上使用した例示であり、他の数値を用いてもよい。 In each embodiment, 4.7 GB referred to as the recording medium capacity C, 2 hours referred to as the recording time length of the moving image V, 10 seconds referred to as the interval of the timing signal t, and intervals of the timing signal t1 The mentioned 0.5 seconds, 0.5 seconds mentioned as the time length L, and 0.5 mentioned as the coefficient α are examples used for convenience of explanation, and other numerical values may be used.
また、符号化済記録時間長Nは、符号化装置2から取得したが、例えば、動画像記憶装置3で符号化済記録時間長Nが得られる場合には、動画像記憶装置3から取得してもよい。
Further, the encoded recording time length N is acquired from the
1、1A…ビットレート設定装置
2…符号化装置
3…動画像記憶装置
4…符号蓄積装置
11…記録媒体容量記憶部
12…動画像記録時間長記憶部
13、100…タイマー
14…累積符号量計算部
15…残存容量計算部
16…符号化済記録時間長取得部
17…残存記録時間長計算部
18、22…ビットレート計算部
19、108…ビットレート設定部
21…符号化部
101…初期ビットレート記憶部
102…最新ビットレート記憶部
103…ビットレート判定部
104…最新累積符号量計算部
105…最新累積符号量閾値計算部
106…パラメータ記憶部
107…最新累積符号量判定部
α…係数
BR…ビットレート
C…記録媒体容量
D…累積符号量
D1…参照符号量
D2…総符号量
G…最新累積符号量閾値
H…最新累積符号量
K…ビットレート
K0…初期ビットレート
Ki…最新ビットレート
L…時間長
M…動画像記録時間長
N…符号化済記録時間長
P0、P1、P2…目標符号量
V…動画像
T0、T1、T1’、T2…タイミング
t、t1…タイミング信号
DESCRIPTION OF SYMBOLS 1, 1A ... Bit
Claims (2)
符号化された動画像が記録される記録媒体に記録可能な最大符号量である記録媒体容量が予め記憶される記録媒体容量記憶部と、
前記動画像の記録時間長である動画像記録時間長が予め記憶される動画像記録時間長記憶部と、
前記動画像の符号化が終了するまでの複数のタイミングにおいて符号化済みの累積の符号量である累積符号量を計算する累積符号量計算部と、
前記累積符号量が計算されたなら、前記記録媒体容量記憶部から記録媒体容量を読み出し、当該記録媒体容量から当該累積符号量を減じた残存容量を計算する残存容量計算部と、
前記動画像の符号化が終了するまでの複数のタイミングにおいて符号化済みの累積の符号量に対応する動画像部分の記録時間長である符号化済記録時間長を取得する符号化済記録時間長取得部と、
前記符号化済記録時間長が取得されたなら、前記動画像記録時間長記憶部から動画像記録時間長を読み出し、当該動画像記録時間長から当該符号化済記録時間長を減じた残存記録時間長を計算する残存記録時間長計算部と、
前記残存容量と前記残存記録時間長が計算されたなら、当該残存容量を当該残存記録時間長で除したビットレートを計算するビットレート計算部と、
前記ビットレートが計算されたなら、当該ビットレートに等しいビットレートを前記符号化装置に設定するビットレート設定部と
を備えることを特徴とするビットレート設定装置。 In order to encode a moving image so that a total code amount corresponding to a bit rate set from the outside can be obtained, the code is encoded at a bit rate larger or smaller than the bit rate depending on the data amount of the encoding target portion of the moving image. A bit rate setting device that sets a bit rate at a plurality of timings until the encoding of the moving image is completed with respect to a variable bit rate encoding device that encodes a portion to be encoded;
A recording medium capacity storage unit that stores in advance a recording medium capacity that is the maximum code amount that can be recorded in a recording medium on which the encoded moving image is recorded;
A moving image recording time length storage unit in which a moving image recording time length that is a recording time length of the moving image is stored in advance;
A cumulative code amount calculation unit that calculates a cumulative code amount that is a cumulative code amount that has been encoded at a plurality of timings until encoding of the moving image is completed;
When the accumulated code amount is calculated, a recording medium capacity is read from the recording medium capacity storage unit, and a remaining capacity calculation unit that calculates a remaining capacity obtained by subtracting the accumulated code amount from the recording medium capacity; and
Encoded recording time length that acquires an encoded recording time length that is a recording time length of a moving image portion corresponding to a cumulative code amount that has been encoded at a plurality of timings until the encoding of the moving image ends. An acquisition unit;
If the encoded recording time length is acquired, the remaining recording time obtained by reading the moving image recording time length from the moving image recording time length storage unit and subtracting the encoded recording time length from the moving image recording time length A remaining recording time length calculator for calculating the length;
If the remaining capacity and the remaining recording time length are calculated, a bit rate calculation unit that calculates a bit rate obtained by dividing the remaining capacity by the remaining recording time length;
A bit rate setting device comprising: a bit rate setting unit that sets, in the encoding device, a bit rate equal to the bit rate when the bit rate is calculated.
符号化された動画像が記録される記録媒体に記録可能な最大符号量である記録媒体容量が予め記憶される記録媒体容量記憶部と、
前記動画像の記録時間長である動画像記録時間長が予め記憶される動画像記録時間長記憶部と、
前記動画像の符号化が終了するまでの複数のタイミングにおいて符号化済みの累積の符号量である累積符号量を計算する累積符号量計算部と、
前記累積符号量が計算されたなら、前記記録媒体容量記憶部から記録媒体容量を読み出し、当該記録媒体容量から当該累積符号量を減じた残存容量を計算する残存容量計算部と、
前記動画像の符号化が終了するまでの複数のタイミングにおいて符号化済みの累積の符号量に対応する動画像部分の記録時間長である符号化済記録時間長を取得する符号化済記録時間長取得部と、
前記符号化済記録時間長が取得されたなら、前記動画像記録時間長記憶部から動画像記録時間長を読み出し、当該動画像記録時間長から当該符号化済記録時間長を減じた残存記録時間長を計算する残存記録時間長計算部と、
前記残存容量と前記残存記録時間長が計算されたなら、当該残存容量を当該残存記録時間長で除したビットレートを計算するビットレート計算部と、
1回目に計算されたビットレートである初期ビットレートが記憶される初期ビットレート記憶部と、
2回目以降の最も新しく計算されたビットレートである最新ビットレートが記憶される最新ビットレート記憶部と、
前記最新ビットレートが計算されたなら、前記初期ビットレート記憶部から初期ビットレートを読み出し、当該最新ビットレートが、当該初期ビットレートより小さいか否かを判定するビットレート判定部と、
前記符号化装置に対しビットレートを設定する各タイミングにおいて予め定めた時間長を遡った期間のみの符号化済みの符号量である最新累積符号量を計算する最新累積符号量計算部と、
前記最新ビットレートが計算されたなら、当該最新ビットレートと前記予め定めた時間長と予め定めた係数とを互いに乗じた最新累積符号量閾値を計算する最新累積符号量閾値計算部と、
前記最新累積符号量、前記最新累積符号量閾値が計算されたなら、当該最新累積符号量が当該最新累積符号量閾値より小さいか否かを判定する最新累積符号量判定部と、
前記ビットレート判定部による判定結果が肯定的であり、且つ、前記最新累積符号量判定部による判定結果が肯定的であるなら、前記初期ビットレート記憶部から初期ビットレートを読み出し、当該初期ビットレートに等しいビットレートを前記符号化装置に設定する一方、前記ビットレート判定部による判定結果、または、前記最新累積符号量判定部による判定結果が否定的であるなら、前記最新ビットレート記憶部から最新ビットレートを読み出し、当該最新ビットレートに等しいビットレートを前記符号化装置に設定するビットレート設定部と
を備えることを特徴とするビットレート設定装置。 The moving image is encoded at a bit rate larger or smaller than the bit rate according to the data amount of the encoding target portion of the moving image so as to encode the moving image so that the total code amount corresponding to the bit rate set from the outside is obtained. A bit rate setting device that sets a bit rate at a plurality of timings until encoding of a moving image is completed with respect to a variable bit rate encoding device that encodes an image,
A recording medium capacity storage unit that stores in advance a recording medium capacity that is the maximum code amount that can be recorded in a recording medium on which the encoded moving image is recorded;
A moving image recording time length storage unit in which a moving image recording time length that is a recording time length of the moving image is stored in advance;
A cumulative code amount calculation unit that calculates a cumulative code amount that is a cumulative code amount that has been encoded at a plurality of timings until encoding of the moving image is completed;
When the accumulated code amount is calculated, a recording medium capacity is read from the recording medium capacity storage unit, and a remaining capacity calculation unit that calculates a remaining capacity obtained by subtracting the accumulated code amount from the recording medium capacity; and
Encoded recording time length that acquires an encoded recording time length that is a recording time length of a moving image portion corresponding to a cumulative code amount that has been encoded at a plurality of timings until the encoding of the moving image ends. An acquisition unit;
If the encoded recording time length is acquired, the remaining recording time obtained by reading the moving image recording time length from the moving image recording time length storage unit and subtracting the encoded recording time length from the moving image recording time length A remaining recording time length calculator for calculating the length;
If the remaining capacity and the remaining recording time length are calculated, a bit rate calculation unit that calculates a bit rate obtained by dividing the remaining capacity by the remaining recording time length;
An initial bit rate storage unit that stores an initial bit rate that is a bit rate calculated for the first time;
A latest bit rate storage unit for storing the latest bit rate which is the most recently calculated bit rate from the second time onward;
When the latest bit rate is calculated, the initial bit rate is read from the initial bit rate storage unit, and a bit rate determination unit that determines whether the latest bit rate is smaller than the initial bit rate;
A latest cumulative code amount calculation unit that calculates a latest cumulative code amount that is an encoded code amount only in a period that goes back a predetermined time length at each timing for setting a bit rate for the encoding device;
If the latest bit rate has been calculated, a latest cumulative code amount threshold value calculation unit that calculates a latest cumulative code amount threshold value obtained by multiplying the latest bit rate, the predetermined time length, and a predetermined coefficient,
If the latest accumulated code amount and the latest accumulated code amount threshold are calculated, a latest accumulated code amount determination unit that determines whether the latest accumulated code amount is smaller than the latest accumulated code amount threshold;
If the determination result by the bit rate determination unit is affirmative and the determination result by the latest cumulative code amount determination unit is affirmative, the initial bit rate is read from the initial bit rate storage unit, and the initial bit rate If the determination result by the bit rate determination unit or the determination result by the latest cumulative code amount determination unit is negative, the latest bit rate storage unit updates the latest bit rate to the encoding device. A bit rate setting device comprising: a bit rate setting unit that reads a bit rate and sets a bit rate equal to the latest bit rate in the encoding device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010062513A JP5075932B2 (en) | 2010-03-18 | 2010-03-18 | Bit rate setting device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010062513A JP5075932B2 (en) | 2010-03-18 | 2010-03-18 | Bit rate setting device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011199473A true JP2011199473A (en) | 2011-10-06 |
JP5075932B2 JP5075932B2 (en) | 2012-11-21 |
Family
ID=44877149
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010062513A Active JP5075932B2 (en) | 2010-03-18 | 2010-03-18 | Bit rate setting device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5075932B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106656177A (en) * | 2016-09-07 | 2017-05-10 | 沈阳东软医疗系统有限公司 | Method and device for enhancing DAC output waveform accuracy and magnetic resonance system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000333169A (en) * | 1999-05-24 | 2000-11-30 | Mitsubishi Electric Corp | Moving picture coder |
JP2001008215A (en) * | 1999-06-24 | 2001-01-12 | Victor Co Of Japan Ltd | Dynamic image encoder and method therefor |
-
2010
- 2010-03-18 JP JP2010062513A patent/JP5075932B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000333169A (en) * | 1999-05-24 | 2000-11-30 | Mitsubishi Electric Corp | Moving picture coder |
JP2001008215A (en) * | 1999-06-24 | 2001-01-12 | Victor Co Of Japan Ltd | Dynamic image encoder and method therefor |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106656177A (en) * | 2016-09-07 | 2017-05-10 | 沈阳东软医疗系统有限公司 | Method and device for enhancing DAC output waveform accuracy and magnetic resonance system |
CN106656177B (en) * | 2016-09-07 | 2020-01-07 | 东软医疗系统股份有限公司 | Method and device for improving precision of DAC output waveform and magnetic resonance system |
Also Published As
Publication number | Publication date |
---|---|
JP5075932B2 (en) | 2012-11-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6697567B1 (en) | Dynamic image encoding apparatus | |
CN101022547B (en) | Transmission rate adjustment device and method | |
JP2009277298A (en) | Apparatus and method for digital signal reproducing and apparatus and method for digital signal recording | |
KR20060082409A (en) | Method for recording an a/v signal | |
JP5075932B2 (en) | Bit rate setting device | |
CN101404171A (en) | Audio/video recording apparatus and recording method | |
JP4124798B2 (en) | Timing extracting device, information reproducing device and DVD device using the same | |
JP4601512B2 (en) | DSV control device and DSV control method | |
JP4328792B2 (en) | Recording / reproducing apparatus and recording control method | |
JP4650454B2 (en) | Encoding apparatus and encoding method | |
JP5088215B2 (en) | Information processing system, information processing method, and program | |
KR20070033377A (en) | Data stream encoding device and method | |
CN103716638A (en) | Video image display sequence representing method | |
JP2014225107A (en) | Data recording device and time correction method | |
JP2005151173A5 (en) | ||
CN106101596A (en) | A kind of video storage method and device | |
JP4462643B2 (en) | Image encoding method and image encoding apparatus | |
JP2001204018A (en) | Variable bit rate coder and coding method | |
JP2008053797A (en) | Clock regenerating method and device | |
CN100440958C (en) | Image data processing device and method | |
JP2010218661A (en) | Recording and reproducing apparatus, control apparatus, and formatting method | |
JP4493551B2 (en) | Data encoding apparatus, data decoding apparatus, data encoding method, data decoding method, and program | |
JP2009105477A (en) | Reproducing device and reproducing method | |
JP2005251376A (en) | Information processor, information recorder and information transmitting apparatus | |
US8149679B2 (en) | Recording/reproducing device and method, recording medium, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120210 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120221 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120327 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20120605 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120615 |
|
A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20120806 |
|
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: 20120821 |
|
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: 20120827 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5075932 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150831 Year of fee payment: 3 |
|
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 |
|
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 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |